Skip to content

Commit

Permalink
Modify do not delete dashboard not final state
Browse files Browse the repository at this point in the history
  • Loading branch information
juztas authored Nov 8, 2024
1 parent f8828c9 commit fa4e601
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion autogole-api/src/python/RTMon/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,17 @@ def _getAllInstances(self):
fd.write(dumpJson(fout, self.logger))
if item['state'] in self.goodStates:
self.auth_instances[os.environ["SENSE_AUTH_OVERRIDE_NAME"]].append(item['referenceUUID'])
elif item['state'].startswith('MODIFY') and item['state'].endswith('FAILED'):
# Means modify has failed, and we should not add in good instance list, so that dashboard is removed
self.logger.info('Instance not in correct state (will be removed next run if still present: %s, %s', item['referenceUUID'], item['state'])
elif item['state'].startswith('MODIFY') and not item['state'].endswith('FAILED'):
# Modification is ongoing, and we are not sure on changes yet. Keep it as is for now
self.auth_instances[os.environ["SENSE_AUTH_OVERRIDE_NAME"]].append(item['referenceUUID'])
self.logger.info('Instance in MODIFY not final state: %s, %s', item['referenceUUID'], item['state'])
else:
self.logger.info('Instance not in correct state: %s, %s', item['referenceUUID'], item['state'])
self.logger.info('Instance in not correct state (will be removed next run if still present): %s, %s', item['referenceUUID'], item['state'])


def main(self):
""" Main Method"""
# 1. Identify all files and submitted items;
Expand Down

0 comments on commit fa4e601

Please sign in to comment.