Repository navigation
Quarkus IT execution time savings: skip realm bootstrap when not required - #48809
Conversation
|
Highly related to the mechanism to inhibit the full startup in #48759 - we'll eventually need to share the approach. |
I may be wrong about this, but I think they are complementary. The one improvement by #48759 would be that if we have initialized db, we won't need liquidbase migrations which I couldn't skip here because it broke so many things. I suppose it will be possible with your PR even without this one anyway (as migrations are already done). This has really small effect, but as I spend so much time, I decided to submit it. Either we want this PR or not, fine with me either way. |
That's exactly what I mean. There will need to be a single mechanism for inhibiting the full start of the server - it's being done in exactly the same spot (after factory postInit, but before bootstrapping), for different reasons. |
|
In order of presedence, you can change the startup of keycloak with:
It may be worthing thinking about collapsing this in some way: KC_LAUNCH_MODE=test|dry_run|skip_bootstrap If we made the name move evocative it would instead be KC_LAUNCH_MODE=exit_after_start|exit_before_quarkus|exit_before_bootstrap |
this is easier for me to understand |
Right, it can be initially confusing what "test" means - especially since it's set implicitly in a couple of places. |
0ddb026 to
fc5713e
Compare
I started looking into refactoring of launch modes, but it felt like too many changes that are not directly related for such a PR. So I introduced 2 launch modes (one for my env var and one for yours). Is that enough? I'll measure times before/after this PR and update the PR description in 30 mins. |
|
Updated, this PR saves roughly one minute. We could explore skipping liquidbase, but I didn't look if it is not skipped already when it detects pre-initialized DB. I won't invest more into it in this PR. |
ab217c9 to
0c19d5f
Compare
|
I keep rebasing but it is hard to get a green CI for completely unrelated failures, I'll just let this one finish and accept results. |
4e3a8cd to
27d4a87
Compare
* Closes: keycloak#48808 Signed-off-by: Michal Vavřík <michal.vavrik@aol.com>
27d4a87 to
c79e5fe
Compare
There was a problem hiding this comment.
LGTM, I'll align more with the dryrun logic in a follow-up.
sound good; @vmuzikar do you want to review? |
…ycloak#48809) * Closes: keycloak#48808 Signed-off-by: Michal Vavřík <michal.vavrik@aol.com>
Uh oh!
There was an error while loading. Please reload this page.