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

test: Embed the test data inside the test container image #545

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mossop
Copy link
Contributor

@Mossop Mossop commented Apr 21, 2023

This is something of a test to see if it might resolve #541. I discovered that running tests locally got a lot better when switching Docker Desktop's file sharing implementation from VirtioFS to gRPC FUSE which got me wondering whether bind mounting the data into the container is an issue. That would seem strange since that's how I run my own server but still I thought it might be worth a try. This change creates a new container image where instead of mounting the data we copy it into the image before launching so there are no longer any bind mounts involved.

Copy link
Owner

@andrey-yantsen andrey-yantsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea; thank you!

What do you think, would it be worth to remove & prune the image after the test is done? I'm not sure how docker's layer will work in this case: won't we be eating out more and more disk space with every run of the tests?

Also, I have one tiny request about the code, see below.

let docker_image: RunnableImage<GenericImage> =
GenericImage::new(DOCKER_PLEX_IMAGE_NAME, &image_tag)
GenericImage::new("plex-api-tests", "latest")
.with_wait_for(WaitFor::Healthcheck)
.into();

#[cfg_attr(windows, allow(unused_mut))]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this along the way? Since the variable is not mut anymore.

@andrey-yantsen
Copy link
Owner

Unfortunately, I don't think it'll help us to resolve the transcoding crashes in any way :( Volumes on macOS and Linux work in very different ways.

@andrey-yantsen
Copy link
Owner

Just to clarify my previous comment(s), as I think I didn't communicate my thoughts clearly. I'll do my best to avoid providing quick-ish responses during business hours in the future.

The change is good and valuable: it solves the issue arising during the development using macOS. But it doesn't look like it might fix the problem with crashes during transcoding requests :(

@Mossop
Copy link
Contributor Author

Mossop commented Apr 24, 2023

Just to clarify my previous comment(s), as I think I didn't communicate my thoughts clearly. I'll do my best to avoid providing quick-ish responses during business hours in the future.

The change is good and valuable: it solves the issue arising during the development using macOS. But it doesn't look like it might fix the problem with crashes during transcoding requests :(

You're probably right. So I guess the question is do you think it is actually worth doing this? It will slow down running tests, though should be by a pretty tiny amount and I guess adds an additional point of failure.

@andrey-yantsen
Copy link
Owner

Let's keep this open for now and use the old flow locally. If the issue with the missed media will show itself in the next, let's say, month, it'll be a good sign that we need this change.

@andrey-yantsen andrey-yantsen added the S-Postponed Waiting some time before making a decision on the issue/PR label Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Postponed Waiting some time before making a decision on the issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transcode tests sometime fail leaving the server unresponsive
2 participants