Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MariaDB migration testing #2170

Merged
merged 45 commits into from
Jan 9, 2024
Merged

Conversation

strickvl
Copy link
Contributor

@strickvl strickvl commented Dec 20, 2023

Adds MariaDB DB migration testing.

https://github.com/zenml-io/zenml/actions/runs/7452053752/job/20274610586 shows the test running through without error.

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • If my changes require changes to the dashboard, these changes are communicated/requested.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

Summary by CodeRabbit

Summary of changes

  • New Features

    • Added a new workflow to test MariaDB database migrations upon pull requests.
  • Enhancements

    • Improved the migration testing script to include support for both MariaDB and MySQL databases.
  • Documentation

    • Updated workflow documentation to reflect the new testing process and triggers.

@strickvl strickvl added enhancement New feature or request internal To filter out internal PRs and issues labels Dec 20, 2023
Copy link
Contributor

coderabbitai bot commented Dec 20, 2023

Important

Auto Review Skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Walkthrough

The project has introduced a new GitHub Actions workflow to automate the testing of database migrations for MariaDB. This includes setting up Python 3.9 and executing a script that handles migrations across different MariaDB versions. Additionally, an existing script has been updated to support MariaDB, including the ability to manage Docker containers and perform connection and disconnection steps tailored for MariaDB.

Changes

File Path Change Summary
.github/workflows/release.yml Added a new job mariadb-db-migration-testing for MariaDB migrations testing.
.github/workflows/testing_this_now.yml Introduced a workflow TEST MariaDB DB migrations with triggers on pull request events and job for MariaDB migration testing.
scripts/test-migrations.sh Updated to add support for MariaDB, including starting/stopping Docker containers and connection/disconnection steps.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@strickvl
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between fad464d and 75d27ee.
Files selected for processing (3)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/testing_this_now.yml (1 hunks)
  • scripts/test-migrations.sh (3 hunks)
Additional comments: 3
.github/workflows/release.yml (1)
  • 69-82: The addition of the mariadb-db-migration-testing job is consistent with the PR's objective to introduce MariaDB testing. Ensure that the ubuntu-dind-runners label is correctly configured in the CI environment to handle the Docker-in-Docker setup required for MariaDB testing.
.github/workflows/testing_this_now.yml (1)
  • 1-18: The new workflow TEST MariaDB DB migrations is correctly configured with triggers for PR events and path exclusions. Verify that the paths ignored are as intended and that no additional paths that should trigger the workflow are excluded.
scripts/test-migrations.sh (1)
  • 119-121: The cleanup commands for the MariaDB Docker container are correct. Ensure that the CI environment has the necessary permissions to execute these Docker commands without issues.

scripts/test-migrations.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@stefannica stefannica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

.github/workflows/testing_this_now.yml Outdated Show resolved Hide resolved
@stefannica stefannica mentioned this pull request Dec 20, 2023
9 tasks
@strickvl
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 2

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 75d27ee and eddf463.
Files selected for processing (2)
  • scripts/test-migrations.sh (4 hunks)
  • src/zenml/zen_stores/migrations/versions/728c6369cfaa_add_name_column_to_input_artifact_pk.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • scripts/test-migrations.sh

Copy link
Contributor

@avishniakov avishniakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same observations applies to the existing MySQL code

scripts/test-migrations-mariadb.sh Show resolved Hide resolved
scripts/test-migrations-mariadb.sh Outdated Show resolved Hide resolved
@strickvl
Copy link
Contributor Author

strickvl commented Jan 9, 2024

@avishniakov fixed as per your changes and all ran without error here https://github.com/zenml-io/zenml/actions/runs/7463701141

@strickvl strickvl merged commit 1030551 into develop Jan 9, 2024
4 of 23 checks passed
@strickvl strickvl deleted the feature/support-mariadb-db-migrations branch January 9, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants