From erikj at openjdk.org Fri May 2 22:41:00 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 2 May 2025 22:41:00 GMT Subject: RFR: 2491: GitLabRepository::recentCommitComments can miss commits Message-ID: The mechanism for polling GitLab for commit comments has a flaw that may cause it to start missing relevant comments. The underlying issue is that we are trusting timestamps on commits which may originate from a client machine, where the system clock may be wrong. If a user changes their system clock to a date in the future and commits, that commit ends up having a future date. If this commit is then pushed to their personal fork and included in a merge request, then this commit will end up in a pr/X branch in the main/parent repository. The rather convoluted mechanism for polling for commit comments (for the purpose of finding commit commands) for GitLab involves maintaining a mapping from commit title message to commit hash. This map is needed because the only way to find comments globally for a repository is to query for "events", and the event object only has the commit title, not the hash. Then for all possibly relevant events, we look up the commits in the map. This map is initially generated from a local repository using a git command like this: "git rev-list ". After the first initialization, it is then updated using API calls to the server, querying for commits after a timestamp. The timestamp is the latest found already in the map. This is where the flaw lies. There is no guarantee that the timestamps are ever increasing, so once a commit with a faulty future timestamp ends up in the map, no new commits will ever be added when attempting to update it. When I wrote this code, I think I assumed the timestamps would be strictly increasing because all official commits are generated by Skara. That still holds true for commits in repos and branches where we have strict Skara controlled pull requests. The problem here is that the API query does not limit commits to the specified branches, it gets all commits after the timestamp, which includes commits in pr/X branches as well as unreferenced commits. A quick solution here would be to change the query to use branches. That would require doing a call per branch. I think a better solution would be to stick to one source for commits to the map, the local repository. It is already updated before each time we check for new commit comments. The challenge then is to identify the new commits to complement the map without having to rebuild it from scratch each time. I can't think of an exact way to accomplish this, but think we can get away with a good enough approximation. We can count the number of commits in the repo using "git rev-list --count ". Then when we iterate over the commits from commitMetaData iterator, we only go until the map contains the same number of commits as the repo has. At that point we know we have added all new commits. Most of the time, the rev-list loop (in topo-order) should return all the new commits first. It's only if we have a branched history within a branch that commits could be iterated in a di fferent order, but worst case we just reprocess the unique ancestors of in each merge parent before we have passed all new commits. While working on this I also realized that the current implementation has another flaw in that it assumes the list of branches given will always be the same. This is currently true in the affected bot, but that's not something the HostedRepository API should be assuming. I implemented a simple invalidation of the map in case the set of branches are different from the last call. This isn't an elegant solution but it at least keeps the API clean for now and if we actually need to handle this usecase, we can figure something else out then. ------------- Commit messages: - SKARA-2491 Changes: https://git.openjdk.org/skara/pull/1717/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1717&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2491 Stats: 125 lines in 7 files changed: 92 ins; 20 del; 13 mod Patch: https://git.openjdk.org/skara/pull/1717.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1717/head:pull/1717 PR: https://git.openjdk.org/skara/pull/1717 From ihse at openjdk.org Mon May 5 10:10:00 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 5 May 2025 10:10:00 GMT Subject: RFR: 2480: Add new PR command /ping [v3] In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 22:44:22 GMT, Zhao Song wrote: >> This PR is trying to add a new pull request command "ping". >> >> The reported wants to have a pull request command that can refresh the timeouts of the pr so that the pr wouldn't be closed by pullRequestPrunerBot. >> >> The reported proposed to name the command "keep-alive" with alias "/ping", however, we store command names in an Enum class, so "keep-alive" is invalid. I think we just use "ping" as the command name. >> >> Besides, I would like to let the command trigger a force update of the pr. Currently, there are some cases that skara bot won't re-evaluate the pr automatically and users need to do something to poke it(like editing the pr title), so I think it's better to have a pull request command to trigger the update. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment I agree with Erik that `/touch` would be a better name. The name `ping` to me indicates that you want to ask for reviewers or re-reviews, not that you want to silence the bot. If anything, that would have been a "pong" to the bot's ping. Or `/keepalive`, if dashes are problematic. Can you also please update the comment the bot writes to indicate that the recommended action is to write `/touch` (or `/keepalive`)? Also, if it is possible to create a link such that clicking it will start writing this as a comment for you, that would be even better. Or, at least, make it easy to copy/paste the needed command. ------------- PR Comment: https://git.openjdk.org/skara/pull/1716#issuecomment-2850517624 PR Comment: https://git.openjdk.org/skara/pull/1716#issuecomment-2850522348 From zsong at openjdk.org Mon May 5 16:47:00 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 5 May 2025 16:47:00 GMT Subject: RFR: 2491: GitLabRepository::recentCommitComments can miss commits In-Reply-To: References: Message-ID: <8-6CFnxxTDYz9H0_ymR4SRPHPEeNP5IgUnpnyoYQaXY=.8fb55446-484b-49e5-b68e-61528eb359b5@github.com> On Fri, 2 May 2025 21:46:03 GMT, Erik Joelsson wrote: > The mechanism for polling GitLab for commit comments has a flaw that may cause it to start missing relevant comments. The underlying issue is that we are trusting timestamps on commits which may originate from a client machine, where the system clock may be wrong. > > If a user changes their system clock to a date in the future and commits, that commit ends up having a future date. If this commit is then pushed to their personal fork and included in a merge request, then this commit will end up in a pr/X branch in the main/parent repository. > > The rather convoluted mechanism for polling for commit comments (for the purpose of finding commit commands) for GitLab involves maintaining a mapping from commit title message to commit hash. This map is needed because the only way to find comments globally for a repository is to query for "events", and the event object only has the commit title, not the hash. Then for all possibly relevant events, we look up the commits in the map. > > This map is initially generated from a local repository using a git command like this: "git rev-list ". After the first initialization, it is then updated using API calls to the server, querying for commits after a timestamp. The timestamp is the latest found already in the map. This is where the flaw lies. There is no guarantee that the timestamps are ever increasing, so once a commit with a faulty future timestamp ends up in the map, no new commits will ever be added when attempting to update it. > > When I wrote this code, I think I assumed the timestamps would be strictly increasing because all official commits are generated by Skara. That still holds true for commits in repos and branches where we have strict Skara controlled pull requests. The problem here is that the API query does not limit commits to the specified branches, it gets all commits after the timestamp, which includes commits in pr/X branches as well as unreferenced commits. > > A quick solution here would be to change the query to use branches. That would require doing a call per branch. I think a better solution would be to stick to one source for commits to the map, the local repository. It is already updated before each time we check for new commit comments. The challenge then is to identify the new commits to complement the map without having to rebuild it from scratch each time. I can't think of an exact way to accomplish this, but think we can get away with a good enough approximation. We can count the numb... Looks good overall! forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabRepository.java line 647: > 645: Set branchSet = Set.copyOf(branches); > 646: if (!branchSet.equals(commitMapBranchSet)) { > 647: log.info("Invalidating commitTitleToCommits map for branch set: " + branchSet + " old set: " + commitMapBranchSet); Since commitMapBranchSet doesn't have an initial value, this log will also be printed during the initial run. Is this intentional? ------------- PR Review: https://git.openjdk.org/skara/pull/1717#pullrequestreview-2815422159 PR Review Comment: https://git.openjdk.org/skara/pull/1717#discussion_r2073795369 From erikj at openjdk.org Mon May 5 17:50:00 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 5 May 2025 17:50:00 GMT Subject: RFR: 2491: GitLabRepository::recentCommitComments can miss commits In-Reply-To: <8-6CFnxxTDYz9H0_ymR4SRPHPEeNP5IgUnpnyoYQaXY=.8fb55446-484b-49e5-b68e-61528eb359b5@github.com> References: <8-6CFnxxTDYz9H0_ymR4SRPHPEeNP5IgUnpnyoYQaXY=.8fb55446-484b-49e5-b68e-61528eb359b5@github.com> Message-ID: On Mon, 5 May 2025 16:43:11 GMT, Zhao Song wrote: >> The mechanism for polling GitLab for commit comments has a flaw that may cause it to start missing relevant comments. The underlying issue is that we are trusting timestamps on commits which may originate from a client machine, where the system clock may be wrong. >> >> If a user changes their system clock to a date in the future and commits, that commit ends up having a future date. If this commit is then pushed to their personal fork and included in a merge request, then this commit will end up in a pr/X branch in the main/parent repository. >> >> The rather convoluted mechanism for polling for commit comments (for the purpose of finding commit commands) for GitLab involves maintaining a mapping from commit title message to commit hash. This map is needed because the only way to find comments globally for a repository is to query for "events", and the event object only has the commit title, not the hash. Then for all possibly relevant events, we look up the commits in the map. >> >> This map is initially generated from a local repository using a git command like this: "git rev-list ". After the first initialization, it is then updated using API calls to the server, querying for commits after a timestamp. The timestamp is the latest found already in the map. This is where the flaw lies. There is no guarantee that the timestamps are ever increasing, so once a commit with a faulty future timestamp ends up in the map, no new commits will ever be added when attempting to update it. >> >> When I wrote this code, I think I assumed the timestamps would be strictly increasing because all official commits are generated by Skara. That still holds true for commits in repos and branches where we have strict Skara controlled pull requests. The problem here is that the API query does not limit commits to the specified branches, it gets all commits after the timestamp, which includes commits in pr/X branches as well as unreferenced commits. >> >> A quick solution here would be to change the query to use branches. That would require doing a call per branch. I think a better solution would be to stick to one source for commits to the map, the local repository. It is already updated before each time we check for new commit comments. The challenge then is to identify the new commits to complement the map without having to rebuild it from scratch each time. I can't think of an exact way to accomplish this, but think we can get away with a good enough approximation.... > > forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabRepository.java line 647: > >> 645: Set branchSet = Set.copyOf(branches); >> 646: if (!branchSet.equals(commitMapBranchSet)) { >> 647: log.info("Invalidating commitTitleToCommits map for branch set: " + branchSet + " old set: " + commitMapBranchSet); > > Since commitMapBranchSet doesn't have an initial value, this log will also be printed during the initial run. Is this intentional? Yes, kind of. I did note that it would happen and figured it was fine. I don't think it's worth complicating the code further to try to handle the first call differently. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1717#discussion_r2073900450 From zsong at openjdk.org Mon May 5 17:53:22 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 5 May 2025 17:53:22 GMT Subject: RFR: 2491: GitLabRepository::recentCommitComments can miss commits In-Reply-To: References: Message-ID: On Fri, 2 May 2025 21:46:03 GMT, Erik Joelsson wrote: > The mechanism for polling GitLab for commit comments has a flaw that may cause it to start missing relevant comments. The underlying issue is that we are trusting timestamps on commits which may originate from a client machine, where the system clock may be wrong. > > If a user changes their system clock to a date in the future and commits, that commit ends up having a future date. If this commit is then pushed to their personal fork and included in a merge request, then this commit will end up in a pr/X branch in the main/parent repository. > > The rather convoluted mechanism for polling for commit comments (for the purpose of finding commit commands) for GitLab involves maintaining a mapping from commit title message to commit hash. This map is needed because the only way to find comments globally for a repository is to query for "events", and the event object only has the commit title, not the hash. Then for all possibly relevant events, we look up the commits in the map. > > This map is initially generated from a local repository using a git command like this: "git rev-list ". After the first initialization, it is then updated using API calls to the server, querying for commits after a timestamp. The timestamp is the latest found already in the map. This is where the flaw lies. There is no guarantee that the timestamps are ever increasing, so once a commit with a faulty future timestamp ends up in the map, no new commits will ever be added when attempting to update it. > > When I wrote this code, I think I assumed the timestamps would be strictly increasing because all official commits are generated by Skara. That still holds true for commits in repos and branches where we have strict Skara controlled pull requests. The problem here is that the API query does not limit commits to the specified branches, it gets all commits after the timestamp, which includes commits in pr/X branches as well as unreferenced commits. > > A quick solution here would be to change the query to use branches. That would require doing a call per branch. I think a better solution would be to stick to one source for commits to the map, the local repository. It is already updated before each time we check for new commit comments. The challenge then is to identify the new commits to complement the map without having to rebuild it from scratch each time. I can't think of an exact way to accomplish this, but think we can get away with a good enough approximation. We can count the numb... Marked as reviewed by zsong (Reviewer). ------------- PR Review: https://git.openjdk.org/skara/pull/1717#pullrequestreview-2815611213 From zsong at openjdk.org Mon May 5 17:53:22 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 5 May 2025 17:53:22 GMT Subject: RFR: 2491: GitLabRepository::recentCommitComments can miss commits In-Reply-To: References: <8-6CFnxxTDYz9H0_ymR4SRPHPEeNP5IgUnpnyoYQaXY=.8fb55446-484b-49e5-b68e-61528eb359b5@github.com> Message-ID: On Mon, 5 May 2025 17:47:48 GMT, Erik Joelsson wrote: >> forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabRepository.java line 647: >> >>> 645: Set branchSet = Set.copyOf(branches); >>> 646: if (!branchSet.equals(commitMapBranchSet)) { >>> 647: log.info("Invalidating commitTitleToCommits map for branch set: " + branchSet + " old set: " + commitMapBranchSet); >> >> Since commitMapBranchSet doesn't have an initial value, this log will also be printed during the initial run. Is this intentional? > > Yes, kind of. I did note that it would happen and figured it was fine. I don't think it's worth complicating the code further to try to handle the first call differently. I'm also ok with it ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1717#discussion_r2073905841 From erikj at openjdk.org Mon May 5 18:00:53 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 5 May 2025 18:00:53 GMT Subject: RFR: 2491: GitLabRepository::recentCommitComments can miss commits In-Reply-To: References: Message-ID: <45WLLCBJu43A8nLIwqP-AxUWWxFSl2JoHHhfIsgC22c=.47f0501f-0b09-4ba9-b9d0-4a8f7af9ff04@github.com> On Fri, 2 May 2025 21:46:03 GMT, Erik Joelsson wrote: > The mechanism for polling GitLab for commit comments has a flaw that may cause it to start missing relevant comments. The underlying issue is that we are trusting timestamps on commits which may originate from a client machine, where the system clock may be wrong. > > If a user changes their system clock to a date in the future and commits, that commit ends up having a future date. If this commit is then pushed to their personal fork and included in a merge request, then this commit will end up in a pr/X branch in the main/parent repository. > > The rather convoluted mechanism for polling for commit comments (for the purpose of finding commit commands) for GitLab involves maintaining a mapping from commit title message to commit hash. This map is needed because the only way to find comments globally for a repository is to query for "events", and the event object only has the commit title, not the hash. Then for all possibly relevant events, we look up the commits in the map. > > This map is initially generated from a local repository using a git command like this: "git rev-list ". After the first initialization, it is then updated using API calls to the server, querying for commits after a timestamp. The timestamp is the latest found already in the map. This is where the flaw lies. There is no guarantee that the timestamps are ever increasing, so once a commit with a faulty future timestamp ends up in the map, no new commits will ever be added when attempting to update it. > > When I wrote this code, I think I assumed the timestamps would be strictly increasing because all official commits are generated by Skara. That still holds true for commits in repos and branches where we have strict Skara controlled pull requests. The problem here is that the API query does not limit commits to the specified branches, it gets all commits after the timestamp, which includes commits in pr/X branches as well as unreferenced commits. > > A quick solution here would be to change the query to use branches. That would require doing a call per branch. I think a better solution would be to stick to one source for commits to the map, the local repository. It is already updated before each time we check for new commit comments. The challenge then is to identify the new commits to complement the map without having to rebuild it from scratch each time. I can't think of an exact way to accomplish this, but think we can get away with a good enough approximation. We can count the numb... Thanks! ------------- PR Comment: https://git.openjdk.org/skara/pull/1717#issuecomment-2851869021 From erikj at openjdk.org Mon May 5 18:00:53 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 5 May 2025 18:00:53 GMT Subject: Integrated: 2491: GitLabRepository::recentCommitComments can miss commits In-Reply-To: References: Message-ID: On Fri, 2 May 2025 21:46:03 GMT, Erik Joelsson wrote: > The mechanism for polling GitLab for commit comments has a flaw that may cause it to start missing relevant comments. The underlying issue is that we are trusting timestamps on commits which may originate from a client machine, where the system clock may be wrong. > > If a user changes their system clock to a date in the future and commits, that commit ends up having a future date. If this commit is then pushed to their personal fork and included in a merge request, then this commit will end up in a pr/X branch in the main/parent repository. > > The rather convoluted mechanism for polling for commit comments (for the purpose of finding commit commands) for GitLab involves maintaining a mapping from commit title message to commit hash. This map is needed because the only way to find comments globally for a repository is to query for "events", and the event object only has the commit title, not the hash. Then for all possibly relevant events, we look up the commits in the map. > > This map is initially generated from a local repository using a git command like this: "git rev-list ". After the first initialization, it is then updated using API calls to the server, querying for commits after a timestamp. The timestamp is the latest found already in the map. This is where the flaw lies. There is no guarantee that the timestamps are ever increasing, so once a commit with a faulty future timestamp ends up in the map, no new commits will ever be added when attempting to update it. > > When I wrote this code, I think I assumed the timestamps would be strictly increasing because all official commits are generated by Skara. That still holds true for commits in repos and branches where we have strict Skara controlled pull requests. The problem here is that the API query does not limit commits to the specified branches, it gets all commits after the timestamp, which includes commits in pr/X branches as well as unreferenced commits. > > A quick solution here would be to change the query to use branches. That would require doing a call per branch. I think a better solution would be to stick to one source for commits to the map, the local repository. It is already updated before each time we check for new commit comments. The challenge then is to identify the new commits to complement the map without having to rebuild it from scratch each time. I can't think of an exact way to accomplish this, but think we can get away with a good enough approximation. We can count the numb... This pull request has now been integrated. Changeset: c61ebd05 Author: Erik Joelsson URL: https://git.openjdk.org/skara/commit/c61ebd053f0c9de2ab2345e3ec4c01cbfb7455b9 Stats: 125 lines in 7 files changed: 92 ins; 20 del; 13 mod 2491: GitLabRepository::recentCommitComments can miss commits Reviewed-by: zsong ------------- PR: https://git.openjdk.org/skara/pull/1717 From zsong at openjdk.org Mon May 5 18:10:38 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 5 May 2025 18:10:38 GMT Subject: RFR: 2480: Add new PR command /ping [v3] In-Reply-To: References: Message-ID: On Mon, 5 May 2025 10:05:55 GMT, Magnus Ihse Bursie wrote: > I agree with Erik that `/touch` would be a better name. The name `ping` to me indicates that you want to ask for reviewers or re-reviews, not that you want to silence the bot. If anything, that would have been a "pong" to the bot's ping. Or `/keepalive`, if dashes are problematic. Since Erik and you have the same idea, I will rename the command to /touch > Can you also please update the comment the bot writes to indicate that the recommended action is to write `/touch` (or `/keepalive`)? Also, if it is possible to create a link such that clicking it will start writing this as a comment for you, that would be even better. Or, at least, make it easy to copy/paste the needed command. Yes, it's a good idea, will update the comment from PullRequestPrunerBot ------------- PR Comment: https://git.openjdk.org/skara/pull/1716#issuecomment-2851896781 PR Comment: https://git.openjdk.org/skara/pull/1716#issuecomment-2851899390 From zsong at openjdk.org Mon May 5 20:14:40 2025 From: zsong at openjdk.org (Zhao Song) Date: Mon, 5 May 2025 20:14:40 GMT Subject: RFR: 2480: Add new PR command /touch [v4] In-Reply-To: References: Message-ID: > This PR is trying to add a new pull request command "ping". > > The reported wants to have a pull request command that can refresh the timeouts of the pr so that the pr wouldn't be closed by pullRequestPrunerBot. > > The reported proposed to name the command "keep-alive" with alias "/ping", however, we store command names in an Enum class, so "keep-alive" is invalid. I think we just use "ping" as the command name. > > Besides, I would like to let the command trigger a force update of the pr. Currently, there are some cases that skara bot won't re-evaluate the pr automatically and users need to do something to poke it(like editing the pr title), so I think it's better to have a pull request command to trigger the update. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: review comment ------------- Changes: - all: https://git.openjdk.org/skara/pull/1716/files - new: https://git.openjdk.org/skara/pull/1716/files/206d55e6..83070162 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1716&range=03 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1716&range=02-03 Stats: 148 lines in 8 files changed: 67 ins; 68 del; 13 mod Patch: https://git.openjdk.org/skara/pull/1716.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1716/head:pull/1716 PR: https://git.openjdk.org/skara/pull/1716 From erikj at openjdk.org Mon May 5 21:46:38 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 5 May 2025 21:46:38 GMT Subject: RFR: 2480: Add new PR command /touch [v4] In-Reply-To: References: Message-ID: On Mon, 5 May 2025 20:14:40 GMT, Zhao Song wrote: >> This PR is trying to add a new pull request command "touch". >> >> The reported wants to have a pull request command that can refresh the timeouts of the pr so that the pr wouldn't be closed by pullRequestPrunerBot. >> >> The reported proposed to name the command "keep-alive" with alias "/ping", however, we store command names in an Enum class, so "keep-alive" is invalid. I think we just use "touch" as the command name. >> >> Besides, I would like to let the command trigger a force update of the pr. Currently, there are some cases that skara bot won't re-evaluate the pr automatically and users need to do something to poke it(like editing the pr title), so I think it's better to have a pull request command to trigger the update. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1716#pullrequestreview-2816184078 From zsong at openjdk.org Tue May 6 16:24:37 2025 From: zsong at openjdk.org (Zhao Song) Date: Tue, 6 May 2025 16:24:37 GMT Subject: RFR: 2480: Add new PR command /touch [v4] In-Reply-To: References: Message-ID: On Mon, 5 May 2025 20:14:40 GMT, Zhao Song wrote: >> This PR is trying to add a new pull request command "touch". >> >> The reported wants to have a pull request command that can refresh the timeouts of the pr so that the pr wouldn't be closed by pullRequestPrunerBot. >> >> The reported proposed to name the command "keep-alive" with alias "/ping", however, we store command names in an Enum class, so "keep-alive" is invalid. I think we just use "touch" as the command name. >> >> Besides, I would like to let the command trigger a force update of the pr. Currently, there are some cases that skara bot won't re-evaluate the pr automatically and users need to do something to poke it(like editing the pr title), so I think it's better to have a pull request command to trigger the update. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Thank you! ------------- PR Comment: https://git.openjdk.org/skara/pull/1716#issuecomment-2855193988 From zsong at openjdk.org Tue May 6 16:24:37 2025 From: zsong at openjdk.org (Zhao Song) Date: Tue, 6 May 2025 16:24:37 GMT Subject: Integrated: 2480: Add new PR command /touch In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 21:31:18 GMT, Zhao Song wrote: > This PR is trying to add a new pull request command "touch". > > The reported wants to have a pull request command that can refresh the timeouts of the pr so that the pr wouldn't be closed by pullRequestPrunerBot. > > The reported proposed to name the command "keep-alive" with alias "/ping", however, we store command names in an Enum class, so "keep-alive" is invalid. I think we just use "touch" as the command name. > > Besides, I would like to let the command trigger a force update of the pr. Currently, there are some cases that skara bot won't re-evaluate the pr automatically and users need to do something to poke it(like editing the pr title), so I think it's better to have a pull request command to trigger the update. This pull request has now been integrated. Changeset: b99d1edf Author: Zhao Song URL: https://git.openjdk.org/skara/commit/b99d1edfea89cb1dabbf507953b660feaa78a486 Stats: 104 lines in 7 files changed: 96 ins; 0 del; 8 mod 2480: Add new PR command /touch Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1716 From zsong at openjdk.org Wed May 7 17:28:04 2025 From: zsong at openjdk.org (Zhao Song) Date: Wed, 7 May 2025 17:28:04 GMT Subject: RFR: 2495: Touch Command should return early on closed pull requests Message-ID: In [SKARA-2480](https://bugs.openjdk.org/browse/SKARA-2480), I added a new pull request command /touch. When the /touch command is issued on a closed pull request, Skara should return immediately. I forgot to add the return statement in that logic. ------------- Commit messages: - SKARA-2495 Changes: https://git.openjdk.org/skara/pull/1718/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1718&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2495 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1718.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1718/head:pull/1718 PR: https://git.openjdk.org/skara/pull/1718 From erikj at openjdk.org Wed May 7 17:45:14 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 7 May 2025 17:45:14 GMT Subject: RFR: 2495: Touch Command should return early on closed pull requests In-Reply-To: References: Message-ID: On Wed, 7 May 2025 17:22:50 GMT, Zhao Song wrote: > In [SKARA-2480](https://bugs.openjdk.org/browse/SKARA-2480), I added a new pull request command /touch. When the /touch command is issued on a closed pull request, Skara should return immediately. I forgot to add the return statement in that logic. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1718#pullrequestreview-2822658906 From zsong at openjdk.org Wed May 7 17:45:14 2025 From: zsong at openjdk.org (Zhao Song) Date: Wed, 7 May 2025 17:45:14 GMT Subject: RFR: 2495: Touch Command should return early on closed pull requests In-Reply-To: References: Message-ID: On Wed, 7 May 2025 17:22:50 GMT, Zhao Song wrote: > In [SKARA-2480](https://bugs.openjdk.org/browse/SKARA-2480), I added a new pull request command /touch. When the /touch command is issued on a closed pull request, Skara should return immediately. I forgot to add the return statement in that logic. Thank you for the quick review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1718#issuecomment-2859567131 From zsong at openjdk.org Wed May 7 17:45:14 2025 From: zsong at openjdk.org (Zhao Song) Date: Wed, 7 May 2025 17:45:14 GMT Subject: Integrated: 2495: Touch Command should return early on closed pull requests In-Reply-To: References: Message-ID: <_irzFwA1XiRuxBB_DfvXvw9jNV9feiuw_u38QsXge-s=.1c44e1db-2446-4c9d-864d-903e93599cbe@github.com> On Wed, 7 May 2025 17:22:50 GMT, Zhao Song wrote: > In [SKARA-2480](https://bugs.openjdk.org/browse/SKARA-2480), I added a new pull request command /touch. When the /touch command is issued on a closed pull request, Skara should return immediately. I forgot to add the return statement in that logic. This pull request has now been integrated. Changeset: 131e80e4 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/131e80e440eacb6434544ec9d93f385601cce996 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 2495: Touch Command should return early on closed pull requests Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1718