Skip to content

Bulk import workflow sample#774

Merged
elai-shalev merged 14 commits intorhdhorchestrator:mainfrom
AndrienkoAleksandr:bulk-import-workflow-sample
Mar 22, 2026
Merged

Bulk import workflow sample#774
elai-shalev merged 14 commits intorhdhorchestrator:mainfrom
AndrienkoAleksandr:bulk-import-workflow-sample

Conversation

@AndrienkoAleksandr
Copy link
Contributor

What doest this pull request fix:

https://redhat.atlassian.net/browse/RHIDP-9350

Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Signed-off-by: Oleksandr Andriienko <[email protected]>
Copy link
Collaborator

@elai-shalev elai-shalev left a comment

Choose a reason for hiding this comment

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

Overall workflow looks great, not issue to merge it.
one question about the change to the pipeline dockerfile

Comment on lines +171 to +177
@# Ensure WORKDIR exists and is accessible (important for macOS Podman)
@test -d $(WORKDIR) || mkdir -p $(WORKDIR)
@# Use absolute path for volume mount (required for Podman on macOS)
@# On macOS, use realpath or fallback to WORKDIR if realpath fails
@$(CONTAINER_ENGINE) run --rm -v "$(shell realpath $(WORKDIR) 2>/dev/null || echo $(WORKDIR)):/workdir:Z" -w /workdir \
$(LINUX_IMAGE) /bin/bash -c "ENABLE_PERSISTENCE=$(ENABLE_PERSISTENCE) WORKFLOW_IMAGE_TAG=$(IMAGE_TAG) ${SCRIPTS_DIR}/gen_manifests.sh $(GEN_MANIFESTS_WORKFLOW_FOLDER) $(WORKFLOW_ID)"
@echo "Manifests are available in workdir $(WORKDIR)/$(GEN_MANIFESTS_WORKFLOW_FOLDER)/manifests"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice!

Comment on lines 43 to 44
ENV swf_home_dir=/home/kogito/serverless-workflow-project
RUN if [[ -d "./resources/src" ]]; then cp -r ./resources/src/* ./src/; fi

Copy link
Collaborator

Choose a reason for hiding this comment

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

why was this line removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

RUN if [[ -d "./resources/src" ]]; then cp -r ./resources/src/* ./src/; fi

This command copies files from

/home/kogito/serverless-workflow-project/resources/src

to the

/home/kogito/serverless-workflow-project/src:

After that we have workflow file

/home/kogito/serverless-workflow-project/src/main/resources/create-pr-universal.sw.yaml  

inside container.
That's OK, but build-app.sh script also copies files...

Next Dockerfile command:

RUN /home/kogito/launch/build-app.sh ./resources

Fragment of this script:

... 
destination="${KOGITO_HOME}/serverless-workflow-project/src/main/resources/"
log_info "-> Destination folder is ${destination}"
cp -vR ${resources_path}/* ${destination}
...

And build image log for this command

INFO -> Destination folder is /home/kogito/serverless-workflow-project/src/main/resources/
'/home/kogito/serverless-workflow-project/resources/src/main/resources' -> '/home/kogito/serverless-workflow-project/src/main/resources/src/main/resources'
'/home/kogito/serverless-workflow-project/resources/src/main/resources/application.properties' -> '/home/kogito/serverless-workflow-project/src/main/resources/src/main/resources/application.properties'
'/home/kogito/serverless-workflow-project/resources/src/main/resources/create-pr-universal.sw.yaml' -> '/home/kogito/serverless-workflow-project/src/main/resources/src/main/resources/create-pr-universal.sw.yaml'

So build-app.sh provides duplicated workflow file. These workflows has a bit different path:

/home/kogito/serverless-workflow-project/src/main/resources/create-pr-universal.sw.yaml
/home/kogito/serverless-workflow-project/src/main/resources/src/main/resources/create-pr-universal.sw.yaml

Then build-app.sh makes maven build and fails with "Duplicated item found with id universal-pr":

Error:  Failed to execute goal com.redhat.quarkus.platform:quarkus-maven-plugin:3.15.4.redhat-00001:build (default) on project serverless-workflow-project: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
Error: [ERROR] 	[error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateSources threw an exception: org.kie.kogito.codegen.process.ProcessCodegenException: Duplicated item found with id universal-pr. Please review the .sw files

Copy link
Collaborator

Choose a reason for hiding this comment

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

nice catch!

Copy link
Collaborator

@elai-shalev elai-shalev left a comment

Choose a reason for hiding this comment

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

LGTM, workflow looks good and requested changes to shared documents fixed previous issues.

Comment on lines 43 to 44
ENV swf_home_dir=/home/kogito/serverless-workflow-project
RUN if [[ -d "./resources/src" ]]; then cp -r ./resources/src/* ./src/; fi

Copy link
Collaborator

Choose a reason for hiding this comment

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

nice catch!

@elai-shalev elai-shalev merged commit beb2cc3 into rhdhorchestrator:main Mar 22, 2026
5 of 7 checks passed
orchestrator-ci pushed a commit that referenced this pull request Mar 22, 2026
orchestrator-ci pushed a commit that referenced this pull request Mar 22, 2026
orchestrator-ci pushed a commit that referenced this pull request Mar 22, 2026
orchestrator-ci pushed a commit that referenced this pull request Mar 22, 2026
orchestrator-ci pushed a commit that referenced this pull request Mar 22, 2026
orchestrator-ci pushed a commit that referenced this pull request Mar 22, 2026
orchestrator-ci pushed a commit that referenced this pull request Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants