scripts: pull before updating metrics
PATCH 1/1 scripts: pull before updating metrics
From: Ross Burton <[email protected]>
Do another git-pull in the metrics repository before updating the metrics, in case other metrics jobs running in parallel have updated the repositories since they were cloned. There will always be possibility of racing metrics jobs, but this should reduce the chance of it happening.
An alternative would be to commit and then rebase before pushing, but I fear that a git-merge could produce invalid JSON and we'd have to manually fix up the repository. In my opinion, a wasted metrics run is preferable to potentially corrupted repositories.
Signed-off-by Ross Burton <[email protected]>
--- scripts/run-cvecheck | 6 ++++++ scripts/run-patchmetrics | 6 ++++++ 2 files changed, 12 insertions(+)
scripts/run-cvecheck +6 -0
@@ -71,6 +71,12 @@ if [ ! -d $RESULTSDIR ]; then mkdir $RESULTSDIR fi +# Do another pull to make sure we're as up to date as possible. This is +# preferable to committing and rebasing before pushing as it would be better to +# waste some time repeating work than commit potentially corrupted files from a +# git merge gone wrong. +git -C $METRICSDIR pull + cd .. set +u . oe-init-build-env build
scripts/run-patchmetrics +6 -0
@@ -87,6 +87,12 @@ if [ "$BRANCH" != "master" ]; then exit 0 fi +# Do another pull to make sure we're as up to date as possible. This is +# preferable to committing and rebasing before pushing as it would be better to +# waste some time repeating work than commit potentially corrupted files from a +# git merge gone wrong. +git -C $METRICSDIR pull + # # Patch Metrics #
Signature · 1 line
2.34.1