Skip to content

HDDS-15999. Add GitHub Action to trigger Algolia crawler reindex on demand. - #515

Open
jojochuang wants to merge 2 commits into
apache:masterfrom
jojochuang:algolia-crawler-reindex
Open

HDDS-15999. Add GitHub Action to trigger Algolia crawler reindex on demand.#515
jojochuang wants to merge 2 commits into
apache:masterfrom
jojochuang:algolia-crawler-reindex

Conversation

@jojochuang

Copy link
Copy Markdown
Contributor

Summary

  • Add algolia-reindex GitHub Actions workflow with manual dispatch (optional force) and a daily schedule that reindexes only when master had commits in the last 24 hours.
  • Add .github/scripts/algolia_reindex.sh to call the Algolia Crawler REST API reindex endpoint.
  • Document required repository secrets for ASF repo admins in .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

  • Merge; add the three repository secrets.
  • Actions → algolia-reindex → Run workflow with force → HTTP 2xx and new crawl in Algolia dashboard.
  • Scheduled run skips when master has no commits in 24h; triggers when it does.
  • pnpm lint passes (yamllint for workflow schedule block).

Made with Cursor

jojochuang and others added 2 commits July 27, 2026 12:03
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>
@jojochuang
jojochuang requested a review from Copilot July 27, 2026 19:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-reindex workflow with workflow_dispatch (optional force) 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants