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

fix: trivy ci fail #43

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix: trivy ci fail #43

wants to merge 2 commits into from

Conversation

keyvaann
Copy link
Collaborator

The issue with the trivy seems to be known and there is a workaround for it.

@keyvaann keyvaann requested a review from baixiac January 10, 2025 18:46
Copy link
Member

@baixiac baixiac left a comment

Choose a reason for hiding this comment

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

Wrt -upgrade, if users update their infrastructure first and commit some changes afterwards, does this mean the newly added hooks can make the module versions used during infrastructure update differ from the module versions eventually committed and pushed?

@keyvaann
Copy link
Collaborator Author

Wrt -upgrade, if users update their infrastructure first and commit some changes afterwards, does this mean the newly added hooks can make the module versions used during infrastructure update differ from the module versions eventually committed and pushed?

Yes that is true! But I don't know what is the best solution. I made the change to prevent the CI from failing. Maybe we can pin the exact module version instead of giving it a range or have another way to solve it.

@baixiac
Copy link
Member

baixiac commented Jan 14, 2025

You meant -upgrade is required to make the CI green?

@keyvaann
Copy link
Collaborator Author

Yes!

@baixiac
Copy link
Member

baixiac commented Jan 14, 2025

Alright. May be pin down the versions then. I did notice every time I run those hooks the HCL lock files and TF docs get updated with another version of aws-provider.

Copy link
Member

@baixiac baixiac left a comment

Choose a reason for hiding this comment

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

The devbox hook upgraded dependency modules/providers on every run and didn't honour the lock files. This change stops that and works for me. Would you mind reverting the change related to introducing -upgrade?

@keyvaann
Copy link
Collaborator Author

You have added the change to init_hook and it runs only when you run devbox shell and after that it doesn't run anymore and in the meantime there might be an update to the provider which will fail the CI during push. I'm not sure if the change introduced in the other PR will solve the issue.

@baixiac
Copy link
Member

baixiac commented Jan 16, 2025

in the meantime there might be an update to the provider which will fail the CI during push

The CI shouldn't do that but always honour the lock files, right? The CI may fail only if GitHub changes the CI instance's platform or architecture which has no corresponding hash recorded in the lock file.

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