Skip to content

fix(cmd): Skip failed entries when getting certificates - #542

Merged
jedevc merged 2 commits into
prod-stagingfrom
crt-get-status-filter
Oct 9, 2026
Merged

jedevc merged 2 commits into
prod-stagingfrom
crt-get-status-filter

Conversation

@jedevc

@jedevc jedevc commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

unikraft crt get <missing> currently fails with could not mirror certificate data: field State: failed to set field value: unknown certificate state: "" instead of a not-found. The not-found entry in the API response has no state, and since b8d5a53 dropped the per-item status filter it was being parsed as a certificate.

Checked against the platform source: the status handler only emits state inside the success branch and the lookup condition is just ukp_db_is_active_ref, so pending (and error-state) certificates still come back with status: success and remain visible after this.

jedevc added 2 commits October 9, 2026 14:31
A GET for an unknown name still returns an entry for it, carrying an
error status and no state. Since b8d5a53 those entries were no longer
filtered, so the empty state failed to parse and the lookup errored
with "unknown certificate state" rather than reporting the reference
as not found.

Filter on the per-item response status like every other resource does.
Pending certificates still report success here, so they stay visible;
the comment that said otherwise conflated response status with
certificate state.

Signed-off-by: Justin Chadwell <justin@unikraft.com>
The certificate case has regressed before: a lookup for an unknown
name surfaced the mirror error from the parent commit rather than a
not-found. Cover it, and the instance equivalent, with nothing but a
name that does not exist.

Signed-off-by: Justin Chadwell <justin@unikraft.com>
@jedevc
jedevc force-pushed the crt-get-status-filter branch from 931d9c3 to d4b4b5c Compare October 9, 2026 13:54
@jedevc
jedevc requested a review from craciunoiuc October 9, 2026 13:54

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

All good here. Thanks!

Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>

@jedevc
jedevc merged commit e50b35e into prod-staging Oct 9, 2026
10 checks passed
@jedevc
jedevc deleted the crt-get-status-filter branch October 9, 2026 13:58
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