-
Notifications
You must be signed in to change notification settings - Fork 58
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
base: main
Are you sure you want to change the base?
Conversation
I believe we should also consider |
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
packages/connectivity/src/scp-cf/destination/destination-cache.spec.ts
Outdated
Show resolved
Hide resolved
@@ -37,6 +38,8 @@ import { | |||
alwaysSubscriber, | |||
subscriberFirst | |||
} from './destination-selection-strategies'; | |||
import { destinationServiceCache } from './destination-service-cache'; | |||
import { destinationCache } from './destination-cache'; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
packages/connectivity/src/scp-cf/destination/destination-cache.spec.ts
Outdated
Show resolved
Hide resolved
packages/connectivity/src/scp-cf/destination/destination-cache.spec.ts
Outdated
Show resolved
Hide resolved
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
…sor-provider-subscriber-lookup.spec.ts Co-authored-by: Deeksha Sinha <88374536+deekshas8@users.noreply.github.com>
…sor-provider-subscriber-lookup.spec.ts Co-authored-by: Deeksha Sinha <88374536+deekshas8@users.noreply.github.com>
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
.../connectivity/src/scp-cf/destination/destination-accessor-provider-subscriber-lookup.spec.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
No issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Closes SAP/cloud-sdk-backlog#ISSUENUMBER.
v3-main
now, which is not for v4 development.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