You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2022/08/20 02:32:43 UTC

[couchdb] branch main updated (e6db35b6b -> 7a53ffcce)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git


    from e6db35b6b Update couch_replicator_use_checkpoints_tests
     new b9afb4590 update devcontainer
     new 7fabe4bfb update variable name and readme
     new 7a53ffcce moved the name property to the correct spot.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .devcontainer/Dockerfile        | 31 ++++++++++---------------------
 .devcontainer/devcontainer.json | 30 ++++++++++++++++++++----------
 README-DEV.rst                  | 16 ++++++++++++++++
 README.rst                      | 19 +++++++++++++++++++
 4 files changed, 65 insertions(+), 31 deletions(-)


[couchdb] 01/03: update devcontainer

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit b9afb4590a5cf31a67cfe13c341eecb64dea0102
Author: Zach Lankton <za...@gmail.com>
AuthorDate: Mon Aug 15 17:17:25 2022 +0000

    update devcontainer
---
 .devcontainer/Dockerfile        | 31 ++++++++++---------------------
 .devcontainer/devcontainer.json | 30 ++++++++++++++++++++----------
 README-DEV.rst                  | 15 +++++++++++++++
 README.rst                      | 18 ++++++++++++++++++
 4 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 04a117cb2..46a09d0cf 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,24 +1,13 @@
-ARG ELIXIR_VERSION
-FROM elixir:${ELIXIR_VERSION}
+ARG IMG
+FROM ${IMG}
 
-# Install SpiderMonkey 60 and tell CouchDB to use it in configure
-ENV SM_VSN=60
+# Install SpiderMonkey 78 and tell CouchDB to use it in configure
+ENV SM_VSN=78
 
-# Use NodeSource binaries for Node.js (Fauxton dependency)
-RUN set -ex; \
-    curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -; \
-    echo "deb https://deb.nodesource.com/node_10.x buster main" | tee /etc/apt/sources.list.d/nodesource.list; \
-    echo "deb-src https://deb.nodesource.com/node_10.x buster main" | tee -a /etc/apt/sources.list.d/nodesource.list
+USER root
 
-RUN set -ex; \
-    apt-get update; \
-    apt-get install -y --no-install-recommends \
-        libmozjs-${SM_VSN}-dev \
-        libicu-dev \
-        python3-venv \
-        python3-pip \
-        python3-sphinx \
-        nodejs
-
-# Documentation theme
-RUN pip3 install sphinx_rtd_theme
+# These lines are necessary if the user has cloned the repo to their local machine
+# and clicked the "Reopen in container button"
+RUN mkdir -p /workspaces/couchdb
+WORKDIR /workspaces/couchdb
+COPY . .
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 666f9fa16..5dbf45dbd 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,19 +1,29 @@
 {
     "build": {
         "dockerfile": "Dockerfile",
+        "context": "..",
         "args": {
+            "name": "couchdb-dev",
             // Useful choices include:
-            // 1.11 -> Erlang 23, Debian Buster
-            // 1.10 -> Erlang 22, Debian Buster
-            // 1.9  -> Erlang 22, Debian Buster
+            // apache/couchdbci-debian:bullseye-erlang-25.0.2
+            // apache/couchdbci-debian:bullseye-erlang-24.3.4.2
+            // apache/couchdbci-debian:bullseye-erlang-23.3.4.15
             //
-            // Older versions based on Debian Stretch will not include
-            // SpiderMonkey 60, which the Dockerfile expects to be able
-            // to install via apt-get.
-            "ELIXIR_VERSION": "1.10"
+            "IMG": "apache/couchdbci-debian:bullseye-erlang-25.0.2"
         }
     },
-    "extensions": [
-        "erlang-ls.erlang-ls"
-    ]
+
+    // We are using a volume mount to improve performance
+    // https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-a-named-volume-for-your-entire-source-tree
+    //
+    // and eliminate test flake.
+    // https://github.com/apache/couchdb/discussions/4145
+    //
+    // Your code will not be bound to the host OS folder you started this project from.
+    // Your code will live inside the volume created for the container under /workspace.
+    "workspaceMount": "target=/workspaces/couchdb,type=volume",
+    "workspaceFolder": "/workspaces/couchdb",
+    "postCreateCommand": "./configure && make",
+
+    "extensions": ["erlang-ls.erlang-ls"]
 }
diff --git a/README-DEV.rst b/README-DEV.rst
index 863218de9..84e16def7 100644
--- a/README-DEV.rst
+++ b/README-DEV.rst
@@ -64,6 +64,21 @@ associated ``devcontainer.json`` file to quickly provision a
 development environment using `GitHub Codespaces <https://github.com/features/codespaces>`_
 or `Visual Studio Code <https://code.visualstudio.com/docs/remote/containers>`_.
 
+
+.. image:: https://img.shields.io/static/v1?label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode
+    :target: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/apache/couchdb
+
+If you already have VS Code and Docker installed, you can click the badge above or 
+`here <https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/apache/couchdb>`_ 
+to get started. Clicking these links will cause VS Code to automatically install the 
+Remote - Containers extension if needed, clone the source code into a container volume, 
+and spin up a dev container for use.
+
+This ``devcontainer`` will automatically run ``./configure && make`` the first time it is created.  
+While this may take some extra time to spin up, this tradeoff means you will be able to 
+run things like ``./dev/run`` and ``make check`` straight away.  Subsequent startups should be quick.
+
+
 Debian-based (inc. Ubuntu) Systems
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/README.rst b/README.rst
index e6d294ceb..6bb69cd09 100644
--- a/README.rst
+++ b/README.rst
@@ -60,6 +60,24 @@ Run a basic test suite for CouchDB by browsing here:
 Getting started with developing
 -------------------------------
 
+**Quickstart:**
+
+
+.. image:: https://img.shields.io/static/v1?label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode
+    :target: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/apache/couchdb
+
+If you already have VS Code and Docker installed, you can click the badge above or 
+`here <https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/apache/couchdb>`_ 
+to get started. Clicking these links will cause VS Code to automatically install the 
+Remote - Containers extension if needed, clone the source code into a container volume, 
+and spin up a dev container for use.
+
+This ``devcontainer`` will automatically run ``./configure && make`` the first time it is created.  
+While this may take some extra time to spin up, this tradeoff means you will be able to 
+run things like ``./dev/run`` and ``make check`` straight away.  Subsequent startups should be quick.
+
+**Manual Dev Setup:**
+
 For more detail, read the README-DEV.rst file in this directory.
 
 Basically you just have to install the needed dependencies which are


[couchdb] 03/03: moved the name property to the correct spot.

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 7a53ffcceea2a7990438277b7a0520c8dcb38ec6
Author: Zach Lankton <za...@gmail.com>
AuthorDate: Thu Aug 18 08:26:49 2022 -0400

    moved the name property to the correct spot.
---
 .devcontainer/devcontainer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 0c581315a..a14b7b1e6 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,9 +1,9 @@
 {
+    "name": "couchdb-dev",
     "build": {
         "dockerfile": "Dockerfile",
         "context": "..",
         "args": {
-            "name": "couchdb-dev",
             // Useful choices include:
             // apache/couchdbci-debian:bullseye-erlang-25.0.2
             // apache/couchdbci-debian:bullseye-erlang-24.3.4.2


[couchdb] 02/03: update variable name and readme

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 7fabe4bfb3523f44942e3ea0a185e17e2ef96950
Author: Zach Lankton <za...@gmail.com>
AuthorDate: Wed Aug 17 15:33:13 2022 +0000

    update variable name and readme
---
 .devcontainer/Dockerfile        | 4 ++--
 .devcontainer/devcontainer.json | 2 +-
 README-DEV.rst                  | 3 ++-
 README.rst                      | 3 ++-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 46a09d0cf..2670d8795 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,5 +1,5 @@
-ARG IMG
-FROM ${IMG}
+ARG COUCHDB_IMAGE
+FROM ${COUCHDB_IMAGE}
 
 # Install SpiderMonkey 78 and tell CouchDB to use it in configure
 ENV SM_VSN=78
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 5dbf45dbd..0c581315a 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -9,7 +9,7 @@
             // apache/couchdbci-debian:bullseye-erlang-24.3.4.2
             // apache/couchdbci-debian:bullseye-erlang-23.3.4.15
             //
-            "IMG": "apache/couchdbci-debian:bullseye-erlang-25.0.2"
+            "COUCHDB_IMAGE": "apache/couchdbci-debian:bullseye-erlang-25.0.2"
         }
     },
 
diff --git a/README-DEV.rst b/README-DEV.rst
index 84e16def7..e29d632f5 100644
--- a/README-DEV.rst
+++ b/README-DEV.rst
@@ -76,7 +76,8 @@ and spin up a dev container for use.
 
 This ``devcontainer`` will automatically run ``./configure && make`` the first time it is created.  
 While this may take some extra time to spin up, this tradeoff means you will be able to 
-run things like ``./dev/run`` and ``make check`` straight away.  Subsequent startups should be quick.
+run things like ``./dev/run``, ``./dev/run --admin=admin:admin``,  ``./dev/run --with-admin-party-please``, 
+and ``make check`` straight away.  Subsequent startups should be quick.
 
 
 Debian-based (inc. Ubuntu) Systems
diff --git a/README.rst b/README.rst
index 6bb69cd09..d06904fe8 100644
--- a/README.rst
+++ b/README.rst
@@ -74,7 +74,8 @@ and spin up a dev container for use.
 
 This ``devcontainer`` will automatically run ``./configure && make`` the first time it is created.  
 While this may take some extra time to spin up, this tradeoff means you will be able to 
-run things like ``./dev/run`` and ``make check`` straight away.  Subsequent startups should be quick.
+run things like ``./dev/run``, ``./dev/run --admin=admin:admin``,  ``./dev/run --with-admin-party-please``, 
+and ``make check`` straight away.  Subsequent startups should be quick.
 
 **Manual Dev Setup:**