Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Fix failing CI tests by updating args in k8s_service #34

Merged
merged 2 commits into from
Feb 21, 2020

Conversation

geerlingguy
Copy link
Collaborator

Closes #33.

@geerlingguy geerlingguy requested a review from fabianvf February 20, 2020 16:45
@geerlingguy
Copy link
Collaborator Author

@mmazur / @fabianvf - I added the relevant arg specs and docs to silence the warnings emitted by the sanity check... but I'm wondering—does the k8s_service module actually accept these parameters the same as the k8s module? The common raw.py module_util does state the options are mutually exclusive, but I've only ever tested them with the k8s module, not k8s_scale...

@codecov-io
Copy link

Codecov Report

Merging #34 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #34   +/-   ##
=======================================
  Coverage   43.28%   43.28%           
=======================================
  Files           3        3           
  Lines         536      536           
  Branches      109      109           
=======================================
  Hits          232      232           
  Misses        261      261           
  Partials       43       43
Flag Coverage Δ
#_ 43.28% <ø> (ø) ⬆️

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 3deeabf...b32e260. Read the comment docs.

@willthames
Copy link
Collaborator

I don't really understand why apply and src need to be mutually exclusive - surely that's no different to doing kubectl apply -f $src ?

@willthames willthames mentioned this pull request Feb 21, 2020
@geerlingguy
Copy link
Collaborator Author

@willthames - See https://github.com/ansible-collections/kubernetes/blob/7b5c599f6d6df6c792c87c7bb8544abc024baee0/plugins/module_utils/raw.py#L101-L104src and apply are marked as mutually exclusive to resource_definition and merge_type, respectively (not to each other).

@willthames
Copy link
Collaborator

Ah right, yes, that does indeed make more sense.

In answer to your earlier question, while I'd say that k8s_service shouldn't need apply, I added apply functionality mainly because I got hit so hard with updating services with the k8s module - I don't know if k8s_service handles that better - there are no tests for k8s_service (which means it probably shouldn't have been accepted)

I don't know if it accepts src either - I thought it was a higher level abstraction than that

@geerlingguy
Copy link
Collaborator Author

@willthames - Original PR with some discussion for background: ansible/ansible#48872 — it seems that the module was mostly added as a convenience, but I agree, I'd never used it (nor noticed it was in Ansible) until I was moving it into this collection. I normally use the k8s module for most anything (besides k8s_exec, that's been extremely handy of late).

@geerlingguy
Copy link
Collaborator Author

I'm going to go ahead and merge this, mostly to get tests back to green. If it turns out the k8s_service module needs further refinement to actually support the parameter structure it inherits... then we can open up follow-up bug reports and/or consider what to do with it later.

@geerlingguy geerlingguy merged commit 5491d5b into master Feb 21, 2020
@fabianvf
Copy link
Collaborator

@geerlingguy it probably should not accept all those k8s paramters, #36 to track

@geerlingguy
Copy link
Collaborator Author

@fabianvf - Okay, in that case when we untangle #36 we can drop these parameters again.

@geerlingguy geerlingguy deleted the 33-fix-sanity-checks branch July 17, 2020 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two sanity tests are failing in CI
4 participants