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

image: image.Deprecated is deprecated: The deprecation status associated with this image #767

Closed
bh7cw opened this issue Dec 3, 2020 · 2 comments · Fixed by #774
Closed
Assignees
Labels
api: compute Issues related to the Compute Engine API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bh7cw
Copy link

bh7cw commented Dec 3, 2020

golang-ci lint shows the error:

image.Deprecated is deprecated: The deprecation status associated with this image.  (staticcheck)

According to:

type Image struct {
	// ArchiveSizeBytes: Size of the image tar.gz archive stored in Google
	// Cloud Storage (in bytes).
	ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"`

	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
	// format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`

	// Deprecated: The deprecation status associated with this image.
	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`

Deprecated was supported, but it's deprecated now.

According to doc, deprecated is still supported.

How to check the deprecated status of image through api?

@codyoss codyoss added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: compute Issues related to the Compute Engine API. labels Dec 3, 2020
@codyoss
Copy link
Member

codyoss commented Dec 3, 2020

Hey, thanks for the report. This field is not actually deprecated. staticcheck just reports it as such because the godoc starts with Deprecated:. It looks like our generator writes docs as (fieldname): (description) and the field name here happens to be Deprecated . The offending code lies here: https://github.com/googleapis/google-api-go-client/blob/master/google-api-go-generator/gen.go#L1359.

@bh7cw
Copy link
Author

bh7cw commented Dec 3, 2020

Hah, okay. Thank you for quick reply and clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants