Merge pull request #25 from Aignosi/fix/SIENTIAPDE-1273

SIENTIAPDE-1273: Update GITHUB_BRANCH, Helm Chart Version, Metrics Registration, and Test Cases
This commit is contained in:
Matheus Demoner
2025-11-19 16:56:41 -03:00
committed by GitHub
3 changed files with 14 additions and 11 deletions

View File

@@ -309,11 +309,13 @@ class Gates(SientiaMonitoring):
# Register metrics
for _, row in tag_values.iterrows():
metrics.TAG_CHANGES_MONITOR.labels(
pod_id=self.pod_id,
model_name=metadata['model_name'],
workflow_name=metadata['workflow_name'],
tag_name=row['variable'],
).set(row['value'])
value = row['value']
if value is not None:
metrics.TAG_CHANGES_MONITOR.labels(
pod_id=self.pod_id,
model_name=metadata['model_name'],
workflow_name=metadata['workflow_name'],
tag_name=row['variable'],
).set(row['value'])
self.info(f'Metrics written for {metadata["model_name"]}', metadata=metadata)

View File

@@ -382,8 +382,8 @@ async def test_write_metrics(mock_metrics, gates_fixture):
input_data = {
'metadata': metadata['metadata'],
'tag_values': {
'variable': ['tag1', 'tag2'],
'value': [1.0, 2.0],
'variable': ['tag1', 'tag2', 'tag3'],
'value': [1.0, 2.0, None],
},
}
await gates_fixture.write_metrics(input_data)
@@ -394,6 +394,7 @@ async def test_write_metrics(mock_metrics, gates_fixture):
)
mock_metrics.LABORIOUS_DATA_WRITTEN_COUNT.labels.return_value.inc.assert_called_once()
# Only tags with None values should be registered
mock_metrics.TAG_CHANGES_MONITOR.labels.return_value.set.assert_has_calls(
[
call(1.0),

View File

@@ -11,7 +11,7 @@ image:
# This sets the pull policy for images.
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "0.5.0"
tag: "0.5.2"
# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets:
@@ -150,7 +150,7 @@ env:
- name: GITHUB_REPO_URL
value: "git@github.com:Aignosi/sientia-dataops-scouter_temporal.git"
- name: GITHUB_BRANCH
value: "feature/SIENTIAPDE-1325-adicionar-metricas-especificas-de-operacoes-externas"
value: "fix/SIENTIAPDE-1273"
- name: PYTHON_APP
value: "scouter.worker.worker"
@@ -219,7 +219,7 @@ ssh:
# kubectl create secret docker-registry docker-hub-secret --namespace sientia --docker-server=http://aignosi.azurecr.io --docker-username=aignosi --docker-password=5I5zpQ6sRaHqX1hD3dr+2mo647yO3FRc359/wu6gsP+ACRDRz5mp
# helm upgrade --install sientia-scouter-worker sientia/sientia-module -n sientia --create-namespace -f ./values.yaml --version 0.5.0
# helm upgrade --install sientia-scouter-worker sientia/sientia-module -n sientia --create-namespace -f ./values.yaml --version 0.6.0
# kubectl create secret generic git-ssh-key-sientia-scouter-worker \
# --namespace sientia \