Skip to content

Commit 7bef50c

Browse files
committed
deprecating warning for job and remove status
1 parent ba095b3 commit 7bef50c

File tree

5 files changed

+35
-10
lines changed

5 files changed

+35
-10
lines changed

src/lib/menuItems.test.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,7 @@ describe('menuItems', () => {
155155
member: true
156156
})
157157
).toEqual([
158-
[
159-
{ label: 'Overview', href: '/team/devteam/dev/app/app-w-all-storage' },
160-
{ label: 'Status', href: '/team/devteam/dev/app/app-w-all-storage/status' }
161-
],
158+
[{ label: 'Overview', href: '/team/devteam/dev/app/app-w-all-storage' }],
162159
[
163160
{ label: 'Image', href: '/team/devteam/dev/app/app-w-all-storage/image' },
164161
{

src/lib/menuItems.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const menuItems = ({
7474
const [, , team, env, workloadType, name, page] = split;
7575
const menuItem = item(`/team/${team}/${env}/${workloadType}/${name}`, page);
7676
return [
77-
[menuItem('Overview'), menuItem('Status', 'status')],
77+
[menuItem('Overview')],
7878
[
7979
menuItem('Image', 'image'),
8080
menuItem('Deployments', 'deploys'),

src/routes/team/[team]/[env]/app/[app]/+page.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import type { PageData } from './$houdini';
1717
import Ingresses from './Ingresses.svelte';
1818
import Instances from './Instances.svelte';
19-
import Status from './Status.svelte';
2019
import Utilization from './Utilization.svelte';
2120
2221
interface Props {
@@ -145,7 +144,7 @@
145144
</div>
146145
</div>
147146
<div class="sidebar">
148-
<Status {app} />
147+
<!-- <Status {app} /> -->
149148
<AggregatedCostForWorkload workload={app.name} {environment} {teamSlug} />
150149
<Image workload={app} />
151150
<Utilization {app} />

src/routes/team/[team]/[env]/job/[job]/+page.gql

+10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ query Job($job: String!, $team: Slug!, $env: String!) @cache(policy: NetworkOnly
2121
}
2222
}
2323
}
24+
25+
status {
26+
errors {
27+
__typename
28+
... on WorkloadStatusDeprecatedRegistry {
29+
registry
30+
}
31+
}
32+
}
33+
2434
...JobRuns
2535
...JobStatus
2636
...Persistence

src/routes/team/[team]/[env]/job/[job]/+page.svelte

+22-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
import WorkloadDeploy from '$lib/components/WorkloadDeploy.svelte';
1010
import GraphErrors from '$lib/GraphErrors.svelte';
1111
import Time from '$lib/Time.svelte';
12-
import { Alert, BodyShort, Button, Heading } from '@nais/ds-svelte-community';
12+
import { Alert, BodyLong, BodyShort, Button, Heading } from '@nais/ds-svelte-community';
1313
import { ExternalLinkIcon } from '@nais/ds-svelte-community/icons';
1414
import type { PageData } from './$houdini';
1515
import Runs from './Runs.svelte';
1616
import Schedule from './Schedule.svelte';
17-
import Status from './Status.svelte';
1817
import TriggerRunModal from './TriggerRunModal.svelte';
1918
2019
interface Props {
@@ -77,6 +76,26 @@
7776
{@const job = $Job.data.team.environment.job}
7877
<div class="job-content">
7978
<div style="display:flex; flex-direction: column; gap: 1rem;">
79+
{#if job.status.errors.some((error) => error.__typename === 'WorkloadStatusDeprecatedRegistry')}
80+
<Alert variant="error">
81+
<BodyShort spacing
82+
>This job is using a deprecated image registry ({job.status.errors.find(
83+
(error) => error.__typename === 'WorkloadStatusDeprecatedRegistry'
84+
)?.registry}).</BodyShort
85+
>
86+
87+
<BodyLong
88+
>Starting April 1st, applications and jobs on Nais must use images from Google Artifact
89+
Registry (GAR). The easiest way to ensure that images are stored in GAR is to use Nais'
90+
GitHub Actions in the workflow. <a
91+
href="https://nais.io/log/#2025-02-24-image-policy"
92+
target="_blank"
93+
rel="noopener noreferrer">Read more in Nais announcement</a
94+
>.
95+
</BodyLong>
96+
</Alert>
97+
{/if}
98+
8099
{#if job.deletionStartedAt}
81100
<Alert variant="info" size="small" fullWidth={false}>
82101
This job is being deleted. Deletion started <Time
@@ -129,7 +148,7 @@
129148
</div>
130149
</div>
131150
<div class="sidebar">
132-
<Status {job} />
151+
<!-- <Status {job} /> -->
133152
<Schedule schedule={job.schedule} />
134153
<AggregatedCostForWorkload workload={jobName} {environment} {teamSlug} />
135154
<Image workload={job} />

0 commit comments

Comments
 (0)