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

[TASK] (supernova): Remove Silences Worker and Introduce React Query #659

Closed
Tracked by #621
ArtieReus opened this issue Dec 4, 2024 · 0 comments · Fixed by #658
Closed
Tracked by #621

[TASK] (supernova): Remove Silences Worker and Introduce React Query #659

ArtieReus opened this issue Dec 4, 2024 · 0 comments · Fixed by #658
Assignees
Labels
refactor supernova All tasks related to supernova

Comments

@ArtieReus
Copy link
Collaborator

Description

Replace the silences worker with React Query while maintaining the existing functionality without modifying the store and other components. This refactor is a preparatory step for a future rearchitecture.

Steps

  1. Remove Silences Worker

    • Remove the current implementation of the silences worker used for fetching data.
  2. Introduce React Query

    • Use React Query to fetch alerts data.
    • Ensure the fetching logic retains the same interval as the alerts worker.
  3. Migrate Alert Worker Logic to React Query

    • Transfer the logic from the worker function into the React Query fetching promise.
    • Ensure the fetched data structure matches the existing structure used in the application.
  4. Save Fetching Results

    • Save the results fetched by React Query into the Zustand store.
    • Maintain compatibility with the existing store structure and ensure no changes are required in other components.

Acceptance Criteria

  • The silences worker is fully removed.
  • React Query is successfully integrated for fetching silences data.
  • The fetching interval remains consistent with the worker's behavior.
  • The results fetched by React Query match the existing data structure and are stored in the Zustand store.
  • All existing components relying on the Zustand store remain functional without modification.

Related to

Notes

  • This refactor does not introduce new functionality, such as filtering, but sets the groundwork for such changes in a subsequent iteration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor supernova All tasks related to supernova
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants