googleapis / googleapis/release-please-action
Enable loading of custom plugins similar to the CLI tool
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 327
- PR merge metrics
- No merged PRs in 30d
Description
### TL;DR
Custom plugins that are [loaded by the CLI tool](https://github.com/googleapis/release-please/blob/71dcc7b3b2df4bb3d3e0884b3f0bfb96700cb76a/src/bin/release-please.ts#L828-L843) are not loaded by the release-please action.
The `release-please-action` should allow for users to specify custom release-please plugins without requiring them to call the release-please CLI directly.
### Detailed design
There are already config options available to specify release-please plugins, so the tool is aware of them, however, the execution runtime is not the same as the [release-please binary](https://github.com/googleapis/release-please/blob/71dcc7b3b2df4bb3d3e0884b3f0bfb96700cb76a/src/bin/release-please.ts) which will `require` plugins that are known to it.
There are a few different paths forward:
1. **No change to release-please-action**: The internal release-please logic should try to [load custom plugins](https://github.com/googleapis/release-please/blob/71dcc7b3b2df4bb3d3e0884b3f0bfb96700cb76a/src/factories/plugin-factory.ts#L140-L142) during [manifest construction](https://github.com/googleapis/release-please/blob/71dcc7b3b2df4bb3d3e0884b3f0bfb96700cb76a/src/manifest.ts#L365-L373)
2. **No change to release-please-action**: The internal release-please logic should fall-back to trying to `require` "unknown" types [before emitting `ConfigurationError`s](https://github.com/googleapis/release-please/blob/71dcc7b3b2df4bb3d3e0884b3f0bfb96700cb76a/src/factories/plugin-factory.ts#L122-L136)
3. **New 'external-plugins' key in release-please-action**: release-please-action should [require plugins](https://github.com/googleapis/release-please/blob/71dcc7b3b2df4bb3d3e0884b3f0bfb96700cb76a/src/bin/release-please.ts#L828-L843) prior to constructing the manifest ([1](https://github.com/google-github-actions/release-please-action/blob/2921787898ea2925c9eec03a32aa7404a75399e5/index.js#L55), [2](https://github.com/google-github-actions/release-please-action/blob/2921787898ea2925c9eec03a32aa7404a75399e5/index.js#L67), [3](https://github.com/google-github-actions/release-please-action/blob/2921787898ea2925c9eec03a32aa7404a75399e5/index.js#L168))
4. **New release-please-action handling of plugins arg**: Try to `require` any plugins passed to release-please-action, similar to the release-please CLI. This is possibly **BREAKING** for existing release-please-action users?
### Additional information
See https://github.com/ipfs-shipyard/release-please-ipfs-plugin#ensure-you-call-the-release-please-binary for more details, but basically:
1. custom plugins are loaded in the CLI by https://github.com/googleapis/release-please/blob/71dcc7b3b2df4bb3d3e0884b3f0bfb96700cb76a/src/bin/release-please.ts#L828-L843
2. There exists no methods in this action to accomplish the same
This results in errors like that seen at https://github.com/ipfs/ipfs-desktop/actions/runs/6506161278/job/17671766024#step:2:913
Contributor guide
Research direction
Compare the plugin-loading paths in src/bin/release-please.ts and src/factories/plugin-factory.ts with the action entry points at index.js lines 55, 67, and 168. Reproduce the linked action failure, decide which documented loading behavior applies, and verify that a configured custom plugin loads through release-please-action without requiring a direct CLI call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100