Skip to content

Workload Status Insights - #856

Draft
thokra-nav wants to merge 5 commits into
mainfrom
feat/workload-status-insights
Draft

thokra-nav wants to merge 5 commits into
mainfrom
feat/workload-status-insights

Conversation

@thokra-nav

Copy link
Copy Markdown
Member

Expose and use the new status insights introduced in api

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v8.8.0 - 2026-11-24

Full Changelog: v8.7.0...v8.8.0

🚀 Features

  • (workload) Expose status insights (92328f8)

@thokra-nav
thokra-nav force-pushed the feat/workload-status-insights branch from df51f08 to 7b242d6 Compare November 23, 2026 10:29
Show stuck rollouts, observed scaling, instance readiness, and last exits in app status, including rollout and scaling details when no instance groups are observed.

Add paginated app events and job events commands with time filters, and job run status for named or latest runs. Support application issue filtering by type and identify workloads affected by stuck rollouts.

Update the GraphQL schema and generated client for workload status insights.
Construct connection info directly in password tests and verify the
stored PostgreSQL and JDBC URLs against the expected values.

Skip prompt checks for commands that disable argument prompts.
@thokra-nav
thokra-nav force-pushed the feat/workload-status-insights branch from e879c6e to 8ccd555 Compare November 23, 2026 14:12
Distinguish empty continuation pages from empty date ranges, and quote pagination cursors for POSIX shells. Use the job list only for completion so explicit job names work even when they are outside the first page.

Return an empty JSON array when no application issues match, while preserving the table-mode message. Add regression tests for these behaviors.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Name validation incorrectly rejects applications beyond the first 1,000, while query parsing and GraphQL event conversion lack coverage for important edge cases and metadata handling.

3 open issues
What changed in this PR

Exposes the API’s workload status insights through application status output, job-run inspection, and shared event commands in the Nais CLI.

Changes:

  • Adds paginated application and job events with time filters and continuation hints.
  • Expands application status with readiness, rollout, scaling, and last-exit details; adds job-run status inspection.
  • Adds application issue-type filtering, extends tests, and removes unused Cloud SQL helpers.
File Description
internal/​workload/​pagination.go Guards against missing or repeated pagination cursors.
internal/​workload/​instance.go Shares last-exit metadata and formatting.
internal/​workload/​events.go Fetches and maps workload events.
internal/​workload/​command/​events.go Parses event filters and renders pages.
internal/​workload/​command/​events_test.go Tests empty output and shell-safe continuation hints.
internal/​job/​run_status.go Resolves job runs and fetches instance status.
internal/​job/​run_status_test.go Tests latest and named run selection.
internal/​job/​command/​run.go Registers the run-status command.
internal/​job/​command/​run_status.go Adds job-run status output and completion.
internal/​job/​command/​helper.go Removes debug output from name lookup.
internal/​job/​command/​flag/​flag.go Defines event and run-status flags.
internal/​job/​command/​events.go Adds the job-events command.
internal/​job/​command/​events_test.go Tests job lookup, errors, and completion.
internal/​job/​command/​command.go Registers events and updates command help.
internal/​issues/​issues.go Maps rollout-stuck issues to their workload.
internal/​issues/​filter.go Extracts reusable issue-type parsing.
internal/​cloudsql/​password_test.go Corrects URL assertions and simplifies fixtures.
internal/​cloudsql/​cloudsqldbinfo.go Removes unused secret-parsing helpers.
internal/​application/​application_test.go Exempts commands that disable argument prompts.
internal/​app/​status.go Fetches readiness, rollout, scaling, and exit details.
internal/​app/​issues.go Supports issue filters and exact-name matching.
internal/​app/​command/​status.go Renders richer application status insights.
internal/​app/​command/​issues.go Applies issue filters and preserves empty JSON output.
internal/​app/​command/​issues_test.go Tests filtered empty issue output.
internal/​app/​command/​flag/​flag.go Adds issue-type and event flags.
internal/​app/​command/​events.go Adds application events with environment resolution.
internal/​app/​command/​command.go Registers events and updates command help.
internal/​app/​command/​choices_test.go Updates status fixtures and insight assertions.

Review effort: Balanced

Comment thread internal/app/command/events.go Resolved
Comment thread internal/workload/command/events.go Resolved
Comment thread internal/workload/events.go Resolved
Share name completion between `app events` and `job events`. Search by partial name, team, and workload type, then filter by environment when supplied and deduplicate suggestions.

Query application events directly when the environment is explicit, without looking up the app name first.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Test coverage is missing for readiness labels and last-exit rendering, as well as multi-page instance retrieval and missing or repeated pagination cursors.

4 open issues
1 resolved since last review

Review effort: Balanced

Comment thread internal/app/command/status.go Resolved
Comment thread internal/job/run_status.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed to evaluate command-level argument handling and completion risks that the direct GetRunStatus tests do not cover.

4 open issues

Review effort: Balanced

This branch has not been deployed

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

2 participants