Hi there! I'm trying to migrate from Airbyte 0.14...
# ask-community-for-troubleshooting
p
Hi there! I'm trying to migrate from Airbyte 0.14.1-alpha to 0.22.3-alpha, which appears to be the current version. However, I'm getting "No migration found for target version: 0.22.3-alpha".
Copy code
[ec2-user@ip-172-31-45-53 ~]$ docker run --rm -v /home/ec2-user/0.14.1-alpha:/config airbyte/migration:0.22.3-alpha -- --input /config/airbyte_archive.tar.gz --output /config/airbyte_archive_migrated.tar.gz --target-version 0.22.3-alpha
2021-05-13 22:31:38 INFO i.a.m.MigrationRunner(parse):78 - {} - args: [--input, /config/airbyte_archive.tar.gz, --output, /config/airbyte_archive_migrated.tar.gz, --target-version, 0.22.3-alpha]
2021-05-13 22:31:38 INFO i.a.m.MigrationRunner(run):50 - {} - Unpacking tarball
2021-05-13 22:31:38 INFO i.a.m.MigrationRunner(run):67 - {} - Running migrations...
2021-05-13 22:31:38 INFO i.a.m.MigrationRunner(run):68 - {} - MigrateConfig{inputPath=/tmp/airbyte_migrate1347150974477562104/uncompressed, outputPath=/tmp/airbyte_migrate1347150974477562104/output, targetVersion='0.22.3-alpha'}
2021-05-13 22:31:39 INFO i.a.m.Migrate(run):88 - {} - Starting migrations. Current version: 0.14.1-alpha, Target version: 0.22.3-alpha
Exception in thread "main" java.lang.IllegalArgumentException: No migration found for target version: 0.22.3-alpha
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
        at io.airbyte.migrate.Migrate.run(Migrate.java:101)
        at io.airbyte.migrate.MigrationRunner.run(MigrationRunner.java:70)
        at io.airbyte.migrate.MigrationRunner.main(MigrationRunner.java:108)
1
c
could you try not setting --target-version at all?
i believe if you just leave out the flag it should auto resolve to the correct migration.
p
I tried leaving it out and also got an error:
Copy code
io.airbyte.migrate.Migrate: error: argument  --target-version: expected one argument
c
yuck.
have you pulled master at all recently? it used to be a required argument but shouldn't be anymore.
p
Yeah, I just cloned it freshly.
I'm at
commit 3be2a6b1ddfe504d828aee11df8f495022acaaef
c
looking
just tried to replicate this locally and was able to run it without the
--target-version
trying to figure out what the difference is between the command that you and i are running to see if i can figure out what might be causing the error.
p
ok!
Thanks for looking at this!
At one point in the past, I also ran
Copy code
docker run --rm -v 0.14.1-alpha:/config airbyte/migration:0.14.1-alpha -- --input /config/airbyte_archive.tar.gz --output /config/airbyte_archive_migrated.tar.gz
Would that have left an old version of the docker image around somehow? (But why would it keep using the old one when I ask for 0.22.3-alpha?)
c
yeah. it feels like it's using an old image somehow, but given the comannd you're running i can't figure out why that would be the cas.e
https://airbytehq.slack.com/archives/C021JANJ6TY/p1620946685251700?thread_ts=1620945264.249000&cid=C021JANJ6TY ^ when you did this was there anything else in the error message? just curious if there are any other clues.
p
Copy code
[ec2-user@ip-172-31-45-53 ~]$ docker run --rm -v /home/ec2-user/0.14.1-alpha:/config airbyte/migration:0.22.3-alpha -- --inpu
t /config/airbyte_archive.tar.gz --output /config/airbyte_archive_migrated.tar.gz --target-version ''
2021-05-13 22:33:31 INFO i.a.m.MigrationRunner(parse):78 - {} - args: [--input, /config/airbyte_archive.tar.gz, --output, /co
nfig/airbyte_archive_migrated.tar.gz, --target-version]
usage: io.airbyte.migrate.Migrate
       [-h] --input INPUT --output OUTPUT
       [--target-version TARGET_VERSION]
io.airbyte.migrate.Migrate: error: argument  --target-version: expected one
argument
Exception in thread "main" java.lang.IllegalArgumentException: net.sourceforge.argparse4j.inf.ArgumentParserException: argume
nt --target-version: expected one argument
        at io.airbyte.migrate.MigrationRunner.parse(MigrationRunner.java:103)
        at io.airbyte.migrate.MigrationRunner.run(MigrationRunner.java:47)
        at io.airbyte.migrate.MigrationRunner.main(MigrationRunner.java:108)
Caused by: net.sourceforge.argparse4j.inf.ArgumentParserException: argument --target-version: expected one argument
        at net.sourceforge.argparse4j.internal.ArgumentParserImpl.processArg(ArgumentParserImpl.java:978)
        at net.sourceforge.argparse4j.internal.ArgumentParserImpl.parseArgs(ArgumentParserImpl.java:848)
        at net.sourceforge.argparse4j.internal.ArgumentParserImpl.parseArgsAtOffsetZero(ArgumentParserImpl.java:709)
        at net.sourceforge.argparse4j.internal.ArgumentParserImpl.parseArgs(ArgumentParserImpl.java:570)
        at net.sourceforge.argparse4j.internal.ArgumentParserImpl.parseArgs(ArgumentParserImpl.java:555)
        at io.airbyte.migrate.MigrationRunner.parse(MigrationRunner.java:96)
        ... 2 more
There's the whole traceback.
Maybe the line numbers will be conclusive evidence as to which image it was running
c
oh
p
Wait that's the wrong one
c
yeah. it looks like in what you just copied the --target-version is still there. i want to try this:
Copy code
docker run --rm -v /home/ec2-user/0.14.1-alpha:/config airbyte/migration:0.22.3-alpha -- --inpu
t /config/airbyte_archive.tar.gz --output /config/airbyte_archive_migrated.tar.gz
p
Okay it seems like it was a wild goose chase. When I do it again it works without the target-version argument.
c
🎉
woo hoo!
p
I think I must have run it the first time with
airbyte/migration:0.14.1-alpha
, got the error message, and learned not to trust the documentation
But why doesn't
--target-version 0.22.3-alpha
work?
c
we generally only write migrations for minor version bumps. so if you put in --target-version 0.22.0-alpha it should work and get you where you need to go.
p
Okay, I see. If you ask for
--target-version 0.22.3-alpha
it should probably automatically pick the migration that you need to get output that runs with 0.22.3-alpha. Enhancement request, then 🙂
c
yeah. we should make that tweak.
p
Hurrah, migration succeeded! Unfortunately I have a new issue. Starting a new thread...