vendored plugin hooks are always run after regular plugin hooks
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
**Is your feature request related to a problem? Please describe.**
We currently use a mix of vendored plugins and regular plugins in several of our steps. However, for this mix, the documented "within each hook, in the order they were listed in the step" [here](https://buildkite.com/docs/plugins/using#adding-a-plugin-to-your-pipeline) is not respected, and regular plugin hooks are always executed before vendored plugin hooks. This means that we can't have a vendored `pre-command` hook execute before a regular `pre-command` hook for example.
It looks like this is caused by the two separate phases of plugin collection [here](https://github.com/buildkite/agent/blob/main/bootstrap/bootstrap.go#L136).
**Describe the solution you'd like**
We would like the source of the plugin to be transparent to the order in which they are executed.
**Describe alternatives you've considered**
The vendored plugin could be published but is very specific and we'd rather not be forced to do this to solve this problem.
**Additional context**
/
Contributor guide
Research direction
Start at the plugin collection phases in bootstrap/bootstrap.go around line 136 and compare them with the documented order in the linked plugin guide. Trace how vendored and regular plugins enter hook execution, then verify that mixed plugins run each hook in the order listed in the step regardless of source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100