Skip to content

ci: build and push the spotify service image - #9

Merged
mattDev0 merged 1 commit into
mainfrom
fix/build-spotify-image
Sep 1, 2026
Merged

ci: build and push the spotify service image#9
mattDev0 merged 1 commit into
mainfrom
fix/build-spotify-image

Conversation

@mattDev0

@mattDev0 mattDev0 commented Sep 1, 2026

Copy link
Copy Markdown
Owner

The deploy for f80fc13 failed:

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

Cause

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. 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

  • Build, push and Trivy-scan devops-spotify alongside the other three.
  • Its Dockerfile lint and cargo test added to both deploy-compose.yml and test.yml, so a PR would catch this class of thing before main.

Tests

The workflow now runs cargo test for the service, which had none. Added six covering the storage layer, focused on the property the poller depends on:

  • re-inserting an identical play is a no-op — recently-played returns overlapping windows on every poll, so without this the counts inflate steadily
  • the same track at a new timestamp counts again
  • discovery correctly splits distinct tracks from repeats
  • genre weighting carries an artist's play count to each of their genres
  • hour and weekday buckets emit every slot, so the chart axis stays stable as data arrives
cargo test    6 passed
cargo clippy --all-targets -- -D warnings    clean

Note

This must merge before #8 can deploy successfully — or merge both, since the build job is what #8's deploy needs.

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.
@mattDev0
mattDev0 merged commit 0204ba1 into main Sep 1, 2026
1 check passed
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.

1 participant