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

Fix/linting #33

Merged
merged 13 commits into from
Feb 2, 2023
Merged

Fix/linting #33

merged 13 commits into from
Feb 2, 2023

Conversation

merkata
Copy link
Contributor

@merkata merkata commented Jan 30, 2023

This PR fixes linting issues found by mypy and pylint linters that are run via tox -e lint.

Copy link
Collaborator

@arturo-seijas arturo-seijas left a comment

Choose a reason for hiding this comment

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

I'm afraid you'll need to remove ops.testing.CAN_CONNECTinstead of ignoring the linting error. This is the default behaviour in ops 2

tests/conftest.py Outdated Show resolved Hide resolved
arturo-seijas
arturo-seijas previously approved these changes Jan 30, 2023
Copy link
Collaborator

@arturo-seijas arturo-seijas 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
Contributor

@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.

Thanks for tackling the linting and typing issues!

src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
tests/integration/conftest.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
tests/unit/test_charm.py Outdated Show resolved Hide resolved
tests/unit/test_charm.py Show resolved Hide resolved
arturo-seijas
arturo-seijas previously approved these changes Jan 31, 2023
Copy link
Collaborator

@arturo-seijas arturo-seijas left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

Test coverage for 94489c9

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py     180     21     56      4    88%   279->283, 376-377, 404-406, 428-432, 441-452, 463->exit, 478-480
----------------------------------------------------------
TOTAL            180     21     56      4    88%

Static code analysis report

Run started:2023-01-31 12:34:58.733016

Test results:
  No issues identified.

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

@arturo-seijas arturo-seijas 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
Contributor

@amandahla amandahla left a comment

Choose a reason for hiding this comment

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

LGTM but it seems that trivy config was not found.

https://github.com/canonical/discourse-k8s-operator/actions/runs/4054111097/jobs/6975542344

Example of output in Indico:

"-a image" "-b table" "-c " "-d 1" "-e false" "-f os,library" "-g CRITICAL,HIGH" "-h " "-i ghcr.io/canonical/indico:4073362325" "-j ." "-k " "-l " "-m " "-n " "-o " "-p " "-q " "-r false" "-s " "-t " "-u " "-v trivy.yaml" "-z "
Running Trivy with trivy.yaml config from:  trivy.yaml

@merkata
Copy link
Contributor Author

merkata commented Feb 2, 2023

LGTM but it seems that trivy config was not found.

https://github.com/canonical/discourse-k8s-operator/actions/runs/4054111097/jobs/6975542344

Example of output in Indico:

"-a image" "-b table" "-c " "-d 1" "-e false" "-f os,library" "-g CRITICAL,HIGH" "-h " "-i ghcr.io/canonical/indico:4073362325" "-j ." "-k " "-l " "-m " "-n " "-o " "-p " "-q " "-r false" "-s " "-t " "-u " "-v trivy.yaml" "-z "
Running Trivy with trivy.yaml config from:  trivy.yaml

It's part of a different PR, now everything is in place and I can update the chaos one that will have trivy, passing linters and jira action step. Thanks!

@merkata merkata merged commit bfac9ef into main Feb 2, 2023
@merkata merkata deleted the fix/linting branch February 2, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants