Skip to content

Commit

Permalink
Use the old deploy status metric (#1245)
Browse files Browse the repository at this point in the history
* Use the old deploy status metric

* Update tests
  • Loading branch information
ntascii authored Aug 31, 2023
1 parent 26ad5fc commit 63f58a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deploy-agent/deployd/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _send_deploy_status_stats(self, deploy_report):
if deploy_report.status_code:
tags['status_code'] = deploy_report.status_code

create_sc_increment('deployd.stats.deploy.status', tags=tags)
create_sc_increment('deployd.stats.deploy.status.sum', tags=tags)

def serve_build(self):
"""This is the main function of the ``DeployAgent``.
Expand Down
2 changes: 1 addition & 1 deletion deploy-agent/tests/unit/deploy/server/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def test_send_deploy_status(self, mock_create_sc):
agent = DeployAgent(client=client, estatus=estatus, conf=self.config,
executor=self.executor, helper=self.helper)
agent.serve_build()
mock_create_sc.assert_called_once_with('deployd.stats.deploy.status', tags={
mock_create_sc.assert_called_once_with('deployd.stats.deploy.status.sum', tags={
'first_run': False, 'deploy_stage': 'PRE_DOWNLOAD', 'env_name': 'abc', 'stage_name': 'beta', 'status_code': 'SUCCEEDED'})
self.assertEqual(agent._curr_report.report.deployStage, DeployStage.PRE_DOWNLOAD)
self.assertEqual(agent._curr_report.report.status, AgentStatus.SUCCEEDED)
Expand Down
5 changes: 2 additions & 3 deletions deploy-agent/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py36,py37,py38,py39
envlist=py36,py38
recreate=True

[flake8]
Expand All @@ -13,6 +13,5 @@ commands=py.test --cov=deployd {posargs}
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39

0 comments on commit 63f58a3

Please sign in to comment.