Fix bug where ccompat and core api would report different compatibility mode values #5251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi everyone. This PR attempts to address a bug that we have recently found. The issue is the following: in various situations the
ccompat/v7
and thecore/v2
APIs may return different values when the user queries the global compatibility level setting. To reproduce this issue:REGISTRY_RULES_GLOBAL_COMPATIBILITY
environment variable toBACKWARD
/apis/ccompat/v7/config
returnsNONE
while GET'ing corresponding core-v2 API endpoint (/apis/registry/v2/admin/rules/COMPATIBILITY
) returnsBACKWARD
. Here, I would have expected the ccompat API to also consult the global rule and returnBACKWARD
, but this is not the case.NONE
using thePUT /apis/registry/v2/admin/rules/COMPATIBILITY
endpoint.NONE
for both APIs. This works fine.NONE
using the/apis/ccompat/v7/config
endpoint/apis/registry/v2/admin/rules/COMPATIBILITY
returnsBACKWARD
while doing the same via the confluent API returnsNONE
. Here, the API call from step 5. simply deletes the compatibility rule, which makes the core API default to theREGISTRY_RULES_GLOBAL_COMPATIBILITY
value, which is not correct IMO.