-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Don't commit generated (some) code #33440
Don't commit generated (some) code #33440
Conversation
7ccf69f
to
256a39b
Compare
@caesarxuchao I don't know where the script that generates staging/ lives - it needs to |
Jenkins GCI Kubemark GCE e2e failed for commit 256a39b975c8606b49d6fc54039fc4e4c899c080. Full PR test history. The magic incantation to run this job again is |
@k8s-bot gci gce e2e test this |
Yeah, client-go needs the generated files. Could you call |
Yeah, that should be enough - do you have bandwidth to make that change On Mon, Sep 26, 2016 at 10:04 AM, Chao Xu notifications@github.com wrote:
|
Sure. We have an e2e test that will catch the missing generated files, so I won't forget. |
@k8s-bot gci gce e2e test this |
256a39b
to
a9c6223
Compare
a9c6223
to
51aa4e8
Compare
rebased |
LGTM. Thanks. |
Is there a way to do this while still leaving the API packages in a build-able state? |
You mean to check it in but not check it in? Schrodinger's code - it is On Tue, Sep 27, 2016 at 10:28 AM, krousey notifications@github.com wrote:
|
No. The main errors seem to be referencing conversion functions that are generated. These function are registered with the scheme. Perhaps define and register the functions in the same file, so when it's not there, all references are gone. |
Ahh, yes, the places that register their own conversions should not be On Tue, Sep 27, 2016 at 10:38 AM, krousey notifications@github.com wrote:
|
Verifying that this does not break federation @k8s-bot federation gce e2e test this |
I haven't looked at this and probably won't have a chance today, but please try to make everything build even without these files checked in. |
Jenkins Federation GCE e2e failed for commit 51aa4e817470fa33f805b766cc914541c6af698e. Full PR test history. The magic incantation to run this job again is |
@spxtr - any way to make progress on this? It is LITERALLY a year later. I'm rebasing for the hundredth time and finding new things that have changed underneath me. I am tired of this. I love the idea of Bazel, but it's not paying off for me... |
@caesarxuchao I need your advice on the staging export process after this - if the zz_generated files are not checked in, we need to generate and add them before the export happens. Where does that happen? |
30510a0
to
ddd90a0
Compare
@ixdy @mikedanese PTAL at bazel fail - the generated BUILD file is failing.
|
@thockin: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@thockin PR needs rebase |
For incremental progress we can do
, so evidently that will help. I got conversion and default generated files partway complete, but they're not quite ready to go yet. I might've bitten off a bit more than I should've. I was hoping to make it so that adding a new api group would require no manual editing of BUILD files, but if we drop that requirement then we can do the rest of these with much less effort. When adding a new dependency or a new API group, I would then make the conversion-gen and default-gen programs print out an error when they notice it's missing. I think @ixdy is interested in moving this forward. |
I'm on hold waiting for the bazel experts to tell me what they need. Manually editing a BUILD file is bad, but as long as something can error and tell users they need to do that, it might be livable. |
Are we approaching this wrong? Maybe making bazel do the regeneration is not the right answer. Maybe |
While preparing my PR for deepcopy I found that the recent switch to gazelle invalidated much of my work in a non-trivial fashion. It's not clear how kazel and gazelle should play together when both need to touch the same rules. @mikedanese thinks that bazel-contrib/rules_go#614 is the way forward.
As much as I hate the idea of this, it's actually a pretty good way to get generated files out of the repo in a way that lets us migrate to bazel-generation over time. We just need to be careful about the order in which we run things. |
/remove-lifecycle frozen |
@spiffxp: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Now that we are past 1.4 and we have a real client library, let's try this
again. This is not perfect, it still is missing other generated files, but
this is a start.
@caesarxuchao I'm assuming we do not need the generated files in the client lib?
This change is