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

T358307 - Update Release Variables Script #586

Merged
merged 11 commits into from
Feb 27, 2024
Merged

Conversation

RickiJay-WMDE
Copy link
Member

@RickiJay-WMDE RickiJay-WMDE commented Feb 21, 2024

Updates the commit hashes in variables.env, specifically from Gerrit, GitHub, and Bitbucket. The first, it parses the relevant webpage using BeautifulSoup; the latter two, it pulls the relevant data from their respective APIs.

While I did need to tweak some of the urls provided for consistency (and accuracy, in the case of WDQS GUI - the link was broken), I did not commit variables.env updated hashes, so that devs can test the script.

Notes:

  • Mediawiki extensions include the compatible version of Mediawiki in the URL. I have the script fetch this from the MEDIAWIKI_VERSION variable and automatically update the commented URLs to the correct version.
  • As mentioned, for both GitHub and Bitbucket, the script pulls data from their respective APIs. The base URLs for each link are changed to https://api.github.com/repos/ and https://bitbucket.org/!api/2.0/repositories/ respectively. I didn't make this change in variables.env, because I assumed we wanted that file to link to human-readable pages rather than API output.

@RickiJay-WMDE RickiJay-WMDE changed the title Update Release Variables Script T358307 - Update Release Variables Script Feb 23, 2024
@RickiJay-WMDE RickiJay-WMDE marked this pull request as ready for review February 23, 2024 04:24
@RickiJay-WMDE RickiJay-WMDE requested a review from a team February 26, 2024 02:29
Copy link
Contributor

@lorenjohnson lorenjohnson left a comment

Choose a reason for hiding this comment

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

Looks great, with one caveat. Yes, effectively currently our only dev dependency is Docker. Probably should stick with that unless there is compelling reason not to. See here for how we currently run your other Python script, and apply that here?:

$TEST_COMPOSE run --rm --build -v "$(pwd):/tmp" test-runner -c "
python3 scripts/add_newline.py /tmp '$MY_FILES' $PYTHON_FLAGS
"

Perhaps add a "update_hashes" task to the build.sh script to run the Python script in the test (or build) container?

Copy link
Contributor

@rti rti left a comment

Choose a reason for hiding this comment

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

Haha. Great work. Nice, thanks a lot.

I think the automatic Gerrit commit updating can be easily done like this as the REL branches ensure compatibility. No doubt there.

For the others, I would like to have an explicit "review the changes" step in our release process, as the maintainers of these repositories give no guarantees at all (AFAIK). So I frighten having this step automatic could lead to accidental breaking changes. Or can we just assume: "What the test suite does not catch is not breaking"?

Copy link
Contributor

@lorenjohnson lorenjohnson left a comment

Choose a reason for hiding this comment

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

Great! ✨

@RickiJay-WMDE RickiJay-WMDE merged commit 95405db into main Feb 27, 2024
25 checks passed
@RickiJay-WMDE RickiJay-WMDE deleted the update-commit-script branch February 27, 2024 13:53
adeeri pushed a commit that referenced this pull request Apr 11, 2024
T358307 - Update Release Variables Script
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