Skip to content

Conversation

@Akshay2191
Copy link
Contributor

Extends the ConfigApply capability to manage NGINX configurations that reference external resources hosted at remote URLs. The agent now handles downloading of these files into the NGINX configuration directory before applying the new configuration.

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

@Akshay2191 Akshay2191 requested a review from a team as a code owner November 12, 2025 15:50
@github-actions github-actions bot added the chore Pull requests for routine tasks label Nov 12, 2025
@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 81.84932% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.09%. Comparing base (fab01ec) to head (52e6aa3).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
internal/file/external_file_operator.go 79.14% 20 Missing and 19 partials ⚠️
internal/file/file_manager_service.go 71.79% 9 Missing and 2 partials ⚠️
internal/config/config.go 95.83% 1 Missing and 1 partial ⚠️
internal/file/file_service_operator.go 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1389      +/-   ##
==========================================
- Coverage   85.31%   85.09%   -0.22%     
==========================================
  Files         102      103       +1     
  Lines       12974    13259     +285     
==========================================
+ Hits        11069    11283     +214     
- Misses       1418     1467      +49     
- Partials      487      509      +22     
Files with missing lines Coverage Δ
internal/config/defaults.go 100.00% <ø> (ø)
internal/config/flags.go 100.00% <ø> (ø)
internal/config/types.go 87.65% <ø> (ø)
internal/model/config.go 90.47% <ø> (ø)
internal/file/file_service_operator.go 76.97% <94.44%> (+0.67%) ⬆️
internal/config/config.go 87.79% <95.83%> (+0.35%) ⬆️
internal/file/file_manager_service.go 74.06% <71.79%> (-0.75%) ⬇️
internal/file/external_file_operator.go 79.14% <79.14%> (ø)

... and 25 files with indirect coverage changes


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 fab01ec...52e6aa3. Read the comment docs.

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

@Akshay2191 Akshay2191 self-assigned this Nov 19, 2025
wantErrMsg string
wantErr bool
}{
{

Choose a reason for hiding this comment

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

The following scenarios could increase coverage:

  • No destination specified
  • Restricted directory.
  • Two files to the same destination.

}{
{
name: "Test 1: success",
prepare: func(t *testing.T) (string, string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be changed to follow the way other tests are set up and formatted

}

//nolint:gocognit,revive,govet // cognitive complexity is 22
func TestFileManagerService_downloadExternalFiles_Cases(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this test be simplified and changed to match the way other tests are set up and structured

assert.Equal(t, fileName, dstArg, "RenameExternalFile destination argument mismatch")
}

func TestDownloadFileContent_MaxBytesLimit(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these tests please be combined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to consolidate these divergent test scenarios (MaxBytes vs. Proxy Errors) but it spiked the cognitive complexity to 23 due the very different validation steps. Therefore I kept them seperate.

@github-actions github-actions bot added dependencies documentation Improvements or additions to documentation labels Dec 18, 2025
@Akshay2191 Akshay2191 force-pushed the external-file-mgmt-integration branch from e50d100 to 2e981e0 Compare December 19, 2025 00:30
@Akshay2191 Akshay2191 marked this pull request as draft January 6, 2026 15:26
@Akshay2191 Akshay2191 changed the title NGINX Configs to Reference Remote External Files Draft : NGINX Configs to Reference Remote External Files Jan 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🎉 Thank you for your contribution! It appears you have not yet signed the F5 Contributor License Agreement (CLA), which is required for your changes to be incorporated into an F5 Open Source Software (OSS) project. Please kindly read the F5 CLA and reply on a new comment with the following text to agree:


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


3 out of 4 committers have signed the CLA.
✅ (Akshay2191)[https://github.com/Akshay2191]
✅ (dhurley)[https://github.com/dhurley]
✅ (aphralG)[https://github.com/aphralG]
@akshay Chawla
Akshay Chawla seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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 dependencies documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants