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

Fixes #38188 - Added error display for "Synchronize Now" button #11302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pavanshekar
Copy link
Contributor

What are the changes introduced in this pull request?

Added error handling for the "Synchronize Now" button on the Sync Status page, ensuring that users see an error message when attempting to sync repositories while the associated Content View is still publishing. The error message is displayed using the existing notification system without requiring additional API calls.

Considerations taken when implementing this change?

Leveraged existing error-handling mechanisms to minimize code changes while ensuring a smooth user experience. Instead of modifying backend logic extensively, the solution captures and displays API errors directly in the UI, preventing unnecessary sync attempts and providing immediate feedback to users.

What are the testing steps for this pull request?

  1. Enable any 3 repos on Satellite (say: 'Repo-1', 'Repo-2' & 'Repo-3')
  2. Create a Content View (say 'CV_1') where all the above 3 repos are added to the Content View
  3. Publish a new version of 'CV_1' content view
  4. While the CV_1 is being published and task is not finished and is in progress, quickly navigate to Satellite WebUI -> Content -> Sync Status page, checkbox all or any of the 'Repo-1', 'Repo-2' & 'Repo-3' and click on 'Synchronize Now'
  5. You should be able to see the corresponding error.

@pavanshekar pavanshekar changed the title Fixes #38188 - Added error display for "Synchronize Now" Fixes #38188 - Added error display for "Synchronize Now" button Feb 5, 2025
@pavanshekar pavanshekar marked this pull request as ready for review February 5, 2025 19:12
@sjha4
Copy link
Member

sjha4 commented Feb 10, 2025

The changes are working good..Able to see an error message on the sync status page if one of the selected repos has a CV publish in progress. In my reproducing the issue, I wasn't able to get a non-blocked repo to sync when one of the selected repos was blocked. Looking at the controller, I would expect other repos to sync while the one blocked repo fails but not able to see that happen.

@pavanshekar
Copy link
Contributor Author

Yeah, ideally, it should sync the non-blocked repos while only the blocked one fails. However, that doesn't seem to be happening, likely because the API generates an error that prevents the entire sync operation from proceeding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants