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: improve new action cache logging #2474

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

ChristopherHX
Copy link
Contributor

@ChristopherHX ChristopherHX commented Sep 27, 2024

Resolves #2471

Example the GoGitActionCache are new logging entries in default log level ( --use-new-action-cache )

[uses-composite-check-for-input-in-if-uses/test] GoGitActionCache fetch https://github.com/actions/github-script with ref v7 at /home/christopher/.cache/act/actions-github-script.git resolved to 60a0d83039c74a4aee543508d2ffcb1c3799cdea
[uses-composite-check-for-input-in-if-uses/test] GoGitActionCache get content actions/github-script with sha 60a0d83039c74a4aee543508d2ffcb1c3799cdea subpath action.yml at /home/christopher/.cache/act/actions-github-script.git
[uses-composite-check-for-input-in-if-uses/test] ⭐ Run Main actions/github-script@v7
[uses-composite-check-for-input-in-if-uses/test] GoGitActionCache get content actions/github-script with sha 60a0d83039c74a4aee543508d2ffcb1c3799cdea subpath  at /home/christopher/.cache/act/actions-github-script.git
[uses-composite-check-for-input-in-if-uses/test]   | { b: 'true', b2: 'true' }
[uses-composite-check-for-input-in-if-uses/test]   ✅  Success - Main actions/github-script@v7
[uses-composite-check-for-input-in-if-uses/test]   ⚙  ::set-output:: result=

LocalRepositoryCache logging ( --local-repository actions/github-script@v7=/tmp )

[uses-composite-check-for-input-in-if-uses/test] ⭐ Run Main actions/checkout@v4
[uses-composite-check-for-input-in-if-uses/test]   ✅  Success - Main actions/checkout@v4
[uses-composite-check-for-input-in-if-uses/test] ⭐ Run Main ./uses-composite-check-for-input-in-if-uses/composite_action
[uses-composite-check-for-input-in-if-uses/test] LocalRepositoryCache matched https://github.com/actions/github-script with ref v7 to /tmp/
[uses-composite-check-for-input-in-if-uses/test] LocalRepositoryCache read cachedir actions/github-script with ref v7 and subpath action.yml from /tmp/

Behind feature flags --use-new-action-cache / --local-repository / (--action-offline-mode logging adjusted if one previous feature flag is enabled)

@ChristopherHX ChristopherHX requested a review from a team as a code owner September 27, 2024 21:50
Copy link
Contributor

github-actions bot commented Sep 27, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 4 0 0.01s
✅ REPOSITORY gitleaks yes no 2.33s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY grype yes no 8.72s
✅ REPOSITORY secretlint yes no 1.02s
✅ REPOSITORY trivy-sbom yes no 0.48s
✅ REPOSITORY trufflehog yes no 4.42s

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
Copy link
Contributor Author

I have plans to finally deprecate the old method for fetching actions to improve reliability and reduce download/cache size: #2472.

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 76.75%. Comparing base (5a80a04) to head (87547ff).
Report is 119 commits behind head on master.

Files with missing lines Patch % Lines
pkg/runner/action_cache.go 46.66% 8 Missing ⚠️
pkg/runner/action_cache_offline_mode.go 0.00% 3 Missing ⚠️
pkg/runner/local_repository_cache.go 75.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2474       +/-   ##
===========================================
+ Coverage   61.56%   76.75%   +15.18%     
===========================================
  Files          53       62        +9     
  Lines        9002     8211      -791     
===========================================
+ Hits         5542     6302      +760     
+ Misses       3020     1346     -1674     
- Partials      440      563      +123     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

mergify bot commented Sep 27, 2024

@ChristopherHX this pull request has failed checks 🛠

@mergify mergify bot added the needs-work Extra attention is needed label Sep 27, 2024
@ChristopherHX
Copy link
Contributor Author

Do I really need the 4.85% missing coverage for logging and enhanced errors?

@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 28, 2024
@mergify mergify bot removed the needs-work Extra attention is needed label Sep 28, 2024
@mergify mergify bot merged commit 9142ed9 into master Oct 10, 2024
12 checks passed
@mergify mergify bot deleted the improve-new-action-cache-logging branch October 10, 2024 03: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.

Impove logging of --use-new-action-cache
3 participants