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

feat: Add new Action Cache #1913

Merged
merged 7 commits into from
Aug 8, 2023
Merged

feat: Add new Action Cache #1913

merged 7 commits into from
Aug 8, 2023

Conversation

ChristopherHX
Copy link
Contributor

This is a sample implementation of ActionCache.

See also #1912 and it's description for further links.

a.NoError(err)
a.NotEqual(0, th.Size)
buf := &bytes.Buffer{}
_, err = io.Copy(buf, mytar)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wow tests need to be secured against DoS, what on earth

@github-actions
Copy link
Contributor

github-actions bot commented Jul 16, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 2 0 0.01s
✅ REPOSITORY gitleaks yes no 2.97s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY grype yes no 10.41s
✅ REPOSITORY secretlint yes no 1.66s
✅ REPOSITORY trivy-sbom yes no 0.7s
✅ REPOSITORY trufflehog yes no 8.11s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@ChristopherHX ChristopherHX marked this pull request as ready for review July 16, 2023 20:27
@ChristopherHX ChristopherHX requested a review from a team as a code owner July 16, 2023 20:27
@mergify
Copy link
Contributor

mergify bot commented Jul 16, 2023

@ChristopherHX this pull request has failed checks 🛠

Awaiting moby/moby#45935 to be fixed

@mergify mergify bot added the needs-work Extra attention is needed label Jul 16, 2023
@ChristopherHX ChristopherHX removed the needs-work Extra attention is needed label Jul 16, 2023
@mergify mergify bot added the needs-work Extra attention is needed label Jul 16, 2023
@nektos nektos deleted a comment from mergify bot Jul 16, 2023
@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #1913 (8df06d5) into master (4989f44) will increase coverage by 0.91%.
Report is 219 commits behind head on master.
The diff coverage is 61.70%.

@@            Coverage Diff             @@
##           master    #1913      +/-   ##
==========================================
+ Coverage   61.22%   62.13%   +0.91%     
==========================================
  Files          46       52       +6     
  Lines        7141     8488    +1347     
==========================================
+ Hits         4372     5274     +902     
- Misses       2462     2795     +333     
- Partials      307      419     +112     
Files Changed Coverage Δ
pkg/common/outbound_ip.go 0.00% <0.00%> (ø)
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/docker_volume.go 0.00% <0.00%> (ø)
pkg/container/file_collector.go 39.68% <0.00%> (+2.38%) ⬆️
pkg/container/host_environment.go 0.00% <0.00%> (ø)
...ontainer/linux_container_environment_extensions.go 23.07% <0.00%> (-1.25%) ⬇️
pkg/container/util.go 0.00% <0.00%> (ø)
pkg/exprparser/functions.go 66.32% <0.00%> (-1.04%) ⬇️
pkg/container/docker_run.go 13.45% <7.14%> (-0.13%) ⬇️
... and 29 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mergify mergify bot removed the needs-work Extra attention is needed label Jul 17, 2023
@ChristopherHX
Copy link
Contributor Author

It's your chance to request / suggest changes, this has wide impact to act.

  • What about offline scenarios?
    • Do we need to store tags under real names?
    • Do we want to ignore errors on fetch (existing tag/branch/sha)?
  • What about overriding remote actions locally?
    • Create an overlay implementation?
  • Store ActionCache reference in runner.Config?
    • Switch implementation via cmd package?
    • initialize if nil on use?
  • What about the old Action Cache?
    • Replace it directly?
    • Do you want to keep it?
    • Fix the old Action Cache without replacing it?

pkg/runner/action_cache.go Show resolved Hide resolved
pkg/runner/action_cache.go Outdated Show resolved Hide resolved
pkg/runner/action_cache.go Show resolved Hide resolved
@mergify mergify bot requested a review from a team August 8, 2023 13:52
Copy link
Contributor Author

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

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

Thanks for your review cplee :).

pkg/runner/action_cache.go Show resolved Hide resolved
pkg/runner/action_cache.go Show resolved Hide resolved
pkg/runner/action_cache.go Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Aug 8, 2023

@ChristopherHX this pull request has failed checks 🛠

@mergify mergify bot added the needs-work Extra attention is needed label Aug 8, 2023
@mergify mergify bot removed the needs-work Extra attention is needed label Aug 8, 2023
@mergify mergify bot merged commit a42f3cf into master Aug 8, 2023
10 checks passed
@mergify mergify bot deleted the action_cache branch August 8, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants