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 — Move change detection to separate workflow in CI by webknjaz · Pull Request #122336 · python/cpython

Conversation

@webknjaz

@webknjaz webknjaz commented Jul 26, 2024

Copy link
Copy Markdown
Member

This is a continuation of the CI refactoring PR series I've been doing.

Sorry, something went wrong.

Uh oh!

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

All reactions
@webknjaz
webknjaz force-pushed the maintenance/gha-change-detection-reusable branch from 7bd7ef5 to c994611 Compare July 26, 2024 23:54
@webknjaz
Move change detection to separate job in CI
2e5131d
@webknjaz
webknjaz force-pushed the maintenance/gha-change-detection-reusable branch from c994611 to 2e5131d Compare July 27, 2024 00:10
@webknjaz
webknjaz marked this pull request as ready for review July 27, 2024 00:13
@webknjaz
webknjaz requested review from ezio-melotti and hugovk as code owners July 27, 2024 00:13
@bedevere-app bedevere-app Bot added the awaiting review label Jul 27, 2024
@picnixz picnixz added skip issue skip news labels Jul 27, 2024
@hugovk

hugovk commented Jul 29, 2024

Copy link
Copy Markdown
Member

It was already in its own job:

image

This PR:

image

Would it be more accurate to say this moves the job to its own workflow + file?

Benefits:

  • Makes the top-level build.yml shorter.
  • Helps make each bit more modular, separating config.
  • Are there other benefits of this change?

Costs:

  • This PR does add a net 46 lines of config, mainly passing the outputs from the new job out through the new workflow, though it's not too complex.
  • We get another "dummy" reusable workflow showing in the left menu, with no workflows shown when clicking (although the pinning does help find the important ones, thanks for letting me know about pinning):

image

All reactions

Sorry, something went wrong.

Uh oh!

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

@webknjaz

webknjaz commented Jul 29, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Would it be more accurate to say this moves the job to its own workflow + file?

Yes, you're right. I must've phrased it better.

Benefits:

  • Makes the top-level build.yml shorter.

  • Helps make each bit more modular, separating config.

  • Are there other benefits of this change?

I think these benefits have a significant impact on their own. This also contributes to the separation of the structure / triggers vs. implementation details. In the future, it makes it cleaner to add more jobs (or separate what's in there already) if the need be. I feel like it currently computes several things that aren't necessarily related enough to be in the same job.
My idea is that the top-level workflow structure should be in the main configuration file, and the components would be separate, only interfacing through their inputs/outputs.
It's basically an abstraction layer separation exercise.
Having such predictable structure will also enable us to introduce linting that would keep it consistent and easy to reason about.

Costs:

  • This PR does add a net 46 lines of config, mainly passing the outputs from the new job out through the new workflow, though it's not too complex.

  • We get another "dummy" reusable workflow showing in the left menu, with no workflows shown when clicking (although the pinning does help find the important ones, thanks for letting me know about pinning):

Yes, you're right. I suppose, we could add names to those reusable workflows with something along the lines of “Don't click”. Combined with pinning the entry-point workflows, that would make it look nicer. Personally, I'm not too worried about these, but I see how some of the points may annoy people.

Additionally, it may make sense to hit GitHub support with a request to hide workflows that only have a workflow_call trigger, since it's known that those are never going to have any runs listed.

P.S. Regarding having a nested entry in the sidebar — I don't expect that many people would need to click on that, so it'll remain collapsed and green most of the time, not really affecting anyone on the scale.

All reactions

Sorry, something went wrong.

Uh oh!

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

@webknjaz

webknjaz commented Jul 29, 2024

Copy link
Copy Markdown
Member Author

@picnixz this also needs backport labels FYI

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk hugovk added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Jul 29, 2024
@hugovk hugovk changed the title Move change detection to separate job in CI Move change detection to separate workflow in CI Jul 31, 2024
@hugovk

hugovk commented Jul 31, 2024

Copy link
Copy Markdown
Member

Yes, I agree on balance this makes it things a bit clearer. Thanks!

webknjaz reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@hugovk
hugovk merged commit e60ee11 into python:main Jul 31, 2024
@bedevere-app bedevere-app Bot removed the awaiting review label Jul 31, 2024
@miss-islington-app

miss-islington-app Bot commented Jul 31, 2024

Copy link
Copy Markdown

Thanks @webknjaz for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 31, 2024
@webknjaz @miss-islington
Move change detection to separate workflow in CI (pythonGH-122336)
8b75c9f
(cherry picked from commit e60ee11)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
@miss-islington-app

miss-islington-app Bot commented Jul 31, 2024

Copy link
Copy Markdown

Sorry, @webknjaz and @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker e60ee11cb51b87deeb22ad125717bd0d0dc10fa8 3.12
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Jul 31, 2024

Copy link
Copy Markdown

GH-122510 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned hugovk Jul 31, 2024
@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jul 31, 2024
hugovk pushed a commit that referenced this pull request Jul 31, 2024
@miss-islington @webknjaz
[3.13] Move change detection to separate workflow in CI (GH-122336) (#…
927bd9e
…122510)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
webknjaz added a commit to webknjaz/cpython that referenced this pull request Jul 31, 2024
@webknjaz
[3.12] Move change detection to separate workflow in CI (pythonGH-122336
33274c7
).

(cherry picked from commit e60ee11)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
@bedevere-app

bedevere-app Bot commented Jul 31, 2024

Copy link
Copy Markdown

GH-122538 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jul 31, 2024
hugovk pushed a commit that referenced this pull request Aug 1, 2024
@webknjaz
[3.12] Move change detection to separate workflow in CI (GH-122336). (#…
8ab6d1b
…122538)
@sobolevn sobolevn mentioned this pull request Aug 13, 2024
gh-122965: Fix reusable-change-detection.yml on workflow_dispatch #122966
Merged
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
@webknjaz @blhsing
Move change detection to separate workflow in CI (python#122336)
2f97d12
@AA-Turner AA-Turner mentioned this pull request Feb 3, 2025
Convert change detection to a Python script #129627
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@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

Uh oh!

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

Assignees

@hugovk hugovk

Labels

skip issue skip news

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.

3 participants

@webknjaz @hugovk @picnixz
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.