[ 
https://issues.apache.org/jira/browse/IGNITE-29145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Chesnokov updated IGNITE-29145:
-----------------------------------------
    Description: 
After IGNITE-29261, publish the JSON comparison result on the PR. Keep the 
existing {{check-wire}} result in the PR checks. When there is a diff, add 
{{compatibility}} and post or update one bot comment linking to Job Summary. 
When the diff is empty, remove the bot comment and remove the label only if 
this workflow set the current label. A manually applied label keeps its 
ownership. A successful rerun with a diff can put back a label that a reviewer 
removed.

h3. When to publish

* Require a successful {{check-wire}} job and a successful {{Check all wire 
format descriptions are collected}} step from {{check-java}} on the PR head. 
Use the completeness step result even if an unrelated check fails. If either 
required result fails, is cancelled, is skipped or cannot be verified, leave 
the label and comment as they are.
* Match the run to the open PR, including fork PRs, and check that its head and 
target branch still match. Accept the snapshot of that target branch even if 
the branch has advanced.

h3. Implementation

Keep the existing read-only {{pull_request}} workflow and {{check-wire}} steps. 
In a trusted {{workflow_run: completed}} workflow on the default branch, handle 
PR runs of the code-check workflow. Read the existing step results through the 
Actions API. After a successful comparison, a successful conditional upload of 
{{wire-diff}} means there is a diff. A skipped upload means the diff is empty. 
If the result is ambiguous, leave the PR as it is.

Give PR write permissions only to the publisher and run only trusted 
default-branch code there. Identify the bot comment with a marker. Retire the 
old {{pull_request_target}} reporter and its separate {{Rolling upgrade 
compatibility}} check when switching to the new workflow.

h3. Done when

* Verify that a diff creates one comment with the Job Summary link, and a rerun 
updates that comment. Verify that an empty diff removes the comment and only 
the bot-owned label.
* Verify manual labels, manual removal followed by a rerun with a diff, failed 
or skipped completeness checks, unrelated failures, an outdated PR head and an 
advanced target branch.
* Verify the flow on a fork PR after the publisher is on the default branch. 
The PR checks show the result in {{check-wire}}.

Plan: IGNITE-25489. Prerequisite: IGNITE-29261. Early hints at PR creation are 
tracked in IGNITE-29289. Semantic comparison is tracked in IGNITE-29230. [ASF 
policy|https://infra.apache.org/github-actions-policy.html].

  was:
After IGNITE-29261, publish the JSON comparison result on the PR. Keep the 
existing {{check-wire}} result in the PR checks. When there is a diff, add 
{{compatibility}} and post or update one bot comment linking to Job Summary. 
When the diff is empty, remove the bot comment and remove the label only if 
this workflow set the current label. A manually applied label keeps its 
ownership. A successful rerun with a diff can put back a label that a reviewer 
removed.

h3. When to publish

* Require a successful {{check-wire}} job and a successful {{Check all wire 
format descriptions are collected}} step from {{check-java}} on the PR head. 
Use the completeness step result even if an unrelated check fails. If either 
required result fails, is cancelled, is skipped or cannot be verified, leave 
the label and comment as they are.
* Match the run to the open PR, including fork PRs, and check that its head and 
target branch still match. Accept the snapshot of that target branch even if 
the branch has advanced.

h3. Implementation

Keep the existing read-only {{pull_request}} workflow and {{check-wire}} steps. 
In a trusted {{workflow_run: completed}} workflow on the default branch, handle 
PR runs of the code-check workflow. Read the existing step results through the 
Actions API. After a successful comparison, a successful conditional upload of 
{{wire-diff}} means there is a diff. A skipped upload means the diff is empty. 
If the result is ambiguous, leave the PR as it is.

Give PR write permissions only to the publisher and run only trusted 
default-branch code there. Identify the bot comment with a marker. Retire the 
old {{pull_request_target}} reporter and its separate {{Rolling upgrade 
compatibility}} check when switching to the new workflow.

h3. Open proposal: early hint when a PR is opened

Consider reusing the Java-file and path heuristic to point committers to 
possible wire format changes before the JSON comparison runs. The hint would 
inspect changed files through the API. Its trigger and presentation are open. 
Check whether {{workflow_run: requested}} is delivered for an external fork PR 
while it is still waiting for workflow approval. The JSON comparison determines 
the {{compatibility}} label and the Job Summary comment described above.

h3. Done when

* Verify that a diff creates one comment with the Job Summary link, and a rerun 
updates that comment. Verify that an empty diff removes the comment and only 
the bot-owned label.
* Verify manual labels, manual removal followed by a rerun with a diff, failed 
or skipped completeness checks, unrelated failures, an outdated PR head and an 
advanced target branch.
* Verify the flow on a fork PR after the publisher is on the default branch. 
The PR checks show the result in {{check-wire}}.

Plan: IGNITE-25489. Prerequisite: IGNITE-29261. Semantic analysis is tracked 
separately. [ASF policy|https://infra.apache.org/github-actions-policy.html].


> Label and comment on PRs with wire format changes
> -------------------------------------------------
>
>                 Key: IGNITE-29145
>                 URL: https://issues.apache.org/jira/browse/IGNITE-29145
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Aleksandr Chesnokov
>            Assignee: Aleksandr Chesnokov
>            Priority: Major
>              Labels: IEP-132, ise
>
> After IGNITE-29261, publish the JSON comparison result on the PR. Keep the 
> existing {{check-wire}} result in the PR checks. When there is a diff, add 
> {{compatibility}} and post or update one bot comment linking to Job Summary. 
> When the diff is empty, remove the bot comment and remove the label only if 
> this workflow set the current label. A manually applied label keeps its 
> ownership. A successful rerun with a diff can put back a label that a 
> reviewer removed.
> h3. When to publish
> * Require a successful {{check-wire}} job and a successful {{Check all wire 
> format descriptions are collected}} step from {{check-java}} on the PR head. 
> Use the completeness step result even if an unrelated check fails. If either 
> required result fails, is cancelled, is skipped or cannot be verified, leave 
> the label and comment as they are.
> * Match the run to the open PR, including fork PRs, and check that its head 
> and target branch still match. Accept the snapshot of that target branch even 
> if the branch has advanced.
> h3. Implementation
> Keep the existing read-only {{pull_request}} workflow and {{check-wire}} 
> steps. In a trusted {{workflow_run: completed}} workflow on the default 
> branch, handle PR runs of the code-check workflow. Read the existing step 
> results through the Actions API. After a successful comparison, a successful 
> conditional upload of {{wire-diff}} means there is a diff. A skipped upload 
> means the diff is empty. If the result is ambiguous, leave the PR as it is.
> Give PR write permissions only to the publisher and run only trusted 
> default-branch code there. Identify the bot comment with a marker. Retire the 
> old {{pull_request_target}} reporter and its separate {{Rolling upgrade 
> compatibility}} check when switching to the new workflow.
> h3. Done when
> * Verify that a diff creates one comment with the Job Summary link, and a 
> rerun updates that comment. Verify that an empty diff removes the comment and 
> only the bot-owned label.
> * Verify manual labels, manual removal followed by a rerun with a diff, 
> failed or skipped completeness checks, unrelated failures, an outdated PR 
> head and an advanced target branch.
> * Verify the flow on a fork PR after the publisher is on the default branch. 
> The PR checks show the result in {{check-wire}}.
> Plan: IGNITE-25489. Prerequisite: IGNITE-29261. Early hints at PR creation 
> are tracked in IGNITE-29289. Semantic comparison is tracked in IGNITE-29230. 
> [ASF policy|https://infra.apache.org/github-actions-policy.html].



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to