Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add deprecated warning #1604

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PUBLIC_APPWRITE_ENDPOINT=https://localhost/v1
PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1
PUBLIC_CONSOLE_MODE=self-hosted
PUBLIC_STRIPE_KEY=
PUBLIC_GROWTH_ENDPOINT=
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"e2e:ui": "playwright test tests/e2e --ui"
},
"dependencies": {
"@appwrite.io/console": "1.4.4",
"@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197",
"@appwrite.io/pink": "0.25.0",
"@appwrite.io/pink-icons": "0.25.0",
"@popperjs/core": "^2.11.8",
Expand Down
15 changes: 8 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

async function loadRuntimes() {
const options = (await $runtimesList).runtimes
.filter(runtime => !runtime.deprecated)
.map((runtime) => ({
label: `${runtime.name} - ${runtime.version}`,
value: runtime.$id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import { isCloud } from '$lib/system';
import { organization } from '$lib/stores/organization';
import SpecificationsTooltip from '$lib/wizards/functions/components/specificationsTooltip.svelte';
import Alert from '$lib/components/alert.svelte';

const functionId = $page.params.function;
let runtime: string = null;
Expand All @@ -25,12 +26,20 @@
let options = [];
let specificationOptions = [];

let isDeprecated: boolean = null;

onMount(async () => {
runtime ??= $func.runtime;
specification ??= $func.specification;

let runtimes = await $runtimesList;
let allowedSpecifications = (await $specificationsList).specifications;

isDeprecated = runtimes.runtimes.find((r) => r.$id === runtime)?.deprecated ?? false;
if(!isDeprecated) {
runtimes.runtimes = runtimes.runtimes.filter(runtime => !runtime.deprecated);
}

options = runtimes.runtimes.map((runtime) => ({
label: `${runtime.name} - ${runtime.version}`,
value: runtime.$id
Expand Down Expand Up @@ -102,6 +111,14 @@
{options}
required
hideRequired />
{#if isDeprecated}
<Alert type="warning">
<span slot="title">Your runtime is deprecated</span>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<span slot="title">Your runtime is deprecated</span>
<span slot="title">Your runtime version is deprecated</span>

<p>
Please upgrade to newer versio of the runtime, because on April 1st 2024, builds for deprecated runtimes will be disabled.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Please upgrade to newer versio of the runtime, because on April 1st 2024, builds for deprecated runtimes will be disabled.
New builds for your function will be disabled if you don't update to a newer version before April 1, 2025.

</p>
</Alert>
{/if}
<InputSelect
label="CPU and memory"
id="size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
let options = [];

onMount(async () => {
options = (await $runtimesList).runtimes.map((runtime) => ({
options = (await $runtimesList).runtimes.filter(runtime => !runtime.deprecated).map((runtime) => ({
label: `${runtime.name} - ${runtime.version}`,
value: runtime.$id
}));
Expand Down
Loading