-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(oracle): add multi-arch support #331
feat(oracle): add multi-arch support #331
Conversation
@knqyf263 i updated this PR and aquasecurity/trivy#4809. |
fixedVersions := []string{ | ||
entry.FixedVersion, | ||
} | ||
if savedVersion, ok := fixedVersionsByArch[arch]; ok { | ||
fixedVersions = append(fixedVersions, savedVersion...) | ||
} | ||
fixedVersionsByArch[arch] = fixedVersions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we write as below?
https://go.dev/play/p/CShT_KJUi9J?v=
fixedVersions := []string{ | |
entry.FixedVersion, | |
} | |
if savedVersion, ok := fixedVersionsByArch[arch]; ok { | |
fixedVersions = append(fixedVersions, savedVersion...) | |
} | |
fixedVersionsByArch[arch] = fixedVersions | |
fixedVersionsByArch[arch] = append(fixedVersionsByArch[arch], entry.FixedVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I have another idea. I'll try it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. @DmitriyLewen Can you take a look?
d65b441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we write as below?
hmm... that's an easier way 👍 I didn't think about that. Thanks, I'll use it somewhere else later 🙂
Updated. @DmitriyLewen Can you take a look?
Looks good 👍
I also created DB with your changes and looked at some of the advisories. They look correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking. I'll review aquasecurity/trivy#4809 and then approve this PR.
Signed-off-by: knqyf263 <knqyf263@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aquasecurity/trivy#4809 looks good to me. Approved.
@knqyf263 I merged this PR and updated aquasecurity/trivy#4809 (go.mod and go.sum files). |
Description
Add arches for OracleLinux.
Use same structure as for RockyLinux - #321.
db size before - 559 Mb
db size after - 570 Mb
example for different version for different arches: