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 repr filter #382
Add repr filter #382
Conversation
|
WARNING!!! This PR is not attached to an issue. In most cases this is not advisable. Please see our PR docs for more information about how to attach this PR to an issue. |
789b6c5
to
e778c98
Compare
2fa54a0
to
3a721af
Compare
|
I switched all the dynamic scenarios to ansible 2.9 now, as ansible 2.8 does not work there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see it tested as collection
Makefile
Outdated
| @@ -0,0 +1,51 @@ | |||
| NAMESPACE := $(shell python -c 'import yaml; print(yaml.safe_load(open("galaxy.yml"))["namespace"])') | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this Makefile! It is pretty cool!
molecule/release-static/roles
Outdated
| @@ -1 +0,0 @@ | |||
| ../../roles | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this entire change (or 2 changes) needs a ticket or 2 in pulp.plan.io.
Even if it only affects developers, it is a very large change. Only small changes that are presumed to not be visible to users can get away without a ticket.
.github/workflows/pull_request.yaml
Outdated
| ansible: "2.9" | ||
| python: "2.7" | ||
| toxpy: "27" | ||
| - test_type: packages-dynamic | ||
| ansible: "2.8" | ||
| ansible: "2.9" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment about the limitations of ansible 2.8.
Also, I want to have more than 1 test for python 3.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see, where we document the dynamic use of the roles. That would be the perfect place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdellweg We do not. I suppose we should create a sample playbook and page under docs, similar to the letsencrypt playbook/page I just created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am tempted to say, if we never announced that "feature", we'd rather not talk about it now, so we never actually need to support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel there is a whole bunch of docs we should write for the installer.
For one thing, I want this to be a section of the docs:
https://pulpproject.org/2020/07/09/pulp-3.5-installer-roles/
We should address it at that time, since it is related (running only 1 role on a each host, compared to running roles 1 at a time on a single host.)
However, I want this limitation that we are aware of, and that bit us, to be captured somewhere at least. Even a comment in the github yaml worksforme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdellweg I documented it: https://github.com/pulp/pulp_installer/pull/418/files#
.github/workflows/pull_request.yaml
Outdated
| @@ -56,8 +56,9 @@ jobs: | |||
| python-version: ${{ matrix.python }} | |||
| - name: Install tox | |||
| run: | | |||
| sudo apt-get -yy install ansible | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why install it from apt rather than from pip? We are still reliant on pip to install the desired version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The strangest thing: Installing ansible with pip breaks molecule in the tox venv, presumably by leaving incompatible versions of files in common directories. System (ubuntu packaged) ansible doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, yeah. Please add a comment why we're doing that though. So it isn't accidentally code cleaned up.
Makefile
Outdated
| test: $(MANIFEST) | ||
| tox -e $(TOX_ENV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in order to run molecule locally, I have to build and then run a test command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only need to run make test. The Makefile cares for the rest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mentioned this verbally. In order for me to run freeform molecule commands, I have to run make install && molecule .... Correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but beware, this is the wrong pr to discuss those things. This one ought to only introduce the repr filter, and shall be rebased once #387 is merged. I think the relevant parts here are already outdated.
we have a |
fed8fb1
to
6ec301e
Compare
| @@ -17,8 +17,8 @@ | |||
| fail: | |||
| msg: "If you give one of pulp_webserver_tls_cert and pulp_webserver_tls_key, you must also give the other." | |||
| when: | |||
| - pulp_webserver_tls_cert | length or pulp_webserver_tls_key | length | |||
| - not pulp_webserver_tls_cert | length or not pulp_webserver_tls_key | length | |||
| - pulp_webserver_tls_cert is not mdellweg.filters.empty or pulp_webserver_tls_key is not mdellweg.filters.empty | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I really like this empty filter.
https://github.com/mdellweg/ansible_filters/blob/develop/plugins/test/tests.py#L12
|
@mdellweg Do we still want to proceed with this? |
Yes, i want to see this still. The way we generate python settings today is adventurous. |
|
@mikedep333 Finally came around to touch this up. |
c1c4cb7
to
e2878eb
Compare
e2878eb
to
b35ab30
Compare
|
@mikedep333 ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for this lovely refactoring!
No description provided.