TugboatQA / docs

Tugboat Docs
https://docs.tugboat.qa
MIT License
9 stars 18 forks source link

Call out conditions under which child Previews might run `init` and `update` #216

Open dacharyc opened 4 years ago

dacharyc commented 4 years ago

A Tugboat user in the Support Slack recently ran into an issue where child previews were running what appeared to be unexpected init and update steps for a pull request Preview, instead of using the init and update from the Base Preview.

The issue turned out to be that the base Preview was using tugboatqa/php:7.3-apache, and the pull request preview was using tugboatqa/php:7.2-apache. In that case, we expect Tugboat to pull the image from the config in the PR branch and run all three commands just for that service. However, we don't call that out explicitly enough in the documentation site.

Update the Building New Previews page to better communicate this: https://docs.tugboat.qa/building-a-preview/work-with-base-previews/building-new-previews/

(Maybe add a callout?)

Ben says about this:

the config.yml is pulled directly from the PR branch, not the merged version. github doesn’t readily give that to us via their API (same with bitbucket and gitlab), and merging it locally without any git history would be error-prone at best

Should add a section to docs somewhere calling this out, too. Maybe on the "Create a Tugboat Config File" page: https://docs.tugboat.qa/setting-up-tugboat/create-a-tugboat-config-file/

And on the Leverage Service Commands page: https://docs.tugboat.qa/setting-up-services/how-to-set-up-services/leverage-service-commands/

Additionally, in the "How Base Previews Work" section of the How Previews Work page: https://docs.tugboat.qa/building-a-preview/preview-deep-dive/how-previews-work/#how-base-previews-work

We state:

When you set a Base Preview, new Previews that match that Base Preview type - including Previews that are built automatically from pull requests - use the Base Preview as a starting point, and build only from the build stage. This means that if you’re making changes that would be processed during init or update stages, or changing a Docker image, you’ll need to either rebuild the Base Preview, or build the Preview from scratch without the Base Preview.

That's not entirely correct; when you change a Docker image, the pull request Preview will process the init and update stages for that service. Update this callout, and maybe add some more info to this page about it.