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

Charm Review #1

Open
wants to merge 357 commits into
base: empty
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
357 commits
Select commit Hold shift + click to select a range
681536e
add unit tests
natalian98 Mar 10, 2023
be98a1e
use get_relation_data instead of backend calls
natalian98 Mar 10, 2023
e186287
fix workflows
natalian98 Mar 10, 2023
3ecfc52
Merge pull request #32 from canonical/IAM-188-fix-issue-31-in-hydra
natalian98 Mar 13, 2023
6a5b077
remove charm publishing on pr
natalian98 Mar 13, 2023
748a89e
Merge branch 'main' into fix-workflows
natalian98 Mar 13, 2023
5079362
Merge pull request #34 from canonical/fix-workflows
natalian98 Mar 15, 2023
3880279
Add oauth library
nsklikas Mar 3, 2023
4d1a36a
Add types
nsklikas Mar 3, 2023
612eb3d
Improve error handling
nsklikas Mar 6, 2023
e1f17b3
Add tests
nsklikas Mar 6, 2023
8dca82b
Fix linting
nsklikas Mar 6, 2023
48fe196
Add helper class for Hydra CLI
nsklikas Mar 7, 2023
2154d41
Add oauth_info_changed event
nsklikas Mar 7, 2023
1c9c1e8
Fix rebase
nsklikas Mar 7, 2023
adaac48
Address comments, add get_client_credentials
nsklikas Mar 7, 2023
4bcc5bd
Address comments
nsklikas Mar 8, 2023
d67b9d2
Mock oauth library calls
nsklikas Mar 8, 2023
2dbc254
Get juju debug-log
nsklikas Mar 9, 2023
9e69ea5
Fix bug
nsklikas Mar 9, 2023
17b8c75
Fix bugs
nsklikas Mar 10, 2023
d90e51f
Delete secret when relation is gone
nsklikas Mar 10, 2023
0ebedab
Fix rebase
nsklikas Mar 14, 2023
ff38052
Address review comments
nsklikas Mar 14, 2023
3a7be8d
Address review comments
nsklikas Mar 17, 2023
f1501c2
Remove comment
nsklikas Mar 17, 2023
e55343b
Remove comment
nsklikas Mar 17, 2023
cc11c43
Limit assertions on each test
nsklikas Mar 17, 2023
76438c0
Add type annotations to tests
nsklikas Mar 17, 2023
19a0e84
Improve test assertions
nsklikas Mar 17, 2023
464406a
Clean up code
nsklikas Mar 17, 2023
abcf5a8
Move HydraCLI to different file
nsklikas Mar 17, 2023
1ab98cb
Fix linting
nsklikas Mar 17, 2023
a82a883
Refactor tests
nsklikas Mar 22, 2023
9dd20c4
Remove dependency to private function
nsklikas Mar 22, 2023
8bdd2f9
Merge pull request #29 from canonical/IAM-66-oauth-interface
nsklikas Mar 22, 2023
eb44110
Improves project documentation and other nitpicks
gruyaume Feb 9, 2023
63be7e0
Adds trust to hydra deploy
gruyaume Feb 9, 2023
fd79d2f
Adds back security/contributing/license sections to README.md
gruyaume Feb 22, 2023
7333f7b
Fix typing
nsklikas Mar 23, 2023
928bc5b
Merge pull request #42 from canonical/IAM-195-dev-nitpicks
nsklikas Mar 27, 2023
e2c62c6
Add peer relation for storing data
nsklikas Mar 10, 2023
b563759
Fix docstring
nsklikas Mar 17, 2023
6259c86
Fixes
nsklikas Mar 17, 2023
07f2905
Fix rebase
nsklikas Mar 17, 2023
8c8d352
Fixes
nsklikas Mar 22, 2023
48fefe5
Cleanup code
nsklikas Mar 23, 2023
0561d9d
Test peer relation readiness
nsklikas Mar 24, 2023
e1ed21c
Remove comment
nsklikas Mar 24, 2023
2dd2562
Fix linting
nsklikas Mar 24, 2023
c733953
Fix types
nsklikas Mar 27, 2023
c1f075c
Fix linting
nsklikas Mar 27, 2023
9b38782
Fix docstring
nsklikas Mar 28, 2023
411cb7d
Merge pull request #33 from canonical/IAM-187-add-peer-relation
nsklikas Mar 29, 2023
635e1ac
Update renovatebot/github-action action to v32.241.11
renovate[bot] Mar 29, 2023
94d4e7b
Merge pull request #8 from canonical/renovate/renovatebot-github-acti…
nsklikas Apr 3, 2023
332f85e
Update dependency flake8 to v6
renovate[bot] Apr 3, 2023
a2316f5
Merge pull request #15 from canonical/renovate/flake8-6.x
nsklikas Apr 3, 2023
5eef71b
Update actions/checkout action to v3.5.0
renovate[bot] Apr 3, 2023
d417f02
Merge pull request #18 from canonical/renovate/actions-checkout-3.x
nsklikas Apr 3, 2023
376f435
Update canonical/charming-actions action to v2.2.5
renovate[bot] Apr 3, 2023
b2c9bd0
Merge pull request #16 from canonical/renovate/canonical-charming-act…
nsklikas Apr 3, 2023
0244eb3
Update renovatebot/github-action action to v36
renovate[bot] Apr 3, 2023
79d41c6
Merge pull request #36 from canonical/renovate/renovatebot-github-act…
nsklikas Apr 3, 2023
c3d74ac
Update library version
nsklikas Apr 4, 2023
267b889
Merge pull request #49 from canonical/fix-lib-version
nsklikas Apr 4, 2023
055d72e
Initial actions implementation
nsklikas Mar 16, 2023
78115f6
Add unit tests
nsklikas Mar 17, 2023
2ef30fc
Add integration tests
nsklikas Mar 17, 2023
9265a73
Cleanup
nsklikas Mar 17, 2023
6a38e19
Fix rebase
nsklikas Mar 17, 2023
6ee79d2
Rename get-oauth-client action
nsklikas Mar 22, 2023
786d718
Cleanup
nsklikas Mar 22, 2023
fdad127
Fix tests
nsklikas Mar 22, 2023
36cbbc5
Fix tests
nsklikas Mar 23, 2023
b50221f
Test for oauth relation managed client
nsklikas Mar 24, 2023
83bae9f
Fix linting
nsklikas Mar 24, 2023
323dd85
Requested fixes
nsklikas Mar 24, 2023
11775b6
Fix bug
nsklikas Mar 24, 2023
25fd2d4
Fix typing
nsklikas Mar 27, 2023
758bfeb
Fix linting
nsklikas Mar 27, 2023
a04085c
Fix linting, add more descriptive message
nsklikas Mar 28, 2023
7029c23
Fix rebase
nsklikas Mar 29, 2023
70032d8
Merge pull request #37 from canonical/IAM-191-actions
nsklikas Apr 5, 2023
18913a9
fix workflows fo rpublishing charm libraries
natalian98 Apr 5, 2023
7c76774
use charming actions
natalian98 Apr 5, 2023
24e1862
Merge pull request #51 from canonical/fix-relative-path
natalian98 Apr 5, 2023
1cb82d7
Allow non-leader units to get endpoints
nsklikas Apr 7, 2023
8a1637e
Simplify code
nsklikas Apr 7, 2023
126056a
Bump LIBPATCH
nsklikas Apr 7, 2023
c839e29
Fix linting
nsklikas Apr 7, 2023
0dbafdf
Merge pull request #52 from canonical/fix-lib-bug
nsklikas Apr 10, 2023
e9cbdbb
Update dependency pytest-operator to v0.26.0
renovate[bot] Apr 10, 2023
32a787d
Merge pull request #23 from canonical/renovate/pytest-operator-0.x
nsklikas Apr 11, 2023
d22b18e
feat: added hydra side implementation of ui-endpoint-info interface (…
bencekov Apr 19, 2023
d04a257
update oauth lib
natalian98 Apr 20, 2023
bfc9c21
update unit tests to reflect the changes in logic
natalian98 Apr 20, 2023
84eec85
rename unit test
natalian98 Apr 20, 2023
27ed10b
fix metadata serialization bug
natalian98 Apr 20, 2023
32d427e
deploy stable postgresql, fix juju logs in CI
natalian98 Apr 21, 2023
35caacd
check that app exists
natalian98 Apr 21, 2023
3a6f0d5
add client created check
natalian98 Apr 21, 2023
f4e9f44
Merge pull request #55 from canonical/IAM-225-fix-issue-54-in-hydra
natalian98 Apr 27, 2023
3f5840c
chore(deps): update renovatebot/github-action action to v36.0.3
renovate[bot] Apr 27, 2023
54898bf
chore(deps): update dependency pytest-operator to v0.27.0
renovate[bot] Apr 27, 2023
6b42153
Merge pull request #57 from canonical/renovate/renovatebot-github-act…
nsklikas May 2, 2023
fd1a481
Merge pull request #58 from canonical/renovate/pytest-operator-0.x
nsklikas May 2, 2023
6638187
chore(deps): update actions/checkout action to v3.5.2
renovate[bot] May 2, 2023
4d72eeb
chore(deps): update peter-evans/create-pull-request action to v5
renovate[bot] May 2, 2023
6ef9495
Merge pull request #50 from canonical/renovate/peter-evans-create-pul…
nsklikas May 2, 2023
a52a76a
Merge pull request #53 from canonical/renovate/actions-checkout-3.x
nsklikas May 2, 2023
e5ad8fd
add dataclasses for oauth provider config
natalian98 Apr 28, 2023
b40c42b
add assumes to metadata
natalian98 Apr 28, 2023
62783ac
bump libpatch
natalian98 Apr 28, 2023
eac0ae7
Merge pull request #59 from canonical/update-oauth-lib
natalian98 May 4, 2023
b57106a
(Automated) Update Charm Libs (#61)
github-actions[bot] May 9, 2023
e9b4716
Use service to communicate with other components (#65)
nsklikas May 17, 2023
4bbbdd0
chore(deps): update renovatebot/github-action action to v36.1.1 (#60)
renovate[bot] May 17, 2023
78ee168
(Automated) Update Charm Libs (#64)
github-actions[bot] May 17, 2023
d7a9422
chore(deps): update renovatebot/github-action action to v37 (#62)
renovate[bot] May 17, 2023
fde3079
(Automated) Update Charm Libs (#68)
github-actions[bot] May 22, 2023
bf947ac
Use ROCK image (#66)
nsklikas May 23, 2023
37b67d9
Provide client credentials in `OauthProviderConfig` (#63)
natalian98 May 24, 2023
393a555
chore(deps): update canonical/charming-actions action to v2.3.0 (#70)
renovate[bot] May 26, 2023
3627c47
chore(deps): update renovatebot/github-action action to v38 (#72)
renovate[bot] May 30, 2023
2ac85c8
IAM-259-Add COS Integration to Hydra (#67)
bencekov May 31, 2023
9ff9aa0
(Automated) Update Charm Libs (#74)
github-actions[bot] Jun 5, 2023
5aead8a
Convert ingress provided URLs to https (#69)
nsklikas Jun 8, 2023
20bfcd9
(Automated) Update Charm Libs (#77)
github-actions[bot] Jun 14, 2023
98e68dd
chore(deps): update actions/checkout action to v3.5.3 (#76)
renovate[bot] Jun 14, 2023
6312120
fix: fixed issue with log file directory (#75)
bencekov Jun 20, 2023
4ee29ef
Store migration in peer relation (#79)
nsklikas Jun 22, 2023
0bed7eb
Generate secrets and store them in juju secrets (#80)
nsklikas Jun 22, 2023
41ec09f
Add custom event for oauth `relation-broken` and remove provider data…
natalian98 Jun 29, 2023
7fc97b5
chore(deps): update dependency pytest-operator to v0.28.0 (#82)
renovate[bot] Jun 30, 2023
37d656c
chore(deps): update renovatebot/github-action action to v38.1.8 (#73)
renovate[bot] Jun 30, 2023
aa0cdd3
(Automated) Update Charm Libs (#84)
github-actions[bot] Jul 3, 2023
640aaac
chore(deps): update renovatebot/github-action action to v38.1.11 (#85)
renovate[bot] Jul 6, 2023
68ce815
Install jsonschema from binary (#86)
nsklikas Jul 7, 2023
d4fc755
(Automated) Update Charm Libs (#87)
github-actions[bot] Jul 10, 2023
92adebb
(Automated) Update Charm Libs (#91)
github-actions[bot] Jul 17, 2023
58462ac
feat: added alert rules to hydra
bencekov Jul 22, 2023
5fa646e
feat: added grafana dashboard
bencekov Jul 22, 2023
a8ccce1
fix: fixed log alerts
bencekov Jul 24, 2023
c8261d3
fix: fixed log queries in dashboard
bencekov Jul 24, 2023
a558e19
fix: fixed dashboard description
bencekov Jul 24, 2023
21221e0
Update charm libs
agathanatasha Jul 24, 2023
f4a39bf
fix: fixed loki alert rule
bencekov Jul 26, 2023
1c883f5
fix: fixed loki alert rule
bencekov Jul 26, 2023
19dcee5
fix: fixed grafana dashboard
bencekov Jul 26, 2023
8443f61
Merge pull request #94 from canonical/automated-update-charm-libs
natalian98 Jul 26, 2023
a15a80a
Merge pull request #93 from canonical/IAM-377-Add-Dashboard-to-Hydra
bencekov Jul 27, 2023
13f912f
Merge pull request #92 from canonical/IAM-378-Add-Alerts-to-Hydra
bencekov Jul 28, 2023
e4b3d76
Update charm libs
agathanatasha Jul 31, 2023
a3a4575
Merge pull request #97 from canonical/automated-update-charm-libs
natalian98 Jul 31, 2023
0efe4d1
feat: added tracing integration to hydra operator
bencekov Jul 28, 2023
83361ae
fix: refactored _hydra_layer property
bencekov Jul 28, 2023
1a8d995
Merge pull request #95 from canonical/IAM-389-Add-Tracing-to-Hydra
bencekov Aug 2, 2023
ffc58a9
ci: use canonical action to open automatic prs
natalian98 Aug 1, 2023
d6d5ef9
ci: use PAT_TOKEN
natalian98 Aug 3, 2023
0d9df03
Merge pull request #98 from canonical/IAM-169-use-canonical-actions
natalian98 Aug 3, 2023
6f5332a
fix: fixed dashboard
bencekov Aug 8, 2023
6efabd8
Merge pull request #103 from canonical/dashboard-fix
bencekov Aug 9, 2023
8377834
ci: add PAT_TOKEN to inputs
natalian98 Aug 9, 2023
3e56173
Merge pull request #104 from canonical/add-token-to-inputs
natalian98 Aug 11, 2023
a0547f6
fix: updated charm according to future change in tempo-k8s charm lib
bencekov Aug 2, 2023
7f4acd5
fix: minor fixes in unit tests
bencekov Aug 14, 2023
5292f08
Merge pull request #100 from canonical/IAM-396-Update-tracing-relation
bencekov Aug 15, 2023
19c10d1
fix: use http endpoint in endpoint-info integration
wood-push-melon Aug 16, 2023
2953db2
feat: updated hydra_endpoints relation name to hydra-endpoint-info
bencekov Aug 17, 2023
8a72742
Merge pull request #105 from canonical/IAM-441-Update-hydra_endpoints…
bencekov Aug 21, 2023
41b3c89
feat: updated login_ui_endpoints lib and associated unit test
bencekov Aug 21, 2023
b1001b0
Merge pull request #107 from canonical/update-ui-endpoint-info-relation
bencekov Aug 22, 2023
f6b7644
Merge branch 'main' into IAM-417
wood-push-melon Aug 24, 2023
061e5e9
Merge pull request #106 from canonical/IAM-417
wood-push-melon Aug 24, 2023
9f94bfb
ci: group renovate dependencies
nsklikas Aug 28, 2023
f319a6d
Merge pull request #110 from canonical/IAM-414
nsklikas Sep 1, 2023
0987a59
feat: migrate to ingress v2
nsklikas Sep 1, 2023
e391643
Merge pull request #113 from canonical/IAM-422
nsklikas Sep 1, 2023
b8fa625
fix: bumped microk8s version to 1.28-strict/stable in CI
bencekov Sep 1, 2023
e4c87c6
Merge pull request #112 from canonical/IAM-458-Bump-microk8s-version
bencekov Sep 1, 2023
2e95ad1
chore(deps): pin dependencies
renovate[bot] Sep 1, 2023
7f857d0
Merge pull request #116 from canonical/renovate/pin-dependencies
nsklikas Sep 4, 2023
b90790e
chore(deps): update renovatebot/github-action action to v39.0.5
renovate[bot] Sep 4, 2023
1bc91c9
Merge pull request #117 from canonical/renovate/patch-renovate-packages
nsklikas Sep 4, 2023
2290283
fix: remove renovate workflow
nsklikas Sep 6, 2023
aaae411
Merge pull request #120 from canonical/IAM-414
nsklikas Sep 7, 2023
f63c7ae
chore(deps): update actions/checkout action to v4
renovate[bot] Sep 7, 2023
ae2de32
Merge pull request #119 from canonical/renovate/major-github-actions
canonical-iam Sep 7, 2023
2a7a1dd
Update charm libs
canonical-iam Sep 4, 2023
1f9544e
chore: add cosl to requirements.txt
natalian98 Sep 7, 2023
238d097
Merge pull request #102 from canonical/automated-update-charm-libs
natalian98 Sep 7, 2023
430fea2
chore(deps): update canonical/charming-actions action to v2.4.0
renovate[bot] Sep 7, 2023
3bd7289
Merge pull request #118 from canonical/renovate/github-actions
canonical-iam Sep 7, 2023
c9f3f9a
fix: updated charm.py according to changes in login_ui_endpoints rela…
bencekov Aug 31, 2023
a62c751
fix: fixed issue with ui_login_relations
bencekov Aug 31, 2023
6c1dc16
fix: updated login_ui_endpoints relation
bencekov Sep 5, 2023
c220644
Merge pull request #111 from canonical/IAM-460-update-login_ui_endpoints
bencekov Sep 7, 2023
53e4f18
feat: added automerge and auto-approve to charm lib updates
bencekov Sep 6, 2023
cbb6e36
fix: updated checkout to v4
bencekov Sep 7, 2023
86d7e0e
fix: rebased auto-approver.yaml
bencekov Sep 7, 2023
25e16d2
Merge pull request #121 from canonical/IAM-429-Automate-approving-and…
bencekov Sep 8, 2023
7212513
ci: fix auto merge logic
nsklikas Sep 8, 2023
4b57682
Merge pull request #123 from canonical/IAM-414
nsklikas Sep 11, 2023
d9c7e0a
feat: added base-channel parameter to release-charm action
bencekov Sep 8, 2023
8f4044e
Merge pull request #124 from canonical/iam-448-set-base-channel
bencekov Sep 11, 2023
ffb7197
Update charm libs
canonical-iam Sep 11, 2023
d1027ca
Merge pull request #125 from canonical/automated-update-charm-libs
natalian98 Sep 12, 2023
5feec7c
ci: Add gh-jira sync
nsklikas Sep 7, 2023
e93ec03
Merge pull request #122 from canonical/IAM-466
nsklikas Sep 12, 2023
ec6dbb2
fix: add ory logo
nsklikas Sep 15, 2023
c95a789
Merge pull request #128 from canonical/add-logo
nsklikas Sep 15, 2023
f9a0fd8
fix: make "dev" flag configurable
nsklikas Sep 15, 2023
80f3a3b
fix: make ingress relation mandatory
nsklikas Sep 18, 2023
2754df2
Merge pull request #131 from canonical/IAM-492
nsklikas Sep 18, 2023
8906edc
chore(deps): update actions/checkout digest to 8ade135
renovate[bot] Sep 22, 2023
2a1576a
Merge pull request #135 from canonical/renovate/auto-github-actions
canonical-iam Sep 22, 2023
363e685
fix: expose app version to juju
nsklikas Sep 20, 2023
8594254
Merge pull request #134 from canonical/IAM-493
nsklikas Sep 27, 2023
36324d4
chore(deps): update testing pip deps
renovate[bot] Sep 27, 2023
2c83d4b
Merge pull request #126 from canonical/renovate/auto-testing-pip-deps
canonical-iam Sep 27, 2023
01a2e6f
fix: update grafana dashboards
nsklikas Sep 28, 2023
212393c
fix: update alert rules
nsklikas Sep 28, 2023
ea8b075
Merge pull request #139 from canonical/IAM-486
nsklikas Sep 28, 2023
1c7305b
fix: handle database relation departed
nsklikas Sep 26, 2023
e004cf1
fix: use DSN env var to run migration
nsklikas Sep 26, 2023
3fe4232
fix: update run-migration action
nsklikas Sep 27, 2023
2bd042d
Merge pull request #138 from canonical/IAM-513
nsklikas Sep 29, 2023
0a5a3b5
docs: IAM-410 add charmhub doc link
shipperizer Oct 16, 2023
4186e9d
Merge pull request #141 from canonical/IAM-410
shipperizer Oct 17, 2023
39708d7
chore(deps): update actions/checkout digest to b4ffde6
renovate[bot] Oct 19, 2023
b7d00ed
Merge pull request #142 from canonical/renovate/auto-github-actions
canonical-iam Oct 19, 2023
4e7561d
Added charmhub badge to README.md
bencekov Dec 4, 2023
0f3b8d0
fix: pined pytest-asyncio to version 0.21.1
bencekov Dec 4, 2023
937a7e8
Merge pull request #144 from canonical/IAM-465-Add-charmhub-badge
bencekov Dec 5, 2023
99406ef
ci: fix workflow
nsklikas Jan 29, 2024
603b815
Merge pull request #146 from canonical/fix-workflow
nsklikas Jan 29, 2024
648d656
fix(loki-rule): improve error handling in json parsing
BarcoMasile Jan 30, 2024
fc41e1c
Merge pull request #147 from canonical/IAM-663-improve-logql-query
BarcoMasile Jan 31, 2024
fe8e81c
Update charm libs
canonical-iam Feb 12, 2024
fc4a031
chore: fetch ingress lib v10
natalian98 Feb 16, 2024
f343eb3
tests: add network
natalian98 Feb 16, 2024
e5e86a7
Merge pull request #136 from canonical/automated-update-charm-libs
natalian98 Feb 16, 2024
56be18d
Update _on_relation_changed_event
kian99 Feb 27, 2024
7622bb2
Merge pull request #148 from kian99/fix-relation-changed-event
nsklikas Feb 27, 2024
9daff4b
fix: status on migration action
natalian98 Mar 7, 2024
6de431b
chore: bump hydra version
natalian98 Mar 7, 2024
9712332
Merge pull request #149 from canonical/IAM-700-update-hydra-version
natalian98 Mar 7, 2024
8ab86d8
chore: add icon.svg
shipperizer Apr 23, 2024
565596c
Merge pull request #151 from canonical/icon
shipperizer Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/.jira_sync_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# From https://github.com/canonical/gh-jira-sync-bot#client-side-configuration
settings:
jira_project_key: "IAM"
status_mapping:
opened: Untriaged
closed: done
components:
- Hydra
labels:
- bug
- enhancement
add_gh_comment: true
sync_description: true
sync_comments: true
epic_key: "IAM-471"
label_mapping:
enhancement: Story
bug: Bug
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug Report
description: File a bug report
labels: ["Type: Bug", "Status: Triage"]
body:
- type: markdown
attributes:
value: >
Thanks for taking the time to fill out this bug report! Before submitting your issue, please make
sure you are using the latest version of the charm. If not, please switch to this image prior to
posting your report to make sure it's not already solved.
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: >
If applicable, add screenshots to help explain the problem you are facing.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: To Reproduce
description: >
Please provide a step-by-step instruction of how to reproduce the behavior.
placeholder: |
1. `juju deploy ...`
2. `juju relate ...`
3. `juju status --relations`
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: >
We need to know a bit more about the context in which you run the charm.
- Are you running Juju locally, on lxd, in multipass or on some other platform?
- What track and channel you deployed the charm from (ie. `latest/edge` or similar).
- Version of any applicable components, like the juju snap, the model controller, lxd, microk8s, and/or multipass.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: >
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
Fetch the logs using `juju debug-log --replay` and `kubectl logs ...`. Additional details available in the juju docs
at https://juju.is/docs/olm/juju-logs
render: shell
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context

17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement_proposal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Enhancement Proposal
description: File an enhancement proposal
labels: ["Type: Enhancement", "Status: Triage"]
body:
- type: markdown
attributes:
value: >
Thanks for taking the time to fill out this enhancement proposal! Before submitting your issue, please make
sure there isn't already a prior issue concerning this. If there is, please join that discussion instead.
- type: textarea
id: enhancement-proposal
attributes:
label: Enhancement Proposal
description: >
Describe the enhancement you would like to see in as much detail as needed.
validations:
required: true
25 changes: 25 additions & 0 deletions .github/workflows/auto-approver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: auto-approver
run-name: CI for approving PRs

on:
push:
branches:
- "renovate/**"
- "automated-update-charm-libs"

jobs:
autoapprove:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Approve PR
run: |
gh pr review --approve || true
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Enable automerge if required
if: startsWith(github.ref_name, 'renovate/auto-')
run: |
gh pr merge --auto --merge || true
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: On Pull Request

# On pull_request, we:
# * always run lint checks
# * always run tests

on:
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Install dependencies
run: python3 -m pip install tox

- name: Run linters
run: tox -e lint

tests:
name: Run Tests
needs:
- lint
uses: ./.github/workflows/tests.yaml
27 changes: 27 additions & 0 deletions .github/workflows/on_push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: On Push

# On push to a "special" branch, we:
# * always publish to charmhub at latest/edge/branchname
# * always run tests
# where a "special" branch is one of main/master or track/**, as
# by convention these branches are the source for a corresponding
# charmhub edge channel.

on:
push:
branches:
- main
- track/**

jobs:
tests:
name: Run Tests
uses: ./.github/workflows/tests.yaml

# publish runs in series with tests, and only publishes if tests passes
publish-charm:
name: Publish Charm
needs: tests
uses: ./.github/workflows/publish.yaml
secrets:
CHARMCRAFT_CREDENTIALS: ${{ secrets.CHARMCRAFT_CREDENTIALS }}
15 changes: 15 additions & 0 deletions .github/workflows/on_schedule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
schedule:
- cron: '0 8 * * MON'

jobs:
update-charm-libs:
name: Update Charm Libraries
uses: ./.github/workflows/update_libs.yaml
secrets:
CHARMCRAFT_CREDENTIALS: ${{ secrets.CHARMCRAFT_CREDENTIALS }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

tests:
name: Run Tests
uses: ./.github/workflows/tests.yaml
61 changes: 61 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# reusable workflow for publishing all charms in this repo
name: Publish

on:
workflow_call:
inputs:
source_branch:
description: Github branch from this repo to publish. If blank, will use the default branch
default: ''
required: false
type: string
secrets:
CHARMCRAFT_CREDENTIALS:
required: true

workflow_dispatch:
inputs:
destination_channel:
description: CharmHub channel to publish to
required: false
default: 'latest/edge'
type: string
source_branch:
description: Github branch from this repo to publish. If blank, will use the default branch
required: false
default: ''
type: string

jobs:
publish-charm:
name: Publish Charm
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
ref: ${{ inputs.source_branch }}

- name: Select charmhub channel
uses: canonical/charming-actions/channel@631c2d944da2bd12430f1f3a954c8fffcf2385cd # 2.4.0
id: select-channel
if: ${{ inputs.destination_channel == '' }}

# Combine inputs from different sources to a single canonical value so later steps don't
# need logic for picking the right one
- name: Parse and combine inputs
id: parse-inputs
run: |
# destination_channel
destination_channel="${{ inputs.destination_channel || steps.select-channel.outputs.name }}"
echo "setting output of destination_channel=$destination_channel"
echo "::set-output name=destination_channel::$destination_channel"

- name: Upload charm to charmhub
uses: canonical/charming-actions/upload-charm@631c2d944da2bd12430f1f3a954c8fffcf2385cd # 2.4.0
with:
credentials: ${{ secrets.CHARMCRAFT_CREDENTIALS }}
github-token: ${{ secrets.GITHUB_TOKEN }}
channel: ${{ steps.parse-inputs.outputs.destination_channel }}
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# reusable workflow triggered manually
name: Release charm to other tracks and channels

on:
workflow_dispatch:
inputs:
destination-channel:
description: 'Destination Channel'
required: true
origin-channel:
description: 'Origin Channel'
required: true

jobs:
promote-charm:
name: Promote charm
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Release charm to channel
uses: canonical/charming-actions/release-charm@631c2d944da2bd12430f1f3a954c8fffcf2385cd # 2.4.0
with:
credentials: ${{ secrets.CHARMCRAFT_CREDENTIALS }}
github-token: ${{ secrets.GITHUB_TOKEN }}
destination-channel: ${{ github.event.inputs.destination-channel }}
origin-channel: ${{ github.event.inputs.origin-channel }}
base-channel: '22.04'
24 changes: 24 additions & 0 deletions .github/workflows/release_libs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Release charm's libraries if they have changed
name: Release Libraries

on:
push:
branches:
- main
paths:
- "lib/charms/hydra/**"

jobs:
release-libs:
name: Release any bumped library
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Release any bumped charm library
uses: canonical/charming-actions/release-libraries@main
with:
credentials: "${{ secrets.CHARMCRAFT_CREDENTIALS }}"
github-token: "${{ github.token }}"
66 changes: 66 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Tests
on:
workflow_dispatch:
workflow_call:

jobs:
unit-test:
name: Unit tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Install dependencies
run: python -m pip install tox

- name: Run tests
run: tox -e unit

integration-test-microk8s:
name: Integration tests (microk8s)
runs-on: ubuntu-22.04
needs:
- unit-test
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: 1.28-strict/stable
juju-channel: 3.1
bootstrap-options: '--agent-version=3.1.0'

- name: Run integration tests
# set a predictable model name so it can be consumed by charm-logdump-action
run: tox -e integration -- --model testing

- name: Get contexts
run: kubectl config view
if: failure()

- name: Get juju status
run: juju status --relations
if: failure()

- name: Get juju logs
run: juju debug-log --replay --include unit-hydra-0
if: failure()

- name: Get hydra container logs
run: kubectl logs hydra-0 -c hydra -n testing
if: failure()

# Hack to overcome lack of tools (cat, tar) in the workload container
- name: Get hydra config file
run: |
juju ssh hydra/0 "PYTHONPATH=agents/unit-hydra-0/charm/venv/ python3 -c '
from ops import pebble
p = pebble.Client(\"/charm/containers/hydra/pebble.socket\")
f = p.pull(\"/etc/config/hydra.yaml\")
print(f.read())
'"
if: failure()