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

Isd 2902 postgres #4

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

Isd 2902 postgres #4

wants to merge 10 commits into from

Conversation

swetha1654
Copy link
Collaborator

Applicable spec:

Overview

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 45 files.

Valid Invalid Ignored Fixed
11 4 30 0
Click to see the invalid file list
  • hockeypuck_rock/hockeypuck.conf.tmpl
  • hockeypuck_rock/hockeypuck_wrapper.sh
  • lib/charms/data_platform_libs/v0/data_interfaces.py
  • src/charm.py
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

hockeypuck_rock/hockeypuck_wrapper.sh Outdated Show resolved Hide resolved
@@ -0,0 +1,3758 @@
# Copyright 2023 Canonical Ltd.

Choose a reason for hiding this comment

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

Suggested change
# Copyright 2023 Canonical Ltd.
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
# Copyright 2023 Canonical Ltd.

src/charm.py Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 45 files.

Valid Invalid Ignored Fixed
9 3 33 0
Click to see the invalid file list
  • lib/charms/data_platform_libs/v0/data_interfaces.py
  • src/charm.py
  • tests/integration/test_charm.py
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -1,38 +1,144 @@
#!/usr/bin/env python3

Choose a reason for hiding this comment

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

Suggested change
#!/usr/bin/env python3
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
#!/usr/bin/env python3

Copy link

Lint checks failed for 9faa3c1

```

/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:85 in private method _update_layer_and_restart:
D202: No blank lines allowed after function docstring (found 1)
/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:115 in public method app_environment:
D205: 1 blank line required between summary line and description (found 0)
/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:115 in public method app_environment:
D400: First line should end with a period (not 's')
/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:134 in public method fetch_postgres_relation_data:
D209: Multi-line docstring closing quotes should be on a separate line

Copy link

Unit tests failed for 9faa3c1

```

============================= test session starts ==============================
platform linux -- Python 3.10.16, pytest-8.3.4, pluggy-1.5.0 -- /home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/.tox/unit/bin/python
cachedir: .tox/unit/.pytest_cache
rootdir: /home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator
configfile: pyproject.toml
collecting ... collected 0 items / 1 error

==================================== ERRORS ====================================
___________________ ERROR collecting tests/unit/test_base.py ___________________
ImportError while importing test module '/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/tests/unit/test_base.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../_tool/Python/3.10.16/x64/lib/python3.10/importlib/init.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_base.py:14: in
from charm import IsCharmsTemplateCharm
E ImportError: cannot import name 'IsCharmsTemplateCharm' from 'charm' (/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py)
=========================== short test summary info ============================
ERROR tests/unit/test_base.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.31s ===============================

Copy link

Test coverage for 9faa3c1

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py      73     50     16      1    27%   55-63, 68-82, 98-111, 121-131, 142-156, 161-175, 179
----------------------------------------------------------
TOTAL             73     50     16      1    27%

Static code analysis report

Run started:2025-01-20 16:26:15.866446

Test results:
  No issues identified.

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

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.

1 participant