Skip to content

Commit

Permalink
Revert "Make values easier to comprehend"
Browse files Browse the repository at this point in the history
This reverts commit 68928e4.
  • Loading branch information
bastjan committed Dec 22, 2022
1 parent aa67f3b commit c9b2659
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
10 changes: 8 additions & 2 deletions pkg/db/seeds/promtest/appuio_cloud_loadbalancer.jsonnet
Expand Up @@ -41,11 +41,14 @@ local baseCalculatedLabels = {

c.test('unrelated kube_namespace_labels changes do not throw errors - there is an overlap since series go stale only after a few missed scrapes',
baseSeries {
testprojectNamespaceOrgLabel+: {
values: '1x10 _x10 stale',
},
testprojectNamespaceOrgLabelUpdated: self.testprojectNamespaceOrgLabel {
_labels+:: {
custom_appuio_io_myid: '672004be-a86b-44e0-b446-1255a1f8b340',
},
values: '_x5 1x5',
values: '_x5 1x15',
},
},
query,
Expand All @@ -56,14 +59,17 @@ local baseCalculatedLabels = {

c.test('organization changes do not throw many-to-many errors - there is an overlap since series go stale only after a few missed scrapes',
baseSeries {
testprojectNamespaceOrgLabel+: {
values: '1x7 _x10 stale',
},
testprojectNamespaceOrgLabelUpdated: self.testprojectNamespaceOrgLabel {
_labels+:: {
label_appuio_io_organization: 'carrot-pickers-inc',
},
// We cheat here and use an impossible value.
// Since we use min() and bottomk() in the query this priotizes this series less than the other.
// It's ugly but it prevents flaky tests since otherwise one of the series gets picked randomly.
values: '_x2 2x8',
values: '_x2 2x15',
},
},
query,
Expand Down
6 changes: 4 additions & 2 deletions pkg/db/seeds/promtest/appuio_cloud_memory.jsonnet
Expand Up @@ -230,6 +230,9 @@ local subQueryTests = [

c.test('organization changes do not throw many-to-many errors - there is an overlap since series go stale only after a few missed scrapes',
baseSeries {
testprojectNamespaceOrgLabel+: {
values: '1x7 _x10 stale',
},
testprojectNamespaceOrgLabelUpdated: self.testprojectNamespaceOrgLabel {
_labels+:: {
label_appuio_io_organization: 'carrot-pickers-inc',
Expand All @@ -238,14 +241,13 @@ local subQueryTests = [
// Since we use min() and bottomk() in the query this priotizes this series less than the other.
// It's ugly but it prevents flaky tests since otherwise one of the series gets picked randomly.
// Does not influence the result. The result is flored to a minimum of 128MiB.
values: '_x2 2x8',
values: '_x2 2x15',
},
},
query,
[
{
labels: c.formatLabels(baseCalculatedLabels),
// TODO Identify why this is the case.
// Same as above it's 11*128 other queries don't have this problem
value: 128 * 9,
},
Expand Down
12 changes: 9 additions & 3 deletions pkg/db/seeds/promtest/appuio_cloud_persistent_storage.jsonnet
Expand Up @@ -77,11 +77,14 @@ local baseCalculatedLabels = {

c.test('unrelated kube_namespace_labels changes do not throw errors - there is an overlap since series go stale only after a few missed scrapes',
baseSeries {
testprojectNamespaceOrgLabel+: {
values: '1x10 _x10 stale',
},
testprojectNamespaceOrgLabelUpdated: self.testprojectNamespaceOrgLabel {
_labels+:: {
custom_appuio_io_myid: '672004be-a86b-44e0-b446-1255a1f8b340',
},
values: '_x5 1x5',
values: '_x5 1x15',
},
},
query,
Expand All @@ -92,15 +95,18 @@ local baseCalculatedLabels = {

c.test('organization changes do not throw many-to-many errors - there is an overlap since series go stale only after a few missed scrapes',
baseSeries {
testprojectNamespaceOrgLabel+: {
values: '1x7 _x10 stale',
},
testprojectNamespaceOrgLabelUpdated: self.testprojectNamespaceOrgLabel {
_labels+:: {
label_appuio_io_organization: 'carrot-pickers-inc',
},
// We cheat here and use an impossible value.
// Since we use min() and bottomk() in the query this priotizes this series less than the other.
// It's ugly but it prevents flaky tests since otherwise one of the series gets picked randomly.
// Does not influence the result. The result is floored to a minimum of 1GiB.
values: '_x2 2x8',
// Does not influence the result. The result is flored to a minimum of 1GiB.
values: '_x2 2x15',
},
},
query,
Expand Down

0 comments on commit c9b2659

Please sign in to comment.