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

Update Resource Processor logging and disk size #2486

Merged
merged 3 commits into from
Aug 21, 2022
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 resource_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.1"
__version__ = "0.4.2"
11 changes: 9 additions & 2 deletions resource_processor/shared/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,18 @@ def shell_output_logger(console_output: str, prefix_item: str, logger: logging.L
"""
Logs the shell output (stdout/err) a line at a time with an option to remove ANSI control chars.
"""
logger.log(logging_level, prefix_item)

if not console_output:
logging.debug("shell console output is empty.")
return

if (logging_level != logging.INFO
and len(console_output) < 200
and console_output.startswith("Unable to find image '")
and console_output.endswith("' locally")):
logging.debug("Image not present locally, setting log to INFO.")
logging_level = logging.INFO

logger.log(logging_level, prefix_item)
logger.log(logging_level, console_output)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ write_files:
set -o errexit
used_percent=$(df / --output=pcent | tail -1 | sed 's/[^0-9]//g')
echo "Used disk space percent: $${used_percent}"
if (( used_percent > 60 )); then
if (( used_percent > 70 )); then
echo "Free space too low, pruning..."
docker system prune -f
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "vm_linux" {
os_disk {
storage_account_type = "Standard_LRS"
caching = "ReadWrite"
disk_size_gb = 64
}

network_interface {
Expand Down
2 changes: 1 addition & 1 deletion templates/core/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.15"
__version__ = "0.4.16"