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
Need a mechanism to determine build's state (based on the build ID) (… #1360
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1360 +/- ##
==========================================
- Coverage 51.06% 49.46% -1.61%
==========================================
Files 50 51 +1
Lines 2622 2800 +178
==========================================
+ Hits 1339 1385 +46
- Misses 1283 1415 +132
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
3a97cd6
to
70a9ae2
Compare
@karolh2000 did you notice the clippy error on GhA? https://github.com/pyrsia/pyrsia/actions/runs/3605219431/jobs/6075385186#step:6:1213 |
@erwin1 I think clippy 1.65 is broken and it "panics" and fails when it builds the sources (logs below). It works fine with CLIPPY 1.67 (FAILS)
CLIPPY 1.67 nightly (SUCCESSFUL, the warnings are not related to the PR/changes)
|
70a9ae2
to
66531bf
Compare
PR to disable the clippy warnings: #1378 |
66531bf
to
f3f2847
Compare
👋 Hi, @karolh2000, I detected conflicts against the base branch. You'll want to sync 🔄 your branch with upstream! |
f3f2847
to
e129586
Compare
All issues and conflicts resolved, please take a look @tiainen @jperedadnr, thanks! |
I've tested the functionality and it all seems to work fine. I got the correct response both when asking the build status from an authorized node and a regular node. I only have one remark: wouldn't it be nice to also propagate the error message back to the client in case of a failure? Currently, the actual error is ignored: https://github.com/pyrsia/pyrsia/pull/1360/files#diff-459f5dc9cbc7765c794b21667a5ccea2a16aa313e7f99a0ed035756d62a6086fR267 |
@tiainen Makes sense, will take a look and improve the failure error handling, thanks. |
@tiainen The suggested changes implemented, the string contains the BuildStatus::Failure message. |
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.
Great. It's a nice real-time status check.
tested and works nicely. one additional improvement (for a new issue) could be the option to chose for processing friendly output from the CLI, so one can more easily get the build ID. As a side note: I had a bug in the config edit that is now fixed on main. Maybe you should update and let the tests run again before merging. |
…enhancement #1254)
Description
This issues implements a new feature described in #1254, The idea is that users can check the status of the requested build.
New feature added to track the requested build state, from the user perspective the following CLI commands were added:
pyrsia build status --id <BUILD ID>
Few examples of returned messages:
Build status for 'b024a136-9021-42a1-b8de-c665c94470f4' is 'RUNNING'
Build status for 'b024a136-9021-42a1-b8de-c665c94470f4' is 'SUCCESS'
Build status for 'f1548c9a-f2ee-46b9-8993-eed0a8e5c239' is 'FAILED'
When the build ID is not found or expired:
Build status for 'b024a136-9021-42a1-b8de-c665c94470f4' was not found. Additional info related to the build might be available via 'pyrsia inspect-log' command.
The code follows patterns and style of other similar features including the "build request/start". It reuses the already existing API but also adds functionality to the CLI, build service, network and node API. New unit tests added also there is a pending integration test PR: pyrsia/pyrsia-integration-tests#18
Fixes pyrsia/pyrsia#
The new feature is described here: #1254
This PR is a first step towards a more useful "build status" feature. Eventually, we should be able to add functionality which fetches the build logs and more. It should be relatively easy to add it based on this PR as long as the pipeline/build service supports it (provides API to get the build logs, etc).
PR Checklist
Code Contributions
cargo build --all-targets
successfully.cargo test --workspace
and everything passes.