HDDS-15999. Add GitHub Action to trigger Algolia crawler reindex on demand. - #515
Open
jojochuang wants to merge 2 commits into
Open
HDDS-15999. Add GitHub Action to trigger Algolia crawler reindex on demand.#515jojochuang wants to merge 2 commits into
jojochuang wants to merge 2 commits into
Conversation
Supports manual runs and a daily schedule when master had commits in the last 24 hours. Co-authored-by: Cursor <cursoragent@cursor.com>
Match repo indentation for sequence items and drop redundant cron quotes. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds an on-demand + scheduled GitHub Actions workflow to trigger Algolia DocSearch crawler reindexing, with a guard to skip scheduled runs when master has had no commits in the last 24 hours.
Changes:
- Introduces
algolia-reindexworkflow withworkflow_dispatch(optionalforce) and daily schedule. - Adds a shell script that calls the Algolia Crawler REST API reindex endpoint and reports the response in logs/step summary.
- Documents required GitHub Actions repository secrets for ASF repo admins.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/algolia-reindex.yml | New workflow to conditionally trigger Algolia reindex on schedule or manually. |
| .github/scripts/algolia_reindex.sh | Script that performs the authenticated POST to Algolia Crawler reindex API and surfaces response. |
| .github/resource/algolia_reindex_secrets.md | Documentation for required repository secrets and where to retrieve them. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+25
to
+34
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| force: | ||
| description: Skip the 24-hour master commit check and always reindex | ||
| type: boolean | ||
| default: false | ||
| schedule: | ||
| - cron: 0 12 * * * | ||
|
|
Comment on lines
+5
to
+9
| | Secret | Where to find it in Algolia | | ||
| | --- | --- | | ||
| | `ALGOLIA_CRAWLER_USER_ID` | Crawler → **Settings** tab → Crawler User Id | | ||
| | `ALGOLIA_CRAWLER_API_KEY` | Crawler → **Settings** tab → Crawler API Key | | ||
| | `ALGOLIA_CRAWLER_ID` | Your crawler → Configuration → **Settings** → Crawler ID | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout master | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
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
algolia-reindexGitHub Actions workflow with manual dispatch (optionalforce) and a daily schedule that reindexes only whenmasterhad commits in the last 24 hours..github/scripts/algolia_reindex.shto call the Algolia Crawler REST API reindex endpoint..github/resource/algolia_reindex_secrets.md.https://issues.apache.org/jira/browse/HDDS-15999
Validated on a fork: algolia-reindex workflow runs.
Post-merge (repo admins)
Configure Actions repository secrets on
apache/ozone-site:ALGOLIA_CRAWLER_USER_ID,ALGOLIA_CRAWLER_API_KEY,ALGOLIA_CRAWLER_ID(see.github/resource/algolia_reindex_secrets.md).Test plan
algolia-reindex→ Run workflow with force → HTTP 2xx and new crawl in Algolia dashboard.masterhas no commits in 24h; triggers when it does.pnpm lintpasses (yamllint for workflow schedule block).Made with Cursor