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

Added request logging to ecs custom resource. #1154

Merged
merged 9 commits into from
Sep 1, 2020

Conversation

russellballestrini
Copy link
Contributor

also ran go fmt

modified:   server/cloudformation/ecs.go

also ran `go fmt`

	modified:   server/cloudformation/ecs.go
	modified:   pkg/cloudformation/customresources/customresources.go
	modified:   server/cloudformation/ecs.go
	modified:   pkg/cloudformation/customresources/customresources.go
	modified:   server/cloudformation/ecs.go
@@ -95,6 +95,9 @@ func newECSServiceProvisioner(resource *ECSServiceResource) *provisioner {
}

func (p *ECSServiceResource) Create(ctx context.Context, req customresources.Request) (string, interface{}, error) {
// TODO: how to make this a debug log level?
fmt.Printf("%+v\n", req)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fmt.Printf("%+v\n", req)
fmt.Printf("%+v\n", *req.PropagateTags)

I think you need to do that. That'll print the actual string referenced by req.PropagateTags.

@aengelas
Copy link
Contributor

aengelas commented Sep 1, 2020

This looks like it works, but I think that there's an edge case where you pass a customresources reference but the struct is missing one or more fields. I think that'll be a nil pointer error. I'll take a look at that in the morning. I think this should unblock you testing, @russellballestrini.

@russellballestrini russellballestrini marked this pull request as ready for review September 1, 2020 03:09
@russellballestrini russellballestrini merged commit 7ab6b86 into master Sep 1, 2020
@russellballestrini russellballestrini deleted the rb-go-fmt-and-logging branch September 1, 2020 03:10
aengelas added a commit to aengelas/empire that referenced this pull request Sep 4, 2020
aengelas added a commit that referenced this pull request Sep 4, 2020
aengelas added a commit to aengelas/empire that referenced this pull request Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants