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

Add GitHub tests for karmadactl init --config command #5306

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

tiansuo114
Copy link
Contributor

@tiansuo114 tiansuo114 commented Aug 6, 2024

What type of PR is this?

What this PR does / why we need it:
This PR is an additional test, based on the suggestion provided in url.
Which issue(s) this PR fixes:
Part of #5387
It adds test cases for deploying Karmada services using the karmadactl init --config command with a configuration file, similar to the existing tests for karmadactl init.

Special notes for your reviewer:
@liangyuanpeng
@RainbowMango

This PR currently contains two commits because the test files depend on the new feature for deploying with a configuration file, introduced in #5357. Once that PR is merged, this PR will be rebased, retaining only the commit for adding test cases. However, to save time, it is being submitted for review in advance.

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 6, 2024
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 6, 2024
@tiansuo114 tiansuo114 changed the title Add config list Added karmadactl command line tool feature :karmadactl config image list Aug 6, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.67%. Comparing base (9754a28) to head (4ceb01d).
Report is 8 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5306      +/-   ##
==========================================
+ Coverage   41.64%   41.67%   +0.02%     
==========================================
  Files         653      653              
  Lines       55484    55518      +34     
==========================================
+ Hits        23109    23135      +26     
- Misses      30876    30883       +7     
- Partials     1499     1500       +1     
Flag Coverage Δ
unittests 41.67% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@tiansuo114
Copy link
Contributor Author

May need help😭😭, in my own project's github action, these tests passed correctly, but when I commit, these tests become failed, what should I do to fix these problems
@liangyuanpeng

@liangyuanpeng
Copy link
Contributor

/assign
/retest

@liangyuanpeng
Copy link
Contributor

/ok-to-test

Copy link
Contributor

@liangyuanpeng liangyuanpeng left a comment

Choose a reason for hiding this comment

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

Thanks you working for it, could you please add some e2e test here? Maybe take a look at how kubeadm does it.

pkg/karmadactl/cmdinit/kubernetes/deploy.go Outdated Show resolved Hide resolved
pkg/karmadactl/config/init/list_option.go Outdated Show resolved Hide resolved
pkg/karmadactl/config/init/list_option.go Outdated Show resolved Hide resolved
@karmada-bot karmada-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 8, 2024
@tiansuo114
Copy link
Contributor Author

tiansuo114 commented Aug 9, 2024

Thanks you working for it, could you please add some e2e test here? Maybe take a look at how kubeadm does it.感谢您的工作,您可以在此处添加一些 e2e 测试吗?也许看看 kubeadm 是如何做到的。

I have fixed the issues you pointed out and provided new e2e test cases. Please let me know if there are any further modifications needed. :)

@tiansuo114
Copy link
Contributor Author

This PR is related to the documentation PR: #5277

@liangyuanpeng
Copy link
Contributor

This PR is related to the documentation PR: #5277

@tiansuo114

Add to PR issue body would be great, thank you!

image

@tiansuo114
Copy link
Contributor Author

This PR is related to the documentation PR: #5277此 PR 与文档 PR 相关: #5277

@tiansuo114

Add to PR issue body would be great, thank you!添加到 PR 问题正文会很棒,谢谢!

image

Ok, I modified the pr and the other two questions about pr and added links to it

@XiShanYongYe-Chang
Copy link
Member

Ask @zhzhuang-zju have a look.
/assign @zhzhuang-zju

pkg/karmadactl/karmadactl.go Outdated Show resolved Hide resolved
pkg/karmadactl/cmdinit/kubernetes/deploy.go Outdated Show resolved Hide resolved
@liangyuanpeng
Copy link
Contributor

#5744 is migration to here (for Summer OSPP 2024)

@tiansuo114
Copy link
Contributor Author

Based on the OSPP project's requirements, this PR has been reopened. However, the relevant content in this PR has been changed to add automated testing for the new karmadactl init --config command as indicated in the link.

@liangyuanpeng @RainbowMango @zhzhuang-zju

@tiansuo114 tiansuo114 reopened this Oct 28, 2024
@tiansuo114 tiansuo114 changed the title Added karmadactl command line tool feature :karmadactl config image list Add tests for deploying Karmada services using the configuration file with the karmadactl init --config command. Oct 28, 2024
@tiansuo114
Copy link
Contributor Author

/hold cancel

@karmada-bot karmada-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2024
@tiansuo114
Copy link
Contributor Author

#5744 is migration to here (for Summer OSPP 2024)

The code in this PR has been re-pushed and tested, and after a code clean-up, I’ve removed the unnecessary metadata part in KarmadaInitConfig. We can now continue with the previous review.🎉

If need to track this issue, please refer to the relevant changes in this PR.
@RainbowMango @liangyuanpeng

Copy link
Contributor

@liangyuanpeng liangyuanpeng left a comment

Choose a reason for hiding this comment

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

thank you!
/lgtm
/cc @zhzhuang-zju if you want to review for karmadactl

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2024
@karmada-bot
Copy link
Collaborator

@liangyuanpeng: GitHub didn't allow me to request PR reviews from the following users: want, to, review, for, if, you.

Note that only karmada-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

thank you!
/lgtm
/cc @zhzhuang-zju if you want to review for karmadactl

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.

@RainbowMango RainbowMango changed the title Add tests for deploying Karmada services using the configuration file with the karmadactl init --config command. Add GitHub tests for karmadactl init --config command Oct 29, 2024
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.

Looks good to me, just a nit, otherwise LGTM.

uses: actions/upload-artifact@v4
with:
name: karmadactl_config_test_logs_${{ matrix.k8s }}
path: ${{ github.workspace }}/karmadactl-test-logs/${{ matrix.k8s }}/config/
Copy link
Member

Choose a reason for hiding this comment

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

end of line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean it’s best to add a blank line at the end of the line? If so, the code has already been updated. If I’ve misunderstood, please feel free to correct me.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean it’s best to add a blank line at the end of the line?

correct

Signed-off-by: tiansuo114 <1729765480@qq.com>
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2024
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
/assign @liangyuanpeng

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2024
@RainbowMango
Copy link
Member

It seems this is the last PR for the summer OSPP program. #5387.
Please let me know if I miss anything.

@tiansuo114
Copy link
Contributor Author

It seems this is the last PR for the summer OSPP program. #5387. Please let me know if I miss anything.

Yes, this PR is the last one for the OSPP tasks. Up until now, with the merge of this PR into the main branch, all planned PRs have been incorporated into Karmada.
PR Link 1: #5277
PR Link 2: #5306
PR Link 3: #5357
PR Link 4: karmada-io/website#690
PR Link 5: #5321

@liangyuanpeng
Copy link
Contributor

It seems this is the last PR for the summer OSPP program. #5387.

Yes, it is.
/lgtm
/approve

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.

/approve

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liangyuanpeng, 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 Oct 29, 2024
@karmada-bot karmada-bot merged commit 07c6cb4 into karmada-io:master Oct 29, 2024
18 checks passed
@tiansuo114 tiansuo114 deleted the config branch November 23, 2024 02: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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants