deployment

No menu items for this category

Upgrade OpenMetadata

In this guide, you will find all the necessary information to safely upgrade your OpenMetadata instance to 1.3.x.

Prerequisites

Everytime that you plan on upgrading OpenMetadata to a newer version, make sure to go over all these steps:

Before upgrading your OpenMetadata version we strongly recommend backing up the metadata.

The source of truth is stored in the underlying database (MySQL and Postgres supported). During each version upgrade there is a database migration process that needs to run. It will directly attack your database and update the shape of the data to the newest OpenMetadata release.

It is important that we backup the data because if we face any unexpected issues during the upgrade process, you will be able to get back to the previous version without any loss.

You can learn more about how the migration process works here.

  • To run the backup and restore commands, please make sure that you are always in the latest openmetadata-ingestion version to have all the improvements shipped in the CLI.
  • Also, make sure you have connectivity between your database (MySQL / PostgreSQL) and the host machine where you will be running the below commands.

1. Create a Virtual Environment and Install the Backup CLI

Validate the installed metadata version with python -m metadata --version

2. Run the Backup

If using MySQL:

If using Postgres:

3. Store the backup file somewhere safe

The above command will generate a backup file with extension as .sql. You can copy the name from the backup command output.

Make sure to store it somewhere safe in case you need to restore the data later.

You can refer to the following guide to get more details about the backup and restore:

Before running the migrations, it is important to update these parameters to ensure there are no runtime errors. A safe value would be setting them to 20MB.

If using MySQL

You can update it via SQL (note that it will reset after the server restarts):

To make the configuration persistent, you'd need to navigate to your MySQL Server install directory and update the my.ini or my.cnf files with sort_buffer_size = 20971520.

If using RDS, you will need to update your instance's Parameter Group to include the above change.

If using Postgres

You can update it via SQL (not that it will reset after the server restarts):

To make the configuration persistent, you'll need to update the postgresql.conf file with work_mem = 20MB.

If using RDS, you will need to update your instance's Parameter Group to include the above change.

Note that this value would depend on the size of your query_entity table. If you still see Out of Sort Memory Errors during the migration after bumping this value, you can increase them further.

After the migration is finished, you can revert this changes.

Deprecation Notice

  • Check the updated docs on how to configure Airflow DAG's lineage. We will deprecate the dictionary annotation in the 1.4 release, since the new annotation allows you to define lineage between assets other than Tables.

  • On 1.4.0 we will deprecate the metadata backup and metadata restore commands in favor of native backup & restore tools from MySQL and PostgreSQL. We will provide a guide on how to use these tools to backup and restore OpenMetadata metadata.

Breaking Changes

Upgrading to OpenMetadata 1.3.0 will REMOVE your existing Alerts. You will need to recreate your alerts manually.

We have fully reworked how we manage alerts to make the experience easier for end users, with a more comprehensive list of sources, filters and actions.

This process required a full backend rewrite, which means that there is no automatic way to migrate alerts from the old system.

alerts

New Alerts UI

The Secrets Manager noop option has been renamed to db. You can find this in the config below:

Either update your YAMLs or the env var you are using under SECRET_MANAGER.

Note how we also added the possibility to add prefix when defining the secret key ID in the external secrets managers and the option to tag the created resources.

In this release we updated the server Dockerfile to work with openmetadata as a user instead of root.

If you're mapping volumes, specially when configuring JWK, you will need to update the owner of the directory to get it working with the new openmetadata user.

You will need to run:

Otherwise, you'll see a similar error in your server logs:

In 1.2.0 we introduced the Elasticsearch reindex job as part of the OpenMetadata server. In this release, we removed triggering ES job from Python workflows. Everything happens in the server now. The image will not ship the metadata_to_es DAG anymore.

The openmetadata/ingestion and openmetadata/ingestion-base images now use Python 3.10.

Note that starting release 1.3.0, the openmetadata-ingestion package started supporting Python 3.11. We'll migrate the images to 3.11 in the next release.

We cleaned all the Python SDK code related to any auth system that is not JWT token. Bots deprecated that behavior 2 releases ago and only supported JWT. This is now reflected in the code.

Removed the MSSQL connection option from airflow backend database. This is due to the option being experimental and will be deprecated by the Airflow team. For more information refer to the link.

If you are using airflow with MSSQL backend, we recommend switching it to the supported backends e.g., MYSQL or POSTGRES.

This is what has been removed:

In 1.3.0 we started registering more information from Ingestion Pipelines status' in the platform. This required us to create new JSON Schemas for the added properties, that before were only used in the Ingestion Framework.

Due to this, we need to update one import and one of its properties' names.

StackTraceError

  • From from metadata.ingestion.api.models import StackTraceError
  • To from metadata.generated.schema.entity.services.ingestionPipelines.status import StackTraceError

And we renamed its property stack_trace to stackTrace to follow the naming conventions in JSON Schemas.

In the collate-sqllineage dependency, we have renamed the sqllineage import to collate_sqllineage.

This change has been made to avoid any conflict with the open source version of sqllineage. In case you are using this package directly in your python scripts please make sure to rename your imports:

  • From from sqllineage.xxx import xxx
  • To from collate_sqllineage.xxx import xxx

We have removed the connection string authentication from MongoDB service and now we only support passing the authentication credentials by value.

Before the upgrade make sure you review the mongodb connection if you have provided the proper connection details/credentials to ensure the smooth migration.

If you were using connection string based authentication then structure of connection details would change:

If you were using connection value based authentication then structure of connection details would change:

Upgrade your installation

Once your metadata is safe, follow the required upgrade instructions based on your environment:

Post-Upgrade Steps

Go to Settings -> Applications -> Search Indexing

search-index-app

Reindex

Click on Run Now.

In the configuration section, you can select the entities you want to reindex.

create-project

Reindex

Since this is required after the upgrade, we want to reindex All the entities.

If you are running the ingestion workflows externally or using a custom Airflow installation, you need to make sure that the Python Client you use is aligned with the OpenMetadata server version.

For example, if you are upgrading the server to the version x.y.z, you will need to update your client with

The plugin parameter is a list of the sources that we want to ingest. An example would look like this openmetadata-ingestion[mysql,snowflake,s3]==1.2.0. You will find specific instructions for each connector here.

Moreover, if working with your own Airflow deployment - not the openmetadata-ingestion image - you will need to upgrade as well the openmetadata-managed-apis version:

Go to Settings -> {service entity} -> Pipelines

redeploy

Re-deploy

Select the pipelines you want to Re Deploy click Re Deploy.

If you are seeing broken dags select all the pipelines from all the services and re deploy the pipelines.