ci: build and push the spotify service image - #9
Merged
Conversation
The deploy for f80fc13 failed pulling images: WARNING: Some service image(s) must be built from source by running: docker compose build spotify-service Error response from daemon: error from registry: denied docker-compose.prod.yml references ghcr.io/mattdev0/devops-control-center/devops-spotify, but the build job only ever built the agent, orchestrator and frontend, so that image was never pushed. Adding a service to compose without adding it to the build matrix leaves the deploy to discover it. Adds the build, push and Trivy scan for the new image alongside the other three, and its Dockerfile lint and cargo test to both the deploy and PR validation workflows. Also adds six tests for the storage layer, since the workflow now runs them and there were none. They cover the property the poller depends on: recently-played returns overlapping windows, so re-inserting a play must be a no-op while the same track at a new timestamp must count again. Also covers the discovery split, genre weighting, and that hour and weekday buckets emit every slot so the chart axis stays stable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The deploy for
f80fc13failed:Cause
docker-compose.prod.ymlreferencesghcr.io/mattdev0/devops-control-center/devops-spotify, but thebuildjob only ever built the agent, orchestrator and frontend. That image was never pushed, so the pull was denied.My omission in #8 — I added the service to compose and to the prod override, but not to the build matrix. The deploy was the first thing to notice.
Fix
devops-spotifyalongside the other three.cargo testadded to bothdeploy-compose.ymlandtest.yml, so a PR would catch this class of thing before main.Tests
The workflow now runs
cargo testfor the service, which had none. Added six covering the storage layer, focused on the property the poller depends on:Note
This must merge before #8 can deploy successfully — or merge both, since the build job is what #8's deploy needs.