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

AN-354 Initial checkin of Release Community Cromwell GHA #7691

Merged
merged 5 commits into from
Feb 19, 2025

Conversation

jgainerdewar
Copy link
Collaborator

@jgainerdewar jgainerdewar commented Feb 18, 2025

Description

Initial checkin of this GHA. I've done as much testing as I could in my fork, you can see the release created there and my recent runs of this action.

This requires a further round of testing in this repo with real secrets, but need to do an initial merge first.

This action will result in:

  • develop merged to master and upgraded to the next version
  • New numbered release in this here repo, consistent with the ones we have created in the past (release notes from changelog, jars attached, matching tag)
  • New major version images pushed to Dockerhub, ex. broadinstitute/cromwell:88

Release Notes Confirmation

CHANGELOG.md

  • I updated CHANGELOG.md in this PR
  • I assert that this change shouldn't be included in CHANGELOG.md because it doesn't impact community users

Terra Release Notes

  • I added a suggested release notes entry in this Jira ticket
  • I assert that this change doesn't need Jira release notes because it doesn't impact Terra users

@jgainerdewar jgainerdewar requested a review from a team as a code owner February 18, 2025 22:23
@jgainerdewar jgainerdewar changed the title Initial checkin of Release Community Cromwell GHA AN-354 Initial checkin of Release Community Cromwell GHA Feb 18, 2025
- name: Find Cromwell release number
run: |
set -e
previous_version=$(curl -X GET https://api.github.com/repos/broadinstitute/cromwell/releases/latest | jq .tag_name | xargs)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There might be a more elegant way to do this now, but this way works.

Copy link
Contributor

@LizBaldo LizBaldo left a comment

Choose a reason for hiding this comment

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

LGTM, I left a few suggestions / comments along the way. I think it might be nice to ship this with the ability to run on any branch to make potential debugging a lot easier

name: Release Community Cromwell

on:
workflow_dispatch:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, but do you want to set up a manual trigger to be able to run this workflow on any branch in case you need to further debug once this has been merged? Something like this should do it: https://github.com/DataBiosphere/terra-docker/blob/a0cf5769e6b469ba5813c810c119b10f26915422/.github/workflows/publish.yml#L2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do, but it looks like I get that for free - this is what I see when I run the action in my fork:
Screenshot 2025-02-19 at 9 33 41 AM
Maybe I'm misunderstanding though, I haven't actually tried with a different branch.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you only care about the workflow file, and if that's the case you should be all set. In the example I shared, the branch input is to chose the code from your PR branch, in addition to selecting the workflow from that branch too
Screenshot 2025-02-19 at 9 59 38 AM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, got it - for this specific workflow I think we do always want to use develop and master, and use a fork if we want to test without creating real releases. Feels like a footgun to give users a dropdown to create a real release from an arbitrary branch.

steps:
- uses: sbt/setup-sbt@v1

# `DSDEJENKINS_PASSWORD` auto syncs from vault with https://github.com/broadinstitute/terraform-ap-deployments/pull/614
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know if this secret will stay put in vault, or if devops has plans to move it to GSM instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No idea, it may already be coming from GSM - I can look and update the comment. This was copied and pasted from a different GHA we have.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like it's still in Vault.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy-pasted could be a candidate for making a reusable ("composite") action.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

True, though I don't know that that would result in many fewer lines copied and pasted, this is pretty minimal.

if ! [[ "${previous_version}" =~ ^[0-9][0-9]+$ ]]; then
exit 1
fi
echo "RELEASE_VERSION=$((previous_version + 1))" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

Are cromwell versions always incremented by 1? Would it make sense to have a manual override using workflow inputs in case this changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the past they have always been incremented by 1, and there are a few fiddly things in here that would go wrong if we started using arbitrary versions. We'll need to address this as part of switching to semantic versioning, which we should do, but that's a conversation for a different PR - are you okay waiting until then to do custom version support?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This logic does replicate the old release script.

token: ${{ secrets.BROADBOT_GITHUB_TOKEN }}
path: cromwell
ref: develop
fetch-depth: 0 # <-- important for branch shenanigans below
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you provide a bit more details about this? I could not pin point exactly where this is used below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, will expand comment - basically this tells the action to check out all the past commits, which is important for git to understand how to merge branches together.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think in this case 0 is a sentinel for infinity.

Copy link
Collaborator

@aednichols aednichols left a comment

Choose a reason for hiding this comment

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

Looks very credible as a first attempt worth running!

@jgainerdewar jgainerdewar merged commit e3a4740 into develop Feb 19, 2025
37 of 43 checks passed
@jgainerdewar jgainerdewar deleted the jd_AN-354_releaseGHA branch February 19, 2025 15:34
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