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

C3: Update Python workers template wrangler toml to include bindings … #5576

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

jculvey
Copy link
Contributor

@jculvey jculvey commented Apr 10, 2024

What this PR solves / how to test

Adds commented out bindings examples to the wrangler.toml of the python template to align it with the others.

Author has addressed the following

@jculvey jculvey requested a review from a team as a code owner April 10, 2024 15:19
Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: 7e68dbd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-cloudflare Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8633751697/npm-package-wrangler-5576

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5576/npm-package-wrangler-5576

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8633751697/npm-package-wrangler-5576 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8633751697/npm-package-create-cloudflare-5576 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8633751697/npm-package-cloudflare-kv-asset-handler-5576
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8633751697/npm-package-miniflare-5576
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8633751697/npm-package-cloudflare-pages-shared-5576
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8633751697/npm-package-cloudflare-vitest-pool-workers-5576

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.48.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240404.0
workerd 1.20240404.0 1.20240404.0
workerd --version 1.20240404.0 2024-04-04

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

Looks good to me 🙂

@@ -3,3 +3,97 @@ name = "<TBD>"
main = "src/entry.py"
compatibility_flags = ["python_workers"]
compatibility_date = "<TBD>"

# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
# Note: Use secrets to store sensitive data.
Copy link
Member

Choose a reason for hiding this comment

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

should we also add a link to the secrets doc?

(https://developers.cloudflare.com/workers/configuration/secrets/)

Copy link
Contributor

Choose a reason for hiding this comment

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

I like this suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a good suggestion indeed.

I'll do this in a followup PR since I want to make the change to all the wrangler.toml files. In that same PR I'd like to update the worker templates to use build-cf-types as well and get rid of the redundant definition/docs in their source files.

@@ -3,3 +3,97 @@ name = "<TBD>"
main = "src/entry.py"
compatibility_flags = ["python_workers"]
compatibility_date = "<TBD>"

# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
# Note: Use secrets to store sensitive data.
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this suggestion.

@jculvey jculvey merged commit c9c68d8 into main Apr 11, 2024
23 checks passed
@jculvey jculvey deleted the c3-update-python-wrangler branch April 11, 2024 14:11
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.

3 participants