Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wpt rev-list failure-handling in epochs_update.sh #24560

Merged
merged 1 commit into from Jul 16, 2020

Conversation

@stephenmcgruer
Copy link
Contributor

stephenmcgruer commented Jul 10, 2020

Previously if this subcommand failed it would be converted to the empty
string, which would then branch and push epochs at HEAD! This PR both
fixes the code to fail if the wpt subcommand fails, and also to
double-check that the SHA isn't empty.

Fixes #24504

Previously if this subcommand failed it would be converted to the empty
string, which would then branch and push epochs at HEAD! This PR both
fixes the code to fail if the wpt subcommand fails, and also to
double-check that the SHA isn't empty.

Fixes #24504
Copy link
Member

Hexcles left a comment

Should wpt rev-list simply return a non-zero exit code when the epoch SHA can't be found, in which case this script would also abort due to set -e?

@jgraham
Copy link
Contributor

jgraham commented Jul 10, 2020

In the longer term it would be good to get rid of this kind of shell script; I think basically every time we replaced shell scripts with Python it ended up being easier to maintain.

@stephenmcgruer
Copy link
Contributor Author

stephenmcgruer commented Jul 10, 2020

Should wpt rev-list simply return a non-zero exit code when the epoch SHA can't be found, in which case this script would also abort due to set -e?

I'm happy to do that, but note the defense in depth here was supposed to guard against wpt rev-list being buggy. Plus I was trying to keep the fix focused. But lmk which way you'd like to go, still happy to do it.

In the longer term it would be good to get rid of this kind of shell script; I think basically every time we replaced shell scripts with Python it ended up being easier to maintain.

Yeah, I presume originally the idea was that the script wrapped the easy stuff and ./wpt rev-list --epoch ${EPOCH} was doing the hard bit. As it turns out, the script does a bit more than that.

Copy link
Member

Hexcles left a comment

I'm happy to do that, but note the defense in depth here was supposed to guard against wpt rev-list being buggy. Plus I was trying to keep the fix focused. But lmk which way you'd like to go, still happy to do it.

Fair enough. LGTM!

@stephenmcgruer stephenmcgruer merged commit b448d54 into master Jul 16, 2020
43 of 44 checks passed
43 of 44 checks passed
detect-deployment detect-deployment
Details
build-and-publish
Details
build-and-publish
Details
build-and-tag
Details
build-and-tag
Details
Azure Pipelines Build #20200710.81 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (infrastructure/ tests: macOS) infrastructure/ tests: macOS succeeded
Details
Azure Pipelines (tools/ unittests: Windows + Python 3.6) tools/ unittests: Windows + Python 3.6 succeeded
Details
Azure Pipelines (tools/ unittests: Windows + Python 3.8) tools/ unittests: Windows + Python 3.8 succeeded
Details
Azure Pipelines (tools/ unittests: Windows) tools/ unittests: Windows succeeded
Details
Azure Pipelines (tools/ unittests: macOS + Python 3.6) tools/ unittests: macOS + Python 3.6 succeeded
Details
Azure Pipelines (tools/ unittests: macOS + Python 3.8) tools/ unittests: macOS + Python 3.8 succeeded
Details
Azure Pipelines (tools/ unittests: macOS) tools/ unittests: macOS succeeded
Details
Azure Pipelines (tools/wpt/ tests: Windows + Python 3.6) tools/wpt/ tests: Windows + Python 3.6 succeeded
Details
Azure Pipelines (tools/wpt/ tests: Windows + Python 3.8) tools/wpt/ tests: Windows + Python 3.8 succeeded
Details
Azure Pipelines (tools/wpt/ tests: Windows) tools/wpt/ tests: Windows succeeded
Details
Azure Pipelines (tools/wpt/ tests: macOS + Python 3.6) tools/wpt/ tests: macOS + Python 3.6 succeeded
Details
Azure Pipelines (tools/wpt/ tests: macOS + Python 3.8) tools/wpt/ tests: macOS + Python 3.8 succeeded
Details
Azure Pipelines (tools/wpt/ tests: macOS) tools/wpt/ tests: macOS succeeded
Details
Azure Pipelines (tools/wptrunner/ unittests: Windows + Python 3.6) tools/wptrunner/ unittests: Windows + Python 3.6 succeeded
Details
Azure Pipelines (tools/wptrunner/ unittests: Windows + Python 3.8) tools/wptrunner/ unittests: Windows + Python 3.8 succeeded
Details
Azure Pipelines (tools/wptrunner/ unittests: Windows) tools/wptrunner/ unittests: Windows succeeded
Details
Azure Pipelines (tools/wptrunner/ unittests: macOS + Python 3.6) tools/wptrunner/ unittests: macOS + Python 3.6 succeeded
Details
Azure Pipelines (tools/wptrunner/ unittests: macOS + Python 3.8) tools/wptrunner/ unittests: macOS + Python 3.8 succeeded
Details
Azure Pipelines (tools/wptrunner/ unittests: macOS) tools/wptrunner/ unittests: macOS succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
download-firefox-nightly Community-TC (pull_request)
Details
infrastructure/ tests Community-TC (pull_request)
Details
infrastructure/ tests (Python 3) Community-TC (pull_request)
Details
lint Community-TC (pull_request)
Details
resources/ tests Community-TC (pull_request)
Details
sink-task Community-TC (pull_request)
Details
tools/ integration tests (Python 2) Community-TC (pull_request)
Details
tools/ integration tests (Python 3.6) Community-TC (pull_request)
Details
tools/ integration tests (Python 3.8) Community-TC (pull_request)
Details
tools/ unittests (Python 2) Community-TC (pull_request)
Details
tools/ unittests (Python 3.6) Community-TC (pull_request)
Details
tools/ unittests (Python 3.8) Community-TC (pull_request)
Details
wpt-decision-task Community-TC (pull_request)
Details
wpt.fyi - safari[experimental] Safari results
Details
@stephenmcgruer stephenmcgruer deleted the smcgruer/fix-epochs branch Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.