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

Modernise Worker methods and conventions #1137

Merged
merged 6 commits into from
Dec 9, 2022

Conversation

jacobbednarz
Copy link
Member

@jacobbednarz jacobbednarz commented Nov 30, 2022

For the 4.x release of the Terraform provider, we are removing the global api.AccountID that is configured on the client due to ongoing issues with it (see cloudflare/terraform-provider-cloudflare#1646). Workers are the last set of methods that rely on this behaviour 🌟

In doing this, we're also modernising the methods to match our future conventions and method signatures outlined for the experimental client.

This should be pretty well 1:1 functionality wise as everything Workers related is now accessible on the account resource level instead of the older split between zone/account for non-ent and enterprise configurations. The other major change here is that now the various parts of the Workers ecosystem are in their own files so that we can start to assign specific ownership rules instead of lumping it all together.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2022

changelog detected ✅

Updates all the available Workers endpoints to follow the new method signatures
and conventions for calling the API.
Updates all the available Workers endpoints to follow the new method signatures
and conventions for calling the API.
@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2022

Codecov Report

Merging #1137 (f7fe839) into master (4ddb00c) will decrease coverage by 0.44%.
The diff coverage is 57.41%.

@@            Coverage Diff             @@
##           master    #1137      +/-   ##
==========================================
- Coverage   50.11%   49.66%   -0.45%     
==========================================
  Files         121      125       +4     
  Lines       11722    12005     +283     
==========================================
+ Hits         5874     5962      +88     
- Misses       4565     4698     +133     
- Partials     1283     1345      +62     
Impacted Files Coverage Δ
device_posture_rule.go 61.80% <ø> (ø)
errors.go 40.78% <ø> (ø)
pages_deployment.go 34.24% <ø> (-0.24%) ⬇️
pages_domain.go 71.27% <ø> (ø)
workers_account_settings.go 29.41% <0.00%> (-6.31%) ⬇️
workers_tail.go 52.00% <ø> (ø)
workers_secrets.go 29.41% <28.00%> (-16.05%) ⬇️
workers_cron_triggers.go 29.41% <29.41%> (-16.05%) ⬇️
workers_routes.go 31.25% <31.25%> (ø)
r2_bucket.go 75.67% <40.00%> (-24.33%) ⬇️
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

return WorkerRouteResponse{}, ErrMissingIdentifier
}

uri := fmt.Sprintf("/zones/%s/workers/routes", rc.Identifier)
Copy link
Member Author

Choose a reason for hiding this comment

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

worker routes still use the /workers/routes endpoint instead of the services route as that isn't documented. once we have that documented, we can swap it over.

@jacobbednarz jacobbednarz merged commit 3839b5e into cloudflare:master Dec 9, 2022
@github-actions github-actions bot added this to the v0.57.0 milestone Dec 9, 2022
github-actions bot pushed a commit that referenced this pull request Dec 9, 2022
jafowler pushed a commit that referenced this pull request Dec 15, 2022
This reverts commit 3839b5e, reversing
changes made to d7efda7.
@github-actions
Copy link
Contributor

This functionality has been released in v0.57.0.

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

@jacobbednarz jacobbednarz deleted the modernise-workers branch December 21, 2022 20:25
ivan-section-io pushed a commit to section/cloudflare-go that referenced this pull request Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants