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

feat: Single Kernel Charm architecture and first handlers #3

Open
wants to merge 217 commits into
base: 6/edge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
3f17d90
chore: setup initial repository
Gu1nness Nov 5, 2024
b0fc9a2
chore: Add basic CI
Gu1nness Nov 5, 2024
7e4cc72
chore: bump ruff
Gu1nness Nov 5, 2024
04a6328
chore: Add poetry pre-commits
Gu1nness Nov 5, 2024
6b2daa3
wip: add pre-commit run
Gu1nness Nov 5, 2024
4eeeb74
wip: state
Gu1nness Nov 5, 2024
d2ff9fc
wip: state & utils & config
Gu1nness Nov 6, 2024
f482e33
wip: Substrate workloads + mongo + first tests
Gu1nness Nov 6, 2024
88cb329
fix: Useless pre-commit
Gu1nness Nov 6, 2024
3607d2b
wip: more tests + metadata
Gu1nness Nov 6, 2024
47eafc0
wip: be more accurate + implement more services
Gu1nness Nov 7, 2024
d91aaa7
chore: improve typing
Gu1nness Nov 7, 2024
66d40dc
fix: run pre-commit
Gu1nness Nov 8, 2024
2beacdb
fix: add libs
Gu1nness Nov 8, 2024
95bce97
wip: update workloads + config manager
Gu1nness Nov 8, 2024
ae9e9c5
test: add testing
Gu1nness Nov 8, 2024
2f7ec56
wip: states, scopes, rework workload
Gu1nness Nov 12, 2024
d5fd089
wip: add unit handling (1s round)
Gu1nness Nov 12, 2024
3d9f309
wip: Better view of states, and start adding configurations.
Gu1nness Nov 13, 2024
5fdd3a4
feat: add k8s manager
Gu1nness Nov 13, 2024
0ba7ead
wip: state, core, k8s manager
Gu1nness Nov 13, 2024
4e42969
feat: start integrating S3 as a test
Gu1nness Nov 13, 2024
691ba75
feat: Unified exceptions for workload exec
Gu1nness Nov 13, 2024
3a25fbf
wip: work on backup manager.
Gu1nness Nov 14, 2024
cc5263c
feat: backup manager and events.
Gu1nness Nov 15, 2024
5393e3a
wip: mongo manager + tls manager (started)
Gu1nness Nov 15, 2024
97419f4
wip: TLS manager
Gu1nness Nov 19, 2024
919a93c
feat: Password actions + drop pydantic models for now
Gu1nness Nov 19, 2024
5d20fe9
wip: mongodb operator
Gu1nness Nov 19, 2024
b71b9f3
wip: work on mongodb operator.
Gu1nness Nov 20, 2024
a827938
wip: better interface
Gu1nness Nov 20, 2024
788bf46
wip: go on interfaces + events + mongodb manager
Gu1nness Nov 20, 2024
3f1c03f
feat: charm skeleton + mongodb operator
Gu1nness Nov 21, 2024
2a1749d
fix: rework config
Gu1nness Nov 21, 2024
2b5dd48
fix: allow extra in config
Gu1nness Nov 21, 2024
a665b18
fix: managers are objects.
Gu1nness Nov 21, 2024
810ceb9
fix: commands & backup events
Gu1nness Nov 21, 2024
146ffe8
fix: common path + str to f-string
Gu1nness Nov 21, 2024
be3eb9d
fix: requirer-data
Gu1nness Nov 21, 2024
1164f6f
fix: more bug-fix with real deployment
Gu1nness Nov 21, 2024
5e5ccf7
fix: role accessor
Gu1nness Nov 21, 2024
fa919f5
fix: use relation values.
Gu1nness Nov 22, 2024
b87ac36
fix: multiple fixes + external connectivity for config
Gu1nness Nov 22, 2024
d084af0
fix: more fixes for first charm
Gu1nness Nov 22, 2024
c74d0d7
test: New snap
Gu1nness Nov 22, 2024
97fd01e
fix: typo
Gu1nness Nov 22, 2024
0315198
fix: fixes on params + url
Gu1nness Nov 22, 2024
411a5c5
fix: the other way around for checks.
Gu1nness Nov 22, 2024
06d196e
fix: update backup manager
Gu1nness Nov 22, 2024
d0ab00a
fix: string format
Gu1nness Nov 22, 2024
2ada534
fix: add env
Gu1nness Nov 22, 2024
357d6e3
chore(backup status): protect from wrong interpretation
Gu1nness Nov 22, 2024
df44977
test: Start adding unit tests
Gu1nness Nov 22, 2024
7317206
test: wip
Gu1nness Nov 25, 2024
13aa893
fix: bind address
Gu1nness Nov 25, 2024
ce6a033
test: refacto user passwords + more tests
Gu1nness Nov 25, 2024
5db0e78
wip: more tests
Gu1nness Nov 25, 2024
6bb366e
feat: better backup manager + more tests
Gu1nness Nov 25, 2024
0ef8f75
test: more backup and basic tests
Gu1nness Nov 25, 2024
b869026
feat: TLS events + update operator interface
Gu1nness Nov 26, 2024
5969849
test: set-password
Gu1nness Nov 26, 2024
523c272
test: mongo-manager, password actions negative, tls, connect backup
Gu1nness Nov 26, 2024
c9164b0
test: More lifecycle tests
Gu1nness Nov 27, 2024
1d38a3a
test: More lifecycle tests + get-primary action
Gu1nness Nov 27, 2024
1d404f3
feat: more genericity + smart oversee_relation
Gu1nness Nov 27, 2024
e94e6e0
fix: status checks
Gu1nness Nov 28, 2024
e09248d
fix: codespell
Gu1nness Nov 28, 2024
f70b237
fix: lock
Gu1nness Nov 28, 2024
31c26c5
chore: change name
Gu1nness Nov 28, 2024
93de987
fix: enfore 3.10.12 because ubuntu-latest is 3.10.12
Gu1nness Nov 28, 2024
7f630f0
fix: lock file
Gu1nness Nov 28, 2024
714b4f0
fix: pre-commit
Gu1nness Nov 28, 2024
47f5a0d
chore: All exceptions in the same file
Gu1nness Nov 28, 2024
f1d7cb7
doc: Add some documentation to important classes
Gu1nness Nov 28, 2024
0c0eff7
feat: Remove one layer of abstraction
Gu1nness Nov 28, 2024
301a3de
fix: Handle socket path in case of mongodb k8s
Gu1nness Nov 29, 2024
7573a79
feat: Docs and move to enum-based substrate.
Gu1nness Nov 29, 2024
7122f52
test: fix test charm
Gu1nness Nov 29, 2024
063659a
fix: per peer relation secrets + status
Gu1nness Nov 29, 2024
7701451
feat: Integrate Database Event Handlers for client relations.
Gu1nness Nov 29, 2024
cf94d30
fix: Mongo manager + app peer state
Gu1nness Nov 29, 2024
a0f96f0
feat: lazy updates in the databag
Gu1nness Nov 29, 2024
a781a18
fix: lazy endpoints
Gu1nness Nov 29, 2024
ec951ed
wip: improve interfaces
Gu1nness Nov 29, 2024
0dabab1
fix: test
Gu1nness Nov 29, 2024
5da8f82
fix: lazy write + always write in order
Gu1nness Nov 29, 2024
e23267d
fix: Reuse workflows
Gu1nness Dec 4, 2024
cfeab2b
doc: Don't recommend mattermost channel
Gu1nness Dec 4, 2024
10e3181
chore: Update gitignore with Intellij patterns
Gu1nness Dec 4, 2024
117cea2
doc: Update documentation for leader_elected event
Gu1nness Dec 4, 2024
3f9653e
fix: Rework config and role
Gu1nness Dec 4, 2024
4df23a0
fix: take review into account
Gu1nness Dec 4, 2024
366ef5e
refactor: One method to check for workload
Gu1nness Dec 4, 2024
f3163c0
doc: missing docstring
Gu1nness Dec 4, 2024
54b6bd5
refactor: use a set instead of a tuple
Gu1nness Dec 4, 2024
602ef4c
refactor: split relation in peer relations and other relations
Gu1nness Dec 4, 2024
a8f72c3
fix: Post review (new round)
Gu1nness Dec 11, 2024
1148c1c
fix: typo
Gu1nness Dec 11, 2024
20c1620
fix: Always set env before starting (and cleanup)
Gu1nness Dec 11, 2024
06e72f8
feat: try/catch patter for backups
Gu1nness Dec 13, 2024
c564e68
fix: integrate review comments
Gu1nness Dec 16, 2024
d671d1b
fix: test after renaming connect
Gu1nness Dec 16, 2024
8e5149c
fix: integrate review comments
Gu1nness Dec 18, 2024
2487de9
fix: another round of reviews
Gu1nness Dec 19, 2024
ce490b2
fix: Remove WorkloadProtocol + lint
Gu1nness Jan 13, 2025
47e8fe8
feat: Config-Server/Shard relation (#4)
Gu1nness Jan 14, 2025
9f4085b
doc: Add a charm structure svg
Gu1nness Jan 15, 2025
1199e4f
feat: Mongos Operator (#5)
Gu1nness Jan 17, 2025
c6329c0
feat: Cluster events and managers (#6)
Gu1nness Jan 17, 2025
a1ed484
fix: bump snap version
Gu1nness Jan 17, 2025
f492b98
fix: update branch
Gu1nness Jan 17, 2025
6f50467
feat(statuses): basic integration (#7)
Gu1nness Jan 20, 2025
f06de0d
feat(DPE-6396): mongo error codes (#10)
Gu1nness Jan 20, 2025
2783017
feat: sysctl config (#11)
Gu1nness Jan 20, 2025
542026b
feat: Observability manager (#9)
Gu1nness Jan 20, 2025
fb25b72
fix: update requirements
Gu1nness Jan 21, 2025
76e9cb1
feat: poetry 2
Gu1nness Jan 21, 2025
6a4bfef
feat(upgrades): Implementation of upgrades (#8)
Gu1nness Jan 21, 2025
2e61d6f
fix: also handler pymongo errors
Gu1nness Jan 21, 2025
e20d626
fix: defer departed if needed
Gu1nness Jan 21, 2025
3515bcd
fix: go to waiting if initialise replset failed
Gu1nness Jan 21, 2025
4100d40
fix: attribute error
Gu1nness Jan 22, 2025
66e718b
fix: small fixes
Gu1nness Jan 22, 2025
a7eccc8
fix: small tls inconsistencies
Gu1nness Jan 22, 2025
7f5dbbe
fix: config changed event raising errors
Gu1nness Jan 22, 2025
0138412
fix: is_any_removing helper function
Gu1nness Jan 22, 2025
8eee841
fix: need workload exec error catching
Gu1nness Jan 22, 2025
24b9b2c
fix: block on invalid integration
Gu1nness Jan 22, 2025
5603826
fix: forgot to set uri and endpoints on add user
Gu1nness Jan 23, 2025
e8f09a5
fix: Set uris and endpoints on client relation.
Gu1nness Jan 23, 2025
d9953a2
fix: config as property (always)
Gu1nness Jan 23, 2025
0fc9bce
fix: shard should not update config data
Gu1nness Jan 23, 2025
f22f057
Update single_kernel_mongo/config/literals.py
Gu1nness Jan 23, 2025
1abdc5f
Update single_kernel_mongo/core/vm_workload.py
Gu1nness Jan 23, 2025
a47540e
Update single_kernel_mongo/events/backups.py
Gu1nness Jan 23, 2025
c9538cc
Update single_kernel_mongo/managers/mongodb_operator.py
Gu1nness Jan 23, 2025
27ec9a3
Update single_kernel_mongo/managers/mongodb_operator.py
Gu1nness Jan 23, 2025
1442f5d
fix: post review
Gu1nness Jan 23, 2025
d39c96d
fix: do not overwrite file on VMs
Gu1nness Jan 23, 2025
e5a1010
fix: typos
Gu1nness Jan 23, 2025
50549ab
fix: to waiting if missing secrets
Gu1nness Jan 23, 2025
be15fb1
fix: cleanup of connection info for VM
Gu1nness Jan 23, 2025
c2969e9
fix: stop mongos on relation broken
Gu1nness Jan 23, 2025
f2025f7
fix: final review
Gu1nness Jan 24, 2025
f2995fc
fix: status string
Gu1nness Jan 24, 2025
5bb6e53
fix: observability
Gu1nness Jan 24, 2025
ccda7fa
fix: don't initialise twice
Gu1nness Jan 24, 2025
e6af789
fix: tiny bug
Gu1nness Jan 24, 2025
f549a2e
fix: get_environment
Gu1nness Jan 24, 2025
6084aba
fix: internal ip for monitor
Gu1nness Jan 24, 2025
7f51b6e
fix: update env when restarting
Gu1nness Jan 24, 2025
d74e571
fix: mongos updates automatically
Gu1nness Jan 24, 2025
18a5b76
fix: upgrade_resumed only for mongodb charms
Gu1nness Jan 24, 2025
27514e4
fix: no cached property
Gu1nness Jan 24, 2025
21161e5
fix: actually upgrade mongos charms as well
Gu1nness Jan 24, 2025
ad5e718
fix: tests
Gu1nness Jan 24, 2025
f29b77c
fix: file name
Gu1nness Jan 24, 2025
e49e31e
fix: don't accept empty password
Gu1nness Jan 27, 2025
ea5e122
fix: logrotate ownership
Gu1nness Jan 27, 2025
afef36a
fix: remove process status which can be unsafe
Gu1nness Jan 27, 2025
8b96e96
fix: Shard not drained should defer
Gu1nness Jan 27, 2025
116160d
fix: catch post upgrade check errors
Gu1nness Jan 27, 2025
928dc0a
fix: return host value
Gu1nness Jan 27, 2025
bf3b0ad
fix: correct lookup
Gu1nness Jan 28, 2025
37ab1c4
fix: small fixes
Gu1nness Jan 28, 2025
b865e41
fix: template
Gu1nness Jan 28, 2025
c240826
fix: Don't add relation in peer secret label
Gu1nness Jan 28, 2025
83faac1
fix: Only run on leader
Gu1nness Jan 28, 2025
38ff51a
fix: wrong access
Gu1nness Jan 28, 2025
71e956c
fix: set upgrade status after upgrade
Gu1nness Jan 28, 2025
3a4f525
fix: backward compatible sharding + upgade fixes
Gu1nness Jan 29, 2025
1b1300f
fix: This should fix upgrades
Gu1nness Jan 30, 2025
2a40e80
fix: dependent name not charm name
Gu1nness Jan 30, 2025
7de9e48
fix: don't defer if missing secrets, breaks everything
Gu1nness Jan 30, 2025
d6ecaf8
fix: Retry remove shard on update-status.
Gu1nness Jan 30, 2025
f1a79a4
fix: add shards that failed to add earlier
Gu1nness Jan 30, 2025
6a6335f
fix: Add logs on sharding
Gu1nness Jan 30, 2025
de9fed4
fix: private address
Gu1nness Jan 30, 2025
eefcc99
fix: check file existence before deletion
Gu1nness Jan 30, 2025
d5fa8ce
fix: PBM + rework hosts
Gu1nness Jan 30, 2025
56cd359
fix: don't write unless we're leader
Gu1nness Jan 31, 2025
4d92e0c
fix: don't try to build config if credentials are missing
Gu1nness Jan 31, 2025
4a092b2
fix: Invalid integration status for replication + sharding interfaces
Gu1nness Jan 31, 2025
d64d40e
fix: f-string not str for enum
Gu1nness Jan 31, 2025
0488b20
fix: mongos upgrade runs on all units
Gu1nness Jan 31, 2025
44d70a4
fix: TLS race condition
Gu1nness Jan 31, 2025
93703f1
fix: we're checking if we wait for certificates
Gu1nness Jan 31, 2025
47344b0
fix: test + upgrade don't start mongos if not integrated and ready
Gu1nness Feb 3, 2025
1db7b9b
fix: don't break on peer unit data
Gu1nness Feb 3, 2025
0ebd7a3
fix: start on upgrade
Gu1nness Feb 3, 2025
a5845f1
fix: try to fix cert
Gu1nness Feb 3, 2025
f0a496b
fix: generate the csr renewal request
Gu1nness Feb 3, 2025
a7bd268
fix: return if we should
Gu1nness Feb 3, 2025
d96faa0
fix: unification of status string
Gu1nness Feb 3, 2025
d00b01b
fix: rework upgrades on k8s
Gu1nness Feb 3, 2025
66dc91a
fix: don't crash if db is setting off
Gu1nness Feb 3, 2025
e6709b3
fix: Generate certificate request on TLS enabled
Gu1nness Feb 3, 2025
c9f5c3a
fix: set env before start
Gu1nness Feb 3, 2025
f2c2485
fix: statuses
Gu1nness Feb 3, 2025
fd838f3
fix: don't return on upgrade k8s
Gu1nness Feb 3, 2025
525e5c2
fix: inverted test
Gu1nness Feb 3, 2025
1fcb54a
fix: Don't fail hook and retry
Gu1nness Feb 3, 2025
b0e38bf
feat: missing config on pbm
Gu1nness Feb 4, 2025
17d2120
fix: remove . in string
Gu1nness Feb 4, 2025
f7fcd65
fix: logrotate k8s
Gu1nness Feb 4, 2025
563ed99
fix: early return so we keep the status
Gu1nness Feb 4, 2025
983eceb
fix: string uniformity
Gu1nness Feb 4, 2025
36fd4fd
fix: host port
Gu1nness Feb 4, 2025
4dea832
fix: checking fields consumes the iterator
Gu1nness Feb 4, 2025
e0e0866
fix: set partition and fix determine partition
Gu1nness Feb 4, 2025
6939010
fix: actually update the partition
Gu1nness Feb 4, 2025
d36f506
fix: backup checks
Gu1nness Feb 5, 2025
ab1f403
fix: dependent.name not charm.name
Gu1nness Feb 5, 2025
d507afe
fix: invalid secret access on relation-created
Gu1nness Feb 5, 2025
5f5fcbb
fix: don't set status when starting upgrade
Gu1nness Feb 5, 2025
08840d1
fix: don't break upgrades
Gu1nness Feb 5, 2025
752f7c8
fix: catch server selection error
Gu1nness Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

juju
Gu1nness marked this conversation as resolved.
Show resolved Hide resolved
charm
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: File a bug report
labels: bug

---

<!-- Thank you for submitting a bug report! All fields are required unless marked optional. -->

## Steps to reproduce
<!-- Please enable debug logging by running `juju model-config logging-config="<root>=INFO;unit=DEBUG"` (if possible) -->
1.

## Expected behavior


## Actual behavior
<!-- If applicable, add screenshots -->


## Versions

<!-- Run `lsb_release -sd` -->
Operating system:

<!-- Run `juju version` -->
Juju CLI:

<!-- Model version from `juju status` -->
Juju agent:

<!-- App revision from `juju status` or (advanced) commit hash -->
Charm revision:

<!-- Run `lxd version` -->
LXD:

## Log output
<!-- Please enable debug logging by running `juju model-config logging-config="<root>=INFO;unit=DEBUG"` (if possible) -->
<!-- Then, run `juju debug-log --replay > log.txt` and upload "log.txt" file here -->
Juju debug log:

<!-- (Optional) Copy the logs that are relevant to the bug & paste inside triple backticks below -->


## Additional context
<!-- (Optional) Add any additional information here -->
38 changes: 38 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!-- Provide a general summary of your changes in the Title above -->
<!-- markdownlint-disable MD041 -->

## 🏷 Type of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation Update
- [ ] Tooling and CI changes
- [ ] Dependencies upgrade or change

## 📝 Description
<!--
Describe your changes in detail including:
- the purpose and scope of this PR (what)
- the impacted components (where, often match conventional commit scope)
- explanation/algorithm if require (how)
-->

## 📑 Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- Either the associated JIRA reference or a paragraph. -->

## 🧪 How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## ✅ Checklist
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the [**CONTRIBUTING**](../blob/main/CONTRIBUTING.md) document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
88 changes: 88 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Run tests

on:
pull_request:
push:
branches:
- main
- feat/**
schedule:
- cron: "53 0 * * *" # Daily at 00:53 UTC
workflow_dispatch:
workflow_call:

Gu1nness marked this conversation as resolved.
Show resolved Hide resolved
jobs:
pre-commit:
name: Run pre-commits
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install tox & poetry
run: |
pipx install tox poetry
- name: Set up python environment
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'poetry'
- name: Install pre-commit
run: |
poetry install
poetry run pre-commit install
- name: Run pre-commit hooks
run: |
poetry run pre-commit run --all-files

actionlint:
name: Lint .github/workflows/
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install actionlint
id: install
run: |
curl -O https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json
echo "::add-matcher::actionlint-matcher.json"
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
- name: Run actionlint
run: |
'${{ steps.install.outputs.executable }}' -color

tox-lint:
name: tox run -e lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tox & poetry
run: |
pipx install tox poetry
- name: Run linters
run: tox run -e lint

unit-test:
name: Unit test charm
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install tox & poetry
run: |
pipx install tox poetry
- name: Set up python environment
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'poetry'
- name: Run tests
run: tox run -e unit
Gu1nness marked this conversation as resolved.
Show resolved Hide resolved
49 changes: 49 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test & Publish to PyPI

on:
workflow_dispatch:

jobs:
ci-tests:
uses: ./.github/workflows/ci.yaml
secrets: inherit

build:
Gu1nness marked this conversation as resolved.
Show resolved Hide resolved
name: Build package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install poetry
run: pipx install poetry
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- name: Build package
run: poetry build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
Gu1nness marked this conversation as resolved.
Show resolved Hide resolved

publish:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-latest
environment: production
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
permissions:
id-token: write # Needed for trusted publishing (https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/)
124 changes: 118 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Charm specific
*.charm
*.snap

Gu1nness marked this conversation as resolved.
Show resolved Hide resolved
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -15,6 +19,7 @@ downloads/
eggs/
.eggs/
lib/
!single_kernel_mongo/lib/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -154,9 +159,116 @@ dmypy.json
# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###

*.iml
modules.xml
.idea/misc.xml
*.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
Gu1nness marked this conversation as resolved.
Show resolved Hide resolved

# TODO: Add TF files to ignore
Loading