History

remove legacy compatibility codepaths

Rhys Sullivan committed 7 months ago

Commit ddd3aaa1 parent e2977a021 files · +111 −1158Browse files

Showing the changes to plugins/google-discovery (1 of 21 files). Show all

Unified · Split

plugins/google-discovery/sdk/index.ts+0−50
@@ -18,7 +18,6 @@ import { · 17 unmodified lines
1818 } from "@executor/platform-sdk/plugins";
1919 import {
2020 createPluginLocalConfigEntrySchema,
21− decodeCurrentOrLegacyLocalConfigAuth,
2221 pluginLocalConfigSourceFromConfig,
2322 SecretMaterialDeleterService,
2423 SecretMaterialResolverService,
@@ -103,29 +102,6 @@ const decodeGoogleDiscoveryCurrentLocalConfigOption = Schema.decodeUnknownOption · 78 unmodified lines
103102 config: GoogleDiscoveryStoredSourceDataSchema,
104103 }),
105104 );
106−const decodeGoogleDiscoveryLegacyLocalConfigOption = Schema.decodeUnknownOption(
107− Schema.Struct({
108− kind: Schema.Literal(GOOGLE_DISCOVERY_SOURCE_KIND),
109− name: Schema.optional(Schema.String),
110− namespace: Schema.optional(Schema.String),
111− enabled: Schema.optional(Schema.Boolean),
112− connection: Schema.Struct({
113− endpoint: Schema.optional(Schema.NullOr(Schema.String)),
114− auth: Schema.optional(Schema.Unknown),
115− }),
116− binding: Schema.Struct({
117− service: Schema.String,
118− version: Schema.String,
119− discoveryUrl: Schema.optional(Schema.NullOr(Schema.String)),
120− defaultHeaders: Schema.optional(
121− Schema.NullOr(Schema.Record({ key: Schema.String, value: Schema.String })),
122− ),
123− scopes: Schema.optional(Schema.Array(Schema.String)),
124− }),
125− config: Schema.optional(Schema.Unknown),
126− }),
127−);
128−
129105 export type GoogleDiscoverySourceStorage = {
130106 get: (input: {
131107 scopeId: string;
@@ -582,32 +558,6 @@ const googleDiscoveryStoredSourceDataFromLocalConfig = (input: { · 450 unmodified lines
582558 return current.value.config;
583559 }
584560
585− const legacy = decodeGoogleDiscoveryLegacyLocalConfigOption(input.config);
586− if (Option.isSome(legacy)) {
587− return storedSourceDataFromInput({
588− name:
589− legacy.value.name
590− ?? `${legacy.value.binding.service} ${legacy.value.binding.version}`,
591− service: legacy.value.binding.service,
592− version: legacy.value.binding.version,
593− discoveryUrl: legacy.value.binding.discoveryUrl ?? null,
594− defaultHeaders: legacy.value.binding.defaultHeaders ?? null,
595− scopes: legacy.value.binding.scopes ?? [],
596− auth: decodeCurrentOrLegacyLocalConfigAuth({
597− auth: legacy.value.connection.auth,
598− authSchema: GoogleDiscoveryConnectionAuthSchema,
599− loadedConfig: input.loadedConfig,
600− onLegacySecretRef: (tokenSecretRef) => ({
601− kind: "bearer",
602− tokenSecretRef,
603− }),
604− fallback: {
605− kind: "none",
606− },
607− }),
608− });
609− }
610−
611561 throw new Error("Unsupported Google Discovery local source config.");
612562 };
613563

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t