aws sso login --profile {failure.error.profile} and try again.
+ Sign in with aws sso login --profile {failure.error.profile} and try again.
)}
{failure.error.kind === "sso_expired" && onSignIn && (
diff --git a/app/src/components/settings/hosts/DeployEnvironmentModal.tsx b/app/src/components/settings/hosts/DeployEnvironmentModal.tsx
index c748ff0..681a56e 100644
--- a/app/src/components/settings/hosts/DeployEnvironmentModal.tsx
+++ b/app/src/components/settings/hosts/DeployEnvironmentModal.tsx
@@ -83,7 +83,7 @@ export default function DeployEnvironmentModal({
const createBoundary = async () => {
setBoundaryError(null);
- const err = await boundary.start(BOUNDARY_STATE_KEY, region, "Permissions boundary", () =>
+ const err = await boundary.start(BOUNDARY_STATE_KEY, region, "boundary", "Permissions boundary", () =>
deployAwsPermissionsBoundary(connectionId, region),
);
if (err?.kind === "access_denied") setBundle({ reason: awsErrorMessage(err) });
diff --git a/app/src/components/settings/hosts/DeployProgress.test.tsx b/app/src/components/settings/hosts/DeployProgress.test.tsx
index 99c4065..aea4524 100644
--- a/app/src/components/settings/hosts/DeployProgress.test.tsx
+++ b/app/src/components/settings/hosts/DeployProgress.test.tsx
@@ -29,10 +29,10 @@ describe("useDeployRuns", () => {
const onDone = vi.fn();
const { result } = renderHook(() => useDeployRuns(onDone));
await act(async () => {
- await result.current.start(KEY, "eu-west-1", "Deploy of main", async () => "eu");
+ await result.current.start(KEY, "eu-west-1", "deploy", "Deploy of main", async () => "eu");
});
await act(async () => {
- await result.current.start(KEY, "us-east-1", "Deploy of main", async () => "us");
+ await result.current.start(KEY, "us-east-1", "deploy", "Deploy of main", async () => "us");
});
expect(handlers.size).toBe(2);
emit(progress({ op_id: "eu", state_key: KEY, events: [tofuEvent("eu line")] }));
@@ -54,8 +54,8 @@ describe("useDeployRuns", () => {
it("removes its progress listeners on unmount", async () => {
const { result, unmount } = renderHook(() => useDeployRuns());
await act(async () => {
- await result.current.start(KEY, "eu-west-1", "Deploy of main", async () => "a");
- await result.current.start("boundary/terraform.tfstate", "eu-west-1", "Boundary", async () => "b");
+ await result.current.start(KEY, "eu-west-1", "deploy", "Deploy of main", async () => "a");
+ await result.current.start("boundary/terraform.tfstate", "eu-west-1", "deploy", "Boundary", async () => "b");
});
expect(handlers.size).toBe(2);
unmount();
@@ -66,7 +66,7 @@ describe("useDeployRuns", () => {
const { result } = renderHook(() => useDeployRuns());
let err: unknown;
await act(async () => {
- err = await result.current.start(KEY, "eu-west-1", "Deploy of main", async () => {
+ err = await result.current.start(KEY, "eu-west-1", "deploy", "Deploy of main", async () => {
throw { kind: "other", message: "A deployment is already running" };
});
});
@@ -84,6 +84,7 @@ describe("DeployProgress layout", () => {
run={{
stateKey: KEY,
region: "eu-west-1",
+ kind: "deploy",
label: "Deploy of main",
opId: "x",
events: [],
diff --git a/app/src/components/settings/hosts/DeployProgress.tsx b/app/src/components/settings/hosts/DeployProgress.tsx
index f2008e4..2a12c61 100644
--- a/app/src/components/settings/hosts/DeployProgress.tsx
+++ b/app/src/components/settings/hosts/DeployProgress.tsx
@@ -13,10 +13,18 @@ import Button from "../../ui/Button";
import Modal from "../../ui/Modal";
import StatusIndicator from "../../ui/StatusIndicator";
+/**
+ * What a run does. Decisions about a run (such as offering an admin bundle
+ * when AWS refuses it) key on this, never on its label: a follow of an
+ * existing environment's deploy is labelled like a new deploy.
+ */
+export type RunKind = "deploy" | "follow" | "repair" | "update" | "destroy" | "onboard" | "push" | "boundary";
+
/** One OpenTofu run this view is showing: a start, or a follow of one already running. */
export interface DeployRun {
stateKey: string;
region: string;
+ kind: RunKind;
label: string;
/** Null until the starting command resolves. */
opId: string | null;
@@ -57,7 +65,13 @@ export function useDeployRuns(
}, []);
const start = useCallback(
- async (stateKey: string, region: string, label: string, run: () => Promise- AWS refused a permission this run needs (its message is above).{" "} + AWS refused a permission this run needs (its message is above). This may need an admin:{" "} {denied === "environment" ? "An admin can deploy the environment for you from a bundle." : "An admin can onboard you from a bundle."} @@ -477,7 +485,7 @@ export default function EnvironmentsPanel({ disabled={busy} aria-label={`Follow my onboarding to ${e.name}`} onClick={() => - void launch(at, e.name, myKey, `Joining ${e.name}`, () => followAwsDeployment(connection.id, at, myKey)) + void launch(at, e.name, myKey, "follow", `Joining ${e.name}`, () => followAwsDeployment(connection.id, at, myKey)) } > Follow @@ -489,7 +497,7 @@ export default function EnvironmentsPanel({ disabled={busy} aria-label={`Push saved state of my onboarding to ${e.name}`} onClick={() => - void launch(at, e.name, myKey, `Push of the saved state of joining ${e.name}`, () => + void launch(at, e.name, myKey, "push", `Push of the saved state of joining ${e.name}`, () => pushAwsSavedState(connection.id, at, myKey), ) } @@ -515,7 +523,7 @@ export default function EnvironmentsPanel({ aria-label={`Push saved state of ${e.name}`} onClick={() => { const key = environmentStateKey(e.name); - void launch(at, e.name, key, `Push of the saved state of ${e.name}`, () => + void launch(at, e.name, key, "push", `Push of the saved state of ${e.name}`, () => pushAwsSavedState(connection.id, at, key), ); }} @@ -530,7 +538,7 @@ export default function EnvironmentsPanel({ aria-label={`Follow ${e.name}`} onClick={() => { const key = environmentStateKey(e.name); - void launch(at, e.name, key, `Deploy of ${e.name}`, () => followAwsDeployment(connection.id, at, key)); + void launch(at, e.name, key, "follow", `Deploy of ${e.name}`, () => followAwsDeployment(connection.id, at, key)); }} > Follow @@ -662,8 +670,14 @@ export default function EnvironmentsPanel({
)} {!isAdmin && ( -