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

feat!: Enable destination cache by default #5440

Merged
merged 38 commits into from
Feb 19, 2025

Conversation

KavithaSiva
Copy link
Collaborator

@KavithaSiva KavithaSiva commented Feb 4, 2025

Closes SAP/cloud-sdk-backlog#ISSUENUMBER.

  • I know which base branch I chose for this PR, as the default branch is v3-main now, which is not for v4 development.
  • If my change will be merged into the main branch (for v4), I've updated (V4-Upgrade-Guide.md)[./V4-Upgrade-Guide.md] in case my change has any implications for users updating to SDK v4

@KavithaSiva KavithaSiva changed the title feat(v4)!: Enable destination cache by deafult feat(v4)!: Enable destination cache by default Feb 4, 2025
@KavithaSiva KavithaSiva marked this pull request as ready for review February 6, 2025 09:10
@deekshas8 deekshas8 changed the title feat(v4)!: Enable destination cache by default feat!: Enable destination cache by default Feb 12, 2025
@deekshas8
Copy link
Contributor

deekshas8 commented Feb 12, 2025

I believe we should also consider getAllDestinationsFromDestinationService

Copy link
Contributor

@deekshas8 deekshas8 left a comment

Choose a reason for hiding this comment

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

Left some comments

@@ -37,6 +38,8 @@ import {
alwaysSubscriber,
subscriberFirst
} from './destination-selection-strategies';
import { destinationServiceCache } from './destination-service-cache';
import { destinationCache } from './destination-cache';
Copy link
Contributor

Choose a reason for hiding this comment

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

[req] Instead of importing this, you can change the fetchDestination function and set usecache false there. I believe in the original tests, that was the case we were testing under anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As this test contains tests that test both getAllDestinationsFromDestinationService() and getDestinationFromDestinationService(), this I would prefer to import them and clear them instead before tests for a clean state.

Copy link
Contributor

Choose a reason for hiding this comment

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

My idea was to not change the original premise of the test, which was no caching. We're not testing for caching here (atleast for getDestination) so why bother with having a cache and then clearing it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have disabled caching for the first set of tests, still need it though for tests that cover fetching all destinations.

Copy link
Contributor

@deekshas8 deekshas8 left a comment

Choose a reason for hiding this comment

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

Sorry for one more round. After this we're ready to merge

@KavithaSiva
Copy link
Collaborator Author

Sorry for one more round. After this we're ready to merge

No issues.

Copy link
Contributor

@deekshas8 deekshas8 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@KavithaSiva KavithaSiva merged commit d69325a into main Feb 19, 2025
16 checks passed
@KavithaSiva KavithaSiva deleted the feat/enable-default-destination-cache branch February 19, 2025 13:11
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