Closed Bug 1189021 Opened 9 years ago Closed 9 years ago

talos is not seen as a package when used by mozharness

Categories

(Testing :: Talos, defect)

defect
Not set
normal

Tracking

(firefox42 affected)

RESOLVED FIXED
Tracking Status
firefox42 --- affected

People

(Reporter: parkouss, Assigned: parkouss)

References

Details

Attachments

(1 file, 2 obsolete files)

talos is not seen as a package when used by mozharness. Because of that, we can't use imports statements like:

from talos import foo
import talos.bar

this will only works locally - and break on try with ImportError.

We should fix that, and then use relative import inside talos to avoid name conflicts with python files outside talos.
Attached patch 1189021.patch (obsolete) — Splinter Review
This should fix the issue.

So what it does:

- install talos in the virtualenv (instead of just the dependencies). as pip will install talos dependencies automatically, this makes the code a lot easier.

- run the talos executable that has been created by pip in the virtualenv bin directory. (this is the entrypoint "talos" in setup.py). We ensure this way that the good python will be used, and that the right talos will be used.


So this implies (if that works, but I know it will!) that from now on we should always use the binary "talos" installed with pip instead of manually running the run_tests.py file. Because this will be how mozharness does that anyway, and this is safer and easier (and trust me, this is a good thing. :)).


This works fine locally.

Note that for simplicity I removed the hack for yaml, so we should wait for bug 1188756 before landing that.
Attachment #8640970 - Flags: review?(jmaher)
Depends on: 1188756
Status: NEW → ASSIGNED
Comment on attachment 8640970 [details] [diff] [review]
1189021.patch

Review of attachment 8640970 [details] [diff] [review]:
-----------------------------------------------------------------

we had issues with installing talos as a package previously on some newly imaged linux64 machines.  It would show up about once a week and we effectively had to pull the machines out of production.
Attachment #8640970 - Flags: review?(jmaher) → review-
Well, maybe editable mode can help us here. I asked :jlund to have his opinion.
See Also: → 1112773
Attached patch 1189021.patch (obsolete) — Splinter Review
Ok, patch updated with what I said in bug 1112773 comment 55.
Attachment #8640970 - Attachment is obsolete: true
Attachment #8641055 - Flags: feedback?(jlund)
Comment on attachment 8641055 [details] [diff] [review]
1189021.patch

Review of attachment 8641055 [details] [diff] [review]:
-----------------------------------------------------------------

interesting, I didn't know about editable. My only issue here is that we still haven't solved bug 1141416 which we thought was related to bug 1112773.

I think before we start changing the process for installing talos again, we should determine what is happening in 1141416.

jmaher, do you agree?
Attachment #8641055 - Flags: feedback?(jmaher)
Attachment #8641055 - Flags: feedback?(jlund)
Attachment #8641055 - Flags: feedback+
yeah, I agree we should figure out the root cause, although I didn't really understand what is still broken after looking at the loaner slave.  A lot is changing and we are moving talos in tree.  

Ideally once we are in-tree and we all feel comfortable that talos can be updated appropriately, then I would be up for experimenting with talos as a package.  Honestly I think we should focus on making talos run more like mochitest, reftest though.
Comment on attachment 8641055 [details] [diff] [review]
1189021.patch

Review of attachment 8641055 [details] [diff] [review]:
-----------------------------------------------------------------

while this looks great code wise, I am not convinced this is the route we really want to go.
Attachment #8641055 - Flags: feedback?(jmaher) → feedback-
Right. Then let's do that using PYTHONPATH then. :)
Attached patch 1189021_2.patchSplinter Review
Attachment #8641055 - Attachment is obsolete: true
Attachment #8642267 - Flags: review?(jmaher)
Comment on attachment 8642267 [details] [diff] [review]
1189021_2.patch

Review of attachment 8642267 [details] [diff] [review]:
-----------------------------------------------------------------

this looks good!
Attachment #8642267 - Flags: review?(jmaher) → review+
leave-open until we fixes internal talos imports.
Keywords: leave-open
So I changed my mind - closing this now, we will fix imports later if needed.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: