Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on code in PR #656: URL: https://github.com/apache/celix/pull/656#discussion_r1427868346 ## .gitpod.yml: ## @@ -0,0 +1,25 @@ +--- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +tasks: + - init: | + mkdir -p cmake-build-debug-gitpod + cd cmake-build-debug-gitpod && ../container/support-scripts/build-all.sh && make -j + +image: + file: container/Containerfile.gitpod Review Comment: Sticking to `file` for now, since otherwise deployment and versioning is also something to take into account. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink merged PR #656: URL: https://github.com/apache/celix/pull/656 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1849049600 > we definitely need to deal with is support for building and running the containers I agree, could you create a issue to update the github actions so that building in a container image is also tested? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on code in PR #656: URL: https://github.com/apache/celix/pull/656#discussion_r1421798938 ## container/support-scripts/build-all.sh: ## @@ -0,0 +1,30 @@ +#!/bin/bash Review Comment: aah yes, my bad. This remark can be ignored. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1848929480 > I tested the gitpod environment and from what I could see this works nicely. Few remarks: > > * I could run individually unit tests from TestMate but not debug. Debug gives an error. > > * What is the plans for support? Because I can see people trying this out - and that is a good thing -, but this also means that we a) get questions about the gitpod env and b) we should maintain the gitpod container file (for Apache Celix updates and for gitpod environment updates). > @pnoltes in my opinion, what we definitely need to deal with is support for building and running the containers. E.g. if the `build-ubuntu-container.sh` command fails or the Gitpod environment fails to start (because of e.g. a missing dependency) that needs to be fixed. However, there can be a lot of different IDE related questions and failures and I would say support for that is best effort. In case we have experienced the failure ourselves than we can potentially provide an answer, but otherwise we highly depend on the contributor. We can always ask the contributor if they can propose a fix themselves for the build problem they are facing. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on code in PR #656: URL: https://github.com/apache/celix/pull/656#discussion_r1421723293 ## container/Containerfile.gitpod: ## @@ -0,0 +1,75 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# SSH credentials: +# root@password + +FROM docker.io/gitpod/workspace-full:2023-10-06-16-22-14@sha256:76d3041cc7a2caa00d6f4610ace0e15009c361515f3d5d9ee6690e4019adcfd4 + +# Switch to root user to install dependencies and configure sshd +USER root + +# Install dependencies +RUN DEBIAN_FRONTEND="noninteractive" apt-get update && \ +DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ +# Development dependencies \ +dos2unix \ +git \ +locales-all \ +rsync \ +tar \ +ssh \ +tzdata \ +# Build dependencies \ +build-essential \ +ccache \ +cmake \ +curl \ +default-jdk \ +gcc \ +g++ \ +gdb \ +make \ +python3 \ +# Celix dependencies \ +civetweb \ +libavahi-compat-libdnssd-dev \ +libcivetweb-dev \ +libcpputest-dev \ +libcurl4-openssl-dev \ +libczmq-dev \ +libffi-dev \ +libjansson-dev \ +libxml2-dev \ +libzip-dev \ +rapidjson-dev \ +uuid-dev && \ +apt-get clean + +RUN ( \ +echo 'Port 2233'; \ +echo 'LogLevel INFO'; \ +echo 'PermitRootLogin yes'; \ +echo 'PasswordAuthentication yes'; \ +echo 'Subsystem sftp /usr/lib/openssh/sftp-server'; \ + ) > /etc/ssh/sshd_config_celix \ + && mkdir /run/sshd + +RUN yes password | passwd root Review Comment: Good point! Since we are indeed not sure how Gitpod is running their container (I surely hope not with `--net=host`) it is better to not set a password for the root user. I updated the pull-request to re-introduce the Ubuntu containerfile. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on code in PR #656: URL: https://github.com/apache/celix/pull/656#discussion_r1421723092 ## container/support-scripts/build-all.sh: ## @@ -0,0 +1,30 @@ +#!/bin/bash Review Comment: This directory/file is only available within the `container/` directory for convenience and thus not stored as top-level directory. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on code in PR #656: URL: https://github.com/apache/celix/pull/656#discussion_r1375244730 ## container/Containerfile.gitpod: ## @@ -0,0 +1,75 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# SSH credentials: +# root@password + +FROM docker.io/gitpod/workspace-full:2023-10-06-16-22-14@sha256:76d3041cc7a2caa00d6f4610ace0e15009c361515f3d5d9ee6690e4019adcfd4 + +# Switch to root user to install dependencies and configure sshd +USER root + +# Install dependencies +RUN DEBIAN_FRONTEND="noninteractive" apt-get update && \ +DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ +# Development dependencies \ +dos2unix \ +git \ +locales-all \ +rsync \ +tar \ +ssh \ +tzdata \ +# Build dependencies \ +build-essential \ +ccache \ +cmake \ +curl \ +default-jdk \ +gcc \ +g++ \ +gdb \ +make \ +python3 \ +# Celix dependencies \ +civetweb \ +libavahi-compat-libdnssd-dev \ +libcivetweb-dev \ +libcpputest-dev \ +libcurl4-openssl-dev \ +libczmq-dev \ +libffi-dev \ +libjansson-dev \ +libxml2-dev \ +libzip-dev \ +rapidjson-dev \ +uuid-dev && \ +apt-get clean + +RUN ( \ +echo 'Port 2233'; \ +echo 'LogLevel INFO'; \ +echo 'PermitRootLogin yes'; \ +echo 'PasswordAuthentication yes'; \ +echo 'Subsystem sftp /usr/lib/openssh/sftp-server'; \ + ) > /etc/ssh/sshd_config_celix \ + && mkdir /run/sshd + +RUN yes password | passwd root Review Comment: I am not sure if setting the root password is wise. Especially when also running this at gitpod.io, to be honest I do not know the technical details I think this could be an issue. I think in this case I rather see a gitpod and local ubuntu develop containerfile. ## container/support-scripts/build-all.sh: ## @@ -0,0 +1,30 @@ +#!/bin/bash Review Comment: I do not think this file is needed and I rather keep the number of top level dirs small. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1783797395 > > @pnoltes I just got the Gitpod image working as well, however it is a bit slow. Feel free to give it a try via my own repo: https://gitpod.io/#https://github.com/rlenferink/celix > > The speed of it makes me aim to also include the instructions to run it locally (which we maybe can even use the same gitpod image for) > > Nice, I see that there is now more support than only browser vscode. I even could run individually test when installing the TestMate plugin and correctly configuring where the test executables can be found (in cmake-build-debug). I tested the gitpod environment and from what I could see this works nicely. Few remarks: - I could run individually unit tests from TestMate but not debug. Debug gives an error. - What is the plans for support? Because I can see people trying this out - and that is a good thing -, but this also means that we a) get questions about the gitpod env and b) we should maintain the gitpod container file (for Apache Celix updates and for gitpod environment updates). @rlenferink WDYT? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on code in PR #656: URL: https://github.com/apache/celix/pull/656#discussion_r1353008835 ## container/README.md: ## @@ -0,0 +1,53 @@ +# Celix dev container usage + +This subdirectory contains a [Containerfile](./Containerfile.gitpod) for developing on Celix locally or via Gitpod. +Since the image is based on the Gitpod workspace image, it is also usable via https://gitpod.io/#https://github.com/apache/celix + +The below steps only need to be executed if you want to develop locally, and not via Gitpod. + +## Using a pre-built image + +### Start locally with sshd daemon + +```bash +cd + +# Start a local container with the SSH daemon running +./container/start-gitpod-container.sh +``` + +Now connect to the container via the remote container option of your favoured IDE and start building/developing. + +### Start locally with only a bash shell + +The start script allows passing of additional paramters, which will override the starting of the SSH daemon. +Execute the following commands to open a bash shell and build Celix from the command line: + +```bash +cd + +# Start a local container and open a bash shell +./container/start-gitpod-container.sh bash + +# Build Apache Celix +mkdir celix-build +cd celix-build +../container/support-scripts/build-all.sh +make -j + +# Run the unit tests for Apache Celix +ctest --output-on-failure +``` + +## Build the celix-dev image yourself + +```bash +podman build -t docker.io/apache/celix-dev:$(date +%Y%m%d)-gitpod -f Containerfile.gitpod . +``` + +## Deploy a new celix-dev image (Celix PMC members only) + +```bash +podman login docker.io +podman push docker.io/apache/celix-dev:$(date +%Y%m%d)-gitpod Review Comment: I am not sure how easy it is to automate this. I think, since the dependencies don't change that often, that initially it would be okay to push this manually. Building this every time takes unnecessary build time IMO and also the versioning is not tightly coupled to a Celix release. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on code in PR #656: URL: https://github.com/apache/celix/pull/656#discussion_r1352998659 ## .gitpod.yml: ## @@ -0,0 +1,25 @@ +--- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +tasks: + - init: | + mkdir -p cmake-build-debug-gitpod + cd cmake-build-debug-gitpod && ../container/support-scripts/build-all.sh && make -j + +image: + file: container/Containerfile.gitpod Review Comment: I think it would be good to have an actual image here (see the `container/README.md` for info on how to build and deploy) instead of having to build the image every time. I know INFRA does provide access to Docker (and I think also to GHCR), and I am willing to work with them on setting up a location for pushing this dev image. This would then be changed to e.g.: ```yml image: docker.io/apache/celix-dev:20231010-gitpod ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1752157230 > @pnoltes I just got the Gitpod image working as well, however it is a bit slow. Feel free to give it a try via my own repo: https://gitpod.io/#https://github.com/rlenferink/celix > > The speed of it makes me aim to also include the instructions to run it locally (which we maybe can even use the same gitpod image for) Nice, I see that there is now more support than only browser vscode. I even could run individually test when installing the TestMate plugin and correctly configuring where the test executables can be found (in cmake-build-debug). -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1752122387 @pnoltes I just got the Gitpod image working as well, however it is a bit slow. Feel free to give it a try via my own repo: https://gitpod.io/#https://github.com/rlenferink/celix The speed of it makes me aim to also include the instructions to run it locally (which we maybe can even use the same gitpod image for) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1752110539 > What's the advantage of using container over using a Vagrant box (virtual machine)? > > In my personal experience, containers have far more restrictions than VM, and is generally more difficult to set up correctly. Most of the issues discussed here don't exist if VMs are used, and we won't have #658. Yes, containers are more efficient than VMs, but that does not mean much except for CI. Moreover, Vagrant can work with [containers](https://developer.hashicorp.com/vagrant/docs/provisioning/podman). > > For individual developer, Vagrant can serve as a convenient CLI, whether using VMs or containers. For me personally it is that I am familiar with containers and am using them extensively, and am not familiar / have never used vagrant. My experience with VMs is that it is quite often just a bit slower and file-sharing between host and VM is mostly a pain point (how else do we get to use an IDE ?). > I cannot yet build the image, getting the following error: > > > Setting up python3.10-minimal (3.10.12-1~22.04.2) ... > > [Errno 13] Permission denied: '/usr/lib/python3.10/**pycache**/**future**.cpython-310.pyc.140478821390960'dpkg: error processing package python3.10-minimal (--configure): > > installed python3.10-minimal package post-installation script subprocess returned error exit status 1 > > Errors were encountered while processing: > > python3.10-minimal > > E: Sub-process /usr/bin/dpkg returned an error code (1) > > The command '/bin/sh -c DEBIAN_FRONTEND="noninteractive" apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends dos2unix git locales-all rsync tar ssh tzdata build-essential ccache cmake curl default-jdk gcc g++ gdb make python3 civetweb libavahi-compat-libdnssd-dev libcivetweb-dev libcpputest-dev libcurl4-openssl-dev libczmq-dev libffi-dev libjansson-dev libxml2-dev libzip-dev rapidjson-dev uuid-dev && apt-get clean' returned a non-zero code: 100 Just for reference, the command I used was `cd container && podman build -t apache/celix-dev:2.4.0-ubuntu -f Containerfile.ubuntu .` (as non-root user) and the OS I am using is Fedora 38. I removed all my cached images and it still builds; so I am not sure what is going wrong here. What OS are you using? > This is also why I am not sure if we should add a dev container or dev virtual machine configuration, this requires us to maintain and document the dev container image and/or virtual machine configuration. This indeed is true. Whether we offer a dev container, a VM template or something else, it needs to be maintained. > The reason why I see more value in a gitpod config or Github codespaces is that this enable users / potential developers to try out Apache Celix without setting up a machine or even needing a machine (browser based). So they could start coding with a minimal hassle. But also for gitpod / codespaces we should consider how much effort it is going to be to maintain the gitpod/codespaces configuration. For me personally I am not extremely content with more-and-more usage of cloud-based technology for these kind of things. The main reason is that only the first 'X' amount of hours is for free and if a certain amount of hours is exceeded then there is a need to pay said providers (obviously). Since I am mostly using my personal environment for this and doing this outside of work I have no intend to pay for these services. I am definitely not against having a codespaces/gitpod image, but at least there should be an alternative so we don't force people to use these providers if they don't want to (or there should be instructions on how to use it locally). Maybe we should/could even be offering multiple developer solutions (vanilla container, codespaces container, VM template etc...) ? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1752103491 I cannot yet build the image, getting the following error: > Setting up python3.10-minimal (3.10.12-1~22.04.2) ... [Errno 13] Permission denied: '/usr/lib/python3.10/__pycache__/__future__.cpython-310.pyc.140478821390960'dpkg: error processing package python3.10-minimal (--configure): installed python3.10-minimal package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: python3.10-minimal E: Sub-process /usr/bin/dpkg returned an error code (1) The command '/bin/sh -c DEBIAN_FRONTEND="noninteractive" apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends dos2unix git locales-all rsync tar ssh tzdata build-essential ccache cmake curl default-jdk gcc g++ gdb make python3 civetweb libavahi-compat-libdnssd-dev libcivetweb-dev libcpputest-dev libcurl4-openssl-dev libczmq-dev libffi-dev libjansson-dev libxml2-dev libzip-dev rapidjson-dev uuid-dev && apt-get clean' returned a non-zero code: 100 This is also why I am not sure if we should add a dev container or dev virtual machine configuration, this requires us to maintain and document the dev container image and/or virtual machine configuration. The reason why I see more value in a gitpod config or Github codespaces is that this enable users / potential developers to try out Apache Celix without setting up a machine or even needing a machine (browser based). So they could start coding with a minimal hassle. But also for gitpod / codespaces we should consider how much effort it is going to be to maintain the gitpod/codespaces configuration. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
PengZheng commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1748169757 What's the advantage of using container vs using a Vagrant box (virtual machine)? In my personal experience, containers have far more restrictions than VM, and is generally more difficult to set up correctly. Yes, containers are more efficient than VMs, but that does not mean much except for CI. Moreover, Vagrant can work with [containers](https://developer.hashicorp.com/vagrant/docs/provisioning/podman). For individual developer, Vagrant brings more convenience whether using VMs or containers. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1743646936 > and the IDE has an option to specify a rem Interesting, give me some time to try this out. I am especially curious how much work it is to set this up and whether you can save your setup to quickly resume. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1741245608 I added the SSH package and configuration. I tested this with CLion 2022.x and the latest CLion version (2023.2.x), and the IDE has an option to specify a remote development environment: https://www.jetbrains.com/help/clion/2023.2/remote-development-a.html That means that instead of setting up a Remote Host and the IDE constantly copying files (even though the deployment mapping says otherwise), it downloads and starts an IDE backend within the container. The IDE on the host is connecting to that and there is no loss in speed between editing, building and testing. Since this is up to the IDE, there are no Jetbrains specific items added, which means that the container can also be used standalone (volume mount the sources, open a shell and `mkdir build && cmake .. && make -j && ctest`). Next to that the possibility also still exists to use the Remote Host option (although that option being significantly slower). Feedback / thoughts are welcome ;) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1736036155 For me the build already fails with the `gitpod` user: ```bash gitpod /home/rlenferink/workspace/asf/celix/celix-container/build (feature/add-dev-container) $ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_TESTING=ON .. CMake Error: Unable to (re)create the private pkgRedirects directory: /home/rlenferink/workspace/asf/celix/celix-container/build/CMakeFiles/pkgRedirects gitpod /home/rlenferink/workspace/asf/celix/celix-container/build (feature/add-dev-container) $ mkdir testDir mkdir: cannot create directory ‘testDir’: Permission denied ``` I had the exact same issues when I tried a non-root user in the Containerfile of this pull request. This seems intended behavior to lock down the users who are able to write to volumes. > but I am not a experienced vscode user Neither am I. Every Apache committer is allowed a Jetbrains license for their OSS work, so that is what I am using and am experienced with. My goal was to play around and see if I can extend the Containerfile for use with Clion and then as follow-up see how this can be integrated in e.g. GitHub codespaces. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
pnoltes commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1736014098 > @pnoltes I tried the `.gitpod.Dockerfile` you put on your branch. That seems to start a container with the `gitpod` user, but I can't it to build Celix succesfully locally. The `gitpod` user has no access to write to the volume mounted files. > > I also tried with my suggested Containerfile to execute as a non-root user within the container, but didn't succeed. This seems to be a known 'issue' with volume mounts. Normally for operational applications for data volume mounts there is an entrypoint which `chown`s the volume mount to the uid/gid within the container so that the user within the container can write to it. > > When wanting to delete these files as a non-root user on the host you can do e.g. `podman unshare rm -rf *`. But for a development container that isn't something that is wanted IMO. > > Were you able to build Celix using that gitpod container locally? Yes, the main issue I had was the - at the time - I could not run (and thus also not debug) gtests from the IDE. (I think that should now be possible with `C++ TestMate`, but I am not a experienced vscode user.) But do note that this was about 3 years ago, I am not sure how much gitpod has changed. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
rlenferink commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1736004882 @pnoltes I tried the `.gitpod.Dockerfile` you put on your branch. That seems to start a container with the `gitpod` user, but I can't it to build Celix succesfully locally. The `gitpod` user has no access to write to the volume mounted files. I also tried with my suggested Containerfile to execute as a rootless user within the container, but couldn't succeed. This seems to be a known 'issue' with volume mounts. Normally for operational applications for data volume mounts there is an entrypoint which `chown`s the volume mount to the uid/gid within the container so that the user within the container can write to it. When wanting to delete these files on the host you can do e.g. `podman unshare rm -rf *`. But for a development container that doesn't seem feasible. Were you able to build Celix using that gitpod container locally? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Add dev container with Celix dependencies (celix)
codecov-commenter commented on PR #656: URL: https://github.com/apache/celix/pull/656#issuecomment-1732642282 ## [Codecov](https://app.codecov.io/gh/apache/celix/pull/656?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report > Merging [#656](https://app.codecov.io/gh/apache/celix/pull/656?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (4147cb6) into [master](https://app.codecov.io/gh/apache/celix/commit/9bf7affc0f639c1225d958d31691693acad269b0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9bf7aff) will **increase** coverage by `0.02%`. > Report is 2 commits behind head on master. > The diff coverage is `n/a`. > :exclamation: Current head 4147cb6 differs from pull request most recent head 55ad18a. Consider uploading reports for the commit 55ad18a to get more accurate results ```diff @@Coverage Diff @@ ## master #656 +/- ## == + Coverage 81.58% 81.60% +0.02% == Files 260 260 Lines 3467534675 == + Hits2829028297 +7 + Misses 6385 6378 -7 ``` [see 3 files with indirect coverage changes](https://app.codecov.io/gh/apache/celix/pull/656/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
