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

pkg/api: Separation of concerns #1125

Merged
merged 6 commits into from Sep 2, 2014
Merged

Conversation

lavalamp
Copy link
Member

@lavalamp lavalamp commented Sep 1, 2014

pkg/api mixes several separate logical things.

New layout:

  • pkg/apitools gets things like Encode, Decode, AddConversionFuncs, etc. Very sorry for the name, but we can improve upon it later; find-and-replace is much simpler than this separation was.
  • pkg/api/validation gets all of the validating functions.
  • pkg/api/common gets the old APIObject (the thingy that lets you safely embed an api object of type known only at runtime), renamed just "Object" and will in the future get a type "Unknown", which will safely pass-through api objects understood only by other binary components.
  • pkg/api retains the internal types, and a file that registers them.

I added/extended doc comments in a few places to try and make this clear.

This PR will be a royal pain to keep rebased, so please deliberate quickly! :)

@thockin
Copy link
Member

thockin commented Sep 2, 2014

I'm mostly OK with this. I do not get why "common" makes sens for APIObject? To my ears api.Object works better. Also, I have an allergic reaction to "common", "core", "base", and so on.

apitools -> api/tools?

or maybe apitools + common -> runtime?

@smarterclayton smarterclayton self-assigned this Sep 2, 2014
@derekwaynecarr
Copy link
Member

This generally LGTM from a packaging perspective. I prefer common.Object to api.APIObject since its less redundant, but like @thockin, I am not the biggest fan of "common". I also preferred api/tools to apitools. apitools feels like it breaks Go conventions of single word package names for most libraries. If we are making this change, would like to do it ASAP so we can all avoid rebase hell.

@lavalamp
Copy link
Member Author

lavalamp commented Sep 2, 2014

The idea with making a "common" package was that they were "versionless" objects which could be used from any version of an api. Definitely the common object should not go into the main api package, because then everything would have to depend on the main api package. I could see it going into the apitools package.

apitools + common -> runtime?

Is everyone else cool with this rename? If so I'll do it quickly.

@smarterclayton
Copy link
Contributor

LGTM

@lavalamp lavalamp force-pushed the fixApi branch 3 times, most recently from b0b87d5 to ad15a36 Compare September 2, 2014 18:04
@lavalamp
Copy link
Member Author

lavalamp commented Sep 2, 2014

OK, rebase & rename done.

@lavalamp
Copy link
Member Author

lavalamp commented Sep 2, 2014

Hm, travis is failing consistently at tip. I put in a change to disable travis at tip.

@lavalamp
Copy link
Member Author

lavalamp commented Sep 2, 2014

(Failing due to detecting races that seem to be in the coverage module, not our tests.)

@lavalamp
Copy link
Member Author

lavalamp commented Sep 2, 2014

I'm self-merging this since I now see that the travis failure at tip has been happening for a while now.

lavalamp added a commit that referenced this pull request Sep 2, 2014
pkg/api: Separation of concerns
@lavalamp lavalamp merged commit 597099a into kubernetes:master Sep 2, 2014
@thockin
Copy link
Member

thockin commented Sep 2, 2014

LGTM

vishh added a commit to vishh/kubernetes that referenced this pull request Apr 6, 2016
Evaluate labels from all mount points (rather than just "supported" fs)
josefkarasek pushed a commit to josefkarasek/kubernetes that referenced this pull request Feb 1, 2022
…kpolicy-4.9

Bug 2040338: UPSTREAM: <carry>: remove egressnetworkpolicies from gc ignored resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants