fix(ci): switch Algolia reindex to crawler v1 API#444
Merged
Conversation
- Purpose: make the Algolia reindex workflow authenticate and trigger reindexing with the credentials currently issued for this crawler. - Before: the workflow called legacy /api/user_configs endpoints and parsed the old .data[] response shape. - Problem: direct validation with the crawler credentials returned 401 Unauthorized on the legacy endpoint, so the GitHub Action failed before it could resolve the crawler or queue a reindex. - Change: switch the workflow to /api/1/crawlers endpoints, remove the unsupported appID query parameter, read crawler details from the v1 response, and consume the returned taskId when triggering reindex. - Documentation: update the README so it documents the actual API flow used by the workflow and no longer points readers at the legacy endpoint. - Validation: confirmed the credentials can list the crawler and fetch crawler details via the v1 API, and confirmed a live reindex request was accepted and the crawler entered reindexing=true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api/user_configsendpoints to the workingapi/1/crawlersendpointsappIDquery parameter from the crawler list callRoot Cause
The existing workflow used the legacy crawler endpoints and old response shape:
GET /api/user_configs?appId=...POST /api/user_configs/<id>/reindex.data[]Direct validation with the crawler credentials showed:
GET /api/user_configs?...returned401 UnauthorizedGET /api/1/crawlers?name=unraid&itemsPerPage=10returned200GET /api/1/crawlers/<id>returned200That means the crawler credentials are valid, but only for the v1 API surface this workflow now uses.
Validation
GET https://crawler.algolia.com/api/1/crawlers?name=unraid&itemsPerPage=10GET https://crawler.algolia.com/api/1/crawlers/5d4585bd-317c-4b04-b879-cb35899d9868POST https://crawler.algolia.com/api/1/crawlers/5d4585bd-317c-4b04-b879-cb35899d9868/reindexreindexing=trueNotes
I did not run a full docs build. The repo instructions explicitly prefer targeted validation for this kind of change.