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

Upgrade dependencies #252

Merged
merged 2 commits into from
Jun 4, 2024
Merged

Upgrade dependencies #252

merged 2 commits into from
Jun 4, 2024

Conversation

Danielius1922
Copy link
Member

@Danielius1922 Danielius1922 commented Jun 3, 2024

Summary by CodeRabbit

  • Chores
    • Updated Go version in multiple workflow files from 1.20 to 1.22 to ensure compatibility and leverage new features.
    • Updated golangci-lint action version from v5 to v6 for improved linting capabilities.
    • Adjusted linter configurations by removing several unused linters and modifying existing ones for better code analysis.

Copy link

coderabbitai bot commented Jun 3, 2024

Warning

Rate limit exceeded

@Danielius1922 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 11 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 160fe53 and 1e7f6d0.

Walkthrough

The recent changes primarily involve updates to the Go version and various GitHub Actions workflows. The Go version has been upgraded from 1.20 to 1.22 across multiple workflow files. Additionally, the golangci-lint-action has been updated from version 5 to version 6, and several linters have been removed or modified in the .golangci.yml file to streamline the linting process.

Changes

File Change Summary
.github/workflows/buildTestBinaries.yml Updated the Go version from 1.20 to 1.22.
.github/workflows/checkFormat.yml Updated the Go version from ^1.20 to ^1.22.
.github/workflows/golangci-lint.yml Updated golangci/golangci-lint-action from v5 to v6.
.github/workflows/release.yml Updated Go version from 1.20 to 1.22 and changed release step version parameter to "~> v1".
.github/workflows/test.yml Updated the Go version from 1.20 to 1.22.
.golangci.yml Removed execinquery, exhaustivestruct, ifshort, maligned linters and modified contextcheck to contextcheckf.

Poem

In the land of code where changes flow,
Go's version rises, updates in tow.
Linters pruned, the workflows gleam,
With golangci-lint in a new regime.
A rabbit's cheer for progress made,
In this garden of GitHub shade. 🌱✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5d0ee35 and a9e0e08.

Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum
Files selected for processing (16)
  • .github/workflows/golangci-lint.yml (1 hunks)
  • .golangci.yml (2 hunks)
  • dependency/googleapis (1 hunks)
  • service/grpc/getJSONWebKeys.go (2 hunks)
  • service/grpc/jsonWebKeyCache.go (2 hunks)
  • service/grpc/updateJSONWebKeys.go (1 hunks)
  • service/http/clearCache_test.go (2 hunks)
  • service/http/createResource.go (2 hunks)
  • service/http/getDeviceResourceLinks_test.go (2 hunks)
  • service/http/getDevice_test.go (2 hunks)
  • service/http/getDevices_test.go (3 hunks)
  • service/http/getResource_test.go (2 hunks)
  • service/http/onboardDevice_test.go (4 hunks)
  • service/http/ownDevice_test.go (3 hunks)
  • service/http/updateResource.go (2 hunks)
  • service/http/updateResource_test.go (2 hunks)
Files not reviewed due to errors (2)
  • .golangci.yml (no review received)
  • service/http/ownDevice_test.go (no review received)
Files skipped from review due to trivial changes (5)
  • .github/workflows/golangci-lint.yml
  • dependency/googleapis
  • service/grpc/updateJSONWebKeys.go
  • service/http/getResource_test.go
  • service/http/updateResource_test.go
Additional comments not posted (19)
service/http/createResource.go (3)

25-26: Updated import paths to reflect new package structure.


35-36: Updated content type handling to use new package constants.


43-43: Improved error message for better clarity and context.

service/grpc/getJSONWebKeys.go (2)

38-38: Correctly added keys to the slice.


36-36: Verify that the method change from Get to Key aligns with the updated API.

service/http/updateResource.go (2)

29-30: Updated import paths to reflect new package structure.


67-67: Improved error message for better clarity and context.

service/grpc/jsonWebKeyCache.go (2)

8-8: Updated import paths to reflect new package structure.


47-47: Enhanced algorithm comparison logic for better readability and correctness.

service/http/getDeviceResourceLinks_test.go (1)

32-32: Updated import paths and method calls in test functions to align with dependency updates.

Also applies to: 91-91

service/http/getDevices_test.go (1)

33-33: Updated import paths and method calls in test functions to align with dependency updates.

Also applies to: 119-119

service/http/getDevice_test.go (2)

31-31: Updated import path to use the new httpTest package.


71-71: Updated unmarshalling function to use the new httpTest.Unmarshal.

service/http/clearCache_test.go (2)

31-31: Updated import path to use the new httpTest package.


73-73: Updated unmarshalling function to use the new httpTest.Unmarshal.

service/http/onboardDevice_test.go (4)

35-36: Updated import paths to include new packages for device testing and HTTP utilities.


46-46: Modified the test setup to include multiple services, enhancing the test's robustness.


133-133: Updated unmarshalling function to use the new httpTest.Unmarshal.


154-154: Added a new function call to wait for device readiness, improving test reliability.

service/grpc/getJSONWebKeys.go Outdated Show resolved Hide resolved
@Danielius1922 Danielius1922 force-pushed the adam/feature/update-deps branch from a9e0e08 to ee6752f Compare June 4, 2024 09:49
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
service/http/createResource.go (1)

Line range hint 30-30: Undefined references found.

+ type RequestHandler struct {
+   mux *http.ServeMux
+ }
+
+ func createContentBody(body io.Reader) (io.Reader, error) {
+   // Implementation goes here
+   return body, nil
+ }

The RequestHandler type and createContentBody function are undefined in the provided context. Define these or ensure they are imported if defined elsewhere.

Also applies to: 41-41

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a9e0e08 and ee6752f.

Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum
Files selected for processing (15)
  • dependency/googleapis (1 hunks)
  • service/grpc/getJSONWebKeys.go (2 hunks)
  • service/grpc/jsonWebKeyCache.go (2 hunks)
  • service/grpc/updateJSONWebKeys.go (1 hunks)
  • service/http/clearCache_test.go (2 hunks)
  • service/http/createResource.go (2 hunks)
  • service/http/getDeviceResourceLinks_test.go (2 hunks)
  • service/http/getDevice_test.go (2 hunks)
  • service/http/getDevices_test.go (3 hunks)
  • service/http/getResource_test.go (2 hunks)
  • service/http/onboardDevice_test.go (4 hunks)
  • service/http/ownDevice_test.go (3 hunks)
  • service/http/updateResource.go (2 hunks)
  • service/http/updateResource_test.go (2 hunks)
  • web/Dockerfile (1 hunks)
Files skipped from review as they are similar to previous changes (13)
  • dependency/googleapis
  • service/grpc/getJSONWebKeys.go
  • service/grpc/jsonWebKeyCache.go
  • service/grpc/updateJSONWebKeys.go
  • service/http/clearCache_test.go
  • service/http/getDeviceResourceLinks_test.go
  • service/http/getDevice_test.go
  • service/http/getDevices_test.go
  • service/http/getResource_test.go
  • service/http/onboardDevice_test.go
  • service/http/ownDevice_test.go
  • service/http/updateResource.go
  • service/http/updateResource_test.go
Additional context used
golangci-lint
service/http/createResource.go

30-30: undefined: RequestHandler (typecheck)


41-41: undefined: createContentBody (typecheck)

Additional comments not posted (6)
web/Dockerfile (3)

4-4: Set the working directory to /web.

This change is straightforward and aligns with best practices for Dockerfile structure.


9-9: Optimize npm configuration and installation commands.

Reordering these commands for better cache utilization and setting timeouts and retries is a good practice to ensure reliable builds.


6-7: Temporary hotfix to update browserslist database.

Please verify if this hotfix is still necessary or if it can be removed in a future update.

service/http/createResource.go (3)

25-26: Update import paths to use more specific packages.

Switching to more specific packages (pkgGrpc and pkgHttp) instead of generic ones improves modularity and clarity in the codebase.


35-36: Use constants from pkgHttp for content type checks.

Using constants for content types enhances code readability and maintainability by avoiding hard-coded strings.


43-43: Improve error handling by using pkgGrpc.ForwardErrorf.

This change standardizes error handling and improves the error message clarity by including specific resource identifiers in the message.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ee6752f and 160fe53.

Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum
Files selected for processing (6)
  • .github/workflows/buildTestBinaries.yml (1 hunks)
  • .github/workflows/checkFormat.yml (1 hunks)
  • .github/workflows/golangci-lint.yml (1 hunks)
  • .github/workflows/release.yml (2 hunks)
  • .github/workflows/test.yml (1 hunks)
  • .golangci.yml (3 hunks)
Files skipped from review due to trivial changes (3)
  • .github/workflows/buildTestBinaries.yml
  • .github/workflows/checkFormat.yml
  • .github/workflows/test.yml
Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/golangci-lint.yml
  • .golangci.yml
Additional comments not posted (1)
.github/workflows/release.yml (1)

71-71: Change to GoReleaser version constraint approved.

Verification successful

The change to use the version constraint ~> v1 for GoReleaser is appropriate. The listed versions indicate that the v1 series is actively maintained and includes recent stable releases.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the stability and features of GoReleaser `~> v1`.

# Test: Check the release notes of GoReleaser for the specified version range to ensure it meets the project's needs.
gh release view --repo goreleaser/goreleaser --pattern '~> v1'

Length of output: 420



Script:

#!/bin/bash
# Description: Verify the stability and features of GoReleaser `~> v1`.

# Fetch the list of releases from the GoReleaser repository and filter for versions that match `~> v1`.
gh release list --repo goreleaser/goreleaser --limit 100 | grep -E '^v1\.' | head -n 10

Length of output: 494

.github/workflows/release.yml Show resolved Hide resolved
@Danielius1922 Danielius1922 force-pushed the adam/feature/update-deps branch 2 times, most recently from 3ed3107 to d8f3e17 Compare June 4, 2024 10:32
golangci/golangci-lint-action: v5 -> v6
Golang: 1.22

Submodule:
github.com/googleapis/googleapis 716a2814e199eeef8fd9f3e11418ee0881ac833a

Direct:
github.com/goreleaser/goreleaser v1.26.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
github.com/lestrrat-go/jwx/v2 v2.0.21
github.com/pion/dtls/v2 v2.2.8-0.20240601040544-edc7ad02205f
github.com/plgd-dev/device/v2 v2.5.2-0.20240603131607-6c9b1dc14b00
github.com/plgd-dev/go-coap/v3 v3.3.5-0.20240603125124-ff2c47df37c4
github.com/plgd-dev/hub/v2 v2.19.1
go.opentelemetry.io/otel/trace v1.27.0
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
@Danielius1922 Danielius1922 force-pushed the adam/feature/update-deps branch from d8f3e17 to 1e7f6d0 Compare June 4, 2024 10:36
Copy link

sonarqubecloud bot commented Jun 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
9.2% Duplication on New Code (required ≤ 5%)

See analysis details on SonarCloud

@Danielius1922 Danielius1922 merged commit 40b153e into main Jun 4, 2024
11 of 14 checks passed
@Danielius1922 Danielius1922 deleted the adam/feature/update-deps branch June 4, 2024 10:50
@coderabbitai coderabbitai bot mentioned this pull request Sep 9, 2024
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.

1 participant