Skip to content

Commit

Permalink
[DPE-6285] Update poetry to v2 (#527)
Browse files Browse the repository at this point in the history
Currently, our CI is broken very early in its stage, even lint test is
not passing anymore. The root cause is a shift from poetry 1.8 to v2.
Examples:
* CI run 2 days ago:
https://github.com/canonical/opensearch-operator/actions/runs/12624779078
* CI run 3 days ago, lint still passes but everything else fails:
https://github.com/canonical/opensearch-operator/actions/runs/12615333344

3 days ago we were still installing poetry 1.8.5.

This PR updates our CI logic to use poetry v2.
  • Loading branch information
phvalguima authored Jan 8, 2025
1 parent 51bd955 commit f7b6bb1
Show file tree
Hide file tree
Showing 6 changed files with 490 additions and 386 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v23.1.1
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v24.0.6

unit-test:
name: Unit test charm
Expand Down Expand Up @@ -60,6 +60,10 @@ jobs:
with:
fetch-depth: 0

- name: Install terraform snap
run: |
sudo snap install terraform --channel=latest/stable --classic
- name: lint charm module
run: |
pushd ./terraform
Expand Down Expand Up @@ -154,7 +158,7 @@ jobs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v23.1.1
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v24.0.6
with:
juju-agent-version: ${{ matrix.juju.agent }}
juju-snap-channel: ${{ matrix.juju.snap_channel }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
sync-docs:
name: Sync docs from Discourse
uses: canonical/data-platform-workflows/.github/workflows/sync_docs.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/sync_docs.yaml@v24.0.6
with:
reviewers: a-velasco
permissions:
Expand Down
1 change: 1 addition & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ parts:
# Convert subset of poetry.lock to requirements.txt
curl -sSL https://install.python-poetry.org | python3 -
/root/.local/bin/poetry self add poetry-plugin-export
/root/.local/bin/poetry export --only main,charm-libs --output requirements.txt
craftctl default
Expand Down
Loading

0 comments on commit f7b6bb1

Please sign in to comment.