opendatacube / datacube-ows

Open Data Cube Open Web Services
Other
71 stars 37 forks source link

Cherrypicks from18 #1065

Closed SpacemanPaul closed 3 months ago

SpacemanPaul commented 3 months ago

Forward ports of #1055, #1057, #1059, #1061 and #1064


📚 Documentation preview 📚: https://datacube-ows--1065.org.readthedocs.build/en/1065/

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.28%. Comparing base (705b91c) to head (2e8a663). Report is 34 commits behind head on develop-1.9.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opendatacube/datacube-ows/pull/1065/graphs/tree.svg?width=650&height=150&src=pr&token=FWCMaSEoXd&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatacube)](https://app.codecov.io/gh/opendatacube/datacube-ows/pull/1065?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatacube) ```diff @@ Coverage Diff @@ ## develop-1.9 #1065 +/- ## ============================================ Coverage 93.27% 93.28% ============================================ Files 53 53 Lines 7038 7039 +1 ============================================ + Hits 6565 6566 +1 Misses 473 473 ```

🚨 Try these New Features:

pjonsson commented 3 months ago

I think #1046 is missing from the bottom of this PR.

SpacemanPaul commented 3 months ago

I think #1046 is missing from the bottom of this PR.

Those commits are still in the history - but maybe I've mangled them a bit trying to get all the changes working together nicely.

This PR was for the PRs merged to master since then.

SpacemanPaul commented 3 months ago

I'm getting the ows user as 1001 (ubuntu being 1000). Looks like remap-user.sh only works if ows user is expected to be 1000?

And I have no idea what is causing this difference between the ows and ows18 images.

SpacemanPaul commented 3 months ago

What do you think of this @pjonsson? I had to manually delete the ubuntu user to make it all work. I have no idea why the ubuntu user seems to exist here but not in ows18.

pjonsson commented 3 months ago

I did a test run of the change in #1067 with PR #1068 and that passed. I've never done PRs into other PRs before, but I believe if you merge #1067, that will go into this branch and re-trigger the CI jobs for this PR, which should then pass.

Here's what I did to construct #1067 when standing on the cherrypicks-from18 branch. First figure out differences to the main branch:

$ git diff master -- Dockerfile
diff --git a/Dockerfile b/Dockerfile
index bf69f07b..aa752873 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -69,6 +69,8 @@ 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" \

and then repeat that for a bunch of other files of interest. Then pick one file from the main branch that I wanted in its entirety, and checkout that from the main branch and make a commit with that file. Then rinse and repeat for all the other files I wanted in their entirety, but amend them to the commit:

$ git checkout master -- docker/files/remap-user.sh
$ git commit docker/files/remap-user.sh
[cherrypicks-from18 eed2201c] Align with main branch
 1 file changed, 4 insertions(+), 5 deletions(-)
$ git checkout master -- Dockerfile
$ git commit --amend Dockerfile
[cherrypicks-from18 30fdce9d] Align with main branch
 Date: Tue Aug 20 10:56:26 2024 +0200
 2 files changed, 4 insertions(+), 7 deletions(-)

After that, I had a look at the files where there should be some differences:

$ git diff --word-diff master -- .github/

and then I just manually edited in the changes I wanted into the respective files, and amended that to the alignment commit. After completing the changes, I ran the word-diff again to see that the only changes that remained were the image names and other things that should be different.

pjonsson commented 3 months ago

I will be offline for a couple of days now, sorry about that. I believe this should be fixed by my fixup, but if there's something more, I will check things on Thursday evening my time, which I guess is early Friday morning for you.

SpacemanPaul commented 3 months ago

I will be offline for a couple of days now, sorry about that. I believe this should be fixed by my fixup, but if there's something more, I will check things on Thursday evening my time, which I guess is early Friday morning for you.

I've been offline for a couple of days myself as it happens. Looks like your tweaks worked. I'll take one last read through the remaining changes this morning and merge.