You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/30 16:11:18 UTC

[GitHub] [tvm] quic-sanirudh commented on a diff in pull request #11184: [CI] fix - docker group exists with different GID

quic-sanirudh commented on code in PR #11184:
URL: https://github.com/apache/tvm/pull/11184#discussion_r862371666


##########
docker/with_the_same_user:
##########
@@ -36,7 +36,12 @@ else
   rm /this_is_writable_file_system
 fi
 
-getent group "${CI_BUILD_GID}" || addgroup --force-badname --gid "${CI_BUILD_GID}" "${CI_BUILD_GROUP}"
+getent group "${CI_BUILD_GID}" || (
+    # Ensure "${CI_BUILD_GROUP}" is not already some other gid inside container.
+    if grep -q "^${CI_BUILD_GROUP}:" /etc/group; then
+        CI_BUILD_GROUP="${CI_BUILD_GROUP}2"

Review Comment:
   The `CI_BUILD_GROUP` already exists, but has a different GID. I thought it was important to keep the same GID and that's why we create a new CI_BUILD_GROUP name and use that with the same GID, but there is just one group with the given `CI_BUILD_GID`.
   
   We can alternatively change the `CI_BUILD_GID` to the one that's mapped to `CI_BUILD_GROUP`, but I thought that doesn't work. Please let me know if my understanding is mistaken here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org