Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some internal details for Rulesets API #1346

Merged
merged 3 commits into from Aug 1, 2023

Conversation

zakcutner
Copy link
Contributor

Description

  • Removes some internal-only details that are not usable in the public API.
  • Updates the API reference links for Rulesets API.

Has your change been tested?

Using the existing Go unit tests, no new functionality has been added.

Types of changes

This is technically a breaking change in the Go API due to some fields being removed, although it would not have worked to use these fields with the Rulesets API in any case.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

This is an internal-only kind and is not exposed in the public API.
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

changelog detected ✅

@@ -734,19 +730,16 @@ type UpdateRulesetParams struct {
}

type UpdateEntrypointRulesetParams struct {
Name string `json:"name,omitempty"`
Copy link
Contributor Author

@zakcutner zakcutner Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This technically can be useful to specify but has some slightly inconsistent behaviour from the API if it is. If you specify it and the entry point ruleset didn't exist before, then this name will be used. If the entry point ruleset already exists though, this name will be ignored (and the ruleset will not be renamed).

Omitting the name always works consistently and will cause the API to set it to "default" if an entry point ruleset does not already exist. This is why I think it's probably best to not allow users to set the name explicitly to avoid confusion, but we can keep it here if that would be too much of a breaking change. What do you think @jacobbednarz?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me!

* `ShareableEntitlementName` cannot be used in requests using the public
  API.

* `Version` cannot be specified in requests as it is computed by the
  API.

* `Name` and `Kind` are not necessary when updating entry point
  rulesets. They are populated automatically by the API.
@codecov-commenter
Copy link

Codecov Report

Merging #1346 (f610edd) into master (b9ac804) will increase coverage by 0.16%.
Report is 92 commits behind head on master.
The diff coverage is 58.26%.

@@            Coverage Diff             @@
##           master    #1346      +/-   ##
==========================================
+ Coverage   48.33%   48.50%   +0.16%     
==========================================
  Files         133      135       +2     
  Lines       13023    13202     +179     
==========================================
+ Hits         6295     6403     +108     
- Misses       5201     5247      +46     
- Partials     1527     1552      +25     
Files Changed Coverage Δ
access_application.go 72.72% <ø> (ø)
access_organization.go 53.84% <ø> (ø)
device_posture_rule.go 61.80% <ø> (ø)
load_balancing.go 59.40% <ø> (ø)
teams_accounts.go 53.84% <ø> (ø)
regional_tiered_cache.go 43.75% <43.75%> (ø)
logpush.go 51.81% <46.15%> (-0.30%) ⬇️
images.go 44.70% <47.82%> (-0.12%) ⬇️
access_custom_page.go 48.27% <48.27%> (ø)
rulesets.go 30.14% <52.17%> (-4.50%) ⬇️
... and 6 more

@jacobbednarz jacobbednarz merged commit baded75 into cloudflare:master Aug 1, 2023
11 checks passed
@github-actions github-actions bot added this to the v0.74.0 milestone Aug 1, 2023
github-actions bot pushed a commit that referenced this pull request Aug 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

This functionality has been released in v0.74.0.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants