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

Extra tools in dev-containers #1988

Merged
merged 5 commits into from
Jul 10, 2023

Conversation

albinsuresh
Copy link
Contributor

@albinsuresh albinsuresh commented May 18, 2023

Proposed changes

Enable additional tools in dev-containers:

  1. bash-completion
  2. ping
  3. mosquitto-clients
  4. just
  5. yarn (nodejs package manager used for the tedge docs which use docusaurus)

Note

Additional rust specific tooling can be installed manually by the user by running the install-tools task. It is not run automatically in the post dev container create lifecycle hook because users who just want to run the integration tests, don't need to have cargo-sort installed. This decreases the devcontainer setup time significantly.

just install-tools

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@albinsuresh albinsuresh temporarily deployed to Test Pull Request May 18, 2023 12:17 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented May 22, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
172 0 5 172 100

Passed Tests

Name ⏱️ Duration Suite
Define Child device 1 ID 0.034 s C8Y Child Alarms Rpi
Normal case when the child device does not exist on c8y cloud 2.183 s C8Y Child Alarms Rpi
Normal case when the child device already exists 0.897 s C8Y Child Alarms Rpi
Reconciliation when the new alarm message arrives, restart the mapper 2.32 s C8Y Child Alarms Rpi
Reconciliation when the alarm that is cleared 5.982 s C8Y Child Alarms Rpi
Prerequisite Parent 22.527 s Child Conf Mgmt Plugin
Prerequisite Child 0.311 s Child Conf Mgmt Plugin
Child device bootstrapping 16.293 s Child Conf Mgmt Plugin
Snapshot from device 61.402 s Child Conf Mgmt Plugin
Child device config update 62.397 s Child Conf Mgmt Plugin
Configuration types should be detected on file change (without restarting service) 51.747 s Inotify Crate
Check lock file existence in default folder 1.75 s Lock File
Check PID number in lock file 1.8719999999999999 s Lock File
Check PID number in lock file after restarting the services 4.152 s Lock File
Check starting same service twice 1.938 s Lock File
Switch off lock file creation 3.437 s Lock File
Successful firmware operation 70.023 s Firmware Operation
Install with empty firmware name 60.582 s Firmware Operation
Prerequisite Parent 23.06 s Firmware Operation Child Device
Prerequisite Child 7.875 s Firmware Operation Child Device
Child device firmware update 6.094 s Firmware Operation Child Device
Child device firmware update with cache 6.067 s Firmware Operation Child Device
Update Inventory data via inventory.json 1.076 s Inventory Update
Retrieve a JWT tokens 53.777 s Jwt Request
Main device registration 2.107 s Device Registration
Child device registration 3.462 s Device Registration
Supports restarting the device 77.052 s Restart Device
Update tedge version from previous using Cumulocity 106.751 s Tedge Self Update
Test if all c8y services are up 66.489 s Service Monitoring
Test if all c8y services are down 64.036 s Service Monitoring
Test if all c8y services are using configured service type 61.471 s Service Monitoring
Test if all c8y services using default service type when service type configured as empty 62.028 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker stop start 33.376 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker restart 34.623 s Service Monitoring
Check health status of child device service 25.987 s Service Monitoring
Successful shell command with output 4.449 s Shell Operation
Check Successful shell command with literal double quotes output 3.358 s Shell Operation
Execute multiline shell command 3.189 s Shell Operation
Failed shell command 3.115 s Shell Operation
Software list should be populated during startup 53.605 s Software
Install software via Cumulocity 69.999 s Software
Software list should only show currently installed software and not candidates 49.97 s Software
Child devices support sending simple measurements 3.495 s Child Device Telemetry
Child devices support sending custom measurements 1.478 s Child Device Telemetry
Child devices support sending custom events 2.1310000000000002 s Child Device Telemetry
Child devices support sending custom events overriding the type 1.587 s Child Device Telemetry
Child devices support sending custom alarms #1699 3.129 s Child Device Telemetry
Child devices support sending inventory data via c8y topic 3.037 s Child Device Telemetry
Main device support sending inventory data via c8y topic 1.172 s Child Device Telemetry
Child device supports sending custom child device measurements directly to c8y 1.381 s Child Device Telemetry
Main device supports sending custom child device measurements directly to c8y 1.839 s Child Device Telemetry
Check retained alarms 52.432 s Raise Alarms
Validate updated data path used by tedge-agent 1.267 s Data Path Config
Validate updated data path used by c8y-firmware-plugin 12.448 s Data Path Config
Stop tedge-agent service 0.381 s Log Path Config
Customize the log path 0.161 s Log Path Config
Initialize tedge-agent 0.109 s Log Path Config
Check created folders 0.095 s Log Path Config
Remove created custom folders 0.112 s Log Path Config
Install thin-edge via apt 46.597 s Install Apt
Install latest via script (from current branch) 27.851 s Install Tedge
Install specific version via script (from current branch) 25.199 s Install Tedge
Install latest tedge via script (from main branch) 28.302 s Install Tedge
Install then uninstall latest tedge via script (from main branch) 67.979 s Install Tedge
Support starting and stopping services 42.701 s Service-Control
Supports a reconnect 59.273 s Test-Commands
Supports disconnect then connect 52.087 s Test-Commands
Update unknown setting 46.895 s Test-Commands
Update known setting 28.993 s Test-Commands
Stop c8y-configuration-plugin 0.239 s Health C8Y-Configuration-Plugin
Update the service file 0.181 s Health C8Y-Configuration-Plugin
Reload systemd files 0.765 s Health C8Y-Configuration-Plugin
Start c8y-configuration-plugin 0.275 s Health C8Y-Configuration-Plugin
Start watchdog service 10.246 s Health C8Y-Configuration-Plugin
Check PID of c8y-configuration-plugin 0.108 s Health C8Y-Configuration-Plugin
Kill the PID 0.171 s Health C8Y-Configuration-Plugin
Recheck PID of c8y-configuration-plugin 0.173 s Health C8Y-Configuration-Plugin
Compare PID change 0.004 s Health C8Y-Configuration-Plugin
Stop watchdog service 0.142 s Health C8Y-Configuration-Plugin
Remove entry from service file 0.114 s Health C8Y-Configuration-Plugin
Stop c8y-log-plugin 0.281 s Health C8Y-Log-Plugin
Update the service file 0.251 s Health C8Y-Log-Plugin
Reload systemd files 0.46 s Health C8Y-Log-Plugin
Start c8y-log-plugin 0.162 s Health C8Y-Log-Plugin
Start watchdog service 10.16 s Health C8Y-Log-Plugin
Check PID of c8y-log-plugin 0.144 s Health C8Y-Log-Plugin
Kill the PID 0.21 s Health C8Y-Log-Plugin
Recheck PID of c8y-log-plugin 2.235 s Health C8Y-Log-Plugin
Compare PID change 0.007 s Health C8Y-Log-Plugin
Stop watchdog service 0.151 s Health C8Y-Log-Plugin
Remove entry from service file 0.17 s Health C8Y-Log-Plugin
Stop tedge-mapper 0.161 s Health Tedge Mapper C8Y
Update the service file 0.114 s Health Tedge Mapper C8Y
Reload systemd files 0.378 s Health Tedge Mapper C8Y
Start tedge-mapper 0.112 s Health Tedge Mapper C8Y
Start watchdog service 10.131 s Health Tedge Mapper C8Y
Check PID of tedge-mapper 0.147 s Health Tedge Mapper C8Y
Kill the PID 0.195 s Health Tedge Mapper C8Y
Recheck PID of tedge-mapper 2.257 s Health Tedge Mapper C8Y
Compare PID change 0.001 s Health Tedge Mapper C8Y
Stop watchdog service 0.182 s Health Tedge Mapper C8Y
Remove entry from service file 0.132 s Health Tedge Mapper C8Y
Stop tedge-agent 0.162 s Health Tedge-Agent
Update the service file 0.112 s Health Tedge-Agent
Reload systemd files 0.464 s Health Tedge-Agent
Start tedge-agent 0.151 s Health Tedge-Agent
Start watchdog service 10.396 s Health Tedge-Agent
Check PID of tedge-mapper 0.174 s Health Tedge-Agent
Kill the PID 0.182 s Health Tedge-Agent
Recheck PID of tedge-agent 2.286 s Health Tedge-Agent
Compare PID change 0.002 s Health Tedge-Agent
Stop watchdog service 0.319 s Health Tedge-Agent
Remove entry from service file 0.333 s Health Tedge-Agent
Stop tedge-mapper-az 0.099 s Health Tedge-Mapper-Az
Update the service file 0.145 s Health Tedge-Mapper-Az
Reload systemd files 0.309 s Health Tedge-Mapper-Az
Start tedge-mapper-az 0.164 s Health Tedge-Mapper-Az
Start watchdog service 10.259 s Health Tedge-Mapper-Az
Check PID of tedge-mapper-az 0.216 s Health Tedge-Mapper-Az
Kill the PID 0.48 s Health Tedge-Mapper-Az
Recheck PID of tedge-agent 0.148 s Health Tedge-Mapper-Az
Compare PID change 0.017 s Health Tedge-Mapper-Az
Stop watchdog service 0.23 s Health Tedge-Mapper-Az
Remove entry from service file 0.266 s Health Tedge-Mapper-Az
Stop tedge-mapper-collectd 0.096 s Health Tedge-Mapper-Collectd
Update the service file 0.153 s Health Tedge-Mapper-Collectd
Reload systemd files 0.882 s Health Tedge-Mapper-Collectd
Start tedge-mapper-collectd 0.266 s Health Tedge-Mapper-Collectd
Start watchdog service 10.314 s Health Tedge-Mapper-Collectd
Check PID of tedge-mapper-collectd 0.157 s Health Tedge-Mapper-Collectd
Kill the PID 0.187 s Health Tedge-Mapper-Collectd
Recheck PID of tedge-mapper-collectd 2.471 s Health Tedge-Mapper-Collectd
Compare PID change 0.001 s Health Tedge-Mapper-Collectd
Stop watchdog service 0.364 s Health Tedge-Mapper-Collectd
Remove entry from service file 0.188 s Health Tedge-Mapper-Collectd
tedge-collectd-mapper health status 5.843 s Health Tedge-Mapper-Collectd
c8y-log-plugin health status 6.328 s MQTT health endpoints
c8y-configuration-plugin health status 5.795 s MQTT health endpoints
Publish on a local insecure broker 0.324 s Connect Broker
Publish on a local secure broker 3.8970000000000002 s Connect Broker
Wrong package name 0.235 s Improve Tedge Apt Plugin Error Messages
Wrong version 0.134 s Improve Tedge Apt Plugin Error Messages
Wrong type 0.328 s Improve Tedge Apt Plugin Error Messages
tedge_connect_test_positive 0.42 s Tedge Connect Test
tedge_connect_test_negative 0.836 s Tedge Connect Test
tedge_connect_test_sm_services 7.266 s Tedge Connect Test
tedge_disconnect_test_sm_services 1.412 s Tedge Connect Test
Install thin-edge.io 24.774 s Call Tedge
call tedge -V 0.16 s Call Tedge
call tedge -h 0.095 s Call Tedge
call tedge -h -V 0.148 s Call Tedge
call tedge help 0.13 s Call Tedge
tedge config list 0.082 s Call Tedge Config List
tedge config list --all 0.079 s Call Tedge Config List
set/unset device.type 0.376 s Call Tedge Config List
set/unset device.key.path 0.322 s Call Tedge Config List
set/unset device.cert.path 0.459 s Call Tedge Config List
set/unset c8y.root.cert.path 0.378 s Call Tedge Config List
set/unset c8y.smartrest.templates 0.574 s Call Tedge Config List
set/unset az.root.cert.path 0.578 s Call Tedge Config List
set/unset az.mapper.timestamp 0.607 s Call Tedge Config List
set/unset mqtt.bind_address 0.599 s Call Tedge Config List
set/unset mqtt.port 0.539 s Call Tedge Config List
set/unset tmp.path 0.407 s Call Tedge Config List
set/unset logs.path 0.314 s Call Tedge Config List
set/unset run.path 0.384 s Call Tedge Config List
Get Put Delete 4.158 s Http File Transfer Api
Set keys should return value on stdout 0.11 s Tedge Config Get
Unset keys should not return anything on stdout and warnings on stderr 0.261 s Tedge Config Get
Invalid keys should not return anything on stdout and warnings on stderr 0.466 s Tedge Config Get
Set configuration via environment variables 0.859 s Tedge Config Get
Set unknown configuration via environment variables 0.172 s Tedge Config Get

The additional rust specific tools can be installed using `just install-tools` and it can be called manually by the user

Signed-off-by: Reuben Miller <[email protected]>
Copy link
Contributor

@reubenmiller reubenmiller left a comment

Choose a reason for hiding this comment

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

Approved

@reubenmiller reubenmiller temporarily deployed to Test Pull Request July 10, 2023 07:09 — with GitHub Actions Inactive
@albinsuresh albinsuresh merged commit 69c2b3c into thin-edge:main Jul 10, 2023
@albinsuresh albinsuresh deleted the dev-container-extras branch September 20, 2023 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants