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

fix: Remove unnecessary dependency on jmespath #22

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

flowerysong
Copy link
Contributor

This is straightforward manipulation to do with standard Jinja features, there's no need to use a non-default library.

@SuperQ
Copy link
Contributor

SuperQ commented Feb 2, 2023

CC @gardar

@SuperQ
Copy link
Contributor

SuperQ commented Feb 2, 2023

Looks like the lint issue is unrelated. Looking into it.

@gardar
Copy link
Member

gardar commented Feb 2, 2023

Nice catch, LGTM!

@gardar
Copy link
Member

gardar commented Mar 2, 2023

@flowerysong please rebase

@SuperQ SuperQ changed the title Remove unnecessary dependency on jmespath fix: Remove unnecessary dependency on jmespath Mar 2, 2023
@github-actions github-actions bot added the bugfix label Mar 2, 2023
@flowerysong
Copy link
Contributor Author

Test failures look unrelated.

Tests against Ansible 2.9 are failing because Ansible 2.9 reached EOL last May and is missing many collection features (like support for git dependencies in requirements.yml.)

The 2.12 failure was API rate limiting:

TASK [prometheus.prometheus.prometheus : Discover latest version] **************
fatal: [almalinux-8]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'url'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Received HTTP error for https://api.github.com/repos/prometheus/prometheus/releases/latest : HTTP Error 403: rate limit exceeded. Received HTTP error for https://api.github.com/repos/prometheus/prometheus/releases/latest : HTTP Error 403: rate limit exceeded"}

@SuperQ
Copy link
Contributor

SuperQ commented Mar 2, 2023

Actually, the 2.9 failure is because we started fetching things from git instead of galaxy. The old version does not support fetching from git.

@flowerysong
Copy link
Contributor Author

flowerysong commented Mar 2, 2023

Actually, the 2.9 failure is because we started fetching things from git instead of galaxy. The old version does not support fetching from git.

That's what I said.

There's a decent chance that my change will also legitimately fail on 2.9; automatic generator unrolling wasn't added until 2.10. I think flatten() will take care of that, but I'm not positive.

This is fairly straightforward manipulation to do with standard Jinja
features.

Signed-off-by: Paul Arthur <paul.arthur@flowerysong.com>
@gardar
Copy link
Member

gardar commented Mar 2, 2023

2.9 test has been fixed by #37

@SuperQ SuperQ merged commit 9a049d0 into prometheus-community:main Mar 3, 2023
@flowerysong flowerysong deleted the no_json_query branch March 3, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants