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

e2e: init docker image #1028

Merged

Conversation

Tal-or
Copy link
Contributor

@Tal-or Tal-or commented Jan 11, 2023

The docker image that used during e2e test
composed of repo and tag flags that are
passed to the test itself.

The problem is that the docker image initialized
before the flags are parsed. Hence, it will always contains the default flags value.
Initialize the flag in later stage, fixing the issue.

Also, moving the global variables to e2e_test.go since it commonly used by all tests.

Signed-off-by: Talor Itzhak [email protected]

@netlify
Copy link

netlify bot commented Jan 11, 2023

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 97ca4de
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/63becb8f8004430009eb3b61
😎 Deploy Preview https://deploy-preview-1028--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 11, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @Tal-or. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 11, 2023
@Tal-or
Copy link
Contributor Author

Tal-or commented Jan 11, 2023

@marquiz I would also append the test suffix for the test files:
node_feature_discovery_test.go
topology_updater_test.go
so the global variables would be recognized in modern IDE's such as Goland.

WDYT?

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Uh-oh, thanks @Tal-or for catching this one. I had just one suggestion to drop the "caching" variable for good

ping @fmuyassarov

test/e2e/e2e_test.go Outdated Show resolved Hide resolved
@marquiz
Copy link
Contributor

marquiz commented Jan 11, 2023

I would also append the test suffix for the test files:
node_feature_discovery_test.go
topology_updater_test.go
so the global variables would be recognized in modern IDE's such as Goland.

Sure, go ahead, I don't have anything against that. But probably in a separate PR (?)

@Tal-or Tal-or force-pushed the docker_image_init branch from a70124b to 98ec7fb Compare January 11, 2023 12:12
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 11, 2023
Tal-or added a commit to k8stopologyawareschedwg/node-feature-discovery that referenced this pull request Jan 11, 2023
This PR is a result of conversation started here:
kubernetes-sigs#1028 (comment)

Signed-off-by: Talor Itzhak <[email protected]>
@Tal-or
Copy link
Contributor Author

Tal-or commented Jan 11, 2023

I would also append the test suffix for the test files:
node_feature_discovery_test.go
topology_updater_test.go
so the global variables would be recognized in modern IDE's such as Goland.

Sure, go ahead, I don't have anything against that. But probably in a separate PR (?)

Done #1029

Copy link
Member

@fmuyassarov fmuyassarov left a comment

Choose a reason for hiding this comment

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

/ok-to-test
/lgtm
Thanks for the fix.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 11, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 11, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3cddc067abf5cb61a647eafe8be19f8710a15c92

@marquiz
Copy link
Contributor

marquiz commented Jan 11, 2023

Ach, needs rebase 🙃 Otherwise LGTM

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2023
The docker image that used during e2e test
composed of repo and tag flags that are
passed to the test itself.

The problem is that the docker image initialized
before the flags are parsed. Hence, it will always contains
the default flags value.
Moving the variable into a separate function, fixing the issue.

Also, moving the global variables to `e2e_test.go` since
it commonly used by all tests.

Signed-off-by: Talor Itzhak <[email protected]>
@Tal-or Tal-or force-pushed the docker_image_init branch from 98ec7fb to 97ca4de Compare January 11, 2023 14:45
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 11, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2023
@Tal-or
Copy link
Contributor Author

Tal-or commented Jan 11, 2023

Ach, needs rebase upside_down_face Otherwise LGTM

Done

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Thx @Tal-or!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 11, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a58d3ff3b0ff50b12fde1292741cf2b0a1d0ee79

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marquiz, Tal-or

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2023
@k8s-ci-robot k8s-ci-robot merged commit 497e6c7 into kubernetes-sigs:master Jan 11, 2023
@marquiz
Copy link
Contributor

marquiz commented Jan 17, 2023

/cherry-pick release-0.12

@k8s-infra-cherrypick-robot

@marquiz: #1028 failed to apply on top of branch "release-0.12":

Applying: e2e: init docker image
Using index info to reconstruct a base tree...
A	test/e2e/node_feature_discovery_test.go
A	test/e2e/topology_updater_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/node_feature_discovery.go
CONFLICT (content): Merge conflict in test/e2e/node_feature_discovery.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 e2e: init docker image
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-0.12

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.

yevgeny-shnaidman pushed a commit to yevgeny-shnaidman/node-feature-discovery that referenced this pull request Feb 23, 2023
This PR is a result of conversation started here:
kubernetes-sigs/node-feature-discovery#1028 (comment)

Signed-off-by: Talor Itzhak <[email protected]>
@marquiz marquiz mentioned this pull request Apr 12, 2023
24 tasks
cruizen pushed a commit to platform9/node-feature-discovery that referenced this pull request Mar 12, 2024
This PR is a result of conversation started here:
kubernetes-sigs#1028 (comment)

Signed-off-by: Talor Itzhak <[email protected]>
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants