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 __init__.py to log_generator_wrapper #261

Merged

Conversation

sarahbx
Copy link
Contributor

@sarahbx sarahbx commented Apr 2, 2021

Description

During VM testing, both @ebattat and I encountered ModuleNotFoundError for log_generator_wrapper

[  159.121770] cloud-init[805]: Traceback (most recent call last):
[  159.130445] cloud-init[805]:   File "/usr/local/bin/run_snafu", line 11, in <module>
[  159.140736] cloud-init[805]:     load_entry_point('snafu==0.0.1', 'console_scripts', 'run_snafu')()
[  159.152465] cloud-init[805]:   File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
[  159.166584] cloud-init[805]:     return get_distribution(dist).load_entry_point(group, name)
[  159.177866] cloud-init[805]:   File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
[  159.192404] cloud-init[805]:     return ep.load()
[  159.200343] cloud-init[805]:   File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
[  159.213722] cloud-init[805]:     return self.resolve()
[  159.222045] cloud-init[805]:   File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
[  159.237128] cloud-init[805]:     module = __import__(self.module_name, fromlist=['__name__'], level=0)
[  159.249307] cloud-init[805]:   File "/usr/local/lib/python3.8/site-packages/snafu/run_snafu.py", line 31, in <module>
[  159.263182] cloud-initci-info: no authorized ssh keys fingerprints found for user fedora.
[805]:     from snafu.utils.wrapper_factory import wrapper_factory
[  159.280753] cloud-init[805]:   File "/usr/local/lib/python3.8/site-packages/snafu/utils/wrapper_factory.py", line 18, in <module>
[  159.295348] cloud-init[805]:     from snafu.log_generator_wrapper.log_generator_wrapper import log_generator_wrapper
[  159.309280] cloud-init[805®]: ModuleNotFoundError: No module named 'snafu.log_generator_wrapper'```

Fixes

#254
log_generator_wrapper subdirectory was missing __init__.py file, preventing module import, adding.

@comet-perf-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@jtaleric jtaleric added the ok to test Kick off our CI framework label Apr 2, 2021
@jtaleric
Copy link
Member

jtaleric commented Apr 2, 2021

/rerun all

@jtaleric
Copy link
Member

jtaleric commented Apr 2, 2021

Thanks @sarahbx I wonder if there could be a test added to avoid this situation? I am curious if it is how we test/build in containers vs VM?

@comet-perf-ci
Copy link
Collaborator

Results for SNAFU CI Test

Test Result Runtime
I FAIL 00:00:00

@jtaleric
Copy link
Member

jtaleric commented Apr 2, 2021

@dry923 hmmm curious failure above. Seems test related not patch.

@amitsagtani97
Copy link
Member

@jtaleric @dry923 looks like..the CI checks for the last comment and picks the test name to run for it. In this case it was ->
17:06:14 + bash ci/run_ci.sh -t I wonder if there could be a test added to avoid this 'situation?' I am curious if it is how we test/build in containers vs 'VM?'
and started test for first word 'I'.
Maybe, there was another comment within 3 minutes[polling time for Jenkins to GitHub] after rerun command.

@amitsagtani97
Copy link
Member

/rerun all

@comet-perf-ci
Copy link
Collaborator

Results for SNAFU CI Test

Test Result Runtime
snafu/log_generator_wrapper FAIL 00:01:37

@sarahbx
Copy link
Contributor Author

sarahbx commented Apr 5, 2021

We are doing pip install {repo}, but one way we can test for this is to run python setup.py build and verify all packages show up in the build directory. Without the __init__.py, log_generator_wrapper does not get put into the build dir.

@jtaleric
Copy link
Member

jtaleric commented Apr 8, 2021

@amitsagtani97 @dry923 can someone run with @sarahbx patch manually? I highly doubt it breaks anything, but I want to double check.

@sarahbx Testing for VM/CNV is obviously a gap for our CI. Is this something we can work together on to close?

@dry923
Copy link
Member

dry923 commented Apr 8, 2021

/rerun all

@dry923
Copy link
Member

dry923 commented Apr 8, 2021

@amitsagtani97 @dry923 can someone run with @sarahbx patch manually? I highly doubt it breaks anything, but I want to double check.

@sarahbx Testing for VM/CNV is obviously a gap for our CI. Is this something we can work together on to close?

It failed last time because the benchmark-operator PR for the log generator wasn't merged yet so it looked for a test that wasn't there yet. I just kicked it again. I suspect it will pass as adding init.py shouldn't break anything.

@comet-perf-ci
Copy link
Collaborator

Results for SNAFU CI Test

Test Result Runtime
snafu/log_generator_wrapper PASS 00:04:28

Copy link
Member

@dry923 dry923 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@amitsagtani97 amitsagtani97 left a comment

Choose a reason for hiding this comment

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

LGTM!

@dry923 dry923 merged commit f2fe29a into cloud-bulldozer:master Apr 8, 2021
@dry923 dry923 mentioned this pull request Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok to test Kick off our CI framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants