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

Skip directories when reading credentials requests #459

Merged

Conversation

thunderboltsid
Copy link
Contributor

Ensure directories and non-yaml files are skipped when reading
CredentialsRequests.

@thunderboltsid thunderboltsid changed the title Skip directories when reading credentials requests WIP: Skip directories when reading credentials requests Apr 12, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 12, 2022
@thunderboltsid thunderboltsid changed the title WIP: Skip directories when reading credentials requests Skip directories when reading credentials requests Apr 12, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 12, 2022
@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #459 (567b183) into master (ed06129) will decrease coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #459      +/-   ##
==========================================
- Coverage   45.50%   45.49%   -0.01%     
==========================================
  Files          94       94              
  Lines        9389     9391       +2     
==========================================
  Hits         4272     4272              
- Misses       4608     4609       +1     
- Partials      509      510       +1     
Impacted Files Coverage Δ
pkg/cmd/provisioning/utils.go 75.49% <33.33%> (-1.51%) ⬇️

@thunderboltsid
Copy link
Contributor Author

/retest-required

1 similar comment
@thunderboltsid
Copy link
Contributor Author

/retest-required

pkg/cmd/provisioning/utils_test.go Outdated Show resolved Hide resolved
pkg/cmd/provisioning/utils.go Outdated Show resolved Hide resolved
@@ -178,7 +178,7 @@ spec:

credReq := fmt.Sprintf(credReqTemplate, crName, targetSecretNamespace, targetSecretName)

f, err := ioutil.TempFile(targetDir, "testCredReq")
f, err := ioutil.TempFile(targetDir, "testCredReq*.yaml")
Copy link
Contributor

Choose a reason for hiding this comment

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

can we keep testCredReq.yaml instead of testCredReq*.yaml. Is there any advantage of appending a random string here?

Copy link
Contributor Author

@thunderboltsid thunderboltsid Apr 15, 2022

Choose a reason for hiding this comment

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

It's about appending the random string in the right place. ioutil.TempFile always appends a random string as a suffix unless a * is present in the string in which case it substitutes the last * with the random string.

Created a Go Playground link to demonstrate this https://go.dev/play/p/QL4iILFWruY

@akhil-rane
Copy link
Contributor

/test e2e-aws-manual-oidc

Ensure directories and non-yaml files are skipped when reading
CredentialsRequests.
@thunderboltsid
Copy link
Contributor Author

/retest-required

1 similar comment
@thunderboltsid
Copy link
Contributor Author

/retest-required

@thunderboltsid
Copy link
Contributor Author

/retest

@thunderboltsid
Copy link
Contributor Author

/retest-required

1 similar comment
@thunderboltsid
Copy link
Contributor Author

/retest-required

@akhil-rane
Copy link
Contributor

/test e2e-aws-manual-oidc

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 18, 2022

@thunderboltsid: all tests passed!

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/test-infra repository. I understand the commands that are listed here.

@akhil-rane
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 18, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 18, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akhil-rane, thunderboltsid

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

The pull request process is described 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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 18, 2022
@akhil-rane
Copy link
Contributor

This does not change anything functionality-wise.

/label px-aprroved
/label docs-approved
/label qe-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR qe-approved Signifies that QE has signed off on this PR labels Apr 18, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 18, 2022

@akhil-rane: The label(s) /label px-aprroved cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, downstream-change-needed, backport-risk-assessed, cherry-pick-approved

In response to this:

This does not change anything functionality-wise.

/label px-aprroved
/label docs-approved
/label qe-approved

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/test-infra repository.

@akhil-rane
Copy link
Contributor

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Apr 18, 2022
@openshift-merge-robot openshift-merge-robot merged commit 1dbf1b6 into openshift:master Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants