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

Make verify-codegen.sh script works properly on GitHub Action #1221

Merged
merged 2 commits into from
Jan 7, 2022

Conversation

iawia002
Copy link
Member

@iawia002 iawia002 commented Jan 7, 2022

Signed-off-by: Xinzhao Xu z2d@jifangcheng.com

What type of PR is this?

/kind flake

What this PR does / why we need it:

See our discussion in #1220

The cause of the problem is: in the GitHub Action environment, our code is not in the GOPATH/src/github.com directory, but the deepcopy-gen generates the code into the GOPATH directory, so the deep copy files in the current directory don't actually been updated, this makes our diff tests to always pass.

So I have updated the work directory config in CI to fix this issue.

Which issue(s) this PR fixes:
Fixes #1220

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/flake Categorizes issue or PR as related to a flaky test. labels Jan 7, 2022
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 7, 2022
@iawia002 iawia002 force-pushed the verify-codegen branch 6 times, most recently from 3aed5c4 to 6a30371 Compare January 7, 2022 03:16
@karmada-bot karmada-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 7, 2022
@iawia002 iawia002 changed the title WIP: hack/verify-codegen.sh test Make verify-codegen.sh script works properly on GitHub Action Jan 7, 2022
@karmada-bot karmada-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 7, 2022
@XiShanYongYe-Chang
Copy link
Member

@iawia002 Excellent.

Can you explain a little bit?

@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 7, 2022
@iawia002
Copy link
Member Author

iawia002 commented Jan 7, 2022

@iawia002 Excellent.

Can you explain a little bit?

Hi @XiShanYongYe-Chang I have updated the description of PR, see #1220 for background and more info.

@XiShanYongYe-Chang
Copy link
Member

Hi @XiShanYongYe-Chang I have updated the description of PR, see #1220 for background and more info.

Thanks, I see it.

@XiShanYongYe-Chang
Copy link
Member

Hi, @iawia002 , my own CI can still pass, is there any problem that still existing?

https://github.com/XiShanYongYe-Chang/karmada/runs/4735815303?check_suite_focus=true

@iawia002
Copy link
Member Author

iawia002 commented Jan 7, 2022

Hi, @iawia002 , my own CI can still pass, is there any problem that still existing?

https://github.com/XiShanYongYe-Chang/karmada/runs/4735815303?check_suite_focus=true

Cause your repo name is XiShanYongYe-Chang/karmada but the deepcopy-gen will generate the code into karmada-io/karmada, this works for the main repo only. See the test results for the main repo: https://github.com/karmada-io/karmada/runs/4734865346?check_suite_focus=true

@XiShanYongYe-Chang
Copy link
Member

Cause your repo name is XiShanYongYe-Chang/karmada but the deepcopy-gen will generate the code into karmada-io/karmada, this works for the main repo only.

Ok, I got it.

In this case, for the individual branch, it is impossible to detect that the CI fails in time.

@iawia002
Copy link
Member Author

iawia002 commented Jan 7, 2022

In this case, for the individual branch, it is impossible to detect that the CI fails in time.

I will update the path config to support this case.

Signed-off-by: Xinzhao Xu <z2d@jifangcheng.com>
Signed-off-by: Xinzhao Xu <z2d@jifangcheng.com>
@iawia002
Copy link
Member Author

iawia002 commented Jan 7, 2022

@XiShanYongYe-Chang Can you test 336b979 commit again?

@XiShanYongYe-Chang
Copy link
Member

@XiShanYongYe-Chang Can you test 336b979 commit again?

Yes, let me test it.

@XiShanYongYe-Chang
Copy link
Member

@iawia002 nice 👍 , it works as expected:
https://github.com/XiShanYongYe-Chang/karmada/runs/4735953107?check_suite_focus=true

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Excellent!!!

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 7, 2022
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2022
@karmada-bot karmada-bot merged commit b1a2914 into karmada-io:master Jan 7, 2022
@iawia002 iawia002 deleted the verify-codegen branch January 7, 2022 07:16
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. kind/flake Categorizes issue or PR as related to a flaky test. lgtm Indicates that a PR is ready to be merged. 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.

Deepcopy didn't generate
4 participants