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

chore(ci): move releasing to GitHub Actions MONGOSH-1871 #2309

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

gagik
Copy link
Contributor

@gagik gagik commented Jan 6, 2025

Built on top of #2289.

To Do:

  • Change documentation.
  • Remove old, non-GA-related code.
  • Add papertrail like in Compass.

@gagik gagik changed the base branch from main to gagik/individual-publishing January 6, 2025 10:15
@gagik gagik force-pushed the gagik/move-release-ga branch from 0edc03e to 187cfd2 Compare January 6, 2025 13:06
name: Release mongosh
on:
workflow_run:
workflows: ["CheckQL", "Run Smoke Tests", "evergreen"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure if evergreen is considered a workflow since it seems to be created by a bot/integration(?). Could leave and see what happens or just make it manual-only

@gagik gagik force-pushed the gagik/move-release-ga branch from 187cfd2 to 8bfe843 Compare January 6, 2025 13:32
@gagik gagik force-pushed the gagik/individual-publishing branch 3 times, most recently from 3c557da to 68e3e62 Compare January 6, 2025 14:04
@gagik gagik force-pushed the gagik/move-release-ga branch from 8bfe843 to 707000e Compare January 6, 2025 15:47
@addaleax
Copy link
Contributor

addaleax commented Jan 9, 2025

Super general note, but if we move triggering mongosh product releases out of Evergreen, we probably also need to adjust our papertrail integration like we do in Compass (where we write the name of the releaser into Compass's package.json, commit it, push it, and then retrieve it when Evergreen pushes the release: https://github.com/mongodb-js/compass/blob/0ca8439b07c31f406fda74c5a0340de1353d9915/.evergreen/compass_package.sh#L21-L59)

@gagik gagik force-pushed the gagik/individual-publishing branch 2 times, most recently from ed9ffa1 to e2ceaa5 Compare January 10, 2025 13:13
@gagik gagik force-pushed the gagik/move-release-ga branch 2 times, most recently from 7868a6c to 990f8ee Compare January 14, 2025 08:54
@gagik gagik changed the title WIP: move triggering release to GitHub Actions chore(ci): move releasing to GitHub Actions MONGOSH-1871 Jan 14, 2025
@gagik gagik marked this pull request as ready for review January 14, 2025 11:43
['merge', '--squash', `origin/release/${mongoshVersion}`],
commandOptions
);
spawnSync(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this essentially merges the PR but wondering if it'd be worth using GitHub CLI here instead to i.e. have reference to the original PR naming when merging. Don't know how easy it is with how our GitHub Actions Bot token works

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, right now this pushes from evergreen, right? Do we even have permissions for that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Depends on the token - the devtools bot token does have permissions for that, but I'd really like to avoid pushing to main if there's an open PR we could merge.

Copy link
Contributor Author

@gagik gagik Jan 14, 2025

Choose a reason for hiding this comment

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

Hm. We can either make the merging of the PR manual, based on a cron job like in Compass, or try to set it up in evergreen, i.e. install the GitHub CLI inside evergreen and then use GITHUB_TOKEN (not sure what permissions this is) to merge the created PR.

Actually what I could do is to create a GitHub workflow which gets triggered on release tag push and merge the PR from there!

{ isDryRun = false, useAuxiliaryPackagesOnly = false },
listNpmPackages: typeof listNpmPackagesFn = listNpmPackagesFn,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

getting rid of this helper so we can share more code

@gagik gagik requested review from addaleax and nirinchev January 14, 2025 11:49
['merge', '--squash', `origin/release/${mongoshVersion}`],
commandOptions
);
spawnSync(
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, right now this pushes from evergreen, right? Do we even have permissions for that?

Base automatically changed from gagik/individual-publishing to main January 14, 2025 12:16
@gagik gagik force-pushed the gagik/move-release-ga branch 2 times, most recently from d741f6a to 3bd3cae Compare January 15, 2025 20:40
@gagik gagik force-pushed the gagik/move-release-ga branch from 3bd3cae to 6aa5223 Compare January 15, 2025 20:42
@gagik gagik force-pushed the gagik/move-release-ga branch from 6aa5223 to e880d36 Compare January 16, 2025 08:49
gagik added 2 commits January 16, 2025 18:38
…d testing

This ended up being a larger refactor than intended but it was getting increasingly difficult to add new helpers and test them with the current setup. Now, instead of passing all helpers as spies, they exist as properties on "Publisher" objects which makes them easier to stub them with sinon.
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.

3 participants