[OS-BUILD PATCHv2] Check for kernel config git-push failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Don Zickus <dzickus@xxxxxxxxxx>

Check for kernel config git-push failures

An automated nightly job is run to merge the upstream tree and check for
new configs to be set.  The new configs are automatically added to the
redhat/configs/pending-ark directory and pushed.  A second script then
comes along and walks through those new configs and converts them into
automatically generated config MRs for review.

Those MRs periodically fail to git-push due to infrastructure issues.
The script reports success and the maintainers never realize an MR
failed to be created until a pending config audit is performed before
the GA release.

Let's update the script to check for those failures and report them (by
failing the script).  The script failure leads to an email to the
maintainer who can then re-run the script by hand to regenerate the MRs
or fix issues manually.

Tested by

* committing dummy change to Makefile
* git push -o merge_request.create dzickus dummy
* committing second dummy change to Makefile
* git push -o merge_request.create dzickus dummy
(git push succeeds with following warning message)

remote:
remote: ================================================================
remote:
remote:              WARNINGS: Error encountered with push options
remote:          'merge_request.create' 'merge_request.target=os-build'
remote:     'merge_request.remove_source_branch': Validate branches Another
remote:     open merge request already exists for this source branch: !2164
remote:
remote: ===============================================================
remote:

Ran script changes by hand to verify shell logic.  Untested in cronjob.

Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>

diff --git a/redhat/scripts/ci/ark-update-configs.sh b/redhat/scripts/ci/ark-update-configs.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/ci/ark-update-configs.sh
+++ b/redhat/scripts/ci/ark-update-configs.sh
@@ -67,6 +67,8 @@ else
 fi
 
 if test -n "$DIST_PUSH"; then
+        tmpfile=".push-warnings"
+
 	echo "Pushing branch $(git branch --show-current) to $(git remote get-url gitlab)"
 	git push gitlab HEAD
 
@@ -76,8 +78,16 @@ if test -n "$DIST_PUSH"; then
  			-o merge_request.create \
 			-o merge_request.target="$BRANCH" \
 			-o merge_request.remove_source_branch \
-			gitlab "$branch"
+			gitlab "$branch" 2>&1 | tee -a $tmpfile
 	done
+
+	# GitLab server side warnings do not fail git-push but leave verbose
+	# WARNING messages.  Grep for those and consider it a script
+	# failure.  Make sure all branches are pushed first as follow up
+	# git-pushes may succeed.
+	grep -q "remote:[ ]* WARNINGS" $tmpfile && RC=1 || RC=0
+	rm $tmpfile
+	test $RC && exit $RC
 else
 	printf "
 To push all the release artifacts, run:

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2165
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux