Skip to content

Commit 812389e

Browse files
committed
test
1 parent 4fe1f6a commit 812389e

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ APK_PACKAGE := ./build/$(PACKAGE_NAME).apk
6060
DEB_PACKAGE := ./build/$(PACKAGE_NAME).deb
6161
RPM_PACKAGE := ./build/$(PACKAGE_NAME).rpm
6262

63-
MOCK_MANAGEMENT_PLANE_CONFIG_DIRECTORY ?= /mnt/hgfs/go/configs/
64-
MOCK_MANAGEMENT_PLANE_LOG_LEVEL ?= DEBUG
65-
MOCK_MANAGEMENT_PLANE_GRPC_ADDRESS ?= 127.0.0.1:9091
66-
MOCK_MANAGEMENT_PLANE_API_ADDRESS ?= 127.0.0.1:9092
63+
MOCK_MANAGEMENT_PLANE_CONFIG_DIRECTORY ?=
64+
MOCK_MANAGEMENT_PLANE_LOG_LEVEL ?= INFO
65+
MOCK_MANAGEMENT_PLANE_GRPC_ADDRESS ?= 127.0.0.1:0
66+
MOCK_MANAGEMENT_PLANE_API_ADDRESS ?= 127.0.0.1:0
6767
OLD_BENCHMARK_RESULTS_FILE ?= $(TEST_BUILD_DIR)/benchmark.txt
6868

6969
uname_m := $(shell uname -m)

internal/watcher/watcher_plugin.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ func (w *Watcher) handleConfigApplyRequest(ctx context.Context, msg *bus.Message
153153

154154
w.watcherMutex.Lock()
155155
defer w.watcherMutex.Unlock()
156+
slog.Info("Apply In Progress Set")
156157
w.instancesWithConfigApplyInProgress = append(w.instancesWithConfigApplyInProgress, instanceID)
157158
w.fileWatcherService.SetEnabled(false)
158159
}
@@ -168,7 +169,7 @@ func (w *Watcher) handleConfigApplySuccess(ctx context.Context, msg *bus.Message
168169

169170
instanceID := response.GetInstanceId()
170171

171-
slog.Info("handleConfigApplySuccess start")
172+
slog.Info("handleConfigApplySuccess start, deleting in progress set")
172173
w.watcherMutex.Lock()
173174
w.instancesWithConfigApplyInProgress = slices.DeleteFunc(
174175
w.instancesWithConfigApplyInProgress,
@@ -200,6 +201,7 @@ func (w *Watcher) handleConfigApplyComplete(ctx context.Context, msg *bus.Messag
200201

201202
instanceID := response.GetInstanceId()
202203

204+
slog.Info("handleConfigApplyComplete start, deleting in progress set")
203205
w.watcherMutex.Lock()
204206
defer w.watcherMutex.Unlock()
205207
w.instancesWithConfigApplyInProgress = slices.DeleteFunc(

nginx-agent.conf

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
log:
88
# set log level (error, info, debug; default "info")
9-
level: debug
9+
level: info
1010
# set log path. if empty, don't log to file.
1111
path: /var/log/nginx-agent/
1212

@@ -17,14 +17,6 @@ allowed_directories:
1717
- /var/run/nginx
1818
- /var/log/nginx
1919

20-
command:
21-
server:
22-
# the server host to connect to in order to send and receive commands e.g. config apply instructions
23-
host: 127.0.0.1
24-
# the server port to connect to in order to send and receive commands e.g. config apply instructions
25-
port: 9091
26-
# the type of connection. Options are "grpc" or "http"
27-
type: grpc
2820
## command server settings
2921
# command:
3022
# server:

0 commit comments

Comments
 (0)