Skip to content

Multi-tenant Changes for Precooking/Recooking #139

Open
gravi21 wants to merge 1 commit into
develop-multi-tenantfrom
gopi-develop-multi-tenant
Open

Multi-tenant Changes for Precooking/Recooking #139
gravi21 wants to merge 1 commit into
develop-multi-tenantfrom
gopi-develop-multi-tenant

Conversation

@gravi21

@gravi21 gravi21 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 6, 2026 14:46
@gravi21 gravi21 changed the base branch from main to develop-multi-tenant July 6, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.PostRecook and GetRecookingStatusFromCanaryMgr to accept a tenantId and include it in request headers.
  • Updated the recooking lockdown handler to pass tenantId into 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.

Comment thread common/const_var.go
HeaderAccountID = "X-System-AccountID"
HeaderXconfDataService = "XconfDataService"
HeaderXconfAdminService = "XconfAdminService"
HeaderTenantID = "TenantId"
Comment thread http/xcrp_connector.go
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 {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants