-
Notifications
You must be signed in to change notification settings - Fork 153
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
fix null pointer #4102
fix null pointer #4102
Conversation
Not related to this PR changes but you should update this |
@@ -170,7 +170,7 @@ func (c *client) RunTask(ctx context.Context, taskDefinition types.TaskDefinitio | |||
|
|||
_, err := c.ecsClient.RunTask(ctx, input) | |||
if err != nil { | |||
return fmt.Errorf("failed to run ECS task %s: %w", *taskDefinition.TaskDefinitionArn, err) | |||
return fmt.Errorf("failed to run ECS task %s: %w", *taskDefinition.Family, err) |
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 keep it as is and add a check for TaskDefinicationArn before running task since it doesn't make sense to run a task that does not exist. Please refer to
pipecd/pkg/app/piped/platformprovider/ecs/client.go
Lines 179 to 181 in 21936ef
if taskDefinition.TaskDefinitionArn == nil { | |
return nil, fmt.Errorf("failed to create task set of task family %s: no task definition provided", *taskDefinition.Family) | |
} |
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.
Here you go 👍
b285e6f
to
6f7edd1
Compare
* fix null pointer * apply review
… (#4128) * Keep new line at end of file in yamlprocessor (#4033) * Keep new line at end of file in yamlprocessor * add a new line to the EOF in case of there is no at EOF * update comment * update eventwatcher_test * consider new line at EOF on parsing kubernetes manifest * update go-yaml v1.9.8 * remove TODO because PR of go-yaml was merged * consider to handle multiple new line at EOF * remove indent vioration of tab * support standalone ECS task (#4084) Fixes #2734 * Small lint fix (#4097) * fix null pointer (#4102) * fix null pointer * apply review * Add example for ecs standalone task (#4104) * add example for ecs standalone task * add example for ecs standalone task * wip * add yaml example to docs. * add example for ecs standalone task * wip * add yaml example to docs. * apply review * Update docs/content/en/docs-dev/user-guide/managing-application/defining-app-configuration/ecs.md Co-authored-by: Khanh Tran <[email protected]> Co-authored-by: Khanh Tran <[email protected]> * Add update contributions command (#4114) * Add update contributions command * Update hack/gen-contributions.sh * Run update go deps (#4117) * feature: cli and grpc to disable application (#4119) * Add new line in detailsFormat to fix plan preview format (#4122) * add document how to disable (#4123) Co-authored-by: Kurochan <[email protected]> Co-authored-by: Tomoki Hori <[email protected]> Co-authored-by: Khanh Tran <[email protected]> Co-authored-by: kevin55156 <[email protected]> Co-authored-by: Yoshiaki Ishihara <[email protected]>
What this PR does / why we need it:
The null pointer was causing the error propagation to not work.
So I've corrected it.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: