Skip to content

Conversation

ajanikow
Copy link
Collaborator

No description provided.

@cla-bot cla-bot bot added the cla-signed label Sep 16, 2025
@ajanikow ajanikow requested a review from Copilot September 17, 2025 09:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a Gateway UpToDate condition feature for the platform to track and validate the propagation of gateway configuration across all gateway members. The key changes include adding configuration checksum tracking and implementing condition monitoring at both member and deployment levels.

  • Adds gateway configuration checksum tracking to config maps
  • Implements deployment-level gateway condition validation
  • Integrates gateway config status into deployment up-to-date checks

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/util/constants/gateway.go Adds gateway config checksum constant
pkg/deployment/resources/config_map_gateway.go Includes checksum in gateway config maps
pkg/deployment/reconcile/plan_builder_high.go Integrates gateway config condition plan
pkg/deployment/reconcile/plan_builder_gateway.go Implements gateway config condition logic and removes debug logging
pkg/deployment/member/phase_updates.go Adds gateway config condition cleanup
pkg/deployment/deployment_inspector.go Integrates gateway condition into deployment status
pkg/util/k8sutil/helm/chart_manager_test.go Updates test to use dynamic repository name
CHANGELOG.md Documents the new feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 94 to 96
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionTrue || c.Hash != "" {
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config UpToDate", api.ConditionTypeGatewayConfig, true, "Gateway Config Propagated", "Gateway Config Propagated", checksum))
}
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

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

This condition check is duplicated from line 93 and creates unreachable code. The outer condition already ensures the same state, making this inner check redundant and the code block unreachable.

Suggested change
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionTrue || c.Hash != "" {
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config UpToDate", api.ConditionTypeGatewayConfig, true, "Gateway Config Propagated", "Gateway Config Propagated", checksum))
}
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config UpToDate", api.ConditionTypeGatewayConfig, true, "Gateway Config Propagated", "Gateway Config Propagated", checksum))

Copilot uses AI. Check for mistakes.

Comment on lines 101 to 103
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionTrue || c.Hash != "" {
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config Not UpToDate", api.ConditionTypeGatewayConfig, false, "Gateway Config Not Propagated", "Gateway Config Not Propagated", checksum))
}
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

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

This condition check is duplicated from line 100 and creates unreachable code. The outer condition already ensures the same state, making this inner check redundant and the code block unreachable.

Suggested change
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionTrue || c.Hash != "" {
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config Not UpToDate", api.ConditionTypeGatewayConfig, false, "Gateway Config Not Propagated", "Gateway Config Not Propagated", checksum))
}
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config Not UpToDate", api.ConditionTypeGatewayConfig, false, "Gateway Config Not Propagated", "Gateway Config Not Propagated", checksum))

Copilot uses AI. Check for mistakes.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ajanikow ajanikow merged commit 3551355 into master Sep 17, 2025
3 checks passed
@ajanikow ajanikow deleted the feature/gateway_condition branch September 17, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants