Skip to content
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

Update the logging interface #198

Merged
merged 80 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
1024fa3
WIP
Malax Aug 10, 2023
32b3bdb
Threaded printing with internal writer passing works
schneems Aug 16, 2023
4b3da91
WIP scoped thread experiment
schneems Aug 16, 2023
93aad71
WIP non-scopped-background logger
schneems Aug 16, 2023
b958e79
Implement Stop timer on drop
schneems Aug 17, 2023
83f7373
WIP cannot get data back out
schneems Aug 17, 2023
5128e1c
Introduce BuildLog
schneems Aug 17, 2023
8b6b0d6
Cleanup
schneems Aug 17, 2023
1cdce80
Test using memory instead of files
schneems Aug 18, 2023
700caa0
Expose streaming io in BuildLog
schneems Aug 21, 2023
eaa6f60
Fun run interfaces
schneems Aug 21, 2023
3d91951
Introduce CommandWithName trait
schneems Aug 22, 2023
7fc8b08
Expose output interface
schneems Aug 22, 2023
0d43b19
WIP layer logging
schneems Aug 22, 2023
bb8ffc0
Debuggable logger
schneems Aug 23, 2023
bec7d0a
WIP Layer logging without lifetime
schneems Aug 23, 2023
4b1680b
Layer logger cleaned up
schneems Aug 23, 2023
4b90209
Bundle download layer moved to new output interface
schneems Aug 23, 2023
9db0281
Bundle install layer moved to new output interface
schneems Aug 23, 2023
02751a1
Gem list and default processesmoved to new output interface
schneems Aug 23, 2023
5e86112
Take tasks logging moved to new output interface
schneems Aug 23, 2023
4adc1dd
Delete old build logging module
schneems Aug 23, 2023
0b050b2
Match error text to prior work
schneems Aug 24, 2023
46868c4
Address clippy complaints and move LayerLogger
schneems Aug 24, 2023
1689a4b
Preserve long command for debugging
schneems Aug 25, 2023
663adc8
Add `ls -la` diagnostics to missing Gemfile.lock
schneems Aug 25, 2023
d22ab4a
Align multiline step and section contents
schneems Aug 25, 2023
b7a1dcb
Fix outstanding error formatting TODOs
schneems Aug 25, 2023
bea1c25
Introduce living style guide
schneems Aug 25, 2023
fd6add4
Handle control characters when indenting with a prefix
schneems Aug 25, 2023
d2e0cea
Make SectionLogger.step chainable
schneems Aug 25, 2023
1cbba84
Clippy
schneems Aug 28, 2023
a6ac403
Expose function only section logging interface
schneems Aug 28, 2023
c8b77b5
Remove LayerLogger in favor of section_log mod
schneems Aug 28, 2023
b712ff6
Inject metadata for all layers
schneems Aug 28, 2023
a9a70af
Print style guide on CI runs
schneems Aug 29, 2023
4b6e8b0
Clippy, CI, and CHANGELOG
schneems Aug 29, 2023
3959c48
Clean up module visibility
schneems Aug 29, 2023
cd34e52
Move panic into tested unit code path
schneems Aug 29, 2023
b0a93be
Introduce fat::HELP and fat::DEBUG_INFO constants
schneems Aug 29, 2023
d37e549
Add docs and rearrange code
schneems Aug 29, 2023
061af1d
Reduce timing effects from tests
schneems Aug 30, 2023
154be44
Clippy
schneems Aug 30, 2023
0dcab5a
Docs
schneems Aug 30, 2023
a156403
Remove panic when joining logger
schneems Aug 30, 2023
e3eb83b
Allow wildcard imports to bring in interface
schneems Aug 30, 2023
8724e73
Move output::log to output::build_log
schneems Aug 30, 2023
7da4e7f
Test dropping StopJoinGuard stops background logging
schneems Aug 30, 2023
1562d21
Failing test for desired warning formatting
schneems Aug 30, 2023
4d15725
Fix warning/important/error formatting using trait
schneems Aug 30, 2023
b56b750
Refactor data inside of BuildLog
schneems Aug 30, 2023
080aaf4
Add delayed warnings for buildpack authors
schneems Aug 31, 2023
e1cc7cf
Warn later with thread locals
schneems Sep 3, 2023
5e6f977
Allow ReadYourWrite to be cloneable
schneems Sep 5, 2023
e7d203d
Refactor ReadYourWrite to return a Reader struct
schneems Sep 5, 2023
4e613e3
Fix warn later extra whitespace
schneems Sep 5, 2023
8a9c5e5
Fix CI.yml format
schneems Sep 5, 2023
f6c1cae
Fix CI section naming
schneems Sep 5, 2023
9726acf
Update rust cache
schneems Oct 30, 2023
98c410e
Failing warn_later test
schneems Sep 5, 2023
cd105e0
Fix function name
schneems Sep 5, 2023
4cbec7f
Fix command output in style guide
schneems Sep 5, 2023
81cc051
Fix failing warn_later_doesnt_output_newline test
schneems Sep 5, 2023
166974a
Refactor output Announcement interface
schneems Sep 6, 2023
dcbb829
Better default errors in fun_run commands
schneems Sep 19, 2023
a937fff
Update metrics buildpack to use new build output
schneems Sep 26, 2023
d2834db
Clean up
schneems Sep 21, 2023
8766545
Clean up retry logic
schneems Oct 3, 2023
13736a7
Rust 1.73.0 clippy updates
schneems Oct 6, 2023
9351830
Do not stream `bundle exec rake -P` output or `bundle list`
schneems Oct 6, 2023
5109be8
Update build output
schneems Oct 6, 2023
6d16451
Re-run build to demonstrate cached output
schneems Oct 9, 2023
b5245dc
Reduce gem install bundler output
schneems Oct 9, 2023
14e412e
Include error details on framework error
schneems Oct 10, 2023
c3909b3
Apply suggestions from code review
schneems Oct 11, 2023
2116bc2
Update commons/Cargo.toml
schneems Oct 11, 2023
362a9c4
Remove unneeded use newlines and wildcard imports
schneems Oct 11, 2023
de09250
Fix spelling
schneems Oct 13, 2023
ae799db
Format the barnes gem name
schneems Oct 13, 2023
b3ccd76
Implement commented out "help" output
schneems Oct 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests).
run: cargo test --locked -- --ignored

pack-getting-started-output:
print-pack-getting-started-output:
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand All @@ -84,6 +84,28 @@ jobs:
run: cargo install libcnb-cargo
- name: Compile ruby buildpack
run: cargo libcnb package
- name: Getting started guide output
- name: "PRINT: Getting started guide output"
run: | # Use `script -e -c` to pretend to be a TTY for pack terminal color support
script -e -c "pack build my-image --builder heroku/builder:22 --buildpack heroku/nodejs-engine --buildpack packaged/x86_64-unknown-linux-musl/debug/heroku_ruby --path tmp/ruby-getting-started --pull-policy never"
- name: "PRINT: Cached getting started guide output"
run: | # Use `script -e -c` to pretend to be a TTY for pack terminal color support
script -e -c "pack build my-image --builder heroku/builder:22 --buildpack heroku/nodejs-engine --buildpack packaged/x86_64-unknown-linux-musl/debug/heroku_ruby --path tmp/ruby-getting-started --pull-policy never"

print-style-guide:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install musl-tools
run: sudo apt-get install musl-tools --no-install-recommends
- name: Update Rust toolchain
run: rustup update
- name: Install Rust linux-musl target
run: rustup target add x86_64-unknown-linux-musl
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Build binary
run: cargo build --bin print_style_guide
- name: "PRINT: Style guide"
run: | # Use `script -e -c` to pretend to be a TTY for pack terminal color support
script -e -c "cargo run --bin print_style_guide"
Loading