Skip to content

Commit

Permalink
ignore 'spec' field in newFields logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lmossman committed Nov 2, 2021
1 parent a8ceffb commit f02e8a3
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,14 @@ <T> ConnectorCounter updateConnectorDefinitions(final DSLContext ctx,

final ConnectorInfo connectorInfo = connectorRepositoryToIdVersionMap.get(repository);
final JsonNode currentDefinition = connectorInfo.definition;
final Set<String> newFields = getNewFields(currentDefinition, latestDefinition);

// todo (lmossman) - this logic to remove the "spec" field is temporary; it is necessary to avoid
// breaking users who are actively using an old connector version, otherwise specs from the most
// recent connector versions may be inserted into the db which could be incompatible with the
// version they are actually using.
// Once the faux major version bump has been merged, this "new field" logic will be removed
// entirely.
final Set<String> newFields = Sets.difference(getNewFields(currentDefinition, latestDefinition), Set.of("spec"));

// Process connector in use
if (connectorRepositoriesInUse.contains(repository)) {
Expand Down

0 comments on commit f02e8a3

Please sign in to comment.