这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@m90
Copy link
Member

@m90 m90 commented Aug 25, 2023

Closes #259

@m90 m90 force-pushed the dind-tests branch 9 times, most recently from 0d1d2b0 to c2a1142 Compare August 25, 2023 15:51
@m90 m90 force-pushed the dind-tests branch 12 times, most recently from 8635be2 to 16dc453 Compare August 27, 2023 18:09
@m90
Copy link
Member Author

m90 commented Aug 27, 2023

@MaxJa4 unfortunately the backdating for the Azure test case here:

sudo date --set="14 days ago"
docker compose run --rm az_cli \
az storage blob upload -f /dump/test.tar.gz -c test-container -n path/to/backup/test-old.tar.gz
sudo date --set="14 days"

stops working when you run the test in a docker container, as you cannot change the date in a Docker container (you'd have to do it on the host). Any quick idea about how to do this differently, ideally on filesystem level? If you don't have a quick idea, no need to spend too many brain cycles on this, it's not urgent to get this merged and I can also look into it when I find the time. Thanks.

@MaxJa4
Copy link
Contributor

MaxJa4 commented Aug 27, 2023

az storage blob upload uses the current server time as serverModified date. Which in this case is equal to the host. Setting the metadata manually via --metadata gets ignored, as well as the file's metadata.
I don't have an idea to trick Azure right now, costed me some time to figure out the above behavior.

Only idea would be if the azure mock container takes an argument for timezones... maybe that can fool it.
Edit: timezones aren't enough for a 14 day difference... haha
Edit2: Just found this and this.

@m90
Copy link
Member Author

m90 commented Aug 27, 2023

Seems you can crack open the Azurite server and edit the timestamp in its object database (which is just a JSON file): 99a0617. Because what could go wrong ¯\_(ツ)_/¯

@MaxJa4
Copy link
Contributor

MaxJa4 commented Aug 27, 2023

Seems like the most creative part of software engineering is figuring out how to test a system. Well, if it works, it works. Fine for integration testing haha. Good idea.

@m90 m90 force-pushed the dind-tests branch 3 times, most recently from 8e03be8 to eac3827 Compare August 28, 2023 07:37
@m90 m90 changed the title Try running tests in Docker Run tests Docker in Docker Aug 28, 2023
@m90 m90 force-pushed the dind-tests branch 3 times, most recently from 22acce1 to 495ce22 Compare August 28, 2023 08:43
@MaxJa4
Copy link
Contributor

MaxJa4 commented Aug 30, 2023

Saw this the other day: https://docs.docker.com/build/cache/backends/gha/ (and the official GH docs)
If that works with the new test setup, we maybe don't need to pull all the images anymore, only if there are new versions. At least that's how I understand it. Would reduce the 503 errors of docker hub and reduce CI run time. Just an idea :)

@m90
Copy link
Member Author

m90 commented Aug 30, 2023

Yup, I am also pushing this hard at $DAY_JOB right now. Probably a good opportunity to actually try it out.

@m90 m90 force-pushed the dind-tests branch 2 times, most recently from e5b35ca to ea3cd2d Compare August 31, 2023 06:38
@m90 m90 marked this pull request as ready for review September 2, 2023 13:10
@m90
Copy link
Member Author

m90 commented Sep 2, 2023

@MaxJa4 I think this is good enough to merge now, so I'll do it. In case you work on something in the future and this is causing problems our you can think of places for improvement, please let me know.

As for using the GH Actions cache, I could not figure out how to use it when pulling 3rd party images, which is the bottleneck here. Building the docker-volume-backup image itself is reasonably fast without a cache too.

@m90 m90 merged commit 1e39ac4 into main Sep 2, 2023
@m90 m90 deleted the dind-tests branch September 2, 2023 13:17
@m90
Copy link
Member Author

m90 commented Sep 2, 2023

@MaxJa4
Copy link
Contributor

MaxJa4 commented Sep 2, 2023

Great! Looking forward to test it out. The readme is also great to get started.

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.

Allow running test suite Docker in Docker

3 participants