Skip to content

Conversation

@ffranr
Copy link
Contributor

@ffranr ffranr commented Jan 5, 2026

Detect Podman by checking "$DOCKER --version", allowing overrides via the DOCKER environment variable. Retain --user $UID:$(id -g) for Docker/CI to ensure generated files are user-owned. For Podman, switch to "--user=0:0" to avoid EACCES errors caused by rootless subuid/subgid remapping on bind mounts.

  • scripts/gen_sqlc_docker.sh: add runtime user selection; use $DOCKER for run
  • taprpc/gen_protos_docker.sh: same detection logic; use $DOCKER for build/run

Fixes "Permission denied" errors with rootless Podman, while maintaining existing Docker behavior.

@gemini-code-assist
Copy link

Summary of Changes

Hello @ffranr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the gen_sqlc_docker.sh and gen_protos_docker.sh scripts to improve compatibility with both Docker and Podman. By introducing runtime detection and dynamic user mapping, it resolves common 'Permission denied' errors encountered when using rootless Podman, ensuring that generated files maintain correct ownership across different containerization platforms without disrupting existing Docker workflows. This change makes the build and generation processes more robust and adaptable.

Highlights

  • Podman Compatibility: The scripts now intelligently detect if Podman is being used as the container runtime, allowing for better compatibility with different container environments.
  • Dynamic User Mapping: User ID mapping for container execution is dynamically adjusted; for Docker, it retains the current user's UID/GID, while for Podman, it switches to root (0:0) to prevent permission errors with rootless bind mounts.
  • Container Runtime Overrides: The container runtime command can now be overridden using the DOCKER environment variable, providing greater flexibility for users with custom setups.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces logic to detect if podman is being used as a docker wrapper and adjusts the user arguments for docker run commands accordingly. This is a valuable change that fixes permission issues when using rootless Podman. The changes are applied to scripts/gen_sqlc_docker.sh and taprpc/gen_protos_docker.sh. My review focuses on improving the robustness and maintainability of the shell scripts. I've suggested quoting variables to prevent word splitting, extracting duplicated code into a shared helper script to adhere to the DRY principle, and fixing a minor indentation inconsistency to maintain a consistent coding style across the project.

@coveralls
Copy link

coveralls commented Jan 5, 2026

Pull Request Test Coverage Report for Build 20787517435

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 73 unchanged lines in 18 files lost coverage.
  • Overall coverage increased (+0.008%) to 57.01%

Files with Coverage Reduction New Missed Lines %
asset/group_key.go 2 72.15%
tapdb/mssmt.go 2 90.45%
tapdb/sqlc/transfers.sql.go 2 83.33%
asset/mock.go 3 73.21%
itest/assertions.go 3 87.42%
itest/multisig.go 3 97.94%
rfqmsg/records.go 3 71.05%
tapchannel/aux_leaf_signer.go 3 43.53%
tapdb/interfaces.go 3 80.0%
tapgarden/planter.go 3 80.26%
Totals Coverage Status
Change from base Build 20783469456: 0.008%
Covered Lines: 65567
Relevant Lines: 115010

💛 - Coveralls

@ffranr ffranr force-pushed the chore/add-podman-support branch from 70df0f8 to 48e3b19 Compare January 6, 2026 12:16
@ffranr
Copy link
Contributor Author

ffranr commented Jan 6, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively adds detection for Podman and adjusts the user mapping to prevent permission errors, while maintaining the existing behavior for Docker. The changes are consistently applied across the relevant Makefiles and shell scripts. I've added a couple of suggestions to refactor the Makefile logic to reduce code duplication and improve maintainability. Overall, this is a good improvement.

@ffranr ffranr force-pushed the chore/add-podman-support branch from 48e3b19 to ef78182 Compare January 6, 2026 13:27
@ffranr
Copy link
Contributor Author

ffranr commented Jan 6, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces detection for Podman and adjusts Docker command user arguments to resolve permission issues with rootless Podman, while maintaining existing behavior for Docker. The changes are well-structured, centralizing the detection logic in a new helper script and updating Makefiles and build scripts to use it. This is a good improvement for developer environment flexibility. I've added a few minor suggestions to quote the DOCKER variable in the shell scripts to improve their robustness.

@ffranr ffranr force-pushed the chore/add-podman-support branch from ef78182 to 5d51b9c Compare January 6, 2026 13:34
@ffranr
Copy link
Contributor Author

ffranr commented Jan 6, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces detection for Podman to adjust user arguments, resolving permission errors with rootless setups while maintaining compatibility with Docker. The changes are well-implemented, centralizing detection logic in a new scripts/docker_helpers.sh script for shell files and using Makefile variables for make targets. This is a clean solution to the problem. My review includes a couple of suggestions to improve the robustness of the shell scripts by properly quoting variables.

@ffranr ffranr force-pushed the chore/add-podman-support branch from 5d51b9c to 1a8ff74 Compare January 6, 2026 13:41
@ffranr ffranr requested review from darioAnongba and jtobin January 6, 2026 13:48
Copy link
Member

@jtobin jtobin left a comment

Choose a reason for hiding this comment

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

LGTM. I used to do my own local munging of this stuff for podman use, but then eventually grudgingly adopted Docker. Maybe I should retvrn to podman now?

@ffranr ffranr force-pushed the chore/add-podman-support branch 2 times, most recently from 70df0f8 to eba5688 Compare January 7, 2026 15:04
Detect Podman by checking "$DOCKER --version", allowing overrides via
the DOCKER environment variable. Retain "--user $UID:$(id -g)" for
Docker/CI to ensure generated files are user-owned. For Podman, switch
to "--user=0:0" to avoid EACCES errors caused by rootless subuid/subgid
remapping on bind mounts.

Changes:
- scripts/docker_helpers.sh: new shared helper for Docker/Podman
  detection and user argument selection
- scripts/gen_sqlc_docker.sh: source shared helper for container runtime
  detection; properly quote variables
- taprpc/gen_protos_docker.sh: source shared helper for container
  runtime detection; properly quote variables
- Makefile: add DOCKER variable and IS_PODMAN detection; update
  DOCKER_TOOLS, docker-release, and docker-tools targets to use
  configurable runtime
- make/release_flags.mk: add Podman detection with conditional user
  args for DOCKER_RELEASE_HELPER

Fixes "Permission denied" errors with rootless Podman, while preserving
existing Docker behavior.
@ffranr ffranr force-pushed the chore/add-podman-support branch from eba5688 to 6352452 Compare January 7, 2026 15:58
Copy link
Contributor

@darioAnongba darioAnongba left a comment

Choose a reason for hiding this comment

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

Podman for the win.

@github-project-automation github-project-automation bot moved this from 🆕 New to 👀 In review in Taproot-Assets Project Board Jan 7, 2026
@ffranr ffranr added this pull request to the merge queue Jan 7, 2026
Merged via the queue into main with commit 979a2da Jan 7, 2026
27 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Taproot-Assets Project Board Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

5 participants