Skip to content

Commit

Permalink
fixup! Update Makefile targets dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed Aug 19, 2024
1 parent f494069 commit 6b0696b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/measureMemory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}):"; \
Expand Down Expand Up @@ -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

Expand Down
10 changes: 0 additions & 10 deletions device-provisioning-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".

0 comments on commit 6b0696b

Please sign in to comment.