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

ci: build Tasklist and Operate frontends in distribution module #18279

Closed
wants to merge 198 commits into from

Conversation

houssain-barouni
Copy link
Collaborator

@houssain-barouni houssain-barouni commented May 6, 2024

Description

This is to fix the issues found when running release:perform with concurrency, yarn install could not be run at the same time for Operate and Tasklist, thus we had to disable the concurrency for the releasing (which make it taking ~6 minutes longer)

In this pull request, frontend-maven-plugin executions are run by dist module to ensure that they are not run in parallel, it also allows that install-node-and-yarn goal is excuted only once.
A new profile buildDistFrontend was created to be used for mvn release:perform along with skipFrontendBuild that skips the same plugin executions in client submodules in Tasklist and Operate
The plugin is kept though in client modules, to allow developers to start the applications using webapp only (without building and running the single JAR)

Dry-run for this branch https://github.com/camunda/zeebe/actions/runs/8971123064

Related issues

closes #

@github-actions github-actions bot added the component/zeebe Related to the Zeebe component/team label May 6, 2024
@@ -20,7 +20,7 @@ jobs:
- version: 0.8.2-alpha1
latest: false
with:
releaseBranch: main
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

needed to test with dry-run, I will revert it

Copy link
Member

Choose a reason for hiding this comment

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

You could also use the other workflow https://github.com/camunda/zeebe/actions/workflows/camunda-platform-release-manual.yml and mark it as dryrun :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

indeed

@houssain-barouni houssain-barouni marked this pull request as ready for review May 6, 2024 15:56
@houssain-barouni houssain-barouni added component/operate Related to the Operate component/team component/tasklist Related to the Tasklist component/team labels May 7, 2024
@@ -181,7 +181,7 @@ jobs:
-DlocalCheckout=${{ inputs.dryRun }} \
-DskipQaBuild=true \
-P-autoFormat \
-Darguments='-P-autoFormat -DskipQaBuild=true -DskipChecks=true -DskipTests=true -Dskip.fe.build=false -Dspotless.apply.skip=false -Dskip.central.release=${SKIP_REPO_DEPLOY} -Dskip.camunda.release=${SKIP_REPO_DEPLOY} -Dzbctl.force -Dzbctl.rootDir=${ZBCTL_ROOT_DIR} -Dgpg.passphrase="${{ steps.secrets.outputs.MAVEN_CENTRAL_GPG_SIGNING_KEY_PASSPHRASE }}"'
-Darguments='-T0.5C -P buildDistFrontend,skipFrontendBuild,-autoFormat -DskipQaBuild=true -DskipChecks=true -DskipTests=true -Dspotless.apply.skip=false -Dskip.central.release=${SKIP_REPO_DEPLOY} -Dskip.camunda.release=${SKIP_REPO_DEPLOY} -Dzbctl.force -Dzbctl.rootDir=${ZBCTL_ROOT_DIR} -Dgpg.passphrase="${{ steps.secrets.outputs.MAVEN_CENTRAL_GPG_SIGNING_KEY_PASSPHRASE }}"'
Copy link
Member

Choose a reason for hiding this comment

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

❌ That is a bit confusing :/

Could we either rename the profiles skipFrontendBuild or add a comment here why we doing this. See above I tried to document a bit the used parameter, might be useful also to explain why we have to use the two settings.

@houssain-barouni houssain-barouni marked this pull request as draft May 7, 2024 19:11
houssain-barouni and others added 18 commits May 14, 2024 09:07
SetVariable endpoint is making changes on the state of the process instance.
Therefore, it is not idempotent. If we retry setting variables in different
stages of process instance, it might provide different behaviour. Because of
that we shouldn't retry SetVariables on timeouts (DEADLINE_EXCEEDED) where
the processing of the engine can continue, so the process instance state changes.
For UNAVAILABLE and RESOURCE_EXHAUSTED, the broker will not accept further commands,
so that when we retry the SetVariables command, the process instance state will
stay the same.
Modifies the Atomix utility `Version` to use the more complete
`SemanticVersion` utility from Zeebe. This fully complies with the
semantic version spec, and is much more lenient about adding
build-metadata and so on.

At the same time, we preserve the check on start up that the version is
parse-able at all, to avoid issues where we would run with un-parseable
versions and potentially use a snapshot which could cause
inconsistencies.
Separating the release version and release branch and expecting as input, allows
to create release candidates, as this is normally done from an release branch
that has not the same name as the release version.

For example: branch = 'release-8.6.0-alpha1' and version = 'release-8.6.0-alpha1-rc1'
korthout and others added 25 commits May 14, 2024 09:07
Readers are more likely to look for this behavior class in the
distribution package than in the common package. I noticed that it
wasn't there when I was looking for it myself. I think it makes sense to
keep the functionality close together, so I've placed it next to the
CommandRedistributor and the CommandDistributionAcknowledgeProcessor.
I want to refactor the CommandDistributionBehavior. So, I started to add
some additional JavaDoc to the class/methods to explain what it does and
how it works.

This pushed me to re-read our docs entry for generalized_distribution.
While reading, I saw some opportunities to improve the text:
- clarified why we need generalized_distribution
- clarified that CommandDistribution records only exist on the
  distributing partition
- added a tip to use DistributedTypedRecordProcessor

Then I came back to the JavaDoc of the CommandDistributionBehavior:
- linked to the generalized_distribution docs
- clarified that the distributeCommand method distributes to all other
  partitions.
- clarified what the distributionKey is used for as this key is very
  important to the feature. It must encode the distributing partition,
  and must be unique.
Distributed commands are always acknowledged using the distributionKey,
which is always the command key. We can simply inline this parameter as
there is no option to provide a different key.
It makes sense that the distribution key encodes the partition id. So,
it's better if we use this local variable name because it just makes
things more clear.
Simple local variable extraction to reduce duplication
The value of command.getValueType is equivalent to the local variable
valueType.
The intent from the distribution record is equivalent to the intent of
the command.

This change allows to no longer need the command in the
distributeToPartition parameters.
I've added a comment explaining that this is necessary, but that we
don't fully grasp why.

I've also moved it closer to the usage
Records are expensive to construct. So, if we can re-use them we should
Adds a new public method to distribute a command to a subset of
partitions, rather than to all other partitions.
Adds unit tests for the distributeCommand methods of the
CommandDistributionBehavior class.

I've explicitly chosen not to test this by adding special deployment
tests, because I don't think that makes sense. This behavior can be used
for different commands, not just deployment records.

Instead of spinning up a test engine, this is a must more focused test
that verifies that records are added to the processing result builder
and that there are interactions with the InterPartitionCommandSender.

To support this, I've introduced a new FakeProcessingResultBuilder that
can be used in such tests.
It was pointed out in a review, that this documentation was not clear
about how the communication is unreliable. This is essential to
understand the need for command distribution as a way to add reliable
communication between the partitions.
It was pointed out that the second sentence about the different purposes
of the distribution key was hard to read.

Co-authored-by: berkaycanbc <berkay.can@camunda.com>
Records are expensive to construct. So, if we can re-use them we should
While not impacting the behavior right now, resetting records may help
avoid unforseen bugs when we make changes later.
@github-actions github-actions bot added the component/identity Related to the Identity component/team label May 14, 2024
@houssain-barouni
Copy link
Collaborator Author

handled in #18483

@houssain-barouni houssain-barouni deleted the build-fe-dist branch May 14, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/identity Related to the Identity component/team component/operate Related to the Operate component/team component/tasklist Related to the Tasklist component/team component/zeebe Related to the Zeebe component/team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet