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

Handle commit changes #20557

Merged
merged 3 commits into from Dec 5, 2019
Merged

Handle commit changes #20557

merged 3 commits into from Dec 5, 2019

Conversation

jgraham
Copy link
Contributor

@jgraham jgraham commented Dec 2, 2019

No description provided.

@community-tc-integration
Copy link

Submitting the task to Taskcluster failed. Details

InterpreterError at template.tasks[0]: object has no property pusher

.taskcluster.yml Outdated Show resolved Hide resolved
@jgraham jgraham force-pushed the handle_commit_changes branch 2 times, most recently from a1d086f to 791de03 Compare December 2, 2019 16:40
Copy link
Contributor

@stephenmcgruer stephenmcgruer left a comment

Choose a reason for hiding this comment

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

The taskcluster.yml change looks pretty good to me, if you want to pull it out I'll review it separately. The rest I haven't looked at.

tools/ci/run_tc.py Outdated Show resolved Hide resolved
Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

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

LGTM % some nits

tools/ci/run_tc.py Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/tc/decision.py Outdated Show resolved Hide resolved
tools/ci/tc/decision.py Show resolved Hide resolved
tools/ci/tc/decision.py Show resolved Hide resolved
Copy link
Contributor

@stephenmcgruer stephenmcgruer left a comment

Choose a reason for hiding this comment

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

Would be good to add some tests if possible.

tools/ci/tc/decision.py Outdated Show resolved Hide resolved
tools/ci/tc/decision.py Show resolved Hide resolved
tools/ci/tc/decision.py Show resolved Hide resolved
tools/ci/tc/decision.py Show resolved Hide resolved
tools/ci/tc/decision.py Show resolved Hide resolved
tools/ci/tc/tests/test_valid.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
tools/ci/run_tc.py Outdated Show resolved Hide resolved
If the decision task and the scheduled tak see different commits there
are several possible scenarios:

 * There is a non-force push to a branch. In this case the old commit
   is still reachable and can be tested
 * There is a force push to a branch. In this case the old commit is
   not reachable and we want to bail asap
 * A PR is updated (with a force or non-force push). In this case we
   don't want to test the old commit.
 * Master is updated, thus changing the equivalent merge commit for
   the PR. In this case we probably want to run the tests anyway; this
   is only a problem if the master change also affects behaviour on
   the branch.

Currently we bail in all these cases; instead try to treat them as
descibed above.
@jgraham jgraham merged commit de9d710 into master Dec 5, 2019
@jgraham jgraham deleted the handle_commit_changes branch December 5, 2019 16:03
Hexcles added a commit that referenced this pull request Dec 11, 2019
`git fetch origin expected_head:task_head` fails when we are already on
`task_head` branch: "fatal: Refusing to fetch into current branch
refs/heads/task_head of non-bare repository".

We can't use --update-head-ok here, either, since we often want to check
out an earlier commit, which is not a fast-forward. The sane way to do
this is to use a separate `git reset --hard`.

Also fix another unrelated AttributeError in the error messages printed
when handling exceptions.
Hexcles added a commit that referenced this pull request Dec 13, 2019
`git fetch origin expected_head:task_head` fails when we are already on
`task_head` branch: "fatal: Refusing to fetch into current branch
refs/heads/task_head of non-bare repository".

We can't use --update-head-ok here, either, since we often want to check
out an earlier commit, which is not a fast-forward. The sane way to do
this is to use a separate `git reset --hard`.

Also fix another unrelated AttributeError in the error messages printed
when handling exceptions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants