[
https://issues.apache.org/jira/browse/IGNITE-25489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr Chesnokov updated IGNITE-25489:
-----------------------------------------
Description:
Reviewers should see wire format changes in PRs to {{master}} before merge.
Contributors should only need to commit their source changes. A Java-text check
can flag formatting and miss changes to message IDs. JSON describes the fields,
their types and order, enum values and message IDs that reviewers need to
compare.
h3. What is in place
* IGNITE-29103 generates descriptions of messages and enums. [PR
#13675|https://github.com/apache/ignite/pull/13675]
* IGNITE-29143 tracks the JSON in Git and checks that it is up to date. [PR
#13693|https://github.com/apache/ignite/pull/13693]
* IGNITE-29146 adds IDTO descriptions. [PR
#13730|https://github.com/apache/ignite/pull/13730]
* IGNITE-29144 records the mapping from message IDs to classes in {{ids.json}}.
[PR #13763|https://github.com/apache/ignite/pull/13763]
h3. Deliver in this order
# *IGNITE-29261 generates and compares JSON in CI.* Remove the generated files
from Git. CI compares the target branch snapshot with GitHub's test merge of
the PR. It saves the full diff as an artifact. The comparison works on target
branches that have the required generators. [PR
#13802|https://github.com/apache/ignite/pull/13802]
# *IGNITE-29145 reports the result on the PR.* After IGNITE-29261 merges, a
trusted {{workflow_run}} workflow reads the comparison and completeness
results. It updates the bot comment and the label for the current PR head.
h3. Done when
On a PR to {{master}}, including a fork PR, CI shows the diff in Job Summary.
The {{check-wire}} job warns when the format changes. A build or comparison
error fails the check. When the comparison and JSON completeness check pass and
there is a diff, the bot adds {{compatibility}}. It posts or updates one
comment linking to Job Summary.
Reviewers use the diff to decide what needs a closer look. They still need
compatibility tests and manual review, especially for changes to hand-written
serialization.
h3. Later work
* IGNITE-29289 tests whether a hint can reach committers before CI approval on
a fork PR.
* IGNITE-29230 explores rules for explaining compatibility changes from
generated descriptions.
* IGNITE-29161 evaluates whether a code hash can help reviewers spot changes to
serialization code.
[Ignite dev-list
discussion|https://lists.apache.org/thread.html/hq3d8opxscww09pobvqfvwgc1d0v9cls]
was:
Changes to message fields, IDs, enums and IDTO classes can affect rolling
upgrade compatibility. The current check searches diffs in Java source code, so
it can flag comments or formatting and miss changes to message registration.
Let's add JSON descriptions that contain only the details relevant to rolling
upgrade compatibility, such as field types, field order, enum values and
message IDs. CI should generate and compare these descriptions and show the
diff before merge, without asking contributors to commit generated files. A
diff is considered as a signal for reviewer to pay more attention on RU during
review process
h3. Already merged
* IGNITE-29103: message and enum JSON descriptions ([PR
#13675|https://github.com/apache/ignite/pull/13675]).
* IGNITE-29143: committed the generated JSON files to Git and added a CI check
to verify they are up to date ([PR
#13693|https://github.com/apache/ignite/pull/13693]). IGNITE-29261 replaces
this process.
* IGNITE-29146: IDTO JSON descriptions ([PR
#13730|https://github.com/apache/ignite/pull/13730]).
* IGNITE-29144: message ID registrations as ids.json file ([PR
#13763|https://github.com/apache/ignite/pull/13763]).
h3. Deliver in this order
# *IGNITE-29261 - generate JSON descriptions and compare in CI.* Remove JSON
from Git. During PR checks, compare the target branch snapshot with the PR.
Show the diff in Job Summary and save the full diff as an artifact. Support
target branches with the required generators. A diff gives a warning; build and
comparison errors fail the check. [PR
#13802|https://github.com/apache/ignite/pull/13802] is under review.
# *IGNITE-29145 - report changes in the PR.* A trusted {{workflow_run}}
workflow uses the existing {{check-wire}} result and the JSON completeness
check for the current PR head. On a diff, set {{compatibility}} label for PR
and post or update one comment linking to Job Summary. On an empty diff, remove
the comment and only the label set by this workflow.
Merge in this order.
h3. Done when
For fork and repository PRs targeting {{{}master{}}}, normal CI checks show the
JSON diff in Job Summary and a warning in {{check-wire}} when the wire format
changes. Contributors can submit source changes without committing generated
JSON.
After the existing JSON completeness check passes, a successful comparison for
the current PR head with a diff adds {{compatibility}} label to PR and posts or
updates one bot comment linking to Job Summary. A successful comparison with no
diff removes only the label set by this workflow. Compatibility tests and
manual review remain necessary.
h3. Later work
* IGNITE-29289 investigates an early Java-file hint for committers when a PR
is opened.
* IGNITE-29230 tracks semantic comparison of generated wire format
descriptions.
* IGNITE-29161 tracks the code hash proposal and needs a separate scope
decision.
Generated descriptions do not cover every change in hand-written serialization.
Background: [Ignite dev-list
discussion|https://lists.apache.org/thread.html/hq3d8opxscww09pobvqfvwgc1d0v9cls]
> [Umbrella] Track wire format changes for rolling upgrade compatibility
> ----------------------------------------------------------------------
>
> Key: IGNITE-25489
> URL: https://issues.apache.org/jira/browse/IGNITE-25489
> Project: Ignite
> Issue Type: Improvement
> Reporter: Maksim Timonin
> Assignee: Aleksandr Chesnokov
> Priority: Major
> Labels: IEP-132, ise
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Reviewers should see wire format changes in PRs to {{master}} before merge.
> Contributors should only need to commit their source changes. A Java-text
> check can flag formatting and miss changes to message IDs. JSON describes the
> fields, their types and order, enum values and message IDs that reviewers
> need to compare.
> h3. What is in place
> * IGNITE-29103 generates descriptions of messages and enums. [PR
> #13675|https://github.com/apache/ignite/pull/13675]
> * IGNITE-29143 tracks the JSON in Git and checks that it is up to date. [PR
> #13693|https://github.com/apache/ignite/pull/13693]
> * IGNITE-29146 adds IDTO descriptions. [PR
> #13730|https://github.com/apache/ignite/pull/13730]
> * IGNITE-29144 records the mapping from message IDs to classes in
> {{ids.json}}. [PR #13763|https://github.com/apache/ignite/pull/13763]
> h3. Deliver in this order
> # *IGNITE-29261 generates and compares JSON in CI.* Remove the generated
> files from Git. CI compares the target branch snapshot with GitHub's test
> merge of the PR. It saves the full diff as an artifact. The comparison works
> on target branches that have the required generators. [PR
> #13802|https://github.com/apache/ignite/pull/13802]
> # *IGNITE-29145 reports the result on the PR.* After IGNITE-29261 merges, a
> trusted {{workflow_run}} workflow reads the comparison and completeness
> results. It updates the bot comment and the label for the current PR head.
> h3. Done when
> On a PR to {{master}}, including a fork PR, CI shows the diff in Job Summary.
> The {{check-wire}} job warns when the format changes. A build or comparison
> error fails the check. When the comparison and JSON completeness check pass
> and there is a diff, the bot adds {{compatibility}}. It posts or updates one
> comment linking to Job Summary.
> Reviewers use the diff to decide what needs a closer look. They still need
> compatibility tests and manual review, especially for changes to hand-written
> serialization.
> h3. Later work
> * IGNITE-29289 tests whether a hint can reach committers before CI approval
> on a fork PR.
> * IGNITE-29230 explores rules for explaining compatibility changes from
> generated descriptions.
> * IGNITE-29161 evaluates whether a code hash can help reviewers spot changes
> to serialization code.
> [Ignite dev-list
> discussion|https://lists.apache.org/thread.html/hq3d8opxscww09pobvqfvwgc1d0v9cls]
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)