Skip to content

Show when each row first reached every environment besides production (schema 6) - #25

Merged
lesnik512 merged 2 commits into
mainfrom
preview-deploy-times
Oct 10, 2026
Merged

lesnik512 merged 2 commits into
mainfrom
preview-deploy-times

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Rows now say when they first reached each environment other than production, such as preview. The report schema goes to 6, and the skill now runs release-scope>=0.8,<0.9.

First deployment per row. For each environment other than production, one more paged request lists its successful deployments: status=success&order_by=finished_at&finished_after=<oldest commit in the range> (GitLab requires the first two for finished_after). A deployment ships its own row and every older row in the range, since newer commits on the default branch contain them. A row gets the earliest such time in first_deployed_at, keyed by environment, and a later rollback does not change it. Deployments of commits outside the range are ignored, so only default-branch and tag deploys count. CONTEXT.md defines the term. The list is not cached because new deployments keep arriving, and only settled facts go in the cache.

Job finish time. A deployment's time is its deploy job's finished_at; a deployment made through the API has no job and falls back to created_at. EnvironmentState.deployed_at uses the same time and is now a datetime instead of the raw created_at string.

Cut history. At the page limit (5000 deployments) the service gets a deployments_truncated warning naming the environment. Deployments come oldest first, so the cut drops the newest and only the newest rows can miss their time.

Local time on the page. The "Deployed to" column shows each environment with the row's first deployment time and marks the environment that runs the row now. Every time on the page, including the collection time in the header, is shown in the browser's time zone as YYYY-MM-DD HH:MM; hovering shows the value from the report. The header no longer says UTC.

The row matching and the API changes started from failing tests. The page has no tests, so I checked it in a browser against a report from the CLI tests, in the Europe/Moscow time zone: each row showed its preview time shifted by three hours, and the row on preview carried the "now" mark.

…hema 6)

Rows carry deployed_at: per environment other than production, when its first
successful deployment of the row or a newer one finished. The page shows it and
every other time in the browser's time zone.
Environments report when their deploy job finished, like rows. The finish-time
fallback lives on Deployment, and first_deployed takes deployments per
environment.
@lesnik512
lesnik512 merged commit bfb5ec8 into main Oct 10, 2026
12 checks passed
@lesnik512
lesnik512 deleted the preview-deploy-times branch October 10, 2026 10:20
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