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

Explain Gitpod prebuild, add link to trigger a fresh build #365

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

Conversation

allcaps
Copy link
Member

@allcaps allcaps commented Nov 3, 2022

After every Wagtail release, the Gitpod prebuild should be regenerated. This PR explains this, and adds a link to trigger a fresh prebuild

I believe the init section is cached with the prebuild. https://github.com/wagtail/bakerydemo/blob/main/.gitpod.yml#L7-L14

Append `/admin/` to the URL and login with username `admin` and password `changeme`.

Gitpod uses [prebuilds](https://www.gitpod.io/docs/prebuilds) to reduce wait time, by installing dependencies and running builds **before** you start a new workspace.
Unfortunately, prebuilds work as a cache. You could get an outdated build. If that is the case, [trigger a new prebuild](https://gitpod.io/#prebuild/https://github.com/wagtail/bakerydemo).
Copy link
Collaborator

Choose a reason for hiding this comment

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

How would one know if they get an outdated build?

Copy link
Member Author

Choose a reason for hiding this comment

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

One would encounter outdated packages, like the previous Wagtail, or missing commit from the Bakerydemo, or outdated third-party packages (that would be pinned with a range). Anything that is created in the init will be part of the prebuild. It is hard to say what, because anything in that stack can be updated in the mean time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

May be worth adding a nightly GitHub Action that fetches https://gitpod.io/#prebuild/https://github.com/wagtail/bakerydemo ? This way we guarantee some freshness

Copy link
Collaborator

Choose a reason for hiding this comment

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

That seems like a good idea, Dan!

Copy link
Member Author

Choose a reason for hiding this comment

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

@zerolab Good idea! Would you be so kind as to submit a PR for that? I'm not too familiar with Github actions / schedules.

Note, we have some other projects that might require this feature too. See: https://gitpod.io/t/wagtail/projects

I'd assume that this current PR is good to merge too. Although the change that people encounter an outdated prebuild after the scheduled action is added is smaller, it is still there for 24h. And mentioning the behaviour is a good thing as nobody seems to be aware ;)

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 from me on deploying

Copy link
Member

Choose a reason for hiding this comment

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

Just trying this now, I got the following error when following the trigger link: "Running prebuilds without a project is no longer supported. Please add your repository as a project in a team."

Going to https://gitpod.io/t/wagtail/bakerydemo/prebuilds and clicking "Run prebuild" seems to work as expected. Do we want to change the instructions?

@thibaudcolas thibaudcolas removed their request for review December 16, 2023 00:02
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.

4 participants