UI migrated to Angular Material and Latest Angular version 12

@kens-aais I have not deleted old folders (openidl-ui, openidl-carrier-ui and openidl-common-ui) as I am waiting for docker files and shell script to be updated so that it can pick build files from new folders. This PR includes changes for 3 angular projects.

@raj-itpc
How do I test this locally?  I haven't worked with an angular workspace before.
We should update the readme.md file to reflect these instructions as well.

@kens-aais I have added developer-guide.md file inside openidl-ui-workspace folder. Please check it here https://github.com/openidl-org/openidl-main/blob/raj-workspace/openidl-ui-workspace/developer-guide.md

The developer-guide.md should at least be pointed to from the readme.md
The current readme.md file is generic and should be updated.  AAIS can do this.

@kens-aais I have updated openidl-ui-workspace\README.md and openidl-ui-workspace\developer-guide.md files according to newly added commands.

Ken
I have updated the readme document in the branch raj-workspace which includes build commands for the openidl-carrier-ui project. Please review and let me know me if you have any question.
Thanks
Raj
From: kens-aais @.>
Sent: Tuesday, August 3, 2021 7:32 PM
To: openidl-org/openidl-main @.>
Cc: Rajkishor Sahu @.>; Mention @.>
Subject: Re: [openidl-org/openidl-main] UI migrated to Angular Material and Latest Angular version 12 (#21)
Exercise Caution: This email is originated from an unknown external organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@kens-aais commented on this pull request.
I am not able to follow the developer-guide.md
the main readme.md file in the workspace folder should be updated to be less generic and point to the developer-guide.md if not just incorporate it.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenidl-org%2Fopenidl-main%2Fpull%2F21%23pullrequestreview-721237774&data=04|01|rajkishor.sahu%40itpeoplecorp.com|d04e6983493149931d8b08d95687371f|4e5995fdd06d4752aa172545f2f2411f|0|0|637635961007080576|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=b9Lmv2uvnogI7edb3pnnbIWsuRUJlykc%2FC71xHtke04%3D&reserved=0, or unsubscribehttps://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUD4JFVPY3OZ6O5OYT3PU2LT27ZEDANCNFSM5BM43OYA&data=04|01|rajkishor.sahu%40itpeoplecorp.com|d04e6983493149931d8b08d95687371f|4e5995fdd06d4752aa172545f2f2411f|0|0|637635961007080576|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=zTHoJjQwI11o6doTJt7VyjEBAVhdlC%2B9emfK%2FzC28iM%3D&reserved=0.
Triage notifications on the go with GitHub Mobile for iOShttps://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04|01|rajkishor.sahu%40itpeoplecorp.com|d04e6983493149931d8b08d95687371f|4e5995fdd06d4752aa172545f2f2411f|0|0|637635961007090570|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=lQawmbenK4rzISIn%2FEl5D9wIwY2pNhtYq3h1TGvMLW0%3D&reserved=0 or Androidhttps://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26utm_campaign%3Dnotification-email&data=04|01|rajkishor.sahu%40itpeoplecorp.com|d04e6983493149931d8b08d95687371f|4e5995fdd06d4752aa172545f2f2411f|0|0|637635961007090570|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=Mo3WQ4Y7XAUtwviMC5PNrAJM6LqNg373dY1k7Q3rRL4%3D&reserved=0.

@kens-aais Please review new changes and let me know if you have any questions.

I am trying to run it.  My days have been really filled with meetings so, unfortunately, I haven't been able to get everything going.  I made a cosmetic change and pushed it.  I changed "regulator" to "aais" as that is a better name for that node.

I get an error trying to run npm run start:aais
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/kennethwsayers/Development/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/kennethwsayers/Development/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR!      /Users/kennethwsayers/.npm/_logs/2021-08-05T12_57_47_515Z-debug.log

@kens-aais run all commands from inside openidl-ui-workspace folder

duh, yeah, i checked that and thought i was.  Ok. now i have to set up the config files.  Thanks and sorry for stupidity.

Raj, when running i get this message.
When running locally, make sure to create a file localdev-config.json in the root directory. See config.template.json for an example of a configuration file.
But there is no such file config.template.json that I can find.

@kens-aais create local-appid-config.json file inside the config folder. That error message is coming from express code and it's not in the scope.

Now receiving an error getting the token:
WARNING: No configurations found in configuration directory:/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/config
WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
[2021-08-05T11:24:35.912] [INFO] appid-sdk - Initialized
[2021-08-05T11:24:36.224] [INFO] ibm-cloud-env - Initializing with /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/config/mappings.json
[2021-08-05T11:24:36.229] [DEBUG] server - setting up app: registering routes, middleware...
[2021-08-05T11:24:36.230] [INFO] server - credential info
[2021-08-05T11:24:36.230] [INFO] server - {
apikey: '0rawWuUPVlMLhcXMCjlyB6BI4RR4nn-dsIuj_myDrqpQ',
appidServiceEndpoint: 'https://us-east.appid.cloud.ibm.com',
clientId: '7ad632d8-abdc-448d-8029-91eeac0ae64e',
discoveryEndpoint: 'https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92/.well-known/openid-configuration',
iam_apikey_description: 'Auto-generated for key 7ad632d8-abdc-448d-8029-91eeac0ae64e',
iam_apikey_name: 'stage-aais-AppID-ServiceKey',
iam_role_crn: 'crn:v1:bluemix:public:iam::::serviceRole:Manager',
iam_serviceid_crn: 'crn:v1:bluemix:public:iam-identity::a/361c80aeecd44412b23a7f1bc4ae580f::serviceid:ServiceId-a55b19de-13b7-429e-bd81-0150c4e98efa',
managementUrl: 'https://us-east.appid.cloud.ibm.com/management/v4/d0649a19-cf64-4e36-897b-0338cf89fe92',
oauthServerUrl: 'https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92',
profilesUrl: 'https://us-east.appid.cloud.ibm.com',
secret: 'ZGRiZTZjM2UtMmQyNS00NzU4LWI0NjEtODhjNDZlMDM2ZDNi',
tenantId: 'd0649a19-cf64-4e36-897b-0338cf89fe92',
version: 4,
callerId: '7ad632d8-abdc-448d-8029-91eeac0ae64e'
}
[2021-08-05T11:24:36.231] [INFO] appid-WebAppStrategy-config - clientId 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T11:24:36.232] [INFO] appid-WebAppStrategy-config - tenantId d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:24:36.232] [INFO] appid-WebAppStrategy-config - secret [CANNOT LOG SECRET]
[2021-08-05T11:24:36.232] [INFO] appid-WebAppStrategy-config - oauthServerUrl https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:24:36.232] [INFO] appid-WebAppStrategy-config - redirectUri http://localhost:3000/ibm/bluemix/appid/callback
[2021-08-05T11:24:36.232] [INFO] appid-user profile config-config - oauthServerUrl https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:24:36.233] [INFO] appid-user profile config-config - profilesUrl https://us-east.appid.cloud.ibm.com
[2021-08-05T11:24:36.233] [INFO] appid-user-manager - profilesUrl https://us-east.appid.cloud.ibm.com
[2021-08-05T11:24:36.233] [INFO] appid-user-manager - oauthServerUrl https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:24:36.234] [INFO] appid-APIStrategy-config - oauthServerUrl https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:24:36.242] [DEBUG] server - setting up app: initializing passport
App started listening at  8080
[2021-08-05T11:51:16.186] [ERROR] appid-webapp-strategy - Failed to obtain tokens :: 400 {"error":"invalid_grant","error_description":"The email or password that you entered is incorrect.","cdErrorCode":"USER_NOT_FOUND"}
[2021-08-05T11:52:19.440] [INFO] appid-public-key-util - Public keys updated
[2021-08-05T11:52:19.444] [INFO] appid-token-util - token ver: 4
[2021-08-05T11:52:19.444] [INFO] appid-token-util - token version is valid
[2021-08-05T11:52:19.444] [INFO] appid-token-util - token aud: 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T11:52:19.813] [INFO] appid-token-util - token iss: https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:52:19.813] [INFO] appid-token-util - token ver: 4
[2021-08-05T11:52:19.813] [INFO] appid-token-util - token version is valid
[2021-08-05T11:52:19.814] [INFO] appid-token-util - token aud: 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T11:52:19.815] [INFO] appid-token-util - token iss: https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:52:20.305] [INFO] appid-TokenManager-config - clientId 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T11:52:20.305] [INFO] appid-TokenManager-config - secret [CANNOT LOG SECRET]
[2021-08-05T11:52:20.305] [INFO] appid-TokenManager-config - oauthServerUrl https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T11:52:20.663] [INFO] appid-token-util - token ver: 4
[2021-08-05T11:52:20.663] [INFO] appid-token-util - token version is valid
[2021-08-05T11:52:20.663] [INFO] appid-token-util - token aud: 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T11:52:20.932] [INFO] appid-token-util - token iss: https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
Error:  Error: Invalid URI "/block-explorer"
at Request.init (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:273:31)
at new Request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:127:8)
at request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/index.js:53:10)
at Object.common.handleRequest (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:58:5)
at common.getBlockHistory (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:166:16)
at Layer.handle [as handle_request] (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/route.js:137:13)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-common-ui/server/middlewares/api-auth-handler.js:103:9
at ApiStrategy.strategy.success (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/passport/lib/middleware/authenticate.js:219:18)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/ibmcloud-appid/lib/strategies/api-strategy.js:152:16
queryString: status=DRAFT&version=latest&startIndex=0&pageSize=15&
Error:  Error: Invalid URI "/list-data-calls-by-criteria?status=DRAFT&version=latest&startIndex=0&pageSize=15&"
at Request.init (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:273:31)
at new Request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:127:8)
at request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/index.js:53:10)
at Object.common.handleRequest (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:58:5)
at common.getDataCalls (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:138:16)
at Layer.handle [as handle_request] (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/route.js:137:13)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-common-ui/server/middlewares/api-auth-handler.js:103:9
at ApiStrategy.strategy.success (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/passport/lib/middleware/authenticate.js:219:18)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/ibmcloud-appid/lib/strategies/api-strategy.js:152:16

some kind of issue with user id perhaps, i'll double check configs etc

@kens-aais sent you the mail with config details. You can delete the error message comment as it contains service details.

Your config was the same as mine.  Still replaced and still have the same problem:
[2021-08-05T14:09:28.239] [INFO] appid-public-key-util - Public keys updated
[2021-08-05T14:09:28.243] [INFO] appid-token-util - token ver: 4
[2021-08-05T14:09:28.243] [INFO] appid-token-util - token version is valid
[2021-08-05T14:09:28.243] [INFO] appid-token-util - token aud: 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T14:09:28.611] [INFO] appid-token-util - token iss: https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T14:09:28.611] [INFO] appid-token-util - token ver: 4
[2021-08-05T14:09:28.611] [INFO] appid-token-util - token version is valid
[2021-08-05T14:09:28.611] [INFO] appid-token-util - token aud: 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T14:09:28.611] [INFO] appid-token-util - token iss: https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T14:09:29.059] [INFO] appid-TokenManager-config - clientId 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T14:09:29.059] [INFO] appid-TokenManager-config - secret [CANNOT LOG SECRET]
[2021-08-05T14:09:29.059] [INFO] appid-TokenManager-config - oauthServerUrl https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
[2021-08-05T14:09:29.401] [INFO] appid-token-util - token ver: 4
[2021-08-05T14:09:29.401] [INFO] appid-token-util - token version is valid
[2021-08-05T14:09:29.401] [INFO] appid-token-util - token aud: 7ad632d8-abdc-448d-8029-91eeac0ae64e
[2021-08-05T14:09:29.706] [INFO] appid-token-util - token iss: https://us-east.appid.cloud.ibm.com/oauth/v4/d0649a19-cf64-4e36-897b-0338cf89fe92
Error:  Error: Invalid URI "/block-explorer"
at Request.init (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:273:31)
at new Request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:127:8)
at request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/index.js:53:10)
at Object.common.handleRequest (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:58:5)
at common.getBlockHistory (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:166:16)
at Layer.handle [as handle_request] (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/route.js:137:13)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-common-ui/server/middlewares/api-auth-handler.js:103:9
at ApiStrategy.strategy.success (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/passport/lib/middleware/authenticate.js:219:18)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/ibmcloud-appid/lib/strategies/api-strategy.js:152:16
queryString: status=DRAFT&version=latest&startIndex=0&pageSize=15&
Error:  Error: Invalid URI "/list-data-calls-by-criteria?status=DRAFT&version=latest&startIndex=0&pageSize=15&"
at Request.init (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:273:31)
at new Request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/request.js:127:8)
at request (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/request/index.js:53:10)
at Object.common.handleRequest (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:58:5)
at common.getDataCalls (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-ui/server/controllers/common.js:138:16)
at Layer.handle [as handle_request] (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/express/lib/router/route.js:137:13)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/projects/openidl-common-ui/server/middlewares/api-auth-handler.js:103:9
at ApiStrategy.strategy.success (/Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/passport/lib/middleware/authenticate.js:219:18)
at /Users/kennethwsayers/Development/linux-foundation/branches/raj-workspace/openidl-main-raj-workspace/openidl-ui-workspace/node_modules/ibmcloud-appid/lib/strategies/api-strategy.js:152:16

I think i know what the problem is.  I need to point to the data call app in the ibm cloud.  Trying again now.

got it, working now!

so, it looks pretty good.  This is a pull request into develop.  Should this go directly there or be merged with other branches before going into dev?

@kens-aais merge it into develop and please don't delete branch after that.

Done.  Tagged with 0.0.1
From: Rajkishor Sahu @.>
Date: Friday, August 6, 2021 at 12:07 AM
To: openidl-org/openidl-main @.>
Cc: Ken Sayers @.>, Mention @.>
Subject: Re: [openidl-org/openidl-main] UI migrated to Angular Material and Latest Angular version 12 (#21)
@kens-aaishttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkens-aais&data=04|01|kens%40aaisonline.com|45adb96a7824440d5dc808d958a07953|11a183b0e7574f328f598d8dd716cade|0|0|637638268523978998|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=2G0x5gHSw%2BdrkVqupLbz5fukLQ90geHPKFNA3jJlktQ%3D&reserved=0 merge it into develop and please don't delete branch after that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenidl-org%2Fopenidl-main%2Fpull%2F21%23issuecomment-894024728&data=04|01|kens%40aaisonline.com|45adb96a7824440d5dc808d958a07953|11a183b0e7574f328f598d8dd716cade|0|0|637638268523978998|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=dlJWG9P2sPDiVUzhxHQygHVKfA4qi9%2BniJGBfiYSBmM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAS2JRURGUKIIA33TGIJSHDLT3N32DANCNFSM5BM43OYA&data=04|01|kens%40aaisonline.com|45adb96a7824440d5dc808d958a07953|11a183b0e7574f328f598d8dd716cade|0|0|637638268523988954|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=6Yr2F2Ob01W7U3uElroa%2FH1sGctEPu6o%2BN0L7uSBWmk%3D&reserved=0.
Triage notifications on the go with GitHub Mobile for iOShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04|01|kens%40aaisonline.com|45adb96a7824440d5dc808d958a07953|11a183b0e7574f328f598d8dd716cade|0|0|637638268523988954|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=jgtU6zKL5RISynb9g7aFysuaGsVyWIeYs0656IpAK9o%3D&reserved=0 or Androidhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26utm_campaign%3Dnotification-email&data=04|01|kens%40aaisonline.com|45adb96a7824440d5dc808d958a07953|11a183b0e7574f328f598d8dd716cade|0|0|637638268523998909|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=g9iaRyG%2FqLs6yH%2Ff5gc6XDFuQDkoroWaB%2Fn%2FZsjtTck%3D&reserved=0.


Add the option to format the text in Markdown rather than HTML

The option to have the text formatted using markdown would help the uniformity across multiple notes. This also helps the text render properly when opened in other markdown editors.
At the moment, I wait for the plug-in to populate the text, and then I reformat manually. For example I change <sup> **16** </sup> to **$^{16}$**
This is a bigger ask, but the ability to customize the callout that is created would also be appreciated. I have a custom “Verse” callout I use, and at the moment I reformat the output to conform.

I have modified some of the JS to produce my desired output.
Here is what I modified the Superscript Bold case to output:
       case "**^1**" /* SuperScriptBold */:
        verseNumberFormatted += "**$^{" + verseNumber + "}$** ";
        return verseNumberFormatted; `

Sorry if this is not the proper channel for this type of feedback, but I got it to work for me.  I know it won’t survive an update, though.
I also changed the >[!Bible] line to output my >[!verse] callout.

I need to do investigation on it to verify whether it makes the same.
And how to offer different output options at the same time.

At the moment, I wait for the plug-in to populate the text, and then I reformat manually. For example I change <sup> **16** </sup> to **$^{16}$**

I tend to manually replace with superscript number characters (I created keyboard shortcuts with espanso: ;1, ;2… ;0), that way:
> [!bible] John 3:16 • AMP
> ¹⁰ “For God so _[greatly]_ loved _and_ dearly prized the world, that He _[even]_ gave His _[One and]_ only begotten Son, so that whoever believes _and_ trusts in Him _[as Savior]_ shall not perish, but have eternal life.


Some option to log everything

Please add some option to log everything (url, headers, request and response body)

I am going to add hooks so that you can build code to do this.


canonical hostname not resolvable in Rancher 1.2 because /etc/hosts is malformed

Rancher Version:
1.2.0
Docker Version:
1.11.2
OS and where are the hosts located? (cloud, bare metal, etc):
Ubuntu Xenial on OpenStack
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
Single node rancher with external DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:
Create a container and look at the /etc/hosts generated
Results:
<IP_ADDRESS>	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
	9ec65c353b26

Expected:
<IP_ADDRESS>	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
<IP_ADDRESS>	9ec65c353b26

Related to #6855

This is fixed in 1.2.1


Custom error messages on a per-field basis

How do we provide custom error messages on a per-field basis? This is particularly important for rules such as @format
Also, any custom message rule should inject the current options and value.
In treacherous we have .withMessage that takes either a string or a function with options and value passed in as parameters:
.forProperty("uRLAlias").addRule("launchURL",null).withMessage((v,o) => `${v} is not a valid launch URL`)
.forProperty("exitURL").addRule("regex", url).withMessage((v,o) => `${v} is not a valid exit URL`)
.forProperty("pauseURL").addRule("regex", url)

Perhaps @validationMsg can be used as a decorator, or/and
@format({ message = (v,o) => `${v} is not a valid exit URL`})

It appears that, at least for the rules applied via a decorator, that an object can be passed in that is subsequently passed back to validate.js on a per-field basis.
ie:
@email({message: '^Hmm %{value} is not a valid email address'}) email;
I'm not sure to what extent this applies for the other rule types however, and it uses validate.js's interpolation language, not Aurelia's (% vs $ etc).
That works for fairly static messages, but I haven't worked out how to pass something more advanced (like for example an i18n key) in as yet.

It also doesn't seem to update the %{value} if the field is changed from one invalid state to another...

Worked out @format as well...
@format({message: "^Bad Format", pattern: "[a-z0-9]+"}) fieldName;

@jdanyow I can't speak for @jsobell but I still have a concern re: the best way to update %{value} when the user changes the input (and it remains invalid).
Is it possible to force validate.js to do an update of the error text when the model changes somehow?

ok- re-opening, please use the gist from yesterday's blog post to create a sample of what you're trying to achieve and we can look into it.

Ok, first things first, this gistrun will fail. It doesn't matter if the variable contactMe is initially set to true or false.
If you look in the dev console, you'll see an error along the lines of "A ValidationController has not been registered".
I've removed all the input fields from the gistrun except for an email address and a checkbox. The checkbox controls whether or not the email field is added to the DOM.
It's a fairly contrived example where I'm asking the user if they want to be contacted or not. If they do, then they must give me an email address.
https://gist.run/?id=f1b95899dadb4a389b59bc5ccf990bfb
This is the method that feels intuitive to me, that's not to say it's correct! :-)

https://gist.run/?id=7ca2d283eb811719074c6ef2be93c055
Step 1: Enter 'test@invalid' as the email address.
Result 1:  "Nope test@invalid is not a valid email address"
Step 2: Edit the email address, make it 'test@still_invalid'
Result 2: "Nope test@invalid is not a valid email address"
Expected Result: "Nope test@still_invalid is not a valid email address"
Note that switching to validateTrigger.change makes no difference. Once the error is displayed, it never re-renders it while it's in an error state...
Bonus Points:
Action:    Enter 'test@invalid.domain.tld.y?'
Result:   "Nope test@invalid domain tld y is not a valid email address"
... why aren't there any periods in the email address anymore? :-) I'm going to assume that's possibly a problem on validate.js' side of the fence?
Thanks,
B.

@bblazely I think this is a problem with the ValidationController's logic.
https://github.com/aurelia/validation/blob/master/src/validation-controller.js#L103
here's what's happening:

data entry in the input causes the validate decorator to notify the controller (either on blur or immediately).
the controller asks the validator to validate the binding's current object+property combination
the validator returns an array of errors
the controller uses the new array of errors in conjunction with the bindings existing set of errors and determines which errors need to be unrendered and which need to be re-rendered.  This is where the problem is.  The current logic says "have I already rendered this error", if yes, it skips it.  The check is based on the rule associated with the error.  So even though the new error has a different message, it's the same broken rule, so it's skipped by the current logic.

I think the logic needs to change to "unrender all existing errors and render all new errors", so that the message stays up to date.

@jdanyow just woke up, will take a look at this in about an hour. Only challenge with this approach may be when the display of the error message is animated... Which I've implemented in my test app :)

@bblazely this fix hasn't been published yet- you'll need pull down the repo and run npm install;gulp build and copy the contents of the dist/amd folder into your project if you want to try it right away

Yep, no worries
On Fri., 17 Jun. 2016, 8:23 am Jeremy Danyow<EMAIL_ADDRESS>wrote:

@bblazely https://github.com/bblazely this fix hasn't been published
yet- you'll need pull down the repo and run npm install;gulp build and
copy the contents of the dist/amd folder into your project if you want to
try it right away
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aurelia/validatejs/issues/82#issuecomment-226631372,
or mute the thread
https://github.com/notifications/unsubscribe/AFOI1TVtOH86eoE2KEHxarqnTUe09e9Xks5qMczogaJpZM4I155N
.

@jdanyow
Ok, I monkey patched the changes in and it behaved pretty much exactly as I expected unfortunately.

http://i.imgur.com/pbEM4Uj.gif
I think that maybe in addition to unrender/render there may need to be an updaterender (bad name?) call in there instead, that would look more like the original _updateErrors method, but instead of ignoring errors it thinks it's already rendered, it pushes them to an updateRender method.
Maybe if the method isn't specified in the ValidationRenderer it can default to a simple unrender/render action?
I've also been mulling over how I'd manage more complex messages and I don't think the build in 'message' field in the rule is going to cut it. Particularly for messages that require evaluation of values from the model or html/event calls or fields that present a 'severity' of error. I might need to log a new job for that though...
I'm porting an existing login form from Angular over to Aurelia as an exercise for this, so I'm coming up with quite a few use cases. :-)

@jdanyow Also, related to this, one of the errors i'm porting from the 'other' framework looks like this:
"HELP_NOT_FOUND":      "Account not found! {{'SIGN_UP' | translate}}?"

Which will become:
 "HELP_NOT_FOUND":      "Account not found! ?"

I'm not sure how I'm going to manage this yet in the context of a dynamic message. It requires both an i18n substitution and access to the model to change the current 'view' state of the component.
Worth submitting a separate issue about it?

So, bindings have a _version? Can that be leveraged?
let target_changed = false;
 if (binding.last_version === undefined || binding.last_version < binding._version) {
        binding.last_version = binding._version;
        target_changed = true;
    }

this._updateErrors(errors, newErrors, target, changed);

The more I think about it though, the more I feel that the original code would be fine if the custom error messages were somehow bound to the model for updates, not generated by validate.js.

Ok, I think this mostly works as a proof of concept...
Incorporates updates (not elegant, but they work - I think) and model binding in the 'message'.
I haven't tested event delegates or i18n, but i think they should work too... maybe...
Monkey Patch to ValidationController:
ValidationController.prototype._updateErrors = function(errors, newErrors, target, targetValueUpdated) {
    let i = 0;
    while (i < errors.length) {
        const error = errors[i];
        const index = newErrors.findIndex(x => x.rule === error.rule);
        if (index === -1) {
            errors.splice(i, 1);
            this._unrenderError(error, target);
            continue;
        } else if (targetValueUpdated) {
            this._renderErrorUpdate(error, target);
        }
        newErrors.splice(index, 1);
        i++;
    }

    i = 0;
    while (i < newErrors.length) {
        const error = newErrors[i];
        errors.push(error);
        this._renderError(error, target);
        i++;
    }
};

ValidationController.prototype._renderErrorUpdate = function(error, target) {
    var renderers = this.renderers;
    var i = renderers.length;
    while (i--) {
        if (renderers[i].update) {
            renderers[i].update(error, target);
        } else {
            renderers[i].unrender(error,target);
            renderers[i].render(error, target);
        }
    }
};

ValidationController.prototype._validateBinding = function(binding) {
    let updated = false;
    const { target, rules, errors } = this.bindings.get(binding);
    const { object, property } = getPropertyInfo(binding.sourceExpression, binding.source);
    const newErrors = this.validator.validateProperty(object, property, rules);

    if (binding.last_version === undefined || binding.last_version < binding._version) {
        binding.last_version = binding._version;
        updated = true;
    }

    this._updateErrors(errors, newErrors, target, updated);
    return errors;
};

Changes to the bootstrap renderer:
  render(error, target) {
        if (!target || !(this.boundaryElement === target || this.boundaryElement.contains(target))) {
            return;
        }

        // add the has-error class to the bootstrap form-group div
        const formGroup = target.querySelector('.form-group') || target.closest('.form-group');
        formGroup.classList.add('has-error');

        // add help-block
        const message = document.createElement('span');
        message.classList.add('au-animate', 'help-block', 'validation-error', `error_${error.rule.name}`);
        message.innerHTML = error.message;
        message.error = error;

        formGroup.appendChild(message);
        this.templatingEngine.enhance({'element': message, 'bindingContext': error.object});
        this.animator.enter(message);

    }

    update(error, target) {
        if (!target || !(this.boundaryElement === target || this.boundaryElement.contains(target))) {
            return;
        }
        const formGroup = target.querySelector('.form-group') || target.closest('.form-group');
        let message = formGroup.querySelector(`.error_${error.rule.name}`);
        if (message) {
            message.innerHTML = error.message;
            this.templatingEngine.enhance({'element': message, 'bindingContext': error.object});
        }
    }

    unrender(error, target) {
        if (!target || !(this.boundaryElement === target || this.boundaryElement.contains(target))) {
            return;
        }

        // remove the has-error class on the bootstrap form-group div
        const formGroup = target.querySelector('.form-group') || target.closest('.form-group');

        // remove all messages related to the error.
        let messages = formGroup.querySelectorAll('.validation-error');
        let i = messages.length;
        while(i--) {
            let message = messages[i];
            if (message.error !== error) {
                continue;
            }
            message.error = null;
            this.animator.leave(message).then( () => {
                message.remove();
            });

            if (i == 0) {
                formGroup.classList.remove('has-error');
            }
        }
    }

Test Email Rule:
    @required({message: 'Required'})
    @length({message: 'Length Required!', minimum: 5})
    @email({custom: 'did this work?', message: '^Nope! ${email & oneTime} is not a valid address'})
    email;

I think that's everything I changed...
I'll try and patch it all into a GistRun after lunch so you can see it running.
B.

i18n bindings seem to work (not in the gist though)
I disabled the animation hooks from the rendered - couldn't get gistrun to include them
bindings to the model seem to work too.

Concerns:

Potentially confusing mish mash of validate.js and aurelia bindings are possible...

@bblazely initially the controller wasn't telling the renderers to unrender and re-renders if it wasn't a "new" error (an error for the same rule had already been rendered).  This caused problems with folks whose error messages were dynamic.  Now the controller always unrenders all the previous errors and renders all the new errors, which is bad for animation scenario as you've shown.
I think we might need to change the renderer API to give developers complete freedom to handle the error changes:
- renderError(error: ValidationError, target: Element = null)
- unrenderError(error: ValidationError, target: Element = null)
+ updateErrors(newErrors: ValidationError[], oldErrors: ValidationError[], target: Element = null)

This should give the render implementor complete freedom to handle the DOM changes.
What do you think?  I'm going to run this by @EisenbergEffect too- he'll have some ideas.
Please open a separate issue for error messages with html content.  My initial thought is it would be the responsibility of the renderer to use enhance to compose the markup.

@jdanyow I've been lurking and watching the conversation. The proposal you have makes sense to me.
I didn't follow the reference to enhance though. Can you expand on that use case?

@jdanyow
Your suggestion is certainly cleaner and feels more elegant, but I think there's still a case where the renderer will need to know to update the error shown outside of old / new.
For example, lets say you have a login form and the user gets the password wrong. The system imposes a 5 attempt limit. Each time, you want to tell the user that they have 1 less attempt before you lock them out.
In this scenario, on each attempt the field stays "in error", so oldErrors isn't populated and was only populated "newError" on the first one.
The latest approach of adding/removing the error each time would work IF you could tie an old error to a new error in the renderer somehow I suppose - i.e. the renderer could just do an update without triggering an animation. I assume that would work much like the _version tracking code I added to the gist. But is that complicating the renderer? To me that seems like something that should be done once by the validation layer, not implemented each time in the renderer... Happy to be convinced otherwise...
The example with the email address in the gistrun that I posted above is a good (if contrived) example too. I'm using the value of the email field in the message. It's a oneTime bind (otherwise it updates the message while i'm typing, which is just bizzare to watch), so it needs to know to re-render upon validation. It shouldn't have to go to the trouble of removing and re-adding an element to the DOM in my opinion.
re: HTML / enhanced content, I agree with that. Will open a new topic to discuss further.
Hope that all makes sense, it's after midnight and my daughter woke up twice while i was writing it, so I lost my train of thought. :-)

@EisenbergEffect
The enhance reference in the Renderer was to allow the error message to influence the model.
You can see it used in the gistrun a couple of posts up, put in an invalid email address in the "Email Constant" field and click the link you get from the error message.
I've used this method in the past to redirect a user to a sign-in state if the username was taken during sign up etc.

It also handily lets me specify an i18n="" binding, but hopefully there'll be a better way to do that at some point :-)

Could a simple string template replace bet a better option than invoking the compiler for each error? The syntax could be made to work the same. Maybe instead of using enhance it could even just use the syntax parser to parse the string into a binding expression and then eval it against the context. @jdanyow Something interesting to think about at some point. It would be nice to have a better way to handle this than a full up view compile.

I've opened a new issue for dynamic/enhanced messages as #90 so that it doesn't get muddled in with this one.

@jdanyow
Looks like you did you do an edit on your proposal while I was upstairs putting my daughter back to bed. I only just saw it now sorry - I did mention it was late? :-P
+updated <-- This! Much better. I couldn't find a good way of grabbing it per-validator though, do you have some magic?
If you can implement new/old/updated, that would do the trick I reckon.

renderer interface was refactored


QIR - Cannot compile Development example in Ubuntu (in Docker) or OSX

Describe the bug
Looking to compile the example programs in this repo (under /examples/QIR) into QIR. Have been unable to do so either in docker (using a few MS-provided images) or on OSX. Is this intended for use on Windows only?
Is there a Dockerfile setup which would be expected to work out-of-the-box for those not familiar with the .NET ecosystem?
Docker w/IQ# image
Dockerfile:
FROM mcr.microsoft.com/quantum/iqsharp-base:0.18.2106148006

RUN git clone https://github.com/microsoft/qsharp-compiler
WORKDIR /home/jovyan/qsharp-compiler/examples/QIR/Development
RUN dotnet build

Error about missing GLIBC 2.29.
Docker w/.NET 3.1 core
FROM mcr.microsoft.com/dotnet/sdk:3.1-focal

RUN git clone https://github.com/microsoft/qsharp-compiler

USER root
RUN apt-get update -y
RUN apt-get install -y g++ lsb-release wget software-properties-common
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 11

WORKDIR /qsharp-compiler/examples/QIR/Development
RUN dotnet build

Error:
('use .NET 5.0')
root@c10c90e2241a:/LLVMSharp# dotnet build
Microsoft (R) Build Engine version 16.7.2+b60ddb6f4 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored /LLVMSharp/sources/LLVMSharp/LLVMSharp.csproj (in 4.29 sec).
  Restored /LLVMSharp/sources/LLVMSharp.Interop/LLVMSharp.Interop.csproj (in 4.29 sec).
  Restored /LLVMSharp/tests/LLVMSharp.UnitTests/LLVMSharp.UnitTests.csproj (in 9.53 sec).
/usr/share/dotnet/sdk/3.1.410/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/LLVMSharp/sources/LLVMSharp/LLVMSharp.csproj]
/usr/share/dotnet/sdk/3.1.410/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/LLVMSharp/tests/LLVMSharp.UnitTests/LLVMSharp.UnitTests.csproj]
/usr/share/dotnet/sdk/3.1.410/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/LLVMSharp/sources/LLVMSharp.Interop/LLVMSharp.Interop.csproj]
  LLVMSharp.Interop -> /LLVMSharp/artifacts/bin/sources/LLVMSharp.Interop/Debug/netcoreapp3.1/LLVMSharp.Interop.dll
  LLVMSharp.Interop -> /LLVMSharp/artifacts/bin/sources/LLVMSharp.Interop/Debug/netstandard2.0/LLVMSharp.Interop.dll
  LLVMSharp -> /LLVMSharp/artifacts/bin/sources/LLVMSharp/Debug/netstandard2.0/LLVMSharp.dll
  LLVMSharp -> /LLVMSharp/artifacts/bin/sources/LLVMSharp/Debug/netcoreapp3.1/LLVMSharp.dll
  LLVMSharp.UnitTests -> /LLVMSharp/artifacts/bin/tests/LLVMSharp.UnitTests/Debug/netcoreapp3.1/LLVMSharp.UnitTests.dll

Build FAILED.

/usr/share/dotnet/sdk/3.1.410/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/LLVMSharp/sources/LLVMSharp/LLVMSharp.csproj]
/usr/share/dotnet/sdk/3.1.410/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/LLVMSharp/tests/LLVMSharp.UnitTests/LLVMSharp.UnitTests.csproj]
/usr/share/dotnet/sdk/3.1.410/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/LLVMSharp/sources/LLVMSharp.Interop/LLVMSharp.Interop.csproj]
    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:12.61

Docker w/ .NET 5.0
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal

RUN git clone https://github.com/microsoft/qsharp-compiler

USER root
RUN apt-get clean && apt-get update -y
RUN apt-get install -y lsb-release wget software-properties-common
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 11

WORKDIR /qsharp-compiler/examples/QIR/Development
RUN dotnet build

Error:
('use .NET core 3.1')
#9 82.25   It was not possible to find any compatible framework version
#9 82.25   The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
#9 82.25     - The following frameworks were found:
#9 82.25         5.0.7 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
#9 82.25
#9 82.25   You can resolve the problem by installing the specified framework and/or SDK.

Docker (using QuantumKatas image)
jovyan@e99bb7aebdd0:~/qsharp-compiler/examples/QIR/Development$ dotnet build
Microsoft (R) Build Engine version 16.7.2+b60ddb6f4 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
/home/jovyan/qsharp-compiler/src/Documentation/DocumentationParser/DocumentationParser.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/QirGeneration/QirGeneration.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CommandLineTool/CommandLineTool.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/Compiler/Compiler.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/Compiler/Compiler.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/QirGeneration/QirGeneration.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CommandLineTool/CommandLineTool.csproj : error NU1101: Unable to find package CommandLineParser. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CommandLineTool/CommandLineTool.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
  Restored /home/jovyan/qsharp-compiler/src/QsCompiler/DataStructures/DataStructures.fsproj (in 413 ms).
  Restored /home/jovyan/qsharp-compiler/src/QsCompiler/Core/Core.fsproj (in 414 ms).
/home/jovyan/qsharp-compiler/src/QsCompiler/BondSchemas/BondSchemas.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
  Restored /home/jovyan/qsharp-compiler/src/QsCompiler/Optimizations/Optimizations.fsproj (in 13 ms).
  Failed to restore /home/jovyan/qsharp-compiler/src/QsCompiler/BondSchemas/BondSchemas.csproj (in 19 ms).
/home/jovyan/qsharp-compiler/src/QsCompiler/Transformations/Transformations.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
  Restored /home/jovyan/qsharp-compiler/src/QsCompiler/SyntaxProcessor/SyntaxProcessor.fsproj (in 851 ms).
/home/jovyan/qsharp-compiler/src/QsCompiler/LlvmBindings/LlvmBindings.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
  Failed to restore /home/jovyan/qsharp-compiler/src/QsCompiler/Transformations/Transformations.csproj (in 389 ms).
  Failed to restore /home/jovyan/qsharp-compiler/src/Documentation/DocumentationParser/DocumentationParser.csproj (in 851 ms).
  Failed to restore /home/jovyan/qsharp-compiler/src/QsCompiler/Compiler/Compiler.csproj (in 862 ms).
  Failed to restore /home/jovyan/qsharp-compiler/src/QsCompiler/LlvmBindings/LlvmBindings.csproj (in 23 ms).
  Restored /home/jovyan/qsharp-compiler/src/QsCompiler/TextProcessor/TextProcessor.fsproj (in 879 ms).
/home/jovyan/qsharp-compiler/src/QsCompiler/CompilationManager/CompilationManager.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CompilationManager/CompilationManager.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
  Failed to restore /home/jovyan/qsharp-compiler/src/QsCompiler/CommandLineTool/CommandLineTool.csproj (in 879 ms).
  Failed to restore /home/jovyan/qsharp-compiler/src/QsCompiler/QirGeneration/QirGeneration.csproj (in 879 ms).
  Failed to restore /home/jovyan/qsharp-compiler/src/QsCompiler/CompilationManager/CompilationManager.csproj (in 95 ms).
/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved.
  Restored /home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj (in 2.04 sec).

Build FAILED.

/home/jovyan/qsharp-compiler/src/QsCompiler/QirGeneration/QirGeneration.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CommandLineTool/CommandLineTool.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/Compiler/Compiler.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CompilationManager/CompilationManager.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved. [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj : warning NU1603: Newtonsoft.Json.Bson 1.0.2 depends on Newtonsoft.Json (>= 12.0.1) but Newtonsoft.Json 12.0.1 was not found. An approximate best match of Newtonsoft.Json 12.0.2 was resolved.
/home/jovyan/qsharp-compiler/src/Documentation/DocumentationParser/DocumentationParser.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/Compiler/Compiler.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/QirGeneration/QirGeneration.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CommandLineTool/CommandLineTool.csproj : error NU1101: Unable to find package CommandLineParser. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CommandLineTool/CommandLineTool.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/BondSchemas/BondSchemas.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/Transformations/Transformations.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/LlvmBindings/LlvmBindings.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
/home/jovyan/qsharp-compiler/src/QsCompiler/CompilationManager/CompilationManager.csproj : error NU1101: Unable to find package StyleCop.Analyzers. No packages exist with this id in source(s): qdk-alpha [/home/jovyan/qsharp-compiler/examples/QIR/Development/Development.csproj]
    5 Warning(s)
    9 Error(s)

Time Elapsed 00:00:07.47

VSCode + OSX

Install .NET Core 3.1 and QDK in VSCode.
Install LLVM: brew install llvm@11, export LD_FLAGS to match
Follow instructions here to attempt to compile the example
Receive this error:

➜  Development git:(main) DYLD_PRINT_LIBRARIES=1 dotnet build
dyld: loaded: <46395A6A-446F-3B2E-B9A7-85DD4D3F3043> /usr/local/share/dotnet/dotnet
 # ...  elided, but no reference to anything LLVM
dyld: loaded: <FE800183-AD50-3121-AC0A-FE291903C848> /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.7/libSystem.Native.dylib
Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

dyld: loaded: <5E6B7F2E-609B-35E4-9052-DA29471F151A> /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.7/libSystem.Security.Cryptography.Native.Apple.dylib
  Determining projects to restore...
dyld: loaded: <AF5BC53A-B4B8-3E4D-BAFA-65501F8CCF8A> /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.7/libSystem.IO.Compression.Native.dylib
  All projects are up-to-date for restore.
  DataStructures -> ~/qsharp-compiler/src/QsCompiler/DataStructures/bin/Debug/netstandard2.1/Microsoft.Quantum.QsDataStructures.dll
  BondSchemas -> ~/qsharp-compiler/src/QsCompiler/BondSchemas/bin/Debug/netstandard2.1/Microsoft.Quantum.BondSchemas.dll
  Core -> ~/qsharp-compiler/src/QsCompiler/Core/bin/Debug/netstandard2.1/Microsoft.Quantum.QsCore.dll
  TextProcessor -> ~/qsharp-compiler/src/QsCompiler/TextProcessor/bin/Debug/netstandard2.1/Microsoft.Quantum.QsTextProcessor.dll
  Optimizations -> ~/qsharp-compiler/src/QsCompiler/Optimizations/bin/Debug/netstandard2.1/Microsoft.Quantum.QsOptimizations.dll
  Transformations -> ~/qsharp-compiler/src/QsCompiler/Transformations/bin/Debug/netstandard2.1/Microsoft.Quantum.QsTransformations.dll
  DocumentationParser -> ~/qsharp-compiler/src/Documentation/DocumentationParser/bin/Debug/netstandard2.1/Microsoft.Quantum.QsDocumentationParser.dll
  SyntaxProcessor -> ~/qsharp-compiler/src/QsCompiler/SyntaxProcessor/bin/Debug/netstandard2.1/Microsoft.Quantum.QsSyntaxProcessor.dll
  CompilationManager -> ~/qsharp-compiler/src/QsCompiler/CompilationManager/bin/Debug/netstandard2.1/Microsoft.Quantum.QsCompilationManager.dll
  Compiler -> ~/qsharp-compiler/src/QsCompiler/Compiler/bin/Debug/netstandard2.1/Microsoft.Quantum.QsCompiler.dll
  CommandLineTool -> ~/qsharp-compiler/src/QsCompiler/CommandLineTool/bin/Debug/netcoreapp3.1/qsc.dll
  LlvmBindings -> ~/qsharp-compiler/src/QsCompiler/LlvmBindings/bin/Debug/netstandard2.1/Microsoft.Quantum.LlvmBindings.dll
  QirGeneration -> ~/qsharp-compiler/src/QsCompiler/QirGeneration/bin/Debug/netstandard2.1/Microsoft.Quantum.QirGeneration.dll
  Determining projects to restore...
  All projects are up-to-date for restore.
  Removed files from prior compilation.
  : info:
  System.TypeInitializationException: The type initializer for 'Microsoft.Quantum.QsCompiler.QIR.GenerationContext' threw an exception.
   ---> System.DllNotFoundException: Unable to load shared library 'libLLVM' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibLLVM, 1): image not found
     at LLVMSharp.Interop.LLVM.InstallFatalErrorHandler(IntPtr Handler)
     at Ubiquity.NET.Llvm.Interop.Library.InitializeLLVM() in ~/qsharp-compiler/src/QsCompiler/LlvmBindings/Library.cs:line 66
     at Microsoft.Quantum.QsCompiler.QIR.GenerationContext..cctor() in ~/qsharp-compiler/src/QsCompiler/QirGeneration/Context.cs:line 39
     --- End of inner exception stack trace ---
     at Microsoft.Quantum.QsCompiler.QIR.GenerationContext..ctor(IEnumerable`1 syntaxTree) in ~/qsharp-compiler/src/QsCompiler/QirGeneration/Context.cs:line 108
     at Microsoft.Quantum.QsCompiler.QirGeneration.Transformation(QsCompilation compilation, QsCompilation& transformed) in ~/qsharp-compiler/src/QsCompiler/QirGeneration/RewriteSteps.cs:line 77
     at Microsoft.Quantum.QsCompiler.LoadedStep.Transformation(QsCompilation compilation, QsCompilation& transformed) in ~/qsharp-compiler/src/QsCompiler/Compiler/LoadedStep.cs:line 209
     at Microsoft.Quantum.QsCompiler.CompilationLoader.ExecuteRewriteStep(LoadedStep rewriteStep, QsCompilation compilation, QsCompilation& transformed) in ~/qsharp-compiler/src/QsCompiler/Compiler/CompilationLoader.cs:line 919

EXEC(1,1): error QS7109: The compilation step "QIR Generation" loaded from "~/qsharp-compiler/src/QsCompiler/QirGeneration/bin/Debug/netstandard2.1/Microsoft.Quantum.QirGeneration.dll" threw an exception. [~/qsharp-compiler/examples/QIR/Development/Development.csproj]

  ____________________________________________

  Q# compilation failed: 1 error, 0 warnings
  1 logged exception

~/.nuget/packages/microsoft.quantum.sdk/0.16.2105142080-alpha/Sdk/Sdk.targets(151,5): error MSB3073: The command "dotnet ~/qsharp-compiler/examples/QIR/Development/../../../src/QsCompiler/CommandLineTool/bin/Debug/netcoreapp3.1/qsc.dll build --format MsBuild -v Normal --response-files obj/qsharp/config/qsc.rsp" exited with code 246. [~/qsharp-compiler/examples/QIR/Development/Development.csproj]
~/.nuget/packages/microsoft.quantum.sdk/0.16.2105142080-alpha/Sdk/Sdk.targets(156,5): error : Q# compiler failed with exit code: 246. [~/qsharp-compiler/examples/QIR/Development/Development.csproj]

Build FAILED.

EXEC(1,1): error QS7109: The compilation step "QIR Generation" loaded from "~/qsharp-compiler/src/QsCompiler/QirGeneration/bin/Debug/netstandard2.1/Microsoft.Quantum.QirGeneration.dll" threw an exception. [~/qsharp-compiler/examples/QIR/Development/Development.csproj]
~/.nuget/packages/microsoft.quantum.sdk/0.16.2105142080-alpha/Sdk/Sdk.targets(151,5): error MSB3073: The command "dotnet ~/qsharp-compiler/examples/QIR/Development/../../../src/QsCompiler/CommandLineTool/bin/Debug/netcoreapp3.1/qsc.dll build --format MsBuild -v Normal --response-files obj/qsharp/config/qsc.rsp" exited with code 246. [~/qsharp-compiler/examples/QIR/Development/Development.csproj]
~/.nuget/packages/microsoft.quantum.sdk/0.16.2105142080-alpha/Sdk/Sdk.targets(156,5): error : Q# compiler failed with exit code: 246. [~/qsharp-compiler/examples/QIR/Development/Development.csproj]
    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:06.65

System information

OSX 10.15.7, and different ubuntu base images as shown above

FWIW, it runs right out-of-the-box in windows using vagrant. For those interested:
vagrant init 'gusztavvargadr/visual-studio'
vagrant up
vagrant ssh
choco install git
refreshenv
git clone https://github.com/microsoft/qsharp-compiler --depth 1
cd qsharp-compiler\examples\QIR\Development
dotnet build
type qir\Development.ll

Note that dotnet build failed on the Development example due to missing clang++ dependency, but generated the needed .ll file. Emission build worked without issue.

@kalzoo While it is expected that the docker images fail (I don't believe they would contain the necessary llvm libs), the Development project was meant to build on Mac and Linux as well. Looking at the corresponding error, it looks like it is not finding these as it should (libLLVM). Could you please check if in the obj/qsharp/config/qsc.rsp file, the --llvm-libs argument is specified, and whether the path that is listed for it indeed contains the libLLVM library (in a subfolder runtime/os_x64/native/)?

I can reproduce it after launching it in a clean linux container without llvm installed (clang installed via apt install). The issue is that when the QirGeneration rewrite step is loaded via reflection (which is usually only the case if the rewrite step is loaded from within by a compiler version that is newer than the one against which the rewrite step has been built - but also is the case for the Development project) then on linux it is only looking for the llvm libs in the system libraries (i.e. under /usr/, /lib/, /etc/, but not in the directory of the current application) rather than being able to find it via the path that is passed to the command line compiler. What I currently cannot seem to figure out at this time is how to convince it to look somewhere else.
The only thing that I could get to work so far is to manually put the libLLVM.so under /usr/lib/ where it is already looking.

@bettinaheim: I've had good luck using custom DLL resolvers in similar scenarios before, as that allows for intercepting native library loads and redirecting them to a path of your choosing.

Ah, got it. If the native library is loaded in an assembly outside our control, that is a much harder problem to solve, agreed. The native DLL resolver is assembly-local such that setting a resolver won't work for native libraries loaded by LlvmSharp... let me think on that, then...

What I know works is if you load it a separate context (which is done by default, unless the rewrite step was compiled against a different compiler version). In that case, preloading the llvm libs via context.LoadUnmanagedDllFromPath(pathtollvmlibs) works perfectly fine. I don't seem to have the means to do something similar for the current app context though...

This should be largely addressed by https://github.com/microsoft/qsharp-compiler/pull/1269, with the caveat listed in the readme.


Did you change the winget list effect? It doesn't seem to show upgradable installed packages

Now how do I know if the 30 or 40 packages I installed have a new version to upgrade

winget --info

As far as I know, nothing has changed with how the default behavior of the list command works.
You can always use winget upgrade to list available upgrades

WinGet list currently only displays the available version when an update is available.
Duplicate of #1155

#1155


Waffle Menu

A waffle menu web component. If you like waffles, the component is for you!

https://github.com/Jasig/uPortal/pull/1269 will add filtering support


RuntimeError during pip install

Hi! I'm following the README.md in branch new_dataset, and after pip3 install -e ., I encountered the following error. Is it a known issue or is there any additional dependency that I need to install? Thanks!
ERROR: Command errored out with exit status 1:
     command: /Users/dorothyko/opt/anaconda3/envs/NetShare/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py'"'"'; __file__='"'"'/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-record-t1fpvnsw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/dorothyko/opt/anaconda3/envs/NetShare/include/python3.6m/dm-tree
         cwd: /private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/
    Complete output (57 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.6
    creating build/lib.macosx-10.9-x86_64-3.6/tree
    copying tree/sequence.py -> build/lib.macosx-10.9-x86_64-3.6/tree
    copying tree/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/tree
    copying tree/tree_test.py -> build/lib.macosx-10.9-x86_64-3.6/tree
    copying tree/tree_benchmark.py -> build/lib.macosx-10.9-x86_64-3.6/tree
    running build_ext
    Traceback (most recent call last):
      File "/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py", line 77, in _check_build_environment
        subprocess.check_call(['cmake', '--version'])
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/subprocess.py", line 306, in check_call
        retcode = call(*popenargs, **kwargs)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/subprocess.py", line 287, in call
        with Popen(*popenargs, **kwargs) as p:
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/subprocess.py", line 729, in __init__
        restore_signals, start_new_session)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/subprocess.py", line 1364, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py", line 155, in <module>
        keywords='tree nest flatten',
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/dorothyko/opt/anaconda3/envs/NetShare/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py", line 70, in run
        self._check_build_environment()
      File "/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py", line 82, in _check_build_environment
        ) from e
    RuntimeError: CMake must be installed to build the following extensions: _tree
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/dorothyko/opt/anaconda3/envs/NetShare/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py'"'"'; __file__='"'"'/private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-install-0xh9kpj3/dm-tree_8e1c2948f02b4e8dbaffa8699b00febb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/8z/rhgl1dpd44j80z0vry1zh7k80000gn/T/pip-record-t1fpvnsw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/dorothyko/opt/anaconda3/envs/NetShare/include/python3.6m/dm-tree Check the logs for full command output. ```

Hi Dorothy,
It seems that the root cause of the error is:
 FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'

Caused by the line: subprocess.check_call(['cmake', '--version']).
I would guess that you don't have cmake installed, you can find more details here: https://cmake.org/install/
You're right that we should've added it to the README, and it will be fixed.
Please LMK if that helps before I'll close the issue.
Thanks,
Saar
BTW, it's relevant only to parsing pcap files. If your application uses a different type of dataset, it shouldn't happen.

After installing cmake, the issue has been resolved, thanks!


Styling tweaks, dots to overlays, filter tabs, pagination, fixes img path.

@ascott1 or @contolini, mind reviewing?

Tests are passing! yay!

Realize that my gif was not very descriptive... there's a lot here, but the code looks really solid. Excited to see this in action.

Gracias!

@himedlooff , when I scroll down, the dummy page 2 appears and scrolls up to replace the page 1.  is that supposed to happen?

There is definitely a weird bug. Sometimes when I load the page and click "next" on the pagination it doesn't show me page 2. I have a fix locally, will make a pr and see if that fixes your issue as well.


Bing Chatbot support

Skyperious is a github project that uses SkPy (you're probably already aware of it) to backup Skype conversations.
The recent Bing Chatbot, however is not being backed up (although it appears in my contacts like a regular contact), and the developer indicated the issues is likely with SkPy.
The chatbot conversations are clearly being stored online as I can access them from any device running Skype.
Does SkPy support accessing Bing Chatbot conversations or are there any plans for this support in the future?

Assuming this bot is presented like other Skype bots, SkPy should be able to interact with it -- you'll need to be more specific on what's actually not working (see also the issue template).

It isn't easy to be more specific as I am accessing the library through a third-party app (Skyperious). The developer pointed out that he cannot fix this as the app relies on SkPy.
I have the "Skype" bot on my account and that is backed up fine, so there must be something different in the new chatbot. The Skyperious dev stated he couldn't get it to work either.

Assuming this is the bot in question, I don't see any problems accessing its messages (my test account is not authorised to actually use the bot, though it does still seem to respond in a regular chat):
>>> sk.contacts.bot('cf0e6215-34fe-409b-9e4b-135d7f3aa13b')
SkypeBotUser(id='cf0e6215-34fe-409b-9e4b-135d7f3aa13b', name='Bing', avatar='https://bot-framework.azureedge.net/bot-icons-v1/OpenAiConnectProdBot_3IMAxA3sY6L41gsG8U7ca86E9uJANz54oFcZFvf9IC3tyEr3.png', developer='', trusted=True, locales=[], rating=0.0, description='Chat with Bing in Skype for quick answers and creative ideas to enhance any conversation. Bing can help you plan a trip, write a funny haiku, find answers from the web, and more. Just mention @Bing and ask!')

>>> sk.chats['28:cf0e6215-34fe-409b-9e4b-135d7f3aa13b']
SkypeSingleChat(id='28:cf0e6215-34fe-409b-9e4b-135d7f3aa13b', alerts=True, userId='cf0e6215-34fe-409b-9e4b-135d7f3aa13b')

>>> sk.chats['28:cf0e6215-34fe-409b-9e4b-135d7f3aa13b'].getMsgs()
[SkypeTextMsg(id='1677763246411', type='RichText', time=datetime.datetime(2023, 3, 2, 13, 20, 46, 346000), clientId='2470777693493059435', userId='cf0e6215-34fe-409b-9e4b-135d7f3aa13b', chatId='28:cf0e6215-34fe-409b-9e4b-135d7f3aa13b', content='I\'m sorry! (sad) I can\'t reply to you. If you have not joined the Bing waitlist yet, please join here.'),
 SkypeTextMsg(id='1677763244457', type='RichText', time=datetime.datetime(2023, 3, 2, 13, 20, 43, 943000), clientId='16797972230821603272', userId='fred.2', chatId='28:cf0e6215-34fe-409b-9e4b-135d7f3aa13b', content='Hi')]

I'd suggest asking the Skyperious dev to chime in here if you're not using SkPy directly.

I've left a message with the Skyperious dev asking him to join in. Hopefully he can add some insight here.

I can confirm that the Bing bot and its chat and messages are visible when addressing them directly, via skpy.Skype.contacts[..] and skpy.Skype.chats[..]. So that part works fine.
The problem is that its chat is not returned fromskpy.Skype.chats.recent(). So there is no way to discover the bot in an skpy session if relying on recent chats only.
At least that is the result in my setup, and apparently also in @robbely's setup. @Terrance, is the result different for you - does the chat get listed in skpy.Skype.chats.recent()?

Looks like bots aren't being included at all, and we need to opt in to more chat types when requesting recent chats.
Can you give f09e922 a go?  That should match what Skype for Web is requesting, and seems to be sufficient to include bots in the list of chats.

This is ultimately a limitation of Skype's APIs -- the contacts API will return bots you've started a chat with, with no indication from there that they're a bot, which means you'll get a SkypeContact instance for them instead.
If you need accurate representations, call SkypeContacts.bots() to cache all known bots as SkypeBotUser instances and SkypeContacts.sync() to cache contacts as SkypeContact instances first, then key lookups should produce the correct types.

I got message from bingchat:"Sorry, I am not compatible with older versions of Skype. Please update to the latest Skype for us to talk. Thank you! (smileeyes)"

It can be solved by add
headers={"ClientInfo":"os=Windows; osVer=10; proc=x86; lcid=en-US; deviceType=1; country=HK; clientName=skype4life; clientVer=1418/<IP_ADDRESS>8//skype4life; timezone=Asia/Shanghai"}

I got message from bingchat:"Sorry, I am not compatible with older versions of Skype. Please update to the latest Skype for us to talk. Thank you! (smileeyes)"

I've added a24999d to send that header -- not keen on coding a version in, but it seems to accept all nines which should hopefully keep it going for now.  (I did try reading the version from the Skype for Web page, but it needs both a valid User-Agent else you hit the unsupported platform page, and working authentication that seems to be invalidated after you request the page...)

@Terrance Any plans to make a new release with these changes?

I assume the above commit is sufficient to get things working for you?

Yes, https://github.com/Terrance/SkPy/commit/f09e9224a18be1f5597d94ee65e51cf45d42d4d1 got bots included in recent chats.

Released in 0.10.5.

If you need accurate representations, call SkypeContacts.bots() to cache all known bots as SkypeBotUser instances and SkypeContacts.sync() to cache contacts as SkypeContact instances first, then key lookups should produce the correct types.

Unfortunately, this does not quite seem to be the case.
>>> bb = sk.contacts.bots()
>>> sk.contacts.sync()
>>> c = sk.chats["28:cf0e6215-34fe-409b-9e4b-135d7f3aa13b"]
>>> c
SkypeSingleChat(id='28:cf0e6215-34fe-409b-9e4b-135d7f3aa13b', alerts=True, userId='cf0e6215-34fe-409b-9e4b-135d7f3aa13b')
>>> c.user
SkypeContact(id='cf0e6215-34fe-409b-9e4b-135d7f3aa13b', name=Name(first='Bing'), location=Location(), avatar='https://bot-framework.azureedge.net/bot-icons-v1/OpenAiConnectProdBot_3IMAxA3sY6L41gsG8U7ca86E9uJANz54oFcZFvf9IC3tyEr3.png', authorised=True, blocked=False, favourite=False)

May this be because the Bing bot is not actually among the ones returned from contacts.bots()?
>>> next((x for x in bb if "Bing" in x.name), "nope")
'nope'

That's annoying -- it looks like Skype for Web fetches the bot info for that bot explicitly, I guess it's special-cased and known ahead of time (it does have its own category in the contact list), but it's still a bit weird that it's not included in the full list.
Potential workarounds:

maintain your own supplementary list of bot IDs
guess if the user of a 1-to-1 chat is a bot from the prefix of the thread identifier

In either case you can explicitly fetch a given user ID as a bot with SkypeContact.bot(id).

In either case you can explicitly fetch a given user ID as a bot with SkypeContacts.bot(id).

The caching interferes with this. Once the chat object has been returned, directly from chats[..] or viachats.recent(), a call to contacts.bot(..) will return the Bing bot as SkypeContact. Only when the Bing bot contact is first explicitly retrieved via contacts.bot(..), will it be SkypeBotUser in later returns.
However, contact.raw["person_id"] does have the bot prefix "28:", so the botness can be detected from that. Maybe skpy could check for this internally and ensure the correct contact class in what it returns?


deprecate flux_hindenlang in favor of flux_hindenlang_gassner

Credit Gregor correctly for this MHD flux

Tests fail due to https://github.com/chriselrod/StrideArrays.jl/issues/32


Add lookup filters to those lookup fields that refer to Account so they allow only specific record types

For example, when creating a new Program Enrollment record for a student, the Account selected should be only of Academic Program record type. Ideally the lookup would only display Academic Programs. But since that isn't possible, at least we could add a filter to avoid the record being saved with "invalid" data.

The caveat is that we would need to package whatever record types we reference. We will have to weight this against just letting the users create their own filters (and just documenting how - @lianeyee ).

**lurch: add

Tracking W-018984

This issue is no longer being considered by the product team.


scope in let and a few bugs

i was trying to do a nested update and found an odd bug i recreated here.  Start by clicking "not Borked".  this seems to correctly change the value to 'model.r' to "XXX".
Then click "bork 2", which changes 'model.r' to
Finally Clicking Bork creates a Uncaught TypeError: Cannot read property 'test' of undefined error.
The docs are not very clear on scoping of let.  i've seen other places where the mutation is not as I would predict.  As a newb in elm I have no idea how the scope works, I would expect I shouldn't be able to mutate stuff in place.
this was tested via the try elm function of your website.

import Html exposing (div, button, text, hr, br)
import Html.App exposing (beginnerProgram)
import Html.Events exposing (onClick)

type alias Model =
  { count : Int
  , dbg : List String
  , val : String
  , r : XRec
  , test : Bool
  , m : M
  }

type alias XRec = { x : String}

mdl : Model
mdl = {
      count = 0
      , dbg = [""]
      , val = "shoot"
      , r = { x = "x"}
      , test = True
      , m = m}

main =
  beginnerProgram {
    model = mdl
    , view = view
    , update = update }

view model =
  div []
    [ button [ onClick Decrement ] [ text "-" ]
    , div [] [ text (toString model) ]
    , button [ onClick Increment ] [ text "+" ]
    , hr [] []
    , text (toString m)
    , button [ onClick Bork ] [ text "bork"]
    , br [] []
    , button [ onClick Bork2 ] [ text "bork 2"]
    , br [] []
    , button [ onClick NotBorked] [ text "not Borked"]
    ]

type Msg = Increment | Decrement | Bork | Bork2 | NotBorked

update msg model =
  case msg of
    Increment ->
      {model | count = model.count + 1, dbg = "inc" :: model.dbg}

    Decrement ->
      {model | count = model.count - 1, dbg = "dec" :: model.dbg}

    Bork ->
      let
        model = if model.test == True then
          let
            a = { model | val = " sweet "}
            oldR = a.r
            newR = {oldR | x = "XXX"}
            model = { a | r = newR}
          in model
        else
          { model | dbg = "bank" :: model.dbg}

      in
        --model
      {model  | dbg = "bork" :: model.dbg}

    Bork2 ->
      let
        model = doBork model
      in
        model

    NotBorked ->
      let
        model = donotBork model
      in
        model

doBork : Model -> Model
doBork model =
  let
    a = { model | val = "bam"}
    oldR = a.r
    newR = { oldR | x = "XXX"}
    model = { a  | r = newR}
  in
    model

donotBork : Model -> Model
donotBork model =
  let
    a = { model | val = "bam"}
    oldR = a.r
    newR = { oldR | x = "XXX"}
    mdl = { a  | r = newR}
  in
    mdl

type alias M = {
  s : String
  ,l : List String
}

m : M
m = { s = "String", l = ["list","of","strings"]}

Please check issue 873 in the elm-compiler repo.

for the doBork function how is this recursive?  isn't this a variable shadowing issue?

In this let-block:
  let
    a = { model | val = "bam"}
    oldR = a.r
    newR = { oldR | x = "XXX"}
    model = { a  | r = newR}

the binding for a depends on model and the binding for model depends on a. In particular, the model you use in the binding for a is not the model from the "surrounding"
doBork model =
  ...

Instead, it is the model from the binding inside the let-block, no matter that it appears a few lines below.
This is just a fact of how let-blocks work in Elm (and in Haskell, but not in OCaml, if you need comparisons to other languages).

If you need more explanation, please consult one of the community venues, for example the mailing list. Several options are listed at http://elm-lang.org/community.
This issue tracker here is really for bugs and things that need to change in core.


ci: add codespell github action

added GitHub action to check code spell.
TODO: will update mergify rules once #78 is merged.
Signed-off-by: Madhu Rajanna<EMAIL_ADDRESS>

Code looks good, I think commit msg ci: add github action to codespell -> ci: add codespell github action would be more suitable.

something went wrong fixing the commits


Apply global policy to API management

Would be great to have a task that applies a global policy to an API management instance.

Hello,
Thanks for your suggestion. I have implemented the change, I'll publish the extension any time soon, stay tuned!
Best Regards


Installation on Raspberry Pi 3 Model B fails

Hardware:

Raspberry Pi 3 Model B V1.2 (2015)

1GB RAM

SanDisk Extreme, 128GB

OS:

Raspberry Pi OS (32-bit), A port of Debian with Raspberry Pi Desktop (Recommended), Released 2020-05-27

Installed with "Raspberry Pi Imager v1.4" on OSX 10.14.6

On "boot" partition of mounted SDCard on OSX

Copy "wpa_supplicant.conf" from
https://www.raspberrypi.org/forums/viewtopic.php?t=202719#p1260076
and put Wifi SSID/Password
put an empty file "ssh"

Boot Raspberry with DHCP

Change password of user pi

passwd

sudo apt -y update && sudo apt dist-upgrade

enable container features

sudo nano /boot/cmdline.txt

add: cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory

sudo reboot

uname -a
-> Linux raspberrypi 5.4.51-v7+ #1327 SMP Thu Jul 23 10:58:46 BST 2020 armv7l GNU/Linux

curl -sfL https://get.k3s.io | sh -

k3s -v
-> k3s version v1.18.6+k3s1 (6f56fa1d)

sudo systemctl status k3s
-> k3s.service - Lightweight Kubernetes
Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: enabled)
Active: activating (start) since Mon 2020-07-27 20:22:59 BST; 25s ago
Docs: https://k3s.io
Process: 1473 ExecStartPre=/sbin/modprobe br_netfilter (code=exited, status=0/SUCCESS)
Process: 1474 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
Main PID: 1475 (k3s-server)
Tasks: 31
CGroup: /system.slice/k3s.service
└─1475 /usr/local/bin/k3s server

wait more than 1h

sudo kubectl get node -o wide
then it show one of the following two errors in random order
-> Error from server (ServiceUnavailable): the server is currently unable to handle the request
-> The connection to the server <IP_ADDRESS>:6443 was refused - did you specify the right host or port?

top shows that it is doing some work
-> PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
9462 root      20   0<PHONE_NUMBER>16  65512 S 206.3  24.0   0:34.83 k3s-server

I tried disabling IPv6 and reconfiguring iptables to legacy without luck.
Thanks for hits to find the issue.

What is the output of journalctl -u k3s --no-pager ?

Thanks for your response @brandond .
I attached the output of
journalctl -u k3s --no-pager > journalctl.log
journalctl.log
It says something about memory cgroup, but I have it in /boot/cmdline.txt ..
$ cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=78c8af8b-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory

I have heard that the most recent 32bit pi os kernels are missing a bunch of cgroups - you can't even enable them with kernel args. I would suggest checking the Pi forums, or use a 64bit is in the mean time.

@PRosenb is this your issue - https://github.com/rancher/k3s/issues/2067?

Yes, it looks like the same issue.

I got it working with the 64-bit version.
$ sudo kubectl get node -o wide
NAME          STATUS     ROLES    AGE   VERSION        INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                       KERNEL-VERSION   CONTAINER-RUNTIME
raspberrypi   NotReady   master   37h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Debian GNU/Linux 10 (buster)   5.4.51-v8+       containerd://1.3.3-k3s2

But some minute after restarting the device, the same command returns the following error in most cases.
$ sudo kubectl get node -o wide
Unable to connect to the server: net/http: TLS handshake timeout

@PRosenb journalctl --no-pager -u k3s

@PRosenb
Can you please try sudo systemctl restart k3s post reboot and check again?

Thanks guys.
It looks like with the 64-bit OS it's just very slow, the shell is also almost not responsive. On top, CPU usage seams not too bad though..
I tried the restart command and it partly helped as you can see below. Executing the get node command still takes a very long time. I guess just shortly below/above the timeout.
$ sudo systemctl restart k3s
$ sudo kubectl get node -o wide
NAME          STATUS     ROLES    AGE     VERSION        INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                       KERNEL-VERSION   CONTAINER-RUNTIME
raspberrypi   NotReady   master   2d10h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Debian GNU/Linux 10 (buster)   5.4.51-v8+       containerd://1.3.3-k3s2
$ sudo kubectl get node -o wide
NAME          STATUS   ROLES    AGE     VERSION        INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                       KERNEL-VERSION   CONTAINER-RUNTIME
raspberrypi   Ready    master   2d10h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Debian GNU/Linux 10 (buster)   5.4.51-v8+       containerd://1.3.3-k3s2
$ journalctl -u k3s --no-pager > journalctl.log
$ sudo kubectl get node -o wide
Unable to connect to the server: net/http: TLS handshake timeout

Possibly the Raspberry Pi 3 Model B is too slow for the 64-bit variant or it's not (yet) optimized enough for it.
I attached the journalctl.log as requested.

I can attest that it runs great on 4GB Pi4B with class 10 SDHC cards. With less memory for filesystem cache you're going to be hitting the SD card pretty hard; I wouldn't be surprised if it feels pretty slow.

My SD Card is even faster, it's a V30 (SD Speed Class).
Does that imply that k3s cannot be run (anymore) on a Raspberry Pi 3?

You could try going back to an older 32bit OS that has working cgroup support. It sounds like maybe the arm64 releases aren't well optimized for older devices at the moment.

Thanks guys.
It looks like with the 64-bit OS it's just very slow, the shell is also almost not responsive. On top, CPU usage seams not too bad though..
I tried the restart command and it partly helped as you can see below. Executing the get node command still takes a very long time. I guess just shortly below/above the timeout.
$ sudo systemctl restart k3s
$ sudo kubectl get node -o wide
NAME          STATUS     ROLES    AGE     VERSION        INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                       KERNEL-VERSION   CONTAINER-RUNTIME
raspberrypi   NotReady   master   2d10h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Debian GNU/Linux 10 (buster)   5.4.51-v8+       containerd://1.3.3-k3s2
$ sudo kubectl get node -o wide
NAME          STATUS   ROLES    AGE     VERSION        INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                       KERNEL-VERSION   CONTAINER-RUNTIME
raspberrypi   Ready    master   2d10h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Debian GNU/Linux 10 (buster)   5.4.51-v8+       containerd://1.3.3-k3s2
$ journalctl -u k3s --no-pager > journalctl.log
$ sudo kubectl get node -o wide
Unable to connect to the server: net/http: TLS handshake timeout

Possibly the Raspberry Pi 3 Model B is too slow for the 64-bit variant or it's not (yet) optimized enough for it.
I attached the journalctl.log as requested.

Hi, I had a same problem. I think, that is a problem with version of your kernel.
I rolled back kernel version and everything works for now.
NAME   STATUS   ROLES    AGE   VERSION        INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                         KERNEL-VERSION   CONTAINER-RUNTIME
w3     Ready    <none>   13h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Raspbian GNU/Linux 10 (buster)   4.19.118-v7+     containerd://1.3.3-k3s2
w2     Ready    <none>   12h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Raspbian GNU/Linux 10 (buster)   4.19.118-v7+     containerd://1.3.3-k3s2
m1     Ready    master   84d   v1.18.4+k3s1   <IP_ADDRESS>   <none>        Raspbian GNU/Linux 10 (buster)   4.19.97-v7+      containerd://1.3.3-k3s2
w4     Ready    <none>   25h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Raspbian GNU/Linux 10 (buster)   4.19.118-v7+     containerd://1.3.3-k3s2
w1     Ready    <none>   25h   v1.18.6+k3s1   <IP_ADDRESS>   <none>        Raspbian GNU/Linux 10 (buster)   4.19.118-v7+     containerd://1.3.3-k3s2

I installed all packages here: https://github.com/raspberrypi/linux/issues/3644#issuecomment-663760750

Fixed today for me after doing rpi-update to this version:
uname -a
Linux k8s-master 5.4.58-v7+ #1335 SMP Thu Aug 13 22:17:06 BST 2020 armv7l GNU/Linux

The cgroup could be enabled again by the mentioned /boot/cmdline.txt` params

I've been fighting with getting k3s running on some Pi 3s for a week or so and have had a bunch of the problems on this issue.  I got it "working" with Ubuntu 20.04.1 LTS (64-bit), but it unbearably slow.  The timeouts were so frequent it wasn't usable.  So, I switched to Raspberry Pi OS (32-bit).
Here's what it took to get it to work:

You need the cgroup fixes mentioned, which are well-documented.  I've been including cgroup_enable=memory cgroup_memory=1 cgroup_enable=cpuset
I don't know if it's strictly necessary, but lots of things seem to indicate that you should turn off swap.  I've been using sudo dphys-swapfile swapoff && sudo systemctl disable dphys-swapfile.service
I went into raspi-config to set the memory split to give the GPU the minimum in order to claw back every shred of ram I could.  Advanced Options -> Memory Split and set it to 16.  This probably isn't actually necessary either.
And finally, to resolve some of the weird connectivity issues, you need to use legacy iptables.  My suspicion is that this is what was actually causing issues for @PRosenb originally because I got past that same error with that change.

Oh, and along the way sudo k3s check-config was nice to sanity check that things were looking good.  I'm actually surprised at how little documentation references that helpful little command.

i had try your‘s every step to do  using Raspberry Pi OS (32-bit).But still shows Error from server (ServiceUnavailable): the server is currently unable to handle the request.what can i do?


Cu 86b0ud6dd ability for vehicle to be initialized with a route position

Task linked: CU-86b0ud6dd Validate vehicle initial route position against assigned route


Home after "step repeat"

Hi,
when I'm doing "step repeat" after optimizing, right before spool, I have to manualy add "home". Is there way to automaticly add "home" after "step repeat"?  I ask that because MK is losing position after "step repeat", and if I forgot to manually "home" I got motors going out of working area.

        if x_pos != 0 or y_pos != 0:
            data.plan.append(offset(-x_pos, -y_pos))

I think the last thing it does is offset back to the 0,0 position. Might still be something else leading to a bug as such. it really should have restored the original home point correctly.


chore: remove @typescript-eslint/interface-name-prefix rule

Description of what you did:
Remove @typescript-eslint/interface-name-prefix rule

My PR is a:

[ ] 💥 Breaking change
[ ] 🐛 Bug fix
[x] 💅 Enhancement
[ ] 🚀 New feature

Please confirm that your PR fulfills these requirements

[x] Multiple commits are squashed into one commit.
[x] The commit message follows Conventional Commits, which allows us to autogenerate release notes; e.g. fix(plugins/plugin-k8s): fixed annoying bugs
[x] All npm dependencies are pinned.

why weren't these being caught be eslint?

@starpit because inline disabled:
https://github.com/IBM/kui/blob/5a5823c79332a6238d1f1b00f873deba714c9c69/packages/app/src/core/usage-error.ts#L753-L754