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

OCM-9780 | test: automated id:65900 install with use-local-credentials will work #2396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jerichokeyne
Copy link
Contributor

Automated id:65900 which tests that a cluster installed with the --use-local-credentials flag will install correctly

output:

$ TEST_PROFILE=rosa-non-sts-local-creds ginkgo run --focus 65900 tests/e2e/
Running Suite: ROSA CLI e2e tests suite - /home/jericho/work/repos/rosa/tests/e2e
=================================================================================
Random Seed: 1724876476

Will run 1 of 156 specs
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS•SSSSSSSSSSSSS

Ran 1 of 156 Specs in 0.436 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 155 Skipped
PASS

Ginkgo ran 1 suite in 1.722011s
Test Suite Passed

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2024
@OAharoni-RedHat
Copy link
Contributor

test LGTM, could you explain to me what the flag does just for my own sake?

@jerichokeyne
Copy link
Contributor Author

@OAharoni-RedHat I believe it just makes it so that when you install a non-sts cluster it will use your AWS credentials from your machine

@OAharoni-RedHat
Copy link
Contributor

@OAharoni-RedHat I believe it just makes it so that when you install a non-sts cluster it will use your AWS credentials from your machine

@jerichokeyne maybe i'm going to out myself as clueless here but isn't that what it already does? Since we need to set up an AWS_PROFILE for it to grab info from already right? Or am I misunderstanding

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 3, 2024
@jerichokeyne
Copy link
Contributor Author

@OAharoni-RedHat I believe it just makes it so that when you install a non-sts cluster it will use your AWS credentials from your machine

@jerichokeyne maybe i'm going to out myself as clueless here but isn't that what it already does? Since we need to set up an AWS_PROFILE for it to grab info from already right? Or am I misunderstanding

I'll be honest I'm not completely sure what the difference is. I think the difference is that both will use your local credentials for installing, but this flag makes the cluster use your credentials instead of the osdCcsAdmin credentials. It's apparently something we don't fully support even though it's something we test for 🤷

@jfrazierRH
Copy link
Contributor

It looks like the step for testing vs an STS cluster is missing. It might make sense to split that into a separate negative test case.

Also, does the cluster itself describe that it used local credentials in any way? Or is it only evident in the json structure?

@jerichokeyne
Copy link
Contributor Author

jerichokeyne commented Sep 4, 2024

@jfrazierRH

It looks like the step for testing vs an STS cluster is missing. It might make sense to split that into a separate negative test case.

Ah, looks like I forgot that part. I'll have to do some more research into how to do that since it's an error at install time

Also, does the cluster itself describe that it used local credentials in any way? Or is it only evident in the json structure?

As far as I know it's only evident in the json

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.89%. Comparing base (95b1769) to head (5bc9ead).
Report is 214 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2396      +/-   ##
==========================================
+ Coverage   29.86%   29.89%   +0.03%     
==========================================
  Files         171      171              
  Lines       23541    23316     -225     
==========================================
- Hits         7031     6971      -60     
+ Misses      15939    15776     -163     
+ Partials      571      569       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jerichokeyne
Copy link
Contributor Author

@jfrazierRH I added that negative test case

@jfrazierRH
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2024
tests/e2e/test_rosacli_cluster.go Outdated Show resolved Hide resolved
tests/e2e/test_rosacli_cluster_post.go Outdated Show resolved Hide resolved
tests/e2e/test_rosacli_cluster_post.go Outdated Show resolved Hide resolved
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 12, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2024
Copy link
Contributor

openshift-ci bot commented Sep 25, 2024

New changes are detected. LGTM label has been removed.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 25, 2024
@jerichokeyne
Copy link
Contributor Author

/retest

admin_enabled: false
- as: rosa-non-sts-local-creds
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that meant to be launched from a job ?
If yes, I don't think we need a new profile. You could have here this profile property be configurable also via an environment variable USE_LOCAL_CREDENTIALS which would set the profile property accordingly and configure your job to use the rosa-non-sts-advanced profile with the env var USE_LOCAL_CREDENTIALS: true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a env var option now. I set it up currently so that when set to true it will enable the profile option, but if it's set to anything else it'll leave the profile option alone

Copy link
Contributor

Choose a reason for hiding this comment

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

so you don't need to keep that profile here. And you would need to create a new job in openshift/release for this specific case

Copy link
Contributor

openshift-ci bot commented Oct 7, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jerichokeyne, jfrazierRH
Once this PR has been reviewed and has the lgtm label, please assign oriadler for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 10, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 10, 2024
@jerichokeyne
Copy link
Contributor Author

/retest

Copy link
Contributor

openshift-ci bot commented Oct 15, 2024

@jerichokeyne: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-presubmits-pr-rosa-hcp-advanced 5bc9ead link false /test e2e-presubmits-pr-rosa-hcp-advanced

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

config.Test.GlobalENV.ComputeMachineType)
profile.ClusterConfig.InstanceType = config.Test.GlobalENV.ComputeMachineType
}

if config.Test.GlobalENV.UseLocalCredentials {
log.Logger.Info("Got global env setting for USE_LOCAL_CREDENTIALS, overwritten the profile setting to true")
profile.ClusterConfig.UseLocalCredentials = true
Copy link
Contributor

Choose a reason for hiding this comment

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

please check that config.Test.GlobalENV.UseLocalCredentials == "true"

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 8, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants