Skip to content

New CD workflow #371

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

Merged
merged 21 commits into from
Dec 7, 2022
Merged

New CD workflow #371

merged 21 commits into from
Dec 7, 2022

Conversation

TwistedTwigleg
Copy link
Contributor

Description of changes:

Moves Python CD workflow to new method and adds version stamping to the Python V2 SDK so the VERSION file's value is always the latest release version.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines 35 to 38
# awkward - we need to snip the old release message and then force overwrite the tag with the new commit but
# preserving the old message
# the release message seems to be best retrievable by grabbing the last lines of the release view from the
# github cli
Copy link
Contributor

@graebm graebm Nov 11, 2022

Choose a reason for hiding this comment

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

I've got an idea that could make this more graceful than this approach from aws-crt-cpp

This approach is:

  • Team member uses Github Release webpage (pick new number, pick title, pick notes (usually autogenerated))
  • Release workflow notices release, makes commit with version numbers, and then edits tags and releases to reflect that new commit
  • PROs: we get to use the Github Release webpage
  • CONs:
    • it's weird that the script edits tags/releases. There's a chance some external user or bot queries the latest release or tag in the moments before they're deleted and replaced by new ones, and ends up getting the wrong commit
    • There's also a chance someone names the release tag wrong (forgets the "v", or sets the wrong value for MAJOR.MINOR.PATCH
    • Also people frequently check the wrong "pre-release" and "latest-release" checkboxes since we're not 100% consistent across repos on whether these should be checked or not

Here's an alternate idea I've had in the back of my head:

  • We make our OWN webpage that team members use to create releases
    • We can use Github workflows. If you manually run a workflow, the inputs become the webpage form elements that the user needs to fill out (here's a youtube video showing what I mean. So we could have:
      • script properly increments version based on whether this is a MAJOR, MINOR, or PATCH release (or maybe don't even give the option for MAJOR since that would be a huge mistake to make)
      • user could manually type in title for release
      • we could use the gh release --generate-notes option to automatically fill out the notes
    • Workflow commits new version file to main
    • Workflow creates release & tag based on that new commit
    • PROs:
      • always gets the version string and "pre release" and "latest release" correct
      • doesn't "edit history" by deleting and replacing the tag and release
    • CONs:
      • This would be new and different. We'd have to figure it out
      • What if someone doesn't know about the new way to make release for this repo and does it the old way? Maybe it doesn't matter, since the release pipeline wouldn't run as a side-effect of a new github release, it would run due to explicit invocation from the new workflow

@TwistedTwigleg
Copy link
Contributor Author

Thanks! Merging into main...

@TwistedTwigleg TwistedTwigleg merged commit 4a5a05c into main Dec 7, 2022
@TwistedTwigleg TwistedTwigleg deleted the NewCDWorkflow branch December 7, 2022 20:05
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