-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[extension/ecsobserver] Add task definition, ec2 and service fetcher #3503
Conversation
cc @Aneurysm9 hmm: it seems the bot picked Anuraag |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
a9cd9fc
to
c7671df
Compare
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
c7671df
to
0aeada8
Compare
continue | ||
} | ||
var def *ecs.TaskDefinition | ||
if cached, ok := f.taskDefCache.Get(arn); ok { |
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.
Is it ok for this not to be atomic? Does the LRU have some sort of construct like computeIfAbsent?
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.
There is only single go routine running, so there is no concurrent access to the LRU cache. The cache is not go routine safe but its only callback is onEvict
and we are not using it.
Old code to show how the fetcher get called by a single ticker
f27df83
to
b5d336b
Compare
Please ensure the dependencies are up-to-date:
|
The dependency error should be fixed by #3735 I think unit test and lint are breaking for all PRs now. I will rebase after the fix is merged. |
Fix is merged please rebase |
b5d336b
to
031c586
Compare
@bogdandrutu rebased, thx. btw: #3333 is also ready to merge. |
This removes unnecessary checks for interface{} types. Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Description:
Most code is in the mock and they looks very similar. Not sure if there is a better way when it comes to generating mock data of specific struct(s) in a for loop.
Link to tracking Issue:
Pending PRs
Previous PRs
Testing:
unit test
Documentation:
No new doc. See existing doc