[Iot agent http] Publishing with invalid timestamp

I'm submitting a ...

[X] bug report
[ ] feature request
[ ] support request

What is the current behavior?
When a message is published using an invalid timestamp it was expected receive a 400 result code.  But it is returned 200 and the published data is marked with a weird timestamp. See the following log.

the invalid timestamp used was "ts": -1
http-agent_1                  | 2021-10-25T20:22:59.970Z -- http-agent:express -- debug: Incoming request: {"id":"c688538e-3449-49d3-8f7d-0df9ba34dfd3"}
http-agent_1                  | 2021-10-25T20:22:59.971Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-10-25T20:23:00.979Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-10-25T20:23:00.980Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"ce1f4f","tenant":"admin","timestamp":978307200000},"attrs":{"temperature":16,"humidity":60}} to admin/device-data
http-agent_1                  | 2021-10-25T20:23:00.982Z -- http-agent:express -- debug: request has been finished: {"id":"c688538e-3449-49d3-8f7d-0df9ba34dfd3"}

Please tell us about your environment:

Version: 0.7.1-rc.1
Environment: docker-compose
Operating system: Ubuntu 18.04

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

single request: 204 result code

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '{
"ts": -1,
"data": {
     "float": 30.1
    }
}'   --cacert ca.crt --cert admin_3dde27.crt --key admin_3dde27.key

http-agent_1                  | 2021-12-10T20:14:39.299Z -- http-agent:express -- debug: Incoming request: {"id":"0ff59642-85f5-4545-be01-9cfe55f09fd2"}
http-agent_1                  | 2021-12-10T20:14:39.302Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-10T20:14:40.325Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-10T20:14:40.326Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"3dde27","tenant":"admin","timestamp":-1},"attrs":{"float":30.1}} to admin/device-data
http-agent_1                  | 2021-12-10T20:14:40.329Z -- http-agent:express -- debug: request has been finished: {"id":"0ff59642-85f5-4545-be01-9cfe55f09fd2"}
http-agent_1                  | 2021-12-10T20:14:40.330Z -- http-agent:express -- info: 0ff59642-85f5-4545-be01-9cfe55f09fd2 "HTTP/1.1 POST /http-agent/v1/incoming-messages" "204 -bytes 1029ms" "<IP_ADDRESS> - curl/7.58.0"

multiple requests: 204 result code

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages/create-many -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '[
{
"ts": -1,
"data": {
     "float": 18.5,
     "int": 1
    }
},
{"ts": -1,
"data": {
     "float": 20.1,
     "int": 2
    }
},
{"ts": -1,
"data": {
     "float": 49,
     "int": 3
    }
}
]'   --cacert ca.crt --cert admin_3dde27.crt --key admin_3dde27.key

http-agent_1                  | 2021-12-10T20:32:42.243Z -- http-agent:express -- debug: Incoming request: {"id":"bd97febb-b0eb-4a13-b257-69409fb8776e"}
http-agent_1                  | 2021-12-10T20:32:42.246Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-10T20:32:42.246Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-10T20:32:42.247Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-10T20:32:42.248Z -- http-agent:express -- debug: request has been finished: {"id":"bd97febb-b0eb-4a13-b257-69409fb8776e"}
http-agent_1                  | 2021-12-10T20:32:42.248Z -- http-agent:express -- info: bd97febb-b0eb-4a13-b257-69409fb8776e "HTTP/1.1 POST /http-agent/v1/incoming-messages/create-many" "204 -bytes 4ms" "<IP_ADDRESS> - curl/7.58.0"
http-agent_1                  | 2021-12-10T20:32:43.294Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-10T20:32:43.294Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"3dde27","tenant":"admin","timestamp":-1},"attrs":{"float":18.5,"int":1}} to admin/device-data
http-agent_1                  | 2021-12-10T20:32:43.295Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-10T20:32:43.295Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"3dde27","tenant":"admin","timestamp":-1},"attrs":{"float":20.1,"int":2}} to admin/device-data
http-agent_1                  | 2021-12-10T20:32:43.296Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-10T20:32:43.297Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"3dde27","tenant":"admin","timestamp":-1},"attrs":{"float":49,"int":3}} to admin/device-data

single request:

invalid timestamps (result code: 400)

timestamp = "hoje"

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '{
      "ts": "hoje",
      "data": {
        "temperature": 20
      }
  }'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key
{"message":"Invalid timestamp"}

http-agent_1                  | 2021-12-23T12:11:18.871Z -- http-agent:express -- debug: Incoming request: {"id":"c82ec3f2-a27f-411e-a153-21d97d16aa15"}
http-agent_1                  | 2021-12-23T12:11:18.872Z -- http-agent:express/routes/v1/Device -- error: incoming-messages.post:Invalid timestamp {"stack":"BadRequestError: Invalid timestamp\n    at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)\n    at Module._compile (internal/modules/cjs/loader.js:999:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n    at Module.load (internal/modules/cjs/loader.js:863:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n    at Module.require (internal/modules/cjs/loader.js:887:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at Object.<anonymous> (/opt/http-agent/index.js:4:29)\n    at Module._compile (internal/modules/cjs/loader.js:999:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)"}
http-agent_1                  | 2021-12-23T12:11:18.872Z -- http-agent:express -- debug: request has been finished: {"id":"c82ec3f2-a27f-411e-a153-21d97d16aa15"}
http-agent_1                  | 2021-12-23T12:11:18.873Z -- http-agent:express -- info: c82ec3f2-a27f-411e-a153-21d97d16aa15 "HTTP/1.1 POST /http-agent/v1/incoming-messages" "400 31bytes 1ms" "<IP_ADDRESS> - curl/7.58.0"

timestamp = "2021-11-35T09:30:01.683000Z"

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages -H 'Content-Tyrization: ${JWT}" -d '{H "Author
      "ts": "2021-11-35T09:30:01.683000Z",
      "data": {
        "temperature": 35
      }
  }'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key
{"message":"Invalid timestamp"}

http-agent_1                  | 2021-12-23T12:12:23.181Z -- http-agent:express -- debug: Incoming request: {"id":"6dba1d73-6a18-435d-ace3-8a9d5c6ab851"}
http-agent_1                  | 2021-12-23T12:12:23.185Z -- http-agent:express/routes/v1/Device -- error: incoming-messages.post:Invalid timestamp {"stack":"BadRequestError: Invalid timestamp\n    at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)\n    at Module._compile (internal/modules/cjs/loader.js:999:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n    at Module.load (internal/modules/cjs/loader.js:863:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n    at Module.require (internal/modules/cjs/loader.js:887:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at Object.<anonymous> (/opt/http-agent/index.js:4:29)\n    at Module._compile (internal/modules/cjs/loader.js:999:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)"}
http-agent_1                  | 2021-12-23T12:12:23.188Z -- http-agent:express -- debug: request has been finished: {"id":"6dba1d73-6a18-435d-ace3-8a9d5c6ab851"}
http-agent_1                  | 2021-12-23T12:12:23.189Z -- http-agent:express -- info: 6dba1d73-6a18-435d-ace3-8a9d5c6ab851 "HTTP/1.1 POST /http-agent/v1/incoming-messages" "400 31bytes 6ms" "<IP_ADDRESS> - curl/7.58.0"

timestamp = "2021-13-15T09:30:01.683000Z"

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '{
      "ts": "2021-13-15T09:30:01.683000Z",
      "data": {
        "temperature": 13
      }
  }'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key
{"message":"Invalid timestamp"}

http-agent_1                  | 2021-12-23T12:58:41.305Z -- http-agent:express -- debug: Incoming request: {"id":"e82d36a0-9067-48d9-995c-2adad1b218c2"}
http-agent_1                  | 2021-12-23T12:58:41.308Z -- http-agent:express/routes/v1/Device -- error: incoming-messages.post:Invalid timestamp {"stack":"BadRequestError: Invalid timestamp\n    at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)\n    at Module._compile (internal/modules/cjs/loader.js:999:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n    at Module.load (internal/modules/cjs/loader.js:863:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n    at Module.require (internal/modules/cjs/loader.js:887:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at Object.<anonymous> (/opt/http-agent/index.js:4:29)\n    at Module._compile (internal/modules/cjs/loader.js:999:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)"}
http-agent_1                  | 2021-12-23T12:58:41.310Z -- http-agent:express -- debug: request has been finished: {"id":"e82d36a0-9067-48d9-995c-2adad1b218c2"}
http-agent_1                  | 2021-12-23T12:58:41.311Z -- http-agent:express -- info: e82d36a0-9067-48d9-995c-2adad1b218c2 "HTTP/1.1 POST /http-agent/v1/incoming-messages" "400 31bytes 5ms" "<IP_ADDRESS> - curl/7.58.0"

valid timestamps (result code: 204)

timestamp = "2021-12-20T09:30:01.683000Z"

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '{
      "ts": "2021-12-20T09:30:01.683000Z",
      "data": {
        "temperature": 16
      }
  }'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key

http-agent_1                  | 2021-12-23T12:10:16.493Z -- http-agent:express -- debug: Incoming request: {"id":"4079ed0c-7d3f-4d7f-acce-f82397b7d3e9"}
http-agent_1                  | 2021-12-23T12:10:16.496Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-23T12:10:17.567Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-23T12:10:17.567Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"2a1503","tenant":"admin","timestamp":1639992601683},"attrs":{"temperature":16}} to admin/device-data
http-agent_1                  | 2021-12-23T12:10:17.568Z -- http-agent:express -- debug: request has been finished: {"id":"4079ed0c-7d3f-4d7f-acce-f82397b7d3e9"}
http-agent_1                  | 2021-12-23T12:10:17.568Z -- http-agent:express -- info: 4079ed0c-7d3f-4d7f-acce-f82397b7d3e9 "HTTP/1.1 POST /http-agent/v1/incoming-messages" "204 -bytes 1074ms" "<IP_ADDRESS> - curl/7.58.0"

persister_1                   | [23/12/21 - 12:10:17] |persister| INFO: Received data: {'metadata': {'deviceid': '2a1503', 'tenant': 'admin', 'timestamp':<PHONE_NUMBER>683}, 'attrs': {'temperature': 16}}

timestamp = -1

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '{
      "ts": -1,
      "data": {
        "temperature": 20
      }
  }'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key

http-agent_1                  | 2021-12-23T12:10:49.443Z -- http-agent:express -- debug: Incoming request: {"id":"ddca7a54-b64b-40a6-afa4-e79d463003aa"}
http-agent_1                  | 2021-12-23T12:10:49.446Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-23T12:10:50.464Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-23T12:10:50.464Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"2a1503","tenant":"admin","timestamp":-1},"attrs":{"temperature":20}} to admin/device-data
http-agent_1                  | 2021-12-23T12:10:50.465Z -- http-agent:express -- debug: request has been finished: {"id":"ddca7a54-b64b-40a6-afa4-e79d463003aa"}
http-agent_1                  | 2021-12-23T12:10:50.465Z -- http-agent:express -- info: ddca7a54-b64b-40a6-afa4-e79d463003aa "HTTP/1.1 POST /http-agent/v1/incoming-messages" "204 -bytes 1021ms" "<IP_ADDRESS> - curl/7.58.0"

persister_1                   | [23/12/21 - 12:10:50] |persister| INFO: Received data: {'metadata': {'deviceid': '2a1503', 'tenant': 'admin', 'timestamp': -1}, 'attrs': {'temperature': 20}}

timestamp = "Thursday, December 23, 2021 9:15:17 AM": valid (status 204)

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '{
      "ts": "Thursday, December 23, 2021 9:15:17 AM",
      "data": {
        "temperature": 23
      }
  }'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key

http-agent_1                  | 2021-12-23T13:03:27.803Z -- http-agent:express -- debug: Incoming request: {"id":"cc3792a8-21a6-4659-96ae-2237a6ccea46"}
http-agent_1                  | 2021-12-23T13:03:27.808Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-23T13:03:28.816Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-23T13:03:28.816Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"2a1503","tenant":"admin","timestamp":1640250917000},"attrs":{"temperature":23}} to admin/device-data
http-agent_1                  | 2021-12-23T13:03:28.816Z -- http-agent:express -- debug: request has been finished: {"id":"cc3792a8-21a6-4659-96ae-2237a6ccea46"}
http-agent_1                  | 2021-12-23T13:03:28.817Z -- http-agent:express -- info: cc3792a8-21a6-4659-96ae-2237a6ccea46 "HTTP/1.1 POST /http-agent/v1/incoming-messages" "204 -bytes 1011ms" "<IP_ADDRESS> - curl/7.58.0"

persister_1                   | [23/12/21 - 13:03:28] |persister| INFO: Received data: {'metadata': {'deviceid': '2a1503', 'tenant': 'admin', 'timestamp':<PHONE_NUMBER>000}, 'attrs': {'temperature': 23}}

multiple requests:

invalid timestamps: http-agent service restarts

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages/create-many -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '[
{
  "ts": "hoje",
   "data": {
        "temperature": 18.5
      }
},
{
  "ts": "ontem",
   "data": {
        "temperature": 20.1
      }
},
{ "ts": "agora",
  "data": {
        "temperature": 39
      }
}
]'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key

http-agent_1                  | 2021-12-23T14:14:20.695Z -- http-agent:express -- debug: Incoming request: {"id":"76fc140e-c34f-4a6b-ae69-e9f0ea079578"}
http-agent_1                  | 2021-12-23T14:14:20.726Z -- http-agent:index -- error: Unhandled Rejection at: BadRequestError: Invalid timestamp
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
http-agent_1                  |     at Module.load (internal/modules/cjs/loader.js:863:32)
http-agent_1                  |     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
http-agent_1                  |     at Module.require (internal/modules/cjs/loader.js:887:19)
http-agent_1                  |     at require (internal/modules/cjs/helpers.js:74:18)
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/index.js:4:29)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10).
http-agent_1                  | 2021-12-23T14:14:20.726Z -- http-agent:index -- error: Unhandled Rejection at: BadRequestError: Invalid timestamp
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
http-agent_1                  |     at Module.load (internal/modules/cjs/loader.js:863:32)
http-agent_1                  |     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
http-agent_1                  |     at Module.require (internal/modules/cjs/loader.js:887:19)
http-agent_1                  |     at require (internal/modules/cjs/helpers.js:74:18)
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/index.js:4:29)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10).
http-agent_1                  | 2021-12-23T14:14:20.726Z -- http-agent:index -- error: Unhandled Rejection at: BadRequestError: Invalid timestamp
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
http-agent_1                  |     at Module.load (internal/modules/cjs/loader.js:863:32)
http-agent_1                  |     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
http-agent_1                  |     at Module.require (internal/modules/cjs/loader.js:887:19)
http-agent_1                  |     at require (internal/modules/cjs/helpers.js:74:18)
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/index.js:4:29)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10).
http-agent_1                  | 2021-12-23T14:14:20.727Z -- http-agent:express -- debug: request has been finished: {"id":"76fc140e-c34f-4a6b-ae69-e9f0ea079578"}
http-agent_1                  | 2021-12-23T14:14:20.729Z -- http-agent:express -- info: 76fc140e-c34f-4a6b-ae69-e9f0ea079578 "HTTP/1.1 POST /http-agent/v1/incoming-messages/create-many" "204 -bytes 30ms" "<IP_ADDRESS> - curl/7.58.0"
http-agent_1                  | 2021-12-23T14:14:25.731Z -- microservice-sdk:service-state-manager -- warn: Removing 3 services...
http-agent_1                  | 2021-12-23T14:14:25.732Z -- microservice-sdk:service-state-manager -- warn: Removed service "http-server"
http-agent_1                  | 2021-12-23T14:14:25.733Z -- microservice-sdk:service-state-manager -- warn: Removed service "http-producer"
http-agent_1                  | 2021-12-23T14:14:25.733Z -- microservice-sdk:service-state-manager -- warn: Removed service "http-cache"
http-agent_1                  | 2021-12-23T14:14:25.734Z -- microservice-sdk:service-state-manager -- warn: ... successfully removed all services
http-agent_1                  | 2021-12-23T14:14:25.735Z -- http-agent:Producer -- warn: Shutting down Kafka connection...
http-agent_1                  | 2021-12-23T14:14:25.736Z -- microservice-sdk:producer -- debug: Disconnecting from Kafka...
http-agent_1                  | 2021-12-23T14:14:25.736Z -- microservice-sdk:producer -- debug: Requesting message flushing before disconnect...
http-agent_1                  | 2021-12-23T14:14:25.738Z -- microservice-sdk:producer -- debug: ... all messages were flushed.
http-agent_1                  | 2021-12-23T14:14:25.740Z -- microservice-sdk:producer -- debug: Successfully disconnected producer from Kafka.
http-agent_1                  | 2021-12-23T14:14:25.741Z -- http-agent:Cache -- warn: Clearing the time interval that is set in the check period option...
http-agent_1                  | 2021-12-23T14:14:25.742Z -- http-agent:Server -- debug: Stopping the server from accepting new connections...
http-agent_1                  | 2021-12-23T14:14:25.744Z -- http-agent:Server -- warn: The server no longer accepts connections!
http-agent_1                  | 2021-12-23T14:14:25.746Z -- microservice-sdk:service-state-manager -- debug: Service "http-server" is not registered, will not signalize anything
http-agent_1                  | 2021-12-23T14:14:26.747Z -- microservice-sdk:service-state-manager -- warn: process did not exit on its own; investigate what is keeping the event loop active
http-agent_1                  | npm ERR! code ELIFECYCLE
http-agent_1                  | npm ERR! errno 1
http-agent_1                  | npm ERR<EMAIL_ADDRESS>start: `node index.js`
http-agent_1                  | npm ERR! Exit status 1
http-agent_1                  | npm ERR!
http-agent_1                  | npm ERR! Failed at the<EMAIL_ADDRESS>start script.
http-agent_1                  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
http-agent_1                  |
http-agent_1                  | npm ERR! A complete log of this run can be found in:
http-agent_1                  | npm ERR!     /root/.npm/_logs/2021-12-23T14_14_26_795Z-debug.log

incorrect dates

curl -X POST https://localhost:8080/http-agent/v1/incoming-messages/create-many -H 'Content-Type: application/json' -H "Authorization: ${JWT}" -d '[
{
      "ts": "2021-12-35T09:30:01.683000Z",
      "data": {
        "temperature": 35
      }
},
{
      "ts": "2021-13-15T09:35:01.683000Z",
      "data": {
        "temperature": 13
      }
},
{
      "ts": "2021-12-19T09:40:01.683000Z",
      "data": {
        "temperature": 13
      }
}
]'   --cacert ca.crt --cert admin_2a1503.crt --key admin_2a1503.key

http-agent_1                  | 2021-12-23T14:37:14.459Z -- http-agent:express -- debug: Incoming request: {"id":"823afd90-31f7-4d54-a6e9-f1ef6b4040dc"}
http-agent_1                  | 2021-12-23T14:37:14.479Z -- http-agent:Producer -- debug: Trying to send message to kafka topic admin.device-data...
http-agent_1                  | 2021-12-23T14:37:14.481Z -- http-agent:index -- error: Unhandled Rejection at: BadRequestError: Invalid timestamp
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
http-agent_1                  |     at Module.load (internal/modules/cjs/loader.js:863:32)
http-agent_1                  |     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
http-agent_1                  |     at Module.require (internal/modules/cjs/loader.js:887:19)
http-agent_1                  |     at require (internal/modules/cjs/helpers.js:74:18)
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/index.js:4:29)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10).
http-agent_1                  | 2021-12-23T14:37:14.482Z -- http-agent:index -- error: Unhandled Rejection at: BadRequestError: Invalid timestamp
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/app/Utils.js:3:13)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
http-agent_1                  |     at Module.load (internal/modules/cjs/loader.js:863:32)
http-agent_1                  |     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
http-agent_1                  |     at Module.require (internal/modules/cjs/loader.js:887:19)
http-agent_1                  |     at require (internal/modules/cjs/helpers.js:74:18)
http-agent_1                  |     at Object.<anonymous> (/opt/http-agent/index.js:4:29)
http-agent_1                  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
http-agent_1                  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10).
http-agent_1                  | 2021-12-23T14:37:14.484Z -- http-agent:express -- debug: request has been finished: {"id":"823afd90-31f7-4d54-a6e9-f1ef6b4040dc"}
http-agent_1                  | 2021-12-23T14:37:14.485Z -- http-agent:express -- info: 823afd90-31f7-4d54-a6e9-f1ef6b4040dc "HTTP/1.1 POST /http-agent/v1/incoming-messages/create-many" "204 -bytes 24ms" "<IP_ADDRESS> - curl/7.58.0"
http-agent_1                  | 2021-12-23T14:37:15.514Z -- http-agent:Producer -- debug: Successfully sent message to Kafka in admin.device-data
http-agent_1                  | 2021-12-23T14:37:15.515Z -- http-agent:Producer -- debug: Published message {"metadata":{"deviceid":"2a1503","tenant":"admin","timestamp":1639906801683},"attrs":{"temperature":13}} to admin/device-data
http-agent_1                  | 2021-12-23T14:37:19.488Z -- microservice-sdk:service-state-manager -- warn: Removing 3 services...
http-agent_1                  | 2021-12-23T14:37:19.489Z -- microservice-sdk:service-state-manager -- warn: Removed service "http-server"
http-agent_1                  | 2021-12-23T14:37:19.489Z -- microservice-sdk:service-state-manager -- warn: Removed service "http-producer"
http-agent_1                  | 2021-12-23T14:37:19.490Z -- microservice-sdk:service-state-manager -- warn: Removed service "http-cache"
http-agent_1                  | 2021-12-23T14:37:19.491Z -- microservice-sdk:service-state-manager -- warn: ... successfully removed all services
http-agent_1                  | 2021-12-23T14:37:19.491Z -- http-agent:Producer -- warn: Shutting down Kafka connection...
http-agent_1                  | 2021-12-23T14:37:19.492Z -- microservice-sdk:producer -- debug: Disconnecting from Kafka...
http-agent_1                  | 2021-12-23T14:37:19.493Z -- microservice-sdk:producer -- debug: Requesting message flushing before disconnect...
http-agent_1                  | 2021-12-23T14:37:19.494Z -- microservice-sdk:producer -- debug: ... all messages were flushed.
http-agent_1                  | 2021-12-23T14:37:19.497Z -- microservice-sdk:producer -- debug: Successfully disconnected producer from Kafka.
http-agent_1                  | 2021-12-23T14:37:19.500Z -- http-agent:Cache -- warn: Clearing the time interval that is set in the check period option...
http-agent_1                  | 2021-12-23T14:37:19.501Z -- http-agent:Server -- debug: Stopping the server from accepting new connections...
http-agent_1                  | 2021-12-23T14:37:19.503Z -- http-agent:Server -- warn: The server no longer accepts connections!
http-agent_1                  | 2021-12-23T14:37:19.505Z -- microservice-sdk:service-state-manager -- debug: Service "http-server" is not registered, will not signalize anything
http-agent_1                  | 2021-12-23T14:37:20.507Z -- microservice-sdk:service-state-manager -- warn: process did not exit on its own; investigate what is keeping the event loop active
http-agent_1                  | npm ERR! code ELIFECYCLE
http-agent_1                  | npm ERR! errno 1
http-agent_1                  | npm ERR<EMAIL_ADDRESS>start: `node index.js`
http-agent_1                  | npm ERR! Exit status 1
http-agent_1                  | npm ERR!
http-agent_1                  | npm ERR! Failed at the<EMAIL_ADDRESS>start script.
http-agent_1                  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
http-agent_1                  |
http-agent_1                  | npm ERR! A complete log of this run can be found in:
http-agent_1                  | npm ERR!     /root/.npm/_logs/2021-12-23T14_37_20_546Z-debug.log

the data with the correct date is persisted:
persister_1                   | [23/12/21 - 14:37:15] |persister| INFO: Received data: {'metadata': {'deviceid': '2a1503', 'tenant': 'admin', 'timestamp':<PHONE_NUMBER>683}, 'attrs': {'temperature': 13}}

The problem with invalid timestamp in multiple requests will be opened in another ticket.


feat: support ISO format for dates in the barman-cloud output

Closes #48

Looks good. One comment is that we could have a begin time in ISO format, and an end time in non-ISO format, and the code would work fine. Would it make sense to add a consistency check? Either we use ISO format for both begin/end, or for neither. In any case, optional.
    if b.EndTimeISOString != "" {
         ... snipped ...
    } else if b.EndTimeString != "" {

If we add such a check, what is the desired behavior in case of inconsistency? I cannot imagine a situation where it happens, given that both the values are produced in a single berman-cloud-backup execution, so they are consistent by definition.


Dedicated Server not accessible after reboot [UPG FAIL]

Hi
My server is not accessible after reboot. I want to create a ticket with WHM / Cpanel but I do not have the Support Access ID
How Can I raise a ticket.
My IP Address is : <IP_ADDRESS>
Thanks
Amit Kalra
If you were able to upgrade but something has gone wrong, the quickest way to get help is to open a ticket with cPanel Technical Support.
NOTE:

During stage 3, a reboot will happen and the server will be inaccessible from the network for an extended period of time while distro packages are upgraded. We recommend you have console access prior to start so you can know if it is hung or simply running slow.
If an error occurs during the elevation process, once you have fixed it, you can resume
the update process by running: /scripts/elevate-cpanel --continue

We cannot provide support on individual server issues. We have to refer you to technical support.

I had to completely restore an Image of Almalinux 9 with Cpanel and restore all accounts manually from remote backup.
This script totally corrupted the file system on my Dedicated server with 2 X 1 TB NVME Drives on Raid 0


archive from a session buddy export fails

It doesn't seem to support session buddy JSON or html output.
This is chrome tool session buddy - https://chrome.google.com/webstore/detail/session-buddy/edacconmaakjimmfgnblocblbcdcpbko
When running the archive tool it produces an error message says no link could be found.
please see extract output sample of a session buddy html file:
session_buddy_export_2018_07_29_08_12_20.txt

Run it through this bash one-liner and then try importing it:
perl -pe 's/(.+?)(.+<\/a><\/li>)?$/
$3<\/a><\/li>/gm' < session_budy_export.html > fixed_export.html
./archive fixed_export.html

Sure, will try this out as well. Thanks

Try it now, it should be working on the latest master.  Comment back if you're still having issues and I'll reopen the ticket.


Aggressive Flash no longer works due to YouTube change today

At least in some browsers (SeaMonkey on Linux here) YT has started blocking Flash as of earlier today:
https://productforums.google.com/d/msg/youtube/CUaTWvKhAuE/Z9ONjZ-xAgAJ
Maybe just a matter of some JavaScript tweaks to get it back, though?

I hope @YePpHa adds a option to disable this html5 change

yes :( i can confirm.. cannot watch youtube in flash on firefox. aggressive flash = black video box. and normal flash ends up in just being html5 :'( sad sad day.
as i prefer to watch youtube with flash on firefox, and on chrome with html5 for 60fps videos.. so now i don't have that option anymore :'(

I can confirm, testes in FF, Opera and Chrome. It seems flash is gone for good.

I did notice that it still works in embedded videos, however...

@dinsdalepiranha can you elaborate? I just tried with the standard (YT generated) html code and still end up with a nasty CPU killing  tag. :-)

@Xan-Kun With this code:

Embedded: http://i.imgur.com/Tb2DQtg.png
Same video directly on YouTube: http://i.imgur.com/7zXMZex.png

I doubt if there is anything that can be done.
There is a userscript on that google forum link above that supposedly embeds the video on the youtube page you are on so the flashplayer loads but I couldn't get it to work.

@dinsdalepiranha What Broser is that and which plugin/addon? I tried your code and still got to html5.
Did you load it from an actual server or was it a file:// url?

@digideth @Xan-Kun @Leifman27 @thinkpad4 The script in this post of the above thread does work, at least for me.  In YouTube Center settings make sure External Players > Player Type is set to Aggressive Flash then add this userscript to Greasemonkey or whatever:
// ==UserScript==
// @name          YouTube Force Flash via Embed
// @namespace     YT_forceflashembed
// @description   Force Flash player by embedding YouTube in YouTube. From: https://productforums.google.com/d/msg/youtube/CUaTWvKhAuE/q6P1m1kpAwAJ
// @version 1
// @include       *.youtube.com/*
// @grant         GM_addStyle
// ==/UserScript==
// Notes:
//   * is a wildcard character
//   .tld is magic that matches all top-level domains (e.g. .com, .co.uk, .us, etc.)
/* ____80_character_separator________________________________________________ */
window.setTimeout(function() {
  var embedFrame = document.createElement("iframe");
  embedFrame.src = location.href.replace("watch?v=", "embed/");
  embedFrame.style = "width: 100%; height: 100%;";
  var player = document.getElementById("player-api");
  player.innerHTML = "";
  player.appendChild(embedFrame);
},
3000);

Note that all of your other "External Players" YT Center preferences will now be in effect on YouTube itself (autoplay, default resolution, etc.) so you can't have a separate set of prefs for embedded YT videos anymore.

@dinsdalepiranha Just wanted to say thanks for that script. It works perfectly and has saved me from the many HTML5-induced FF crashes I have been suffering through.

@dinsdalepiranha oh wow... it actually worked 0__0
THANK YOU.

@dinsdalepiranha Thanks a lot, I got it to work! The trick for me was, to remove the ".user" part from the file name.

Thanks, I was waiting for an update, but it seems that we'll have to wait a bit more, thanks for sharing a workaround.

thank you @Maurogch that totally fixed it, an issue i noticed but had no idea how to fix :)

Hey mates.
How to use that script for Opera 12.18 browser?

@MasterBLB I just put it in the "User Javascript Folder" and make sure, it ends only with ".js". As a ".user.js" extension will not have sufficient rights.

The workaround seems to have stopped working, anyone else have a workaround?

Same here.

:'( yep can confirm doesn't work anymore


UI API does not show any gateways

Hi,
There is a bridge shown in the UI. However the API does not show any Gateway. Is there someone who knows what I am doing wrong?
BR,
Kolja

The screenshot shows the Homebridge child bridge, as configured by the Homebridge UI in config.json.  This has nothing to do the deCONZ gateway as seen by Homebridge deCONZ.
On new installations, Homebridge deCONZ won't show the gateway until either:

It has obtained an API key and is exposing (devices connected to) the gateway.  Note that when running Homebridge on a different server than deCONZ, you need to unlock the gateway for Homebridge deCONZ to obtain an API key;
It has given up obtaining an API key and is not exposing (any devices connected to) the gateway.  This timeout takes a couple of minutes.
Check the Homebridge log for details on what Homebridge deCONZ is doing.

Hi, thanks for the clarification!
I guess that the API key was obtained. But somehow no devices are exposed, although one zigbee switch is connected via the deconz App.

I guess not, or Homebridge deCONZ would have created an accessory for the gateway to persist the API key.

Thanks for your help! That is much appreciated!
Yes, you are right. There is no gateway accessory. Thus, I also cannot reinitiate the creation of the API key, right? I reinstalled the deconz plugin and this is the output:

There is no API Key request in the logs, right? How can I trigger the API Key Request if I have no gateway accessory.

Check the log: Homebridge deCONZ tries to obtain the API key on startup.  After a couple of minutes it gives up and exposes the gateway accessory based on the limited info it provides unauthenticated.

Ok, got it. It's up to deconz. Somehow the API gives back zeros for the bridgeID. I don't know why. So far, all of the found hints did not help me

I've never experienced this myself, but seen several reports of this (e.g #51, #129).  I don't know what causes this, nor how to fix it. Best ask on de deCONZ support forum.

SOLVED: Resetting the GW via the GUI helped.
Thanks a lot for your support @ebaauw !


GDScript: Fix POT generator skips some nodes (part 2)

Continuation of #86091.
Fixes #78416.
Fixes #88272.
Adds index bounds checks.
Improves filter array extraction.
Fixes the code style a bit.

Thanks!

Cherry-picked for 4.2.2.


rosslyn-classes.txt file on azure link  not Work

Can you provide an example of it?

Default I use is simply the txt below
using System;
public class Book { public Guid Id { get; set; } public string Title { get; set; } public string Author { get; set; } }


Update dbt_project.yml

Checklist

[x] When adding a Github handle to be tracked that is not yours, request the user to approve the PR

LGTM!


Tenant registration ends with Invalid Quote with TPM provided by QEMU

Is your an issue a feature request? If so, please raise it as an enhancement
Environment

OS / version:  CentosStream-9/Fedora-35
Processor architecture: x86_64
TPM Manufacturer: QEMU
Keylime version: current latest upstream 2902fe8a7173f3350138f7dcfe8551f1fc3b697f

Description
System is a virtual system with TPM emulated by QEMU. IMA is configured in kernel (I am not using keylime IMA emulator).
When registering a tenant it ends up in "operational_state": "Invalid Quote"
and verifier log contains:
keylime.ima - ERROR - IMA measurement list does not match TPM PCR 0cf7680bac137381a86c8d467f7d92331
9d680d6ae5a63e6a493cbd2ef1efa4b
Expected behavior vs. actual behavior
system should be properly registered having state Get Quote.
Steps to reproduce problem

Have a system with qemu provided TPM
enable IMA in kernel
install keylime upstream bits
configure keylime and add a tenant

Adding brief test log below
# ./test.sh

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Do the keylime setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:10:09 ] :: [  BEGIN   ] :: Running 'rlImport "./test-helpers"'
:: [ 17:10:09 ] :: [   INFO   ] :: rlImport: Found './test-helpers' during upwards traversal
:: [ 17:10:09 ] :: [   INFO   ] :: rlImport: Will try to import ./test-helpers from /var/tmp/fmf_wrapper_git_cache/tests/https:__github.com_RedHat-SP-Security_keylime-tests/./Library/test-helpers/lib.sh
:: [ 17:10:09 ] :: [   INFO   ] :: found dependencies: ''
:: [ 17:10:09 ] :: [   PASS   ] :: Command 'rlImport "./test-helpers"' (Expected 0, got 0)
:: [ 17:10:09 ] :: [   INFO   ] :: using '/var/tmp/beakerlib-EKC5AC1/backup-limeConf' as backup destination
:: [ 17:10:09 ] :: [  BEGIN   ] :: Running 'sed -i 's/^require_ek_cert.*/require_ek_cert = False/' /etc/keylime.conf'
:: [ 17:10:09 ] :: [   PASS   ] :: Command 'sed -i 's/^require_ek_cert.*/require_ek_cert = False/' /etc/keylime.conf' (Expected 0, got 0)
:: [ 17:10:09 ] :: [  BEGIN   ] :: Running 'sed -i 's/^ca_implementation.*/ca_implementation = openssl/' /etc/keylime.conf'
:: [ 17:10:09 ] :: [   PASS   ] :: Command 'sed -i 's/^ca_implementation.*/ca_implementation = openssl/' /etc/keylime.conf' (Expected 0, got 0)
Redirecting to /bin/systemctl status tpm2-abrmd.service
Redirecting to /bin/systemctl start tpm2-abrmd.service
:: [ 17:10:09 ] :: [   LOG    ] :: rlServiceStart: Service tpm2-abrmd started successfully
:: [ 17:10:14 ] :: [  BEGIN   ] :: Running 'keylime_verifier 2>&1 >> /var/tmp/limeLib/limeLib-keylime-verifier.log &'
:: [ 17:10:14 ] :: [   PASS   ] :: Command 'keylime_verifier 2>&1 >> /var/tmp/limeLib/limeLib-keylime-verifier.log &' (Expected 0, got 0)
:: [ 17:10:14 ] :: [  BEGIN   ] :: Running 'limeWaitForVerifier'
:: [ 17:10:14 ] :: [   INFO   ] :: rlWaitForSocket: Waiting max 120s for socket `8881' to start listening
:: [ 17:10:15 ] :: [   INFO   ] :: rlWaitForSocket: Wait successful!
:: [ 17:10:15 ] :: [   PASS   ] :: Command 'limeWaitForVerifier' (Expected 0, got 0)
:: [ 17:10:15 ] :: [  BEGIN   ] :: Running 'keylime_registrar 2>&1 >> /var/tmp/limeLib/limeLib-keylime-registrar.log &'
:: [ 17:10:15 ] :: [   PASS   ] :: Command 'keylime_registrar 2>&1 >> /var/tmp/limeLib/limeLib-keylime-registrar.log &' (Expected 0, got 0)
:: [ 17:10:15 ] :: [  BEGIN   ] :: Running 'limeWaitForRegistrar'
:: [ 17:10:15 ] :: [   INFO   ] :: rlWaitForSocket: Waiting max 120s for socket `8891' to start listening
:: [ 17:10:16 ] :: [   INFO   ] :: rlWaitForSocket: Wait successful!
:: [ 17:10:16 ] :: [   PASS   ] :: Command 'limeWaitForRegistrar' (Expected 0, got 0)
:: [ 17:10:16 ] :: [  BEGIN   ] :: Running 'keylime_agent 2>&1 >> /var/tmp/limeLib/limeLib-keylime-agent.log &'
:: [ 17:10:16 ] :: [   PASS   ] :: Command 'keylime_agent 2>&1 >> /var/tmp/limeLib/limeLib-keylime-agent.log &' (Expected 0, got 0)
Writing allowlist to /var/tmp/fmf_wrapper_git_cache/tests/https:__github.com_RedHat-SP-Security_keylime-tests/functional/basic-attestation-on-localhost/allowlist.txt with sha256sum...
Creating allowlist for init ram disk
extracting /boot//initramfs-0-rescue-da769618583f4a5ba0144f95b04a2879.img
extracting /boot//initramfs-5.14.0-39.el9.x86_64.img
extracting /boot//initramfs-5.14.0-39.el9.x86_64kdump.img

gzip: stdin: not in gzip format
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 20s
::   Assertions: 8 good, 0 bad
::   RESULT: PASS (Do the keylime setup)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Add keylime tenant
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:10:29 ] :: [  BEGIN   ] :: Running 'cat > script.expect <<_EOF
set timeout 20
spawn keylime_tenant -v <IP_ADDRESS> -t <IP_ADDRESS> -u d432fbb3-d2f1-4a97-9ef7-75bd81c00000 --allowlist allowlist.txt --exclude excludelist.txt --include payload --cert default -c add
expect "Please enter the password to decrypt your keystore:"
send "keylime
"
expect eof
_EOF'
:: [ 17:10:29 ] :: [   PASS   ] :: Command 'cat > script.expect <<_EOF
set timeout 20
spawn keylime_tenant -v <IP_ADDRESS> -t <IP_ADDRESS> -u d432fbb3-d2f1-4a97-9ef7-75bd81c00000 --allowlist allowlist.txt --exclude excludelist.txt --include payload --cert default -c add
expect "Please enter the password to decrypt your keystore:"
send "keylime
"
expect eof
_EOF' (Expected 0, got 0)
:: [ 17:10:29 ] :: [  BEGIN   ] :: Running 'expect script.expect'
spawn keylime_tenant -v <IP_ADDRESS> -t <IP_ADDRESS> -u d432fbb3-d2f1-4a97-9ef7-75bd81c00000 --allowlist allowlist.txt --exclude excludelist.txt --include payload --cert default -c add
Using config file /etc/keylime.conf
2022-01-05 17:10:29.493 - keylime.tpm - INFO - TPM2-TOOLS Version: 5.0
2022-01-05 17:10:29.496 - keylime.tenant - INFO - Setting up client TLS in /var/lib/keylime/cv_ca
2022-01-05 17:10:29.497 - keylime.registrar_client - WARNING - TLS is enabled.
2022-01-05 17:10:29.497 - keylime.registrar_client - INFO - Setting up client TLS...
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '<IP_ADDRESS>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
2022-01-05 17:10:29.573 - keylime.tenant - INFO - TPM PCR Mask from policy is 0x408000
2022-01-05 17:10:29.573 - keylime.tenant - INFO - TPM PCR Mask from policy is 0x808000
Please enter the password to decrypt your keystore:
2022-01-05 17:10:29.675 - keylime.ca-util - INFO - Creating cert package for d432fbb3-d2f1-4a97-9ef7-75bd81c00000 in d432fbb3-d2f1-4a97-9ef7-75bd81c00000-pkg.zip
2022-01-05 17:10:29.754 - keylime.ca-util - INFO - Creating cert package for RevocationNotifier in RevocationNotifier-pkg.zip
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '<IP_ADDRESS>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
<Response [200]>
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '<IP_ADDRESS>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
2022-01-05 17:10:30.698 - keylime.tpm - WARNING - PCR #0 in quote not found in tpm_policy, skipping.
2022-01-05 17:10:30.699 - keylime.tenant - WARNING - DANGER: EK cert checking is disabled and no additional checks on EKs have been specified with ek_check_script option. Keylime is not secure!!
2022-01-05 17:10:30.699 - keylime.tenant - INFO - Quote from <IP_ADDRESS> validated
:: [ 17:10:30 ] :: [   PASS   ] :: Command 'expect script.expect' (Expected 0, got 0)
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '<IP_ADDRESS>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
:: [ 17:10:35 ] :: [  BEGIN   ] :: Running 'keylime_tenant -c cvlist'
Using config file /etc/keylime.conf
2022-01-05 17:10:36.181 - keylime.tpm - INFO - TPM2-TOOLS Version: 5.0
2022-01-05 17:10:36.184 - keylime.tenant - INFO - Setting up client TLS in /var/lib/keylime/cv_ca
2022-01-05 17:10:36.184 - keylime.tenant - WARNING - Using default UUID d432fbb3-d2f1-4a97-9ef7-75bd81c00000
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '<IP_ADDRESS>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
2022-01-05 17:10:36.261 - keylime.tenant - INFO - From verifier <IP_ADDRESS> port 8881 retrieved: "{'code': 200, 'status': 'Success', 'results': {'uuids': [['d432fbb3-d2f1-4a97-9ef7-75bd81c00000']]}}"
:: [ 17:10:36 ] :: [   PASS   ] :: Command 'keylime_tenant -c cvlist' (Expected 0, got 0)
2022-01-05 17:10:36.261 - keylime.tenant - INFO - From verifier <IP_ADDRESS> port 8881 retrieved: "{'code': 200, 'status': 'Success', 'results': {'uuids': [['d432fbb3-d2f1-4a97-9ef7-75bd81c00000']]}}"
:: [ 17:10:36 ] :: [   PASS   ] :: File '/var/tmp/rlRun_LOG.AgyL1SAD' should contain '{'code': 200, 'status': 'Success', 'results': {'uuids':.*'d432fbb3-d2f1-4a97-9ef7-75bd81c00000''
:: [ 17:10:36 ] :: [  BEGIN   ] :: Running 'keylime_tenant -c status -u d432fbb3-d2f1-4a97-9ef7-75bd81c00000'
Using config file /etc/keylime.conf
2022-01-05 17:10:36.780 - keylime.tpm - INFO - TPM2-TOOLS Version: 5.0
2022-01-05 17:10:36.783 - keylime.tenant - INFO - Setting up client TLS in /var/lib/keylime/cv_ca
2022-01-05 17:10:36.783 - keylime.registrar_client - WARNING - TLS is enabled.
2022-01-05 17:10:36.783 - keylime.registrar_client - INFO - Setting up client TLS...
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '<IP_ADDRESS>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
2022-01-05 17:10:36.859 - keylime.tenant - INFO - {"code": 200, "status": "Agent d432fbb3-d2f1-4a97-9ef7-75bd81c00000 exists on registrar <IP_ADDRESS> port 8891.", "results": {"d432fbb3-d2f1-4a97-9ef7-75bd81c00000": {"aik_tpm": "ARgAAQALAAUAcgAAABAAFAALCAAAAAAAAQDTYljsAACsaGr/3ZYFpkaUyaSXX3ukGqRGkiY8WhBLsG0svlFVGTXL4b9IcNF6SWnwKwZKmJ73tb5rO1vg8HFu1MboQUlHPmb5/P6LpjOT2DZP5WZGBA18y2bzcJ7k3KMO8bolKbQtjl2toHVoBZ2QtwI+ggb3CMNzQEw+w5Q68/M/fefcukq06arlol1GHuhFicnBgmfaJd0bS3PrAtTFrIzOPLBcYjnDY95isDeDLTPFDiX0rVDg7+gC7p+QtltfQa0SkulH+ZrV5ueUyiaMYJHfKahHC9GgxNM1IPQv2lz/MeBonZyg9d68CBP79aU8AHRRPO95iXvnEqlP4KtN", "ek_tpm": "AToAAQALAAMAsgAgg3GXZ0SEs/gakMyNRqXXJP1S124GUgtk8qHaGzMUaaoABgCAAEMAEAgAAAAAAAEArptNXgABJ7wYSQw24GSsbmQBGHkAgKiq8mgq/5AJd4vpA0pYXTrjnptgGi7fWIvWRS4/PZEh9Tog6N3B0ytQCkqbHpHcXVWfaqpby/AYVSDm9nmEb4myMsC/PWPQK0Tn1wVGt2ueXnIOCcFKv6/iEJkYKfJdy1+ib37ihVmqBT9RslfS8a8Gp4zeIzPfuUXmPaft6LsXySMRyWmgDAhPe4iworAny3FGanErSjGYmyZQngUs6Pbbz6CjkmKLyKryQG+RWaOkQ8othj2nmRf7FyRVOPfmAzCmGXiqtKcG/ZazBrYjo63i9ZWOYng8RziPDjeagqoFQT+i+sgslBgUhw==", "ekcert": "MIIEGTCCAoGgAwIBAgIBBTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDEw1zd3RwbS1sb2NhbGNhMB4XDTE5MDYxOTEwNDIwN1oXDTI5MDYxNjEwNDIwN1owODE2MDQGA1UEAxMtdHBtLXBiZDM6ZmNhZGE3NmEtYzg2Ny00NmYxLWI3NWMtZTc4MDU0NGU4ODgyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArptNXgABJ7wYSQw24GSsbmQBGHkAgKiq8mgq/5AJd4vpA0pYXTrjnptgGi7fWIvWRS4/PZEh9Tog6N3B0ytQCkqbHpHcXVWfaqpby/AYVSDm9nmEb4myMsC/PWPQK0Tn1wVGt2ueXnIOCcFKv6/iEJkYKfJdy1+ib37ihVmqBT9RslfS8a8Gp4zeIzPfuUXmPaft6LsXySMRyWmgDAhPe4iworAny3FGanErSjGYmyZQngUs6Pbbz6CjkmKLyKryQG+RWaOkQ8othj2nmRf7FyRVOPfmAzCmGXiqtKcG/ZazBrYjo63i9ZWOYng8RziPDjeagqoFQT+i+sgslBgUhwIDAQABo4HNMIHKMBAGA1UdJQQJMAcGBWeBBQgBMFIGA1UdEQEB/wRIMEakRDBCMRYwFAYFZ4EFAgEMC2lkOjAwMDAxMDE0MRAwDgYFZ4EFAgIMBXN3dHBtMRYwFAYFZ4EFAgMMC2lkOjIwMTcwNjE5MAwGA1UdEwEB/wQCMAAwIgYDVR0JBBswGTAXBgVngQUCEDEOMAwMAzIuMAIBAAICAJYwHwYDVR0jBBgwFoAUC76nO8Z3SOYicOU/tWx3k5u6A4kwDwYDVR0PAQH/BAUDAwcgADANBgkqhkiG9w0BAQsFAAOCAYEArwBulIo+dnzXXo3PMt1x6aJpjPCfyr9Av0QVkXfr/5PRg5bYiMVPkzH2J6PCyNfOuYJJ9fU9eKIEpTENLvgS7p54SdV59xBl44JqbMoDM2BhYz7zRKgaovJaPEG+53JnO6IMptz6pT7BzhMhiwh5GTS4AvS/LzvNvKA/p8CvoC8auoIw7TtcRovh7Kpq2LuWMd1aH3BbEUHh9ervL1gHlJC+ImG/oD0B5J7x7NATVgmKZzP0XnTez+C4nnoKdtP/ZxR0LFhyrYeaEJ5S2BMlrllnwq7dhHoE1/9Ed0ClKkvUsQAOAtPoYtRy7yi9p1UTmdxFNPwXXu1Ie4Wt0uJtPbiNDWnCjD4SN9AfI+X1whrM3Ss/1eiNC1baSq8GfQJBqkTSNeKagadIiXHnJ5cp1PdIPQEdTGKRd47CSxDoZhqZu08YUZcKybr4fZ0cTYjBwidVak5S2x8JEJ2rdxMEAKDyKARjEAC0J/wuKgxK1biQOAXobEJl4AvrfZbZAvI2", "ip": "<IP_ADDRESS>", "port": 9002, "regcount": 1, "operational_state": "Registered"}}}
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '<IP_ADDRESS>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
2022-01-05 17:10:36.950 - keylime.tenant - INFO - Agent Info:
{"d432fbb3-d2f1-4a97-9ef7-75bd81c00000": {"operational_state": "Invalid Quote", "v": "Kg2uD39aSy/2BwT2q5n7eYOJ5iz+ChPXZBYJkcgajco=", "ip": "<IP_ADDRESS>", "port": 9002, "tpm_policy": "{\"22\": [\"0000000000000000000000000000000000000001\", \"0000000000000000000000000000000000000000000000000000000000000001\", \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\", \"ffffffffffffffffffffffffffffffffffffffff\", \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\", \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"], \"15\": [\"0000000000000000000000000000000000000000\", \"0000000000000000000000000000000000000000000000000000000000000000\", \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"], \"mask\": \"0x408400\"}", "vtpm_policy": "{\"23\": [\"ffffffffffffffffffffffffffffffffffffffff\", \"0000000000000000000000000000000000000000\"], \"15\": [\"0000000000000000000000000000000000000000\"], \"mask\": \"0x808000\"}", "meta_data": "{\"cert_serial\": 2, \"subject\": \"OU=53,O=MITLL,L=Lexington,ST=MA,CN=d432fbb3-d2f1-4a97-9ef7-75bd81c00000,C=US\"}", "allowlist_len": 6, "mb_refstate_len": 0, "accept_tpm_hash_algs": ["sha512", "sha384", "sha256", "sha1"], "accept_tpm_encryption_algs": ["ecc", "rsa"], "accept_tpm_signing_algs": ["ecschnorr", "rsassa"], "hash_alg": "sha256", "enc_alg": "rsa", "sign_alg": "rsassa", "verifier_id": "default", "verifier_ip": "<IP_ADDRESS>", "verifier_port": 8881, "severity_level": 6, "last_event_id": "ima.pcr_mismatch"}}
:: [ 17:10:37 ] :: [   PASS   ] :: Command 'keylime_tenant -c status -u d432fbb3-d2f1-4a97-9ef7-75bd81c00000' (Expected 0, got 0)
:: [ 17:10:37 ] :: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.HHUXpNXC' should contain '"operational_state": "Get Quote"'
:: [ 17:10:37 ] :: [   FAIL   ] :: File /var/tmp/test_payload_file should exist
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 8s
::   Assertions: 5 good, 2 bad
::   RESULT: FAIL (Add keylime tenant)

Relevant logs
kernel 5.14.0-39.el9.x86_64
I am not facing this issue when using keylime emulator instead of QEMU TPM
With git bisect we have identified the following commit as the first one introducing the issue.
80990a75d0444c9c4b854000c1482951cc130ad5 ("algorithms: extend Hash class to simplify computing hash values")
however with this commit the behavior is not exactly as described (there is a traceback due to missing codecs module and even after
fixing the import there are other issues.) With the subsequent commit applied (517a7e89fd9ff9f93d831d21db7f285cb9d1b382) the behavior matches the reported one.

FYI @sergio-correia

@kkaarreell can you also post your IMA log (/sys/kernel/security/ima/ascii_runtime_measurements), your generated policy and the output of tpm2_pcrread ?

Hi @THS-on , I have uploaded logs in an archive to
https://drive.google.com/file/d/1HajPMI9jmdW7wp1wb9CQ5hGfK6Fq6Ktf/view
Please note that this time it is Fedora-35 system.

Hi @THS-on , I have uploaded logs in an archive to https://drive.google.com/file/d/1HajPMI9jmdW7wp1wb9CQ5hGfK6Fq6Ktf/view Please note that this time it is Fedora-35 system.

Thanks, @kkaarreell, I was just uploading them as well :)

@sergio-correia can you try to apply the following patch:
diff --git a/keylime/ima_ast.py b/keylime/ima_ast.py
index d9d30d2..e72f044 100644
--- a/keylime/ima_ast.py
+++ b/keylime/ima_ast.py
@@ -348,6 +348,7 @@ class Entry:
         # https://elixir.bootlin.com/linux/v5.12.12/source/security/integrity/ima/ima_main.c#L101
         if self.ima_template_hash == get_START_HASH(ima_hash_alg):
             self.ima_template_hash = get_FF_HASH(ima_hash_alg)
+            self.pcr_template_hash = get_FF_HASH(pcr_hash_alg)

     def invalid(self):
         failure = Failure(Component.IMA, ["validation"])

My test passed with this change, @THS-on, thanks!

Nice. Can you check if your tested IMA log contains entries like this (the hash is only zeros):
10<PHONE_NUMBER>000000000000000000000000000000 ima-ng sha1:0000000000000000000000000000000000000000 /var/tmp/restraintd/logs/137573676/harness.log

If yes this I'll make this a PR.

Yeah, I got many entries like these:
10<PHONE_NUMBER>000000000000000000000000000000 ima-sig sha1:0000000000000000000000000000000000000000 /var/tmp/restraintd/logs/137557067/task.log
10<PHONE_NUMBER>000000000000000000000000000000 ima-sig sha1:0000000000000000000000000000000000000000 /var/tmp/restraintd/logs/137557067/harness.log


Add adjacency validation pass.

Validate OpPhi predecessors.
Validate OpLoopMerge successors.
Validate OpSelectionMerge successors.

Rebased and pushed into master as cd68f2b17642


Fix: Error catching in WebSockets

This pull request addresses issue #89, where the websocket times out when the LCU is first starting. I fixed this by converting the do-while loop in createWebSocketConnection into a recursive function that resolves if successful, retries if within maxRetries, and rejects if it's an error other than 'ECONNREFUSED' or if it exceeds maxRetries.
Summary of changes made:

Added the __internalRetryCount property to the ConnectionOptions interface to keep track of the number of retries attempted, and the maxRetries property to limit the number of retries. maxRetries defaults to 10, but users can modify it to -1 for infinite retries or a number of their choosing.
Removed the __internalMockFaultyConnection and __internalMockCallback properties, as they are no longer needed for debugging purposes, since we are not looking for thrown errors.
Made the options argument optional in the createWebSocketConnection function, as it was already effectively optional.
Marked pollInterval as an optional property as it seems was intended.

The changes in commit https://github.com/matsjla/league-connect/pull/71/commits/cec79ea0cc78090cc2487af2b1917eccd84abe85 did not fix the error because WebSockets do not throw errors, but instead use an 'error' event.
I've tested these changes by creating a new LeagueWebSocket as the client is launching, and it worked correctly. Please let me know if you have any questions or concerns.

This is excellent - thank you so much for the contribution, and thank you for researching the flaw in the previous fix!
I've taken a view at your changes and they look great - again, thanks!
Do you think you could update the tests/websocket.test.ts file before I merge? It would be greatly appreciated.

I have not used Jest before, so I'm sure the tests could be done better with mocks. However, I was not able to figure out how to. These tests work consistently, and I'll look into it further when I have extra time to see if I can pretty up the testing.
Since testing uses a real LeagueWebSocket instance, the LCU client needs to be open at the time of testing. Also, it was necessary to wait for the socket to open before emitting the error or there would be an error trying to close the socket before it was open.
Tests added:

Handling ECONNREFUSED error no retries should test that ECONNREFUSED errors are handled correctly when there are no retries.
Handling ECONNREFUSED error with retries should test that ECONNREFUSED errors are handled correctly when there are retries. It's recommended to run this test with three retries or fewer as it may take a long time to run with more retries.
Handling an unknown error should test that unknown errors are rejected correctly.
EndTestOpen should test an ECONNREFUSED error that resolves itself and will return the WebSocket. This is similar to the LCU starting up.

Since I had to add the __internalMockCallback and __internalMockFaultyConnection properties back in, I marked them as @internal and set the stripInternal option to true in the TypeScript config. This should stop users from seeing them come up while using the package from NPM, but is still visible to contributors using the TS files. I also added the @internal flag to the __internalRetryCount.
In the function createWebSocketConnection, the parameter options has been set to have a default empty object when not provided. This is now done in the function declaration instead of later in the error handler.
Finally, I updated the README to have the options for createWebSocketConnection and I changed rift-explorer to LCU-Explorer since rift-explorer is no longer maintained.
README changes:

Added LeagueWebSocket to the table of contents.
Added createWebSocketConnection options to the README.
Updated the createWebSocketConnection example to use some of the new options.
Changed rift-explorer to LCU-Explorer in the README. Also, the link to the new LCU-Explorer repository has been updated.

Sorry for being late, but this looks great! Thank you so much

I've tagged rc10 now, should be available on NPM shortly


How to get UTXO? and Send Signed Transaction to cardano network without running local node

You need a full node server bro, you may check this refer:
https://github.com/Emurgo/yoroi-frontend/issues/879#issuecomment-517969610


Register.vue - This depency was not found AuthenticationService:...when running npm run dev

Hi,
I'm following the youtube tutorial Full Stack Web App Part 1

This dependency was not found:

@/services/AuthenticationService in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/Register.vue

To install it, you can run: npm install --save @/services/AuthenticationService

How do I troubleshoot this?
I'm using

Node 8.15.1
NPM 6.4.1

This is not an issue but more of a troubleshooting help.
If it helps,  I'm running the server in a virtual box and accessing the app remotely.. does this make it an issue?

Yes, this is best closed.  Newbie mistake -- files in questions are misplaced.  Their folder should be inside .../client/src/ so they can be properly accessed.
Moral lesson: don't give up.  Try other avenue if you don't succeed -- get around again and you will be surprise at simple things missed.


Macros: Declaring a constructor on a generic class with an implements breaks generation

Consider:
macro class Example implements ClassDeclarationsMacro {
  const Example();

  @override
  FutureOr<void> buildDeclarationsForClass(
    ClassDeclaration clazz,
    MemberDeclarationBuilder builder,
  ) async {
    builder.declareInType(DeclarationCode.fromParts([
      'SimpleA();',
    ]);
  }
}

Then used as:
class Simple {}

@Example()
class SimpleA<T> implements Simple {}

The code-generation appears to fail in this case.
Removing <T> or the implements fixes the issue

Thanks! This will need fixing but it's not high priority right now, so moving to the backlog.


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/82428

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/82695

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.


Question on custom motif sets

Hello! Been having fun formatting some independent data with this package. I wanted to ask about how to properly create a custom motif set for input.
As an example, I've downloaded pwms from other databases such as viestra and cisdb and generate motif matrixes and created motif objects. I wasn't sure how to best integrate these with the Jaspar core dataset and how to best make a custom motif to TF map.
After reading a bit about TF naming schemes, I was wondering how you go about assigning names to TFs. Brief look at the regions code for find_motif(), it seems like we match the input TF name with gene name input from the rna assay. So how do we deal with dimers/trimers - e.g. motifs where more than one TF is implicated?
Similarly, do you have any recommendation for combining datasets. In your paper, a pretty sophisticated (at least to a beginner like me) method of selecting for various motifs in the core + unvalidated Jaspar as well as other sources and was hoping you could share some of your experience in putting this together.
Thanks!
Dan

Heyhey, those are pretty good questions. Currently we assign each part of the dimer/trimer the motif individually, and don't really consider them a complex in the model. This is for sure too simplified and we have been thinking about other approaches, but it's also not entirely straight forward to deal with it properly. With good annotations, one could e.g. average the expression over all members of a complex... I'm very much open for suggestions :)
As for building your own database, I think there are two approaches and it depends what your general goal is. Either you try to get as many motifs for as many TFs as possible, or you try to find very confident ones. In the paper we really tried to get as many TF's as possible into the GRN, and therefore consulted a number of different databases and methods. Nowadays I think I would potentially go a different route and stick with the confidently annotated ones... If you want to combine multiple datasets, I would recommend defining a hierarchy of which one you trust more and choose motifs based on this hierarchy. In principal however, you could also just combine all datasets, since Pando supports having multiple motifs per TF.
Hope this helps, cheers, J

Cool thats helpful! I have been able to somewhat piece together a slightly wider motif set but running into some trouble with the customization with the next lists that the PWM databases come in. This is less so a pando question but a more general R question but are there any helpful resources that make this process a bit easier. I've been googling around ways to manipulate these lists but haven't come up with anything super concrete thus far.


Allow OPTIONS when there is an acl:Read permission.

JIRA Ticket: https://jira.duraspace.org/browse/FCREPO-2847
What does this Pull Request do?
Allow OPTIONS when there is an acl:Read permission.
What's new?
Permit OPTIONS requests when the current user has acl:Read mode permissions to the requested resource.
How should this be tested?
Includes unit and integration tests, so the standard mvn clean test should test.
Interested parties
@awoods, @fcrepo4/committers

This is fine, but as I discovered and then discussed with @birkland in Slack. Forcing a user to include the acl:accessTo triple when there is only one acceptable object for that triple seems painful. If that triple doesn't exist in the submitted document we should assume they mean the resource the ACL is hanging off of. No?


Downloaded toolchains do not support components

Scope
I'm trying to use cargo-bisect-rustc to find when a size regression for the msp430 target was introduced. Right now, msp430 requires xargo to build, which is essentially a small wrapper over cargo that compiles libcore on-the-fly while msp430's libcore isn't built as part of CI.
xargo itself requires that the rustup component rust-src is available. However, when I attempt to run cargo-bisect-rustc against a sample repo with the regression, the script I provide always fails with error: toolchain 'bisector-nightly-2019-03-27-x86_64-unknown-linux-gnu' does not support components.
The bisector- prefix appears to be deliberate. However, I can't obtain the rust-src corresponding to each nightly thanks to the prefix. Therefore, I can't use this tool to bisect and look for when the size regression was introduced.
What options do I have?
Output
test.sh
#!/bin/sh
NOBM_FILE=`mktemp`
BM_FILE=`mktemp`

rustup component add rust-src

xargo build --manifest-path=take-api/Cargo.toml --release --target=msp430-none-elf --example min --features bare_metal
msp430-elf-size -A target/msp430-none-elf/release/examples/min > $BM_FILE

xargo build --manifest-path=take-api/Cargo.toml --release --target=msp430-none-elf --example min
msp430-elf-size -A target/msp430-none-elf/release/examples/min > $NOBM_FILE

diff -u $NOBM_FILE $BM_FILE

rm $NOBM_FILE $BM_FILE

william@xubuntu-dtrain:~/Projects/msp430-size$ cargo-bisect-rustc --script=./test.sh --preserve-target --preserve --start=2019-03-27 --end=2019-09-04 --prompt
checking nightly-2019-03-27
error: toolchain 'bisector-nightly-2019-03-27-x86_64-unknown-linux-gnu' does not support components
error: caused by: invalid toolchain name: 'bisector-nightly-2019-03-27-x86_64-unknown-linux-gnu'
error: `rust-src` component not found. Run `rustup component add rust-src`.
note: run with `RUST_BACKTRACE=1` for a backtrace
error: `rust-src` component not found. Run `rustup component add rust-src`.
note: run with `RUST_BACKTRACE=1` for a backtrace

nightly-2019-03-27 finished with exit code Some(0).
please select an action to take:
> mark regressed
  mark baseline
  retry

Have you tried the --with-src option?

Somehow I managed to miss that option. I was able to find the regressed commit with the following command line: cargo-bisect-rustc --script=./test.sh --preserve-target --preserve --start=2019-03-27 --end=2019-09-04 --with-src --with-cargo
Closing due to user error :P.


notification_config not passing through when using JS SDK

Describe the bug
I might be doing something wrong, but I am able to get notification_config to Speechmatics API using curl while not managing to do it using JS SDK. The both kinds of requests do produce a transcript. However, in the administration panel I can see the notification_config in the payload when using curl but not when using JS SDK. The notification_config seems to be in the typings.
To Reproduce
Steps to reproduce the behavior:

Use notification_config like this:

{
      input: {
        fetch: { url: url },
      },
      transcription_config: {
        language: spokenLang,
        operating_point: 'enhanced',
        diarization: 'speaker',
        additional_vocab: glossary,
      },
      notification_config: [
        {
          url: 'https://xxxxxxxxxxxxxxxxx',
          method: 'post',
          contents: ['transcript'],
        },
      ],
      ...(spokenLang === 'auto' && {
        language_identification_config: {
          expected_languages: ['en', 'fi', 'sv'],
        },
      }),
      format: 'json-v2' as TranscriptionFormat,
    };

Send curl request like this:

curl -L -X POST "https://asr.api.speechmatics.com/v2/jobs" \
   -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXX" \
   --form config='{
     "type": "transcription",
        "fetch_data": {
	  "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    	},
     "transcription_config": { "language": "auto" },
     "notification_config": [
       {
         "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxx",
         "contents": [ "transcript" ],
         "auth_headers": []
       }
     ]
   }'

Go to admin panel and see the payload received. Curl request has notification_config while JS SDK request config doesn't.

Expected behavior
The notification_config should be sent to Speechmatics also using JS SDK.
Desktop (please complete the following information):

OS: Arch Linux
Browser Zen Browser (Mozilla Zen 1.0.0-a.37)
Speechmatics JS SDK version: 3.1.7

Additional context
Request config from Speechmatics panel using curl:
{
  "fetch_data": {
    "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "notification_config": [
    {
      "contents": [
        "transcript"
      ],
      "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxx"
    }
  ],
  "transcription_config": {
    "language": "auto"
  },
  "type": "transcription"
}

Request config from Speechmatics panel using JS SDK:
{
  "fetch_data": {
    "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "transcription_config": {
    "diarization": "speaker",
    "language": "auto",
    "operating_point": "enhanced"
  },
  "type": "transcription"
}

Thank you for flagging this. I believe this bug was fixed in the current latest version 4.0.0. Let us know if you encounter further issues.

@mnemitz The problem occurs in v4.0.0. To me it looks like it is typed correctly but notification_config never really gets added to the payload.

I double checked and it does not pass through on 4.0.0 either.

@erkkimon I've confirmed this code does pass notification_config in v4.0.0:
    const client = new Speechmatics("YOUR_JWT").batch
    await client.createTranscriptionJob(
      {
          "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxx"
      },
      {
        "notification_config": [
          {
            "contents": [
              "transcript"
            ],
            "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxx"
          }
        ],
        "transcription_config": {
          "language": "auto"
        },
        "type": "transcription"
      }
    )
  }

Ouput from network tab:
 {"notification_config":[{"contents":["transcript"],"url":"https://xxxxxxxxxxxxxxxxxxxxxxxxx"}],"transcription_config":{"language":"auto"},"type":"transcription","fetch_data":{"url":"https://xxxxxxxxxxxxxxxxxxxxxxxxxx"}}

Note the input is { url: ... } as opposed to fetch_data. I realize this is confusing given our API structure, but this was because we chose to separate input from configuration in the SDK. The Typescript types should also reflect this.
See our original batch URL example here for reference: https://github.com/speechmatics/speechmatics-js-sdk/blob/v4.0.0/examples/example_batch_url.js
Lastly, I would recommend using our new package @speechmatics/batch-client going forward. It should have all the functionality of<EMAIL_ADDRESS>plus better editor integration to avoid these sorts of issues!
Going to close this issue now. Feel free to reopen/open a new issue if you encounter any problems.


Split string is broken

I can not find a way to use the function split (a nil value).
It seems broken for Lua 5.1.4 on Windows.
Please check code and online help.
require 'std'
local string = 'std.string'
-- from help Usage:
words = split "a very short sentence"
-- >attempt to call global 'split' (a nil value)
t = string.split('a,b,c', ',')
type(string.split)
-- > nil

Hi vepadj,
Thanks for trying out Lua stdlib.
I'm assuming you are using a recent release of stdlib, either from LuaRocks, or installed yourself from one of the releases here at github, or compiled from your own clone of this repo?  If you have a very old version installed, what I say below is not necessarily true.  Since you're just starting out, I'd recommend getting the latest release, and using the online documentation linked here https://lua-stdlib.github.io/lua-stdlib.

By design, the modules from stdlib do not corrupt the global namespace, so you need to save the module tables to a variable yourself.  Simply running require 'std' loads the std module (assuming you have it in you module path), but effectively discards the function table it returns. You can do this though:

local std = require'std'
for i, v in ipairs(std.string.split "a very short sentence") do print(i, v) end

If you save the above program into a file called split-test.lua and run it, the output is:
$ lua split-test.lua
1       a
2       very
3       short
4       sentence

Note that if you type the program into the Lua interpreter at the command line, it will not work unless you omit the local keyword (because the context of the local is lost when you hit ENTER and so is not visible to the next line of code) - but it works fine when you run it from a file.

local string = 'std.string' merely overwrites the bundled Lua string table with the string std.string.  You probably meant to use local string = require 'std.string' which captures the enhanced stdlib string functions into a local variable - this contains all of the entry points of the bundled string table, plus all the extras described in the stdlib docs.

After you load a local string variable with the stdlib string functions, you must call those functions from the table, like this:

local std = require 'std'
local string = std.string

print(std.tostring(string.split 'a very short sentence'))

(caveat about not using local variables at the Lua prompt still applies!)
Finally,  if you have some specific improvements I could add to the documentation (bearing in mind these are reference docs, not a tutorial) that would have been less confusing for you, I would be delighted to hear from you.
Cheers,
Gary


Ios error on installation

First i was running the app on ios and getting the same error as in this issue https://github.com/react-native-sensors/react-native-sensors/issues/413. Then i thought it could possibly be because i missed some step in the ios installation guide. But after following the steps in the guide here : https://react-native-sensors.github.io/docs/Installation.html the app doesn't even build anymore. I get the following error on xcode:

Am i doing something wrong on the installation? Did it change? Or is this a bug?
"react-native": "0.66.3",
"react-native-sensors": "^7.3.3",

I have the same issue, except the missing file is React/RCTBridge.h

In my case, I accidentally applied both manual and automatic installations. I didn't get this error when I just did the automatic installation: https://react-native-sensors.github.io/docs/Installation.html#automatic-installation


Storybook: Products Pagination

Description
Products Pagination Component Added
Fixes #12
How to test?
tested successfully with : npm run storybook & npm run client
Checklist

[X] I have performed a self-review of my own code
[X] I have followed the name conventions for CSS Classnames and filenames, Components names and filenames, Style filenames, if you are in doubt check the the project README.MD and here https://github.com/HackYourFuture-CPH/curriculum/blob/master/review/review-checklist.md
[X] I have commented my code, particularly in hard-to-understand areas, if you code was simple enough mark the box anyway
[X] I have made corresponding changes to the documentation, if you code was simple enough mark the box anyway
[X] This PR is ready to be merged and not breaking any other functionality

PR Merged & closed after approval from the reviewers.


1 videostream in Teams VDI?

Hi All,
May the 22nd I've seen a change in the known issues and limitations. One of the limitations in particular wondered me. With Teams expending from 2x2 to 3x3 simultaneous streams, the VDI version is reducing the streams to 1.
Is this just a temporary setting or does it stay this way?
We are struggling with users to keep using Teams instead of alternatives and this doesn't help us.
Kind regards,
Jordy

@jvondermans thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.


This addon is no longer appearing in HA addon store.

I have this addon and its working great.  Had to start troubleshooting some error logs lately and noticed that this addon is no longer in the addon store.  I can only see three addons under your repository.
They are:
Hass.io Community Store
Home Assistant Google Drive Backup
Zigbee2MQTT
I have tried re adding the repository however this has not rectified the issue.

Cmd('git') failed due to: exit code(128) cmdline: git clone -v --recursive --depth=1 --shallow-submodules -- https://github.com/MatterVN/HassioAddon /data/addons/git/eeb054de stderr: 'Cloning into '/data/addons/git/eeb054de'... POST git-upload-pack (175 bytes) POST git-upload-pack (244 bytes) Submodule 'ModbusTCP2MQTT' (https://github.com/MatterVN/ModbusTCP2MQTT) registered for path 'ModbusTCP2MQTT' Submodule 'TTLock2MQTT' (https://github.com/MatterVN/TTLock2MQTT) registered for path 'TTLock2MQTT' Cloning into '/data/addons/git/eeb054de/ModbusTCP2MQTT'... Cloning into '/data/addons/git/eeb054de/TTLock2MQTT'... fatal: remote error: upload-pack: not our ref a48590a7a7b16dc003336e4d6a7d7671c372979a fatal: Fetched in submodule path 'ModbusTCP2MQTT', but it did not contain a48590a7a7b16dc003336e4d6a7d7671c372979a. Direct fetching of that commit failed. '

Fixed.


feat: Fixed the bug where the Contact us button and the contact us link in the footer of the trip booking section were not redirecting to the contact us form

Title and Issue number

Title : Contact us button redirecting to home page in trip booking page.
Issue No. : #719
Code Stack :  Fixed the bug in the html files of dedicated destinations folder
Close #719

Description

Fixed an issue in the project where the 'Contact us' button of the trip booking page and also the contact link in the footer of the same page were not redirecting to the contact form.
I resolved a bug on the by updating the href attribute in the anchor tags of each html file for each destination. The 'Contact us' button in the 'Book Now' page and the contact link in the footer now correctly redirect to the contact form.
This fix ensures that both links now correctly navigate to the contact form, improving user experience and accessibility.
Video/Screenshots (mandatory)

https://github.com/apu52/Travel_Website/assets/125660723/351334fc-e8fb-476e-a1f1-b94dbc0cfd77
https://github.com/apu52/Travel_Website/assets/125660723/9c32fe85-cf5b-49d8-bbee-f8514d5f8438
Type of PR

[x] Bug fix
[x] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Checklist:

[x] I have performed a self-review of my code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have gone through the  contributing.md file before contributing

Additional context:

##Are you contributing under any Open-source programme?

[x] I am contributing under GSSOC'24
[ ] I am contributing under VSOC'24

@shraddhha this PR is also not looking good .as it's not correctly deployed.


Error in API doc

var myRecord = new ABRecord(b:3) should be var myRecord = new ABRecord({b:3}) in the "Record()" API doc.

Thanks for the report!


Gc

@OfficialAhmed  @NitkarshChourasia
I made changes.
Review my code :)

I will do by the morning afternoon of 7th October, 2023.

I made corrections on indentation @OfficialAhmed .
Thanks for  the suggestion @NitkarshChourasia . I used black command to do so

I made corrections on indentation @OfficialAhmed .
Thanks for the suggestion @NitkarshChourasia . I used black command to do so.

Welcome.

@geekcomputers Would you mind adding hacktoberfest and hacktoberfest-accepted labels to my pull request.

@geekcomputers Would you mind adding hacktoberfest and hacktoberfest-accepted labels to my pull request.

This repo has not been added to that program-fest. @AkhilYadavPadala


feat(tagsInput): Add support for selecting tags on click

Add the possibility for the user to click in a tag to select it, so it can be removed when clicking backspace.

Sorry for the confusion, I added this feature to this PR with the latest version https://github.com/mbenford/ngTagsInput/pull/445


Casting to generic from its non-generic supertype via an ivar leads to infinite loop in the compiler

Bug Report
It's a bit hard to explain densely, but let's say this is the code that I'm trying to write:
module IFoo
end

struct Foo(T)
  include IFoo
end

def cook(foo : Foo(T)) forall T
  # E.g. do stuff with Pointer(T)
end

ary = [] of IFoo

5.times { ary << Foo(Int32).new }
5.times { ary << Foo(Float64).new }

cook(Foo(Int32).new) # As expected, this works, T = Int32

ary.each do |foo|
  cook(foo) # Kaboom! An IFoo
end

Here's what my hands wrote to fix it:
module IFoo
end

struct Foo(T)
  include IFoo

  getter type = T
end

def cast(foo, type : T) forall T
  foo.as(Foo(T))
end

def cook(foo : Foo(T)) forall T
  # Do stuff with Pointer(T)
end

def cook(foo : IFoo)
  cast(foo, foo.type)
end

ary = [] of IFoo

5.times { ary << Foo(Int32).new }
5.times { ary << Foo(Float64).new }

ary.each do |foo|
  cook(foo)
end

The compiler hangs on this, with RAM usage steadily increasing. The thing is recursive, I see; at the very least, a pretty tough situation for the compiler. Should be an error? Is circumventing generics even legal this way? :)
Crystal 1.6.2 [879691b2e] (2022-11-03)

LLVM: 13.0.1
Default target: x86_64-unknown-linux-gnu

Sticking a macro print into the cast method like the following maybe gives extra insight:
def cast(foo, type : T) forall T
  {% puts T %}
  foo.as(Foo(T))
end

(Float64.class | Int32.class)
((Float64.class | Int32.class).class | Float64.class | Int32.class)
(((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class)
((((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class)
(((((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | (((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class)
((((((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | (((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | (((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class).class | ((Float64.class | Int32.class).class | Float64.class | Int32.class).class | (Float64.class | Int32.class).class | Float64.class | Int32.class)
[Truncated]

I suppose the problem is that the T of the cast function isn't what you expect, because the type of the Foo.type method is Float64.class | Int32.class, because there are 2 known instances of Foo(T). However that cast method introduces a third one, causing that type to expand and it recurses from there.
Also worth noting is the slightly confusing error of the first case
In example.cr:20:3

 20 | cook(foo) # Kaboom! An IFoo
      ^---
Error: no overload matches 'cook' with type IFoo

Overloads are:
 - cook(foo : Foo(T)) forall T
Couldn't find overloads for these types:
 - cook(foo : Foo(Int32))

The compiler doesn't seem to account for free vars when converting a module type into an union of its constituents, which is a reasonable limitation from the compiler's perspective because it's hard to write a generic type like that without a module. Unfortunately the error message is strange because of that

The error message is a variant of #8973


Unified font system

I have gone through and edited various files in order to create a more unified font system between the EGP and the GPU.
Both the EGP and the GPU are able to use the same fonts and have had their source altered so that their font ordering matches. They still exist as separate lists however as I was unsure of the best way to fully merge them.
I made the font loading API part of the WireLib API since the cache technically belongs to the mod and I was unsure if creating a separate table for the font functions was a good idea or not.
I have tested both the EGP and the GPU and both seem to be in working order. The transition appears seamless. Despite this I would appreciate if others tested the code before confirming the pull just in case I missed anything. My tests were only for light use, I did not attempt any major stress tests.
(This took longer than expected because I thought I was having an issue with the EGP not drawing to the screen. Turned out I forgot to hook up the correct input for the program I was using to test so I wasted about 4-6 hours trying to debug a nonexistant problem. Oops.)

nice, but maybe it would be useful to have a function that accepts a table parameter (instead of just size), so you can change all of the options while still using this library

:+1: with @Divran - these should use table parameters rather than just passing the font and size fields.
(Especially as then you get the nice table literal function call syntax - WireLib.SetFont { font = "Arial", size = 16 })

Does the reordering of fonts break old EGP / ZGPU code? The reordering isn't strictly needed as the new font cache doesn't use the numerical indices.

I'm reasonably sure that reordering fonts don't break EGP, since when the player uses egpFont it looks up the ID from the string. As long as the order is the same on both the server and the client, it'll work.

The reordering doesn't break anything.
The GPU uses indices, so I made sure not to reorder the GPU's list.
The EGP uses names, so I felt reordering would be ok.
Ideally they should both be the same list, but that would require more testing and more checking that it's not going to break already existing code, and it can be done at a later date anyway.

Only problem is the default egp screen that appears when you spawn an egp screen
https://github.com/wiremod/wire/blob/master/lua/entities/gmod_wire_egp/lib/egplib/objectcontrol.lua#L173
which uses the font id. Just change this ID to point to the same font as before.

why was it closed

Would be nice to have both, because most often you only want to change the size.

WireLib.SetFont { font = "Arial", size = 18 }

true
On Tue, Dec 8, 2015 at 11:53 AM, Abigail<EMAIL_ADDRESS>wrote:

Would be nice to have both, because most often you only want to change the
size.
WireLib.SetFont { font = "Arial", size = 18 }
—
Reply to this email directly or view it on GitHub
https://github.com/wiremod/wire/pull/1046#issuecomment-162848238.


GH-35167: [Doc][C++] Updated arguments count in example for TableReader

Closes: #35167

Thanks for the help! @wjones127

@wjones127 resolved all the comments.


VisualStudioVersion not passed along in LoadRelease

When run on AppVeyor, the VsProj.LoadRelease, the VisualStudioVersion ends up evaluating to 10.0 by default. Strangely, it ends up evaluating to 11.0 when I set this in appveyor.yml:
environment:
  VisualStudioVersion: 12.0

My workaround was to pass in the property explicitly:
//        let p = VsProj.LoadRelease proj
        let p = VsProj.Load proj ["Configuration","Release"; "VisualStudioVersion","12.0"]

background:
FSharp.targets for VS 2013 (12.0) and VS 2015 (14.0), this is all that is needed:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets" />

VisualStudio will set the VisualStudioVersion property when build from within VisualStudio. When MSBuild is run from the command line, that property get set based on ToolsVersion.
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

"C:\Program Files (x86)\MSBuild\12.0\Microsoft.Common.props"
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.VisualStudioVersion.v*.Common.props" Condition="'$(VisualStudioVersion)' == ''" />

"C:\Program Files (x86)\MSBuild\12.0\Microsoft.VisualStudioVersion.v12.Common.props"
<VisualStudioVersion>12.0</VisualStudioVersion>

Closing. This is more of a build issue that was specific to AppVeyor.

I'm reopening this in order to document how it works, if I can figure it out.
AppVeyor recommends setting a VisualStudioVersion environment variable to 12.0 or similar.
http://www.appveyor.com/docs/build-phase#caveats

Now that MSBuild is open source, we can see where VisualStudioVersion is used:
https://github.com/Microsoft/msbuild/search?utf8=✓&q=VisualStudioVersion
I am using Microsoft.Build.Evaluation.Project to load the project files with the constructor to pass in the global properties.
After several hours of troubleshooting on my system, the VisualStudioVersion appears to depend on two things:

the ToolsVersion in the project file
the Microsoft.Common.props if it exists

My PC with VS 2015:

AppVeyor:

#r "System.Xml"
#r "Microsoft.Build"
#r "Microsoft.Build.Framework"

open Microsoft.Build.Evaluation
open System.Collections.Generic

printfn "%s" typeof<ProjectCollection>.Assembly.Location

let pc = new ProjectCollection()
let d = Dictionary()
d.Add("Configuration", "Release")
let p = Project("vsversion.proj", d, null, pc)

let show = [ "MSBuildToolsVersion"; "MSBuildExtensionsPath"; "VisualStudioVersion" ] |> Set.ofList

p.Properties
|> Seq.filter (fun pr -> show.Contains pr.Name)
|> Seq.iter (fun pr ->
    printfn "%s %s" pr.Name pr.UnevaluatedValue
)

no ToolsVersion and no common.props has no VisualStudioVersion

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

PS C:\Projects\SourceLink1> Fsi.exe .\vsversion.fsx
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\Microsoft.Build.dll
MSBuildToolsVersion 2.0

ToolsVersion 4.0 ends up with VisualStudioVersion 11.0

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

MSBuildToolsVersion 4.0
VisualStudioVersion 11.0

ToolsVersion 12.0 ends up with VisualStudioVersion 12.0

<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

MSBuildToolsVersion 12.0
VisualStudioVersion 12.0

ToolsVersion 14 ends up with VisualStudio 14.0

<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

MSBuildToolsVersion 14.0
VisualStudioVersion 14.0

no ToolsVersion and with common.props has no VisualStudioVersion

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="C:\Projects\msbuild\src\XMakeTasks\Microsoft.Common.props" />
</Project>

MSBuildToolsVersion 2.0

ToolsVersion 4.0 ends up with VisualStudioVersion 11.0

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="C:\Projects\msbuild\src\XMakeTasks\Microsoft.Common.props" />
</Project>

MSBuildToolsVersion 2.0

ToolsVersion 12.0 ends up with VisualStudioVersion 10.0

<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="C:\Projects\msbuild\src\XMakeTasks\Microsoft.Common.props" />
</Project>

MSBuildToolsVersion 10.0

ToolsVersion 14.0 ends up with VisualStudioVersion 10.0

<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="C:\Projects\msbuild\src\XMakeTasks\Microsoft.Common.props" />
</Project>

MSBuildToolsVersion 10.0

I consider 7 & 8 to be bugs. I think this is the cause:
https://github.com/Microsoft/msbuild/blob/master/src/XMakeTasks/Microsoft.Common.props#L38
Looking at the current SourceLink.fsproj:

There may be a couple of options. To solve for VS 2013 and higher, may be just set:
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">$(MSBuildToolsVersion )</VisualStudioVersion>

That would have to be done before Microsoft.Common.props is included. May be see if Microsoft.Common.props can be removed.

If there was an open source binary of the required MSBuild library, I would bundle it. Switching to this is sometimes a pain and Microsoft.Common.props is often included.
VsProj.Load proj ["Configuration","Release"; "VisualStudioVersion","12.0"]

The problem is that just doing a #r "Microsoft.Build" leads to 4.0.0 being used instead of the latest, 12.0.0 or 14.0.0.

#r "Microsoft.Build"
open Microsoft.Build.Evaluation
printfn "%s" typeof<ProjectCollection>.Assembly.Location

$env:path = "C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0;$env:path"

How do I reference the latest Microsoft.Build on a system?

Asked on stackoverflow
http://stackoverflow.com/questions/30010283/reference-latest-gac-assembly-in-f-interactive

Looks like Microsoft.Build.Utilities.Core assembly is a runtime dependency.
.

https://github.com/Microsoft/msbuild/blob/db88c6ee0902fc86298d34b80047de9aaf57e5be/src/XMakeBuildEngine/Resources/Constants.cs#L345
"C:\Program Files (x86)\MSBuild\14.0\Bin\Microsoft.Build.Utilities.Core.dll"

Fixed! The SourceLink.MSBuild used to publish it is here:
https://www.nuget.org/packages/SourceLink.MSBuild/
Code is here:
https://github.com/ctaggart/msbuild
Blog post is in progress.


Register logcat logger

Task/Issue URL: https://app.asana.com/0/488551667048375/1203228473135603/f
Description
Forgot to register the logcat logger for the VPN process. done
Steps to test this PR
(optional)

[ ] install from this branch
[ ] filter logcat with VPN log
[ ] enable AppTP
[ ] logs should appear (this test would fail on develop branch)

Current dependencies on/for this PR:

develop

PR #2628   👈

This comment was auto-generated by Graphite.