Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions web-common/src/components/icons/FeatherEditIcon.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
export let size = "1em";
export let color = "currentColor";
export let className = "";
</script>

Expand All @@ -15,11 +16,11 @@
fill-rule="evenodd"
clip-rule="evenodd"
d="M11.6673 0.512695C11.1844 0.512695 10.7213 0.704526 10.3798 1.04599L4.83817 6.58765C4.76341 6.66241 4.71038 6.75608 4.68473 6.85865L4.1014 9.19199C4.0517 9.39077 4.10995 9.60106 4.25484 9.74594C4.39973 9.89083 4.61001 9.94908 4.8088 9.89938L7.14213 9.31605C7.2447 9.29041 7.33837 9.23737 7.41313 9.16261L12.9548 3.62094C13.2963 3.27948 13.4881 2.81636 13.4881 2.33347C13.4881 1.85057 13.2963 1.38745 12.9548 1.04599C12.6133 0.704526 12.1502 0.512695 11.6673 0.512695ZM11.2048 1.87094C11.3275 1.74828 11.4938 1.67936 11.6673 1.67936C11.8408 1.67936 12.0072 1.74828 12.1298 1.87094C12.2525 1.99361 12.3214 2.15999 12.3214 2.33347C12.3214 2.50694 12.2525 2.67332 12.1298 2.79599L6.70242 8.2234L5.46903 8.53175L5.77738 7.29836L11.2048 1.87094Z"
fill="#0A0A0A"
fill={color}
/>
<path
d="M2.33398 1.75014C1.86986 1.75014 1.42474 1.93452 1.09655 2.26271C0.768359 2.59089 0.583984 3.03601 0.583984 3.50014V11.6668C0.583984 12.1309 0.768359 12.5761 1.09655 12.9042C1.42474 13.2324 1.86986 13.4168 2.33398 13.4168H10.5007C10.9648 13.4168 11.4099 13.2324 11.7381 12.9042C12.0663 12.5761 12.2507 12.1309 12.2507 11.6668V7.58348C12.2507 7.26131 11.9895 7.00014 11.6673 7.00014C11.3452 7.00014 11.084 7.26131 11.084 7.58348V11.6668C11.084 11.8215 11.0225 11.9699 10.9131 12.0793C10.8037 12.1887 10.6554 12.2501 10.5007 12.2501H2.33398C2.17927 12.2501 2.0309 12.1887 1.92151 12.0793C1.81211 11.9699 1.75065 11.8215 1.75065 11.6668V3.50014C1.75065 3.34543 1.81211 3.19706 1.92151 3.08766C2.0309 2.97827 2.17927 2.91681 2.33398 2.91681H6.41732C6.73948 2.91681 7.00065 2.65564 7.00065 2.33348C7.00065 2.01131 6.73948 1.75014 6.41732 1.75014H2.33398Z"
fill="#0A0A0A"
fill={color}
/>
</g>
<defs>
Expand Down
5 changes: 3 additions & 2 deletions web-common/src/components/icons/PencilIcon.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
export let size = "1em";
export let color = "currentColor";
export let className = "";
</script>

Expand All @@ -14,10 +15,10 @@
fill-rule="evenodd"
clip-rule="evenodd"
d="M10.4994 1.0957C10.0165 1.0957 9.55334 1.28753 9.21188 1.62899L1.92022 8.92066C1.84546 8.99542 1.79242 9.08909 1.76678 9.19166L1.18344 11.525C1.13375 11.7238 1.19199 11.9341 1.33688 12.079C1.48177 12.2238 1.69206 12.2821 1.89084 12.2324L4.22417 11.6491C4.32674 11.6234 4.42041 11.5704 4.49517 11.4956L11.7868 4.20395C11.9559 4.03488 12.09 3.83416 12.1815 3.61325C12.273 3.39235 12.3201 3.15558 12.3201 2.91647C12.3201 2.67737 12.273 2.4406 12.1815 2.21969C12.09 1.99879 11.9559 1.79807 11.7868 1.62899C11.6178 1.45992 11.417 1.3258 11.1961 1.2343C10.9752 1.1428 10.7385 1.0957 10.4994 1.0957ZM10.0368 2.45395C10.1595 2.33128 10.3259 2.26237 10.4994 2.26237C10.5853 2.26237 10.6703 2.27929 10.7497 2.31216C10.829 2.34503 10.9011 2.39321 10.9619 2.45395C11.0226 2.51469 11.0708 2.5868 11.1037 2.66616C11.1365 2.74552 11.1535 2.83058 11.1535 2.91647C11.1535 3.00237 11.1365 3.08743 11.1037 3.16679C11.0708 3.24615 11.0226 3.31825 10.9619 3.37899L3.78447 10.5564L2.55108 10.8648L2.85942 9.63137L10.0368 2.45395Z"
fill="#0A0A0A"
fill={color}
/>
<path
d="M6.99936 11.0831C6.6772 11.0831 6.41603 11.3443 6.41603 11.6665C6.41603 11.9886 6.6772 12.2498 6.99936 12.2498H12.2494C12.5715 12.2498 12.8327 11.9886 12.8327 11.6665C12.8327 11.3443 12.5715 11.0831 12.2494 11.0831H6.99936Z"
fill="#0A0A0A"
fill={color}
/>
</svg>
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
let error: string | null = null;
$: hasErrored = !!error;

let skipped = false;

async function runImport() {
importStep = ImportDataStep.Init;
error = null;
Expand Down Expand Up @@ -99,6 +101,7 @@
},
);
onDone();
if (skipped) return; // Do not auto-navigate to the file if skipped
return goto(currentFileRoute);
} catch (e) {
error = e?.response?.data?.message ?? e?.message ?? "Unknown error";
Expand All @@ -117,6 +120,12 @@
onBack();
}

function skipAndViewProject() {
skipped = true;
onDone();
void goto(currentFileRoute);
}

onMount(runImport);
</script>

Expand Down Expand Up @@ -181,8 +190,7 @@
<Button
disabled={!currentFileRoute}
type="tertiary"
href={currentFileRoute}
onClick={onDone}
onClick={skipAndViewProject}
large
>
Skip and view project
Expand Down
37 changes: 27 additions & 10 deletions web-common/src/features/entity-management/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export async function waitForProjectParser(instanceId: string) {
throw new Error("Project parser version not found after 5 retries");
}

const WaitForResourceReconciliationPollInterval = 2_000;
const WaitForResourceReconciliationRetryCount = 5;

// Resource-level reconciliation
export async function waitForResourceReconciliation(
client: RuntimeClient,
Expand All @@ -76,7 +79,6 @@ export async function waitForResourceReconciliation(
resourceKind: ResourceKind,
prevStateVersion?: string,
) {
const pollInterval = 2_000; // 2 seconds
let attempt = 0;

while (true) {
Expand Down Expand Up @@ -110,25 +112,40 @@ export async function waitForResourceReconciliation(
}

// Still reconciling, continue polling
await new Promise((resolve) => setTimeout(resolve, pollInterval));
await new Promise((resolve) =>
setTimeout(resolve, WaitForResourceReconciliationPollInterval),
);
} catch (error) {
// Controller closed error could mean the controller is being restarted because there was env change
// Check this 1st since resource not found will be true.
if (
isControllerClosedError(error) &&
attempt <= WaitForResourceReconciliationRetryCount
) {
// Wait and try again if the controller is closed
await new Promise((resolve) =>
setTimeout(
resolve,
// Wait longer for controller to restart
WaitForResourceReconciliationPollInterval * attempt,
),
);
continue;
}

// Resource not found could mean it was deleted due to reconcile failure
if (isNotFoundError(error)) {
if (attempt >= 3) {
if (attempt >= WaitForResourceReconciliationRetryCount) {
// After 6 seconds, assume reconcile failure
throw new Error(
`Resource configuration failed to reconcile and was automatically deleted. This usually indicates a connection or configuration error.`,
);
}

// Wait and try again
await new Promise((resolve) => setTimeout(resolve, pollInterval));
continue;
}
// Controller closed error could mean the controller is being restarted because there was env change
if (isControllerClosedError(error) && attempt <= 3) {
// Wait and try again if the controller is closed
await new Promise((resolve) => setTimeout(resolve, pollInterval));
await new Promise((resolve) =>
setTimeout(resolve, WaitForResourceReconciliationPollInterval),
);
continue;
}

Expand Down
Loading