Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset agent state in env_status file after sending pingRequest #1329

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy-agent/deployd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
# 2: puppet applied successfully with changes
PUPPET_SUCCESS_EXIT_CODES = [0, 2]

__version__ = '1.2.52'
__version__ = '1.2.53'
6 changes: 6 additions & 0 deletions deploy-agent/deployd/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ def serve_build(self):
self._env_status.dump_envs(self._envs)
# start to ping server to get the latest deploy goal
self._response = self._client.send_reports(self._envs)
# we only need to send RESET once in one deploy-agent run
if len(self._envs) > 0:
for status in self._envs.values():
if status.report.state == "RESET_BY_SYSTEM":
ntascii marked this conversation as resolved.
Show resolved Hide resolved
status.report.state = None
self._env_status.dump_envs(self._envs)

if self._response:
report = self._update_internal_deploy_goal(self._response)
Expand Down
Loading