Skip to content
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 resolve input not debounce #4199

Merged
merged 1 commit into from Apr 3, 2024

Conversation

imanjra
Copy link
Contributor

@imanjra imanjra commented Mar 26, 2024

What changes are proposed in this pull request?

Typo in PR #4152 regressed debounced resolution of operator input causing operator prompt to re-resolve input in every change and potentially degrading performance. Changes in this PR fixes the issue to ensure input schema is not resolved for every change.

How is this patch tested? If it is not, please explain why.

Using a dynamic operator.

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

fix the dynamic operator's input schema getting resolved for every change

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

  • Bug Fixes
    • Improved the logic for resolving input fields in certain functions to enhance user experience.
  • Chores
    • Updated the application version to 0.23.8.

@imanjra imanjra requested a review from a team March 26, 2024 13:34
Copy link
Contributor

coderabbitai bot commented Mar 26, 2024

Walkthrough

The update encapsulates a minor yet potentially impactful adjustment within an operator's state management logic, alongside a straightforward version bump in the project's setup configuration. Specifically, it involves the refinement of function call parameters to possibly enhance or modify the logic for handling input fields and the increment of the project version, indicating progression and maintenance efforts.

Changes

Files Change Summary
.../operators/src/state.ts Removed ctx parameter from function call in useOperatorPrompt
setup.py Updated project version from "0.23.7" to "0.23.8"

🐇✨
In the realm of code, a tiny hop,
A version leaps, and a parameter drops.
Through fields of logic, we deftly weave,
Crafting changes, in the moonlight's eve.
Celebrate, for progress never stops. 🚀🌙

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 46.79487% with 83 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (release/v0.23.8@9936292). Click here to learn what that means.

❗ Current head ae048df differs from pull request most recent head 1f2ccdd. Consider uploading reports for the commit 1f2ccdd to get more accurate results

Files Patch % Lines
app/packages/spaces/src/components/Space.tsx 0.00% 54 Missing ⚠️
app/packages/spaces/src/SpaceTree.ts 0.00% 6 Missing ⚠️
app/packages/app/src/pages/IndexPage.tsx 0.00% 3 Missing ⚠️
app/packages/plugins/src/externalize.ts 0.00% 3 Missing ⚠️
...pp/packages/looker/src/elements/common/controls.ts 50.00% 2 Missing ⚠️
app/packages/spaces/src/SpaceNode.tsx 0.00% 2 Missing ⚠️
app/packages/state/src/hooks/useSessionSpaces.ts 0.00% 2 Missing ⚠️
app/packages/flashlight/src/constants.ts 0.00% 1 Missing ⚠️
app/packages/flashlight/src/index.ts 0.00% 1 Missing ⚠️
app/packages/flashlight/src/section.ts 0.00% 1 Missing ⚠️
... and 8 more
Additional details and impacted files
@@                Coverage Diff                 @@
##             release/v0.23.8    #4199   +/-   ##
==================================================
  Coverage                   ?   28.85%           
==================================================
  Files                      ?      769           
  Lines                      ?    97127           
  Branches                   ?     1128           
==================================================
  Hits                       ?    28026           
  Misses                     ?    69101           
  Partials                   ?        0           
Flag Coverage Δ
app 16.03% <46.79%> (?)
python 99.23% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

benjaminpkane
benjaminpkane previously approved these changes Mar 26, 2024
Copy link
Contributor

@benjaminpkane benjaminpkane left a comment

Choose a reason for hiding this comment

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

Makes sense!

@imanjra imanjra force-pushed the bugfix/resolve-input-debounce branch from ae048df to 1f2ccdd Compare April 2, 2024 18:09
@imanjra imanjra changed the base branch from develop to release/v0.23.8 April 2, 2024 18:09
@imanjra imanjra dismissed benjaminpkane’s stale review April 2, 2024 18:09

The base branch was changed.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e53596a and 1f2ccdd.
Files selected for processing (2)
  • app/packages/operators/src/state.ts (1 hunks)
  • setup.py (1 hunks)
Additional comments not posted (2)
setup.py (1)

19-19: The version update from "0.23.7" to "0.23.8" is appropriate for a bug fix. Ensure that all dependencies and documentation are also updated accordingly if needed.

app/packages/operators/src/state.ts (1)

336-336: Removing ctx from the dependencies array of useCallback for resolveInput aligns with the goal of improving performance by not recreating the debounced function on every ctx change. However, ensure thorough testing is conducted to verify that this change does not introduce unintended side effects, especially in scenarios where ctx changes are significant and should trigger a re-evaluation.

@imanjra imanjra merged commit a435bf8 into release/v0.23.8 Apr 3, 2024
@imanjra imanjra deleted the bugfix/resolve-input-debounce branch April 3, 2024 15:11
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.

None yet

2 participants