报错无法启动和登录pocketbase

报错如下，然后选择点击那个登录<IP_ADDRESS>的地址也没有反应，请问问题在哪，怎么解决？

一样

求教下哪位大神能帮忙看下给下解决方案或者思路🧐，谢谢

仔细读一下 readme

仔细读一下 readme

不好意思，我确实仔细看了，也按照要求改了相关配置，比如.env文件，能具体解释下问题出在哪里么，之前的0.3.1版本也是类似的报错，再之前是能用的，后来不知道哪里操作错了还是咋了，就变成这样了。

之前的0.31版本报错如下：
core-1  | 2024/12/22 11:44:31 Server started at http://<IP_ADDRESS>:8090
core-1  | ├─ REST API: http://<IP_ADDRESS>:8090/api/
core-1  | └─ Admin UI: http://<IP_ADDRESS>:8090/_/
core-1  | 2024-12-22 11:44:33.548 | DEBUG    | utils.pb_api:init:12 - initializing pocketbase client: http://<IP_ADDRESS>:8090
core-1  | Traceback (most recent call last):
core-1  |   File "/app/utils/pb_api.py", line 20, in init
core-1  |     admin_data = self.client.admins.auth_with_password(email, password)
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/services/admin_service.py", line 90, in auth_with_password
core-1  |     response_data = self.client.send(
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/client.py", line 116, in send
core-1  |     raise ClientResponseError(
core-1  | pocketbase.errors.ClientResponseError: Response error. Status code:404
core-1  |
core-1  | During handling of the above exception, another exception occurred:
core-1  |
core-1  | Traceback (most recent call last):
core-1  |   File "/app/tasks.py", line 2, in
core-1  |     from insights import pipeline, pb, logger
core-1  |   File "/app/insights/init.py", line 5, in
core-1  |     from .get_info import get_info, pb, project_dir, logger, info_rewrite
core-1  |   File "/app/insights/get_info.py", line 26, in
core-1  |     pb = PbTalker(logger)
core-1  |   File "/app/utils/pb_api.py", line 24, in init
core-1  |     user_data = self.client.collection("users").auth_with_password(email, password)
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/services/record_service.py", line 218, in auth_with_password
core-1  |     response_data = self.client.send(
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/client.py", line 116, in send
core-1  |     raise ClientResponseError(
core-1  | pocketbase.errors.ClientResponseError: Response error. Status code:400
core-1  | 2024-12-22 11:44:33.904 | DEBUG    | utils.pb_api:init:12 - initializing pocketbase client: http://<IP_ADDRESS>:8090
core-1  | Process SpawnProcess-1:
core-1  | Traceback (most recent call last):
core-1  |   File "/app/utils/pb_api.py", line 20, in init
core-1  |     admin_data = self.client.admins.auth_with_password(email, password)
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/services/admin_service.py", line 90, in auth_with_password
core-1  |     response_data = self.client.send(
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/client.py", line 116, in send
core-1  |     raise ClientResponseError(
core-1  | pocketbase.errors.ClientResponseError: Response error. Status code:404
core-1  |
core-1  | During handling of the above exception, another exception occurred:
core-1  |
core-1  | Traceback (most recent call last):
core-1  |   File "/usr/local/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
core-1  |     self.run()
core-1  |   File "/usr/local/lib/python3.10/multiprocessing/process.py", line 108, in run
core-1  |     self._target(*self._args, **self._kwargs)
core-1  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
core-1  |     target(sockets=sockets)
core-1  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 66, in run
core-1  |     return asyncio.run(self.serve(sockets=sockets))
core-1  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
core-1  |     return loop.run_until_complete(main)
core-1  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
core-1  |     return future.result()
core-1  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 70, in serve
core-1  |     await self._serve(sockets)
core-1  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 77, in _serve
core-1  |     config.load()
core-1  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 435, in load
core-1  |     self.loaded_app = import_from_string(self.app)
core-1  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
core-1  |     module = importlib.import_module(module_str)
core-1  |   File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
core-1  |     return _bootstrap._gcd_import(name[level:], package, level)
core-1  |   File "", line 1050, in _gcd_import
core-1  |   File "", line 1027, in _find_and_load
core-1  |   File "", line 1006, in _find_and_load_unlocked
core-1  |   File "", line 688, in _load_unlocked
core-1  |   File "", line 883, in exec_module
core-1  |   File "", line 241, in _call_with_frames_removed
core-1  |   File "/app/backend.py", line 5, in
core-1  |     from insights import message_manager
core-1  |   File "/app/insights/init.py", line 5, in
core-1  |     from .get_info import get_info, pb, project_dir, logger, info_rewrite
core-1  |   File "/app/insights/get_info.py", line 26, in
core-1  |     pb = PbTalker(logger)
core-1  |   File "/app/utils/pb_api.py", line 24, in init
core-1  |     user_data = self.client.collection("users").auth_with_password(email, password)
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/services/record_service.py", line 218, in auth_with_password
core-1  |     response_data = self.client.send(
core-1  |   File "/usr/local/lib/python3.10/site-packages/pocketbase/client.py", line 116, in send
core-1  |     raise ClientResponseError(
core-1  | pocketbase.errors.ClientResponseError: Response error. Status code:400

删除现在的代码文件，重新拉取


Add simple type checker and convert pipleline to use typed AST

Note: Grammar.cf  currently in case expressions that are subject to change, and is not supported by the compiler yet.

Wait! Should remove the case expressions from Grammar.cf.

superseded #8


test(test): projects all tests into strict mode test suite

Refs #153

:tada: This PR is included in version 2.0.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


36 httpswwwthymeleaforg

Added some tables, header, searchbar and footer.

What do you think about creating a webside on /api/ for security purposes?


Updating cluster without changing anything throws an error

Updating cluster without changing anything throws ClusterAlreadyExistsException();.  Does anyone have any preference on how they'd like that to fail more gracefully?  Can we just have it ignore the action and continue on like nothing happened instead of failing?

Ignore the action, and continue would be great. I'd be even happier if the response had a status that said something to the effect of "the requested cluster already exists"

Fixed in PR #433


make the module ready for XLR 4.8.x

The XLR is running after installing with puppet. But the following is shown in the puppet logging:
nfo: Applying configuration version '1450702428'
Error: Could not start Service[xl-release]: Execution of '/sbin/service xl-release start' returned 1: Starting jetty: see jetty log for more info[FAILED]
Error: /Stage[main]/Xlrelease::Service/Service[xl-release]/ensure: change from stopped to running failed: Could not start Service[xl-release]: Execution of '/sbin/service xl-release start' returned 1: Starting jetty: see jetty log for more info[FAILED]
Notice: /Stage[main]/Xlrelease::Service/Xlrelease_check_connection[default]: Dependency Service[xl-release] has failures: true
Warning: /Stage[main]/Xlrelease::Service/Xlrelease_check_connection[default]: Skipping because of failed dependencies
Notice: /Stage[main]/Xlrelease::Postconfig/Xlrelease_xld_server[xldeploy]: Dependency Service[xl-release] has failures: true
Warning: /Stage[main]/Xlrelease::Postconfig/Xlrelease_xld_server[xldeploy]: Skipping because of failed dependencies
Notice: /Stage[main]/Xlrelease::Postconfig/Xlrelease_config_item[jenkins]: Dependency Service[xl-release] has failures: true
Warning: /Stage[main]/Xlrelease::Postconfig/Xlrelease_config_item[jenkins]: Skipping because of failed dependencies
Notice: /Stage[main]/Xlrelease::Postconfig/Xlrelease_config_item[git]: Dependency Service[xl-release] has failures: true
Warning: /Stage[main]/Xlrelease::Postconfig/Xlrelease_config_item[git]: Skipping because of failed dependencies
Notice: /Stage[main]/Xlrelease/Anchor[xlrelease::end]: Dependency Service[xl-release] has failures: true
Warning: /Stage[main]/Xlrelease/Anchor[xlrelease::end]: Skipping because of failed dependencies

Same problem with 4.8
Tried upping the sleep in the xl-release init.d, to no avail

Default parameters or specific? @brhahlen @ltutar

Pretty much the defaults.


getDailyCalorieSamples return value not correctly

I have get steps value => 0
and I get value of calories => value = 1234.5kcal or approximate this value. I want to real value of calories for rating with step value
example: 30 steps => 100 kcal or approximate

@chienvu123  can you share your getDailyCalorieSamples function


k3s version v1.29.3+k3s1 (8aecc26b) failed installation on CentOS 7.9

Attempting to do a AirGap installation on CentOS 7.9.2009.
Followed the instructions on (https://docs.k3s.io/installation/airgap).
But always failed to start the service. Following are the console log, systemctl status and output of journalctl -xe:
[root@w-ai-hdp7 k3s]# INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh
[INFO]  Skipping k3s download and verify
[INFO]  Skipping installation of SELinux RPM
[INFO]  Skipping /usr/local/bin/kubectl symlink to k3s, already exists
[INFO]  Creating /usr/local/bin/crictl symlink to k3s
[INFO]  Skipping /usr/local/bin/ctr symlink to k3s, command exists in PATH at /bin/ctr
[INFO]  Creating killall script /usr/local/bin/k3s-killall.sh
[INFO]  Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO]  env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO]  systemd: Creating service file /etc/systemd/system/k3s.service
[INFO]  systemd: Enabling k3s unit
Created symlink from /etc/systemd/system/multi-user.target.wants/k3s.service to /etc/systemd/system/k3s.service.
[INFO]  systemd: Starting k3s
Job for k3s.service failed because the control process exited with error code. See "systemctl status k3s.service" and "journalctl -xe" for details.
[root@w-ai-hdp7 k3s]# systemctl status k3s.service
● k3s.service - Lightweight Kubernetes
   Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: disabled)
   Active: activating (start) since Wed 2024-04-10 00:34:47 UTC; 6s ago
     Docs: https://k3s.io
  Process: 18993 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
  Process: 18990 ExecStartPre=/sbin/modprobe br_netfilter (code=exited, status=0/SUCCESS)
  Process: 18986 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service 2>/dev/null (code=exited, status=0/SUCCESS)
 Main PID: 18996 (k3s-server)
    Tasks: 117
   Memory: 185.0M
   CGroup: /system.slice/k3s.service
           └─18996 /usr/local/bin/k3s server

Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211783   18996 available_controller.go:423] Starting AvailableConditionController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211795   18996 cache.go:32] Waiting for caches to sync for AvailableConditionController controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211779   18996 dynamic_cafile_content.go:157] "Starting controller" name="client-ca-bundle::/var/lib/rancher/k3s/server/tls/client-ca.crt"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211924   18996 dynamic_serving_content.go:132] "Starting controller" name="aggregator-proxy-cert::/var/lib/rancher/k3s/server/tls/client-auth-proxy.crt::/var/lib/rancher/k3s/server/tls/client-auth-proxy.key"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212081   18996 gc_controller.go:78] Starting apiserver lease garbage collector
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212120   18996 aggregator.go:163] waiting for initial CRD sync...
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212137   18996 controller.go:80] Starting OpenAPI V3 AggregationController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212138   18996 crdregistration_controller.go:111] Starting crd-autoregister controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212142   18996 handler_discovery.go:412] Starting ResourceDiscoveryManager
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212148   18996 shared_informer.go:311] Waiting for caches to sync for crd-autoregister
[root@w-ai-hdp7 k3s]# journalctl -xe
Apr 10 00:34:47 w-ai-hdp7 k3s[18996]: I0410 00:34:47.798473   18996 handler.go:275] Adding GroupVersion events.k8s.io v1 to ResourceManager
Apr 10 00:34:47 w-ai-hdp7 k3s[18996]: W0410 00:34:47.798490   18996 genericapiserver.go:742] Skipping API events.k8s.io/v1beta1 because it has no resources.
Apr 10 00:34:47 w-ai-hdp7 k3s[18996]: I0410 00:34:47.803251   18996 handler.go:275] Adding GroupVersion apiregistration.k8s.io v1 to ResourceManager
Apr 10 00:34:47 w-ai-hdp7 k3s[18996]: W0410 00:34:47.803286   18996 genericapiserver.go:742] Skipping API apiregistration.k8s.io/v1beta1 because it has no resources.
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.210621   18996 dynamic_cafile_content.go:157] "Starting controller" name="request-header::/var/lib/rancher/k3s/server/tls/request-header-ca.crt"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.210623   18996 dynamic_cafile_content.go:157] "Starting controller" name="client-ca-bundle::/var/lib/rancher/k3s/server/tls/client-ca.crt"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.210873   18996 dynamic_serving_content.go:132] "Starting controller" name="serving-cert::/var/lib/rancher/k3s/server/tls/serving-kube-apiserver.crt::/var/lib/rancher/k3s/server/tls/serving-kube-apiserver.key"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211118   18996 secure_serving.go:213] Serving securely on <IP_ADDRESS>:6444
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211147   18996 tlsconfig.go:240] "Starting DynamicServingCertificateController"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211331   18996 controller.go:116] Starting legacy_token_tracking_controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211340   18996 shared_informer.go:311] Waiting for caches to sync for configmaps
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211443   18996 customresource_discovery_controller.go:289] Starting DiscoveryController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211473   18996 controller.go:133] Starting OpenAPI controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211498   18996 naming_controller.go:291] Starting NamingConditionController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211521   18996 apiapproval_controller.go:186] Starting KubernetesAPIApprovalPolicyConformantConditionController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211478   18996 controller.go:85] Starting OpenAPI V3 controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211542   18996 crd_finalizer.go:266] Starting CRDFinalizer
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211541   18996 nonstructuralschema_controller.go:192] Starting NonStructuralSchemaConditionController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211601   18996 cluster_authentication_trust_controller.go:440] Starting cluster_authentication_trust_controller controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211608   18996 establishing_controller.go:76] Starting EstablishingController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211620   18996 system_namespaces_controller.go:67] Starting system namespaces controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211615   18996 shared_informer.go:311] Waiting for caches to sync for cluster_authentication_trust_controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211639   18996 apiservice_controller.go:97] Starting APIServiceRegistrationController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211650   18996 cache.go:32] Waiting for caches to sync for APIServiceRegistrationController controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211672   18996 controller.go:78] Starting OpenAPI AggregationController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211689   18996 apf_controller.go:374] Starting API Priority and Fairness config controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211772   18996 dynamic_cafile_content.go:157] "Starting controller" name="request-header::/var/lib/rancher/k3s/server/tls/request-header-ca.crt"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211783   18996 available_controller.go:423] Starting AvailableConditionController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211795   18996 cache.go:32] Waiting for caches to sync for AvailableConditionController controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211779   18996 dynamic_cafile_content.go:157] "Starting controller" name="client-ca-bundle::/var/lib/rancher/k3s/server/tls/client-ca.crt"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.211924   18996 dynamic_serving_content.go:132] "Starting controller" name="aggregator-proxy-cert::/var/lib/rancher/k3s/server/tls/client-auth-proxy.crt::/var/lib/rancher/k3s/server/tls/client-auth-proxy.key"
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212081   18996 gc_controller.go:78] Starting apiserver lease garbage collector
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212120   18996 aggregator.go:163] waiting for initial CRD sync...
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212137   18996 controller.go:80] Starting OpenAPI V3 AggregationController
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212138   18996 crdregistration_controller.go:111] Starting crd-autoregister controller
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212142   18996 handler_discovery.go:412] Starting ResourceDiscoveryManager
Apr 10 00:34:48 w-ai-hdp7 k3s[18996]: I0410 00:34:48.212148   18996 shared_informer.go:311] Waiting for caches to sync for crd-autoregister
Apr 10 00:35:07 w-ai-hdp7 k3s[18996]: time="2024-04-10T00:35:07Z" level=error msg="failed to get CA certs: Get \"https://<IP_ADDRESS>:6443/cacerts\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

Make sure you've disabled firewalld/ufw and/or opened the correct ports. Check the docs at https://docs.k3s.io/installation/requirements?os=rhel#operating-systems


Is there any way I can call tags from zotero item Details:note in a single annot template?

I want to add my zotero #tags attribute to each annot, but #tag only exists in zotero item details: note and in zotero item details: annotation it doesn't exist , so <%It.tags.filter(t => t.ype === 0)%> doesn't work.
Does anyone know how to write the template in this case ?

I've been trying to get the same thing to work and have had no success.

Actually, there is a solution here: https://forum.obsidian.md/t/zotlit-previously-obsidian-zotero-import-templates/56901/3


Integration tests with KrakenD docker environment

Hello,
is there a way to run the "krakend-integration" binary based tests against a KrakenD docker container or do I have to expose the krakend binaries to the docker host?
And additionally: what is the proposed way of integration testing a KrakenD docker-compose project in a GitLab pipe?
Thanks for any hints on those questions.
Regards.

Got it working by extending the KrakenD docker image with packages for Golang as well as the krakend-integration installation inside a new Go project. This image I put in a local GitLab project container registry and use it in my KrakenD Repo for integration testing and config validation.


Develop fixes

Refs #223.
Following issues are fixes:

Labels get the col-form-label class injected for non-horizontal forms.
Checkbox wrappers in non-horizontal forms are missing the is-invalid class.
Horizontal forms are missing the row class on the control wrapper div.
Horizontal forms use a column width of 6 for inputs, the default should be 10. The right configuration of the grid option that eats the remaining column width of 4, is never used.
The offset class used in horizontal forms uses the Bootstrap 3 name col-%-offset-%, it should be offset-%-% instead.
AppView class in the test app pollutes the App namespace (can confuse IDEs).

The points listed in #223 regarding nestedInput option and form-check-label / form-check-input, form-check class are kinda all related.
Bootstrap 4 has got rid of the hackery used in v3 of nesting radio/checkbox inputs inside label. Properly applying the classes mention above will actually require to turning off the default nesting that core's FormHelper does and adjust BUI's templates/code accordingly.

Properly applying the classes mention above will actually require to turning off the default nesting [...]

Maybe that's what should be done? While the nested variant works, as in, the checkbox will be usable, it's not being displayed properly, and requires to use "wrong" wrapper classes, and it may also interfer with Bootstrap extensions that expect the non-nested elements.
Not a fan of how CakePHP handles this internally. It looks like it's untested, and it seems that one must also modify the checkboxFormGroup template additionally to disabling nestedInput, and the option seems to have no effect for radio controls.

Maybe that's what should be done? While the nested variant works, as in, the checkbox will be usable, it's not being displayed properly, and requires to use "wrong" wrapper classes so that the alignment isn't off, and it may also interfer with Bootstrap extensions that expect the non-nested elements.

Yup, I also noticed that the alignment if off with current nesting. So I will work on removing the default nesting, unless someone beats me to it.

Not a fan of how CakePHP handles this internally. It looks like it's untested, and it seems that one must also modify the checkboxFormGroup template additionally to disabling nestedInput, and the option seems to have no effect for radio controls.

The default nesting done in core is also as a result of numerous issues/requests by bootstrap 3 users. Now that bootstrap has finally removed it we can change in core too, since to the best of my knowledge no other UI library does that. But that would probably have to wait till Cake 5.

Except for the two comments, it seems that this fixes the mentioned issues. Though I've stumbled over an additional col-form-label problem, that is that it needs an additonal pt-0 when it's in a horizontal form and for a checkbox (or radio button) group.
Check https://getbootstrap.com/docs/4.1/components/forms/#horizontal-form, without the pt-0 the vertical alignment will be off. Also just noticed that the label shouldn't be a label in this case, but a legend, and the wrapper should be a fieldset, but that's a different problem :)

Except for the two comments, it seems that this fixes the mentioned issues. Though I've stumbled over an additional col-form-label problem, that is that it needs an additonal pt-0 when it's in a horizontal form and for a checkbox (or radio button) group.

I have intentionally overlooked details regarding checkbox and radio generation. Those will have to be taken care of along with the removal of input nesting.

Check https://getbootstrap.com/docs/4.1/components/forms/#horizontal-form, without the pt-0 the vertical alignment will be off. Also just noticed that the label shouldn't be a label in this case, but a legend, and the wrapper should be a fieldset, but that's a different "problem" :)

F***, that's going to need lot of changes.


Is it possible to add attention_mask in decode function?

Thank you guys for the fantastic framework!
But here I have some questions:
If I have batch size of sentences (say 20 sentences, and the char number of sentence is not the same) to be feed to an engine at the same time, and I am not setting 'remove_input_padding' while building the engine, then I have to pad special tokens(like 0) to short sentences to build a valid 2-d tensor before decode. Then:

Is there any way to indicate which side (left or right) from where I can pad specific tokens? because the padding side is related with my model's training method.
If I pad some token, I need to use a specific attention mask to mask out the padding tokens before inference

I don't see any related input paramter of decode function could do the above 2 things, hope to get your help!

TensorRT LLM only supports right side padding now.
TensorRT LLM requires a inputs called input_lengths. TensorRT LLM will generate attention mask by input_lengths for non-attention-plugin case. In attention-plugin case, the plugin can skip the padding part by input_lengths directly.

Thank you for your quick reply!
Do you think it's necessary to add left side padding option? If it is, how can I implement it decently? I may do some work and make a PR.

Is there any reason to ask left padding? It would affect lots of kernels related to attention part. So, we don't have plan to do it now.

Yes I think it is necessory, because in training or fine-tuning stage, we normally construct batch of prompts, which usually not the same length, together with the target sentences. And the target sentences are always right after the prompts immediately, that means there is no other space between the prompt and the answer. If we append other characters behind prompt in inference stage, it would affect the performance of the trained model (I have observed this in my test).

Is there any reason to ask left padding? It would affect lots of kernels related to attention part. So, we don't have plan to do it now.

Yes I think it is necessory, because in training or fine-tuning stage, we normally construct batch of prompts, which usually not the same length, together with the target sentences. And the target sentences are always right after the prompts immediately, that means there is no other spaces or chars between the prompt and the answer. And the model also learns this.
In inference situation, If we append other characters behind prompt, it would affect the performance of the trained model (I have observed this in my test case, and I think it is due to the above training style).
And if we can append padding tokens left side, and made the batch of prompt tensor rightly aligned, the above problem will not take place.

I guess that is why in huggingface tokenizer api, there is a option to set padding side choice
@byshiue

If we append other characters behind prompt, it would affect the performance of the trained model

That shouldn't happen. Although we add pad after inputs, but these pad does not affect the computation, we skip these parts directly.

If we append other characters behind prompt, it would affect the performance of the trained model

That shouldn't happen. Although we add pad after inputs, but these pad does not affect the computation, we skip these parts directly.

Sure we pad tokens and also mark it as useless by attention_mask, but in the training stage, model never see such kind of sentences which is like 'prompts + padding tokens + answers'. All the training corpus are like 'prompts + answers + padding tokens', and the correspondign attention mask are also consecutive. In previous style, the attention mask is not consecutive, it is cut into two parts by padding tokens.
And I believe this kind of difference between training and inference will degrade model's inference performance .
@byshiue

No. No matter what kind of padding we use in training, the real computation logics always  prompts + answers without padding. So, it shouldn't affect the results no matter what pattern of padding we use, unless the implementation has bug. Otherwise, the number of padding may also affect the results and that's not reasonable.
So, we only ensure the computation logic in TRT LLM is same to prompt + answers no matter we have right padding or not (remove padding case).

Here is another explaination on why we should use left padding when generating text with a decoder-only language model, would you please take a look at it? Thank you!
[(https://github.com/huggingface/transformers/issues/18388#issuecomment-1204369688)]
@byshiue

Although the ids under right padding may be like
[
[32, 782, 110, 0, 0, a1, a2, a3, a4, a5],
[1110, 48, 71, 344, 310, b1, b2, b3, b4, b5],
[31, 9, 0, 0, 0, c1, c2, c3, c4, c5]
]

but the computation workflow/logic/order should fully same to
[[32, 782, 110, a1, a2, a3, a4, a5], [1110, 48, 71, 344, 310, b1, b2, b3, b4, b5] [31, 9, c1, c2, c3, c4, c5]]

In fact, when the remove_input_padding is enabled, the inputs are concanenated as
[[32, 782, 110, 1110, 48, 71, 344, 310, 31, 9]]

Also, the outputs are also puts as
[
[32, 782, 110, a1, a2, a3, a4, a5, 0, 0],
[1110, 48, 71, 344, 310, b1, b2, b3, b4, b5]
[31, 9, c1, c2, c3, c4, c5, 0, 0, 0]
]

no matter we use remove_input_padding or not. For first sentence, the results would be like
step 0: [32, 782, 110, 0, 0, 0, 0, 0, 0, 0],
step 1: [32, 782, 110, a1, 0, 0, 0, 0, 0, 0],
step 1: [32, 782, 110, a1, a2, 0, 0, 0, 0, 0],
...

Thank you for your kindly reply, I'm trying to look into the code and understand your point.

Although the ids under right padding may be like
[
[32, 782, 110, 0, 0, a1, a2, a3, a4, a5],
[1110, 48, 71, 344, 310, b1, b2, b3, b4, b5],
[31, 9, 0, 0, 0, c1, c2, c3, c4, c5]
]

but the computation workflow/logic/order should fully same to
[[32, 782, 110, a1, a2, a3, a4, a5], [1110, 48, 71, 344, 310, b1, b2, b3, b4, b5] [31, 9, c1, c2, c3, c4, c5]]

In fact, when the remove_input_padding is enabled, the inputs are concanenated as
[[32, 782, 110, 1110, 48, 71, 344, 310, 31, 9]]

Also, the outputs are also puts as
[
[32, 782, 110, a1, a2, a3, a4, a5, 0, 0],
[1110, 48, 71, 344, 310, b1, b2, b3, b4, b5]
[31, 9, c1, c2, c3, c4, c5, 0, 0, 0]
]

no matter we use remove_input_padding or not. For first sentence, the results would be like
step 0: [32, 782, 110, 0, 0, 0, 0, 0, 0, 0],
step 1: [32, 782, 110, a1, 0, 0, 0, 0, 0, 0],
step 1: [32, 782, 110, a1, a2, 0, 0, 0, 0, 0],
...

Thank you for your kindly reply, I'm trying to look into the code and understand your point.


Use inspect.getdoc to get model description

Change Summary
Use inspect.getdoc to get model description instead of the custom function clean_docstring.
It also allows models to inherit a description, the same way classes inherit a docstring.
Ref: https://docs.python.org/3/library/inspect.html#inspect.getdoc

Related issue number
Minor change without issue.

Checklist

[ ] Unit tests for the changes exist
[ ] Tests pass on CI and coverage remains at 100%
[x] Documentation reflects the changes where applicable
[x] HISTORY.rst has been updated

if this is the first change since a release, please add a new section
include the issue number or this pull request number #<number>
include your github username @<whomever>

Let me know if you want to have extra tests for models inheriting the description.

Sorry for the delay on this.
Thanks for moving it forward and merging.


MTL-2382 -- 1.6

Summary and Scope

add temporary repo for k8s packages
https://jira-pro.it.hpe.com:8443/browse/MTL-2382

Issue Type

Bugfix Pull Request

Prerequisites

[x] I have included documentation in my PR (or it is not required)
[x] I have tested this by building an image using this branch HEAD, or this is does not pertain to the node-images pipeline.

Risks and Mitigations
none

/backport lts/csm-1.5


Hostname can't be resolved in ubuntu server 22.04

Describe the problem
Name resolution for netbird.cloud does not work if not have configured dns server in netbird cloud. I did a clean installation of ubuntu 22.04 in lxc container and installed the netbird client via script provided in the docs.
When i try resolve a device name connected in the network, the message like "name or service not know" displayed.
When i configure any dns server like cloudflare or google in netbird cloud, the netbird.cloud names can be resolved normally, but if I enable the "Match Domains" option, the problem happens again. This problem does not happen on Windows.
I don't know if it's a bug or incorrect configuration, but I did several tests and I couldn't solve this problem
To Reproduce
Steps to reproduce the behavior:
Install ubuntu 22.04
Execute script provided on https://pkgs.netbird.io/install.sh and up the netbird client
disable dns server for this host in netbird.cloud
Expected behavior
any hostname in .netbird.cloud name resolved without needing dns server configuration
Screenshots
/var/log/netbird/client.log output:

Additional context
My test host is installed in lxc container on Proxmox

This situation is a well known limitation in case the Linux distribution support the resolv.conf type DNS settings only.  The reason is very simple, for the resolv.conf we can not set match domain settings. What is interesting for me is why do not available the systemd approach.

@caiomendonca could you share with me the /etc/resolv.conf file and the /etc/resolv.conf.original.netbird file?

@pappz thanks for the reply.
follows the contents of /etc/resolv.conf file
--- BEGIN PVE ---
search net.clm.local
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
--- END PVE ---
I couldn't find the /etc/resolv.conf.original.netbird file
the netbird client version is 0.23.0.

I understand, thanks for the help!


Retire GitHub pages

Deleted old docs
Created custom 404 page pointing users to our new docs page (preview)

Thanks for all your work on that front @jasonjoh QQ: have you reflected the changes of those two PRs in the new location? (I don't think we're changed anything since you moved the content)
#2406
#2451

Thanks for all your work on that front @jasonjoh QQ: have you reflected the changes of those two PRs in the new location? (I don't think we're changed anything since you moved the content) #2406 #2451

Thanks for the reminder! I added these into this PR I'm currently working on:
https://github.com/MicrosoftDocs/openapi-docs-pr/pull/15

@baywet I just realized I did not copy over contributing.md to Learn. I'm not sure that content belongs in Learn. How do you feel about adding it back to the root of the repo?

@jasonjoh it's usually a section of the readme. I'm not sure why we originally moved it to a separate page. But yes it should be on this repo and at the root. See an example


Update dependencies and minor fixes

Use dependabot to keep dependencies up-to-date, fairly lax monthly schedule, can update to be more frequent, if necessary.
Example testcase suggests grammar which will never find coverage (xml) generator. move to the regex mutator to at least find something.
serde_derive crate is now a feature of the main serde crate.

Add necessary use statements

Update Snafu types and generated types
fork() is an unsafe function
Use chrono crate instead of time crate. As getting the system time in a multi-threaded application became significantly more annoying with the commits here and here. Whereas chrono does not need these configuration parameters.  And easy to use a single dependency everywhere where time formatting is needed.
Update clap to new 4.0 APIs
Various clippy warnings
Fix regression in recent .len() > 0 refactorings, boolean flipped in:

grammartec/src/tree.rs

Unpin nightly from a specific daily version of nightly. Most Rust developers keep a floating nightly install. Requiring an exact toolchain per project clutters installed toolchains and not trivial to chase down what project need what exact version.
Force Address Sanitizer to not symbolize during fuzzing campaigns. Symbolizing is only useful to a human upon triaging ASAN crashes asynchronously of the fuzzing loop

@eqv wdyt?

I'd merge it if you agree

Ready for re-review


Added following blocks: 'segment_hub', 'segment_pin' and 'segment_wri…

…te_number'. The hub is to connect the pin-input for each segment and the write_number block is to write a number to the 7segment display.
Functionality and code in generators needs to be completed.

I mostly merged the button code. The segment code I rewrote to follow the normal rules for components like a servo, which I consider the 7 segment to be.


Creating queues in Azure Stack fails

I have a very simple piece of code to create a queue in Azure Stack.
from azure.storage.queue import QueueService

queue_service = QueueService(connection_string='DefaultEndpointsProtocol=https;AccountName=testaccount002;AccountKey=iVtx5TePJg+72Q/wQ/z73cV4tpw+U5j8ZEC5cjlWa5pcc3VXJFBaDtKkKSttpkIXhJENrlBi58Nr9js1hivQYQ==;EndpointSuffix=local.azurestack.external')

queue_service.create_queue('taskqueue')

This fails with the following error:
[root@98ec966063e1 /]# python /root/.azure/testQueues.py
Traceback (most recent call last):
  File "/root/.azure/testQueues.py", line 6, in <module>
    queue_service.create_queue('taskqueue')
  File "/usr/lib/python2.7/site-packages/azure/storage/queue/queueservice.py", line 529, in create_queue
    _dont_fail_on_exist(ex)
  File "/usr/lib/python2.7/site-packages/azure/storage/_error.py", line 97, in _dont_fail_on_exist
    raise error
azure.common.AzureHttpError: The value for one of the HTTP headers is not in the correct format.
<?xml version="1.0" encoding="utf-8"?><Error>InvalidHeaderValue<Message>The value for one of the HTTP headers is not in the correct format.
RequestId:d95d9903-7856-073d-7e34-f6e431cfdaa4
Time:2017-12-18T10:24:32.9138903Z</Message><HeaderName>x-ms-version</HeaderName><HeaderValue>2016-05-31</HeaderValue></Error>

and also
from azure.storage.table import TableService, Entity

table_service = TableService(connection_string='DefaultEndpointsProtocol=https;AccountName=testaccount002;AccountKey=iVtx5TePJg+72Q/wQ/z73cV4tpw+U5j8ZEC5cjlWa5pcc3VXJFBaDtKkKSttpkIXhJENrlBi58Nr9js1hivQYQ==;EndpointSuffix=local.azurestack.external')
table_service.create_table('tasktable')

Fails with the same error:
[root@98ec966063e1 /]# python /root/.azure/testQueues.py
Traceback (most recent call last):
  File "/root/.azure/testQueues.py", line 10, in <module>
    table_service.create_table('tasktable')
  File "/usr/lib/python2.7/site-packages/azure/storage/table/tableservice.py", line 529, in create_table
    _dont_fail_on_exist(ex)
  File "/usr/lib/python2.7/site-packages/azure/storage/_error.py", line 97, in _dont_fail_on_exist
    raise error
azure.common.AzureHttpError: The value for one of the HTTP headers is not in the correct format.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  InvalidHeaderValue
  <message xml:lang="en-US">The value for one of the HTTP headers is not in the correct format.
RequestId:137f5353-81c9-0a53-4748-6258ce84b0a3
Time:2017-12-18T11:13:30.8829744Z</message>
</error>

This same code works in Azure.

Hi @charliejllewellyn
Note that the Storage repo (for issues) is here (the Storage team supports the client themselves, not the central SDK team where I am):
https://github.com/Azure/azure-storage-python
But I have context on this one, so let me give you what I know.
As ARM, Storage has constraints in term of ApiVersion for AzureStack support. Recommended ApiVersion for Azure Stack and Storage Data Plane is 2015-04-05. Being that ApiVersion is hardcoded into Storage Data client, this means you need to downgrade your SDK to 0.30.0, which is the latest to support this version. As far as I know, this was the Storage team solution for this problem. But since I'm not part of this team, I strongly encourage you to open an issue on their tracker, asking for Azure Stack story.
For CLI, since is supports changing profile on the fly, downgrading package was not an option. We then decided to ship a new package as a mix-up of different ApiVersion/SDK version:
https://github.com/Azure/azure-multiapi-storage-python
This is NOT an official package, and official solution is the one from the Storage team. I cannot guarantee stability on this package, but this is how we solved this for Azure Storage + CLI + Stack.
FYI @bganapa @derekbekoe @zezha-msft

Thanks for flagging me , We will take this up with the storage team

Thanks @lmazuel!
@charliejllewellyn, for more information on the differences between Azure Storage and Azure Stack Storage, please refer to this link.

Hey both,
Firstly @lmazuel thanks for the detail in your response and also for your help over the last few weeks.
I thought this might be an API version issue again, I guess my concern is that since Azure Stack is marketed as "An extension to Azure" and the concept is that you just re-target deployment code and apps to Azure Stack, the complexity of actually getting this working really concerns me.
FYI this is not the only SDK I am having issues with, we have also to use an old version of the .NET SDK as again the version is hardcoded, as well as the same problems we've had with authentication also being prevalent in Terraform.
As a service provider looking to provide Azure Stack services it is important we can articulate how to get tools working successfully with Azure Stack. However, since the problems here are common across SDK's and devOps tools it seems that a common approach and methodology should be defined by MS to handle Azure Stack. Do either of you know where it would be best to target this request?

Hi @charliejllewellyn
I'm glad if I was able to help you :)
@bganapa tagged here is from the Azure Stack team.
You can send me an email, and I can forward to at least @bganapa, and he will know the best list to handle the discussion.

Close this issue due to idle time. Please reopen if there is still question.


Bundle language versions of forms into one json-file

When creating new forms on several languages in Structor, they are bundled into one json file that contains all languages. The forms created in excel are not bundled, there is one json-file for each language.
E.g. a form created in Excel is on 4 languages, they are now 4 json files. When uploading one of them into Structor, you only see that one language, it is not connected to the other language versions of that form.
We need a way to bundle the "old" forms so that there is only one json-file that contain all languages.

Fixed by #141


Alt/Plus

Just some Alt and Plus stuff. Things fall down sometimes due to lack of conditional conformance, and it's too bad we can't get full Alternative support due to our inability to support Applicative via higher kinded types.

Oh yes yes I see!
On Mon, Aug 21, 2017 at 9:39 AM Stephen Celis<EMAIL_ADDRESS>wrote:

@stephencelis commented on this pull request.
In Sources/Prelude/Optional.swift
https://github.com/pointfreeco/swift-prelude/pull/59#discussion_r134233282
:

@@ -74,8 +74,23 @@ public func flatMap<A, B>(_ a2b: @escaping (A) -> B?) -> (A?) -> B? {
// MARK: - Semigroup

extension Optional where Wrapped: Semigroup {

public static func <> (lhs: Optional, rhs: Optional) -> Optional {
return curry(<>) <¢> lhs <*> rhs

The switch does the opposite if none is around.
// before.some("hello") <> .none // .none// after.some("hello") <> .none // .some("hello")
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/pointfreeco/swift-prelude/pull/59#discussion_r134233282,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIQIz0L6D8hsl5zCzRSRDoYMFe1b0dSks5saYh4gaJpZM4O8own
.


Adds approved and denied condition docs

Signed-off-by: joshvanl<EMAIL_ADDRESS>Adds docs about:

The CertificateRequest Approved/Denied conditions, behaviour, and RBAC requirements
kubectl cert-manager [approve|deny]
Update the list of external issuers that none of them honour the approval conditions

We should also add an Approver page that lists the projects which implement an approver once policy-approver is ready.

Hold for v1.3
/hold

/approve
/lgtm

/hold cancel

/lgtm

@irbekrm Good for another lgtm

/lgtm


how to use this with the python version of langchain?

import os
os.environ["OPENAI_API_KEY"] = '-'
os.environ['OPENAI_API_BASE'] = 'http://api:8080/v1'
os.environ['MODEL_NAME'] = 'ggml-gpt4all-j-v1.3-groovy'

from langchain.llms import OpenAI

llm = OpenAI(model_name='ggml-gpt4all-j-v1.3-groovy', max_tokens=1024)
llm("how are you?")

error:
Retrying langchain.llms.openai.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised APIError: failed reading parameters from request:json: cannot unmarshal array into Go struct field OpenAIRequest.prompt of type string {"error":{"code":500,"message":"failed reading parameters from request:json: cannot unmarshal array into Go struct field OpenAIRequest.prompt of type string","type":""}} 500 {'error': {'code': 500, 'message': 'failed reading parameters from request:json: cannot unmarshal array into Go struct field OpenAIRequest.prompt of type string', 'type': ''}} {'Date': 'Wed, 03 May 2023 02:25:01 GMT', 'Content-Type': 'application/json', 'Content-Length': '169', 'Vary': 'Origin', 'Access-Control-Allow-Origin': '*'}.

Thanks for filing the issue and giving feedback @asurinsaka - I think it's because llm sends more completions along the API. I've crafted https://github.com/go-skynet/LocalAI/pull/162 to support both strings and arrays

Thanks for the quick fix.
There are 2 other problems with langchain:

with streaming is False:

from langchain.llms import OpenAI

llm = OpenAI(model_name='ggml-gpt4all-j-v1.3-groovy', max_tokens=1024)
llm("how are you?")

error:
File ~/dev/longchain/venv/lib/python3.10/site-packages/langchain/llms/openai.py:47, in update_token_usage(keys, response, token_usage)
     43 def update_token_usage(
     44     keys: Set[str], response: Dict[str, Any], token_usage: Dict[str, Any]
     45 ) -> None:
     46     """Update token usage."""
---> 47     _keys_to_use = keys.intersection(response["usage"])
     48     for _key in _keys_to_use:
     49         if _key not in token_usage:

KeyError: 'usage'

with streaming=True:

from langchain.llms import OpenAI

llm = OpenAI(model_name='ggml-gpt4all-j-v1.3-groovy', max_tokens=1024)
llm.streaming = True
llm("how are you?")

error:
File ~/dev/longchain/venv/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py:165, in EngineAPIResource.create(cls, api_key, api_base, api_type, request_id, api_version, organization, **params)
    153 response, _, api_key = requestor.request(
    154     "post",
    155     url,
   (...)
    160     request_timeout=request_timeout,
    161 )
    163 if stream:
    164     # must be an iterator
--> 165     assert not isinstance(response, OpenAIResponse)
    166     return (
    167         util.convert_to_openai_object(
    168             line,
   (...)
    175         for line in response
    176     )
    177 else:

AssertionError:

@asurinsaka I've solved the issue in the first case and a fix is about to land in https://github.com/go-skynet/LocalAI/pull/166 - the second needs a deep dive - can you file a separate issue?


SideNavigationViewController example

Hello!
May you please create a simple sample project that uses SideNavigationViewController?
I'm trying to use it, but can't understand how should it work :)
I event can't use it as is explained at repo README.md
Just getting a black screen, but according to the storyboard this screen should be white and should contain 'touch me' button
I've created a sample project, so you will be able to 'reproduce' my failure :)
Here is the link to my repo with the sample - SideNavigationViewControllerTest
Please let me know if i may provide some additional information.
Thanks in advance!

Hi @WooD1k,
There are a few issues with your approach:
When creating an iOS project you have three choices

Using a template
Start with an empty project and add a storyboard or xib.
Pure code no storyboards

Based on your sample project SideNavigationViewControllerTest it seems you started the project with either 1 or 2 from the choices above.
The first issue to your approach was this piece of code:
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = SideNavigationViewController(mainViewController: ViewController(), sideViewController: SideMenuViewController())
window!.makeKeyAndVisible()
Click on the Blue project file and then click on the app name under "Targets"... Look at the "Deployment Info" you will see that you have "Main" set under "Main Interface"
In order for your appDidFinishLaunchingWithOptions code to run properly you will need to make sure there is no file specified under "Main Interface" in the deployment info section of your apps target.
Hope that helps!
:)

Hello @adamdahan
Many thanks for your detailed answer!
I've added a new view controller for object panel, changed class to SideNavigationViewController and there is no any properties at outlets sections(main or side), here is the screenshots:

Thanks in advance!

Hey @WooD1k,
I see the issue now. There is no IBOutlet property for the mainViewController. We don't use storyboards much ourselves but we will definitely make that available in a future update.
To remedy your situation for the time being until the next release:
Click on the Blue project file and then click on the app name under "Targets"... Look at the "Deployment Info" and delete the file "Main" set for the "Main Interface" and do it programmatically.
Just replace the identifiers below->
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let mainVC = storyboard.instantiateViewControllerWithIdentifier("YourViewControllerIdentifier")
let sideVC = storyboard.instantiateViewControllerWithIdentifier("YourSideViewControllerIdentifier")
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = SideNavigationViewController(mainViewController: mainVC, sideViewController: sideVC)
window?.makeKeyAndVisible()
Hope that helps and we will push support for storyboards in the next update!

@WooD1k you can track the storyboard support ticket here: https://github.com/CosmicMind/MaterialKit/issues/75

@adamdahan many thanks!

@WooD1k my pleasure.
And just a side note: The above fix allows you to keep doing your work in storyboards. The only programmatic thing done is passing the rootViewController to your apps window. So basically you don't need to do the dragging in IB to hook up the SideNavigationViewController. Just do that part programmatically and use the storyboards as you wish for the individual view controllers in your app.
:)


B5 layout style

Updates & bug fixes to the ui and style for Beta 5. Also removing old and unused templates.

The aggregate overlap issue should be fixed now. The effective from/until fields should no longer contain a 'T' character, and will now include a 'Z' instead of '+0000' offset. This should help to both avoid wrapping and, in case of wrapping break on the date/time boundary and look like this:


Does not compile with OCaml 4.05

Trying to compile on current Debian sid with ocaml 4.05:
    ocamlopt lib/yojson.{cmx,o} (exit 2)
(cd _build/default && /usr/bin/ocamlopt.opt -safe-string -g -I /usr/lib/ocaml/biniou -I /usr/lib/ocaml/easy-format -no-alias-deps -I lib -o lib/yojson.cmx -c -impl lib/yojson.ml)
File "write.ml", line 20, characters 30-33:
Error: This expression has type string but an expression was expected of type
         bytes
      ocamlc lib/yojson.{cmo,cmt} (exit 2)
(cd _build/default && /usr/bin/ocamlc.opt -safe-string -g -bin-annot -I /usr/lib/ocaml/biniou -I /usr/lib/ocaml/easy-format -no-alias-deps -I lib -o lib/yojson.cmo -c -impl lib/yojson.ml)
File "write.ml", line 20, characters 30-33:
Error: This expression has type string but an expression was expected of type
         bytes

Are you using the latest version of yojson, 1.4.0?

Yes I tried with git HEAD

I'm encountering this as well (version 1.4.0)

It looks like you're using an incompatible version of biniou. Its version should be >= 1.2.0.

indeed debian Sid lags. thanks


.env file does not load in ASP.NET / .NET Framework 4.7.2

I am testing this library in ASP.NET with .NET Framework 4.7.2 but the result is unexpected. The Load method always generates the same error:
.env: error: No such file or directory.

The code I use is the same as the one found in the documentation:
new EnvLoader().Load();

So I'm not doing anything wrong....
The problem is that this library uses the Directory.GetCurrentDirectory() method and this method is returning a path that does not correspond to the project path:
C:\Program Files\IIS Express

This problem has been mentioned here: https://github.com/dotnet/aspnetcore/issues/4206.
As far as I can see, the Directory.GetCurrentDirectory() method works perfectly when you use it with .NET Framework 4.7.2, however, with ASP.NET it returns a path that does not correspond to the root directory of the project.
Temporary solution
The temporary solution I found was to use the AppContext.BaseDirectory property:
new EnvLoader()
     .SetBasePath(System.AppContext.BaseDirectory)
     .Load();

Note: This solution only works with dotenv.core >= 2.0.0.

The value representing the AppContext.BaseDirectory property is null in xamarin-android. This bug has not been fixed yet: https://github.com/xamarin/xamarin-android/issues/3489.
Well, apparently it's not a good idea to use this property in this library, since it doesn't work in xamarin-android (we should wait for them to fix it).


create_final_covariates.parquet not generated[Issue]:

Describe the issue
create_final_covariates.parquet not generated
Steps to reproduce
create_final_covariates.parquet not generated
GraphRAG Config Used
create_final_covariates.parquet not generated
Logs and screenshots
create_final_covariates.parquet not generated
Additional Information

GraphRAG Version:
Operating System:
Python Version:
Related Issues:

Hi @win4r
Can you please provide more details? If you can share your settings file I can troubleshoot

Duplicate of #498
Resolving


Option to not output the 3D Object

The 3D Object output takes up a lot of space and may not be useful for many people.. If we had an option to skip the creation of this model, that would be good.
I also noticed that the 3D Object models were all upside-down. Maybe that's just me, but that's what I experienced.

You are right. Generating pointclouds is time-and-space consuming. As a temporary patch, you could comment (add a # at the left of each line) for the following codes. (from Line313 to 321) https://github.com/YvanYin/Metric3D/blob/f8101cae8973086f4f54e2c1c9e7968c3a172444/mono/utils/do_test.py#L313-L321

Thank you very much for the follow-up


Execution Error: error returned from database: syntax error at or near "`"

Description
Trying to install uuid-ossp, when I use uuid-ossp I get an error, same with 'uuid-ossp':
Execution Error: error returned from database: syntax error at or near "`"

And when I leave it as is uuid-ossp I get this error:
error returned from database: syntax error at or near "-"

Steps to Reproduce
CREATE EXTENSION IF NOT EXISTS uuid-ossp;

CREATE EXTENSION IF NOT EXISTS postgis;

Expected Behavior

Actual Behavior

Reproduces How Often
Yes
Workarounds

Reproducible Example

Versions

The particular Postgres extensions are not currently supported, but if you can describe what integration work is needed, we can see if it can be implemented.

I am doing a migration with raw SQL. And I need to install those extensions.
However there becomes an issue because uuid-ossp is hyphenated. So wrapping it in backticks ` results in an error and so does in single quotes. Leaving it as is also returns an error because of the hyphen.
In your documentation for raw SQL you showcase backticks being used. But they're a problem here.

Oh, if that's Postgres, use double quote "


Updating xpansion settings or candidate of a variant does not create a command

Description
Currently, the app modifies the Xpansion configuration directly when users make modifications to a variant. This can cause issues when the snapshot is destroyed, as any variant modifications will also be lost.
To address this, we suggest using the command-based approach that generates commands to modify the configuration instead of modifying it directly. This would allow users to track all changes made to the variant configuration, and ensure that they are properly saved and recoverable.
Steps to Reproduce
Steps to reproduce the behavior:

Create an xpansion study.
Create a variant from your base study
Go to xpansion parameters
Modifiy one random parameter and save the modification.
See that there are no commands in the variant commands list

Actual Behavior
See above
Expected Behavior
When I modify xpansion settings of my variant, I want an associated command to be created.
Possible Solution
The API concerning Xpansion (PUT or POST, candidate or settings) should remain consistent for base studies, but should generate a command if the study is a variant. To update settings, it is recommended to use the commands UpdateConfig or UpdateRawFile. Creating a candidate may be more complex, as the API may also need to create base case settings.
Environment

[x] Production
[x] Staging

Moreover, creating an Xpansion candidate in a variant does not create a command neither

Creating another Xpansion candidate in a variant does not create a command neither

What do you mean by “creating a candidate”?

In fact, all Xpansion API is not designed to handle variant and only modify the snapshot whithout creating a command. I started to work on this issue which is not a big concern for now according to Thomas Bittar but could be in the future.


Binding to FlowIsLoadingInfinite has no effect.

No matter how I bind to FlowIsLoadingInfinite, it does not change.
Is using Xamvvm maybe the issue?

Is using Xamvvm maybe the issue?

All controls here are MVVM framework independent, so it's definitely not a cause.
There's an example here: https://github.com/daniel-luberda/DLToolkit.Forms.Controls/blob/master/Samples/DLToolkitControlsSamples/SamplesFlowListView/InfiniteLoadingPage.xaml
Make sure you follow this: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/data-binding-basics


Script not working?

Hi! I love this giveaway script btw it has worked perfectly up until now. I just hosted a giveaway on my community Discord server with 207 participants and the bot just announced the winners, saying: "No Participants :("
Please help! Everyone is mad :<

I found the reason why it wasn't working, but is there a way to announce the winners on a giveaway that has already ended?

I assume you could try to reroll it? Not sure though.
Why wasn't it working for you? It also says no participants on my server

I checked the repo and saw there is a new version of the giveaway script with the ability to reroll a giveaway but I am using V1, so I cannot reroll.
The problem was my fault; the reaction script was not set to run in the giveaway channel so a database of participants was never created. Back in March, I suggested a feature that would circumvent this issue (https://github.com/jonas747/yagpdb/issues/660) because it would avoid the need to use a database by treating the reactions on the message as the database itself. This would also reduce and simplify the giveaway code a lot (currently it is almost 10k characters!)

Seems like the issue was resolved, closing.
Re: your second suggestion about .Message.Reactors - the Discord API does not provide this information in their message payload, it has to either be 1) cached manually or 2) fetched on demand through the Get Reactions endpoint. As such, while .Message.Reactors is not really feasible, it is possible that the endpoint could be exposed to CCs through a function like getMessageReactions channel_id message_id emoji returning a slice of User objects on success.


fix problem with loop optimization (#742)

Provides a modified and reviewed fix for the problem reported here: https://github.com/Microsoft/visualfsharp/pull/742
I've made the code cleaner and added additional constraints to ensure the optimization only applies to the compiled forms of for ... in  ... do ...  loops

Cool. Looks good. I did wonder if checking the value in the enumerator and previous let binding was possible, but thought what I had was good enough. Would never have thought to make the change in the type checker either.

Thanks for fixing this merged.

A not-so-pretty workaround for this issue is here: https://github.com/Microsoft/visualfsharp/issues/759#issuecomment-162243299.  (note however it requires changes to user code)

On the internal build this fails with:
The OSS build succeeds though.

fails for me also in the wild ;) already on the FSharp.Compiler-proto.dll

why this difference with appveyor build?

I think it's a matter of what fsc version is used to build the proto compiler, will check which version was used in my setup.

Here is the start of the failing call on my setup
..\..\..\lkg\FSharp-4.0.30319.1\bin\fsc.exe -o:obj\Proto\net40\FSharp.Build-proto.dll ...
on AppVeyor
C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\fsc.exe -o:obj\Proto\net40\FSharp.Build-proto.dll

the appveyor build uses F# 3.1, that is the difference between build success and failure.

What are the reasons why AppVeyor build doesn't use the LKG version, like the local ones?
Shouldn't the build take the same path as local ones?

It'seems a bug in the script, we are looking at fixing it.

pulled


message transformation examples

Summary of change:
The same use case (SOAP backend and JSON client) is used for both of the following examples:

JSON to SOAP conversion (JSON client sends a message to the SOAP backend)
SOAP to JSON conversion  (SOAP backend responds to the JSON client)

Changed the synapse code accordingly. Tested.

Created new PR with suggested changes.

https://github.com/wso2/docs-ei/pull/1108


Add icon to inputs

Add startIcon and endIcon to text inputs

Shall we force the size of the icon somehow?

hmm @poteirard I did see the past conversation about that but I haven't experienced it on chrome 🤔  I guess one solution would be context and a small wrapper around icon - <InputIcon />  - that would grab it from context. I will wook for a way to do it with plain css

I think the difference between the default state and disabled state is too subtle. It's very difficult to see when the field is disabled.

:tada: This PR is included in version 4.8.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Panic in controller when step fails before image digest exporter

Changes

Fixes #2220
The image digest exporter (part of the Image Output Resource) is configured with "terminationMessagePolicy": "FallbackToLogsOnError",.
When a previous step has failed in a Task our entrypoint wrapping the exporter emits a log line like 2020/03/13 12:03:26 Skipping step because a previous step failed. Because the image digest exporter is set to FallbackToLogsOnError Kubernetes slurps up this log line as the termination message.
That line gets read by the Tekton controller, which is looking for JSON in the termination message. It fails to parse and stops trying to read step statuses.
That in turn results in a mismatch in the length of the list of steps and the length of the list of step statuses. Finally we attempt to sort the list of step statuses alongside the list of steps. This method panics with an out of bounds error because it assumes the lengths of the two lists are the same.
So, this PR does the following things:

The image digest exporter has the FallbackToLogsOnError policy removed. I can't think of a reason that we need this anymore.
The Tekton controller no longer breaks out of the loop while it's parsing step statuses and instead simply ignores non-JSON termination messages.
The step status sort function is replaced with a much shorter implementation that doesn't panic on length mismatches. It isn't as performant but that's only going to be a real issue if the number of steps is really large (like, 1000s of Steps).

I still need to write some tests for this.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[ ] Includes tests (if functionality changed/added)
[x] Commit messages follow commit message best practices

See the contribution guide for more details.

I wonder it https://github.com/tektoncd/pipeline/issues/2029 was a different manifestation of this issue. In that case the overall Task failure status was set to that of the skipped  image digest exporter step, which is incorrect since the failure was in a different step, and the digest exporter step should have been only skept - see the full yaml.

/test pull-tekton-pipeline-integration-tests

/retest


Can't use/force STEP interpolation in 3.6?

How is it possible to use step interpolation in Blender 3.6?
Issue:
I have animations that need to be exported with constant interpolation.

Exporting them with no sampling -> incorrect animations (because they use constraints?)
Exporting with sampling -> animations get interpolated (a 10 frame animation with fixed keyframes becomes smooth)

In 2.83 I was able to force STEP by editing "gltf2_blender_gather_animation_samplers" like this:
`
if bake_bone is not None:
# TODO: check if the bone was animated with CONSTANT
return 'STEP'
else:
max_keyframes = max([len(ch.keyframe_points) for ch in channels if ch is not None])
# If only single keyframe revert to STEP
if max_keyframes < 2:
return 'STEP'
        # If all keyframes are CONSTANT, we can use STEP.
        if all(all(k.interpolation == 'CONSTANT' for k in c.keyframe_points) for c in channels if c is not None):
            return 'STEP'

        # Otherwise, sampled keyframes use LINEAR interpolation.
        return 'STEP'

`
However I had to update because some animations were getting distorted. This is fixed in 3.6, but I have not found a way to export animations with constant interpolation properly. I tried editing "gltf2_blender_gather_action" and replacing LINEAR with STEP, as I'm exporting actions, but that did not make any difference.

Hello,
Can you please share a sample .blend file you want to export?

I made a small sample file as I can't share the actual models. I tried both with and without setting the keyframes to "constant interpolation" (didn't need to in 2.83 when exporting with forced STEP interpolation).
[https://drive.google.com/file/d/1dWkO7pXVMT--immaORuDDd82OSwu6AsO/view?usp=sharing]

I made a small sample file as I can't share the actual models. I tried both with and without setting the keyframes to "constant interpolation" (didn't need to in 2.83 when exporting with forced STEP interpolation).
[https://drive.google.com/file/d/1dWkO7pXVMT--immaORuDDd82OSwu6AsO/view?usp=sharing]


Tiff output option for 'ccittfax4' yeilds Error: Fax3SetupState: Bits/sample must be 1 for Group 3/4 encoding/decoding

npm view sharp dist-tags.latest:
Sharp Version: 0.26.3
A10239:tiff_jpg_sharp_mac $ npx envinfo --binaries --system
npx: installed 1 in 1.44s
System:
OS: macOS 10.15.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 124.20 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.6.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.6 - /usr/local/bin/npm
Sharp errors when attempting to resize any one of four CMYK tiff separations and save them back as a Group 4 encoding. The file uploaded as a sample was renamed with a jpg extension. I was unable to upload a tif. Please just fix the extension to reproduce. I tried saving a number of different file formats as a tif with the same results.
Code snippet:
sharp(img2.tiff, {limitInputPixels: 0} )
.metadata()
.resize({ width: 1584,
height: 3086
})
.withMetadata()
.tiff({
compression: 'ccittfax4',
bitdepth: 1,
})
.toFile('./file1(K).tiff')
then(info => { console.log("It worked") })
.catch(err => { console.log("It Broke: " + err.stack) });
Error occurs on MacOs 10.15.6 Catalina.

Hi, you'll need to add  toColourspace('b-w') to ensure single channel output.
https://sharp.pixelplumbing.com/api-colour#tocolourspace
There's an example of this in the unit tests:
https://github.com/lovell/sharp/blob/c10888e6fe38885e2a21ee9598b941001920fd22/test/unit/tiff.js#L133-L140

This is what ended up working for me. I neglected to mention that I was erroneously using resize to change the DPI. In addition to your notes, I added the density construct to my tiff output settings. The four separations were then joined and written as a jpg.
await sharp(tiffFile, {limitInputPixels: 0} )
        .sharpen()
        .resize({ width: 1584,
                     height: 3086
        })
        .toColourspace('b-w') // can only squash 1 band uchar images
        .tiff({
            bitdepth: 1,
            compression: 'none',
            predictor: 'none',
            density: 600
        })
        .toBuffer()
        .then((data) => {
            fs.writeFileSync(tiffFile, data);
            console.log("File: " + tiffFile + " resized.");
        })
        .catch(err => { console.log(err.stack) });

Thanks for your help and I believe we can close this one.


Fix v0.1.0

This PR corrects issues with the schemas and examples that were not detected by the online validator that I had used. I have now made tests with several online validators and AJV.
Changes in examples:

fix polyhedron geometry in building.json (see #65)
use ".." instead of null for unbounded interval ends (see #65)
add the required time member where missing
fix outdated use of instant

Schema changes:

change the date and date-time formats to regular expressions since the format keyword is typically ignored and as a result several validators threw errors because both the date and timestamp schemas matched a date or timestamp, which violates the oneOf constraint; in addition, the regular expression also checks that UTC is used as the timezone
fix title of link.json

Other changes:

added a validation script using ajv-cli

Once merged, a v0.1.1 release would be created.
Closes #65

@cportele
To avoid online validators or others not "stitching" properly a JSON schemas scattered over different files (and thus not reporting errors, JSON schemas are somewhat not very strict), I wrote a small "minifier" (for lack of a better word) to make one schema, and I put it in the final version of the schemas, see eg https://3d.bk.tudelft.nl/schemas/cityjson/1.1.2/.
It makes using different validators way easier to others too.
it's there: https://github.com/cityjson/specs/blob/main/misc/schema-minifier.py
Hope this helps.

Isn't the timeseries examples also invalid? It looks like JSON Schema, not like an actual JSON-FG examples.

@m-mohr - It is an example how to extend JSON-FG (https://docs.ogc.org/DRAFTS/21-045.html#extending_jsonfg). I guess we should split these examples into a separate folder to avoid confusion.


Make cloning via https less ugly

This is most likely caused by try / except in a loop
https://github.com/threefoldtech/jumpscaleX_core/blob/development/install/threesdk/InstallTools.py#L4997
We should detect before going in the loop which of the 2 methods we want to use (git ls-remote could be used to check)
Make sure that in code_github_get we always use the url passed not rely on what is configured in .git/config url

The authenticity of host 'github.com (<IP_ADDRESS>)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes

This should now be asked

verified.


(WIP) Make expr_simplifier return undefined when indexing out of bounds

Description:
This PR is a WIP that fixes all known issues in #8747.

BREAKING CHANGE:

Related issue (if exists):
#8747

Not totally sure if the changed code for array literals is correct -- the code for this is a little more complicated than strings.
[][0] works correctly for now, but not [][[]]. Will look into this later.

Another broken test case:
var _ = {0.5: 'test'}[0.5];

Currently simplifies to:
var _ = {
    0.5: 'test'
}[0.5];

Should simplify to:
var _ = 'test';

Only one potential issue so far, that KnownOp no longer implements Eq because of Index now taking f64 instead of i64, but seems OK so far to me.

@kdy1 The only remaining issue in terms of code changes is this line. Currently is_literal(props) does not work with the unit test below because the 0.5 is not considered a literal. I'm not sure why this fract() check exists and I'm not sure if changing this would break something.
https://github.com/levi-nz/swc/blob/454378d7eaac82bae40c5a770888e84580a1381b/crates/swc_ecma_utils/src/lib.rs#L1883
fold("({0.5: 'a'})['0.5']", "'a';");

I'm pretty sure Index(f64) can be changed back to Index(i64) as well, as IndexStr is always used for objects.

I have ran UPDATE=1 cargo test --test projects --test tsc, but not sure if all of these files should be changed, especially crates/swc/tests/tsc-references/templateStringInIndexExpressionES6.2.minified.js, which is now empty.

This is getting a little complicated with property names, since we need to either correctly handle stuff like [].push not being replaced, or simply not replace invalid properties at all.
The solution I've implemented works and I don't think there's any issues, besides the fact that code like this will break:
Object.prototype.foobar = 5;
var _ = ({}).foobar; // returns 5, but will return undefined from the minifier

If there's no way to account for this correctly, we should ideally make this a configurable option where the user can make the minifier replace stuff like [].invalid with void 0 or just make it not replace anything at all.
If we continue with this approach, should we include deprecated properties like Object.watch to avoid any confusion (currently replaced with void 0), even though these no longer exist? This exists in vue.js. Ref: https://stackoverflow.com/questions/1029241/object-watch-for-all-browsers

Babel's minify doesn't modify expressions like [][[]], but Babel's path.evaluate() API lets you transform these expressions.  Not sure where to go from here, but this should definitely be an option to make the simplifier as powerful as Babel's path.evaluate() option.

Please move logics to https://github.com/swc-project/swc/blob/8eac0bec49f4f260a261d87f174ed2913c4bee63/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs
swc_ecma_utils is not a good place for this kind of optimizations

Do we not care about modified prototypes? For example, in the current release version: https://github.com/swc-project/swc/blob/56e03a19602b36a7ebac9ccc899065101bb385af/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs#L165
We replace x[-1] with undefined, but that would break this code if minified:
Array.prototype[-1] = "foo";
[][-1] // outputs "foo", but swc replaces with void 0

Shouldn't this logic be moved to compress as well?

There's an option named pristine_globals to mark globals as pristine, but I didn't bother to follow it in all places. Some rules uses it, but not all.

Got it, I will update the minifier accordingly to try use it -- I think that option should be checked here in the aforementioned case

Not sure why this exists, perhaps a bug with side effects? https://github.com/swc-project/swc/blob/56e03a19602b36a7ebac9ccc899065101bb385af/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs#L258
Current test case fold("[1,2,3,4,5,6,7,8,9,10][4 + []]", "1"); fails, resulting in 0, 5 instead of just 5, removing that if block works but I think this may break things. Looking into why this is happening

I seem to have fixed this but not sure if it will cause side effects anywhere, will try take a look. It appears as ArrayLiterals being replaced were always being replaced with a SeqExpr and if no side effects existed then there was a dummy 0 being added to the front. It just gets replaced with the single Expr now instead.

Also, CI currently fails because of this. Is this normal? These unit tests don't seem to work on Windows, will try this on Mac later.
---- fixture_tests__terser__compress__evaluate__unsafe_string_bad_index__input_js stdout ----
Input: /home/runner/work/swc/swc/crates/swc_ecma_minifier/tests/terser/compress/evaluate/unsafe_string_bad_index/input.js
---- Config -----
{
    "evaluate": true,
    "unsafe": true
}

---- Input -----
console.log("1234".a + 1, "1234"["a"] + 1, "1234"[3.14] + 1);

thread 'fixture_tests__terser__compress__evaluate__unsafe_string_bad_index__input_js' panicked at crates/swc_ecma_minifier/src/compress/mod.rs:170:17:
Infinite loop detected (current pass = 202)
Code    0:

console.log("1234".a + 1, "1234"["a"] + 1, "1234"[3.14] + 1);

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    fixture_tests__terser__compress__evaluate__unsafe_string_bad_index__input_js

test result: FAILED. 2674 passed; 1 failed; 27 ignored; 0 measured; 0 filtered out; finished in 96.08s

error: test failed, to rerun pass `-p swc_ecma_minifier --test compress`
Error: Process completed with exit code 101.

Not sure if I got the span stuff correct. There is some copy pasta going on here from simplify::expr, should probably move that stuff into their own util functions.
Where should I create unit tests for the new compress functionality?

You can create a directory and place an input.js and config.json in https://github.com/swc-project/swc/tree/56e03a19602b36a7ebac9ccc899065101bb385af/crates/swc_ecma_minifier/tests/fixture
Note that you need to touch (or save again) tests/compress.rs once after adding a test file

Will add watch and unwatch as exclusions for Object, even though they don't exist anymore. This way users can still use pristine_globals=true when using scripts like this to polyfill: https://gist.github.com/eligrey/384583
Not sure if there's any other exclusions we should add for property/method polyfills that don't exist anymore

To do:

Move stuff to ctx
Handle known object properties
Possibly add more unit tests

Will comment here again when everything is finalised

Is there a reason why stuff like [1][0] was replaced with (0, 1) before instead of just 1? The tests seem to pass fine but I want to be sure. I don't see why it should be replaced with a SeqExpr instead of just a Literal if there are no side effects.

cargo test -p swc_ecma_minifier terser_exec_tests__terser__compress__evaluate__unsafe_string_bad_index__input_js --features concurrent currently fails with a weird infinite loop bug, doesn't seem to be related to optimize_member_expr, need to investigate further

(0, foo) is about making this undefined

(0, foo) is about making this undefined

Does this apply to objects too? Like should ({a: 5}).a be replaced with (0, 5) or just 5? Currently it's replaced with the latter but I want to be sure

Need to handle known object properties in simplify's optimize_member_expr. Will require a function signature change to accept obj and prop instead of expr. This PR should be ready for review tomorrow.

(0, foo) is about making this undefined
Does this apply to objects too? Like should ({a: 5}).a be replaced with (0, 5) or just 5? Currently it's replaced with the latter but I want to be sure

I don't think so. this only matters for member exprs or direct eval calls

Running cargo test run_fixture_test_tests__exec__issues_6xxx__6878__1__exec_js results in this error on both main and issue-8747 branch. Yarn installed with npm i -g yarn and corepack enable. Not sure how to fix?
levi@levi-kde-neon:~/RustroverProjects/levi-nz/swc$ cargo test run_fixture_test_tests__exec__issues_6xxx__6878__1__exec_js
    Finished test [unoptimized + debuginfo] target(s) in 0.39s
     Running unittests src/lib.rs (target/debug/deps/ast_node-e9d29c534642bab4)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/better_scoped_tls-2dc2c5ea5a8d762c)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/binding_macros-c052f01c3c2f3382)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/main.rs (target/debug/deps/dbg_swc-05912a335a982368)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/from_variant-86e39519e21950c5)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/jsdoc-f39585929aa7c829)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 9 filtered out; finished in 0.00s

     Running tests/fixture.rs (target/debug/deps/fixture-a6c989228dc4b47b)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 235 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/preset_env_base-e8b904940a0c4c1c)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/string_enum-f4111496889125a4)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/simple.rs (target/debug/deps/simple-07ac1a7eda7c6644)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/swc-b072fffd3fe75c6a)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out; finished in 0.00s

     Running tests/error_msg.rs (target/debug/deps/error_msg-423e285177753c6d)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 104 filtered out; finished in 0.00s

     Running tests/exec.rs (target/debug/deps/exec-ce806a5ca5bc9fa2)

running 1 test
➤ YN0000: · Yarn 4.0.2
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: · Done in 0s 194ms
$ dprint fmt
Formatted 193 files.
$ dprint fmt "scripts/*.js" -c scripts/.dprint.json
test run_fixture_test_tests__exec__issues_6xxx__6878__1__exec_js has been running for over 60 seconds.4.2 want: ^5.3.0
npm WARN deprecated<EMAIL_ADDRESS>This is a stub types definition. terser provides its own type definitions, so you do not need this installed.
npm WARN deprecated<EMAIL_ADDRESS>This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated<EMAIL_ADDRESS>This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated<EMAIL_ADDRESS>This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /home/levi/RustroverProjects/levi-nz/swc/node_modules/wasm-sjlj
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using<EMAIL_ADDRESS>npm ERR! gyp info using<EMAIL_ADDRESS>| linux | x64
npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/levi/.nvm/versions/node/v20.12.2/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/levi/RustroverProjects/levi-nz/swc/node_modules/wasm-sjlj/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/levi/.nvm/versions/node/v20.12.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/levi/.cache/node-gyp/20.12.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/levi/.cache/node-gyp/20.12.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/levi/.nvm/versions/node/v20.12.2/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/levi/.cache/node-gyp/20.12.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/levi/RustroverProjects/levi-nz/swc/node_modules/wasm-sjlj',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: binding.gyp not found (cwd: /home/levi/RustroverProjects/levi-nz/swc/node_modules/wasm-sjlj) while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/home/levi/.nvm/versions/node/v20.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:271:18)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Linux 6.5.0-28-generic
npm ERR! gyp ERR! command "/home/levi/.nvm/versions/node/v20.12.2/bin/node" "/home/levi/.nvm/versions/node/v20.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/levi/RustroverProjects/levi-nz/swc/node_modules/wasm-sjlj
npm ERR! gyp ERR! node -v v20.12.2
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/levi/.npm/_logs/2024-05-24T21_56_02_426Z-debug-0.log
test run_fixture_test_tests__exec__issues_6xxx__6878__1__exec_js ... FAILED

failures:

---- run_fixture_test_tests__exec__issues_6xxx__6878__1__exec_js stdout ----
Input: /home/levi/RustroverProjects/levi-nz/swc/crates/swc/tests/exec/issues-6xxx/6878/1/exec.js
thread 'run_fixture_test_tests__exec__issues_6xxx__6878__1__exec_js' panicked at crates/swc/tests/exec.rs:109:13:
assertion failed: status.success()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    run_fixture_test_tests__exec__issues_6xxx__6878__1__exec_js

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 546 filtered out; finished in 108.41s

error: test failed, to rerun pass `-p swc --test exec`

What's wasm-sjlj? I don't think SWC uses it.

foo?.bar.baz?.() should be optimized to (void 0).baz?.(), but this is ignored for now. For some reason the AST becomes this
OptChainExpr { span: 53..65#0, optional: false, base: Member(MemberExpr { span: 53..65#0, obj: Unary(UnaryExpr { span: 45..47#0, op: "void", arg: Lit(Num(Number { span: 45..47#0, value: 0.0, raw: None })) }), prop: Ident(Ident { span: 62..65#0, sym: "baz", optional: false }) }) }

instead of
OptChainExpr { span: 11..27#0, optional: true, base: Call(OptCall { span: 11..27#0, callee: Member(MemberExpr { span: 11..23#0, obj: Unary(UnaryExpr { span: 12..18#0, op: "void", arg: Lit(Num(Number { span: 17..18#0, value: 0.0, raw: Some("0") })) }), prop: Ident(Ident { span: 20..23#0, sym: "baz", optional: false }) }), args: [], type_args: None }) }

which results in it becoming (void 0)?.() (due to eval_opt_chain's OptChainBase::Member optimization that removes pure undefined or null). If I check self.ctx.is_opt_call in eval_opt_chain it works as intended but I'm not sure if this would be correct since the AST appears to be messed up. Might come back to this later, otherwise will just have this as an ignored case.

Also, can you rebase? (And thank you so much for the PR!)

Also, can you rebase? (And thank you so much for the PR!)

Just saw this, will do

Had to manually fix some files as rebasing messed a few up, hope that's OK


Improve PHPDoc

Today, the IDEs and static analysis tools are completely lost. 🙂
With this PR, I propose adding PHP Doc so as not to impact the old PHP runtimes.
I added :

Possible exceptions
Method signature expectations
Return type

Thanks 🙏

Thanks a lot for your work!


Regular expression issue on FQDN field

The problem
I am seeing the same issue reported on for the client secret but this issue is actually on the FQDN:

It appears (I am no expert) the issue is the regex is expecting only letters and numbers but this means the :// in https:// is causing the failure.
If I remove the https:// then the addon works but when I try to add it says the domain is not recognised, I have assumed that is because the domains dont match.
Thanks for all your work on building and maintaining this.
What version of the addon are you using?
2.2.8
What version of Home Assistant Core are you using?
2024.6.4
What type of installation are you running?
Home Assistant OS
What version of Tesla integration are you using?
No response
What region of Tesla API are you using?
Europe, Middle East
What model and year is your vehicle?
Model 3
What is your domain name (FQDN)?
not relevant
Paste the log output from the addon here
No response
Any additional context or screenshots that help explain the issue
No response

You need to enter it without https, as it says in the help text on that field.


CI tweaks

The main goal here is to cut down the total number of jobs we run from 41 to to something more sensible.
I got them down to:

CPython 3.7 and 3.11, and on Windows, macOS, and Ubuntu: 6 jobs
CPython 3.8, 3.9, 3.10, and PyPy 3.9 on Ubuntu: 4 jobs
CPython 3.9 in Cygwin: 1 job
Pyston 3.8 on Ubuntu: 1 job
CPython 3.7 and 3.11 on Homebrew: 2 jobs
a mypy job,
the precommit tests,
the Sage build job and the 8 Sage test jobs.

That's 25 jobs total.
I've experimented with running the Sage workflow only of the tests workflow succeeds but that has the annoying consequence of removing the Sage workflow test results from the PR view. The only way I know to avoid this is to have the Sage jobs defined in the same workflow as the other tests, but it does not seem very tidy.

Would it be possible to run everything on the main branch, but a fewer jobs on PRs? Sometimes there are version specific issue, that we still want to catch, but as they are not common enough it might be hard to justify doing that in PRs.

Sure, but you would most likely end up enabling the skipped tests in the PR that tries to fix the issues founds on main. Not a big deal, if infrequent enough. We could have the Sage tests run on push to main only. These are the ones that take the most time and are unlikely to catch anything not caught by the other tests.

I think the Sage tests are useful in PRs, as they test real work scenarios, but I don't we need these many in PRs. We could have only archlinux and conda-forge, for eg.

Can do that. Not running the gentoo test on PRs is already a big saving.

The workflow definition look a bit convoluted, but it achieves what we want. I'm surprised that the Sage jobs take so long, but that's a fight for another time. @FFY00 Unless there is something you don't like, I'll like to merge this soon as it is a big improvement upon the current status.

@dnicolodi yes, sounds good. I am gonna tag a release, feel free to merge afterwards.

I would appreciate having the documentation for the new options before the release. But I can live without that.

I did not do that because we really needed a release, and we are planning a documentation rewrite anyway (#197)  :sweat_smile:


Privacy: Disable all external request to deployer.org by default

I recently started using Deployer 7.4 as a replacement for Fabric as my deployment tool, but I've noticed a delay of 1-5 seconds when executing tasks. After some investigation, I found that Deployer is making requests to three URLs during task execution:

https://deployer.org/check-updates/7.4.0
https://deployer.org/api/stats
https://deployer.medv.io/banners/

Since I am in China, where access to foreign URLs is slower, these requests are causing the delay. The last two requests can be disabled through different environment variables (DEPLOYER_BANNER, DO_NOT_TRACK), but the check for updates cannot be disabled.
Based on issues #1196, #1477, and #3577, I suggest that you carefully consider the privacy implications of these three requests. Since the allow_anonymous_stats setting has been removed, users are not informed that Deployer will make these three requests by default, even after running the dep init command. I suggest that in future updates, Deployer should avoid making these requests by default and instead add configuration options such as allow_anonymous_stats, allow_banner, and allow_check_update. Additionally, dep init could include prompts (with default answers being "yes"), and only after receiving explicit consent or finding an explicit declaration in the deployer.php script should these requests be sent.
I appreciate your hard work, and I understand how these features contribute to the project's growth. However, as Deployer is now a well-known PHP open-source project, making external requests without consent could lead to significant privacy and security concerns. If you agree, I would be happy to submit a PR.
(Translated from Chinese by ChatGPT)
--
Chinese version:
我最近开始使用deployer 7.4替代fabric作为我的部署工具，但执行task时经常有1-5秒的卡顿，经过排查，我发现deployer在执行task时会请求三个地址：

https://deployer.org/check-updates/7.4.0
https://deployer.org/api/stats
https://deployer.medv.io/banners/

我在中国，访问国外URL较慢，所以这三个请求造成了卡顿。后两个请求可以通过不同的环境变量（DEPLOYER_BANNER、DO_NOT_TRACK）禁用，而检查更新的链接无法禁用。
根据 #1196 #1477 #3577，我建议您慎重考虑这3个请求带来的隐私问题，由于allow_anonymous_stats设置已经被取消，即使通过dep init命令也无法得知deployer会默认执行3个请求。我建议deployer在日后的更新中默认不做这3个请求，增加配置项allow_anonymous_stats/allow_banner/allow_check_update，在dep init中增加询问（默认答案可以是yes），仅在询问后得到肯定或deployer.php脚本中存在显式声明时才发送这些请求。
感谢您的辛勤工作，我理解这些feature对项目成长的帮助。但deployer现在已经是一个著名的PHP开源项目，未经同意就请求外部链接可能造成严重的隐私和安全问题。如果您同意，我可以提交一个PR。

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

Sure let’s consider adding one place of configuration.

Here are my suggests:
https://deployer.org/check-updates/7.4.0
Add auto_check_update config, false by default, ask in dep init and default answer is yes
https://deployer.org/api/stats
Add allow_anonymous_stats config, false by default, ask in dep init and default answer is yes. Environment variable DO_NOT_TRACK=true is also accepted (with lower priority than config) to be compatible with old version user.
https://deployer.medv.io/banners/
Looks like deprecated, maybe remove directly?