Multi-tenant Changes for Precooking/Recooking #139
Open
gravi21 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds multi-tenant propagation for XCRP precook/recook flows by threading a tenantId through the XCRP connector calls and sending it as an outbound request header.
Changes:
- Updated
XcrpConnector.PostRecookandGetRecookingStatusFromCanaryMgrto accept atenantIdand include it in request headers. - Updated the recooking lockdown handler to pass
tenantIdinto XCRP connector calls. - Updated unit tests to call the new method signatures.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| http/xcrp_connector.go | Adds tenantId parameter and sends a tenant header to XCRP calls. |
| http/xcrp_connector_test.go | Updates tests for the new method signatures. |
| common/const_var.go | Introduces a new tenant header constant. |
| adminapi/xcrp/recooking_lockdown_settings_handler.go | Passes tenantId into connector calls for recook and status checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| HeaderAccountID = "X-System-AccountID" | ||
| HeaderXconfDataService = "XconfDataService" | ||
| HeaderXconfAdminService = "XconfAdminService" | ||
| HeaderTenantID = "TenantId" |
Comment on lines
118
to
123
| headers := map[string]string{ | ||
| common.HeaderUserAgent: common.HeaderXconfAdminService, | ||
| common.HeaderTenantID: tenantId, | ||
| } | ||
| response, err := c.DoWithRetries("GET", url, headers, nil, nil, xcrpServiceName) | ||
| if err != nil { |
Comment on lines
112
to
118
| models := []string{"RNG150", "XB6"} | ||
| partners := []string{"comcast", "cox"} | ||
| requestBody := []byte(`{"test":"data"}`) | ||
|
|
||
| err := connector.PostRecook(models, partners, requestBody, log.Fields{}) | ||
| err := connector.PostRecook("testtenant", models, partners, requestBody, log.Fields{}) | ||
|
|
||
| if err != nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.