Skip to content

Conversation

@jkloetzke
Copy link
Member

If a recipe utilizes checkoutUpdateIf, relax the checks so that also modified checkoutScripts are run in build-only mode.

@rhubert Could you please give it a try?

⚠️ This change bumps the project state version. Once used in a build tree, there is no going back to an older Bob version! So maybe better test it in a new build tree.

The asDigestScript() method of import SCMs erroneously did not include
the 'dir' attribute. This cannot easily be fixed because it will
directly affect the variant-id and thus cause rebuilds and invalidate
existing binary artifacts. Instead, the fixImportScmVariant policy is
introduced to enable fixing the bug for new projects without breaking
old ones.
The tracking of recipe changes was not sufficient for build-only updates
of checkouts that involve the import-SCM or recipes that utilize
checkoutUpdateIf. We were over-cautious and prevented running these
updates if *anything* related to the checkout step changed.

To make Bobs behaviour more predictable, track the related state more
closely. Updates of checkouts in build-only mode are now only prevented
if an import-SCM is changed. On the other side, changes to the
checkoutScript will trigger the update in build-only mode even if the
script is deterministic.

Fixes BobBuildTool#506.
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 🎉

Comparison is base (08743c4) 88.18% compared to head (1cca4ea) 88.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #521      +/-   ##
==========================================
+ Coverage   88.18%   88.22%   +0.04%     
==========================================
  Files          46       46              
  Lines       14433    14493      +60     
==========================================
+ Hits        12728    12787      +59     
- Misses       1705     1706       +1     
Impacted Files Coverage Δ
pym/bob/input.py 92.01% <ø> (ø)
pym/bob/scm/__init__.py 71.73% <ø> (ø)
pym/bob/builder.py 92.88% <100.00%> (+0.12%) ⬆️
pym/bob/cmds/build/clean.py 93.61% <100.00%> (-0.05%) ⬇️
pym/bob/cmds/build/status.py 96.17% <100.00%> (-0.03%) ⬇️
pym/bob/intermediate.py 94.76% <100.00%> (+0.41%) ⬆️
pym/bob/scm/imp.py 96.40% <100.00%> (+0.07%) ⬆️
pym/bob/state.py 88.67% <100.00%> (ø)

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rhubert
Copy link
Contributor

rhubert commented Jul 3, 2023

👍 Did some testing today -> works as expected now.

@jkloetzke
Copy link
Member Author

Thanks for testing!

@jkloetzke jkloetzke merged commit d9deb77 into BobBuildTool:master Jul 3, 2023
@jkloetzke jkloetzke deleted the track-updates branch July 7, 2023 19:53
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.

2 participants