-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(http_pillar): added kwargs to handle extra option for http.query #61213
Conversation
Hi @martintamare, would you be able to add a changelog entry and relevant tests? Also, it seems that the pre-commit hook "black" has failed, could you run that against your changes? Looks good so far, but requesting a review from @garethgreenaway for a second opinion. |
cc4c0ca
to
d35abd4
Compare
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)[INFO] Initializing environment for https://github.com/saltstack/pip-tools-compile-impersonate. [INFO] Initializing environment for https://github.com/asottile/pyupgrade. [INFO] Initializing environment for https://github.com/saltstack/pre-commit-remove-import-headers. [INFO] Initializing environment for https://github.com/s0undt3ch/salt-rewrite. [INFO] Initializing environment for https://github.com/timothycrosley/isort. [INFO] Initializing environment for https://github.com/timothycrosley/isort:toml. [INFO] Initializing environment for https://github.com/psf/black. [INFO] Initializing environment for https://github.com/asottile/blacken-docs. [INFO] Initializing environment for https://github.com/asottile/blacken-docs:black==21.7b0. [INFO] Initializing environment for https://github.com/PyCQA/bandit. [INFO] Initializing environment for https://github.com/saltstack/invoke-pre-commit. [INFO] Initializing environment for https://github.com/saltstack/invoke-pre-commit:blessings,distro,jinja2,msgpack,pyyaml. [INFO] Initializing environment for https://github.com/saltstack/mirrors-nox. [INFO] Initializing environment for https://github.com/saltstack/mirrors-nox:pip>=20.2.4,<21.2,setuptools<58.0. [INFO] Installing environment for https://github.com/saltstack/invoke-pre-commit. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Check Known Missing Docstrings...........................................Passed - hook id: invoke - duration: 1.3s Thanks again! |
I've added the changelog entry, but as no tests are present for those modules, i'm not confident to add new tests ;) |
Is there anyone that can review this ? 🙏 |
@martintamare are you able to merge in the latest master branch changes? |
Yes of course, doing ! |
9fc4e0b
to
9790e4f
Compare
Done @MKLeb |
I'm going to try to write tests for this and we can attempt to get this merged soon. |
@MKLeb I can help, but starting tests from scratch is way more work that I can provide. |
@martintamare, it seems I don't have write access to your branch, so I'll paste the skeleton I wrote here... This is a new file,
This is the test I wrote for A few things to note here. The pytest docs are here. They're actually pretty decent. The special pytest fixture You'll see the |
Hi there, i'm trying to run test local but I did push. |
Frankly, running tests on a dev platform is very hard for a non salt-dev. I'm a venv (OK so far) python -m nox -e "pytest-3.7(coverage=False)" -- tests/pytests/unit/pillar/test_http_json_pillar.py I have a success but with some errors. Just my frustrated opinion ;) |
I ran your test file locally and it passed. What are the errors you are getting? Also, I know we are only testing headers being passed, but we may want to make sure we are returning yaml as the http response. I mocked it up here locally, and it looks like we can just remove the
Also, if you remove the |
Closing this because I ported it to #62788 to make the necessary fixes |
What does this PR do?
Add the hability to pass extra parameters to http_* ext_pillar
For example, add auth, or headers
What issues does this PR fix or reference?
Fixes: #36138