Unexpected behaviour for specified component images (sparse deployment)
- Dominant language
- Go
- Stars
- 10
- Forks
- 3
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
# Short version
## Observed behaviour
After running `rx create pipeline-job deploy -e prod --follow --from-config -n my-component --image-tag-name my-component=v1.2.3`, the other components were also redeployed, but to `latest` image tag.
At a later point, it suddenly _did_ work as expected. We're not entirely sure why.
## Expected behaviour
Running `rx create pipeline-job deploy -e prod --follow --from-config -n my-component --image-tag-name my-component=v1.2.3` should, as far as we could read from the documentation (and deduce non-documented details), deploy only the mentioned components. It should leave other components unaffected.
# Detailed version
We ([ssu-datahub](https://github.com/equinor/ssu-datahub)) build all our images in github, and only use `deploy` (and `promote` jobs) in radix. We do all our deployments using "custom" github actions that rely on `rx` CLI commands. I'll include them when relevant below. For all workflow files, see [github.com/equinor/ssu-datahub/tree/main/.github/workflows](https://github.com/equinor/ssu-datahub/tree/main/.github/workflows).
I'll describe, in some detail, the recent deployment history of the ssu-datahub app:
## Events
### 1. Initial promotion
Promoted all components from `qa` to `prod`. We ran a typical promotion using the web UI, and everything worked as expected. This was on May 11th. According to radix job details, this promotion set versions as follows:
```
api equinor/ssu-datahub/api:v1.10.4
web-site equinor/ssu-datahub/web-site:version-20260511-ed8d16f
web-site-preview equinor/ssu-datahub/web-site:version-20260511-ed8d16f
web-editor equinor/ssu-datahub/web-editor:v1.10.4
datahub equinor/ssu-datahub/web-site:version-20260511-ed8d16f
```
Job details screenshot
### 2. Deployment of `api` and `editor` components to `prod` with `tag=v1.11.0`.
Ran "Deploy to production" workflow ([run details](https://github.com/equinor/ssu-datahub/actions/runs/26749134597/job/78832343635)) with `tag=v1.11.0`, which in turn ran `rx create pipeline-job deploy -e prod --follow --from-config -n api -n web-editor --image-tag-name api=v1.11.0 --image-tag-name web-editor=v1.11.0`.
We expected that this would only touch the specified components, and that other components would be left running the current versions, but that didn't happen. We now use specific tags for all of our builds. The details page shows that the `web-site` and `web-site-preview` suddenly are set to `latest` ("from past deployment"):
```
api equinor/ssu-datahub/api:v1.11.0
web-site equinor/ssu-datahub/web-site:latest from past deployment
web-site-preview equinor/ssu-datahub/web-site:latest from past deployment
web-editor equinor/ssu-datahub/web-editor:v1.11.0
```
Job details screenshot
Note that it was particularly bad for us to get the `latest` version of `web-site`, because that is 2 months old code, and we no longer push images with that tag name, meaning if this happens again, it will keep deploying that old version.
### 3. Build and deployment of `web-site-preview`
Ran "Publish site to preview" workflow ([run details](https://github.com/equinor/ssu-datahub/actions/runs/26750687558/job/78837607777), which built an image tagged `version-20260601-4f43ffe`, and ran `rx create pipeline-job deploy -e prod --follow --from-config -n web-site-preview --image-tag-name web-site-preview=version-20260601-4f43ffe`.
This actually did work as expected, and we got the following details after running:
```
api equinor/ssu-datahub/api:v1.11.0 from past deployment
web-site equinor/ssu-datahub/web-site:latest from past deployment
web-site-preview equinor/ssu-datahub/web-site:version-20260601-4f43ffe
web-editor equinor/ssu-datahub/web-editor:v1.11.0 from past deployment
```
Job details screenshot
### 4. Deployment of `web-site`
Ran "Promote preview to live" workflow ([run details](https://github.com/equinor/ssu-datahub/actions/runs/26750793834/job/78837966093)) which checks what's running in the environment's preview component and then ran `rx create pipeline-job deploy -e prod --follow --from-config -n web-site --image-tag-name web-site=version-20260601-4f43ffe --image-tag-name datahub=version-20260601-4f43ffe`. The extra `datahub=` image tag specification here is a remnant from previous setup, no longer in use. See notes below.
This also worked as expected, and we got the following details after running:
```
api equinor/ssu-datahub/api:v1.11.0 from past deployment
web-site equinor/ssu-datahub/web-site:version-20260601-4f43ffe
web-site-preview equinor/ssu-datahub/web-site:version-20260601-4f43ffe from past deployment
web-editor equinor/ssu-datahub/web-editor:v1.11.0 from past deployment
```
Job details screenshot
# Notes:
- We have removed the `datahub` component, it was only present as an artifact of an old deployment. Shouldn't affect this.
- Releavant `radixconfig.yaml`: [Permalink](https://github.com/equinor/ssu-datahub/blob/070c393ceb582350b7115ff64336df5198e3f26f/radixconfig.yaml)
- Radix CLI version: v1.37.1
Contributor guide
Assessment
This issue has not been assessed yet.