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

Output generated conversion functions/names #7644

Merged
merged 1 commit into from May 4, 2015

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented May 1, 2015

This outputs the generated functions/names to files so that people who hit test failures related to needing to regenerate conversion functions already have them generated

@liggitt
Copy link
Member Author

liggitt commented May 1, 2015

@wojtek-t PTAL

@liggitt
Copy link
Member Author

liggitt commented May 1, 2015

@pmorie FYI

@pmorie
Copy link
Member

pmorie commented May 1, 2015

@pweil- @sdminonne

ioutil.WriteFile(namesTxt, generatedNames.Bytes(), os.FileMode(0644))

compareBuffers(t, functionsTxt, existingFunctions, generatedFunctions)
compareBuffers(t, namesTxt, existingNames, generatedNames)
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably clean up the files for a successful run (or maybe always). If not, maybe add them to a gitignore

Copy link
Contributor

Choose a reason for hiding this comment

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

derp, the files are meant to be used. Disregard...failed to comprehend.

Copy link
Contributor

Choose a reason for hiding this comment

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

But perhaps clean up in the success case still since they're only meant to be used in the failure case

@pweil-
Copy link
Contributor

pweil- commented May 1, 2015

One of the things I struggled with recently was that the generator output didn't tell me all of the things it failed to generate based on an api change I made (removing an field from internal but leaving it in the v1beta* apis). It was on Container so pretty much everything that had a container didn't generate. Maybe we can use a technique like this to give some output in the conversion utility for reference.

@liggitt
Copy link
Member Author

liggitt commented May 1, 2015

Cleaned up files if there were no problems

@wojtek-t
Copy link
Member

wojtek-t commented May 4, 2015

LGTM

@wojtek-t wojtek-t added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 4, 2015
wojtek-t added a commit that referenced this pull request May 4, 2015
Output generated conversion functions/names
@wojtek-t wojtek-t merged commit e225a2e into kubernetes:master May 4, 2015
@liggitt liggitt deleted the conversion_test branch May 14, 2015 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants