Skip to content

Upgrade dependencies #516

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
merged 5 commits into from
Jul 2, 2025
Merged

Upgrade dependencies #516

merged 5 commits into from
Jul 2, 2025

Conversation

Danielius1922
Copy link
Member

@Danielius1922 Danielius1922 commented May 17, 2025

Summary by CodeRabbit

  • Chores
    • Upgraded Go version requirement to 1.23.0.
    • Updated multiple dependencies to their latest versions for improved stability and compatibility.
    • Adjusted module configuration for streamlined toolchain management.
    • Updated CI workflows to use newer versions of golangci-lint, Codecov actions, SonarCloud scanning, and Go setup.
    • Simplified and modernized linting configuration for improved code quality checks.
    • Updated Docker base images to newer Go and Alpine versions.
    • Revised documentation to reflect new minimum Go version.

Copy link

coderabbitai bot commented May 17, 2025

Walkthrough

The Go module file was updated to require Go 1.23.0, remove the explicit toolchain directive, and refresh a broad set of dependencies to newer versions. The replace block was simplified, and a comment was added to guide users in setting the GOTOOLCHAIN environment variable before running go mod tidy. Additionally, GitHub workflows and linting configurations were updated to newer versions, and various code files were refactored to simplify calls and improve idiomatic usage without changing functionality.

Changes

File(s) Change Summary
go.mod Updated Go version to 1.23.0, removed toolchain directive, refreshed multiple dependencies, simplified replace block, and added usage comment.
.github/workflows/golangci-lint.yml, .github/workflows/tests.yml, .github/workflows/build-with-cfg.yml, .github/workflows/builds.yml, .github/workflows/test-with-cfg.yml Upgraded Go version in workflows from 1.22 to 1.23; updated golangci-lint GitHub Action from v6 to v8 and tool version from v1.61 to v2.1.6; updated Codecov action from v4 to v5.
.golangci.yml Restructured and simplified golangci-lint configuration; reordered linters, updated settings, and reformatted exclusions and formatters.
bridge/device/cloud/manager.go Changed query parameter extraction from r.Message.Options() to r.Options() and query addition from request.Message.AddQuery to request.AddQuery.
bridge/net/request_test.go, schema/link_test.go Replaced require.Equal(t, "", ...) with require.Empty(t, ...) in test assertions for empty string checks.
bridge/resources/device/resource.go Changed ResourceTypes and Interfaces assignments to use outer Resource receiver instead of embedded Resource field.
bridge/resources/resource.go Changed Hijack() call from req.Message.Hijack() to req.Hijack().
bridge/service/service.go Changed request type check from req.Message.Type() to req.Type().
bridge/test/test.go Removed .Config field in setting ExternalAddresses path.
client/observeDevices.go Simplified infinite loop to a loop with condition using for obs.poll(ctx) {}.
client/observeResource.go Simplified switch statement syntax for message code handling.
cmd/bridge-device/main.go Changed config path for MaxMessageSize from cfg.Config.API.CoAP.MaxMessageSize to cfg.API.CoAP.MaxMessageSize.
pkg/codec/cbor/codec.go, pkg/codec/json/codec.go Set Canonical field directly on JsonHandle instead of embedded BasicHandle.
test/test.go Changed length assertion from require.Equal(t, len(expected), len(actual)) to require.Len(t, actual, len(expected)).
README.md Updated minimum required Go version from 1.22 to 1.23.
cmd/bridge-device/Dockerfile, test/cloud-server/Dockerfile Updated base images to use Go 1.23.9 and Alpine 3.22 respectively.

Possibly related PRs

  • Update repository #497: Upgrades Go version and dependencies with workflow updates, strongly connected at the tooling and CI configuration level.
  • Upgrade dependencies #480: Performs dependency upgrades in go.mod overlapping with this PR’s dependency refresh scope.
  • Upgrade dependencies #496: Updates go.mod dependencies including github.com/go-json-experiment/json and related replace directives, closely related in dependency management.

Suggested reviewers

  • jkralik

Poem

🐇 A hop and a skip, the Go world anew,
With modules refreshed and the toolchain askew.
Upgraded and tidy, dependencies in line,
Go 1.23, oh how you shine! ✨
The code leaps forward, with each version’s song,
Hopping along, where the strong modules belong.
🐰💻


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82e00ca and 1567535.

📒 Files selected for processing (1)
  • .github/workflows/tests.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/tests.yml
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: tests (cloud-server-debug-sha384, CERT_TOOL_SIGN_ALG=ECDSA-SHA384 CERT_TOOL_ELLIPTIC_CURVE=P384, ... / test
  • GitHub Check: tests (cloud-server-discovery-resource-observable-debug, true, ghcr.io/iotivity/iotivity-lite/clo... / test
  • GitHub Check: tests (cloud-server-discovery-resource-observable-debug-384, CERT_TOOL_SIGN_ALG=ECDSA-SHA384 CERT... / test
  • GitHub Check: tests (cloud-server-debug, true, true, ghcr.io/iotivity/iotivity-lite/cloud-server-debug:vnext, t... / test
  • GitHub Check: build-and-publish-image (test-cloud-server, test/cloud-server/Dockerfile) / build-and-publish-with-cfg
  • GitHub Check: build-and-publish-image (bridge-device, cmd/bridge-device/Dockerfile) / build-and-publish-with-cfg
  • GitHub Check: Analyze (go)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.09%. Comparing base (edea6f0) to head (1567535).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #516      +/-   ##
==========================================
- Coverage   74.12%   74.09%   -0.03%     
==========================================
  Files         124      124              
  Lines        8764     8763       -1     
==========================================
- Hits         6496     6493       -3     
- Misses       1678     1680       +2     
  Partials      590      590              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Danielius1922 Danielius1922 force-pushed the adam/feature/update-deps branch from 09af5ca to 94a84b5 Compare May 18, 2025 12:36
@Danielius1922 Danielius1922 force-pushed the adam/feature/update-deps branch 2 times, most recently from 3da7a2c to e7351f5 Compare June 2, 2025 17:45
@Danielius1922 Danielius1922 force-pushed the adam/feature/update-deps branch 3 times, most recently from ec40354 to ef74b93 Compare June 2, 2025 18:14
Direct:
github.com/fxamacker/cbor/v2 v2.8.0
github.com/golang-jwt/jwt/v5 v5.2.2
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2
github.com/pion/dtls/v3 v3.0.6
github.com/pion/logging v0.2.3
github.com/plgd-dev/go-coap/v3 v3.3.7-0.20250702164925-f431046ea1ce
github.com/stretchr/testify v1.10.0
github.com/ugorji/go/codec v1.2.14
github.com/web-of-things-open-source/thingdescription-go v0.0.0-20250521114616-3895cda67f5d
golang.org/x/exp v0.0.0-20250531010427-b6e5de432a8b
golang.org/x/sync v0.14.0
google.golang.org/grpc v1.72.2

Indirect:
golang.org/x/crypto v0.38.0
golang.org/x/net v0.40.0
golang.org/x/sys v0.33.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a
google.golang.org/protobuf v1.36.6
alpine: 3.20 -> 3.22
@Danielius1922 Danielius1922 force-pushed the adam/feature/update-deps branch from ef74b93 to 82e00ca Compare July 2, 2025 16:56
Copy link

sonarqubecloud bot commented Jul 2, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@Danielius1922 Danielius1922 merged commit fc6360a into main Jul 2, 2025
14 of 16 checks passed
@Danielius1922 Danielius1922 deleted the adam/feature/update-deps branch July 2, 2025 17:20
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.

3 participants