Skip to content
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

Merged
merged 14 commits into from
Dec 9, 2024

Conversation

DmitriyLewen
Copy link
Contributor

@DmitriyLewen DmitriyLewen commented Jul 11, 2023

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:
изображение

@DmitriyLewen DmitriyLewen marked this pull request as ready for review July 12, 2023 04:16
@DmitriyLewen DmitriyLewen requested a review from knqyf263 as a code owner July 12, 2023 04:16
@DmitriyLewen DmitriyLewen self-assigned this Jul 12, 2023
@DmitriyLewen
Copy link
Contributor Author

DmitriyLewen commented Dec 3, 2024

@knqyf263 i updated this PR and aquasecurity/trivy#4809.
Take a look, when you have time.

Comment on lines 221 to 227
fixedVersions := []string{
entry.FixedVersion,
}
if savedVersion, ok := fixedVersionsByArch[arch]; ok {
fixedVersions = append(fixedVersions, savedVersion...)
}
fixedVersionsByArch[arch] = fixedVersions
Copy link
Collaborator

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=

Suggested change
fixedVersions := []string{
entry.FixedVersion,
}
if savedVersion, ok := fixedVersionsByArch[arch]; ok {
fixedVersions = append(fixedVersions, savedVersion...)
}
fixedVersionsByArch[arch] = fixedVersions
fixedVersionsByArch[arch] = append(fixedVersionsByArch[arch], entry.FixedVersion)

Copy link
Collaborator

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.

Copy link
Collaborator

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

Copy link
Contributor Author

@DmitriyLewen DmitriyLewen Dec 6, 2024

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.

Copy link
Collaborator

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>
Copy link
Collaborator

@knqyf263 knqyf263 left a 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.

@DmitriyLewen DmitriyLewen merged commit 8c398f1 into aquasecurity:main Dec 9, 2024
2 checks passed
@DmitriyLewen DmitriyLewen deleted the feat/oracle-arches branch December 9, 2024 11:14
@DmitriyLewen
Copy link
Contributor Author

@knqyf263 I merged this PR and updated aquasecurity/trivy#4809 (go.mod and go.sum files).
Take a look, please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants