Skip to content

Add a optional ttlSecondsAfterFinished field to scans to cleanup finished scans #2293#2631

Merged
J12934 merged 9 commits into
secureCodeBox:mainfrom
Reet00:development-branch
Aug 30, 2024
Merged

Add a optional ttlSecondsAfterFinished field to scans to cleanup finished scans #2293#2631
J12934 merged 9 commits into
secureCodeBox:mainfrom
Reet00:development-branch

Conversation

@Reet00
Copy link
Copy Markdown
Contributor

@Reet00 Reet00 commented Aug 23, 2024

Description

Adds ttlSecondsAfterFinished option to automatically delte finished and errored scans after a defined time in seconds. This will delete the specific scan and not just a scanner/parser job.
Also sets the finishedAt attribute to the timestamp a scan is marked as "Done" or "Errored".

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure that all your commits are signed-off and that you are added to the Contributors file.
  • Make sure that all CI finish successfully.
  • Optional (but appreciated): Make sure that all commits are Verified.

@Reet00 Reet00 self-assigned this Aug 23, 2024
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 23, 2024

Deploy Preview for docs-securecodebox canceled.

Name Link
🔨 Latest commit 1b8c201
🔍 Latest deploy log https://app.netlify.com/sites/docs-securecodebox/deploys/66d1acfddf4fc0000872d662

@Reet00 Reet00 added the enhancement New feature or request label Aug 23, 2024
@Reet00 Reet00 changed the title Development branch Add a optional ttlSecondsAfterFinished field to scans to cleanup finished scans #2293 Aug 23, 2024
Comment thread operator/apis/execution/v1/scan_types.go Outdated
Comment thread operator/controllers/execution/scans/scan_reconciler.go Outdated
Comment thread operator/apis/execution/v1/scan_types.go Outdated
Comment thread documentation/docs/api/crds/scan.md Outdated
Comment thread documentation/docs/api/crds/scan.md
Reet00 added 3 commits August 30, 2024 10:38
…tomatic removal of scans

Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
Needed to record the completion time of the scan in order to
automatically delete a scan

Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
…d be deleted automatically

Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
@Reet00 Reet00 force-pushed the development-branch branch from 6437d1d to aabce59 Compare August 30, 2024 08:41
@Reet00 Reet00 requested a review from J12934 August 30, 2024 09:22
Reet00 and others added 6 commits August 30, 2024 13:24
…was set

checkIfTTLSecondsAfterFinishedisCompleted checks if the option was
set and  if the time has exceeded

Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
…ed scans

to be able to use this to determine the deletion time for errored scans

Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
Co-authored-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
Co-authored-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
@Reet00 Reet00 force-pushed the development-branch branch from a3b8294 to 1b8c201 Compare August 30, 2024 11:29
@sonarqubecloud
Copy link
Copy Markdown

@J12934 J12934 merged commit a8f8a27 into secureCodeBox:main Aug 30, 2024
@Reet00 Reet00 deleted the development-branch branch November 8, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add a optional ttlSecondsAfterFinished field to scans to cleanup finished scans

2 participants