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

Bug 1902702: fix ldap group sync tests and move them from bash to golang #25738

Merged

Conversation

stlaz
Copy link
Member

@stlaz stlaz commented Dec 3, 2020

/assign @soltysh
cc @sallyom

/hold
it's not yet finished, but perhaps already worth a PR

Currently, on my machine, the test takes ~4minutes, which is a huge difference from the original ~20min. It's caused by the original test actually starting a pod and installing a bunch of deps in it...

edit: with all tests added, it's now around 8 minutes, but that's still quite an improvement

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Dec 3, 2020
@openshift-ci-robot openshift-ci-robot added the vendor-update Touching vendor dir or related files label Dec 4, 2020
@stlaz stlaz changed the title [wip] fix ldap group sync tests and move them from bash to golang Bug 1902702: fix ldap group sync tests and move them from bash to golang Dec 4, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Dec 4, 2020
@openshift-ci-robot
Copy link

@stlaz: This pull request references Bugzilla bug 1902702, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1902702: fix ldap group sync tests and move them from bash to golang

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.

@stlaz
Copy link
Member Author

stlaz commented Dec 4, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2020
@openshift-ci-robot
Copy link

@stlaz: This pull request references Bugzilla bug 1902702, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1902702: fix ldap group sync tests and move them from bash to golang

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.

@stlaz
Copy link
Member Author

stlaz commented Dec 4, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. labels Dec 4, 2020
@openshift-ci-robot
Copy link

@stlaz: This pull request references Bugzilla bug 1902702, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Dec 4, 2020
@stlaz
Copy link
Member Author

stlaz commented Dec 7, 2020

/retest
the serial test passed, though 🎉

@openshift-merge-robot
Copy link
Contributor

openshift-merge-robot commented Dec 7, 2020

@stlaz: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-gcp-builds d11d987 link /test e2e-gcp-builds
ci/prow/e2e-gcp d11d987 link /test e2e-gcp

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.

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

Left you some comments.

@@ -56,7 +56,8 @@ var _ = g.Describe("[sig-auth][Feature:LDAP][Serial] ldap group sync", func() {
o.Expect(err).NotTo(o.HaveOccurred())

// Copy groupsync test data
err = pod.CopyFromHost(path.Join("test", "extended", "authentication", "ldap"), remoteTmp)
groupSyncTestDir := testdata.MustAsset("test/extended/testdata/ldap/groupsync")
Copy link
Member

Choose a reason for hiding this comment

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

Nice, I wasn't aware of that one 👍

test/extended/oauth/groupsync.go Outdated Show resolved Hide resolved

pod, err := exutil.NewPodExecutor(oc, "groupsync", image.OpenLDAPTestImage())
o.Expect(err).NotTo(o.HaveOccurred())
portFwdCmd := exec.CommandContext(ctx, "oc", "port-forward", "svc/"+ldapName, "30389:389", "-n", ldapNS)
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason for manually invoking the command instead of using oc.Run("port-forward").Args(svc/"+ldapName, "30389:389", "-n", ldapNS).Execute()?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to be able to gracefully terminate the command as the test finishes with the context cancellation.

Copy link
Member

Choose a reason for hiding this comment

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

Fair.

test/extended/oauth/groupsync.go Outdated Show resolved Hide resolved
test/extended/oauth/groupsync.go Outdated Show resolved Hide resolved
test/extended/oauth/groupsync.go Outdated Show resolved Hide resolved
test/extended/oauth/groupsync.go Outdated Show resolved Hide resolved
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 17, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 4, 2021
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

12 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@stlaz
Copy link
Member Author

stlaz commented Jan 18, 2021

/hold
there appear to have been some "selfLink" shenanigans

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 18, 2021
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 18, 2021
Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/hold cancel
/retest
/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 18, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: soltysh, stlaz

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-merge-robot openshift-merge-robot merged commit 56333ce into openshift:master Jan 18, 2021
@openshift-ci-robot
Copy link

@stlaz: All pull requests linked via external trackers have merged:

Bugzilla bug 1902702 has been moved to the MODIFIED state.

In response to this:

Bug 1902702: fix ldap group sync tests and move them from bash to golang

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.

@openshift-cherrypick-robot

@stlaz: #25738 failed to apply on top of branch "release-4.6":

Applying: move ldap group sync testdata to bindata
Applying: move ldap groupsync tests from bash into golang
Using index info to reconstruct a base tree...
M	test/extended/oauth/groupsync.go
M	test/extended/oauth/oauth_ldap.go
M	test/extended/util/ldap.go
Falling back to patching base and 3-way merge...
Auto-merging test/extended/util/ldap.go
Removing test/extended/testdata/ldap/groupsync.sh
Auto-merging test/extended/oauth/oauth_ldap.go
Auto-merging test/extended/oauth/groupsync.go
CONFLICT (content): Merge conflict in test/extended/oauth/groupsync.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 move ldap groupsync tests from bash into golang
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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.

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants