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

major: ACNA-2584 - add Adobe App Builder State Store #134

Merged
merged 16 commits into from
Jan 8, 2024
Merged

Conversation

shazron
Copy link
Member

@shazron shazron commented Dec 19, 2023

This is a breaking change. The CosmosDB State Store has been removed, and we will be using our own State Store.
Note for put, the new restriction is we can only push strings, not any other types like objects.

The change has been designed to be "drop in" for existing users, so they won't need to change their code except if they have been pushing non-string data to the state store, they will have to stringify their values now.

How Has This Been Tested?

Note that the e2e tests will only run in node-16, for node-18+ you will need this update in @adobe/aio-lib-core-networking: adobe/aio-lib-core-networking@87a2e7f

  • npm test
  • e2e tests (using the adp-state-storage local server)

MERGING NOTES (DO NOT MERGE UNTIL COMPLETED)

  • The prod and stage endpoints have not been finalized, there are placeholder urls in lib/constants.js
  • The Adobe AB State Store has been released to production

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@moritzraho moritzraho left a comment

Choose a reason for hiding this comment

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

Nice!
I've added a few inline comments already.

There is a lot of cp/paste from StateStore.js into AdobeStateStore.js but it would also be unnecessary work to support the StateStore.js interface for the App Builder Storage State service as the CosmosDB implementation differs in the API, input validation, limits,..
Maybe we are better off ditching the CosmosDB support + generic interface altogether and focusing on supporting one implementation.

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (04027cf) 100.00% compared to head (2f12dbd) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #134   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          173       166    -7     
  Branches        36        29    -7     
=========================================
- Hits           173       166    -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shazron shazron changed the title 🚧 WIP feat: ACNA-2584 - add Adobe State Store feat: ACNA-2584 - add Adobe State Store Dec 21, 2023
@shazron shazron marked this pull request as ready for review December 21, 2023 14:10
@shazron shazron changed the title feat: ACNA-2584 - add Adobe State Store feat: ACNA-2584 - add Adobe App Builder State Store Jan 4, 2024
Copy link
Member

@moritzraho moritzraho left a comment

Choose a reason for hiding this comment

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

lgtm!

Few esthetics nitpicks

@sandeep-paliwal
Copy link
Contributor

Maybe we are better off ditching the CosmosDB support + generic interface altogether and focusing on supporting one implementation.

@moritzraho @shazron What will be impact on support of BYO creds by not sticking to generic interface? Will it mean that the new state lib will not support BYO creds now?

@shazron
Copy link
Member Author

shazron commented Jan 8, 2024

Maybe we are better off ditching the CosmosDB support + generic interface altogether and focusing on supporting one implementation.

@moritzraho @shazron What will be impact on support of BYO creds by not sticking to generic interface? Will it mean that the new state lib will not support BYO creds now?

Moritz and I discussed this: since this is a major version update, we won't break existing users since if they want to do BYO creds for CosmosDB, they can use the previous major version. We can have a 2.x branch there if we need to patch for security updates but going forward we will only develop for 3.x (this update).

@shazron shazron merged commit 9afdc73 into master Jan 8, 2024
7 checks passed
@shazron shazron deleted the story/ACNA-2584 branch January 8, 2024 14:15
@evgeniykapelko
Copy link

@shazron Please tell me, is it possible to specify search criteria as get parameters? I haven't found any documentation on the state of the Adobe App Builder Store.

@evgeniykapelko
Copy link

Hey @shazron Please tell me where I can look at the documentation for Adobe State Store?

I see that all requests go to the https://storage-state-amer.app-builder.adp.adobe.io domain or http://storage-state-amer.stg.app-builder.corp.adp.adobe.io, but I didn’t find any documentation about what other endpoints are provided?

Regards,
Eugene

@moritzraho
Copy link
Member

moritzraho commented Jan 9, 2024

Hi @evgeniykapelko, thanks for your interest!
The Adobe State storage service is still a work in progress and there is no documentation for it as of now. This PR is not going to be released yet.
We will eventually support listing keys, but this may not be part of the first State service release.

@moritzraho moritzraho changed the title feat: ACNA-2584 - add Adobe App Builder State Store major: ACNA-2584 - add Adobe App Builder State Store Jan 9, 2024
@shazron shazron restored the story/ACNA-2584 branch January 9, 2024 14:40
shazron added a commit that referenced this pull request Jan 9, 2024
@shazron
Copy link
Member Author

shazron commented Jan 30, 2024

this PR was merged, but reverted. New PR with the same changes at #135

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.

5 participants