Skip to content

chore: Rebrand service name: RLA -> Flow#508

Merged
kunzhao-nv merged 2 commits intomainfrom
chore/rla-to-flow
May 9, 2026
Merged

chore: Rebrand service name: RLA -> Flow#508
kunzhao-nv merged 2 commits intomainfrom
chore/rla-to-flow

Conversation

@kunzhao-nv
Copy link
Copy Markdown
Contributor

@kunzhao-nv kunzhao-nv commented May 8, 2026

Description

Renames Go identifiers, package/file names, and internal CLI flag + JSON tag keys (zero deploy callers, audited). 5 thin commits: directories, api/, site-workflow/, build glue + proto file rename, site-agent/.

Untouched (follow-ups, ship with deploy changes):

  • proto service RLA, generated RLAClient / RLAServer /
    RLA_*_FullMethodName (gRPC wire)
  • RLA_* env vars, DNS rla.rla.svc.cluster.local:50051
  • Helm / Docker / Makefile binary + image names

Type of Change

  • Feature - New feature or functionality (feat:)
  • Fix - Bug fixes (fix:)
  • Chore - Modification or removal of existing functionality (chore:)
  • Refactor - Refactoring of existing functionality (refactor:)
  • Docs - Changes in documentation or OpenAPI schema (docs:)
  • CI - Changes in GitHub workflows. Requires additional scrutiny (ci:)
  • Version - Issuing a new release version (version:)

Services Affected

  • API - API models or endpoints updated
  • Workflow - Workflow service updated
  • DB - DB DAOs or migrations updated
  • Site Manager - Site Manager updated
  • Cert Manager - Cert Manager updated
  • Site Agent - Site Agent updated
  • RLA - RLA service updated
  • Powershelf Manager - Powershelf Manager updated
  • NVSwitch Manager - NVSwitch Manager updated

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@kunzhao-nv kunzhao-nv requested a review from a team as a code owner May 8, 2026 21:43
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 8, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kunzhao-nv kunzhao-nv changed the title Chore: Rebrand internal name **RLA** -> **Flow** Chore: Rebrand internal name: RLA -> Flow May 8, 2026
@kunzhao-nv kunzhao-nv changed the title Chore: Rebrand internal name: RLA -> Flow Chore: Rebrand service name: RLA -> Flow May 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Test Results

9 289 tests  ±0   9 289 ✅ ±0   6m 35s ⏱️ -46s
  154 suites ±0       0 💤 ±0 
   14 files   ±0       0 ❌ ±0 

Results for commit 205e4bd. ± Comparison against base commit 5cfe1d9.

This pull request removes 1197 and adds 1197 tests. Note that renamed tests count towards both.
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestCancelTaskHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetAllRackHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetAllTrayHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetRackHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetTaskHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetTrayHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateRackHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateRacksHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateTrayHandler_Handle/failure_-_RLA_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateTraysHandler_Handle/failure_-_RLA_not_enabled_on_site
…
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestCancelTaskHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetAllRackHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetAllTrayHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetRackHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetTaskHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestGetTrayHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateRackHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateRacksHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateTrayHandler_Handle/failure_-_Flow_not_enabled_on_site
github.com/NVIDIA/infra-controller-rest/api/pkg/api/handler ‑ TestValidateTraysHandler_Handle/failure_-_Flow_not_enabled_on_site
…

♻️ This comment has been updated with latest results.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f5755b72-050c-41a7-a5ae-747e9f906ba9

📥 Commits

Reviewing files that changed from the base of the PR and between b3b4dbd and 205e4bd.

📒 Files selected for processing (2)
  • .github/workflows/build-binaries.yml
  • .github/workflows/lint-and-test.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/lint-and-test.yml
  • .github/workflows/build-binaries.yml

Summary by CodeRabbit

  • New Features

    • System-wide switch to the Flow protocol for rack, tray, task, power and firmware operations.
  • Updates

    • CI/build tooling and local/production images now build and validate against Flow.
    • CLI and service commands operate against Flow implementations; local mock/server readiness updated.
  • Documentation

    • Guides, READMEs and a new Flow gRPC reference updated to reflect Flow usage and generation steps.
  • Tests

    • Test suites migrated to use Flow types and fixtures.

Walkthrough

Repository-wide retarget: replace rla with flow across CI/codegen/docs, API models/handlers/tests, CLI/Docker, and internal packages; protobuf generation now uses flow.proto and flowv1 types.

Changes

Flow migration

Layer / File(s) Summary
CI, build, codegen, docs
.github/workflows/*, Makefile, flow/Makefile, flow/docs/*
CI/workflows and Makefiles now run generation for flow and reference flow.proto/flow package metadata.
Protobuf / codegen
flow/internal/*/buf.gen.yaml, flow/internal/nsmapi/nsmproto/*, flow/docs/grpc-api.md
Buf overrides and go_package prefixes updated; added generated flow proto reference doc.
API handlers & util
api/pkg/api/handler/*, api/pkg/api/handler/util/common/common.go, api/pkg/api/routes.go
Handlers and helpers now build/consume flowv1 requests/responses and updated Swagger descriptions/routes labels.
Public API models
api/pkg/api/model/*
Model converters, filter/order-by builders, target-spec constructors, and response mappings switched from rlav1 → flowv1; several method signatures updated to accept flow types.
API tests
api/pkg/api/handler/*_test.go, api/pkg/api/model/*_test.go
Tests updated to construct and assert flowv1 protobuf messages, UUID/task ID types, diffs, and filters.
CLI & Docker
flow/cmd/*, docker/*, flow/README.md
CLI commands switched imports to flow client/types; Dockerfiles build using flow package metadata.
Internal packages (imports)
flow/internal/**
Wide import retargeting from rla/* → flow/* across clients (nico/psm/nsm), scheduler, task executor/workflows, component managers, converters, DB models, and service wiring; behavior largely unchanged.
Temporal/task helpers & workflows
flow/internal/task/executor/temporalworkflow/**/*
Temporal executor, activities, and workflows now import task/common/operations from flow namespaces; orchestration logic unchanged.
Component manager & providers
flow/internal/task/componentmanager/**/*
Component manager interfaces, providers, and mocks retargeted to flow packages; exported signatures reference flow devicetypes/common types.
DB, converters, scheduler, service
flow/internal/db/*, flow/internal/converter/*, flow/internal/scheduler/*, flow/internal/service/*
DB models, converters, scheduler jobs, and service server imports updated to flow module paths; public APIs preserved but now refer to flow-scoped types.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/rla-to-flow

@kunzhao-nv kunzhao-nv changed the title Chore: Rebrand service name: RLA -> Flow chore: Rebrand service name: RLA -> Flow May 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-05-08 21:50:13 UTC | Commit: a9bbc03

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
flow/internal/task/conflict/conflict.go (1)

18-43: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale “RLA” wording in comments to “Flow”.

The package-level and builtinRule comments still reference RLA, which makes this rebrand incomplete from a maintainability/readability standpoint.

Suggested patch
-// Package conflict provides data-driven task conflict detection for RLA.
+// Package conflict provides data-driven task conflict detection for Flow.
...
-// builtinRule is the code-defined selective conflict policy for RLA.
+// builtinRule is the code-defined selective conflict policy for Flow.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/internal/task/conflict/conflict.go` around lines 18 - 43, Update package
and symbol comments that still use the old product name "RLA" to the new name
"Flow": change the package-level doc comment and the comment for builtinRule to
replace "RLA" with "Flow" so terminology is consistent across the file
(references: the package comment at top of conflict.go and the comment
immediately above builtinRule). Ensure wording remains otherwise identical and
compile-time symbols (package conflict, builtinRule) are unchanged.
flow/cmd/firmware_upgrade.go (1)

176-180: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale RLA wording in failure path to match Flow-facing CLI context.

Line 179 still logs "Failed to create RLA client", which is confusing after migrating this command to Flow imports. Please update the operator-facing wording.

Proposed patch
-	// Create RLA client
+	// Create Flow client
 	rlaClient, err := client.New(newGlobalClientConfig())
 	if err != nil {
-		log.Fatal().Msgf("Failed to create RLA client: %v", err)
+		log.Fatal().Msgf("Failed to create Flow client: %v", err)
 	}

As per coding guidelines, "Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/cmd/firmware_upgrade.go` around lines 176 - 180, The log message uses
stale "RLA" wording in the failure path when creating the client; update the
error text in the block that calls client.New(newGlobalClientConfig()) (the
rlaClient variable and its error handling using log.Fatal().Msgf) to an
operator-facing Flow-appropriate message (e.g., "Failed to create Flow client"
or "Failed to create client") so the wording matches the Flow CLI context.
api/pkg/api/model/firmware.go (1)

50-63: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Return nil from the constructor on nil proto input.

On Line 62, NewAPIUpdateFirmwareResponse(nil) currently returns an empty object. The model-constructor guideline for this package expects nil in this case.

Proposed fix
 func NewAPIUpdateFirmwareResponse(resp *flowv1.SubmitTaskResponse) *APIUpdateFirmwareResponse {
+	if resp == nil {
+		return nil
+	}
 	r := &APIUpdateFirmwareResponse{}
 	r.FromProto(resp)
 	return r
 }

As per coding guidelines: API model types constructed from a proto in handlers should expose a func NewAPIX(p *protoX) *APIX wrapper that returns nil for a nil proto and otherwise builds the value and calls FromProto.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/pkg/api/model/firmware.go` around lines 50 - 63, The constructor
NewAPIUpdateFirmwareResponse should return nil when passed a nil proto: update
NewAPIUpdateFirmwareResponse(resp *flowv1.SubmitTaskResponse)
*APIUpdateFirmwareResponse to check if resp == nil and return nil; otherwise
allocate an APIUpdateFirmwareResponse, call its FromProto(resp) to populate
fields (which already handles nil defensively), and return the pointer. Ensure
you reference NewAPIUpdateFirmwareResponse, APIUpdateFirmwareResponse, and
FromProto in the change.
api/pkg/api/handler/task.go (1)

318-325: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the Flow name in this precondition response.

This branch was updated to describe “Flow sites”, but the log and API error still say “Rack Level Administration enabled”. That leaves stale user-facing branding in the renamed path.

Suggested change
-		logger.Warn().Msg("site does not have Rack Level Administration enabled")
-		return cutil.NewAPIErrorResponse(c, http.StatusPreconditionFailed, "Site does not have Rack Level Administration enabled", nil)
+		logger.Warn().Msg("site does not have Flow enabled")
+		return cutil.NewAPIErrorResponse(c, http.StatusPreconditionFailed, "Site does not have Flow enabled", nil)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/pkg/api/handler/task.go` around lines 318 - 325, The precondition message
still uses the old "Rack Level Administration" branding; update the user-facing
log and API error to reference "Flow sites" instead. In the branch checking
siteConfig.RackLevelAdministration (in task handler, where logger.Warn().Msg and
cutil.NewAPIErrorResponse are called), change the warning string and the API
error message to say that the site is not a Flow site or does not have Flow
enabled so messages remain consistent with the renamed path.
api/pkg/api/model/task.go (1)

49-74: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Guard missing timestamps and return nil for a nil proto.

CreatedAt and UpdatedAt are still dereferenced unconditionally, so the updated Flow task fixtures that omit those fields can panic on the success path. While touching this constructor, please also keep the repo’s NewAPIX(nil) == nil contract here.

Suggested change
 func (t *APIRackTask) FromProto(task *flowv1.Task) {
 	if task == nil {
 		return
 	}
 	if task.GetId() != nil {
 		t.ID = task.GetId().GetId()
 	}
 	t.Status = enumOr(ProtoToAPIRackTaskStatusName, task.GetStatus(), "Unknown")
 	t.Description = task.GetDescription()
 	t.Message = task.GetMessage()
 	if ts := task.GetStartedAt(); ts != nil {
 		v := ts.AsTime().UTC()
 		t.Started = &v
 	}
 	if ts := task.GetFinishedAt(); ts != nil {
 		v := ts.AsTime().UTC()
 		t.Finished = &v
 	}
-	t.Created = task.GetCreatedAt().AsTime().UTC()
-	t.Updated = task.GetUpdatedAt().AsTime().UTC()
+	if ts := task.GetCreatedAt(); ts != nil {
+		t.Created = ts.AsTime().UTC()
+	}
+	if ts := task.GetUpdatedAt(); ts != nil {
+		t.Updated = ts.AsTime().UTC()
+	}
 }
 
 func NewAPIRackTask(task *flowv1.Task) *APIRackTask {
+	if task == nil {
+		return nil
+	}
 	t := &APIRackTask{}
 	t.FromProto(task)
 	return t
 }

As per coding guidelines API model types constructed from a proto in handlers should expose a func NewAPIX(p *protoX) *APIX wrapper that returns nil for a nil proto and otherwise builds the value and calls FromProto.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/pkg/api/model/task.go` around lines 49 - 74, The FromProto method on
APIRackTask and its constructor need nil guards: ensure FromProto returns
immediately if the input task is nil (preserve current behavior), and guard
access to task.GetCreatedAt() and task.GetUpdatedAt() the same way as
StartedAt/FinishedAt (check for nil, convert with AsTime().UTC() and assign
pointers only when present) to avoid dereferencing nil timestamps; update
NewAPIRackTask to return nil if the passed-in task is nil, otherwise build and
call APIRackTask.FromProto as before.
api/pkg/api/model/tray.go (1)

447-497: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep /tray/validation scoped to tray component types by default.

APITrayValidateAllRequest drops the tray-type constraint unless the caller explicitly passes type: rackId/rackName builds a bare RackTarget, and the site-wide case returns nil target spec with no fallback filter. That lets the tray validation endpoint validate non-tray components in the rack/site. Please mirror the existing tray scoping used in TrayFilter.ToTargetSpec() / APITrayGetAllRequest.ToProto() by defaulting to ValidProtoComponentTypes or an equivalent type filter when type is omitted.

Suggested direction
 func (r *APITrayValidateAllRequest) ToTargetSpec() *flowv1.OperationTargetSpec {
 	if r.RackID != nil {
+		rackTarget := &flowv1.RackTarget{
+			Identifier: &flowv1.RackTarget_Id{Id: &flowv1.UUID{Id: *r.RackID}},
+		}
+		if r.Type == nil {
+			rackTarget.ComponentTypes = ValidProtoComponentTypes
+		}
 		return &flowv1.OperationTargetSpec{
 			Targets: &flowv1.OperationTargetSpec_Racks{
 				Racks: &flowv1.RackTargets{
-					Targets: []*flowv1.RackTarget{
-						{Identifier: &flowv1.RackTarget_Id{Id: &flowv1.UUID{Id: *r.RackID}}},
-					},
+					Targets: []*flowv1.RackTarget{rackTarget},
 				},
 			},
 		}
 	}
 	if r.RackName != nil {
+		rackTarget := &flowv1.RackTarget{
+			Identifier: &flowv1.RackTarget_Name{Name: *r.RackName},
+		}
+		if r.Type == nil {
+			rackTarget.ComponentTypes = ValidProtoComponentTypes
+		}
 		return &flowv1.OperationTargetSpec{
 			Targets: &flowv1.OperationTargetSpec_Racks{
 				Racks: &flowv1.RackTargets{
-					Targets: []*flowv1.RackTarget{
-						{Identifier: &flowv1.RackTarget_Name{Name: *r.RackName}},
-					},
+					Targets: []*flowv1.RackTarget{rackTarget},
 				},
 			},
 		}
 	}
 	...
 }

 func (r *APITrayValidateAllRequest) ToFilters() []*flowv1.Filter {
 	var filters []*flowv1.Filter
 	...
 	if r.Type != nil {
 		if f := GetProtoTrayFilter("type", []string{*r.Type}); f != nil {
 			filters = append(filters, f)
 		}
+	} else if r.RackID == nil && r.RackName == nil && len(r.ComponentIDs) == 0 {
+		if f := GetProtoTrayFilter("type", []string{"Compute", "NVLSwitch", "PowerShelf"}); f != nil {
+			filters = append(filters, f)
+		}
 	}
 	return filters
 }

Also applies to: 499-514

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/pkg/api/model/tray.go` around lines 447 - 497,
APITrayValidateAllRequest.ToTargetSpec currently omits any component-type
scoping when r.Type is nil, allowing non-tray components to be targeted; update
ToTargetSpec to default to tray component types (use the same scoping as
TrayFilter.ToTargetSpec / APITrayGetAllRequest.ToProto) by applying
ValidProtoComponentTypes (or equivalent proto names) whenever r.Type is not
provided: when building a RackTarget (the r.RackID / r.RackName branches) add
the component-type filter to the returned OperationTargetSpec (e.g., include a
component type constraint or ComponentTargets filter set to the tray types), and
for the site-wide case (where you currently return nil) return an
OperationTargetSpec that limits components to ValidProtoComponentTypes instead
of nil. Ensure you still honor r.Type if present.
🧹 Nitpick comments (2)
flow/cmd/power_control.go (1)

172-177: ⚡ Quick win

Rename rlaClient and RLA log wording to Flow for rebrand consistency.

The import now uses flow/pkg/client, but local naming and error text still reference RLA, which creates avoidable operational ambiguity in logs.

♻️ Suggested cleanup
-	// Create RLA client
-	rlaClient, err := client.New(newGlobalClientConfig())
+	// Create Flow client
+	flowClient, err := client.New(newGlobalClientConfig())
 	if err != nil {
-		log.Fatal().Msgf("Failed to create RLA client: %v", err)
+		log.Fatal().Msgf("Failed to create Flow client: %v", err)
 	}
-	defer rlaClient.Close()
+	defer flowClient.Close()
@@
-		result, err = rlaClient.PowerControlByRackIDs(ctx, rackIDs, componentType, op)
+		result, err = flowClient.PowerControlByRackIDs(ctx, rackIDs, componentType, op)
@@
-		result, err = rlaClient.PowerControlByRackNames(ctx, rackNames, componentType, op)
+		result, err = flowClient.PowerControlByRackNames(ctx, rackNames, componentType, op)
@@
-		result, err = rlaClient.PowerControlByMachineIDs(ctx, componentIDs, op)
+		result, err = flowClient.PowerControlByMachineIDs(ctx, componentIDs, op)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/cmd/power_control.go` around lines 172 - 177, The variable and log text
still reference "RLA": rename rlaClient to flowClient (the result of
client.New(newGlobalClientConfig())) and update all usages including the defer
flowClient.Close(), and change the error message in log.Fatal().Msgf to refer to
"Flow client" (e.g., "Failed to create Flow client: %v") so naming and logs
match the Flow rebrand.
.github/workflows/lint-and-test.yml (1)

185-189: ⚡ Quick win

Harden protobuf regeneration by isolating working directories.

Line 188 currently depends on the previous cd side effect. Running each generation in its own subshell makes the step deterministic and easier to maintain.

Suggested update
       - name: Regenerate protobuf code
         run: |
-          cd workflow-schema && buf generate
-          cd flow && buf generate
+          (cd workflow-schema && buf generate)
+          (cd flow && buf generate)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/lint-and-test.yml around lines 185 - 189, The "Regenerate
protobuf code" CI step relies on a prior cd side-effect; make it deterministic
by running each buf generate in its own isolated working directory (e.g., use
subshells or separate commands that change to workflow-schema and flow
independently) so each generation does not depend on the previous cd; update the
run block for the "Regenerate protobuf code" step to perform the workflow-schema
generation and the flow generation in isolated directories (refer to the step
name "Regenerate protobuf code") so both commands are independent and
reproducible.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@flow/docs/grpc-api.md`:
- Around line 2076-2079: The two Markdown table rows for "missing_count" and
"unexpected_count" are split across lines and breaking rendering; fix by
consolidating each row into a single line with proper pipe separators (e.g., "|
missing_count | [int32](`#int32`) |  | Summary counts Expected by RLA but not
found in the component manager service |") and do the same for the malformed
rows around 2224-2230 so each table entry is on one line, preserving links and
descriptions for the fields named missing_count and unexpected_count.
- Around line 1340-2369: The doc contains broken fragment links to external
proto types (e.g. `#google-protobuf-Timestamp`, `#google-protobuf-Empty` and similar
fragments referenced throughout the file) which break in-page navigation; fix by
either adding local anchor sections named google-protobuf-Timestamp and
google-protobuf-Empty (and any other missing fragments) with a brief plain-text
description, or replace the markdown links with plain text labels like
"google.protobuf.Timestamp" / "google.protobuf.Empty" so they no longer rely on
undefined anchors; search for fragment identifiers mentioned in the diff (e.g.
google-protobuf-Timestamp, google-protobuf-Empty, and other #... fragments used
in OperationTargetSpec, Task, TaskSchedule, etc.) and update each link to use
the new anchors or plain-text fallback consistently.

In `@Makefile`:
- Around line 262-269: The flow-proto target body is too long for checkmake's
maxbodylength; refactor by extracting the loop/copy logic into a smaller helper
target or external script and have the flow-proto target call that helper.
Specifically, create a new target (e.g., flow-proto-copy or flow-proto-helper)
or a shell script that performs the
ls/cp/echo/./workflow-schema/scripts/add-go-package-option.sh loop, then replace
the current loop body in the flow-proto target with a single line invoking that
helper (preserving use of FLOW_DIR and the call to add-go-package-option.sh and
referencing the same files via basename). Ensure the new helper/script name is
referenced from flow-proto so the Makefile body length is reduced.

---

Outside diff comments:
In `@api/pkg/api/handler/task.go`:
- Around line 318-325: The precondition message still uses the old "Rack Level
Administration" branding; update the user-facing log and API error to reference
"Flow sites" instead. In the branch checking siteConfig.RackLevelAdministration
(in task handler, where logger.Warn().Msg and cutil.NewAPIErrorResponse are
called), change the warning string and the API error message to say that the
site is not a Flow site or does not have Flow enabled so messages remain
consistent with the renamed path.

In `@api/pkg/api/model/firmware.go`:
- Around line 50-63: The constructor NewAPIUpdateFirmwareResponse should return
nil when passed a nil proto: update NewAPIUpdateFirmwareResponse(resp
*flowv1.SubmitTaskResponse) *APIUpdateFirmwareResponse to check if resp == nil
and return nil; otherwise allocate an APIUpdateFirmwareResponse, call its
FromProto(resp) to populate fields (which already handles nil defensively), and
return the pointer. Ensure you reference NewAPIUpdateFirmwareResponse,
APIUpdateFirmwareResponse, and FromProto in the change.

In `@api/pkg/api/model/task.go`:
- Around line 49-74: The FromProto method on APIRackTask and its constructor
need nil guards: ensure FromProto returns immediately if the input task is nil
(preserve current behavior), and guard access to task.GetCreatedAt() and
task.GetUpdatedAt() the same way as StartedAt/FinishedAt (check for nil, convert
with AsTime().UTC() and assign pointers only when present) to avoid
dereferencing nil timestamps; update NewAPIRackTask to return nil if the
passed-in task is nil, otherwise build and call APIRackTask.FromProto as before.

In `@api/pkg/api/model/tray.go`:
- Around line 447-497: APITrayValidateAllRequest.ToTargetSpec currently omits
any component-type scoping when r.Type is nil, allowing non-tray components to
be targeted; update ToTargetSpec to default to tray component types (use the
same scoping as TrayFilter.ToTargetSpec / APITrayGetAllRequest.ToProto) by
applying ValidProtoComponentTypes (or equivalent proto names) whenever r.Type is
not provided: when building a RackTarget (the r.RackID / r.RackName branches)
add the component-type filter to the returned OperationTargetSpec (e.g., include
a component type constraint or ComponentTargets filter set to the tray types),
and for the site-wide case (where you currently return nil) return an
OperationTargetSpec that limits components to ValidProtoComponentTypes instead
of nil. Ensure you still honor r.Type if present.

In `@flow/cmd/firmware_upgrade.go`:
- Around line 176-180: The log message uses stale "RLA" wording in the failure
path when creating the client; update the error text in the block that calls
client.New(newGlobalClientConfig()) (the rlaClient variable and its error
handling using log.Fatal().Msgf) to an operator-facing Flow-appropriate message
(e.g., "Failed to create Flow client" or "Failed to create client") so the
wording matches the Flow CLI context.

In `@flow/internal/task/conflict/conflict.go`:
- Around line 18-43: Update package and symbol comments that still use the old
product name "RLA" to the new name "Flow": change the package-level doc comment
and the comment for builtinRule to replace "RLA" with "Flow" so terminology is
consistent across the file (references: the package comment at top of
conflict.go and the comment immediately above builtinRule). Ensure wording
remains otherwise identical and compile-time symbols (package conflict,
builtinRule) are unchanged.

---

Nitpick comments:
In @.github/workflows/lint-and-test.yml:
- Around line 185-189: The "Regenerate protobuf code" CI step relies on a prior
cd side-effect; make it deterministic by running each buf generate in its own
isolated working directory (e.g., use subshells or separate commands that change
to workflow-schema and flow independently) so each generation does not depend on
the previous cd; update the run block for the "Regenerate protobuf code" step to
perform the workflow-schema generation and the flow generation in isolated
directories (refer to the step name "Regenerate protobuf code") so both commands
are independent and reproducible.

In `@flow/cmd/power_control.go`:
- Around line 172-177: The variable and log text still reference "RLA": rename
rlaClient to flowClient (the result of client.New(newGlobalClientConfig())) and
update all usages including the defer flowClient.Close(), and change the error
message in log.Fatal().Msgf to refer to "Flow client" (e.g., "Failed to create
Flow client: %v") so naming and logs match the Flow rebrand.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 778e938b-9a14-47a4-96be-d2383215ede0

📥 Commits

Reviewing files that changed from the base of the PR and between 5cfe1d9 and a5ff86c.

⛔ Files ignored due to path filters (14)
  • flow/internal/nicoapi/gen/common.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/fmds.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/fmds_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/health.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/machine_discovery.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/measured_boot.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/mlx_device.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/nico.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/nico_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/site_explorer.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nsmapi/gen/nvswitch-manager.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nsmapi/gen/nvswitch-manager_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/psmapi/gen/powershelf-manager.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/psmapi/gen/powershelf-manager_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
📒 Files selected for processing (286)
  • .github/workflows/lint-and-test.yml
  • AGENTS.md
  • Makefile
  • api/pkg/api/handler/rack.go
  • api/pkg/api/handler/rack_test.go
  • api/pkg/api/handler/task.go
  • api/pkg/api/handler/task_test.go
  • api/pkg/api/handler/tray.go
  • api/pkg/api/handler/tray_test.go
  • api/pkg/api/handler/util/common/common.go
  • api/pkg/api/model/firmware.go
  • api/pkg/api/model/firmware_test.go
  • api/pkg/api/model/power.go
  • api/pkg/api/model/power_test.go
  • api/pkg/api/model/rack.go
  • api/pkg/api/model/rack_test.go
  • api/pkg/api/model/task.go
  • api/pkg/api/model/task_test.go
  • api/pkg/api/model/tray.go
  • api/pkg/api/model/tray_test.go
  • api/pkg/api/routes.go
  • docker/local/Dockerfile.nico-rla
  • docker/production/Dockerfile.nico-rla
  • docs/index.html
  • flow/.envrc
  • flow/.gitignore
  • flow/Dockerfile
  • flow/Makefile
  • flow/README.md
  • flow/cmd/component.go
  • flow/cmd/component_add.go
  • flow/cmd/component_delete.go
  • flow/cmd/component_diff.go
  • flow/cmd/component_expected.go
  • flow/cmd/component_purge.go
  • flow/cmd/component_update.go
  • flow/cmd/context.go
  • flow/cmd/db.go
  • flow/cmd/db_migrate.go
  • flow/cmd/firmware.go
  • flow/cmd/firmware_update.go
  • flow/cmd/firmware_upgrade.go
  • flow/cmd/firmware_version.go
  • flow/cmd/firmwareupdate_test.go
  • flow/cmd/ingest.go
  • flow/cmd/inventory.go
  • flow/cmd/power.go
  • flow/cmd/power_control.go
  • flow/cmd/power_stats.go
  • flow/cmd/power_status.go
  • flow/cmd/rack.go
  • flow/cmd/rack_create.go
  • flow/cmd/rack_delete.go
  • flow/cmd/rack_json.go
  • flow/cmd/rack_json_test.go
  • flow/cmd/rack_purge.go
  • flow/cmd/root.go
  • flow/cmd/rule.go
  • flow/cmd/rule_associate.go
  • flow/cmd/rule_create.go
  • flow/cmd/rule_delete.go
  • flow/cmd/rule_disassociate.go
  • flow/cmd/rule_get.go
  • flow/cmd/rule_list.go
  • flow/cmd/rule_set_default.go
  • flow/cmd/serve.go
  • flow/docs/component-manager-architecture.md
  • flow/docs/component-manager-config.md
  • flow/docs/grpc-api.html
  • flow/docs/grpc-api.md
  • flow/docs/operation-rules-guide.md
  • flow/docs/operation-rules-versioning.md
  • flow/docs/rla-architecture.md
  • flow/docs/scheduler-architecture.md
  • flow/docs/task-schedules.md
  • flow/examples/README.md
  • flow/examples/operation-rules-example.yaml
  • flow/examples/rack-create-example.json
  • flow/internal/alert/alert.go
  • flow/internal/certs/certs.go
  • flow/internal/certs/certs_test.go
  • flow/internal/clients/temporal/certificate.go
  • flow/internal/clients/temporal/certificate_test.go
  • flow/internal/clients/temporal/temporal.go
  • flow/internal/common/utils/utils.go
  • flow/internal/config/config.go
  • flow/internal/converter/dao/converter.go
  • flow/internal/converter/dao/converter_test.go
  • flow/internal/converter/protobuf/converter.go
  • flow/internal/converter/protobuf/converter_test.go
  • flow/internal/db/migrations/20250831154717_initial.down.sql
  • flow/internal/db/migrations/20250831154717_initial.up.sql
  • flow/internal/db/migrations/20251121130900_inventory.down.sql
  • flow/internal/db/migrations/20251121130900_inventory.up.sql
  • flow/internal/db/migrations/20251204120000_create_task_table.down.sql
  • flow/internal/db/migrations/20251204120000_create_task_table.up.sql
  • flow/internal/db/migrations/20260107000000_component_external_id.down.sql
  • flow/internal/db/migrations/20260107000000_component_external_id.up.sql
  • flow/internal/db/migrations/20260112000000_task_component_identifiers.down.sql
  • flow/internal/db/migrations/20260112000000_task_component_identifiers.up.sql
  • flow/internal/db/migrations/20260130000000_create_operation_rules.down.sql
  • flow/internal/db/migrations/20260130000000_create_operation_rules.up.sql
  • flow/internal/db/migrations/20260130000001_add_task_rule_tracking.down.sql
  • flow/internal/db/migrations/20260130000001_add_task_rule_tracking.up.sql
  • flow/internal/db/migrations/20260204005059_component_drift.down.sql
  • flow/internal/db/migrations/20260204005059_component_drift.up.sql
  • flow/internal/db/migrations/20260306000000_add_conflict_support.down.sql
  • flow/internal/db/migrations/20260306000000_add_conflict_support.up.sql
  • flow/internal/db/migrations/20260313000000_add_task_started_at.down.sql
  • flow/internal/db/migrations/20260313000000_add_task_started_at.up.sql
  • flow/internal/db/migrations/20260316000000_add_task_attributes.down.sql
  • flow/internal/db/migrations/20260316000000_add_task_attributes.up.sql
  • flow/internal/db/migrations/20260401000000_bmc_cascade_delete.down.sql
  • flow/internal/db/migrations/20260401000000_bmc_cascade_delete.up.sql
  • flow/internal/db/migrations/20260409000000_create_trigger_functions.down.sql
  • flow/internal/db/migrations/20260409000000_create_trigger_functions.up.sql
  • flow/internal/db/migrations/20260410000000_create_task_schedule_table.down.sql
  • flow/internal/db/migrations/20260410000000_create_task_schedule_table.up.sql
  • flow/internal/db/migrations/README.md
  • flow/internal/db/migrations/main.go
  • flow/internal/db/model/bmc.go
  • flow/internal/db/model/bmc_test.go
  • flow/internal/db/model/component.go
  • flow/internal/db/model/component_drift.go
  • flow/internal/db/model/component_test.go
  • flow/internal/db/model/nvldomain.go
  • flow/internal/db/model/operation_rule.go
  • flow/internal/db/model/rack.go
  • flow/internal/db/model/rack_test.go
  • flow/internal/db/model/task.go
  • flow/internal/db/model/task_schedule.go
  • flow/internal/db/model/task_schedule_scope.go
  • flow/internal/db/model/task_schedule_scope_test.go
  • flow/internal/db/query/filter.go
  • flow/internal/db/query/pagination.go
  • flow/internal/db/query/query.go
  • flow/internal/inventory/manager/manager.go
  • flow/internal/inventory/store/postgres.go
  • flow/internal/inventory/store/store.go
  • flow/internal/nicoapi/buf.gen.yaml
  • flow/internal/nicoapi/buf.yaml
  • flow/internal/nicoapi/grpc.go
  • flow/internal/nicoapi/mock.go
  • flow/internal/nicoapi/mod.go
  • flow/internal/nicoapi/mod_test.go
  • flow/internal/nicoapi/model.go
  • flow/internal/nicoapi/nicoproto/common.proto
  • flow/internal/nicoapi/nicoproto/fmds.proto
  • flow/internal/nicoapi/nicoproto/health.proto
  • flow/internal/nicoapi/nicoproto/machine_discovery.proto
  • flow/internal/nicoapi/nicoproto/measured_boot.proto
  • flow/internal/nicoapi/nicoproto/mlx_device.proto
  • flow/internal/nicoapi/nicoproto/nico.proto
  • flow/internal/nicoapi/nicoproto/site_explorer.proto
  • flow/internal/nicoapi/tweak_protodefs.sh
  • flow/internal/nsmapi/buf.gen.yaml
  • flow/internal/nsmapi/buf.yaml
  • flow/internal/nsmapi/grpc.go
  • flow/internal/nsmapi/mock.go
  • flow/internal/nsmapi/mod.go
  • flow/internal/nsmapi/model.go
  • flow/internal/nsmapi/nsmproto/nvswitch-manager.proto
  • flow/internal/operation/request.go
  • flow/internal/psmapi/buf.gen.yaml
  • flow/internal/psmapi/buf.yaml
  • flow/internal/psmapi/grpc.go
  • flow/internal/psmapi/mock.go
  • flow/internal/psmapi/mod.go
  • flow/internal/psmapi/mod_test.go
  • flow/internal/psmapi/model.go
  • flow/internal/psmapi/psmproto/powershelf-manager.proto
  • flow/internal/scheduler/dispatcher.go
  • flow/internal/scheduler/entry.go
  • flow/internal/scheduler/jobs/inventorysync/drift_test.go
  • flow/internal/scheduler/jobs/inventorysync/inventory.go
  • flow/internal/scheduler/jobs/inventorysync/inventory_test.go
  • flow/internal/scheduler/jobs/inventorysync/job.go
  • flow/internal/scheduler/jobs/leakdetection/job.go
  • flow/internal/scheduler/jobs/leakdetection/leakdetection.go
  • flow/internal/scheduler/jobs/leakdetection/leakdetection_test.go
  • flow/internal/scheduler/relay.go
  • flow/internal/scheduler/scheduler.go
  • flow/internal/scheduler/scheduler_test.go
  • flow/internal/scheduler/taskschedule/dispatcher.go
  • flow/internal/scheduler/taskschedule/dispatcher_test.go
  • flow/internal/scheduler/taskschedule/store.go
  • flow/internal/scheduler/taskschedule/template.go
  • flow/internal/scheduler/taskschedule/template_test.go
  • flow/internal/scheduler/types/event.go
  • flow/internal/scheduler/types/job.go
  • flow/internal/scheduler/types/policy.go
  • flow/internal/scheduler/types/trigger.go
  • flow/internal/scheduler/types/trigger_test.go
  • flow/internal/scheduler/worker.go
  • flow/internal/service/component_api_test.go
  • flow/internal/service/config.go
  • flow/internal/service/config_test.go
  • flow/internal/service/server_impl.go
  • flow/internal/service/server_impl_task_schedule.go
  • flow/internal/service/server_impl_task_schedule_test.go
  • flow/internal/service/service.go
  • flow/internal/task/common/common.go
  • flow/internal/task/common/common_test.go
  • flow/internal/task/common/operation_codes.go
  • flow/internal/task/componentmanager/builtin/provider_config_decoders.go
  • flow/internal/task/componentmanager/builtin/provider_config_decoders_test.go
  • flow/internal/task/componentmanager/componentmanager.go
  • flow/internal/task/componentmanager/componentmanager_test.go
  • flow/internal/task/componentmanager/compute/nico/nico.go
  • flow/internal/task/componentmanager/compute/nico/nico_test.go
  • flow/internal/task/componentmanager/config.go
  • flow/internal/task/componentmanager/config_test.go
  • flow/internal/task/componentmanager/errors.go
  • flow/internal/task/componentmanager/mock/mock.go
  • flow/internal/task/componentmanager/nvlswitch/nico/nico.go
  • flow/internal/task/componentmanager/nvlswitch/nico/nico_test.go
  • flow/internal/task/componentmanager/nvlswitch/nvswitchmanager/nvswitchmanager.go
  • flow/internal/task/componentmanager/powershelf/nico/nico.go
  • flow/internal/task/componentmanager/powershelf/nico/nico_test.go
  • flow/internal/task/componentmanager/powershelf/psm/psm.go
  • flow/internal/task/componentmanager/provider.go
  • flow/internal/task/componentmanager/providerapi/errors.go
  • flow/internal/task/componentmanager/providerapi/providerapi.go
  • flow/internal/task/componentmanager/providerapi/providerapi_test.go
  • flow/internal/task/componentmanager/providers/nico/firmware.go
  • flow/internal/task/componentmanager/providers/nico/power.go
  • flow/internal/task/componentmanager/providers/nico/provider.go
  • flow/internal/task/componentmanager/providers/nico/provider_test.go
  • flow/internal/task/componentmanager/providers/nvswitchmanager/provider.go
  • flow/internal/task/componentmanager/providers/nvswitchmanager/provider_test.go
  • flow/internal/task/componentmanager/providers/psm/provider.go
  • flow/internal/task/componentmanager/providers/psm/provider_test.go
  • flow/internal/task/conflict/conflict.go
  • flow/internal/task/conflict/conflict_test.go
  • flow/internal/task/conflict/promoter.go
  • flow/internal/task/conflict/promoter_test.go
  • flow/internal/task/conflict/store_mock_test.go
  • flow/internal/task/executor/executor.go
  • flow/internal/task/executor/temporalworkflow/README.md
  • flow/internal/task/executor/temporalworkflow/activity/activity.go
  • flow/internal/task/executor/temporalworkflow/activity/activity_test.go
  • flow/internal/task/executor/temporalworkflow/activity/registry.go
  • flow/internal/task/executor/temporalworkflow/activity/registry_test.go
  • flow/internal/task/executor/temporalworkflow/common/executionid.go
  • flow/internal/task/executor/temporalworkflow/common/target.go
  • flow/internal/task/executor/temporalworkflow/manager/helpers.go
  • flow/internal/task/executor/temporalworkflow/manager/manager.go
  • flow/internal/task/executor/temporalworkflow/workflow/actions.go
  • flow/internal/task/executor/temporalworkflow/workflow/actions_targetversion_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/bringup.go
  • flow/internal/task/executor/temporalworkflow/workflow/bringup_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/child_workflow_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/firmwarecontrol.go
  • flow/internal/task/executor/temporalworkflow/workflow/firmwarecontrol_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/genericcomponentstep.go
  • flow/internal/task/executor/temporalworkflow/workflow/helpers.go
  • flow/internal/task/executor/temporalworkflow/workflow/injectexpectation.go
  • flow/internal/task/executor/temporalworkflow/workflow/injectexpectation_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_action_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_batching_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/registry.go
  • flow/internal/task/executor/temporalworkflow/workflow/registry_test.go
  • flow/internal/task/manager/manager.go
  • flow/internal/task/manager/notifying_store.go
  • flow/internal/task/manager/resolver.go
  • flow/internal/task/manager/resolver_test.go
  • flow/internal/task/operationrules/actions.go
  • flow/internal/task/operationrules/actions_test.go
  • flow/internal/task/operationrules/loader.go
  • flow/internal/task/operationrules/loader_actions_test.go
  • flow/internal/task/operationrules/loader_test.go
  • flow/internal/task/operationrules/resolver.go
  • flow/internal/task/operationrules/resolver_defaults.go
  • flow/internal/task/operationrules/resolver_test.go
  • flow/internal/task/operationrules/rules.go
  • flow/internal/task/operationrules/rules_test.go
  • flow/internal/task/operationrules/rules_timeout_test.go
  • flow/internal/task/operationrules/sequences.go
  • flow/internal/task/operationrules/sequences_test.go
  • flow/internal/task/operations/operations.go
  • flow/internal/task/operations/options.go
  • flow/internal/task/operations/types.go
  • flow/internal/task/operations/types_test.go
  • flow/internal/task/store/postgres.go

Comment thread flow/docs/grpc-api.md
Comment on lines +1340 to +2369
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |






<a name="v1-OperationTargetSpec"></a>

### OperationTargetSpec
OperationTargetSpec contains targets for an operation.
Supports either rack-level targeting (with optional type filtering)
or component-level targeting (by UUID or external reference), but not both.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| racks | [RackTargets](#v1-RackTargets) | | |
| components | [ComponentTargets](#v1-ComponentTargets) | | |






<a name="v1-OrderBy"></a>

### OrderBy
OrderBy represents ordering specification


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rack_field | [RackOrderByField](#v1-RackOrderByField) | | For rack queries |
| component_field | [ComponentOrderByField](#v1-ComponentOrderByField) | | For component queries |
| direction | [string](#string) | | ASC or DESC |






<a name="v1-Pagination"></a>

### Pagination



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| offset | [int32](#int32) | | |
| limit | [int32](#int32) | | |






<a name="v1-PatchComponentRequest"></a>

### PatchComponentRequest
PatchComponent - update a single component&#39;s fields


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | Required: component UUID |
| firmware_version | [string](#string) | optional | Update firmware version |
| position | [RackPosition](#v1-RackPosition) | optional | Update slot_id, tray_idx, host_id |
| description | [string](#string) | optional | Update description (JSON string) |
| rack_id | [UUID](#v1-UUID) | optional | Re-assign to a different rack |
| bmcs | [BMCInfo](#v1-BMCInfo) | repeated | Update BMCs (matched by MAC address; create if new) |






<a name="v1-PatchComponentResponse"></a>

### PatchComponentResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| component | [Component](#v1-Component) | | The updated component |






<a name="v1-PatchRackRequest"></a>

### PatchRackRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rack | [Rack](#v1-Rack) | | |






<a name="v1-PatchRackResponse"></a>

### PatchRackResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| report | [string](#string) | | |






<a name="v1-PauseTaskScheduleRequest"></a>

### PauseTaskScheduleRequest
PauseTaskScheduleRequest disables a TaskSchedule without deleting it.
The schedule will not fire until resumed. Has no effect if already paused.
Returns an error for a one-time schedule that has already fired.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | |






<a name="v1-PowerOffRackRequest"></a>

### PowerOffRackRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target_spec | [OperationTargetSpec](#v1-OperationTargetSpec) | | Flexible targeting: rack(s) with optional type filter, or specific components |
| forced | [bool](#bool) | | |
| description | [string](#string) | | optional task description |
| queue_options | [QueueOptions](#v1-QueueOptions) | optional | |
| rule_id | [UUID](#v1-UUID) | optional | optional: override rule resolution with a specific rule |






<a name="v1-PowerOnRackRequest"></a>

### PowerOnRackRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target_spec | [OperationTargetSpec](#v1-OperationTargetSpec) | | Flexible targeting: rack(s) with optional type filter, or specific components |
| description | [string](#string) | | optional task description |
| queue_options | [QueueOptions](#v1-QueueOptions) | optional | |
| rule_id | [UUID](#v1-UUID) | optional | optional: override rule resolution with a specific rule |






<a name="v1-PowerResetRackRequest"></a>

### PowerResetRackRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target_spec | [OperationTargetSpec](#v1-OperationTargetSpec) | | Flexible targeting: rack(s) with optional type filter, or specific components |
| forced | [bool](#bool) | | |
| description | [string](#string) | | optional task description |
| queue_options | [QueueOptions](#v1-QueueOptions) | optional | |
| rule_id | [UUID](#v1-UUID) | optional | optional: override rule resolution with a specific rule |






<a name="v1-PurgeComponentRequest"></a>

### PurgeComponentRequest
PurgeComponent - permanently remove a soft-deleted component


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | Required: component UUID to purge (must already be soft-deleted) |






<a name="v1-PurgeComponentResponse"></a>

### PurgeComponentResponse







<a name="v1-PurgeRackRequest"></a>

### PurgeRackRequest
PurgeRack - permanently remove a soft-deleted rack and its components


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | Required: rack UUID to purge (must already be soft-deleted) |






<a name="v1-PurgeRackResponse"></a>

### PurgeRackResponse







<a name="v1-QueueOptions"></a>

### QueueOptions
QueueOptions controls how a task behaves when a conflict is detected.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| conflict_strategy | [ConflictStrategy](#v1-ConflictStrategy) | | How to handle the task when a conflict is detected. Defaults to CONFLICT_STRATEGY_REJECT (wire value 0). |
| queue_timeout_seconds | [int32](#int32) | | How long (seconds) to wait in queue before expiring. 0 means use the server default (~1h). Only relevant when conflict_strategy is CONFLICT_STRATEGY_QUEUE. |






<a name="v1-Rack"></a>

### Rack



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| info | [DeviceInfo](#v1-DeviceInfo) | | |
| location | [Location](#v1-Location) | | |
| components | [Component](#v1-Component) | repeated | |






<a name="v1-RackPosition"></a>

### RackPosition



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| slot_id | [int32](#int32) | | |
| tray_idx | [int32](#int32) | | |
| host_id | [int32](#int32) | | |






<a name="v1-RackRuleAssociation"></a>

### RackRuleAssociation



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rack_id | [UUID](#v1-UUID) | | |
| operation_type | [OperationType](#v1-OperationType) | | |
| operation_code | [string](#string) | | Specific operation code (e.g., &#34;power_on&#34;, &#34;upgrade&#34;) |
| rule_id | [UUID](#v1-UUID) | | |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |






<a name="v1-RackTarget"></a>

### RackTarget
RackTarget identifies a rack and optionally filters by component type.
To target specific components, use the component-level APIs instead.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | Rack UUID |
| name | [string](#string) | | Rack name |
| component_types | [ComponentType](#v1-ComponentType) | repeated | Optional: filter by component type. Omit (or send empty list) to include all components in the rack. |






<a name="v1-RackTargets"></a>

### RackTargets
RackTargets contains one or more rack targets


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| targets | [RackTarget](#v1-RackTarget) | repeated | |






<a name="v1-RemoveTaskScheduleScopeRequest"></a>

### RemoveTaskScheduleScopeRequest
RemoveTaskScheduleScopeRequest removes a single rack scope entry by its scope ID.
In-flight tasks for that rack are not cancelled.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| scope_id | [UUID](#v1-UUID) | | |






<a name="v1-ResumeTaskScheduleRequest"></a>

### ResumeTaskScheduleRequest
ResumeTaskScheduleRequest re-enables a paused TaskSchedule. For interval
and cron schedules, next_run_at is recomputed from the current time so the
schedule does not fire immediately. Has no effect if already enabled.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | |






<a name="v1-ScheduleConfig"></a>

### ScheduleConfig
ScheduleConfig groups the scheduling fields shared by multiple request types.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| spec | [ScheduleSpec](#v1-ScheduleSpec) | | |
| overlap_policy | [OverlapPolicy](#v1-OverlapPolicy) | | |






<a name="v1-ScheduleSpec"></a>

### ScheduleSpec



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [ScheduleSpecType](#v1-ScheduleSpecType) | | |
| spec | [string](#string) | | |
| timezone | [string](#string) | | IANA timezone for interpreting cron specs (e.g. &#34;America/New_York&#34;). Defaults to &#34;UTC&#34;. Ignored for interval and one-time specs. |






<a name="v1-ScheduledOperation"></a>

### ScheduledOperation
ScheduledOperation is the shared operation oneof used by
CreateTaskScheduleRequest and CheckScheduleConflictsRequest.
Centralising it here means a single proto change adds support for a new
operation type in both RPCs, and the Go conversion logic lives in one place.

Note: the embedded request messages (e.g. PowerOnRackRequest) may carry a
description field, but it is ignored when used inside a ScheduledOperation.
The dispatcher generates task descriptions automatically at fire time in the
form &#34;&lt;schedule name&gt; — &lt;RFC3339 timestamp&gt;&#34;.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| power_on | [PowerOnRackRequest](#v1-PowerOnRackRequest) | | |
| power_off | [PowerOffRackRequest](#v1-PowerOffRackRequest) | | |
| power_reset | [PowerResetRackRequest](#v1-PowerResetRackRequest) | | |
| bring_up | [BringUpRackRequest](#v1-BringUpRackRequest) | | |
| upgrade_firmware | [UpgradeFirmwareRequest](#v1-UpgradeFirmwareRequest) | | |
| ingest | [IngestRackRequest](#v1-IngestRackRequest) | | |






<a name="v1-SetRuleAsDefaultRequest"></a>

### SetRuleAsDefaultRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rule_id | [UUID](#v1-UUID) | | |






<a name="v1-StringQueryInfo"></a>

### StringQueryInfo



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| patterns | [string](#string) | repeated | |
| is_wildcard | [bool](#bool) | | |
| use_or | [bool](#bool) | | |






<a name="v1-SubmitTaskResponse"></a>

### SubmitTaskResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| task_ids | [UUID](#v1-UUID) | repeated | Multiple task IDs (1 task per rack) |






<a name="v1-Task"></a>

### Task



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | |
| operation | [string](#string) | | |
| rack_id | [UUID](#v1-UUID) | | |
| component_uuids | [UUID](#v1-UUID) | repeated | |
| description | [string](#string) | | |
| executor_type | [TaskExecutorType](#v1-TaskExecutorType) | | |
| execution_id | [string](#string) | | |
| status | [TaskStatus](#v1-TaskStatus) | | |
| message | [string](#string) | | |
| queue_expires_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | queue_expires_at is set only for waiting tasks; absent for all other statuses. |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| finished_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | |
| applied_rule_id | [UUID](#v1-UUID) | optional | |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| started_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | |






<a name="v1-TaskSchedule"></a>

### TaskSchedule
TaskSchedule defines when (spec) and what (operation) should run automatically.
Which racks to target is tracked separately in TaskScheduleScope rows and
managed via AddTaskScheduleScope / RemoveTaskScheduleScope / ListTaskScheduleScopes.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | |
| name | [string](#string) | | unique, human-readable identifier |
| spec | [ScheduleSpec](#v1-ScheduleSpec) | | when to fire (interval, cron, or one-time) |
| overlap_policy | [OverlapPolicy](#v1-OverlapPolicy) | | |
| enabled | [bool](#bool) | | false = paused (will not fire) |
| next_run_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | absent for disabled or fully-fired one-time schedules |
| last_run_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | absent if the schedule has never fired |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| operation_type | [string](#string) | | operation_type identifies the kind of operation this schedule runs. Values: &#34;POWER_ON&#34;, &#34;POWER_OFF&#34;, &#34;POWER_RESET&#34;, &#34;BRING_UP&#34;, &#34;INGEST&#34;, &#34;UPGRADE_FIRMWARE&#34;, &#34;DOWNGRADE_FIRMWARE&#34;, &#34;ROLLBACK_FIRMWARE&#34;. |
| description | [string](#string) | | description is a human-readable summary of the operation and its key parameters, e.g. &#34;Power Reset (forced)&#34; or &#34;Upgrade Firmware to v2.3.1&#34;. |






<a name="v1-TaskScheduleScope"></a>

### TaskScheduleScope
TaskScheduleScope represents one rack target in a schedule&#39;s scope.
Each scope entry causes one task to be submitted per schedule firing.
last_task_id tracks the task produced for this rack by the most recent firing;
the dispatcher uses it for the overlap check. Absent if no task has fired yet
for this scope (e.g. a newly added rack).


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | |
| schedule_id | [UUID](#v1-UUID) | | |
| rack_id | [UUID](#v1-UUID) | | |
| types | [ComponentTypes](#v1-ComponentTypes) | | types filters by component type (e.g. COMPUTE, POWERSHELF). |
| components | [ComponentTargets](#v1-ComponentTargets) | | components targets specific components by UUID or external reference. |
| last_task_id | [UUID](#v1-UUID) | | absent until the first firing for this scope |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |






<a name="v1-TriggerTaskScheduleRequest"></a>

### TriggerTaskScheduleRequest
TriggerTaskScheduleRequest fires a TaskSchedule immediately, regardless of
next_run_at or enabled state. The overlap policy is not consulted — all
scopes are submitted unconditionally. Returns an error for a one-time
schedule that has already fired.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | |






<a name="v1-UUID"></a>

### UUID



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |






<a name="v1-UpdateOperationRuleRequest"></a>

### UpdateOperationRuleRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rule_id | [UUID](#v1-UUID) | | |
| name | [string](#string) | optional | |
| description | [string](#string) | optional | |
| rule_definition_json | [string](#string) | optional | JSON-encoded RuleDefinition |






<a name="v1-UpdateTaskScheduleRequest"></a>

### UpdateTaskScheduleRequest
UpdateTaskScheduleRequest updates the scheduling config of an existing
TaskSchedule. To modify which racks are targeted, use
AddTaskScheduleScope / RemoveTaskScheduleScope instead.

update_mask is required and controls which fields are written. Supported paths:
&#34;schedule.name&#34; – display name
&#34;schedule.overlap_policy&#34; – overlap behaviour
&#34;schedule.spec&#34; – full spec block (type &#43; spec string &#43; next_run_at recomputed)
&#34;schedule.spec.timezone&#34; – timezone only (spec type/string unchanged)


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [UUID](#v1-UUID) | | |
| schedule | [ScheduleConfig](#v1-ScheduleConfig) | | |
| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |






<a name="v1-UpdateTaskScheduleScopeRequest"></a>

### UpdateTaskScheduleScopeRequest
UpdateTaskScheduleScopeRequest reconciles the schedule&#39;s scope against the
desired target_spec: racks present in desired_scope but not in the current scope
are added; racks present in the current scope but absent from desired_scope are
removed; racks present in both have their component_filter updated if changed.
For component-level targets the server resolves rack membership automatically.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| schedule_id | [UUID](#v1-UUID) | | |
| desired_scope | [OperationTargetSpec](#v1-OperationTargetSpec) | | |






<a name="v1-UpdateTaskScheduleScopeResponse"></a>

### UpdateTaskScheduleScopeResponse
UpdateTaskScheduleScopeResponse returns the complete scope after reconciliation.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| scopes | [TaskScheduleScope](#v1-TaskScheduleScope) | repeated | |
| added | [int32](#int32) | | number of scope entries added |
| removed | [int32](#int32) | | number of scope entries removed |
| updated | [int32](#int32) | | number of scope entries with updated component_filter |






<a name="v1-UpgradeFirmwareRequest"></a>

### UpgradeFirmwareRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target_spec | [OperationTargetSpec](#v1-OperationTargetSpec) | | required: identifies components to upgrade |
| target_version | [string](#string) | optional | optional: target firmware version |
| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | optional: scheduled start time |
| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | optional: scheduled end time |
| description | [string](#string) | | optional: task description |
| queue_options | [QueueOptions](#v1-QueueOptions) | optional | |
| rule_id | [UUID](#v1-UUID) | optional | optional: override rule resolution with a specific rule |






<a name="v1-ValidateComponentsRequest"></a>

### ValidateComponentsRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target_spec | [OperationTargetSpec](#v1-OperationTargetSpec) | optional | Optional: Flexible targeting: rack(s) with optional type filter, or specific components. If not provided, returns all drifts. |
| filters | [Filter](#v1-Filter) | repeated | Filter conditions for component queries |
| pagination | [Pagination](#v1-Pagination) | optional | |
| order_by | [OrderBy](#v1-OrderBy) | optional | |






<a name="v1-ValidateComponentsResponse"></a>

### ValidateComponentsResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| diffs | [ComponentDiff](#v1-ComponentDiff) | repeated | |
| total_diffs | [int32](#int32) | | |
| missing_count | [int32](#int32) | | Summary counts

Expected by RLA but not found in the component manager service |
| unexpected_count | [int32](#int32) | | Found in the component manager service but not expected by RLA |
| drift_count | [int32](#int32) | | |
| match_count | [int32](#int32) | | |






<a name="v1-VersionRequest"></a>

### VersionRequest
Version API messages








<a name="v1-BMCType"></a>

### BMCType


| Name | Number | Description |
| ---- | ------ | ----------- |
| BMC_TYPE_UNKNOWN | 0 | |
| BMC_TYPE_HOST | 1 | |
| BMC_TYPE_DPU | 2 | |



<a name="v1-ComponentFilterField"></a>

### ComponentFilterField
ComponentFilterField represents the supported filter field types for component queries

| Name | Number | Description |
| ---- | ------ | ----------- |
| COMPONENT_FILTER_FIELD_UNSPECIFIED | 0 | |
| COMPONENT_FILTER_FIELD_NAME | 1 | Filter by component name |
| COMPONENT_FILTER_FIELD_MANUFACTURER | 2 | Filter by manufacturer |
| COMPONENT_FILTER_FIELD_MODEL | 3 | Filter by model (stored in description JSONB) |
| COMPONENT_FILTER_FIELD_TYPE | 4 | Filter by component type (use ComponentType enum string values in StringQueryInfo) |



<a name="v1-ComponentOrderByField"></a>

### ComponentOrderByField
ComponentOrderByField represents the supported order by field types for component queries

| Name | Number | Description |
| ---- | ------ | ----------- |
| COMPONENT_ORDER_BY_FIELD_UNSPECIFIED | 0 | |
| COMPONENT_ORDER_BY_FIELD_NAME | 1 | Order by component name |
| COMPONENT_ORDER_BY_FIELD_MANUFACTURER | 2 | Order by manufacturer |
| COMPONENT_ORDER_BY_FIELD_MODEL | 3 | Order by model |
| COMPONENT_ORDER_BY_FIELD_TYPE | 4 | Order by component type |



<a name="v1-ComponentType"></a>

### ComponentType


| Name | Number | Description |
| ---- | ------ | ----------- |
| COMPONENT_TYPE_UNKNOWN | 0 | |
| COMPONENT_TYPE_COMPUTE | 1 | |
| COMPONENT_TYPE_NVLSWITCH | 2 | |
| COMPONENT_TYPE_POWERSHELF | 3 | |
| COMPONENT_TYPE_TORSWITCH | 4 | |
| COMPONENT_TYPE_UMS | 5 | |
| COMPONENT_TYPE_CDU | 6 | |



<a name="v1-ConflictStrategy"></a>

### ConflictStrategy
ConflictStrategy controls how a task behaves when a conflict is detected.

| Name | Number | Description |
| ---- | ------ | ----------- |
| CONFLICT_STRATEGY_UNSPECIFIED | 0 | CONFLICT_STRATEGY_UNSPECIFIED defaults to REJECT. Wire value 0 preserves backward compatibility with the former bool false (reject). |
| CONFLICT_STRATEGY_QUEUE | 1 | CONFLICT_STRATEGY_QUEUE queues the task until the conflicting task completes. Wire value 1 preserves backward compatibility with the former bool true (queue). |
| CONFLICT_STRATEGY_REJECT | 2 | CONFLICT_STRATEGY_REJECT immediately rejects the task when a conflict is detected. |



<a name="v1-DiffType"></a>

### DiffType


| Name | Number | Description |
| ---- | ------ | ----------- |
| DIFF_TYPE_UNKNOWN | 0 | |
| DIFF_TYPE_MISSING | 1 | Expected by RLA but not found in the component manager service |
| DIFF_TYPE_UNEXPECTED | 2 | Found in the component manager service but not expected by RLA |
| DIFF_TYPE_DRIFT | 3 | In both but with field differences |



<a name="v1-OperationType"></a>

### OperationType


| Name | Number | Description |
| ---- | ------ | ----------- |
| OPERATION_TYPE_UNKNOWN | 0 | |
| OPERATION_TYPE_POWER_CONTROL | 1 | |
| OPERATION_TYPE_FIRMWARE_CONTROL | 2 | |



<a name="v1-OverlapPolicy"></a>

### OverlapPolicy
OverlapPolicy controls what happens when a schedule fires while the previous
execution for the same scope is still active.

| Name | Number | Description |
| ---- | ------ | ----------- |
| OVERLAP_POLICY_UNSPECIFIED | 0 | |
| OVERLAP_POLICY_SKIP | 1 | skip this firing cycle for any scope whose last task is still active |
| OVERLAP_POLICY_QUEUE | 2 | submit unconditionally; the task manager queues behind the active task |



<a name="v1-PowerControlOp"></a>

### PowerControlOp


| Name | Number | Description |
| ---- | ------ | ----------- |
| POWER_CONTROL_OP_UNKNOWN | 0 | |
| POWER_CONTROL_OP_ON | 1 | Power On |
| POWER_CONTROL_OP_FORCE_ON | 2 | |
| POWER_CONTROL_OP_OFF | 3 | Power Off

graceful shutdown |
| POWER_CONTROL_OP_FORCE_OFF | 4 | |
| POWER_CONTROL_OP_RESTART | 5 | Restart (OS level reboot)

graceful restart |
| POWER_CONTROL_OP_FORCE_RESTART | 6 | |
| POWER_CONTROL_OP_WARM_RESET | 7 | Reset (hardware level) |
| POWER_CONTROL_OP_COLD_RESET | 8 | |



<a name="v1-RackFilterField"></a>

### RackFilterField
RackFilterField represents the supported filter field types for rack queries

| Name | Number | Description |
| ---- | ------ | ----------- |
| RACK_FILTER_FIELD_UNSPECIFIED | 0 | |
| RACK_FILTER_FIELD_NAME | 1 | Filter by rack name |
| RACK_FILTER_FIELD_MANUFACTURER | 2 | Filter by manufacturer |
| RACK_FILTER_FIELD_MODEL | 3 | Filter by model (stored in description JSONB) |



<a name="v1-RackOrderByField"></a>

### RackOrderByField
RackOrderByField represents the supported order by field types for rack queries

| Name | Number | Description |
| ---- | ------ | ----------- |
| RACK_ORDER_BY_FIELD_UNSPECIFIED | 0 | |
| RACK_ORDER_BY_FIELD_NAME | 1 | Order by rack name |
| RACK_ORDER_BY_FIELD_MANUFACTURER | 2 | Order by manufacturer |
| RACK_ORDER_BY_FIELD_MODEL | 3 | Order by model |



<a name="v1-ScheduleSpecType"></a>

### ScheduleSpecType


| Name | Number | Description |
| ---- | ------ | ----------- |
| SCHEDULE_SPEC_TYPE_UNSPECIFIED | 0 | |
| SCHEDULE_SPEC_TYPE_INTERVAL | 1 | spec is a Go duration string, e.g. &#34;24h&#34; |
| SCHEDULE_SPEC_TYPE_CRON | 2 | spec is a 5-field cron expression |
| SCHEDULE_SPEC_TYPE_ONE_TIME | 3 | spec is an RFC3339 timestamp |



<a name="v1-TaskExecutorType"></a>

### TaskExecutorType


| Name | Number | Description |
| ---- | ------ | ----------- |
| TASK_EXECUTOR_TYPE_UNKNOWN | 0 | |
| TASK_EXECUTOR_TYPE_TEMPORAL | 1 | |



<a name="v1-TaskStatus"></a>

### TaskStatus


| Name | Number | Description |
| ---- | ------ | ----------- |
| TASK_STATUS_UNKNOWN | 0 | |
| TASK_STATUS_PENDING | 1 | |
| TASK_STATUS_RUNNING | 2 | |
| TASK_STATUS_COMPLETED | 3 | |
| TASK_STATUS_FAILED | 4 | |
| TASK_STATUS_TERMINATED | 5 | |
| TASK_STATUS_WAITING | 6 | TASK_STATUS_WAITING means the task was queued because a conflicting task is active on the rack. It will be promoted automatically when the rack becomes available, or can be cancelled explicitly via CancelTask. |







<a name="v1-RLA"></a>

### RLA


| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| Version | [VersionRequest](#v1-VersionRequest) | [BuildInfo](#v1-BuildInfo) | Version |
| CreateTaskSchedule | [CreateTaskScheduleRequest](#v1-CreateTaskScheduleRequest) | [TaskSchedule](#v1-TaskSchedule) | Task schedules |
| GetTaskSchedule | [GetTaskScheduleRequest](#v1-GetTaskScheduleRequest) | [TaskSchedule](#v1-TaskSchedule) | |
| ListTaskSchedules | [ListTaskSchedulesRequest](#v1-ListTaskSchedulesRequest) | [ListTaskSchedulesResponse](#v1-ListTaskSchedulesResponse) | |
| UpdateTaskSchedule | [UpdateTaskScheduleRequest](#v1-UpdateTaskScheduleRequest) | [TaskSchedule](#v1-TaskSchedule) | |
| PauseTaskSchedule | [PauseTaskScheduleRequest](#v1-PauseTaskScheduleRequest) | [TaskSchedule](#v1-TaskSchedule) | |
| ResumeTaskSchedule | [ResumeTaskScheduleRequest](#v1-ResumeTaskScheduleRequest) | [TaskSchedule](#v1-TaskSchedule) | |
| DeleteTaskSchedule | [DeleteTaskScheduleRequest](#v1-DeleteTaskScheduleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| TriggerTaskSchedule | [TriggerTaskScheduleRequest](#v1-TriggerTaskScheduleRequest) | [SubmitTaskResponse](#v1-SubmitTaskResponse) | |
| AddTaskScheduleScope | [AddTaskScheduleScopeRequest](#v1-AddTaskScheduleScopeRequest) | [AddTaskScheduleScopeResponse](#v1-AddTaskScheduleScopeResponse) | add one or more racks to a schedule&#39;s scope |
| RemoveTaskScheduleScope | [RemoveTaskScheduleScopeRequest](#v1-RemoveTaskScheduleScopeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | remove a single rack from a schedule&#39;s scope by scope ID |
| UpdateTaskScheduleScope | [UpdateTaskScheduleScopeRequest](#v1-UpdateTaskScheduleScopeRequest) | [UpdateTaskScheduleScopeResponse](#v1-UpdateTaskScheduleScopeResponse) | reconcile the full scope against a desired target_spec |
| ListTaskScheduleScopes | [ListTaskScheduleScopesRequest](#v1-ListTaskScheduleScopesRequest) | [ListTaskScheduleScopesResponse](#v1-ListTaskScheduleScopesResponse) | list all racks in a schedule&#39;s scope |
| CheckScheduleConflicts | [CheckScheduleConflictsRequest](#v1-CheckScheduleConflictsRequest) | [CheckScheduleConflictsResponse](#v1-CheckScheduleConflictsResponse) | advisory: returns existing schedules that may conflict with a proposed operation |
| CreateExpectedRack | [CreateExpectedRackRequest](#v1-CreateExpectedRackRequest) | [CreateExpectedRackResponse](#v1-CreateExpectedRackResponse) | Rack CRUD |
| GetRackInfoByID | [GetRackInfoByIDRequest](#v1-GetRackInfoByIDRequest) | [GetRackInfoResponse](#v1-GetRackInfoResponse) | |
| GetRackInfoBySerial | [GetRackInfoBySerialRequest](#v1-GetRackInfoBySerialRequest) | [GetRackInfoResponse](#v1-GetRackInfoResponse) | |
| GetListOfRacks | [GetListOfRacksRequest](#v1-GetListOfRacksRequest) | [GetListOfRacksResponse](#v1-GetListOfRacksResponse) | |
| PatchRack | [PatchRackRequest](#v1-PatchRackRequest) | [PatchRackResponse](#v1-PatchRackResponse) | |
| DeleteRack | [DeleteRackRequest](#v1-DeleteRackRequest) | [DeleteRackResponse](#v1-DeleteRackResponse) | |
| PurgeRack | [PurgeRackRequest](#v1-PurgeRackRequest) | [PurgeRackResponse](#v1-PurgeRackResponse) | |
| UpgradeFirmware | [UpgradeFirmwareRequest](#v1-UpgradeFirmwareRequest) | [SubmitTaskResponse](#v1-SubmitTaskResponse) | Rack operations |
| BringUpRack | [BringUpRackRequest](#v1-BringUpRackRequest) | [SubmitTaskResponse](#v1-SubmitTaskResponse) | |
| IngestRack | [IngestRackRequest](#v1-IngestRackRequest) | [SubmitTaskResponse](#v1-SubmitTaskResponse) | |
| PowerOnRack | [PowerOnRackRequest](#v1-PowerOnRackRequest) | [SubmitTaskResponse](#v1-SubmitTaskResponse) | |
| PowerOffRack | [PowerOffRackRequest](#v1-PowerOffRackRequest) | [SubmitTaskResponse](#v1-SubmitTaskResponse) | |
| PowerResetRack | [PowerResetRackRequest](#v1-PowerResetRackRequest) | [SubmitTaskResponse](#v1-SubmitTaskResponse) | |
| GetComponentInfoByID | [GetComponentInfoByIDRequest](#v1-GetComponentInfoByIDRequest) | [GetComponentInfoResponse](#v1-GetComponentInfoResponse) | Component CRUD |
| GetComponentInfoBySerial | [GetComponentInfoBySerialRequest](#v1-GetComponentInfoBySerialRequest) | [GetComponentInfoResponse](#v1-GetComponentInfoResponse) | |
| GetComponents | [GetComponentsRequest](#v1-GetComponentsRequest) | [GetComponentsResponse](#v1-GetComponentsResponse) | |
| ValidateComponents | [ValidateComponentsRequest](#v1-ValidateComponentsRequest) | [ValidateComponentsResponse](#v1-ValidateComponentsResponse) | |
| AddComponent | [AddComponentRequest](#v1-AddComponentRequest) | [AddComponentResponse](#v1-AddComponentResponse) | |
| PatchComponent | [PatchComponentRequest](#v1-PatchComponentRequest) | [PatchComponentResponse](#v1-PatchComponentResponse) | |
| DeleteComponent | [DeleteComponentRequest](#v1-DeleteComponentRequest) | [DeleteComponentResponse](#v1-DeleteComponentResponse) | |
| PurgeComponent | [PurgeComponentRequest](#v1-PurgeComponentRequest) | [PurgeComponentResponse](#v1-PurgeComponentResponse) | |
| CreateNVLDomain | [CreateNVLDomainRequest](#v1-CreateNVLDomainRequest) | [CreateNVLDomainResponse](#v1-CreateNVLDomainResponse) | NVL Domain |
| AttachRacksToNVLDomain | [AttachRacksToNVLDomainRequest](#v1-AttachRacksToNVLDomainRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| DetachRacksFromNVLDomain | [DetachRacksFromNVLDomainRequest](#v1-DetachRacksFromNVLDomainRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| GetListOfNVLDomains | [GetListOfNVLDomainsRequest](#v1-GetListOfNVLDomainsRequest) | [GetListOfNVLDomainsResponse](#v1-GetListOfNVLDomainsResponse) | |
| GetRacksForNVLDomain | [GetRacksForNVLDomainRequest](#v1-GetRacksForNVLDomainRequest) | [GetRacksForNVLDomainResponse](#v1-GetRacksForNVLDomainResponse) | |
| ListTasks | [ListTasksRequest](#v1-ListTasksRequest) | [ListTasksResponse](#v1-ListTasksResponse) | Tasks |
| GetTasksByIDs | [GetTasksByIDsRequest](#v1-GetTasksByIDsRequest) | [GetTasksByIDsResponse](#v1-GetTasksByIDsResponse) | |
| CancelTask | [CancelTaskRequest](#v1-CancelTaskRequest) | [CancelTaskResponse](#v1-CancelTaskResponse) | |
| CreateOperationRule | [CreateOperationRuleRequest](#v1-CreateOperationRuleRequest) | [CreateOperationRuleResponse](#v1-CreateOperationRuleResponse) | Operation rules |
| UpdateOperationRule | [UpdateOperationRuleRequest](#v1-UpdateOperationRuleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| DeleteOperationRule | [DeleteOperationRuleRequest](#v1-DeleteOperationRuleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| GetOperationRule | [GetOperationRuleRequest](#v1-GetOperationRuleRequest) | [OperationRule](#v1-OperationRule) | |
| ListOperationRules | [ListOperationRulesRequest](#v1-ListOperationRulesRequest) | [ListOperationRulesResponse](#v1-ListOperationRulesResponse) | |
| SetRuleAsDefault | [SetRuleAsDefaultRequest](#v1-SetRuleAsDefaultRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| AssociateRuleWithRack | [AssociateRuleWithRackRequest](#v1-AssociateRuleWithRackRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Rack-rule associations |
| DisassociateRuleFromRack | [DisassociateRuleFromRackRequest](#v1-DisassociateRuleFromRackRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Broken protobuf fragment links need anchors or plain-text fallback.

Several links (for example on Line 1340, Line 1850, Line 1982, Line 2326) reference fragments like #google-protobuf-Timestamp / #google-protobuf-Empty that are not defined in this file, so in-page navigation breaks.

📌 Suggested fix
+<a name="google-protobuf-Timestamp"></a>
+### google.protobuf.Timestamp
+Well-known protobuf timestamp type.
+
+<a name="google-protobuf-Empty"></a>
+### google.protobuf.Empty
+Well-known protobuf empty message.
+
+<a name="google-protobuf-FieldMask"></a>
+### google.protobuf.FieldMask
+Well-known protobuf field mask type.

As per coding guidelines **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness".

🧰 Tools
🪛 LanguageTool

[grammar] ~2131-~2131: Use a hyphen to join words.
Context: ...erByField represents the supported order by field types for component queries | Nam...

(QB_NEW_EN_HYPHEN)


[grammar] ~2228-~2228: Use a hyphen to join words.
Context: ...WER_CONTROL_OP_RESTART | 5 | Restart (OS level reboot) graceful restart | | POWE...

(QB_NEW_EN_HYPHEN)


[grammar] ~2254-~2254: Use a hyphen to join words.
Context: ...erByField represents the supported order by field types for rack queries | Name | N...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.22.1)

[warning] 1340-1340: Link fragments should be valid

(MD051, link-fragments)


[warning] 1341-1341: Link fragments should be valid

(MD051, link-fragments)


[warning] 1649-1649: Link fragments should be valid

(MD051, link-fragments)


[warning] 1650-1650: Link fragments should be valid

(MD051, link-fragments)


[warning] 1849-1849: Link fragments should be valid

(MD051, link-fragments)


[warning] 1850-1850: Link fragments should be valid

(MD051, link-fragments)


[warning] 1851-1851: Link fragments should be valid

(MD051, link-fragments)


[warning] 1853-1853: Link fragments should be valid

(MD051, link-fragments)


[warning] 1854-1854: Link fragments should be valid

(MD051, link-fragments)


[warning] 1876-1876: Link fragments should be valid

(MD051, link-fragments)


[warning] 1877-1877: Link fragments should be valid

(MD051, link-fragments)


[warning] 1878-1878: Link fragments should be valid

(MD051, link-fragments)


[warning] 1879-1879: Link fragments should be valid

(MD051, link-fragments)


[warning] 1906-1906: Link fragments should be valid

(MD051, link-fragments)


[warning] 1982-1982: Link fragments should be valid

(MD051, link-fragments)


[warning] 2037-2037: Link fragments should be valid

(MD051, link-fragments)


[warning] 2038-2038: Link fragments should be valid

(MD051, link-fragments)


[warning] 2076-2076: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


[warning] 2224-2224: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


[warning] 2326-2326: Link fragments should be valid

(MD051, link-fragments)


[warning] 2329-2329: Link fragments should be valid

(MD051, link-fragments)


[warning] 2355-2355: Link fragments should be valid

(MD051, link-fragments)


[warning] 2356-2356: Link fragments should be valid

(MD051, link-fragments)


[warning] 2363-2363: Link fragments should be valid

(MD051, link-fragments)


[warning] 2364-2364: Link fragments should be valid

(MD051, link-fragments)


[warning] 2367-2367: Link fragments should be valid

(MD051, link-fragments)


[warning] 2368-2368: Link fragments should be valid

(MD051, link-fragments)


[warning] 2369-2369: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/docs/grpc-api.md` around lines 1340 - 2369, The doc contains broken
fragment links to external proto types (e.g. `#google-protobuf-Timestamp`,
`#google-protobuf-Empty` and similar fragments referenced throughout the file)
which break in-page navigation; fix by either adding local anchor sections named
google-protobuf-Timestamp and google-protobuf-Empty (and any other missing
fragments) with a brief plain-text description, or replace the markdown links
with plain text labels like "google.protobuf.Timestamp" /
"google.protobuf.Empty" so they no longer rely on undefined anchors; search for
fragment identifiers mentioned in the diff (e.g. google-protobuf-Timestamp,
google-protobuf-Empty, and other #... fragments used in OperationTargetSpec,
Task, TaskSchedule, etc.) and update each link to use the new anchors or
plain-text fallback consistently.

Comment thread flow/docs/grpc-api.md
Comment on lines +2076 to +2079
| missing_count | [int32](#int32) | | Summary counts

Expected by RLA but not found in the component manager service |
| unexpected_count | [int32](#int32) | | Found in the component manager service but not expected by RLA |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix malformed Markdown table rows.

Rows are split across lines, which breaks table structure and rendering (notably around Line 2076 and Line 2224).

🛠️ Suggested fix
-| missing_count | [int32](`#int32`) |  | Summary counts
-
-Expected by RLA but not found in the component manager service |
+| missing_count | [int32](`#int32`) |  | Summary counts. Expected by RLA but not found in the component manager service |
-| POWER_CONTROL_OP_OFF | 3 | Power Off
-
-graceful shutdown |
+| POWER_CONTROL_OP_OFF | 3 | Power Off (graceful shutdown) |
-| POWER_CONTROL_OP_RESTART | 5 | Restart (OS level reboot)
-
-graceful restart |
+| POWER_CONTROL_OP_RESTART | 5 | Restart (OS-level reboot, graceful restart) |

As per coding guidelines **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness".

Also applies to: 2224-2230

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 2076-2076: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/docs/grpc-api.md` around lines 2076 - 2079, The two Markdown table rows
for "missing_count" and "unexpected_count" are split across lines and breaking
rendering; fix by consolidating each row into a single line with proper pipe
separators (e.g., "| missing_count | [int32](`#int32`) |  | Summary counts
Expected by RLA but not found in the component manager service |") and do the
same for the malformed rows around 2224-2230 so each table entry is on one line,
preserving links and descriptions for the fields named missing_count and
unexpected_count.

Comment thread Makefile
Comment on lines +262 to 269
flow-proto:
FLOW_DIR=flow \
ls "$${FLOW_DIR}/proto/v1"; \
for file in "$${FLOW_DIR}"/proto/v1/*.proto; do \
cp "$$file" "workflow-schema/flow/proto/v1/"; \
echo "Copied: $$file"; \
./workflow-schema/scripts/add-go-package-option.sh "workflow-schema/rla/proto/v1/$$(basename "$$file")" "github.com/NVIDIA/infra-controller-rest/workflow-schema/rla"; \
./workflow-schema/scripts/add-go-package-option.sh "workflow-schema/flow/proto/v1/$$(basename "$$file")" "github.com/NVIDIA/infra-controller-rest/workflow-schema/flow"; \
done
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Split flow-proto into a helper target or script to satisfy checkmake.

The new target body already exceeds the repo’s maxbodylength rule, so this will keep Makefile lint noisy or failing on the rebrand branch.

🧰 Tools
🪛 checkmake (0.3.2)

[warning] 262-262: Target body for "flow-proto" exceeds allowed length of 5 lines (7).

(maxbodylength)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 262 - 269, The flow-proto target body is too long for
checkmake's maxbodylength; refactor by extracting the loop/copy logic into a
smaller helper target or external script and have the flow-proto target call
that helper. Specifically, create a new target (e.g., flow-proto-copy or
flow-proto-helper) or a shell script that performs the
ls/cp/echo/./workflow-schema/scripts/add-go-package-option.sh loop, then replace
the current loop body in the flow-proto target with a single line invoking that
helper (preserving use of FLOW_DIR and the call to add-go-package-option.sh and
referencing the same files via basename). Ensure the new helper/script name is
referenced from flow-proto so the Makefile body length is reduced.

@@ -50,9 +50,9 @@ RUN VERSION=$(grep -v '^#' /workspace/VERSION | tr -d '[:space:]' 2>/dev/null ||
BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This filename is still suffixed -rla. If we're committed to this change we might want to update the filename as well. Same for docker/production/Dockerfile.nico-rla.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks. This is the first in a series of renaming refactor PRs. As called out in the description, I deliberately kept build and image artifacts mostly untouched in this round. Follow-ups will cover:

CI renames (including the parts you flagged)
Internal cleanup inside flow/

@inf0rmatiker
Copy link
Copy Markdown
Contributor

Are there any external users of the Go rla packages? If so, their import statements will not work with the name change and we need to consider at least hosting a notice of this change, deprecating the old one.

@kunzhao-nv
Copy link
Copy Markdown
Contributor Author

Are there any external users of the Go rla packages? If so, their import statements will not work with the name change and we need to consider at least hosting a notice of this change, deprecating the old one.

Luckily, no for now.

@kunzhao-nv kunzhao-nv enabled auto-merge (squash) May 8, 2026 23:07
@kunzhao-nv kunzhao-nv disabled auto-merge May 8, 2026 23:10
First of a multi-PR rebrand. Renames directories, Go identifiers, internal
CLI flags / JSON tags / struct fields, Prometheus metric names, and fixes
the CI / Dockerfile / proto-regen plumbing to keep the build green.

Preserved for follow-up PRs (paired with deploy changes): proto
`service RLA`, generated `RLA*` symbols, `RLA_*` env vars, DNS
`rla.rla.svc.cluster.local`, image tag `nico-rla`, in-image binary
`/app/rla`, Makefile `rla-mock-server-*` target names.

Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
@kunzhao-nv kunzhao-nv force-pushed the chore/rla-to-flow branch from 29a700c to b3b4dbd Compare May 8, 2026 23:14
@kunzhao-nv kunzhao-nv enabled auto-merge (squash) May 8, 2026 23:14
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (1)
flow/docs/grpc-api.md (1)

2076-2082: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Incomplete rebranding: prose still references "RLA".

The field descriptions for missing_count and unexpected_count reference "RLA" rather than "Flow":

  • "Expected by RLA but not found..."
  • "Found in the component manager service but not expected by RLA"

These should be updated to "Flow" to align with the rebranding objectives.

As per coding guidelines **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness".


Note: The malformed table structure at these lines was already flagged in a previous review comment.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/docs/grpc-api.md` around lines 2076 - 2082, Update the prose for the
table fields missing_count and unexpected_count to replace "RLA" with "Flow"
(search for the symbols missing_count and unexpected_count in grpc-api.md) and
ensure the table row descriptions read "Expected by Flow but not found in the
component manager service" and "Found in the component manager service but not
expected by Flow" respectively; while editing, also correct the surrounding
table markup so rows for drift_count and match_count remain properly aligned and
the table renders as valid Markdown.
🧹 Nitpick comments (4)
api/pkg/api/handler/tray_test.go (2)

389-395: 💤 Low value

Function name createMockRLAResponse is inconsistent with Flow rebrand.

The helper function returns *flowv1.GetComponentsResponse and the comment references "Flow response," but the function name retains "RLA." Consider renaming to createMockFlowResponse for consistency.

♻️ Suggested rename
-	// Helper to create mock Flow response
-	createMockRLAResponse := func(components []*flowv1.Component, total int32) *flowv1.GetComponentsResponse {
+	// Helper to create mock Flow response
+	createMockFlowResponse := func(components []*flowv1.Component, total int32) *flowv1.GetComponentsResponse {

Update all call sites (lines 427, 441, 455, 469, 484, 498, 512) accordingly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/pkg/api/handler/tray_test.go` around lines 389 - 395, Rename the helper
function createMockRLAResponse to createMockFlowResponse (and update its
preceding comment to say "Helper to create mock Flow response") to match the
Flow rebrand; then update every call site that references createMockRLAResponse
to use createMockFlowResponse so the test compiles and comments align with
function semantics.

183-186: 💤 Low value

Variable name siteNoRLA is inconsistent with the Flow rebrand.

The variable name retains the old "RLA" nomenclature while the comment and Name field reference "Flow". For consistency with this rebrand PR, consider renaming the variable to siteNoFlow. This pattern appears at lines 184, 368, 727, and 931.

♻️ Suggested rename for consistency
-	// Create a site without Flow enabled
-	siteNoRLA := &cdbm.Site{
+	// Create a site without Flow enabled
+	siteNoFlow := &cdbm.Site{

Apply similarly at all occurrences and update references accordingly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/pkg/api/handler/tray_test.go` around lines 183 - 186, Rename the test
variable siteNoRLA to siteNoFlow throughout the tray_test.go tests to match the
Flow rebrand: update the declaration (&cdbm.Site{... Name:
"test-site-no-flow"...}) and all usages/assignments/assertions that reference
siteNoRLA (including the other occurrences mentioned) so tests compile and read
consistently with the "Flow" naming. Ensure any helper calls, comparisons, or
teardown code that used siteNoRLA now reference siteNoFlow.
flow/docs/grpc-api.md (2)

2128-2140: 💤 Low value

Grammar: hyphenate compound adjective "order-by field".

Line 2131 reads "order by field types" but should be "order-by field types" when the compound functions as an adjective.

📝 Suggested fix
-ComponentOrderByField represents the supported order by field types for component queries
+ComponentOrderByField represents the supported order-by field types for component queries

As per coding guidelines **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/docs/grpc-api.md` around lines 2128 - 2140, Update the
ComponentOrderByField section header/description to hyphenate the compound
adjective: change the phrase "order by field types" to "order-by field types" in
the ComponentOrderByField documentation (the section titled
"ComponentOrderByField" and the sentence "ComponentOrderByField represents the
supported order by field types for component queries"). Ensure the same
hyphenation is applied consistently anywhere else in that block if present.

2251-2262: 💤 Low value

Grammar: hyphenate compound adjective "order-by field".

Line 2254 reads "order by field types" but should be "order-by field types" when the compound functions as an adjective.

📝 Suggested fix
-RackOrderByField represents the supported order by field types for rack queries
+RackOrderByField represents the supported order-by field types for rack queries

As per coding guidelines **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/docs/grpc-api.md` around lines 2251 - 2262, Update the phrasing to
hyphenate the compound adjective "order-by" wherever it modifies "field" in this
doc: change the RackOrderByField description sentence to "RackOrderByField
represents the supported order-by field types for rack queries" and similarly
hyphenate the table cell descriptions (e.g., "Order-by rack name", "Order-by
manufacturer", "Order-by model") so all occurrences use "order-by" as a compound
adjective for clarity and consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@flow/docs/grpc-api.md`:
- Around line 2173-2184: The DiffType enum docs still reference "RLA"; update
the descriptions for DIFF_TYPE_MISSING and DIFF_TYPE_UNEXPECTED inside the
DiffType section so they reference "Flow" instead (e.g., change "Expected by RLA
but not found in the component manager service" to "Expected by Flow but not
found in the component manager service" and similarly for DIFF_TYPE_UNEXPECTED),
ensuring the enum name DiffType and the values DIFF_TYPE_MISSING and
DIFF_TYPE_UNEXPECTED remain unchanged and the rest of the surrounding wording
(e.g., "component manager service") is preserved for clarity.
- Line 138: Add a short, prominent note at the top of flow/docs/grpc-api.md
explaining that the project has been rebranded to "Flow" but the gRPC/proto
service name remains "RLA" for now (reference the proto service name RLA and
generated gRPC symbols), then update the table of contents entry
`[RLA](`#v1-RLA`)` to clarify the dual naming (e.g., "Flow service (RLA proto
definition)") so readers aren’t confused; ensure the note mentions that proto
symbols will be renamed in a follow-up and keep the existing section anchor
`v1-RLA` unchanged.

In `@Makefile`:
- Around line 263-266: The flow-proto Makefile recipe uses a transient
assignment "FLOW_DIR=flow \" which only applies to the next command, so the
subsequent for loop that references "$${FLOW_DIR}" sees it unset; change the
transient assignment to a shell-persistent assignment (e.g., set FLOW_DIR=flow;
\) so FLOW_DIR is defined for the following ls and the for loop that copies
.proto files, ensuring the references to FLOW_DIR in the loop and the cp
commands work correctly.

---

Duplicate comments:
In `@flow/docs/grpc-api.md`:
- Around line 2076-2082: Update the prose for the table fields missing_count and
unexpected_count to replace "RLA" with "Flow" (search for the symbols
missing_count and unexpected_count in grpc-api.md) and ensure the table row
descriptions read "Expected by Flow but not found in the component manager
service" and "Found in the component manager service but not expected by Flow"
respectively; while editing, also correct the surrounding table markup so rows
for drift_count and match_count remain properly aligned and the table renders as
valid Markdown.

---

Nitpick comments:
In `@api/pkg/api/handler/tray_test.go`:
- Around line 389-395: Rename the helper function createMockRLAResponse to
createMockFlowResponse (and update its preceding comment to say "Helper to
create mock Flow response") to match the Flow rebrand; then update every call
site that references createMockRLAResponse to use createMockFlowResponse so the
test compiles and comments align with function semantics.
- Around line 183-186: Rename the test variable siteNoRLA to siteNoFlow
throughout the tray_test.go tests to match the Flow rebrand: update the
declaration (&cdbm.Site{... Name: "test-site-no-flow"...}) and all
usages/assignments/assertions that reference siteNoRLA (including the other
occurrences mentioned) so tests compile and read consistently with the "Flow"
naming. Ensure any helper calls, comparisons, or teardown code that used
siteNoRLA now reference siteNoFlow.

In `@flow/docs/grpc-api.md`:
- Around line 2128-2140: Update the ComponentOrderByField section
header/description to hyphenate the compound adjective: change the phrase "order
by field types" to "order-by field types" in the ComponentOrderByField
documentation (the section titled "ComponentOrderByField" and the sentence
"ComponentOrderByField represents the supported order by field types for
component queries"). Ensure the same hyphenation is applied consistently
anywhere else in that block if present.
- Around line 2251-2262: Update the phrasing to hyphenate the compound adjective
"order-by" wherever it modifies "field" in this doc: change the RackOrderByField
description sentence to "RackOrderByField represents the supported order-by
field types for rack queries" and similarly hyphenate the table cell
descriptions (e.g., "Order-by rack name", "Order-by manufacturer", "Order-by
model") so all occurrences use "order-by" as a compound adjective for clarity
and consistency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: efae8ff2-e84a-4dc6-a856-930c4b079c76

📥 Commits

Reviewing files that changed from the base of the PR and between 29a700c and b3b4dbd.

⛔ Files ignored due to path filters (14)
  • flow/internal/nicoapi/gen/common.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/fmds.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/fmds_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/health.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/machine_discovery.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/measured_boot.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/mlx_device.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/nico.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/nico_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nicoapi/gen/site_explorer.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nsmapi/gen/nvswitch-manager.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/nsmapi/gen/nvswitch-manager_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/psmapi/gen/powershelf-manager.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
  • flow/internal/psmapi/gen/powershelf-manager_grpc.pb.go is excluded by !**/*.pb.go, !**/gen/**, !**/*.pb.go
📒 Files selected for processing (286)
  • .github/workflows/build-binaries.yml
  • .github/workflows/lint-and-test.yml
  • AGENTS.md
  • Makefile
  • api/pkg/api/handler/rack.go
  • api/pkg/api/handler/rack_test.go
  • api/pkg/api/handler/task.go
  • api/pkg/api/handler/task_test.go
  • api/pkg/api/handler/tray.go
  • api/pkg/api/handler/tray_test.go
  • api/pkg/api/handler/util/common/common.go
  • api/pkg/api/model/firmware.go
  • api/pkg/api/model/firmware_test.go
  • api/pkg/api/model/power.go
  • api/pkg/api/model/power_test.go
  • api/pkg/api/model/rack.go
  • api/pkg/api/model/rack_test.go
  • api/pkg/api/model/task.go
  • api/pkg/api/model/task_test.go
  • api/pkg/api/model/tray.go
  • api/pkg/api/model/tray_test.go
  • api/pkg/api/routes.go
  • docker/local/Dockerfile.nico-rla
  • docker/production/Dockerfile.nico-rla
  • docs/index.html
  • flow/.envrc
  • flow/.gitignore
  • flow/Dockerfile
  • flow/Makefile
  • flow/README.md
  • flow/cmd/component.go
  • flow/cmd/component_add.go
  • flow/cmd/component_delete.go
  • flow/cmd/component_diff.go
  • flow/cmd/component_expected.go
  • flow/cmd/component_purge.go
  • flow/cmd/component_update.go
  • flow/cmd/context.go
  • flow/cmd/db.go
  • flow/cmd/db_migrate.go
  • flow/cmd/firmware.go
  • flow/cmd/firmware_update.go
  • flow/cmd/firmware_upgrade.go
  • flow/cmd/firmware_version.go
  • flow/cmd/firmwareupdate_test.go
  • flow/cmd/ingest.go
  • flow/cmd/inventory.go
  • flow/cmd/power.go
  • flow/cmd/power_control.go
  • flow/cmd/power_stats.go
  • flow/cmd/power_status.go
  • flow/cmd/rack.go
  • flow/cmd/rack_create.go
  • flow/cmd/rack_delete.go
  • flow/cmd/rack_json.go
  • flow/cmd/rack_json_test.go
  • flow/cmd/rack_purge.go
  • flow/cmd/root.go
  • flow/cmd/rule.go
  • flow/cmd/rule_associate.go
  • flow/cmd/rule_create.go
  • flow/cmd/rule_delete.go
  • flow/cmd/rule_disassociate.go
  • flow/cmd/rule_get.go
  • flow/cmd/rule_list.go
  • flow/cmd/rule_set_default.go
  • flow/cmd/serve.go
  • flow/docs/component-manager-architecture.md
  • flow/docs/component-manager-config.md
  • flow/docs/grpc-api.html
  • flow/docs/grpc-api.md
  • flow/docs/operation-rules-guide.md
  • flow/docs/operation-rules-versioning.md
  • flow/docs/rla-architecture.md
  • flow/docs/scheduler-architecture.md
  • flow/docs/task-schedules.md
  • flow/examples/README.md
  • flow/examples/operation-rules-example.yaml
  • flow/examples/rack-create-example.json
  • flow/internal/alert/alert.go
  • flow/internal/certs/certs.go
  • flow/internal/certs/certs_test.go
  • flow/internal/clients/temporal/certificate.go
  • flow/internal/clients/temporal/certificate_test.go
  • flow/internal/clients/temporal/temporal.go
  • flow/internal/common/utils/utils.go
  • flow/internal/config/config.go
  • flow/internal/converter/dao/converter.go
  • flow/internal/converter/dao/converter_test.go
  • flow/internal/converter/protobuf/converter.go
  • flow/internal/converter/protobuf/converter_test.go
  • flow/internal/db/migrations/20250831154717_initial.down.sql
  • flow/internal/db/migrations/20250831154717_initial.up.sql
  • flow/internal/db/migrations/20251121130900_inventory.down.sql
  • flow/internal/db/migrations/20251121130900_inventory.up.sql
  • flow/internal/db/migrations/20251204120000_create_task_table.down.sql
  • flow/internal/db/migrations/20251204120000_create_task_table.up.sql
  • flow/internal/db/migrations/20260107000000_component_external_id.down.sql
  • flow/internal/db/migrations/20260107000000_component_external_id.up.sql
  • flow/internal/db/migrations/20260112000000_task_component_identifiers.down.sql
  • flow/internal/db/migrations/20260112000000_task_component_identifiers.up.sql
  • flow/internal/db/migrations/20260130000000_create_operation_rules.down.sql
  • flow/internal/db/migrations/20260130000000_create_operation_rules.up.sql
  • flow/internal/db/migrations/20260130000001_add_task_rule_tracking.down.sql
  • flow/internal/db/migrations/20260130000001_add_task_rule_tracking.up.sql
  • flow/internal/db/migrations/20260204005059_component_drift.down.sql
  • flow/internal/db/migrations/20260204005059_component_drift.up.sql
  • flow/internal/db/migrations/20260306000000_add_conflict_support.down.sql
  • flow/internal/db/migrations/20260306000000_add_conflict_support.up.sql
  • flow/internal/db/migrations/20260313000000_add_task_started_at.down.sql
  • flow/internal/db/migrations/20260313000000_add_task_started_at.up.sql
  • flow/internal/db/migrations/20260316000000_add_task_attributes.down.sql
  • flow/internal/db/migrations/20260316000000_add_task_attributes.up.sql
  • flow/internal/db/migrations/20260401000000_bmc_cascade_delete.down.sql
  • flow/internal/db/migrations/20260401000000_bmc_cascade_delete.up.sql
  • flow/internal/db/migrations/20260409000000_create_trigger_functions.down.sql
  • flow/internal/db/migrations/20260409000000_create_trigger_functions.up.sql
  • flow/internal/db/migrations/20260410000000_create_task_schedule_table.down.sql
  • flow/internal/db/migrations/20260410000000_create_task_schedule_table.up.sql
  • flow/internal/db/migrations/README.md
  • flow/internal/db/migrations/main.go
  • flow/internal/db/model/bmc.go
  • flow/internal/db/model/bmc_test.go
  • flow/internal/db/model/component.go
  • flow/internal/db/model/component_drift.go
  • flow/internal/db/model/component_test.go
  • flow/internal/db/model/nvldomain.go
  • flow/internal/db/model/operation_rule.go
  • flow/internal/db/model/rack.go
  • flow/internal/db/model/rack_test.go
  • flow/internal/db/model/task.go
  • flow/internal/db/model/task_schedule.go
  • flow/internal/db/model/task_schedule_scope.go
  • flow/internal/db/model/task_schedule_scope_test.go
  • flow/internal/db/query/filter.go
  • flow/internal/db/query/pagination.go
  • flow/internal/db/query/query.go
  • flow/internal/inventory/manager/manager.go
  • flow/internal/inventory/store/postgres.go
  • flow/internal/inventory/store/store.go
  • flow/internal/nicoapi/buf.gen.yaml
  • flow/internal/nicoapi/buf.yaml
  • flow/internal/nicoapi/grpc.go
  • flow/internal/nicoapi/mock.go
  • flow/internal/nicoapi/mod.go
  • flow/internal/nicoapi/mod_test.go
  • flow/internal/nicoapi/model.go
  • flow/internal/nicoapi/nicoproto/common.proto
  • flow/internal/nicoapi/nicoproto/fmds.proto
  • flow/internal/nicoapi/nicoproto/health.proto
  • flow/internal/nicoapi/nicoproto/machine_discovery.proto
  • flow/internal/nicoapi/nicoproto/measured_boot.proto
  • flow/internal/nicoapi/nicoproto/mlx_device.proto
  • flow/internal/nicoapi/nicoproto/nico.proto
  • flow/internal/nicoapi/nicoproto/site_explorer.proto
  • flow/internal/nicoapi/tweak_protodefs.sh
  • flow/internal/nsmapi/buf.gen.yaml
  • flow/internal/nsmapi/buf.yaml
  • flow/internal/nsmapi/grpc.go
  • flow/internal/nsmapi/mock.go
  • flow/internal/nsmapi/mod.go
  • flow/internal/nsmapi/model.go
  • flow/internal/nsmapi/nsmproto/nvswitch-manager.proto
  • flow/internal/operation/request.go
  • flow/internal/psmapi/buf.gen.yaml
  • flow/internal/psmapi/buf.yaml
  • flow/internal/psmapi/grpc.go
  • flow/internal/psmapi/mock.go
  • flow/internal/psmapi/mod.go
  • flow/internal/psmapi/mod_test.go
  • flow/internal/psmapi/model.go
  • flow/internal/psmapi/psmproto/powershelf-manager.proto
  • flow/internal/scheduler/dispatcher.go
  • flow/internal/scheduler/entry.go
  • flow/internal/scheduler/jobs/inventorysync/drift_test.go
  • flow/internal/scheduler/jobs/inventorysync/inventory.go
  • flow/internal/scheduler/jobs/inventorysync/inventory_test.go
  • flow/internal/scheduler/jobs/inventorysync/job.go
  • flow/internal/scheduler/jobs/leakdetection/job.go
  • flow/internal/scheduler/jobs/leakdetection/leakdetection.go
  • flow/internal/scheduler/jobs/leakdetection/leakdetection_test.go
  • flow/internal/scheduler/relay.go
  • flow/internal/scheduler/scheduler.go
  • flow/internal/scheduler/scheduler_test.go
  • flow/internal/scheduler/taskschedule/dispatcher.go
  • flow/internal/scheduler/taskschedule/dispatcher_test.go
  • flow/internal/scheduler/taskschedule/store.go
  • flow/internal/scheduler/taskschedule/template.go
  • flow/internal/scheduler/taskschedule/template_test.go
  • flow/internal/scheduler/types/event.go
  • flow/internal/scheduler/types/job.go
  • flow/internal/scheduler/types/policy.go
  • flow/internal/scheduler/types/trigger.go
  • flow/internal/scheduler/types/trigger_test.go
  • flow/internal/scheduler/worker.go
  • flow/internal/service/component_api_test.go
  • flow/internal/service/config.go
  • flow/internal/service/config_test.go
  • flow/internal/service/server_impl.go
  • flow/internal/service/server_impl_task_schedule.go
  • flow/internal/service/server_impl_task_schedule_test.go
  • flow/internal/service/service.go
  • flow/internal/task/common/common.go
  • flow/internal/task/common/common_test.go
  • flow/internal/task/common/operation_codes.go
  • flow/internal/task/componentmanager/builtin/provider_config_decoders.go
  • flow/internal/task/componentmanager/builtin/provider_config_decoders_test.go
  • flow/internal/task/componentmanager/componentmanager.go
  • flow/internal/task/componentmanager/componentmanager_test.go
  • flow/internal/task/componentmanager/compute/nico/nico.go
  • flow/internal/task/componentmanager/compute/nico/nico_test.go
  • flow/internal/task/componentmanager/config.go
  • flow/internal/task/componentmanager/config_test.go
  • flow/internal/task/componentmanager/errors.go
  • flow/internal/task/componentmanager/mock/mock.go
  • flow/internal/task/componentmanager/nvlswitch/nico/nico.go
  • flow/internal/task/componentmanager/nvlswitch/nico/nico_test.go
  • flow/internal/task/componentmanager/nvlswitch/nvswitchmanager/nvswitchmanager.go
  • flow/internal/task/componentmanager/powershelf/nico/nico.go
  • flow/internal/task/componentmanager/powershelf/nico/nico_test.go
  • flow/internal/task/componentmanager/powershelf/psm/psm.go
  • flow/internal/task/componentmanager/provider.go
  • flow/internal/task/componentmanager/providerapi/errors.go
  • flow/internal/task/componentmanager/providerapi/providerapi.go
  • flow/internal/task/componentmanager/providerapi/providerapi_test.go
  • flow/internal/task/componentmanager/providers/nico/firmware.go
  • flow/internal/task/componentmanager/providers/nico/power.go
  • flow/internal/task/componentmanager/providers/nico/provider.go
  • flow/internal/task/componentmanager/providers/nico/provider_test.go
  • flow/internal/task/componentmanager/providers/nvswitchmanager/provider.go
  • flow/internal/task/componentmanager/providers/nvswitchmanager/provider_test.go
  • flow/internal/task/componentmanager/providers/psm/provider.go
  • flow/internal/task/componentmanager/providers/psm/provider_test.go
  • flow/internal/task/conflict/conflict.go
  • flow/internal/task/conflict/conflict_test.go
  • flow/internal/task/conflict/promoter.go
  • flow/internal/task/conflict/promoter_test.go
  • flow/internal/task/conflict/store_mock_test.go
  • flow/internal/task/executor/executor.go
  • flow/internal/task/executor/temporalworkflow/README.md
  • flow/internal/task/executor/temporalworkflow/activity/activity.go
  • flow/internal/task/executor/temporalworkflow/activity/activity_test.go
  • flow/internal/task/executor/temporalworkflow/activity/registry.go
  • flow/internal/task/executor/temporalworkflow/activity/registry_test.go
  • flow/internal/task/executor/temporalworkflow/common/executionid.go
  • flow/internal/task/executor/temporalworkflow/common/target.go
  • flow/internal/task/executor/temporalworkflow/manager/helpers.go
  • flow/internal/task/executor/temporalworkflow/manager/manager.go
  • flow/internal/task/executor/temporalworkflow/workflow/actions.go
  • flow/internal/task/executor/temporalworkflow/workflow/actions_targetversion_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/bringup.go
  • flow/internal/task/executor/temporalworkflow/workflow/bringup_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/child_workflow_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/firmwarecontrol.go
  • flow/internal/task/executor/temporalworkflow/workflow/firmwarecontrol_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/genericcomponentstep.go
  • flow/internal/task/executor/temporalworkflow/workflow/helpers.go
  • flow/internal/task/executor/temporalworkflow/workflow/injectexpectation.go
  • flow/internal/task/executor/temporalworkflow/workflow/injectexpectation_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_action_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_batching_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/registry.go
  • flow/internal/task/executor/temporalworkflow/workflow/registry_test.go
  • flow/internal/task/manager/manager.go
  • flow/internal/task/manager/notifying_store.go
  • flow/internal/task/manager/resolver.go
  • flow/internal/task/manager/resolver_test.go
  • flow/internal/task/operationrules/actions.go
  • flow/internal/task/operationrules/actions_test.go
  • flow/internal/task/operationrules/loader.go
  • flow/internal/task/operationrules/loader_actions_test.go
  • flow/internal/task/operationrules/loader_test.go
  • flow/internal/task/operationrules/resolver.go
  • flow/internal/task/operationrules/resolver_defaults.go
  • flow/internal/task/operationrules/resolver_test.go
  • flow/internal/task/operationrules/rules.go
  • flow/internal/task/operationrules/rules_test.go
  • flow/internal/task/operationrules/rules_timeout_test.go
  • flow/internal/task/operationrules/sequences.go
  • flow/internal/task/operationrules/sequences_test.go
  • flow/internal/task/operations/operations.go
  • flow/internal/task/operations/options.go
  • flow/internal/task/operations/types.go
  • flow/internal/task/operations/types_test.go
✅ Files skipped from review due to trivial changes (114)
  • flow/internal/db/model/bmc_test.go
  • flow/internal/scheduler/worker.go
  • flow/internal/task/componentmanager/providers/psm/provider.go
  • flow/internal/task/executor/temporalworkflow/workflow/actions_targetversion_test.go
  • flow/internal/task/common/common.go
  • flow/internal/certs/certs_test.go
  • flow/internal/task/operationrules/loader_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/genericcomponentstep.go
  • flow/internal/task/executor/temporalworkflow/manager/helpers.go
  • flow/internal/nicoapi/model.go
  • flow/internal/task/executor/temporalworkflow/activity/registry.go
  • flow/README.md
  • flow/internal/psmapi/grpc.go
  • flow/cmd/ingest.go
  • flow/internal/task/componentmanager/providers/nico/provider.go
  • AGENTS.md
  • flow/internal/task/executor/temporalworkflow/workflow/injectexpectation.go
  • flow/internal/scheduler/scheduler_test.go
  • flow/internal/scheduler/jobs/leakdetection/job.go
  • flow/internal/task/conflict/conflict.go
  • flow/docs/rla-architecture.md
  • flow/internal/task/componentmanager/componentmanager_test.go
  • flow/internal/psmapi/buf.gen.yaml
  • flow/internal/task/executor/temporalworkflow/workflow/bringup_test.go
  • flow/internal/task/componentmanager/compute/nico/nico.go
  • flow/internal/scheduler/taskschedule/dispatcher.go
  • flow/internal/scheduler/taskschedule/template.go
  • flow/internal/task/operationrules/sequences_test.go
  • flow/internal/task/operationrules/resolver_defaults.go
  • flow/internal/task/executor/temporalworkflow/workflow/firmwarecontrol.go
  • flow/internal/scheduler/jobs/inventorysync/drift_test.go
  • flow/internal/task/componentmanager/compute/nico/nico_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/injectexpectation_test.go
  • flow/internal/task/componentmanager/providers/nvswitchmanager/provider_test.go
  • flow/cmd/rack_json_test.go
  • flow/internal/nicoapi/mod.go
  • flow/internal/task/executor/temporalworkflow/common/target.go
  • flow/internal/nicoapi/buf.gen.yaml
  • flow/internal/task/componentmanager/config.go
  • flow/internal/scheduler/dispatcher.go
  • flow/internal/scheduler/relay.go
  • flow/internal/task/componentmanager/providers/nico/firmware.go
  • flow/internal/task/operationrules/sequences.go
  • flow/cmd/component_delete.go
  • flow/internal/task/executor/temporalworkflow/workflow/firmwarecontrol_test.go
  • flow/internal/task/operationrules/resolver_test.go
  • flow/internal/scheduler/taskschedule/dispatcher_test.go
  • flow/internal/task/componentmanager/providers/nico/provider_test.go
  • flow/cmd/component_expected.go
  • flow/internal/db/model/operation_rule.go
  • flow/internal/task/componentmanager/mock/mock.go
  • flow/internal/task/operationrules/rules_timeout_test.go
  • flow/internal/scheduler/jobs/leakdetection/leakdetection_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/actions.go
  • flow/internal/psmapi/mock.go
  • flow/internal/converter/dao/converter_test.go
  • flow/internal/task/conflict/promoter.go
  • flow/internal/nsmapi/grpc.go
  • flow/internal/converter/protobuf/converter_test.go
  • flow/internal/task/operations/types.go
  • flow/internal/scheduler/jobs/leakdetection/leakdetection.go
  • flow/internal/scheduler/scheduler.go
  • flow/internal/task/operationrules/rules_test.go
  • flow/internal/task/conflict/store_mock_test.go
  • flow/internal/nsmapi/mock.go
  • flow/internal/task/componentmanager/nvlswitch/nvswitchmanager/nvswitchmanager.go
  • flow/internal/service/server_impl.go
  • flow/cmd/component_purge.go
  • flow/internal/scheduler/jobs/inventorysync/inventory_test.go
  • flow/cmd/rack_json.go
  • flow/internal/task/manager/manager.go
  • flow/internal/task/conflict/promoter_test.go
  • flow/internal/task/executor/temporalworkflow/activity/activity.go
  • flow/internal/db/model/component.go
  • flow/internal/service/server_impl_task_schedule.go
  • flow/internal/task/conflict/conflict_test.go
  • flow/internal/task/componentmanager/powershelf/nico/nico.go
  • flow/internal/db/model/task.go
  • flow/internal/converter/protobuf/converter.go
  • flow/internal/task/componentmanager/config_test.go
  • flow/cmd/power_control.go
  • flow/internal/task/executor/temporalworkflow/workflow/child_workflow_test.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_test.go
  • flow/internal/inventory/store/postgres.go
  • flow/internal/task/componentmanager/powershelf/nico/nico_test.go
  • flow/internal/task/componentmanager/powershelf/psm/psm.go
  • flow/internal/db/model/rack.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_action_test.go
  • flow/internal/scheduler/jobs/inventorysync/inventory.go
  • flow/internal/task/executor/temporalworkflow/workflow/registry_test.go
  • flow/cmd/serve.go
  • flow/internal/task/executor/temporalworkflow/README.md
  • flow/internal/task/componentmanager/builtin/provider_config_decoders.go
  • flow/internal/task/manager/notifying_store.go
  • flow/internal/psmapi/model.go
  • flow/internal/task/componentmanager/providers/psm/provider_test.go
  • flow/internal/inventory/manager/manager.go
  • flow/internal/nsmapi/nsmproto/nvswitch-manager.proto
  • api/pkg/api/routes.go
  • flow/cmd/rack_purge.go
  • flow/internal/task/executor/temporalworkflow/activity/registry_test.go
  • flow/internal/task/operationrules/loader.go
  • flow/internal/service/server_impl_task_schedule_test.go
  • flow/internal/service/config.go
  • api/pkg/api/model/task_test.go
  • flow/internal/task/manager/resolver.go
  • flow/internal/task/componentmanager/nvlswitch/nico/nico_test.go
  • flow/internal/task/executor/temporalworkflow/activity/activity_test.go
  • flow/internal/converter/dao/converter.go
  • flow/internal/task/executor/temporalworkflow/workflow/bringup.go
  • flow/internal/scheduler/jobs/inventorysync/job.go
  • flow/cmd/component_update.go
  • flow/docs/component-manager-architecture.md
🚧 Files skipped from review as they are similar to previous changes (57)
  • flow/internal/db/model/rack_test.go
  • flow/internal/task/componentmanager/provider.go
  • flow/cmd/root.go
  • flow/internal/task/operations/operations.go
  • flow/internal/task/executor/temporalworkflow/workflow/powercontrol_batching_test.go
  • flow/internal/clients/temporal/certificate.go
  • flow/internal/db/model/nvldomain.go
  • flow/internal/task/executor/temporalworkflow/workflow/registry.go
  • flow/internal/scheduler/taskschedule/template_test.go
  • api/pkg/api/model/power.go
  • flow/cmd/rule_associate.go
  • api/pkg/api/model/power_test.go
  • flow/internal/task/manager/resolver_test.go
  • flow/cmd/rule_set_default.go
  • docker/production/Dockerfile.nico-rla
  • flow/internal/db/model/task_schedule_scope_test.go
  • flow/cmd/component.go
  • flow/cmd/rack_create.go
  • flow/internal/task/componentmanager/builtin/provider_config_decoders_test.go
  • flow/internal/db/model/task_schedule_scope.go
  • flow/internal/task/operations/types_test.go
  • docker/local/Dockerfile.nico-rla
  • flow/internal/task/operationrules/actions.go
  • flow/internal/service/config_test.go
  • flow/cmd/rule_delete.go
  • flow/internal/task/executor/temporalworkflow/workflow/helpers.go
  • flow/cmd/component_diff.go
  • flow/internal/task/operationrules/rules.go
  • flow/internal/task/executor/temporalworkflow/manager/manager.go
  • flow/internal/task/operationrules/resolver.go
  • flow/internal/task/operations/options.go
  • flow/internal/nicoapi/grpc.go
  • flow/internal/db/model/bmc.go
  • flow/internal/service/service.go
  • flow/internal/operation/request.go
  • api/pkg/api/model/task.go
  • flow/Makefile
  • flow/cmd/rule_get.go
  • api/pkg/api/model/tray.go
  • api/pkg/api/model/firmware_test.go
  • flow/cmd/rack_delete.go
  • api/pkg/api/model/rack_test.go
  • api/pkg/api/handler/task.go
  • flow/internal/scheduler/taskschedule/store.go
  • api/pkg/api/handler/util/common/common.go
  • flow/internal/task/componentmanager/providers/nvswitchmanager/provider.go
  • flow/cmd/rule_disassociate.go
  • flow/internal/task/componentmanager/nvlswitch/nico/nico.go
  • api/pkg/api/model/firmware.go
  • flow/cmd/firmware_upgrade.go
  • flow/internal/nicoapi/mock.go
  • api/pkg/api/handler/task_test.go
  • api/pkg/api/model/tray_test.go
  • api/pkg/api/handler/tray.go
  • api/pkg/api/handler/rack.go
  • api/pkg/api/handler/rack_test.go
  • api/pkg/api/model/rack.go

Comment thread flow/docs/grpc-api.md
- [TaskExecutorType](#v1-TaskExecutorType)
- [TaskStatus](#v1-TaskStatus)

- [RLA](#v1-RLA)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Inconsistent branding: TOC references service as "RLA".

The table of contents lists [RLA](#v1-RLA) while the PR objectives state this is a rebranding from RLA to Flow. According to the PR summary, the proto service name RLA and generated gRPC symbols were intentionally left unchanged for follow-up work. However, this documentation file is named flow/docs/grpc-api.md and lives in the flow/ directory, creating confusion for readers.

Either:

  • Add a prominent note at the top explaining that while the codebase has migrated to "Flow" nomenclature, the gRPC service definition retains the name "RLA" temporarily, or
  • Rename references to clarify this is the "Flow service (RLA proto definition)"

As per coding guidelines **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/docs/grpc-api.md` at line 138, Add a short, prominent note at the top of
flow/docs/grpc-api.md explaining that the project has been rebranded to "Flow"
but the gRPC/proto service name remains "RLA" for now (reference the proto
service name RLA and generated gRPC symbols), then update the table of contents
entry `[RLA](`#v1-RLA`)` to clarify the dual naming (e.g., "Flow service (RLA
proto definition)") so readers aren’t confused; ensure the note mentions that
proto symbols will be renamed in a follow-up and keep the existing section
anchor `v1-RLA` unchanged.

Comment thread flow/docs/grpc-api.md
Comment on lines +2173 to +2184
<a name="v1-DiffType"></a>

### DiffType


| Name | Number | Description |
| ---- | ------ | ----------- |
| DIFF_TYPE_UNKNOWN | 0 | |
| DIFF_TYPE_MISSING | 1 | Expected by RLA but not found in the component manager service |
| DIFF_TYPE_UNEXPECTED | 2 | Found in the component manager service but not expected by RLA |
| DIFF_TYPE_DRIFT | 3 | In both but with field differences |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Incomplete rebranding: DiffType descriptions reference "RLA".

Lines 2181 and 2182 describe enum values using "RLA":

  • DIFF_TYPE_MISSING: "Expected by RLA but not found..."
  • DIFF_TYPE_UNEXPECTED: "Found in the component manager service but not expected by RLA"

Update these to reference "Flow" for consistency with the rebranding effort.

As per coding guidelines **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flow/docs/grpc-api.md` around lines 2173 - 2184, The DiffType enum docs still
reference "RLA"; update the descriptions for DIFF_TYPE_MISSING and
DIFF_TYPE_UNEXPECTED inside the DiffType section so they reference "Flow"
instead (e.g., change "Expected by RLA but not found in the component manager
service" to "Expected by Flow but not found in the component manager service"
and similarly for DIFF_TYPE_UNEXPECTED), ensuring the enum name DiffType and the
values DIFF_TYPE_MISSING and DIFF_TYPE_UNEXPECTED remain unchanged and the rest
of the surrounding wording (e.g., "component manager service") is preserved for
clarity.

Comment thread Makefile
Comment on lines +263 to +266
FLOW_DIR=flow \
ls "$${FLOW_DIR}/proto/v1"; \
for file in "$${FLOW_DIR}"/proto/v1/*.proto; do \
cp "$$file" "workflow-schema/flow/proto/v1/"; \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== flow-proto target =="
sed -n '262,269p' Makefile

echo
echo "== verify transient env-assignment semantics =="
bash -lc '
  unset FLOW_DIR
  FLOW_DIR=flow ls "${FLOW_DIR:-}/proto/v1" >/dev/null 2>&1 || true
  if [ -z "${FLOW_DIR:-}" ]; then
    echo "Confirmed: FLOW_DIR is unset after '\''FLOW_DIR=flow <command>'\''."
    exit 0
  fi
  echo "Unexpected: FLOW_DIR persisted as ${FLOW_DIR}."
  exit 1
'

Repository: NVIDIA/infra-controller-rest

Length of output: 691


Fix FLOW_DIR variable scoping in flow-proto target.

The current recipe on line 263 uses transient environment-variable assignment (FLOW_DIR=flow \), which only persists for the immediately following ls command. By line 265, FLOW_DIR is unset, causing the for loop to expand "$${FLOW_DIR}"/proto/v1/*.proto to an empty or incorrect path, breaking proto file copying.

Suggested fix
 flow-proto:
-	FLOW_DIR=flow \
+	FLOW_DIR=flow; \
 	ls "$${FLOW_DIR}/proto/v1"; \
 	for file in "$${FLOW_DIR}"/proto/v1/*.proto; do \
 		cp "$$file" "workflow-schema/flow/proto/v1/"; \
 		echo "Copied: $$file"; \
 		./workflow-schema/scripts/add-go-package-option.sh "workflow-schema/flow/proto/v1/$$(basename "$$file")" "github.com/NVIDIA/infra-controller-rest/workflow-schema/flow"; \
 	done

Replace the line-continuation backslash with a semicolon followed by a backslash to establish FLOW_DIR in the shell context before the loop executes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 263 - 266, The flow-proto Makefile recipe uses a
transient assignment "FLOW_DIR=flow \" which only applies to the next command,
so the subsequent for loop that references "$${FLOW_DIR}" sees it unset; change
the transient assignment to a shell-persistent assignment (e.g., set
FLOW_DIR=flow; \) so FLOW_DIR is defined for the following ls and the for loop
that copies .proto files, ensuring the references to FLOW_DIR in the loop and
the cp commands work correctly.

@kunzhao-nv kunzhao-nv disabled auto-merge May 9, 2026 07:32
Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
@kunzhao-nv kunzhao-nv merged commit 9a87cd4 into main May 9, 2026
55 checks passed
@kunzhao-nv kunzhao-nv deleted the chore/rla-to-flow branch May 9, 2026 17:18
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.

3 participants