Skip to content

Commit

Permalink
fix: Added more debug statements for 'gofer run'
Browse files Browse the repository at this point in the history
Fleshing out some better error messages for the
'gofer run' command and other small messages
  • Loading branch information
clintjedwards committed Dec 28, 2024
1 parent e2a723e commit 6e84382
Show file tree
Hide file tree
Showing 10 changed files with 154 additions and 149 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ run:

run-backend:
> cd gofer
> export GOFER_WEB_API__LOG_LEVEL=debug
> export GOFER_WEB_API__LOG_LEVEL=trace
> cargo run --bin gofer -- service start

## build-release: build Gofer for release.
Expand Down Expand Up @@ -92,7 +92,6 @@ run-hurl-tests:
> echo "--------------------------------"
> hurl --color --test *.hurl --variable secret=$$SECRET --error-format long


## cleanup-integration-tests: Clean up the background gofer process.
cleanup-integration-tests:
> @pkill -9 gofer
Expand Down
15 changes: 14 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,21 @@ thought into this feature that it can become a game changer for Gofer as a whole

# Small things I want to keep track of that I definitely need to do.

* When the user asks for a log and there is no log, we should say so.
* There is a bug for only run-tests for some reason.
2024-12-28T10:41:53.458112Z TRACE new event id="01940cdb-b731-7d60-a3e6-c23922f1d76d" kind=started_run emitted=1735382513457
2024-12-28T10:41:53.562772Z TRACE new event id="01940cdb-b79a-7662-85b3-f0eec44a19cb" kind=completed_task_execution emitted=1735382513562
* When creating the container name, we used to lean on the fact that the names for things used underscore, now
we use hypens, we should up the container name generation to match.
* When the user tries to get a run and the status if failed, we should automaticallly print the failed reasonings and
then tell the user how to go about finding more information.
* For the up command it should grab the current size of the terminal and then truncate the output, instead of having a hard
truncate like it does now.
* The UX for writing the pipelines needs more work. It should feel natural to write in commands like they're written in a bash script.
* We should also just pretty-print the json by default so people can take a look at it.
* Think about a `context` command that allows users to examine the current settings for their CLI. This is helpful
when double checking what environment you're working within.
when double checking what environment you're working within. The context command could also dump the server's systeminfo.
Maybe make that under a --full?
* When you insert a new pipeline it should show you a diff on what you're changing.
* We need to productionalize and offer the container that builds repo containers. The test for this is build_repo_container
directory. Think more about how the UX should be handled here.
Expand Down
2 changes: 1 addition & 1 deletion dogfood/run_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
gofer_sdk = { git = "https://github.com/clintjedwards/gofer", tag = "v0.8.2" }
gofer_sdk = { git = "https://github.com/clintjedwards/gofer", tag = "v0.8.3" }
4 changes: 2 additions & 2 deletions dogfood/run_tests/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use gofer_sdk::config::{Pipeline, Task};

fn main() {
Pipeline::new("run_tests", "Run Project Tests")
Pipeline::new("run-tests", "Run Project Tests")
.description("Runs all cargo tests for the overall Gofer workspace.")
.tasks(vec![Task::new(
"run_cargo_test",
"run-cargo-test",
"ghcr.io/clintjedwards/gofer-repo:latest",
)
.description("Run cargo test command for workspace")
Expand Down
Loading

0 comments on commit 6e84382

Please sign in to comment.