-
Notifications
You must be signed in to change notification settings - Fork 8
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
#391 Update pipeline step messaging to be compatible with Java 17 #407
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<id>main-chart</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>helm</executable> | ||
<arguments> | ||
<argument>template</argument> | ||
<argument>${aissemble.helm.repo.protocol}://${aissemble.helm.repo}/aissemble-spark-application-chart</argument> | ||
<argument>--version</argument> | ||
<argument>${version.aissemble}</argument> | ||
<argument>--values</argument> | ||
<argument>${mainValuesPath}/${moduleArtifactId}-base-values.yaml,${mainValuesPath}/${moduleArtifactId}-dev-values.yaml</argument> | ||
<argument>-s</argument> | ||
<argument>templates/deployment.yaml</argument> | ||
</arguments> | ||
<outputFile>target/apps/${moduleArtifactId}-dev-chart.yaml</outputFile> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>test-chart</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>helm</executable> | ||
<arguments> | ||
<argument>template</argument> | ||
<argument>${aissemble.helm.repo.protocol}://${aissemble.helm.repo}/aissemble-spark-application-chart</argument> | ||
<argument>--version</argument> | ||
<argument>${version.aissemble}</argument> | ||
<argument>--values</argument> | ||
<argument>${mainValuesPath}/${moduleArtifactId}-base-values.yaml,${testValuesPath}/${moduleArtifactId}-test-values.yaml</argument> | ||
<argument>-s</argument> | ||
<argument>templates/deployment.yaml</argument> | ||
</arguments> | ||
<outputFile>target/apps/${moduleArtifactId}-test-chart.yaml</outputFile> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>ci-chart</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>helm</executable> | ||
<arguments> | ||
<argument>template</argument> | ||
<argument>${aissemble.helm.repo.protocol}://${aissemble.helm.repo}/aissemble-spark-application-chart</argument> | ||
<argument>--version</argument> | ||
<argument>${version.aissemble}</argument> | ||
<argument>--values</argument> | ||
<argument>${mainValuesPath}/${moduleArtifactId}-base-values.yaml,${mainValuesPath}/${moduleArtifactId}-ci-values.yaml</argument> | ||
<argument>-s</argument> | ||
<argument>templates/deployment.yaml</argument> | ||
</arguments> | ||
<outputFile>target/apps/${moduleArtifactId}-ci-chart.yaml</outputFile> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I: Fixed tabbing issue in downstream project poms where this whole block was not being indented |
||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<id>main-chart</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>helm</executable> | ||
<arguments> | ||
<argument>template</argument> | ||
<argument>${aissemble.helm.repo.protocol}://${aissemble.helm.repo}/aissemble-spark-application-chart</argument> | ||
<argument>--version</argument> | ||
<argument>${version.aissemble}</argument> | ||
<argument>--values</argument> | ||
<argument>${mainValuesPath}/${moduleArtifactId}-base-values.yaml,${mainValuesPath}/${moduleArtifactId}-dev-values.yaml</argument> | ||
<argument>-s</argument> | ||
<argument>templates/deployment.yaml</argument> | ||
</arguments> | ||
<outputFile>target/apps/${moduleArtifactId}-dev-chart.yaml</outputFile> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>test-chart</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>helm</executable> | ||
<arguments> | ||
<argument>template</argument> | ||
<argument>${aissemble.helm.repo.protocol}://${aissemble.helm.repo}/aissemble-spark-application-chart</argument> | ||
<argument>--version</argument> | ||
<argument>${version.aissemble}</argument> | ||
<argument>--values</argument> | ||
<argument>${mainValuesPath}/${moduleArtifactId}-base-values.yaml,${testValuesPath}/${moduleArtifactId}-test-values.yaml</argument> | ||
<argument>-s</argument> | ||
<argument>templates/deployment.yaml</argument> | ||
</arguments> | ||
<outputFile>target/apps/${moduleArtifactId}-test-chart.yaml</outputFile> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>ci-chart</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>helm</executable> | ||
<arguments> | ||
<argument>template</argument> | ||
<argument>${aissemble.helm.repo.protocol}://${aissemble.helm.repo}/aissemble-spark-application-chart</argument> | ||
<argument>--version</argument> | ||
<argument>${version.aissemble}</argument> | ||
<argument>--values</argument> | ||
<argument>${mainValuesPath}/${moduleArtifactId}-base-values.yaml,${mainValuesPath}/${moduleArtifactId}-ci-values.yaml</argument> | ||
<argument>-s</argument> | ||
<argument>templates/deployment.yaml</argument> | ||
</arguments> | ||
<outputFile>target/apps/${moduleArtifactId}-ci-chart.yaml</outputFile> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,6 +128,10 @@ | |
<groupId>com.boozallen.aissemble</groupId> | ||
<artifactId>foundation-metadata-producer</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.boozallen.aissemble</groupId> | ||
<artifactId>extensions-messaging-kafka</artifactId> | ||
</dependency> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Q: should this be a default inclusion for all spark pipeline? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Unfortunately all our pipelines include:
by default. So in order to remain compatible with that, we must include the new |
||
<dependency> | ||
<groupId>com.boozallen.aissemble</groupId> | ||
<artifactId>extensions-data-delivery-spark</artifactId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,8 @@ import ${basePackage}.${step.capitalizedName}; | |
#foreach ($store in $pipeline.fileStores) | ||
import ${basePackage}.filestore.${store.fullName}; | ||
#end | ||
import com.boozallen.aissemble.core.cdi.CdiContext; | ||
|
||
import io.smallrye.config.inject.ConfigExtension; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I: Removed unused import |
||
import com.boozallen.aissemble.core.cdi.CdiContext; | ||
import com.boozallen.aiops.data.delivery.messaging.PipelineMessagingConfig; | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,8 @@ package ${basePackage}.cdi; | |
import java.util.List; | ||
|
||
import jakarta.enterprise.inject.spi.Extension; | ||
import com.boozallen.aissemble.core.filestore.EnvironmentVariableFileStoreConfig; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I: Removed unused import |
||
|
||
import com.boozallen.aissemble.core.metadata.producer.MetadataProducer; | ||
import io.smallrye.reactive.messaging.kafka.KafkaCDIEvents; | ||
import io.smallrye.reactive.messaging.kafka.KafkaConnector; | ||
|
||
/** | ||
* Configures the CDI context for this application. | ||
|
@@ -26,8 +23,6 @@ public class PipelinesCdiContext extends PipelinesCdiContextBase { | |
List<Class<?>> customBeans = super.getCdiClasses(); | ||
|
||
// Add any custom CDI classes here | ||
customBeans.add(KafkaConnector.class); | ||
customBeans.add(KafkaCDIEvents.class); | ||
customBeans.add(MetadataProducer.class); | ||
|
||
return customBeans; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.boozallen.aissemble.upgrade.migration; | ||
/*- | ||
* #%L | ||
* aiSSEMBLE::Foundation::Upgrade | ||
* %% | ||
* Copyright (C) 2021 Booz Allen | ||
* %% | ||
* This software package is licensed under the Booz Allen Public License. All Rights Reserved. | ||
* #L% | ||
*/ | ||
import org.apache.commons.lang3.StringUtils; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.technologybrewery.baton.BatonException; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.util.stream.Stream; | ||
|
||
public abstract class AbstractPomMigration extends AbstractAissembleMigration { | ||
protected static final Logger logger = LoggerFactory.getLogger(AbstractPomMigration.class); | ||
|
||
public static final String POM = "pom"; | ||
public static final String GUARANTEED_TAG = "<modelVersion>"; | ||
|
||
protected String indent; | ||
|
||
protected void detectAndSetIndent(File file) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A: Probably a candidate for Baton's There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I copied this from an old branch. Guess it never got added to dev after a patch release. |
||
try (Stream<String> lines = Files.lines(file.toPath())) { | ||
indent = lines.filter(line -> line.contains(GUARANTEED_TAG)) | ||
.findFirst() | ||
.map(artifact -> artifact.substring(0, artifact.indexOf(GUARANTEED_TAG))) | ||
.orElse(null); | ||
if (StringUtils.isEmpty(indent)) { | ||
logger.info("Failed to detect indent for POM. Using default. {}", file); | ||
indent = " "; | ||
} | ||
} catch (IOException e) { | ||
throw new BatonException("Failed to get indent from POM:" + file, e); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I: Space before
## TODO
was being rendered in downstream template, resulting in the spacing being off in the following line.