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 url deploy feature #1803

Conversation

ihumster
Copy link
Collaborator

SUMMARY

Add to vmware_deploy_ovf 'url' parameter (mutually exclusive with 'ovf' parameter) for remote deploy from http server.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_deploy_ovf

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/0ff955e32b26461c91034375c88ab680

✔️ ansible-tox-linters SUCCESS in 8m 59s
✔️ build-ansible-collection SUCCESS in 9m 51s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006211910 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006211911 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006211912 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006211913 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 33s

@ihumster
Copy link
Collaborator Author

@mariolenz Hello. Please, tell me what is NODE_FAILURE?

@ihumster
Copy link
Collaborator Author

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/0f934fac95c149a98e41e1a4a2e69301

✔️ ansible-tox-linters SUCCESS in 8m 53s
✔️ build-ansible-collection SUCCESS in 9m 48s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006212335 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006212336 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006212337 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006212338 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 5m 30s

@alinabuzachis
Copy link
Contributor

recheck

@ihumster
Copy link
Collaborator Author

@alinabuzachis And now ansible-test-cloud-integration-vcenter7_2esxi-stable215 failed on vmware_vmotion: Create VM task. =(

@alinabuzachis
Copy link
Contributor

recheck

@softwarefactory-project-zuul
Copy link

@ihumster
Copy link
Collaborator Author

recheck

@mariolenz mariolenz mentioned this pull request Jul 26, 2023
@ihumster
Copy link
Collaborator Author

@mariolenz my two PR (this and #1803) passed CI checks. Are there any stoppers to include them in the master branch?

@mariolenz
Copy link
Collaborator

my two PR (this and #1803) passed CI checks.

This one is #1803 ;-P

What's the other one?

Are there any stoppers to include them in the master branch?

I'm not sure. I'll try to find the time to review tomorrow.

@ihumster
Copy link
Collaborator Author

@mariolenz I gave the wrong link, sorry. I mean #1806

@ihumster
Copy link
Collaborator Author

@mariolenz

I'm not sure. I'll try to find the time to review tomorrow.

If you don't mind, I will continue to watch the Issues and offer corrections for them in the form of a PR

@mariolenz
Copy link
Collaborator

Sorry, I wasn't able to review this PR or #1806 today. I hope I'll find the time to do it this week, but at the moment there are so many other things to do at work 😩

If you don't mind, I will continue to watch the Issues and offer corrections for them in the form of a PR

Sure, go on! This is very much appreciated 😃

@ihumster
Copy link
Collaborator Author

@mariolenz I fix some sanity tests errors - move import six to ansible.module_utils.six, but now I can't replace urlopen function on open_url. They are too different. I added to sanity ignore files 'replace-urlopen!skip' for module, if it's allowed.

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/78c3b04facbe4cd79378e3d0ca1d87ea

✔️ ansible-tox-linters SUCCESS in 8m 45s
✔️ build-ansible-collection SUCCESS in 9m 34s
✔️ ansible-test-cloud-integration-vcenter7_only-stable215 SUCCESS in 19m 57s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006261427 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006261428 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 RETRY_LIMIT in 1h 07m 22s
✔️ ansible-galaxy-importer SUCCESS in 4m 03s

@ihumster
Copy link
Collaborator Author

ihumster commented Aug 6, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/67d6795f65e840208eda4cef479a445c

✔️ ansible-tox-linters SUCCESS in 8m 33s
✔️ build-ansible-collection SUCCESS in 10m 31s
✔️ ansible-test-cloud-integration-vcenter7_only-stable215 SUCCESS in 20m 00s
✔️ ansible-test-cloud-integration-vcenter7_2esxi-stable215 SUCCESS in 17m 11s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006262124 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006262125 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 43s

@ihumster
Copy link
Collaborator Author

ihumster commented Aug 6, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/2be5baf50c9243b396e8503778b33b61

✔️ ansible-tox-linters SUCCESS in 9m 22s
✔️ build-ansible-collection SUCCESS in 9m 26s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006262274 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006262133 failed in 0s
✔️ ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 SUCCESS in 53m 05s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006262135 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 53s

@ihumster
Copy link
Collaborator Author

ihumster commented Aug 6, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/653545d22b4b4140b7196e51daf74c41

✔️ ansible-tox-linters SUCCESS in 8m 40s
✔️ build-ansible-collection SUCCESS in 9m 28s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006262463 failed in 0s
✔️ ansible-test-cloud-integration-vcenter7_2esxi-stable215 SUCCESS in 18m 33s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006262470 failed in 0s
✔️ ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 SUCCESS in 51m 33s
✔️ ansible-galaxy-importer SUCCESS in 5m 14s

@ihumster
Copy link
Collaborator Author

ihumster commented Aug 6, 2023

recheck

@ihumster
Copy link
Collaborator Author

ihumster commented Aug 7, 2023

@mariolenz And this CI is done.

Comment on lines +277 to +278
exp1 = r"(?P<url>(?:(?P<scheme>[a-zA-Z]+:\/\/)?(?P<hostname>(?:[-a-zA-Z0-9@%_\+~#=]{1,256}\.){1,256}(?:[-a-zA-Z0-9@%_\+~#=]{1,256})))"
exp2 = r"(?::(?P<port>[[:digit:]]+))?(?P<path>(?:\/[-a-zA-Z0-9!$&'()*+,\\\/:;=@\[\]._~%]*)*)(?P<query>(?:(?:\#|\?)[-a-zA-Z0-9!$&'()*+,\\\/:;=@\[\]._~]*)*))"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I'll never have to troubleshoot this 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually a pretty simple regular expression. =) It beats any URL to the full set of its constituent parts (scheme, hostname, path, etc)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I think I'm not that bad at regular expressions... but if you think this simple, I don't want to see one that you consider complex 😛 SCNR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid we just need to catch our luck with CI again =(

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/2a1807f8706a422394cee205d094d82d

✔️ ansible-tox-linters SUCCESS in 9m 06s
✔️ build-ansible-collection SUCCESS in 9m 51s
✔️ ansible-test-cloud-integration-vcenter7_only-stable215 SUCCESS in 18m 38s
✔️ ansible-test-cloud-integration-vcenter7_2esxi-stable215 SUCCESS in 18m 37s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006281799 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006281800 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 51s

@mariolenz
Copy link
Collaborator

recheck

@mariolenz
Copy link
Collaborator

recheck

@softwarefactory-project-zuul
Copy link

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/be4f19c40ec9447dab112d63a4ff66eb

✔️ ansible-tox-linters SUCCESS in 8m 33s
✔️ build-ansible-collection SUCCESS in 7m 35s
✔️ ansible-galaxy-importer SUCCESS in 6m 07s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 430ab33 into ansible-collections:main Aug 12, 2023
@ihumster ihumster deleted the deploy_ovf_add_url_feature branch August 12, 2023 21:09
@mariolenz
Copy link
Collaborator

@ihumster I don't know why the CI didn't complain earlier, but it looks like this line:

exp2 = r"(?::(?P<port>[[:digit:]]+))?(?P<path>(?:\/[-a-zA-Z0-9!$&'()*+,\\\/:;=@\[\]._~%]*)*)(?P<query>(?:(?:\#|\?)[-a-zA-Z0-9!$&'()*+,\\\/:;=@\[\]._~]*)*))"

is a few characters too long. What do you think would be the best way to make sure we're below 160 characters per line? Split it into exp2 and exp3 somehow or use a multi-line string or what?

The CI also started to dislike the author documentation. I think I was able to fix this in #1825 but it would be best to fix both issues in one go.

@ihumster
Copy link
Collaborator Author

@mariolenz

is a few characters too long. What do you think would be the best way to make sure we're below 160 characters per line? Split it into exp2 and exp3 somehow or use a multi-line string or what?

I think it is necessary to split by exp2, exp3, as well. I'm not sure if multi-line will be accepted re...

@ihumster
Copy link
Collaborator Author

Although stackoverflow says you can via
r"""
reg
exp
multiline"""

taking into account the indents of course =)

softwarefactory-project-zuul bot pushed a commit that referenced this pull request Aug 14, 2023
vmware_deploy_ovf: Fix sanity tests

SUMMARY
After merging #1803 the daily CI run fails the sanity tests:
plugins/modules/vmware_deploy_ovf.py:279:161: E501: line too long (164 > 160 characters)
plugins/modules/vmware_deploy_ovf.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['Alexander Nikitin (@ihumster)', 'Matt Martz ']

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
vmware_deploy_ovf
ADDITIONAL INFORMATION
Sanity (Ⓐstable-2.14)
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