From zsong at openjdk.org Mon Mar 3 17:54:49 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Mar 2025 17:54:49 GMT Subject: RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api Message-ID: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> A user reported that one backport issue was not automatically resolved by the Skara bot. From the logs, Erik found that the bot didn't actually send the request to transition the bug to resolved and he noticed that around that time, the bot was renewing the access token for jbs. When updating the state of an issue, the Skara bot first attempts to fetch the available transitions for that issue by calling this API: https://bugs.openjdk.org/rest/api/2/issue/issue_id/transitions. I called the API without authentication, I was expecting a 401 Unauthorized response. However, I received an empty response: `{"expand":"transitions","transitions":[]}.` Due to this empty response, the Skara bot did not attempt to transition the bug to any state. In my opinion, availableTransitions would be empty only when requesting the API without authentication, so skara bot would throw an exception in this case. ------------- Commit messages: - SKARA-2451 Changes: https://git.openjdk.org/skara/pull/1706/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1706&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2451 Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1706.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1706/head:pull/1706 PR: https://git.openjdk.org/skara/pull/1706 From zsong at openjdk.org Mon Mar 3 17:59:11 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Mar 2025 17:59:11 GMT Subject: RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api In-Reply-To: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> References: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> Message-ID: On Mon, 3 Mar 2025 17:50:10 GMT, Zhao Song wrote: > A user reported that one backport issue was not automatically resolved by the Skara bot. From the logs, Erik found that the bot didn't actually send the request to transition the bug to resolved and he noticed that around that time, the bot was renewing the access token for jbs. > > When updating the state of an issue, the Skara bot first attempts to fetch the available transitions for that issue by calling this API: > https://bugs.openjdk.org/rest/api/2/issue/issue_id/transitions. > > I called the API without authentication, I was expecting a 401 Unauthorized response. However, I received an empty response: > `{"expand":"transitions","transitions":[]}.` > > Due to this empty response, the Skara bot did not attempt to transition the bug to any state. > > In my opinion, availableTransitions would be empty only when requesting the API without authentication, so skara bot would throw an exception in this case. issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 268: > 266: } else { > 267: // The issue is most likely closed - skip transitioning > 268: log.warning("Can't transition the issue to Resolved or Open"); @erikj79 You suggested that > The else clause should at the very least log something so we know that is what happened. we should also verify that the state is either closed or resolved and throw RuntimeException if not. I thought about it, then I realized that the Skara bot should have already verified the state before calling Issue.setState(Issue.State.RESOLVED) like [this](https://github.com/openjdk/skara/blob/b8a99e211aae1cec3ae5b6477e9c0c91c0761284/bots/notify/src/main/java/org/openjdk/skara/bots/notify/issue/IssueNotifier.java#L211). Also, it's will be a little hard to verify the Issue state since we need to change the interface of Issue.setState. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1706#discussion_r1977941676 From zsong at openjdk.org Mon Mar 3 18:56:35 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Mar 2025 18:56:35 GMT Subject: RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api [v2] In-Reply-To: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> References: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> Message-ID: > A user reported that one backport issue was not automatically resolved by the Skara bot. From the logs, Erik found that the bot didn't actually send the request to transition the bug to resolved and he noticed that around that time, the bot was renewing the access token for jbs. > > When updating the state of an issue, the Skara bot first attempts to fetch the available transitions for that issue by calling this API: > https://bugs.openjdk.org/rest/api/2/issue/issue_id/transitions. > > I called the API without authentication, I was expecting a 401 Unauthorized response. However, I received an empty response: > `{"expand":"transitions","transitions":[]}.` > > Due to this empty response, the Skara bot did not attempt to transition the bug to any state. > > In my opinion, availableTransitions would be empty only when requesting the API without authentication, so skara bot would throw an exception in this case. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: Update issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1706/files - new: https://git.openjdk.org/skara/pull/1706/files/51fbf716..4a6b183a Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1706&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1706&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1706.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1706/head:pull/1706 PR: https://git.openjdk.org/skara/pull/1706 From erikj at openjdk.org Mon Mar 3 18:56:36 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 3 Mar 2025 18:56:36 GMT Subject: RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api [v2] In-Reply-To: References: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> Message-ID: On Mon, 3 Mar 2025 18:54:10 GMT, Zhao Song wrote: >> A user reported that one backport issue was not automatically resolved by the Skara bot. From the logs, Erik found that the bot didn't actually send the request to transition the bug to resolved and he noticed that around that time, the bot was renewing the access token for jbs. >> >> When updating the state of an issue, the Skara bot first attempts to fetch the available transitions for that issue by calling this API: >> https://bugs.openjdk.org/rest/api/2/issue/issue_id/transitions. >> >> I called the API without authentication, I was expecting a 401 Unauthorized response. However, I received an empty response: >> `{"expand":"transitions","transitions":[]}.` >> >> Due to this empty response, the Skara bot did not attempt to transition the bug to any state. >> >> In my opinion, availableTransitions would be empty only when requesting the API without authentication, so skara bot would throw an exception in this case. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > Update issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 254: > 252: > 253: if (availableTransitions.isEmpty()) { > 254: throw new RuntimeException("Available transition states are empty"); Suggestion: throw new RuntimeException("Available transition states is empty"); ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1706#discussion_r1978015262 From erikj at openjdk.org Mon Mar 3 18:56:36 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 3 Mar 2025 18:56:36 GMT Subject: RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api [v2] In-Reply-To: References: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> Message-ID: On Mon, 3 Mar 2025 17:56:58 GMT, Zhao Song wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> Update issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java >> >> Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> > > issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 268: > >> 266: } else { >> 267: // The issue is most likely closed - skip transitioning >> 268: log.warning("Can't transition the issue to Resolved or Open"); > > @erikj79 You suggested that > >> The else clause should at the very least log something so we know that is what happened. we should also verify that the state is either closed or resolved and throw RuntimeException if not. > > I thought about it, then I realized that the Skara bot should have already verified the state before calling Issue.setState(Issue.State.RESOLVED) like [this](https://github.com/openjdk/skara/blob/b8a99e211aae1cec3ae5b6477e9c0c91c0761284/bots/notify/src/main/java/org/openjdk/skara/bots/notify/issue/IssueNotifier.java#L211). > > Also, it's will be a little hard to verify the Issue state since we need to change the interface of Issue.setState. I think logging is good enough for now. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1706#discussion_r1978020087 From erikj at openjdk.org Mon Mar 3 20:53:11 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 3 Mar 2025 20:53:11 GMT Subject: RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api [v2] In-Reply-To: References: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> Message-ID: On Mon, 3 Mar 2025 18:56:35 GMT, Zhao Song wrote: >> A user reported that one backport issue was not automatically resolved by the Skara bot. From the logs, Erik found that the bot didn't actually send the request to transition the bug to resolved and he noticed that around that time, the bot was renewing the access token for jbs. >> >> When updating the state of an issue, the Skara bot first attempts to fetch the available transitions for that issue by calling this API: >> https://bugs.openjdk.org/rest/api/2/issue/issue_id/transitions. >> >> I called the API without authentication, I was expecting a 401 Unauthorized response. However, I received an empty response: >> `{"expand":"transitions","transitions":[]}.` >> >> Due to this empty response, the Skara bot did not attempt to transition the bug to any state. >> >> In my opinion, availableTransitions would be empty only when requesting the API without authentication, so skara bot would throw an exception in this case. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > Update issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1706#pullrequestreview-2655259401 From zsong at openjdk.org Mon Mar 3 20:56:07 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Mar 2025 20:56:07 GMT Subject: RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api [v2] In-Reply-To: References: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> Message-ID: On Mon, 3 Mar 2025 18:56:35 GMT, Zhao Song wrote: >> A user reported that one backport issue was not automatically resolved by the Skara bot. From the logs, Erik found that the bot didn't actually send the request to transition the bug to resolved and he noticed that around that time, the bot was renewing the access token for jbs. >> >> When updating the state of an issue, the Skara bot first attempts to fetch the available transitions for that issue by calling this API: >> https://bugs.openjdk.org/rest/api/2/issue/issue_id/transitions. >> >> I called the API without authentication, I was expecting a 401 Unauthorized response. However, I received an empty response: >> `{"expand":"transitions","transitions":[]}.` >> >> Due to this empty response, the Skara bot did not attempt to transition the bug to any state. >> >> In my opinion, availableTransitions would be empty only when requesting the API without authentication, so skara bot would throw an exception in this case. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > Update issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> Thank you for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1706#issuecomment-2695511501 From zsong at openjdk.org Mon Mar 3 20:56:07 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Mar 2025 20:56:07 GMT Subject: Integrated: 2451: Skara bot fails to transition bug to Resolved due to empty response from api In-Reply-To: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> References: <1rJY92MUpfSO9gdgfi8orTfdf3MtIfhIp740jj3KKfw=.8ce4228d-69c4-4f9f-bc38-eb4557e38fe7@github.com> Message-ID: On Mon, 3 Mar 2025 17:50:10 GMT, Zhao Song wrote: > A user reported that one backport issue was not automatically resolved by the Skara bot. From the logs, Erik found that the bot didn't actually send the request to transition the bug to resolved and he noticed that around that time, the bot was renewing the access token for jbs. > > When updating the state of an issue, the Skara bot first attempts to fetch the available transitions for that issue by calling this API: > https://bugs.openjdk.org/rest/api/2/issue/issue_id/transitions. > > I called the API without authentication, I was expecting a 401 Unauthorized response. However, I received an empty response: > `{"expand":"transitions","transitions":[]}.` > > Due to this empty response, the Skara bot did not attempt to transition the bug to any state. > > In my opinion, availableTransitions would be empty only when requesting the API without authentication, so skara bot would throw an exception in this case. This pull request has now been integrated. Changeset: 7d8b2229 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/7d8b22290f8bbb24c84b34ba2c670e1ddc051c4e Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod 2451: Skara bot fails to transition bug to Resolved due to empty response from api Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1706 From erikj at openjdk.org Mon Mar 3 23:30:24 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 3 Mar 2025 23:30:24 GMT Subject: RFR: 2452: Client CLI build fails on Windows Message-ID: Building the default target "local" fails on Windows with the error message below. I think this started happening when we upgraded the Gradle version last. This is the target that the automatic CLI build/installation runs. * What went wrong: Execution failed for task ':local'. > Cannot access a file in the destination directory. Copying to a directory which contains unreadable content is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.5/userguide/incremental_build.html#disable-state-tracking in the Gradle documentation. > Failed to create MD5 hash for file content. I'm working around/fixing it by moving the output dir of the `local` task to its own subdir in the project build dir. I'm also adding the target `local` explicitly to the GHA tasks so that this kind of problem gets caught there. I intentionally did this in a separate commit to demonstrate that it would fail for this branch/PR. ------------- Commit messages: - Empty - Unpack cli into subdir of build - Add 'local' build target to GHA Changes: https://git.openjdk.org/skara/pull/1707/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1707&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2452 Stats: 7 lines in 3 files changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.org/skara/pull/1707.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1707/head:pull/1707 PR: https://git.openjdk.org/skara/pull/1707 From ihse at openjdk.org Tue Mar 4 10:26:27 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 4 Mar 2025 10:26:27 GMT Subject: RFR: 2452: Client CLI build fails on Windows In-Reply-To: References: Message-ID: On Mon, 3 Mar 2025 23:27:00 GMT, Erik Joelsson wrote: > Building the default target "local" fails on Windows with the error message below. I think this started happening when we upgraded the Gradle version last. This is the target that the automatic CLI build/installation runs. > > > * What went wrong: > Execution failed for task ':local'. >> Cannot access a file in the destination directory. Copying to a directory which contains unreadable content is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.5/userguide/incremental_build.html#disable-state-tracking in the Gradle documentation. > > Failed to create MD5 hash for file content. > > > I'm working around/fixing it by moving the output dir of the `local` task to its own subdir in the project build dir. I'm also adding the target `local` explicitly to the GHA tasks so that this kind of problem gets caught there. I intentionally did this in a separate commit to demonstrate that it would fail for this branch/PR. LGTM ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/skara/pull/1707#pullrequestreview-2656831758 From erikj at openjdk.org Tue Mar 4 13:59:46 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Mar 2025 13:59:46 GMT Subject: Integrated: 2452: Client CLI build fails on Windows In-Reply-To: References: Message-ID: On Mon, 3 Mar 2025 23:27:00 GMT, Erik Joelsson wrote: > Building the default target "local" fails on Windows with the error message below. I think this started happening when we upgraded the Gradle version last. This is the target that the automatic CLI build/installation runs. > > > * What went wrong: > Execution failed for task ':local'. >> Cannot access a file in the destination directory. Copying to a directory which contains unreadable content is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.5/userguide/incremental_build.html#disable-state-tracking in the Gradle documentation. > > Failed to create MD5 hash for file content. > > > I'm working around/fixing it by moving the output dir of the `local` task to its own subdir in the project build dir. I'm also adding the target `local` explicitly to the GHA tasks so that this kind of problem gets caught there. I intentionally did this in a separate commit to demonstrate that it would fail for this branch/PR. This pull request has now been integrated. Changeset: 64188c3d Author: Erik Joelsson URL: https://git.openjdk.org/skara/commit/64188c3d97a8ca1f2b9b47ac9af2a3adc0cd8780 Stats: 7 lines in 3 files changed: 0 ins; 0 del; 7 mod 2452: Client CLI build fails on Windows Reviewed-by: ihse ------------- PR: https://git.openjdk.org/skara/pull/1707 From zsong at openjdk.org Fri Mar 7 22:36:50 2025 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Mar 2025 22:36:50 GMT Subject: RFR: 2454: Skara mistakenly marked a non-clean backport as clean Message-ID: A user reported that Skara bot mistakenly marked a non-clean backport as clean. After investigation, I found that the PR was too large for the remote host to return the entire diff. The PR contained 8082 changed files, but when Skara bot requested the diff, only 3000 files were returned. Therefore, Skara bot was unable to compare some patches, so mistakenly mark the pr as clean. In this patch, Skara bot will now check if the PR is too large to evaluate. If it is, Skara bot will not evaluate if this PR is clean and will add a warning comment to the PR instead. ------------- Commit messages: - update - update copyright - SKARA-2454 Changes: https://git.openjdk.org/skara/pull/1708/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1708&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2454 Stats: 98 lines in 8 files changed: 90 ins; 0 del; 8 mod Patch: https://git.openjdk.org/skara/pull/1708.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1708/head:pull/1708 PR: https://git.openjdk.org/skara/pull/1708 From zsong at openjdk.org Fri Mar 7 22:39:22 2025 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Mar 2025 22:39:22 GMT Subject: RFR: 2454: Skara mistakenly marked a non-clean backport as clean [v2] In-Reply-To: References: Message-ID: > A user reported that Skara bot mistakenly marked a non-clean backport as clean. After investigation, I found that the PR was too large for the remote host to return the entire diff. The PR contained 8082 changed files, but when Skara bot requested the diff, only 3000 files were returned. Therefore, Skara bot was unable to compare some patches, so mistakenly mark the pr as clean. > > In this patch, Skara bot will now check if the PR is too large to evaluate. If it is, Skara bot will not evaluate if this PR is clean and will add a warning comment to the PR instead. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: rename method ------------- Changes: - all: https://git.openjdk.org/skara/pull/1708/files - new: https://git.openjdk.org/skara/pull/1708/files/73fcf900..502f5534 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1708&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1708&range=00-01 Stats: 8 lines in 8 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.org/skara/pull/1708.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1708/head:pull/1708 PR: https://git.openjdk.org/skara/pull/1708 From erikj at openjdk.org Mon Mar 10 14:19:13 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 10 Mar 2025 14:19:13 GMT Subject: RFR: 2454: Skara mistakenly marked a non-clean backport as clean [v2] In-Reply-To: References: Message-ID: <-c0NqbmXe-Jl4LtFmH3XyRjADDhABXXbc95czrAW8JY=.d547cc89-cb19-4a70-b650-6e42da873acf@github.com> On Fri, 7 Mar 2025 22:39:22 GMT, Zhao Song wrote: >> A user reported that Skara bot mistakenly marked a non-clean backport as clean. After investigation, I found that the PR was too large for the remote host to return the entire diff. The PR contained 8082 changed files, but when Skara bot requested the diff, only 3000 files were returned. Therefore, Skara bot was unable to compare some patches, so mistakenly mark the pr as clean. >> >> In this patch, Skara bot will now check if the PR is too large to evaluate. If it is, Skara bot will not evaluate if this PR is clean and will add a warning comment to the PR instead. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > rename method bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1280: > 1278: var message = "?? @" + pr.author().username() + > 1279: " This backport pull request is too large for skara bot to get the entire diff from the remote repository. " + > 1280: "Therefore, skara bot can't evaluate whether this backport is clean or not." + The current language style used by the bot does not have it refer to itself as "skara bot". Suggestion: " This backport pull request is too large to be automatically evaluated as clean." + forge/src/main/java/org/openjdk/skara/forge/github/GitHubPullRequest.java line 48: > 46: > 47: private List