Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Merge azure-iot-pcs-simulation into master #197

Merged
merged 44 commits into from
Apr 13, 2018
Merged

Conversation

jillcary
Copy link
Contributor

Type of change?

  • Bug fix
  • New feature
  • Enhancement
  • Breaking change (breaks backward compatibility)

Description, Context, Motivation

Improvements have been made in the azure-iot-pcs-simulation branch, this PR is to merge the branches so that new features can again be added into master instead of a separate branch.

Checklist:

  • All tests passed
  • The code follows the code style and conventions of this project
  • The change requires a change to the documentation
  • I have updated the documentation accordingly

dluc and others added 30 commits November 9, 2017 10:38
* Remove unused models, scripts, methods, properties
* Upgrade to .NET Core 2.0
* Add some more logging
* Improve simulation runner startup to handle exceptions
* Update CI conf
* move docs, move wiki, new API specs, add copyright, fix for Windows Bash
)

* add config setting to turn of twin read/write
* add logic to only call twin reads/writes if enabled
* change twin read/write config value to an optional env var
* Support simulation duration and scheduling
* Fix the spelling of “ETag”
* Allow ETag=*
* adjust unit test precision to mitigate flaky test
* Add IoTHub with connstring to Api Model, pass "default" to use the configured hub
* Add private helpers to redact key from IotHubConnString
* Store non redacted entire connection string in a file
* Update API specs documentation
* Rewrite the simulation engine to use fewer threads
* Start sending telemetry as soon as possible
* Run simulation engine in the same process used for the web service
* Add workaround for registry manager becoming unresponsive
* Add more optional logging by device and by actor
* Use logging level and other logging settings from configuration
New web service APIs

* New API to support multiple scripts 
* New API to support custom sensors
* New API to support custom telemetry frequency
* New API to expose whether a hub is configured, i.e. provisioned and the connection string is in the config file
* Fix exception occurring when there is no connection string
* Apply the customized telemetry and state frequencies + fix bug for models with multiple messages
* Fix exception on bad request
* additional validation for iothub connection string

* check permissions with calls to registry manager instead of string comparison

* Refactor permissions validation into separate methods. Make sure test device created is deleted, create with a regognizable test name in case of error.

* remove await from Assert.ThrowsAsync

* added retry logic to delete test device

* Logging cleanup
* Update travis CI config to use .NET core 2.0.3

* Fix log level parsing from the config, to be case insensitive

* Update simulation model parsing/serialization. Add script Params in the service layer

* Complete the device model override logic

* Add internal scripts

* Allow to override the initial state. Add “online” key where missing.
* Use env var to define log level
* Add env vars documentation ENVIRONMENT_VARIABLES.md
#153)

When available and when the simulation is running, return a URL to the metrics of the pre-provisioned hub. Also some changes to the /status endpoint
* When a simulation is deleted, delete also the devices
* When a simulation starts, create all the devices in batches
#155)

* Check for whitespace in custom connection string. Check that default IotHub exists and is valid.
* Update invalid connection string message
* fix log level for GetiotHubConnectionString()
…mulation-dotnet into azure-iot-pcs-simulation
…#162)

* Remove old code used to detect simulation stop via cancellation token
* Rethrow timeout exceptions
* add null check for PUT payload properties

* add null check test

* update test arrangement
maple10001 and others added 10 commits February 12, 2018 16:18
* Register SimulationRunner as a singleton type
* Allow DeviceStatusActor report active status
* Add active device count to status API
* uncomment UpdateTwinAsync

* add folder for DeviceTwinActor

* Add support classes for DeviceTwinActor to update twin -- uses empty methods

* remove Properties from DeviceStateActor class

* Add InternalDeviceState Class and ability to update twin via callback from javascript

* add placeholders for twin update logic for future pr

* remove eslint jsdoc updates and update javascriptinterpreter tests

* Add new thread for device properties updates

* return null for not implemented methods

* Add Unit Tests for Internal Device State

* Update existing tests with new InternalDeviceState class

* Update scripts with instructions on device property updates

* Fix errors with JS device scripts and readonly dictionary

* revert changes to DeviceTwin class

* Update log messages for readability with timestamp

* Rename logging methods for consistency

* Separate properties and state and remove unused lines

* update comments for twin update branch

* Revert UpdateTwinAsync signature in DeviceClient

* revert UpdateState and JSValueToDictionary to private

* update comment on restoreState in chiller js script

* Update InternalDevicePropertiesTest names

* Consolidated to SmartDictionary class

* remove DevicePropertiesActor, revert DeviceTwin, change terminology from sensors to state

* revert actors logger

* revert simulation runner

* revert simulation runner test

* revert deletion of UpdateReportedProperties.cs

* fix spacing in SimulationRunner

* fix spacing in device twin

* consolidate restore state javascript methods

* add properties to internal script method call

* variable/method naming, whitespace cleanup, add missing method in elevator state script
* Add simulation status reporting messages throughput and errors counters
* Do not retry sending telemetry in case of errors
* Change Azure SDK timeout to 10 seconds (default is 4 minutes)
* Improve SDK exceptions handling
* Fix rare exception due to contention on the `state` variable
Upgrade Azure IoT SDK: Devices Client 1.5.2 to 1.7.0
Upgrade test dependencies
* Add new state machine to manage changes to devices' "reported properties"
* Add callback to manage changes to devices's "desired properties"
* Add callbacks to manage method calls
* Refactor and improve how simulation scripts access state and properties
* Fix #122 + backport fix for flaky test (#128)

* Upgrade to .NET Core 2.0 and upgrade dependencies (#130)

* Upgrade to .NET Core 2.0 and upgrade dependencies
* Update comments and docs

* Change Docker base image to use .NET Core 2.0.3 (#131)

* Change Docker base image to use .NET Core 2.0.3

* use jessie

* Use absolute instead of relative links to wiki (#161)

Fix for:
#39

The relative links don't resolve to the wiki page ending up in a 404. This update changes the URL links to be the full relative link to the documentation page.

* Remove squash (#166)

* Removing the squash flag

* Fixing extra space

* Use env vars in launchSettings.json (#168)

* Docker container excessively privileged running root user (#178)

* Add default non-root user 'pcsuser'
* Run service as 'pcsuser'

PBI[2211778]

* remove whitespace

* revert SimulationAgent.csproj changes

* Adjust whitespace in SimulationAgent.csproj

* remove newline
@dluc dluc merged commit b211cb7 into master Apr 13, 2018
@timlaverty timlaverty deleted the azure-iot-pcs-simulation branch July 27, 2018 17:58
maple10001 pushed a commit that referenced this pull request Aug 14, 2018
* Rewrite to use fewer threads and increase throughput
* Expose simulation metrics in the status endpoint
* When available, return a URL to the Azure Portal metrics of the pre-provisioned IoT Hub
* Allow to run a simulation against a custom IoT Hub, passing the connection string
* Allow to schedule a simulation, defining start and end time
* Improve security by running the service as a non-root user
* Support multiple behavior scripts in a device model
* Support custom device with custom sensors, behavior and frequency
* Allow to override the initial device state when creating a simulation
* When a simulation starts, create all the devices in batches
* When a simulation is deleted, delete also the devices
* Refactor timers to start sending telemetry as soon as possible
* Refactor and improve how simulation scripts access state and properties
* Change stock models to use AMQP (#189)
* Overall improvements to exceptions handling
* Disable SDK retry, and change timeout from default (4 minutes) to 10 seconds
* Do not retry sending telemetry on failure, skip message
* Use IoT Hub S2 SKU limits by default
* Upgrade to .NET Core 2.0.3
* Upgrade Azure IoT SDK: Devices 1.4.1 to 1.6.0, Devices Client 1.5.2 to 1.7.0
* Run simulation engine in the same process used for the web service
* Move docs, move wiki, new API specs, fix scripts for Windows Bash
* Fix the spelling of “ETag” and allow ETag=*
* Add internal scripts for increasing/decreasing/random telemetry
* Add env vars documentation ENVIRONMENT_VARIABLES.md
* Add more optional logging by device and by actor
* Use logging level and other logging settings from configuration
* Adjust unit test precision to mitigate flaky test
* Add system properties to telemetry messages
* Removing the squash flag from Docker scripts
* Use env vars in launchSettings.json
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants