-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: main
Are you sure you want to change the base?
Conversation
@@ -17,8 +17,13 @@ jobs: | |||
database: | |||
- name: mysql | |||
pretty_name: MySQL | |||
image: mysql:latest | |||
- name: mysql |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
9a88abc
to
55f0e41
Compare
@@ -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 |
There was a problem hiding this comment.
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.
55f0e41
to
5aa7439
Compare
just to be sure we're compatible with this RDBMS and not only MySQL.
5aa7439
to
41c31f2
Compare
just to be sure we're compatible with this RDBMS and not only MySQL.