Skip to content

Conversation

@findepi
Copy link
Member

@findepi findepi commented Oct 23, 2025

Before the change, we had two workflows: ci and docs.

  • for code changes we run ci
  • for docs changes we run docs
  • for code and docs changes we run both, but the docs PR was configured
    to do nothing

ci has build-success status marker and it's required job for a PR to
be merged.

We could add similar job to docs workflow.

  • it can also be called build-success. This would work for docs-only
    PRs, but not for code & docs PRs.
  • it can be called docs-build-success and also become required, but
    that doesn't solve original problem at all.

Solving this requires that

  • the workflows to be truly mutually exclusive (for now they are
    logically mutually exclusive but not really) OR
  • there is only one workflow, with docs workflow merging into ci
    workflow.

This change implements the latter option, as it's conceptually simpler
and so should be better from long term maintainability perspective.

  • The docs workflow is removed.
  • The ci workflow is run on all PRs.
  • The docs-checks is already covered by maven-checks job in ci
    workflow.

The removed docs workflow had one more job: test-docs. This was
supposed to run Java tests that check docs changes. This is currently
lost. However, it wasn't working reliably anyway. It would run on
docs-only changes, but would not run on PRs mixing docs changes with any
other code changes, unless those changes would trigger these tests to
run (#27076). This is left to be fixed later.

Summary by Sourcery

Merge the separate docs GitHub workflow into the main CI workflow by introducing path-based filtering, reintroducing a final build-success job, and removing docs.yml.

Enhancements:

  • Update build-matrix-from-impacted.py to run all modules when the impacted list is empty

Build:

  • Update docs/pom.xml to run code generation in the generate-sources phase instead of validate
  • Modify cleanup.yml to cancel only the ci.yml workflow

CI:

  • Merge docs.yml into ci.yml and remove the standalone docs workflow
  • Introduce a path-filters job to classify docs vs non-docs changes and conditionally skip CI jobs for docs-only PRs
  • Reinstate the build-success job as the final aggregator of all CI job results

Tests:

  • Refactor TestCiWorkflow to use a BUILD_SUCCESS constant and add a test ensuring the build-success job is last in ci.yml

@cla-bot cla-bot bot added the cla-signed label Oct 23, 2025
@findepi findepi marked this pull request as draft October 23, 2025 10:07
@sourcery-ai

This comment was marked as outdated.

sourcery-ai[bot]

This comment was marked as resolved.

@github-actions github-actions bot added the docs label Oct 23, 2025
@findepi findepi force-pushed the findepi/docs-checks branch 2 times, most recently from f53b204 to 223d18b Compare October 23, 2025 13:52
@findepi findepi marked this pull request as ready for review October 23, 2025 15:07
sourcery-ai[bot]

This comment was marked as resolved.

@findepi findepi force-pushed the findepi/docs-checks branch 2 times, most recently from 2edda65 to 9f43511 Compare October 23, 2025 15:15
@findepi
Copy link
Member Author

findepi commented Oct 23, 2025

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

Will build the docs module if the dependent Java module changes? Specifically, if you add another reserved word for the parser, does the ReservedIdentifiers check still run?

@findepi
Copy link
Member Author

findepi commented Oct 24, 2025

Will build the docs module if the dependent Java module changes? Specifically, if you add another reserved word for the parser, does the ReservedIdentifiers check still run?

Yes

Before and after the changes, this is covered by ci workflow, the maven-checks job.
The docs workflow (the one being removed here) does nothing for a PR that has any non-docs changes.

@findepi
Copy link
Member Author

findepi commented Oct 24, 2025

Because it's the last one to run.
`mvn validate` does not trigger dependency build. It should not run any
tasks that require dependencies to exist.
This avoids producing empty `gib-impacted.log` file for docs-only
changes. The empty `gib-impacted.log` is also produced on `master` when
GIB does not run, and is treated as indicative of "run everything".
Before the change, we had two workflows: `ci` and `docs`.

- for code changes we run `ci`
- for docs changes we run `docs`
- for code and docs changes we run both, but the docs PR was configured
  to do nothing

`ci` has `build-success` status marker and it's required job for a PR to
be merged.

We could add similar job to `docs` workflow.

- it can also be called `build-success`. This would work for docs-only
  PRs, but not for code & docs PRs.
- it can be called `docs-build-success` and also become required, but
  that doesn't solve original problem at all.

Solving this requires that

- the workflows to be truly mutually exclusive (for now they are
  logically mutually exclusive but not really) OR
- there is only one workflow, with `docs` workflow merging into `ci`
  workflow.

This change implements the latter option, as it's conceptually simpler
and so should be better from long term maintainability perspective.

- The `docs` workflow is removed.
- The `ci` workflow is run on all PRs.
- The `docs-checks` is already covered by `maven-checks` job in `ci`
  workflow.

The removed `docs` workflow had one more job: `test-docs`. This was
supposed to run Java tests that check docs changes. This is currently
lost. However, it wasn't working reliably anyway. It would run on
docs-only changes, but would not run on PRs mixing docs changes with any
other code changes, unless those changes would trigger these tests to
run. This is left to be fixed later.
@findepi findepi force-pushed the findepi/docs-checks branch from 212e26e to a0d9b10 Compare October 24, 2025 07:50
@findepi findepi merged commit 3698755 into master Oct 24, 2025
111 checks passed
@findepi findepi deleted the findepi/docs-checks branch October 24, 2025 11:15
@github-actions github-actions bot added this to the 478 milestone Oct 24, 2025
@findepi findepi restored the findepi/docs-checks branch October 24, 2025 11:17
@findepi findepi deleted the findepi/docs-checks branch October 24, 2025 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Docs-only or README-changing PRs cannot be merged

3 participants