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

Prevent default labels from being forwarded #31

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

cbartz
Copy link
Collaborator

@cbartz cbartz commented Sep 25, 2024

Applicable spec: ISD-116

Overview

Do not forward the default self-hosted labels.

Rationale

These labels should be ignored, they have no effect on routing decisions. They are currently forwarded and must be ignored again by the consumer side.

Juju Events Changes

n/a

Module Changes

parse.py: Remove ignored labels from webhooks.
router.py: Remove ignore labels from routing table, as they are already removed during parsing.

Library Changes

n/a

Checklist

@cbartz cbartz added the trivial label Sep 25, 2024
@cbartz cbartz requested a review from a team as a code owner September 25, 2024 09:43
webhook_router/app.py Outdated Show resolved Hide resolved
webhook_router/parse.py Show resolved Hide resolved
tests/unit/test_parse.py Outdated Show resolved Hide resolved
tests/unit/test_parse.py Outdated Show resolved Hide resolved
tests/unit/test_parse.py Outdated Show resolved Hide resolved
Copy link

Test coverage for 7993ec5

Name                           Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------
webhook_router/__init__.py         0      0      0      0   100%
webhook_router/app.py            104      0     32      0   100%
webhook_router/mq.py              22      0      7      0   100%
webhook_router/parse.py           53      0     18      0   100%
webhook_router/router.py          44      0     16      0   100%
webhook_router/validation.py       6      0      0      0   100%
--------------------------------------------------------------------------
TOTAL                            229      0     73      0   100%

Static code analysis report

Run started:2024-09-26 08:46:29.633708

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 1753
  Total lines skipped (#nosec): 7
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copy link

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@jdkandersson jdkandersson left a comment

Choose a reason for hiding this comment

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

Just one comment left from the earlier review

@cbartz cbartz merged commit 3b83dd5 into main Sep 27, 2024
17 checks passed
@cbartz cbartz deleted the feat/exclude-default-labels branch September 27, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants