GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-137242: Build Android artifacts in a reusable workflow by webknjaz · Pull Request #137768 · python/cpython

Conversation

@webknjaz

@webknjaz webknjaz commented Aug 14, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This is a follow-up for #137186 aiming to make the initially added automation live in its own "module" rather than the top-level workflow and make it possible to reuse it externally.

It will also enable a companion change externally: python/release-tools#270.

  • Issue: Android CI and binary releases #137242

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@webknjaz
Build Android artifacts in a reusable workflow
29fe94d
This is a follow-up for python#137186 aiming to make the initially added
automation live in its own "module" rather than the top-level workflow
and make it possible to reuse it externally.
@webknjaz
webknjaz requested review from AA-Turner, ezio-melotti, freakboy3742, hugovk and mhsmith as code owners August 14, 2025 16:06
@bedevere-app bedevere-app Bot added the awaiting review label Aug 14, 2025
@webknjaz

webknjaz commented Aug 14, 2025

Copy link
Copy Markdown
Member Author

cc @freakboy3742 @mhsmith

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz webknjaz mentioned this pull request Aug 14, 2025
gh-137242: Add Android CI job #137186
Merged
@StanFromIreland StanFromIreland added infra CI, GitHub Actions, buildbots, Dependabot, etc. skip news OS-android labels Aug 14, 2025
@StanFromIreland

StanFromIreland commented Aug 14, 2025

Copy link
Copy Markdown
Member

I think this can go under the same issue, #137242?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith mhsmith changed the title Build Android artifacts in a reusable workflow gh-137242: Build Android artifacts in a reusable workflow Aug 14, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Aug 14, 2025
Android CI and binary releases #137242
Closed
@mhsmith

mhsmith commented Aug 14, 2025

Copy link
Copy Markdown
Member

Thanks; I'm on holiday for the next few days, but I'll look at this when I get back.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

So - I can see how this change works; I guess the part I'm not understanding is why it's a net improvement.

Adding this reusable workflow adds almost 100 lines of (moderately complex) GitHub Actions configuration, so that we can re-use the workflow... in exactly 2 places. In one of those places (CPython's repo), exactly 1 line of code is saved by this refactor; in release-tools, we save 9 lines. And the duplicated code that is being replaced isn't especially complex - it's "checkout repository", "call single script", "save artefacts" - all very common (and reasonably well understood) actions; and it's being replaced by a workflow configuration that isn't exactly complex, but at the very least has it's own learning curve.

In a world where the python Android/android.py ci step was more complicated (i.e., the original form of the Android CI PR), I can see how this sort of refactoring would make sense. But given where we landed (using ::group:: markers and encoding everything in Python), I feel like I'm missing something.

Is there some other use case that I'm missing? Some other benefit of being a reusable workflow?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Aug 19, 2025

Copy link
Copy Markdown
Member Author

@freakboy3742 the idea is to stop having steps in build.yml altogether. Currently, jobs are spread across multiple layers. In the ideal world, build.yml should only declare inter-job deps, setting up the workflow run shape + job conditionals and matrixes, leading up to running alls-green; and everything else would be in "modules".

I'd treat it more as an architectural thing rather than anything else. One of the UX bits is that two related jobs are now displayed under a common category in the sidebar as follows:
image

Previously, they showed up as two disconnected entries. I'd like to get the CI setup into a more consistent state and nicer look. So while it doesn't deduplicate too many things right now, it improves consistency and layer separation (inputs/matrix in build.yml while the implementation is in reusable-*.ymls).

I'm hopefully going be looking into making other jobs consistent but wanted to start small, with something still fresh in memory.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

@webknjaz I can see how the summary is a nice feature on the action summary page - but the "on PR" view doesn't have any of those affordances. And if a build fails, I usually find that I'm navigating directly to the broken build page from the PR page, rather than going through the Actions navigation.

I guess I don't have any particularly strong feelings about the sort of organization you're describing. I can't find any fault with the implementation; but to me, it still seems like a lot more complexity without a lot of improvement. If there were details in the workflow that benefitted from having a single point of configuration, it might make more sense - but the structure you've described here essentially turns all that into workflow inputs, so you don't get that benefit either.

So - consider me -0. I won't fight it if someone else thinks this is worth it, though.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith

mhsmith commented Aug 22, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I'm OK with the idea of breaking each platform out into its own file to keep the size of the top-level workflow under control. And the grouping in the sidebar is also an improvement.

However, the attempt to share the workflow between the cpython and release-tools repositories has generated a huge amount of extra complexity which is not present in the resuable workflow files of the other platforms. And because cross-repository workflow references can't contain variable expansions (as discussed in #137186), the release-tools PR will need to hard-code one cpython commit for the workflow, and use it to build a different commit of the same repository. That's a recipe for even more confusion.

As @freakboy3742 said, the amount that's actually shared between the two repositories doesn't justify this. The checkout step is trivial, the build and test step is a very simple command, and the upload-artifacts step doesn't need to be in the cpython repository at all (it currently isn't).

So I'd suggest abandoning the release-tools PR, and reducing this PR only to splitting the Android workflow out into a separate file.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith mhsmith mentioned this pull request Aug 22, 2025
Build Android artifacts with a reusable workflow python/release-tools#270
Closed
@webknjaz

webknjaz commented Aug 26, 2025

Copy link
Copy Markdown
Member Author

I can see how the summary is a nice feature on the action summary page - but the "on PR" view doesn't have any of those affordances.

There's a small effect in the PR widget as well -- the check identifiers become slash-delimited which kinda provides grouping. Not as visual, of course. Still, I wouldn't look at this as the main goal of the PR. Just a nice cosmetic side effect.

And if a build fails, I usually find that I'm navigating directly to the broken build page from the PR page, rather than going through the Actions navigation.

That's right. And the "category" is unfolded in the sidebar when you go to the log page directly.

[..] but to me, it still seems like a lot more complexity without a lot of improvement. If there were details in the workflow that benefitted from having a single point of configuration, it might make more sense - but the structure you've described here essentially turns all that into workflow inputs, so you don't get that benefit either.

I've been exploring how to use reusable workflows most efficiently and concluded that having such separation is a benefit by itself. Currently, this repo has multiple reusable workflows that are slightly different. This spreads many configuration quirks across multiple places. However, if they are all consolidated on the top level, it becomes much easier to merge a lot of those "modules" into something more uniform. So my strategy isn't making the reusable workflows branchy internally with implicit self-config within. It's rather surfacing things to the top level to make the invocation modes clear to the caller.

the attempt to share the workflow between the cpython and release-tools repositories has generated a huge amount of extra complexity which is not present in the resuable workflow files of the other platforms. And because cross-repository workflow references can't contain variable expansions (as discussed in #137186), the release-tools PR will need to hard-code one cpython commit for the workflow, and use it to build a different commit of the same repository. That's a recipe for even more confusion.

I can see your point about the confusion. However, I came to realize that referencing the commit is what makes such reuse reliable in the first place. So I see it as an advantage. But yes, this confusion that made me question needing a separate repository for referencable automation back in that discussion.

I think it's fine in this case, though, because the inputs are pre-computed early and have assigned names.

the amount that's actually shared between the two repositories doesn't justify this. The checkout step is trivial, the build and test step is a very simple command, and the upload-artifacts step doesn't need to be in the cpython repository at all (it currently isn't).

So I'd suggest abandoning the release-tools PR, and reducing this PR only to splitting the Android workflow out into a separate file.

I could do this, I guess. Still, I think it'd be interesting to consider cross-project reusability in the future. Also, I've been thinking that the upload artifacts step would be useful in the upstream CPython repo too as this would allow the PR creators download the artifacts for local inspection and not just see that "something got built in the jobs, w/o a chance to verify it". I can imagine the reusable workflow being useful for third-party projects that would like to build and test against unreleased versions of CPython too.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz
Drop tweakable src+artifact inputs from workflows
66aa3fd
@webknjaz

webknjaz commented Aug 28, 2025

Copy link
Copy Markdown
Member Author

@mhsmith I've dropped the cross-repo reusability related inputs to only have things everyone seems to have agreed on for now.

I'm still a bit uncertain about the cross-repo automation split in general but can't articulate why at the moment. This can be a separate discussion in the future, if I get to formulating a better proposal.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith

mhsmith commented Aug 31, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I'm still not clear why you've added so many inputs and outputs that aren't present in the existing resuable workflow files. And even when the inputs are present, they aren't using the same names, e.g. you have runner-vm-os, where the existing workflows simply say os.

I'm also not really a fan of using @ and emojis in job names. A plain English "building X on Y" would be clearer.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz webknjaz moved this to 🗒️ Backlog 📝 in 📅 Procrastinating in public 😵‍💫 Jan 14, 2026
@webknjaz webknjaz added this to 📅 Procrastinating in public 😵‍💫 Jan 14, 2026
@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 28, 2026
@ambv

ambv commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This PR is attached to gh-137242, which is already completed: the fix for that issue landed through other changes, and this PR's approach was not taken or has since become obsolete. Closing to cull the number of open pull requests. Do not reopen this pull request without getting a go-ahead from a triager or core developer.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv ambv closed this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mhsmith mhsmith Awaiting requested review from mhsmith
@freakboy3742 freakboy3742 Awaiting requested review from freakboy3742
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti ezio-melotti is a code owner
@hugovk hugovk Awaiting requested review from hugovk hugovk is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review infra CI, GitHub Actions, buildbots, Dependabot, etc. OS-android skip news stale Stale PR or inactive for long period of time.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@webknjaz @StanFromIreland @mhsmith @freakboy3742 @ambv
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.