You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "chesnokoff (via GitHub)" <gi...@apache.org> on 2026/06/19 15:20:43 UTC

[PR] IGNITE-28800 Add documentation code snippets compilation check [ignite]

chesnokoff opened a new pull request, #13257:
URL: https://github.com/apache/ignite/pull/13257

   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see tab `PR Check` at [TC.Bot - Instance 1](https://tcbot2.sbt-ignite-dev.ru/prs.html) or [TC.Bot - Instance 2](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28800 Add documentation code snippets compilation check [ignite]

Posted by "anton-vinogradov (via GitHub)" <gi...@apache.org>.
anton-vinogradov commented on PR #13257:
URL: https://github.com/apache/ignite/pull/13257#issuecomment-4844528770

   Follow-up to my review above — ready-to-apply patch for the three points. I tried to post these as inline one-click `suggestion` blocks, but all three touch lines that fall outside this PR's diff hunks (the kubernetes version, the `update-versions` Ant block, and the relocation target for the CI step), and GitHub only allows suggestions on changed lines. So here they are as a single patch you can `git apply` on the branch:
   
   ```diff
   diff --git a/.github/workflows/commit-check.yml b/.github/workflows/commit-check.yml
   index 72e7f12d466..7605f36a9ac 100644
   --- a/.github/workflows/commit-check.yml
   +++ b/.github/workflows/commit-check.yml
   @@ -99,10 +99,6 @@ jobs:
            run: |
              ./mvnw test-compile -Pall-java,licenses,lgpl,checkstyle,examples,check-licenses -B -V -T 1C
    
   -      - name: Documentation code snippets compilation check
   -        run: |
   -          ./mvnw -Pdocs -pl :code-snippets -am compile -B -V
   -
          - name: Run abandoned tests checks.
            # Reuse classes from the previous step; the differing profiles otherwise trigger a full reactor recompile.
            run : |
   @@ -112,6 +108,12 @@ jobs:
            run : |
              ./mvnw -DskipTests install -pl modules/tools,modules/codegen -B -V && ./mvnw initialize -Pjavadoc -B -V
    
   +      # Placed last: it recompiles the upstream modules under the `docs` profile and must not clobber the
   +      # class reuse relied on by the codestyle/abandoned-tests steps above.
   +      - name: Documentation code snippets compilation check
   +        run: |
   +          ./mvnw -Pdocs -pl :code-snippets -am compile -B -V
   +
      check-dotnet:
        name: Сheck .NET code
        runs-on: ubuntu-latest
   diff --git a/docs/_docs/code-snippets/java/pom.xml b/docs/_docs/code-snippets/java/pom.xml
   index 8d29c53c652..94239e27310 100644
   --- a/docs/_docs/code-snippets/java/pom.xml
   +++ b/docs/_docs/code-snippets/java/pom.xml
   @@ -42,6 +42,7 @@
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
   +            <!-- ignite-jcl is not part of ignite-bom, so the version must be specified explicitly. -->
                <artifactId>ignite-jcl</artifactId>
                <version>${ignite.version}</version>
            </dependency>
   @@ -89,7 +90,6 @@
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>ignite-kubernetes</artifactId>
   -            <version>${ignite.version}</version>
            </dependency>
   diff --git a/pom.xml b/pom.xml
   index da005ab74d9..ea2d5a66e04 100644
   --- a/pom.xml
   +++ b/pom.xml
   @@ -513,14 +513,6 @@
                                        <target>
                                            <echo message="Update ignite.version in docs" />
    
   -                                        <replaceregexp byline="true" encoding="UTF-8">
   -                                            <regexp pattern="(&lt;ignite\.version&gt;).+(&lt;/ignite\.version&gt;)" />
   -                                            <substitution expression="\1${project.version}\2" />
   -                                            <fileset dir="${project.basedir}/docs/">
   -                                                <include name="_docs/code-snippets/java/pom.xml" />
   -                                            </fileset>
   -                                        </replaceregexp>
   -
                                            <replaceregexp byline="true" encoding="UTF-8">
                                                <regexp pattern="(version: ).+" />
                                                <substitution expression="\1${project.version}" />
   ```
   
   Summary:
   1. **pom.xml** — drop the now-dead `update-versions` Ant rewrite of `<ignite.version>` in the code-snippets pom (the property no longer exists; the version comes from the parent's `${revision}`).
   2. **code-snippets/java/pom.xml** — remove the redundant `ignite-kubernetes` version (managed by `ignite-bom`); add a note on `ignite-jcl` explaining why its explicit version stays (not in the BOM).
   3. **commit-check.yml** — move the snippets compile step to the end of the job so its `docs`-profile recompile of upstream modules doesn't clobber the class reuse the surrounding steps rely on.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28800 Add documentation code snippets compilation check [ignite]

Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on PR #13257:
URL: https://github.com/apache/ignite/pull/13257#issuecomment-4894156661

   - Moved doc snippets compliation check after the javadocs step
   - Removed obsolete update-versions rewrite for the code-snippets pom
   - Removed redundant version for ignite-kubernetes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28800 Add documentation code snippets compilation check [ignite]

Posted by "shishkovilja (via GitHub)" <gi...@apache.org>.
shishkovilja commented on code in PR #13257:
URL: https://github.com/apache/ignite/pull/13257#discussion_r3587549296


##########
.github/workflows/commit-check.yml:
##########
@@ -108,6 +108,10 @@ jobs:
         run : |
           ./mvnw -DskipTests install -pl modules/tools,modules/codegen -B -V && ./mvnw initialize -Pjavadoc -B -V
 
+      - name: Documentation code snippets compilation check
+        run: |
+          ./mvnw -Pdocs -pl :code-snippets -am compile -B -V

Review Comment:
   ```suggestion
             ./mvnw compile -Pdocs -pl :code-snippets -am -B -V
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28800 Add documentation code snippets compilation check [ignite]

Posted by "anton-vinogradov (via GitHub)" <gi...@apache.org>.
anton-vinogradov commented on code in PR #13257:
URL: https://github.com/apache/ignite/pull/13257#discussion_r3499398258


##########
.github/workflows/commit-check.yml:
##########
@@ -99,6 +99,10 @@ jobs:
         run: |
           ./mvnw test-compile -Pall-java,licenses,lgpl,checkstyle,examples,check-licenses -B -V -T 1C
 
+      - name: Documentation code snippets compilation check
+        run: |
+          ./mvnw -Pdocs -pl :code-snippets -am compile -B -V

Review Comment:
   Two things worth reconsidering here:
   
   1. **Redundant full recompile.** `-am compile` rebuilds the entire upstream dependency chain (`ignite-core` plus all transitive modules) from scratch, because the profile set here (`-Pdocs`) differs from the previous `test-compile -Pall-java,…` step, so none of the just-compiled classes are reused. That is a second full reactor build of those modules.
   
   2. **Placement vs. class reuse.** This step is inserted between the codestyle step and the "Run abandoned tests checks" step, and it overwrites the upstream modules' `target/classes` under a *different* profile than the abandoned-tests step expects (note the existing comment on that step about reusing classes / avoiding a full reactor recompile).
   
   Suggestion: move this step to the very end of the job (after the javadoc check) so it doesn't perturb the reuse between the surrounding steps, or fold the `docs` profile + module into the existing `test-compile` reactor invocation to avoid the second recompile entirely.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28800 Add documentation code snippets compilation check [ignite]

Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on PR #13257:
URL: https://github.com/apache/ignite/pull/13257#issuecomment-4840776357

   [INFO] ignite-checkstyle .................................. SUCCESS [  0.911 s]
   [INFO] ignite-parent ...................................... SUCCESS [  0.187 s]
   [INFO] ignite-tools ....................................... SUCCESS [  0.391 s]
   [INFO] ignite-parent-internal ............................. SUCCESS [  0.014 s]
   [INFO] ignite-commons ..................................... SUCCESS [  1.101 s]
   [INFO] ignite-binary-api .................................. SUCCESS [  0.288 s]
   [INFO] ignite-grid-unsafe ................................. SUCCESS [  0.096 s]
   [INFO] ignite-binary-impl ................................. SUCCESS [  0.307 s]
   [INFO] ignite-thin-client-api ............................. SUCCESS [  0.092 s]
   [INFO] ignite-codegen ..................................... SUCCESS [  0.130 s]
   [INFO] ignite-core ........................................ SUCCESS [ 12.926 s]
   [INFO] ignite-indexing .................................... SUCCESS [  2.106 s]
   [INFO] ignite-compress .................................... SUCCESS [  0.256 s]
   [INFO] ignite-urideploy ................................... SUCCESS [  0.141 s]
   [INFO] ignite-log4j2 ...................................... SUCCESS [  0.104 s]
   [INFO] ignite-spring ...................................... SUCCESS [  0.112 s]
   [INFO] ignite-json ........................................ SUCCESS [  0.121 s]
   [INFO] ignite-rest-http ................................... SUCCESS [  0.223 s]
   [INFO] ignite-clients ..................................... SUCCESS [  0.040 s]
   [INFO] ignite-zookeeper ................................... SUCCESS [  0.509 s]
   [INFO] ignite-slf4j ....................................... SUCCESS [  0.078 s]
   [INFO] ignite-jcl ......................................... SUCCESS [  0.029 s]
   [INFO] ignite-kubernetes .................................. SUCCESS [  0.308 s]
   [INFO] ignite-opencensus .................................. SUCCESS [  0.084 s]
   [INFO] code-snippets ...................................... SUCCESS [  2.204 s]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28800 Add documentation code snippets compilation check [ignite]

Posted by "shishkovilja (via GitHub)" <gi...@apache.org>.
shishkovilja merged PR #13257:
URL: https://github.com/apache/ignite/pull/13257


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org