Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to handle catalog IT validation(resolve schema from subject) #1055

Merged
merged 3 commits into from
May 28, 2024

Conversation

ankitk-me
Copy link
Contributor

No description provided.

Comment on lines 278 to 289
if (assertion.resolve)
{
String schema = handler.resolve(id);
if (assertion.schema == null && schema != null)
{
doInitialReset(traceId);
}
else if (assertion.schema != null && !assertion.schema.equals(schema))
{
doInitialReset(traceId);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add the explicit concept of resolve as a boolean, or is it sufficient to derive that intent from assertion.schema != null instead ?

This perhaps seems more intuitive since it would read as asserting the id and schema, agree?

@@ -275,7 +278,7 @@ private void onInitialBegin(
{
doInitialReset(traceId);
}
if (assertion.resolve)
if (!Objects.equals(DEFAULT_ASSERTION_SCHEMA, assertion.schema))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!Objects.equals(DEFAULT_ASSERTION_SCHEMA, assertion.schema))
if (assertion.schema != DEFAULT_ASSERTION_SCHEMA)

@@ -275,7 +278,7 @@ private void onInitialBegin(
{
doInitialReset(traceId);
}
if (assertion.resolve)
if (!Objects.equals(DEFAULT_ASSERTION_SCHEMA, assertion.schema))
{
String schema = handler.resolve(id);
if (assertion.schema == null && schema != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                                if (!Objects.equals(assertion.schema, schema))
                                {
                                     doInitialReset(traceId);
                                }

@jfallows jfallows merged commit e500419 into aklivity:develop May 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants