-
Notifications
You must be signed in to change notification settings - Fork 54
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
Populate project without update job in Tower #82
Populate project without update job in Tower #82
Conversation
032ecb3
to
d8a88b9
Compare
This pull request is not mergeable. Please rebase and repush. |
d8a88b9
to
9aff831
Compare
Rebased on current state of #72. |
@miq-bot add_label unmergeable |
@miq-bot add_label pending core |
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 rip out the duplicated changes with your other PR(s)
This pull request is not mergeable. Please rebase and repush. |
76a20e0
to
8baf65c
Compare
I rebased to the current master, so it doesn’t contain any duplicate commits. Still I’d like to note that this PR introduces changes that are only useful after #72 gets into master. Merging this PR without #72 doesn’t make much sense. Is there maybe some label, better that unmergeable to stick to such PRs? |
* Create a failed_repo to test saving last update stdout. * Create a jobless_repo to test behavior of loading a project without an update job. Delete the job after it finishes upon project creation.
8baf65c
to
361bff5
Compare
The last update job is used to capture its stdout. This output is now stored only if the update fails. [1], [2] To test this, we need more than one project: 3
Updated the Rake task to create those projects. Removed another_repo, any of the new ones (jobless_repo or failed_repo) can be used instead by #93 and #92. @jameswnl might want to review this change. |
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'd like to see @jameswnl 's approval on this. Otherwise my only concern are the messy Hashes, which seems to me rather unreadible than anything else. I'll take it over this PR and update it.
lib/tasks_private/spec_helper.rake
Outdated
|
||
# create a job_template | ||
uri = '/api/v1/job_templates/' | ||
data = {"name" => 'hello_template', "description" => "test job", "job_type" => "run", "project" => project['id'], "playbook" => "hello_world.yml", "credential" => machine_credential['id'], "cloud_credential" => aws_credential['id'], "network_credential" => network_credential['id'], "inventory" => inventory['id'], "organization" => organization['id']} | ||
data = {"name" => 'hello_template', "description" => "test job", "job_type" => "run", "project" => hello_project['id'], "playbook" => "hello_world.yml", "credential" => machine_credential['id'], "cloud_credential" => aws_credential['id'], "network_credential" => network_credential['id'], "inventory" => inventory['id'], "organization" => organization['id']} |
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'll try to convert this into proper Ruby hashes. It still gets serialized as JSON on send so, I don't see a reason why to keep it messy.
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 did a cleanup on that file, it was painful to read it. I know that's not the point of this PR, though I had to do it...
The other PR #72 marked as "merge before" doesn't necessarily block this one. The dependency is rather a use-case for the environment prepared by this PR. We shouldn't need to wait. |
a4fe4a1
to
49e4ace
Compare
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.
🎆 🎊 🎸 🌈
Some comments on commits Glutexo/manageiq-providers-ansible_tower@361bff5~...49e4ace lib/tasks_private/spec_helper.rake
|
Checked commits Glutexo/manageiq-providers-ansible_tower@361bff5~...49e4ace with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
In the future, please keep unrelated rubocop changes to a separate PR. |
I know. We had a discussion about that here a4fe4a1#commitcomment-29502367 so we decided to keep it this way... |
@jameswnl, can you review this once more, please? Are there any concerns which should be addressed? |
Spec examples introduced by #72 require one project with an update job and another without one. Use
another_repo
for the latter case. Alter thepopulate_tower
Rake task to delete the update job after the initial update finishes.Merging this PR does not make sense before merging other PRs:
@miq-bot add_reviewer @jameswnl