From ca8151ec68b6b5d0691d5e787372a4c6f9091701 Mon Sep 17 00:00:00 2001 From: Evan Tahler Date: Thu, 26 Jan 2023 08:37:21 -0800 Subject: [PATCH] Revert allowedHosts missing value checks (#21923) --- .../airbyte/workers/utils/ConfigReplacer.java | 4 ---- .../workers/utils/ConfigReplacerTest.java | 19 ------------------- 2 files changed, 23 deletions(-) diff --git a/airbyte-workers/src/main/java/io/airbyte/workers/utils/ConfigReplacer.java b/airbyte-workers/src/main/java/io/airbyte/workers/utils/ConfigReplacer.java index 356ad5fadec8..791b8f80e955 100644 --- a/airbyte-workers/src/main/java/io/airbyte/workers/utils/ConfigReplacer.java +++ b/airbyte-workers/src/main/java/io/airbyte/workers/utils/ConfigReplacer.java @@ -48,10 +48,6 @@ public AllowedHosts getAllowedHosts(AllowedHosts allowedHosts, JsonNode config) final List hosts = allowedHosts.getHosts(); for (String host : hosts) { final String replacedString = sub.replace(host); - if (replacedString.contains("${")) { - throw new IOException( - "The allowed host value, '" + host + "', is expecting an interpolation value from the connector's configuration, but none is present"); - } resolvedHosts.add(replacedString); } diff --git a/airbyte-workers/src/test/java/io/airbyte/workers/utils/ConfigReplacerTest.java b/airbyte-workers/src/test/java/io/airbyte/workers/utils/ConfigReplacerTest.java index 4ef50ebb48a3..511c0dd98df2 100644 --- a/airbyte-workers/src/test/java/io/airbyte/workers/utils/ConfigReplacerTest.java +++ b/airbyte-workers/src/test/java/io/airbyte/workers/utils/ConfigReplacerTest.java @@ -42,23 +42,4 @@ void getAllowedHostsGeneralTest() throws IOException { assertThat(response.getHosts()).isEqualTo(expected); } - @Test() - void getAllowedHostsMissingValue() throws IOException { - final AllowedHosts allowedHosts = new AllowedHosts(); - final List hosts = new ArrayList(); - hosts.add("${subdomain}.vendor.com"); - allowedHosts.setHosts(hosts); - - final String configJson = "{\"password\": \"abc123\"}"; - final JsonNode config = mapper.readValue(configJson, JsonNode.class); - - try { - replacer.getAllowedHosts(allowedHosts, config); - throw new RuntimeException("should not get here"); - } catch (Exception e) { - assertThat(e).hasMessage( - "The allowed host value, '${subdomain}.vendor.com', is expecting an interpolation value from the connector's configuration, but none is present"); - } - } - }