Skip to content

add logs for external file download#1577

Merged
valyria257 merged 3 commits intonginx:mainfrom
vivki:vxu-agent
Apr 7, 2026
Merged

add logs for external file download#1577
valyria257 merged 3 commits intonginx:mainfrom
vivki:vxu-agent

Conversation

@vivki
Copy link
Copy Markdown
Contributor

@vivki vivki commented Mar 27, 2026

Proposed changes

This PR adds logs for external file downloads. These are needed on the NGINXaaS side to generate events.

Agent V3 currently does log errors caused by failed file downloads, e.g.

apply error: failed to download file /etc/nginx/mycert.cert from projects/900024435491/secrets/valyria-secret/versions/latest: download failed with status code 401: no workload identity pool provider specified

With this current change, any download errors will also be logged with a standard failure message to be parsed by NGINXaaS:

2026-04-01T10:15:32.123Z ERROR Failed to download external file event_tag=ID-1310 location=http://naasproxy:49152/google_secret_manager/projects%2F219735614622%2Fsecrets%2Fvxu-key%2Fversions%2F1 err="connection timed out"

Additionally, a success log is added, to be parsed by NGINXaaS:

2026-04-01T10:15:33.456Z INFO Successfully downloaded external file event_tag=ID-1310 location=http://naasproxy:49152/google_secret_manager/projects%2F219735614622%2Fsecrets%2Fvxu-key%2Fversions%2F1 hash=a3f5b8c9d2e1f4a7b6c5d8e9f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0

No existing logs have been changed.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@vivki vivki requested a review from a team as a code owner March 27, 2026 23:03
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 27, 2026

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot added the chore Pull requests for routine tasks label Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.07%. Comparing base (3d4cf59) to head (b0eb19a).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1577      +/-   ##
==========================================
+ Coverage   85.05%   85.07%   +0.01%     
==========================================
  Files         105      105              
  Lines       13680    13691      +11     
==========================================
+ Hits        11636    11647      +11     
  Misses       1529     1529              
  Partials      515      515              
Files with missing lines Coverage Δ
internal/file/external_file_operator.go 80.20% <100.00%> (+0.52%) ⬆️
internal/file/file_manager_service.go 74.82% <100.00%> (+0.34%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d4cf59...b0eb19a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vivki
Copy link
Copy Markdown
Contributor Author

vivki commented Mar 30, 2026

I have hereby read the F5 CLA and agree to its terms.

Comment thread internal/file/file_manager_service.go Outdated
@vivki vivki force-pushed the vxu-agent branch 2 times, most recently from 7b3317d to f00237a Compare March 31, 2026 00:03
@vivki
Copy link
Copy Markdown
Contributor Author

vivki commented Mar 31, 2026

recheck

@vivki vivki force-pushed the vxu-agent branch 2 times, most recently from d5f9118 to 174dcf7 Compare March 31, 2026 01:57
@vivki
Copy link
Copy Markdown
Contributor Author

vivki commented Mar 31, 2026

I have hereby read the F5 CLA and agree to its terms

@vivki
Copy link
Copy Markdown
Contributor Author

vivki commented Mar 31, 2026

recheck

@vivki vivki force-pushed the vxu-agent branch 2 times, most recently from e1c4663 to e9c746e Compare March 31, 2026 03:49
Comment thread internal/file/external_file_operator.go Outdated
Comment thread internal/file/file_manager_service.go
Comment thread .github/workflows/ci.yml
@vivki vivki force-pushed the vxu-agent branch 3 times, most recently from 4948cf3 to e6ec6db Compare March 31, 2026 17:58
@vivki vivki changed the title add logs tracking GCP secret fetch for NGINXaaS add logs for external file download Apr 2, 2026
vivki added 2 commits April 7, 2026 09:58
Use commit SHA instead of branch name when checking out PR code.
This fixes the checkout error for PRs from forks where the branch
doesn't exist in the upstream repository.
Comment thread internal/file/external_file_operator.go Outdated
@vivki vivki force-pushed the vxu-agent branch 4 times, most recently from 0039a6b to 9e460e4 Compare April 7, 2026 17:38
@valyria257 valyria257 merged commit 5707ea1 into nginx:main Apr 7, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants