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

Support deleting namespaced Workers in DeleteWorker #1737

Conversation

WalshyDev
Copy link
Member

Description

Support a new DispatchNamespace option in DeleteWorker params just like we do for the other APIs (UploadWorker, UpdateWorkersScriptContent, etc.).

Has your change been tested?

TestDeleteNamespacedWorker test passes. Test script also passes:

func main() {
	api, err := cloudflare.New(os.Getenv("CLOUDFLARE_API_KEY"), os.Getenv("CLOUDFLARE_API_EMAIL"))
	if err != nil {
		log.Fatal(err)
	}

	ctx := context.Background()

	accountId := os.Getenv("ACCOUNT_ID")
	err = api.DeleteWorker(ctx, cloudflare.AccountIdentifier(accountId), cloudflare.DeleteWorkerParams{
		ScriptName:        "user-worker-1",
		DispatchNamespace: &[]string{"test"}[0],
	})
	if err != nil {
		log.Fatal(err)
	}
}

Screenshots (if appropriate):

Types of changes

What sort of change does your code introduce/modify?

  • 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.

Copy link
Contributor

github-actions bot commented Apr 10, 2024

changelog detected ✅

@WalshyDev WalshyDev force-pushed the walshy/support-wfp-delete-in-deleteworker branch 2 times, most recently from 7018f8d to f27442f Compare April 10, 2024 16:53
@WalshyDev WalshyDev force-pushed the walshy/support-wfp-delete-in-deleteworker branch from f27442f to 47e555c Compare April 10, 2024 16:57
@jacobbednarz jacobbednarz merged commit 6ba12b6 into cloudflare:master Apr 11, 2024
10 checks passed
@jacobbednarz
Copy link
Member

lgtm!

@github-actions github-actions bot added this to the v0.94.0 milestone Apr 11, 2024
@WalshyDev WalshyDev deleted the walshy/support-wfp-delete-in-deleteworker branch April 11, 2024 14:16
Copy link
Contributor

This functionality has been released in v0.94.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 Apr 24, 2024
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

2 participants