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
[cli] optional override of existing environment variables #11348
Conversation
🦋 Changeset detectedLatest commit: 7f785fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed PR with tests! I think we can accept this change if we make some tweaks.
I made some tweaks to flesh out the new option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All valid to me. Thanks. 🙏
Thanks @mountainash! |
## Why Closes #11130 ## Changelog Added `--force` argument to upsert existing environment variables (#11130) ## References - Vercel API `/v10/projects/{idOrName}/env` https://vercel.com/docs/rest-api/endpoints/projects#create-one-or-more-environment-variables
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## vercel@34.0.0 ### Major Changes - Disables promotion of preview deployments ([#11411](#11411)) ### Patch Changes - Always set `projectSettings.nodeVersion` in `vc deploy` ([#11351](#11351)) - [cli] optional override of existing environment variables with --force ([#11348](#11348)) ## @vercel/client@13.2.0 ### Minor Changes - Always use v13 of create deployment API endpoint ([#11351](#11351)) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Is it possible this caused an issue using env variables? Just recently I am no longer able to call my Dynamo endpoint Error fetching item from DynamoDB UnrecognizedClientException: The security token included in the request is invalid
Works in my local env. Verified my env variables have not changed. Both AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID exist and are populated with the correct key. |
@crbraun what version of the Vercel CLI ( |
I did verify that AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are present. Oddly there there is a AWS_SESSION_TOKEN present in the environment which my application never sets. I expect this is the issue. But I am not sure how this got in the environment as I do not have this variable set anywhere. |
I was able to work around this issue by adding an empty AWS_SESSION_TOKEN env variable to my environment. I expect there is something wrong with the vercel deployer as it seems to be setting an AWS_SESSION_TOKEN when there is none present in the configuration. |
Hrm. I don't think that should be happening. If you open a support case, we can look into it. https://vercel.com/contact |
It doesn't look like I am allowed to create a support ticket
I have it worked around for now, but I am fairly certain there was a recent change in vercel that was deployed today that caused this issue. Let me know if there is a way I can log an issue with support, be glad to do so. -- Thanks |
Why
Closes #11130
Changelog
Added
--force
argument to upsert existing environment variables (#11130)References
/v10/projects/{idOrName}/env
https://vercel.com/docs/rest-api/endpoints/projects#create-one-or-more-environment-variables