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

Pull request update/241204 #483

Merged
merged 3 commits into from
Dec 4, 2024
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
7 changes: 4 additions & 3 deletions docker_images/cleanmongodb/clean-mongo-db.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,6 @@ def split_chunk_by_files(self, chunk, available_rows_count, filename,
return result

def _delete_by_organization(self, org_id, token, infra_token):
if not token:
self.update_cleaned_at(organization_id=org_id)
return
keeper_collections = [
self.mongo_client.keeper.event
]
Expand All @@ -342,6 +339,10 @@ def _delete_by_organization(self, org_id, token, infra_token):
for collection in restapi_collections:
self.limits[collection] = self.delete_in_chunks(
collection, 'organization_id', org_id)

if not token:
self.update_cleaned_at(organization_id=org_id)
return
for collection in arcee_collections:
self.limits[collection] = self.delete_in_chunks(
collection, 'token', token)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
isEnvironmentAvailable
});
},
dataTestId: `btn_book_${index}`
// requiredActions: ["BOOK_ENVIRONMENTS"]
dataTestId: `btn_book_${index}`,
requiredActions: ["BOOK_ENVIRONMENTS"]
});

const getReleaseAction = (activeBooking, index) => ({
Expand Down
15 changes: 8 additions & 7 deletions slacker/slacker_server/message_templates/env_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,16 @@ def get_message_acquired(resource_id, resource_name, public_ip, org_id,
def get_env_property_updated_block(env_properties, public_ip, resource_id):
env_properties_blocks = []
for prop in env_properties[:5]:
env_properties_blocks.append({
env_properties_blocks.extend([{
"type": "section",
"text": {
"type": "mrkdwn",
"text": f"*Name:*\n{prop['name']}\n"
f"*Previous value:* \n{prop['previous_value']}\n"
f"*New value:*\n{prop['new_value']}"
}
})
"text": f"*Property name:* {prop['name']}\n"
f"*Previous value:* {prop['previous_value'] or '-'}\n"
f"*New value:* {prop['new_value'] or '-'}"
}},
{"type": "divider"}
])
if len(env_properties) > 5:
env_properties_blocks.append(
{
Expand Down Expand Up @@ -172,7 +173,7 @@ def get_current_env_property_block(curr_env_properties):

text = ''
for prop_name, value in curr_env_properties.items():
text = text + f"*{prop_name}:*\n{value}\n"
text = text + f"*{prop_name}:* {value}\n"

if not text:
text = '-'
Expand Down
Loading