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

✨ Miscellaneous code cleanup #881

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jaswalkiranavtar
Copy link
Member

@jaswalkiranavtar jaswalkiranavtar commented Mar 10, 2025

Summary

Addressing miscellaneous code cleanup:

  1. Extracting string literals to constants.
  2. Updated the blog, since the contribution is completed.
  3. Removed the IAM permission to DescribeCluster and ListCluster, as that is not needed for registration.
  4. Updated the kubeconfig to use absolute path and removed setting the PATH var

Related issue(s)

Fixes ##514

@openshift-ci openshift-ci bot requested review from ldpliu and ramekris3163 March 10, 2025 22:32
@jaswalkiranavtar
Copy link
Member Author

Please review but don't merge yet

@jaswalkiranavtar jaswalkiranavtar changed the title ✨ Gwcp 72225 cleanup ✨ Miscellaneous code cleanup Mar 11, 2025
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 58.00000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 63.72%. Comparing base (c4e706f) to head (21a71d1).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/registration/register/aws_irsa/hub_driver.go 66.66% 9 Missing and 3 partials ⚠️
pkg/common/helpers/aws.go 0.00% 3 Missing ⚠️
...agercontroller/clustermanager_runtime_reconcile.go 0.00% 2 Missing ⚠️
pkg/registration/spoke/spokeagent.go 0.00% 0 Missing and 2 partials ⚠️
...stermanagercontroller/clustermanager_controller.go 0.00% 1 Missing ⚠️
pkg/registration/hub/manager.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #881      +/-   ##
==========================================
- Coverage   63.73%   63.72%   -0.01%     
==========================================
  Files         193      192       -1     
  Lines       18985    18922      -63     
==========================================
- Hits        12100    12058      -42     
+ Misses       5890     5871      -19     
+ Partials      995      993       -2     
Flag Coverage Δ
unit 63.72% <58.00%> (-0.01%) ⬇️

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -190,7 +188,7 @@ func (o *SpokeAgentConfig) RunSpokeAgentWithSpokeInformers(ctx context.Context,

// initiate registration driver
var registerDriver register.RegisterDriver
if o.registrationOption.RegistrationAuth == AwsIrsaAuthType {
if o.registrationOption.RegistrationAuth == helpers.AwsIrsaAuthType {
Copy link
Member

Choose a reason for hiding this comment

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

I think we will need to move this to API repo finally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Could you please elaborate, what to move?

Copy link
Member

@qiujian16 qiujian16 Mar 12, 2025

Choose a reason for hiding this comment

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

AwsIrsaAuthType and CSRAuthType, we do not need to make it in this release.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok thanks, does rest of the PR look to you? If yes, we can get it merged with mike's help tomorrow, after completing the testing.

Copy link
Member

Choose a reason for hiding this comment

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

yes.

Copy link
Member

@mikeshng mikeshng left a comment

Choose a reason for hiding this comment

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

Please review but don't merge yet

/hold

Please feel free to un-hold when you are ready.

@qiujian16
Copy link
Member

/approve

Copy link
Contributor

openshift-ci bot commented Mar 12, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaswalkiranavtar, qiujian16

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants