Skip to content

Node8 wt cli

Bobby Johnson edited this page May 22, 2018 · 8 revisions

Migrating your webtasks from Node 4 to Node 8

Update May 23, 2018: The Webtask.io migration to Node 8 is complete. All webtasks that were not migrated using the tools described below were automatically migrated to the new Node 8 environment.

If you are receiving deprecation errors or having any issues post-migration, please visit the Extend forum for instructions on resolving this issue.

If you are reading this, you must have previously used wt-cli to create some Node 4 webtasks on the webtask.io platform. Node 4 reaches end of life on 4/30/2018 and will no longer be supported. You must migrate your webtasks to use Node 8 using the instructions below.

If you have not completed the migration process as described in this document by 5/15/2018, we will automatically migrate all your Node 4 it's webtasks and CRON jobs to Node 8. Given the differences in execution environments and NPM modules, some of them may break. Therefore we strongly recommend that you perform the manual migration steps below, which allows you to test and stage your webtasks before taking a dependency on the Node 8 version.

NOTE: Migrating your webtasks from Node 4 to Node 8 will change the execution URLs of each webtask. You will also need to update any external applications that call your webtasks.

Migration overview

Ensure you are using wt-cli@9.3 or later.

  1. Use wt profile ls to get a sense of the scope of the migration work.
  2. Use wt profile migrate to migrate select or all webtasks from Node 4 to Node 8.
  3. Use wt edit {webtask_name} --node8 to edit and test a copy of your webtask in the Node 8 environment.
  4. Use wt profile migrate --finalize to permanently upgrade your wt-cli profile to use Node 8 environment going forward.

NOTE If you are using wt-cli with more than the default profile, commands above need to be run separately for each profile, i.e.

wt profile migrate {profile_name}
wt edit -p {profile_name} {webtask_name} --node8
wt profile migrate {profile_name} --finalize

Get a sense of the scope of the migration work

Ensure you are using wt-cli@9.3 or later.

You can issue wt profile ls command to see the list of wt-cli profiles that manage webtask which require migration from Node 4 to Node 8. It is common you will only see the default profile on the list, but you may have more depending on your circumstances.

You will see a similar notification about the need to migrate your webtasks when issuing other wt commands.

Migrate webtasks in a wt-cli profile from Node 4 to Node 8

Ensure you are using wt-cli@9.3 or later.

Migration will create a copy of a Node 4 webtask in the Node 8 environment. At that point you can edit and execute Node 4 and Node 8 versions independently. Node 4 and Node 8 versions also have distinct URLs.

Issue wt profile migrate (for the default profile) or wt profile migrate {profile_name} command to see a simulation of the migration process from Node 4 to Node 8 for the webtasks managed by this profile.

Issue wt profile migrate --yes (for the default profile) or wt profile migrate {profile_name} --yes command to create a copy of all webtasks managed by the wt-cli profile to Node 8. See the synopsis of wt-cli for more options of executing wt profile migrate.

By default, the command will migrate all webtasks managed by the profile. You can also migrate only selected webtasks using the --include option, or exclude some webtasks from migration with the --exclude option.

After the initial migration is finished, you can edit and test a copy of your webtask in the Node 8 environment.

If you encounter warnings during the webtask migration process, you can get more information about common causes and remedies here.

Edit and test a copy of your webtask in the Node 8 environment.

Ensure you are using wt-cli@9.3 or later.

Use wt edit {your_webtask} --node8 (for the default profile) or wt edit -p {profile_name} {webtask_name} --node8 (for a specic profile) to edit and test your Node 8 webtask in the Webtask Editor. Independently, you can continue editing your Node 4 version of the webtask with wt edit {your_webtask}, until you perform the permanent profile upgrade to Node 8 (see next section).

NOTE Once created, the Node8 webtask is completely independent from the Node 4 webtask, and has a distinct URL. Once you are satisfied with your Node 8 webtask, you need to switch to using the new Node 8 webtask URL in any client application invoking it.

Permanently upgrade your wt-cli profile to use Node 8

Ensure you are using wt-cli@9.3 or later.

WARNING This step is irreversible and will permanently delete your Node 4 CRON jobs and webtasks.

Once you have ported and tested all relevant webtasks from Node 4 to Node 8, you can permanently update your wt-cli profile to use Node 8. To do this, run wt profile migrate --finalize (for the default profile) or wt profile migrate {profile_name} --finalize, and use the same credentials you used originally when setting up wt-cli for that profile. After the initialization is complete, all default wt commands will manage your Node 8 webtasks, and all Node 4 CRON jobs and webtasks will be deleted.

wt-cli migration synopsis

wt profile ls

Get a report describing the wt-cli profiles that manage Node 4 webtasks which require migration. A similar report is generated by other wt commands.

wt profile migrate [{profile_name}]

Get a simulation of what would happen when actual Node 8 migration of a wt-cli profile was executed. No changes are made. This is a useful command to run to understand the status of the migration.

wt profile migrate [{profile_name}] --yes

Create a copy of all Node 4 webtask managed by the wt-cli profile in the Node 8 environment. If a Node 8 webtask already exists, it is not overriden.

wt profile migrate [{profile_name}] --yes --force

Same as before, but existing Node 8 webtasks are overridden.

wt profile migrate [{profile_name}] -i {webtask1} -i {webtask2}

Get a simulation of the migration process of only selected webtasks in a given profile.

wt profile migrate [{profile_name}] -e {webtask1} -e {webtask2}

Get a simulation of the migration process of all webtasks in a given profile except the ones specified.

NOTE any combination of --yes, --force, -i, and -e flags can be used in the wt profile migrate command.

wt edit {webtask_name} --node8

Edit a Node 8 copy of a webtask. This command requires that the webtask had been previously migrated using wt profile migrate command.

wt profile migrate --finalize

Permanently switches the wt-cli profile from Node 4 to Node 8. You should run this command to complete the process after you have migrated all relevant webtasks with wt profile migrate and tested them with wt edit {webtask_name} --node8. NOTE you must use the same credentials to authenticate as were used during the original setup. WARNING this command will delete all your Node 4 CRON jobs and webtasks.

wt edit {webtask_name}

If ran before permanently switching the profile to Node 8 with wt init ... --node 8, edits the Node 4 webtask.

After the profile had been permanently switched to Node 8, edits the Node 8 webtask.

Support

If you encounter warnings during the webtask migration process, you can get more information about common causes and remedies here.

If you have any questions, you can find us on webtask-chat.slack.com (you can join here). Or you can file an issue in this repository.