Skip to content

Allow Fauxton docroot to be overridden (#3333)#3334

Closed
sklassen wants to merge 797 commits intoapache:3.xfrom
sklassen:couchdb_fauxton_docroot_override
Closed

Allow Fauxton docroot to be overridden (#3333)#3334
sklassen wants to merge 797 commits intoapache:3.xfrom
sklassen:couchdb_fauxton_docroot_override

Conversation

@sklassen
Copy link
Copy Markdown
Contributor

Overview

This relates to issue #3333

If erlang's current working directory become unreadable, the fauxton (and any other relative paths) yields 404 Not found.

Testing recommendations

I changed the couchdb.in and re-ran the server with an absolute path.

simon@sigyn:couchdb$ export COUCHDB_FAUXTON_DOCROOT=/home/simon/src/github.com/apache/couchdb/share/www/
simon@sigyn:couchdb$ ./dev/run -n 1
simon@sigyn:couchdb$ ./dev/remsh 
Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Eshell V10.6.4  (abort with ^G)
(node1@127.0.0.1)1> pwd().
/home/simon/src/github.com/apache/couchdb
ok
(node1@127.0.0.1)2> cd("/tmp").
/tmp
ok

Fauxton website return 200 and was operational.

Related Issues or Pull Requests

None.

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation

jjrodrig and others added 30 commits July 7, 2020 09:42
Align with fabric2_ convention.
open will now initialise the btree if it is not already set up. It is
a fatal error to try to open an existing ebtree with the wrong order value.
Use ebtree:min() for startkey or ebtree:max() for endkey to include
all keys on that end. use both to include all possible keys.

It is not permitted to insert either special value into ebtree.
Introduce min and max keys for open ranges
this changed from uuid with the 'sequential' PR merge.
Externalise accumulator logic for group_reduce
Ensure all keys are in range during group_reduce
Do not fail when emilio detects errors
Currently the EPI plugins have no easy way to modify body of the document in
before request. There are complicated approaches via overiding compression header.
This is due to the fact that `chttp:json_body/1` expects compressed body.
We can rely on the fact that `MochiReq:recv_body/1` returns binary to allow
passing of already parsed JSON terms (objects and lists).
Simplify using `req_body` for JSON requests
adjust rebar.config to work with rebar2 and rebar3
This fixes range and reverse range when using the special min() and
max() values.
davisp and others added 26 commits November 10, 2020 14:09
The ebtree caching layer does not work correctly in conjunction with
FoundationDB transaction retry semantics. If we incorrectly cache nodes
that are not actually read from FoundationDB, a retried transaction will
rely on incorrectly cached state and corrupt the ebtree persisted in
FoundationDB.
Turns out that ebtree caching wasn't quite correct so removing it for
now.
Waiting for the timeout option to be set means we could still sneak in
and grab the old FDB database handle before fabric2_server updated it in
the application environment.

This new approach just waits until the handle has been updated by
watching the value in the application environment directly.
Any ebtree that uses chunked key encoding will accidentally wipe out any
nodes that have a UUID with more than one leading zero byte.
Avoid deleting UUID keys that start with zeros
When we call `couch_httpd:json_body/1` we can have `req_body` already set.
In this case we should return the field as is without any attempt to
decompress or decode it. This PR brings the approach we use in `chttpd`
into `couch_httpd`.
This is useful so that read conflicts on the changes feed will
eventually be resolved. Without an end key specified a reader could end
up in an infinite conflict retry loop if there are clients updating
documents in the database.
This flips the view indexer to grab the database update_seq outside of
the update transaction. Previously we would cosntantly refresh the
db_seq value on every retry of the transactional loop.

We use a snapshot to get the update_seq so that we don't trigger
spurious read conflicts with any clients that might be updating the
database.
Add missing default headers to responses
New `elixir-suite` Makefile target is added. It runs a predefined set of elixir
integration tests.

The feature is controlled by two files:
- test/elixir/test/config/suite.elixir - contains list of all available tests
- test/elixir/test/config/skip.elixir - contains list of tests to skip

In order to update the `test/elixir/test/config/suite.elixir` when new tests
are added. The one would need to run the following command:

```
MIX_ENV=integration mix suite > test/elixir/test/config/suite.elixir
```
Add ability to control which Elixir integration tests to run
@janl
Copy link
Copy Markdown
Member

janl commented Jan 18, 2021

That PR is not quite right :)

@sklassen
Copy link
Copy Markdown
Contributor Author

That PR is not quite right :)

Let me try again. I thought I had sync'd with 3.x branch.

@sklassen sklassen closed this Jan 18, 2021
@sklassen sklassen deleted the couchdb_fauxton_docroot_override branch January 18, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.