Skip to content

chore: replace deprecated '--slow' with '--parallel'#2555

Open
henkka wants to merge 3 commits intoaquasecurity:mainfrom
henkka:main
Open

chore: replace deprecated '--slow' with '--parallel'#2555
henkka wants to merge 3 commits intoaquasecurity:mainfrom
henkka:main

Conversation

@henkka
Copy link

@henkka henkka commented May 14, 2025

Relates to aquasecurity/trivy#5572 where --slow was deprecated in the trivy project.

With current implementation, each scan job logs the following warning:

WARN    "--slow" is deprecated. Use "--parallel 1" instead.

This pull request modifies trivy-operator to use the --parallel 1 instead of the deprecated --slow flag, while keeping the trivy-operator's own API backward compatible (ie. call it slow but under the hood convert it to parallel)

@henkka henkka requested a review from simar7 as a code owner May 14, 2025 13:44
@CLAassistant
Copy link

CLAassistant commented May 14, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the misc label May 14, 2025
}
if c.GetSlow() {
return "--slow"
return "--parallel 1"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should support backward compatibility with older tags too
--slow was deprecated in v0.53.0 aquasecurity/trivy#7061

Copy link
Author

@henkka henkka May 15, 2025

Choose a reason for hiding this comment

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

Thank you for the quick turnaround! Fixed with fa22696

@afdesk
Copy link
Contributor

afdesk commented May 15, 2025

@henkka thanks for your contribution
i left a small comment

@afdesk
Copy link
Contributor

afdesk commented May 15, 2025

@simar7 should we change a flag --slow to --parallel in trivy-operator too

func Slow(c Config) string {
tag, err := c.GetImageTag()
if err != nil {
return ""
}
// support backward compatibility with older tags
if compareTagVersion(tag, "< 0.35.0") {
return ""
}
if c.GetSlow() {
return "--slow"
}
return ""
}

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.

3 participants