Socket.io in sails 1.0 version listen custom event with websocket

Can sails 1.0 version listen on the custom event like "mymessage" which emited by android client?  What i just saw is that the sails server can emit message by websocket with the wrapper socket.io ,but i didn't find how to listen custom event as normal socket.io server did using  on('mymessage' , data ,function()) method.
Does it mean the android client only can emit something to sails server by http post or get method?
So confused.Need some help.

@jituijiaqiezi I have the same question, could you solve it?


Add AirMount Latest

Adding a new cask

[x] Checked there aren’t open pull requests for the same cask.
[x] Checked there aren’t closed issues where that cask was already refused.
[x] When naming the cask, followed the token reference.
[x] Commit message includes cask’s name.
[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] brew cask install {{cask_file}} worked successfully.
[x] brew cask uninstall {{cask_file}} worked successfully.

As it is brew cask uninstall ... will uninstall everything that has been installed with brew cask install ...
Perhaps it is better not to remove 'com.github.osxfuse.pkg.Core' in case it has been installed independently, and instead issue a warning?


Any User Can Set Kudos Anonymously

BUG
Current Behavior
Full report here:
https://cobalt.io/dosomething/dosomething/reports/97
Desired Behavior
Provide authentication mechanism for Kudos to be restricted to individual user and not over-rideable.
Steps to Replicate
Check Cobalt report, or with @deadlybutter who's also re-created it.
Why This Matters
We want kudos to accurately reflect use trends and likes, and not be open to spammable/botnet behavior.

@angaither Assign out as needed.

@deadlybutter mind taking a 👀  here since you replicated?

@angaither as I mentioned in #security -- this feels like a good thing for oAuth to take care of. In the short term I guess we can use the csrf to validate in some way, ill have to poke diego about this one as im not familiar with how the api does auth

The authenticated user's session token and CSRF token should both be sent with all AJAX requests already, so you can compare the $user parameter against the :user_id in the endpoint function. Could work elegantly with an OAuth access token, but by no means requires it! :)

things I would have never known before! thanks @DFurnes


Installation not working

I tried to follow the installation as described in the README and failed at several points.
Image Build
First I failed at the terraform apply for the build infrastructure and hat to adopt the name of the floating ip network:
diff --git a/hack/packer-infrastructure/variables.tf b/hack/packer-infrastructure/variables.tf
index 1ea4f4c..c366e21 100644
--- a/hack/packer-infrastructure/variables.tf
+++ b/hack/packer-infrastructure/variables.tf
@@ -1,4 +1,4 @@
 variable "floating_ip_network_name" {
-  default = "floating-net"
+  default = "extnet"
   description = "Name of the network your floating IPs are hosted in"
 }

And set a DNS server for the created network:
diff --git a/hack/packer-infrastructure/network.tf b/hack/packer-infrastructure/network.tf
index 3fa8859..b90df5e 100644
--- a/hack/packer-infrastructure/network.tf
+++ b/hack/packer-infrastructure/network.tf
@@ -8,6 +8,7 @@ resource "openstack_networking_subnet_v2" "packer" {
   network_id = openstack_networking_network_v2.packer.id
   cidr       = "<IP_ADDRESS>/24"
   ip_version = 4
+  dns_nameservers = [ "<IP_ADDRESS>" ]
 }

Next fail was at the earthy build. To make that work I had to adopt the flavor type and volume type:
diff --git a/image/alpine-yawol.pkr.hcl b/image/alpine-yawol.pkr.hcl
index 13531da..b231088 100644
--- a/image/alpine-yawol.pkr.hcl
+++ b/image/alpine-yawol.pkr.hcl
@@ -35,7 +35,7 @@ variable "security_group_id" {

 variable "machine_flavor" {
   type        = string
-  default     = "c1.2"
+  default     = "my_tiny_flavor"
   description = "The ID, name, or full URL for the desired flavor for the server to be created."
 }

@@ -65,7 +65,7 @@ source "openstack" "yawollet" {
   ssh_username            = "alpine"
   use_blockstorage_volume = true
   volume_size             = 1
-  volume_type             = "storage_premium_perf6"
+  volume_type             = "__DEFAULT__"
   ssh_timeout             = "10m"
   image_tags              = var.image_tags
 }

After that I got the yawol-alpine-v0.11.0-1 image.
Cluster Installation
At the cluster installation it would be nice to have a link how to install VerticalPodAutoscaler (which is not that hard to find, but would make life easier :smile_cat: ).
I had to create the Secret in namespace kube-system otherwise the controller did not find it.
In the Secret there is some tenant-name which is no (more) used in OpenStack. So it's not clear was needs to be provided here.
The images referenced in the helm chart do not exist, I adopted the values.yaml to make that work:
diff --git a/charts/yawol-controller/values.yaml b/charts/yawol-controller/values.yaml
index acc96a9..a423ff8 100644
--- a/charts/yawol-controller/values.yaml
+++ b/charts/yawol-controller/values.yaml
@@ -17,13 +17,13 @@ yawolCloudController:
   clusterRoleEnabled: true
   image:
     repository: ghcr.io/stackitcloud/yawol/yawol-cloud-controller
-    tag: latest
+    tag: v0.11.0

 yawolController:
   gardenerMonitoringEnabled: false
   image:
     repository: ghcr.io/stackitcloud/yawol/yawol-controller
-    tag: latest
+    tag: v0.11.0

The provided example service is not working out-of-the-box, because of the set yawol.stackit.cloud/className: "test". After commenting this out, the service gets handled by the yawol controller.
Finally I have to give up with this error:
1.6742993640043612e+09	ERROR	Reconciler error	{"controller": "loadbalancer", "controllerGroup": "yawol.stackit.cloud", "controllerKind": "LoadBalancer", "loadBalancer": {"name":"yawol-test--lb-test","namespace":"kube-system"}, "namespace": "kube-system", "name": "yawol-test--lb-test", "reconcileID": "bd3a2b22-c3ff-48f4-bc0f-a7d897195d18", "error": "You must provide exactly one of DomainID or DomainName to authenticate by Username"}

Any hints are welcome as I would like to see it running :space_invader:

Talk to HARMONY ONE  Support on the Harmony Live support  so that your issue can be looked into.

Hi @mauhau,
thank you for sharing your experience and showing the weak points of the documentation.
Image build
I will add there some more docs to show which settings depends on the openstack installation.
Cluster Installation
You are right in the default helm values for yawol a VerticalPodAutoscaler is needed. You can disable VPA in the Helm values with vpa.enabled: false.
I think we should disable it by default or check somehow if VPA is available in the k8s cluster (what do you think @breuerfelix @einfachnuralex).
You are right tenant-name is not used in openstack. I looked it up and currently it is needed to set it to the ProjectName (so for now please set the tenant-name to the name of your openstack project). Also the project-name which is shown in the docs, is not used. I will "fix" that and also add more info in the docs about it.
@breuerfelix should we build also latest or pin fixed image in the helm values? I think pinned images makes more sense because latest would result in an update on the cluster without the crds getting updated.
The example service is used for the development environment (docs). This setting is needed to be able to run multible yawol-cloud-controllers. In the default every k8s service of type LoadBalancer without that is is used by yawol.
Your last error looks like a error with the login into openstack. I think the domain-name is missing in your secret.
I hope this helps you to get it running 😃

Great, thank you.
For the documentation of the secret I would propose something like this:
apiVersion: v1
kind: Secret
metadata:
  name: cloud-provider-config
type: Opaque
stringData:
  cloudprovider.conf: |-
    [Global]
    auth-url="<OS_AUTH_URL>"
    domain-name="<OS_USER_DOMAIN_NAME>"
    tenant-name="<OS_PROJECT_NAME>"
    project-name="<OS_PROJECT_NAME>"
    username="<OS_USERNAME>"
    password="<OS_PASSWORD>"
    region="<OS_REGION_NAME>"

After setting the secret correctly yawol creates SecGroup, FloatingIP and Port, but no Server:
1.6744837509860816e+09  INFO    controller.LoadBalancer Reconcile Openstack     {"lb": "yawol-test--lb-test3"}
1.6744837509861178e+09  INFO    controller.LoadBalancer Reconcile SecGroup      {"lb": "yawol-test--lb-test3"}
1.6744837514294589e+09  INFO    controller.LoadBalancer Create SecGroup {"lb": "yawol-test--lb-test3"}
1.6744837517297585e+09  INFO    controller.LoadBalancer Reconcile SecGroupRules {"lb": "yawol-test--lb-test3"}
1.6744837517299604e+09  DEBUG   events  Warning {"object": {"kind":"LoadBalancer","namespace":"kube-system","name":"yawol-test--lb-test3","uid":"d3f44e80-0747-4eef-98dd-d0f66e23fcd5","apiVersion":"yawol.stackit.cloud/v1beta1","resourceVersion":"1016080"}, "reason": "Warning", "message": "DebugSettings are enabled, Port 22 is open to all IP ranges."}
1.6744837533923779e+09  INFO    controller.LoadBalancer Reconcile FloatingIP    {"lb": "yawol-test--lb-test3"}
1.6744837534356053e+09  INFO    controller.LoadBalancer Create FloatingIP       {"lb": "yawol-test--lb-test3"}
1.6744837538124757e+09  INFO    controller.LoadBalancer Update ExternalIP       {"lb": "yawol-test--lb-test3"}
1.6744837538338878e+09  INFO    controller.LoadBalancer Reconcile Port  {"lb": "yawol-test--lb-test3"}
1.6744837539900713e+09  INFO    controller.LoadBalancer Create Port     {"lb": "yawol-test--lb-test3"}
1.6744837544405751e+09  INFO    controller.LoadBalancer successfully created port       {"id": "5a673b2a-6225-453e-bd73-c798f1f36d88", "lb": "kube-system/yawol-test--lb-test3"}
1.6744837549955077e+09  INFO    controller.LoadBalancer Reconcile FIPAssociate  {"lb": "yawol-test--lb-test3"}
1.674483755012449e+09   INFO    controller.LoadBalancer Bind FloatingIP to Port {"lb": "yawol-test--lb-test3"}
1.6744837557283204e+09  INFO    controller.LoadBalancer Reconcile Openstack     {"lb": "yawol-test--lb-test3"}
1.6744837557283442e+09  INFO    controller.LoadBalancer Reconcile SecGroup      {"lb": "yawol-test--lb-test3"}
1.6744837559698987e+09  INFO    controller.LoadBalancer Reconcile SecGroupRules {"lb": "yawol-test--lb-test3"}
1.6744837559700172e+09  DEBUG   events  Warning {"object": {"kind":"LoadBalancer","namespace":"kube-system","name":"yawol-test--lb-test3","uid":"d3f44e80-0747-4eef-98dd-d0f66e23fcd5","apiVersion":"yawol.stackit.cloud/v1beta1","resourceVersion":"1016099"}, "reason": "Warning", "message": "DebugSettings are enabled, Port 22 is open to all IP ranges."}
1.6744837564755807e+09  INFO    controller.LoadBalancer Reconcile FloatingIP    {"lb": "yawol-test--lb-test3"}
1.6744837564999213e+09  INFO    controller.LoadBalancer Reconcile Port  {"lb": "yawol-test--lb-test3"}
1.674483756517218e+09   INFO    controller.LoadBalancer Reconcile FIPAssociate  {"lb": "yawol-test--lb-test3"}
1.6744839279968724e+09  INFO    controller.LoadBalancer LoadBalancer not found  {"lb": "kube-system/yawol-test--lb-test"}
1.6744840405738192e+09  INFO    controller.LoadBalancer LoadBalancer not found  {"lb": "kube-system/yawol-test--lb-test2"}

Any hints how to debug/fix this?

In the Log of the yawol-controller-loadbalancermachine I can find this error:
1.6744890245824962e+09  INFO    controller.LoadBalancerMachine  Check SA        {"loadBalancerMachineName": "default--lb-test-zizxkwex25rbtquw-cdbe6"}
1.674489024582533e+09   INFO    controller.LoadBalancerMachine  Check role      {"loadBalancerMachineName": "default--lb-test-zizxkwex25rbtquw-cdbe6"}
1.6744890245825515e+09  INFO    controller.LoadBalancerMachine  Check rolebinding       {"loadBalancerMachineName": "default--lb-test-zizxkwex25rbtquw-cdbe6"}
1.6744890250379155e+09  ERROR   Reconciler error        {"controller": "loadbalancermachine", "controllerGroup": "yawol.stackit.cloud", "controllerKind": "LoadBalancerMachine", "loadBalancerMachine": {"name":"default--lb-test-zizxkwex25rbtquw-cdbe6","namespace":"kube-system"}, "namespace": "kube-system", "name": "default--lb-test-zizxkwex25rbtquw-cdbe6", "reconcileID": "5d85e00a-3f04-4ee5-ba88-504a1b268c0c", "error": "secret not found for serviceAccount default--lb-test-zizxkwex25rbtquw-cdbe6"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:234

Yes, I know it's another service now :smile:

I think we found the problem.
We are using kubernetes 1.25.5 and after manually creating the secret for the service account reconciled by yawol-controller following this documentation we finally got a working loadbalancer machine :space_invader:
So maybe you should mention which kubernetes versions are currently supported by yawol.

Yes that is correct currently it is only with 1.23 or less. We will add support for that soon :)
I created some issues to track that topics: #98 #99 #100 #101

Hi @mauhau,
thanks again for your feedback.
We solved all your points in the version v0.12.0:

Support for kubernetes versions 1.24.x or higher
Fix helm chart image tag
Improve image build, make OpenStack specific settings configurable
Make VPA optional
project-id is now also supported in the secret

We would be happy if you could look over the changes and give us feedback again.

Hey @dergeberl,
thank you for the update! I will check that soon and will update the issue. Sounds great!
Another question not related to this issue:
If we want to use the yawol loadbalancer for Gardener Shoot clusters, is there any documentation how to do that?

Hey @dergeberl,
thank you for the update! I will check that soon and will update the issue. Sounds great!
Another question not related to this issue: If we want to use the yawol loadbalancer for Gardener Shoot clusters, is there any documentation how to do that?

If you use gardener too then you would most likely write an extension for yawol. At least that is what we did, unfortunately that extension is not public yet.

I just tested the updates. It works almost perfect now.
The only problem which remained is the Secret cloud-provider-config. There is the namespace kube-system missing and it is not allowed to set as well domain-name and domain-id:
ERROR	Reconciler error	{"controller": "loadbalancer", "controllerGroup": "yawol.stackit.cloud", "controllerKind": "LoadBalancer", "loadBalancer": {"name":"default--nginx","namespace":"kube-system"}, "namespace": "kube-system", "name": "default--nginx", "reconcileID": "d78086e0-e213-483d-92d1-cb2d11c6c936", "error": "You must provide exactly one of DomainID or DomainName to authenticate by Username"}

Hence I would suggest it in the documentation like this:
apiVersion: v1
kind: Secret
metadata:
  name: cloud-provider-config
  namespace: kube-system
type: Opaque
stringData:
  cloudprovider.conf: |-
    [Global]
    auth-url="<OS_AUTH_URL>"
    domain-name="<OS_USER_DOMAIN_NAME>"
    # specifiy either domain-name or domain-id (mutual exclusive)
    # domain-id="<OS_DOMAIN_ID>"
    # Deprecated (tenant-name): Please use project-name, only used if project-name is not set.
    # tenant-name="<OS_PROJECT_NAME>"
    project-name="<OS_PROJECT_NAME>"
    project-id="<OS_PROJECT_ID>"
    username="<OS_USERNAME>"
    password="<OS_PASSWORD>"
    region="<OS_REGION_NAME>"

Everything else is working. Great job :+1:
You could improve the documentation for build with a hint earthly +build-packer-environment... will show required variables for Build yawol OpenStack Image.
And installation / use of Yawol could be easier if helm charts are available as tgz artifact in the release as well as the ready OpenStack image. But you probably know that already.

And just found another one.
The CRD allows not the values for serverGroupPolicy as documented:
2023-02-03T16:35:33.600761470Z 1.6754421336006477e+09	ERROR	Reconciler error	{"controller": "loadbalancer", "controllerGroup": "yawol.stackit.cloud", "controllerKind": "LoadBalancer", "loadBalancer": {"name":"default--nginx","namespace":"kube-system"}, "namespace": "kube-system", "name": "default--nginx", "reconcileID": "f5e3dac9-c35b-4137-b979-e182837ca9f0", "error": "Bad request with: [POST https://***:32443/v2.1/os-server-groups], error message: {\"badRequest\": {\"code\": 400, \"message\": \"Invalid input for field/attribute 0. Value: soft-anti-affinity. 'soft-anti-affinity' is not one of ['anti-affinity', 'affinity']\"}}"

I just tested the updates. It works almost perfect now.
The only problem which remained is the Secret cloud-provider-config. There is the namespace kube-system missing and it is not allowed to set as well domain-name and domain-id:
ERROR	Reconciler error	{"controller": "loadbalancer", "controllerGroup": "yawol.stackit.cloud", "controllerKind": "LoadBalancer", "loadBalancer": {"name":"default--nginx","namespace":"kube-system"}, "namespace": "kube-system", "name": "default--nginx", "reconcileID": "d78086e0-e213-483d-92d1-cb2d11c6c936", "error": "You must provide exactly one of DomainID or DomainName to authenticate by Username"}

Hence I would suggest it in the documentation like this:
apiVersion: v1
kind: Secret
metadata:
  name: cloud-provider-config
  namespace: kube-system
type: Opaque
stringData:
  cloudprovider.conf: |-
    [Global]
    auth-url="<OS_AUTH_URL>"
    domain-name="<OS_USER_DOMAIN_NAME>"
    # specifiy either domain-name or domain-id (mutual exclusive)
    # domain-id="<OS_DOMAIN_ID>"
    # Deprecated (tenant-name): Please use project-name, only used if project-name is not set.
    # tenant-name="<OS_PROJECT_NAME>"
    project-name="<OS_PROJECT_NAME>"
    project-id="<OS_PROJECT_ID>"
    username="<OS_USERNAME>"
    password="<OS_PASSWORD>"
    region="<OS_REGION_NAME>"

Everything else is working. Great job 👍
You could improve the documentation for build with a hint earthly +build-packer-environment... will show required variables for Build yawol OpenStack Image.
And installation / use of Yawol could be easier if helm charts are available as tgz artifact in the release as well as the ready OpenStack image. But you probably know that already.

This is already documented. Just above the example :)

Note: At most one of domain-id or domain-name and project-id or project-name must be provided.

And just found another one.
The CRD allows not the values for serverGroupPolicy as documented:
2023-02-03T16:35:33.600761470Z 1.6754421336006477e+09	ERROR	Reconciler error	{"controller": "loadbalancer", "controllerGroup": "yawol.stackit.cloud", "controllerKind": "LoadBalancer", "loadBalancer": {"name":"default--nginx","namespace":"kube-system"}, "namespace": "kube-system", "name": "default--nginx", "reconcileID": "f5e3dac9-c35b-4137-b979-e182837ca9f0", "error": "Bad request with: [POST https://***:32443/v2.1/os-server-groups], error message: {\"badRequest\": {\"code\": 400, \"message\": \"Invalid input for field/attribute 0. Value: soft-anti-affinity. 'soft-anti-affinity' is not one of ['anti-affinity', 'affinity']\"}}"

The error is coming from your openstack API.

Ah. Now I see the Note above the example :smile:
The other point is weird. My OpenStack is fine with soft-anti-affinity:
(openstack) $ openstack server group list
+--------------------------------------+-------------------+--------------------+
| ID                                   | Name              | Policy             |
+--------------------------------------+-------------------+--------------------+
| fa8aa365-0070-4e1e-a9dd-501933653b63 | k8s-node-srvgrp   | soft-anti-affinity |
| d9177be6-6718-4516-8b7c-a65f0d5e03e8 | k8s-master-srvgrp | soft-anti-affinity |
+--------------------------------------+-------------------+--------------------+

But I also see in the log it was returned by OpenStack API.

Ah. Now I see the Note above the example 😄
The other point is weird. My OpenStack is fine with soft-anti-affinity:
(openstack) $ openstack server group list
+--------------------------------------+-------------------+--------------------+
| ID                                   | Name              | Policy             |
+--------------------------------------+-------------------+--------------------+
| fa8aa365-0070-4e1e-a9dd-501933653b63 | k8s-node-srvgrp   | soft-anti-affinity |
| d9177be6-6718-4516-8b7c-a65f0d5e03e8 | k8s-master-srvgrp | soft-anti-affinity |
+--------------------------------------+-------------------+--------------------+

But I also see in the log it was returned by OpenStack API.

 Sometimes there a multiple API versions for different openstack identity providers. But I'm not that openstack expert 🤷, sorry.

Good point. Nova API of my OpenStack Yoga returns version 2.90 and according to the OpenStack API documentation this should be fine. Stays weird :confused:

@mauhau can we close this issue? 🙂

Thank you for asking. I'm closing this issue :smile:


Can you release a windows 1.4.2 ASAP as I have the bug closed in #292 and do not have a build that works?

Can you release a windows 1.4.2 ASAP as I have the bug closed in #292 and do not have a build that works?

No eh, good job.


Changelog isn't publicly viewable

There's a link to the changelog in the docs: https://mailcoach.app/docs/v2/package/general/changelog
But it links to a private repo.
Maybe that file should be copied to the docs repo?
The current workaround is to view the changelog from the source code in the /vendor/spatie/laravel-mailcoach folder

In the account section on https://mailcoach.app, you can request access to that repo.
Alternatively, the changelog is also publicly available here: https://mailcoach.app/roadmap


⚠ PrivateHD has degraded performance

In d251d1c, PrivateHD ($PHD) experienced degraded performance:

HTTP code: 200
Response time: 1944 ms

Resolved: PrivateHD performance has improved in eee6646.


ActiveRecord collection not (obviously) sorted by score

All this came about when updating from Rails 4.2 to Rails 5.
I have hade some trouble with Elasticsearch not returning ActiveRecord models in order of score.
Reviewing the response, I can see that they are correctly returned in order by score so that:
response.map(&:id)
# => ["13", "12"]

However this is not what I want:
response.records.map(&:id)
# => [12, 13]

And this is where you might thing.. well you need to call to_a on the records. And yes, that works.
response.records.to_a.map(&:id)
# => [13, 12]

Just as the README states, it runs the corresponding SQL with only a WHILE statement. This confused me, where do you sort!?
https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/README.md#search-results-as-database-records
The sorting is done when explicitly calling to_a. This is of course fine, but this isn't the big thing that confused me or where my errors appeared.
I first used this solution, but I thought it was rather ugly. This way I get the records sorted properly from the database, on primary key and not undefined behaviour.
response.records.order("FIELD (`table_name`.`primary_key`, 13, 12)").to_a.map(&:id)
# => [13, 12]

But scrap that, I don't want to write custom SQL for which should happen automagically.
So why am I writing this loooong wall of text.. Well, it seems like Rails has changed how it uses implicit convertions.. or something.. so.. This is probably where something happens (or more likely doesn't happen):
# Wrong ordering
render json: records

Because if I explicitly convert to array, all is well.
# Correct ordering
render json: records.to_a

This might be more of a gotcha, but it was a pain for me, and might be for others.
Is there a better way of doing this? Some other intended use? Is this dumb? Could the "default" order be done like I did it? Ideas? Dumb?

Possibly related:

https://github.com/elastic/elasticsearch-rails/issues/258
https://github.com/elastic/elasticsearch-rails/issues/594
https://github.com/elastic/elasticsearch-rails/issues/546
https://github.com/elastic/elasticsearch-rails/issues/169
https://github.com/elastic/elasticsearch-rails/issues/568

As a stop gap, I have been using this custom ElasticRelation class to wrap around records:
rows = ElasticRelation.new Row.search(params).records

It essentially sorts in memory as originally implemented here:
https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/lib/elasticsearch/model/adapters/active_record.rb#L35:
  def sorted_by_score
    hits = records.response.response.hits.hits
    records.sort_by do |record|
      hits.index { |hit| hit['_id'].to_s == record.id.to_s }
    end
  end

Figuring out how to plug this into Rails 5 AR is the fun part.

AR 5 delegates array methods on records instead of to_a
Delegation: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/relation/delegation.rb#L39
records method: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/relation.rb#L257
I guess the name of the singleton method redefined by elasticsearch-models should depends on ActiveRecord version

Confirmed about the bug happening for Rails 5 upgrading from Rails 4.2

Any progress on this?

I think it has been merged. Read the comments on the referenced PR.

First of all, my apologies, @alexceder, for not responding to this issue sooner, and many thanks for the care you took in providing all the details in the issue description. Also, many thanks for everyone responding on this thread!
As @johanlunds says, the fix by @inkstak has indeed been merged through pull request https://github.com/elastic/elasticsearch-rails/pull/618.
To reply to the original question by @alexceder, I do agree that the whole story about needing to call to_a on the records object has been confusing, and I can imagine that many people have walked into that trap. However, at the time I couldn't figure out any other way how to do it, because I wanted the records object to be a true instance of ActiveRecord::Relation, so you can call eg. join on it, or do any other SQL tricks. I can imagine there was such a way, but I simply wasn't able to find it.
@alexceder, @sr3d, can you check your code with the current master, which contains the patch, and verify that it works as expected, and that there's less confusion about it in the application code? If you'd find any discrepancies or problems, I'd like to add tests for them in https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/test/integration/active_record_basic_test.rb#L108-L121 to be able to fix them in an organized manner.

I'm also having this issue with Mongoid ;/


Add some derived tags from theme.toml

Many Hugo themes are being ported from existing open source themes created by authors on other static site generators. One rising star I've noticed is hugo-tranquilpeak-theme, which is a port from Hexo.
Based on the values provided in in theme.toml we have the ability to generate taxonomy for themes based on whether or not they're ported or unported.
Wanted to float this as I could see it being of value for authors looking to create derivative works and looking for a quick slice of the data on where to start. It also helps identify themes with less potential licensing snafus for those extending.
Thoughts?

I'll bring this up in the forums to help keep the repo clean.

Reopening as I think this is a great idea. Looking at the TAG cloud, it could use some common tags, so to speak.
name = "Hyde"
license = "MIT"
licenselink = "https://github.com/spf13/hyde/blob/master/LICENSE.md"
description = "An elegant open source and mobile first theme"
homepage = "http://siteforthistheme.com/"
tags = ["blog", "company"]
features = ["blog", ]
min_version = 0.13

[author]
    name = "spf13"
    homepage = "http://spf13.com/"

# If porting an existing theme
[original]
    author = "mdo"
    homepage = "http://hyde.getpoole.com/"
    repo = "https://www.github.com/mdo/hyde"

Of the above we could generate:

License
Ported (i.e. if "[original]" is set)
Min Hugo version (round it to "main release")

Thanks @bep. Perhaps this will help open the path to the later creation of a features taxonomy as well, helping theme authors start standardizing on the conventions used for naming features provided in their programs instead of stuffing them into the tags section.

Another possible derived tag: use of template inheritance, e.g. includes baseof.*

Inferred/derrived tag could be theme version based on SemVer. Thought of it after seeing https://github.com/spf13/hugoThemes/issues/259#issuecomment-302991829
The way Composer handles this could be mimicked so one is not required to keep a version in their theme.toml


Fix Biosample

The script was using the wrong accession to grab BioSample data and so skipped that info

fixed to use correct accession

The script was using "unknown" as sample name when it could not find info, but this means all samples would be merged

switched to use BioSample accession when other info not found, so all data from same sample will be merged

Thanks, Leanne, tested it, works.

@ens-ftricomi can we get this merged and come back to the Travis failure as it's blocking some pipelines to not be able to download the data
Thank you!


Fix browse by title filter doesn't work with diacritics

References

Fixes #8434

Description
Change the default normalization of the indexed text used for sorting and filtering titles to strip the diacritics.
It is similar to the PR applied for filtering accented content in subject/author indexes: #2698
Instructions for Reviewers
To test the changes:

Publish an item with an accented title and another with an unaccented title. By example: "Número 1" and "Numero 2"
Filter by title with value: "Número". Should return the two items.
Filter by title with value: "Numero".  Should return the two items.

List of changes in this PR:

Apply the StripDiacritics filter to the normalization of indexed titles
Applies the same normalization to the user-input text when the user is filtering by title
Include a new test to check the behavior with diacritics
Correct two comments that I forgot to change in PR #2698

Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

[x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
[x] My PR passes Checkstyle validation based on the Code Style Guide.
[x] My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
[x] My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
[x] If my PR includes new, third-party dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
[x] If my PR modifies the REST API, I've linked to the REST Contract page (or open PR) related to this change.

@tdonohue , @toniprieto  after last change, code looks good to me.


Improve Media Selection Logic for Duplicate Resolution

Challenge Description
Our EmbyDedupe script identifies duplicates purely based on media metadata available from Emby's API. It then selects one media item to keep and marks the rest for deletion. The logic behind the selection of the 'best' copy among duplicates primarily considers basic attributes such as resolution and bitrate. However, this approach could be improved by adopting a more sophisticated multi-criteria rating system encompassing a broader range of media quality metrics such as codec efficiency, audio quality, frame rate, HDR presence, etc.
Objective
The goal is to enhance the duplicate resolution logic to make a more informed decision when selecting the highest quality media item to retain. This will necessitate devising a weighted scoring system where each media attribute contributes to a composite 'quality score' for each media item. The item with the highest score would be presumed to be of the best quality and retained, while the others would be marked for deletion.
Criteria for Quality Assessment
Key criteria to be considered in the scoring system should include, but not be limited to:

Resolution: Both width and height dimensions.
Video Codec Efficiency: Efficiency of video codecs such as H.264, HEVC (H.265), VP9, and AV1.
Audio Quality: Channel count, audio codec type, and bitrate.
File Size: Generally, larger file sizes suggest higher quality, but this should be weighted less heavily than other criteria to account for codec efficiency.
Frame Rate: Actual frame rate information from the media, with a preference for higher rates.
HDR Presence: Whether the video has HDR generally improves viewing quality.

Other factors may also be considered where relevant, such as the colour depth, the presence of subtitles, and multiple language tracks.
Discussion Points
Before we implement these changes, we need to address several considerations:

Determining the appropriate weight for each criterion based on its significance towards perceived media quality.
Ensuring the system is flexible enough to handle future updates or new media attributes.
Evaluating the computational complexity of the new selection logic and its impact on the script's performance, especially when dealing with large libraries.

I would appreciate feedback and thoughts on the proposed changes, including any additional criteria that might be relevant or potential pitfalls we should be aware of. Let's fine-tune our approach to establish a robust logic for media selection that satisfies our need for high-quality content.
Action Items

[ ] Discuss and finalize the criteria and their respective weights for the quality assessment formula.
[ ] Update the determine_items_to_delete function to incorporate the new weighted scoring system.
[ ] Test and validate the new media selection logic to ensure its accuracy and efficiency.
[ ] Document the changes and their rationale for future reference and maintenance.

Ah Interesting.
I've been using Sonarr / Radarr etc to do that, and the dedupe script to just get rid of the massive bulk and duplication - but a target is a good idea.
Given this does a library at a time though, it would be a target for the whole library.


libxss.so.1 dependency

on Debian, it seems that you need to install libXss.so.1, which can be done via sudo apt-get install libxss1.
This should probably be documented in the readme.

It should be noted also that this is a dependency of electron.


Fix RDS parameter group upgrading to create_before_destroy

Ticket
N/A
Changes
When upgrading to v0.10.0, we hit an undocumented breaking change - the
change of the RDS parameter group name necessitates Terraform recreate
the resource. But, the parameter group cannot be destroyed while the
running database is currently using it.
By creating a new parameter group first (before destroying the old one),
we can handle upgrades to the parameter group without causing breaking
changes.
Context for reviewers
This was an obstacle we hit while doing an upgrade from v0.8.0 -> v0.12.2 on Facing Financial Shock.
Testing
Tested that adding create_before_destroy here seems to have worked by applying the change and verifying that the new parameter group is in use.

If you don't mind waiting a couple of days to merge, I can test this out myself and confirm that's the case, and then I'll simplify the accompanying documentation accordingly.

We're in no rush, I added this locally and it worked for us when the DB param group was renamed from "app-dev" to "app-dev-14". If we were actually doing a major version upgrade, I think it would still work according to the instructions for copying the parameter group into a new one named "app-dev-16". So yeah, testing sounds good, but I don't think it should change the workflow for upgrading the database that much?

My understanding from @KevinJBoyer 's comment was that he was going to test something out, so I believe the ball was in his court to figure out next steps. Once he gives us guidance we can decide what to do next with this PR (close or merge)

@lorenyu @tdooner I was trying to test the upgrade path from just prior to my PR (3000e444bb7c874c6f806a6f3c2d7fbb00336e88) to this one, so I could understand if there was a reason I hadn't opted for this approach originally, but I hit a few obstacles along the way to doing so in my current AWS account, and I don't want to be a blocker since it's been three weeks -- I can still test on my own time in the future to improve my understanding, so recommend we merge this in and I will follow up with an update PR for the documentation.


Bugfix for orchestration across google and azure

Signed-off-by: Dylan Ham<EMAIL_ADDRESS>

Codecov Report

Merging #256 (f783122) into main (c5eb06f) will increase coverage by 0.70%.
The diff coverage is 71.42%.

Additional details and impacted files

@@            Coverage Diff             @@
##             main     #256      +/-   ##
==========================================
+ Coverage   88.75%   89.46%   +0.70%
==========================================
  Files          46       46
  Lines        2063     2059       -4
==========================================
+ Hits         1831     1842      +11
+ Misses        160      148      -12
+ Partials       72       69       -3

Impacted Files
Coverage Δ

pkg/orchestrator/applications_service.go
82.05% <71.42%> (+17.41%)
:arrow_up:

Continue to review full report at Codecov.

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


Remarks are incorrect for Absolute mapping mode

The remarks on this EllipseCenter, EllipseRadius, and GradientOriginOffset describe the property behavior when CompositionGradientBrush.MappingMode is set to CompositionMappingMode.Relative. But if it's set to Absolute, the numbers change to be pixels rather than a ratio, and relative to the size of the brush.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a993e0fa-7216-87da-7bba-5b6496b4a206
Version Independent ID: ba9c57f3-522a-1315-fb98-d7caa0dbf2dd
Content: CompositionRadialGradientBrush.EllipseCenter Property (Windows.UI.Composition) - Windows UWP applications
Content Source: https://cpubwin.visualstudio.com/DefaultCollection/windows-uwp/_git/winrt-api-build?path=%2fwinrt-api-build%2fwindows.ui.composition.compositionradialgradientbrush.yml&version=GBlive&_a=contents
Product: uwp
Technology: winrt-reference
Git Login: jwmsft
Microsoft Alias: jimwalk

Thanks for pointing this out. The doc has been updated.


[MECHANIC]: Make Magnetic Ball effect reset

Description of what will be added or updated
When a non active magnetic ball collides with an active magnetic ball and merges, the merged ball will have it's effect reset
Additional Information
No response

Done, but glow effect sometimes persists.


Support Symbols-View

It would be nice, if Command-R would show the scene outline.

That's a really cool idea.  I'm going to be on the road for a few days, but will look into it when I get back.
How would you handle the case where multiple scenes have the same header?  Do you know of any text-like packages that implements symbols?  It doesn't look like the included markdown support registers any.

Github-Markdown and Pandoc-Markdown implements symbols so that Command-R gives me an outline of the headlines.

@juh2, do you have an additional package installed that generates the symbols?  Github Markdown doesn't provide any symbols on my install.

Until a symbols-view API is ready, the place to add symbols definitions is https://github.com/atom/symbols-view/blob/master/lib/.ctags.

The pull-request can be followed at https://github.com/atom/symbols-view/pull/113.

Yes. The Edit-Pane has to be the focus.

Pull-request is merged an in symbols-view 0.100.0.  Should be available in the next Atom update.

Available in Atom 1.0.2.


mwc-button not working with skypack (but mwc-dialog does work)

I'm getting this error from skypack:
/*
 * [Package Error] "@material/mwc-base" no dependency version info found. (Imported by "@material/mwc-button").
 *
 * The package "@material/mwc-button" depends on "@material/mwc-base" as a dependency,
 * but did not list any dependency version info in its package manifest.
 * Without this information, the CDN is unable to properly resolve this import.
 *
 * How to fix:
 *   - Let the "@material/mwc-button" package author know that "@material/mwc-base" needs to be included in their package.json manifest.
 *   - Use https://skypack.dev/ to find a web-friendly alternative to find another package.
 */

throw new Error("[Package Error] \"@material/mwc-base\" no dependency version info found. (Imported by \"@material/mwc-button\").");
export default null;

To reproduce
Just import it:
<script type="module">
import materialMwcButton from 'https://cdn.skypack.dev/<EMAIL_ADDRESS></script>

Importing mwc-dialog from skypack does work, for what it's worth, eg:
import materialMwcDialog from 'https://cdn.skypack.dev/<EMAIL_ADDRESS>

Is this a CDN issue or something wrong with this package?  Seems like it would be the latter.

Hey @treeder. You should change your code a bit to make it work with jsDelivr:
// Import everything
import * as materialMwcButton from 'https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>
// Or use named import
import { Button } from 'https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>

Is this a CDN issue or something wrong with this package?

Neither of those actually. From the package developers' perspective, it's absolutely fine to not provide default export and expect that named exports will be used.
From the CDN perspective - it's fine to keep the behavior of the package and not modify it by adding additional "synthetic" exports etc.


Audio Stream Lag past 20 connections

I am running my bot on a machine with 4 cores and 8gb ram.
Once my bot gets above like 20 voice connections streaming music the audio starts to get laggy.
Why is this happening?

What's the CPU usage of your process?
If your streaming from something like youtube make sure your making a car-full choice in which URL you pass to discordie. I develop pvpcraft and while it used to use discord.js It used the voice components of discordie and the https://qeled.github.io/discordie/#/docs/WebmOpusPlayer?_k=jnq6h0 is absolutely fantastic if you have a webm source. If a webm source is not available you can fallback to ffmpeg and all that. So long as the majority of your streams have a webm source available though you should see a massive performance improvement. Aside from that try sharding.

I've tried to do this but it doesn't seem to like the source even though it is webm.  Any ideas why that is?
Here is the song info from yt-dl:
{ itag: '251',
  clen: '4275911',
  index: '272-727',
  url: 'https://r3---sn-vgqs7nl7.googlevideo.com/videoplayback?ip=<IP_ADDRESS>&clen=4275911&requiressl=yes&mv=m&source=youtube&upn=cx55BvH5SzE&ms=au&ei=EvndWIDnIcrUugKh06nAAg&itag=251&pl=16&mt=1490942123&expire=1490963826&mm=31&mn=sn-vgqs7nl7&id=o-AHAzzQ6DRcywj2VnoMbvNuuUFPpgzU2vglbxn4xx1jRj&keepalive=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&gir=yes&dur=266.221&key=yt6&lmt=1449572507063684&mime=audio%2Fwebm&ipbits=0&initcwndbps=1801250&ratebypass=yes&signature=50A6E56386BE77585C52AA803274AD9BAB213067.B4A595CDD7070F786FCEDC898A784BF03EE9D002',
  init: '0-271',
  xtags: '',
  bitrate: null,
  lmt: '1449572507063684',
  s: '2200D9EE30FB487A898CDECFE87F0707DDC593A4B.760312BAB9DA472608AA25C58577EB6836556A0506505',
  projection_type: '1',
  type: 'audio/webm; codecs="opus"',
  container: 'webm',
  resolution: null,
  encoding: null,
  profile: null,
  audioEncoding: 'opus',
  audioBitrate: 160 }

Here is the error from discordie
[TypeError: Invalid source 'https://r3---sn-vgqs7nl7.googlevideo.com/videoplayback?ip=<IP_ADDRESS>&clen=4275911&requiressl=yes&mv=m&source=youtube&upn=cx55BvH5SzE&ms=au&ei=EvndWIDnIcrUugKh06nAAg&itag=251&pl=16&mt=1490942123&expire=1490963826&mm=31&mn=sn-vgqs7nl7&id=o-AHAzzQ6DRcywj2VnoMbvNuuUFPpgzU2vglbxn4xx1jRj&keepalive=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&gir=yes&dur=266.221&key=yt6&lmt=1449572507063684&mime=audio%2Fwebm&ipbits=0&initcwndbps=1801250&ratebypass=yes&signature=50A6E56386BE77585C52AA803274AD9BAB213067.B4A595CDD7070F786FCEDC898A784BF03EE9D002']


Tree view is not resizable.

The mouse cursor changes when you hover over the edge of the Tree-view area, but nothing happens when you drag it. Dragging to resize split editor panels works just fine.

This is intended behaviour, the TreeView size is set through a field in the config module.

Ohh, OK. In that case, the only real issue is that the mouse cursor still changes to the left/right resize cursor at the edge of it.


Fixing the arbitrary delay time in test

cleans up https://github.com/alphasights/ember-scrollable/issues/73
follow-up to https://github.com/alphasights/ember-scrollable/pull/57

👍  this looks super clean.

👍 nice one!


Allow usage of SID's in group resource as group_name

Hi,
we want to add a user to the group 'Administrators':
group 'Add myUser to Administrators' do
  group_name 'Administrators'
  action :modify
  members 'myUser'
  append true
end

But we need to use it on different localisations of Windows. On a German system Administrators is called Administratoren and on an Italian system the group name is different. But on all systems the group have the same sid's! So I've tried the following code, but it doesn't work:
group 'Add myUser to Administrators' do
  group_name 'S-1-5-32-544'
  action :modify
  members 'myUser'
  append true
end

I've tried Chef::ReservedNames::Win32::Security.lookup_account_sid but was not successful.
I'm not sure if this issue is related to issue #1508.

Tracking with epic https://github.com/chef/chef/issues/4397


Generating valid HTML documents

Hi! This crate was brought to my attention, no doubt as a result of yesterday's release announcement. :)
I wanted to use this to generate a simple but valid HTML document and ran into some troubles immediately. I think there are some older issues (now closed) that are relevant, so I'll link them here:

#1: Most of the issues I had was an inability to add children to "container" elements.
#3: This looks like an aspirational API design, which would be far better than what I came up with.
#12: This would be very much appreciated!

I started with a TDD-style test to generate a full HTML document:
#[test]
fn test_gen_html() {
    let output = gen_html();
    let expected = "<!DOCTYPE html>\
        <html lang=\"en\">\
            <head>\
                <meta charset=\"utf-8\">\
                <title>My site</title>\
            </head>\
            <body>\
                Hello, world!\
            </body>\
        </html>";

    assert_eq!(output, expected);
}

Then I implemented the gen_html() function, and ran into a number of issues. This was the best I could do, along with comments that rationalize the use of string interpolations:
use html::{metadata::Meta, root::Body};

pub fn gen_html() -> String {
    // We cannot add children to the `Head` element.
    // We can't even add text to the `Title` element.
    let head = format!(
        "<head>\
            {meta}\
            <title>My site</title>\
        </head>",
        meta = Meta::builder().charset("utf-8").build()
    );
    let body = Body::builder().text("Hello, world!").build();

    // There is no `DOCTYPE` element.
    // We cannot add children to the `Html` element.
    format!(r#"<!DOCTYPE html><html lang="en">{head}{body}</html>"#)
}

In short, elements like metadata::Title do not have an API for inserting a text child, metadata::Head and root::Html do not have an API for inserting any children (also, Body only allows text children), and there is no element representing <!DOCTYPE html> at all.

The questions I have are:

Is there an alternative API design to the one described in https://github.com/yoshuawuyts/html/issues/3#issuecomment-1501147977 that I haven't seen yet? Or does the API currently exist, and I just haven't been able to find it in the documentation?
I'm guessing the missing APIs are mostly a result of the spec generator not having knowledge of the full document structure. Is this accurate? If anyone were to contribute features to address the shortcomings, would they be adding to html or to html-bindgen? (Both, maybe, depending on context.)
What's the difference between content::Body and root::Body (if any)? Is the duplication an oversight? Which one is considered canonical?
There doesn't appear to be a use for the TextElement trait. Maybe BodyChild, ParagraphChild, et al. should have:

impl<T> From<T> for BodyChild where T: TextElement

Not a question, just an observation: BodyChild is lacking compared to ParagraphChild. The former only allows text elements, the latter allows text and several kinds of HTML elements. This follows from point 2, above.

Hey there! :wave: - I really appreciate you filing this issue; it seems you've found a number of bugs! - I've filed individual issues for each bug, so they can be closed one-by-one via pull requests.
I should probably write a contribution document for this; but the way this project works is that we take the HTML spec, parse it into various intermediate JSON formats, and then use that to generate the html-sys and html crates from.
If child elements or attributes are missing, it usually points to a bug in the parsing step. That's no surprise, because we're almost exclusively dealing with one-off strings of prose. So the fix often involves writing a little parser for that string specifically. Once that's done you can re-run the cargo xtask no-fetch command (to do all parsing + codegen, but not re-fetch the spec) to update the generated code.

Is there an alternative API design to the one described in https://github.com/yoshuawuyts/html/issues/3#issuecomment-1501147977 that I haven't seen yet? Or does the API currently exist, and I just haven't been able to find it in the documentation?

If we can fix the earlier bugs, the code to generate the HTML elements should be:
let tree = html::root::html::builder()
    .lang("en")
    .head(|head| {
        head.meta(|meta| meta.charset("utf-8"))
            .title(|title| title.text("My site"))
    })
    .body("Hello, world!")
    .build();

The methods taking closures look amazing! And thank you for breaking this out into bite-sized tickets. That will make contributing much easier!


⚠ RPC server - Figment Solana has degraded performance

In 7e94885, RPC server - Figment Solana ($FIGMENT_SOLANA_RPC_URL) experienced degraded performance:

HTTP code: 429
Response time: 276 ms

Resolved: RPC server - Figment Solana performance has improved in 6814ba4.


Remove omlmd as a dependency

It's blocking packaging

So you want to remove it from packaging, but not from the code?


feat: add support for ocrmac OCR engine on macOS

Integrates ocrmac as an OCR engine option for macOS users.
Adds configuration options and dependencies for ocrmac.
Updates documentation to reflect new engine support.

This change allows macOS users to utilize ocrmac for improved OCR performance and compatibility.

Checklist:

[x] Commit Message Formatting: Commit titles and messages follow guidelines in the
conventional commits.
[x] Documentation has been updated, if necessary.
[x] Examples have been added, if necessary.
[x] Tests have been added, if necessary.

@nuridol This looks amazing, thank you for the PR! I enabled the test. It seems you need to run
poetry lock

Let's iterate!

@nuridol This looks amazing, thank you for the PR! I enabled the test. It seems you need to run
poetry lock

Let's iterate!

Thank you for your feedback! I've committed the updates you suggested.

Let me keep running the tests, and let's see what comes out. We have a code-freeze by Nov 15th for productization, so I wont merge it before that, to ensure that other dependencies come in. However, it looks like a very nice addition.
just to confirm:

it is ocrmac with MIT License (https://pypi.org/project/ocrmac/)?
Can you make sure that the package supports python 3.10, 3.11, 3.12 and 3.13. The last is not yet a strong requirement, but it will once torch supports 3.13.

@nuridol Next to do, run the formatting (multiple times),
poetry run pre-commit run --all-files

I dont see any updates on the tests, did you see the ocr-tests we have (https://github.com/DS4SD/docling/blob/main/tests/test_e2e_ocr_conversion.py)?

@nuridol we are ready to finalize this work. Would you have some time to rebase the current branch with the latest main?


extract element from list when py_func's output type is a single tensorflow type

#3464

Can one of the admins verify this patch?

@tensorflow-jenkins test this please

LGTM


Fix gardener-node-agent image tag defaulting

How to categorize this PR?

/area usability
/kind bug
What this PR does / why we need it:
This PR fixes a bug about the gardener-node-agent image which occurs when gardenlet does not use an image vector overwrite configuration. In the local scenario, this is always the case, hence we haven't caught it earlier.
When an image without a tag is looked up with runtime/target version find options, then its tag will be defaulted eventually in https://github.com/gardener/gardener/blob/180951eac9b8183175d4dcadc305c7722ce8122d/pkg/utils/imagevector/imagevector.go#L366-L370
This leads to a wrong image tag of GNA in the init.sh script of the gardener-node-init systemd unit (set to the Kubernetes version instead of the gardenlet's own version):
echo "> Pull gardener-node-agent image and mount it to the temporary directory"
ctr images pull  "eu.gcr.io/gardener-project/gardener/node-agent:v1.27.6" --hosts-dir "/etc/containerd/certs.d"
ctr images mount "eu.gcr.io/gardener-project/gardener/node-agent:v1.27.6" "$tmp_dir"

Special notes for your reviewer:
/cc @plkokanov
Release note:

NONE

/cherry-pick release-v1.85

/lgtm
/approve


Regarding the image path link while running the file

I came across this GitHub repository and while running the file, as mentioned in the read me file I ran the execution code but I have received the index error

Hello Abhishek,
Can you please paste the error you're getting, so I can better understand what's wrong?
Thank you!

Hello,
Thank you for catching this error. I made a mistake while creating the documentation.
braindiagnosis.py is intended to be used with an input folder, where images will be fed in, and an output folder, where images will go when evaluated. Afterward, you would specify the input and output folder as command line arguments, in that order.
The following is an example command:
python braindiagnosis.py [MODEL] [INPUT] [OUTPUT]

Thanks!
-azh


Strange safari behaviour when hovering over element using "dim class"

When using the dim class on graphical elements, they move a bit on hover:

Or check it out live here hovering the social icons in the footer component.
Happens only in safari, chrome seems to be fine.

Weird, not happening anymore.

Still happening on my end. Might have a fix. Will try to address it soon. Thanks for pinging me with this.

Wasn't sure whether it was only because of an extension or so, that's why I closed it. At least we have proof now that it's not only happening for me.

Update: have tried to fix this a few time but have failed so far. Will keep at it. Accepting PRs if someone else has a fix though :)

.dim{transform: translateZ(0);...} needs to be applied to prevent bouncing on hover. I came across this when resolving a glitch on .grow:hover. You can see the outcome of that here: https://codepen.io/inspiredlabs/pen/qwpWrq


PyTorch -> TorchScript conversion

Description
Would it be possible to provide the code you have used to generate the TorchScript version of, in particular, the Whisper model? ATM, the demo uses the small.en model and it would be very useful to be able to use the multi language models as well as the different size models.
Will this change the current api? How?
No
Who will benefit from this enhancement?
Everyone

Here: http://docs.djl.ai/examples/docs/whisper_speech_text.html#trace-the-model

Thanks! But now it's looking for mel_80_filters.npz. Where do I find this?

https://github.com/deepjavalibrary/djl/blob/master/extensions/audio/src/main/java/ai/djl/audio/processor/LogMelSpectrogram.java line 42 is how you generate it

@pds2208
You can find the file in the whisper_en.zip file, if you want to package your model, you can use whisper_en.zip as example.
You can also download it directly from: https://resources.djl.ai/demo/pytorch/whisper/mel_80_filters.npz

Thanks guys. Working fine but very, very slow. It takes ~40s to translate a small audio file. The same file takes ~5s using the python implementation. Any way to speed this up?

Well this is interesting. Setting JniUtils.setGraphExecutorOptimize(false); as per this page:
https://djl.ai/docs/development/inference_performance_optimization.html
Reduced the time from ~40s to ~10s for the exact same file! What is going on?

Thanks. I’m trying to figure out why it’s half the speed of the Python version, which forks off ffmpeg to run the audio conversion. It should be at least as fast…

On my mac, once the model is warmed up, it only takes 4s to run inference.

Oh wow. The example closes the model after each use. I tried keeping it open but received an error along the line of ‘the native function has already closed the connection…, or words to that affect’. How do I keep the model open to reuse it?

Please get the latest code, I just fixed the issue in the previous PR

Thanks. Grabbed the latest code. Still 10s here.

@pds2208 I would suggest we isolate the audio processing part and just key inference. Could you try to save the audio into npz and use Java/Python both load that (DJL have NDList function to load an npz) and see how long inference takes


Allow multiple file output with repeated -o options

Checklist

[X] I'm requesting a feature unrelated to a specific site
[X] I've looked through the README
[X] I've verified that I'm running yt-dlp version 2022.06.29 (update instructions) or later (specify commit)
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood
This is a feature request to support a usecase I have. I have a suggested fix, but first let me give context, in case someone has a better idea for this class of problem. I'm writing an auto-downloader, which periodically runs youtube-dl and saves the files. I want to save things by playlist, by creator, by date, to a master archive, etc. The problem I run into, is that a video usually appears in multiple folders in my use case, with different names. Ideally, the downloader would detect this (see a file is already downloaded by youtube ID) and avoid downloading it again, instead re-using the existing download.
My proposed fix is to allow multiple --output options, saving a file multiple places with a single command. The files could be copied, symlinked, or even hardlinked. There are a few advantages to this over running multiple commands:

Only a single copy of the video is downloaded (saves bandwidth)
Only a single copy of the video is stored on disk, depending on implementation (saves disk space)
This allows the use case at ALL if using the option --download-archive. Otherwise, the second and later commands would fail because the ID is already listed in the archive.

This isn't a perfect solution, in that a later download will still fail to "know about" the existing copies. But it has the advantage of being easy to understand, and maybe being easy to implement.
Currently I've written a workaround wrapper program that something very similar this with some dry-run metadata outputs, but it's not pretty. It would be cool if yt-dlp supported this directly. My workaround looks more like instead adding a "--master-output" option. If neither file exists, it saves two output files. If the "master" output version exists, it instead uses that existing copy. My feeling is that while my workaround solves my use case better, multiple -o outputs seems easier to explain.
I don't think anything in the problem is youtube-specific except maybe --download-archive, and certainly nothing in the proposed solution is.
Provide verbose output that clearly demonstrates the problem
(N/A)

[ ] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
No response

You can probably already do this by passing the copy/symlink command with --exec

The files could be copied, symlinked, or even hardlinked.

Not see how this is in scope of dlp tbh. @ischmidt20 is correct that this should be handled by by u via exec. or via some wrapper.
Also adding multiple -o will proly be a headache to agree upon how multiple -o plays along with other options.

-exec sounds great, I just didn't realize it could have multiple arguments with template formatting. Let me give it a try and see if I run into issues with --download-archive still. If you don't hear back in a week or two, feel free to close this :)

I agree, this works much better. It looks like --exec handles quotes in a reasonable way, too. I would still love multiple --exec options, which I will open as a separate issue.
And yes, as I expected --download-archive stops any --exec, even using before_dl:.

So I initially thought this would work out, and to some extent it does, but I run into issues down the line with the fact that it's plain string substitution. This means it's very hard to deal with videos with special characters in the title: quotes, slashes, etc. If I was on windows I would have even more issues.
My best bet currently looks to be giving up on constructing a command line, and instead writing a custom shell script and calling exec on that. Even then I expect quotes inside video names to break things.
Any bright ideas would be appreciated!

Use %(...)q to make --exec quote arguments correctly

That is useful, thanks for the help! I feel dumb for skipping that manpage section--I assumed it was just copied python string formatting documentation. Like a dummy. There are so many useful new options.
There's no way to ex. chain S (sanitize) and q (quote), right?


feat: [VET-500] Added SuperPay to load payment methods

Added new load payments method "SuperPay".

@timurhamitov Can you release next version as Minor?

@doniyor2109 Sure. But, probably, I will need help to publish package, because I never done it for this repo.

@timurhamitov No problem. Let me know if you need help


Caller is origin implementation

Summary
Closes #_

[n] y/n | Does it introduce breaking changes?
[n] y/n | Is it dependant on the specific version of cargo-contract or pallet-contracts?

Description

Function
caller_is_origin()
Initial status
Not implemented in integration test
Issue documentation & test case
https://github.com/CoinFabrik/on-ink-integration-tests/tree/main/test-cases/caller-is-origin
Implementation note
We have added the depthfield to the ExecContext struct in order to be able to detect caller chages avery time calls are made between contracts.
Basically every time the callee changes in the instantiate_contract or invoke_contract function calls, one is aded to depth. And when the callee returns to the previous one, 1 is subtracted.
The caller_is_origin()function compares the value of depth to zero to check if the current contract caller is the origin of the entire call stack.
Testing guide
In the directory integration-tests/set_contract_storage of the target directory, we include in our pull request a test case showing that the observed implementation difference has been corrected. Note that this test is different from the original test case in our repository, which showed the difference.In order to run the integration tests run:cargo testIn order to run the e2e tests run:cargo test -–features e2e-testsThese tests are run separately because we do not need to compare their results.
Checklist before requesting a review

[x] My code follows the style guidelines of this project
[x] I have added an entry to CHANGELOG.md
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added tests that prove my fix is effective or that my feature works
[x] Any dependent changes have been merged and published in downstream modules

@ramirez7358 Sorry for pinging you only now about all those old PR's. Could you possibly merge master and resolve the conflicts here as well?


Migration from 2.2 to 3.0 external dll return null

Hello guys,
I'm trying to upgrade my project from asp core 2.2 to asp core 3.0. I resolved all compilation issue with braking change during the migration. So now i run my project in debug mode. And i try to login to my api with postman like i always did. But the fact is that with the new version 3.0 every method that i call from external dll return null... And i can't figure why ... If i call all of these method as of version asp core 2.2 they all work fine ...
Would someone has any idea why ?

@Razgort thanks for contacting us.
Could you provide a minimal repro project that shows the problem you are running into so that we can further investigate?

We're closing this issue as we haven't seen community involvement and we need more information to reproduce the problem. If you have more details about the issue add a reply here with the new information and we'll re-evaluate the issue.


[res] Add sample cfg for tflite and onnx

This will introduce sample cfg files for tflite and onnx.

also update readme file

Signed-off-by: SaeHie Park<EMAIL_ADDRESS>

From draft #150


add method to add unauthenticated tenant routes to context

With tenancy enabled, the routes that are added to a context using ->routes() don't work (and probably shouldn't), but there might be cases where one wants to add custom unauthenticated routes to a tenant routes (e.g. a function to invite new users to a tenant). This PR adds that ability.

Thanks


adapter.js: also check for mozRTCPeerConnection

apparently there are some custom builds of FF that have disabled webrtc peerconnections but allow GUM. Checking both mozGetUserMedia and mozRTCPeerConnection should catch those as well.
Arguably the same could be done for chromium but...

We still want adapter to work if peerconnection is disabled, right? Or do I misunderstand the intent here?

We'll probably want adapter to still shim GUM if GUM is available. But setting things like setting
window.RTCSessionDescription = mozRTCSessionDescription;

should only be tried when mozRTCPeerConnection is set. Makes sense?
Style-wise do you have any preference between
if (some kind of GUM is supported) {
   shim GUM stuff
}
if (RTCPeerConnection is supported) {
  shim RTCPeerConnection stuff
}

and
if (mozrtcpeerconnection ||  mozgetusermedia) {
   if (mozrtcpeerconnection) { shim this}
  if (mozgetusermedia) { shim this}
} else if (webkitrtcpeerconnection || navigator.webkitgetusermedia) {
  ... do the same for chrome
}

The second variant seems easier to maintain but when modularizing adapter I'd tend to split GUM and RTC stuff into separate modules so applications which don't need GUM (datachannel-only) don't pull in that dependency.

There's some global stuff that needs to happen for both gUM and RTCPC, but I probably need to see a specific example to decide which approach is the best.

browser-detection at toplevel
https://github.com/fippo/webrtc/blob/variant1/samples/web/js/adapter.js
feature detection at toplevel:
https://github.com/fippo/webrtc/blob/variant2/samples/web/js/adapter.js
I didn't really know what to do with the global stuff...
variant 2 (which I prefer) seems to me like this should be four modules:

RTCPeerConnection
getUserMedia
attachMediaStream
webrtcsupport
I am slightly biased here obviously :-)

will file a new bug on adapter.


smtp settings error, what's wrong?

When I try confirmed email, get message:

Email confirmation required but the system could not send the email. Contact the admin to ensure email is set up correctly.

.env file
`APP_KEY=***
APP_DEBUG=true
APP_URL=***
Database details
DB_HOST=localhost
DB_DATABASE=***
DB_USERNAME=***
DB_PASSWORD=***
Mail sending options
<EMAIL_ADDRESS>MAIL_FROM_NAME="Confirm E-mail adress"
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
<EMAIL_ADDRESS>MAIL_PASSWORD=*********
MAIL_ENCRYPTION=null`
Mail encryptin also tried with tls/ssl
Config mail.php
`return [
// Mail driver to use.
// Options: smtp, mail, sendmail, log
'driver' => env('MAIL_DRIVER', 'smtp'),

// SMTP host address
'host' => env('MAIL_HOST', 'smtp.gmail.com'),

// SMTP host port
'port' => env('MAIL_PORT', 587),

// Global "From" address & name
'from' => [
    'address' => env('MAIL_FROM', 'nestle9412@gmail.com'),
    'name' => env('MAIL_FROM_NAME','Wiki ITS')
],

// Email encryption protocol
'encryption' => env('MAIL_ENCRYPTION', 'tls'),

// SMTP server username
'username' => env('nestle9412@gmail.com'),

// SMTP server password
'password' => env('***'),

'pretend' => false,

// Sendmail application path
// 'sendmail' => '/usr/sbin/sendmail -bs',

// Email markdown configuration
'markdown' => [
    'theme' => 'default',
    'paths' => [
        resource_path('views/vendor/mail'),
    ],
],

];`
What's wrong?

Hi @nestle49,
Sorry to hear you are having problems.
The edits made in the app/Config/mail.php file would cause the username and password values to effectively be null due to use of the env() function without defined values.
None of the app/Config files should be touched. You should only need to alter your .env file.
Additionally, Have you used Google's SMTP for similar purposes before on your account? I know there's a few caveats, like needing to generate an app password if you have 2FA enabled. The first few steps on this guide seems to have some good details on enabled gmail SMTP use:
https://support.cloudways.com/configure-gmail-smtp/

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.


fix: did type in message crates

Resolves https://github.com/hyperledger/aries-vcx/issues/1165
Use did_parser_nom's Did type in message crates instead of string so as to parse & verify DIDs upon message deserialization

Hi @GHkrishna please have a look at my comment in your previous PR:
https://github.com/hyperledger/aries-vcx/pull/1171#issuecomment-2035928469
Given things as they are, the code doesn't compile, the changes you made need more sync up across the codebase.


[Request] Support Serverless Framework with a plugin?

I've opened up an issue here to cross-discuss.
https://github.com/serverless/serverless/issues/11840
It would be awesome if we could support Swift directly in the Serverless Framework as it will handily scaffold the rest of an API infrastructure such as API Gateway, API Authentication etc. , and other nice plugins such as DynamoDB plugin.  Personally I'm interested in allowing cross-functional teams to collaborate with each other on the same codebase.
This would probably entail building an officially supported plugin that wraps around SwiftPM.

Hello @darylteo
Are you thinking about a SwiftPM plugin to would generate a Serverless deployment descriptor ?  Or a serverless plugin to scaffold a Swift project and its associate resources.
I am currently working on a SPM plugin that generates a SAM deployment descriptor.  That work / approach could be extended to Serverless too.
Have a look at this PR (https://github.com/swift-server/swift-aws-lambda-runtime/pull/291) and let me know what you think.

Hello @darylteo @sebsto,
I've prepared an example of the output required with Serverless using Breeze the library I'm developing: https://github.com/swift-sprinter/Breeze/tree/main/Example.
Using Breeze it's very easy to create a Serverless business logic for APIGateway, Lambda, Dynamo. The difficult part is to help users in the deployment.
That code has been generated by a command line, but it's still in development.
Not sure what could be the best approach:
1 - Have a SPM plugin, but it's not clear how to add additional resources (DynamoDB, ....)
2 - Use a dedicate command line
3 - Have a Plugin in Serverless
Maybe we need all the approaches, happy to contribute.

@Andrea-Scuderi the approach I used for SAM is to let the function developer describe its environment in Swift (like a SwiftUI struct) and generate the YAML based on that.
Example :
import AWSLambdaDeploymentDescriptor

DeploymentDescriptor {
  // a mandatory description
  "Description of this deployment descriptor"

  // the lambda function
  Function(name: "HttpApiLambda") {
    EventSources {
      HttpApi(method: .GET, path: "/test") // example of an API for a specific HTTP verb and path
    }
    // optional environment variables
    EnvironmentVariables {
      [ "NAME1": "VALUE1" ]
    }
  }
}

The same file could be generated for SAM or Serverless.  The long part is to write the Swift struct that models all SAM/Serverless constructs

@sebsto @darylteo
Here the dedicated command line I've prepared for 💨Breeze https://github.com/swift-sprinter/Breeze/pull/6
The command line relies on a new library I've prepared to load serverless.yml.
https://github.com/swift-sprinter/swift-sls-adapter.git
Once the solution [1] is ready, I can add the plugin for Serverless
Happy to get suggestions, comments and contributions.

Are you thinking about a SwiftPM plugin to would generate a Serverless deployment descriptor ? Or a serverless plugin to scaffold a Swift project and its associate resources.

@sebsto sorry I meant a ServerlessFramework plugin. I want to use SLS to do my deployments.
@Andrea-Scuderi Ah I think this is coming from the opposite direction of what I was thinking of. My use case is to use Swift in a mish mash of other runtimes using ServerlessFramework(SLS), so it's imperative that I work in SLS.
As you can see here, https://github.com/serverless/serverless/issues/11840#issuecomment-1481239403 I made a local plugin in SLS for starting a offline server so I can invoke commands into it.
Sorry for the confusion!

Closing as there is a proposed SLS plugin  on the SLS project.