Skip to content

Commit

Permalink
[DPE-4136] Fix TLS tests + Migrate to self-signed-certificates + clea…
Browse files Browse the repository at this point in the history
…nup (#395)

## Issue
- The `tls-certificate-operator` and tls v1 interface is deprecated
- we're using many old versions of python dependencies and charm libs 
- multiple parts of the TLS integ. tests are not asserted / awaited /
correct, effectively not validating the behavior of TLS

## Solution
- removes dependencies to the deprecated `tls-certificate-operator` + v1
interface
- introduces the `self-signed-certificates operator`  + v3 interface
- upgrades charm libs 
- upgrade python dependencies 
- upgrade dp action libs to the latest
- fix  tests:
    - CSR retrievals from secrets
    - CA cert retrieval from units
    - missing `assert`s and `await`s on coroutines

---------

Co-authored-by: Mia Altieri <32723809+MiaAltieri@users.noreply.github.com>
Co-authored-by: MiaAltieri <mgaltier200@gmail.com>
  • Loading branch information
3 people authored Apr 23, 2024
1 parent 1328848 commit 89c933f
Show file tree
Hide file tree
Showing 20 changed files with 2,261 additions and 961 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: Tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

on:
Expand All @@ -16,7 +16,7 @@ on:
jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v12.7.2
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v13.1.1

unit-test:
name: Unit tests
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v3
- name: Install tox
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version
run: python3 -m pip install tox
run: python3 -m pip install --upgrade pip; python3 -m pip install tox
- name: Run tests
run: tox run -e unit

Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- tests/integration/relation_tests/new_relations/application-charm
- tests/integration/dummy_legacy_app
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v12.7.2
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.1.1
with:
path-to-charm-directory: ${{ matrix.path }}
cache: true
Expand All @@ -96,11 +96,11 @@ jobs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v12.7.2
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v13.1.1
with:
artifact-prefix: packed-charm-cache-true
cloud: lxd
juju-agent-version: 3.1.6
juju-agent-version: 3.1.7
permissions:
contents: write # Needed for Allure Report beta
secrets:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v12.7.2
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.1.1

release-charm:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v12.7.2
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v13.1.1
with:
channel: 6/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
Expand All @@ -32,7 +32,6 @@ jobs:
name: Release libraries
runs-on: ubuntu-latest
needs:
- ci-tests
- release-charm
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_issue_to_jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
sync:
name: Sync GitHub issue to Jira
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v12.7.2
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v13.1.1
with:
jira-base-url: https://warthogs.atlassian.net
jira-project-key: DPE
Expand Down
Loading

0 comments on commit 89c933f

Please sign in to comment.