Open Bug 1911056 Opened 2 years ago Updated 2 months ago

Add mach commands for geckodriver to automate the necessary release steps

Categories

(Testing :: geckodriver, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 6 obsolete files)

Attached file release_geckodriver.py (obsolete) —

Given the number of steps to run for a release of geckodriver there is always the risk that something is forgotten or mistakes happen. As such we should try to have scripts around - as best as part of the mach command - to cover the individual steps.

I'm going to attach a very rough script that helps to automate parts of the workflow but is at the moment really just a WiP with some global methods just doing the job. No specific error handling or separation into classes is done yet. We can enhance it step by step, or create individual mach commands when we have time. Otherwise I'll take a look once in a while to get improvements done.

Maybe we should make it a meta bug so that we can add individual mach commands.

Priority: -- → P3
Attached file release_geckodriver.py (obsolete) —

Updated code with improvements to:

  • release dependencies (only publish when required)
  • download binaries (now fully automated)
Attachment #9417221 - Attachment is obsolete: true
Attached file release_geckodriver.py (obsolete) —

Most recent updates for the updated script:

  • Apart from writing the release-specific changelog entries, the entire release process is now scripted. Cleanup logic has also been added to handle failed commands gracefully.
  • changelog: Added a new --bugzilla option that generates the output we typically post as a comment on the release bug. The command now also creates a template for CHANGES.md and automatically categorizes entries into Added, Changed, Fixed, and Removed sections. Entries that appear multiple times due to backouts are automatically filtered out.
  • update-deps: The script now first attempts a bugfix version update. If that fails because of backward-incompatible API changes, it automatically falls back to a minor version bump.
  • release-deps: Prints a summary of all released crates at the end, making it easy to copy the information into the tracking bug.
  • export: Exports the geckodriver source code to the GitHub mirror, removes path-based mozbase Rust dependencies from Cargo.toml, and commits only the required files, including Cargo.lock. If creating a signed commit fails, it automatically falls back to an unsigned commit.
  • release: Added a new command that creates a draft GitHub release via the GitHub API. It automatically downloads all build artifacts, performs validation checks for macOS binaries, and attaches them to the draft release. It now also correctly uses the notarized macOS builds of geckodriver, which had previously been omitted.

If everything still works for the next geckodriver release we could think about porting that script to a mach command.

Attachment #9468311 - Attachment is obsolete: true
Attached file release_geckodriver.py (obsolete) —

This version fixes the target of the release on Github to point to release and not main.

Attachment #9592914 - Attachment is obsolete: true
Attached file release_geckodriver.py (obsolete) —

Some more updates:

  • Renamed the release subcommand to draft-release.
  • Added a new publish-release subcommand that publishes the geckodriver crate to crates.io and promotes the GitHub draft release to a published release.
Attachment #9592984 - Attachment is obsolete: true
Attached file release_geckodriver.py (obsolete) —

With this update I'm fixing a regression in naming the release on Github which caused issues for some folks that scrape for the binaries based on the release title.

Attachment #9592996 - Attachment is obsolete: true
Attached file release_geckodriver.py —

Small fixes to only print those crates that really were updated for the changelog and when publishing the release.

Attachment #9593393 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: