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

chore(fcm): Deprecate sendToTopic and sendToCondition #2683

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

lahirumaramba
Copy link
Member

  • Mark legacy functions sendToTopic and sendToCondition as deprecated.
  • Remove integration tests for FCM legacy (deprecated) APIs as these APIs will be removed in the upcoming major release.

Copy link
Contributor

@jonathanedey jonathanedey left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@lahirumaramba lahirumaramba merged commit a0cc486 into master Aug 22, 2024
10 checks passed
@lahirumaramba lahirumaramba deleted the lm-remove-depfcm branch August 22, 2024 18:03
@lahirumaramba lahirumaramba changed the title chore(fcm): Deprecate sendToTopic and Condition chore(fcm): Deprecate sendToTopic and sendToCondition Aug 22, 2024
@ert78gb
Copy link

ert78gb commented Aug 23, 2024

Sorry for commenting on closed PR, but deleting test of the deprecated API-s is not lucky, because the funtionality must work until the end of the life of the API(next major release).

@lahirumaramba
Copy link
Member Author

Sorry for commenting on closed PR, but deleting test of the deprecated API-s is not lucky, because the funtionality must work until the end of the life of the API(next major release).

The SDK unfortunately do not have control over the BE REST endpoints. Please refer to the release notes and use the send() API instead the deprecated functions.

@ert78gb
Copy link

ert78gb commented Aug 26, 2024

Yes, the SDK does not control the REST API endpoint. The SDK only warns to the users about the deprecation. This PR not just add deprecation info, but it removes tests too. If this SDK follows the semantic versioning then in the current major version (12) should not remove the test because it ensure every feature of the version 12 is working.

Maybe I am overthinking, but I always do the following procedure to decrease the chance of the unwanted breaking changes.
Because if someone do a code modification in the SDK that breaks the deprecated operations then it not ok, because it is just deprecated and not deleted, so it must work as-is.

  1. API mark operations as deprecated
  2. current release of the SDK mark operations as deprecated
  3. delete the deprecated operations and relevant tests in the SDK.
  4. release a new major version of the SDK. It is a clear indicator for every developer who follows the semantic versioning there is some breaking changes
  5. delete operations in the API side

@lahirumaramba
Copy link
Member Author

Yes, the SDK does not control the REST API endpoint. The SDK only warns to the users about the deprecation. This PR not just add deprecation info, but it removes tests too. If this SDK follows the semantic versioning then in the current major version (12) should not remove the test because it ensure every feature of the version 12 is working.

Maybe I am overthinking, but I always do the following procedure to decrease the chance of the unwanted breaking changes. Because if someone do a code modification in the SDK that breaks the deprecated operations then it not ok, because it is just deprecated and not deleted, so it must work as-is.

  1. API mark operations as deprecated
  2. current release of the SDK mark operations as deprecated
  3. delete the deprecated operations and relevant tests in the SDK.
  4. release a new major version of the SDK. It is a clear indicator for every developer who follows the semantic versioning there is some breaking changes
  5. delete operations in the API side

You are right! I am not disagreeing with you on this.

The steps you have mentioned are what we have done in the past and what we will always try to follow. Unfortunately, in this specific case we are unable to get a major release out before the BE API starts limiting the usage of the deprecated APIs. As a result, the existing integration tests are failing in our SDK CIs blocking the release pipeline. I understand this is not the best approach and we try our best to present the alternatives such as the updated send() API to make is less annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:stage Stage a release candidate release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants