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

Why does demo disappear? #17

Open
nottrobin opened this issue Aug 13, 2020 · 5 comments
Open

Why does demo disappear? #17

nottrobin opened this issue Aug 13, 2020 · 5 comments

Comments

@nottrobin
Copy link
Contributor

When a new commit is pushed to a PR, the demo seems to disappear for a while. This is the sort of thing that Kubernetes is supposed to avoid. Can we avoid it?

@hatched
Copy link

hatched commented Aug 14, 2020

While unfortunate it is a pretty good sign that the demo is not up to date with the code. I kind of prefer this approach as otherwise you could be qa'ing the wrong build accidentally.

@nottrobin
Copy link
Contributor Author

I'd prefer we find other ways to signal that.

One use for demos is to show proofs of concept to other teams, but the same also applies within our team: We'd like to be able to show someone a demo of something, and have it not suddenly disappear under their feet. Also, we absolutely don't want to discourage people from a) creating pull requests early, b) separating out their work into many small commits, c) regularly syncing with their remote branch. Knowing you're going to kill the demo discourages you from doing all these things.

One suggestion someone had was that it would be nice if demos could show a little banner at the top of the site that says it was a demo, which PR it was built from, and this could also show which commit it was representing. But this sounds a little tricky to achieve. We maybe could do it though.

@hatched
Copy link

hatched commented Aug 14, 2020

An easier approach to injecting something into the build might be to have the sha in the url:

so https://docs-ubuntu-com-245.demos.haus/ would take you to the latest (and will change on every build)
and https://docs-ubuntu-com-245.demos.haus/2ld3k1 would take you to the specific sha build of that demo...

@nottrobin
Copy link
Contributor Author

nottrobin commented Aug 17, 2020

@hatched encoding the SHA in the URL is an interesting idea. But we can't (don't have the resources to) be running separate demos for each commit, so I assume you mean that https://docs-ubuntu-com-245.demos.haus/2ld3k1 would exist only for the latest commit, and would be a demo that gets torn down when a new commit is pushed, to make it clear that the branch has moved on from that commit. This could be fairly lightweight in that we would simply add a second alias into the ingress config to point to the same demo, and delete it when the commit changes.

However, I'd say it would have to be https://docs-ubuntu-com-245-2ld3k1.demos.haus, because we can't guarantee that our sites & projects would run just as well on a sub-path as they do on root.

Although I don't see under what scenario someone would bother using https://docs-ubuntu-com-245-2ld3k1.demos.haus. I think https://docs-ubuntu-com-245.demos.haus is always going to be more generally useful. So the only reason to go to https://docs-ubuntu-com-245-2ld3k1.demos.haus would be to check if the commit was the one you thought it was, and if you're technical enough to want to do that, you should also be technical enough to instead do curl -I https://docs-ubuntu-com-245.demos.haus (or use the network tab in your browser) and look for a commit in the headers, for example. (The commit SHA might not currently be mentioned in the headers, but it should be).

So I think we can keep this idea in our back pocket, but right now I'm not sure it's worth the time to implement.

@matthewpaulthomas
Copy link

@webteam-app posts a comment in a PR when it first starts a demo:

Demo starting at https://ubuntu-com-8244.demos.haus

The bot could edit its own comment to reflect the latest start time and commit:

Demo at https://ubuntu-com-8244.demos.haus restarted 2020-09-15 13:09, including
56fd939fe9b96920ad7ca4d199e4e1c1ef00f509

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants