Skip to content

POC: Add built in steps to workflows #9743

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

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

Conversation

jdelfino
Copy link
Contributor

I imagine this interface change would require some more discussion and documentation, so I'm not looking to submit this, but wanted to send for discussion.

This change would support custom setup for kythe/codesearch indexing. It would unfortunately remove "automatic" injection of these steps, and require anyone using codesearch to inject boilerplate steps into their workflow config.

The main alternative that I can think of to this approach would be a separate "codesearch" top-level section in the workflow config that allowed specification of setup steps required for a kythe build, or maybe even just packages to install or a docker container to use. The adoption curve for that would be gentler - if no custom setup steps were required, kythe & CS indexing would continue to "just work" when codesearch was enabled.

This is based on GH Actions uses: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses

Comment on lines +173 to +176
builtInSteps: map[string]StepMaker{
"@kythe": config.KytheIndexingAction,
"@codesearch_index": config.CodesearchIncrementalUpdateAction,
},
Copy link
Member

@bduffany bduffany Jun 24, 2025

Choose a reason for hiding this comment

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

I like this - in the future I hope uses can support custom reusable actions, so it might be good to format this as a git remote file reference from the start, like buildbuddy-io/actions/kythe-index, buildbuddy-io/actions/codesearch-index. For now we can hard-code the actual configs, but in the future, we could transparently swap out the implementation so that it fetches from the repo github.com/buildbuddy-io/actions and looks for ./codesearch-index/manifest.yaml or something like that (can be done in a single API request, similar to how we fetch buildbuddy.yaml). Ideally, users would also specify a commit_sha but we could maybe default to HEAD if one isn't specified.

@bduffany bduffany requested a review from maggie-lou June 24, 2025 20:07
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