Skip to content

Upgrade dependencies and docker OS and Go version - #76

Merged
mprymek merged 4 commits into
mainfrom
deps-update
Sep 20, 2025
Merged

Upgrade dependencies and docker OS and Go version#76
mprymek merged 4 commits into
mainfrom
deps-update

Conversation

@mprymek

@mprymek mprymek commented Sep 20, 2025

Copy link
Copy Markdown
Contributor
  • upgrade Docker OS version: bullseye -> trixie
  • upgrade Docker Go version to 1.25.1
  • upgrade all dependencies

Summary by CodeRabbit

  • Chores
    • Upgraded language/toolchain and refreshed dependencies for better stability, security, and compatibility with newer platforms.
    • Modernized Docker usage to the new CLI syntax.
    • Updated container base to a newer distro; revised runtime user/group setup and standardized IDs (may affect permissions on bind mounts).
    • No changes to the existing build/test flow.
    • Bumped application version to 0.9.0.

@coderabbitai

coderabbitai Bot commented Sep 20, 2025

Copy link
Copy Markdown

Walkthrough

Updates build/runtime tooling and metadata: switches Makefile to Docker CLI “docker compose,” bumps Docker image base versions, revises container user/group creation and IDs in Dockerfile, upgrades Go toolchain to 1.24 with refreshed dependencies, and increments version.txt from 0.8.1 to 0.9.0.

Changes

Cohort / File(s) Summary of Changes
Build orchestration (Compose CLI, versions)
Makefile
Replaced docker-compose with docker compose in run/test targets; updated DOCKER_BUILDER_VERSION to 1.25.1-trixie and DOCKER_RUNTIME_VERSION to trixie-20250908-slim; preserved build/test flow and arguments.
Container user/group setup
docker/Dockerfile
Switched from addgroup/adduser to groupadd/useradd; changed gid/uid from 1883 to 983; used --gid for primary group, --home-dir /var/empty, no-create-home, /sbin/nologin; removed stderr redirections.
Go toolchain and dependencies
go.mod
Upgraded Go to 1.24.0; updated multiple direct deps (paho.mqtt, dtls, udp, testify, urfave/cli, x/sync, yaml.v3, etc.); added/refresh indirect deps (toml, md2man, go-cmp, websocket, pion libs, x/*, etc.).
Version metadata
version.txt
Bumped version from 0.8.1 to 0.9.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I twitch my ears at version nine-oh,
New Go winds hum where build flags blow.
Compose now docks in cleaner tone,
A uid hop to nine-eight-three alone.
I thump the ground—ship it, let’s go!
Carrots compiled; release to show.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Upgrade dependencies and docker OS and Go version" accurately and concisely summarizes the primary changes: dependency updates, Docker OS bump (bullseye→trixie) and a Go/toolchain version increase reflected in go.mod and Docker/Makefile changes, so it is relevant and clear for a changelog scan.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch deps-update

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@mprymek
mprymek merged commit 1953e14 into main Sep 20, 2025
0 of 8 checks passed
@mprymek
mprymek deleted the deps-update branch September 20, 2025 08:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
Makefile (2)

37-41: Make test builds more deterministic.
Pull latest bases during CI to avoid stale caches.

Apply this diff:

-	docker compose -f docker-compose.test.yaml build \
+	docker compose -f docker-compose.test.yaml build --pull \
 					--build-arg "WITH_RACE_DETECTION=1" \
 					--build-arg "DOCKER_BUILDER_VERSION=$(DOCKER_BUILDER_VERSION)" \
 					--build-arg "DOCKER_RUNTIME_VERSION=$(DOCKER_RUNTIME_VERSION)"

58-60: Also pull bases for docker/run builds.
Keeps local runs consistent with CI.

-	docker compose build --build-arg "DOCKER_BUILDER_VERSION=$(DOCKER_BUILDER_VERSION)" \
+	docker compose build --pull --build-arg "DOCKER_BUILDER_VERSION=$(DOCKER_BUILDER_VERSION)" \
 					--build-arg "DOCKER_RUNTIME_VERSION=$(DOCKER_RUNTIME_VERSION)"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 072dae7 and ad8ae03.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • Makefile (3 hunks)
  • docker/Dockerfile (1 hunks)
  • go.mod (1 hunks)
  • version.txt (1 hunks)
🔇 Additional comments (4)
version.txt (1)

1-1: Version bump looks good; ensure release notes/tagging match 0.9.0.
Please update CHANGELOG and create/validate the 0.9.0 tag when merging.

go.mod (2)

6-14: Major dep upgrades—double-check behavioral changes.
Paho MQTT v1.5.x and Pion DTLS v2.2.x may tweak defaults (timeouts/handshakes). Please run integration tests covering connect/keepalive/TLS handshakes.


16-41: Bump indirect gopkg.in/yaml.v2 to v2.4.0 (patched)

go.mod contains gopkg.in/yaml.v2 v2.2.8 as an indirect dependency (go.mod line 40); bump to v2.4.0 to pick up fixes — repo already requires gopkg.in/yaml.v3 v3.0.1.

-	gopkg.in/yaml.v2 v2.2.8 // indirect
+	gopkg.in/yaml.v2 v2.4.0 // indirect

Run: go get gopkg.in/yaml.v2@v2.4.0 && go mod tidy && go mod graph | rg 'yaml.v2' -n to confirm only v2.4.0 remains.

docker/Dockerfile (1)

28-30: Make user/group creation idempotent and use /usr/sbin/nologin (docker/Dockerfile:28-30)
Debian places nologin at /usr/sbin; guard against existing bisquitt user/group and parameterize UID/GID.

+ARG PUID=983
+ARG PGID=983
-RUN groupadd --system --gid 983 bisquitt && \
-    useradd --system --uid 983 --no-create-home --home-dir /var/empty \
-        --shell /sbin/nologin --gid bisquitt bisquitt
+RUN getent group bisquitt >/dev/null || groupadd --system --gid ${PGID} bisquitt && \
+    getent passwd bisquitt >/dev/null || useradd --system --uid ${PUID} --no-create-home --home-dir /var/empty \
+        --shell /usr/sbin/nologin --gid bisquitt bisquitt

If your runtime depends on fixed IDs, confirm parameterizing PUID/PGID won't break volume ownership expectations.

Comment thread docker/Dockerfile
useradd --system --uid 983 --no-create-home --home-dir /var/empty \
--shell /sbin/nologin --gid bisquitt bisquitt

EXPOSE 1883:1883/udp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid EXPOSE syntax.
Dockerfile EXPOSE cannot map host ports; use only container port/proto.

-EXPOSE 1883:1883/udp
+EXPOSE 1883/udp
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
EXPOSE 1883:1883/udp
EXPOSE 1883/udp
🤖 Prompt for AI Agents
In docker/Dockerfile around line 32, the EXPOSE instruction incorrectly attempts
host-to-container port mapping ("EXPOSE 1883:1883/udp"); replace it with a
container-only exposure like "EXPOSE 1883/udp". If you intended to publish a
host port at runtime, do that via docker run -p 1883:1883/udp or the equivalent
docker-compose ports mapping instead of in the Dockerfile.

Comment thread go.mod
module github.com/energostack/bisquitt

go 1.16
go 1.24.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Set module Go version to 1.25 and pin the toolchain.
Matches builder 1.25.1 and PR intent.

-go 1.24.0
+go 1.25.0
+toolchain go1.25.1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
go 1.24.0
go 1.25.0
toolchain go1.25.1
🤖 Prompt for AI Agents
In go.mod around line 3, update the module Go version from "go 1.24.0" to "go
1.25" and add a toolchain pin to ensure the builder uses the exact toolchain;
specifically change the go directive to "go 1.25" and add a new line near the
top "toolchain go 1.25.1" to pin the toolchain version.

Comment thread Makefile
Comment on lines +4 to +5
DOCKER_BUILDER_VERSION ?= 1.25.1-trixie
DOCKER_RUNTIME_VERSION ?= trixie-20250908-slim

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Go version mismatch: builder 1.25.1 vs go.mod 1.24.0.
The image uses Go 1.25.1, but go.mod declares 1.24.0. Align to 1.25 and add a toolchain pin to meet the PR objective.

See go.mod comment for a concrete diff.

🤖 Prompt for AI Agents
In Makefile around lines 4-5, the Docker builder image uses Go 1.25.1 while
go.mod is 1.24.0; update and align versions by changing DOCKER_BUILDER_VERSION
to a 1.25.x trixie tag (e.g., 1.25.0-trixie or 1.25.1-trixie to match your
chosen go.mod bump), add an explicit GO_TOOLCHAIN_VERSION or GO_VERSION variable
pinned to 1.25.x in the Makefile, and then bump go.mod's go directive to 1.25.0
(or 1.25.1) so all toolchain references are consistent.

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