Skip to content

Update Dependencies.#2780

Open
VirajSalaka wants to merge 2 commits into
wso2:mainfrom
VirajSalaka:dep-update-3
Open

Update Dependencies.#2780
VirajSalaka wants to merge 2 commits into
wso2:mainfrom
VirajSalaka:dep-update-3

Conversation

@VirajSalaka

@VirajSalaka VirajSalaka commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Purpose

AI Workspace
Update js-yaml 4.2.0 -> 4.3.0

Goals

Describe what solutions this feature or fix introduces to address the problems outlined above.

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI. Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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

Run ID: abcf012a-13c0-4226-95d9-edb899ba8b2f

📥 Commits

Reviewing files that changed from the base of the PR and between e0aeb7c and a010bb6.

⛔ Files ignored due to path filters (1)
  • portals/ai-workspace/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • portals/ai-workspace/package.json
📝 Walkthrough

Walkthrough

The xDS policy handler now reuses unchanged policy chains based on route signatures, rebuilds changed routes, tracks removals, and commits reconciled state atomically. Tests cover signature behavior and reconciliation outcomes. The AI workspace’s direct js-yaml dependency is updated while its override remains unchanged.

Changes

Policy-chain reconciliation

Layer / File(s) Summary
Route signatures and applied state
gateway/gateway-runtime/policy-engine/internal/xdsclient/signature.go, gateway/gateway-runtime/policy-engine/internal/xdsclient/handler.go
Route signatures hash behavioral policy-chain inputs and selected API metadata, while applied signatures and chains are retained for reuse.
Snapshot reconciliation and commit
gateway/gateway-runtime/policy-engine/internal/xdsclient/handler.go
Snapshots are reconciled by reusing unchanged chains, rebuilding changed or new routes, accounting for absent routes, atomically committing state, and logging counters.
Reconciliation and signature validation
gateway/gateway-runtime/policy-engine/internal/xdsclient/reconcile_test.go
Tests cover reuse, volatile metadata, ordering changes, route removal, signature sensitivity, completeness, and failed-rebuild logging.

AI workspace dependencies

Layer / File(s) Summary
js-yaml dependency declaration
portals/ai-workspace/package.json
The direct js-yaml dependency changes from 4.2.0 to 4.3.0; the existing 4.2.0 override remains.

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

Sequence Diagram(s)

sequenceDiagram
  participant ADS
  participant ResourceHandler
  participant RouteSignature
  participant PolicyRegistry
  participant Kernel
  ADS->>ResourceHandler: Deliver policy snapshot
  ResourceHandler->>RouteSignature: Compute route signature
  ResourceHandler->>PolicyRegistry: Build changed or new chain
  ResourceHandler->>Kernel: Apply reconciled chains
  ResourceHandler->>ResourceHandler: Commit lastApplied state
Loading

Suggested reviewers: pubudu538, malinthaprasan, ashera96

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning Most required sections are still placeholders, so the PR description lacks the template's required details. Fill in the template with concrete Purpose, Goals, Approach, tests, security checks, docs, related PRs, and test environment details.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title is related to the dependency update, but it is too broad and misses the major policy-engine changes.
✨ 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[bot]
coderabbitai Bot previously approved these changes Jul 21, 2026

@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.

🧹 Nitpick comments (1)
gateway/gateway-runtime/policy-engine/internal/xdsclient/reconcile_test.go (1)

255-308: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Missing coverage for the signature-computation-error fail-safe path.

Per context snippet 1, the reconcile loop has a fail-safe: when routeSignature returns an error, the route is treated as changed and rebuilt rather than risk serving a stale chain. TestRouteSignature_StableAndSensitive and TestRouteSignatureView_Completeness exercise field sensitivity but neither test drives routeSignature/signatureOf into an actual marshal error (e.g. a Parameters value that encoding/json cannot marshal) to prove the fail-safe forces a rebuild instead of silently reusing a stale chain.

Consider adding a handler-level test that injects an unmarshalable value into a policy's Parameters (e.g. a func()) and asserts the route is rebuilt (factory count increments) rather than reused.

🤖 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 `@gateway/gateway-runtime/policy-engine/internal/xdsclient/reconcile_test.go`
around lines 255 - 308, Add handler-level coverage for the route-signature error
fail-safe by placing an unmarshalable value such as a function in a policy’s
Parameters, then reconciling the route and asserting the policy factory count
increases because the route is rebuilt rather than reused. Anchor the test to
the existing routeSignature/signatureOf flow and preserve normal reuse behavior
for valid parameters.
🤖 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.

Nitpick comments:
In `@gateway/gateway-runtime/policy-engine/internal/xdsclient/reconcile_test.go`:
- Around line 255-308: Add handler-level coverage for the route-signature error
fail-safe by placing an unmarshalable value such as a function in a policy’s
Parameters, then reconciling the route and asserting the policy factory count
increases because the route is rebuilt rather than reused. Anchor the test to
the existing routeSignature/signatureOf flow and preserve normal reuse behavior
for valid parameters.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9bf6e89c-c0a8-41a7-9dfc-56169cdf1f67

📥 Commits

Reviewing files that changed from the base of the PR and between d9f2b5a and e0aeb7c.

⛔ Files ignored due to path filters (1)
  • portals/ai-workspace/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • gateway/gateway-runtime/policy-engine/internal/xdsclient/handler.go
  • gateway/gateway-runtime/policy-engine/internal/xdsclient/reconcile_test.go
  • gateway/gateway-runtime/policy-engine/internal/xdsclient/signature.go
  • portals/ai-workspace/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • portals/ai-workspace/package.json

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