Skip to content

Remove transitional status configuration from deployment settings and update deployment logic - #3145

Merged
Thushani-Jayasekera merged 5 commits into
wso2:mainfrom
Thushani-Jayasekera:fallback-remove
Aug 5, 2026
Merged

Remove transitional status configuration from deployment settings and update deployment logic#3145
Thushani-Jayasekera merged 5 commits into
wso2:mainfrom
Thushani-Jayasekera:fallback-remove

Conversation

@Thushani-Jayasekera

Copy link
Copy Markdown
Contributor

Remove transitional status configuration from deployment settings and related code references. Update deployment logic to assume transitional status until gateway acknowledgment is received. Adjust polling behavior to handle timeout for transitional deployments, ensuring they are marked as FAILED if not acknowledged in time.

… related code references. Update deployment logic to assume transitional status until gateway acknowledgment is received. Adjust polling behavior to handle timeout for transitional deployments, ensuring they are marked as FAILED if not acknowledged in time.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Thushani-Jayasekera, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 96bc4b1d-72d4-42db-b2ef-3d497b74ad27

📥 Commits

Reviewing files that changed from the base of the PR and between 2272d7a and b9722c0.

📒 Files selected for processing (7)
  • platform-api/internal/model/deployment.go
  • platform-api/internal/service/deployment.go
  • platform-api/internal/service/llm_deployment.go
  • platform-api/internal/service/mcp_deployment.go
  • platform-api/plugins/eventgateway/service/webbroker_api_deployment.go
  • platform-api/plugins/eventgateway/service/websub_api_deployment.go
  • portals/ai-workspace/configs/config-template.toml
📝 Walkthrough

Walkthrough

The deployment status configuration flag is removed. Backend operations always start in transitional states. Desired terminal statuses are persisted and reported. Workspace polling now resolves terminal states and marks unresolved operations as failed after 80 seconds.

Changes

Deployment status flow

Layer / File(s) Summary
Remove transitional status configuration
kubernetes/helm/platform-api-helm-chart/..., platform-api/config/...
The transitional status configuration field is removed from Helm values, TOML templates, and the Go configuration struct.
Initialize backend operations with transitional statuses
platform-api/internal/service/..., platform-api/plugins/eventgateway/service/..., platform-api/internal/service/deployment_test.go
Deployment, restoration, and undeployment operations always start with DEPLOYING or UNDEPLOYING. Tests expect the transitional statuses.
Persist and report desired statuses
platform-api/internal/model/deployment.go, platform-api/internal/repository/..., platform-api/internal/service/gateway_internal.go
Deployment records expose desired terminal statuses. Repository and gateway reporting use these statuses, with fallbacks for legacy rows.
Poll transitional workspace statuses
portals/ai-workspace/src/contexts/..., portals/ai-workspace/src/Components/...
Polling tracks transitional statuses for 80 seconds, projects expired entries as FAILED, and removes gateway acknowledgement-specific state and rendering.
Configure integration test ports
tests/integration-e2e/docker-compose*.yaml, portals/ai-workspace/configs/config.toml
Integration host ports accept environment-variable overrides. Workspace configuration whitespace is compacted without changing values.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DeploymentService
  participant DeploymentRepository
  participant GatewayDeployContext
  participant GatewayDeployEnvCard
  DeploymentService->>DeploymentRepository: Store transitional status and desired status
  GatewayDeployContext->>DeploymentRepository: Poll deployment status
  DeploymentRepository-->>GatewayDeployContext: Return current and desired status
  GatewayDeployContext-->>GatewayDeployEnvCard: Expose effective status
Loading

Suggested reviewers: anugayan, krishanx92, lasanthas

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description states the main purpose and behavior changes but omits most required template sections, including tests, security checks, documentation, and environment. Complete the required sections with the purpose, goals, approach, user stories, documentation impact, test results, security checks, samples, related PRs, and test environment.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the removal of transitional status configuration and the related deployment logic changes.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

🤖 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 `@portals/ai-workspace/src/contexts/GatewayDeployContext.tsx`:
- Around line 437-442: Update the rejected-result handling in the deployment
polling flow around fetchSingleDeploymentStatus so transient status-read
failures remain active and are retried until expiresAt. Do not add rejected
entries to resolved or timedOut during the polling window; only mark them failed
after the deadline when the server still reports a transitional status.
- Around line 72-82: Remove the hard-coded TRANSITIONAL_POLL_TIMEOUT_MS limit
from GatewayDeployContext and obtain the effective deployment timeout or
operation deadline from platform-api. Use that server-provided value to bound
transitional-status polling, preserving accurate behavior when timeout settings
are disabled or configured differently.
🪄 Autofix

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: Pro Plus

Run ID: 0532bbc0-7d9a-4bab-b2a7-f7924bbddd21

📥 Commits

Reviewing files that changed from the base of the PR and between ec6b891 and a92155f.

📒 Files selected for processing (11)
  • kubernetes/helm/platform-api-helm-chart/templates/configmap.yaml
  • kubernetes/helm/platform-api-helm-chart/values.yaml
  • platform-api/config/config-template.toml
  • platform-api/config/config.go
  • platform-api/internal/service/deployment.go
  • platform-api/internal/service/llm_deployment.go
  • platform-api/internal/service/mcp_deployment.go
  • platform-api/plugins/eventgateway/service/webbroker_api_deployment.go
  • platform-api/plugins/eventgateway/service/websub_api_deployment.go
  • portals/ai-workspace/src/Components/GatewayDeploy/GatewayDeployEnvCard.tsx
  • portals/ai-workspace/src/contexts/GatewayDeployContext.tsx
💤 Files with no reviewable changes (3)
  • kubernetes/helm/platform-api-helm-chart/templates/configmap.yaml
  • kubernetes/helm/platform-api-helm-chart/values.yaml
  • platform-api/config/config-template.toml

Comment thread portals/ai-workspace/src/contexts/GatewayDeployContext.tsx
Comment thread portals/ai-workspace/src/contexts/GatewayDeployContext.tsx
…g and undeploying. Adjust polling interval for deployments and enhance error handling during status reads to allow for transient failures.
…e related checks across services to enhance deployment status handling.
@Thushani-Jayasekera
Thushani-Jayasekera merged commit 727a7cc into wso2:main Aug 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants