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

zabbix_action.py: fixes for recovery_operations (Zabbix 6.0) #671

Merged
merged 13 commits into from
Apr 13, 2022

Conversation

BGmot
Copy link
Collaborator

@BGmot BGmot commented Apr 13, 2022

SUMMARY

#661
In Zabbix 6.0 for zabbix_action:

  • mediatypeid must not exist in recovery_operations and update_operations
  • in recovery_operations if operationtype='notify_all_involved' then opmessage_usr and opmessage_grp must not be used
  • in update_operations if operationtype='notify_all_involved' then opmessage_usr and opmessage_grp must not be used
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zabbix_action.py

@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #671 (74a070a) into main (deba504) will decrease coverage by 0.53%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #671      +/-   ##
==========================================
- Coverage   70.98%   70.45%   -0.54%     
==========================================
  Files          27       27              
  Lines        3550     3581      +31     
  Branches      920      935      +15     
==========================================
+ Hits         2520     2523       +3     
- Misses        751      771      +20     
- Partials      279      287       +8     
Impacted Files Coverage Δ
.../community/zabbix/plugins/modules/zabbix_action.py 63.02% <0.00%> (-3.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update deba504...74a070a. Read the comment docs.

Copy link
Contributor

@D3DeFi D3DeFi left a comment

Choose a reason for hiding this comment

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

Once again, thank you! :)

Please, try to not include already merged code in the future, kinda funky to review like this

@D3DeFi D3DeFi merged commit de43c65 into ansible-collections:main Apr 13, 2022
@BGmot
Copy link
Collaborator Author

BGmot commented Apr 13, 2022

Please, try to not include already merged code in the future, kinda funky to review like this

I am sorry. I am new to PRs. How do I do that? if my PR is merged I need to fetch upstream and merge into my (clone) repo main branch then proceed with new changes and create new PR?

@D3DeFi
Copy link
Contributor

D3DeFi commented Apr 13, 2022

Please, try to not include already merged code in the future, kinda funky to review like this

I am sorry. I am new to PRs. How do I do that? if my PR is merged I need to fetch upstream and merge into my (clone) repo main branch then proceed with new changes and create new PR?

No worries :) Depends if you do it before you start writing changes or after, but should work something like this:

git add <changed_files>; git commit -m   # if you already modified something
# or
git stash

git checkout main
git remote add upstream https://github.com/ansible-collections/community.zabbix.git  # if you havent done this already
git fetch upstream/main
git rebase upstream/main

git checkout <my-PR-branch>
git rebase main

git stash pop  # if opted for stash

commit/push/etc

@BGmot
Copy link
Collaborator Author

BGmot commented Apr 13, 2022

Ok, then rebase is the way to go. Noted. Thanks!

@BGmot
Copy link
Collaborator Author

BGmot commented Apr 29, 2022

@D3DeFi I am sorry to bug you again. I've done some coding to bring as much as I could to bring all the modules to 6.0 but I am struggling with passing all the tests... For example I don't understand why Ansible devel + py3.9 sanity tests fail https://github.com/BGmot/community.zabbix/runs/6221179311?check_suite_focus=true

Take the first error https://github.com/BGmot/community.zabbix/runs/6221179311?check_suite_focus=true#step:5:421
"...but documentation defines choices as ([])" and I clearly see zabbix_action.py documentation clearly defines all the "choices".
If you can guide me I'd highly appreciated. Maybe there is another way to talk to you not here? e-mail? slack? telegram?
Thanks.

@D3DeFi
Copy link
Contributor

D3DeFi commented Apr 29, 2022

@BGmot dont worry, feel free to contact me whenever :) If you have direct questions you can always contact me on the email I have published under my GitHub profile. (Although I may not be able to respond instantly). Other good channel for talks is https://gitter.im/community-zabbix/community - we sometimes tend to chat there. However, everyone seems to be busy lately so not much work is being done on the repo unfortunately.

For the failing CI. Ansible released 2.13 and bumped devel to 2.14. This means that sanity tests run everything except files that are ignored in tests/sanity/ignore-2.XY.txt. Since the bump, you also need to have ignore-2.14.txt in the repo as we do have here. See #666

Best way to stay up to date for me with my fork is:

git remote add upstream https://github.com/ansible-collections/community.zabbix.git
git fetch upstream
git checkout main
git rebase upstream/main
git push origin/main

^^ I also repeat this for the branches I already created and have to work with if I am not coding directly in the main

@BGmot
Copy link
Collaborator Author

BGmot commented Apr 29, 2022

Stupid me did rebase before pushing but now I see that it actually failed -( that's why... Sorry.

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.

2 participants