Booz Allen's lean manufacturing approach for holistically designing, developing and fielding AI solutions across the engineering lifecycle from data processing to model building, tuning, and training to secure operational deployment
Other
33
stars
8
forks
source link
BUG: Resolve migration issues from Orphedomos to Fabric8 to reduce potential errors and manual workarounds for downstream projects #306
The current migration for Orphedomos to Fabric8 has a currently has few issues when utilized in downstream projects:
aiSSEMBLE 1.8.0 build-parent defines the configuration for the forked Docker Maven Plugin in org.technologybrewery.fabric8. When performing an upgrade, the migration updates a downstream project to use the Docker Maven Plugin from io.frabric8 instead.
When there is both a ci and integration-test profile defined in a POM file using Orphedomos, the migration will result with only the ci profile being migrated.
Steps to Reproduce
OTS Only:
Build the foundation upgrade module: mvn clean install -pl :foundation-upgrade -Dmaven.build.cache.skipCache=true
Build the following docker images: mvn clean install -pl :aissemble-policy-decision-point,:aissemble-vault,:aissemble-spark -am
Update the <docker.project.repository.url> property to be docker-registry/repository/
Update <parent> in the root pom.xml to use build parent version 1.8.1-SNAPSHOT
Run mvn org.technologybrewery.baton:baton-maven-plugin:baton-migrate to apply the migrations
Within the test-306-docker/pom.xml:
Within the ci profile, surround the <plugins> block with <pluginManagement></pluginManagement>
Within the <build><plugins> block, move the docker-maven-plugin<plugin> to the <pluginManagement><plugins> block
Within the test-306-docker/test-306-policy-decision-point-docker/pom.xml, test-306-docker/test-306-spark-worker-docker/pom.xml, and test-306-docker/test-306-vault-docker/pom.xml add the following to the <build><plugins> block:
The project builds successfully and all references to orphedomos-maven-plugin are updated to docker-maven-plugin
A search for orphedomos-maven-plugin in the project should return 0 results
Actual Behavior
The project fails to build with the following error (condensed) due to the new docker-maven-plugin utilizing io.fabric8 for its groupId instead of org.technologybrewery.fabric8:
[ERROR] The build could not read 4 projects -> [Help 1]
[ERROR]
[ERROR] The project com.boozallen.aissemble:your-project-spark-worker-docker:0.1.0-SNAPSHOT (your-project-spark-worker-docker/pom.xml) has 1 error
[ERROR] Unknown packaging: docker-build @ line 13, column 16
The project fails to update both references to orphedomos-maven-plugin in the *-tests-docker/pom.xml
DOD
[x] The docker-maven-plugin should use a property for the groupId allowing for it to be easily switched between the official repo (io.fabric8) and forked repo (org.technologybrewery.fabric8) :
[x] Property should be defined in the build parent
[x] All references throughout aiSSEMBLE (including templates) should be updated to use the property instead
[x] Update the current migration to utilize the property in downstream projects
[x] Current migration should be made more generalized so that it can account for multiple references to orphedomos-maven-plugin in a given pom.xml regardless of their profile
[x] Utilize pom modification tool for making all the changes as once
Test Outline
Follow steps to reproduce and verify you get the expected result
Build the project with mvn clean install -Pci and verify it builds successfully
Description
The current migration for Orphedomos to Fabric8 has a currently has few issues when utilized in downstream projects:
1.8.0
build-parent defines the configuration for the forked Docker Maven Plugin inorg.technologybrewery.fabric8
. When performing an upgrade, the migration updates a downstream project to use the Docker Maven Plugin fromio.frabric8
instead.ci
andintegration-test
profile defined in a POM file using Orphedomos, the migration will result with only theci
profile being migrated.Steps to Reproduce
OTS Only:
mvn clean install -pl :foundation-upgrade -Dmaven.build.cache.skipCache=true
mvn clean install -pl :aissemble-policy-decision-point,:aissemble-vault,:aissemble-spark -am
Create a archetype project on version
1.7.0
:Add the SparkPipeline.json file to the
test-306-pipeline-models/src/main/resources/pipelines
directoryRun
mvn clean install
until all the manual actions are completeOnce the manual actions are complete, run
mvn clean install -Dmaven.build.cache.skipCache=true
once to get any remaining manual actionsAdd the following
ci
profile to thetest-306-tests/test-306-tests-docker/pom.xml
:Within the root
pom.xml
:<docker.project.repository.url>
property to bedocker-registry/repository/
<parent>
in the rootpom.xml
to use build parent version1.8.1-SNAPSHOT
Run
mvn org.technologybrewery.baton:baton-maven-plugin:baton-migrate
to apply the migrationsWithin the
test-306-docker/pom.xml
:ci
profile, surround the<plugins>
block with<pluginManagement></pluginManagement>
<build><plugins>
block, move thedocker-maven-plugin
<plugin>
to the<pluginManagement><plugins>
blockWithin the
test-306-docker/test-306-policy-decision-point-docker/pom.xml
,test-306-docker/test-306-spark-worker-docker/pom.xml
, andtest-306-docker/test-306-vault-docker/pom.xml
add the following to the<build><plugins>
block:Build the project with
mvn clean install
Expected Behavior
The project builds successfully and all references to
orphedomos-maven-plugin
are updated todocker-maven-plugin
orphedomos-maven-plugin
in the project should return 0 resultsActual Behavior
docker-maven-plugin
utilizingio.fabric8
for itsgroupId
instead oforg.technologybrewery.fabric8
:orphedomos-maven-plugin
in the*-tests-docker/pom.xml
DOD
docker-maven-plugin
should use a property for thegroupId
allowing for it to be easily switched between the official repo (io.fabric8
) and forked repo (org.technologybrewery.fabric8
) :orphedomos-maven-plugin
in a givenpom.xml
regardless of their profileTest Outline
mvn clean install -Pci
and verify it builds successfully