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

Work around config doc issues for LGTM #41291

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions extensions/observability-devservices/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,22 @@
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- This is not an extension but we need to generate the config doc -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${project.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
import java.util.Optional;
import java.util.Set;

import io.quarkus.runtime.annotations.ConfigDocIgnore;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.smallrye.config.WithDefault;

@ConfigGroup
public interface ContainerConfig {

/**
Expand All @@ -19,7 +22,10 @@ public interface ContainerConfig {

/**
* The container image name to use, for container based DevServices providers.
* <p>
* Ignored for the config doc here as a more precise value will be defined in subinterfaces.
*/
@ConfigDocIgnore
String imageName();

/**
Expand All @@ -38,9 +44,10 @@ public interface ContainerConfig {

/**
* Network aliases.
*
* @return metwork aliases
* <p>
* Ignored for the config doc here as a more precise value will be defined in subinterfaces.
*/
@ConfigDocIgnore
Optional<Set<String>> networkAliases();

/**
Expand All @@ -51,7 +58,10 @@ public interface ContainerConfig {
* starts a new container with this label set to the specified value.
* <p>
* This property is used when you need multiple shared containers.
* <p>
* Ignored for the config doc here as a more precise value will be defined in subinterfaces.
*/
@ConfigDocIgnore
String label();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@

import java.time.Duration;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.smallrye.config.WithDefault;

@ConfigGroup
public interface GrafanaConfig extends ContainerConfig {

// copied from ContainerConfig, config hierarchy workaround

@WithDefault("true")
boolean enabled();

@WithDefault("true")
boolean shared();

@WithDefault("quarkus")
String serviceName();

// ---

/**
* The username.
*/
@WithDefault("admin")
String username();

/**
* The password.
*/
@WithDefault("admin")
String password();

/**
* The port of the Grafana container.
*/
@WithDefault("3000")
int grafanaPort();

/**
* The timeout.
*/
@WithDefault("PT1M")
Duration timeout();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,28 @@

@ConfigGroup
public interface LgtmConfig extends GrafanaConfig {

/**
* The name of the Grafana LGTM Docker image.
*/
@WithDefault(ContainerConstants.LGTM)
String imageName();

/**
* The Docker network aliases.
*/
@WithDefault("lgtm,lgtm.testcontainer.docker")
Optional<Set<String>> networkAliases();

/**
* The label of the container.
*/
@WithDefault("quarkus-dev-service-lgtm")
String label();

/**
* The port on which LGTM's OTLP port will be exposed.
*/
@WithDefault("4318")
int otlpPort();
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
package io.quarkus.observability.common.config;

import io.quarkus.runtime.annotations.ConfigDocSection;
import io.smallrye.config.ConfigMapping;

@ConfigMapping
public interface ModulesConfiguration {

/**
* Grafana LGTM configuration
*/
@ConfigDocSection
LgtmConfig lgtm();
}
2 changes: 1 addition & 1 deletion extensions/observability-devservices/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>quarkus-observability-devservices</artifactId>
<name>Quarkus - Observability Dev Services - Runtime</name>
<name>Quarkus - Observability Dev Services</name>
<description>Serve and consume Observability Dev Services</description>
<dependencies>
<dependency>
Expand Down