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
Add support for .packignore file #210
Comments
Hi @neerfri, While I believe all the core contributors agree that this functionality is necessary, there are some things we need to consider before it's implemented.
|
@sclevine thanks for your input.
This is actually why I thought that the
Sounds like a good idea.
I don't know how fast these are going to be implemented, I see no reason why they won't play nice together in the future. The
the I guess that what we can learn from heroku's
I believe the default behavior should be:
If our implementation is similar to git we can also default to pick up It's now more obvious why we should not be using the Summing it up, I think the best course of action is to start with a Another very simple idea that can spare us the fear of decision is to annotate the ignore file using: Any objections? |
I'm not sure if this assumption is correct. Consider that some cloud platforms support pushing source code from a workstation or from CI, without using VCS. For example, the v2 Java buildpack on CF requires you to provide a JAR. I think a unified ignore file (maybe
Personally, I'm okay defining a separate ignore file that is unrelated to the app descriptor. We'll see how other core contributors feel.
I was really trying to ask what files should be ignored even when they aren't specified in For an MVP of this feature, I'd just expect
Not sure if this is necessary given the simplicity of the file format (standard .gitignore syntax), but if we can think of cases where the behavior of syntactically valid |
I like the Regarding the default values I tend to favor explicit solutions over easy-to-onboard ones and then make them easy to onboard. For this we can introduce a one-time call to I think it's nice to warn if I'm not using any ignore file. Many docker beginners I meet work without a The reason I got to this issue is that as part of our development we have a
Agree. If the file is there with the proper name, we just use it. we don't have to implement the Any subdirectory? this might make this a bit more complex than I imagined...
After reviewing 7 different implementations of |
Including git's documentation about Also see an example of an issue from helm due to the fact
The git documentation has a similar pattern explained. |
I think I am in favor of implementing On the topic of printing a warning when there is no I am also in favor of having directories like |
@ekcasey thanks for the feedback. I share your thoughts on the Where we disagree is about the defaults. I feel very strongly that I think the main goal here is to make The way around it right now is to do As a counter example to the one you provided, using the Defaults bring many new problems, such as how do I undo the defaults? how do I know that there are defaults and what are they? Is addition/removal of a default ignore pattern a breaking change (because it is...)? What is the downside to have your I think these defaults are better left for a future improvement after we see which issues are created due to the lack of defaults. As of today Linus has found no need to add any defaults to |
Developers who build in offline containers often intentionally push their I feel like users expect VCS artifacts not to be included in their build. I could certainly be wrong about this, but as far as I'm aware, excluding those artifact has never caused confusion on Cloud Foundry. Additionally,
Whitelist with
In addition to the size, you could accidentally leak private source code into a public image.
Except |
Agree 100%. This is exactly what I was trying to say. This is also the reason why I think every codebase using
That's true! You certainly convinced me it should be a pattern in the
I know it was a juke. But it's a sneaky one cause |
There’s a lot going on here, and it’s hard to distill what is being proposed. I’d like to see an RFC that formalizes things and includes the rational. fwiw, I’d prefer ignore patterns in |
There seems to be a golang-based implementation of gitignore here, which could be useful if implementing this. I also agree that this should be in an existing |
Our hope is to resolve this by implementing buildpacks/rfcs#25. If that RFC is accepted and implemented, then I suspect we will not adopt a |
Closing this issue as the pain point should be addressed with buildpacks/rfcs#25. |
Hi,
I'm interested in implementing a feature of
.packignore
file similar to.gitignore
,.dockerignore
, etc.While researching for existing solutions I found:
.dockerignore
is VERY different from.gitignore
. Well, at least I learned something new. but seriously, I'm not so sure which one is better forpack
to go with. It sits right in the middle between taking your code from git and sending it to docker :). Some people don't use git. Some people don't use docker too. If I'm thinking thatpack
is the direct continuation of "git-push-deploy" then the.gitignore
should probably win.git
's implementation of.gitignore
mostly here, here, here, and a few more, all in the same file. It doesn't seem like rocket science to implement. will require some quiet nights though.helm
's implementation, it's kind of to lose from both ends, cause it's not 100% compatible with either git or docker, but it's probably for the simplicity of the implementation, so it might be a good call. It's also the one that is easiest to just use viaimport
I'd really appreciate input here to know where to spend my time.
Thanks in advance!
The text was updated successfully, but these errors were encountered: