Skip to content

chores: fix debug artifacts collection lost after migration on praktika - #417

Merged
GrigoryPervakov merged 1 commit into
mainfrom
fix/e2e-diagnostics-report-dir
Dec 2, 2026
Merged

GrigoryPervakov merged 1 commit into
mainfrom
fix/e2e-diagnostics-report-dir

Conversation

@GrigoryPervakov

@GrigoryPervakov GrigoryPervakov commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Why

Failed CI e2e jobs don't contain the diagnostics dumps that were added in #383.

  • testutil.Run calls os.Chdir to the project root. After the first command, every relative report/ path resolves to <root>/report/. This covers the Ginkgo reports and the DumpNamespaceDiagnostics resources, pod logs and events.
  • The CI jobs collect test/<suite>/report, so the copy fails with cp: cannot stat 'test/deploy/report'. As a result failure-diagnostics.tgz has only kind logs and cluster events, and the e2e job never attaches ginkgo-report.json.
  • openshift-compat: the test report step has no if, so it is skipped whenever the tests fail. The report dir also isn't uploaded anymore since the move to praktika.

What

  • Remove the os.Chdir from testutil.Run. It already sets cmd.Dir to the project root, so commands with relative paths behave the same. Reports and dumps now land in test/<suite>/report, where CI looks for them.
  • openshift-compat: upload **/report/* as an artifact and publish the test report unless the run is cancelled. The JUnit parser now only gets *.xml, because the dumps are in the same dir now.

Note

Low Risk
Changes only affect test harness cwd behavior and GitHub Actions artifact/report steps, not runtime operator logic.

Overview
Restores e2e debug artifacts and reports after the Praktika CI migration by fixing where suite output is written and how OpenShift compat CI collects it.

testutil.Run no longer calls os.Chdir to the repo root. Commands still run with cmd.Dir set to the project root, but the test process working directory stays in test/<suite>/, so Ginkgo/JUnit output and failure dumps land under test/<suite>/report/ where CI expects them (instead of a single top-level report/).

OpenShift compat workflow adds an artifact upload for **/report/*, runs the test reporter unless the job is cancelled (so failed runs still publish results), and scopes the JUnit reporter to **/report/*.xml so diagnostic files in the same directory are not parsed as tests.

Reviewed by Cursor Bugbot for commit f02272d. Bugbot is set up for automated code reviews on this repo. Configure here.


Workflow [PR]

@clickhouse-operator

clickhouse-operator Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [f02272d]

Summary: ✅


Code Review

Result: ❌ Blocking issues

What changed: The PR stops testutil.Run from changing the test process working directory so reports and diagnostics remain under each suite’s report/ directory. It also uploads OpenShift compatibility reports on failed runs and limits JUnit parsing to XML files.

Security

  • The new artifact upload includes unredacted Kubernetes Secret objects from failed OpenShift tests, potentially exposing service-account or image-pull credentials to artifact readers. Secrets must be omitted or redacted before these diagnostics are uploaded.

Investigation: 5/13 rounds, 32 tool calls.

if: ${{ !cancelled() }}
with:
name: e2e-report-openshift-compat
path: "**/report/*"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Do not upload unredacted Kubernetes secrets

This wildcard uploads the failure diagnostics produced by DumpNamespaceDiagnostics. Its resources-*.log file serializes a corev1.SecretList in full, including every Secret's .data. On OpenShift that can include service-account/image-pull credentials, so a failed test would persist live cluster credentials as a downloadable GitHub artifact. Please redact/omit Secret data in the diagnostic dump (including the Praktika archive path) before uploading these files.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DumpNamespaceDiagnostics dumps Secrets generated by the operator during the test, nothing really secret can be leaked

@security-ai-gate-reviewer

Copy link
Copy Markdown

AI review gate — auto-approved

f02272d6533d is approved by security-ai-gate-reviewer[bot], an automated identity, not a human. The approval stands on the required AI review: Cursor Bugbot concluded green on this commit and the AI review gate is SUCCESS (its own comment has the verdict), and the change touches no path that requires a human reviewer. It covers this diff only: after a push that changes it, the approver evaluates the new head and approves it only if it is green.

History (latest 5 heads, newest first)

  • f02272d6533d approved — green: Cursor Bugbot

@GrigoryPervakov
GrigoryPervakov merged commit af1e142 into main Dec 2, 2026
33 checks passed
@GrigoryPervakov
GrigoryPervakov deleted the fix/e2e-diagnostics-report-dir branch December 2, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant