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 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 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 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 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 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
@github-actions
detect-deployment detect-deployment
Details
@github-actions
build-and-publish
Details
@github-actions
build-and-publish
Details
@github-actions
build-and-tag
Details
@github-actions
build-and-tag
Details
@azure-pipelines
Azure Pipelines Build #20200710.81 succeeded
Details
@azure-pipelines
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
@azure-pipelines
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
@azure-pipelines
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
@azure-pipelines
Azure Pipelines (infrastructure/ tests: macOS) infrastructure/ tests: macOS succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: Windows + Python 3.6) tools/ unittests: Windows + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: Windows + Python 3.8) tools/ unittests: Windows + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: Windows) tools/ unittests: Windows succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: macOS + Python 3.6) tools/ unittests: macOS + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: macOS + Python 3.8) tools/ unittests: macOS + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: macOS) tools/ unittests: macOS succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: Windows + Python 3.6) tools/wpt/ tests: Windows + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: Windows + Python 3.8) tools/wpt/ tests: Windows + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: Windows) tools/wpt/ tests: Windows succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: macOS + Python 3.6) tools/wpt/ tests: macOS + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: macOS + Python 3.8) tools/wpt/ tests: macOS + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: macOS) tools/wpt/ tests: macOS succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: Windows + Python 3.6) tools/wptrunner/ unittests: Windows + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: Windows + Python 3.8) tools/wptrunner/ unittests: Windows + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: Windows) tools/wptrunner/ unittests: Windows succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: macOS + Python 3.6) tools/wptrunner/ unittests: macOS + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: macOS + Python 3.8) tools/wptrunner/ unittests: macOS + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: macOS) tools/wptrunner/ unittests: macOS succeeded
Details
@azure-pipelines
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
@azure-pipelines
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
@community-tc-integration
download-firefox-nightly Community-TC (pull_request)
Details
@community-tc-integration
infrastructure/ tests Community-TC (pull_request)
Details
@community-tc-integration
infrastructure/ tests (Python 3) Community-TC (pull_request)
Details
@community-tc-integration
lint Community-TC (pull_request)
Details
@community-tc-integration
resources/ tests Community-TC (pull_request)
Details
@community-tc-integration
sink-task Community-TC (pull_request)
Details
@community-tc-integration
tools/ integration tests (Python 2) Community-TC (pull_request)
Details
@community-tc-integration
tools/ integration tests (Python 3.6) Community-TC (pull_request)
Details
@community-tc-integration
tools/ integration tests (Python 3.8) Community-TC (pull_request)
Details
@community-tc-integration
tools/ unittests (Python 2) Community-TC (pull_request)
Details
@community-tc-integration
tools/ unittests (Python 3.6) Community-TC (pull_request)
Details
@community-tc-integration
tools/ unittests (Python 3.8) Community-TC (pull_request)
Details
@community-tc-integration
wpt-decision-task Community-TC (pull_request)
Details
@wpt-fyi
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