You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "dweiss (via GitHub)" <gi...@apache.org> on 2024/06/05 19:09:17 UTC

[PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

dweiss opened a new pull request, #13456:
URL: https://github.com/apache/lucene/pull/13456

   This is mostly an automated sanity check that common (and less common) tasks work after an upgrade.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #13456:
URL: https://github.com/apache/lucene/pull/13456#issuecomment-2151961891

   I've added a matrix configuration so that one job runs with RUNTIME_JAVA_HOME and the other without it. Seems to be working and increases test coverage.
   
   ![image](https://github.com/apache/lucene/assets/199470/d73ef3c1-3d30-42e2-bceb-90709898d537)
   


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #13456:
URL: https://github.com/apache/lucene/pull/13456#issuecomment-2151966136

   I think this is ready and works reasonably well - it caught #13458 already.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #13456:
URL: https://github.com/apache/lucene/pull/13456#issuecomment-2151807298

   > I think that this is good. Would it run on all CI jobs, or you somehow opt-in?
   
   There is a filtering restriction - it'll run on PRs and pushes to these two branches and when the commit matches path specs. I think this restricts it reasonably well.
   ```
       branches:
         - 'main'
         - 'branch_9x'
       paths:
         - '.github/workflows/run-checks-gradle-upgrade.yml'
         - 'gradle/wrapper/**'
   ```
   
   > Running with RUNTIME_JAVA_HOME does have a slightly different code path in the gradle build files. Not sure if that could be easily covered.
   
   Yes, I think so. The run-nightly-smoketester.yml workflow uses this explicit variable to test against 22-ea.
   
   There are probably more tasks/ paths to cover. This is just a PoC and a start.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss closed pull request #13456: Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed
URL: https://github.com/apache/lucene/pull/13456


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "ChrisHegarty (via GitHub)" <gi...@apache.org>.
ChrisHegarty commented on PR #13456:
URL: https://github.com/apache/lucene/pull/13456#issuecomment-2151641099

   I think that this is good. Would it run on all CI jobs, or you somehow opt-in?   
   
   Running with `RUNTIME_JAVA_HOME` does have a slightly different code path in the gradle build files. Not sure if that could be easily covered.
   
   I just merged the gradle wrapper update to _main_ and _branch_9x_, so maybe sync up this PR branch to ensure that all is still good. :-) 


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

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


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #13456:
URL: https://github.com/apache/lucene/pull/13456#discussion_r1629249452


##########
.github/workflows/run-checks-gradle-upgrade.yml:
##########
@@ -0,0 +1,88 @@
+name: "Run checks: gradle upgrade"
+
+on:
+  workflow_dispatch:
+
+  pull_request:
+    branches:
+      - 'main'
+      - 'branch_9x'
+    paths:
+      - '.github/workflows/run-checks-gradle-upgrade.yml'
+      - 'gradle/wrapper/**'
+
+  push:
+    branches:
+      - 'main'
+      - 'branch_9x'
+    paths:
+      - '.github/workflows/run-checks-gradle-upgrade.yml'
+      - 'gradle/wrapper/**'
+
+env:
+  GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
+jobs:
+  gradleSanityCheck:
+    name: "Run tasks (java: ${{ matrix.java-version }}, alt-java: ${{ matrix.uses-alt-java }})"
+    timeout-minutes: 30
+
+    strategy:
+      matrix:
+        os: [ ubuntu-latest ]
+        java-version: [ '22' ]
+        uses-alt-java: [ true, false ]
+
+    runs-on: ${{ matrix.os }}
+
+    env:
+      ALT_JAVA_DIR: /tmp/alt-java
+
+    steps:
+      - uses: actions/checkout@v4
+      - uses: ./.github/actions/prepare-for-build
+        with:
+          java-version: ${{ matrix.java-version }}
+
+      - name: Set up RUNTIME_JAVA_HOME variable
+        if: ${{ matrix.uses-alt-java }}

Review Comment:
   If we're running with the "uses-alt-java" switch, we set up an "alternative" java distribution under /tmp and use it to execute the same set of gradle tasks.



##########
.github/workflows/run-checks-gradle-upgrade.yml:
##########
@@ -0,0 +1,88 @@
+name: "Run checks: gradle upgrade"
+
+on:
+  workflow_dispatch:
+
+  pull_request:
+    branches:
+      - 'main'
+      - 'branch_9x'
+    paths:
+      - '.github/workflows/run-checks-gradle-upgrade.yml'
+      - 'gradle/wrapper/**'
+
+  push:
+    branches:
+      - 'main'
+      - 'branch_9x'
+    paths:
+      - '.github/workflows/run-checks-gradle-upgrade.yml'
+      - 'gradle/wrapper/**'
+
+env:
+  GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
+jobs:
+  gradleSanityCheck:
+    name: "Run tasks (java: ${{ matrix.java-version }}, alt-java: ${{ matrix.uses-alt-java }})"
+    timeout-minutes: 30
+
+    strategy:
+      matrix:
+        os: [ ubuntu-latest ]
+        java-version: [ '22' ]
+        uses-alt-java: [ true, false ]

Review Comment:
   this is the configuration matrix switch that is used to control whether the build runs with a separate RUNTIME_JAVA_HOME or without it.



-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #13456:
URL: https://github.com/apache/lucene/pull/13456#issuecomment-2150773147

   This is a follow up to #13453 - perhaps it'll make life a bit easier.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Add a github workflow that checks common (and less common) gradle tasks when gradle version is changed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #13456:
URL: https://github.com/apache/lucene/pull/13456#issuecomment-2151924570

   Let me close this PR so that it doesn't rerun all the checks while I'm trying to figure it out locally.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org