8000 refactor AuroraDB tests and add migration-tests to CI job by kami619 · Pull Request #31396 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

refactor AuroraDB tests and add migration-tests to CI job - #31396

Merged
mhajas merged 1 commit into
keycloak:mainfrom
kami619:is-31024-auroradb-migration-tests
Jul 24, 2024
Merged

mhajas merged 1 commit into
keycloak:mainfrom
kami619:is-31024-auroradb-migration-tests

Conversation

@kami619
@kami619 kami619 commented Jul 18, 2024 •
Copy link
Copy Markdown
Contributor

Fixes #31024

Background:
Earlier this year, from this change, we added a new matrix option to run the store-integration-tests. And now as per #31024 we need to run tests against the AuroraDB again. Given this and from the discussions with @ryanemerson and @mhajas we understood, it would be best to refactor the store-integration-tests and create a new job for the tests to be run against AuroraDB, which would allow us to optimize around the cost and code.

This PR refactors the Keycloak CI workflow for the bits associated with the AuroraDB database. We are adding a new job named auroradb-integration-tests to the jobs.

Test run on my fork: https://github.com/kami619/keycloak/actions/runs/9979098679/job/27577694974

Note: When there is a change to store-integration-tests or migration-tests, we would need to update the auroradb-integration-tests job as well.

@kami619
kami619 requested review from a team as code owners July 18, 2024 02:34
@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch 2 times, most recently from 5b41dd0 to c4c425b Compare July 18, 2024 02:41
@kami619 kami619 changed the title refactor AuroraDB tests from store-integration-tests refactor AuroraDB tests and add migration-tests to CI job Jul 18, 2024
@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch 2 times, most recently from 91db916 to 348bbf7 Compare July 18, 2024 03:14
@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch from 348bbf7 to 2a0c2b8 Compare July 18, 2024 03:19
Comment thread .github/workflows/ci.yml Resolved
@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch 8 times, most recently from bba7d4b to 4f30c9f Compare July 18, 2024 20:40
@ryanemerson ryanemerson left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes are looking good to me, just a couple of minor comments about code cleanup.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch 3 times, most recently from 7487fcd to a227c50 Compare July 19, 2024 15:03
@kami619
kami619 commented Jul 19, 2024
Copy link
Copy Markdown
Contributor Author

@ryanemerson the code should be ready for review again, however, I will update this comment to include a successful run against my fork. Thanks for your patience in reviewing this.

@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch from 32a4cc1 to 2f043c4 Compare July 19, 2024 18:14
@keycloak-github-bot keycloak-github-bot Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.model.session.UserSessionProviderOfflineModelTest#testExpired

Keycloak CI - Store Model Tests

java.lang.AssertionError: expected null, but was:<org.keycloak.models.sessions.infinispan.UserSessionAdapter@9a83f6be>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotNull(Assert.java:756)
	at org.junit.Assert.assertNull(Assert.java:738)
	at org.junit.Assert.assertNull(Assert.java:748)
...

Report flaky test

org.keycloak.testsuite.model.session.SessionTimeoutsTest#testOnlineUserClientMaxLifespanSmallerThanSession

Keycloak CI - Store Model Tests

java.lang.AssertionError: expected null, but was:<org.keycloak.models.sessions.infinispan.UserSessionAdapter@da79f85c>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotNull(Assert.java:756)
	at org.junit.Assert.assertNull(Assert.java:738)
	at org.junit.Assert.assertNull(Assert.java:748)
...

Report flaky test

@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch 2 times, most recently from 2a87bcc to 4495258 Compare July 19, 2024 19:57
@kami619
kami619 commented Jul 22, 2024
Copy link
Copy Markdown
Contributor Author

@ryanemerson https://github.com/kami619/keycloak/actions/runs/10013614481/job/27681805510

For some reason, if I split the handling of aws.pem file across steps, it fails with the below exception.

https://github.com/kami619/keycloak/actions/runs/10013614481/job/27681805510

And it doesn't happen when I changed it back to handling aws.pem within the same step, am I missing something here ?

@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch 4 times, most recently from 940b9f2 to d3681a9 Compare July 23, 2024 13:12
@mhajas
mhajas marked this pull request as draft July 23, 2024 16:49
@mhajas
mhajas commented Jul 23, 2024
Copy link
Copy Markdown
Contributor

Moving to draft as this is still in progress

@kami619
kami619 commented Jul 23, 2024
Copy link
Copy Markdown
Contributor Author

https://github.com/kami619/keycloak/actions/runs/10065470972/job/27824659034

@mhajas and @ryanemerson I think this should be in a good state to review now.

@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch from acb5e70 to bdd863b Compare July 24, 2024 01:34
@kami619
kami619 marked this pull request as ready for review July 24, 2024 01:35
@ryanemerson ryanemerson left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for persevering @kami619

There's one minor comment, but consider it optional.

Comment thread .github/workflows/ci.yml Resolved
@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch 2 times, most recently from 21cb179 to c6ebbbb Compare July 24, 2024 11:21
Signed-off-by: Kamesh Akella <kamesh.asp@gmail.com>
@kami619
kami619 force-pushed the is-31024-auroradb-migration-tests branch from c6ebbbb to 707b418 Compare July 24, 2024 11:48
@mhajas mhajas left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @kami619! LGTM

@mhajas
mhajas merged commit 33b3fd3 into keycloak:main Jul 24, 2024
stianst pushed a commit to stianst/keycloak that referenced this pull request Jul 25, 2024
Fixes keycloak#31024
Signed-off-by: Kamesh Akella <kamesh.asp@gmail.com>
@kami619
kami619 deleted the is-31024-auroradb-migration-tests branch August 20, 2024 13:26
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.

Run DB migration tests for Aurora DB

3 participants

0