-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add UI element for resyncing versions from VCS #6090
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
Comments
@ericholscher Do we want this to behave same as build list page readthedocs.org/readthedocs/builds/views.py Lines 50 to 80 in 3f3488f
And Will this |
@saadmk11 the |
I had a user request resyncing via API, so they could ensure branches were synced in their CI. This could be a good first step towards an implementation, which the frontend UI element could just hit. |
Yeah, an API endpoint would be perfect. See readthedocs/ext-theme#65 for the dashboard implementation: |
Looking into this, we already have an API endpoint for this: readthedocs.org/readthedocs/api/v2/views/task_views.py Lines 38 to 52 in bf02353
|
Yes, we have this button in the old dashboard. This endpoint does not work because it requires Celery storing the results and we removed that feature because of... Celery-reasons. The current button in the old dashboard just fakes it and waits ~3s, IIRC. |
This will be used in the frontend, but also available as an API. Mostly curious if this is a good approach, and I can get some tests together for it. Refs #6090
* Add an initial resync_versions API to v3 This will be used in the frontend, but also available as an API. Mostly curious if this is a good approach, and I can get some tests together for it. Refs #6090 * Add test * Fix test * Add default serializer * Add to serializer * Update readthedocs/api/v3/views.py Co-authored-by: Santos Gallegos <[email protected]> * Update sync_versions endpoint * Fix tests * Add docs * Add missing test --------- Co-authored-by: Santos Gallegos <[email protected]>
Currently we have a task that resyncs Versions from VCS:
readthedocs.org/readthedocs/projects/tasks.py
Line 217 in 7fda1c0
We should create a button on the Versions page (/projects//versions/) that lets users automatically trigger a resync. We usually try and resync versions whenever we get a new webhook from GitHub, but there are a few cases where this doesn't work:
Normally we tell users to just do a build of their docs to fix this, but I think we should add a UI element to resync them, so it's more obvious how to handle this situation.
The text was updated successfully, but these errors were encountered: