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

feat: deprecate and remove fields for connector #585

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

arkbriar
Copy link
Collaborator

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • As title. The change removes the fields for connector support.

On upgrade:

  • Once the new CRDs applied, the fields of RW objects in k8s will be removed automatically.
  • The existing connector service, statefulset and pods will still be there but won't be touched anymore.
  • StatefulSet / Pods / Service will be deleted automatically on deletion of the RW object.

On rollback:

  • All the fields will be back but the values will be reset. That means the connector Pods will be deleted on rollback if not manually deleted after upgrade.

Checklist

  • I have written the necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

fix #543

@arkbriar arkbriar added the breaking-change It's a breaking change label Jan 23, 2024
@arkbriar arkbriar mentioned this pull request Jan 23, 2024
2 tasks
Copy link
Contributor

@wjf3121 wjf3121 left a comment

Choose a reason for hiding this comment

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

What will the behavior be for existing RW CR still with connector nodes once we rolled out this change to our production env?

@arkbriar
Copy link
Collaborator Author

What will the behavior be for existing RW CR still with connector nodes once we rolled out this change to our production env?

Will be like the following

On upgrade:

  • Once the new CRDs applied, the fields of RW objects in k8s will be removed automatically.
  • The existing connector service, statefulset and pods will still be there but won't be touched anymore.
  • StatefulSet / Pods / Service will be deleted automatically on deletion of the RW object.

@arkbriar arkbriar force-pushed the shunjie/deprecate-connector-component branch from 4b2996a to 679e03c Compare January 23, 2024 05:45
@arkbriar arkbriar changed the base branch from main to shunjie/fix-panic-on-standalone-deployment January 23, 2024 05:45
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (7da9f57) 61.85% compared to head (b11b623) 63.00%.

Files Patch % Lines
pkg/manager/risingwave_controller_manager_impl.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #585      +/-   ##
==========================================
+ Coverage   61.85%   63.00%   +1.15%     
==========================================
  Files          28       28              
  Lines        4868     4701     -167     
==========================================
- Hits         3011     2962      -49     
+ Misses       1808     1690     -118     
  Partials       49       49              
Flag Coverage Δ
unittests 63.00% <0.00%> (+1.15%) ⬆️

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.

Base automatically changed from shunjie/fix-panic-on-standalone-deployment to main January 23, 2024 09:33
@wjf3121
Copy link
Contributor

wjf3121 commented Jan 23, 2024

What will the behavior be for existing RW CR still with connector nodes once we rolled out this change to our production env?

Will be like the following

On upgrade:

  • Once the new CRDs applied, the fields of RW objects in k8s will be removed automatically.
  • The existing connector service, statefulset and pods will still be there but won't be touched anymore.
  • StatefulSet / Pods / Service will be deleted automatically on deletion of the RW object.

Thanks, I missed the PR description. I have 2 follow-up question:

  1. Shall we remove the usage of Connector node in control plane code first? (We still have some usage like this)
  2. Do we need to clean up all the existing connector node to avoid waste of resources? Once this change is rolled out, we have no control to these connector node resources.

@arkbriar
Copy link
Collaborator Author

What will the behavior be for existing RW CR still with connector nodes once we rolled out this change to our production env?

Will be like the following

On upgrade:

  • Once the new CRDs applied, the fields of RW objects in k8s will be removed automatically.
  • The existing connector service, statefulset and pods will still be there but won't be touched anymore.
  • StatefulSet / Pods / Service will be deleted automatically on deletion of the RW object.

Thanks, I missed the PR description. I have 2 follow-up question:

  1. Shall we remove the usage of Connector node in control plane code first? (We still have some usage like this)
  2. Do we need to clean up all the existing connector node to avoid waste of resources? Once this change is rolled out, we have no control to these connector node resources.
  1. In most cases, it's okay to leave them as is. The deserialization will ignore the missing fields if they are tagged with omitempty. The PR could be merged first and we can update the control plane accordingly.

However, there's a field doesn't have the tag. This will result in deserialization failure and break the cloud agent.

	// Running status of connector.
	Connector ComponentReplicasStatus `json:"connector"`

I will keep it in this PR and remove it later.

  1. Good point! We should.

@arkbriar
Copy link
Collaborator Author

Reverted the deletion of .status.componentReplicas.connector. Also add tag omitempty to all the internal fields so that it will be safe to remove the field.

Copy link
Contributor

@wjf3121 wjf3121 left a comment

Choose a reason for hiding this comment

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

LGTM!

Shall we create an issue to track the clean up of connector nodes (I assume it's orthogonal to the deprecation and can be done in parallel)?

@arkbriar
Copy link
Collaborator Author

arkbriar commented Jan 24, 2024

Shall we create an issue to track the clean up of connector nodes (I assume it's orthogonal to the deprecation and can be done in parallel)?

Yes, sounds great!

Tracked here.

@arkbriar arkbriar added this pull request to the merge queue Jan 24, 2024
Merged via the queue into main with commit bc9e93f Jan 24, 2024
9 of 10 checks passed
@arkbriar arkbriar deleted the shunjie/deprecate-connector-component branch January 24, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change It's a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated dedicated connectors
2 participants