Skip to content

Enable local testability #5568

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

apparle
Copy link
Collaborator

@apparle apparle commented Nov 10, 2024

This PR enables the ability to build and test images locally. It does 2 things:

  1. Updates the Dockerfile for mastercontainer to separate out the cloning step into its own stage, such that it can be overridden by user input to pick changes from local path with below command. This follows the principle described in https://www.docker.com/blog/dockerfiles-now-support-multiple-build-contexts/
cd Containers/mastercontainer
docker buildx build --build-context aio_root=../../ -t ghcr.io/nextcloud-releases/all-in-one:latest --load .
  1. Since the hash of a locally built image will never match the latest image, mandating "Update mastercontainer" makes local testing impossible. This PR adds ability to skip the mastercontainer update. This also addresses allow to restart containers without updating mastercontainer, if a mastercontainer update is available #5468

@szaimen
Copy link
Collaborator

szaimen commented Nov 11, 2024

Hi @apparle thanks a lot for so many useful contributions! 😊

I just invited you to the repo to make collaboration easier :)

@szaimen
Copy link
Collaborator

szaimen commented Nov 11, 2024

btw this PR has some conflicts...

@szaimen szaimen added 2. developing Work in progress enhancement New feature or request labels Nov 11, 2024
@szaimen szaimen added this to the next milestone Nov 11, 2024
@apparle
Copy link
Collaborator Author

apparle commented Nov 11, 2024

btw this PR has some conflicts...

Merged main and resolved conflicts. Also resolved lint issues.

@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 11, 2024
@szaimen szaimen modified the milestones: v10.0.0, next Nov 12, 2024
Copy link
Collaborator

@docjyJ docjyJ left a comment

Choose a reason for hiding this comment

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

I think it would be better to use an environment variable like SKIP_DOMAIN_VALIDATION=true

@apparle
Copy link
Collaborator Author

apparle commented Nov 26, 2024

I think it would be better to use an environment variable like SKIP_DOMAIN_VALIDATION=true

But then it doesn't solve #5468 easily. It would be better to be able to skip the update temporarily rather than take everything down and restart with different env variables. (And then take it down again to remove the env variables when the reason-to-skip is resolved.)

@szaimen
Copy link
Collaborator

szaimen commented Dec 17, 2024

Hi, I would also prefer a solution that overwrites the behaviour via env variable for example. Adding this to the aio interface means that we also need to support and maintain it... Also sorry for taking so long to answer.

@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 17, 2024
@szaimen szaimen removed this from the next milestone Dec 17, 2024
@apparle
Copy link
Collaborator Author

apparle commented Dec 17, 2024

Hi, I would also prefer a solution that overwrites the behaviour via env variable for example. Adding this to the aio interface means that we also need to support and maintain it... Also sorry for taking so long to answer.

Are you suggesting removing the UI elements altogether and only using an environment variable?
Or are you suggesting to add environment variable in addition to the UI changes?

@docjyJ
Copy link
Collaborator

docjyJ commented Dec 18, 2024

Are you suggesting removing the UI elements altogether and only using an environment variable? Or are you suggesting to add environment variable in addition to the UI changes?

I think it's about not using the UI. It should be minimalistic.

According #5468: I think a simple way is to add a button "restart without updating".

@docjyJ
Copy link
Collaborator

docjyJ commented Dec 18, 2024

image

This is what it could look like. What do you think?

@szaimen
Copy link
Collaborator

szaimen commented Dec 18, 2024

image

This is what it could look like. What do you think?

I am not sure about adding such a button
to the UI honestly. I fear people will just always use that and refrain from updating and then run into update issues later on because they never updated 🙈

@docjyJ
Copy link
Collaborator

docjyJ commented Dec 19, 2024

I am not sure about adding such a button
to the UI honestly. I fear people will just always use that and refrain from updating and then run into update issues later on because they never updated 🙈

The problem is that the containers created by the AIO are on the lastest tag. (apache, nextcloud postgress...)

But the ideal would be that the AIO uses the same version. It is impossible to downgrade to V8 or V9 because the containers will be created in the latest version (V10).

So if the containers are not on the same version, there will be bugs...

@szaimen szaimen marked this pull request as draft January 6, 2025 14:17
@apparle
Copy link
Collaborator Author

apparle commented Feb 18, 2025

Above discussion is useful but I'm confused on the next step.
@szaimen are you convinced that we'll need some UI anyway to solve #5468 . If we add any UI, an environment variable will just add to the confusion on when is it overridden vs. not; might as well do it all through UI. Thoughts?

@docjyJ yes it could be as minimalistic as your example image in #5568 (comment) but I hesitate to make it that easy. I prefer it be a louder warning to deter users from using that unless they really know what they're doing. That's why the current design.

@apparle
Copy link
Collaborator Author

apparle commented Apr 23, 2025

@szaimen Ping. Any thoughts on the last comment?

@szaimen szaimen requested review from docjyJ and Zoey2936 April 25, 2025 08:37
@apparle apparle force-pushed the enable_local_testability branch from df41dfc to 7e5181f Compare April 25, 2025 09:06
Signed-off-by: Apoorv Parle <[email protected]>
@apparle apparle force-pushed the enable_local_testability branch from 7e5181f to 91cffbe Compare April 25, 2025 09:12
@apparle
Copy link
Collaborator Author

apparle commented Apr 25, 2025

So I thought over this more and realized a better way to do this:
I dramatically simplified this by removing the UI element altogether, since we don't want normal users to skip the update ever. Only in the extreme cases, like local development/testing or #5468 should someone need to bypass the container update.
And for that purpose, an unadvertised URL parameter can be specified :

https://localhost:8080/containers

should be modified to

https://localhost:8080/containers?bypass_mastercontainer_update

With this change, the mastercontainer update is bypassed temporarily.
We can document this in FAQ, which most users aren't going to try until they're completely stuck and go looking for that in FAQ.

Is that a reasonable balance of usability and safe-enough-defaults ?

@apparle apparle marked this pull request as ready for review April 25, 2025 09:25
@apparle apparle added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 25, 2025
@apparle
Copy link
Collaborator Author

apparle commented May 30, 2025

Ping again! I've simplified the implementation significantly. It is a very small change now, and also minimizes any UI/UX concerns.

Copy link
Collaborator

@docjyJ docjyJ left a comment

Choose a reason for hiding this comment

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

Should work

@szaimen
Copy link
Collaborator

szaimen commented Jun 10, 2025

Hey, I am very sorry for taking so long to review this. Unfortunately I am still undecided regarding this change. I see the need for such a change but I think I still don't like the implementation, however I also don't have a good idea how to further improve this. So this is why I am currently stuck. Hope that makes things a bit clearer why it takes so long...

@apparle apparle requested a review from szaimen June 12, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants