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

Test: Fixed a few bugs with running integration tests in the integration environment #2184

Merged
merged 3 commits into from
Jul 26, 2022

Conversation

ellistarn
Copy link
Contributor

@ellistarn ellistarn commented Jul 25, 2022

Fixes #

Description

How was this change tested?

  • Uses the correct OCI helm chart
  • Wires up kubeconfig correctly
  • Speeds up testing by vendoring go modules

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note

None

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

@ellistarn ellistarn requested a review from a team as a code owner July 25, 2022 20:08
@ellistarn ellistarn requested a review from tzneal July 25, 2022 20:08
@netlify
Copy link

netlify bot commented Jul 25, 2022

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 123349b
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/62e01a289b403200087be717

@ellistarn ellistarn force-pushed the tolerations branch 3 times, most recently from ef8c196 to f73cf83 Compare July 25, 2022 21:19
@ellistarn ellistarn changed the title Test: Add explicit tolerations in test setup since snapshot releases do not use latest yaml (yet) Test: Fixed a few bugs with running integration tests in the integration environment Jul 25, 2022
@@ -25,7 +26,7 @@ import (
"github.com/aws/karpenter/pkg/utils/project"
)

var clusterNameFlag = *flag.String("cluster-name", env.WithDefaultString("CLUSTER_NAME", ""), "Cluster name enables discovery of the testing environment")
var clusterNameFlag = flag.String("cluster-name", env.WithDefaultString("CLUSTER_NAME", ""), "Cluster name enables discovery of the testing environment")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this using flag? It looks like this will only ever get the env variable since you never call flag.Parse. Might as well just use:

Suggested change
var clusterNameFlag = flag.String("cluster-name", env.WithDefaultString("CLUSTER_NAME", ""), "Cluster name enables discovery of the testing environment")
var clusterName = env.WithDefaultString("CLUSTER_NAME", "")

or directly in DiscoverClusterName()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test library calls flags.Parse() for us =/. I can't call it again without creating problem. I like your solution though.

@@ -46,3 +46,8 @@ RUN aws --version
# Install eksctl
RUN curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/v0.105.0/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
RUN mv /tmp/eksctl /usr/local/bin

# Install toolchain
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like you're just caching the modules not installing the "toolchain"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I was originally going to install the toolchain, but it took foreverrrrr

# Install toolchain
RUN git clone https://github.com/aws/karpenter.git /karpenter
WORKDIR /karpenter
RUN GOPRIVATE=* go mod tidy
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't set GOPRIVATE=* since this causes go to skip checksum verifications... Do you just want the proxy off or is there more you're trying to do here?

Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

lgtm

@ellistarn ellistarn merged commit 4fad429 into aws:main Jul 26, 2022
@ellistarn ellistarn deleted the tolerations branch July 26, 2022 17:03
ellistarn added a commit to ellistarn/karpenter-provider-aws that referenced this pull request Jul 26, 2022
…ion environment (aws#2184)

* Test: Add explicit tolerations in test setup since snapshot releases do not use latest yaml (yet)

* Restored clustername discovery

* PR Comments
ellistarn added a commit to ellistarn/karpenter-provider-aws that referenced this pull request Jul 26, 2022
…ion environment (aws#2184)

* Test: Add explicit tolerations in test setup since snapshot releases do not use latest yaml (yet)

* Restored clustername discovery

* PR Comments
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