Open toco-cam opened 8 months ago
Note:
EE pipeline also have stages for postgresql
They are using PostgreSQL 14 right now which is still supported for versions <= 7.23. No urgent need to bump them to PostgreSQL 17 right now. I see it as a bonus.
Our CI is already capable of utilizing the declarative podspecs approach to do basic parameterisation of the docker images used (see respective feature)
The above already works and is capable of specifying the image for spinning one pod using one docker image.
The context of this feature is to extend the existing solution further to i) work with multiple containers per pod and ii) use the underlying new functionality to introduce Postgres 17
Why are combopods needed
In most stages, the jenkins files describe stages that execute specific testing logic (e.g spring boot tests, unit tests during assembly stage, e2e tests etc.).
This is done by invoking maven and and the respective profile as in the following screenshots:
Users are going to benefit from the latest supported version of Postgres, a database that has been supported for all the lifetime of the product so far.
Developers will be able to utilize the declarative podspecs to configure multiple containers (typically dbs) in a single pod. With the first iteration, only postgres 17 will be supported
As a user of the product i want to be able to use Postgres 17 with Camunda 7
As a developer, I want to be able to add Postgres 17 support to the CI using a podspec approach. Furthermore, the following criteria need to be met:
The Jenkinsfile should be frugally used due to max length limitation
The Scripts should be able to support podspecs with multiple containers per pod
The underlying scripts should support adding new containers in an easy and maintainable way
The new Postgres 17 version needs to be mentioned in
sections of the docs.
The following high level changes are needed :
Add multi-image support to Podspec Execution of Jenkins-shared-library
Code
Introduction
All stages (calculated, non-calculated) end up calling the cambpmConditionalRetry
script to execute a stage.
The script currently considers two modes with priority:
Podspec mode
AgentLabel mode
What needs to Change
Change cambpmConditionalRetry | podspec
mode to support two pod executions
Single-image pod execution
alpine
, maven
images)Multi-image pod execution
Change cambpmConditionalRetry | podspec
mode to consider agentLabels
Why: The calculated stages pass the db information in agentLabel as discriminator value for that stage
DB Unit | Postgres 17
(see screenshot)Algorithm
Incorporate the new Podspec Execution in the CI of camunda-bpm-platform
cambpmConditionalRetry
invocations in the Jenkinsfiles
(main, daily, sidetrack) work with the new changesmatrices.yml
stage-types.yml
to execute the Postgres 17 stages with multipod-executionIncorporate the new Podspec Execution in the CI of camunda-bpm-platform-ee
Update Documentation with Postgres 17
jenkins-shared-library
the isolation level of postgres and add an informative comment to check isolation level for new db entriesAdd Portainer support for Postgres 17
[x] cambpm-jenkins-shared-library
Add postgres 17 to available databases
See resources/cambpm/config/databases.yml
Enrich cambpmConditionalRetry function to support multipod parameterisation.
The function can support two hard-coded modes:
Node execution (maven, alpine)
Node + Db execution
Only Postgres 17 will be supported at the beginning. New dbs can be added in the future.
Add a comment targeting devs to inspect the isolation level when adding a new database
Add a comment to mention the isolation level of Postgres 17
javadoc
in the function that will handle the postgres podspec in cambpmConditionalRetry
[x] cam-bpm-platform
stage-types.yml
stage-types.yml
db-unit-postgresql-170
- Add podSpec with images config under db-unitlarge-data-tests-postgresql-170
- Add podSpec with images config under large-data-testsold-engine-postgresql-170
- Add podSpec with images config under old-engine
rolling-update-postgresql-170
- Add podSpec with images config under rolling-updatesql-scripts-postgresql-170
- Add podSpec with images config under sql-scripts[x] camunda-docs-manual & camunda-docs-static
[x] camunda-bpm-platform-ee
Jenkinsfiles
, matrices.yml
stage-types.yml
[ ] Testing
[x] CI
jenkins-shared-library
[ ] Manual
[ ] (Bonus) Docker Image
Update camunda-run
to support Postgres 17
in docker-camunda-bpm-platform
[ ] Backport the above changes to 7.22
[x] Code & Docs The changes required span across the following repositories:
camunda-bpm-platform
camunda-bpm-platform-ee
camunda-docs-manual
camunda-docs-static
[x] Testing
[x] CI
[x] Manual
Task Structure
The Backport can be implemented in one individual task. Once code & testing is done, the task can be forwarded to the QA to complete the testing.
[ ] (Bonus) Migrate stages that use postgres 14 to postgres 17:
Stages
Task
If there is time left for the bonus stages, a new task can be opened to incorporate them.
Status: The code, repositories and doc pull requests all pass through the respective CI tests.
Next Steps: Assigning the ticket for Review to @mboskamp. In the meantime, @psavidis will do the the manual testing.
Review Tips:
jenkins-shared-library
ideally shouldn't change unless there is a bug or it does not fulfill the feature requirements.
7.23
against Postgres 17
Tomcat 10
7.22
Backport against Postgres 17
camunda-run
✅ The minimum viable feature is merged to master
and 7.22.1-SNAPSHOT
respectively.
Note: The following optional tasks can be taken into consideration and are not mandatory for the completion of this ticket:
➡️ What's Next
Problem: After merging the code changes to jenkins-shared-library
and the successful 7.23
, 7.22
PR builds, there are builds failing on master
.
Failing Builds
7.23
7.22
When: Both builds failed at 2014-11-16
Observations:
instance-migration-postgresql-170
stagejenkins-job-runner-vrp0
jenkins-job-runner-nj4ll
15Gb
memorySide effect: The execution of instance-migration
stage with Postgres 17
is not executed with Podspec and the build freezes.
Root-cause: The legacy behaviour tries to execute the stage with an image searching in the infra-team images. The image is not found and the build waits for ever.
Solution: Execute instance-migration
with podspec.
PR:
The 7.22
backport still uses maven:3.8.5
in the stage-types.
PR to sync with latest maven:3.9.7
according to latest decision:
Acceptance Criteria (Required on creation)
Jenkinsfile
length as small as possible so that we don't exceed line limits by leveraging methods from the https://github.com/camunda/cambpm-jenkins-shared-librarydb-unit-postgresql-170
underUNIT DB tests
.large-data-tests-postgresql-160
withlarge-data-tests-postgresql-170
.old-engine-postgresql-160
withold-engine-postgresql-170
.rolling-update-postgresql-160
withrolling-update-postgresql-170
sql-scripts-postgresql-160
withsql-scripts-postgresql-170
webapp-plugins-unit-postgresql-170
underWebapp Plugins DB tests
.Hints
Links
Breakdown
Dev2QA handover
QA Testing
The feature needs testing for the two supported versions:
master
(7.23) and the7.22
backport.Two supported environments can be used for each supported version with a slight variance to achieve a pluralistic testing result.
Please find below the breakdown of the testing scenarios:
Scenarios
Master
Postgres 17
againstWildFly Application Server 33
Postgres 17
againstJBoss EAP 8
7.22 Backport
Postgres 17
againstWebLogic
Postgres 17
againstSpring Boot 3.3