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

Postgresql integration #2

Closed
wants to merge 5 commits into from
Closed

Postgresql integration #2

wants to merge 5 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 44 files.

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

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

</details>

@@ -0,0 +1,51 @@
name: hockeypuck

Choose a reason for hiding this comment

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

Suggested change
name: hockeypuck
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
name: hockeypuck

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

@@ -1,117 +1,172 @@
#!/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

maxPacketLength=8192
maxKeyLength=1048576
# Full fingerprints of keys to ignore, minus the leading 0x
blacklist=[

Choose a reason for hiding this comment

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

[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead

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
10 5 30 0
Click to see the invalid file list
  • hockeypuck_rock/hockeypuck.conf.tmpl
  • hockeypuck_rock/hockeypuck_wrapper.sh
  • hockeypuck_rock/rockcraft.yaml
  • 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>

@@ -0,0 +1,15 @@
#!/bin/bash

Choose a reason for hiding this comment

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

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

Copy link

Lint checks failed for b2a3fdc

```

/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:1 at module level:
D100: Missing docstring in public module
/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:16 in public class HockeypuckCharm:
D400: First line should end with a period (not 'k')
/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:18 in public method __init__:
D107: Missing docstring in init
/home/ubuntu/actions-runner/_work/hockeypuck-k8s-operator/hockeypuck-k8s-operator/src/charm.py:54 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:84 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:84 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:103 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 b2a3fdc

```

============================= 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.53s ===============================

Copy link

Test coverage for b2a3fdc

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py      71     52     16      1    23%   19-27, 30-44, 47, 51, 67-80, 90-100, 111-125, 130-144, 148
----------------------------------------------------------
TOTAL             71     52     16      1    23%

Static code analysis report

Run started:2025-01-15 14:09:47.162602

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 195
  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):

@swetha1654 swetha1654 closed this Jan 16, 2025
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