-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: allow upgrade tests #4288
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,12 @@ inputs: | |
| compose_profiles: | ||
| required: false | ||
| description: "Docker Compose profile to use. Defaults to feature-complete." | ||
| no_restore_volume_cache: | ||
| required: false | ||
| description: "Whether to restore Docker volumes cache after the test run. Defaults to false." | ||
| skip_backup_restore_test: | ||
| required: false | ||
| description: "Whether to skip backup and restore test. Defaults to false." | ||
| CODECOV_TOKEN: | ||
| required: false | ||
| description: "The Codecov token to upload coverage." | ||
|
|
@@ -25,8 +31,20 @@ runs: | |
| COMPOSE_PROFILES: ${{ inputs.compose_profiles }} | ||
| run: | | ||
| if [[ -n "$PROJECT_NAME" && -n "$IMAGE_URL" ]]; then | ||
| image_var=$(echo "${PROJECT_NAME}_IMAGE" | tr '[:lower:]' '[:upper:]') | ||
| echo "${image_var}=$IMAGE_URL" >> ${{ github.action_path }}/.env | ||
| readarray -t project_names <<<"$PROJECT_NAME" | ||
| readarray -t image_urls <<<"$IMAGE_URL" | ||
| if [ "${#project_names[@]}" -ne "${#image_urls[@]}" ]; then | ||
| echo "The number of project names and image URLs must match." | ||
| echo "project_name: $PROJECT_NAME, image_url: $IMAGE_URL" | ||
| exit 1 | ||
| fi | ||
|
|
||
| for i in "${!project_names[@]}"; do | ||
| project="${project_names[$i]}" | ||
| image="${image_urls[$i]}" | ||
| image_var=$(echo "${project}_IMAGE" | tr '[:lower:]' '[:upper:]') | ||
| echo "${image_var}=${image}" >> ${{ github.action_path }}/.env | ||
| done | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing newline causes empty element in readarrayMedium Severity When callers pass multiline inputs using YAML Reviewed by Cursor Bugbot for commit 404e19e. Configure here. |
||
| elif [[ -z "$PROJECT_NAME" && -z "$IMAGE_URL" ]]; then | ||
| echo "No project name and image URL set. Skipping image configuration." | ||
| else | ||
|
|
@@ -101,6 +119,7 @@ runs: | |
| echo "ARCH=$(uname -m)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Restore Sentry Volume Cache | ||
| if: ${{ inputs.no_restore_volume_cache != 'true' }} | ||
| id: restore_cache_sentry | ||
| uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 | ||
| with: | ||
|
|
@@ -111,6 +130,7 @@ runs: | |
| sentry-postgres | ||
|
|
||
| - name: Restore Snuba Volume Cache | ||
| if: ${{ inputs.no_restore_volume_cache != 'true' }} | ||
| id: restore_cache_snuba | ||
| uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 | ||
| with: | ||
|
|
@@ -121,6 +141,7 @@ runs: | |
| sentry-clickhouse | ||
|
|
||
| - name: Restore Kafka Volume Cache | ||
| if: ${{ inputs.no_restore_volume_cache != 'true' }} | ||
| id: restore_cache_kafka | ||
| uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 | ||
| with: | ||
|
|
@@ -155,23 +176,23 @@ runs: | |
| ./install.sh --no-report-self-hosted-issues --skip-commit-check | ||
|
|
||
| - name: Save Sentry Volume Cache | ||
| if: steps.restore_cache_sentry.outputs.cache-hit != 'true' | ||
| if: steps.restore_cache_sentry.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true' | ||
| uses: BYK/docker-volume-cache-action/save@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 | ||
| with: | ||
| key: ${{ steps.restore_cache_sentry.outputs.cache-primary-key }} | ||
| volumes: | | ||
| sentry-postgres | ||
|
|
||
| - name: Save Snuba Volume Cache | ||
| if: steps.restore_cache_snuba.outputs.cache-hit != 'true' | ||
| if: steps.restore_cache_snuba.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true' | ||
| uses: BYK/docker-volume-cache-action/save@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 | ||
| with: | ||
| key: ${{ steps.restore_cache_snuba.outputs.cache-primary-key }} | ||
| volumes: | | ||
| sentry-clickhouse | ||
|
|
||
| - name: Save Kafka Volume Cache | ||
| if: steps.restore_cache_kafka.outputs.cache-hit != 'true' | ||
| if: steps.restore_cache_kafka.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true' | ||
| uses: BYK/docker-volume-cache-action/save@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 | ||
| with: | ||
| key: ${{ steps.restore_cache_kafka.outputs.cache-primary-key }} | ||
|
|
@@ -204,6 +225,7 @@ runs: | |
| shell: bash | ||
| env: | ||
| COMPOSE_PROFILES: ${{ inputs.compose_profiles }} | ||
| SKIP_BACKUP_RESTORE_TEST: ${{ inputs.skip_backup_restore_test }} | ||
| run: | | ||
| sudo chown root /usr/bin/rsync && sudo chmod u+s /usr/bin/rsync | ||
| rsync -aW --super --numeric-ids --no-compress --mkpath \ | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.