Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Documentation for ELASTIC_CLIENT_URL_PLUS_AS_SPACE env #1310

Closed
wants to merge 90 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
3f6103e
Fixed issue on wipeSnapshots + removed TEST_SUITE in getHost()
ezimuel Apr 23, 2021
68a6a0a
Running elasticsearch only with platinum settings
ezimuel Apr 23, 2021
97ef119
Updated util/run_es_docker
ezimuel Apr 23, 2021
5eb56c3
Usage of PHPUnit 9 only + migrated xml configurations
ezimuel Apr 26, 2021
a116bbf
Removed wait for completion in deleteAllTasks
ezimuel Apr 26, 2021
f7fa640
Added skip on classname + updated skip YAML set
ezimuel Apr 26, 2021
143a616
Use of ELASTICSEARCH_URL for integration-test
ezimuel Apr 26, 2021
24c2bf4
Updated endpoints to 7.14.0-SNAPSHOT
ezimuel Apr 28, 2021
151f2f5
Fixed CS issue
ezimuel Apr 28, 2021
199ab7d
Added skip test for Indices\GetAlias\_10_BasicTest::GetAliasAgainstCl…
ezimuel Apr 28, 2021
6908700
Add check license header github job
ezimuel Apr 28, 2021
62711c6
Removed git submodule update
ezimuel May 6, 2021
7324ccd
Improved the phpdoc of ClientBuilder
ezimuel May 12, 2021
93f050c
Fixed empty doc for API references
ezimuel May 12, 2021
694a08a
Fixed docs for 7.12
ezimuel May 12, 2021
fc0d3da
[DOCS] Adds Helpers section to PHP book (#1129)
szabosteve May 12, 2021
4c019a7
[DOCS] Adds Release notes section to PHP book (#1132)
szabosteve May 12, 2021
16b43e3
Fixed asciidoc with duplicated id
ezimuel May 12, 2021
37b944e
Merge branch '7.x' of github.com:elastic/elasticsearch-php into 7.x.d…
szabosteve May 12, 2021
c4b303a
Merge branch '7.x' of github.com:elastic/elasticsearch-php into 7.x.d…
szabosteve May 12, 2021
a1b2723
Merge pull request #1139 from szabosteve/7.x.drs.helpers
szabosteve May 12, 2021
6b11e4e
Merge pull request #1140 from szabosteve/7.x.drs.release.notes
szabosteve May 13, 2021
c7b09e3
Remove test comments in setRetries
ezimuel May 13, 2021
13cbe7b
Added the description in endpoints
ezimuel May 13, 2021
1ce2a3b
Removed CR in description
ezimuel May 13, 2021
e199022
Add support for API Compatibility Header (#1142)
ezimuel May 18, 2021
1f2d2b9
[7.x] [DOCS] Added the HTTP meta data section (#1143)
ezimuel May 19, 2021
0fa3935
Removed symfony/yaml e doctrine/inflector
ezimuel May 19, 2021
3481969
Updated CHANGELOG with 7.13.0 and 7.13.1
ezimuel Jun 15, 2021
62304ec
Assemble command in .ci/make.sh
ezimuel Jun 28, 2021
3dd596d
Update search iterators to send "scroll_id" inside the request body (…
bakurin Jun 29, 2021
1e7ff48
Removed phpcs for autogenerated files
ezimuel Jul 6, 2021
204652b
Updated the YAML clean up phase
ezimuel Jul 14, 2021
8f06c52
Added the ingest.geoip.downloader.enabled=false for ES
ezimuel Jul 14, 2021
9c97c0c
Added the ingest.geoip.downloader.enabled=false for ES in util
ezimuel Jul 14, 2021
c807f66
Updated Endpoints to 7.15.0-SNAPSHOT
ezimuel Jul 15, 2021
567566a
Updated the YAML test generator with the support of .value case
ezimuel Jul 15, 2021
4ed0d7c
Allow psr/log 2
ezimuel Aug 3, 2021
0ca2de2
Fix typo on per-request-configuration.asciidoc (#1155)
Psyker Aug 4, 2021
62bdcd7
Added compatibility in README
ezimuel Aug 18, 2021
0edfad3
Merge branch '7.x' of github.com:elastic/elasticsearch-php into 7.x
ezimuel Aug 18, 2021
9472875
Updated endpoints to 7.15
ezimuel Sep 21, 2021
60e4ccd
Added integration test for search_mvt using vnd.mapbox-vector-tile
ezimuel Sep 21, 2021
ba75702
Updated to 7.x-SNAPSHOT
ezimuel Sep 21, 2021
165f5cd
Added compatibility mode section in docs
ezimuel Sep 22, 2021
e1bda58
Updated release notes in docs
ezimuel Sep 23, 2021
d370e7d
Updated endpoints to 7.16.0-SNAPSHOT
ezimuel Sep 23, 2021
769d9cf
[DOCS] Retitle Elasticsearch PHP Client doc book
jrodewig Oct 12, 2021
8c0d5c5
[7.x] [DOCS] Retitle Elasticsearch PHP Client doc book
jrodewig Oct 13, 2021
30fc198
Updated YAML Clean Up
ezimuel Oct 18, 2021
527b2f1
Merge branch '7.x' of https://github.com/elastic/elasticsearch-php in…
ezimuel Oct 18, 2021
c8023b3
Fix for #1171 utf-16 issue in smartserializer
ezimuel Nov 23, 2021
3fff30d
Added PHP 8.1 job
ezimuel Nov 30, 2021
fd634a6
Fix for #1171 utf-16 issue in SmartSerializer (#1179)
ezimuel Dec 6, 2021
e0bc5fd
Updated STACK_VERSION to 7.16-SNAPSHOT
ezimuel Dec 6, 2021
02b24c7
Fix #1176 adding includePortInHostHeader in fromConfig (#1181)
ezimuel Dec 7, 2021
c3164a0
Updated endpoints with ES 7.16
ezimuel Dec 7, 2021
753ce9d
Updated Utility for cleanup YAML tests
ezimuel Dec 7, 2021
00a105a
Added .logstash-management in isXPackTemplate
ezimuel Dec 7, 2021
37f33fb
Added 500 status code in wipeDataStreams
ezimuel Dec 7, 2021
8cfc951
Replace trait with abstract class to avoid Deprecated Functionality i…
karyna-t Dec 7, 2021
c7c8a28
Updated run-elasticsearch script and Cleanup YAML tests
ezimuel Dec 9, 2021
797699d
Updated endpoints to ES 7.16.0
ezimuel Dec 9, 2021
148c12e
Added PHP 8.1 and ES 7.16.0 in Github Actions
ezimuel Dec 9, 2021
359f226
Trying to improve the resources for ML jobs
ezimuel Dec 9, 2021
9d8de44
Reapplied deleteAllTasks in cleanup YAML tests
ezimuel Dec 9, 2021
12e953e
Updated CHANGELOG to 7.15.0
ezimuel Dec 9, 2021
4f0117e
Added LGPL 2.1 license in composer
ezimuel Dec 9, 2021
f87f93f
Added 7.16.0 in CHANGELOG
ezimuel Dec 9, 2021
a817799
Allow psr/log v3
ruudk Dec 15, 2021
aa6c8cb
Updated PHP version matrix in README
ezimuel Jan 27, 2022
22f6b82
Updated CI and github action to 7.17
ezimuel Jan 27, 2022
275de8d
Updated APIs to 7.17.0
ezimuel Feb 2, 2022
c759198
Fixed VectorTile YAML tests quoting y
ezimuel Feb 3, 2022
67731d0
Merge branch 'patch-1' of https://github.com/ruudk/elasticsearch-php …
ezimuel Feb 3, 2022
bb175b4
Merge branch 'ruudk-patch-1' into 7.17
ezimuel Feb 3, 2022
1597220
Fixing typo in connecting.asciidoc (#1166)
tomcentrate Feb 3, 2022
dcb11e3
add missing BC for version 6.8 (#1173)
ramunasd Feb 3, 2022
1c0d84b
Recommend simpleConnectionPool for Cloud (#1193)
toby-sutor Feb 2, 2022
1890f9d
Updated BREAKING CHANGES with psr/log v3 support
ezimuel Feb 3, 2022
4b2f5e3
Removed the usage of getenv, fixed #1237 (#1247)
ezimuel Aug 18, 2022
e1ed999
Fixed float conversion issue in YAML tests
ezimuel Sep 22, 2022
5def762
Fix for StickyRoundRobinSelector starts with second host (#1253)
ezimuel Sep 23, 2022
f1b8918
Updated VERSION to 7.17.1
ezimuel Sep 30, 2022
f1b7273
Replace master with {branch} in docs
ezimuel Oct 6, 2022
85e8696
Reverted {branch} changes in docs
ezimuel Oct 6, 2022
ea074f2
[7.17][DOCS] References shared/version and adds doctype to index file…
szabosteve Feb 13, 2023
6e2967b
Added ELASTIC_CLIENT_URL_PLUS_AS_SPACE env variable for URL encode (#…
ezimuel Apr 19, 2023
b35ec5e
Changed the settings of ELASTIC_CLIENT_URL_PLUS_AS_SPACE
ezimuel Apr 19, 2023
b5d246e
Added the documentation for ELASTIC_CLIENT_URL_PLUS_AS_SPACE settings
ezimuel Apr 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,4 @@ RUN composer install

COPY . .

# Updating elasticsearch submodule
RUN git submodule update --init --recursive

CMD ["bash", ".ci/yaml-tests.sh"]
5 changes: 3 additions & 2 deletions .ci/functions/imports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ if [[ -z $es_node_name ]]; then
export es_node_name=instance
export elastic_password=changeme
export elasticsearch_image=elasticsearch
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
export elasticsearch_scheme="https"
if [[ $TEST_SUITE != "platinum" ]]; then
export elasticsearch_url=http://${es_node_name}:9200
export elasticsearch_scheme="http"
fi
export elasticsearch_url=${elasticsearch_scheme}://elastic:${elastic_password}@${es_node_name}:9200
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}"

Expand Down
14 changes: 0 additions & 14 deletions .ci/jobs/elastic+elasticsearch-php+7.10.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .ci/jobs/elastic+elasticsearch-php+7.9.yml

This file was deleted.

179 changes: 179 additions & 0 deletions .ci/make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
#!/usr/bin/env bash

# ------------------------------------------------------- #
#
# Skeleton for common build entry script for all elastic
# clients. Needs to be adapted to individual client usage.
#
# Must be called: ./.ci/make.sh <target> <params>
#
# Version: 1.1.0
#
# Targets:
# ---------------------------
# assemble <VERSION> : build client artefacts with version
# bump <VERSION> : bump client internals to version
# codegen <VERSION> : generate endpoints
# docsgen <VERSION> : generate documentation
# examplegen : generate the doc examples
# clean : clean workspace
#
# ------------------------------------------------------- #

# ------------------------------------------------------- #
# Bootstrap
# ------------------------------------------------------- #

script_path=$(dirname "$(realpath -s "$0")")
repo=$(realpath "$script_path/../")

# shellcheck disable=SC1090
CMD=$1
TASK=$1
TASK_ARGS=()
VERSION=$2
STACK_VERSION=$VERSION
set -euo pipefail

product="elastic/elasticsearch-php"
output_folder=".ci/output"
codegen_folder=".ci/output"
OUTPUT_DIR="$repo/${output_folder}"
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
mkdir -p "$OUTPUT_DIR"

echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m"

# ------------------------------------------------------- #
# Parse Command
# ------------------------------------------------------- #

case $CMD in
clean)
echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m"
rm -rfv "$output_folder"
echo -e "\033[32;1mTARGET: clean - done.\033[0m"
exit 0
;;
assemble)
if [ -v $VERSION ]; then
echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m"
exit 1
fi
echo -e "\033[36;1mTARGET: assemble artefact $VERSION\033[0m"
TASK=release
TASK_ARGS=("$VERSION" "$output_folder")
;;
codegen)
if [ -v $VERSION ]; then
echo -e "\033[31;1mTARGET: codegen -> missing version parameter\033[0m"
exit 1
fi
echo -e "\033[36;1mTARGET: codegen API v$VERSION\033[0m"
TASK=codegen
# VERSION is BRANCH here for now
TASK_ARGS=("$VERSION" "$codegen_folder")
;;
docsgen)
if [ -v $VERSION ]; then
echo -e "\033[31;1mTARGET: docsgen -> missing version parameter\033[0m"
exit 1
fi
echo -e "\033[36;1mTARGET: generate docs for $VERSION\033[0m"
TASK=codegen
# VERSION is BRANCH here for now
TASK_ARGS=("$VERSION" "$codegen_folder")
;;
examplesgen)
echo -e "\033[36;1mTARGET: generate examples\033[0m"
TASK=codegen
# VERSION is BRANCH here for now
TASK_ARGS=("$VERSION" "$codegen_folder")
;;
bump)
if [ -v $VERSION ]; then
echo -e "\033[31;1mTARGET: bump -> missing version parameter\033[0m"
exit 1
fi
echo -e "\033[36;1mTARGET: bump to version $VERSION\033[0m"
TASK=bump
# VERSION is BRANCH here for now
TASK_ARGS=("$VERSION")
;;
*)
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
exit 1
esac


# ------------------------------------------------------- #
# Build Container
# ------------------------------------------------------- #

#echo -e "\033[34;1mINFO: building $product container\033[0m"

#docker build --file .ci/Dockerfile --tag ${product} \
# --build-arg USER_ID="$(id -u)" \
# --build-arg GROUP_ID="$(id -g)" .


# ------------------------------------------------------- #
# Run the Container
# ------------------------------------------------------- #

#echo -e "\033[34;1mINFO: running $product container\033[0m"

#docker run \
# --env "DOTNET_VERSION" \
# --name test-runner \
# --volume $REPO_BINDING \
# --rm \
# $product \
# /bin/bash -c "./build.sh $TASK ${TASK_ARGS[*]} && chown -R $(id -u):$(id -g) ."

# ------------------------------------------------------- #
# Post Command tasks & checks
# ------------------------------------------------------- #

if [[ "$CMD" == "assemble" ]]; then
artefact_name="elasticsearch-php-${VERSION}"
echo -e "\033[34;1mINFO: copy artefacts\033[0m"
rsync -arv --exclude=.ci --exclude=.git --filter=':- .gitignore' "$PWD" "${output_folder}/."

echo -e "\033[34;1mINFO: rename artefacts\033[0m"
mv -v "${output_folder}/elasticsearch-php" "${output_folder}/${artefact_name}"

echo -e "\033[34;1mINFO: build artefacts\033[0m"
cd ./.ci/output && tar -czvf ${artefact_name}.tar.gz "${artefact_name}/." && cd -

echo -e "\033[34;1mINFO: cleanup\033[0m"
rm -Rf "${output_folder}/${artefact_name}"

echo -e "\033[34;1mINFO: validate artefact\033[0m"
proof=`ls ${output_folder}`

if [ $proof == "${artefact_name}.tar.gz" ]; then
echo -e "\033[32;1mTARGET: assemble - success: $artefact_name.tar.gz\033[0m"
else
echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
exit 1
fi
fi

if [[ "$CMD" == "bump" ]]; then
echo "TODO"
fi

if [[ "$CMD" == "codegen" ]]; then
echo "TODO"
fi

if [[ "$CMD" == "docsgen" ]]; then
echo "TODO"
fi

if [[ "$CMD" == "examplesgen" ]]; then
echo "TODO"
fi
20 changes: 17 additions & 3 deletions .ci/run-elasticsearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
# Export the NUMBER_OF_NODES variable to start more than 1 node

# Version 1.3.0
# Version 1.6.1
# - Initial version of the run-elasticsearch.sh script
# - Deleting the volume should not dependent on the container still running
# - Fixed `ES_JAVA_OPTS` config
Expand All @@ -17,6 +17,10 @@
# - Added 5 retries on docker pull for fixing transient network errors
# - Added flags to make local CCR configurations work
# - Added action.destructive_requires_name=false as the default will be true in v8
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
# - Use https only when TEST_SUITE is "platinum", when "free" use http
# - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"

script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
Expand All @@ -30,6 +34,7 @@ cluster_name=${moniker}${suffix}

declare -a volumes
environment=($(cat <<-END
--env ELASTIC_PASSWORD=$elastic_password
--env node.name=$es_node_name
--env cluster.name=$cluster_name
--env cluster.initial_master_nodes=$master_node_name
Expand All @@ -40,13 +45,14 @@ environment=($(cat <<-END
--env path.repo=/tmp
--env repositories.url.allowed_urls=http://snapshot.test*
--env action.destructive_requires_name=false
--env ingest.geoip.downloader.enabled=false
--env cluster.deprecation_indexing.enabled=false
END
))
if [[ "$TEST_SUITE" == "platinum" ]]; then
environment+=($(cat <<-END
--env ELASTIC_PASSWORD=$elastic_password
--env xpack.license.self_generated.type=trial
--env xpack.security.enabled=true
--env xpack.license.self_generated.type=trial
--env xpack.security.http.ssl.enabled=true
--env xpack.security.http.ssl.verification_mode=certificate
--env xpack.security.http.ssl.key=certs/testnode.key
Expand All @@ -57,6 +63,8 @@ if [[ "$TEST_SUITE" == "platinum" ]]; then
--env xpack.security.transport.ssl.key=certs/testnode.key
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
--env xpack.ml.max_machine_memory_percent=50
--env xpack.ml.node_concurrent_job_allocations=50
END
))
volumes+=($(cat <<-END
Expand All @@ -65,6 +73,12 @@ END
--volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt
END
))
else
environment+=($(cat <<-END
--env xpack.security.enabled=false
--env xpack.security.http.ssl.enabled=false
END
))
fi

cert_validation_flags=""
Expand Down
2 changes: 1 addition & 1 deletion .ci/run-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail

PHP_VERSION=${PHP_VERSION-7.4-cli}
PHP_VERSION=${PHP_VERSION-8.0-cli}
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
elasticsearch_container=${elasticsearch_container-}

Expand Down
4 changes: 3 additions & 1 deletion .ci/test-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
STACK_VERSION:
- 7.x-SNAPSHOT
- 7.17-SNAPSHOT

PHP_VERSION:
- 8.2-cli
- 8.1-cli
- 8.0-cli
- 7.4-cli
- 7.3-cli
Expand Down
43 changes: 43 additions & 0 deletions .github/check-license-headers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

# Check that source code files in this repo have the appropriate license
# header.

if [ "$TRACE" != "" ]; then
export PS4='${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -o xtrace
fi
set -o errexit
set -o pipefail

TOP=$(cd "$(dirname "$0")/.." >/dev/null && pwd)

NLINES1=$(($(wc -l .github/license-header.txt | awk '{print $1}')+1))
NLINES2=$((NLINES1 + 1))

function check_license_header {
local f
f=$1

if ! diff -w .github/license-header.txt <(head -$NLINES2 "$f" | tail -$NLINES1) >/dev/null; then
echo "check-license-headers: error: '$f' does not have required license header, see 'diff -w .github/license-header.txt <(head -$NLINES2 $f | tail -$NLINES1)'"
return 1
else
return 0
fi
}


cd "$TOP"
nErrors=0
for f in $(git ls-files | grep '\.php$'); do
if ! check_license_header $f; then
nErrors=$((nErrors+1))
fi
done

if [[ $nErrors -eq 0 ]]; then
exit 0
else
exit 1
fi
13 changes: 13 additions & 0 deletions .github/license-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Elasticsearch PHP client
*
* @link https://github.com/elastic/elasticsearch-php/
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
*
* Licensed to Elasticsearch B.V under one or more agreements.
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
* the GNU Lesser General Public License, Version 2.1, at your option.
* See the LICENSE file in the project root for more information.
*/
15 changes: 15 additions & 0 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: License headers

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Check license headers
run: |
./.github/check-license-headers.sh
Loading