This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new a3fb5800000 IGNITE-25974 Verify platform ErrorGroups generation (#7961)
a3fb5800000 is described below
commit a3fb5800000b3a6922be9929a036570a640f9392
Author: Dmitriy Zabotlin <[email protected]>
AuthorDate: Thu Apr 9 12:57:51 2026 +0300
IGNITE-25974 Verify platform ErrorGroups generation (#7961)
Verifies that committed generated error group files (C++, C#) are in sync
with Java error code definitions.
Co-authored-by: dzabotlin <[email protected]>
---
modules/api/build.gradle | 42 ++++++++++++++++++++++
modules/platforms/cpp/ignite/common/error_codes.h | 1 -
.../platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs | 6 ----
3 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/modules/api/build.gradle b/modules/api/build.gradle
index f7e07b8df29..b3143584a2f 100644
--- a/modules/api/build.gradle
+++ b/modules/api/build.gradle
@@ -52,4 +52,46 @@ artifacts {
}
}
+def checkGeneratedPlatformHeaders =
tasks.register('checkGeneratedErrorGroupFiles', Task) {
+ description = 'Verifies that committed generated error group files (C++,
C#) are in sync with Java error code definitions. ' +
+ 'If this fails, run \'./gradlew :platforms:copyPlatformsHeaders\'
and commit the result.'
+ dependsOn compileJava
+
+ doLast {
+ def failures = []
+
+ [
+ 'cpp/ignite/common/error_codes.h',
+ 'dotnet/Apache.Ignite/ErrorCodes.g.cs'
+ ].each { relativePath ->
+ def generatedFile = file("${platformsHeadersDir}/${relativePath}")
+ def committedFile =
file("${rootDir}/modules/platforms/${relativePath}")
+
+ if (!generatedFile.exists()) {
+ failures << "Generated file not found: ${generatedFile}"
+ return
+ }
+
+ if (!committedFile.exists()) {
+ failures << "modules/platforms/${relativePath} is missing —
run './gradlew :platforms:copyPlatformsHeaders' and commit."
+ return
+ }
+
+ if (generatedFile.text != committedFile.text) {
+ failures << "modules/platforms/${relativePath} is out of date
with ErrorGroups.java."
+ }
+ }
+
+ if (!failures.isEmpty()) {
+ throw new GradleException(
+ "Generated platform headers are out of sync with Java error
code definitions.\n" +
+ "Run './gradlew :platforms:copyPlatformsHeaders' and commit
the result.\n" +
+ "Affected files:\n" + failures.collect { " - $it" }.join("\n")
+ )
+ }
+ }
+}
+
+check.dependsOn checkGeneratedErrorGroupFiles
+
description = 'ignite-api'
diff --git a/modules/platforms/cpp/ignite/common/error_codes.h
b/modules/platforms/cpp/ignite/common/error_codes.h
index a852a9c6b83..c77988469fa 100644
--- a/modules/platforms/cpp/ignite/common/error_codes.h
+++ b/modules/platforms/cpp/ignite/common/error_codes.h
@@ -167,7 +167,6 @@ enum class code : underlying_t {
// Network group. Group code: 11
UNRESOLVABLE_CONSISTENT_ID = 0xb0001,
BIND = 0xb0002,
- // Error codes 0xb0003 (FILE_TRANSFER) and 0xb0004 (FILE_VALIDATION) were
removed along with the file-transfer module.
RECIPIENT_LEFT = 0xb0005,
ADDRESS_UNRESOLVED = 0xb0006,
PORT_IN_USE [[deprecated("PORT_IN_USE is deprecated. Use BIND instead.")]]
= BIND,
diff --git a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
index 36db50e89bf..7b2f868e85f 100644
--- a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
@@ -483,12 +483,6 @@ namespace Apache.Ignite
/// <summary> Bind error. </summary>
public const int Bind = (GroupCode << 16) | (2 & 0xFFFF);
- /// <summary> FileTransfer error. </summary>
- public const int FileTransfer = (GroupCode << 16) | (3 & 0xFFFF);
-
- /// <summary> FileValidation error. </summary>
- public const int FileValidation = (GroupCode << 16) | (4 & 0xFFFF);
-
/// <summary> RecipientLeft error. </summary>
public const int RecipientLeft = (GroupCode << 16) | (5 & 0xFFFF);