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
[...After v2.4] Refactoring getStack API #1182
base: main
Are you sure you want to change the base?
Conversation
remove unused param target_lable from create_stack
remove unused param target_lable from create_stack
uri param should set by name
About first point
Do we need it? Is there any way for user to getStack without entering the resource page first? |
Moving this PR to v2.6 so we can take time to discuss and align on this |
As a third option I would rescue the EventBridge notifications from environment to central account design by @SofiaSazonova in #922 |
Feature or Bugfix
Detail
Add additional permission checks to ensure read permissions on specific target resource in order to call
getStack
Removed
StackStatus
component from frontend because....(1) StackStatus was also calling
getStack
but withouttarget_uri
ortarget_label
(rather than update to include new inputs it did not seem necessary, continued explanation below)(2) it appears
StackStatus
primarily defined in order tosetInterval()
to keep checking on stack status on a recurring basisBut this interval clears when the component unmounts and user switches to a new UI view in data.all
Found in practice that this is not always reliable at least with current implementation of getStack() being run on an interval of every 10 seconds
We already call getStack and save the latest status when we resolve the stack field for the object we are viewing (i.e.
resolve_stack
child resolver inDataPipeline
Object Type)The rationale for using interval I imagine is to make sure we have latest stack status reflective of actual state of data.all resource (which can be used in some cases such as
listValidEnvironment()
)Additional Thoughts:
(OPTIONAL) Add back the StackStatus component primarily for the snackbar notifications based on status value
(OPTIONAL) Add a background recurring ECS task that describes all stacks and updates status according (to ensure we continue to have a more accurate reflection of stack status)
Relates
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.