canonical / canonical/cos-coordinated-workers
Test the HA charms on PRs
- Dominant language
- Python
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Enhancement Proposal
> [!WARNING]
> We should probably wait until the pyroscope monorepo experiment is done.
Currently, we have an outdated CI step that tries to run tempo integration tests with the new `cos-coordinated-workers` version on PRs. It's outdated because it tries to modify `requirements.txt`, but that's not used by `charmcraft pack` anymore, since we now use the `uv` plugin.
We should create a justfile (or a tox.ini) that does the following:
```just
# Run the integration tests of the specified charms
ha_charms := "mimir-monorepo,loki-monorepo,tempo-monorepo,pyroscope-monorepo"
test charms=ha_charms:
# Split the charms by commas
# For each monorepo, do
# clone the repo if not already there
# modify `pyproject.toml` to get `cos-coordinated-workers` from the local folder
# run `tox -e lock`
# run `tox -e integration`
```
This allows to run all tests locally via `just test`.
The monorepos should be added to `.gitignore`, just to be safe.
This approach allows us parallelize this in CI using a matrix strategy:
1. parse the ha_charms from the justfile, or hardcode them in the workflow;
2. spawn a runner for each monorepo - let's say we split on `matrix: monorepo: ...`;
3. run `just test=${{matrix.monorepo}}` on each runner
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the outdated CI step described in the issue and the repository's current test configuration. Compare a justfile or tox.ini approach with the existing workflow, including the listed pyproject.toml and .gitignore changes. Done means the selected HA charms can run locally with the requested command and PRs can execute them through a matrix strategy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100