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
Create stronger run log cache abstraction #8931
Conversation
pkg/cmd/run/view/view.go
Outdated
|
||
func (c rlc) Create(key string, content io.Reader) error { | ||
out, err := os.Create(c.filepath(key)) | ||
if err != nil { | ||
return fmt.Errorf("could not create cache: %w", err) | ||
return fmt.Errorf("creating cache entry: %v", err) | ||
} | ||
defer out.Close() |
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.
Is os.MkdirAll
not needed anymore?
Since the cache directory path can change, it seems like we'd still want to make sure it exists before creating the run log cache, right?
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.
Yeh that's a fair point. Initially I thought that something would always create this earlier, but that in fact may not be true. I'll make sure to put this back.
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.
Added it back, thanks!
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.
Though I'm actually not sure what the permissions should be here now 🤔 It kind of depends where it is, which makes me think we're missing an abstraction.
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.
So, this is a whole topic as https://groups.google.com/g/golang-dev/c/TXlDtwxaTcM?pli=1 highlights as different operating systems behave different like umask ... 🤔
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.
Specifically, if it lands in /tmp/gh-cli-cache
then this is a shared dir that needs to be world writable. If it lands in $HOMEDIR/.cache/gh
then it should only be writeable by the user. In the first case it could be /tmp/gh-cli-cache-$USER
but I don't know if that's safe in all cases.
return fmt.Errorf("could not create cache: %w", err) | ||
|
||
func (c RunLogCache) Create(key string, content io.Reader) error { | ||
if err := os.MkdirAll(filepath.Dir(c.cacheDir), 0755); err != nil { |
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.
If we want to change the permissions used when a directory is created, let's make that a follow up issue as I imagine it is complicated as some users might be using gh
across multiple users and want it more permissive versus more security minded folks wanting this more restrictive (0700
)
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.
It's also probably not the end of the world to have 0755
because the directories above it will not be listable if they are configured correctly.
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.
lgtm
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [aquaproj/aqua-registry](https://togithub.com/aquaproj/aqua-registry) | minor | `v4.160.0` -> `v4.163.0` | | [cli/cli](https://togithub.com/cli/cli) | minor | `v2.47.0` -> `v2.48.0` | | [eza-community/eza](https://togithub.com/eza-community/eza) | patch | `v0.18.10` -> `v0.18.11` | | [gruntwork-io/terragrunt](https://togithub.com/gruntwork-io/terragrunt) | minor | `v0.56.5` -> `v0.57.5` | | [junegunn/fzf](https://togithub.com/junegunn/fzf) | minor | `0.49.0` -> `0.50.0` | | [kubernetes/kubectl](https://togithub.com/kubernetes/kubectl) | minor | `1.29.3` -> `1.30.0` | | [snyk/cli](https://togithub.com/snyk/cli) | minor | `v1.1288.0` -> `v1.1290.0` | | [twpayne/chezmoi](https://togithub.com/twpayne/chezmoi) | patch | `v2.47.3` -> `v2.47.4` | | [zellij-org/zellij](https://togithub.com/zellij-org/zellij) | minor | `v0.39.2` -> `v0.40.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>aquaproj/aqua-registry (aquaproj/aqua-registry)</summary> ### [`v4.163.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.163.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.162.0...v4.163.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.163.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.163.0) | aquaproj/aqua-registry@v4.162.0...v4.163.0 ##### 🎉 New Packages [#​21951](https://togithub.com/aquaproj/aqua-registry/issues/21951) [gittuf/gittuf](https://togithub.com/gittuf/gittuf): A security layer for Git repositories [#​21955](https://togithub.com/aquaproj/aqua-registry/issues/21955) [pipe-cd/pipecd/pipectl](https://pipecd.dev/docs-v0.47.x/user-guide/command-line-tool/): The command line tool for PipeCD [@​ponkio-o](https://togithub.com/ponkio-o) [#​21955](https://togithub.com/aquaproj/aqua-registry/issues/21955) [pipe-cd/pipecd/piped](https://pipecd.dev/docs-v0.47.x/concepts/#piped): A component of PipeCD that runs inside target environment to execute deployment and report its state [@​ponkio-o](https://togithub.com/ponkio-o) [#​21957](https://togithub.com/aquaproj/aqua-registry/issues/21957) [mashiike/redshift-credentials](https://togithub.com/mashiike/redshift-credentials): a command line tool for Amazon Redshift temporary authorization with AWS IAM [@​mashiike](https://togithub.com/mashiike) ##### 🎉 New Contributors Thank you for your contribution! [@​mashiike](https://togithub.com/mashiike) [#​21957](https://togithub.com/aquaproj/aqua-registry/issues/21957) ### [`v4.162.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.162.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.161.0...v4.162.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.162.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.162.0) | aquaproj/aqua-registry@v4.161.0...v4.162.0 ##### 🎉 New Packages [#​21900](https://togithub.com/aquaproj/aqua-registry/issues/21900) [kubecolor/kubecolor](https://togithub.com/kubecolor/kubecolor): Colorize your kubectl output ##### Fixes [#​21903](https://togithub.com/aquaproj/aqua-registry/issues/21903) charmbracelet/vhs: Follow up changes of vhs v0.7.2 [#​21902](https://togithub.com/aquaproj/aqua-registry/issues/21902) extrawurst/gitui: Follow up changes of gitui v0.26.1 [#​21892](https://togithub.com/aquaproj/aqua-registry/issues/21892) mjibson/sqlfmt: Rename the package to maddyblue/sqlfmt [#​21846](https://togithub.com/aquaproj/aqua-registry/issues/21846) vmware/govmomi/govc: Regenerate the setting ### [`v4.161.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.161.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.160.0...v4.161.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.161.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.161.0) | aquaproj/aqua-registry@v4.160.0...v4.161.0 ##### 🎉 New Packages [#​21832](https://togithub.com/aquaproj/aqua-registry/issues/21832) [tgenv/tgenv](https://togithub.com/tgenv/tgenv): A tool to manage multiples Terragrunt versions [@​bhundven](https://togithub.com/bhundven) ##### Fixes [#​21834](https://togithub.com/aquaproj/aqua-registry/issues/21834) mashiike/prepalert: Follow up changes of prepalert v1.0.2 A checksum file was renamed. mashiike/prepalert@493b8ae ##### 🎉 New Contributors Thank you for your contribution! [@​bhundven](https://togithub.com/bhundven) [#​21832](https://togithub.com/aquaproj/aqua-registry/issues/21832) </details> <details> <summary>cli/cli (cli/cli)</summary> ### [`v2.48.0`](https://togithub.com/cli/cli/releases/tag/v2.48.0): GitHub CLI 2.48.0 [Compare Source](https://togithub.com/cli/cli/compare/v2.47.0...v2.48.0) #### The Big Stuff - Added support for `--slurp`ing JSON responses in `gh api` by [@​heaths](https://togithub.com/heaths) in [cli/cli#8620 - Added `--skip-ssh-key` option to `gh auth login` command by [@​babakks](https://togithub.com/babakks) in [cli/cli#8935 - Added `numSelectedRepos` to JSON output of `gh secret list` by [@​babakks](https://togithub.com/babakks) in [cli/cli#8899 - Added support for multiple items in `gh api` nested array by [@​Ebonsignori](https://togithub.com/Ebonsignori) in [cli/cli#8762 - Fixed panic when running `gh repo rename` by [@​babakks](https://togithub.com/babakks) in [cli/cli#8906 - Fixed panic when parsing IPv6 remote URLs by [@​babakks](https://togithub.com/babakks) in [cli/cli#8893 - Fixed `gh pr lock/unlock` not working when URL is passed by [@​t4kamura](https://togithub.com/t4kamura) in [cli/cli#8837 - Fixed viewing run logs with filenames that the regex didn't handle [@​zdrve](https://togithub.com/zdrve) in [cli/cli#8882 #### The Rest - Tidy `go.mod` by [@​matthewhughes934](https://togithub.com/matthewhughes934) in [cli/cli#8958 - Fix cache contention in Go CI jobs by [@​matthewhughes934](https://togithub.com/matthewhughes934) in [cli/cli#8957 - Fix `go` directive in `go.mod` by [@​matthewhughes934](https://togithub.com/matthewhughes934) in [cli/cli#8956 - Update install_linux.md by [@​richterdavid](https://togithub.com/richterdavid) in [cli/cli#8950 - build(deps): bump google.golang.org/grpc from 1.61.1 to 1.61.2 by [@​dependabot](https://togithub.com/dependabot) in [cli/cli#8925 - Add codeowners entry for the GitHub TUF root included in the `attestation` command set by [@​malancas](https://togithub.com/malancas) in [cli/cli#8919 - Create stronger run log cache abstraction by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8931 - Remove naked returns from git ParseURL by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8929 - Fix api cache test by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8932 - Ensure run log cache creates cache dir if it doesn't exist by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8944 - Close zip file in run view tests by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8945 - Fix `attestation` cmd offline unit test failure by [@​malancas](https://togithub.com/malancas) in [cli/cli#8933 - Add support to `attestation` command for more predicate types. by [@​steiza](https://togithub.com/steiza) in [cli/cli#8949 #### New Contributors - [@​babakks](https://togithub.com/babakks) made their first contribution in [cli/cli#8906 - [@​t4kamura](https://togithub.com/t4kamura) made their first contribution in [cli/cli#8837 - [@​zdrve](https://togithub.com/zdrve) made their first contribution in [cli/cli#8882 - [@​Ebonsignori](https://togithub.com/Ebonsignori) made their first contribution in [cli/cli#8762 - [@​matthewhughes934](https://togithub.com/matthewhughes934) made their first contribution in [cli/cli#8958 - [@​richterdavid](https://togithub.com/richterdavid) made their first contribution in [cli/cli#8950 **Full Changelog**: cli/cli@v2.47.0...v2.48.0 </details> <details> <summary>eza-community/eza (eza-community/eza)</summary> ### [`v0.18.11`](https://togithub.com/eza-community/eza/releases/tag/v0.18.11): eza v0.18.11 [Compare Source](https://togithub.com/eza-community/eza/compare/v0.18.10...v0.18.11) ### Note to BSD users We recently added support for freebsd, netbsd, and openbsd. However, we don't seem to have any regular contributors that use these platforms. Last week, that meant netbsd build being broken (which was later fixed), this week, it means freebsd is. If you're a user of any of these, and wanna help us support these platforms, please consider joining our matrix rooms and introduce yourself. ### Changelog #### \[0.18.11] - 2024-04-19 ##### Bug Fixes - Fix clippy lints - Enable the rule only for NetBSD. - Build aarch64, arm without libgit2 ##### Miscellaneous Tasks - Release eza v0.18.11 ##### Ci - Bump NetBSD version to 10.0 ### Checksums #### sha256sum 0ca2fdbfde90eb209e0e79b26052ed0087f89ab7c4f7a28b7ef28425ac9c2cc5 ./target/bin-0.18.11/eza_aarch64-unknown-linux-gnu.tar.gz 53e98fd2fece242206b9b82141c0c8f3d1a1d681aa0be1ce504353ef1e7f9d9e ./target/bin-0.18.11/eza_aarch64-unknown-linux-gnu.zip 312b8424ddd4839f9fd1afbb8d47ab2da5e60d6aa1eef0336d7b5a23cb0f467a ./target/bin-0.18.11/eza_arm-unknown-linux-gnueabihf.tar.gz 3f2387b2d7a5a51d4a592a0ba5e22dcb4181be11ca18964945d00990f9e67f33 ./target/bin-0.18.11/eza_arm-unknown-linux-gnueabihf.zip 5f89f4b3a2ac8c5072c9fdbb928546768a67ab1f7ca1de61d25920d9c08eab9e ./target/bin-0.18.11/eza.exe_x86_64-pc-windows-gnu.tar.gz deb6484d38f5080feb152fb6d6b39fef7e198784fa43abc362160ee4b64a8f0e ./target/bin-0.18.11/eza.exe_x86_64-pc-windows-gnu.zip 223e0b5e1708e83304a4143f6ad18411177f8e377afbf62d7c12f34a24d5e2b9 ./target/bin-0.18.11/eza_x86_64-unknown-linux-gnu.tar.gz 49b3e7efb0f35e209324c46eb680c47613fad3de3caf4c039323068a2624d70f ./target/bin-0.18.11/eza_x86_64-unknown-linux-gnu.zip 76897bfeb00e17dffb9d4bc0a72351568461eeccbcb4b490fa1dab7a7941528a ./target/bin-0.18.11/eza_x86_64-unknown-linux-musl.tar.gz eabae039a540fca6045af4689fff4e9c09e85f257eb96d3bcbd2801a15326a60 ./target/bin-0.18.11/eza_x86_64-unknown-linux-musl.zip #### md5sum ae10158f7ecc52140fb7ab24d67951e5 ./target/bin-0.18.11/eza_aarch64-unknown-linux-gnu.tar.gz dd1de5d7a97010c748f19b242fedc2e0 ./target/bin-0.18.11/eza_aarch64-unknown-linux-gnu.zip d699373bf1effa3c2b1dcfa8ffc44a3f ./target/bin-0.18.11/eza_arm-unknown-linux-gnueabihf.tar.gz fdaa9668edfda38d15352da3253d85f8 ./target/bin-0.18.11/eza_arm-unknown-linux-gnueabihf.zip a0ba17f03a48d0f2e38f2737732f11d1 ./target/bin-0.18.11/eza.exe_x86_64-pc-windows-gnu.tar.gz 579b7dbe9cde99cf19c81cce23f47cf7 ./target/bin-0.18.11/eza.exe_x86_64-pc-windows-gnu.zip c5cf74787ecd87fcca8e2769d9b21863 ./target/bin-0.18.11/eza_x86_64-unknown-linux-gnu.tar.gz 222ed71159ce5bc7dc05d91e08488779 ./target/bin-0.18.11/eza_x86_64-unknown-linux-gnu.zip 08953f7054472626a374a542b5707f77 ./target/bin-0.18.11/eza_x86_64-unknown-linux-musl.tar.gz 48c7391f0c9ebe327dc86ba36b02fa98 ./target/bin-0.18.11/eza_x86_64-unknown-linux-musl.zip #### blake3sum 1c4895bc928b452a3caaeaaab72c478c255ab745c525ed4c548e8503528112ef ./target/bin-0.18.11/eza_aarch64-unknown-linux-gnu.tar.gz 935bbe1a941f1c31a21b07df35ed3aa0cc87ff5ffbcf265c42d0478edb2170f8 ./target/bin-0.18.11/eza_aarch64-unknown-linux-gnu.zip b73aa561cd9fd8eb777e437a1da6404a3f2e0a75b7c922ea2135957763e0f514 ./target/bin-0.18.11/eza_arm-unknown-linux-gnueabihf.tar.gz 4b6a6bf403aac22a3af8223b5df0c4fab72ade869fa41efe96b77e74df0c42db ./target/bin-0.18.11/eza_arm-unknown-linux-gnueabihf.zip 39eddfe74eeab4600c983586f51e8d219d83cbe3aa7da6a1398db04b5d2c9ad3 ./target/bin-0.18.11/eza.exe_x86_64-pc-windows-gnu.tar.gz 782b660d795f19012fa62e85e9a6bbc3a85982f83ff8561d859ae48609ee36e7 ./target/bin-0.18.11/eza.exe_x86_64-pc-windows-gnu.zip 9962259ad1b89640a7c3b74c9064e332c2af7b27e8656586c8ac8edaa9879d18 ./target/bin-0.18.11/eza_x86_64-unknown-linux-gnu.tar.gz 251c7d928cd7e6671a60bbdbf92204738fb16849626c9b51bf3f8fd951fdfb4b ./target/bin-0.18.11/eza_x86_64-unknown-linux-gnu.zip c109a4d7bd426571e0ff88c40426f5d8c80b5cb9964376fda5a3184abed6a1cc ./target/bin-0.18.11/eza_x86_64-unknown-linux-musl.tar.gz 7a86aeecd2e39b680c01d142480c0af90d7f6dc60fabc8c63f705f87e72041e5 ./target/bin-0.18.11/eza_x86_64-unknown-linux-musl.zip </details> <details> <summary>gruntwork-io/terragrunt (gruntwork-io/terragrunt)</summary> ### [`v0.57.5`](https://togithub.com/gruntwork-io/terragrunt/releases/tag/v0.57.5) [Compare Source](https://togithub.com/gruntwork-io/terragrunt/compare/v0.57.4...v0.57.5) #### Description - Bump `golang.org/x/net` from 0.19.0 to 0.23.0 #### Related links - [gruntwork-io/terragrunt#3072 ### [`v0.57.4`](https://togithub.com/gruntwork-io/terragrunt/releases/tag/v0.57.4) [Compare Source](https://togithub.com/gruntwork-io/terragrunt/compare/v0.57.3...v0.57.4) #### Updated CLI args, config attributes and blocks - `run-all` - `--terragrunt-out-dir` #### Description - Added `--terragrunt-out-dir` CLI argument to use Terraform plan in `run-all` commands from a specific directory. #### Related links - [gruntwork-io/terragrunt#3073 ### [`v0.57.3`](https://togithub.com/gruntwork-io/terragrunt/releases/tag/v0.57.3) [Compare Source](https://togithub.com/gruntwork-io/terragrunt/compare/v0.57.2...v0.57.3) #### Description - Fixed getting output from multiple nested dependencies #### Related links - [gruntwork-io/terragrunt#3071 ### [`v0.57.2`](https://togithub.com/gruntwork-io/terragrunt/releases/tag/v0.57.2) [Compare Source](https://togithub.com/gruntwork-io/terragrunt/compare/v0.57.1...v0.57.2) #### Updated CLI args, config attributes and blocks - `--terragrunt-json-log` - `--terragrunt-tf-logs-to-json` #### Description - Fixed handling of dependency outputs when JSON log format is enabled #### Related links - [gruntwork-io/terragrunt#3049 ### [`v0.57.1`](https://togithub.com/gruntwork-io/terragrunt/releases/tag/v0.57.1) [Compare Source](https://togithub.com/gruntwork-io/terragrunt/compare/v0.57.0...v0.57.1) #### Updated CLI args, config attributes and blocks - `--terragrunt-provider-cache-dir` #### Description - Fixed module request routing with provider caching. - Fixed resolving relative provider cache dir path. #### Related links - [gruntwork-io/terragrunt#3057 ### [`v0.57.0`](https://togithub.com/gruntwork-io/terragrunt/releases/tag/v0.57.0) [Compare Source](https://togithub.com/gruntwork-io/terragrunt/compare/v0.56.5...v0.57.0) #### Description **Terraform 1.8 support**: We are now testing Terragrunt against Terraform 1.8 and is confirmed to be working. NOTE: Although this release is marked as backward incompatible, it is functionally compatible as nothing has been changed in Terragrunt internals. The minor version release is useful to mark the change in Terraform version that is being tested. #### Related links - [gruntwork-io/terragrunt#3052 </details> <details> <summary>junegunn/fzf (junegunn/fzf)</summary> ### [`v0.50.0`](https://togithub.com/junegunn/fzf/blob/HEAD/CHANGELOG.md#0500) [Compare Source](https://togithub.com/junegunn/fzf/compare/0.49.0...0.50.0) - Search performance optimization. You can observe 50%+ improvement in some scenarios. $ rg --line-number --no-heading --smart-case . > $DATA $ wc < $DATA 5520118 26862362 897487793 $ hyperfine -w 1 -L bin fzf-0.49.0,fzf-7ce6452,fzf-a5447b8,fzf '{bin} --filter "///" < $DATA | head -30' Summary fzf --filter "///" < $DATA | head -30 ran 1.16 ± 0.03 times faster than fzf-a5447b8 --filter "///" < $DATA | head -30 1.23 ± 0.03 times faster than fzf-7ce6452 --filter "///" < $DATA | head -30 1.52 ± 0.03 times faster than fzf-0.49.0 --filter "///" < $DATA | head -30 - Added `jump` and `jump-cancel` events that are triggered when leaving `jump` mode ```sh ``` </details> <details> <summary>kubernetes/kubectl (kubernetes/kubectl)</summary> ### [`v1.30.0`](https://togithub.com/kubernetes/kubectl/compare/kubernetes-1.29.4...kubernetes-1.30.0-rc.2) [Compare Source](https://togithub.com/kubernetes/kubectl/compare/kubernetes-1.29.4...kubernetes-1.30.0-rc.2) ### [`v1.29.4`](https://togithub.com/kubernetes/kubectl/compare/kubernetes-1.29.3...kubernetes-1.29.4) [Compare Source](https://togithub.com/kubernetes/kubectl/compare/kubernetes-1.29.3...kubernetes-1.29.4) </details> <details> <summary>snyk/cli (snyk/cli)</summary> ### [`v1.1290.0`](https://togithub.com/snyk/cli/releases/tag/v1.1290.0) [Compare Source](https://togithub.com/snyk/cli/compare/v1.1289.0...v1.1290.0) ##### Bug Fixes - **code:** Fix error handling for experimental go native code client ([#​5170](https://togithub.com/snyk/snyk/issues/5170)) ([5400c69](https://togithub.com/snyk/snyk/commit/5400c698a2798672e96c91dd18706c2effebc416)) ##### Features - **code:** introduce human readable formatting for experimental test mechanism ([#​5174](https://togithub.com/snyk/snyk/issues/5174)) ([34bbc95](https://togithub.com/snyk/snyk/commit/34bbc955d241d619177dcdbf5f45bf02342e2adc)) - **sbom:** Introduce experimental sbom test command ([#​5176](https://togithub.com/snyk/snyk/issues/5176)) ([ea6293b](https://togithub.com/snyk/snyk/commit/ea6293b3adabd2459bb10a0ae65f78da8cf1311d)) - snyk woof ro language support and tests ([#​5166](https://togithub.com/snyk/snyk/issues/5166)) ([ed2e754](https://togithub.com/snyk/snyk/commit/ed2e754bace7a37f10a86564d5cf662f69e58daf)) ### [`v1.1289.0`](https://togithub.com/snyk/cli/releases/tag/v1.1289.0) [Compare Source](https://togithub.com/snyk/cli/compare/v1.1288.1...v1.1289.0) ##### Bug Fixes - **ls:** Trigger re-analysis after fixing interfile issues ([#​5163](https://togithub.com/snyk/snyk/issues/5163)) ([05cb9f5](https://togithub.com/snyk/snyk/commit/05cb9f5ba9284999269368d1a0a98c8562f4badd)) ##### Features - **code:** Integrate experimental go native code client \[CLI-224] ([#​5164](https://togithub.com/snyk/snyk/issues/5164)) ([5bd898e](https://togithub.com/snyk/snyk/commit/5bd898e708dfb8caaa758debbf7d21998e9f2693)) - include additional policy properties, when provided, in plain text output ([#​5142](https://togithub.com/snyk/snyk/issues/5142)) ([a8be764](https://togithub.com/snyk/snyk/commit/a8be76486bfc17dda643d18a6fa9475744ddbd5c)) - use workflow data to determine exit code errors ([51c717b](https://togithub.com/snyk/snyk/commit/51c717b20c7eb8de1d2bca48c4d78ed530890b7c)) ### [`v1.1288.1`](https://togithub.com/snyk/cli/releases/tag/v1.1288.1) [Compare Source](https://togithub.com/snyk/cli/compare/v1.1288.0...v1.1288.1) ##### Bug Fixes - **iac:** Fix Issue Path in human readable and json output \[IAC-2935] ([#​5159](https://togithub.com/snyk/snyk/issues/5159)) ([5fc3d59](https://togithub.com/snyk/snyk/commit/5fc3d591fefbcf0c5e7615bf4d9899a3a17c7990)) </details> <details> <summary>twpayne/chezmoi (twpayne/chezmoi)</summary> ### [`v2.47.4`](https://togithub.com/twpayne/chezmoi/releases/tag/v2.47.4) [Compare Source](https://togithub.com/twpayne/chezmoi/compare/v2.47.3...v2.47.4) #### Changelog ##### Fixes - [`d6ad485`](https://togithub.com/twpayne/chezmoi/commit/d6ad485c8) fix: Fix potential panic when textconv interpreter is empty - [`b4df44d`](https://togithub.com/twpayne/chezmoi/commit/b4df44dc6) fix: Fix panic on empty external ##### Documentation updates - [`872c584`](https://togithub.com/twpayne/chezmoi/commit/872c58479) docs: Add troubleshooting entry on missing /bin/bash on Nix - [`8b2a435`](https://togithub.com/twpayne/chezmoi/commit/8b2a4352e) docs: Add install.doctor to related software - [`3a3dd13`](https://togithub.com/twpayne/chezmoi/commit/3a3dd1387) docs: Add links to articles </details> <details> <summary>zellij-org/zellij (zellij-org/zellij)</summary> ### [`v0.40.0`](https://togithub.com/zellij-org/zellij/releases/tag/v0.40.0) [Compare Source](https://togithub.com/zellij-org/zellij/compare/v0.39.2...v0.40.0) ### Release notes This release includes exciting new features as well as some long awaited and requested improvements. #### Some highlights - A new welcome screen - A new filepicker - Pipes - Open floating panes at specific coordinates - Rearrange tabs - Disconnect other clients - Plugin aliases - New possible keys to bind - Start session in the background - Performance improvements Check out the [official announcement](https://zellij.dev/news/welcome-screen-pipes-filepicker) Also check out the two new screencasts/tutorials about [session management](https://zellij.dev/tutorials/session-management/) and [the new filepicker](https://zellij.dev/tutorials/filepicker/). #### Are you upgrading from an older version using a custom config file? In order to take advantage of some of the new features (eg. the welcome-screen and filepicker), you'll need to swap the `plugins` section in your [configuration file](https://zellij.dev/documentation/configuration) with the one from the [default file](https://togithub.com/zellij-org/zellij/blob/main/zellij-utils/assets/config/default.kdl#L188-L200). #### Do you like Zellij? ❤️ Me too! So much so that I spend 100% of my time developing and maintaining it and have no other income. Zellij will always be free and open-source. Zellij will never contain ads or collect your data. So if the tool gives you value and you are able, please consider [a recurring monthly donation](https://togithub.com/sponsors/imsnif) of 5-10$ to help me pay my bills. There are Zellij stickers in it for you! </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/scottames/dots). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjMwMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cli/cli](https://togithub.com/cli/cli) | minor | `v2.47.0` -> `v2.48.0` | --- ### Release Notes <details> <summary>cli/cli (cli/cli)</summary> ### [`v2.48.0`](https://togithub.com/cli/cli/releases/tag/v2.48.0): GitHub CLI 2.48.0 [Compare Source](https://togithub.com/cli/cli/compare/v2.47.0...v2.48.0) #### The Big Stuff - Added support for `--slurp`ing JSON responses in `gh api` by [@​heaths](https://togithub.com/heaths) in [cli/cli#8620 - Added `--skip-ssh-key` option to `gh auth login` command by [@​babakks](https://togithub.com/babakks) in [cli/cli#8935 - Added `numSelectedRepos` to JSON output of `gh secret list` by [@​babakks](https://togithub.com/babakks) in [cli/cli#8899 - Added support for multiple items in `gh api` nested array by [@​Ebonsignori](https://togithub.com/Ebonsignori) in [cli/cli#8762 - Fixed panic when running `gh repo rename` by [@​babakks](https://togithub.com/babakks) in [cli/cli#8906 - Fixed panic when parsing IPv6 remote URLs by [@​babakks](https://togithub.com/babakks) in [cli/cli#8893 - Fixed `gh pr lock/unlock` not working when URL is passed by [@​t4kamura](https://togithub.com/t4kamura) in [cli/cli#8837 - Fixed viewing run logs with filenames that the regex didn't handle [@​zdrve](https://togithub.com/zdrve) in [cli/cli#8882 #### The Rest - Tidy `go.mod` by [@​matthewhughes934](https://togithub.com/matthewhughes934) in [cli/cli#8958 - Fix cache contention in Go CI jobs by [@​matthewhughes934](https://togithub.com/matthewhughes934) in [cli/cli#8957 - Fix `go` directive in `go.mod` by [@​matthewhughes934](https://togithub.com/matthewhughes934) in [cli/cli#8956 - Update install_linux.md by [@​richterdavid](https://togithub.com/richterdavid) in [cli/cli#8950 - build(deps): bump google.golang.org/grpc from 1.61.1 to 1.61.2 by [@​dependabot](https://togithub.com/dependabot) in [cli/cli#8925 - Add codeowners entry for the GitHub TUF root included in the `attestation` command set by [@​malancas](https://togithub.com/malancas) in [cli/cli#8919 - Create stronger run log cache abstraction by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8931 - Remove naked returns from git ParseURL by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8929 - Fix api cache test by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8932 - Ensure run log cache creates cache dir if it doesn't exist by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8944 - Close zip file in run view tests by [@​williammartin](https://togithub.com/williammartin) in [cli/cli#8945 - Fix `attestation` cmd offline unit test failure by [@​malancas](https://togithub.com/malancas) in [cli/cli#8933 - Add support to `attestation` command for more predicate types. by [@​steiza](https://togithub.com/steiza) in [cli/cli#8949 #### New Contributors - [@​babakks](https://togithub.com/babakks) made their first contribution in [cli/cli#8906 - [@​t4kamura](https://togithub.com/t4kamura) made their first contribution in [cli/cli#8837 - [@​zdrve](https://togithub.com/zdrve) made their first contribution in [cli/cli#8882 - [@​Ebonsignori](https://togithub.com/Ebonsignori) made their first contribution in [cli/cli#8762 - [@​matthewhughes934](https://togithub.com/matthewhughes934) made their first contribution in [cli/cli#8958 - [@​richterdavid](https://togithub.com/richterdavid) made their first contribution in [cli/cli#8950 **Full Changelog**: cli/cli@v2.47.0...v2.48.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/earthly/earthly). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Description
Since we made some changes to
CacheDir
ingo-gh
there are some places ingh
which hard coded assumptions about where the cache dir was location. For examplegh run view
attempted to write files directly toos.TempDir() / gh-cli-cache
. To fix this we expose theCacheDir
through the cli's own config (in future, we may want to expose other dirs in the same way) and then inject that into theRunLogCache
.In doing this, we also strengthen the abstraction because previously callers of
RunLogCache
needed to provide it with a full file path for every operation instead of a key (which makes a lot more sense when there is an interface that could be implemented e.g. in memory). However, I continued to construct the file paths in the same way so that cache entries aren't expired unnecessarily.Previously, the
cache.Exists
method was hiding possible error states that would later crop up incache.Create
by assuming all errors mean the cache doesn't exist (when for example, it could be missing permissions). I made the error a first class part of the method signature that must be handled.Finally, I removed the
testRunLogCache
in the tests because as a stub it was still deeply coupled to the test setup (i.e. tests that mocked the return of./fixtures/run_log.zip
. It seemed better to remove this coupling and to get additional confidence in theRunLogCache
(which was previously untested) by just using the real thing; the file system is fast and reliable. Since we don't have the test abstraction, we can remove the unused interface, it can always be returned later if at some point we feel we need it (unlikely?).