Skip to content
Closed
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 src/lando/api/legacy/workers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _start(self, max_loops: int | None = None, *args, **kwargs):
while self._paused:
# Wait a set number of seconds before checking paused variable again.
logger.info(
f"Paused, waiting {self.worker_instance.sleep_seconds} seconds..."
f"{self.worker_instance.name} paused, waiting {self.worker_instance.sleep_seconds} seconds..."
)
self.throttle(self.worker_instance.sleep_seconds)
self.loop(*args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion src/lando/api/legacy/workers/landing_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,5 +566,5 @@ def bootstrap_repos(self):
except Exception as exc:
sentry_sdk.capture_exception(exc)
logger.warning(
f"Unexpected error `running mach` bootstrap for repo {repo.name}: {exc}"
f"Unexpected error running `mach bootstrap` for repo {repo.name}: {exc}"
)
2 changes: 1 addition & 1 deletion src/lando/dockerflow/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _wrapped_view(self, request, *args, **kwargs): # noqa: ANN001
"t": int(1000 * (end_time - start_time)),
}

request_logger.info("Request Summary: ", extra=summary)
request_logger.debug("Request Summary: ", extra=summary)

return response

Expand Down
11 changes: 11 additions & 0 deletions src/lando/main/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ def format(self, record: logging.LogRecord) -> str:
# (for example, the WSGIRequest object representing the request). Therefore
# those values are converted to a string to avoid any issues when serializing.
mozlog_record = {
# MozLog https://firefox-source-docs.mozilla.org/mozbase/mozlog.html#data-format
"action": "log",
"time": int(record.created * 1e3),
# We're single-threaded, but might as well report something useful.
"thread": self.hostname,
"pid": record.process,
"source": record.name,
# log action
"level": record.levelname,
"message": record.getMessage(),
# Old format
"EnvVersion": self.MOZLOG_ENVVERSION,
"Hostname": self.hostname,
"Logger": self.mozlog_logger,
Expand Down
6 changes: 5 additions & 1 deletion src/lando/remote_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"BACKEND": "storages.backends.gcloud.GoogleCloudStorage",
},
}
STATIC_URL = os.getenv("STATIC_URL")

# If missing, we default to `STATIC_URL`, from the `from settings import *`.
# This allows the code to run in a local environment configured to simulate a remote
# environment.
STATIC_URL = os.getenv("STATIC_URL", STATIC_URL) # noqa: F405
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear why we are doing this here. All remote environments should set their own value here, vs. using what's in lando.settings. Can you add a comment explaining the reasoning behind this?

Copy link
Member Author

@shtrom shtrom Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this comment to the code:

If missing, we default to STATIC_URL, from the from settings import *.
This allows the code to run in a local environment configured to simulate a remote
environment.

Alternatively, we could add a commented-out definition of STATIC_URL in the compose.yaml file alongside ENVIRONMENT and DJANGO_SETTINGS_MODULE, but I thought it was better to make the issue self-correcting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think this could be better handled, given that we may handle this stuff with a make command or other type of script. I.e., we could set this value explicitly in the environment when in "simulate remote environment" mode without needing to have a special case for this value here.

GS_BUCKET_NAME = os.getenv("GS_BUCKET_NAME")
GS_PROJECT_ID = os.getenv("GS_PROJECT_ID")
GS_QUERYSTRING_AUTH = False
Expand Down