Skip to content

Commit

Permalink
update apicurio artifact fetch messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vordimous committed Jun 3, 2024
1 parent a23579b commit 4086ca4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,44 @@ public String format(
case UNRETRIEVABLE_ARTIFACT_SUBJECT_VERSION:
{
ApicurioUnretrievableArtifactSubjectVersionExFW ex = extension.unretrievableArtifactSubjectVersion();
result = String.format("%s %s", asString(ex.subject()), asString(ex.version()));
result = String.format(
"Unable to fetch artifact for subject %s with version %s.",
asString(ex.subject()),
asString(ex.version())
);
break;
}
case UNRETRIEVABLE_ARTIFACT_SUBJECT_VERSION_STALE_ARTIFACT:
{
ApicurioUnretrievableArtifactSubjectVersionStaleArtifactExFW ex = extension
.unretrievableArtifactSubjectVersionStaleArtifact();
result = String.format("%s (%s) | stale artifactId (%d)", asString(ex.subject()),
asString(ex.version()), ex.artifactId());
result = String.format(
"Unable to fetch artifact for subject %s with version %s; using stale artifact with id %d.",
asString(ex.subject()),
asString(ex.version()),
ex.artifactId()
);
break;
}
case UNRETRIEVABLE_ARTIFACT_ID:
{
ApicurioUnretrievableArtifactIdExFW ex = extension.unretrievableArtifactId();
result = String.format("%d", ex.artifactId());
result = String.format("Unable to fetch artifact id %d.", ex.artifactId());
break;
}
case RETRIEVED_ARTIFACT_SUBJECT_VERSION:
{
ApicurioRetrievableArtifactSubjectVersionExFW ex = extension.retrievableArtifactSubjectVersion();
result = String.format("%s %s", asString(ex.subject()), asString(ex.version()));
result = String.format("Successfully fetched artifact for subject %s with version %s.",
asString(ex.subject()),
asString(ex.version())
);
break;
}
case RETRIEVED_ARTIFACT_ID:
{
ApicurioRetrievableArtifactIdExFW ex = extension.retrievableArtifactId();
result = String.format("$d", ex.artifactId());
result = String.format("Successfully fetched artifact id %d.", ex.artifactId());
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ telemetry:
- qname: test.catalog0
id: catalog.apicurio.unretrievable.artifact.id
name: CATALOG_APICURIO_UNRETRIEVABLE_ARTIFACT_ID
message: 1
message: Unable to fetch artifact id 1.
- qname: test.catalog0
id: catalog.apicurio.retrievable.artifact.id
name: CATALOG_APICURIO_RETRIEVED_ARTIFACT_ID
message: 1
name: CATALOG_APICURIO_RETRIEVABLE_ARTIFACT_ID
message: Successfully fetched artifact id 1.
catalogs:
catalog0:
type: apicurio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ telemetry:
type: test
options:
events:
- qname: test.catalog0
id: catalog.apicurio.remote.access.rejected
name: CATALOG_APICURIO_REMOTE_ACCESS_REJECTED
message: GET http://localhost:8081/apis/registry/v2/ids/globalIds/1 0
- qname: test.catalog0
id: catalog.apicurio.unretrievable.artifact.subject.version
name: CATALOG_APICURIO_UNRETRIEVABLE_ARTIFACT_SUBJECT_VERSION
message: artifactId latest
message: Unable to fetch artifact for subject artifactId with version latest.
catalogs:
catalog0:
type: apicurio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ telemetry:
- qname: test.catalog0
id: catalog.apicurio.unretrievable.artifact.subject.version
name: CATALOG_APICURIO_UNRETRIEVABLE_ARTIFACT_SUBJECT_VERSION
message: artifactId latest
message: Unable to fetch artifact for subject artifactId with version latest.
- qname: test.catalog0
id: catalog.apicurio.unretrievable.artifact.subject.version.stale.artifact
name: UNRETRIEVABLE_ARTIFACT_SUBJECT_VERSION_STALE_ARTIFACT
message: artifactId (latest) | stale artifactId (1)
name: CATALOG_APICURIO_UNRETRIEVABLE_ARTIFACT_SUBJECT_VERSION_STALE_ARTIFACT
message: Unable to fetch artifact for subject artifactId with version latest; using stale artifact with id 1.
- qname: test.catalog0
id: catalog.apicurio.retrievable.artifact.subject.version
name: CATALOG_APICURIO_RETRIEVED_ARTIFACT_SUBJECT_VERSION
message: artifactId latest
name: CATALOG_APICURIO_RETRIEVABLE_ARTIFACT_SUBJECT_VERSION
message: Successfully fetched artifact for subject artifactId with version latest.
catalogs:
catalog0:
type: apicurio
Expand Down

0 comments on commit 4086ca4

Please sign in to comment.