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

message type "google.appengine.logging.v1.RequestLog" isn't linked in #423

Closed
broady opened this issue Nov 11, 2016 · 12 comments
Closed

message type "google.appengine.logging.v1.RequestLog" isn't linked in #423

broady opened this issue Nov 11, 2016 · 12 comments
Assignees
Labels
api: logging Issues related to the Cloud Logging API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone

Comments

@broady
Copy link
Contributor

broady commented Nov 11, 2016

logging: unmarshalling proto payload: any: message type "google.appengine.logging.v1.RequestLog" isn't linked in

Code:

func main() {
	ctx := context.Background()

	lc, err := logadmin.NewClient(ctx, "cbro-scratch")
	if err != nil {
		errorf("logadmin.NewClient: %v", err)
	}

	entries := lc.Entries(ctx)
	for {
		e, err := entries.Next()
		if err != nil {
			errorf("Entries: %v", err)
		}
		log.Print(e.Payload)
	}
}
@broady
Copy link
Contributor Author

broady commented Nov 11, 2016

cc @zombiezen

@zombiezen
Copy link
Contributor

Aha, I have a fix. Do we know what other types can occur in here?

@broady
Copy link
Contributor Author

broady commented Nov 11, 2016

I'm not sure, I think they could be anything. Is there no general solution for this?

@jba
Copy link
Contributor

jba commented Nov 11, 2016

There's a small list. See
https://github.com/googleapis/googleapis/issues/187. I did the main audit
log proto but haven't gotten around to the other ones.

On Fri, Nov 11, 2016 at 3:57 PM Chris Broadfoot notifications@github.com
wrote:

I'm not sure, I think they could be anything. Is there no general solution
for this?


You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub
#423 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARoHZZnUFOkuAv1UPp7pKzIQgqI8FrDyks5q9NaogaJpZM4KwGOL
.

@zombiezen
Copy link
Contributor

@jba, that bug doesn't mention RequestLog, which is where this error came from.

@jba
Copy link
Contributor

jba commented Aug 8, 2017

@pongad looks like we need to add

_ google.golang.org/genproto/googleapis/appengine/logging/v1

to the import list of logadmin.go. We already do this for audit logs so I assume there away to configure it.

@jba jba assigned pongad and unassigned jba Aug 8, 2017
@jba jba added this to the Fixit 2017 Q3 milestone Aug 8, 2017
@jba jba added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: logging Issues related to the Cloud Logging API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Aug 8, 2017
@pongad
Copy link
Contributor

pongad commented Aug 9, 2017

Sorry, I don't completely understand this. Are appengine/logging/v1 and cloud/audit somehow privileged that we should always include them? From the proto doc it looks like any service can define its own error type and messages of those types can be fetched. Shouldn't it be up to the user to link in these types? Otherwise, I think we'd have to make logadmin.go import every possible log types right?

@jba
Copy link
Contributor

jba commented Aug 9, 2017

No, there's a fixed set of services that can use protos, so a fixed set of types. There is a list somewhere, but for now we can just link in this proto.

BTW, I was wrong in thinking this was an issue in generated code. It's just a one-line change to the handwritten logadmin client.

Running broady's code will only be an adequate test for you if you've written GAE logs to your project. If not, then ask broady to test for you.

@pongad
Copy link
Contributor

pongad commented Aug 10, 2017

@broady I just submitted CL that should fix this. Could you try again?

gopherbot pushed a commit that referenced this issue Aug 10, 2017
Updates #423.

Change-Id: I168c9ebcc19ff30c18ec33c14f0c8f84598847aa
Reviewed-on: https://code-review.googlesource.com/15650
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
@jba
Copy link
Contributor

jba commented Aug 22, 2017

Assuming this specific issue (linking in RequestLog) is fixed.

@jba jba closed this as completed Aug 22, 2017
@broady
Copy link
Contributor Author

broady commented Aug 22, 2017

Weird. My code doesn't print any log entries.

Does it need a filter? It shouldn't, right?

@pongad
Copy link
Contributor

pongad commented Aug 22, 2017

That's really odd. @broady do you know an easy way to give my test project an appengine log? I can try testing it on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants