linkedin / rest.li

Rest.li is a REST+JSON framework for building robust, scalable service architectures using dynamic discovery and simple asynchronous APIs.
rest.li
Other
2.51k stars 546 forks source link

Add Enum symbols order change as compatible message in checker #802

Closed aman1309 closed 2 years ago

aman1309 commented 2 years ago

This is added to fail equivalent compatibility check and also avoid skipping publish snapshot/idl task which are only executed if snapshot/idl are not equivalent.

nickibi commented 2 years ago

I am not clear on why we need to check enum symbol order now? If enum symbol order changes and users run check/publish snasphot task, the task will be skipped? If so, does it because when enum symbol order changes, we do not print anything in the report doc, therefore the check/publish snapshot task is skipped? Whether it applies to any field order changes in a schema?

aman1309 commented 2 years ago

I am not clear on why we need to check enum symbol order now? If enum symbol order changes and users run check/publish snasphot task, the task will be skipped? If so, does it because when enum symbol order changes, we do not print anything in the report doc, therefore the check/publish snapshot task is skipped? Whether it applies to any field order changes in a schema?

yes if the report doc is empty publish snapshot task is skipped. Field order change could also result is same issue let me check if we should handle that https://github.com/linkedin/rest.li/blob/10bd7b0cd358dfc50f3775e5bec3473123b0f588/gradle-plugins/src/main/java/com/linkedin/pegasus/gradle/PegasusPlugin.java#L1385