<@U01AS8LGX41> : <@U01QFQCBA68> ran into an issue...
# contributing-to-airbyte
j
@charles : @Liren Tu ran into an issue running migrations where the version on 0.22.x wasn’t able to be validated on 0.23.0 when running the migration.
u
I exported the config on version 22, and run the following command to migrate it to 23:
Copy code
docker run --rm -v ~/Downloads:/config airbyte/migration:0.23.0-alpha --  --input /config/airbyte_archive.tar.gz  --output ~/Downloads/new_airbyte_archive.tar.gz
Here is the error log:
Copy code
2021-05-19 23:12:51 INFO i.a.m.MigrationRunner(parse):78 - {} - args: [--input, /config/airbyte_archive.tar.gz, --output, /Users/lirentu/Downloads/new_airbyte_archive.tar.gz]
2021-05-19 23:12:51 INFO i.a.m.MigrationRunner(run):50 - {} - Unpacking tarball
2021-05-19 23:12:51 INFO i.a.m.MigrationRunner(run):67 - {} - Running migrations...
2021-05-19 23:12:51 INFO i.a.m.MigrationRunner(run):68 - {} - MigrateConfig{inputPath=/tmp/airbyte_migrate7703568884416841818/uncompressed, outputPath=/tmp/airbyte_migrate7703568884416841818/output, targetVersion='null'}
2021-05-19 23:12:51 INFO i.a.m.Migrate(run):88 - {} - Starting migrations. Current version: 0.22.3-alpha, Target version: null
2021-05-19 23:12:51 INFO i.a.m.Migrate(run):112 - {} - Migrating from version: 0.22.0-alpha to version 0.23.0-alpha.
Exception in thread "main" java.lang.IllegalArgumentException: Input data schema does not match declared input schema.
	at io.airbyte.migrate.Migrate.lambda$runMigration$1(Migrate.java:139)
	at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:441)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at io.airbyte.migrate.migrations.MigrationV0_23_0.migrate(MigrationV0_23_0.java:94)
	at io.airbyte.migrate.MigrateWithMetadata.migrate(MigrateWithMetadata.java:52)
	at io.airbyte.migrate.Migrate.runMigration(Migrate.java:149)
	at io.airbyte.migrate.Migrate.run(Migrate.java:113)
	at io.airbyte.migrate.MigrationRunner.run(MigrationRunner.java:70)
	at io.airbyte.migrate.MigrationRunner.main(MigrationRunner.java:108)
Caused by: io.airbyte.validation.json.JsonValidationException: json schema validation failed.
errors: $.icon: is not defined in the schema and the schema does not allow additional properties
schema:
{
  "$schema" : "<http://json-schema.org/draft-07/schema#>",
  "$id" : "<https://github.com/airbytehq/airbyte/blob/master/airbyte-config/models/src/main/resources/types/StandardDestinationDefinition.yaml>",
  "title" : "StandardDestinationDefinition",
  "description" : "describes a destination",
  "type" : "object",
  "required" : [ "destinationDefinitionId", "name", "dockerRepository", "dockerImageTag", "documentationUrl" ],
  "additionalProperties" : false,
  "properties" : {
    "destinationDefinitionId" : {
      "type" : "string",
      "format" : "uuid"
    },
    "name" : {
      "type" : "string"
    },
    "dockerRepository" : {
      "type" : "string"
    },
    "dockerImageTag" : {
      "type" : "string"
    },
    "documentationUrl" : {
      "type" : "string"
    }
  }
}
object:
{
  "destinationDefinitionId" : "f7a7d195-377f-cf5b-70a5-be6b819019dc",
  "name" : "Redshift",
  "dockerRepository" : "airbyte/destination-redshift",
  "dockerImageTag" : "0.3.7",
  "documentationUrl" : "<https://docs.airbyte.io/integrations/destinations/redshift>",
  "icon" : "redshift.svg"
}
	at io.airbyte.validation.json.JsonSchemaValidator.ensure(JsonSchemaValidator.java:88)
	at io.airbyte.migrate.Migrate.lambda$runMigration$1(Migrate.java:137)
	... 15 more
u
I think this means that we should update the
StandardSourceDefinition
and destination equivalent in the previous migration (0.20.0) or add an intermediate migration in order to pick up icons?
u
Is that correct?
u
yeah. i think you're right.
u
just need to add the field in 0.20.0
u
The same thing applies to the
prefix
field. I can add both of them to the 0.20.0 migration definition.
u
🤦‍♀️
u
thanks.