-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(emulator): allowing to download and run emulator from URL #120
Conversation
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.
Awesome 🎉.
There is one thing I do not know: do we want to support generic URLs or are we fine with Gitlab links? In other words do we want to support downloads from anywhere?
Because if we limit it for Gitlab, we can simplify some code and also the UI. We would fill the artifacts names automatically. We could also request the job ID (1839236800) only.
Do we see use-cases where you would want to use some URL outside of Gitlab? cc @matejcik @mroz22
We could of course do both..
Also this is a great start and if we want to support branches easily we can do that by crafting a special URL. This URL https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/jobs/artifacts/master/download?job=core%20unix%20frozen%20debug%20build
always leads to the latest core build on master. Replacing the master with any branch will do the same trick. But let's finish this PR first and worry about that then.
The primary usecase for me would be to supply a local file for use. This would cover the gitlab usecase too, we can fetch the artifact however we like and supply the local file to tenv. Is there a usecase that actually wants tenv to download a specified URL? |
To be specific: although perhaps convenient in some situations, I never need to upload a new emulator while tenv is running. A well documented |
This would allow the firmware |
supplying a local file would work just as well -- the CI pipeline instances are not talking to the same docker instance running tenv, are they?
Yes, this seems nice. In that case we can do what @tsusanka suggests and accept a link to the job instead of to the artifact. |
I did some prototype with |
I see, I must have missed that. It looks like it would work fine for our CI usage. Specific name like |
Each pipeline using |
So we could wait after all the jobs in
I will be trying to implement this pipeline as our We should probably test is against T1 emu as well, but it has lower priority (as it is not changing so much) |
not all, just the one that produces the file we need (so presumably "core unix debug") |
Sooo if I sum it up: we will do FW tests using simple Now regarding this PR: could we still make use of this URL feature? Exactly as you say I can imagine some use cases for QA or Suite devs where you need to test some particular branch (like a Taproot one recently). It seems like a nice feature but it is true that we should not implement something until we properly understand the need. @mroz22 what do you think of this? Would you find it useful if you could set Gitlab URL in tenv and simply launch the emulator from such pipeline? |
Let's change the URL to https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/jobs/1839236825/ and fill in the details |
2056e17
to
459583e
Compare
Force-pushed after rebase on It is currently possible to input either Gitlab job link ( UX and UI is another unknown, but I believe the functionality is much more important here. |
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.
One tiny thing, feel free to force-push then :). Did not test, but let's see how it works :).
src/dashboard/index.html
Outdated
</div> | ||
<div> | ||
<!-- TODO: could be prefilling the t1-or-t2-select based on some keywords in URL | ||
(like "trezor-emu-core" fills T2, "trezor.elf" fills T1) --> |
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 remove the comment, I think the select box is enough.
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.
Removed in the force-pushed commit (force-pushed twice, second already rebased on current master, even though there was no conflict)
9112aff
to
58df44e
Compare
Force-pushed after squashing everything |
58df44e
to
f458da2
Compare
I am getting a conflict now. Probably due to #126. |
f458da2
to
e8881e5
Compare
Correct, there was a need of rebase. Force-pushed now |
Connected with trezor/trezor-firmware#1932 and #49
Ability to specify emulator URL which will be downloaded and run by
tenv
.Tested using emulators from
Gitlab CI
-https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/jobs/1839236800/artifacts/raw/core/build/unix/trezor-emu-core
https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/jobs/1839236825/artifacts/raw/legacy/firmware/trezor.elf