Skip to content

Commit

Permalink
Add to CHANGELOG, correct formatting for mermaid (needs "o" hack)
Browse files Browse the repository at this point in the history
  • Loading branch information
plocket committed Nov 20, 2024
1 parent d0bd5af commit 2fb1aaa
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 37 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Format:
### Fixed

- Detects failed sign in. Closes [#918](https://github.com/SuffolkLITLab/ALKiln/issues/918).
- Fixes undefined `errors` var in `After()`
- Closes [#924](https://github.com/SuffolkLITLab/ALKiln/issues/924), remove extra interview url print

### Internal

Expand All @@ -62,6 +64,10 @@ Format:
- Adds decision docs
- Updated CONTRIBUTING.md
- Added example.env, closes [#374](https://github.com/SuffolkLITLab/ALKiln/issues/374)
- Closes [#805](https://github.com/SuffolkLITLab/ALKiln/issues/805), create verbose-type log
- Closes [#659](https://github.com/SuffolkLITLab/ALKiln/issues/659), abstract adding to debug_log
- Closes [#925](https://github.com/SuffolkLITLab/ALKiln/issues/925), allow a `Log` to throw an error
- Addresses [#461](https://github.com/SuffolkLITLab/ALKiln/issues/461), setup and takedown reports

## [5.13.0] - 2024-07-11

Expand Down
74 changes: 37 additions & 37 deletions docs/artifacts_folder_name.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,29 @@ The diagrams highlight `Log` to help visualize a common point in all the flows.
3. GitHub action creates the folder name, passes that same name to `takedown`, which passes that same name when instantiating its `Log`. The takedown `Log` uses the name to store logs in the folder.

```mermaid
%% "pass name too" has 2 o's at the end because mermaid makes one of them disappear
flowchart LR
action[action part 1] -- create/pass name to --> setup
setup["setup"] -- pass name to --> log1["#96;Log#96;"]:::log
log1 -- store name in/ignore --> runtime1["runtime config file"]
log1 -- create with name --> folder1[folder]
action2[action part 2] -- pass name to --> run["run"]
run -- pass name to --> log2["#96;Log#96;"]:::log
log2 -- store name in/ignore --> runtime2["runtime config file"]
log2 -- use with name --> folder2[folder]
action[action part 1] --create/pass name too--> setup
setup["setup"] --pass name too--> log1["#96;Log#96;"]:::log
log1 --store name in/ignore--> runtime1["runtime config file"]
log1 --create with name--> folder1[folder]
action2[action part 2] --pass name too--> run["run"]
run --pass name too--> log2["#96;Log#96;"]:::log
log2 --store name in/ignore--> runtime2["runtime config file"]
log2 --use with name--> folder2[folder]
run --> core["core code"]
core -- pass name to --> log3["#96;Log#96;"]:::log
core -- use with name --> folder2
core -- get name from <--> runtime2
log3 -- use with name --> folder2
log3 -- store name in/ignore --> runtime2
action3[action part 3] -- pass name to --> takedown["takedown"]
takedown -- pass name to --> log4["#96;Log#96;"]:::log
log4 -- reader ignore/chart formatting hack --> takedown
log4 -- store name in/ignore --> runtime3["runtime config file"]
log4 -- create with name --> folder5[folder]
core --pass name too--> log3["#96;Log#96;"]:::log
core --use with name--> folder2
core --get name from--> runtime2
log3 --use with name--> folder2
log3 --store name in/ignore--> runtime2
action3[action part 3] --pass name too--> takedown["takedown"]
takedown --pass name too--> log4["#96;Log#96;"]:::log
log4 --store name in/ignore--> runtime3["runtime config file"]
log4 --create with name--> folder5[folder]
classDef log fill:#d6fd88,stroke:#000,stroke-width:2px,color:#000
```
Expand All @@ -82,14 +83,14 @@ classDef log fill:#d6fd88,stroke:#000,stroke-width:2px,color:#000
flowchart LR
ALKilnInThePlayground --> run["run"]
run --> log2["#96;Log#96;"]:::log
log2 -- store name in/ignore --> runtime2["runtime config file"]
log2 -- create with name --> folder2[folder]
log2 --store name in/ignore--> runtime2["runtime config file"]
log2 --create with name--> folder2[folder]
run --> core["core code"]
core --> log3["#96;Log#96;"]:::log
core -- use with name --> folder2
core -- get name from <--> runtime2
log3 -- use with name --> folder2
log3 -- store name in/ignore --> runtime2
core --use with name--> folder2
core --get name from--> runtime2
log3 --use with name--> folder2
log3 --store name in/ignore--> runtime2
classDef log fill:#d6fd88,stroke:#000,stroke-width:2px,color:#000
```
Expand All @@ -104,25 +105,24 @@ classDef log fill:#d6fd88,stroke:#000,stroke-width:2px,color:#000
flowchart LR
cmd1[command line] --> setup
setup["setup"] --> log1["#96;Log#96;"]:::log
log1 -- store name in/ignore --> runtime1["runtime config file"]
log1 -- create with/use with name --> folder1[folder]
log1 --store name in/ignore--> runtime1["runtime config file"]
log1 --create with/use with name--> folder1[folder]
cmd2[command line] --> run["run"]
run --> log2["#96;Log#96;"]:::log
log2 -- store name in/ignore --> runtime2["runtime config file"]
log2 -- create with name --> folder2[folder]
log2 --store name in/ignore--> runtime2["runtime config file"]
log2 --create with name--> folder2[folder]
run --> core["core code"]
core --> log3["#96;Log#96;"]:::log
core -- use with name --> folder2
core -- get name from <--> runtime2
log3 -- use with name --> folder2
log3 -- store name in/ignore --> runtime2
core --use with name--> folder2
core --get name from--> runtime2
log3 --use with name--> folder2
log3 --store name in/ignore--> runtime2
cmd3[command line] --> takedown["takedown"]
takedown --> log4["#96;Log#96;"]:::log
log4 -- reader ignore/chart formatting hack --> takedown
log4 -- store name in/ignore --> runtime3["runtime config file"]
log4 -- create with name --> folder5[folder]
log4 --store name in/ignore--> runtime3["runtime config file"]
log4 --create with name--> folder5[folder]
classDef log fill:#d6fd88,stroke:#000,stroke-width:2px,color:#000
```
Expand Down
10 changes: 10 additions & 0 deletions lib/utils/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,14 @@ class Log {
* (new Error()).stack; } and https://stackoverflow.com/a/41820537/14144258
* var mystring=require("util").inspect(error_object);
*
* Flow:
* get metadata
* get formatted logs as string (maybe with error)
* combine those
* save those to debug log
* maybe save those to unexpected results log
* return the formatted string
*
* @example
* log.debug()
* // 🐛 ALK000d DEBUG [2024-08-16 00:38:49UTC]:
Expand Down Expand Up @@ -323,6 +331,8 @@ class Log {
let logging_errors_msgs = [];
try {

// Use `with_error` to include the error in the debug and unexpected
// results logs
let with_error = this._combine_logs_and_possible_error({
logs, maybe_error: error, do_throw,
});
Expand Down

0 comments on commit 2fb1aaa

Please sign in to comment.