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

Add just file support #1889

Merged
merged 1 commit into from
Apr 5, 2023
Merged

Add just file support #1889

merged 1 commit into from
Apr 5, 2023

Conversation

Ruadhri17
Copy link
Contributor

Proposed changes

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

#1659

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

@Ruadhri17 Ruadhri17 temporarily deployed to Test Pull Request April 3, 2023 14:38 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2023

Robot Results

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

Passed Tests

Name ⏱️ Duration Suite
Define Child device 1 ID 0.022 s C8Y Child Alarms Rpi
Normal case when the child device does not exist on c8y cloud 3.29 s C8Y Child Alarms Rpi
Normal case when the child device already exists 1.501 s C8Y Child Alarms Rpi
Reconciliation when the new alarm message arrives, restart the mapper 2.076 s C8Y Child Alarms Rpi
Reconciliation when the alarm that is cleared 6.243 s C8Y Child Alarms Rpi
Prerequisite Parent 23.548000000000002 s Child Conf Mgmt Plugin
Prerequisite Child 0.782 s Child Conf Mgmt Plugin
Child device bootstrapping 17.808 s Child Conf Mgmt Plugin
Snapshot from device 61.534 s Child Conf Mgmt Plugin
Child device config update 63.776 s Child Conf Mgmt Plugin
Configuration types should be detected on file change (without restarting service) 60.773 s Inotify Crate
Check lock file existence in default folder 1.787 s Lock File
Check PID number in lock file 3.915 s Lock File
Check PID number in lock file after restarting the services 4.661 s Lock File
Check starting same service twice 2.46 s Lock File
Switch off lock file creation 3.8129999999999997 s Lock File
Successful firmware operation 81.103 s Firmware Operation
Install with empty firmware name 73.054 s Firmware Operation
Prerequisite Parent 26.059 s Firmware Operation Child Device
Prerequisite Child 9.008 s Firmware Operation Child Device
Child device firmware update 6.868 s Firmware Operation Child Device
Child device firmware update with cache 6.914 s Firmware Operation Child Device
Update Inventory data via inventory.json 3.706 s Inventory Update
Retrieve a JWT tokens 63.918 s Jwt Request
Main device registration 2.823 s Device Registration
Child device registration 3.662 s Device Registration
Supports restarting the device 87.373 s Restart Device
Update tedge version from previous using Cumulocity 125.121 s Tedge Self Update
Test if all c8y services are up 77.275 s Service Monitoring
Test if all c8y services are down 74.823 s Service Monitoring
Test if all c8y services are using configured service type 85.7 s Service Monitoring
Test if all c8y services using default service type when service type configured as empty 67.959 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker stop start 35.93 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker restart 37.835 s Service Monitoring
Check health status of child device service 29.377 s Service Monitoring
Successful shell command with output 4.608 s Shell Operation
Check Successful shell command with literal double quotes output 4.049 s Shell Operation
Execute multiline shell command 3.731 s Shell Operation
Failed shell command 4.532 s Shell Operation
Software list should be populated during startup 65.57 s Software
Install software via Cumulocity 86.332 s Software
Software list should only show currently installed software and not candidates 66.298 s Software
Child devices support sending simple measurements 2.019 s Child Device Telemetry
Child devices support sending custom measurements 1.77 s Child Device Telemetry
Child devices support sending custom events 3.7800000000000002 s Child Device Telemetry
Child devices support sending custom events overriding the type 1.595 s Child Device Telemetry
Child devices support sending custom alarms #1699 1.49 s Child Device Telemetry
Child devices support sending inventory data via c8y topic 1.286 s Child Device Telemetry
Main device support sending inventory data via c8y topic 1.8719999999999999 s Child Device Telemetry
Child device supports sending custom child device measurements directly to c8y 2.002 s Child Device Telemetry
Main device supports sending custom child device measurements directly to c8y 2.081 s Child Device Telemetry
Check retained alarms 62.318 s Raise Alarms
Validate updated data path used by tedge-agent 0.553 s Data Path Config
Validate updated data path used by c8y-firmware-plugin 12.065 s Data Path Config
Stop tedge-agent service 0.501 s Log Path Config
Customize the log path 0.169 s Log Path Config
Initialize tedge-agent 0.174 s Log Path Config
Check created folders 0.109 s Log Path Config
Remove created custom folders 0.135 s Log Path Config
Install thin-edge via apt 58.586 s Install Apt
Install latest via script (from current branch) 35.47 s Install Tedge
Install specific version via script (from current branch) 31.083 s Install Tedge
Install latest tedge via script (from main branch) 40.164 s Install Tedge
Install then uninstall latest tedge via script (from main branch) 81.263 s Install Tedge
Support starting and stopping services 50.739 s Service-Control
Supports a reconnect 67.214 s Test-Commands
Supports disconnect then connect 67.674 s Test-Commands
Update unknown setting 54.383 s Test-Commands
Update known setting 33.25 s Test-Commands
Stop c8y-configuration-plugin 0.276 s Health C8Y-Configuration-Plugin
Update the service file 0.275 s Health C8Y-Configuration-Plugin
Reload systemd files 1.076 s Health C8Y-Configuration-Plugin
Start c8y-configuration-plugin 0.571 s Health C8Y-Configuration-Plugin
Start watchdog service 10.564 s Health C8Y-Configuration-Plugin
Check PID of c8y-configuration-plugin 0.154 s Health C8Y-Configuration-Plugin
Kill the PID 0.466 s Health C8Y-Configuration-Plugin
Recheck PID of c8y-configuration-plugin 0.254 s Health C8Y-Configuration-Plugin
Compare PID change 0.003 s Health C8Y-Configuration-Plugin
Stop watchdog service 0.277 s Health C8Y-Configuration-Plugin
Remove entry from service file 0.229 s Health C8Y-Configuration-Plugin
Stop c8y-log-plugin 0.231 s Health C8Y-Log-Plugin
Update the service file 0.334 s Health C8Y-Log-Plugin
Reload systemd files 1.199 s Health C8Y-Log-Plugin
Start c8y-log-plugin 0.305 s Health C8Y-Log-Plugin
Start watchdog service 10.59 s Health C8Y-Log-Plugin
Check PID of c8y-log-plugin 0.163 s Health C8Y-Log-Plugin
Kill the PID 0.226 s Health C8Y-Log-Plugin
Recheck PID of c8y-log-plugin 0.16 s Health C8Y-Log-Plugin
Compare PID change 0.004 s Health C8Y-Log-Plugin
Stop watchdog service 0.163 s Health C8Y-Log-Plugin
Remove entry from service file 0.131 s Health C8Y-Log-Plugin
Stop tedge-mapper 0.264 s Health Tedge Mapper C8Y
Update the service file 0.117 s Health Tedge Mapper C8Y
Reload systemd files 0.647 s Health Tedge Mapper C8Y
Start tedge-mapper 0.154 s Health Tedge Mapper C8Y
Start watchdog service 10.216 s Health Tedge Mapper C8Y
Check PID of tedge-mapper 0.099 s Health Tedge Mapper C8Y
Kill the PID 0.24 s Health Tedge Mapper C8Y
Recheck PID of tedge-mapper 2.313 s Health Tedge Mapper C8Y
Compare PID change 0.001 s Health Tedge Mapper C8Y
Stop watchdog service 0.202 s Health Tedge Mapper C8Y
Remove entry from service file 0.164 s Health Tedge Mapper C8Y
Stop tedge-agent 0.288 s Health Tedge-Agent
Update the service file 0.257 s Health Tedge-Agent
Reload systemd files 0.484 s Health Tedge-Agent
Start tedge-agent 0.135 s Health Tedge-Agent
Start watchdog service 10.304 s Health Tedge-Agent
Check PID of tedge-mapper 0.2 s Health Tedge-Agent
Kill the PID 0.357 s Health Tedge-Agent
Recheck PID of tedge-agent 0.274 s Health Tedge-Agent
Compare PID change 0.003 s Health Tedge-Agent
Stop watchdog service 0.406 s Health Tedge-Agent
Remove entry from service file 0.433 s Health Tedge-Agent
Stop tedge-mapper-az 0.343 s Health Tedge-Mapper-Az
Update the service file 0.347 s Health Tedge-Mapper-Az
Reload systemd files 1.312 s Health Tedge-Mapper-Az
Start tedge-mapper-az 0.307 s Health Tedge-Mapper-Az
Start watchdog service 10.568 s Health Tedge-Mapper-Az
Check PID of tedge-mapper-az 0.298 s Health Tedge-Mapper-Az
Kill the PID 0.386 s Health Tedge-Mapper-Az
Recheck PID of tedge-agent 0.182 s Health Tedge-Mapper-Az
Compare PID change 0.001 s Health Tedge-Mapper-Az
Stop watchdog service 0.283 s Health Tedge-Mapper-Az
Remove entry from service file 0.255 s Health Tedge-Mapper-Az
Stop tedge-mapper-collectd 0.413 s Health Tedge-Mapper-Collectd
Update the service file 0.266 s Health Tedge-Mapper-Collectd
Reload systemd files 1.208 s Health Tedge-Mapper-Collectd
Start tedge-mapper-collectd 0.243 s Health Tedge-Mapper-Collectd
Start watchdog service 10.524000000000001 s Health Tedge-Mapper-Collectd
Check PID of tedge-mapper-collectd 0.267 s Health Tedge-Mapper-Collectd
Kill the PID 0.524 s Health Tedge-Mapper-Collectd
Recheck PID of tedge-mapper-collectd 0.158 s Health Tedge-Mapper-Collectd
Compare PID change 0.002 s Health Tedge-Mapper-Collectd
Stop watchdog service 0.297 s Health Tedge-Mapper-Collectd
Remove entry from service file 0.406 s Health Tedge-Mapper-Collectd
c8y-log-plugin health status 5.789 s MQTT health endpoints
c8y-configuration-plugin health status 5.999 s MQTT health endpoints
Publish on a local insecure broker 0.47 s Connect Broker
Publish on a local secure broker 6.616 s Connect Broker
Wrong package name 0.139 s Improve Tedge Apt Plugin Error Messages
Wrong version 0.169 s Improve Tedge Apt Plugin Error Messages
Wrong type 0.441 s Improve Tedge Apt Plugin Error Messages
tedge_connect_test_positive 0.474 s Tedge Connect Test
tedge_connect_test_negative 0.57 s Tedge Connect Test
tedge_connect_test_sm_services 8.564 s Tedge Connect Test
tedge_disconnect_test_sm_services 1.456 s Tedge Connect Test
Install thin-edge.io 27.403 s Call Tedge
call tedge -V 0.158 s Call Tedge
call tedge -h 0.116 s Call Tedge
call tedge -h -V 0.154 s Call Tedge
call tedge help 0.176 s Call Tedge
tedge config list 0.138 s Call Tedge Config List
tedge config list --all 0.171 s Call Tedge Config List
set/unset device.type 1.111 s Call Tedge Config List
set/unset device.key.path 1.018 s Call Tedge Config List
set/unset device.cert.path 0.849 s Call Tedge Config List
set/unset c8y.root.cert.path 0.517 s Call Tedge Config List
set/unset c8y.smartrest.templates 0.701 s Call Tedge Config List
set/unset az.root.cert.path 0.475 s Call Tedge Config List
set/unset az.mapper.timestamp 0.44 s Call Tedge Config List
set/unset mqtt.bind_address 0.603 s Call Tedge Config List
set/unset mqtt.port 0.529 s Call Tedge Config List
set/unset tmp.path 0.378 s Call Tedge Config List
set/unset logs.path 0.422 s Call Tedge Config List
set/unset run.path 0.346 s Call Tedge Config List
Get Put Delete 4.373 s Http File Transfer Api
Set keys should return value on stdout 0.215 s Tedge Config Get
Unset keys should not return anything on stdout and warnings on stderr 0.324 s Tedge Config Get
Invalid keys should not return anything on stdout and warnings on stderr 0.512 s Tedge Config Get
Set configuration via environment variables 1.5699999999999998 s Tedge Config Get
Set unknown configuration via environment variables 0.205 s Tedge Config Get

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Why are the targets executed form all and every crates? E.g cargo make ziglang takes 30 s on a machine where zig is already installed. Is this the intended behavior of cargo make? I find this so annoying that this would prevent me to use it.

Makefile.toml Outdated Show resolved Hide resolved
Makefile.toml Outdated
[tasks.clippy]
install_crate = "cargo-clippy"
command = "cargo"
args = ["clippy"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add --all-targets --all-features to reduce the difference with what is done on the CI workflow.

Makefile.toml Outdated Show resolved Hide resolved
Makefile.toml Outdated Show resolved Hide resolved
@didier-wenzek
Copy link
Contributor

didier-wenzek commented Apr 3, 2023

@Ruadhri17 and @reubenmiller I do think the better is to give up on this task.

On a host where the build has already been done, cargo make build takes more than 200 seconds taking a huge lot of CPU and then 30 seconds without a single line changed. To be compare with cargo build taking 62 seconds after a cargo clean and 0.2 when nothing has been changed. Personally, I will not use cargo make.

@reubenmiller
Copy link
Contributor

After developer feedback, we will be changing the direction from using cargo-make to just.

Goals

  • Use the make-like task runner as a common entry point to call existing scripts (e.g. build.sh)
  • tasks should be "lightweight" and have minimal logic within the task definition

@Ruadhri17 Ruadhri17 force-pushed the makefile branch 2 times, most recently from 03a0bec to 56d703b Compare April 5, 2023 15:27
@Ruadhri17 Ruadhri17 changed the title Add cargo-make support Add just file support Apr 5, 2023
@Ruadhri17 Ruadhri17 temporarily deployed to Test Pull Request April 5, 2023 15:34 — with GitHub Actions Inactive
Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

That is really better! And useful!

justfile Outdated Show resolved Hide resolved
justfile Outdated Show resolved Hide resolved
justfile Outdated Show resolved Hide resolved
@Ruadhri17 Ruadhri17 force-pushed the makefile branch 2 times, most recently from 026185a to 3467620 Compare April 5, 2023 16:35
@Ruadhri17 Ruadhri17 changed the title Add just file support Add just file support Apr 5, 2023
@Ruadhri17 Ruadhri17 changed the title Add just file support Add just file support Apr 5, 2023
@Ruadhri17 Ruadhri17 temporarily deployed to Test Pull Request April 5, 2023 16:42 — with GitHub Actions Inactive
Signed-off-by: Krzysztof Piotrowski <krzysztof.piotrowski@inetum.com>

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@Ruadhri17 Ruadhri17 temporarily deployed to Test Pull Request April 5, 2023 17:13 — with GitHub Actions Inactive
Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

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 merged commit 466a5ae into thin-edge:main Apr 5, 2023
15 checks passed
@Ruadhri17 Ruadhri17 deleted the makefile branch June 26, 2023 14:38
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.

None yet

3 participants