-
Notifications
You must be signed in to change notification settings - Fork 54
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(EDR): adds EDR state machine for handling EDR renewal #620
Merged
wolf4ood
merged 4 commits into
eclipse-tractusx:main
from
wolf4ood:feat/600_auto_renewal_edr
Jul 20, 2023
Merged
feat(EDR): adds EDR state machine for handling EDR renewal #620
wolf4ood
merged 4 commits into
eclipse-tractusx:main
from
wolf4ood:feat/600_auto_renewal_edr
Jul 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wolf4ood
force-pushed
the
feat/600_auto_renewal_edr
branch
17 times, most recently
from
July 19, 2023 06:28
2231e34
to
c34ca18
Compare
ndr-brt
reviewed
Jul 19, 2023
...main/java/org/eclipse/tractusx/edc/edr/core/defaults/InMemoryEndpointDataReferenceCache.java
Outdated
Show resolved
Hide resolved
...main/java/org/eclipse/tractusx/edc/edr/core/defaults/InMemoryEndpointDataReferenceCache.java
Show resolved
Hide resolved
...c/testFixtures/java/org/eclipse/tractusx/edc/edr/spi/EndpointDataReferenceCacheBaseTest.java
Outdated
Show resolved
Hide resolved
...c/testFixtures/java/org/eclipse/tractusx/edc/edr/spi/EndpointDataReferenceCacheBaseTest.java
Outdated
Show resolved
Hide resolved
core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/EdrCoreExtension.java
Outdated
Show resolved
Hide resolved
core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/manager/EdrManagerImpl.java
Outdated
Show resolved
Hide resolved
core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/service/EdrServiceImpl.java
Show resolved
Hide resolved
core/edr-core/src/test/java/org/eclipse/tractusx/edc/edr/core/EdrCoreExtensionTest.java
Show resolved
Hide resolved
core/edr-core/src/test/java/org/eclipse/tractusx/edc/edr/core/EdrCoreServiceExtensionTest.java
Outdated
Show resolved
Hide resolved
.../java/org/eclipse/tractusx/edc/edr/store/sql/PostgresqlTransactionalStoreSetupExtension.java
Outdated
Show resolved
Hide resolved
wolf4ood
force-pushed
the
feat/600_auto_renewal_edr
branch
6 times, most recently
from
July 19, 2023 16:02
9ea3e14
to
1c4b1d8
Compare
wolf4ood
force-pushed
the
feat/600_auto_renewal_edr
branch
from
July 19, 2023 20:49
1c4b1d8
to
ac35761
Compare
paullatzelsperger
approved these changes
Jul 20, 2023
deployment tests will work again after #633 is merged, and this PR is rebased onto |
wolf4ood
force-pushed
the
feat/600_auto_renewal_edr
branch
from
July 20, 2023 13:13
ac35761
to
79a582c
Compare
wolf4ood
force-pushed
the
feat/600_auto_renewal_edr
branch
from
July 20, 2023 13:34
4a02b1e
to
9da1d48
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHAT
Implements a state machine for EDR renewal. Once an EDR is first negotiated the state machine will boostrap the
cached entry with a
Negotiated
state.The state machine is composed by the following states:
Negotiated
the primordial state. The EDR has been negotiated with the provided and stored in the EDR storeRefreshing
the EDR is about to expire and another transfer process has been started for negotiating anotherEDR
token with the same parametersExpired
: Once a new EDR is negotiated the old one is marked asExpired
waiting for deletionDeleting
: Once the the retention period is expired EDR are marked as deletingThe EDR cached entry gets deleted by picking from the state machine the one that are in
Deleting
state.WHY
User experience. Once the first Negotiate EDR request has been fulfill the EDR extension will ensure to renew automatically the EDR token before it expires.
FURTHER NOTES
Also in this PR the E2E test based on PostgreSQL has been moved to testcontainers. When wi will upgrade to EDC > 0.1.3
we could also leverage to the refactored
PostgresqlStoreSetupExtension
that uses testcontainers as well for testing the EDR storage.Also in this PR for supporting testcontainers I've created a
TxPostgresqlLocalInstance
copy of the upstream one. It's mark for removal once we upgrade to the next EDC version.Closes #600