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

All the binding names should be distinct, no repeats (since they'll all be hanging off the same env object) #658

Closed
Tracked by #619
caass opened this issue Mar 21, 2022 · 6 comments · Fixed by #665
Labels
discussion This issue is being used to discuss a topic rather than track a feature or bug.

Comments

@caass
Copy link
Contributor

caass commented Mar 21, 2022

We should verify that users don't use the same binding names for

  • Durable Objects
  • Service Bindings
  • KV Namespaces
  • R2 Buckets
@caass
Copy link
Contributor Author

caass commented Mar 21, 2022

Is there a list of the properties whose bindings should be checked for uniqueness? Off the top of my head, like

  • Durable Objects
  • Service Bindings
  • Environment variables
  • KV namespaces

But I feel like there's more that i'm missing

@JacobMGEvans JacobMGEvans added the discussion This issue is being used to discuss a topic rather than track a feature or bug. label Mar 21, 2022
@threepointone
Copy link
Contributor

R2
Also secrets, but there's no good way to validate against that without a network call

@petebacondarwin
Copy link
Contributor

Something that came up yesterday in our attempt to upgrade one of the Pages Workers to W2 was the approach of setting a var binding in wrangler.toml but then overriding it with a secret in the dashboard. I don't know how prevalent this practice is, but I think we should not attempt to ensure uniqueness between vars and secrets.

@caass
Copy link
Contributor Author

caass commented Mar 22, 2022

That makes sense. What about unsafe bindings as well?

@caass
Copy link
Contributor Author

caass commented Mar 22, 2022

And wasm_modules and text_blobs?

@caass
Copy link
Contributor Author

caass commented Mar 22, 2022

Something that came up yesterday in our attempt to upgrade one of the Pages Workers to W2 was the approach of setting a var binding in wrangler.toml but then overriding it with a secret in the dashboard. I don't know how prevalent this practice is, but I think we should not attempt to ensure uniqueness between vars and secrets.

We could do a warning, maybe, instead of a full error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is being used to discuss a topic rather than track a feature or bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants