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

keycloak DevService doesnt follow the same logs patterns as other devServices #19485

Closed
pjgg opened this issue Aug 18, 2021 · 5 comments · Fixed by #19575
Closed

keycloak DevService doesnt follow the same logs patterns as other devServices #19485

pjgg opened this issue Aug 18, 2021 · 5 comments · Fixed by #19575
Assignees
Labels
Milestone

Comments

@pjgg
Copy link
Contributor

pjgg commented Aug 18, 2021

Describe the bug

I am missing the following Log in keycloak devService:

Dev Services for Keycloak started.

As other devServices do, for example:

Amqp (follow this pattern):

1.      Pulling docker image: quay.io/artemiscloud/activemq-artemis-broker
2.      Please be patient; this may take some time but only needs to be done once
3.      Starting to pull image
4.      Dev Services for AMQP started

RedPanda:

1. Pulling docker image: vectorized/redpanda
2. Please be patient; this may take some time but only needs to be done once
3. Starting to pull image
4.  Dev Services for Kafka started

But Keycloak follow this pattern:

1. Pulling docker image: quay.io/keycloak/keycloak
2. Please be patient; this may take some time but only needs to be done once
3. Starting to pull image

4. Container quay.io/keycloak/keycloak:14.0.0 started

Looks like the same but I think that is important to follow the same pattern and also explicitly says that DevService Keycloak was started (because maybe by some "random reasons" the end-user could have more than one keycloak)

Expected behavior

Dev Services for keycloak started

Actual behavior

Container quay.io/keycloak/keycloak:14.0.0 started

@pjgg pjgg added the kind/bug Something isn't working label Aug 18, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 18, 2021

/cc @stuartwdouglas

@sberyozkin
Copy link
Member

@pjgg Hi,
I don't mind adding a log message Dev Services for Keycloak started - Container quay.io/keycloak/keycloak:14.0.0 started is still informative though given that this image name is referred to in the logs and it is logged by TestContainers.

I looked at KafkaClient - I don't see it hiding somehow a 'Container vectorized/redpanda started` message.
But it uses a different, label based mechanism, it may pick up an existing container as far as I understand, so that might be related to the way it is logged.

FYI, it does not seem all DevServices follow the same pattern, ex, RedisClient/Mongo

@pjgg
Copy link
Contributor Author

pjgg commented Aug 19, 2021

I think that is a good idea to print an explicit log saying that Dev Service started. Especially for newcomers.
Dev Services for Keycloak started - Container quay.io/keycloak/keycloak:14.0.0 started, is good to me.

On Kafka dev service ("RedPanda") We got the following log trace:

15:39:12.455 INFO  [app] 15:39:09,009 Found Docker environment with Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock
15:39:12.455 INFO  [app] 15:39:09,023 Docker host IP address is localhost
15:39:12.455 INFO  [app] 15:39:09,090 Connected to docker: 
15:39:12.455 INFO  [app]   Server Version: 20.10.3
15:39:12.455 INFO  [app]   API Version: 1.41
15:39:12.455 INFO  [app]   Operating System: Fedora 32 (Workstation Edition)
15:39:12.455 INFO  [app]   Total Memory: 31887 MB
15:39:12.455 INFO  [app] 15:39:09,093 Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
15:39:12.455 INFO  [app] 15:39:09,958 Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
15:39:12.455 INFO  [app] 15:39:09,959 Checking the system...
15:39:12.455 INFO  [app] 15:39:09,960 ✔︎ Docker server version should be at least 1.6.0
15:39:12.456 INFO  [app] 15:39:10,119 ✔︎ Docker environment should have more than 2GB free disk space
15:39:12.456 INFO  [app] 15:39:10,200 Pulling docker image: vectorized/redpanda:latest. Please be patient; this may take some time but only needs to be done once.
15:39:12.456 INFO  [app] 15:39:11,956 Starting to pull image
15:39:12.456 INFO  [app] 15:39:11,971 Pulling image layers:  0 pending,  0 downloaded,  0 extracted, (0 bytes/0 bytes)
15:39:16.459 INFO  [app] 15:39:13,032 Pulling image layers:  6 pending,  1 downloaded,  0 extracted, (46 KB/? MB)
15:39:16.459 INFO  [app] 15:39:14,060 Pulling image layers:  5 pending,  2 downloaded,  0 extracted, (4 MB/? MB)
15:39:16.460 INFO  [app] 15:39:15,192 Pulling image layers:  4 pending,  3 downloaded,  0 extracted, (9 MB/? MB)
15:39:36.471 INFO  [app] 15:39:32,730 Pulling image layers:  3 pending,  4 downloaded,  0 extracted, (88 MB/? MB)
15:39:40.474 INFO  [app] 15:39:36,934 Pulling image layers:  2 pending,  5 downloaded,  0 extracted, (99 MB/? MB)
15:39:44.475 INFO  [app] 15:39:41,847 Pulling image layers:  1 pending,  6 downloaded,  0 extracted, (118 MB/? MB)
15:39:44.475 INFO  [app] 15:39:42,439 Pulling image layers:  1 pending,  6 downloaded,  1 extracted, (120 MB/? MB)
15:39:44.475 INFO  [app] 15:39:42,505 Pulling image layers:  0 pending,  7 downloaded,  1 extracted, (120 MB/120 MB)
15:39:44.475 INFO  [app] 15:39:42,594 Pulling image layers:  0 pending,  7 downloaded,  2 extracted, (120 MB/120 MB)
15:39:44.475 INFO  [app] 15:39:42,729 Pulling image layers:  0 pending,  7 downloaded,  3 extracted, (120 MB/120 MB)
15:39:44.475 INFO  [app] 15:39:42,807 Pulling image layers:  0 pending,  7 downloaded,  4 extracted, (120 MB/120 MB)
15:39:44.475 INFO  [app] 15:39:42,970 Pulling image layers:  0 pending,  7 downloaded,  5 extracted, (120 MB/120 MB)
15:39:44.475 INFO  [app] 15:39:43,584 Pulling image layers:  0 pending,  7 downloaded,  6 extracted, (120 MB/120 MB)
15:39:44.475 INFO  [app] 15:39:43,682 Pulling image layers:  0 pending,  7 downloaded,  7 extracted, (120 MB/120 MB)
15:39:44.475 INFO  [app] 15:39:43,691 Pull complete. 7 layers, pulled in 31s (downloaded 120 MB at 3 MB/s)
15:39:44.475 INFO  [app] 15:39:43,695 Creating container for image: vectorized/redpanda:latest
15:39:44.475 INFO  [app] 15:39:44,210 Starting container with ID: 14d6ded3a97cb2fce402f4664d9582a7fecec95ddf3bd72a73eb8cdc58590eb0
15:39:48.483 INFO  [app] 15:39:44,687 Container vectorized/redpanda:latest is starting: 14d6ded3a97cb2fce402f4664d9582a7fecec95ddf3bd72a73eb8cdc58590eb0
15:39:48.484 INFO  [app] 15:39:46,614 Container vectorized/redpanda:latest started in PT36.456833S
15:39:48.484 INFO  [app] 15:39:46,616 Dev Services for Kafka started. Other Quarkus applications in dev mode will find the broker automatically. For Quarkus applications in production mode, you can connect to this by starting your application with -Dkafka.bootstrap.servers=PLAINTEXT://localhost:49404

Note that "Dev Services for Kafka started." Is at the end.

@sberyozkin
Copy link
Member

@pjgg

Sure, I don't think I can intercept it as you suggested,
but indeed following up

Container quay.io/keycloak/keycloak:14.0.0 started in...

with

DevServices for Keycloak started.

would be fine

@gsmet
Copy link
Member

gsmet commented Aug 23, 2021

See #19575

gsmet added a commit to gsmet/quarkus that referenced this issue Aug 23, 2021
@gsmet gsmet added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Aug 23, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 23, 2021
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.0.Final Aug 23, 2021
gsmet added a commit to gsmet/quarkus that referenced this issue Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants