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

Delete denied parameters from host interfaces #1356

Merged
merged 4 commits into from
Aug 3, 2024

Conversation

masa-orca
Copy link
Collaborator

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

In my change, I copied allowed_fields from this commit which is Vanav mentioned. Therefore, it will course errorif the allowed_fields chenges.


Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.66%. Comparing base (9ac5130) to head (c7f1347).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1356      +/-   ##
==========================================
- Coverage   76.45%   73.66%   -2.79%     
==========================================
  Files          43       35       -8     
  Lines        5445     4542     -903     
  Branches     1396     1210     -186     
==========================================
- Hits         4163     3346     -817     
+ Misses        814      788      -26     
+ Partials      468      408      -60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

for interface in exist_interfaces:
normalized_interface = interface
if LooseVersion("7.0") <= LooseVersion(zabbix_version):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be >= ? 6.4 and 6.0 were working fine before.

Copy link
Collaborator Author

@masa-orca masa-orca Jul 31, 2024

Choose a reason for hiding this comment

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

Is it wrong code? checking fields process will runs for 7.0 and higher.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right now you're checking for <= 7.0. That means it won't run in the future for 7.2, but it will run today for 6.4. 6.4 is working fine (don't think it needs the fields, but the API handles them gracefully). Either it needs to be >= 7.0 or we just sanitize them for all versions (which I don't honestly think is necessarily wrong).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now you're checking for <= 7.0

Does this mean integration test target is 7.0 and lower?

if LooseVersion("7.0") <= LooseVersion(zabbix_version):

If 6.4 and 6.0, zabbix_host module's behavior is not chenged from current behavior. in addition, this effects on 7.0, 7.2 and higher.

Either it needs to be >= 7.0 or we just sanitize them for all versions (which I don't honestly think is necessarily wrong).

If you want to check for all version, I will remove version checking condition.

@pyrodie18
Copy link
Collaborator

I'd remove the check and also add a change fragment. From there I think we're good.

@masa-orca masa-orca force-pushed the fix_host branch 2 times, most recently from bec2045 to bc52cd8 Compare August 3, 2024 06:09
@masa-orca
Copy link
Collaborator Author

Integration tests failed. however it is not depends my change and I create another pull request to fix it.
#1357

@pyrodie18 pyrodie18 merged commit 1978473 into ansible-collections:main Aug 3, 2024
39 checks passed
@masa-orca masa-orca deleted the fix_host branch August 4, 2024 08:15
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