-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Save specs to source/dest definitions on create and update #7367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! one quick question on whether we should be still using the image validator at all.
destinationDefinitionUpdate.getDockerImageTag()); | ||
|
||
final boolean imageTagHasChanged = !currentDestination.getDockerImageTag().equals(destinationDefinitionUpdate.getDockerImageTag()); | ||
// TODO (lmossman): remove null spec condition when the spec field becomes required on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! good call out.
@@ -104,7 +108,12 @@ public DestinationDefinitionRead getDestinationDefinition(final DestinationDefin | |||
|
|||
public DestinationDefinitionRead createDestinationDefinition(final DestinationDefinitionCreate destinationDefinitionCreate) | |||
throws JsonValidationException, IOException { | |||
imageValidator.assertValidIntegrationImage(destinationDefinitionCreate.getDockerRepository(), | |||
imageValidator.assertValidIntegrationImage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the image validator doing anything useful at this point? it seems almost entirely duplicative at this point with fetching the spec on the next line. what do you think about just totally removing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch, yeah it does seem pretty redundant now that we are fetching and using the spec in this function. Let's sweep it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once you get the build passing, merge it!
@@ -667,7 +665,7 @@ public boolean canImportDefinitons() { | |||
return call.call(); | |||
} catch (final ConfigNotFoundException e) { | |||
throw new IdNotFoundKnownException(String.format("Could not find configuration for %s: %s.", e.getType().toString(), e.getConfigId()), | |||
e.getConfigId(), e); | |||
e.getConfigId(), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably why the linting in the build is failing. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a small war happening between my intellij formatter and the gradle format command :p Still trying to get them a bit more in sync
0157beb
to
3796b65
Compare
…#7367) * store spec in db * update tests * run gw format * add TODOs * add lmossman to TODOs * run gw format * remove redundant DockerImageValidator * run gw format
What
Resolves #7135.
Adds logic to the source/dest definition create/update API endpoints to fetch the specs from the connector container and save the spec to the definition struct in the db.
How
Uses the existing
schedulerSynchronousClient
in the two handlers to fetch the spec from the connector container on create or on update if the image tag has changed or the spec is not present in the db.Recommended reading order
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changes