-
Notifications
You must be signed in to change notification settings - Fork 16
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
DPE-2758 better messaging when no bucket + ceph testing #332
Merged
paulomach
merged 18 commits into
main
from
fix/dpe-2758-better-messaging-when-no-bucket
Jan 18, 2024
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
299ef0e
improved action output and ceph integration test
paulomach ebc5df8
WIP: ceph test with SSL support
paulomach d67357f
setup microceph without ssl for now
paulomach 5543422
rollback ssl support
paulomach f70e477
touch microceph variables file to allow tox run
paulomach 93f879b
removed unused import
paulomach 7ef8146
put microceph setup before any tox call
paulomach 61590e1
Include before tests
paulomach 5aa6687
fix libs versioning and removed unnecessary change
paulomach 6c14a5f
sync patches
paulomach daac900
lint fixes from synced lib
paulomach f2bd7ef
Merge branch 'main' of github.com:canonical/mysql-k8s-operator into f…
paulomach 1a39543
Merge branch 'main' of github.com:canonical/mysql-k8s-operator into f…
paulomach d0595ca
deprecated microceph action
paulomach 0cb57a1
picking fix for github_secrets plugin name
paulomach f27c8f9
bumped dpw on workflows
paulomach 30c441c
Use reusable integration test workflow
carlcsaposs-canonical 472f15a
!fixup Use reusable integration test workflow
carlcsaposs-canonical File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,9 @@ on: | |
jobs: | ||
lint: | ||
name: Lint | ||
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v9.0.2 | ||
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v9.3.1 | ||
|
||
unit-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
juju-version: ["2.9", "3.1"] | ||
name: Unit test charm | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
@@ -35,124 +31,40 @@ jobs: | |
pipx install poetry | ||
- name: Run tests | ||
run: tox run -e unit | ||
env: | ||
# This env var is only to indicate Juju version to "simulate" in the unit tests | ||
# No libjuju is being actually used in unit testing | ||
LIBJUJU_VERSION_SPECIFIER: ${{ matrix.juju-version }} | ||
- name: Upload Coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
|
||
build: | ||
name: Build charm | ||
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v9.0.2 | ||
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v9.3.1 | ||
with: | ||
charmcraft-snap-channel: beta | ||
|
||
gh-hosted-collect-integration-tests: | ||
name: (GH hosted) Collect integration test groups | ||
needs: | ||
- lint | ||
- unit-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install tox & poetry | ||
run: | | ||
pipx install tox | ||
pipx install poetry | ||
- name: Select test stability level | ||
id: select-test-stability | ||
run: | | ||
if [[ "${{ github.event_name }}" == "schedule" ]] | ||
then | ||
echo Running unstable and stable tests | ||
echo "mark_expression=" >> "$GITHUB_OUTPUT" | ||
else | ||
echo Skipping unstable tests | ||
echo "mark_expression=not unstable" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Collect test groups | ||
id: collect-groups | ||
run: tox run -e integration -- tests/integration -m '${{ steps.select-test-stability.outputs.mark_expression }}' --collect-groups | ||
outputs: | ||
groups: ${{ steps.collect-groups.outputs.groups }} | ||
|
||
gh-hosted-integration-test: | ||
integration-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
groups: ${{ fromJSON(needs.gh-hosted-collect-integration-tests.outputs.groups) }} | ||
juju-snap-channel: ["2.9/stable", "3.1/stable"] | ||
include: | ||
- juju-snap-channel: "3.1/stable" | ||
agent-version: "3.1.6" | ||
libjuju-version: "3.2.2" | ||
- juju-snap-channel: "2.9/stable" | ||
agent-version: "2.9.45" | ||
libjuju-version: "2.9.44.1" | ||
exclude: | ||
# Disabling HA tests, as long as we want to have a limited pipeline on Juju3 | ||
- juju-snap-channel: "3.1/stable" | ||
groups: | ||
job_name: "high_availability/test_replication.py | group 1" | ||
- juju-snap-channel: "3.1/stable" | ||
groups: | ||
job_name: "high_availability/test_self_healing.py | group 1" | ||
- juju-snap-channel: "3.1/stable" | ||
groups: | ||
job_name: "high_availability/test_upgrade.py | group 1" | ||
- juju-snap-channel: "3.1/stable" | ||
groups: | ||
job_name: "high_availability/test_upgrade_from_stable.py | group 1" | ||
name: ${{ matrix.juju-snap-channel }} - (GH hosted) ${{ matrix.groups.job_name }} | ||
juju: | ||
- agent: 2.9.45 | ||
libjuju: ^2 | ||
- agent: 3.1.6 | ||
name: Integration test charm | ${{ matrix.juju.agent }} | ||
needs: | ||
- lint | ||
- unit-test | ||
- build | ||
- gh-hosted-collect-integration-tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install tox & poetry | ||
run: | | ||
pipx install tox | ||
pipx install poetry | ||
- name: Setup operator environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: microk8s | ||
channel: "1.28-strict/stable" | ||
bootstrap-options: "--agent-version ${{ matrix.agent-version }}" | ||
juju-channel: ${{ matrix.juju-snap-channel }} | ||
- name: Update python-libjuju version | ||
if: ${{ matrix.libjuju-version == '2.9.44.1' }} | ||
run: poetry add --lock --group integration juju@'${{ matrix.libjuju-version }}' | ||
- name: Download packed charm(s) | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ needs.build.outputs.artifact-name }} | ||
- name: Select test stability level | ||
id: select-test-stability | ||
run: | | ||
if [[ "${{ github.event_name }}" == "schedule" ]] | ||
then | ||
echo Running unstable and stable tests | ||
echo "mark_expression=" >> "$GITHUB_OUTPUT" | ||
else | ||
echo Skipping unstable tests | ||
echo "mark_expression=not unstable" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run integration tests | ||
run: tox run -e integration -- "${{ matrix.groups.path_to_test_file }}" --group="${{ matrix.groups.group_number }}" -m '${{ steps.select-test-stability.outputs.mark_expression }}' | ||
env: | ||
LIBJUJU_VERSION_SPECIFIER: ${{ matrix.libjuju-version }} | ||
SECRETS_FROM_GITHUB: | | ||
{ | ||
"AWS_ACCESS_KEY": "${{ secrets.AWS_ACCESS_KEY }}", | ||
"AWS_SECRET_KEY": "${{ secrets.AWS_SECRET_KEY }}", | ||
"GCP_ACCESS_KEY": "${{ secrets.GCP_ACCESS_KEY }}", | ||
"GCP_SECRET_KEY": "${{ secrets.GCP_SECRET_KEY }}", | ||
} | ||
uses: canonical/data-platform-workflows/.github/workflows/[email protected] | ||
with: | ||
artifact-name: ${{ needs.build.outputs.artifact-name }} | ||
cloud: microk8s | ||
microk8s-snap-channel: 1.28-strict/stable | ||
juju-agent-version: ${{ matrix.juju.agent }} | ||
libjuju-version-constraint: ${{ matrix.juju.libjuju }} | ||
secrets: | ||
integration-test: | | ||
{ | ||
"AWS_ACCESS_KEY": "${{ secrets.AWS_ACCESS_KEY }}", | ||
"AWS_SECRET_KEY": "${{ secrets.AWS_SECRET_KEY }}", | ||
"GCP_ACCESS_KEY": "${{ secrets.GCP_ACCESS_KEY }}", | ||
"GCP_SECRET_KEY": "${{ secrets.GCP_SECRET_KEY }}", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using a more specific exception type instead