-
Notifications
You must be signed in to change notification settings - Fork 47
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
chore: refactor component update event handlers #1526
Conversation
@Getter(AccessLevel.PACKAGE) | ||
private final ConcurrentHashMap<String, Set<StreamEventPublisher<ComponentUpdatePolicyEvents>>> | ||
componentUpdateListeners = new ConcurrentHashMap<>(); | ||
|
||
// Listeners registered from plugins | ||
private final ConcurrentHashMap<String, Set<Consumer<ComponentUpdatePolicyEvents>>> |
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.
you can use DefaultConcurrentHashMap
b83f710
to
04d6557
Compare
04d6557
to
003c649
Compare
src/main/java/com/aws/greengrass/builtin/services/lifecycle/LifecycleIPCEventStreamAgent.java
Fixed
Show fixed
Hide fixed
003c649
to
78f1b8c
Compare
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 0623a9c |
Integration Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 0623a9c |
* @throws InvalidArgumentsError if service name or deployment id inputs are invalid | ||
*/ | ||
public void deferComponentUpdate(DeferComponentUpdateRequest request, String serviceName) { | ||
if (!componentUpdateListeners.containsKey(serviceName)) { |
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.
This should be componentUpdateListenersInternal
, right?
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 need to check both maps, will update
a837d7c
to
be480ae
Compare
Binary incompatibility detected for commit 0623a9c. com.aws.greengrass.componentmanager.builtins.ArtifactDownloaderFactory is binary incompatible and is source incompatible because of CONSTRUCTOR_REMOVED Produced by binaryCompatability.py |
Issue #, if available:
Description of changes:
Why is this change necessary:
To allow plugins to subscribe to update events and defer update without needing to use an IPC client
How was this change tested:
Any additional information or context required to review the change:
Documentation Checklist:
Compatibility Checklist:
any deprecated method or type.
Refer to Compatibility Guidelines for more information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.