Skip to content

Commit

Permalink
Align with main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
pjonsson committed Aug 20, 2024
1 parent 6e551b5 commit c453cd3
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/complementary-config-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml up -d --wait
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml exec -T ows /bin/sh -c "datacube system init; datacube system check"
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml exec -T ows /bin/sh -c "curl https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/master/dev/services/wms/inventory.json -o /tmp/inventory.json"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /code; ./compare-cfg.sh"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /code && ./compare-cfg.sh"
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ on:
- 'develop-1.9'
paths:
- '**'
- '.github/workflows/lint.yml'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/lint.yml'

push:
branches:
- 'master'
- 'develop-1.9'
paths:
- '**'
- '.github/workflows/lint.yml'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/lint.yml'

jobs:
pylint:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pyspy-profiling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ on:
- 'develop-1.9'
paths:
- '**'
- '.github/workflows/pyspy-profiling.yaml'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/pyspy-profiling.yaml'

push:
branches:
- 'master'
paths:
- '**'
- '.github/workflows/pyspy-profiling.yaml'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/pyspy-profiling.yaml'

jobs:
build:
Expand Down Expand Up @@ -56,9 +56,9 @@ jobs:
export LOCAL_UID=$(id -u $USER)
export LOCAL_GID=$(id -g $USER)
export $(grep -v '^#' .env_simple | xargs)
echo "::set-output name=PID::$(docker inspect --format '{{.State.Pid}}' $(docker inspect -f '{{.Name}}' \
$(docker-compose -f docker-compose.yaml -f docker-compose.db.yaml -f docker-compose.pyspy.yaml ps -q ows) \
| cut -c2-))"
echo "PID=$(docker inspect --format '{{.State.Pid}}' $(docker inspect -f '{{.Name}}' \
$(docker compose -f docker-compose.yaml -f docker-compose.db.yaml -f docker-compose.pyspy.yaml ps -q ows) \
| cut -c2-))" > $GITHUB_OUTPUT
- name: Run py-spy profiling (stage 1 - run profiling service)
timeout-minutes: 1
Expand All @@ -68,7 +68,7 @@ jobs:
export LOCAL_GID=$(id -g $USER)
export $(grep -v '^#' .env_simple | xargs)
docker compose -f docker-compose.yaml -f docker-compose.db.yaml -f docker-compose.pyspy.yaml \
exec -T ows /bin/sh -c "cd /code;./test_urls.sh &"
exec -T ows /bin/sh -c "cd /code && ./test_urls.sh &"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml -f docker-compose.pyspy.yaml \
run pyspy record -f speedscope -o ./artifacts/profile.json --duration 30 \
--pid ${{steps.set-output-container-id.outputs.PID}} --subprocesses
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ on:
- 'master'
paths:
- '**'
- '.github/workflows/test-prod.yaml'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/test-prod.yaml'

push:
branches:
- 'master'
paths:
- '**'
- '.github/workflows/test-prod.yaml'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/test-prod.yaml'

env:
ORG: opendatacube
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ jobs:
- name: Dockerized Integration Pytest
run: |
export $(grep -v '^#' .env_simple | xargs)
export LOCAL_UID=$(id -u $USER)
export LOCAL_GID=$(id -g $USER)
export $(grep -v '^#' .env_simple | xargs)
docker compose -f docker-compose.yaml -f docker-compose.db.yaml up -d --wait --build
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /code && ./check-code-all.sh"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml down
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ RUN EXTRAS=$([ "$ENVIRONMENT" = "deployment" ] || echo ",test") && \
python3-pip))

# Configure user
RUN userdel -r ubuntu
RUN useradd -m -s /bin/bash ows
WORKDIR "/home/ubuntu"

ENV GDAL_DISABLE_READDIR_ON_OPEN="EMPTY_DIR" \
Expand Down
9 changes: 4 additions & 5 deletions docker/files/remap-user.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/bin/bash -e

# Script that gives the container user uid $LOCAL_UID and gid $LOCAL_GID.
# If $LOCAL_UID or $LOCAL_GID are not set, they default to 1001 (default
# If $LOCAL_UID or $LOCAL_GID are not set, they default to 1000 (default
# for the first user created in Ubuntu).

USER_ID=${LOCAL_UID:-1000}
GROUP_ID=${LOCAL_GID:-1000}
OWS_ID=$(id -u ows)

[[ "$USER_ID" == "$OWS_ID" ]] || usermod -u $USER_ID -o -m -d /home/ows ows
[[ "$GROUP_ID" == "$OWS_ID" ]] || groupmod -g $GROUP_ID ows
[[ $(id -u) != "0" ]] || GOSU="/usr/sbin/gosu ows"
[[ "$USER_ID" == "1000" ]] || usermod -u $USER_ID -o -m -d /home/ubuntu ubuntu
[[ "$GROUP_ID" == "1000" ]] || groupmod -g $GROUP_ID ubuntu
[[ $(id -u) != "0" ]] || GOSU="/usr/sbin/gosu ubuntu"
exec /usr/bin/tini -- $GOSU "$@"

0 comments on commit c453cd3

Please sign in to comment.