[
https://issues.apache.org/jira/browse/IGNITE-29326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anton Vinogradov updated IGNITE-29326:
--------------------------------------
Description:
Add a GitHub Actions check called *Public behavior changes* for PRs to master.
Show what changed for an Ignite user and where. The [public
contract|https://github.com/apache/ignite/blob/master/rfcs/IGNITE-29219-public-api-and-compatibility.md]
sets the scope. The [RFC
process|https://issues.apache.org/jira/browse/IGNITE-29220] covers compatible
additions as well as breaking changes and defines the exceptions.
h3. Agreed behavior
{noformat}
Can the check confirm a change covered by the public RFC process?
├─ Cannot read or compare the change → Fail: check could not finish.
├─ No change confirmed → Pass. Stop before looking for an RFC.
├─ The PR changes only the check → Pass with a review warning.
├─ Only removed deprecated declarations or experimental API changes → Pass with
a review warning.
└─ Yes → Did the PR add or update an RFC file?
├─ Yes → Check the names of all added or updated RFC files.
│ ├─ Any invalid name → Fail: fix the filename.
│ └─ All names valid → Pass with a review warning.
└─ No → Does the PR description link directly to an existing RFC file on the
target branch?
├─ Yes → Pass with a review warning.
└─ No valid link or file missing → Fail: RFC needed.
{noformat}
* *Fix the filename.* Show the offending path, the expected form
{{rfcs/IGNITE-<ticket>-<short-title>.md}} and a valid example.
* *RFC needed.* Show what changed and where. Ask the author to add or update an
RFC file, or link to an existing one.
* *Review warning.* In Checks and the PR comment, list the changes and their
locations. Link directly to the RFC for the reviewer.
* *Deprecated or experimental API.* List each removed declaration that the
target branch marks as deprecated and each change to an API marked
{{@IgniteExperimental}}. The RFC process lets authors remove APIs deprecated
before it without an RFC. Experimental APIs may change in any release. The
reviewer decides whether such a change needs an RFC. Where it is cheap, show
when the deprecation was added, for example the commit and the first release
that contain it.
* *Changes to the check only.* List what the new version of the check describes
differently on the target branch. The reviewer checks that the check still
describes everything that users rely on.
* *Check could not finish.* Show the cause and whether to fix the PR, update
the check in the PR or rerun the check. Name the file of the check to update.
The bot reports each outcome in Checks and in one PR comment. The comment tells
the author what to change and the reviewer what to check. When the findings or
advice change, the bot deletes its previous comment and posts a new one. A
clean PR, including an RFC-only PR, gets no comment. If the bot commented
earlier, the new comment says that all earlier issues are resolved.
h3. Finding an existing RFC
One approved RFC can cover several tickets. Only when the diff has no new or
updated RFC, look for a direct file URL in the PR description. Accept a plain
URL or a Markdown link anywhere in the text. Verify that the RFC exists on the
target branch of this repository. The branch, tag or commit in the link does
not matter: the comment links the file on the target branch. Recheck when the
author edits the description, even without a new commit.
A link to another PR does not identify the RFC file. Searching old PRs or
comments is unnecessary. A link in the description cannot override an invalid
filename in the diff.
h3. What to leave out and why
* *Check the RFC file and its name only.* An RFC file is any Markdown file in
{{rfcs/}} except {{rfcs/TEMPLATE.md}}. Skip the PR title and RFC contents. The
reviewer checks that the plan covers the actual change and reviews
compatibility. The reviewer also checks that an RFC updated under a new ticket
keeps its original ticket number.
* *Keep approval with the reviewer.* The reviewer checks exceptions and any
required dev-list vote. The bot does not read dev@, count votes, require a vote
URL or track PR approvals. Skip labels and approval overrides. Normal PR review
already covers implementation approval.
* *Require evidence from the diff.* A file path can help locate a declaration.
A path match, a changed test or a method-body edit alone cannot show that the
contract changed. Leave uncertain runtime effects to code review. The public
contract excludes node-to-node traffic and diagnostic wording with no external
guarantee.
h3. Implementation ideas
Compare compiled builds of the target branch and of the PR merged into it. A
build shows inherited members, generated code and computed values the way users
see them. Source text alone does not.
Consider every area below. Each comparison is an idea for the implementation.
Prefer declarations or formats that Ignite already maintains. The reviewer can
accept, simplify, replace or drop any of these ideas. Document areas where only
code review can establish the effect.
||Public contract||Comparison idea||Not compared, and why||
|Language and client APIs, plugins and SPIs|Public and protected types and
members of the packages published in javadoc: signatures, supertypes, constant
values, enum order, annotation defaults, deprecation and
{{@IgniteExperimental}}. The .NET API of the projects in the API documentation
and the C++ API of the installed headers, except their internal namespaces,
described only when the PR changes the platform.|Nothing.|
|SQL|Keywords of the Calcite parser and of the native DDL parser. Calcite
operators and functions with their allowed signatures.|Functions of the H2
engine: they come from the H2 library, and Ignite does not list them.|
|REST|Command names accepted in the {{cmd}} parameter.|Parameters and response
fields of each command: the handlers read and write them by name in code, and
no declaration lists them.|
|CLI|{{control.sh}} commands and subcommands, including whether a command is
experimental (its own mark, which {{control.sh}} checks) or deprecated (its own
or a parent's mark) and whether it asks for confirmation, named and positional
parameters with their types, accepted enum values and whether they are
required, parameter groups, common options and exit codes. Options of
{{ignite.sh}} that its argument parser handles.|Options of {{ignite.bat}} and
the help option of the launcher: Java code parses them, with no declaration.|
|Configuration|Configuration classes through the Java API, including default
value constants. System properties printed by {{ignite.sh -systemProps}}: name,
type, default value and deprecation. Connection properties of the JDBC thin
driver: name, whether required, default and accepted values. Attributes of the
ODBC connection string with their types and defaults.|Distributed properties:
Ignite creates them when a node starts. Environment variables of the scripts:
the scripts read them among their internal variables, with no list of their
own.|
|Monitoring|Name, type and position of each system view column. JMX interfaces
and event types through the Java API.|Metric names and types and system view
names: Ignite registers them when a node starts, often under computed names.|
|Client protocols and external serialization|Thin client operation codes,
status codes, protocol versions and feature IDs. JDBC and ODBC request types
and protocol versions. Binary format constants.|Layout of thin client, JDBC and
ODBC messages: the code that reads and writes the fields sets it.|
|Stored data, WAL and snapshots|WAL record type indices, page IO types, the
latest version of each page type and the serialization version of snapshot
metadata.|Layout of WAL records and pages: the code that reads and writes them
sets it. The serialized form of stored cache configurations: the stored classes
are yet to be identified. Versions of pages that Ignite registers when a node
starts.|
|Distribution and runtime|Entries of {{ignite-bom}} as Maven publishes it, the
Java release that the build targets, the minimum Java version in the launch
scripts, the launch scripts, NuGet package IDs and their target
frameworks.|Docker images and DEB and RPM packages: separate scripts build
them, and the check does not read them yet.|
|Errors across interfaces|SQLSTATE values, query error codes and the SQLSTATE
of each code, thin client status codes and {{control.sh}} exit codes.|Nothing.|
|Results, effects and operations|Public modes and defaults of transactions,
retries and cancellation through the Java API.|Nothing beyond behavior.|
Behavior is outside what the check compares, and the reviewer checks it:
returned values and side effects, ordering, timeouts and when callbacks and
events run; custom validation of {{control.sh}} arguments and the command
output; which queries succeed and what they return; defaults computed at
runtime; source and binary compatibility beyond signatures, and whether
internal types in public signatures are public API; version negotiation and
supported client/server combinations; reading old data, migration and recovery;
supported JDK and OS combinations and upgrade paths; the conditions that cause
each error.
* *Java API scope.* Describe the modules listed in {{ignite-bom}}. Count
members inherited from internal classes as members of the public type. Skip
types generated during the build: they serialize node-to-node messages, which
are outside the contract.
* *Internal types in public signatures.* Report when a public signature starts
or stops using an internal type, but do not describe the members of that type.
Public signatures expose kernel types this way, so describing them would make
internal refactoring need an RFC.
* *Internal names.* Renaming an internal constant, enum constant or system view
row class is not a change when its values stay the same. Keep the names in the
comparison, so two codes that swap values are still reported. Identify a code
by its group, such as thin client operations, and its name, not by its class,
so moving codes to another class is not a change. Match a rename only within
the same group, so a removed operation code is not taken for a new status code
with the same value.
* *Internal codes.* Take protocol, storage and error codes from a list of
internal classes and the groups of their codes kept in the check. Fail the
check when a listed class disappears or loses its codes. A new class with codes
needs an entry in the list. Describe values that Ignite derives from codes,
such as the SQLSTATE of a query error code, for the whole group, whatever class
declares a code. {{@Deprecated}} on an internal constant is not a public mark:
removing such a code needs an RFC like any other.
* *Exact names and values.* A change of any character of a compared name or
value is a change, including a space. A collector may ignore whitespace only
where the syntax ignores it, such as in an SQL signature.
* *Runtime registrations.* Ignite registers metrics, distributed properties and
system view names at runtime, often under computed names. Leave them to code
review.
* *Deprecation hint.* Show the commit and date of the last change to the
deprecation and the first Apache Ignite release that contains it. Take release
tags from apache/ignite, because a fork may have old tags only.
* *Inherited members from the javac model.* The check walks internal supertypes
itself and substitutes their type arguments. It skips static methods of
internal interfaces, because Java does not inherit them. Other inheritance
rules come from the javac model ({{Elements.getAllMembers()}} and
{{Types.asMemberOf()}}). For example, a public class that overrides
{{Hidden<T>.put(T)}} with {{put(String)}} has no extra {{put(Object)}}. Today
the check describes that extra overload, so deprecating only the internal
method needs an RFC. Master has no such case yet. The move replaces most of the
Java API part, so compare the full description of master before and after it.
h3. Keeping the check working
The check reads internal Ignite classes, and PRs change them.
* *Each build is described by its own version of the check.* The PR merge is
described by the version of the PR, the target branch by its own version. A
version of the check compiles only with the code it is written for. A PR that
changes code the check reads updates the check in the same PR. If the target
branch has no check or its check fails, the version of the PR describes it.
* *Changes to the check show up as findings.* When a version of the check
describes the same code differently, the difference is reported. A PR cannot
hide its own changes by changing the check. An RFC that changes what the check
compares covers the reported additions and removals.
* *The check runs from the PR.* So the reviewer of a PR that changes the check
reviews that change.
* *The tests of the check run in the PR job.* The comment job runs from the
target branch, so its changes are tested in a fork before the merge.
h3. Reviewing the implementation
Review each proposed rule and its implementation against the public contract.
Use a change it should report and a similar edit it should let through. Example
pairs to review include adding a CLI flag versus editing its help, and moving a
system view column versus renumbering priorities without moving it.
Verify both RFC paths, the deprecated and experimental API warning, the
filename error and the technical failure. Test the reports and comment updates
on a fork PR before making the check required on master. Document actual
coverage and link DEVNOTES to the [development
processes|https://github.com/apache/ignite/tree/master/rfcs].
was:
Add a GitHub Actions check called *Public behavior changes* for PRs to master.
Show what changed for an Ignite user and where. The [public
contract|https://github.com/apache/ignite/blob/master/rfcs/IGNITE-29219-public-api-and-compatibility.md]
sets the scope. The [RFC
process|https://issues.apache.org/jira/browse/IGNITE-29220] covers compatible
additions as well as breaking changes and defines the exceptions.
h3. Agreed behavior
{noformat}
Can the check confirm a change covered by the public RFC process?
├─ Cannot read or compare the change → Fail: check could not finish.
├─ No change confirmed → Pass. Stop before looking for an RFC.
├─ The PR changes only the check → Pass with a review warning.
├─ Only removed deprecated declarations or experimental API changes → Pass with
a review warning.
└─ Yes → Did the PR add or update an RFC file?
├─ Yes → Check the names of all added or updated RFC files.
│ ├─ Any invalid name → Fail: fix the filename.
│ └─ All names valid → Pass with a review warning.
└─ No → Does the PR description link directly to an existing RFC file on the
target branch?
├─ Yes → Pass with a review warning.
└─ No valid link or file missing → Fail: RFC needed.
{noformat}
* *Fix the filename.* Show the offending path, the expected form
{{rfcs/IGNITE-<ticket>-<short-title>.md}} and a valid example.
* *RFC needed.* Show what changed and where. Ask the author to add or update an
RFC file, or link to an existing one.
* *Review warning.* In Checks and the PR comment, list the changes and their
locations. Link directly to the RFC for the reviewer.
* *Deprecated or experimental API.* List each removed declaration that the
target branch marks as deprecated and each change to an API marked
{{@IgniteExperimental}}. The RFC process lets authors remove APIs deprecated
before it without an RFC. Experimental APIs may change in any release. The
reviewer decides whether such a change needs an RFC. Where it is cheap, show
when the deprecation was added, for example the commit and the first release
that contain it.
* *Changes to the check only.* List what the new version of the check describes
differently on the target branch. The reviewer checks that the check still
describes everything that users rely on.
* *Check could not finish.* Show the cause and whether to fix the PR, update
the check in the PR or rerun the check. Name the file of the check to update.
The bot reports each outcome in Checks and in one PR comment. The comment tells
the author what to change and the reviewer what to check. When the findings or
advice change, the bot deletes its previous comment and posts a new one. A
clean PR, including an RFC-only PR, gets no comment. If the bot commented
earlier, the new comment says that all earlier issues are resolved.
h3. Finding an existing RFC
One approved RFC can cover several tickets. Only when the diff has no new or
updated RFC, look for a direct file URL in the PR description. Accept a plain
URL or a Markdown link anywhere in the text. Verify that the RFC exists on the
target branch of this repository. The branch, tag or commit in the link does
not matter: the comment links the file on the target branch. Recheck when the
author edits the description, even without a new commit.
A link to another PR does not identify the RFC file. Searching old PRs or
comments is unnecessary. A link in the description cannot override an invalid
filename in the diff.
h3. What to leave out and why
* *Check the RFC file and its name only.* An RFC file is any Markdown file in
{{rfcs/}} except {{rfcs/TEMPLATE.md}}. Skip the PR title and RFC contents. The
reviewer checks that the plan covers the actual change and reviews
compatibility. The reviewer also checks that an RFC updated under a new ticket
keeps its original ticket number.
* *Keep approval with the reviewer.* The reviewer checks exceptions and any
required dev-list vote. The bot does not read dev@, count votes, require a vote
URL or track PR approvals. Skip labels and approval overrides. Normal PR review
already covers implementation approval.
* *Require evidence from the diff.* A file path can help locate a declaration.
A path match, a changed test or a method-body edit alone cannot show that the
contract changed. Leave uncertain runtime effects to code review. The public
contract excludes node-to-node traffic and diagnostic wording with no external
guarantee.
h3. Implementation ideas
Compare compiled builds of the target branch and of the PR merged into it. A
build shows inherited members, generated code and computed values the way users
see them. Source text alone does not.
Consider every area below. Each comparison is an idea for the implementation.
Prefer declarations or formats that Ignite already maintains. The reviewer can
accept, simplify, replace or drop any of these ideas. Document areas where only
code review can establish the effect.
||Public contract||Comparison idea||Not compared, and why||
|Language and client APIs, plugins and SPIs|Public and protected types and
members of the packages published in javadoc: signatures, supertypes, constant
values, enum order, annotation defaults, deprecation and
{{@IgniteExperimental}}.|The .NET and C++ APIs: the check builds only Java.|
|SQL|Keywords of the Calcite parser and of the native DDL parser. Calcite
operators and functions with their allowed signatures.|Functions of the H2
engine: they come from the H2 library, and Ignite does not list them.|
|REST|Command names accepted in the {{cmd}} parameter.|Parameters and response
fields of each command: the handlers read and write them by name in code, and
no declaration lists them.|
|CLI|{{control.sh}} commands and subcommands, including whether a command is
experimental (its own mark, which {{control.sh}} checks) or deprecated (its own
or a parent's mark) and whether it asks for confirmation, named and positional
parameters with their types, accepted enum values and whether they are
required, parameter groups, common options and exit codes. Options of
{{ignite.sh}} that its argument parser handles.|Options of {{ignite.bat}} and
the help option of the launcher: Java code parses them, with no declaration.|
|Configuration|Configuration classes through the Java API, including default
value constants. System properties printed by {{ignite.sh -systemProps}}: name,
type, default value and deprecation. Connection properties of the JDBC thin
driver: name, whether required, default and accepted values.|Distributed
properties: Ignite creates them when a node starts. Environment variables of
the scripts: the scripts read them among their internal variables, with no list
of their own.|
|Monitoring|Name, type and position of each system view column. JMX interfaces
and event types through the Java API.|Metric names and types and system view
names: Ignite registers them when a node starts, often under computed names.|
|Client protocols and external serialization|Thin client operation codes,
status codes, protocol versions and feature IDs. JDBC and ODBC request types
and protocol versions. Binary format constants.|Layout of thin client, JDBC and
ODBC messages: the code that reads and writes the fields sets it. Attributes of
the ODBC connection string: the ODBC driver is written in C++.|
|Stored data, WAL and snapshots|WAL record type indices, page IO types, the
latest version of each page type and the serialization version of snapshot
metadata.|Layout of WAL records and pages: the code that reads and writes them
sets it. The serialized form of stored cache configurations: the stored classes
are yet to be identified. Versions of pages that Ignite registers when a node
starts.|
|Distribution and runtime|Entries of {{ignite-bom}} as Maven publishes it, the
Java release that the build targets, the minimum Java version in the launch
scripts, the launch scripts, NuGet package IDs and their target
frameworks.|Docker images and DEB and RPM packages: separate scripts build
them, and the check does not read them yet.|
|Errors across interfaces|SQLSTATE values, query error codes and the SQLSTATE
of each code, thin client status codes and {{control.sh}} exit codes.|Nothing.|
|Results, effects and operations|Public modes and defaults of transactions,
retries and cancellation through the Java API.|Nothing beyond behavior.|
Behavior is outside what the check compares, and the reviewer checks it:
returned values and side effects, ordering, timeouts and when callbacks and
events run; custom validation of {{control.sh}} arguments and the command
output; which queries succeed and what they return; defaults computed at
runtime; source and binary compatibility beyond signatures, and whether
internal types in public signatures are public API; version negotiation and
supported client/server combinations; reading old data, migration and recovery;
supported JDK and OS combinations and upgrade paths; the conditions that cause
each error.
* *Java API scope.* Describe the modules listed in {{ignite-bom}}. Count
members inherited from internal classes as members of the public type. Skip
types generated during the build: they serialize node-to-node messages, which
are outside the contract.
* *Internal types in public signatures.* Report when a public signature starts
or stops using an internal type, but do not describe the members of that type.
Public signatures expose kernel types this way, so describing them would make
internal refactoring need an RFC.
* *Internal names.* Renaming an internal constant, enum constant or system view
row class is not a change when its values stay the same. Keep the names in the
comparison, so two codes that swap values are still reported. Identify a code
by its group, such as thin client operations, and its name, not by its class,
so moving codes to another class is not a change. Match a rename only within
the same group, so a removed operation code is not taken for a new status code
with the same value.
* *Internal codes.* Take protocol, storage and error codes from a list of
internal classes and the groups of their codes kept in the check. Fail the
check when a listed class disappears or loses its codes. A new class with codes
needs an entry in the list. Describe values that Ignite derives from codes,
such as the SQLSTATE of a query error code, for the whole group, whatever class
declares a code. {{@Deprecated}} on an internal constant is not a public mark:
removing such a code needs an RFC like any other.
* *Exact names and values.* A change of any character of a compared name or
value is a change, including a space. A collector may ignore whitespace only
where the syntax ignores it, such as in an SQL signature.
* *Runtime registrations.* Ignite registers metrics, distributed properties and
system view names at runtime, often under computed names. Leave them to code
review.
* *Deprecation hint.* Show the commit and date of the last change to the
deprecation and the first Apache Ignite release that contains it. Take release
tags from apache/ignite, because a fork may have old tags only.
* *Inherited members from the javac model.* The check walks internal supertypes
itself and substitutes their type arguments. It skips static methods of
internal interfaces, because Java does not inherit them. Other inheritance
rules come from the javac model ({{Elements.getAllMembers()}} and
{{Types.asMemberOf()}}). For example, a public class that overrides
{{Hidden<T>.put(T)}} with {{put(String)}} has no extra {{put(Object)}}. Today
the check describes that extra overload, so deprecating only the internal
method needs an RFC. Master has no such case yet. The move replaces most of the
Java API part, so compare the full description of master before and after it.
h3. Keeping the check working
The check reads internal Ignite classes, and PRs change them.
* *Each build is described by its own version of the check.* The PR merge is
described by the version of the PR, the target branch by its own version. A
version of the check compiles only with the code it is written for. A PR that
changes code the check reads updates the check in the same PR. If the target
branch has no check or its check fails, the version of the PR describes it.
* *Changes to the check show up as findings.* When a version of the check
describes the same code differently, the difference is reported. A PR cannot
hide its own changes by changing the check. An RFC that changes what the check
compares covers the reported additions and removals.
* *The check runs from the PR.* So the reviewer of a PR that changes the check
reviews that change.
* *The tests of the check run in the PR job.* The comment job runs from the
target branch, so its changes are tested in a fork before the merge.
h3. Reviewing the implementation
Review each proposed rule and its implementation against the public contract.
Use a change it should report and a similar edit it should let through. Example
pairs to review include adding a CLI flag versus editing its help, and moving a
system view column versus renumbering priorities without moving it.
Verify both RFC paths, the deprecated and experimental API warning, the
filename error and the technical failure. Test the reports and comment updates
on a fork PR before making the check required on master. Document actual
coverage and link DEVNOTES to the [development
processes|https://github.com/apache/ignite/tree/master/rfcs].
> Check public behavior changes on pull requests
> ----------------------------------------------
>
> Key: IGNITE-29326
> URL: https://issues.apache.org/jira/browse/IGNITE-29326
> Project: Ignite
> Issue Type: Task
> Reporter: Anton Vinogradov
> Assignee: Anton Vinogradov
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Add a GitHub Actions check called *Public behavior changes* for PRs to
> master. Show what changed for an Ignite user and where. The [public
> contract|https://github.com/apache/ignite/blob/master/rfcs/IGNITE-29219-public-api-and-compatibility.md]
> sets the scope. The [RFC
> process|https://issues.apache.org/jira/browse/IGNITE-29220] covers compatible
> additions as well as breaking changes and defines the exceptions.
> h3. Agreed behavior
> {noformat}
> Can the check confirm a change covered by the public RFC process?
> ├─ Cannot read or compare the change → Fail: check could not finish.
> ├─ No change confirmed → Pass. Stop before looking for an RFC.
> ├─ The PR changes only the check → Pass with a review warning.
> ├─ Only removed deprecated declarations or experimental API changes → Pass
> with a review warning.
> └─ Yes → Did the PR add or update an RFC file?
> ├─ Yes → Check the names of all added or updated RFC files.
> │ ├─ Any invalid name → Fail: fix the filename.
> │ └─ All names valid → Pass with a review warning.
> └─ No → Does the PR description link directly to an existing RFC file on
> the target branch?
> ├─ Yes → Pass with a review warning.
> └─ No valid link or file missing → Fail: RFC needed.
> {noformat}
> * *Fix the filename.* Show the offending path, the expected form
> {{rfcs/IGNITE-<ticket>-<short-title>.md}} and a valid example.
> * *RFC needed.* Show what changed and where. Ask the author to add or update
> an RFC file, or link to an existing one.
> * *Review warning.* In Checks and the PR comment, list the changes and their
> locations. Link directly to the RFC for the reviewer.
> * *Deprecated or experimental API.* List each removed declaration that the
> target branch marks as deprecated and each change to an API marked
> {{@IgniteExperimental}}. The RFC process lets authors remove APIs deprecated
> before it without an RFC. Experimental APIs may change in any release. The
> reviewer decides whether such a change needs an RFC. Where it is cheap, show
> when the deprecation was added, for example the commit and the first release
> that contain it.
> * *Changes to the check only.* List what the new version of the check
> describes differently on the target branch. The reviewer checks that the
> check still describes everything that users rely on.
> * *Check could not finish.* Show the cause and whether to fix the PR, update
> the check in the PR or rerun the check. Name the file of the check to update.
> The bot reports each outcome in Checks and in one PR comment. The comment
> tells the author what to change and the reviewer what to check. When the
> findings or advice change, the bot deletes its previous comment and posts a
> new one. A clean PR, including an RFC-only PR, gets no comment. If the bot
> commented earlier, the new comment says that all earlier issues are resolved.
> h3. Finding an existing RFC
> One approved RFC can cover several tickets. Only when the diff has no new or
> updated RFC, look for a direct file URL in the PR description. Accept a plain
> URL or a Markdown link anywhere in the text. Verify that the RFC exists on
> the target branch of this repository. The branch, tag or commit in the link
> does not matter: the comment links the file on the target branch. Recheck
> when the author edits the description, even without a new commit.
> A link to another PR does not identify the RFC file. Searching old PRs or
> comments is unnecessary. A link in the description cannot override an invalid
> filename in the diff.
> h3. What to leave out and why
> * *Check the RFC file and its name only.* An RFC file is any Markdown file in
> {{rfcs/}} except {{rfcs/TEMPLATE.md}}. Skip the PR title and RFC contents.
> The reviewer checks that the plan covers the actual change and reviews
> compatibility. The reviewer also checks that an RFC updated under a new
> ticket keeps its original ticket number.
> * *Keep approval with the reviewer.* The reviewer checks exceptions and any
> required dev-list vote. The bot does not read dev@, count votes, require a
> vote URL or track PR approvals. Skip labels and approval overrides. Normal PR
> review already covers implementation approval.
> * *Require evidence from the diff.* A file path can help locate a
> declaration. A path match, a changed test or a method-body edit alone cannot
> show that the contract changed. Leave uncertain runtime effects to code
> review. The public contract excludes node-to-node traffic and diagnostic
> wording with no external guarantee.
> h3. Implementation ideas
> Compare compiled builds of the target branch and of the PR merged into it. A
> build shows inherited members, generated code and computed values the way
> users see them. Source text alone does not.
> Consider every area below. Each comparison is an idea for the implementation.
> Prefer declarations or formats that Ignite already maintains. The reviewer
> can accept, simplify, replace or drop any of these ideas. Document areas
> where only code review can establish the effect.
> ||Public contract||Comparison idea||Not compared, and why||
> |Language and client APIs, plugins and SPIs|Public and protected types and
> members of the packages published in javadoc: signatures, supertypes,
> constant values, enum order, annotation defaults, deprecation and
> {{@IgniteExperimental}}. The .NET API of the projects in the API
> documentation and the C++ API of the installed headers, except their internal
> namespaces, described only when the PR changes the platform.|Nothing.|
> |SQL|Keywords of the Calcite parser and of the native DDL parser. Calcite
> operators and functions with their allowed signatures.|Functions of the H2
> engine: they come from the H2 library, and Ignite does not list them.|
> |REST|Command names accepted in the {{cmd}} parameter.|Parameters and
> response fields of each command: the handlers read and write them by name in
> code, and no declaration lists them.|
> |CLI|{{control.sh}} commands and subcommands, including whether a command is
> experimental (its own mark, which {{control.sh}} checks) or deprecated (its
> own or a parent's mark) and whether it asks for confirmation, named and
> positional parameters with their types, accepted enum values and whether they
> are required, parameter groups, common options and exit codes. Options of
> {{ignite.sh}} that its argument parser handles.|Options of {{ignite.bat}} and
> the help option of the launcher: Java code parses them, with no declaration.|
> |Configuration|Configuration classes through the Java API, including default
> value constants. System properties printed by {{ignite.sh -systemProps}}:
> name, type, default value and deprecation. Connection properties of the JDBC
> thin driver: name, whether required, default and accepted values. Attributes
> of the ODBC connection string with their types and defaults.|Distributed
> properties: Ignite creates them when a node starts. Environment variables of
> the scripts: the scripts read them among their internal variables, with no
> list of their own.|
> |Monitoring|Name, type and position of each system view column. JMX
> interfaces and event types through the Java API.|Metric names and types and
> system view names: Ignite registers them when a node starts, often under
> computed names.|
> |Client protocols and external serialization|Thin client operation codes,
> status codes, protocol versions and feature IDs. JDBC and ODBC request types
> and protocol versions. Binary format constants.|Layout of thin client, JDBC
> and ODBC messages: the code that reads and writes the fields sets it.|
> |Stored data, WAL and snapshots|WAL record type indices, page IO types, the
> latest version of each page type and the serialization version of snapshot
> metadata.|Layout of WAL records and pages: the code that reads and writes
> them sets it. The serialized form of stored cache configurations: the stored
> classes are yet to be identified. Versions of pages that Ignite registers
> when a node starts.|
> |Distribution and runtime|Entries of {{ignite-bom}} as Maven publishes it,
> the Java release that the build targets, the minimum Java version in the
> launch scripts, the launch scripts, NuGet package IDs and their target
> frameworks.|Docker images and DEB and RPM packages: separate scripts build
> them, and the check does not read them yet.|
> |Errors across interfaces|SQLSTATE values, query error codes and the SQLSTATE
> of each code, thin client status codes and {{control.sh}} exit
> codes.|Nothing.|
> |Results, effects and operations|Public modes and defaults of transactions,
> retries and cancellation through the Java API.|Nothing beyond behavior.|
> Behavior is outside what the check compares, and the reviewer checks it:
> returned values and side effects, ordering, timeouts and when callbacks and
> events run; custom validation of {{control.sh}} arguments and the command
> output; which queries succeed and what they return; defaults computed at
> runtime; source and binary compatibility beyond signatures, and whether
> internal types in public signatures are public API; version negotiation and
> supported client/server combinations; reading old data, migration and
> recovery; supported JDK and OS combinations and upgrade paths; the conditions
> that cause each error.
> * *Java API scope.* Describe the modules listed in {{ignite-bom}}. Count
> members inherited from internal classes as members of the public type. Skip
> types generated during the build: they serialize node-to-node messages, which
> are outside the contract.
> * *Internal types in public signatures.* Report when a public signature
> starts or stops using an internal type, but do not describe the members of
> that type. Public signatures expose kernel types this way, so describing them
> would make internal refactoring need an RFC.
> * *Internal names.* Renaming an internal constant, enum constant or system
> view row class is not a change when its values stay the same. Keep the names
> in the comparison, so two codes that swap values are still reported. Identify
> a code by its group, such as thin client operations, and its name, not by its
> class, so moving codes to another class is not a change. Match a rename only
> within the same group, so a removed operation code is not taken for a new
> status code with the same value.
> * *Internal codes.* Take protocol, storage and error codes from a list of
> internal classes and the groups of their codes kept in the check. Fail the
> check when a listed class disappears or loses its codes. A new class with
> codes needs an entry in the list. Describe values that Ignite derives from
> codes, such as the SQLSTATE of a query error code, for the whole group,
> whatever class declares a code. {{@Deprecated}} on an internal constant is
> not a public mark: removing such a code needs an RFC like any other.
> * *Exact names and values.* A change of any character of a compared name or
> value is a change, including a space. A collector may ignore whitespace only
> where the syntax ignores it, such as in an SQL signature.
> * *Runtime registrations.* Ignite registers metrics, distributed properties
> and system view names at runtime, often under computed names. Leave them to
> code review.
> * *Deprecation hint.* Show the commit and date of the last change to the
> deprecation and the first Apache Ignite release that contains it. Take
> release tags from apache/ignite, because a fork may have old tags only.
> * *Inherited members from the javac model.* The check walks internal
> supertypes itself and substitutes their type arguments. It skips static
> methods of internal interfaces, because Java does not inherit them. Other
> inheritance rules come from the javac model ({{Elements.getAllMembers()}} and
> {{Types.asMemberOf()}}). For example, a public class that overrides
> {{Hidden<T>.put(T)}} with {{put(String)}} has no extra {{put(Object)}}. Today
> the check describes that extra overload, so deprecating only the internal
> method needs an RFC. Master has no such case yet. The move replaces most of
> the Java API part, so compare the full description of master before and after
> it.
> h3. Keeping the check working
> The check reads internal Ignite classes, and PRs change them.
> * *Each build is described by its own version of the check.* The PR merge is
> described by the version of the PR, the target branch by its own version. A
> version of the check compiles only with the code it is written for. A PR that
> changes code the check reads updates the check in the same PR. If the target
> branch has no check or its check fails, the version of the PR describes it.
> * *Changes to the check show up as findings.* When a version of the check
> describes the same code differently, the difference is reported. A PR cannot
> hide its own changes by changing the check. An RFC that changes what the
> check compares covers the reported additions and removals.
> * *The check runs from the PR.* So the reviewer of a PR that changes the
> check reviews that change.
> * *The tests of the check run in the PR job.* The comment job runs from the
> target branch, so its changes are tested in a fork before the merge.
> h3. Reviewing the implementation
> Review each proposed rule and its implementation against the public contract.
> Use a change it should report and a similar edit it should let through.
> Example pairs to review include adding a CLI flag versus editing its help,
> and moving a system view column versus renumbering priorities without moving
> it.
> Verify both RFC paths, the deprecated and experimental API warning, the
> filename error and the technical failure. Test the reports and comment
> updates on a fork PR before making the check required on master. Document
> actual coverage and link DEVNOTES to the [development
> processes|https://github.com/apache/ignite/tree/master/rfcs].
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)