Skip to content

Commit 5041b8a

Browse files
committed
input: introduce failUnstableCheckouts policy
We are about to fail unstable checkouts of deterministic recipes. Some old projects could rely on the previous behaviour to transparently handle such situations, though.
1 parent 6f60c7d commit 5041b8a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pym/bob/input.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3160,6 +3160,7 @@ class RecipeSet:
31603160
schema.Optional('substituteMetaEnv') : bool,
31613161
schema.Optional('managedLayers') : bool,
31623162
schema.Optional('urlScmSeparateDownload') : bool,
3163+
schema.Optional('failUnstableCheckouts') : bool,
31633164
},
31643165
error="Invalid policy specified! Are you using an appropriate version of Bob?"
31653166
),
@@ -3218,7 +3219,12 @@ class RecipeSet:
32183219
"0.25.1.dev27",
32193220
InfoOnce("urlScmSeparateDownload policy is not set. Extracted archives of the 'url' SCM are retained in the workspace.",
32203221
help="See http://bob-build-tool.readthedocs.io/en/latest/manual/policies.html#urlscmseparatedownload for more information.")
3221-
)
3222+
),
3223+
"failUnstableCheckouts" : (
3224+
"0.25.1.dev88",
3225+
InfoOnce("failUnstableCheckouts policy is not set. Unexpected indeterministic checkouts are not flagged as error.",
3226+
help="See http://bob-build-tool.readthedocs.io/en/latest/manual/policies.html#failunstablecheckouts for more information.")
3227+
),
32223228
}
32233229

32243230
_ignoreCmdConfig = False

pym/bob/intermediate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ def fromRecipeSet(cls, recipeSet):
554554
'fixImportScmVariant' : recipeSet.getPolicy('fixImportScmVariant'),
555555
'defaultFileMode' : recipeSet.getPolicy('defaultFileMode'),
556556
'urlScmSeparateDownload' : recipeSet.getPolicy('urlScmSeparateDownload'),
557+
'failUnstableCheckouts' : recipeSet.getPolicy('failUnstableCheckouts'),
557558
}
558559
self.__data['archiveSpec'] = recipeSet.archiveSpec()
559560
self.__data['envWhiteList'] = sorted(recipeSet.envWhiteList())

0 commit comments

Comments
 (0)