[couchdb] branch maser created (now bf61a00)

2020-09-01 Thread vatamane
This is an automated email from the ASF dual-hosted git repository.

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


  at bf61a00  Handle empty maps in active_tasks data structure

No new revisions were added by this update.



[couchdb] branch allow-creating-new-deleted-documents updated (64a6d8c -> 5d2af35)

2020-09-01 Thread vatamane
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch allow-creating-new-deleted-documents
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 64a6d8c  Allow creating new deleted documents
 add 5d2af35  Allow creating new deleted documents

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (64a6d8c)
\
 N -- N -- N   refs/heads/allow-creating-new-deleted-documents 
(5d2af35)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 src/fabric/src/fabric2_db.erl  | 4 ++--
 src/fabric/test/fabric2_doc_crud_tests.erl | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)



[couchdb] branch allow-creating-new-deleted-documents updated (09d65ac -> 64a6d8c)

2020-09-01 Thread vatamane
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch allow-creating-new-deleted-documents
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 09d65ac  Allow creating new deleted documents
 add 64a6d8c  Allow creating new deleted documents

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (09d65ac)
\
 N -- N -- N   refs/heads/allow-creating-new-deleted-documents 
(64a6d8c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 src/fabric/test/fabric2_doc_crud_tests.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



[couchdb] 01/01: Allow creating new deleted documents

2020-09-01 Thread vatamane
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch allow-creating-new-deleted-documents
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 09d65ac78c5d683cc194d245588d119681bab798
Author: Nick Vatamaniuc 
AuthorDate: Tue Sep 1 15:28:25 2020 -0400

Allow creating new deleted documents

This makes it compatible with CouchDB <= 3.x where we can create deleted
documents.

How to check:

```
$ http put $DB1/mydb
$ http put $DB1/mydb/foo _deleted:='true' a=b
{
"id": "foo",
"ok": true,
"rev": "1-ad7eb689fcae75e7a7edb57dc1f30939"
}
```
---
 src/fabric/src/fabric2_db.erl  | 11 +++
 src/fabric/test/fabric2_doc_crud_tests.erl | 11 ---
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/fabric/src/fabric2_db.erl b/src/fabric/src/fabric2_db.erl
index 4ac1055..7bf8d2c 100644
--- a/src/fabric/src/fabric2_db.erl
+++ b/src/fabric/src/fabric2_db.erl
@@ -1831,13 +1831,16 @@ update_doc_interactive(Db, Doc0, Future, _Options) ->
 
 % Check that a revision was specified if required
 Doc0RevId = doc_to_revid(Doc0),
-if Doc0RevId /= {0, <<>>} orelse WinnerRevId == {0, <<>>} -> ok; true ->
+HasRev = Doc0RevId =/= {0, <<>>},
+if HasRev orelse WinnerRevId == {0, <<>>} -> ok; true ->
 ?RETURN({Doc0, conflict})
 end,
 
-% Check that we're not trying to create a deleted doc
-if Doc0RevId /= {0, <<>>} orelse not Doc0#doc.deleted -> ok; true ->
-?RETURN({Doc0, conflict})
+% Allow inserting new deleted documents. CouchDB <= 3.x allows it so we try
+% to stay compatible
+case not HasRev andalso Doc0#doc.deleted andalso is_map(Winner) of
+true -> ?RETURN({Doc0, conflict});
+false -> ok
 end,
 
 % Get the target revision to update
diff --git a/src/fabric/test/fabric2_doc_crud_tests.erl 
b/src/fabric/test/fabric2_doc_crud_tests.erl
index ce3757d..3c5109b 100644
--- a/src/fabric/test/fabric2_doc_crud_tests.erl
+++ b/src/fabric/test/fabric2_doc_crud_tests.erl
@@ -49,7 +49,7 @@ doc_crud_test_() ->
 ?TDEF(recreate_doc_basic),
 ?TDEF(conflict_on_create_new_with_rev),
 ?TDEF(conflict_on_update_with_no_rev),
-?TDEF(conflict_on_create_as_deleted),
+?TDEF(allow_create_new_as_deleted),
 ?TDEF(conflict_on_recreate_as_deleted),
 ?TDEF(conflict_on_extend_deleted),
 ?TDEF(open_doc_revs_basic),
@@ -449,13 +449,18 @@ conflict_on_update_with_no_rev({Db, _}) ->
 ?assertThrow(conflict, fabric2_db:update_doc(Db, Doc2)).
 
 
-conflict_on_create_as_deleted({Db, _}) ->
+allow_create_new_as_deleted({Db, _}) ->
 Doc = #doc{
 id = fabric2_util:uuid(),
 deleted = true,
 body = {[{<<"foo">>, <<"bar">>}]}
 },
-?assertThrow(conflict, fabric2_db:update_doc(Db, Doc)).
+{ok, {1, Rev}} = fabric2_db:update_doc(Db, Doc),
+?assertEqual({not_found, deleted}, fabric2_db:open_doc(Db, Doc#doc.id)),
+Doc1 = Doc#doc{
+revs = {1, [Rev]}
+},
+?assertEqual({ok, Doc1}, fabric2_db:open_doc(Db, Doc#doc.id, [deleted])).
 
 
 conflict_on_recreate_as_deleted({Db, _}) ->



[couchdb] branch allow-creating-new-deleted-documents created (now 09d65ac)

2020-09-01 Thread vatamane
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch allow-creating-new-deleted-documents
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


  at 09d65ac  Allow creating new deleted documents

This branch includes the following new commits:

 new 09d65ac  Allow creating new deleted documents

The 1 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.




[couchdb] branch 3.1.1-bump-deps created (now b5cac74)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 3.1.1-bump-deps
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


  at b5cac74  Bump fauxton, docs for 3.1.1 release

This branch includes the following new commits:

 new b5cac74  Bump fauxton, docs for 3.1.1 release

The 1 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.




[couchdb] 01/01: Bump fauxton, docs for 3.1.1 release

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 3.1.1-bump-deps
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit b5cac746ea879bcc056ce3a45e7a9940de674496
Author: Joan Touzet 
AuthorDate: Tue Sep 1 14:57:07 2020 -0400

Bump fauxton, docs for 3.1.1 release
---
 rebar.config.script | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rebar.config.script b/rebar.config.script
index d8afc10..f939419 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -151,9 +151,9 @@ DepDescs = [
 
 %% Non-Erlang deps
 {docs, {url, "https://github.com/apache/couchdb-documentation"},
-   {tag, "3.1.0-RC1"}, [raw]},
+   {tag, "3.1.1-RC1"}, [raw]},
 {fauxton,  {url, "https://github.com/apache/couchdb-fauxton"},
-   {tag, "v1.2.4"}, [raw]},
+   {tag, "v1.2.5"}, [raw]},
 %% Third party deps
 {folsom,   "folsom",   {tag, "CouchDB-0.8.3"}},
 {hyper,"hyper",{tag, "CouchDB-2.2.0-6"}},



[couchdb-documentation] branch 3.1.1-release-notes updated (376b978 -> e4839c9)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 3.1.1-release-notes
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


 discard 376b978  [WIP] Release notes for 3.1.1
 add e4839c9  [WIP] Release notes for 3.1.1

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (376b978)
\
 N -- N -- N   refs/heads/3.1.1-release-notes (e4839c9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 src/whatsnew/3.1.rst | 3 +++
 1 file changed, 3 insertions(+)



[couchdb-documentation] branch 3.1.1-release-notes updated (e3d3a53 -> 376b978)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 3.1.1-release-notes
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


 discard e3d3a53  Update 3.1.rst
 discard a30f9e5  remove trailing whitespace, thanks github
 discard f81f5ca  Add files via upload
 discard def1387  [WIP] Release notes for 3.1.1
 add 376b978  [WIP] Release notes for 3.1.1

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e3d3a53)
\
 N -- N -- N   refs/heads/3.1.1-release-notes (376b978)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 src/whatsnew/3.1.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[couchdb-documentation] branch 3.1.1-release-notes updated (a30f9e5 -> e3d3a53)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 3.1.1-release-notes
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


from a30f9e5  remove trailing whitespace, thanks github
 add e3d3a53  Update 3.1.rst

No new revisions were added by this update.

Summary of changes:
 src/whatsnew/3.1.rst | 1 +
 1 file changed, 1 insertion(+)



[couchdb-documentation] branch 3.1.1-release-notes updated (f81f5ca -> a30f9e5)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 3.1.1-release-notes
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


from f81f5ca  Add files via upload
 add a30f9e5  remove trailing whitespace, thanks github

No new revisions were added by this update.

Summary of changes:
 src/whatsnew/3.1.rst | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)



[couchdb-documentation] branch 3.1.1-release-notes updated: Add files via upload

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 3.1.1-release-notes
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/3.1.1-release-notes by this 
push:
 new f81f5ca  Add files via upload
f81f5ca is described below

commit f81f5ca3d36c9303f86777405bfc52d1e96ce46b
Author: Joan Touzet 
AuthorDate: Tue Sep 1 14:44:29 2020 -0400

Add files via upload
---
 images/gf-gnome-rainbows.png | Bin 0 -> 73847 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/images/gf-gnome-rainbows.png b/images/gf-gnome-rainbows.png
new file mode 100644
index 000..07c7145
Binary files /dev/null and b/images/gf-gnome-rainbows.png differ



[couchdb-documentation] 01/01: [WIP] Release notes for 3.1.1

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 3.1.1-release-notes
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git

commit def13871decafe5c0af2e630dd9e83cad0cb48af
Author: Joan Touzet 
AuthorDate: Tue Sep 1 14:43:13 2020 -0400

[WIP] Release notes for 3.1.1
---
 src/whatsnew/3.1.rst | 70 
 1 file changed, 70 insertions(+)

diff --git a/src/whatsnew/3.1.rst b/src/whatsnew/3.1.rst
index f7b3648..9af17d3 100644
--- a/src/whatsnew/3.1.rst
+++ b/src/whatsnew/3.1.rst
@@ -20,6 +20,76 @@
 :depth: 1
 :local:
 
+.. _release/3.1.1:
+
+Version 3.1.1
+=
+
+Features and Enhancements
+-
+
+.. rst-class:: open
+
+* :ghissue:`3102`, :ghissue:`1600`, :ghissue:`2877`, :ghissue:`2041`: When a
+  client disconnects unexpectedly, CouchDB will no longer log a "``normal``"
+  "``unknown``" error. Bring forth the rainbows.
+.. figure:: ../../images/
+  :align: center
+  :alt: The Gravity Falls gnome pukes some rainbows for us.
+
+* :ghissue:`3109`: Drilldown parameters for text index searches may now be
+  specified as a list of lists, to avoid having to define this redundantly
+  in a single query. (Some languages don't have this facility.)
+
+Performance
+---
+
+Bugfixes
+
+
+* :ghissue:`2935`: The replicator now correctly picks jobs to restart during
+  rescheduling, where previously with high load it may have failed to try to
+  restart crashed jobs.
+
+* :ghissue:`2981`: When handling extremely large documents (≥50MB), CouchDB
+  can no longer time out on a ``gen_server:call`` if bypassing the IOQ.
+
+* :ghissue:`2941`: CouchDB will no longer fail to compact databases if it
+  finds files from a 2.x compaction process (prior to an upgrade) on disk.
+
+* :ghissue:`2955` CouchDB now sends the correct CSP header to ensure
+  Fauxton operates correctly with newer browsers.
+  
+* :ghissue:`3061`, :ghissue:`3080`: The `couch_index` server won't crash
+  and log errors if a design document is deleted while that index is
+  building, or when a ddoc is added immediately after database creation.
+  
+* :ghissue:`3078`: CouchDB now checks for and complains correctly about 
+  invalid parameters on database creation.
+
+* :ghissue:`3090`: CouchDB now correctly encodes URLs correctly when
+  encoding the `atts_since` query string.
+
+* :ghissue:`2953`: Some parameters not allowed for text-index queries on
+  partitioned database are now properly validated and rejected.
+
+* :ghissue:`3118`: Text-based search indexes may now be cleaned up
+  correctly, even if the design document is now invalid.
+
+* :ghissue:`3121`: ``fips`` is now only reported in the welcome message
+  if FIPS mode was enabled at boot (such as in ``vm.args``).
+
+Other
+-
+
+* JS tests skip faster now.
+
+* More JS tests ported into elixir: ``reader_acl``, ``reduce_builtin``,
+  ``reduce_false``, ``rev_stemming``, ``update_documents``, 
+  ``view_collation_raw``, ``view_compaction``, all the
+  ``view_multi_key`` tests, ``view_sandboxing``,
+  ``view_update_seq``,
+
 .. _release/3.1.0:
 
 Version 3.1.0



[couchdb-documentation] branch 3.1.1-release-notes created (now def1387)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 3.1.1-release-notes
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


  at def1387  [WIP] Release notes for 3.1.1

This branch includes the following new commits:

 new def1387  [WIP] Release notes for 3.1.1

The 1 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.




[couchdb] branch 3.x updated: Report if FIPS mode is enabled (#3121)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3.x by this push:
 new a5d1fa4  Report if FIPS mode is enabled (#3121)
a5d1fa4 is described below

commit a5d1fa40a1fb89205fb925e99a6bf4235c65b646
Author: Joan Touzet 
AuthorDate: Tue Sep 1 13:37:13 2020 -0400

Report if FIPS mode is enabled (#3121)

This will only report "fips" in the welcome message if FIPS mode
was enabled at boot (i.e, in vm.args).

Co-authored-by: Robert Newson 
---
 src/couch/src/couch_server.erl | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index b2f8fde..6db3f74 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -246,6 +246,16 @@ init([]) ->
 % Mark being able to receive documents with an _access property as a 
supported feature
 config:enable_feature('access-ready'),
 
+% Mark if fips is enabled
+case
+erlang:function_exported(crypto, info_fips, 0) andalso
+  crypto:info_fips() == enabled of
+true ->
+config:enable_feature('fips');
+false ->
+ok
+end,
+
 % read config and register for configuration changes
 
 % just stop if one of the config settings change. couch_server_sup



[couchdb-docker] branch master updated: Add script that keeps old couchdbdev docker images alive (#189)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-docker.git


The following commit(s) were added to refs/heads/master by this push:
 new 7f93d7e  Add script that keeps old couchdbdev docker images alive 
(#189)
7f93d7e is described below

commit 7f93d7ea550f787a66d4f87c3c190881bf4dc587
Author: Joan Touzet 
AuthorDate: Tue Sep 1 11:31:53 2020 -0400

Add script that keeps old couchdbdev docker images alive (#189)
---
 pull-all-couchdbdev-docker | 99 ++
 1 file changed, 99 insertions(+)

diff --git a/pull-all-couchdbdev-docker b/pull-all-couchdbdev-docker
new file mode 100755
index 000..cfbb8af
--- /dev/null
+++ b/pull-all-couchdbdev-docker
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+DOCKER_ORG="couchdbdev"
+
+# These are the images that are currently being used, so don't `docker rmi` 
them on cleanup.
+KEEP_IMAGES=(
+debian-buster-erlang-all
+ppc64ledebian-buster-erlang-20.3.8.25-1
+arm64v8debian-buster-erlang-20.3.8.25-1
+centos-8-erlang-20.3.8.25-1
+centos-7-erlang-20.3.8.25-1
+centos-6-erlang-20.3.8.25-1
+ubuntu-focal-erlang-20.3.8.25-1
+ubuntu-bionic-erlang-20.3.8.25-1
+ubuntu-xenial-erlang-20.3.8.25-1
+debian-buster-erlang-20.3.8.25-1
+debian-stretch-erlang-20.3.8.25-1
+ppc64le-debian-buster-erlang-20.3.8.25-1
+arm64v8-debian-buster-erlang-20.3.8.25-1
+debian-stretch-erlang-19.3.6
+centos-7-erlang-19.3.6
+centos-6-erlang-19.3.6
+)
+
+# Base images are used for building old libmozjs, primarily.
+BASE_IMAGES=(
+aarch64-debian-stretch-base
+arm64v8-debian-buster-base
+centos-6-base
+centos-7-base
+centos-8-base
+debian-buster-base
+debian-jessie-base
+debian-stretch-base
+ppc64le-debian-buster-base
+ubuntu-bionic-base
+ubuntu-trusty-base
+ubuntu-xenial-base
+)
+# These images layer in the rest of the CouchDB build chain, and 1 or more 
Erlang versions.
+IMAGES=(
+aarch64-debian-stretch-erlang-20.3.8.20
+#arm64v8-debian-buster-erlang-20.3.8.22-1
+#arm64v8-debian-buster-erlang-20.3.8.24-1
+arm64v8-debian-buster-erlang-20.3.8.25-1
+arm64v8-debian-stretch-erlang-20.3.8.22-1
+centos-6-erlang-19.3.6
+#centos-6-erlang-20.3.8.22-1
+#centos-6-erlang-20.3.8.24-1
+centos-6-erlang-20.3.8.25-1
+centos-7-erlang-19.3.6
+#centos-7-erlang-20.3.8.22-1
+#centos-7-erlang-20.3.8.24-1
+centos-7-erlang-20.3.8.25-1
+#centos-8-erlang-20.3.8.22-1
+#centos-8-erlang-20.3.8.24-1
+centos-8-erlang-20.3.8.25-1
+#debian-buster-erlang-20.3.8.22-1
+#debian-buster-erlang-20.3.8.24-1
+debian-buster-erlang-20.3.8.25-1
+debian-buster-erlang-all
+debian-jessie-erlang-17.5.3
+debian-jessie-erlang-19.3.6
+debian-stretch-erlang-19.3.6
+#debian-stretch-erlang-20.3.8.22-1
+#debian-stretch-erlang-20.3.8.24-1
+debian-stretch-erlang-20.3.8.25-1
+#ppc64le-debian-buster-erlang-20.3.8.24-1
+ppc64le-debian-buster-erlang-20.3.8.25-1
+#ppc64le-debian-stretch-erlang-20.3.8.20
+#ppc64le-debian-stretch-erlang-20.3.8.22-1
+ppc64le-debian-stretch-erlang-20.3.8.24-1
+s390x-debian-buster-erlang-20.3.8.25-1
+ubuntu-12.04-erlang-18.3
+ubuntu-bionic-erlang-19.3.6
+#ubuntu-bionic-erlang-20.3.8.22-1
+#ubuntu-bionic-erlang-20.3.8.24-1
+ubuntu-bionic-erlang-20.3.8.25-1
+ubuntu-focal-erlang-20.3.8.25-1
+ubuntu-trusty-erlang-19.3.6
+ubuntu-trusty-erlang-default
+ubuntu-xenial-erlang-19.3.6
+#ubuntu-xenial-erlang-20.3.8.22-1
+#ubuntu-xenial-erlang-20.3.8.24-1
+ubuntu-xenial-erlang-20.3.8.25-1
+)
+
+for image in ${IMAGES[*]} ${BASE_IMAGES[*]}
+do
+echo docker pull couchdbdev/${image}
+docker pull couchdbdev/${image}
+# We don't want to delete the current working set of images.
+if ! printf '%s\n' "${KEEP_IMAGES[@]}" | grep -q -P "^${image}$"; then
+echo docker rmi couchdbdev/$image
+docker rmi couchdbdev/$image
+fi
+done
+
+docker system prune -f



[couchdb] branch master updated: Tag elixir tests into meaningful groups

2020-09-01 Thread dottorblaster
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new a57b717  Tag elixir tests into meaningful groups
a57b717 is described below

commit a57b7170099e1a6830cef53f36c874d7b75e
Author: Alessio Biancalana 
AuthorDate: Mon Aug 31 19:01:49 2020 +0200

Tag elixir tests into meaningful groups
---
 test/elixir/test/all_docs_test.exs | 1 +
 test/elixir/test/attachment_names_test.exs | 1 +
 test/elixir/test/attachment_paths_test.exs | 1 +
 test/elixir/test/attachment_ranges_test.exs| 1 +
 test/elixir/test/attachment_views_test.exs | 1 +
 test/elixir/test/attachments_multipart_test.exs| 1 +
 test/elixir/test/attachments_test.exs  | 1 +
 test/elixir/test/auth_cache_test.exs   | 1 +
 test/elixir/test/basics_test.exs   | 1 +
 test/elixir/test/batch_save_test.exs   | 1 +
 test/elixir/test/bulk_docs_test.exs| 1 +
 test/elixir/test/changes_async_test.exs| 1 +
 test/elixir/test/changes_test.exs  | 1 +
 test/elixir/test/cluster_with_quorum_test.exs  | 1 +
 test/elixir/test/cluster_without_quorum_test.exs   | 1 +
 test/elixir/test/coffee_test.exs   | 1 +
 test/elixir/test/compact_test.exs  | 1 +
 test/elixir/test/config_test.exs   | 1 +
 test/elixir/test/conflicts_test.exs| 1 +
 test/elixir/test/cookie_auth_test.exs  | 1 +
 test/elixir/test/copy_doc_test.exs | 1 +
 test/elixir/test/design_docs_query_test.exs| 1 +
 test/elixir/test/design_docs_test.exs  | 1 +
 test/elixir/test/design_options_test.exs   | 1 +
 test/elixir/test/design_paths_test.exs | 1 +
 test/elixir/test/erlang_views_test.exs | 1 +
 test/elixir/test/etags_head_test.exs   | 1 +
 test/elixir/test/form_submit_test.exs  | 1 +
 test/elixir/test/helper_test.exs   | 3 +++
 test/elixir/test/http_test.exs | 1 +
 test/elixir/test/invalid_docids_test.exs   | 1 +
 test/elixir/test/jsonp_test.exs| 1 +
 test/elixir/test/jwtauth_test.exs  | 1 +
 test/elixir/test/large_docs_text.exs   | 2 ++
 test/elixir/test/local_docs_test.exs   | 1 +
 test/elixir/test/lots_of_docs_test.exs | 2 ++
 test/elixir/test/method_override_test.exs  | 1 +
 test/elixir/test/multiple_rows_test.exs| 1 +
 test/elixir/test/partition_all_docs_test.exs   | 3 +++
 test/elixir/test/partition_crud_test.exs   | 3 +++
 test/elixir/test/partition_ddoc_test.exs   | 3 +++
 test/elixir/test/partition_design_docs_test.exs| 3 +++
 test/elixir/test/partition_mango_test.exs  | 4 
 test/elixir/test/partition_size_limit_test.exs | 3 +++
 test/elixir/test/partition_size_test.exs   | 3 +++
 test/elixir/test/partition_view_test.exs   | 3 +++
 test/elixir/test/partition_view_update_test.exs| 4 
 test/elixir/test/proxyauth_test.exs| 1 +
 test/elixir/test/purge_test.exs| 1 +
 test/elixir/test/reader_acl_test.exs   | 1 +
 test/elixir/test/recreate_doc_test.exs | 1 +
 test/elixir/test/reduce_builtin_test.exs   | 1 +
 test/elixir/test/reduce_false_test.exs | 1 +
 test/elixir/test/reduce_test.exs   | 1 +
 test/elixir/test/replication_test.exs  | 3 +++
 test/elixir/test/replicator_db_bad_rep_id_test.exs | 3 +++
 test/elixir/test/replicator_db_by_doc_id_test.exs  | 3 +++
 test/elixir/test/reshard_all_docs_test.exs | 2 ++
 test/elixir/test/reshard_basic_test.exs| 2 ++
 test/elixir/test/reshard_changes_feed.exs  | 2 ++
 test/elixir/test/rev_stemming_test.exs | 1 +
 test/elixir/test/rewrite_test.exs  | 1 +
 test/elixir/test/security_validation_test.exs  | 1 +
 test/elixir/test/update_documents_test.exs | 2 ++
 test/elixir/test/users_db_test.exs | 1 +
 test/elixir/test/utf8_test.exs | 1 +
 test/elixir/test/uuids_test.exs| 3 +++
 test/elixir/test/view_collation_raw_test.exs   | 2 ++
 test/elixir/test/view_collation_test.exs   | 2 ++
 test/elixir/test/view_compaction_test.exs  | 3 +++
 test/elixir/test/view_multi_key_all_docs_test.exs  | 2 ++
 test/elixir/test/view_multi_key_design_test.exs| 2 ++
 test/elixir/test/view_offsets_test.exs | 1 +
 test/elixir/test/view_pagination_test.exs  | 1 +
 test/elixir/test/view_sandboxing_test.exs  | 2 ++
 test/elixir/test/view_test.exs | 1 +
 test/elixir/test/view_update_seq_test.exs  

[couchdb] branch 3.x-fips-mode-enabled created (now 1c510b9)

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 3.x-fips-mode-enabled
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


  at 1c510b9  Report if FIPS mode is enabled

This branch includes the following new commits:

 new 1c510b9  Report if FIPS mode is enabled

The 1 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.




[couchdb] 01/01: Report if FIPS mode is enabled

2020-09-01 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 3.x-fips-mode-enabled
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 1c510b9686070d08a990110d8898d9c5811570c7
Author: Robert Newson 
AuthorDate: Fri Jun 5 12:40:08 2020 +0100

Report if FIPS mode is enabled

This will only report "fips" in the welcome message if FIPS mode
was enabled at boot (i.e, in vm.args).
---
 src/couch/src/couch_server.erl | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index b2f8fde..6db3f74 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -246,6 +246,16 @@ init([]) ->
 % Mark being able to receive documents with an _access property as a 
supported feature
 config:enable_feature('access-ready'),
 
+% Mark if fips is enabled
+case
+erlang:function_exported(crypto, info_fips, 0) andalso
+  crypto:info_fips() == enabled of
+true ->
+config:enable_feature('fips');
+false ->
+ok
+end,
+
 % read config and register for configuration changes
 
 % just stop if one of the config settings change. couch_server_sup



[couchdb] 01/01: Merge pull request #3119 from apache/backport-dreyfus-cleanup-with-invalid-ddoc

2020-09-01 Thread jiangphcn
This is an automated email from the ASF dual-hosted git repository.

jiangphcn pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 8ef3c0d5510312e6f73d5aac772bf4e113001f5d
Merge: bb869c1 b69a11a
Author: Peng Hui Jiang 
AuthorDate: Tue Sep 1 17:05:19 2020 +0800

Merge pull request #3119 from 
apache/backport-dreyfus-cleanup-with-invalid-ddoc

3.x backport: Allow to continue to cleanup search index even if there is 
invalid ddoc

 src/dreyfus/src/dreyfus_fabric_cleanup.erl   | 16 ++--
 src/dreyfus/test/elixir/test/search_test.exs | 25 +
 2 files changed, 35 insertions(+), 6 deletions(-)



[couchdb] branch 3.x updated (bb869c1 -> 8ef3c0d)

2020-09-01 Thread jiangphcn
This is an automated email from the ASF dual-hosted git repository.

jiangphcn pushed a change to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


from bb869c1  bypass partition query limit for mango (#3114)
 add b69a11a  Allow to continue to cleanup search index even if there is 
invalid ddoc
 new 8ef3c0d  Merge pull request #3119 from 
apache/backport-dreyfus-cleanup-with-invalid-ddoc

The 1 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:
 src/dreyfus/src/dreyfus_fabric_cleanup.erl   | 16 ++--
 src/dreyfus/test/elixir/test/search_test.exs | 25 +
 2 files changed, 35 insertions(+), 6 deletions(-)



[couchdb] 01/01: Allow to continue to cleanup search index even if there is invalid ddoc

2020-09-01 Thread jiangphcn
This is an automated email from the ASF dual-hosted git repository.

jiangphcn pushed a commit to branch backport-dreyfus-cleanup-with-invalid-ddoc
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit b69a11a14acae8ece68244b079d3329e60be4e70
Author: jiangph 
AuthorDate: Tue Sep 1 16:26:20 2020 +0800

Allow to continue to cleanup search index even if there is invalid ddoc

In some situation where design document for search index created by
customer is not valid, the _search_cleanup endpoint will stop to clean
up. This will leave some search index orphan. The change is to allow
to continue to clean up search index even if there is invalid design
document for search.
---
 src/dreyfus/src/dreyfus_fabric_cleanup.erl   | 16 ++--
 src/dreyfus/test/elixir/test/search_test.exs | 25 +
 2 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/src/dreyfus/src/dreyfus_fabric_cleanup.erl 
b/src/dreyfus/src/dreyfus_fabric_cleanup.erl
index 2840a2f..6817127 100644
--- a/src/dreyfus/src/dreyfus_fabric_cleanup.erl
+++ b/src/dreyfus/src/dreyfus_fabric_cleanup.erl
@@ -30,12 +30,16 @@ go(DbName) ->
 ok.
 
 active_sigs(#doc{body={Fields}}=Doc) ->
-{RawIndexes} = couch_util:get_value(<<"indexes">>, Fields, {[]}),
-{IndexNames, _} = lists:unzip(RawIndexes),
-[begin
- {ok, Index} = dreyfus_index:design_doc_to_index(Doc, IndexName),
- Index#index.sig
- end || IndexName <- IndexNames].
+try
+{RawIndexes} = couch_util:get_value(<<"indexes">>, Fields, {[]}),
+{IndexNames, _} = lists:unzip(RawIndexes),
+[begin
+ {ok, Index} = dreyfus_index:design_doc_to_index(Doc, IndexName),
+ Index#index.sig
+ end || IndexName <- IndexNames]
+catch error:{badmatch, _Error} ->
+[]
+end.
 
 cleanup_local_purge_doc(DbName, ActiveSigs) ->
 {ok, BaseDir} = clouseau_rpc:get_root_dir(),
diff --git a/src/dreyfus/test/elixir/test/search_test.exs 
b/src/dreyfus/test/elixir/test/search_test.exs
index e524a5c..829b339 100644
--- a/src/dreyfus/test/elixir/test/search_test.exs
+++ b/src/dreyfus/test/elixir/test/search_test.exs
@@ -37,6 +37,20 @@ defmodule SearchTest do
 assert Map.has_key?(resp.body, "ok") == true
   end
 
+  def create_invalid_ddoc(db_name, opts \\ %{}) do
+invalid_ddoc = %{
+  :indexes => [
+%{"name" => "foo",  "ddoc" => "bar", "type" => "text"},
+  ]
+}
+
+ddoc = Enum.into(opts, invalid_ddoc)
+
+resp = Couch.put("/#{db_name}/_design/search", body: ddoc)
+assert resp.status_code in [201, 202]
+assert Map.has_key?(resp.body, "ok") == true
+  end
+
   def get_items (resp) do
 %{:body => %{"rows" => rows}} = resp
 Enum.map(rows, fn row -> row["doc"]["item"] end)
@@ -198,4 +212,15 @@ defmodule SearchTest do
 ids = get_items(resp)
 assert Enum.sort(ids) == ["apple"]
   end
+
+  @tag :with_db
+  test "clean up search index with invalid design document", context do
+db_name = context[:db_name]
+create_search_docs(db_name)
+create_ddoc(db_name)
+create_invalid_ddoc(db_name)
+
+resp = Couch.post("/#{db_name}/_search_cleanup")
+assert resp.status_code in [201, 202]
+  end
 end



[couchdb] branch backport-dreyfus-cleanup-with-invalid-ddoc created (now b69a11a)

2020-09-01 Thread jiangphcn
This is an automated email from the ASF dual-hosted git repository.

jiangphcn pushed a change to branch backport-dreyfus-cleanup-with-invalid-ddoc
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


  at b69a11a  Allow to continue to cleanup search index even if there is 
invalid ddoc

This branch includes the following new commits:

 new b69a11a  Allow to continue to cleanup search index even if there is 
invalid ddoc

The 1 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.




[couchdb] 01/01: Merge pull request #3118 from apache/dreyfus-cleanup-with-invalid-ddoc

2020-09-01 Thread jiangphcn
This is an automated email from the ASF dual-hosted git repository.

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

commit 27eefab014b2c8d65a167f715721090019add33a
Merge: 0c3c4b6 253d64a
Author: Peng Hui Jiang 
AuthorDate: Tue Sep 1 16:03:10 2020 +0800

Merge pull request #3118 from apache/dreyfus-cleanup-with-invalid-ddoc

Allow to continue to cleanup search index even if there is invalid design 
document

 src/dreyfus/src/dreyfus_fabric_cleanup.erl   | 16 ++--
 src/dreyfus/test/elixir/test/search_test.exs | 25 +
 2 files changed, 35 insertions(+), 6 deletions(-)



[couchdb] branch master updated (0c3c4b6 -> 27eefab)

2020-09-01 Thread jiangphcn
This is an automated email from the ASF dual-hosted git repository.

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


from 0c3c4b6  Merge pull request #3116 from apache/fix-explain-text-indexes
 add 253d64a  Allow to continue to cleanup search index even if there is 
invalid ddoc
 new 27eefab  Merge pull request #3118 from 
apache/dreyfus-cleanup-with-invalid-ddoc

The 1 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:
 src/dreyfus/src/dreyfus_fabric_cleanup.erl   | 16 ++--
 src/dreyfus/test/elixir/test/search_test.exs | 25 +
 2 files changed, 35 insertions(+), 6 deletions(-)



[couchdb] branch prototype/fdb-replicator updated (1f0a8db -> 9770e9a)

2020-09-01 Thread vatamane
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch prototype/fdb-replicator
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 1f0a8db  Update and clean up tests
 discard 6eb1a7e  Update replicator's readme file
 discard 29f020c  Update and cleanup default.ini replicator entries
 discard a1694f4  Update replicator http handlers and supervisor
 discard 6ff1e00  Update backend replicator modules
 discard 2fba87a  Update frontend replicator modules
 discard 60d3805  Introduce couch_replicator_jobs abstraction module
 discard 87eef98  Update couch_replicator_ids
 discard 9c566b1  Handle option maps in lower level modules
 discard c2cc8ad  Move parsing and validation to couch_replicator_parse module
 discard b0798f8  Cleanup couch_replicator_utils module
 discard 7aadc86  Delete old 2.x-3.x replicator modules
 discard 849f3ba  Add fold_jobs/4 and pending_count/2,3 to couch_jobs API
 discard 6462725  Handle possible iodata from jiffy:encode in couch_jobs
 discard 6376ace  Read attachment data outside the transaction
 discard bc8e943  Add after_db_create/2 and after_db_delete/2 callbacks to 
fabric
 add 6235f0f  Fix ordering of page_size based pagination for views
 add 07e179f  Merge pull request #3094 from cloudant/use-key_docid
 add bf61a00  Handle empty maps in active_tasks data structure
 add 46b28bc  Add after_db_create/2 and after_db_delete/2 callbacks to 
fabric
 add aa6f4c3  Read attachment data outside the transaction
 add 9b5cd15  Handle possible iodata from jiffy:encode in couch_jobs
 add b89a23a  Add fold_jobs/4 and pending_count/2,3 to couch_jobs API
 add b30602d  Delete old 2.x-3.x replicator modules
 add 12a1f3e  Cleanup couch_replicator_utils module
 add d8b262f  Move parsing and validation to couch_replicator_parse module
 add 9377509  Handle option maps in lower level modules
 add 8c2c70a  Update couch_replicator_ids
 add 8acd9fb  Introduce couch_replicator_jobs abstraction module
 add 1018aaf  Update frontend replicator modules
 add ff6cd16  Update backend replicator modules
 add fc67a11  Update replicator http handlers and supervisor
 add 853f3c3  Update and cleanup default.ini replicator entries
 add 9bb017a  Update replicator's readme file
 add 9770e9a  Update and clean up tests

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1f0a8db)
\
 N -- N -- N   refs/heads/prototype/fdb-replicator (9770e9a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 src/chttpd/src/chttpd_db.erl   |   8 +-
 src/chttpd/src/chttpd_view.erl |   8 +-
 src/chttpd/test/exunit/pagination_test.exs | 242 -
 src/couch_replicator/src/couch_replicator_job.erl  |  26 ++-
 src/couch_replicator/src/couch_replicator_jobs.erl |   2 +-
 .../test/eunit/couch_replicator_filtered_tests.erl |  92 +++-
 src/couch_views/src/couch_views_http.erl   |  31 +--
 src/fabric/src/fabric2_active_tasks.erl|   3 +-
 src/fabric/test/fabric2_active_tasks_tests.erl | 120 ++
 9 files changed, 493 insertions(+), 39 deletions(-)
 create mode 100644 src/fabric/test/fabric2_active_tasks_tests.erl