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

Update go-toolset from 1.17 to 1.19 #64

Closed
spolti opened this issue Oct 26, 2023 · 0 comments · Fixed by #68
Closed

Update go-toolset from 1.17 to 1.19 #64

spolti opened this issue Oct 26, 2023 · 0 comments · Fixed by #68
Assignees

Comments

@spolti
Copy link
Contributor

spolti commented Oct 26, 2023

For this task, there would be need some changes which are:

  • bump go-toolset to 1.19
  • update the golangci-lint from v1.43.0 to v1.51.1
    • align the deprecated linters
  • ioutil io calls deprecated, moved to os package.
    • update required on the methods' signature that has changed as well:
      • ioutil.RedDir returns []ioutil.FileInfo while the os.ReadDir returns []os.DirEntry
  • go 1.19 compiler and linter complains about:
    • package modelmesh-runtime-adapter/model-serving-puller/server
      server/server.go:23:2: use of internal package github.com/kserve/modelmesh-runtime-adapter/internal/util not allowed

For this internal module a change will be required.

leaving a question here:
Should it be renamed to something else? If so, ideas?
If we shouldn't be removing it, what are the other options?

spolti added a commit to spolti/modelmesh-runtime-adapter that referenced this issue Nov 1, 2023
chore: Go lang 1.17 and a little bit old and 1.19 as well.
However, before taking a greater step to higher version would might be better
to break it in smaller changes since the amount of changes that this update
has required is a little bit high, here is a small description of what was
changed by this update:

- Outdated linters:
  - WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.

- Deprecation of the io/ioutils package:
  - SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os]
    - Used the `os` package and the needed code changes applied

- At puller/config.go
  - ( undefined: GetEnvString)
  - Fixed by `import . "github.com/kserve/modelmesh-runtime-adapter/internal/envconfig"`

- Some comments and headers adjusted
- small identation changes made as part of go fmt.

Fixes kserve#64

Signed-off-by: Spolti <[email protected]>
spolti added a commit to spolti/modelmesh-runtime-adapter that referenced this issue Nov 1, 2023
chore: Go lang 1.17 and a little bit old and 1.19 as well.
However, before taking a greater step to higher version would might be better
to break it in smaller changes since the amount of changes that this update
has required is a little bit high, here is a small description of what was
changed by this update:

- Outdated linters:
  - WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.

- Deprecation of the io/ioutils package:
  - SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os]
    - Used the `os` package and the needed code changes applied

- At puller/config.go
  - ( undefined: GetEnvString)
  - Fixed by `import . "github.com/kserve/modelmesh-runtime-adapter/internal/envconfig"`

- Some comments and headers adjusted
- small identation changes made as part of go fmt.

Fixes kserve#64

Signed-off-by: Spolti <[email protected]>
spolti added a commit to spolti/modelmesh-runtime-adapter that referenced this issue Nov 15, 2023
chore: Go lang 1.17 and a little bit old and 1.19 as well.
However, before taking a greater step to higher version would might be better
to break it in smaller changes since the amount of changes that this update
has required is a little bit high, here is a small description of what was
changed by this update:

- Outdated linters:
  - WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.

- Deprecation of the io/ioutils package:
  - SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os]
    - Used the `os` package and the needed code changes applied

- At puller/config.go
  - ( undefined: GetEnvString)
  - Fixed by `import . "github.com/kserve/modelmesh-runtime-adapter/internal/envconfig"`

- Some comments and headers adjusted
- small identation changes made as part of go fmt.

Fixes kserve#64

Signed-off-by: Spolti <[email protected]>
spolti added a commit to spolti/modelmesh-runtime-adapter that referenced this issue Nov 21, 2023
chore: Go lang 1.17 and a little bit old and 1.19 as well.
However, before taking a greater step to higher version would might be better
to break it in smaller changes since the amount of changes that this update
has required is a little bit high, here is a small description of what was
changed by this update:

- Outdated linters:
  - WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
  - WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.

- Deprecation of the io/ioutils package:
  - SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os]
    - Used the `os` package and the needed code changes applied

- At puller/config.go
  - ( undefined: GetEnvString)
  - Fixed by `import . "github.com/kserve/modelmesh-runtime-adapter/internal/envconfig"`

- Some comments and headers adjusted
- small identation changes made as part of go fmt.

Fixes kserve#64

Signed-off-by: Spolti <[email protected]>
@spolti spolti self-assigned this Nov 28, 2023
ckadner pushed a commit that referenced this issue Nov 30, 2023
- Remove the linters for "deadcode", "structcheck", "varcheck"
- Use "os" packages instead of deprecated "io/ioutil" (SA1019)
- Capture pre-commit output in a local log file

Fixes #64

---------

Signed-off-by: Spolti <[email protected]>
spolti referenced this issue in spolti/modelmesh-runtime-adapter Jan 12, 2024
- Remove the linters for "deadcode", "structcheck", "varcheck"
- Use "os" packages instead of deprecated "io/ioutil" (SA1019)
- Capture pre-commit output in a local log file

Fixes opendatahub-io#64

---------

Signed-off-by: Spolti <[email protected]>
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 a pull request may close this issue.

1 participant