Skip to content

Conversation

@harshit12339
Copy link
Contributor

Proposed changes

Introduced a new useImageRegistry hook to centralize image registry data fetching and fallback logic. Updated ChaosStudioClone, ChaosStudioEdit, and StudioOverview components to use this hook, replacing direct queries and improving code reuse.

This PR will fix #5204

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Copilot AI review requested due to automatic review settings September 23, 2025 15:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a centralized useImageRegistry hook to fix image registry data handling across the Chaos Studio components. The fix addresses an issue where image registry fallback logic was not properly implemented in edit and clone experiment workflows.

  • Created a new useImageRegistry hook that centralizes image registry data fetching with fallback values
  • Replaced direct GraphQL queries in components with the new hook
  • Added the hook to dependency arrays in useEffect hooks to ensure proper re-rendering

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
chaoscenter/web/src/hooks/useImageRegistry.ts New hook that centralizes image registry fetching with fallback logic
chaoscenter/web/src/hooks/index.ts Exports the new useImageRegistry hook
chaoscenter/web/src/views/StudioOverview/StudioOverview.tsx Replaces direct query with useImageRegistry hook
chaoscenter/web/src/controllers/ChaosStudioEdit/ChaosStudioEdit.tsx Integrates useImageRegistry hook and updates dependency array
chaoscenter/web/src/controllers/ChaosStudioClone/ChaosStudioClone.tsx Integrates useImageRegistry hook and updates dependency array

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@harshit12339 harshit12339 force-pushed the fix/undefined-litmus-checker-image branch from 00a2be4 to 30ab02e Compare September 24, 2025 03:58
Introduced a new useImageRegistry hook to centralize image registry data fetching and fallback logic. Updated ChaosStudioClone, ChaosStudioEdit, and StudioOverview components to use this hook, replacing direct queries and improving code reuse..

Signed-off-by: Harshit Panchbhai <[email protected]>
@harshit12339 harshit12339 force-pushed the fix/undefined-litmus-checker-image branch from 30ab02e to 56177e6 Compare September 24, 2025 04:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

PriteshKiri and others added 2 commits October 8, 2025 16:26
fixed circular dependency, by directly using appstore hook file

Signed-off-by: Harshit Panchbhai <[email protected]>
@harshit12339
Copy link
Contributor Author

harshit12339 commented Oct 13, 2025

Hi @PriteshKiri can we run frontend checks, as I have made fix for cyclic dependency error that occured in last build

@PriteshKiri
Copy link
Contributor

Sure @harshit12339

@PriteshKiri PriteshKiri requested a review from amityt October 15, 2025 12:58
@PriteshKiri PriteshKiri requested a review from SahilKr24 October 16, 2025 10:27
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.

Undefined custom image registry for litmus checker coming during edit and clone experiments

5 participants