Skip to content

Chore/logging messaging events#44

Open
wakonig wants to merge 2 commits intomainfrom
chore/logging_messaging_events
Open

Chore/logging messaging events#44
wakonig wants to merge 2 commits intomainfrom
chore/logging_messaging_events

Conversation

@wakonig
Copy link
Member

@wakonig wakonig commented Mar 21, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 21, 2026 09:20
@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...end/bec_atlas/ingestor/message_service_ingestor.py 33.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates backend behavior around authentication cookie security configuration and adds additional logging for messaging-service ingestion to improve observability.

Changes:

  • Type-annotates AtlasApp configuration and wires use_ssl from app config into UserRouter to control the cookie secure flag.
  • Adds INFO-level logs when handling messaging-service messages (Signal / Teams / SciLog) in the message service ingestor.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
backend/bec_atlas/main.py Passes use_ssl from app config into UserRouter; adds config type annotation.
backend/bec_atlas/ingestor/message_service_ingestor.py Adds INFO logs around message processing per service type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +149 to +150
logger.info(
f"Processed signal message with scope {msg.scope} for deployment {deployment.deployment_id}."
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

This INFO log runs for every ingested message and also reports "Processed" unconditionally after calling self.signal_manager.process(...), even though that method can early-return without sending anything (e.g., missing scope / missing group). Consider (1) moving the success log into the manager after the actual send (or returning a status), and (2) using DEBUG or a config-gated/sampled INFO log to avoid high-volume log noise.

Suggested change
logger.info(
f"Processed signal message with scope {msg.scope} for deployment {deployment.deployment_id}."
logger.debug(
f"Handled signal message with scope {msg.scope} for deployment {deployment.deployment_id}."

Copilot uses AI. Check for mistakes.
Comment on lines +153 to 156
logger.info(
f"Received message for Microsoft Teams with scope {msg.scope} for deployment {deployment.deployment_id}."
)
pass # not implemented yet
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

The Teams branch currently logs that a message was received but then immediately passes (message is effectively dropped). This log message/level is misleading for operators; consider logging a WARNING (or ERROR) that the service is not implemented and the message is being ignored (and/or explicitly acknowledge that behavior).

Suggested change
logger.info(
f"Received message for Microsoft Teams with scope {msg.scope} for deployment {deployment.deployment_id}."
)
pass # not implemented yet
logger.warning(
f"Ignoring message for Microsoft Teams with scope {msg.scope} for deployment {deployment.deployment_id}: "
"Teams messaging service is not implemented yet."
)

Copilot uses AI. Check for mistakes.
Comment on lines 158 to +161
self.scilog_manager.process(msg, deployment)
logger.info(
f"Processed SciLog message with scope {msg.scope} for deployment {deployment.deployment_id}."
)
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

This log line reports "Processed" unconditionally after calling self.scilog_manager.process(...), but that method can early-return without ingesting anything (e.g., when scope is not allowed). Consider only logging success when an actual ingest occurred (e.g., have process return a boolean/result, or move the success log into the manager after the ingest).

Suggested change
self.scilog_manager.process(msg, deployment)
logger.info(
f"Processed SciLog message with scope {msg.scope} for deployment {deployment.deployment_id}."
)
ingested = self.scilog_manager.process(msg, deployment)
if ingested:
logger.info(
f"Processed SciLog message with scope {msg.scope} for deployment {deployment.deployment_id}."
)
else:
logger.info(
f"SciLog message with scope {msg.scope} for deployment {deployment.deployment_id} was not ingested."
)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants