Skip to content

Tidy up Changesets Integration#549

Merged
shrugs merged 11 commits intomainfrom
fix/changesets
Apr 10, 2025
Merged

Tidy up Changesets Integration#549
shrugs merged 11 commits intomainfrom
fix/changesets

Conversation

@shrugs
Copy link
Collaborator

@shrugs shrugs commented Apr 9, 2025

closes #546

  • move all docker building to the "build multi arch docker image" action
  • use matrices to build ensnode and the ensrainbow data images, reducing workflows
  • the ensrainbow-data images are still manual workflow triggers only
  • the changesets workflow runs on pushes to main
    • if changesets exists, creates/updates the changeset pr
    • if is caused by changeset pr merge, creates github release and publishes npm packages)
  • the "build ensnode images" workflow runs on release publish (caused by changeset workflow)
    • this may require the personal access token approach again, not sure yet

  • need to test that the new matrix-based docker builds work (no way to manually test cause the workflow name is different, need to merge to main first...)
  • need to see how changesets will publish the github release and how that triggers the build workflow
    • (no way to test without creating a new github repo, setting up all the secrets, etc... yeesh)
    • if it publishes multiple releases, we'll still have the workflow fan-out problem — need to make sure it publishes only one release. directus, for example, doesn't use changesets to publish the release, they use gh release create — we might want to move to that approach
    • https://github.com/directus/directus/blob/main/.github/workflows/release.yml
  • need to clean up old workflow runs or the actions pane will look cluttered

@changeset-bot
Copy link

changeset-bot bot commented Apr 9, 2025

🦋 Changeset detected

Latest commit: c9b3f92

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

This PR includes changesets to release 3 packages
Name Type
ensindexer Minor
ensadmin Minor
ensrainbow Minor

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

@vercel
Copy link
Contributor

vercel bot commented Apr 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
admin.ensnode.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 5:30pm
ensnode.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 5:30pm
ensrainbow.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 5:30pm


jobs:
ensnode-build-and-push:
runs-on: blacksmith-4vcpu-ubuntu-2204
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this CI Worker will have enough disk space to deal with the images to be built for ENSRainbow?

I guess one way of figuring it out is to go live with this PR and see.

package.json Outdated
"typecheck": "pnpm -r --parallel typecheck",
"changeset": "changeset",
"release": "changeset publish --filter='!@ensnode/shared-configs'",
"publish": "changeset publish",
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@tk-o tk-o left a comment

Choose a reason for hiding this comment

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

If we need a single github release including information about multiple packages release notes, we cannot use Changesets to handle that for us. Changesets create a release per tag, and since each released package gets its own tag, we end up having multiple releases created by Changesets at the same time (effectively, one per package).

To end up with a single Github Release including all packages that were updated, we'll need to opt-out from the flow where Changesets manage Github Releases. We will need a replacement automation that will track if Changesets'-created Pull Request got merged, and if so, read the pull request contents and create a single Github Release.

For example, this Changesets-generated PR include information about three newly created package tags. We can simply copy this PR contents below Releases heading and put in to a new Github Release. All app packages are versioned with the same version number, so we could extract that number and included in to the Github Release title.

Thoughts on that approach?

uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Copy link
Contributor

Choose a reason for hiding this comment

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

Very cool

Copy link
Contributor

@BanaSeba BanaSeba left a comment

Choose a reason for hiding this comment

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

Let's give it a try

name: "Build: ENSNode Images"
on:
workflow_dispatch:
release:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm worried that we will be swarmed with both packages and app releases here. All of them will trigger this, and we will be building [sub_repos_count * 3] images at once.

on:
workflow_dispatch:
release:
types: [published]
Copy link
Contributor

Choose a reason for hiding this comment

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

Also not sure if metadata step is working well with release trigger

@shrugs shrugs marked this pull request as ready for review April 10, 2025 17:23
@shrugs shrugs requested a review from a team as a code owner April 10, 2025 17:23
@shrugs shrugs merged commit 7c62c92 into main Apr 10, 2025
5 of 7 checks passed
@shrugs shrugs deleted the fix/changesets branch April 10, 2025 17:25
@github-actions github-actions bot mentioned this pull request Apr 10, 2025
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.

tidy up changesets

3 participants