Skip to content

fix: delete completed scan jobs in any case#2788

Merged
simar7 merged 4 commits intoaquasecurity:mainfrom
afdesk:fix/delete-failed-jobs
Feb 3, 2026
Merged

fix: delete completed scan jobs in any case#2788
simar7 merged 4 commits intoaquasecurity:mainfrom
afdesk:fix/delete-failed-jobs

Conversation

@afdesk
Copy link
Copy Markdown
Contributor

@afdesk afdesk commented Oct 17, 2025

Description

This PR slightly adjusts the operator’s behavior when errors occur during the processing of a completed scan job.

Trivy-operator will now delete the scan job if any errors are encountered during its processing.

This change is intended to prevent scan jobs from remaining undeleted indefinitely in error scenarios.

Note: When scanJobTTL is configured, the scan job deletion will respect this TTL setting.

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@github-actions github-actions bot added the bug label Oct 17, 2025
@afdesk afdesk added this to the v0.31.0 milestone Oct 17, 2025
@afdesk afdesk modified the milestones: v0.31.0, v0.30.0 Nov 6, 2025
@afdesk afdesk marked this pull request as ready for review November 6, 2025 04:42
@afdesk afdesk requested a review from simar7 as a code owner November 6, 2025 04:42
Copy link
Copy Markdown
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

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

Can we add a test for this? A special case to handle in that test would be if ttl is set, it should respect that.

@afdesk
Copy link
Copy Markdown
Contributor Author

afdesk commented Dec 10, 2025

Can we add a test for this? A special case to handle in that test would be if ttl is set, it should respect that.

done b60f12f

@afdesk afdesk requested a review from simar7 December 10, 2025 12:02
@simar7 simar7 merged commit 8e0ad2b into aquasecurity:main Feb 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scan jobs never deleted on failures to write to etcd

2 participants