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

x/build/app/appengine: deploying with clean working tree affects the deploy because certain files are in .gitignore but not .gcloudignore #36553

dmitshur opened this issue Jan 14, 2020 · 3 comments
Builders NeedsDecision


Copy link

@dmitshur dmitshur commented Jan 14, 2020

In x/build right now:

build $ find . -name '.gitignore' | wc -l
build $ find . -name '.gcloudignore'

Not all the files that are gitignored are included in .gcloudignore files, so it's possible to have a clean working status as reported by git status, but still have unwanted files get included in the deploy. That can cause increase in deploy time, or failures (see #34936 (comment)).

I think we should either remove .gitignore files that we can get by without (so that files aren't invisible when you do git status), or include them into .gcloudignore.

My preference is to remove .gitignore files, but I don't know if others find them more useful than harmful. Thoughts?

/cc @bradfitz @cagedmantis @toothrot

@dmitshur dmitshur added Builders NeedsDecision labels Jan 14, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jan 14, 2020
Copy link

@bradfitz bradfitz commented Jan 14, 2020

I think we should make an x/build/cmd/xb subcommand that makes a temp dir and clones a clean checkout into that tempdir and deploys from there. (and only allowing copying modified files if a flag like --dirty is given)

Copy link

@toothrot toothrot commented Jan 14, 2020

Another alternative is to always use Cloud Build to run the deploy process instead of running gcloud locally. Cloud Build can do a fresh checkout and run the deploy, thereby removing the local environment from the equation.

Copy link
Contributor Author

@dmitshur dmitshur commented Jan 14, 2020

I've remembered something that should be taken into account if we consider removing/reducing .gitignore files.

Some of the env directories have scripts that use said directories for "caching" some artifacts, and avoiding re-downloading them if they're already present. For example:

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

No branches or pull requests

4 participants