Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikMatiasko committed Aug 21, 2024
2 parents 85c2f78 + 171571d commit 33b9abd
Show file tree
Hide file tree
Showing 178 changed files with 24,144 additions and 1,486 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ jobs:
directory: m2m-oauth-server
file: .tmp/docker/m2m-oauth-server/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: device-provisioning-service
directory: device-provisioning-service
file: .tmp/docker/device-provisioning-service/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: test-device-provisioning-service
directory: test/device-provisioning-service
file: test/device-provisioning-service/Dockerfile
uses: ./.github/workflows/build-publish-cfg.yaml
with:
name: ${{ matrix.name }}
Expand Down
52 changes: 48 additions & 4 deletions .github/workflows/measureMemory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,41 +70,49 @@ jobs:
numDevices: 1
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/1/size/1KB
numDevices: 1
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/125/size/16KB
numDevices: 1
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/125/size/1KB
numDevices: 1
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/250/size/16KB
numDevices: 1
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/250/size/1KB
numDevices: 1
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/500/size/16KB
numDevices: 1
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/500/size/1KB
numDevices: 1
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 100
logLevel: info
logDumpBody: true
timeout: 120m
Expand All @@ -113,164 +121,196 @@ jobs:
numDevices: 1000
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/1/size/1KB
numDevices: 1000
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/125/size/16KB
numDevices: 1000
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/125/size/1KB
numDevices: 1000
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/250/size/16KB
numDevices: 1000
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/250/size/1KB
numDevices: 1000
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/500/size/16KB
numDevices: 1000
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/500/size/1KB
numDevices: 1000
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 250
timeout: 120m
#2500
- name: devices/2500/resources/1/size/16KB
numDevices: 2500
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/1/size/1KB
numDevices: 2500
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/125/size/16KB
numDevices: 2500
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/125/size/1KB
numDevices: 2500
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/250/size/16KB
numDevices: 2500
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/250/size/1KB
numDevices: 2500
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/250/size/16KB
numDevices: 2500
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/500/size/1KB
numDevices: 2500
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 350
timeout: 120m
#5000
- name: devices/5000/resources/1/size/16KB
numDevices: 5000
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/1/size/1KB
numDevices: 5000
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/125/size/16KB
numDevices: 5000
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/125/size/1KB
numDevices: 5000
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/250/size/16KB
numDevices: 5000
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/250/size/1KB
numDevices: 5000
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/500/size/16KB
numDevices: 5000
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/500/size/1KB
numDevices: 5000
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 500
timeout: 120m
#10000
- name: devices/10000/resources/1/size/16KB
numDevices: 10000
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/1/size/1KB
numDevices: 10000
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/125/size/16KB
numDevices: 10000
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/125/size/1KB
numDevices: 10000
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/250/size/16KB
numDevices: 10000
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/250/size/1KB
numDevices: 10000
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/500/size/4KB
numDevices: 10000
numResources: 500
resourceDataSize: 4096
expectedRssInMb: 800
timeout: 300m
- name: devices/10000/resources/500/size/1KB
numDevices: 10000
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 800
timeout: 120m

# Steps represent a sequence of tasks that will be executed as part of the job
Expand All @@ -280,10 +320,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,9 +334,14 @@ jobs:
fi
- name: Run a test
continue-on-error: true
shell: bash -eo pipefail {0}
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)
make test/mem TEST_DATABASE=${{ steps.db.outputs.name }} \
TEST_MEMORY_COAP_GATEWAY_EXPECTED_RSS_IN_MB=${{ matrix.expectedRssInMb }} \
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)
- name: Dump file
if: success()
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ 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:
Expand Down Expand Up @@ -130,7 +131,7 @@ jobs:
- name: Remove simulators container
if: ${{ always() }}
run: |
make simulators/remove
make simulators/remove simulators/bridge/remove simulators/dps/remove
- name: Collect cloud server logs when the test fails
if: ${{ failure() }}
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ issues:
- path: resource-aggregate/events/resourceLinks.*.go|resource-aggregate/client/sync.*.go|resource-aggregate/service/grpcApi.go|resource-aggregate/events/resource.*.go
linters:
- dupl
- path: device-provisioning-service/test/provisionHandler.go
linters:
- dupl
# Fix found issues (if it's supported by the linter).
# fix: true

Expand Down
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,24 @@
"TEST_SNIPPET_SERVICE_LOG_DUMP_BODY": "false",
"TEST_DATABASE": "mongoDB",
"TEST_BRIDGE_DEVICE_CONFIG": "${workspaceFolder}/.tmp/bridge/config-test.yaml",
"TEST_DPS_ROOT_CA_CERT_ALT": "${workspaceFolder}/.tmp/certs/device/root_ca_alt.crt",
"TEST_DPS_ROOT_CA_KEY_ALT": "${workspaceFolder}/.tmp/certs/device/root_ca_alt.key",
"TEST_DPS_INTERMEDIATE_CA_CERT": "${workspaceFolder}/.tmp/certs/device/intermediatecacrt.pem",
"TEST_DPS_INTERMEDIATE_CA_KEY": "${workspaceFolder}/.tmp/certs/device/intermediatecakey.pem",
// "TEST_LEAD_RESOURCE_TYPE_FILTER": "first",
// "TEST_LEAD_RESOURCE_TYPE_REGEX_FILTER": "oic\\.wk\\..*,^/light/\\d+$",
// "TEST_LEAD_RESOURCE_TYPE_USE_UUID": "true",
// "TEST_DEVICE_NAME": "bridged-device-0",
// "TEST_DEVICE_TYPE": "bridged",
// "GODEBUG": "scavtrace=1",
// "TEST_COAP_GATEWAY_UDP_ENABLED": "true",
// "TEST_DPS_UDP_ENABLED": "false",
// "GOMAXPROCS": 1,
// "GOFLAGS":"-mod=vendor",
// "GRPC_VERBOSITY":"DEBUG",
// "GRPC_GO_LOG_VERBOSITY_LEVEL":99,
// "GRPC_GO_LOG_SEVERITY_LEVEL":"info",
// "PION_LOG_TRACE=all"
},
"go.testTimeout": "600s",
"go.buildFlags": [
Expand Down
Loading

0 comments on commit 33b9abd

Please sign in to comment.