Skip to content
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

ecspresso run fails without --propagate-tags flag #457

Closed
lamanotrama opened this issue Nov 9, 2022 · 4 comments · Fixed by #462
Closed

ecspresso run fails without --propagate-tags flag #457

lamanotrama opened this issue Nov 9, 2022 · 4 comments · Fixed by #462
Labels

Comments

@lamanotrama
Copy link

lamanotrama commented Nov 9, 2022

Version

v1.99.0

Summary

I understand that if --propagate-tags is not specified, the propagateTags api parameter is set to NONE by default, but for some reason, without the flag, the request fails with an invalid value error.
If I specify --propagate-tags TASK_DEFINITION, it succeeds.

Error output example

$ ecspresso run --config ecspresso.yml
2022/11/09 17:51:25.531482 ecspresso-test/api Running task
2022/11/09 17:51:25.534606 ecspresso-test/api Registering a new task definition...
2022/11/09 17:51:26.460098 ecspresso-test/api Task definition is registered ecspresso-test:48
2022/11/09 17:51:26.679482 ecspresso-test/api Task definition ARN: arn:aws:ecs:us-east-1:xxxx:task-definition/ecspresso-test:48
2022/11/09 17:51:26.679549 ecspresso-test/api Watch container: hello
2022/11/09 17:51:26.679844 ecspresso-test/api Running task with arn:aws:ecs:us-east-1:xxxx:task-definition/ecspresso-test:48
2022/11/09 17:51:26.931123 [ERROR] run FAILED. failed to run task: operation error ECS: RunTask, https response error StatusCode: 400, RequestID: ddb230d3-e92d-4656-877b-1ffa3f58cade, InvalidParameterException: Invalid value for propagateTags
@fujiwara
Copy link
Contributor

Thank you for reporting!

I've been fixed it in 5389184, but it was not released yet.

v1.99.1 pre released now. Please try it!

@lamanotrama
Copy link
Author

Thanks!
But when I tried v1.99.1 , got a panic by SIGSEGV.

$ ecspresso run --config ecspresso.yml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x20f70e9]

goroutine 1 [running]:
github.com/kayac/ecspresso.(*App).Start(0x0?, {0x2769338?, 0xc000525380?})
        github.com/kayac/ecspresso/ecspresso.go:131 +0x29
github.com/kayac/ecspresso.(*App).Run(0x0?, {0x2769338?, 0xc000525380?}, {0xc000235761, 0xc00009dc40, 0xc000235771, 0xc00009dc90, 0xc00009dcc0, 0xc000235789, 0xc0002357a0, ...})
        github.com/kayac/ecspresso/run.go:43 +0x66
github.com/kayac/ecspresso.dispatchCLI({0x2769338, 0xc000525380}, {0xc0001f9246, 0x3}, 0xc0001de1c0)
        github.com/kayac/ecspresso/cli.go:114 +0x27c
github.com/kayac/ecspresso.CLI({0x2769338, 0xc000525380}, 0x315bd00?)
        github.com/kayac/ecspresso/cli.go:150 +0x96
main.main()
        github.com/kayac/ecspresso/cmd/ecspresso/main.go:25 +0xce

So, I tried v1.99.0 with only the following changes applied and built it, and run succeeded.

-	case "":
-		in.PropagateTags = types.PropagateTagsNone
+	case "", "NONE":
+		// XXX ECS says > InvalidParameterException: Invalid value for propagateTags
+		// in.PropagateTags = types.PropagateTagsNone
+		in.PropagateTags = ""

Another commit or change seems to be the cause of the panic.

@fujiwara
Copy link
Contributor

@lamanotrama This panic was caused by timeout not being defined in the config file.
I've fixed it in #462, and v1.99.3 was released today. Please try again!

@lamanotrama
Copy link
Author

Success with v1.99.3!

I'll close here.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants