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

Support multiple versions of Kubernetes #130

Closed
wants to merge 16 commits into from
Closed

Conversation

exarkun
Copy link
Contributor

@exarkun exarkun commented May 23, 2017

Fixes #121

@codecov-io
Copy link

codecov-io commented May 23, 2017

Codecov Report

Merging #130 into master will decrease coverage by 0.3%.
The diff coverage is 97.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #130      +/-   ##
==========================================
- Coverage   98.16%   97.86%   -0.31%     
==========================================
  Files          25       25              
  Lines        2122     2245     +123     
  Branches      201      210       +9     
==========================================
+ Hits         2083     2197     +114     
- Misses         26       33       +7     
- Partials       13       15       +2
Impacted Files Coverage Δ
src/txkube/_memory.py 98.64% <100%> (-0.4%) ⬇️
src/txkube/testing/strategies.py 100% <100%> (ø) ⬆️
src/txkube/test/test_model.py 100% <100%> (ø) ⬆️
src/txkube/_swagger.py 100% <100%> (ø) ⬆️
src/txkube/_interface.py 100% <100%> (ø) ⬆️
src/txkube/__init__.py 100% <100%> (ø) ⬆️
src/txkube/test/test_swagger.py 100% <100%> (ø) ⬆️
src/txkube/testing/matchers.py 92.77% <63.63%> (-4.46%) ⬇️
src/txkube/_exception.py 96% <77.77%> (-4%) ⬇️
src/txkube/_network.py 95.55% <94.87%> (-0.6%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update faa0374...9eee2d3. Read the comment docs.

_versions = {
(u"1", u"5"): v1_5_model,
(u"1", u"6"): v1_6_model,
(u"1", u"7"): v1_7_model,
Copy link

Choose a reason for hiding this comment

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

In LeastAuthority/kubetop#44 I tried testing kubetop against minikube start --kubernetes-version v1.7.0-alpha.2.

It gave this error:

(kubetop) [richard@drax txkube]$ kubetop
Traceback (most recent call last):
Failure: twisted.internet.defer.FirstError: FirstError[#1, [Failure instance: Traceback: <type 'exceptions.ValueError'>: Unsupported Kubernetes version: .

The version.Info in this case looked like this:

version.Info(major=u'', gitTreeState=u'not a git tree', buildDate=u'1970-01-01T00:00:00Z', platform=u'linux/amd64', gitVersion=u'v0.0.0-master+$Format:%h$', gitCommit=u'$Format:%H$', compiler=u'gc', minor=u'', goVersion=u'go1.7.3')

model = self._versions[version.major, version.minor]
except KeyError:
raise ValueError(
"Unsupported Kubernetes version: {}.{}".format(
Copy link

Choose a reason for hiding this comment

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

❓ It would have been clearer if the exception had included the full version.Info repr.

@exarkun
Copy link
Contributor Author

exarkun commented May 30, 2017

To be replaced by a new PR.

@exarkun exarkun closed this May 30, 2017
@exarkun exarkun deleted the 121.multi-k8s-versions branch May 30, 2017 15:03
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.

3 participants