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

[#513] remove noRdAdmin profile #515

Merged
merged 1 commit into from
Dec 20, 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
10 changes: 9 additions & 1 deletion DRAFT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ _Note: instructions for adapting to these changes are outlined in the upgrade in


# Known Issues
_There are no known issues with the 1.11 release._

## Docker Module Build Failures
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I: Putting this in known issues to keep pressure on us to smooth this out.

When using a Docker daemon that does not reside in `/var/run` (e.g. running Rancher Desktop without admin privileges) the docker-maven-plugin will fail to build with the message below. To work around this failure, set the `DOCKER_HOST` variable to the location of the daemon socket file. For example, to make the docker-maven-plugin work with Rancher Desktop, run `export DOCKER_HOST=unix://$HOME/.rd/docker.sock`.

```shell
[ERROR] Failed to execute goal org.technologybrewery.fabric8:docker-maven-plugin:0.45-tb-0.1.0:build (default-build) on project final-513-spark-worker-docker:
Execution default-build of goal org.technologybrewery.fabric8:docker-maven-plugin:0.45-tb-0.1.0:build failed:
No <dockerHost> given, no DOCKER_HOST environment variable, no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine' and no external provider like Docker machine configured
```

# Known Vulnerabilities

Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,9 @@ The following steps will build aiSSEMBLE. *You must follow the configuration gui
### Helpful Profiles
The aiSSEMBLE baseline project provides several build profiles that may be helpful for different development environments.
To activate each one, use the standard Maven syntax: `./mvnw clean install -P[profile_name]`, for
instance, `./mvnw clean install -PnoRdAdmin`. There are many profiles you can find in the root `pom.xml` file. The
instance, `./mvnw clean install -Pintegration-test`. There are many profiles you can find in the root `pom.xml` file. The
following profiles are often useful when first starting with aiSSEMBLE:

* *noRdAdmin*: For configurations that disallow granting administrator privileges to Rancher Desktop. Testing frameworks
leveraged by aiSSEMBLE may, at times, assume that the docker unix socket is located at `/var/run/docker.sock`, which is
not the case when presented with a non-elevated Rancher installation. Activating this profile will override the
`DOCKER_HOST` seen by these dependencies, pointing it instead at `unix://$HOME/.rd/docker.sock`.
* *integration-test*: Some integration tests require Docker and automatically start/stop Docker Compose services while
executing tests (i.e. see the test/test-mda-models/test-data-delivery-pyspark-patterns module). **Note that the Maven
build does not build the Docker images directly. The images are built within the Kubernetes cluster to speed up
Expand Down
28 changes: 0 additions & 28 deletions extensions/extensions-alerting/extensions-alerting-teams/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,32 +121,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>noRdAdmin</id>
<activation>
<property>
<name>BAH_MACHINE</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<environmentVariables>
<DOCKER_HOST>unix://$HOME/.rd/docker.sock</DOCKER_HOST>
<TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>$HOME/.rd/docker.sock</TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -136,34 +136,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>noRdAdmin</id>
<activation>
<property>
<name>BAH_MACHINE</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<environmentVariables>
<DOCKER_HOST>unix://$HOME/.rd/docker.sock</DOCKER_HOST>
<TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>$HOME/.rd/docker.sock
</TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
30 changes: 0 additions & 30 deletions extensions/extensions-pipeline-invocation-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,34 +149,4 @@
</plugin>
</plugins>
</build>


<profiles>
<profile>
<id>noRdAdmin</id>
<activation>
<property>
<name>BAH_MACHINE</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<environmentVariables>
<DOCKER_HOST>unix://$HOME/.rd/docker.sock</DOCKER_HOST>
<TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>$HOME/.rd/docker.sock</TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def before_all(context):
)

# call to health check to verify Drift Detection Services are started
health_check_url = "http://localhost:8084/q/health/live"
health_check_url = "http://localhost:8084/invoke-drift/health-check"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I: The previous healthcheck URL is not a valid endpoint in our deployment. This was causing the ITs to wait the full timeout and eventually print an error before continuing on to successfully execute the actual tests.

success = False
retries = 1
wait = 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<name>DriftDetectionService</name>
<workingDir>target</workingDir>
<waitForInterrupt>false</waitForInterrupt>
<healthcheckUrl>http://localhost:8080/q/health/live</healthcheckUrl>
<healthcheckUrl>http://localhost:8080/invoke-drift/healthcheck</healthcheckUrl>
<arguments>
<argument>java</argument>
<argument>-DKRAUSENING_BASE=${basedir}/src/test/resources/krausening/base</argument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,31 +148,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>noRdAdmin</id>
<activation>
<property>
<name>BAH_MACHINE</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<environmentVariables>
<DOCKER_HOST>unix://$HOME/.rd/docker.sock</DOCKER_HOST>
<TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>$HOME/.rd/docker.sock</TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
Expand Down Expand Up @@ -61,4 +62,10 @@ public DriftDetectionResult invoke(@QueryParam("policyIdentifier") String policy
return driftDetector.detect(policyIdentifier, input, control);
}

@GET
@Path("/healthcheck")
@Produces({MediaType.TEXT_PLAIN})
public String healthCheck() {
return "Drift detection service is running...\n";
}
}
Loading