Skip to content

change ptypes call to timestamppb to fix linters #6164

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

Merged

Conversation

aaron-prindle
Copy link
Contributor

Seeing this error in CI:
full logs: https://app.travis-ci.com/github/GoogleContainerTools/skaffold/jobs/522665097

snippet

INFO [runner] linters took 2m39.517708463s with stages: goanalysis_metalinter: 2m15.060735761s, unused: 24.3748312s 
pkg/skaffold/event/event.go:557:14: SA1019: ptypes.TimestampNow is deprecated: Call the timestamppb.Now function instead. (staticcheck)
		Timestamp: ptypes.TimestampNow(),
		           ^
pkg/skaffold/event/event.go:572:10: SA1019: ptypes.TimestampNow is deprecated: Call the timestamppb.Now function instead. (staticcheck)
		ts:    ptypes.TimestampNow(),
		       ^
pkg/skaffold/event/event.go:28:2: SA1019: package github.com/golang/protobuf/ptypes is deprecated: Well-known types have specialized functionality directly injected into the generated packages for each message type. See the deprecation notice for each function for the suggested alternative. (staticcheck)
	"github.com/golang/protobuf/ptypes"
	^
pkg/skaffold/event/v2/event.go:379:20: SA1019: ptypes.TimestampNow is deprecated: Call the timestamppb.Now function instead. (staticcheck)
	event.Timestamp = ptypes.TimestampNow()
	                  ^
pkg/skaffold/event/v2/event.go:28:2: SA1019: package github.com/golang/protobuf/ptypes is deprecated: Well-known types have specialized functionality directly injected into the generated packages for each message type. See the deprecation notice for each function for the suggested alternative. (staticcheck)
	"github.com/golang/protobuf/ptypes"
	^

@aaron-prindle aaron-prindle requested a review from a team as a code owner July 8, 2021 17:19
@aaron-prindle aaron-prindle requested a review from tejal29 July 8, 2021 17:19
@google-cla google-cla bot added the cla: yes label Jul 8, 2021
Copy link
Contributor

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

lgtm!

@codecov
Copy link

codecov bot commented Jul 8, 2021

Codecov Report

Merging #6164 (e0f3356) into master (6b451a2) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6164      +/-   ##
==========================================
+ Coverage   69.32%   69.35%   +0.02%     
==========================================
  Files         481      481              
  Lines       18478    18478              
==========================================
+ Hits        12810    12815       +5     
+ Misses       4713     4711       -2     
+ Partials      955      952       -3     
Impacted Files Coverage Δ
pkg/skaffold/event/event.go 91.10% <100.00%> (ø)
pkg/skaffold/event/v2/event.go 79.74% <100.00%> (ø)
pkg/skaffold/docker/parse.go 86.19% <0.00%> (-0.96%) ⬇️
pkg/skaffold/docker/image.go 79.53% <0.00%> (+1.39%) ⬆️
pkg/skaffold/util/tar.go 56.00% <0.00%> (+5.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b451a2...e0f3356. Read the comment docs.

@aaron-prindle aaron-prindle merged commit 01bdaaf into GoogleContainerTools:master Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants