Skip to content

Conversation

@williammartin
Copy link
Member

@williammartin williammartin commented Jun 2, 2023

Description

This PR relates to #5011

As described in #5011 (comment), there are a number of steps the server can take when producing the downloaded zip file that can result in a mismatch between the job name and the filename in the zip including:

  • Removing characters in the job name that aren't allowed in file paths
  • Truncating names that are too long for zip files
  • Adding collision deduplicating numbers for jobs with the same name

We are hesitant to duplicate all the server logic due to the fragility but while we explore our options, it is sensible to fix the issue that is unavoidable for users, that when a job uses a composite action, the server constructs a job name by constructing a job name of <JOB_NAME> / <ACTION_NAME>`. This means that logs will never be found for jobs that use composite actions.

Extra Notes for Reviewers

The tests rely on a preconstructed fixture run_log.zip. I put a new file in there with a name that matched the job name minus the /.

Using #5011 (comment), this functionality can be demonstrated as well:

➜  cli git:(wm/zip-log-slashes) ✗ gh version
gh version 2.30.0 (2023-05-30)
https://github.com/cli/cli/releases/tag/v2.30.0
➜  cli git:(wm/zip-log-slashes) ✗ gh run view -R nmasur/test-log 5081046233 --log | cat
➜  cli git:(wm/zip-log-slashes) ✗
➜  cli git:(wm/zip-log-slashes) ✗ ./bin/gh version
gh version 2.30.0-12-g2d3047c7 (2023-06-02)
https://github.com/cli/cli/releases/latest
➜  cli git:(wm/zip-log-slashes) ✗ ./bin/gh run view -R nmasur/test-log 5081046233 --log | cat
test-log / test       Set up job      2023-05-25T14:18:18.1076494Z Current runner version: '2.304.0'
test-log / test Set up job      2023-05-25T14:18:18.1115610Z ##[group]Operating System
test-log / test Set up job      2023-05-25T14:18:18.1116292Z Ubuntu
test-log / test Set up job      2023-05-25T14:18:18.1117193Z 22.04.2
test-log / test Set up job      2023-05-25T14:18:18.1117912Z LTS
test-log / test Set up job      2023-05-25T14:18:18.1118239Z ##[endgroup]
test-log / test Set up job      2023-05-25T14:18:18.1118628Z ##[group]Runner Image
test-log / test Set up job      2023-05-25T14:18:18.1119076Z Image: ubuntu-22.04
test-log / test Set up job      2023-05-25T14:18:18.1119632Z Version: 20230507.1
test-log / test Set up job      2023-05-25T14:18:18.1120572Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230507.1/images/linux/Ubuntu2204-Readme.md
test-log / test Set up job      2023-05-25T14:18:18.1121279Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230507.1
test-log / test Set up job      2023-05-25T14:18:18.1121741Z ##[endgroup]
test-log / test Set up job      2023-05-25T14:18:18.1122124Z ##[group]Runner Image Provisioner
test-log / test Set up job      2023-05-25T14:18:18.1122557Z 2.0.171.1
test-log / test Set up job      2023-05-25T14:18:18.1122835Z ##[endgroup]
test-log / test Set up job      2023-05-25T14:18:18.1123622Z ##[group]GITHUB_TOKEN Permissions
test-log / test Set up job      2023-05-25T14:18:18.1124450Z Contents: read
test-log / test Set up job      2023-05-25T14:18:18.1124899Z Metadata: read
test-log / test Set up job      2023-05-25T14:18:18.1125215Z Packages: read
test-log / test Set up job      2023-05-25T14:18:18.1126039Z ##[endgroup]
test-log / test Set up job      2023-05-25T14:18:18.1130484Z Secret source: Actions
test-log / test Set up job      2023-05-25T14:18:18.1131102Z Prepare workflow directory
test-log / test Set up job      2023-05-25T14:18:18.2136810Z Prepare all required actions
test-log / test Set up job      2023-05-25T14:18:18.2529999Z Uses: nmasur/actions/.github/workflows/test.yml@refs/heads/main (3653c3cdd77fa7ec506ed472d69a562f20cc7fb7)
test-log / test Set up job      2023-05-25T14:18:18.2536806Z ##[group] Inputs
test-log / test Set up job      2023-05-25T14:18:18.2537998Z   text: Hello, World!
test-log / test Set up job      2023-05-25T14:18:18.2538559Z ##[endgroup]
test-log / test Set up job      2023-05-25T14:18:18.2539340Z Complete job name: test-log / test
test-log / test Test    2023-05-25T14:18:18.4344880Z ##[group]Run echo "This is a test."
test-log / test Test    2023-05-25T14:18:18.4345677Z echo "This is a test."
test-log / test Test    2023-05-25T14:18:18.4346084Z echo "Hello, World!"
test-log / test Test    2023-05-25T14:18:18.4346521Z echo "Test complete."
test-log / test Test    2023-05-25T14:18:18.5059501Z shell: /usr/bin/bash -e {0}
test-log / test Test    2023-05-25T14:18:18.5060027Z ##[endgroup]
test-log / test Test    2023-05-25T14:18:18.5861357Z This is a test.
test-log / test Test    2023-05-25T14:18:18.5931200Z Hello, World!
test-log / test Test    2023-05-25T14:18:18.5931826Z Test complete.
test-log / test Complete job    2023-05-25T14:18:18.6302600Z Cleaning up orphan processes
➜  cli git:(wm/zip-log-slashes) ✗

@williammartin williammartin requested a review from a team as a code owner June 2, 2023 11:46
@williammartin williammartin requested review from mislav and removed request for a team June 2, 2023 11:46
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good first step to solving this issue. Don't know if I would consider the bug a P1 and worthy of its own release but something we can discuss as a team.

@williammartin
Copy link
Member Author

The only description I've seen of p1 is "Affects a large population and inhibits work" in comparison to p2 as "Affects more than a few users but doesn't prevent core functions" and I chose p1 since viewing logs seems like a core function. If the expectation is that p1 fixes would get out band releases then I suggest we up date our own documentation (or I missed it).

I agree with you that this doesn't need an out of band release, the issue has been open for a long time as is.

@williammartin williammartin merged commit 420f63c into trunk Jun 5, 2023
@williammartin williammartin deleted the wm/zip-log-slashes branch June 5, 2023 14:32
renovate bot referenced this pull request in scottames/dots Jun 23, 2023
[![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.20.0` -> `v4.21.1` |
| [cli/cli](https://togithub.com/cli/cli) | minor | `v2.30.0` ->
`v2.31.0` |
| [weaveworks/eksctl](https://togithub.com/weaveworks/eksctl) | minor |
`v0.145.0` -> `v0.146.0` |
| [zellij-org/zellij](https://togithub.com/zellij-org/zellij) | patch |
`v0.37.1` -> `v0.37.2` |

---

### Release Notes

<details>
<summary>aquaproj/aqua-registry</summary>

###
[`v4.21.1`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.21.1)

[Compare
Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.21.0...v4.21.1)


[Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.21.1)
| [Pull
Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.21.1)
| aquaproj/aqua-registry@v4.21.0...v4.21.1

#### Fixes


[#&#8203;13199](https://togithub.com/aquaproj/aqua-registry/issues/13199)
kubernetes-sigs/kustomize: Follow up changes of kustomize v5.1.0

-
[https://github.com/kubernetes-sigs/kustomize/issues/5220](https://togithub.com/kubernetes-sigs/kustomize/issues/5220)

###
[`v4.21.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.21.0)

[Compare
Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.20.0...v4.21.0)


[Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.21.0)
| [Pull
Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.21.0)
| aquaproj/aqua-registry@v4.20.0...v4.21.0

#### 🎉 New Packages


[#&#8203;13173](https://togithub.com/aquaproj/aqua-registry/issues/13173)
[assetnote/surf](https://togithub.com/assetnote/surf): Escalate your
SSRF vulnerabilities on Modern Cloud Environments. `surf` allows you to
filter a list of hosts, returning a list of viable SSRF candidates

[#&#8203;13174](https://togithub.com/aquaproj/aqua-registry/issues/13174)
[iyear/tdl](https://togithub.com/iyear/tdl): A Telegram downloader
written in Golang

[#&#8203;13172](https://togithub.com/aquaproj/aqua-registry/issues/13172)
[nikolaydubina/go-cover-treemap](https://togithub.com/nikolaydubina/go-cover-treemap):
Go code coverage to SVG treemap
[@&#8203;iwata](https://togithub.com/iwata)

</details>

<details>
<summary>cli/cli</summary>

### [`v2.31.0`](https://togithub.com/cli/cli/releases/tag/v2.31.0):
GitHub CLI 2.31.0

[Compare Source](https://togithub.com/cli/cli/compare/v2.30.0...v2.31.0)

#### What's New

- New suite of `project` commands for interacting with and manipulating
projects. Huge shoutout 🥳 for the time and effort put into this work by
[@&#8203;mntlty](https://togithub.com/mntlty) in
[https://github.com/cli/cli/pull/7375](https://togithub.com/cli/cli/pull/7375)
[https://github.com/cli/cli/pull/7578](https://togithub.com/cli/cli/pull/7578)
- New `search code` command by
[@&#8203;joshkraft](https://togithub.com/joshkraft) in
[https://github.com/cli/cli/pull/7376](https://togithub.com/cli/cli/pull/7376)
- New `cs view` command by
[@&#8203;dmgardiner25](https://togithub.com/dmgardiner25) in
[https://github.com/cli/cli/pull/7496](https://togithub.com/cli/cli/pull/7496)
[https://github.com/cli/cli/pull/7539](https://togithub.com/cli/cli/pull/7539)

#### What's Changed

- `api`: output a single JSON array in REST pagination mode by
[@&#8203;mislav](https://togithub.com/mislav) in
[https://github.com/cli/cli/pull/7190](https://togithub.com/cli/cli/pull/7190)
- `api`: support array params in GET queries by
[@&#8203;mislav](https://togithub.com/mislav) in
[https://github.com/cli/cli/pull/7513](https://togithub.com/cli/cli/pull/7513)
- `api`: force method to uppercase by
[@&#8203;ffalor](https://togithub.com/ffalor) in
[https://github.com/cli/cli/pull/7514](https://togithub.com/cli/cli/pull/7514)
- `alias`: Allow aliases to recognize extended commands by
[@&#8203;srz-zumix](https://togithub.com/srz-zumix) in
[https://github.com/cli/cli/pull/7523](https://togithub.com/cli/cli/pull/7523)
- `alias import`: Fix `--clobber` flag by
[@&#8203;samcoe](https://togithub.com/samcoe) in
[https://github.com/cli/cli/pull/7569](https://togithub.com/cli/cli/pull/7569)
- `run rerun`: Improve docs around `--job` flag by
[@&#8203;williammartin](https://togithub.com/williammartin) in
[https://github.com/cli/cli/pull/7527](https://togithub.com/cli/cli/pull/7527)
- `run view`: Support viewing logs for jobs with composite actions by
[@&#8203;williammartin](https://togithub.com/williammartin) in
[https://github.com/cli/cli/pull/7526](https://togithub.com/cli/cli/pull/7526)
- `gist edit`: Add selector option to `gist edit` command by
[@&#8203;kousikmitra](https://togithub.com/kousikmitra) in
[https://github.com/cli/cli/pull/7537](https://togithub.com/cli/cli/pull/7537)
- `repo clone`: Set upstream remote to track all branches after initial
fetch by [@&#8203;samcoe](https://togithub.com/samcoe) in
[https://github.com/cli/cli/pull/7542](https://togithub.com/cli/cli/pull/7542)
- `extension`: Speed up listing extensions by lazy-loading extension
information when needed by [@&#8203;mislav](https://togithub.com/mislav)
in
[https://github.com/cli/cli/pull/7493](https://togithub.com/cli/cli/pull/7493)
- `auth`: Add timeouts to keyring operations by
[@&#8203;samcoe](https://togithub.com/samcoe) in
[https://github.com/cli/cli/pull/7580](https://togithub.com/cli/cli/pull/7580)
- `auth status`: write to stdout on success by
[@&#8203;rajhawaldar](https://togithub.com/rajhawaldar) in
[https://github.com/cli/cli/pull/7540](https://togithub.com/cli/cli/pull/7540)
- `completion`: Fix bash completions for extensions and aliases by
[@&#8203;mislav](https://togithub.com/mislav) in
[https://github.com/cli/cli/pull/7525](https://togithub.com/cli/cli/pull/7525)
- `issue/pr view`: alphabetically sort labels for `gh pr/issue view` by
[@&#8203;ffalor](https://togithub.com/ffalor) in
[https://github.com/cli/cli/pull/7587](https://togithub.com/cli/cli/pull/7587)
- Fix error handling for extension and shell alias commands by
[@&#8203;samcoe](https://togithub.com/samcoe) in
[https://github.com/cli/cli/pull/7567](https://togithub.com/cli/cli/pull/7567)
- Fix pkg imported more than once by
[@&#8203;testwill](https://togithub.com/testwill) in
[https://github.com/cli/cli/pull/7591](https://togithub.com/cli/cli/pull/7591)
- Refactor a nested if statement by
[@&#8203;yanskun](https://togithub.com/yanskun) in
[https://github.com/cli/cli/pull/7596](https://togithub.com/cli/cli/pull/7596)
- Fix a typo by
[@&#8203;lerocknrolla](https://togithub.com/lerocknrolla) in
[https://github.com/cli/cli/pull/7557](https://togithub.com/cli/cli/pull/7557)
- Fix flaky test by [@&#8203;samcoe](https://togithub.com/samcoe) in
[https://github.com/cli/cli/pull/7515](https://togithub.com/cli/cli/pull/7515)
- Credential rotations, renames and decouplings from Mislav by
[@&#8203;williammartin](https://togithub.com/williammartin) in
[https://github.com/cli/cli/pull/7544](https://togithub.com/cli/cli/pull/7544)
- build(deps): bump github.com/cli/go-gh/v2 from 2.0.0 to 2.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/cli/cli/pull/7546](https://togithub.com/cli/cli/pull/7546)
- build(deps): bump github.com/AlecAivazis/survey/v2 from 2.3.6 to 2.3.7
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/cli/cli/pull/7576](https://togithub.com/cli/cli/pull/7576)

#### New Contributors

- [@&#8203;srz-zumix](https://togithub.com/srz-zumix) made their first
contribution in
[https://github.com/cli/cli/pull/7523](https://togithub.com/cli/cli/pull/7523)
- [@&#8203;lerocknrolla](https://togithub.com/lerocknrolla) made their
first contribution in
[https://github.com/cli/cli/pull/7557](https://togithub.com/cli/cli/pull/7557)
- [@&#8203;testwill](https://togithub.com/testwill) made their first
contribution in
[https://github.com/cli/cli/pull/7591](https://togithub.com/cli/cli/pull/7591)
- [@&#8203;rajhawaldar](https://togithub.com/rajhawaldar) made their
first contribution in
[https://github.com/cli/cli/pull/7540](https://togithub.com/cli/cli/pull/7540)

**Full Changelog**: cli/cli@v2.30.0...v2.31.0

</details>

<details>
<summary>weaveworks/eksctl</summary>

###
[`v0.146.0`](https://togithub.com/weaveworks/eksctl/releases/tag/v0.146.0):
eksctl 0.146.0 (permalink)

[Compare
Source](https://togithub.com/weaveworks/eksctl/compare/0.145.0...0.146.0)

### Release v0.146.0

#### 🎯 Improvements

- Update vpc-cni to 1.12.6
([#&#8203;6692](https://togithub.com/weaveworks/eksctl/issues/6692))

#### 🧰 Maintenance

- Bump dependencies
([#&#8203;6690](https://togithub.com/weaveworks/eksctl/issues/6690))

#### 📝 Documentation

- New eksctl channel
([#&#8203;6697](https://togithub.com/weaveworks/eksctl/issues/6697))

#### Acknowledgments

Weaveworks would like to sincerely thank:
[@&#8203;wind0r](https://togithub.com/wind0r)

</details>

<details>
<summary>zellij-org/zellij</summary>

###
[`v0.37.2`](https://togithub.com/zellij-org/zellij/releases/tag/v0.37.2)

[Compare
Source](https://togithub.com/zellij-org/zellij/compare/v0.37.1...v0.37.2)

This is a patch release to fix some minor issues in the previous
release.

#### What's Changed

- hotfix: include theme files into binary by
[@&#8203;jaeheonji](https://togithub.com/jaeheonji) in
[https://github.com/zellij-org/zellij/pull/2566](https://togithub.com/zellij-org/zellij/pull/2566)
- fix(plugins): make hide_self api idempotent by
[@&#8203;imsnif](https://togithub.com/imsnif) in
[https://github.com/zellij-org/zellij/pull/2568](https://togithub.com/zellij-org/zellij/pull/2568)

**Full Changelog**:
zellij-org/zellij@v0.37.1...v0.37.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants