diff --git a/.github/workflows/regression-test.yaml b/.github/workflows/regression-test.yaml index cd760d770..d04bfe805 100644 --- a/.github/workflows/regression-test.yaml +++ b/.github/workflows/regression-test.yaml @@ -13,23 +13,54 @@ on: default: false jobs: - regression-test: + # Build binaries once (shared by all test jobs) + build-binaries: if: github.actor != 'dependabot[bot]' runs-on: ubuntu-22.04 - timeout-minutes: 25 + timeout-minutes: 5 steps: - # 1. SETUP - name: Checkout code uses: actions/checkout@v5 with: - fetch-depth: 0 # Fetch all history for git describe to work + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version-file: 'go.mod' + + - name: Build binaries + run: | + echo "Building preflight and support-bundle binaries..." + make bin/preflight bin/support-bundle + ./bin/preflight version + ./bin/support-bundle version + + - name: Upload binaries + uses: actions/upload-artifact@v5 + with: + name: binaries-${{ github.run_id }} + path: | + bin/preflight + bin/support-bundle + retention-days: 1 + + # Preflight v1beta3 test (parallel job 1) + test-preflight-v1beta3: + needs: [build-binaries] + if: github.actor != 'dependabot[bot]' + runs-on: ubuntu-22.04 + timeout-minutes: 15 + + steps: + - name: Checkout code + uses: actions/checkout@v5 - name: Create output directory run: mkdir -p test/output - name: Create k3s cluster - id: k3s uses: replicatedhq/action-k3s@main with: version: v1.31.2-k3s1 @@ -37,17 +68,16 @@ jobs: - name: Verify cluster access run: kubectl get nodes -o wide - - name: Setup Go - uses: actions/setup-go@v6 + - name: Download binaries + uses: actions/download-artifact@v5 with: - go-version-file: 'go.mod' + name: binaries-${{ github.run_id }} + path: bin/ - - name: Build binaries + - name: Make binaries executable run: | - echo "Building preflight and support-bundle binaries..." - make bin/preflight bin/support-bundle + chmod +x bin/preflight bin/support-bundle ./bin/preflight version - ./bin/support-bundle version - name: Setup Python for comparison uses: actions/setup-python@v6 @@ -55,78 +85,28 @@ jobs: python-version: '3.11' - name: Install Python dependencies - run: | - pip install pyyaml deepdiff + run: pip install pyyaml deepdiff - # 2. EXECUTE SPECS (in parallel) - - name: Run all specs in parallel + - name: Run preflight v1beta3 continue-on-error: true run: | - echo "Running all 3 specs in parallel..." - - # Run v1beta3 in background - ( - echo "Starting preflight v1beta3..." - ./bin/preflight \ - examples/preflight/complex-v1beta3.yaml \ - --values examples/preflight/values-complex-full.yaml \ - --interactive=false \ - --format=json \ - --output=test/output/preflight-results-v1beta3.json 2>&1 | tee test/output/v1beta3.log || true - - BUNDLE=$(ls -t preflightbundle-*.tar.gz 2>/dev/null | head -1) - if [ -n "$BUNDLE" ]; then - mv "$BUNDLE" test/output/preflight-v1beta3-bundle.tar.gz - echo "✓ v1beta3 bundle saved" - fi - ) & - PID_V1BETA3=$! - - # Run v1beta2 in background - ( - echo "Starting preflight v1beta2..." - ./bin/preflight \ - examples/preflight/all-analyzers-v1beta2.yaml \ - --interactive=false \ - --format=json \ - --output=test/output/preflight-results-v1beta2.json 2>&1 | tee test/output/v1beta2.log || true - - BUNDLE=$(ls -t preflightbundle-*.tar.gz 2>/dev/null | head -1) - if [ -n "$BUNDLE" ]; then - mv "$BUNDLE" test/output/preflight-v1beta2-bundle.tar.gz - echo "✓ v1beta2 bundle saved" - fi - ) & - PID_V1BETA2=$! - - # Run support bundle in background - ( - echo "Starting support bundle..." - ./bin/support-bundle \ - examples/collect/host/all-kubernetes-collectors.yaml \ - --interactive=false \ - --output=test/output/supportbundle.tar.gz 2>&1 | tee test/output/supportbundle.log || true - - if [ -f test/output/supportbundle.tar.gz ]; then - echo "✓ Support bundle saved" - fi - ) & - PID_SUPPORTBUNDLE=$! - - # Wait for all to complete - echo "Waiting for all specs to complete..." - wait $PID_V1BETA3 - wait $PID_V1BETA2 - wait $PID_SUPPORTBUNDLE - - echo "All specs completed!" - - # Verify bundles exist - ls -lh test/output/*.tar.gz || echo "Warning: Some bundles may be missing" - - # 3. COMPARE BUNDLES + echo "Running preflight v1beta3..." + ./bin/preflight \ + examples/preflight/complex-v1beta3.yaml \ + --values examples/preflight/values-complex-full.yaml \ + --interactive=false \ + --format=json \ + --auto-update=false \ + --output=test/output/preflight-results-v1beta3.json 2>&1 | tee test/output/v1beta3.log || true + + BUNDLE=$(ls -t preflightbundle-*.tar.gz 2>/dev/null | head -1) + if [ -n "$BUNDLE" ]; then + mv "$BUNDLE" test/output/preflight-v1beta3-bundle.tar.gz + echo "✓ v1beta3 bundle saved" + fi + - name: Compare preflight v1beta3 bundle - id: compare-v1beta3 + id: compare continue-on-error: true run: | echo "Comparing v1beta3 preflight bundle against baseline..." @@ -143,8 +123,86 @@ jobs: --report test/output/diff-report-v1beta3.json \ --spec-type preflight + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v5 + with: + name: test-results-v1beta3-${{ github.run_id }}-${{ github.run_attempt }} + path: | + test/output/preflight-v1beta3-bundle.tar.gz + test/output/preflight-results-v1beta3.json + test/output/diff-report-v1beta3.json + test/output/v1beta3.log + retention-days: 30 + + - name: Set job outcome + if: always() + run: | + if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then + echo "comparison_failed=true" >> $GITHUB_OUTPUT + exit 1 + fi + + # Preflight v1beta2 test (parallel job 2) + test-preflight-v1beta2: + needs: [build-binaries] + if: github.actor != 'dependabot[bot]' + runs-on: ubuntu-22.04 + timeout-minutes: 15 + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Create output directory + run: mkdir -p test/output + + - name: Create k3s cluster + uses: replicatedhq/action-k3s@main + with: + version: v1.31.2-k3s1 + + - name: Verify cluster access + run: kubectl get nodes -o wide + + - name: Download binaries + uses: actions/download-artifact@v5 + with: + name: binaries-${{ github.run_id }} + path: bin/ + + - name: Make binaries executable + run: | + chmod +x bin/preflight bin/support-bundle + ./bin/preflight version + + - name: Setup Python for comparison + uses: actions/setup-python@v6 + with: + python-version: '3.11' + + - name: Install Python dependencies + run: pip install pyyaml deepdiff + + - name: Run preflight v1beta2 + continue-on-error: true + run: | + echo "Running preflight v1beta2..." + ./bin/preflight \ + examples/preflight/all-analyzers-v1beta2.yaml \ + --interactive=false \ + --format=json \ + --auto-update=false \ + --output=test/output/preflight-results-v1beta2.json 2>&1 | tee test/output/v1beta2.log || true + + BUNDLE=$(ls -t preflightbundle-*.tar.gz 2>/dev/null | head -1) + if [ -n "$BUNDLE" ]; then + mv "$BUNDLE" test/output/preflight-v1beta2-bundle.tar.gz + echo "✓ v1beta2 bundle saved" + fi + - name: Compare preflight v1beta2 bundle - id: compare-v1beta2 + id: compare continue-on-error: true run: | echo "Comparing v1beta2 preflight bundle against baseline..." @@ -161,8 +219,83 @@ jobs: --report test/output/diff-report-v1beta2.json \ --spec-type preflight + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v5 + with: + name: test-results-v1beta2-${{ github.run_id }}-${{ github.run_attempt }} + path: | + test/output/preflight-v1beta2-bundle.tar.gz + test/output/preflight-results-v1beta2.json + test/output/diff-report-v1beta2.json + test/output/v1beta2.log + retention-days: 30 + + - name: Set job outcome + if: always() + run: | + if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then + echo "comparison_failed=true" >> $GITHUB_OUTPUT + exit 1 + fi + + # Support bundle test (parallel job 3) + test-supportbundle: + needs: [build-binaries] + if: github.actor != 'dependabot[bot]' + runs-on: ubuntu-22.04 + timeout-minutes: 15 + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Create output directory + run: mkdir -p test/output + + - name: Create k3s cluster + uses: replicatedhq/action-k3s@main + with: + version: v1.31.2-k3s1 + + - name: Verify cluster access + run: kubectl get nodes -o wide + + - name: Download binaries + uses: actions/download-artifact@v5 + with: + name: binaries-${{ github.run_id }} + path: bin/ + + - name: Make binaries executable + run: | + chmod +x bin/preflight bin/support-bundle + ./bin/support-bundle version + + - name: Setup Python for comparison + uses: actions/setup-python@v6 + with: + python-version: '3.11' + + - name: Install Python dependencies + run: pip install pyyaml deepdiff + + - name: Run support bundle + continue-on-error: true + run: | + echo "Running support bundle..." + ./bin/support-bundle \ + examples/collect/host/all-kubernetes-collectors.yaml \ + --interactive=false \ + --auto-update=false \ + --output=test/output/supportbundle.tar.gz 2>&1 | tee test/output/supportbundle.log || true + + if [ -f test/output/supportbundle.tar.gz ]; then + echo "✓ Support bundle saved" + fi + - name: Compare support bundle - id: compare-supportbundle + id: compare continue-on-error: true run: | echo "Comparing support bundle against baseline..." @@ -179,44 +312,81 @@ jobs: --report test/output/diff-report-supportbundle.json \ --spec-type supportbundle - # 4. REPORT RESULTS - - name: Generate summary report - if: always() - run: | - python3 scripts/generate_summary.py \ - --reports test/output/diff-report-*.json \ - --output-file $GITHUB_STEP_SUMMARY \ - --output-console - - name: Upload test artifacts if: always() uses: actions/upload-artifact@v5 with: - name: regression-test-results-${{ github.run_id }}-${{ github.run_attempt }} + name: test-results-supportbundle-${{ github.run_id }}-${{ github.run_attempt }} path: | - test/output/*.tar.gz - test/output/*.json + test/output/supportbundle.tar.gz + test/output/diff-report-supportbundle.json + test/output/supportbundle.log retention-days: 30 - - name: Check for regressions + - name: Set job outcome if: always() + run: | + if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then + echo "comparison_failed=true" >> $GITHUB_OUTPUT + exit 1 + fi + + # Report results (runs after all tests complete) + report-results: + needs: [test-preflight-v1beta3, test-preflight-v1beta2, test-supportbundle] + if: always() && github.actor != 'dependabot[bot]' + runs-on: ubuntu-22.04 + timeout-minutes: 5 + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: '3.11' + + - name: Install Python dependencies + run: pip install pyyaml deepdiff + + - name: Download all test artifacts + uses: actions/download-artifact@v5 + with: + path: test/output + pattern: test-results-* + + - name: Reorganize artifacts + run: | + # Move artifacts from nested directories to test/output + find test/output/test-results-* -type f -exec mv {} test/output/ \; + # Clean up empty directories + find test/output/test-results-* -type d -empty -delete || true + + - name: Generate summary report + run: | + python3 scripts/generate_summary.py \ + --reports test/output/diff-report-*.json \ + --output-file $GITHUB_STEP_SUMMARY \ + --output-console + + - name: Check for regressions run: | echo "Checking comparison results..." - # Check if any comparisons failed FAILURES=0 - if [ "${{ steps.compare-v1beta3.outcome }}" == "failure" ] && [ "${{ steps.compare-v1beta3.outputs.baseline_missing }}" != "true" ]; then + if [ "${{ needs.test-preflight-v1beta3.result }}" == "failure" ]; then echo "❌ v1beta3 comparison failed" FAILURES=$((FAILURES + 1)) fi - if [ "${{ steps.compare-v1beta2.outcome }}" == "failure" ] && [ "${{ steps.compare-v1beta2.outputs.baseline_missing }}" != "true" ]; then + if [ "${{ needs.test-preflight-v1beta2.result }}" == "failure" ]; then echo "❌ v1beta2 comparison failed" FAILURES=$((FAILURES + 1)) fi - if [ "${{ steps.compare-supportbundle.outcome }}" == "failure" ] && [ "${{ steps.compare-supportbundle.outputs.baseline_missing }}" != "true" ]; then + if [ "${{ needs.test-supportbundle.result }}" == "failure" ]; then echo "❌ Support bundle comparison failed" FAILURES=$((FAILURES + 1)) fi @@ -230,7 +400,6 @@ jobs: echo "✅ All comparisons passed or skipped (no baseline)" fi - # 5. UPDATE BASELINES (optional, manual trigger only) - name: Update baselines if: github.event.inputs.update_baselines == 'true' && github.event_name == 'workflow_dispatch' run: | @@ -260,7 +429,7 @@ jobs: { "updated_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", "git_sha": "${{ github.sha }}", - "k8s_version": "v1.28.3", + "k8s_version": "v1.31.2-k3s1", "workflow_run": "${{ github.run_id }}" } EOF @@ -271,6 +440,3 @@ jobs: git add test/baselines/ git commit -m "chore: update regression test baselines from run ${{ github.run_id }}" git push - - # 6. CLEANUP - # Note: k3s cluster cleanup is handled automatically by the action diff --git a/pkg/collect/cluster_resources.go b/pkg/collect/cluster_resources.go index 3169b1f65..7a30024bb 100644 --- a/pkg/collect/cluster_resources.go +++ b/pkg/collect/cluster_resources.go @@ -232,7 +232,7 @@ func (c *CollectClusterResources) Collect(progressChan chan<- interface{}) (Coll // replicasets replicasets, replicasetsErrors := replicasets(ctx, client, namespaceNames) for k, v := range replicasets { - output.SaveResult(c.BundlePath, path.Join(constants.CLUSTER_RESOURCES_DIR, fmt.Sprintf("%s-errors.json", constants.CLUSTER_RESOURCES_STATEFULSETS), k), bytes.NewBuffer(v)) + output.SaveResult(c.BundlePath, path.Join(constants.CLUSTER_RESOURCES_DIR, constants.CLUSTER_RESOURCES_REPLICASETS, k), bytes.NewBuffer(v)) } output.SaveResult(c.BundlePath, path.Join(constants.CLUSTER_RESOURCES_DIR, fmt.Sprintf("%s-errors.json", constants.CLUSTER_RESOURCES_REPLICASETS)), marshalErrors(replicasetsErrors)) @@ -370,9 +370,9 @@ func (c *CollectClusterResources) Collect(progressChan chan<- interface{}) (Coll // endpointslices endpointslices, endpointslicesErrors := endpointslices(ctx, client, namespaceNames) for k, v := range endpointslices { - _ = output.SaveResult(c.BundlePath, path.Join(constants.CLUSTER_RESOURCES_DIR, constants.CLUSTER_RESOURCES_ENDPOINTSICES, k), bytes.NewBuffer(v)) + _ = output.SaveResult(c.BundlePath, path.Join(constants.CLUSTER_RESOURCES_DIR, constants.CLUSTER_RESOURCES_ENDPOINTSLICES, k), bytes.NewBuffer(v)) } - _ = output.SaveResult(c.BundlePath, path.Join(constants.CLUSTER_RESOURCES_DIR, fmt.Sprintf("%s-errors.json", constants.CLUSTER_RESOURCES_ENDPOINTSICES)), marshalErrors(endpointslicesErrors)) + _ = output.SaveResult(c.BundlePath, path.Join(constants.CLUSTER_RESOURCES_DIR, fmt.Sprintf("%s-errors.json", constants.CLUSTER_RESOURCES_ENDPOINTSLICES)), marshalErrors(endpointslicesErrors)) // Service Accounts servicesAccounts, servicesAccountsErrors := serviceAccounts(ctx, client, namespaceNames) diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go index a729d8ba5..cb664a2e8 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -56,7 +56,7 @@ const ( CLUSTER_RESOURCES_CLUSTER_ROLE_BINDINGS = "clusterrolebindings" CLUSTER_RESOURCES_PRIORITY_CLASS = "priorityclasses" CLUSTER_RESOURCES_ENDPOINTS = "endpoints" - CLUSTER_RESOURCES_ENDPOINTSICES = "endpointslices" + CLUSTER_RESOURCES_ENDPOINTSLICES = "endpointslices" CLUSTER_RESOURCES_SERVICE_ACCOUNTS = "serviceaccounts" CLUSTER_RESOURCES_LEASES = "leases" CLUSTER_RESOURCES_VOLUME_ATTACHMENTS = "volumeattachments" diff --git a/pkg/preflight/collect.go b/pkg/preflight/collect.go index 9d4e6588a..520403760 100644 --- a/pkg/preflight/collect.go +++ b/pkg/preflight/collect.go @@ -184,6 +184,9 @@ func CollectWithContext(ctx context.Context, opts CollectOpts, p *troubleshootv1 allCollectorsMap := make(map[reflect.Type][]collect.Collector) allCollectedData := make(map[string][]byte) + // Track the order in which we first see each collector type + collectorTypeOrder := []reflect.Type{} + seenTypes := make(map[reflect.Type]bool) for _, desiredCollector := range collectSpecs { if collectorInterface, ok := collect.GetCollector(desiredCollector, opts.BundlePath, opts.Namespace, opts.KubernetesRestConfig, k8sClient, nil); ok { @@ -194,13 +197,21 @@ func CollectWithContext(ctx context.Context, opts CollectOpts, p *troubleshootv1 } collectorType := reflect.TypeOf(collector) allCollectorsMap[collectorType] = append(allCollectorsMap[collectorType], collector) + + // Track first appearance of each type to preserve order + if !seenTypes[collectorType] { + collectorTypeOrder = append(collectorTypeOrder, collectorType) + seenTypes[collectorType] = true + } } } } collectorList := map[string]CollectorStatus{} - for _, collectors := range allCollectorsMap { + // Iterate in the order collectors were first seen (preserves EnsureClusterResourcesFirst ordering) + for _, collectorType := range collectorTypeOrder { + collectors := allCollectorsMap[collectorType] if mergeCollector, ok := collectors[0].(collect.MergeableCollector); ok { mergedCollectors, err := mergeCollector.Merge(collectors) if err != nil { diff --git a/pkg/supportbundle/collect.go b/pkg/supportbundle/collect.go index 83202cde2..db12a847b 100644 --- a/pkg/supportbundle/collect.go +++ b/pkg/supportbundle/collect.go @@ -107,6 +107,9 @@ func runCollectors(ctx context.Context, collectors []*troubleshootv1beta2.Collec allCollectorsMap := make(map[reflect.Type][]collect.Collector) allCollectedData := make(map[string][]byte) + // Track the order in which we first see each collector type + collectorTypeOrder := []reflect.Type{} + seenTypes := make(map[reflect.Type]bool) for _, desiredCollector := range collectSpecs { if collectorInterface, ok := collect.GetCollector(desiredCollector, bundlePath, opts.Namespace, opts.KubernetesRestConfig, k8sClient, opts.SinceTime); ok { @@ -117,11 +120,19 @@ func runCollectors(ctx context.Context, collectors []*troubleshootv1beta2.Collec } collectorType := reflect.TypeOf(collector) allCollectorsMap[collectorType] = append(allCollectorsMap[collectorType], collector) + + // Track first appearance of each type to preserve order + if !seenTypes[collectorType] { + collectorTypeOrder = append(collectorTypeOrder, collectorType) + seenTypes[collectorType] = true + } } } } - for _, collectors := range allCollectorsMap { + // Iterate in the order collectors were first seen (preserves EnsureClusterResourcesFirst ordering) + for _, collectorType := range collectorTypeOrder { + collectors := allCollectorsMap[collectorType] if mergeCollector, ok := collectors[0].(collect.MergeableCollector); ok { mergedCollectors, err := mergeCollector.Merge(collectors) if err != nil { diff --git a/scripts/update_baselines.sh b/scripts/update_baselines.sh index 157ce1343..1bf25cd59 100755 --- a/scripts/update_baselines.sh +++ b/scripts/update_baselines.sh @@ -48,14 +48,12 @@ trap "rm -rf $TEMP_DIR" EXIT echo -e "\n${BLUE}Step 1: Downloading artifacts...${NC}" -# Download artifacts from the run -cd "$TEMP_DIR" -if ! gh run download "$RUN_ID" --name "regression-test-results-${RUN_ID}-1" 2>/dev/null; then - # Try without attempt suffix - if ! gh run download "$RUN_ID" 2>/dev/null; then - echo -e "${RED}Error: Failed to download artifacts from run ${RUN_ID}${NC}" - exit 1 - fi +# Download all test-results artifacts from the run +# Try downloading all artifacts (will download test-results-v1beta3-*, test-results-v1beta2-*, test-results-supportbundle-*) +if ! gh run download "$RUN_ID" --dir "$TEMP_DIR" 2>/dev/null; then + echo -e "${RED}Error: Failed to download artifacts from run ${RUN_ID}${NC}" + echo "Make sure the workflow run completed successfully." + exit 1 fi echo -e "${GREEN}✓ Artifacts downloaded${NC}" @@ -63,27 +61,29 @@ echo -e "${GREEN}✓ Artifacts downloaded${NC}" # Check which bundles are present echo -e "\n${BLUE}Step 2: Checking available bundles...${NC}" -V1BETA3_BUNDLE="" -V1BETA2_BUNDLE="" -SUPPORTBUNDLE="" +# Use find to locate bundles in artifact subdirectories +V1BETA3_BUNDLE=$(find "$TEMP_DIR" -name "preflight-v1beta3-bundle.tar.gz" | head -1) +V1BETA2_BUNDLE=$(find "$TEMP_DIR" -name "preflight-v1beta2-bundle.tar.gz" | head -1) +SUPPORTBUNDLE=$(find "$TEMP_DIR" -name "supportbundle.tar.gz" | head -1) -if [ -f "preflight-v1beta3-bundle.tar.gz" ] || [ -f "test/output/preflight-v1beta3-bundle.tar.gz" ]; then - V1BETA3_BUNDLE=$(find . -name "preflight-v1beta3-bundle.tar.gz" | head -1) +if [ -n "$V1BETA3_BUNDLE" ]; then echo -e "${GREEN}✓${NC} Found v1beta3 preflight bundle" fi -if [ -f "preflight-v1beta2-bundle.tar.gz" ] || [ -f "test/output/preflight-v1beta2-bundle.tar.gz" ]; then - V1BETA2_BUNDLE=$(find . -name "preflight-v1beta2-bundle.tar.gz" | head -1) +if [ -n "$V1BETA2_BUNDLE" ]; then echo -e "${GREEN}✓${NC} Found v1beta2 preflight bundle" fi -if [ -f "supportbundle.tar.gz" ] || [ -f "test/output/supportbundle.tar.gz" ]; then - SUPPORTBUNDLE=$(find . -name "supportbundle.tar.gz" | head -1) +if [ -n "$SUPPORTBUNDLE" ]; then echo -e "${GREEN}✓${NC} Found support bundle" fi if [ -z "$V1BETA3_BUNDLE" ] && [ -z "$V1BETA2_BUNDLE" ] && [ -z "$SUPPORTBUNDLE" ]; then echo -e "${RED}Error: No bundles found in artifacts${NC}" + echo "Downloaded artifacts:" + ls -la "$TEMP_DIR" + echo -e "\nSearching for bundles:" + find "$TEMP_DIR" -name "*.tar.gz" -o -name "*.json" exit 1 fi @@ -110,21 +110,21 @@ echo -e "\n${BLUE}Step 3: Updating baselines...${NC}" # Update v1beta3 baseline if [ -n "$V1BETA3_BUNDLE" ]; then mkdir -p test/baselines/preflight-v1beta3 - cp "$TEMP_DIR/$V1BETA3_BUNDLE" test/baselines/preflight-v1beta3/baseline.tar.gz + cp "$V1BETA3_BUNDLE" test/baselines/preflight-v1beta3/baseline.tar.gz echo -e "${GREEN}✓${NC} Updated preflight-v1beta3 baseline" fi # Update v1beta2 baseline if [ -n "$V1BETA2_BUNDLE" ]; then mkdir -p test/baselines/preflight-v1beta2 - cp "$TEMP_DIR/$V1BETA2_BUNDLE" test/baselines/preflight-v1beta2/baseline.tar.gz + cp "$V1BETA2_BUNDLE" test/baselines/preflight-v1beta2/baseline.tar.gz echo -e "${GREEN}✓${NC} Updated preflight-v1beta2 baseline" fi # Update support bundle baseline if [ -n "$SUPPORTBUNDLE" ]; then mkdir -p test/baselines/supportbundle - cp "$TEMP_DIR/$SUPPORTBUNDLE" test/baselines/supportbundle/baseline.tar.gz + cp "$SUPPORTBUNDLE" test/baselines/supportbundle/baseline.tar.gz echo -e "${GREEN}✓${NC} Updated supportbundle baseline" fi diff --git a/test/baselines/metadata.json b/test/baselines/metadata.json new file mode 100644 index 000000000..63349fa4c --- /dev/null +++ b/test/baselines/metadata.json @@ -0,0 +1,7 @@ +{ + "updated_at": "2025-11-26T00:07:12Z", + "git_sha": "14719a7469f9cf6b9e28b3fa8303bcda0cf8298e", + "workflow_run_id": "19687905788", + "k8s_version": "v1.28.3", + "updated_by": "Ethan Mosbaugh " +} diff --git a/test/baselines/preflight-v1beta2/baseline.tar.gz b/test/baselines/preflight-v1beta2/baseline.tar.gz index 7b30829b2..0faa25b25 100644 Binary files a/test/baselines/preflight-v1beta2/baseline.tar.gz and b/test/baselines/preflight-v1beta2/baseline.tar.gz differ diff --git a/test/baselines/preflight-v1beta3/baseline.tar.gz b/test/baselines/preflight-v1beta3/baseline.tar.gz index 104990747..0932742dd 100644 Binary files a/test/baselines/preflight-v1beta3/baseline.tar.gz and b/test/baselines/preflight-v1beta3/baseline.tar.gz differ diff --git a/test/baselines/supportbundle/baseline.tar.gz b/test/baselines/supportbundle/baseline.tar.gz index b40e088af..5f37d8ce8 100644 Binary files a/test/baselines/supportbundle/baseline.tar.gz and b/test/baselines/supportbundle/baseline.tar.gz differ diff --git a/test/e2e/support-bundle/cluster_resources_e2e_test.go b/test/e2e/support-bundle/cluster_resources_e2e_test.go index 17d1a50e3..48b84e351 100644 --- a/test/e2e/support-bundle/cluster_resources_e2e_test.go +++ b/test/e2e/support-bundle/cluster_resources_e2e_test.go @@ -47,7 +47,7 @@ func TestClusterResources(t *testing.T) { "roles", "events", "rolebindings", - "statefulsets-errors.json", + "replicasets", "jobs", "serviceaccounts", "configmaps",