fix: NPE in OPL calculation during branch creation#41331
Conversation
WalkthroughAdds null-safety checks when resolving executables from a map during on-load scheduling transformation: missing executables are now logged (with diagnostic details) and skipped/removed to avoid null dereferences and inconsistent scheduling state. Changes
Sequence Diagram(s)sequenceDiagram
participant Transformer as SchedulingTransformer
participant MapStore as ExecutableMap
participant Logger as Logger
Transformer->>MapStore: lookup(executableName)
alt executable found
MapStore-->>Transformer: executable
Transformer->>Transformer: add executable to flat list / DTO
else executable missing
MapStore-->>Transformer: null
Transformer->>Logger: warn("missing executable", name, schedulingNames, mapKeys)
Transformer->>Transformer: skip / remove name from set
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: server-unit-tests / server-unit-tests
- GitHub Check: server-spotless / spotless-check
...th-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java
Show resolved
Hide resolved
| name, | ||
| names, | ||
| executableMap.keySet()); | ||
| continue; |
There was a problem hiding this comment.
If we continue, it can cause us to be inconsistent, users may lose their changes?
There was a problem hiding this comment.
Can you please elaborate?
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #
Issue Numberor
Fixes
Issue URLWarning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/18872268996
Commit: 89b384e
Cypress dashboard.
Tags:
@tag.SanitySpec:
Tue, 28 Oct 2025 11:25:59 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit