Repository navigation
feat(engines): StarRocks engine posture: profiles on create, Not governed, Security upgrade - #847
Merged
Merged
Conversation
Package B of the StarRocks follow-ups: KI-336 (StarRocks gets a policy profile like Trino, and a "Not governed" warning) and legacy engines (a "Security upgrade needed" badge and an upgrade action that moves the FE and CN to the patched default images and sets a root password). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seven tasks: the patched-image rule in egret-perm, KI-336 profile at StarRocks create plus notGoverned, the security-upgrade DTO fields, the security-upgrade route, the frontend, a live check on kind, and docs. Section 0 corrects three spec statements against main 26016f9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and DTO fields Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rget live in egret-perm Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ensure_starrocks_def sits beside ensure_trino_def and calls service_def::seed_starrocks, so engine-mgmt can create a starrocks profile for a new StarRocks engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…create (KI-336) plan_trino_profile/bind_trino_profile become plan_profile/bind_profile, taking the engine type. Trino keeps its plans, its <name>_tag tag service and its messages. A StarRocks create now plans the profile before minting anything and binds it before the first provision: with Ranger on and no authzServiceId it creates the starrocks profile <name> (no tag service) or adopts an unbound same-name one; a same-name profile of another type or bound elsewhere is a 409. An authzServiceId naming no profile stays a 400. A failed create deletes only a profile it made. EngineDto gains notGoverned: true for a provisioned or external StarRocks engine bound to no profile while Ranger is on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rade Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
POST /api/control-plane/engines/{id}/security-upgrade (engine:update) mints
a FE root password when the engine has none, moves FE and CN to the default
patched images unless the engine runs a newer release, and re-applies the
engine so the provisioner's initpwd Job sets the password on the running FE.
Nothing is applied when nothing changed. External engines get 409
engine_is_external, non-StarRocks engines 409.
openapi.json is regenerated; it also carries the Task 2/3 EngineDto fields.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a repeat finishes it The upgrade stored the root password secret and the patched images before its apply, so a failed or interrupted apply left the engine reporting no upgrade needed and a repeat call applied nothing. Migration 0217 adds engine_mgmt.engines.security_upgrade_pending: the route sets it before it writes, always re-applies, and any accepted StarRocks apply (apply_built or the settings PUT) clears it. While set the engine reports the new notApplied security upgrade reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…urity upgrade Add engine's StarRocks branch gets a Policy profile select: the default creates a profile named after the engine (no authzServiceId), the other options are free StarRocks profiles (KI-336). Engines whose DTO says notGoverned show a "Not governed" warning on their page and a badge in the list. Provisioned StarRocks engines that need a security upgrade show a "Security upgrade needed" badge and a warning that names each reason, with an Upgrade security button and a confirmation dialog that lists the image, CN and root password changes. isPatchedStarRocksImage is gone: the pages read the server's verdict (securityUpgradeReasons), and the old metadata-table warning on a provisioned engine yields to the upgrade warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A ref that carries a digest is judged by that digest, since the digest is what the node pulls; the egret tag rule now applies only to a digest-less ref. A patched tag pinned to the egret.3 digest, or to an unknown digest, is unpatched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…only the upgrade's image keys - plan_profile: an authzServiceId naming a profile of another type, or one another engine binds, is a 409 on both the Trino and the StarRocks create; the StarRocks pre-check is folded in, so profiles are listed once and an id naming no profile stays a 400 for StarRocks. - The security upgrade writes starrocksConfig.feImage and .cnImage with jsonb_set (new EngineMgmtStore::set_starrocks_images, status-guarded), so a spec change committed by a concurrent PUT is kept. - Every EngineDto response (create, PUT, external register and PATCH) goes through with_runtime, so notGoverned and runtime match the GET. - Tests: the new 409s leave nothing behind; a StarRocks engine with no recorded FE image is unpatched; the failed-create test asserts both errors are the injected provision failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reasons Plain "root" in the reason sentence; the server's blocked-release sentence in the dialog; "the current image (not recorded)" for an absent FE image; reasons this client does not know are left out (the generic line stays); the dialog warns that egret's own admin statements fail until the FE takes the new root password. imageVerdict takes the generated SecurityUpgradeReason[]. Tests cover the 502 re-read and the engines list invalidation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… refusal A StarRocks create now refuses a trino profile while planning its profile, with plan_profile's wording, so the cross-type assertion reads that wording, and the guarded-bind test gives its StarRocks half a starrocks profile so the create still reaches the guarded bind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pplying Delete with Background propagation and poll until NotFound (30 s bound); surface delete errors instead of ignoring them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t on read errors Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
viethqb
added a commit
that referenced
this pull request
Nov 10, 2026
…848) focusHeadingOnArrival polls for up to 10 s. When a test ends first, its next tick ran after jsdom tore down document and threw an uncaught ReferenceError, which fails the whole vitest run (seen on main 1418484 and PR #847, from RulePageDelete.test.tsx). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Package B of the StarRocks follow-ups. This change shows which StarRocks engines egret does not govern or protect, and lets an admin fix them.
Unbound engines (KI-336).
Legacy engines.
egret-starrocks-fe:4.1.7-egret.4(the image that closes KI-340, KI-345 and the other fork patches);roothas no password;POST /api/control-plane/engines/{id}/security-upgrade,engine:update) does three things:It is idempotent, so pressing it again finishes a partial run.
Spec:
docs/en/specs/2026-11-09-starrocks-engine-posture-design.md. Plan:docs/en/plans/2026-11-09-starrocks-engine-posture.md.Changes
egret-perm::engine_images:is_patched_starrocks_fe. A ref that carries a digest is judged by the digest alone, which counts a mirrored image. A ref without a digest is judged by its tag.starrocks_fe_upgrade_target, which refuses a downgrade. The frontend copy of this rule is removed.plan_profileandbind_profileare shared by Trino and StarRocks.PolicyPort::ensure_starrocks_def: a StarRocks profile has no tag service.notGoverned.securityUpgradeNeeded;securityUpgradeReasons(unpatchedImage,noRootPassword,notApplied);securityUpgradeFeImage;securityUpgradeBlockedRelease.0217_engine_security_upgrade_pending.sql: a flag that is set before the upgrade's apply and cleared on a successful apply. The image write is ajsonb_setof the two keys only.{name}-initpwdJob is deleted with Background propagation, and the apply waits (bounded, 30 s) until the old Job is gone. Before, every second apply patched the terminating Job, so the Job vanished and orphan pods piled up. This was found in the live check.Test plan
cargo fmt, andclippy -D warningsclean.egret-perm28 passed.egret-engine-mgmt(DB) 546 passed.egret-provisioner221 passed.rootshowed the badge.mysql -urootwith no password got ERROR 1045 and the stored password logged in;4.1.7-egret.4and the CN ran4.1.7;Documentation
egret-data/docs#74 covers:
Checklist
🤖 Generated with Claude Code