You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "jainankitk (via GitHub)" <gi...@apache.org> on 2025/11/05 21:28:20 UTC

[PR] Failing workflow instead of comment on missing changelog entry [lucene]

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

   ### Description
   Fails workflow instead of comment on missing changelog entry to not have numerous comments in the PR.
   
   Fixes https://github.com/apache/lucene/issues/15405
   


-- 
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] Failing workflow instead of comment on missing changelog entry [lucene]

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


-- 
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] Failing workflow instead of comment on missing changelog entry [lucene]

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


##########
.github/workflows/verify-changelog-and-set-milestone.yml:
##########
@@ -57,8 +57,7 @@ jobs:
           echo "Diff:"
           if git diff --exit-code --name-only "$BASE_COMMIT" HEAD -- "$CHANGE_LOG_FILE"; then
             echo "Change log file:$CHANGE_LOG_FILE does not contains an entry corresponding to changes introduced in PR. Please add a changelog entry."
-            gh pr comment "$PR_NUMBER" --body "This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR."
-            exit 0
+            exit 1

Review Comment:
   Sorry, I am slightly confused. Wouldn't this warning message get logged into the github workflow log? We should still fail the workflow, so that the committer is reminded that PR is missing changelog entry. They can then chose to:
   * Ignore the failure and merge the PR
   * Add skip-changelog label, let the workflow succeed and merge the PR
   * Get changelog entry added before merging the PR



-- 
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] Failing workflow instead of comment on missing changelog entry [lucene]

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


##########
.github/workflows/verify-changelog-and-set-milestone.yml:
##########
@@ -57,8 +57,7 @@ jobs:
           echo "Diff:"
           if git diff --exit-code --name-only "$BASE_COMMIT" HEAD -- "$CHANGE_LOG_FILE"; then
             echo "Change log file:$CHANGE_LOG_FILE does not contains an entry corresponding to changes introduced in PR. Please add a changelog entry."
-            gh pr comment "$PR_NUMBER" --body "This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR."
-            exit 0
+            exit 1

Review Comment:
   Okay, I tried both the versions by raising couple of PRs on my fork:
   
   * On the version with warning, I could see it [only in the log](https://github.com/jainankitk/lucene/actions/runs/19247193779/job/55023958339?pr=3) without any indication on the PR itself - https://github.com/jainankitk/lucene/pull/3
   * The other version clearing failed the specific step which I feel is clearer IMO - https://github.com/jainankitk/lucene/pull/2
   
   Hence, my preference is still the latter. Although, we should log the message with error annotation before failing the workflow. Please let me know what you think about that.



-- 
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] Failing workflow instead of comment on missing changelog entry [lucene]

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


##########
.github/workflows/verify-changelog-and-set-milestone.yml:
##########
@@ -57,8 +57,7 @@ jobs:
           echo "Diff:"
           if git diff --exit-code --name-only "$BASE_COMMIT" HEAD -- "$CHANGE_LOG_FILE"; then
             echo "Change log file:$CHANGE_LOG_FILE does not contains an entry corresponding to changes introduced in PR. Please add a changelog entry."
-            gh pr comment "$PR_NUMBER" --body "This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR."
-            exit 0
+            exit 1

Review Comment:
   untested: it is just an idea vs failing the workflow.
   
   ```suggestion
               echo "::warning title=Missing Changelog::Please add a centry to CHANGES.txt or use skip-changelog label"
               exit 0
   ```
   
   https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-a-warning-message



-- 
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] Failing workflow instead of comment on missing changelog entry [lucene]

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


##########
.github/workflows/verify-changelog-and-set-milestone.yml:
##########
@@ -57,8 +57,7 @@ jobs:
           echo "Diff:"
           if git diff --exit-code --name-only "$BASE_COMMIT" HEAD -- "$CHANGE_LOG_FILE"; then
             echo "Change log file:$CHANGE_LOG_FILE does not contains an entry corresponding to changes introduced in PR. Please add a changelog entry."
-            gh pr comment "$PR_NUMBER" --body "This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR."
-            exit 0
+            exit 1

Review Comment:
   Just merge it. I wasn't trying to slow you down, just throw out ideas.



-- 
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] Failing workflow instead of comment on missing changelog entry [lucene]

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


##########
.github/workflows/verify-changelog-and-set-milestone.yml:
##########
@@ -57,8 +57,7 @@ jobs:
           echo "Diff:"
           if git diff --exit-code --name-only "$BASE_COMMIT" HEAD -- "$CHANGE_LOG_FILE"; then
             echo "Change log file:$CHANGE_LOG_FILE does not contains an entry corresponding to changes introduced in PR. Please add a changelog entry."
-            gh pr comment "$PR_NUMBER" --body "This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR."
-            exit 0
+            exit 1

Review Comment:
   You'll see the warning though?



-- 
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] Failing workflow instead of comment on missing changelog entry [lucene]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #15409:
URL: https://github.com/apache/lucene/pull/15409#issuecomment-3493577250

   This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.


-- 
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