Determining the Necessity of `mysqlSetupJob` in DataHub Updates

Original Slack Thread

<@U06TM7M40RK> is the mysql kubernetes setup job neccessary when updating

Yes, the mysqlSetupJob is necessary when updating DataHub, especially if there are changes to the database schema between versions. This job is responsible for setting up the database tables and users, and it ensures that any necessary schema migrations are applied. According to a <Slack discussion>, the mysql-setup job is crucial for setting up the database and creating the DataHub user, which is essential for both initial deployments and updates.

Would you like more detailed instructions on how to configure or run the mysqlSetupJob during an update?

Sources:

  • <Slack discussion> :+1: 0 button :-1: 0 button :bulb: Hint: Mention @runllm in the thread for followups.

<@U06TM7M40RK> what about if I am not upgrading version - is it still necessary?

If you are not upgrading the version of DataHub, the mysqlSetupJob may not be necessary. The primary purpose of this job is to handle database schema changes that occur during version upgrades. If there are no changes to the database schema and you are simply restarting or redeploying the existing version, you might not need to run this job.

However, it’s always a good practice to ensure that your database is in a consistent state, so if there are any doubts or if the deployment process involves any changes to the database configuration, running the mysqlSetupJob can help ensure everything is set up correctly.

Would you like more information on how to determine if the mysqlSetupJob is needed for your specific deployment scenario?

Sources: