Skip to content

Conversation

Kern--
Copy link
Contributor

@Kern-- Kern-- commented Sep 13, 2022

Signed-off-by: Kern Walster [email protected]

Issue #, if available:
Closes #446

Description of changes:

This pins our binary dependencies (CNI + project checks) in a way that is compatible with go versions >= 1.14.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Kern-- Kern-- requested a review from a team as a code owner September 13, 2022 22:47
Signed-off-by: Mathis Joffre <[email protected]>
@Kern-- Kern-- marked this pull request as draft September 14, 2022 16:55
@Kern-- Kern-- force-pushed the main branch 2 times, most recently from d909be7 to 01d1271 Compare September 14, 2022 19:23
@Kern-- Kern-- changed the title Downgrade x/sys Pin dependencies in examples Sep 14, 2022
Comment on lines 26 to 27
GO111MODULE=on GOBIN=$(GOBIN) go get $(1) && \
GO111MODULE=on GOBIN=$(GOBIN) go install $(1)
Copy link
Contributor

@austinvazquez austinvazquez Sep 28, 2022

Choose a reason for hiding this comment

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

Do we need to do an || true here since one will fail or @ the call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it seems like what we actually need is this (ignoring setting env vars for clarity):

go 1.14/1.15:

go get $PACKAGE@$VERSION
go install $PACKAGE

go 1.16+

go install $PACKAGE@$VERSION

I've been banging my head against a wall trying to figure out a reasonable way to do this either in the Makefile or in portable shell scripting, but maybe it's worth just having the 10 or so gross if/else make rules.

@Kern-- Kern-- force-pushed the main branch 2 times, most recently from 59dbe87 to f274f81 Compare September 28, 2022 21:53
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

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

+1, this looks great all things considered and lets us keep older versions for users.

@austinvazquez
Copy link
Contributor

Looks like the buildkite pipeline installs a plugin as well. We can probably replace that with an explicit make target call to install or let make dependencies handle it.
Reference:

- 'go get github.com/awslabs/tc-redirect-tap/cmd/tc-redirect-tap'

@austinvazquez
Copy link
Contributor

The load snapshot integration tests will intermittently fail which #418 is trying to address. That is outside the scope of this change which is why I reran for the green.

This change pins our binary dependencies (CNI and project checks) in a
way that works with go versions >=1.14

Signed-off-by: Kern Walster <[email protected]>
@Kern-- Kern-- changed the title Pin dependencies in examples Pin dependencies Sep 29, 2022
@Kern-- Kern-- marked this pull request as ready for review September 29, 2022 20:35
@Kern--
Copy link
Contributor Author

Kern-- commented Sep 29, 2022

@Joffref This will take the place of your PR. Can you please take a look?

@Joffref
Copy link
Contributor

Joffref commented Sep 30, 2022

@Kern-- LGTM.
Also, you can mention that it closes issue #446.

@Kern-- Kern-- merged commit eaf2fa8 into firecracker-microvm:main Sep 30, 2022
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.

Pin dependencies versions in build

5 participants