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

updating go version from 1.18 to 1.19 #1665

Merged
merged 10 commits into from
Sep 8, 2022
Merged

updating go version from 1.18 to 1.19 #1665

merged 10 commits into from
Sep 8, 2022

Conversation

ie-pham
Copy link
Contributor

@ie-pham ie-pham commented Aug 19, 2022

What this PR does: Update go version from 1.18 to 1.19 and Golangci from v1.45.2 to v1.49.0

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@ie-pham
Copy link
Contributor Author

ie-pham commented Sep 1, 2022

Had to add

\\nolint

to a lot of places

  1. for deprecated packages that wouldn't work if we switch to the newer version (require additional work)
  2. there seems to be a problem with embedded structs with lint?

@ie-pham ie-pham closed this Sep 1, 2022
@ie-pham ie-pham reopened this Sep 1, 2022
@ie-pham ie-pham marked this pull request as ready for review September 2, 2022 17:04
CHANGELOG.md Outdated
@@ -12,6 +11,7 @@
* [ENHANCEMENT] Add PodDisruptionBudget to ingesters in jsonnet [#1691](https://github.com/grafana/tempo/pull/1691) (@joe-elliott)
* [ENHANCEMENT] Add span-level duration column [#1706](https://github.com/grafana/tempo/pull/1706) (@mdisibio)
* [BUGFIX] Honor caching and buffering settings when finding traces by id [#1697](https://github.com/grafana/tempo/pull/1697) (@joe-elliott)
* [CHANGE] Update Go to 1.19 [#1665](https://github.com/grafana/tempo/pull/1665) (@ie-pham)
Copy link
Member

Choose a reason for hiding this comment

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

nit: put with other entries of type "CHANGE"

fmt.Println("End : ", unifiedMeta.EndTime)
fmt.Println("Duration : ", fmt.Sprint(unifiedMeta.EndTime.Sub(unifiedMeta.StartTime).Round(time.Second)))
fmt.Println("Age : ", fmt.Sprint(time.Since(unifiedMeta.EndTime).Round(time.Second)))
//nolint:all
Copy link
Member

Choose a reason for hiding this comment

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

what in the world did the linter not like about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cmd/tempo-cli/cmd-list-block.go:74:46: unifiedMeta.Version undefined (type unifiedBlockMeta has no field or method Version) (typecheck)
	fmt.Println("Version       : ", unifiedMeta.Version)

@@ -40,12 +40,12 @@ func displayCacheSummary(results []blockStats) {
bloomTable := make([][]int, 0)

for _, r := range results {
row := r.CompactionLevel
row := r.CompactionLevel //nolint:all //embedded typecheck
Copy link
Member

Choose a reason for hiding this comment

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

same thought here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as the other one

cmd/tempo-cli/cmd-list-block.go:74:46: unifiedMeta.Version undefined (type unifiedBlockMeta has no field or method Version) (typecheck)
	fmt.Println("Version       : ", unifiedMeta.Version)

something is wrong with their embedded struct checking

Copy link
Member

@joe-elliott joe-elliott Sep 2, 2022

Choose a reason for hiding this comment

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

yeah, that just seems like a bug. i'd hate to chuck a bunch of nolints in our codebase b/c of a golangci-lint issue. can you track down any info on this issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OH seems like they fixed it in their last release 8 days ago, will remove this

@ie-pham ie-pham requested a review from joe-elliott September 6, 2022 18:38
pkg/.patched-proto/collector/README.md Outdated Show resolved Hide resolved
@@ -18,7 +18,7 @@ func TestSubstringPredicate(t *testing.T) {
keptChunks: 1,
keptPages: 1,
keptValues: 2,
writeData: func(w *parquet.Writer) {
writeData: func(w *parquet.Writer) { //nolint:all
Copy link
Member

Choose a reason for hiding this comment

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

what does the linter not like about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops. Forgot to put the reason there. But parquet.Writer is deprecated

tempodb/search/rescan_blocks.go Show resolved Hide resolved
info, err := f.Info()

if err != nil {
level.Warn(log.Logger).Log("msg", "failed to file info", "err", err)
Copy link
Member

Choose a reason for hiding this comment

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

we're logging this as a warning but treating it as a fatal error by bailing out. if this error hits let's just return it instead of logging it and fail the whole rescan process.

return nil, fmt.Errorf("failed to file info %s, %w", f.NameORSomething, err)

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

🙈

@joe-elliott joe-elliott merged commit 161ab9d into grafana:main Sep 8, 2022
@mapno mapno mentioned this pull request Sep 13, 2022
3 tasks
@ie-pham ie-pham deleted the jennie/1.19 branch March 17, 2023 17:31
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