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

feat: cleanup change detection and add Git commit hash detection #603

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

AtomicFS
Copy link
Collaborator

@AtomicFS AtomicFS commented Feb 27, 2025

  • large refactor for change detection
  • move the whole change detection into separate golang file
  • cleanup and unify change detection
  • much better testing

Summary:

  • with this PR we will have 3 methods of change detection:
    • TimeStamp in any of the sources needed to build relevant module
    • JSON configuration change for relevant module
    • Git commit hash in repo_path of each module
  • of course a rebuild of a module will trigger rebuilds in modules which depend on it

Must be merged after #592

@github-actions github-actions bot added feature New feature or request github_actions Pull requests that update GitHub Actions code labels Feb 27, 2025
@AtomicFS AtomicFS force-pushed the feat/github-ci-better-composite2 branch 18 times, most recently from aa50696 to 67f76b3 Compare February 28, 2025 15:19
@AtomicFS AtomicFS changed the title Feat/GitHub ci better composite2 feat: improve the GitHub composite action Mar 3, 2025
@AtomicFS AtomicFS force-pushed the feat/github-ci-better-composite2 branch from 67f76b3 to f9bc1de Compare March 3, 2025 16:55
@github-actions github-actions bot added documentation Improvements or additions to documentation testing Testing related module/coreboot labels Mar 3, 2025
@AtomicFS AtomicFS force-pushed the feat/github-ci-better-composite2 branch 2 times, most recently from 0abd3fc to 10d828d Compare March 4, 2025 13:33
@github-actions github-actions bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Mar 4, 2025
@AtomicFS AtomicFS force-pushed the feat/github-ci-better-composite2 branch from 72d8b56 to 119767b Compare March 4, 2025 16:43
@AtomicFS AtomicFS marked this pull request as ready for review March 4, 2025 16:52
@AtomicFS AtomicFS requested a review from MDr164 as a code owner March 4, 2025 16:52
@AtomicFS AtomicFS enabled auto-merge March 4, 2025 16:52
@AtomicFS
Copy link
Collaborator Author

AtomicFS commented Mar 4, 2025

If you will have time @MDr164 , could you try these changes? @PatrickRudolph feel free to also test this out ;)

I have did some experiments in firmware-action-example directory. Namely just running go-task build:uroot bunch of times while:

  • changing the coreboot-linuxboot-example.json config file (for example changing container_input_dir for uroot changes nothig, but will trigger rebuild) to test the Config change detection
  • touch ./coreboot-linuxboot-example/u-root/README.md to test the TimeStamp detection
  • checking out different commit in the u-root repo to test the Git commit hash detection (specifically checking out commit 62f8e804, which is right after the v0.14.0 tag and changes nothing substantial).

From my experiments it seems to work just as intended.

Copy link
Collaborator

@MDr164 MDr164 left a comment

Choose a reason for hiding this comment

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

Nice! I did not spot any errors and it seems to be doing what we expect it to. Given that this is a fairly large change there might be some oversights on my end. Would be nice to have another pair of eyes on this, otherwise I'll approve this change latest by end of the week if no one else feels like testing this :)

@AtomicFS
Copy link
Collaborator Author

/remind @MDr164 to approve this on March 14

Copy link

@AtomicFS set a reminder for 3/14/2025

@AtomicFS AtomicFS force-pushed the feat/github-ci-better-composite2 branch 2 times, most recently from 28504e0 to 8e0580d Compare March 13, 2025 08:31
@AtomicFS AtomicFS requested a review from MDr164 March 14, 2025 13:14
- we need to keep coreboot-specific GitDescribe
- so here I add also a generic GitDescribe

Signed-off-by: AtomicFS <[email protected]>
- for detecting changes we want to include git hash
- we need the ability to detect the case when sub-directory is not
  a git repository
- the check should not fail when executed in not a git repository, it
  should just be ignored

Signed-off-by: AtomicFS <[email protected]>
- move the whole change detection into separate golang file
- add git hash storage for change detection
- cleanup and unify change detection
- much better testing

Signed-off-by: AtomicFS <[email protected]>
Signed-off-by: AtomicFS <[email protected]>
AI-Generated: true
AI-Model: claude-3.5-sonnet
Signed-off-by: AtomicFS <[email protected]>
AI-Generated: true
AI-Model: claude-3.5-sonnet
Signed-off-by: AtomicFS <[email protected]>
Signed-off-by: AtomicFS <[email protected]>
@AtomicFS AtomicFS force-pushed the feat/github-ci-better-composite2 branch from 8e0580d to 8e0a693 Compare March 14, 2025 15:51
Copy link

👋 @MDr164, approve this

@github-actions github-actions bot removed the reminder label Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation feature New feature or request github_actions Pull requests that update GitHub Actions code go Pull requests that update Go code module/coreboot testing Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants