-
Notifications
You must be signed in to change notification settings - Fork 82
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
Refactor core/environment&stack module - part 2 #1169
Refactor core/environment&stack module - part 2 #1169
Conversation
Remove queries from stack/api/resolvers
@@ -63,7 +63,7 @@ def update_stack_output(session, stack): | |||
aws = SessionHelper.remote_session(stack.accountid, stack.region) | |||
cfn = aws.resource('cloudformation', region_name=stack.region) | |||
try: | |||
stack_outputs = cfn.Stack(f'{stack.name}').outputs | |||
stack_outputs = cfn.StackRepository(f'{stack.name}').outputs |
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 is not referring to the data.all Stack class but to the aws resource cfn.Stack!
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.
Oh, the naming was confusing...
@@ -26,11 +26,12 @@ from aws_cdk import ( | |||
) | |||
from dataall.base.cdkproxy.stacks import stack | |||
|
|||
|
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 is also not refering to the StackRepository but to aws_cdk.Stack.
The whole block should be:
from aws_cdk import (
aws_s3 as s3,
aws_sqs as sqs,
core,
Stack
)
@stack(stack="mypredefinedstack")
class MyPredefinedStack(Stack):
def __init__(self, scope, id, **kwargs):
super().__init__(scope, id, **kwargs)
# constructs goes here
@@ -435,8 +435,8 @@ def _deploy_dataset_stack(dataset: Dataset): | |||
stack_helper.deploy_stack(dataset.environmentUri) | |||
|
|||
@staticmethod | |||
def _create_dataset_stack(session, dataset: Dataset) -> Stack: | |||
return Stack.create_stack( | |||
def _create_dataset_stack(session, dataset: Dataset) -> StackRepository: |
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 function should return a Stack
model from dataall/core/stacks/db/stack_models.py
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 are some tiny bugs, but overall looks good
This reverts commit 0d25401.
Tested changes locally and created an environment - all functionality working as expected Think just need to fix the |
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.
looks good! Ready to merge
Feature or Bugfix
Detail
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.