0
Fork 0
mirror of https://github.com/oblien/openship.git synced 2026-11-18 06:55:56 +00:00
openship/apps/api/test/modules/updates
Saim Shafique 0df888e864
fix(updates): report image services with an unknown deployed digest instead of up to date (#1706)
* fix(updates): report image services with an unknown deployed digest instead of up to date

When the active service_deployment row has no image_digest — a carried
service loses it when a per-service update upserts the row — the feed
compared digests only when both were known and fell back to the equal
ref strings, so the service read as up to date and `?behind=1` dropped
the project entirely.

The deployed side is now marked unknown, not current: evaluateDrift
flags image services whose row has no digest, and the feed resolves
those against the live daemon before rendering — the running
container's image ID against the image ID the configured tag resolves
to right now, the same test the deploy pipeline uses before carrying
an unchanged service. A mismatch is behind; matching images recover
the tag's RepoDigest onto the row when the registry comparison agrees;
anything the daemon cannot answer stays unknown and the project is
kept visible with an `unverified` flag instead of being dropped.

Fixes #1702

* fix(updates): narrow the live runtime to DockerRuntime before resolving unknown digests

`resolveDeploymentRuntimeForRead` returns a `RuntimeAdapter`, and
`prepareDeploymentImage` is Docker-only, so the Typecheck job failed
with TS2345 at local-image-drift.ts:79. Guard the call with the same
`instanceof DockerRuntime` check `recordDeploymentArtifacts` uses:
other runtimes leave the services unknown, and the runtime is still
disposed on every path.

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
History 2026-11-11 16:04:58 +02:00
..
advisory-feed.test.ts feat(updates): add scoped host patches and observable advisory scans (#1566) 2026-11-03 19:37:18 +02:00
drift-evaluation.test.ts feat(deploy): skip unrelated workspace pushes safely 2026-10-18 19:39:02 +03:00
host-security.test.ts feat(updates): add scoped host patches and observable advisory scans (#1566) 2026-11-03 19:37:18 +02:00
image-apply.test.ts fix(monitoring): track updates until deployment completion 2026-10-06 05:19:48 +03:00
runtime-image-check.test.ts refactor: focus runtime updates on images and visible version settings 2026-10-21 20:14:23 +03:00
runtime-probes.test.ts fix(security): distinguish absent runtimes from failed probes (#1677) 2026-11-08 21:18:33 +02:00
runtime-source.test.ts Check source-update PR access and guide GitHub permission recovery (#1721) 2026-11-11 15:46:45 +02:00
runtime-update.test.ts fix(deployments): resolve monorepo runtime images per service (#1510) 2026-10-28 12:09:29 +03:00
security-inventory.test.ts fix(security): distinguish absent runtimes from failed probes (#1677) 2026-11-08 21:18:33 +02:00
security-notice.integration.test.ts feat(updates): add scoped host patches and observable advisory scans (#1566) 2026-11-03 19:37:18 +02:00
security-signature.test.ts feat: add runtime security advisories and annual Cloud billing (#1453) 2026-10-24 13:37:05 +03:00
security.service.test.ts fix(security): patch managed runtime versions instead of refreshing old images (#1657) 2026-11-07 22:15:37 +02:00
updates-sdk-parity.test.ts fix(updates): report image services with an unknown deployed digest instead of up to date (#1706) 2026-11-11 16:04:58 +02:00
upstream-cache.test.ts fix(updates): report image services with an unknown deployed digest instead of up to date (#1706) 2026-11-11 16:04:58 +02:00