gate rootfs snapshot outcome on job status once job exists - #392
gate rootfs snapshot outcome on job status once job exists#392benldrmn wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 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".
| if err := r.Get(ctx, types.NamespacedName{Name: jobName, Namespace: snap.Namespace}, existingJob); err == nil { | ||
| return r.evaluateSnapshotJob(ctx, baseSnap, snap, existingJob) |
There was a problem hiding this comment.
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 👍 / 👎.
No description provided.