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

v1.8 backports 2020-10-19 p2 #13635

Merged
merged 1 commit into from
Oct 20, 2020
Merged

v1.8 backports 2020-10-19 p2 #13635

merged 1 commit into from
Oct 20, 2020

Conversation

nathanjsweet
Copy link
Member

v1.8 backports 2020-10-19

Once this PR is merged, you can update the PR labels via:

$ for pr in 13630; do contrib/backporting/set-labels.py $pr done 1.8; done

[ upstream commit 6557f75 ]

In generate_commit_list_for_pr, the commit subject is used to determine
the upstream commit ID from $REMOTE/master. However, if in the meantime
another commit with e.g. a Fixes tag that mentions this commit subject,
it appears first and leads to the original commit not being found. This
can be demonstrated using #13383:

```
 * PR: 13383 -- daemon: Enable configuration of iptables --random-fully (@kh34) -- #13383
   Merge with 2 commit(s) merged at: Wed, 14 Oct 2020 11:41:51 +0200!
     Branch:     master (!)                          refs/pull/13383/head
                 ----------                          -------------------
     v (start)
     |  Warning: No commit correlation found!    via dbac86c ("daemon: Enable configuration of iptables --random-fully")
     |  350f0b3 via 22d4554 ("test: Test iptables masquerading with --random-fully")
     v (end)

$ # this is the git log command (with the subject added) from
$ # contrib/backporting/check-stable that should extract a single
$ # upstream commit
$ git log -F --since="1year" --pretty="%H %s" --no-merges --grep "daemon: Enable configuration of iptables --random-fully" origin/master
078ec54 install/kubernetes: consistent case spelling of iptables related values
4e39def daemon: Enable configuration of iptables --random-fully
$ git show 078ec54
commit 078ec54
Author: Tobias Klauser <tklauser@distanz.ch>
Date:   Wed Oct 14 11:58:29 2020 +0200

    install/kubernetes: consistent case spelling of iptables related values

    Make the case spelling of the newly introduced "ipTablesRandomFully"
    value consistent with other iptables option values which use the
    "iptables" spelling.

    Fixes: 4e39def ("daemon: Enable configuration of iptables --random-fully")
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
```

Note the `Fixes: ...` line in commit 078ec54 above.

Fix this behavior by grepping for the subject line from start of line:

```
$ git log -F --since="1year" --pretty="%H %s" --no-merges --extended-regexp --grep "^daemon: Enable configuration of iptables --random-fully" origin/master
4e39def daemon: Enable configuration of iptables --random-fully

 * PR: 13383 -- daemon: Enable configuration of iptables --random-fully (@kh34) -- #13383
   Merge with 2 commit(s) merged at: Wed, 14 Oct 2020 11:41:51 +0200!
     Branch:     master (!)                          refs/pull/13383/head
                 ----------                          -------------------
     v (start)
     |  4e39def via dbac86c ("daemon: Enable configuration of iptables --random-fully")
     |  350f0b3 via 22d4554 ("test: Test iptables masquerading with --random-fully")
     v (end)
```

Reported-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Nate Sweet <nathanjsweet@pm.me>
@nathanjsweet nathanjsweet requested a review from a team as a code owner October 19, 2020 19:52
@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.8 kind/backports This PR provides functionality previously merged into master. labels Oct 19, 2020
@aanm aanm merged commit 93ecd42 into v1.8 Oct 20, 2020
@aanm aanm deleted the pr/v1.8-backport-2020-10-19-2 branch October 20, 2020 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backports This PR provides functionality previously merged into master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants