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

Fix publish and ci pipelines #128

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Fix publish and ci pipelines #128

merged 1 commit into from
Sep 26, 2024

Conversation

ivangonzalezacuna
Copy link
Collaborator

@ivangonzalezacuna ivangonzalezacuna commented Sep 26, 2024

This should be fixing the CI pipelines. For some reason they were working well in the pull requests, but not in main.

Seems like the publish step have never updated the yarn.lock.

The last release (with yarn4): https://github.com/spreadshirt/backstage-plugin-s3/pull/127/files
The previous release (with yarn1): https://github.com/spreadshirt/backstage-plugin-s3/pull/123/files

Since yarn3, if a change will happen, it will crash completely in the CI, which is a nice feature, but we never found out.

Might be that the changeset commands we use are not really supporting this.

As an alternative, and inspiration, check other projects like this: https://github.com/drodil/backstage-plugin-toolbox

Copy link

changeset-bot bot commented Sep 26, 2024

⚠️ No Changeset found

Latest commit: 15dffaa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@ivangonzalezacuna ivangonzalezacuna force-pushed the fix/actions branch 4 times, most recently from 1c30d2f to 857402d Compare September 26, 2024 14:04
This should be fixing the CI pipelines. For some reason they were
working well in the pull requests, but not in main.
@ivangonzalezacuna ivangonzalezacuna changed the title Fix install command in pipelines Fix publish and ci pipelines Sep 26, 2024
@ivangonzalezacuna
Copy link
Collaborator Author

@heyLu I will just merge this to be able to release the new versions for now. Will investigate later for a proper fix, which might need to be tested together with the next release process

@ivangonzalezacuna ivangonzalezacuna merged commit 39d54a8 into main Sep 26, 2024
2 checks passed
@ivangonzalezacuna ivangonzalezacuna deleted the fix/actions branch September 26, 2024 14:11
@heyLu
Copy link
Member

heyLu commented Oct 1, 2024

Just saw this now, I have a couple questions:

@ivangonzalezacuna
Copy link
Collaborator Author

Just saw this now, I have a couple questions:

* was `➤ YN0028: The lockfile would have been modified by this install, which is explicitly forbidden.` the symptom, e.g. here? https://github.com/spreadshirt/backstage-plugin-s3/actions/runs/11053611931/job/30708471503

Yes, that was the error message. The problem is that the changeset release updates the package.json files. This will cause the yarn.lock to be modified if you run yarn install again (just check the changes in the yarn.lock in this MR)

* i can't find a reference that this is happening since yarn3, do you have one?

This happened to us when we were updating our scheduled pipeline to create the MR for the backstage bump. It was working fine in yarn1, but not in yarn3. The fix was doing something like this in the bump command: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn backstage-cli versions:bump

* looks like we would not need `--immutable`, it seems to be true in CI anyways?  https://yarnpkg.com/cli/install#options-immutable

That's right. That I could also clean up

* is https://github.com/drodil/backstage-plugin-toolbox just an example of a plugin with a working setup?

Yes, exactly. I just added it as an example of a plugin which works fine with the releases. It uses a different tool though, might be worth investigating more when we have the next release

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.

2 participants