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.
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
Organization List Feature in Server AWS Node Attester Plugin "aws_iid" #4838
Organization List Feature in Server AWS Node Attester Plugin "aws_iid" #4838
Changes from all commits
a3c1723
bb0b0b8
4daf960
babd6d7
d78195a
2b60032
77a1c96
d0138f9
5f7474c
d00e3e4
6061cd6
0b9c761
74ab21d
4ea7ced
53cf266
6e3a796
c46bc63
d86447b
bdd93df
b058b6f
63d0414
aa9bf03
ecbc583
a733311
d6ac953
a75443f
5574983
477257e
116e069
4bb278e
dd6e6d1
425e030
c92438a
7de7241
7e2d944
d60dd1b
acf8437
09259dd
b1e6aab
6395767
dcc4c1f
8da601d
33fa8e1
5cc3756
a87ab20
34e2b8d
dacdbb7
1963e01
168bc17
7713e13
5d0e5c2
c239048
d1ed524
bb27241
dcce1c0
2007792
66e23e0
570d578
e7905eb
4760cd7
6bcd5fc
1f36e11
0d8614c
0671aed
8e815f1
b840804
e6a5423
328b0b4
44a3216
f3339c5
e592089
22e2b66
2e2aa01
98941de
28614ff
d65480e
391e89e
dca217b
cbfdcc0
f8c4fc9
b9f5518
20afd4d
799c084
fcbd790
c3b97f7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
why creating a new empty config is required?, why not to use the one from config?
you are already verifying it is not nil when required.
and in case of clients.configure you can validate it is not nil as you are doing here.
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.
@MarcosDY so i added new variable so that I dont touch existing code too much.
In this case i didnt want to spoil client config
function. As struct is copied in configure function, we will need to perform empty check against the struct and it will look something like below, please lmk which one you prefer or if there is better way to write this validation. And I will change accordingly.
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 think we can avoid setting this since if its empty we can use default that will be already a duration,
and when invalid it will fail.
Another thing we can do here is not use
AccountListTTL
but store the duration we already parsed.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.
Would you mind elaborating more on it ? I am thinking if we don't set it here, when we access this configuration we will need to do check for empty or parse this string everytime.
Right, yes we do this already once we know the config is clean, setup defaults wherever required.
So when client is configured we set this in duration
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.
since ttl was already parsed in
why to keep this as an string?
string will be used only for logs, but duration is the one used in code,
and you will need to parse this again after validation...
so why not to parse it once and keep it?
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.
so the function
validateOrganizationConfig
all it's doing is just verifying/cleaning the configuration passed and adding defaults where required.Now in this case as the object passed to this functions is instance of config which was read as String from the config file, am reassigning the default in string format.
Thats correct, we parse it
just once again
after this & then avoid parsing it again & again as we instantiate the instance of this verification method, its done here.Please lmk if this answers your concern.