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

Draft: Add options to start and stop group replication #647

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

eryx12o45
Copy link

SUMMARY
Added options to start and stop group replication

ISSUE TYPE
Feature Pull Request

COMPONENT NAME
mysql_replication module

ADDITIONAL INFORMATION
new version of #93

@eryx12o45 eryx12o45 changed the title Add options to start and stop group replication Draft: Add options to start and stop group replication Jun 14, 2024
Copy link
Collaborator

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

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

@eryx12o45 hello, thanks for the PR!
Do i understand it correctly that in our case it's tricky to cover this with integration tests? You tested it locally and it works OK, right?

Do others think if it's OK to merge the PR w/o integration testing?

plugins/modules/mysql_replication.py Outdated Show resolved Hide resolved
plugins/modules/mysql_replication.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@laurent-indermuehle laurent-indermuehle left a comment

Choose a reason for hiding this comment

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

The integration tests have 1 primary and 2 replicas. It should be possible to tests this no?

plugins/modules/mysql_replication.py Outdated Show resolved Hide resolved
plugins/modules/mysql_replication.py Outdated Show resolved Hide resolved
plugins/modules/mysql_replication.py Outdated Show resolved Hide resolved
plugins/modules/mysql_replication.py Outdated Show resolved Hide resolved
@eryx12o45
Copy link
Author

Hi @Andersson007 and @laurent-indermuehle ,

thanks for your review. I will try to create some tests in the near future. I created this PR in the first place some time back when I was working at another place where we would have needed it, but since then changes jobs and am not working on this anymore. Nevertheless I thought it makes sense to finalize this PR and therefore re-created it with adapted settings. But now I have to build a local test env. I would assume it is possible to test it though. I hope code-wise it's ok for now though

@Andersson007
Copy link
Collaborator

Hi @Andersson007 and @laurent-indermuehle ,

thanks for your review. I will try to create some tests in the near future. I created this PR in the first place some time back when I was working at another place where we would have needed it, but since then changes jobs and am not working on this anymore. Nevertheless I thought it makes sense to finalize this PR and therefore re-created it with adapted settings. But now I have to build a local test env. I would assume it is possible to test it though. I hope code-wise it's ok for now though

@eryx12o45 hi, code-wise LGTM. Ideally would be great to have integration tests. If it's tricky (no idea), I'm OK with merging this provided the manual testing is done (though someone can break the code in future and we'll learn about it only via bug reports).
Thoughts @eryx12o45 @laurent-indermuehle ?

@laurent-indermuehle
Copy link
Collaborator

@eryx12o45 please have a look at the Makefile. It uses Podman to run the integration tests on your workstation. If you have a question about it you can ask me (either here or in our matrix.

I'm not a fan of incorporating code without proper tests. If down the line Oracle changes something to the group replication, due to the critical nature of the replication, I would like to know about it.

@laurent-indermuehle
Copy link
Collaborator

Sorry @eryx12o45, I should have point you to this file: https://github.com/ansible-collections/community.mysql/blob/main/TESTING.md

@Andersson007
Copy link
Collaborator

If there are any issue with running tests locally:

  • Convert the PR to draft (there's a button on this page)
  • Just push your tests and see the results here
  • When it's ready, convert it back, there'll be a button for that too

If you have not time at all, I don't know, just say it explicitly, maybe someone else could add testing directly to the PR

@eryx12o45
Copy link
Author

Heyho, thanks for pointing me to the docs. As said. I will definitely try to biuild some integration tests, might just take some time, but I promise to try to keep it shorter this time ;-)

@eryx12o45 eryx12o45 marked this pull request as draft June 20, 2024 12:41
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