Skip to content

Commit 364fa80

Browse files
committed
Merge remote-tracking branch 'origin/main' into v3-qe-dashboard
2 parents 0289abd + 836d987 commit 364fa80

File tree

103 files changed

+1434
-697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1434
-697
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
proxy-sanity-check:
2727
name: Proxy Sanity Check
2828
runs-on: ubuntu-22.04
29-
if: ${{ !github.event.pull_request.head.repo.fork }}
29+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
3030
env:
3131
GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev"
3232
steps:
@@ -50,10 +50,10 @@ jobs:
5050
with:
5151
go-version-file: 'go.mod'
5252
cache: false
53-
- name: run install-tools
54-
run: make install-tools
55-
- name: run lint
56-
run: make lint
53+
- name: Lint Go
54+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
55+
with:
56+
version: v2.4.0
5757

5858
unit-test:
5959
name: Unit Tests
@@ -159,7 +159,7 @@ jobs:
159159
official-oss-image-integration-tests:
160160
name: Integration Tests - Official OSS Images
161161
needs: build-unsigned-snapshot
162-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
162+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
163163
runs-on: ubuntu-22.04
164164
strategy:
165165
matrix:
@@ -212,7 +212,7 @@ jobs:
212212
official-plus-image-integration-tests:
213213
name: Integration Tests - Official Plus Images
214214
needs: build-unsigned-snapshot
215-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
215+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
216216
runs-on: ubuntu-22.04
217217
strategy:
218218
matrix:
@@ -307,7 +307,7 @@ jobs:
307307
run: git push 'https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/nginx/agent.git' benchmark-results:benchmark-results
308308
load-tests:
309309
name: Load Tests
310-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
310+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
311311
permissions:
312312
contents: write
313313
runs-on: ubuntu-22.04

.github/workflows/mend.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ permissions:
2525

2626
jobs:
2727
mend:
28-
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) || (github.event_name == 'push' && github.event.repository.fork == false) }}
28+
if: >-
29+
${{
30+
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-')) ||
31+
(github.event_name == 'push' && !github.event.repository.fork)
32+
}}
2933
uses: nginxinc/compliance-rules/.github/workflows/mend.yml@a27656f8f9a8748085b434ebe007f5b572709aad # v0.2
3034
secrets: inherit
3135
with:

.golangci.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ linters:
3939
- nilnil
4040
- nlreturn
4141
- noctx
42-
# - nolintlint
42+
- nolintlint
4343
- nosprintfhostport
4444
- perfsprint
4545
- prealloc
@@ -66,7 +66,7 @@ linters:
6666
- zerologlint
6767
settings:
6868
cyclop:
69-
max-complexity: 10
69+
max-complexity: 12
7070
package-average: 0
7171
errorlint:
7272
errorf: true
@@ -122,7 +122,6 @@ linters:
122122
- G110
123123
- G111
124124
- G112
125-
- G113
126125
- G114
127126
- G201
128127
- G202
@@ -217,19 +216,19 @@ linters:
217216
- chan
218217
nlreturn:
219218
block-size: 2
220-
# nolintlint:
221-
# # Disable to ensure that all nolint directives actually have an effect.
222-
# # Default: false
223-
# allow-unused: true
224-
# # Exclude following linters from requiring an explanation.
225-
# # Default: []
226-
# allow-no-explanation: [ ]
227-
# # Enable to require an explanation of nonzero length after each nolint directive.
228-
# # Default: false
229-
# require-explanation: true
230-
# # Enable to require nolint directives to mention the specific linter being suppressed.
231-
# # Default: false
232-
# require-specific: true
219+
nolintlint:
220+
# Disable to ensure that all nolint directives actually have an effect.
221+
# Default: false
222+
allow-unused: true
223+
# Exclude following linters from requiring an explanation.
224+
# Default: []
225+
allow-no-explanation: [ ]
226+
# Enable to require an explanation of nonzero length after each nolint directive.
227+
# Default: false
228+
require-explanation: true
229+
# Enable to require nolint directives to mention the specific linter being suppressed.
230+
# Default: false
231+
require-specific: true
233232
prealloc:
234233
simple: true
235234
range-loops: true
@@ -286,7 +285,7 @@ linters:
286285
disabled: false
287286
- name: cognitive-complexity
288287
arguments:
289-
- 10
288+
- 12
290289
severity: warning
291290
disabled: false
292291
- name: comment-spacings
@@ -311,7 +310,7 @@ linters:
311310
disabled: false
312311
- name: cyclomatic
313312
arguments:
314-
- 10
313+
- 12
315314
severity: warning
316315
disabled: false
317316
- name: datarace

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ build: ## Build agent executable
125125

126126
lint: ## Run linter
127127
@$(GOVET) ./...
128+
@$(GORUN) $(GOLANGCILINT) config verify -c ./.golangci.yml
128129
@$(GORUN) $(GOLANGCILINT) run -c ./.golangci.yml
129130
@cd api/grpc && $(GORUN) $(BUF) generate
130131
@echo "🏯 Linting Done"
@@ -172,9 +173,8 @@ official-image-integration-test: $(SELECTED_PACKAGE) build-mock-management-plane
172173
go test -v ./test/integration/managementplane ./test/integration/auxiliarycommandserver
173174

174175
performance-test:
175-
@mkdir -p $(TEST_BUILD_DIR)
176-
@CGO_ENABLED=0 $(GOTEST) -count 10 -timeout 6m -bench=. -benchmem -run=^$$ ./... > $(TEST_BUILD_DIR)/benchmark.txt
177-
@cat $(TEST_BUILD_DIR)/benchmark.txt
176+
mkdir -p $(TEST_BUILD_DIR)
177+
bash -c 'CGO_ENABLED=0 $(GOTEST) -count 10 -timeout 6m -bench=. -benchmem -run=^$$ ./... | tee $(TEST_BUILD_DIR)/benchmark.txt; test $${PIPESTATUS[0]} -eq 0'
178178

179179
compare-performance-benchmark-results:
180180
@$(GORUN) $(BENCHSTAT) $(OLD_BENCHMARK_RESULTS_FILE) $(TEST_BUILD_DIR)/benchmark.txt

Makefile.tools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OAPICODEGEN = github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@v2.1.0
22
LEFTHOOK = github.com/evilmartians/lefthook@v1.6.9
3-
GOLANGCILINT = github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.2.1
3+
GOLANGCILINT = github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
44
PROTOCGENGO = google.golang.org/protobuf/cmd/protoc-gen-go@v1.32.0
55
GOFUMPT = mvdan.cc/gofumpt@v0.6.0
66
COUNTERFEITER = github.com/maxbrunsfeld/counterfeiter/v6@v6.8.1

README.md

Lines changed: 23 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,40 @@
11
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nginx/agent)
2+
![GitHub Release](https://img.shields.io/github/v/release/nginx/agent)
23
![GitHub License](https://img.shields.io/github/license/nginx/agent)
34
![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)
4-
[![Slack](https://img.shields.io/badge/slack-join%20us-brightgreen.svg?logo=slack)](https://nginxcommunity.slack.com/channels/nginx-agent)
55
![coverage](https://raw.githubusercontent.com/nginx/agent/badges/.badges/v3/coverage.svg)
66

7-
# NGINX Agent
7+
# F5 NGINX Agent
88

9-
NGINX Agent is a companion daemon for your NGINX Open Source or NGINX Plus instance. It enables:
9+
F5 NGINX Agent is a companion application designed to efficiently manage NGINX instances. Key features include:
1010

11-
- Remote management of NGINX configurations
12-
- Collection and reporting of real-time NGINX performance and operating system metrics
13-
- Notifications of NGINX events
11+
- Remote management: Easily control and configure NGINX instances remotely.
12+
- Real-time metrics: Monitor and analyze performance data for NGINX and the underlying operating system.
1413

15-
## Development Environment Setup
14+
Discover more advanced features and capabilities by visiting [Try NGINX One: Free Enterprise Trial](https://www.f5.com/trials/nginx-one).
1615

17-
### Installing Prerequisite Packages
1816

19-
The following packages need to be installed:
17+
## Installation
2018

21-
- make
22-
- golang (<https://go.dev/doc/install>)
23-
- protoc (<https://grpc.io/docs/protoc-installation/>)
24-
- mdatagen (There is currently an [issue installing mdatagen](https://github.com/open-telemetry/opentelemetry-collector/issues/9281). See instructions below for workaround.)
19+
You can install **NGINX Agent** using one of the following methods:
2520

26-
#### Workaround to install mdatagen
21+
1. **Official documentation**
22+
Follow the step-by-step guide to add and configure instances:
23+
[How to add an instance](https://docs.nginx.com/nginx-one/how-to/nginx-configs/add-instance/)
2724

28-
```console
29-
git clone https://github.com/open-telemetry/opentelemetry-collector.git
30-
cd opentelemetry-collector
31-
git checkout v0.124.0
32-
cd cmd/mdatagen
33-
go install
34-
```
25+
2. **GitHub releases**
26+
Download the latest binaries or packages directly from the GitHub releases page:
27+
[NGINX Agent GitHub releases](https://github.com/nginx/agent/releases)
3528

36-
Before starting development on the NGINX Agent, it is important to download and install the necessary tool and dependencies required by the NGINX Agent. You can do this by running the following `make` command:
29+
3. **Installation and upgrade guide**
30+
Access detailed instructions to install or upgrade NGINX Agent from the official NGINX documentation:
31+
[NGINX Agent Installation Guide](https://docs.nginx.com/nginx-agent/installation-upgrade/)
3732

38-
```console
39-
make install-tools
40-
```
33+
## Useful links
4134

42-
### Building NGINX Agent from Source Code
35+
* [v2 - Official NGINX Agent documentation](https://docs.nginx.com/nginx-agent/)
36+
* [v3 - Official NGINX Agent documentation](https://docs.nginx.com/nginx-one/agent/)
37+
* [F5 Support](https://my.f5.com/manage/s/)
4338

44-
Build NGINX Agent deb package:
45-
46-
```console
47-
OSARCH=<operating system archiecture> make local-deb-package
48-
```
49-
50-
Build NGINX Agent rpm package:
51-
52-
```console
53-
OSARCH=<operating system archiecture> make local-rpm-package
54-
```
55-
56-
Build NGINX Agent apk package:
57-
58-
```console
59-
OSARCH=<operating system archiecture> make local-apk-package
60-
```
61-
62-
### Testing NGINX Agent
63-
64-
#### Unit tests
65-
66-
To run unit tests and check that there is enough test coverage run the following
67-
68-
```console
69-
make unit-test coverge
70-
```
71-
72-
To check for race conditions, the unit tests can also be run with a race condition detector
73-
74-
```console
75-
make race-condition-test
76-
```
77-
78-
#### Integration tests
79-
80-
To run integration tests, run the following
81-
82-
```console
83-
make integration-test
84-
```
85-
86-
#### Testing with a mock management plane
87-
88-
For testing command operations, there is a mock management gRPC server that can be used. See here: [mock management gRPC server](test/mock/grpc/README.md) \
89-
For testing metrics, there is a mock management OTel collector that can be used. See here: [mock management OTel collector](test/mock/collector/README.md)
90-
91-
## NGINX Agent Technical Specifications
92-
93-
### Supported Distributions
94-
95-
NGINX Agent can run in most environments. For a list of supported distributions, see the [NGINX Technical Specs](https://docs.nginx.com/nginx/technical-specs/#supported-distributions) guide.
96-
97-
### Supported Deployment Environments
98-
99-
NGINX Agent can be deployed in the following environments:
100-
101-
- Bare Metal
102-
- Container
103-
- Public Cloud: AWS, Google Cloud Platform, and Microsoft Azure
104-
- Virtual Machine
105-
106-
### Supported NGINX Product Versions
107-
108-
NGINX Agent works with all supported versions of NGINX Open Source and NGINX Plus.
109-
110-
### Sizing Recommendations
111-
112-
Minimum system sizing recommendations for NGINX Agent:
113-
TBD
114-
115-
## Community
116-
117-
- Our [NGINX Community Forum ](https://community.nginx.org/tag/agent) is the go-to place to ask questions and share your thoughts.
118-
119-
- Our [GitHub issues page](https://github.com/nginx/agent/issues) offers space for a more technical discussion at your own pace.
120-
121-
## Contributing
122-
123-
Get involved with the project by contributing! Please see our [contributing guide](CONTRIBUTING.md) for details.
124-
125-
## Change Log
126-
127-
See our [release page](https://github.com/nginx/agent/releases) to keep track of updates.
128-
129-
## License
130-
131-
[Apache License, Version 2.0](LICENSE)
39+
## Community
40+
If you have any questions please reach out using the [NGINX Community](https://community.nginx.org/)

api/grpc/mpi/v1/files.pb.go

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/grpc/mpi/v1/files.pb.validate.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/grpc/mpi/v1/files.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ message FileOverview {
120120
repeated File files = 1;
121121
// The configuration version of the current set of files
122122
ConfigVersion config_version = 2;
123+
// The config file path of an instance
124+
string config_path = 3;
123125
}
124126

125127
// Represents meta data about a file

docs/proto/protos.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ Represents a collection of files
416416
| ----- | ---- | ----- | ----------- |
417417
| files | [File](#mpi-v1-File) | repeated | A list of files |
418418
| config_version | [ConfigVersion](#mpi-v1-ConfigVersion) | | The configuration version of the current set of files |
419+
| config_path | [string](#string) | | The config file path of an instance |
419420

420421

421422

0 commit comments

Comments
 (0)