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

chore: update to go 1.21 and trivy 0.48.3 #941

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

sozercan
Copy link
Member

@sozercan sozercan commented Jan 10, 2024

What this PR does / why we need it:

  • update go to 1.21
  • update trivy to 0.48.2
  • move base images inline so dependabot will pin and bump

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #

Special notes for your reviewer:

@sozercan sozercan changed the title chore: update to go 1.21 chore: update to go 1.21 and trivy 0.48.2 Jan 10, 2024
@ashnamehrotra
Copy link
Contributor

we might need to change this value too since it needs TRIVY_BINARY_TAG: TRIVY_SCANNER_LDFLAGS ?= $(ERASER_LDFLAGS) -X 'main.trivyVersion=v$(TRIVY_BINARY_TAG)'

@ashnamehrotra
Copy link
Contributor

one more thing, we should remove trivyVersion from the trivy.go logs (line 69) since we aren't passing it through the linker anymore

@sozercan
Copy link
Member Author

sozercan commented Jan 11, 2024

@ashnamehrotra I didn't realized we had that. That seems valuable. Reverted some of the changes and created TRIVY_BINARY_VERSION variable

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copy link
Contributor

@ashnamehrotra ashnamehrotra left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
@sozercan
Copy link
Member Author

keeping trivy arg in dockerfile for now. if dependabot updates this, then makefile (version is used in ldflags) and dockerfile will be out of sync

Makefile Outdated
@@ -228,7 +226,6 @@ docker-build-trivy-scanner: ## Build docker image for trivy-scanner image.
docker buildx build \
$(_CACHE_FROM) $(_CACHE_TO) \
$(_ATTESTATIONS) \
--build-arg TRIVY_BINARY_IMG="$(TRIVY_BINARY_IMG)" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we removing this?

Copy link
Member Author

@sozercan sozercan Jan 11, 2024

Choose a reason for hiding this comment

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

Reverted this change. I was a bit confused since we define in both Makefile and Dockerfile, but I see that Dockerfile gets overwritten by this (added a comment in Dockerfile). It would be good to have a single source of truth in the future.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
@sozercan sozercan changed the title chore: update to go 1.21 and trivy 0.48.2 chore: update to go 1.21 and trivy 0.48.3 Jan 11, 2024
Copy link
Contributor

@pmengelbert pmengelbert left a comment

Choose a reason for hiding this comment

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

LGTM

@ashnamehrotra ashnamehrotra merged commit 0dd595c into eraser-dev:main Jan 11, 2024
92 checks passed
ashnamehrotra pushed a commit to ashnamehrotra/eraser that referenced this pull request Jan 25, 2024
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: ashnamehrotra <ashnamehrotra@gmail.com>
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.

3 participants