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

Propagate args to pnpm install command via pnpm sst upgrade #4257

Closed
BSteffaniak opened this issue Aug 20, 2024 · 5 comments
Closed

Propagate args to pnpm install command via pnpm sst upgrade #4257

BSteffaniak opened this issue Aug 20, 2024 · 5 comments
Assignees

Comments

@BSteffaniak
Copy link

Hi, by default pnpm install when ran in CI environments prevents the lock file from being out of sync with the package.json file. This makes pnpm sst upgrade impossible to run in CI via pnpm. (I try to do this to auto upgrade the SST version nightly.) They allow passing a --no-frozen-lockfile argument to the pnpm install command to overcome this.

I couldn't find any other environment variable override to fix it and I think it might be detecting the CI-ness of it because it is installed via a github action, but I am just speculating... I dug through the code but it seems a little too gnarly/unfamiliar for me to find the root cause of it in a quick look through.

However, regardless of whether there would be a fix outside of argument propagation, I think it might be worthwhile to implement argument propagation to the install commands (pnpm, npm, yarn, bun) around here.

Thoughts?

I'd be happy to take a stab at it, but not sure if you guys have other ideas around it.

Copy link
Contributor

thdxr commented Aug 20, 2024

is there a reason you're running sst upgrade in ci? it's meant as a simple convenience thing to update your package.json - there are better ways to do this if you need more control

@thdxr thdxr self-assigned this Aug 20, 2024
@BSteffaniak
Copy link
Author

I have github workflows that run on a schedule to auto-upgrade dependencies for various projects.

What are the better ways to do the upgrade?

@BSteffaniak
Copy link
Author

I guess I could update the package.json to use ^version instead of locking it down to an explicit version. That way a normal pnpm update would update the version. And since ion doesn't have any other cdk related packages that are required to stay in sync, I wouldn't have to worry about those versions causing problems.

I'm still curious about other potential better ways to handle this. I realize upgrading deps in CI might be a little backwards.

@jayair
Copy link
Contributor

jayair commented Aug 21, 2024

Yeah I think that might be a better way. The sst upgrade like Dax was saying is more of a helper.

@BSteffaniak
Copy link
Author

Ok, that's reasonable. Thanks!

@thdxr thdxr transferred this issue from sst/ion Oct 21, 2024
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

No branches or pull requests

3 participants