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

Use ifalias for Planned Maintenance "str" and "regexp" matching #340

Merged
merged 8 commits into from
Aug 20, 2024

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Aug 2, 2024

Scope and purpose

Fixes #297

Original zino seems to use ifalias and ifdescr for planned maintenance matching, while intitial PM implementation used only ifdescr.
This PR changes it to use ifalias where applicable instead.

Original zino code confuses me so wouldn't be a bad idea for someone else to take a look and see if this PR actually makes the correct changes

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Zino can be found in the
README.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with black, ruff and isort, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

Copy link

github-actions bot commented Aug 2, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 5 0 0.65s
✅ PYTHON isort 5 0 0.21s
✅ PYTHON ruff 5 0 0.01s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented Aug 2, 2024

Test results

    3 files      3 suites   1m 17s ⏱️
  550 tests   550 ✅ 0 💤 0 ❌
1 626 runs  1 624 ✅ 2 💤 0 ❌

Results for commit a966ba4.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.20%. Comparing base (a9a85fb) to head (a966ba4).
Report is 52 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #340   +/-   ##
=======================================
  Coverage   98.20%   98.20%           
=======================================
  Files          64       64           
  Lines        7926     7930    +4     
=======================================
+ Hits         7783     7787    +4     
  Misses        143      143           

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

@stveit stveit force-pushed the bug/fix-field-for-matching-ports branch from 71d251c to 216e1d7 Compare August 2, 2024 12:58
@stveit stveit force-pushed the bug/fix-field-for-matching-ports branch from 216e1d7 to 2fb292e Compare August 2, 2024 13:01
@stveit stveit marked this pull request as ready for review August 2, 2024 13:01
@johannaengland
Copy link
Contributor

I would like to have a news fragment for that, because this is a functionality change

@stveit stveit self-assigned this Aug 5, 2024
@stveit
Copy link
Contributor Author

stveit commented Aug 5, 2024

Did another look on original code, and seems it uses both ifalias and ifdescr in different situations. I have changed things to reflect that

@stveit stveit changed the title Use ifalias for Planned Maintenance matching instead of ifdescr Use ifalias for Planned Maintenance "str" and "regexp" matching Aug 5, 2024
@stveit stveit force-pushed the bug/fix-field-for-matching-ports branch from 03a6a83 to 269c244 Compare August 5, 2024 08:27
@stveit stveit force-pushed the bug/fix-field-for-matching-ports branch from 269c244 to 8bc275a Compare August 5, 2024 08:35
@lunkwill42 lunkwill42 self-requested a review August 19, 2024 08:45
Copy link

@stveit stveit merged commit 70fc24b into master Aug 20, 2024
11 checks passed
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.

Possible wrong value used for port matching in planned maintenance
3 participants