RamenDR / ramen

Apache License 2.0
72 stars 52 forks source link

Define local API version for PreferredDecision #1344

Closed ShyamsundarR closed 3 months ago

ShyamsundarR commented 4 months ago

This helps remove the dependency on multicloud-operators-placementrule dependency in go.mod. Enabling a more cleaner module for dependent components to import and use.

Fixes #1343

ShyamsundarR commented 4 months ago

@raghavendra-talur and @BenamarMk I think this will not cause any API update concerns as I retained the exact same types. I.e if a DPRC exists with a status pointing to the older struct, it would just work with the current one as well once upgraded. Just pointing it out in case I got something incorrect here.

raghavendra-talur commented 3 months ago

The change looks mostly safe to me.

If there is any consumer of DRPC status which is using an older version of the Ramen API, would they get an error or will the unmarshal happen seamlessly, I am not sure.

Another thing to check for is what happens in the upgrade path. Will the API server transition that status properly once the CRD is updated.

The json tags are the same so JSON to GO and vice-versa should be fine.

@ShyamsundarR If you can test a upgrade scenario that would be good. LGTM!

ShyamsundarR commented 3 months ago

The change looks mostly safe to me.

If there is any consumer of DRPC status which is using an older version of the Ramen API, would they get an error or will the unmarshal happen seamlessly, I am not sure.

Another thing to check for is what happens in the upgrade path. Will the API server transition that status properly once the CRD is updated.

The json tags are the same so JSON to GO and vice-versa should be fine.

@ShyamsundarR If you can test a upgrade scenario that would be good. LGTM!

Upgrade using a DRPC from an older image to the newer image and CRD spec tested, and passed.

raghavendra-talur commented 3 months ago

The change looks mostly safe to me. If there is any consumer of DRPC status which is using an older version of the Ramen API, would they get an error or will the unmarshal happen seamlessly, I am not sure. Another thing to check for is what happens in the upgrade path. Will the API server transition that status properly once the CRD is updated. The json tags are the same so JSON to GO and vice-versa should be fine. @ShyamsundarR If you can test a upgrade scenario that would be good. LGTM!

Upgrade using a DRPC from an older image to the newer image and CRD spec tested, and passed.

Thanks!