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

fix: EDR refresh Synchronization #1648

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

rafaelmag110
Copy link
Contributor

WHAT

Adds #1633 to main.

WHY

Consistency.

Closes #1618

* Failing test and added code to make it pass

* Created module for EdrLockSql and added statements

* alter test to check for correct response

* remove debug messages

* Introduce InMemoryEdrLock

* working version

* improve test for two different edrs.

* code dup

* refactor inmem acquireLock

* handle

* handle2

* refactor in mem EDR lock

* update EdrServiceImpl to enable force refresh

* Remove non existing job from verify.yaml

* Add ComponentTests

* fix failing uts

* Removes global lock in inmem variant

* inmem release lock should be atomic

* retrigger CI

* retrigger CI

@Override
public void initialize(ServiceExtensionContext context) {
var dataSourceName = DataSourceName.getDataSourceName(DATASOURCE_NAME, DATASOURCE_SETTING_NAME, context.getConfig(), context.getMonitor());

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
DataSourceName.getDataSourceName
should be avoided because it has been deprecated.
if (expiresInString == null) {
return false;
}
var expiresIn = Long.parseLong(expiresInString);

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
Copy link

sonarcloud bot commented Oct 24, 2024

@wolf4ood wolf4ood merged commit 03df535 into eclipse-tractusx:main Oct 25, 2024
33 checks passed
@rafaelmag110 rafaelmag110 added the bug Something isn't working label Oct 25, 2024
@rafaelmag110 rafaelmag110 deleted the edr_sinchronize_main branch October 25, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

EDR Token Refresh auto refresh result is non deterministic
3 participants