Opscode Reporting "[error] Received invalid principal"

I recently upgraded my standalone chef sever to the newest version. After that, Opscode Reporting now throws an error. I re-ran chef-server-ctl reconfigure and opscode-reporting-ctl reconfigure in an attempt to resolve the issue. The reconfigure completed successfully but did not fix the issue.
Here are the versions that are currently installed:
opscode-reporting-1.5.1-1.el6.x86_64
chef-server-core-12.1.2-1.el6.x86_64
chef-12.4.1-1.el6.x86_64
opscode-manage-1.20.1-1.el6.x86_64

Here is the log file:
==> /var/log/opscode/nginx/internal-chef.access.log <==
<IP_ADDRESS> - - [18/Aug/2015:10:22:48 -0400]  "GET /organizations/org-dev/principals/myusername HTTP/1.1" 200 "0.060" 592 "-" "opscode-reporting-server reporting pubkey" "<IP_ADDRESS>:8000" "200" "0.059" "11.1.0" "" "" "" "" 340
tail: `/var/log/opscode/opscode-reporting/reporting_error.log' has appeared;  following end of new file
tail: `/var/log/opscode/opscode-reporting/crash.log' has appeared;  following end of new file

==> /var/log/opscode/opscode-reporting/reporting_error.log <==
2015-08-18T10:22:48.519 [error] Received invalid principal {[{<<"principals">>,[{[{<<"name">>,<<"myusername">>},{<<"public_key">>,<<"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyO8m+4xouYvXqqICvwL0\nnxYAEEJPN9EBVFlnK0aLYhyJ3rXU1t1IPwLQcKQ4hdg2ckeT4OE8vh7KRWJC4RiC\n3wf1AfQ3oYqtIRxUGX1bjUe/uhvfAn+hvYL2qGurABTsRVXQF6a8qjhtJQT1LGKF\n2TQjr7UgC3kg+g1qsh2LxAm+hJlB1qYDQryvxXG1OF08bB4dsvHBnfVDHb/iSmrK\nUVRa6+75pyPyqir5A8USEEBGe/4tM/cbXhNsj3VVevVhT6gLkhT5koBTZJhLy+75\n/DFYawf4JmBTGBV509tPqiDt9dc4R9SGYobyNTsGtbhkR2AF4DuHl7qtOep6DxU1\nCwIDAQAB\n-----END PUBLIC KEY-----\n\n">>},{<<"type">>,<<"user">>},{<<"authz_id">>,<<"bdf7a2447a4a9b09bf04b21ef8564d59">>},{<<"org_member">>,true}]}]}]}

==> /var/log/opscode/opscode-reporting/crash.log <==
2015-08-18 10:22:48 =ERROR REPORT====
{<<"method=GET; path=/organizations/org-dev/reports/org/runs; status=500; ">>,{error,{badmatch,[]},[{chef_rest_wm,select_user_or_webui_key,2,[{file,"src/chef_rest_wm.erl"},{line,678}]},{chef_rest_wm,authenticate_request,4,[{file,"src/chef_rest_wm.erl"},{line,501}]},{chef_rest_wm,verify_request_signature,2,[{file,"src/chef_rest_wm.erl"},{line,475}]},{chef_rest_wm,is_authorized,2,[{file,"src/chef_rest_wm.erl"},{line,341}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,186}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,142}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,decision,1,[{file,"src/webmachine_decision_core.erl"},{line,213}]}]}}

==> /var/log/opscode/nginx/access.log <==
<IP_ADDRESS> - - [18/Aug/2015:10:22:48 -0400]  "GET /organizations/org-dev/reports/org/runs?from=1439821362&until=1439907762&start=0&rows=20 HTTP/1.1" 500 "0.142" 36 "-" "Chef Manage/11.16.2 (ruby-2.1.5-p273; ohai-7.4.1; x86_64-linux; +http://opscode.com)" "<IP_ADDRESS>:10010" "500" "0.142" "11.16.2" "algorithm=sha1;version=1.0;" "myusername" "2015-08-18T14:22:48Z" "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 1089
<IP_ADDRESS> - - [18/Aug/2015:10:22:48 -0400]  "GET /organizations/org-dev/runs?page=0&count=20&start_row=0&num_rows=20&startTime=1439821362&endTime=1439907762&_=1439907762500 HTTP/1.1" 404 "0.283" 77 "https://chef-dev.attractions.company.com/organizations/org-dev/runs" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0" "<IP_ADDRESS>:9462" "404" "0.283" "-" "-" "-" "-" "-" 4472

==> /var/log/opscode/opscode-reporting/reporting_error.log <==
2015-08-18T10:22:48.520 [error] {<<"method=GET; path=/organizations/org-dev/reports/org/runs; status=500; ">>,{error,{badmatch,[]},[{chef_rest_wm,select_user_or_webui_key,2,[{file,"src/chef_rest_wm.erl"},{line,678}]},{chef_rest_wm,authenticate_request,4,[{file,"src/chef_rest_wm.erl"},{line,501}]},{chef_rest_wm,verify_request_signature,2,[{file,"src/chef_rest_wm.erl"},{line,475}]},{chef_rest_wm,is_authorized,2,[{file,"src/chef_rest_wm.erl"},{line,341}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,186}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,142}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,decision,1,[{file,"src/webmachine_decision_core.erl"},{line,213}]}]}}

==> /var/log/opscode/opscode-reporting/current <==
2015-08-18_14:22:48.60055 reporting_chef_api:extract_requestor#181 [error] <0.27110.3> Received invalid principal {[{<<"principals">>,[{[{<<"name">>,<<"myusername">>},{<<"public_key">>,<<"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyO8m+4xouYvXqqICvwL0\nnxYAEEJPN9EBVFlnK0aLYhyJ3rXU1t1IPwLQcKQ4hdg2ckeT4OE8vh7KRWJC4RiC\n3wf1AfQ3oYqtIRxUGX1bjUe/uhvfAn+hvYL2qGurABTsRVXQF6a8qjhtJQT1LGKF\n2TQjr7UgC3kg+g1qsh2LxAm+hJlB1qYDQryvxXG1OF08bB4dsvHBnfVDHb/iSmrK\nUVRa6+75pyPyqir5A8USEEBGe/4tM/cbXhNsj3VVevVhT6gLkhT5koBTZJhLy+75\n/DFYawf4JmBTGBV509tPqiDt9dc4R9SGYobyNTsGtbhkR2AF4DuHl7qtOep6DxU1\nCwIDAQAB\n-----END PUBLIC KEY-----\n\n">>},{<<"type">>,<<"user">>},{<<"authz_id">>,<<"bdf7a2447a4a9b09bf04b21ef8564d59">>},{<<"org_member">>,true}]}]}]}

==> /var/log/opscode/nginx/access.log <==
<IP_ADDRESS> - - [18/Aug/2015:10:22:48 -0400]  "GET /organizations/org-dev/reports/org/runs?from=1439821362&until=1439907762&start=0&rows=20 HTTP/1.1" 500 "0.018" 36 "-" "Chef Manage/11.16.2 (ruby-2.1.5-p273; ohai-7.4.1; x86_64-linux; +http://opscode.com)" "<IP_ADDRESS>:10010" "500" "0.018" "11.16.2" "algorithm=sha1;version=1.0;" "myusername" "2015-08-18T14:22:48Z" "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 1089
<IP_ADDRESS> - - [18/Aug/2015:10:22:48 -0400]  "GET /organizations/org-dev/runs?page=0&count=20&start_row=0&num_rows=20&startTime=1439821362&endTime=1439907762&_=1439907762501 HTTP/1.1" 404 "0.338" 77 "https://chef-dev.attractions.company.com/organizations/org-dev/runs" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0" "<IP_ADDRESS>:9462" "404" "0.338" "-" "-" "-" "-" "-" 4472
<IP_ADDRESS> - - [18/Aug/2015:10:22:48 -0400]  "GET /users/myusername/association_requests HTTP/1.1" 200 "0.115" 2 "-" "Chef Manage/11.16.2 (ruby-2.1.5-p273; ohai-7.4.1; x86_64-linux; +http://opscode.com)" "<IP_ADDRESS>:8000" "200" "0.092" "11.16.2" "algorithm=sha1;version=1.0;" "myusername" "2015-08-18T14:22:48Z" "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 1034
<IP_ADDRESS> - - [18/Aug/2015:10:22:48 -0400]  "GET /users/myusername/association_requests HTTP/1.1" 200 "0.183" 33 "https://chef-dev.attractions.company.com/organizations/org-dev/runs" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0" "<IP_ADDRESS>:9462" "200" "0.183" "-" "-" "-" "-" "-" 4339

==> /var/log/opscode/opscode-reporting/crash.log <==
2015-08-18 10:22:48 =ERROR REPORT====
{<<"method=GET; path=/organizations/org-dev/reports/org/runs; status=500; ">>,{error,{badmatch,[]},[{chef_rest_wm,select_user_or_webui_key,2,[{file,"src/chef_rest_wm.erl"},{line,678}]},{chef_rest_wm,authenticate_request,4,[{file,"src/chef_rest_wm.erl"},{line,501}]},{chef_rest_wm,verify_request_signature,2,[{file,"src/chef_rest_wm.erl"},{line,475}]},{chef_rest_wm,is_authorized,2,[{file,"src/chef_rest_wm.erl"},{line,341}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,186}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,142}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,decision,1,[{file,"src/webmachine_decision_core.erl"},{line,213}]}]}}

==> /var/log/opscode/opscode-reporting/current <==
2015-08-18_14:22:48.64112 Undefined:Undefined#Undefined [error] <0.236.0> {<<"method=GET; path=/organizations/org-dev/reports/org/runs; status=500; ">>,{error,{badmatch,[]},[{chef_rest_wm,select_user_or_webui_key,2,[{file,"src/chef_rest_wm.erl"},{line,678}]},{chef_rest_wm,authenticate_request,4,[{file,"src/chef_rest_wm.erl"},{line,501}]},{chef_rest_wm,verify_request_signature,2,[{file,"src/chef_rest_wm.erl"},{line,475}]},{chef_rest_wm,is_authorized,2,[{file,"src/chef_rest_wm.erl"},{line,341}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,186}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,142}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,decision,1,[{file,"src/webmachine_decision_core.erl"},{line,213}]}]}}

==> /var/log/opscode/opscode-reporting/reporting_error.log <==
2015-08-18T10:22:48.608 [error] Received invalid principal {[{<<"principals">>,[{[{<<"name">>,<<"myusername">>},{<<"public_key">>,<<"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyO8m+4xouYvXqqICvwL0\nnxYAEEJPN9EBVFlnK0aLYhyJ3rXU1t1IPwLQcKQ4hdg2ckeT4OE8vh7KRWJC4RiC\n3wf1AfQ3oYqtIRxUGX1bjUe/uhvfAn+hvYL2qGurABTsRVXQF6a8qjhtJQT1LGKF\n2TQjr7UgC3kg+g1qsh2LxAm+hJlB1qYDQryvxXG1OF08bB4dsvHBnfVDHb/iSmrK\nUVRa6+75pyPyqir5A8USEEBGe/4tM/cbXhNsj3VVevVhT6gLkhT5koBTZJhLy+75\n/DFYawf4JmBTGBV509tPqiDt9dc4R9SGYobyNTsGtbhkR2AF4DuHl7qtOep6DxU1\nCwIDAQAB\n-----END PUBLIC KEY-----\n\n">>},{<<"type">>,<<"user">>},{<<"authz_id">>,<<"bdf7a2447a4a9b09bf04b21ef8564d59">>},{<<"org_member">>,true}]}]}]}

==> /var/log/opscode/opscode-reporting/current <==
2015-08-18_14:22:48.64412 reporting_chef_api:extract_requestor#181 [error] <0.3393.0> Received invalid principal {[{<<"principals">>,[{[{<<"name">>,<<"myusername">>},{<<"public_key">>,<<"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyO8m+4xouYvXqqICvwL0\nnxYAEEJPN9EBVFlnK0aLYhyJ3rXU1t1IPwLQcKQ4hdg2ckeT4OE8vh7KRWJC4RiC\n3wf1AfQ3oYqtIRxUGX1bjUe/uhvfAn+hvYL2qGurABTsRVXQF6a8qjhtJQT1LGKF\n2TQjr7UgC3kg+g1qsh2LxAm+hJlB1qYDQryvxXG1OF08bB4dsvHBnfVDHb/iSmrK\nUVRa6+75pyPyqir5A8USEEBGe/4tM/cbXhNsj3VVevVhT6gLkhT5koBTZJhLy+75\n/DFYawf4JmBTGBV509tPqiDt9dc4R9SGYobyNTsGtbhkR2AF4DuHl7qtOep6DxU1\nCwIDAQAB\n-----END PUBLIC KEY-----\n\n">>},{<<"type">>,<<"user">>},{<<"authz_id">>,<<"bdf7a2447a4a9b09bf04b21ef8564d59">>},{<<"org_member">>,true}]}]}]}

==> /var/log/opscode/opscode-reporting/reporting_error.log <==
2015-08-18T10:22:48.621 [error] {<<"method=GET; path=/organizations/org-dev/reports/org/runs; status=500; ">>,{error,{badmatch,[]},[{chef_rest_wm,select_user_or_webui_key,2,[{file,"src/chef_rest_wm.erl"},{line,678}]},{chef_rest_wm,authenticate_request,4,[{file,"src/chef_rest_wm.erl"},{line,501}]},{chef_rest_wm,verify_request_signature,2,[{file,"src/chef_rest_wm.erl"},{line,475}]},{chef_rest_wm,is_authorized,2,[{file,"src/chef_rest_wm.erl"},{line,341}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,186}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,142}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,decision,1,[{file,"src/webmachine_decision_core.erl"},{line,213}]}]}}

==> /var/log/opscode/opscode-reporting/current <==
2015-08-18_14:22:48.65176 Undefined:Undefined#Undefined [error] <0.236.0> {<<"method=GET; path=/organizations/org-dev/reports/org/runs; status=500; ">>,{error,{badmatch,[]},[{chef_rest_wm,select_user_or_webui_key,2,[{file,"src/chef_rest_wm.erl"},{line,678}]},{chef_rest_wm,authenticate_request,4,[{file,"src/chef_rest_wm.erl"},{line,501}]},{chef_rest_wm,verify_request_signature,2,[{file,"src/chef_rest_wm.erl"},{line,475}]},{chef_rest_wm,is_authorized,2,[{file,"src/chef_rest_wm.erl"},{line,341}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,186}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,142}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,decision,1,[{file,"src/webmachine_decision_core.erl"},{line,213}]}]}}

Same problem here, also Received invalid principal error. Did you manage to solve this?

Nope. I still have the machine that is failing but I haven't experimented much more around trying to fix it.

Hi, apologies that no one got back to you on this.  There seems to be 2 different kinds of errors here.  The first is:

@Tech356 I know that you are using chef-guard... and it seems that this is related to chef-guard.... :(

Apologies no one responded to this earlier.  Reporting 1.5+ should have a fix to be compatible with the newer API response from chef-server 12.1+.  I'm guessing you've tried this, but the reconfigure might not restart opscode-reporting, so it might be good to make sure reporting was restarted after upgrade and isn't still running the old code.
One thing to check is what API version reporting is request.  If you look at the request logs for erchef:
grep principals /var/log/opscode/opscode-erchef/requests.log.*

The entries should have a field for req_api_version.
Would either of you be available for some realtime debugging?

I have installed opscode-reporting-1.5.2-1.el7.x86_64, please ping me on skype when you have time.

This indeed looks like could be chef-guard.  If chef-guard is filtering the X-Ops-Server-API-Version header, this would be the error I would expect.

@stevendanna I disabled chef-guard and I am seeing req_api_version=0 when I tail the logs. But reporting is still failing with the same error.

@Tech356 I can say for sure in the case of @sbotman's failure the problem was chef-guard and a bug in reporting.  The newest version of reporting uses the following header to determine what version of the principals response we are receiving:

X-Ops-Server-API-Version

With chef-guard on that header was being normalized to  X-Ops-Server-Api-Version

@stevendanna Upgrading to the latest version has fix reporting for me. Is there still an outstanding bug in oc_reporting? After upgrading, I can run with chef-guard and everything looks to work but when I tail the logs I still see req_api_version=0.
2015-10-09T19:04:51Z<EMAIL_ADDRESS>method=GET; path=/users/myuser/association_requests;
status=200; req_id=g3IAA2QAEGVyY2hlZkAxMjcuMC4wLjEBAABUywAAAAAAAAAA;
couchdb_groups=false; couchdb_organizations=false; couchdb_containers=false;
couchdb_acls=false; 503_mode=false; couchdb_associations=false;
couchdb_association_requests=false; req_time=16; rdbms_time=8; rdbms_count=3;
user=myuser; req_api_version=0;

Here are the new versions:
opscode-reporting-1.5.2-1.el6.x86_64
chef-server-core-12.2.0-1.el6.x86_64
chef-12.5.1-1.el6.x86_64
opscode-manage-1.21.0-1.el6.x86_64

Also, Is there a preferred to order to run the reconfigures in? I ran the commands in the following order. I haven't been able to find if there is a preferred order (or if it matters).
yum upgrade
chef-server-ctl upgrade
chef-server-ctl cleanup
opscode-manage-ctl reconfigure
opscode-reporting-ctl reconfigure

@stevendanna Upgrading to the latest version has fix reporting for me. Is there still an outstanding bug in oc_reporting? After upgrading, I can run with chef-guard and everything looks to work but when I tail the logs I still see req_api_version=0.

Glad to hear it!.  I think there may still be a bug in OC reporting, but what @sbotman was seeing might specifically have to do with how he integrated chef-server and chef-guard.  You will see many requests with req_api_version=0 since many clients still use that API version.  However, oc_reporting when hitting the principals endpoint should be using req_api_version=1. (The log item you posted was for an assocation_request, likely from the web interface).

Also, Is there a preferred to order to run the reconfigures in? I ran the commands in the following order. I haven't been able to find if there is a preferred order (or if it matters).

I think the order you listed is good, although you will often want to run a final chef-server-ctl reconfigure to account for the case where an add-on puts new nginx configuration on disk.
I'm going to keep this issue open until we confirm or disprove the header issue I found above.

@stevendanna Yea, the logs I copied are from the web interface.
Thanks for all your help!

@stevendanna I spoke too so. I am see the same thing. With chef-guard enabled, reporting does not work. When I disable it, reporting starts working. This only seems to be an issue with the web interface. I can see reports that were created by clients when the reporting was 'broken'.
Before I think I didn't restart the chef server services and the previous socket was still open, hence why it looked to be working.

@stevendanna what is the number of the ticket that you created for the fix of the header? Would like to track this ticket :)

A fix for this has been merged to the relevant oc_reporting repository and will be included in the next release.
Reporting is a proprietary add-on so the tickets are not public.  However, I am keeping this issue open until the reporting version that fixes this is released.

@sbotman Have you tried reporting 1.5.3 to see if it fixes the issue?  The release notes state "Fixed bug in Header validation to be case insensitive." but when I installed it, I didn't seem to fix the problem. I may just be doing something dumb though...
https://www.chef.io/blog/2015/10/27/chef-reporting-1-5-3-released/

Indeed, I also installed it today but it seems that it's not fixed yet. Already tried to contact steven about this via skype, but no response yet...

@sbotman @Tech356 Apologies it seems that this hasn't fixed the issue.  Could you post the errors you are seeing in the reporting logs? If either of you have time to look at this issue in realtime today, please let me know.

It looks like the reporting release might not actually have included my fix. Investigating now.

I confirmed that the 1.5.3 release does not include the fix.  I'll work with the reporting team to update the changelog/blog post and hopefully get another release out that includes the fix.  Apologies for the inconvenience.

The 1.5.4 release has fix the issue for me. Reporting is now working again. I'll leave this issue open until sbotman confirms 1.5.4 has fixed the issue for him as well.
https://www.chef.io/blog/2015/11/02/chef-reporting-1-5-3-released/

The header fix is indeed solving the problem. We ran into some issues with chef-guard today which killed the service, so I will ask @svanharmelen to release a new version with the fixes so you can also install this. Cheers Sander


KOGITO-308: Avoid XStream "Illegal reflective access operation"

this should address https://github.com/quarkusio/quarkus/pull/4092#issuecomment-533005395
before
[INFO] --- quarkus-maven-plugin:0.21.2:dev (default-cli) @ kogito-travel-agency ---
Listening for transport dt_socket at address: 5005
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/home/evacchi/.m2/repository/com/thoughtworks/xstream/xstream/<IP_ADDRESS>/xstream-<IP_ADDRESS>.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-09-19 15:03:05,708 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-09-19 15:03:09,620 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 3912ms
2019-09-19 15:03:09,689 INFO  [io.qua.swa.run.SwaggerUiServletExtension] (main) Swagger UI available at /swagger-ui
2019-09-19 15:03:10,056 INFO  [io.quarkus] (main) Quarkus 0.21.2 started in 4.477s. Listening on: http://[::]:8080
2019-09-19 15:03:10,057 INFO  [io.quarkus] (main) Installed features: [cdi, kogito, resteasy, resteasy-jsonb, smallrye-openapi, swagger-ui]
^C2019-09-19 15:03:10,323 INFO  [io.quarkus] (Quarkus Shutdown Thread) Quarkus stopped in 0.020s

after:
[INFO] --- quarkus-maven-plugin:0.21.2:dev (default-cli) @ kogito-travel-agency ---
Listening for transport dt_socket at address: 5005
2019-09-19 15:12:03,582 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-09-19 15:12:07,289 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 3707ms
2019-09-19 15:12:07,343 INFO  [io.qua.swa.run.SwaggerUiServletExtension] (main) Swagger UI available at /swagger-ui
2019-09-19 15:12:07,655 INFO  [io.quarkus] (main) Quarkus 0.21.2 started in 4.202s. Listening on: http://[::]:8080
2019-09-19 15:12:07,656 INFO  [io.quarkus] (main) Installed features: [cdi, kogito, resteasy, resteasy-jsonb, smallrye-openapi, swagger-ui]

shall we go ahead and merge? examples did not break so I guess that selection of (un)marshallers should be fine for us (we can always revert.. it's pretty self-contained) @mariofusco

have we tested that on native image? not sure it's relevant but just double checking ... as tomorrow I will do the 0.4.0 release...

nope. good point

I run a mvn -Pnative package on examples with and without
MAVEN_OPTS='-Dsun.reflect.debugModuleAccessChecks=true --illegal-access=deny '
JAVA_OPTS='-Dsun.reflect.debugModuleAccessChecks=true --illegal-access=deny '

and it succeeded in both cases, you may want to do another test run on your machine to stay on the safe side


[Documentation Reqest] Provide example test target that doesn't depend on an Application target

The README states that it should be possible to create test targets that don't depend on Application targets.

Test targets can be made that don't depend on any Application targets, or that launch multiple Application targets.

I'd love to make use of this, but there don't seem to be any examples demonstrating how to do this.
So I'm creating this issue to track providing an example configuration in FBSimulatorControl documentation. Alternatively, this could be provided as an integration test.
Thanks!

Have you taken a look at FBSimulatorControlApplicationLaunchTests and the Test Bundle bundle that contains it FBSimulatorControlTests? This test launches MobileSafari which is an App Bundle that comes pre-installed on the Simulator.
We could add and check-in a couple of dummy-apps. These would be Simulator .app Bundles that Integration tests can just launch to confirm that 3rd-party (and multiple 3rd-party) works as intended.
FBSimulatorControlTests only depend on FBSimulatorControl.framework and no Applications. The Test Bundle itself doesn't need "Bundle Loader" to be set, since the XCTest bundle just loads the FBSimulatorControl.framework directly (with all the associated rpath settings to link in the Private Frameworks).
I think the first step to documenting this would be a Podspec for the Framework: I'm pretty sure that the specification to link in (and bundle) the .framework would be identical for XCTest and Application targets.

There is an Integration Test to show how this can work. I'll take a look at the documentation to see if it needs clarifying.


Need to Update ReadMe

Can we update readme with latest features?

We have scheduled the Update of readme For 1 June. Thanks.

Need To reschedule Update meeting due to current Global pandemic.


CMake: Add CMakeUserPresets.json

Reasons for making this change:
CMake 3.19 added CMakePresets.json, which is intended to be
version-controlled, and CMakeUserPresets.json, which should NOT
be version-controlled. Add CMakeUserPresets.json to the gitignore.
Links to documentation supporting these rule changes:
https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html

Just dropping a comment from a user (me) that this seems fairly clear to review and I'd really like it, thanks in advance 👍
Also, this file may get autogenerated by conan, making the template more important for users who didn't expect it

The last PR was merged 2 years ago, does this repo need to get permanently forked or will it be maintained again?

For future reference personally, I moved over to use https://github.com/toptal/gitignore
The issue in this PR is already resolved there, they also give reasoning behind the fork

+1 I was just browsing for some useful CMake gitignore template and it didn't have CMakeUserPresets.json in it. It seemed like a bit basic template until I've seen there are pull requests in the queue, so would be kind of good to merge this.


App will not start properly. Stuck on "Starting Daemon"

Describe the bug
After install of the latest version, the app now is just stuck at "starting daemon" and never starts up.
To Reproduce
Steps to reproduce the behavior:

Install newest version
Open it
See error

Expected behavior
App show start normally and display countries list. However, the app is stuck at starting daemon.
Screenshots

Environment (please complete the following information):

OS: Windows 10
Desktop app version (if applicable): 4.2.1

Additional context
Logs:
VeRaX, [21 Jun 2021 at 08:14:02]:
...[2021-06-13 13:00:51.832] [info] Supervisor version bundled: 0.47.1 running: 0.47.1
[2021-06-13 13:00:51.833] [info] Running supervisor version matches, skipping the upgrade
[2021-06-13 13:00:51.851] [info] No ghosts found on port 4050
[2021-06-13 13:00:51.856] [info] No ghosts found on port 44050
[2021-06-13 13:00:51.870] [info] myst supervisor tequilapi port set to: 44050
[2021-06-13 13:00:51.931] [info] Server: ok
[2021-06-13 13:01:13.438] [info] Connecting to the supervisor...
[2021-06-13 13:01:13.449] [info] Connected to:  \.\pipe\mystpipe
[2021-06-13 13:01:13.450] [info] Stopping myst
[2021-06-13 13:01:13.451] [info] Shutting down node gracefully on port 44050
[2021-06-14 00:08:09.077] [info] Checking for update
[2021-06-14 00:08:09.909] [info] Pushy device token: 3d91ad8416a6d26884873d
[2021-06-14 00:08:10.012] [info] Update for version 4.2.1 is not available (latest version: 4.2.1, downgrade is disallowed).
[2021-06-14 00:08:10.016] [info] Connecting to the supervisor...
[2021-06-14 00:08:10.019] [info] Connected to:  \.\pipe\mystpipe
[2021-06-14 00:08:10.063] [info] Server: ok: 0.47.1
[2021-06-14 00:08:10.064] [info] Supervisor version bundled: 0.47.1 running: 0.47.1
[2021-06-14 00:08:10.065] [info] Running supervisor version matches, skipping the upgrade
[2021-06-14 00:08:10.076] [info] No ghosts found on port 4050
[2021-06-14 00:08:10.080] [info] No ghosts found on port 44050
[2021-06-14 00:08:10.097] [info] myst supervisor tequilapi port set to: 44050
[2021-06-14 00:08:10.104] [info] Server: ok
[2021-06-14 00:08:24.754] [info] Connecting to the supervisor...
[2021-06-14 00:08:24.764] [info] Connected to:  \.\pipe\mystpipe
[2021-06-14 00:08:24.766] [info] Stopping myst
[2021-06-14 00:08:24.767] [info] Shutting down node gracefully on port 44050
[2021-06-15 23:38:57.030] [info] Checking for update
[2021-06-15 23:38:57.885] [info] Pushy device token: 3d91ad8416a6d26884873d
[2021-06-15 23:38:57.968] [info] Update for version 4.2.1 is not available (latest version: 4.2.1, downgrade is disallowed).
[2021-06-15 23:38:57.973] [info] Connecting to the supervisor...
[2021-06-15 23:38:57.976] [info] Connected to:  \.\pipe\mystpipe
[2021-06-15 23:38:57.997] [info] Server: ok: 0.47.1
[2021-06-15 23:38:57.999] [info] Supervisor version bundled: 0.47.1 running: 0.47.1
[2021-06-15 23:38:58.000] [info] Running supervisor version matches, skipping the upgrade
[2021-06-15 23:38:58.017] [info] No ghosts found on port 4050
[2021-06-15 23:38:58.020] [info] No ghosts found on port 44050
[2021-06-15 23:38:58.034] [info] myst supervisor tequilapi port set to: 44050
[2021-06-15 23:38:58.125] [info] Server: ok
[2021-06-15 23:39:20.451] [info] Connecting to the supervisor...
[2021-06-15 23:39:20.460] [info] Connected to:  \.\pipe\mystpipe
[2021-06-15 23:39:20.462] [info] Stopping myst
[2021-06-15 23:39:20.464] [info] Shutting down node gracefully on port 44050
[2021-06-18 13:17:55.822] [info] Checking for update
[2021-06-18 13:17:57.141] [info] Pushy device token: 3d91ad8416a6d26884873d
[2021-06-18 13:17:57.383] [info] Update for version 4.2.1 is not available (latest version: 4.2.1, downgrade is disallowed).
[2021-06-18 13:17:57.396] [info] Connecting to the supervisor...
[2021-06-18 13:17:57.402] [info] Connected to:  \.\pipe\mystpipe
[2021-06-18 13:17:57.480] [info] Server: ok: 0.47.1
[2021-06-18 13:17:57.485] [info] Supervisor version bundled: 0.47.1 running: 0.47.1
[2021-06-18 13:17:57.487] [info] Running supervisor version matches, skipping the upgrade
[2021-06-18 13:17:57.504] [info] No ghosts found on port 4050
[2021-06-18 13:17:57.508] [info] No ghosts found on port 44050
[2021-06-18 13:17:57.523] [info] myst supervisor tequilapi port set to: 44050
[2021-06-18 13:17:57.676] [info] Server: ok
[2021-06-20 23:49:01.875] [info] Connecting to the supervisor...
[2021-06-20 23:49:01.887] [info] Connected to:  \.\pipe\mystpipe
[2021-06-20 23:49:01.889] [info] Stopping myst
[2021-06-20 23:49:01.890] [info] Shutting down node gracefully on port 44050
[2021-06-20 23:49:01.912] [error] Could not shutdown myst gracefully connect ECONNREFUSED <IP_ADDRESS>:44050 (path="stop")
[2021-06-20 23:49:01.913] [info] Killing node process 1876
[2021-06-20 23:49:01.933] [info] myst process exited with code null
[2021-06-20 23:49:13.593] [info] Checking for update
[2021-06-20 23:49:14.461] [info] Pushy device token: 3d91ad8416a6d26884873d
[2021-06-20 23:49:14.614] [info] Update for version 4.2.1 is not available (latest version: 4.2.1, downgrade is disallowed).
[2021-06-20 23:49:14.618] [info] Connecting to the supervisor...
[2021-06-20 23:49:14.620] [info] Connected to:  \.\pipe\mystpipe
[2021-06-20 23:49:14.636] [info] Server: ok: 0.47.1
[2021-06-20 23:49:14.638] [info] Supervisor version bundled: 0.47.1 running: 0.47.1
[2021-06-20 23:49:14.639] [info] Running supervisor version matches, skipping the upgrade
[2021-06-20 23:49:14.653] [info] No ghosts found on port 4050
[2021-06-20 23:49:14.656] [info] No ghosts found on port 44050
[2021-06-20 23:49:14.669] [info] myst supervisor tequilapi port set to: 44050
[2021-06-20 23:49:14.875] [info] Server: ok
[2021-06-20 23:49:25.097] [info] Connecting to the supervisor...
[2021-06-20 23:49:25.105] [info] Connected to:  \.\pipe\mystpipe
[2021-06-20 23:49:25.107] [info] Stopping myst
[2021-06-20 23:49:25.108] [info] Shutting down node gracefully on port 44050
[2021-06-21 02:58:20.493] [info] Checking for update
[2021-06-21 02:58:21.412] [info] Pushy device token: 3d91ad8416a6d26884873d
[2021-06-21 02:58:21.526] [info] Update for version 4.2.1 is not available (latest version: 4.2.1, downgrade is disallowed).
[2021-06-21 02:58:21.557] [info] Connecting to the supervisor...
[2021-06-21 02:58:21.560] [info] Connected to:  \.\pipe\mystpipe
[2021-06-21 02:58:21.584] [info] Server: ok: 0.47.1
[2021-06-21 02:58:21.585] [info] Supervisor version bundled: 0.47.1 running: 0.47.1
[2021-06-21 02:58:21.586] [info] Running supervisor version matches, skipping the upgrade
[2021-06-21 02:58:21.601] [info] No ghosts found on port 4050
[2021-06-21 02:58:21.608] [info] No ghosts found on port 44050
[2021-06-21 02:58:21.622] [info] myst supervisor tequilapi port set to: 44050
[2021-06-21 02:58:21.672] [info] Server: ok
[2021-06-21 02:58:27.173] [info] Checking for update
[2021-06-21 02:58:27.409] [info] Update for version 4.2.1 is not available (latest version: 4.2.1, downgrade is disallowed).
[2021-06-21 02:58:33.558] [info] Connecting to the supervisor...
[2021-06-21 02:58:33.565] [info] Connected to:  \.\pipe\mystpipe
[2021-06-21 02:58:33.566] [info] Stopping myst
[2021-06-21 02:58:33.568] [info] Shutting down node gracefully on port 44050

Please attach full logs to the issue as described in https://github.com/mysteriumnetwork/mysterium-vpn-desktop#logging
For windows that would be (3 locations - app, node and supervisor logs respectively):
%USERPROFILE%\AppData\Roaming\MysteriumVPN\logs\*.log
%USERPROFILE%\.mysterium\logs\mysterium-node.log
%PROGRAMDATA%\MystSupervisor\myst_supervisor.log

My log files.
main.log
renderer.log
renderer.old.log

My log files.
main.log
renderer.log
renderer.old.log

@VeRaX-Apps these are only application logs

Yes, I know. For some reason, Github will only let me upload a few files at a time.
myst_supervisor.log

@VeRaX-Apps also need the node logs from %USERPROFILE%\.mysterium\logs\mysterium-node.log. Nothing appears to be wrong from the ones you have uploaded.

So, I figured out what the issue was to fix the app from finish starting up. I checked all the logs, but every time I tried to open the mysterium-node.log file, it would always make notepad crash. So that tells the that the log file was corrupted; also the file size was normal, and because it was corrupted I could not upload it to Github.
Solution:
Remove the mysterium-node.log file, and then start up the Mysterium app, and it will rebuild the log file and it starts up as it should.

@isaackielma could try the above and/or upgrade to 5.0.0-5 manually and see if that solves the issue?

dosent work for me


Pub lish fails with "Connection failed"

I have a local pub server. I get this error when I try to publish:
pub -v lish --server=http://localhost:8086
FINE: Showing confirm message: Package has 4 warnings. Upload anyway
Package has 4 warnings. Upload anyway (y/n)? y
FINE: Loading OAuth2 credentials.
FINE: Saving OAuth2 credentials.
FINE: Ensuring directory /Users/sethladd/.pub-cache exists.
IO  : Writing 282 characters to text file /Users/sethladd/.pub-cache/credentials.json.
FINE: HTTP GET http://localhost:8086/packages/versions/new.json
    | authorization: <censored>
FINE: Saving OAuth2 credentials.
FINE: Ensuring directory /Users/sethladd/.pub-cache exists.
IO  : Writing 282 characters to text file /Users/sethladd/.pub-cache/credentials.json.
FINE: Clean up system cache temp directory /Users/sethladd/.pub-cache/_temp.
ERR : Connection failed
Unfortunately, "Connection failed" doesn't have any details.
When I manually go to "http://localhost:8086/packages/versions/new.json" I see "No private key set".
Recommendation: Display the reason message when the command fails.
sethladd:~/Code/lawndart (master)$ pub --version
Pub 0.4.0+0.r20187.sethladd

This issue has been moved to dart-lang/pub-dartlang#322.


Installation error

When I tried to use pip install pyccl, it shows:
cc1plus: error: unrecognized command line option "-std=c++11"
My g++ version is g++ (GCC) 4.7.3.

See this link: https://www.gnu.org/software/gcc/projects/cxx-status.html#cxx11
your version of gcc doesn't support c++11 which is needed.


NTO ogit/forum (TabTab ontology)

There has been ongoing email discussion with @conofre regarding
this and the TabTab app will take the namespace ogit/Forum.
I have added the Entities, Attributes and Verbs discussed and
modified the existing ones to fit our needs.
I am sure there will be more before TabTab is running from a
OGIT validated GraphIT.
There are also a couple of commits that fix existing data, renaming ogit/AccessControl as per the new guidelines and correcting the typo in the filename for ogit/consistsOf.

The updated Request now contains the changes you requested.
A new entity ogit/Forum/KnowledgeBundle has been created for the grouping of KnowledgeItems (which is definitely needed).
I have not modified the verbs isRelatedTo or createdBy as their new counterparts are not yet in the onotology and those verbs already have a significant number of connections.

Hi Chris, the new changed ontology will be ready in couple days in a different fork on github. This fork will become the main one after adjustments from other projects.
Biggest part of your changes are new stuff so it will not be affected.
The only future needed adjustments from your side will be the change of those two verb names.
Tabtab will be the first team having it's operational data integrated in it!
I will get back to you when we're ready.

Massive conflict. I will close this and create a new PR.


Pure leakage in the test set

It seems that you used the entire test set to train encode_text_learn, while also using the test set for testing, which is seriously inconsistent with the ZERO-SHOT mentioned in your paper.Can you explain this issue

We conduct zero-shot performance evaluations on datasets other than MVTEC AD using the test set of MVTEC AD dataset. And, we assess the zero-shot performance on the MVTEC AD dataset using the test set of VisA dataset. This aligns with the approach presented in our paper. You can check the script train.sh and test.sh

Thanks for your acknowledgment, I will close this issue.


package.json: update react-onclickoutside to work with React 16

We downgraded the dependency (https://github.com/Hacker0x01/react-datepicker/pull/1083) because of compatibility issues, so I'm skeptical of blindly making this change.

@rafeememon When I tried the local build (yarn run start), everything seemed to be working fine.


models.py:226-227: Resolve slug code doubling. See...

The puzzle<PHONE_NUMBER>7 from #302 has to be resolved:
https://github.com/fidals/refarm-site/blob/d659d426a819b888c4e0b465dfc6a65218347447/catalog/models.py#L226-L227
The puzzle was created by duker33 on 06-Mar-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

hard because it's arch task


the library generate apollo client 3 compatible Types how can I generate apollo client 2 ?

https://graphql-code-generator.com/docs/plugins/typescript-react-apollo
You can add reactApolloVersion: 2 to your configuration.

tnx


Enable creation of StepSequence in AzureML SDK 2.0

Is your feature request related to a problem? Please describe.
Hi, one of my team members is working very hard to to migrate Pipelines from Azure Machine Learning SDK V1 to V2, but we are still missing quite a lot of features from SDK 1.0. These features sometimes are in preview and sometimes they do not exist.
In V1, I just had to create PythonScriptStep and wrap it into a StepSequence and deploy the pipeline. My scripts are simple, no input, no outputs. We store data in ADLS Gen2. This is why I don't have any inputs/outputs.
With V2, we need to create a "node" in a component that will be use by a pipeline. Currently we can do this with a dummy input:
step_1 = command(
environment=azureml_env,
command="python step1.py",
code="./my_project_folder",
outputs=dummy_output
)
step_2 = command(
environment=azureml_env,
command="python step2.py",
code="./my_project_folder",
inputs=dummy_output,
outputs=dummy_output2
)

Describe the solution you'd like
Bring back StepSequence(steps)
Describe alternatives you've considered
This amazing solution provided by https://stackoverflow.com/users/5462743/begreen:
from collections import OrderedDict
from pathlib import Path
from typing import List
import random
import string

from azure.ai.ml import Input, Output, command
from azure.ai.ml.dsl import pipeline
from azure.ai.ml.entities import BuildContext, Environment

class StepsGraph:
    def __init__(self):
        """
        Initialize a StepsGraph instance to manage step dependencies.

        The StepsGraph uses an ordered dictionary to store steps and their dependencies.
        """
        self.steps = OrderedDict()

    def add_edges(self, step_1, step_2):
        """
        Add a dependency relationship between two steps.

        Args:
            step_1: The first step.
            step_2: The step that depends on the first step.
        """
        if step_1 not in self.steps:
            self.steps[step_1] = []
        if step_2 not in self.steps:
            self.steps[step_2] = []
        self.steps[step_1].append(step_2)

    def get_dependency(self):
        """
        Get the steps in the order of their dependencies.

        Returns:
            List: A list of steps in the order they need to be executed to satisfy all dependencies.
        """

        def dfs(node, visited, result):
            visited[node] = True
            if node in self.steps:
                for neighbor in self.steps[node]:
                    if not visited[neighbor]:
                        dfs(neighbor, visited, result)
            result.append(node)

        visited = {step: False for step in self.steps}
        result = []

        for step in self.steps:
            if not visited[step]:
                dfs(step, visited, result)

        return result[::-1]

    def get_parents(self, step):
        """
        Get the steps that are dependent on a given step.

        Args:
            step: The step to find dependent steps for.

        Returns:
            List: A list of steps that depend on the given step.
        """
        parents = []
        for s, connections in self.steps.items():
            if step in connections:
                parents.append(s)
        return parents

    def print_steps(self):
        for step, edges in self.steps.items():
            print(f"Step {step} -> {edges}")

def create_input(step):
    """
    Create an input dictionary for a step.

    Args:
        step (str): The name of the step for which to create an input.

    Returns:
        dict: A dictionary representing the input for the specified step with the following structure:
            {step: Input(type="uri_folder", mode="rw_mount")}
    """
    return {f"{step}": Input(type="uri_folder", mode="rw_mount")}

def create_output(step):
    """
    Create an output dictionary for a step.

    Args:
        step (str): The name of the step for which to create an output.

    Returns:
        dict: A dictionary representing the output for the specified step with the following structure:
            {step: Output(type="uri_folder", mode="rw_mount")}
    """
    return {f"{step}": Output(type="uri_folder", mode="rw_mount")}

def create_pipeline(steps_graph, default_compute, name, experiment_name):
    """
    Create a pipeline with specified steps and dependencies.

    Args:
        steps_graph (Step or StepsGraph): A Step or StepsGraph object representing the steps and their dependencies in the pipeline.
            If a Step is provided, it will be treated as a standalone step.
        default_compute: The default compute target for the pipeline (or None for serverless execution).
        name (str): The name of the pipeline.
        experiment_name (str): The name of the experiment associated with the pipeline.

    Returns:
        Callable: A callable function representing the created pipeline.

    Raises:
        ValueError: If `name` or `experiment_name` is not provided.

    Note:
        - The `steps_graph` argument can be a single Step or a StepsGraph object.
        - The pipeline's structure is determined by the dependencies defined in the `steps_graph`.
        - The pipeline is created as a Python function and can be executed when called.

    Example:
        # Create a pipeline with specific steps and dependencies

        steps_graph = StepsGraph()
        step1 = Step(...)
        step2 = Step(...)
        step3 = Step(...)

        steps_graph.add_edges(step_1, step_2)
        steps_graph.add_edges(step_2, step_3)
        steps_graph.add_edges(step_2, step_4)
        steps_graph.add_edges(step_2, step_6)
        steps_graph.add_edges(step_4, step_5)
        steps_graph.add_edges(step_3, step_7)
        steps_graph.add_edges(step_6, step_7)
        steps_graph.add_edges(step_5, step_7)

        pipeline_job = create_pipeline(steps_graph, default_compute="my_compute", name="my_pipeline", experiment_name="my_experiment")
    """
    # default_compute = None => Serverless
    if not name:
        raise ValueError("Please provide a `name` for your pipeline.")
    if not experiment_name:
        raise ValueError("Please provide an `experiment_name` for your pipeline.")

    @pipeline(
        default_compute=default_compute,
        name=experiment_name,
        experiment_name=experiment_name,
    )
    def default_pipeline():
        if isinstance(steps_graph, Step):
            steps_graph.build()()
            return
        dependency_oder = steps_graph.get_dependency()
        command_dict = {}
        parent_dict = {}

        for step, edges in steps_graph.steps.items():
            print(f"Step {step} -> {edges}")
            parent_dict[str(step)] = steps_graph.get_parents(step)

        print(f"parent_dict : {parent_dict}")
        print(f"dependency_oder: {dependency_oder}")
        for step in dependency_oder:
            print(f"step : {step}")
            inputs_dict = {}
            step.update_link(
                outputs=create_output(step),
            )
            for parent_node in reversed(parent_dict[str(step)]):
                step.update_link(
                    inputs=create_input(parent_node),
                )
                custom_output = getattr(
                    command_dict[str(parent_node)].outputs, str(parent_node)
                )
                input_name = list(parent_node.outputs.keys())[
                    0
                ]  # Because we know we have only one output per steps
                inputs_dict[input_name] = custom_output

            print(inputs_dict)

            for key, value in inputs_dict.items():
                print(key, value._port_name)

            print(step.inputs)
            command_dict[str(step)] = step.build()(**inputs_dict)

    return default_pipeline()

def generate_custom_uuid(length=8, parts=4):
    custom_uuid = ""
    for _ in range(parts):
        part = "".join(random.choices(string.ascii_letters + string.digits, k=length))
        custom_uuid += part + "_"

    custom_uuid = custom_uuid[:-1]
    return custom_uuid

class Step:
    """
    Represents a step in a StepsGraph.

    This class is used to define and manage the properties of a step,
    including its inputs and outputs. It provides methods for updating
    the input and output links and for building the step's command.

    Attributes:
        inputs (dict): A dictionary of input values for the step.
        outputs (dict): A dictionary of output values for the step.

    Methods:
        __init__(self, **kwargs): Initializes a Step object with optional
            keyword arguments to set initial properties.
        __str__(self): Returns a string representation of the step.
        update_link(self, inputs=None, outputs=None): Updates the input and
            output links with the provided dictionaries.
        build(self): Builds and returns the command for executing the step.

    Example usage:
    >>> my_step = Step(name="Sample Step", inputs={"input_1": "value1"})
    >>> my_step.update_link(outputs={"output_1": "result"})
    >>> command = my_step.build()
    >>> # Then you need to call the command to build the inputs/outputs. Use `create_pipeline` for this.
    """

    def __init__(self, **kwargs):
        self.inputs = None
        self.outputs = None
        self.__dict__.update(kwargs)
        self.uuid = self.display_name + "_" + generate_custom_uuid()

    def __str__(self):
        return self.uuid

    def update_link(self, inputs=None, outputs=None):
        if self.inputs and inputs:
            self.inputs.update(inputs)
        elif inputs:
            self.inputs = inputs
        if self.outputs and outputs:
            self.outputs.update(outputs)
        elif outputs:
            self.outputs = outputs

    def build(self):
        return command(**self.__dict__)

Additional context
We should have feature parity from 1.x to 2.x

Hi any updates?

It would be great if this were to be implemented!

Hi @edgBR ,
In v2, we rely data dependence to define the running order of steps, please add dummy data dependency between steps to define the running order.


Feature Request: add qrcode to Power Feeds and Power Panels

I am attaching two diffs that modifies the code to include the QR code:
init.txt
template_content.txt

I would also like to see this feature implemented, but i am not sure if this project is still maintained, as it seems that it is not

done


custom back button image

What is the issue here?

can not find func to custom back button

This framework doesn't have a custom back button. You can build one yourself and call router.dismissScreen() to go backwards.


Popovers have wrong z-order

Popovers are appearing over the nav bar:

It doesn't look so bad from the screenshot, but when you scroll the page up, the popover becomes disconnected from its target: the popover appears above the navbar and the target underneath it.

TODO Migrate to UI. This may not be an issue anymore.

Migrated to seiso-ui repo.


Weird flash loop (No bootable app partitions in the partition table)

So I am trying to flash an ESP32-WROOM-32 and I encounter two errors.
I am currently following along the Embedded Rust on ESP32 Book and I am on chapter 2.4.
I got some CC-Linking errors, when building the repo on NixOS (does anyone maybe know why as a side note?). Because of this I ditched NixOS for flashing and I am currently using the Docker container linked in the Book.
 I have to add the --no-stub flag, in order to make it work 100% of the time.  (Idk why, but without the flag it only flashes some times.)
Here the error message of the timeout:

esp@c36d78ffe227:/workspace/intro/hardware-check$ cargo run -- --list-all-ports
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.10s
     Running `espflash flash --monitor target/riscv32imc-esp-espidf/debug/hardware-check --list-all-ports`
[2024-12-13T15:47:30Z INFO ] 🚀 A new version of espflash is available: v3.2.0
✔ Use serial port '/dev/ttyUSB0'? · yes
[2024-12-13T15:47:31Z INFO ] Serial port: '/dev/ttyUSB0'
[2024-12-13T15:47:31Z INFO ] Connecting...
[2024-12-13T15:47:31Z INFO ] Using flash stub
Error: espflash::timeout

  × Error while connecting to device
  ╰─▶ Timeout while running command

This is the main error. I am in a weird flash loop after entering the flash command. The full error (before repeating itself) looks like this:

esp@c36d78ffe227:/workspace/intro/hardware-check$ cargo run -- --list-all-ports --no-stub
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.10s
     Running `espflash flash --monitor target/riscv32imc-esp-espidf/debug/hardware-check --list-all-ports --no-stub`
[2024-12-13T15:38:01Z INFO ] 🚀 A new version of espflash is available: v3.2.0
✔ Use serial port '/dev/ttyUSB0'? · yes
[2024-12-13T15:38:02Z INFO ] Serial port: '/dev/ttyUSB0'
[2024-12-13T15:38:02Z INFO ] Connecting...
Chip type:         esp32 (revision v1.0)
Crystal frequency: 40 MHz
Flash size:        4MB
Features:          WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC address:       24:6f:28:7b:88:3c
App/part. size:    1,149,840/4,128,768 bytes, 27.85%
[2024-12-13T15:38:03Z INFO ] Segment at address '0x1000' has not changed, skipping write
[2024-12-13T15:38:03Z INFO ] Segment at address '0x8000' has not changed, skipping write
[2024-12-13T15:38:04Z INFO ] Segment at address '0x10000' has not changed, skipping write
[2024-12-13T15:38:05Z INFO ] Flashing has completed!
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7104
load:0x40078000,len:15576
load:0x40080400,len:4
ho 8 tail 4 room 4
load:0x40080404,len:3876
entry 0x4008064c
I (30) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (31) boot: compile time Jun  7 2023 07:48:23
I (33) boot: Multicore bootloader
I (37) boot: chip revision: v1.0
I (41) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (50) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (60) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (71) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (78) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (86) boot:  2 factory          factory app      00 00 00010000 003f0000
I (93) boot: End of partition table
I (97) esp_image: segment 0: paddr=00010020 vaddr=3c0d0020 size=0ffd8h ( 65496) load
E (106) esp_image: Segment 0 0x3c0d0020-0x3c0dfff8 invalid: bad load address range
0x3c0dfff8 - anon.ab806ba04efe4573400ddf1c6591897b.0.llvm.4787499095392638493
    at ??:??
E (114) boot: Factory app partition is not bootable
E (119) boot: No bootable app partitions in the partition table

Does anyone know hot to resolve this issue?
Thanks in advance!
### Tasks

A new version of espflash is available: v3.2.0

Can you try updating your espflash and see if the issue persist?

@SergioGasquez I am using the docker image. I am unsure how I should update it inside of there?

@SergioGasquez I am using the docker image. I am unsure how I should update it inside of there?

I assume that you ran the docker image a while ago. You could cargo install espflash, that should update it. Or delete the image and let https://github.com/esp-rs/std-training/blob/main/.devcontainer/Dockerfile#L37-L43 grab the latest version

@SergioGasquez I installed the container new using the link you provide, therefore I have the newest esp version, but I still get the same loop. On a good-ish side the auto port detection was fixed...


Reporting test parse errors as test failures

Beware: this is my first attempt to contribute Rust code. Notably, the approach is different from what is suggested in #2078.
The key changes (and places to start looking):

Created IdempotentCheckError enum. One value is for the current mismatch errors. The other is for parse errors.
Return IdempotentCheckError from idempotent_check.
Handling the possible errors in the place where failure is recorded.

Demo
Add the following as tests/target/oops.rs:
let x = 5;

In master, cargo test results in:
.
.
.
test checkstyle_test ... ok
error: expected item, found `let`
 --> tests/target/oops.rs:1:1
  |
1 | let x = 5;
  | ^^^

test system_tests ... ok
test idempotence_tests ... ok
test self_tests ... ok

test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

In the branch with these changes, cargo test results in:
.
.
.
test checkstyle_test ... ok
error: expected item, found `let`
 --> tests/target/oops.rs:1:1
  |
1 | let x = 5;
  | ^^^

test system_tests ... ok
test idempotence_tests ... FAILED
test self_tests ... ok

failures:

---- idempotence_tests stdout ----
        Ran 277 idempotent tests.
thread 'idempotence_tests' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`: 1 idempotent tests failed', tests/system.rs:112:4

failures:
    idempotence_tests

test result: FAILED. 9 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

What happens if the input to a test doesn't parse? Do we fail in that case.

Yes. I just updated the original comment to show the test result line for the demo that uses these changes. The details are up there, but here's the key part:
failures:
    idempotence_tests

test result: FAILED. 9 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

Thanks!


Using vgg model

I see you have used resnet and inception model in your code. I just wanted to know how can I use vgg 16 model for adversarial attack as I can see you have model definition in your nets model for vgg. What code I have to update to make it work. Thank you.

VGG network is different from ResNet and Inception, since it requires input size to be 2242243. And the input pre-processing is also different. If you want to make it work for VGG, you need to change the load_images function
def load_images(input_dir, batch_shape):
images = np.zeros(batch_shape)
filenames = []
idx = 0
batch_size = batch_shape[0]
for filepath in tf.gfile.Glob(os.path.join(input_dir, '*.png')):
with tf.gfile.Open(filepath) as f:
image = imread(f, mode='RGB')
image = imresize(image, [FLAGS.image_height, FLAGS.image_width]).astype(np.float)
image[:,:,0] -= _R_MEAN
image[:,:,1] -= _G_MEAN
image[:,:,2] -= _B_MEAN
images[idx, :, :, :] = image
filenames.append(os.path.basename(filepath))
idx += 1
if idx == batch_size:
yield filenames, images
filenames = []
images = np.zeros(batch_shape)
idx = 0
if idx > 0:
yield filenames, images
Note that FLAGS.image_height and FLAGS.image_width are 224 instead of 299. Also set
_R_MEAN = 123.68
_G_MEAN = 116.78
_B_MEAN = 103.94


Geo Dependency Updates

There are some small changes to (de)serialization needed to be able to update the geo library dependencies. I can make a PR if interested?

Thanks @MrArnoldPalmer that would be much appreciated! Please reach out if you run into any troubles. We're currently working on pre-releases so breaking changes are ok to make.

Sorry I put this project away for a minute. I had it compiling but need to fix some tests. Hoping to get into it soon. Will reach out with any questions.

No problems, thanks for working on this @MrArnoldPalmer!

Hi @MrArnoldPalmer :wave:
I've updated our geo dependencies in a round of refactoring that will be available in the next preview release. Thanks for pointing this out!

Awesome! Looking forward to the next preview!


The Dark Mode is not Working After Refreshing

Description
Hey @aditya-bhaumik
On the website the dark mode is not working after refreshing
https://github.com/user-attachments/assets/31b3b0a1-48bf-4cc4-9fac-33d4c066cd5a
Please assign this issue to me under Hacktobarfest
Steps to Reproduce
N/A
Expected Behavior
No response
Actual Behavior
No response
Screenshots
No response
Additional Information
No response
What browser are you seeing the problem on?

[ ] Firefox
[ ] Chrome
[ ] Safari
[ ] Microsoft Edge

Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I want to work on this issue. (optional)

Its been weeks and no pull request was made so we are closing this issue.


The performance is worse than box2d.js

I found the performance of matter.js is worse than box2d.js  (only 40%)
There is a test I created:
http://fatidol.com/phy-benchmark/
There are many different box2d.js projects , I chose https://github.com/flyover/box2d.js ,
Because it includes Google's LiquidFun , I like this feature.

Hey @finscn, could you try out one of my commits? I heavily optimized the engine
https://github.com/liabru/matter-js/pull/566/commits/edc7c03dab0d540171feefde2be10efd2545544f
Performance may be roughly 10x better.

@bchevalier , hi , could you give me a matter.min.js file directly ?  I don't know how to build

Here you go: minified and unminified

I noticed that setting both iterations to ~12 was providing good result. Would you mind updating your online benchmark with the changes? I am curious to see what it gives.

I tried.  Even I set iterations to 30 ,

But there are still many rect-boxes are overlap .
BTW ,
Your version is very fast.
I set the count of rect-box to 800 ,  it's still keeping  60 fps on my macbook,
the box2d.ts  is down to 40 fps.

Hey @liabru, do you have any idea what may be the reason for that difference in behavior between matter and box2d? I am willing to have a look and try to fix the issue.

Indeed @bchevalier has done some excellent performance work that I've yet to fully integrate (I'll be working on it in May!).
There are likely a few reasons for this, one being the runner does not use a fixed delta by default and the low FPS causing a death spiral.
Try runner.isFixed = true and runner.delta = 5 which should help a bit.
The runner has a lot of room for improvement here which is something I need to revisit.
Other improvements for this would be adaptive iterations (minimum error threshold) which I have a mostly-working implementation (it can cause some wild behaviour).
Also is improving the resolvers initial 'guess' when a pair first collides. In other words, predictive collision warming (warming is already implemented, but it is not primed with any initial guess). The guess would be based on velocity and mass.
@bchevalier the latter is something I can fill you in on some more if you'd like to tackle it!

@liabru , thanks for your suggestion.
I've tried runner.isFixed = true and runner.delta = 5 , it's better , but still worse than box2d.
I'll be waiting for the improvement. Thank you

@liabru yes please fill me in on that if you don't mind. I cannot promise anything in terms of timeline though.

Hi  @bchevalier & @liabru  , is there any news about new version ?

Looking forward to performance improvements
Is there any plan or time for this regard?

I found that you added separating axis support for Body after comparing between your version and master's.
@bchevalier @liabru

Hi @@flyover , I think @jcyuan 's question is a good question.
@bchevalier 's forked matter-js is faster than box2d.ts . (original matter-js is not)
I wish box2d.ts could as fast as @bchevalier 's forked matter-js .

@liabru any updates on this?

@liabru any idea when to merge it ?

@bchevalier and @liabru any idea when these performance updates will be merged? Anything we can do to help?

I'm using @flyover 's box2d.ts.
here is a benchmark made by @finscn

@bchevalier I tested your commit, it seems much faster. Thanks for your efforts.
In my game, I cancel some of the collisions with pair.isActive = false;
It seems you removed this, is there any other way to do this?

@bchevalier Thank you very much ! Rendering is 10 to 15 times faster with your optimizations ! Very nice work !

I found that doing Matter.Engine.clear(engine)  every frame helps a lot with only a slight accuracy drop
here is an example
press space to not do Matter.Engine.clear(engine)
https://www.openprocessing.org/sketch/932385


Support completion for new git switch and git restore commands

Git 2.23 brings some new features which include two new commands: git switch and git restore, which are meant to eventually provide a better interface for git checkout.
https://github.blog/2019-08-16-highlights-from-git-2-23/#experimental-alternatives-for-git-checkout

Saw that yesterday.  These are still experimental and the blog post does mention that these could change (names, parameters, etc) before shipping in final form.  I'd be inclined to wait for the commands to be finalized before adding support for them in posh-git. But maybe @dahlbyk has a different take?

This feature was automatically enabled for me the last time I updated git. I don't have any experimental flags enabled or anything like that, so I think its mainstream at this point.
I've updated my local copy of the module to support this command, will you take a PR for the update?

@pinkfloydx33 Just show your fantastic work to the world☺

will you take a PR for the update?

Yes!

Saw that yesterday. These are still experimental and the blog post does mention that these could change (names, parameters, etc) before shipping in final form. I'd be inclined to wait for the commands to be finalized before adding support for them in posh-git. But maybe @dahlbyk has a different take?

I don't know why github blog said experimental about this feature. Because no mentions about this in official changelog. It's look stable
https://github.com/git/git/blob/master/Documentation/RelNotes/2.23.0.txt#L61

@pinkfloydx33 Can you take a look at my PR (#702) and see how it compares to the changes you made to add support for these two commands.

How soon should it be available in PowerShell Gallery? Two extremely often-used commands are not live in half a year after merge, is it Really OK?

The beta, which supports these two sub-commands, is in the PowerShell Gallery.
https://www.powershellgallery.com/packages/posh-git/1.0.0-beta4

@rkeithhill  thank you, I did not notice it


Help.txt path update and new tests

https://github.com/ryansurf/cli-surf/issues/61
help.txt needed its path updated in server.py
I also added new tests in tests/test_server.py, which make sure the Flask server is running and responds as intended (200 OK).
I turned the flask server into a function, create_app(), so we can spin up the server and perform tests on it with a function call.
Let me know what you think! @K-dash

Hey @K-dash , thanks for the review. I like all of your suggestions, passing the environment variables as an argument makes more sense for testing purposes, let's implement these changes.
I believe you can approve the changes you suggested? As the author of this PR I cannot.

@ryansurf
I'm sorry, it seems there were issues with my proposal, as the Lint and Test are failing. 🙇
Could you please help me with the corrections?

@ryansurf I'm sorry, it seems there were issues with my proposal, as the Lint and Test are failing. 🙇 Could you please help me with the corrections?

No problem :smiley:


Named Arguments

Does plac support named arguments, like below?
python myfile.py positional1 positional2 --some-named=True

http://micheles.github.io/plac/#scripts-with-options-and-smart-options
On Tue, Oct 22, 2019, 12:32 PM Dan Grahn<EMAIL_ADDRESS>wrote:

Does plac support named arguments, like below?
python myfile.py positional1 positional2 --some-named=True
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/micheles/plac/issues/43?email_source=notifications&email_token=AAM4YSJ6SEQEYSSVTSHMTUDQP42KPA5CNFSM4JDS66QKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HTSHFVQ,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAM4YSLUBECO2TZ443OS23LQP42KPANCNFSM4JDS66QA
.


How to handle empty url fields?

How do you handle a source that may or may not have a value for a field?
I have content sourced from a Google Spreadsheet, this spreadsheet has a column called img with a URL to a publicly accessible image. This column might be null or have a string.
To debug the setup I configured the plugin without a defined rawURLKey and produced this error:
Error when resolving URL value for node type googleReviewsSheet. This probably means that the rawURLKey function
in gatsby-config.js is incorrectly set. Please read this project's README for detailed instructions on how to
set this correctly.

Potential images were found at these paths:
 - img
   Set following configuration options:
     rawURLKey: 'img'
     URLPrefix: 'https:'

When configuring the plugin with the suggestions and settings I think are correct, like this:
{
  resolve: `@imgix/gatsby`,
  options: {
    domain: "example.imgix.net",
    secureURLToken: "abc123",
    sourceType: ImgixSourceType.WebProxy,
    defaultImgixParams: { auto: "format,compress" },
    fields: [
      {
        nodeType: "googleReviewsSheet",
        fieldName: "imgixImage",
        rawURLKey: "img",
        URLPrefix: "https:",
      },
    ],
  },
},

The following error is thrown and the build or develop task crashes.
Error when resolving URL value for node type googleReviewsSheet. This probably means that the rawURLKey function
in gatsby-config.js is incorrectly set. Please read this project's README for detailed instructions on how to
set this correctly.

Everything seems to work fine if the source has a string populated for every record.
Fragment partial that for getting image data:
{
  ...
  id
  verifiedPurchase
  rating
  imgixImage {
    gatsbyImageData(
      imgixParams: {
        fit: "crop"
        crop: "faces,entropy"
        fill: "blur"
        w: 280
        h: 200
      }
      width: 282
      height: 200
      placeholder: DOMINANT_COLOR
    )
  }
}

Pre version 2 it seemed possible to work around the error by using something likegetURL:  (node) => node.img || 'https://example.com/file.jpg'

Hey @moneal and thanks for opening this issue. I've noted this question in our team's backlog so that we can set some time aside to look into it soon. I'll be sure to follow up with any updates or questions here.

I'm going to go ahead and close this issue, but should anything else come up please do comment and I'll be sure to open it again.

I'm going to go ahead and close this issue, but should anything else come up please do comment and I'll be sure to open it again.

Thank you for your time. I indeed was wanting to opt-out when the node had no image. This was for an older project and no longer an issue for me but might be for someone else in the future.

Thanks for getting back to me @moneal!
I'm going to leave this ticket open to gauge interest in this feature. If anyone else would like to see this added, please comment or react to this post. That will help us measure community interest and prioritize this accordingly.


[DO NOT MERGE] ci_test

What this PR does / why we need it:
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note:

none

@yutongz: Adding do-not-merge/release-note-label-needed because the release note process has not been followed.

One of the following labels is required "release-note", "release-note-action-required", or "release-note-none".
Please see: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#write-release-notes-if-needed.
Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@yutongz: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e.sh
9f1c5358d5360985957a579a07dc6dd592591954
link
/test istio-pilot-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-pilot-e2e


Support DSN configuration style for Elastica client

In Elastically's client's constructor, initialisation of the factory is triggered in the following line:
https://github.com/jolicode/elastically/blob/06218e528b301e95b5167dc9b73cc5fc3ae9c5d2/src/Client.php#L37-L38
This causes Elastically to require an array-style configuration for Elastica, even  Elastica supports DSN-style configuration. This causes an issue when trying to use a DSN:
In Factory.php line 53:

  JoliCode\Elastically\Factory::__construct(): Argument #1 ($config) must be of type array, string given, called in .../vendor/jolicode/elastically/src/Client.php on line 38

It would probably look nicer in general to have the Elastica client instance split away from the Elastically one

I like it. Would you mind to submit a PR?

I can sketch something out in the next few days and see if it looks good

For reference, currently one can work around the limitation with something like:
JoliCode\Elastically\Client:
  arguments:
    $config:
      connections:
        - config: '%env(ELASTICSEARCH_DSN)%'

Will still try and find out if I can propose something; though I wonder how possible it is to do in a BC way

That's supposed to exists in Elastica: https://github.com/ruflin/Elastica/issues/1640
Not sure if it's still supported but anyway, this does not belong to Elastically, as it concern the Client making the requests directly.


feat(compat) add a 5.4 compatible "warn" function

also updates the deprecation warnings to use the warn function.
some defaults to be validated (see TODO comments)

TODO's have been updated, also changed the warning implementation from a function to override to a setter function to prevent easy mistakes like this one: https://github.com/lunarmodules/Penlight/pull/366/files#diff-cb2fc51f72a2e01d6c8930f623280a9558a042fa3133a601cffa342fe9b75d48R183
The override on Penlight level remains for now.

TODO's have been updated, also changed the warning implementation from a function to override to a setter function to prevent easy mistakes like this one: https://github.com/lunarmodules/Penlight/pull/366/files#diff-cb2fc51f72a2e01d6c8930f623280a9558a042fa3133a601cffa342fe9b75d48R183
The override on Penlight level remains for now.


feat: enable support of custom routes and models from plugins (wip)

🚧 Work in progress / Request for comments (DO NOT MERGE)
Feel free to provide feedback
⚠ This PR introduces breaking changes if you use withKoaContext or withStrapiMiddleware options
no breaking changes are present in middleware options
may we drop support of strapi < 3.4.0 ?
New features
Associate custom routes to a model cache configuration
// config/middleware.js

module.exports = ({ env }) => ({
  // ...
  settings: {
    // ...
    cache: {
      enabled: true,
      models: [
        "review", // same as { model: "review" },
        {
          model: "restaurant",
          routes: [
            "/restaurants/:id/orders", // same as { path: "/restaurants/:id/orders", method: "GET" },
            { path: "/restaurants/orders", method: "POST" },
            { path: "/restaurants/:id/orders", method: "PUT" },
            { path: "/restaurants/:id/orders", method: "PATCH" },
            { path: "/restaurants/:id/orders", method: "DELETE" },
          ],
        },
      },
    },
  },
})

GET requests are cached
POST, PUT, PATCH and DELETE requests are used to purge related cache

by default routes are populated with the public api routes, you can disable this behaviour by adding injectDefaultRoutes: false to the model cache configuration
Associate a model with a plugin
// config/middleware.js

module.exports = ({ env }) => ({
  // ...
  settings: {
    // ...
    cache: {
      enabled: true,
      models: [
        {
          model: "my-plugin-model",
          plugin: "plugin-test",
          routes: [
            { path: "/plugin-test/controller/:id", method: "GET" },
            { path: "/plugin-test/controller/:slug", method: "GET" },
            { path: "/plugin-test/controller", method: "POST" },
            { path: "/plugin-test/controller/:id", method: "PUT" },
            { path: "/plugin-test/controller/:id", method: "DELETE" },
            { path: "/plugin-test/controller/:slug", method: "DELETE" },
          ],
        },
      },
    },
  },
})

Internal refactor

Improved configuration resolving
Remove lodash usage as es6 is better in memory footprint and execution time
Inspired by Varnish

Still need to have a configurable hitpass method, so we can stop caching requests that have a cookie for instance

Enable Typescript type checking (with  JSDoc) for better maintainability and developer experience:

// config/middleware.js

/**
 * @type {import('strapi-middleware-cache').UserMiddlewareCacheConfig}
 */
const cache = {
  enabled: true,
  models: [
    'footer',
    'universal',
  ]
}

module.exports = ({env}) => ({
  settings: {
    cache,
  }
})

Options
Middleware default options
const defaultOptions = {
  type: "mem",
  logs: true,
  enabled: false,
  populateContext: false,
  populateStrapiMiddleware: false,
  enableEtagSupport: false,
  enableXCacheHeaders: false,
  clearRelatedCache: false,
  withKoaContext: false,
  withStrapiMiddleware: false,
  headers: [],
  max: 500,
  maxAge: 3600000,
  cacheTimeout: 500,
  models: [],
};

Model default options
const modelOptions = {
  model: '<required>',
  plugin: undefined,
  singleType: false,
  injectDefaultRoutes: true,
  headers: userOptions.headers ?? defaultOptions.headers,
  maxAge: userOptions.maxAge ?? defaultOptions.maxAge,
  routes: [],
};

Todo

[x] clearCache RegExp refactor
[x] getRelatedModels refactor
[x] improve misconfiguration warning / errors
[ ] check cache-control response header ?
[ ] find a way for hitpass requests ? (see Varnish diagram)
[ ] tests

Hey @stafyniaksacha, I'm loving this ❤ !
Some thoughts:

Could you describe the breaking changes. I'm not too bothered personally by it but withKoaContext and withStrapiMiddleware were user requested features so I know for a fact some people are using them.

Might be worth supporting wildcards or arrays for methods to avoid repetition e.g { path: "/restaurants/:id/orders", method: ["PUT", "POST"] },

Given how extensive your changes are, I created a beta branch which auto-publishes to NPM under the beta tag. That allows you to make multiple PRs to that branch and test them using npm install --save<EMAIL_ADDRESS>(you can bump the build number as you go along). You can rebase your current branch on the beta branch and merge it there

I'll be much more comfortable releasing this if it is tested, although the current test setup is a bit awkward, so you have my blessing if you want to set it up any other way

FYI: I'm on the strapi slack if you need anything

Any update on this?
Do you still maintain this project because there is a long time since the last commit...


Chromadb Cleanup

It would be nice to have a cleanup command that fully cleaned up the sqlite database.
Some background:
I was testing some latency things with a database with ~1 million records and noticed it was slow when I queried using metadata ~8 seconds/query.  I wanted to see how database size impacted things, so I removed a bunch of records until I had ~25k records left.
Inspecting the disk size of the database revealed that the size hadn't changed after removing the records.
Then I ran:
chops clean-wal /path/to/persist_dir

This reduced my sqlite3 database from 7.7 GB to 2.7 GB and sped up my query from ~8 seconds to ~2.5 seconds.
Then I thought, what if I had a fresh database, so I ran:
results = old_collection.get(limit=30_000, offset=0, include=["metadatas", "embeddings"])
new_collection.add(embeddings=results["embeddings"], metadatas=results["metadatas"], ids=results["ids"])

This reduced my sqlite3 database down to 187 MB and also reduced my vector index to several MB from a few GB.  It also sped up my query to <0.2 seconds.
Would be nice when running this in production to be able to do that same type of cleanup without totally starting over.  I'm thinking of applications with a rolling window of data.
Maybe this isn't realistic with the way the vector indexing works, please advise - would love to understand more.

hey @shortcipher3, thanks for this. Indeed you bring a valid point about the HNSW, it needs to be rebuilt to optimize it. I have that in my backlog things to add to Chroma and for now in chops.
Regarding the sqlite3 situation I'll investigate. the clean-wal command is intended only for the WAL which in chroma is unbound.


~ Segmentation fault fix

In case of nVertices && maxWeights is quite big numbers
1473 -- float nodeGeometryWeights[nVertices * maxWeights];
makes that line
1480 -- NSMutableDictionary *meshWeights = [[NSMutableDictionary alloc] init];
to trigger EXC_BAD_ACCESS(code=1)

Codecov Report

Merging #110 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
+ Coverage   74.74%   74.76%   +0.01%
==========================================
  Files          17       17
  Lines        1564     1565       +1
==========================================
+ Hits         1169     1170       +1
  Misses        395      395

Impacted Files
Coverage Δ

AssimpKit/Code/Model/AssimpImporter.m
89.09% <100%> (+0.01%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03ebf41...22131cc. Read the comment docs.

@vpopovyc Thanks for this fix. Sorry for the delay in merging, like everybody else busy at work :-)


Doesn't seem to work in Node 6.x?

The Getting Started example doesn't work for me in Node 6.9.4 on Windows 7x64-- it times out. I have a ruby client which is connecting to Riemann just fine, so the problem seems to be the node cient.
Is this client no longer being maintained?
Getting Started Example
var client = require('riemann').createClient({
host: 'some.riemann.server',
port: 5555
});
client.on('connect', function() {
console.log('connected!');
});

Hi I've been maintaining it, but if the protocol changed that's news to
me. Feel free to patch it if you want, I've never tested it on Windows.
On Fri, Mar 31, 2017, 8:29 AM Jonathan Wilson<EMAIL_ADDRESS>wrote:

The Getting Started example doesn't work for me in Node 6.9.4 on Windows
7x64-- it times out. I have a ruby client which is connecting to Riemann
just fine, so the problem seems to be the node cient.
Is this client no longer being maintained?
Getting Started Example
var client = require('riemann').createClient({
host: 'some.riemann.server',
port: 5555
});
client.on('connect', function() {
console.log('connected!');
});
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/perezd/riemann-nodejs-client/issues/23, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AABQdhPe4cc4hvuJajJvvFhQ_B4ed-mkks5rrRvOgaJpZM4Mv0Qi
.

1.1.0 I believe resolves this.


Specification for an offline Graph Traverser and Semantic Motif Initialiser

The Semantic Motif Initialiser
Summary

Introduction
Requirements

The KnetMiner code
The initialiser options

Introduction
The KnetMiner Gene Explorer is based on knowledge graphs, that is, datasets that are created and
managed by means of our KnetBuilder framework, also named Ondex. This framework has two major component types:

a set core components that allow for dealing with knowledge graphs (details below). Namely,
ONDEXGraph allows for keeping in RAM a graph of ONDEXConcept(s) (ie, nodes), linked together by
binary Relation(s) (ie, edges).  Concepts and relations have a set of properties, such as their data
source or a list of key/value attributes.
a plug-in system, which can be used to define and run data workflows to read various data sources (eg,
CSV tables, XML files, web APIs in JSON format) and translate these data into the above graph
components. The typical workflow starts with initialising an empty graph, then multiple data parser/loader
plug-ins populate the graph, finally the graph is saved from memory to an OXL file (ie, an XML
format based on our own schema, which reflects the graph components above). OXL files are then loaded
into the KnetMiner web app (using an OXL's parser), to serve the application functionality.

In addition to loading a (configured) OXL, the web app does much additional initialisation work, which, mostly consist of:

A Lucene-based index is created on-disk to ease keyword-based searches over the OXL graph elements
(eg, searching nodes by name or identifier)
A graph traversal step, which employs semantic motifs, ie, graph
patterns, to navigate graph paths from genes until relevant entities. Details can be found here.

As said above, currently, both the Lucene indexing and the traverser are invoked against a given dataset when the KnetMiner web application is started, ie, when its Docker container is started, which triggers the start of its Tomcat server, which starts the API/WS .war application (see the KnetMiner wiki for
details).
After the traversal stage, The traverser output is saved on disk and the web application avoids to redo the
whole operation again at each restart, if these output files are found on a configured location. This is
possible because the result of the traversal operation is always the same for a given dataset/graph, and the
web application uses these data in read-only mode. Similarly, the Lucene indexing is skipped if the
corresponding Lucene directory is found under a configured path.
Despite the latter optimisations, the web application spends a lot of time into this initialisation stage, which
could be moved offline, so that we could be able to create traversal data once for all, during the creation of
the dataset by means of the KnetBuilder workflow system (aka, Ondex Mini).
So, the purpose of this document is moving the traversal-invoking code that currently is inside the
KnetMiner web service to KnetBuilder, by developing proper wrappers to invoke it from the KnetBuilder
framework (details below).
Some details about the traversing
This is to get a better understanding of the context for this hereby task, not strictly needed here.
Technically, we have a generic GraphTraverser interface and a (still) default implementation,
which is based on the state machine model. Recently, we have started migrating to a
Cypher-based implementation, which relies on both on in-memory data encoded via Ondex
components and on the same data stored in a Neo4j database. Which traverser flavour to use is
decided via KnetMiner configuration.
Requirements
We need a component based on the architecture of many Ondex plug-ins, that is:

A core component, containing the functionality to invoke the traverser. This should contain the bare
minimum to execute this functionality, possibly, other components should stay elsewhere.
An Ondex plug-in wrapper, which defines the available options for the traverser (arguments,
in the jargon of the Ondex plug-ins), and invokes the core component above. This will be used in
Ondex Mini workflow, presumably with a graph that was build by previous steps (ie, other plug-ins) in
a workflow.
A command-line (CLI) interface, which is another wrapper to the core. This should load an OXL file
from CLI parameters and then pass it to the core traverser component above.

For the moment do not create a direct dependency on the Cypher traverser artifact, the component should allow for the choice of this specific traverser (or the default) by means of a string
representing its FQN. We'll look at how to organise this dependency later (eg, optional download in the
workflow binary).
A good (and recent) reference for the architecture outlined above is the graph descriptor component. In particular, note the details:

the core component (tests and usage examples). The shape of the new traversal
component needs to be agreed, eg, SemanticMotifInitializer plus a method like init()
(note I use American spelling when naming code units).
the plug-in. The new plug-in should subclass ONDEXExport, since this is the one closest
to the meaning of the component at issue. Its implementation won't be much different than anyway the
descriptor example anyway.
the CLI interface

Note that recently we started using the picocli library, which is one of
the best around.

Also, note that the CLI component is a separated Maven project, since this has to include
much stuff that isn't needed in the core package.
Moreover, see the CLI POM and the Maven Assembly descriptor file for a
reference on how to organise the build of the final command line tool binary
(this is a a CLI package containing multiple tools/commands, not just the graph descriptor tool).
The two components spawns a .zip that, among other files, contains the /lib directory
with all the needed runtime .jars, and one or more .sh wrappers to invoke the
corresponding CLI class (copy-paste from oxl-descriptor.sh for the new .sh).
See here for info on how these Ondex clients are arranged.

The KnetMiner code
What the new component has to do can be seen (and widely copy-pasted) from the current KnetMiner
code. Namely:

Current entry point it OndexServiceProvider.initData( <path> )
This loads all application an traverser options from the (XML) property file it gets passed. This path will
be a parameter for the new component (see below).
After the options loading, DataService.initGraph() is invoked. This loads the OXL dataset in
memory, in an ONDEXGraph field. In the new component, this graph will be a class field (see below).

See the loadGraph() code to get an idea of how Parser.loadOXL() is used for this.
UIUtils.removeOldGraphAttributes ( graph ) is a KnetMiner-specific operation, not relevant here.

The init of genomeGenesCount is instead needed (see below), so the new component will
need to do this, reusing the current code.

The, SearchService.indexOndexGraph() is invoked. This creates a Lucene index of many
parts of the OXL graph, which is then used by KnetMiner to perform fast keyword-based searches.
The new component needs to do the same. As you can see, this method gets info from the graph field
and the data path defined in the options file.
After the indexing, we have semanticMotifDataService.initSemanticMotifData ().
This initialises the traverser, using options above, and then invokes it. After that, results are saved into
files, in the form of serialised Java objects. We need to replicate/move all the code you see in this
method.

We also need to support the doReset flag. Best choice I see for this is to replicate the same public
initSemanticMotifData( doReset ) method in the main class SemanticMotifInitializer
for the new component. This because KnetMiner has a CypherDebugger component,
used for testing and debugging purposes, which needs to trigger the data reinitialisation
from this step only.

Finally, we have exportService.exportGraphStats(), which saves an XML file of statistics,
obtained from both the OXL and the traversal results (which are used for visualisations
like this). This has to be replicated to the new component too.

The initialiser options
The new component needs the same options/parameters that KnetMiner uses in the code described in the previous section. So, our new SemanticMotifInitializer will have this:

The ONDEXGraph to work with. Simplest solution is to make the component stateful and
mantain a graph field for this, together with other stuff (eg, genomeGenesCount
mentioned above).
The path to an options file. This contains several details needed to run the traverser (and KnetMiner),
some are generic, some are traverser-specific. See an example in this template. In the core
component, this will be a parameter of the init() method. In the plug-in, this will be a an argument of
type FileArgument.

In the core component, define the init() implementation as a private bare method, accepting the
parameter options of type OptionsMap. Then define the public wrapper using the option's file path.

The input OXL to work with. In the core component, this is a parameter of type OndexGraph.
The plug-in has already the graph field for this, so no other addition is needed. In the case
of the CLI, this should be the -i/--oxl option. This should be an optional parameter, which, when
defined, should override the DataFile option, found in the options file.
The path of the output directory. This is where the traverser results have to be stored.
Similarly to the input path, this should override the DataPath option in the options file.
In the plug-in, should be a FileArgument (with isDirectory == true) and in the CLI it should
correspond to the-o/--data-dir option.

Skeleton for the core component (first stage)
I've added this new module, which contains a skeleton of what we have to do and how we can arrange it.

Remove the Lucene indexing from Knetminer
OndexServiceProvider.java
Inside the public void initData ( String configXmlPath )
Comment this 2 lines. This is moved to KnetMinerInitializer.java in knetminer-initializer module under Knetbuilder project
//this.searchService.indexOndexGraph ();
//this.semanticMotifDataService.initSemanticMotifData ();
@marco-brandizi  Please review it, if anything more needs to handle here.

@jojicunnunni, on exportGraphStats() I've reviewed this, we need to move it into the initialiser, see above.

@jojicunnunni See the code, I've added various comments (with prefix TODO:newConfig) regarding how things should be aligned to the new configuration system. I think I touched all major points, but I might have missed some (eg, I didn't go through the command line package, but the changes needed there are quite clearly implied by the plugin it invokes).
Mostly, it's about replacing the old way of getting the options, based on a Java Map, with the new way, based on the KnetminerConfig object. Be aware that the traverser used to take its pertinent options directly from the old Map options (as a subset of them), now it needs to receive KnetminerConfig.getGraphTraverserOptions(), which is still a Map. The Knetminer code base has already the new version of things like this.

I cleaned and completed this, and then moved it to Knetminer. We had circular dependency issues with keeping this in Ondex, so we also have had to dismiss the wrapper to invoke this component as an Ondex plug-in. It will only be available from the web app (via programmatic invocation) or as command line tool (which reloads the OXL to work with).

This is not closed, the web application needs to use this component and be cleaned of duplicated code.

@marco-brandizi  Could you please outline the changes , need to do for using this component in web application

I believe this is done? Please close if so @marco-brandizi


drivers: update register macros

REG_X_BASEADDR will be removed from all hal files.
This forces the use of the peripheral base address

We need a private macro to obtain the port in memc_mspi_aps6404l.c and flash_mspi_atxp032.c since these device drivers are meant to be shared. I had clearly missed it in previous PR.
@RichardSWheatley Would you like to fix it?

We need a private macro to obtain the port in memc_mspi_aps6404l.c and flash_mspi_atxp032.c since these device drivers are meant to be shared. I had clearly missed it in previous PR. @RichardSWheatley Would you like to fix it?

I can create a ticket and work on it internally, yes.

We need a private macro to obtain the port in memc_mspi_aps6404l.c and flash_mspi_atxp032.c since these device drivers are meant to be shared. I had clearly missed it in previous PR. @RichardSWheatley Would you like to fix it?

I can create a ticket and work on it internally, yes.

I was hoping you could do it all together in this PR since you are changing the files.
Something like this, private as in platform specific to ambiq but not in hal. Or move the entire section of CONFIG_SOC_FAMILY_AMBIQ to mspi_ambiq.h so that it looks cleaner.

The rest LGTM

please, make commit message better. Title is misleading.

@gmarull please review the changes you requested

7079f16 Commit title is still unclear/too generic

It wasn't changed to this by me. It was changed to this by the assignee.

7079f16 Commit title is still unclear/too generic

It wasn't changed to this by me. It was changed to this by the assignee.

Commit title is still unclear/too generic

Please, do not dismiss change requests which are clear and explicit.

They were not and that is why they were dismissed.
"Use of proper base address macro across all ambiq platforms" is the exact and only reason for the change.
If you do not think that is enough, then suggest something else. If not, I will dismiss again.

Please, do not dismiss change requests which are clear and explicit.

They were not and that is why they were dismissed.
"Use of proper base address macro across all ambiq platforms" is the exact and only reason for the change. If you do not think that is enough, then suggest something else. If not, I will dismiss again.

Isn't this sufficient?

7079f16 Commit title is still unclear/too generic

Please, do not dismiss change requests which are clear and explicit.

They were not and that is why they were dismissed.
"Use of proper base address macro across all ambiq platforms" is the exact and only reason for the change. If you do not think that is enough, then suggest something else. If not, I will dismiss again.

Isn't this sufficient?

7079f16 Commit title is still unclear/too generic

Yes, my title is sufficient.

Please, do not dismiss change requests which are clear and explicit.

They were not and that is why they were dismissed.
"Use of proper base address macro across all ambiq platforms" is the exact and only reason for the change. If you do not think that is enough, then suggest something else. If not, I will dismiss again.

Isn't this sufficient?

7079f16 Commit title is still unclear/too generic

Yes, my title is sufficient.

I guess you're confused about commit and PR titles, which are not the same thing. Finding drivers: update to use proper Base Address in git history is just useless, please, make it more clear.

drivers: update to use proper Base Address

And yet that is exactly what this PR addresses, so what is your suggestion?

The video showed me nothing more than the which also adds nothing more than the original comment.
What did help was this "are you then updating all drivers in-tree to use "proper" (?) base addresses?"
Had you mentioned that originally, I would have completely understood what you meant in the first place.