Skip to content

Conversation

@pothos
Copy link
Member

@pothos pothos commented Sep 26, 2022

Currently we skip the nightly build if there are no changes. This
didn't work well because a new run doesn't fix any failure because the
rerun became a no-op.
Check if the main artifacts we expect from a step are found, as simple
heuristic on whether a rerun is needed.

How to use

backport

Testing done

None

I found a duplicate function and verified that it's the only one via
comm -12 <(sort ci-automation/ci_automation_common.sh) <(sort sdk_lib/sdk_container_common.sh) | grep function
I'm not sure if this is due to a case where we only import one but
can't import the other, hence I'm not deleting it now.
@pothos pothos requested a review from a team September 26, 2022 13:47
@pothos pothos marked this pull request as ready for review September 26, 2022 13:47
@pothos pothos force-pushed the kai/nightly-after-failure branch from 81e859b to 8b8c4fb Compare September 26, 2022 14:33
Copy link
Member

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

There's an outdated comment, but otherwise looks good. Thanks for looking into this issue and fixing it.

Currently we skip the nightly build if there are no changes. This
didn't work well because a new run doesn't fix any failure because the
rerun became a no-op.
Check if the main artifacts we expect from a step are found, as simple
heuristic on whether a rerun is needed.
@pothos pothos force-pushed the kai/nightly-after-failure branch from 8b8c4fb to bca6e6e Compare September 26, 2022 15:06
@pothos pothos merged commit 9620468 into main Sep 26, 2022
@pothos pothos deleted the kai/nightly-after-failure branch September 26, 2022 15:17
pothos added a commit that referenced this pull request Sep 26, 2022
ci-automation: Don&#39;t skip nightly build when the previous one failed
pothos added a commit that referenced this pull request Sep 26, 2022
ci-automation: Don&#39;t skip nightly build when the previous one failed
pothos added a commit that referenced this pull request Sep 26, 2022
ci-automation: Don&#39;t skip nightly build when the previous one failed
pothos added a commit that referenced this pull request Sep 26, 2022
ci-automation: Don&#39;t skip nightly build when the previous one failed
pothos added a commit that referenced this pull request Sep 26, 2022
ci-automation: Don&#39;t skip nightly build when the previous one failed
touch ./skip-build
echo "Creating ./skip-build flag file, indicating that the build must not to continue because no new tag got created as there are no changes since tag ${existing_tag}" >&2
return 0
if curl --head --fail --silent --show-error --location "https://${BUILDCACHE_SERVER}/images/amd64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if curl --head --fail --silent --show-error --location "https://${BUILDCACHE_SERVER}/images/amd64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2"
if curl --head --fail --silent --show-error --location "https://${BUILDCACHE_SERVER}/images/amd64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2" \

Otherwise it fails as currently:

17:20:48  jenkins/systemd-run-wrap.sh: ci-automation/packages-tag.sh: line 102: syntax error near unexpected token `&&'
17:20:48  jenkins/systemd-run-wrap.sh: ci-automation/packages-tag.sh: line 102: `              && curl --head --fail --silent --show-error --location "[https://${BUILDCACHE_SERVER}/images/arm64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2](https://${buildcache_server}/images/arm64/$%7BFLATCAR_VERSION%7D/flatcar_production_image.bin.bz2)"; then'

Copy link
Contributor

Choose a reason for hiding this comment

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

Just seen the fixing commit. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, sorry

Copy link
Member Author

Choose a reason for hiding this comment

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

Lesson learnt: run shellcheck all the time^^

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be we could add a simple github actions running shellcheck on PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

shellcheck -x --severity=warning is still a bit noisy until we fix the warnings, just =error isn't very helpful on the other hand.

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.

4 participants