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

Patchback/backports/stable 1/51a38840d977e6184be3ef1d6f427c8cb3dc4545/pr 342 #379

Conversation

hubiongithub
Copy link
Contributor

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
  • New Module Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

Andersson007 and others added 30 commits April 16, 2021 07:08
…le-collections#156)

* mysql: revert changes made in PR 116

* Add changelog fragment

* Fix CI

* Fix CI

* Fix CI

* Update CI

* Fix CI

(cherry picked from commit 738343d)
* Add CONTRIBUTORS file (ansible-collections#166)

(cherry picked from commit ac927fd)

* Add documentation for privs with functions and procedures (ansible-collections#169)

(cherry picked from commit 6bce48e)

* Update README.md (ansible-collections#168)

* Update README.md

* Fix

* Add MAINTAINERS file

(cherry picked from commit 479edd8)

* Improve wording in README (ansible-collections#170)

* Improve wording in README

* Update README.md

Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <[email protected]>

Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <[email protected]>
(cherry picked from commit c909aa2)

* Update REVIEW_CHECKLIST.md (ansible-collections#171)

(cherry picked from commit 2236110)

* README: add a note how people can complain (ansible-collections#172)

* README: add a note how people can complain

* Change

* Improve

* Update README.md

Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <[email protected]>

Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <[email protected]>
(cherry picked from commit be4e84a)

* README: fix typos (ansible-collections#174)

(cherry picked from commit 2a80c30)

* README.md: Add link to IRC (ansible-collections#175)

(cherry picked from commit 3335a95)

* README.md, CONTRIBUTING.md: add links to the Maintainer guidelines (ansible-collections#179)

(cherry picked from commit 8fad3f8)

* Update README (ansible-collections#181)

(cherry picked from commit 6d9288d)

* Update README.md (ansible-collections#183)

* Update README.md

* Change IRC ref

(cherry picked from commit 69012a2)

* README: fix link (ansible-collections#184)

(cherry picked from commit 8ab6ea7)

* README: fix the channel name (ansible-collections#185)

(cherry picked from commit cd75992)

* CONTRIBUTING.md: replace the content with a link to Ansible contributing guidelines (ansible-collections#187)

(cherry picked from commit 56a2148)

* Update README (ansible-collections#186)

* Update README

* Fix

* Fix

* Fix

* Fix

* Add Libera.Chat link

(cherry picked from commit adb201a)

* fix typo (ansible-collections#190)

"optoin" -> "option"

(cherry picked from commit 596ba0c)

* Update README.md (ansible-collections#191)

* Update README.md

* Update README.md

(cherry picked from commit 6f02cb2)

* Add MAINTAINING.md, update README.md (ansible-collections#192)

(cherry picked from commit 0fabb2b)

Co-authored-by: Alexander Skiba <[email protected]>
Co-authored-by: Baptiste Mille-Mathias <[email protected]>
…nsible-collections#193) (ansible-collections#197)

* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.

(cherry picked from commit 9055bb4)

Co-authored-by: Tong He <[email protected]>
… that do not contain tables (ansible-collections#209)

* mysql_info: fix TypeError failure when there are databases that do not contain tables (ansible-collections#205)

* mysql_info: fix TypeError failure when there are databases that do not contain tables

* Add changelog fragment

(cherry picked from commit a1f419d)

* Fix sanity errors
…ions#274)

* Prepare for distutils.version being removed in Python 3.12 (ansible-collections#267)

* Prepare for distutils.version being removed in Python 3.12

* Update plugins/module_utils/version.py

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit d9e12b8)

* Use vendored version of distutils.version (ansible-collections#269)

* Use vendored version of distutils.version

* Correct fragment

* Update plugins/module_utils/version.py

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 9c575b4)

* Add ignore-2.13.txt
…tions#298)

* Enable and fix integration tests for devel

* Add exclusions
(cherry picked from commit e6e661b)

Co-authored-by: Andrew Klychkov <[email protected]>
* Clarified error message about missing python modules (ansible-collections#279)

* Clarified error message about missing python modules, and tweak documentation to suggest overriding interpreter.

* Mention mysqlclient as another option

* Correct mysqlclient suggestions from python2 to python3

Co-authored-by: Matthew Exon <[email protected]>
(cherry picked from commit 82baf75)

* Copy ignore-2.13.txt to ignore-2.14.txt (ansible-collections#323)

* Copy ignore-2.13.txt to ignore-2.14.txt

* Fix sanity

(cherry picked from commit c16b242)

Co-authored-by: Matthew Exon <[email protected]>
…ed to it (ansible-collections#346)

* mysql_user: fix parsing privs when a user has roles assigned to it

* Fix CI

* Fix CI
…ns#359)

* Add PSF-license.txt file.

* Update with actual CPython 3.9.5 license.

(cherry picked from commit b2e476c)
…lause is used (ansible-collections#375)

* mysql_query: fix false change reports when IF NOT EXISTS clause is used (ansible-collections#322)

* mysql_query: fix false change reports when IF NOT EXISTS clause is used

* Fix

* Fix doc, add fragment

* Improve doc

(cherry picked from commit 6474610)

* Fix tests
@Andersson007
Copy link
Collaborator

@hubiongithub it seems that something went unexpected as i can see that the backport contains a lot of other commits. if you share how you did it (all the steps), we could help find what was missed.

@Andersson007
Copy link
Collaborator

@hubiongithub i would suggest:

  1. git fetch upstream
  2. being in main, git merge upstream/main
  3. git hist | head # copy the commit hash
  4. git checkout -b backport-0 upstream/stable-1 # same for stable-2 later
  5. git cherry-pick -x
  6. it'll show you in which files the conflicts are, solve them
  7. git add
  8. git commit -m "..."
  9. git push origin backport-0
  10. etc.

@hubiongithub
Copy link
Contributor Author

13313 git remote -v
13314 git fetch upstream
13315 git checkout -b patchback/backports/stable-2/51a38840d977e6184be3ef1d6f427c8cb3dc4545/pr-342 upstream/stable-2
13316 git cherry-pick -x 51a3884
13317 vi plugins/modules/mysql_user.py
13318 git push origin patchback/backports/stable-2/51a38840d977e6184be3ef1d6f427c8cb3dc4545/pr-342
13319 git add plugins/modules/mysql_user.py
13320 git commit -m "CHERRY-PICKING stable-2"
13321 git push origin patchback/backports/stable-2/51a38840d977e6184be3ef1d6f427c8cb3dc4545/pr-342
13322 git checkout issue334_fix_logic_on_oncreate
13323 git fetch upstream
13324 git checkout -b patchback/backports/stable-1/51a38840d977e6184be3ef1d6f427c8cb3dc4545/pr-342 upstream/stable-1
13325 git cherry-pick -x 51a3884
13326 vi plugins/modules/mysql_user.py
13327 git add plugins/modules/mysql_user.py
13328 git commit -m "CHERRY-PICKING stable-1"
13329 git push origin patchback/backports/stable-1/51a38840d977e6184be3ef1d6f427c8cb3dc4545/pr-342
13330 git checkout issue334_fix_logic_on_oncreate

@hubiongithub
Copy link
Contributor Author

3. git hist | head

git hist | head
git: 'hist' is not a git command. See 'git --help'.

git version 2.25.1 (Ubuntu 20.04 here)

git log seems what wee want?

git log | head
commit 51a3884
Author: hubiongithub [email protected]
Date: Tue May 31 07:40:32 2022 +0200

mysql_user: prevent password getting set for existing users on on_cre… (#342)

* mysql_user: prevent password getting set for existing users on on_create when plugin is used

* added changelog fragment

@hubiongithub
Copy link
Contributor Author

git checkout -b backport-0 upstream/stable-1
Branch 'backport-0' set up to track remote branch 'stable-1' from 'upstream'.
Switched to a new branch 'backport-0'

git cherry-pick -x 51a3884

CONFLICT (content): Merge conflict in plugins/modules/mysql_user.py

edit it, git add, git commit:
git commit -m "PR379 merge"
[backport-0 1d0c077] PR379 merge
Author: hubiongithub [email protected]
Date: Tue May 31 07:40:32 2022 +0200
2 files changed, 8 insertions(+), 5 deletions(-)
create mode 100644 changelogs/fragments/334-mysql_user_fix_logic_on_oncreate.yml

git push origin backport-0
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Delta compression using up to 4 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.18 KiB | 1.18 MiB/s, done.
Total 8 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
remote:
remote: Create a pull request for 'backport-0' on GitHub by visiting:
remote: https://github.com/hubiongithub/community.mysql/pull/new/backport-0
remote:
To github.com:hubiongithub/community.mysql.git

  • [new branch] backport-0 -> backport-0

PR380

will try this fpr stable-2 if this worked, sorry for the mess, but I've no idea what went wrong.

@hubiongithub
Copy link
Contributor Author

13:04 $ git checkout main
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 14 commits.
(use "git push" to publish your local commits)
✔ ~/github.com/ansible_collections/community/community.mysql [main ↑·14|✔]
13:09 $ git fetch upstream
✔ ~/github.com/ansible_collections/community/community.mysql [main ↑·14|✔]
13:09 $ git merge upstream/main
Already up to date.
✔ ~/github.com/ansible_collections/community/community.mysql [main ↑·14|✔]
13:09 $ git checkout -b backport-1 upstream/stable-2
Branch 'backport-1' set up to track remote branch 'stable-2' from 'upstream'.
Switched to a new branch 'backport-1'
✔ ~/github.com/ansible_collections/community/community.mysql [backport-1|✔]
13:16 $ git cherry-pick -x 51a3884
Auto-merging plugins/modules/mysql_user.py
CONFLICT (content): Merge conflict in plugins/modules/mysql_user.py
error: could not apply 51a3884... mysql_user: prevent password getting set for existing users on on_cre… (#342)
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add ' or 'git rm '
hint: and commit the result with 'git commit'
✘-1 ~/github.com/ansible_collections/community/community.mysql [backport-1|CHERRY-PICKING|●1✖ 1]
13:17 $ vi plugins/modules/mysql_user.py
✔ ~/github.com/ansible_collections/community/community.mysql [backport-1|CHERRY-PICKING|●1✖ 1]
13:17 $ git add plugins/modules/mysql_user.py
✔ ~/github.com/ansible_collections/community/community.mysql [backport-1|CHERRY-PICKING|●2]
13:17 $ git commit -m "PR379 merge stable2"
[backport-1 a4fa89d] PR379 merge stable2
Author: hubiongithub [email protected]
Date: Tue May 31 07:40:32 2022 +0200
2 files changed, 8 insertions(+), 5 deletions(-)
create mode 100644 changelogs/fragments/334-mysql_user_fix_logic_on_oncreate.yml
✔ ~/github.com/ansible_collections/community/community.mysql [backport-1 ↑·1|✔]
13:17 $ git push origin backport-1
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Delta compression using up to 4 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.10 KiB | 1.10 MiB/s, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6), completed with 6 local objects.
remote:
remote: Create a pull request for 'backport-1' on GitHub by visiting:
remote: https://github.com/hubiongithub/community.mysql/pull/new/backport-1
remote:
To github.com:hubiongithub/community.mysql.git

  • [new branch] backport-1 -> backport-1

@Andersson007
Copy link
Collaborator

strange. Let me create backport PRs

@Andersson007
Copy link
Collaborator

@hubiongithub you're doing everything right, just need to choose stable-1 when opening the PR, not main. We already have these changes in main.
We have stable-1 branch for 1.* releases and stable-2 for 2.* version releases. So we need to backport your changes so that users of those versions will be able to get the update after the next release.
Could you open the same against stable-1?

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.

3 participants