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

Set charm status to waiting if ingress is not ready or if the 2 ingresses have conflicting path #127

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

Conversation

Thanhphan1147
Copy link
Collaborator

Checklist

@Thanhphan1147 Thanhphan1147 added the complex This is a complex PR that requires more senior attention label Mar 15, 2024
@Thanhphan1147 Thanhphan1147 requested a review from a team as a code owner March 15, 2024 23:51
Copy link
Contributor

Test coverage for 023050f

Name               Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------
src/actions.py        30      0      4      0   100%
src/agent.py         122      0     20      0   100%
src/charm.py         115      0     24      0   100%
src/cos.py            21      0      0      0   100%
src/ingress.py        19      0      4      0   100%
src/jenkins.py       358      0     56      0   100%
src/state.py         105      0     24      0   100%
src/timerange.py      31      0      6      0   100%
--------------------------------------------------------------
TOTAL                801      0    138      0   100%

Static code analysis report

Run started:2024-03-15 23:55:25.035070

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 6574
  Total lines skipped (#nosec): 3
  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):

@jdkandersson
Copy link
Contributor

Checklist

Is this missing some context for the reason for this change please?

"""Indicate whether ingress is properly configured.

Returns:
A tuple of a bool indicating whether ingress is configured and the reason if not.
Copy link
Contributor

Choose a reason for hiding this comment

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

What about making this a named tuple so that we don't have to assign meaning to indexes of the tuple implicitly?

A tuple of a bool indicating whether ingress is configured and the reason if not.
"""
if not self.ingress_observer.is_ingress_ready():
return (False, "Missing ingress relation")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the ingress integration always required?

@Thanhphan1147 Thanhphan1147 marked this pull request as draft April 17, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex This is a complex PR that requires more senior attention Libraries: Out of sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants