-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat!: DBTP-1506 Update platform helper codebase deploy command to trigger manual deployment pipeline #698
feat!: DBTP-1506 Update platform helper codebase deploy command to trigger manual deployment pipeline #698
Conversation
…l and response object properties
❌ 5 Tests Failed:
View the top 3 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
@@ -3,7 +3,7 @@ | |||
# Todo: Can we get rid of this yet? | |||
PLATFORM_HELPER_VERSION_FILE = ".platform-helper-version" | |||
# Todo: Move to ??? | |||
DEFAULT_TERRAFORM_PLATFORM_MODULES_VERSION = "5" | |||
DEFAULT_TERRAFORM_PLATFORM_MODULES_VERSION = "7" |
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.
Do we have version 7 of TPM?
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.
@chiaramapellimt , Version 7 is to be released, that's why this is part of a breaking change.
Version 6 will be the work on the IP filter spoofing that's still waiting to be merged.
Then this PR and John's work on the codebase pipelines will be in version 7.
It's so that we don't over burden services with lots of breaking changes at once I believe, this keeps the new logic seperate.
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 a breaking change for platform-tools
when we update the main default version of terraform-platform-modules
?
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.
Yes, it should be actually. It will force users with pipelines to use a later breaking version of t-p-m
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.
@antroy-madetech Might be better placed to answer that
dbt_platform_helper/utils/aws.py
Outdated
@@ -433,6 +433,11 @@ def start_build_extraction(codebuild_client, build_options): | |||
return response["build"]["arn"] | |||
|
|||
|
|||
def start_pipeline_extraction(codepipeline_client, build_options): |
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.
Should this be "start_pipeline_execution"?
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.
@antroy-madetech It could be as yes we are starting the pipeline execution here. But we are also extracting the execution_id and returning it from this function to create the pipeline execution URL
I followed the existing convention as there is a similar method that extracts the arn from a codebuild response.
I'll leave it you whether you think it shoud be changed.
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 change it. The important thing that this is doing is starting the pipeline execution. Perhaps "start_pipeline_and_return_execution_id" or something similar would also work. Or just "start_pipeline" and describe what it returns in the docstring?
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.
Renamed to start_pipeline_and_return_execution_id
@@ -397,19 +385,6 @@ def test_codebase_deploy_does_not_trigger_build_with_missing_environment(mock_ap | |||
) | |||
|
|||
|
|||
def test_codebase_deploy_does_not_trigger_deployment_without_confirmation(): |
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.
Are we no longer doing confirmation?
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 looked like a duplicate test. There is a test for "without_confirmation" 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.
Approved pending the changes suggested
@@ -3,7 +3,7 @@ | |||
# Todo: Can we get rid of this yet? | |||
PLATFORM_HELPER_VERSION_FILE = ".platform-helper-version" | |||
# Todo: Move to ??? | |||
DEFAULT_TERRAFORM_PLATFORM_MODULES_VERSION = "5" | |||
DEFAULT_TERRAFORM_PLATFORM_MODULES_VERSION = "7" |
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.
Yes, it should be actually. It will force users with pipelines to use a later breaking version of t-p-m
dbt_platform_helper/utils/aws.py
Outdated
@@ -433,6 +433,11 @@ def start_build_extraction(codebuild_client, build_options): | |||
return response["build"]["arn"] | |||
|
|||
|
|||
def start_pipeline_extraction(codepipeline_client, build_options): |
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 change it. The important thing that this is doing is starting the pipeline execution. Perhaps "start_pipeline_and_return_execution_id" or something similar would also work. Or just "start_pipeline" and describe what it returns in the docstring?
Addresses DBTP-1506
Breaking change that will require a coordinated merge with the codebase pipeline work that's happening. Bumped the default Terraform Platform Modules version to 7 for this reason. Version 7 is to be released. Version 6 will be the work on the IP filter spoofing that's still waiting to be merged. Then this PR and John's work on the codebase pipelines will be in version 7.
Required to pull in the terraform code that John is working on for the codebase pipeline and re-deploy my environment
That work provisions an IAM role
<application>-<environment>-codebase-pipeline-deploy
which is required so that the manual codebase pipeline can assume it and run things in the user’s environment.Required to update
demodjango-deploy/terraform/environments/<environment>/main.tf
with a new parameter,pipeline_account_id
, that gets passed to theterraform-platform-modules/extensions
moduleManual codebase deployment pipeline
Running command:
platform-helper codebase deploy --app demodjango --env tony --codebase application --commit 26628fb
produces the following pipeline execution url:
https://eu-west-2.console.aws.amazon.com/codesuite/codepipeline/pipelines/demodjango-test-manual-release-pipeline/executions/dfbbb4c4-2ca1-4eb5-9909-ecf5c4c5f59f
Checklist:
Title:
Description:
Tasks: