Upgrading the Fn Project CLI

Find out how to upgrade the Fn Project CLI for use with OCI Functions.

OCI Functions is powered by the Fn Project open source engine. As a result, you can use the Fn Project CLI to perform create, read, update, and delete operations on OCI Functions. For more information about the Fn Project CLI, see Using the Fn Project CLI with OCI Functions.

From time to time, new versions of the Fn Project CLI are released. We recommend you regularly check that the most recent version is installed.

To see which version of the Fn Project CLI is currently installed, whether it is the most recent version, and to upgrade to the most recent version, see Steps to upgrade the Fn Project CLI.

Alternatively, simply reinstall the Fn Project CLI (see Functions QuickStart Guides and Installing the Fn Project CLI).

Steps to upgrade the Fn Project CLI

To upgrade the Fn Project CLI to the most recent version:

  1. In a terminal window in your development environment, log in as a functions developer and confirm which version of the Fn Project CLI is currently installed and whether it is the most recent version by entering:

    fn --version

    If the currently installed version of the Fn Project CLI is not the most recent version, complete the following steps to upgrade the Fn Project CLI.

  2. Upgrade to the latest version of the Fn Project CLI in one of the following ways:

    • In a Linux or MacOS environment, enter:

      curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh

      If prompted for a password, enter the superuser's password.

    • In a MacOS environment using Homebrew, enter:

      brew update && brew install fn
    • In all environments, download and install the latest binary from the Releases page.

    For more detailed instructions, see the README.md file in the fnproject/cli repository on GitHub.

  3. In a terminal window, confirm that the most recent version of the Fn Project CLI has been installed by entering:

    fn --version

Advance Notice of Mandatory Requirement to Upgrade the Fn Project CLI, April 2021

If you have installed the Fn Project CLI and are using it to initialize, build, and deploy functions, you must upgrade the Fn Project CLI on or before 1st May, 2021. After this date, the initialize, build, and deploy commands might start failing with errors.

By 1st May, 2021:

  • The Fn Project Java FDK libraries will no longer be available from the current Jfrog Bintray repository. The Fn Project Java FDK libraries are moving to the new Maven Central repository.
  • New versions of the Fn Project Python FDK libraries will have been released.

Both of these changes require you to upgrade the Fn Project CLI to version 0.6.6 (or later).

Steps to upgrade to Fn Project CLI version 0.6.6 (or later)

  1. In a terminal window in your development environment, confirm that the Fn Project CLI has been installed by entering:

    fn --version

    If the version shown is not version 0.6.6 (or later), complete the following steps to upgrade the Fn Project CLI.

  2. Upgrade to the latest version of the Fn Project CLI in one of the following ways:

    • In a Linux or MacOS environment, enter:

      curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh

      If prompted for a password, enter the superuser's password.

    • In a MacOS environment using Homebrew, enter:

      brew update && brew install fn
    • In all environments, download and install the latest binary from the Releases page.

    For more detailed instructions, see the README.md file in the fnproject/cli repository on GitHub.

  3. In a terminal window, confirm that Fn Project CLI version 0.6.6 (or later) has been installed by entering:

    fn --version

General FAQs

How does this affect me?

If you have installed the Fn Project CLI and are using it to initialize, build, and deploy functions, you must upgrade the Fn Project CLI on or before 1st May, 2021. After this date, the initialize, build, and deploy commands might start failing with errors.

Are there any required actions I need to take?

Yes. Oracle has released a new version of the Fn Project CLI. Follow the steps to upgrade the Fn Project CLI promptly. See Steps to upgrade to Fn Project CLI version 0.6.6 (or later).

What if I don't upgrade by 1st May, 2021?

If you do not upgrade the Fn Project CLI by 1st May, 2021, the initialize, build, and deploy commands might start failing with errors. You can fix the errors by upgrading the Fn Project CLI. However, we strongly recommend you upgrade the Fn Project CLI before 1st May, 2021 to avoid any disruption.

Can I do anything to work around or avoid this change?

No. Upgrading the Fn Project CLI promptly is the recommended solution.

I am using the Fn Project CLI pre-installed with Cloud Shell. Do I need to upgrade the Fn Project CLI myself?

No. If you are using the Fn Project CLI bundled in Cloud Shell, Oracle will automatically upgrade the Fn Project CLI for you before 1st May, 2021.

I am using the Fn Project CLI pre-installed with Visual Builder Studio (previously Developer Cloud). Do I need to upgrade the Fn Project CLI myself?

No. If you are using the Fn Project CLI bundled with Visual Builder Studio (previously Developer Cloud), Oracle will automatically upgrade the Fn Project CLI for you before 1st May, 2021.

Will the functions that I have already deployed stop working after 1st May, 2021?

No. Any functions you have already deployed will continue to work. However, if you need to change the functions and redeploy them, you have to use the latest Fn Project CLI.

Java Function FAQs

I have functions written in Java. What changes, if any, do I need to make?

If you have existing Java functions, you have to:

  • Upgrade the Fn Project CLI to version 0.6.6 (or later). See Steps to upgrade to Fn Project CLI version 0.6.6 (or later).

  • Remove the definition of the fn-release-repo Jfrog Bintray repository from each function's pom.xml file. In the example below, remove everything between the <repositories> and </repositories> tags, including the tags themselves:

    <repositories>
        <repository>
            <id>fn-release-repo</id>
            <url>https://dl.bintray.com/fnproject/fnproject</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

By upgrading the Fn Project CLI and removing the definition of the fn-release-repo Jfrog Bintray repository, you ensure that subsequent build and deploy operations use the Maven Central repository instead of the Jfrog Bintray repository.

Python Function FAQs

When I run fn init --help using the new CLI, I don't see Python 3.7.1 and Python 3.8.5 anymore. Why not?

Python 3.7.1 has been replaced by Python 3.7, and Python 3.8.5 has been replaced by Python 3.8. This change ensures you get the latest patch version each time you build a function image using the fn build or fn deploy commands.

I have functions written in Python 3.7.1 or Python 3.8.5. What changes should I make to use the latest Python 3.7 or Python 3.8 patch versions?

Make the following change in each function's func.yaml file and redeploy the function:

  • replace runtime: python3.7.1 with runtime: python3.7
  • replace runtime: python3.8.5 with runtime: python3.8

Other Language FAQs

My functions use Node.js, Golang, Ruby, or my own Dockefile. I do not use Java or Python. Do I need to upgrade the Fn Project CLI?

Yes. We strongly recommend you upgrade the Fn Project CLI before 1st May, 2021.