Remove obsolete slusters config section

This commit is contained in:
2026-01-14 11:17:49 +01:00
parent 0ea0270fe1
commit c8627a13f4
8 changed files with 19 additions and 189 deletions

View File

@@ -48,7 +48,7 @@ const configString = `
"emission-constant": 317 "emission-constant": 317
}, },
"cron": { "cron": {
"commit-job-worker": "2m", "commit-job-worker": "1m",
"duration-worker": "5m", "duration-worker": "5m",
"footprint-worker": "10m" "footprint-worker": "10m"
}, },
@@ -60,31 +60,7 @@ const configString = `
"jwts": { "jwts": {
"max-age": "2000h" "max-age": "2000h"
} }
}, }
"clusters": [
{
"name": "name",
"metricDataRepository": {
"kind": "cc-metric-store",
"url": "http://localhost:8082",
"token": ""
},
"filterRanges": {
"numNodes": {
"from": 1,
"to": 64
},
"duration": {
"from": 0,
"to": 86400
},
"startTime": {
"from": "2023-01-01T00:00:00Z",
"to": null
}
}
}
]
} }
` `

View File

@@ -29,52 +29,6 @@
"username": "root", "username": "root",
"password": "root" "password": "root"
}, },
"clusters": [
{
"name": "fritz",
"metricDataRepository": {
"kind": "cc-metric-store-internal",
"url": "http://localhost:8082",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9BTkFMWVNUIiwiUk9MRV9VU0VSIl19.d-3_3FZTsadPjDEdsWrrQ7nS0edMAR4zjl-eK7rJU3HziNBfI9PDHDIpJVHTNN5E5SlLGLFXctWyKAkwhXL-Dw"
},
"filterRanges": {
"numNodes": {
"from": 1,
"to": 64
},
"duration": {
"from": 0,
"to": 86400
},
"startTime": {
"from": "2022-01-01T00:00:00Z",
"to": null
}
}
},
{
"name": "alex",
"metricDataRepository": {
"kind": "cc-metric-store-internal",
"url": "http://localhost:8082",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9BTkFMWVNUIiwiUk9MRV9VU0VSIl19.d-3_3FZTsadPjDEdsWrrQ7nS0edMAR4zjl-eK7rJU3HziNBfI9PDHDIpJVHTNN5E5SlLGLFXctWyKAkwhXL-Dw"
},
"filterRanges": {
"numNodes": {
"from": 1,
"to": 64
},
"duration": {
"from": 0,
"to": 86400
},
"startTime": {
"from": "2022-01-01T00:00:00Z",
"to": null
}
}
}
],
"metric-store": { "metric-store": {
"checkpoints": { "checkpoints": {
"file-format": "avro", "file-format": "avro",
@@ -99,4 +53,3 @@
] ]
} }
} }

View File

@@ -11,10 +11,7 @@
"resampling": { "resampling": {
"minimumPoints": 600, "minimumPoints": 600,
"trigger": 180, "trigger": 180,
"resolutions": [ "resolutions": [240, 60]
240,
60
]
}, },
"apiSubjects": { "apiSubjects": {
"subjectJobEvent": "cc.job.event", "subjectJobEvent": "cc.job.event",
@@ -22,37 +19,12 @@
} }
}, },
"cron": { "cron": {
"commit-job-worker": "2m", "commit-job-worker": "1m",
"duration-worker": "5m", "duration-worker": "5m",
"footprint-worker": "10m" "footprint-worker": "10m"
}, },
"archive": { "archive": {
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
}, }
"clusters": [
{
"name": "test",
"metricDataRepository": {
"kind": "cc-metric-store",
"url": "http://localhost:8082",
"token": "eyJhbGciOiJF-E-pQBQ"
},
"filterRanges": {
"numNodes": {
"from": 1,
"to": 64
},
"duration": {
"from": 0,
"to": 86400
},
"startTime": {
"from": "2022-01-01T00:00:00Z",
"to": null
}
}
}
]
} }

View File

@@ -39,33 +39,22 @@ func setup(t *testing.T) *api.RestAPI {
repository.ResetConnection() repository.ResetConnection()
const testconfig = `{ const testconfig = `{
"main": { "main": {
"addr": "0.0.0.0:8080", "addr": "0.0.0.0:8080",
"validate": false, "validate": false,
"apiAllowedIPs": [ "apiAllowedIPs": [
"*" "*"
] ]
}, },
"archive": { "archive": {
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
}, },
"auth": { "auth": {
"jwts": { "jwts": {
"max-age": "2m" "max-age": "2m"
}
} }
},
"clusters": [
{
"name": "testcluster",
"metricDataRepository": {"kind": "test", "url": "bla:8081"},
"filterRanges": {
"numNodes": { "from": 1, "to": 64 },
"duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
}
}
]
}` }`
const testclusterJSON = `{ const testclusterJSON = `{
"name": "testcluster", "name": "testcluster",

View File

@@ -48,18 +48,7 @@ func setupNatsTest(t *testing.T) *NatsAPI {
"jwts": { "jwts": {
"max-age": "2m" "max-age": "2m"
} }
},
"clusters": [
{
"name": "testcluster",
"metricDataRepository": {"kind": "test", "url": "bla:8081"},
"filterRanges": {
"numNodes": { "from": 1, "to": 64 },
"duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
}
} }
]
}` }`
const testclusterJSON = `{ const testclusterJSON = `{
"name": "testcluster", "name": "testcluster",

View File

@@ -56,36 +56,8 @@ func setup(t *testing.T) *repository.JobRepository {
"archive": { "archive": {
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
}, }
"clusters": [ }`
{
"name": "testcluster",
"metricDataRepository": {"kind": "test", "url": "bla:8081"},
"filterRanges": {
"numNodes": { "from": 1, "to": 64 },
"duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
}
},
{
"name": "fritz",
"metricDataRepository": {"kind": "test", "url": "bla:8081"},
"filterRanges": {
"numNodes": { "from": 1, "to": 944 },
"duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
}
},
{
"name": "taurus",
"metricDataRepository": {"kind": "test", "url": "bla:8081"},
"filterRanges": {
"numNodes": { "from": 1, "to": 4000 },
"duration": { "from": 0, "to": 604800 },
"startTime": { "from": "2010-01-01T00:00:00Z", "to": null }
}
}
]}`
cclog.Init("info", true) cclog.Init("info", true)
tmpdir := t.TempDir() tmpdir := t.TempDir()

View File

@@ -38,18 +38,7 @@ func nodeTestSetup(t *testing.T) {
"jwts": { "jwts": {
"max-age": "2m" "max-age": "2m"
} }
},
"clusters": [
{
"name": "testcluster",
"metricDataRepository": {"kind": "test", "url": "bla:8081"},
"filterRanges": {
"numNodes": { "from": 1, "to": 64 },
"duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
}
} }
]
}` }`
const testclusterJSON = `{ const testclusterJSON = `{
"name": "testcluster", "name": "testcluster",

View File

@@ -27,17 +27,7 @@ func setupUserTest(t *testing.T) *UserCfgRepo {
"archive": { "archive": {
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
},
"clusters": [
{
"name": "testcluster",
"metricDataRepository": {"kind": "test", "url": "bla:8081"},
"filterRanges": {
"numNodes": { "from": 1, "to": 64 },
"duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
} }
}]
}` }`
cclog.Init("info", true) cclog.Init("info", true)