-
Notifications
You must be signed in to change notification settings - Fork 123
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
WIP: Add 'sti' execute plugin #229
Conversation
This pull request introduces 1 alert when merging 7bb7d1c into 59bf14c - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging f42b6f7 into 59bf14c - view on LGTM.com new alerts:
|
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.
Let's add the new sti
plugin as a dynamic one. In other words, let's finish #227 first and rebase on it. Essential part of an execute
plugin is to create the results.yaml
file with results which then can be consumed by the report
step. Please include generating this file in the implementation as well.
@psss ah that was the one ;) definitely ... will do ... thanks |
Thanks. One more thought: Should we also do |
I was thinking about this, are 2 things to note:
So I would say we will need to live without discover 'sti', but report should ideally work anyway? |
Let's discuss today this topic also @psss |
This pull request introduces 1 alert when merging 510b3ff into bb67195 - view on LGTM.com new alerts:
|
Ok, the code is now on dynamic plugins, seems to work. Now I need to parse out the results from results.yml if around and make sure the result is interpreted fine in case there is no results.yml from STI and we are done \o/ |
This pull request introduces 1 alert when merging 31eaa6a into bb67195 - view on LGTM.com new alerts:
|
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 working on this, @thrix! A couple of comments added.
summary: Execute default playbook | ||
example: | | ||
execute: | ||
how: sti |
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.
Child stories should contain at least a short description. Otherwise it's inherited from parent. You can use make docs
to quickly check the final doc output.
self._playbook(), | ||
inventory=self._inventory(guest), | ||
options=f'-e artifacts={self.step.workdir}' | ||
) |
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 tried to run it in this way:
tmt run -avvvddd provision -h virtual execute -h sti
In the middle of test execution a password prompt popped up:
root@192.168.122.54's password:
Not sure where the problem could be.
tmt/steps/provision/podman.py
Outdated
""" Prepare container using ansible playbook """ | ||
playbook = self._ansible_playbook_path(playbook) | ||
inventory = inventory or f'{self.container},' | ||
options = f'{options} ' or '' | ||
local_temp = os.path.expanduser('~/.ansible/tmp') |
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.
What is this used for? Probably add a comment?
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.
seems like a leftover.
class ExecutorSTI(tmt.steps.execute.ExecutePlugin): | ||
""" Run tests using ansible according to Standard Test Interface spec """ | ||
_doc = """ | ||
Execute STI tests |
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.
Use the full STI name here, this is shown in the --help
message.
""" | ||
|
||
|
||
class ExecutorSTI(tmt.steps.execute.ExecutePlugin): |
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.
Unit tests are failing. It would be also nice to include at least a simple tier: 3
test.
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.
will add some, keeping open for now
tmt/steps/execute/sti.py
Outdated
""" Show discover details """ | ||
super().show(['playbook']) | ||
|
||
def _playbook(self): |
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 believe this would be more easily handled by the default()
method. See other plugins for inspiration.
hostname = guest.guest or guest.container | ||
|
||
inventory_file = os.path.join( | ||
self.step.workdir, f'inventory-{hostname}') |
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 can use self.step.write(f'inventory-{hostname}', content)
to create a file in the step workdir.
|
||
def wake(self): | ||
""" Wake up the plugin (override data with command line) """ | ||
|
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.
Easier way to achieve the same: super().wake(['playbook'])
This pull request introduces 1 alert when merging ba3691a into 8060946 - view on LGTM.com new alerts:
|
Support running Standard Test Interface tests via 'tmt'. Example of the workflow $ fedpkg clone python3 $ cd python3 $ tmt run -a provision -h virtual.testcloud execute -h sti Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
ba3691a
to
3f3301f
Compare
This pull request introduces 1 alert when merging 3f3301f into 1cbb71e - view on LGTM.com new alerts:
|
@psss pls ignore the rerequest for review :) I did not want to do that :) |
sorry, infra again :( need to move |
@thrix Hi, Is this still relevant? |
I'd vote for closing the issue and reopenning only if there is a real need for this. |
I agree with closing. Let's not complicate our lives with STI. There is more pressing stuff to do. There are no real users for now, I would rather force people to migrate to STI, which we have clear path for. |
... to migrate "from STI"? ;-) |
Support running sti tests via 'tmt'. Add an template for easily
create the test plan.
Example of the workflow
$ fedpkg clone python3
$ cd python3
$ tmt init --template sti
$ tmt run -a provision -h virtual.testcloud
or
$ tmt run -a provision -h container
Relates to https://pagure.io/fedora-ci/general/issue/4
Still needs some touches:
Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com