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

feature: support systemd sd_notify protocol #6

Merged
merged 10 commits into from
Aug 1, 2024
Merged

Conversation

Bodong-Yang
Copy link
Member

Introduction

This PR adds support for system sd_notify protocol, supporting otaclient-logger service running with Type=notify.

Motivation

By default, systemd service is labelled as active running as soon as the main process forked off.
Our new otaclient-logger is feature-rich than the original old one from otaclient, however
it comes with a drawback which it takes slightly more time to start up.
It results in an edge condition that, even we set the startup order to let otaclient-logger starts before otaclient, otaclient might still start faster than otaclient-logger service itself is ready(there is a small time gap between the service is forked off and the service is ready), resulting in some of the logs being dropped.

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/otaclient_iot_logging_server
   __init__.py30100% 
   __main__.py18194%49
   _common.py150100% 
   _log_setting.py271062%63, 65–66, 68–69, 73–74, 77–78, 80
   _sd_notify.py33875%42, 52, 57–59, 65–67
   _utils.py53296%73, 137
   _version.py80100% 
   aws_iot_logger.py1005545%65–67, 69–72, 75, 81–87, 90–92, 95–100, 104–107, 111–113, 116–118, 121–126, 139, 145–147, 149–153, 157, 197, 204–207
   boto3_session.py35974%50, 58–59, 61, 78–79, 83, 85, 93
   config_file_monitor.py43686%64–66, 83–85
   configs.py44197%74
   ecu_info.py37197%75
   greengrass_config.py96594%155, 266–269
   log_proxy_server.py441272%52, 77–79, 88–90, 92, 94–95, 100, 106
TOTAL55611080% 

Tests Skipped Failures Errors Time
44 0 💤 0 ❌ 0 🔥 11.874s ⏱️

Copy link

sonarqubecloud bot commented Aug 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
65.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@Bodong-Yang Bodong-Yang merged commit f772d83 into main Aug 1, 2024
11 of 12 checks passed
@Bodong-Yang Bodong-Yang deleted the feature/dbus branch November 13, 2024 01:59
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.

1 participant