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

Add handling of unsupported HTTP methods inside adapter #689

Merged
merged 2 commits into from Apr 29, 2021

Conversation

sshishov
Copy link
Contributor

@sshishov sshishov commented Apr 27, 2021

Add handling of unsupported HTTP methods inside adapter

Background

We are using Kubernetes in our setup and Istio Gateway which is using Envoy behind the scenes.

  • Unfortunately, envoy does not support custom HTTP methods, according to the issue.
  • When this issue will be closed, the parser will allow custom HTTP verbs but currently, we are locked out.

The only way to have a workaround, to replace list custom verb with get plus additional params.

NOTE

Additional actions:

  • now we can always use LIST everywhere and if the adapter does not support it, it will be converted before the request.
  • there are a lot of places with logic if method == 'LIST' etc... And there are a lot of places where we are propagating list=true to params.

Fixes #551

NOTE: now you can always call `LIST` everywhere and if the adapter does not support it, it will be converted before the request
There are a lot of places with logic if method == 'LIST' etc... And there are a lot of places where we are propagating list=true to params
@sshishov sshishov requested a review from a team as a code owner April 27, 2021 09:18
Eslamanwar
Eslamanwar previously approved these changes Apr 27, 2021
@sshishov
Copy link
Contributor Author

If needed, I can try to update the code everywhere where this addition of list=true is used.
I just do not know if every endpoint which is using it supports LIST method of HTTP.
If not, then this inconsistency should be fixed, imho.

hvac/adapters.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 29, 2021

Codecov Report

Merging #689 (cac5e71) into develop (c1a88fe) will decrease coverage by 0.11%.
The diff coverage is 28.57%.

@@             Coverage Diff             @@
##           develop     #689      +/-   ##
===========================================
- Coverage    83.76%   83.64%   -0.12%     
===========================================
  Files           61       61              
  Lines         3216     3223       +7     
===========================================
+ Hits          2694     2696       +2     
- Misses         522      527       +5     
Impacted Files Coverage Δ
hvac/adapters.py 85.56% <28.57%> (-4.44%) ⬇️

@jeffwecan jeffwecan added the enhancement a new feature or addition label Apr 29, 2021
@jeffwecan jeffwecan added this to the 0.10.10 milestone Apr 29, 2021
@jeffwecan jeffwecan merged commit dd18403 into hvac:develop Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a new feature or addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapters list function
3 participants