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

Integration tests: include MariaDB as well #729

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Al2Klimov
Copy link
Member

just to be sure we're compatible with this RDBMS and not only MySQL.

@@ -17,8 +17,13 @@ jobs:
database:
- name: mysql
pretty_name: MySQL
image: mysql:latest
- name: mysql
Copy link
Member

Choose a reason for hiding this comment

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

Having another test named mysql actually being MariaDB is a bit confusing. Why not setting the name to what it is and introduce another field matching ICINGADB_TESTS_DATABASE_TYPE, e.g., database_type?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please have a look at https://github.com/Icinga/icingadb/blob/main/.github/workflows/sql.yml. This also avoids setting variables like ICINGA_TESTING_PGSQL_IMAGE: mysql:latest.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, a such env var is a bit cheaty, but I prefer a nice looking matrix with the DB type written just one (lowercase).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, a such env var is a bit cheaty,

And setting ICINGA_TESTING_PGSQL_IMAGE: mysql:latest is not cheaty at all?

but I prefer a nice looking matrix with the DB type written just one

You mean once? https://github.com/Icinga/icingadb/blob/main/.github/workflows/sql.yml doesn't repeat it any more than the current version of this PR.

(lowercase).

That sounds just like an arbitrary choice. Sure, if both were otherwise identical, I'd also pick lowercase, but they aren't: it's easier to make the string lowercase in our Go code than in GitHub Actions Workflow YAML. And I don't think "I prefer lowercase" is a reasonable argument to completely rule out the alternative.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, setting such an env var IS cheaty of course (as I said), but I prefer it over

  • having to lower/upper-case something somewhere
  • having to repeat the database type more than once in the matrix

Copy link
Member

Choose a reason for hiding this comment

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

Please have a look at https://github.com/Icinga/icingadb/blob/main/.github/workflows/sql.yml. This also avoids setting variables like ICINGA_TESTING_PGSQL_IMAGE: mysql:latest.

I don't understand why it is not done exactly as in the referenced file.

@@ -51,6 +58,6 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.database.name }}-debug.log.xz
name: ${{ matrix.database.type }}-debug.log.xz
Copy link
Member

Choose a reason for hiding this comment

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

With this change, the debug log from MariaDB and MySQL are having the same filename now. I would advise to revert this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants