-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix FIFTYONE_ENABLE_ORCHESTRATOR_REGISTRATION warning behavior #5036
Conversation
WalkthroughThe changes in this pull request focus on modifying the functionality of the Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
const isAbortError = result.error.name === "AbortError" || result.error instanceof DOMException; | ||
const isAbortError = | ||
result.error.name === "AbortError" || | ||
result.error instanceof DOMException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not me, just prettier tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
app/packages/operators/src/state.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/packages/operators/src/state.ts (1)
Pattern **/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
🔇 Additional comments (1)
app/packages/operators/src/state.ts (1)
951-953
: LGTM! Clear and maintainable error handling.
The error handling logic has been improved by splitting the condition across multiple lines, making it more readable while maintaining the same functionality.
app/packages/operators/src/state.ts
Outdated
!hasAvailableOrchestators && | ||
!allowImmediateExecution; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix undefined variable reference.
The condition uses allowImmediateExecution
which appears to be undefined. This could lead to unexpected behavior.
The variable should likely be executionOptions.allowImmediateExecution
:
executionOptions.orchestratorRegistrationEnabled &&
!hasAvailableOrchestators &&
- !allowImmediateExecution;
+ !executionOptions.allowImmediateExecution;
Committable suggestion skipped: line range outside the PR's diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
problem with changing targets after testing thx rabbit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swheaton, understood. Thank you for the clarification.
✏️ Learnings added
Learnt from: swheaton
PR: voxel51/fiftyone#5036
File: app/packages/operators/src/state.ts:329-330
Timestamp: 2024-11-04T17:01:09.555Z
Learning: In `app/packages/operators/src/state.ts`, within the `useOperatorPromptSubmitOptions` function, the variable `allowImmediateExecution` is correctly used and should not be replaced with `executionOptions.allowImmediateExecution`.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unlearn that. i was saying the suggestion was good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swheaton, understood. I've removed the previous learning as requested. Thank you for the clarification.
when this env var is set, it doesn't care that the op is not delegated to throw the error.
What changes are proposed in this pull request?
Cases:
The conditional soup is kind of a jumble here but from all the cases listed out above, all we need to do is require that allowImmediate is false in order to show the warning message. If it's true we know we'll at least have the "Execute" button and so should be able to run it. If there are registered orchs they should show up in the dropdown.
How is this patch tested? If it is not, please explain why.
set env var, see that I can execute any non-delegated operator. Delegated ops still gets the error correctly
Summary by CodeRabbit
New Features
Bug Fixes