Skip to content

Commit

Permalink
🐛 set default value for StandardDestination/SourceDefinition `tombsto…
Browse files Browse the repository at this point in the history
…ne` fields (#16626)

* [RemoteDefinitionsProvider] set tombstone field on returned definitions

* move patching logic to definitions helper, add test

* roll it back

* set defaults for tombstone field

* format
  • Loading branch information
pedroslopez authored Sep 13, 2022
1 parent 363e3d2 commit 8b19aad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ properties:
type: object
existingJavaType: io.airbyte.protocol.models.ConnectorSpecification
tombstone:
description:
if not set or false, the configuration is active. if true, then this
description: if false, the configuration is active. if true, then this
configuration is permanently off.
type: boolean
default: false
public:
description: true if this connector definition is available to all workspaces
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ properties:
type: object
existingJavaType: io.airbyte.protocol.models.ConnectorSpecification
tombstone:
description:
if not set or false, the configuration is active. if true, then this
description: if false, the configuration is active. if true, then this
configuration is permanently off.
type: boolean
default: false
public:
description: true if this connector definition is available to all workspaces
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void initialize() throws InterruptedException, IOException {
source -> source));
this.destinationDefinitions = catalog.getDestinations().stream().collect(Collectors.toMap(
StandardDestinationDefinition::getDestinationDefinitionId,
source -> source));
destination -> destination));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void testGetSourceDefinition() throws Exception {
assertEquals("https://docs.airbyte.io/integrations/sources/stripe", stripeSource.getDocumentationUrl());
assertEquals("stripe.svg", stripeSource.getIcon());
assertEquals(URI.create("https://docs.airbyte.io/integrations/sources/stripe"), stripeSource.getSpec().getDocumentationUrl());
assertEquals(false, stripeSource.getTombstone());
}

@Test
Expand All @@ -76,6 +77,7 @@ void testGetDestinationDefinition() throws Exception {
assertEquals("airbyte/destination-s3", s3Destination.getDockerRepository());
assertEquals("https://docs.airbyte.io/integrations/destinations/s3", s3Destination.getDocumentationUrl());
assertEquals(URI.create("https://docs.airbyte.io/integrations/destinations/s3"), s3Destination.getSpec().getDocumentationUrl());
assertEquals(false, s3Destination.getTombstone());
}

@Test
Expand Down

0 comments on commit 8b19aad

Please sign in to comment.