Skip to content

gate rootfs snapshot outcome on job status once job exists - #392

Open
benldrmn wants to merge 2 commits into
mainfrom
fix/snapshot-pod-gate
Open

gate rootfs snapshot outcome on job status once job exists#392
benldrmn wants to merge 2 commits into
mainfrom
fix/snapshot-pod-gate

Conversation

@benldrmn

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebd8c154e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +173 to +174
if err := r.Get(ctx, types.NamespacedName{Name: jobName, Namespace: snap.Namespace}, existingJob); err == nil {
return r.evaluateSnapshotJob(ctx, baseSnap, snap, existingJob)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check job ownership before trusting existing status

When a RootfsSnapshot name is reused while the prior <name>-job is still being garbage-collected, this early return now evaluates that stale job before validating the current sandbox pod or checking that the job is controlled by this CR's UID. A completed stale job can therefore mark the new snapshot succeeded and copy the old termination message even when the requested sandbox/container does not exist; please verify the controller owner reference matches the current snapshot before accepting the job status.

Useful? React with 👍 / 👎.

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