Compare commits

...

9 Commits

Author SHA1 Message Date
Diego Pucci
c9ac7ce892 chore(Workflow): Add controlPanel 2025-04-18 14:37:35 +03:00
Diego Pucci
5f1c0fe749 Sample Change - revert 2025-04-18 13:51:05 +03:00
Diego Pucci
c26a4d3f63 Sample Change - retrigger error 2025-04-18 13:46:24 +03:00
Diego Pucci
b14a387617 chore(Workflow) Improve chart metadata compatibility msg 2025-04-18 13:45:57 +03:00
Diego Pucci
b3a6940fd6 Sample Change - reverted 2025-04-18 13:38:52 +03:00
Diego Pucci
28af4be559 fix(Workflow) Re-trigger on label 2025-04-18 13:07:31 +03:00
Diego Pucci
ca4f956d3a fix(Workflow): Keep changed files local 2025-04-18 12:48:43 +03:00
Diego Pucci
dafb135d87 Trigger Sample Change - to be reverted 2025-04-18 12:39:55 +03:00
Diego Pucci
57da943ad4 feat(CI): Enforce charts metadata backward compatibility check 2025-04-18 12:37:20 +03:00

View File

@@ -0,0 +1,64 @@
name: "Chart Metadata Backward Compatibility Check"
on:
push:
branches:
- "master"
- "[0-9].[0-9]*"
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
backward-compatibility-check:
runs-on: ubuntu-24.04
steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive
- name: "Set up Git"
run: |
git fetch origin master
- name: "Check for changes in critical files"
id: check_changes
run: |
CHANGED_FILES=$(git diff --name-only origin/master...HEAD)
echo "Changed files: $CHANGED_FILES"
if echo "$CHANGED_FILES" | grep -qE '^superset-frontend/plugins/.*/(transformProps|controlPanel)'; then
echo "BACKWARD_COMPATIBILITY_CHECK_FAILED=true" >> $GITHUB_ENV
else
echo "BACKWARD_COMPATIBILITY_CHECK_FAILED=false" >> $GITHUB_ENV
fi
- name: "Check for 'validation:backward-compatible' label"
if: env.BACKWARD_COMPATIBILITY_CHECK_FAILED == 'true'
uses: actions/github-script@v7
with:
script: |
const payload = context.payload.pull_request;
const validationLabelPresent = !!payload.labels.find(label => label.name.includes('validation:backward-compatible'));
if (!validationLabelPresent) {
core.setFailed(
[
"🚨 Identified potential changes to the chart metadata in `transformProps` or `controlPanel`.",
"⚠️ Such changes may affect backward compatibility and cause charts dependent on previous metadata to break.",
"✅ To proceed, please review your changes to confirm backward-compatibility and add the label:",
"`validation:backward-compatible`",
].join("\n")
);
}
- name: "Continue with other checks"
if: env.BACKWARD_COMPATIBILITY_CHECK_FAILED == 'false'
run: |
echo "✅ No chart metadata backward compatibility issues detected. Proceeding with further checks."