From 6b0696b94ab17eac901f1fbd884d6050944587ef Mon Sep 17 00:00:00 2001 From: Daniel Adam Date: Mon, 19 Aug 2024 13:53:21 +0200 Subject: [PATCH] fixup! Update Makefile targets dependencies --- .github/workflows/measureMemory.yml | 4 +--- Makefile | 17 ++++++++++------- device-provisioning-service/README.md | 10 ---------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/measureMemory.yml b/.github/workflows/measureMemory.yml index f011846ef..fd114cab8 100644 --- a/.github/workflows/measureMemory.yml +++ b/.github/workflows/measureMemory.yml @@ -280,10 +280,9 @@ jobs: cat /proc/cpuinfo echo "Number of cores: $(nproc)" echo "Number of threads: $(nproc --all)" + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Resolve database id: db @@ -295,7 +294,6 @@ jobs: fi - name: Run a test - continue-on-error: true run: | make test/mem TEST_DATABASE=${{ steps.db.outputs.name }} TEST_MEMORY_COAP_GATEWAY_RESOURCE_DATA_SIZE=${{ matrix.resourceDataSize }} TEST_TIMEOUT=${{ matrix.timeout }} TEST_MEMORY_COAP_GATEWAY_NUM_DEVICES=${{ matrix.numDevices }} TEST_MEMORY_COAP_GATEWAY_NUM_RESOURCES=${{ matrix.numResources }} | tee >(grep "TestMemoryWithDevices.result:" | sed -e "s/.*TestMemoryWithDevices.result://g" | jq -r -c > out.json) diff --git a/Makefile b/Makefile index 49d5eabb0..c99a9f9b1 100644 --- a/Makefile +++ b/Makefile @@ -203,7 +203,7 @@ define RUN-DOCKER-MONGO --name=$(1) \ -v $(WORKING_DIRECTORY)/.tmp/$(1):/data/db \ -v $(CERT_PATH):/certs --user $(USER_ID):$(GROUP_ID) \ - mongo mongod -vvvvv --tlsMode requireTLS --wiredTigerCacheSizeGB 1 --tlsCAFile /certs/root_ca.crt \ + mongo --tlsMode requireTLS --wiredTigerCacheSizeGB 1 --tlsCAFile /certs/root_ca.crt \ --tlsCertificateKeyFile /certs/mongo.key $(2) endef @@ -215,9 +215,9 @@ MONGODB_REPLICA_2 := mongo2 MONGODB_REPLICA_2_PORT := 27019 mongo: certificates - $(call RUN-DOCKER-MONGO,$(MONGODB_REPLICA_0),--replSet myReplicaSet --bind_ip localhost --port $(MONGODB_REPLICA_0_PORT)) - $(call RUN-DOCKER-MONGO,$(MONGODB_REPLICA_1),--replSet myReplicaSet --bind_ip localhost --port $(MONGODB_REPLICA_1_PORT)) - $(call RUN-DOCKER-MONGO,$(MONGODB_REPLICA_2),--replSet myReplicaSet --bind_ip localhost --port $(MONGODB_REPLICA_2_PORT)) + $(call RUN-DOCKER-MONGO,$(MONGODB_REPLICA_0),-vvvvv --replSet myReplicaSet --bind_ip localhost --port $(MONGODB_REPLICA_0_PORT)) + $(call RUN-DOCKER-MONGO,$(MONGODB_REPLICA_1),-vvvvv --replSet myReplicaSet --bind_ip localhost --port $(MONGODB_REPLICA_1_PORT)) + $(call RUN-DOCKER-MONGO,$(MONGODB_REPLICA_2),-vvvvv --replSet myReplicaSet --bind_ip localhost --port $(MONGODB_REPLICA_2_PORT)) COUNTER=0; \ while [[ $${COUNTER} -lt 30 ]]; do \ echo "Checking mongodb connection ($${COUNTER}):"; \ @@ -441,14 +441,17 @@ simulators/dps: simulators/dps/clean simulators/clean: simulators/dps/clean simulators: simulators/dps -env: clean certificates nats privateKeys http-gateway-www simulators +env: clean certificates nats privateKeys http-gateway-www mongo simulators env/test/mem: clean certificates nats privateKeys ifeq ($(TEST_DATABASE),mongodb) -env: mongo -env/test/mem: mongo +# github runners run out of file space if multiple mongodb replicas are started, so we start only a single instance +env/test/mem: mongo-no-replicas else +# test uses mongodb for most tests, but scylla can be enabled for some; so we always need mongodb to be running +# but scylla needs to be started only if TEST_DATABASE=cqldb env: scylla +# test/mem uses either mongodb or scylla, so just one needs to be started env/test/mem: scylla endif diff --git a/device-provisioning-service/README.md b/device-provisioning-service/README.md index 48fae247a..c14aa97b8 100644 --- a/device-provisioning-service/README.md +++ b/device-provisioning-service/README.md @@ -171,13 +171,3 @@ OAuth2.0 Client is used to obtain JWT with ownerClaim and deviceIDClaim via the ::: tip Audience You might have one client, but multiple APIs registered in the OAuth2.0 Server. What you might want to prevent is to be able to contact all the APIs of your system with one token. This audience allows you to request the token for a specific API. If you configure it to myplgdc2c.api in the Auth0, you have to set it here if you want to also validate it. ::: - -### Task Queue - -| Property | Type | Description | Default | -| ---------- | -------- | -------------- | ------- | -| `taskQueue.goPoolSize` | int | `Maximum number of running goroutine instances.` | `1600` | -| `taskQueue.size` | int | `Size of queue. If it exhausted, submit returns error.` | `2097152` | -| `taskQueue.maxIdleTime` | string | `Sets up the interval time of cleaning up goroutines. Zero means never cleanup.` | `10m` | - -> Note that the string type related to time (i.e. timeout, idleConnTimeout, expirationTime) is decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us", "ms", "s", "m", "h".