Seems no need to return unsubscribe

Serve as property instead. Because if multiple component called sync at the same time, there will be duplicate listener or overwrite reference.
Benefit:

sync can check this property before calling onSnapshot
send to onScopeDispose internally, no need to handle by outside

Hi, thank you for reporting.
Returning Unsubscribe
I think sync function needs to return Unsbscribe,  so that users can stop the subscription by themselves.

there will be duplicate listener or overwrite reference.
I've experimented with this.
If two sync functions are called to the same document, and call unsubscribe of one.

store
import {
  doc, getFirestore, Unsubscribe
} from 'firebase/firestore'
import { defineStore } from 'pinia'
export type State = {
  a: { value: string | null }
  b: { value: string | null },
  unsubscribeOfA: Unsubscribe | null
}

export const useTestStore = defineStore('test', {
  state: (): State => {
    return {
      a: { value: null },
      b: { value: null },
      unsubscribeOfA: null
    }
  },
  actions: {
    setup() {
      const store = getFirestore()
      this.unsubscribeOfA = this.sync('a', doc(store, 'Foo/bar'))
      this.sync('b', doc(store, 'Foo/bar'))
    },
    unsubscribe() {
      this.unsubscribeOfA!()
    }
  }
})

component

<template>

      {{ a }}
      {{ b }}

    <button @click="testStore.unsubscribe">unsubscribe A</button>

</template>

Change value, after the unsubscription, only one subscription was stopped

So there are duplicate listeners, but I think it's expected behavior.
Returning property

sync can check this property before calling onSnapshot
Yes, this is good idea.
But, to return document data by sync method, we need to make sync function async.

So it might need a other async function that returns Unsubscribe and document data.


Disable __osx virtual package requirement

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Files uploaded successfully but cant see them on iCloud.

I have tried adding this in the info.plist -
	<key>NSUbiquitousContainers</key>
 	<dict>
    	<key>iCloud.com.example.xyz</key>
    	<dict>
    		<key>NSUbiquitousContainerIsDocumentScopePublic</key>
    		<true/>
    		<key>NSUbiquitousContainerSupportedFolderLevels</key>
    		<string>Any</string>
    		<key>NSUbiquitousContainerName</key>
    		<string>ContainerName</string>
    	</dict>
 	</dict>

source-[(https://developer.apple.com/library/archive/documentation/General/Conceptual/iCloudDesignGuide/Chapters/DesigningForDocumentsIniCloud.html)]

The files are being uploaded and I am able to gather the relative file paths but i am not able to see them remotely on the iCloud. Is there something I am missing ?

Hey @SunilKividor did you find a solution to that problem? I'm having the same issue.


Scoping issues

Starting with this code
julia> linReg1D |> sourceRand()
quote
    σ = rand(HalfCauchy(3))
    β = rand(Cauchy(0, 2.5))
    α = rand(Cauchy(0, 10))
    ŷ = α .+ β .* x
    N = length(x)
    y = rand(For(((n,)->begin
                        #= REPL[2]:10 =#
                        Normal(ŷ[n], σ)
                    end), 1:N))
    (x = x, ŷ = ŷ, N = N, α = α, β = β, σ = σ, y = y)
end

It expands to this:
julia> linReg1D |> sourceRand() |> gg
quote
    σ = rand(HalfCauchy(3))
    β = rand(Cauchy(0, 2.5))
    α = rand(Cauchy(0, 10))
    ŷ = α .+ β .* x
    N = length(x)
    y = rand(For(let _free = (σ, ŷ)
                    #= /home/chad/.julia/packages/GG/DPNKg/src/closure_conv.jl:206 =#
                    (GG.Closure){RuntimeFn{list(GG.Argument(:σ, nothing, GG.Unset()), GG.Argument(:ŷ, nothing, GG.Unset()), GG.Argument(:n, nothing, GG.Unset())),nil(GG.Argument),let
    #= REPL[2]:10 =#
    Normal(ŷ[n], σ)
end}(), (typeof)((σ, ŷ))}(_free)
                end, 1:N))
    (x = x, ŷ = ŷ, N = N, α = α, β = β, σ = σ, y = y)
end

When I run it, it says Normal is undefined. So it seems it's somehow looking in the wrong scope (Normal is available in Soss, which is loaded when I run this)

Hi Chad, could you please close this as it's already fixed?


Providing a Stable API

Currently, this project is just for the use of Manim, and mostly it can't be used outside of manim, with the functions it provides.
Having a stable API so that it can be used outside of Manim would be super cool, for example, I recently read https://github.com/python-pillow/Pillow/issues/2255 and found that Pillow can't render text correctly, especially for languages with more ligatures, at least it requires raqm and isn't available by default in the wheels, and by if we had a stable API Pillow could use this to render text.
I would like to hear some ideas on how this can be done and how the API should look like.
Thoughts @PhilippImhof?

That's a tough one. On one hand, it would obviously good to offer this toolkit to others. On the other hand, it means much more work. Currently, we only have to meet Manim's needs; there will certainly be other needs once it is used in other projects. Are we sure we can handle the additional workload?

Are we sure we can handle the additional workload?

I think there shouldn't be much of workload though. Even if there is, I think there should be other developers taking interest to develop this project. And, yes this is a cool project, which I, personally, love to work on.
I haven't seen any python project, even if its a binding, provide text rendering as this project does and we have wheels which pretty much work on any platform, that makes me think, why other projects, say pillow, can't use it.
Also, on the other hand I think the current implementation of Text isn't that great, and requires a major refactor. Making a stable API first and then making Manim's Text use it seems to be a better idea to me. First, though we should plan about how the API should look and how it is expected to use...
Also, currently we seem to duplicate code in Text and MarkupText which needs to be fixed.

I think there shouldn't be much of workload though. Even if there is, I think there should be other developers taking interest to develop this project. And, yes this is a cool project, which I, personally, love to work on.

True.

Also, on the other hand I think the current implementation of Text isn't that great, and requires a major refactor. Making a stable API first and then making Manim's Text use it seems to be a better idea to me. First, though we should plan about how the API should look and how it is expected to use...
Also, currently we seem to duplicate code in Text and MarkupText which needs to be fixed.

IMHO, MarkupText is the way to go for the future, because it offers a clear and well-structured syntax; formatting is done in the text rather than with obscure dicts given as parameters. It already avoids most of the problems that Text has (e.g. bold+italic) and will avoid all of them, as soon as we handle gradients with Cairo instead of applying them manually onto the SVGMobject. (I do not say that because I wrote it; rather, I wrote it because I felt there was a need for it.)
We could probably keep Text as a simple class with just a few options, like color, font and size. Of course, we would then also need to rewrite the CodeBlock class.

I had a look over PangoAttribute, which should be used ideally instead of the dicts which are currently in place, like t2g and t2c. I had previously worked on them in this branch but had stopped it because it required a lot of work to do.
Essentially what I thought when I was doing that was, having a TextAttribute object, which will provide access to the attributes which Pango allows us to set, each representing a single attribute, like for example bold from the characters 6 to 10, and finally inserted in a PangoAttrList like structure which will be passed to Pango while rendering, it also allows to have overlap so blod+italic should be possible.
This API looks good to me, but still, I was wondering if there is a better way to do it, suggestions @PhilippImhof?

I am not sure I understand the question.
As the user will still have to define style from char X to Y, I think that using some sort of markup would be the easiest interface. This also has the advantage that they do not have to actually count characters. And as Pango offers to do the whole parsing (thus translating markup to Pango attributes), using https://developer.gnome.org/pango/stable/pango-Markup.html seems straightforward. Especially, because with MarkupText we already have a working implementation for this.

Yeah, markup is great.
Obviously, using markup should be the simplest for the users, but for the Code we have in Manim, it should be difficult for us converting the information provided by pygments to markup. Instead, these attributes can be used. Also, user's don't need to learn that markup, if we implemented a Pythonic API for achieving the same. Also, I think when it comes to Gradients, we would only be able to support linear ones, using Markup, if we had an API we can support other types of gradients which Cairo supports, and that's one of the main reason Pango doesn't support it.

Pygments supports HTML output. I think I might be able to write a Pango formatter, it seems to be more or less straightforward to do so; but that's what I suppose after having skimmed the docs.

I tried that, but it seems too difficult to convert them because pygments uses CSS which Pango doesn't support at all. The best is to convert them using PangoAttributes, and I will soon be working on it anyhow.

I have just given it a quick try and it seems to work. There is some fine-tuning and intensive testing left to do, of course.
(And a PR to file to pygments.)

from pygments import highlight
from pygments.lexers import JavascriptLexer
from pygments.formatters import PangoMarkupFormatter

code = """
function bla(n, m) {
   console.log(n*m);
}
"""
print(highlight(code, JavascriptLexer(), PangoMarkupFormatter()))

yields
<tt>function bla(n, m) {
   console.log(n*m);
}
</tt>

and with this I can do
from manim import *
from manimpango import *

class TestCode(Scene):
    def construct(self):
        text = MarkupText(
            """<tt>function bla(n, m) {
   console.log(n*m);
}
</tt>""")
        self.play(Write(text))
        self.wait()

to get:
https://user-images.githubusercontent.com/52650214/109392867-cff74280-791e-11eb-9238-49eeaf094870.mp4

This looks really cool. :+1:

Now, I think the first thing we should do is provide an API to access the image other than SVG. So, the first step I think would be to clean some repetitive code, and organize it as such a .pxd file for Pango, Cairo and Glib. I will make a new issue on that.

@PhilippImhof Can you list down what all we should refactor? https://github.com/ManimCommunity/manim/issues/1102#issuecomment-799326766

Also, we should add an API to return the buffer so that outside of Manim, as we can't expect them to parse those SVG files. We should kinda use buffer API from CPython, where we can get the image data from Cairo when we are using Image Surface using cairo_image_surface_get_data, but we are currently using SVG surfaces everywhere so it would need a different implementation. And this would mean there would be a complete refactor soon :tm:.

I am working on this next :)

Idea's which I have in mind currently.

Let's see how things goes.

Now that I'm planning for https://github.com/ManimCommunity/manim/issues/2355 I think this is the time to fix this also.


RuntimeError: Input type (float) and bias type (struct c10::Half) should be the same

I got this error when trying to run the code
Fusing layers...
RepConv.fuse_repvgg_block
RepConv.fuse_repvgg_block
RepConv.fuse_repvgg_block
IDetect.fuse
Traceback (most recent call last):
File "C:\Users\admin\Desktop\research\object_detection\License-Plate-Recognition-YOLOv7-and-CNN\main_image.py", line 29, in
pred, LP_detected_img = detect(model_LP, source_img, device, imgsz=640)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\research\object_detection\License-Plate-Recognition-YOLOv7-and-CNN\detect.py", line 54, in detect
pred = model(img, augment=augment)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\research\object_detection\License-Plate-Recognition-YOLOv7-and-CNN\models\yolo.py", line 599, in forward
return self.forward_once(x, profile)  # single-scale inference, train
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\research\object_detection\License-Plate-Recognition-YOLOv7-and-CNN\models\yolo.py", line 625, in forward_once
x = m(x)  # run
^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\research\object_detection\License-Plate-Recognition-YOLOv7-and-CNN\models\common.py", line 111, in fuseforward
return self.act(self.conv(x))
^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Input type (float) and bias type (struct c10::Half) should be the same

I actually use the test image without touching anything
image_path = 'data/test/images/clip3_new_0.jpg'
CHAR_CLASSIFICATION_WEIGHTS = './src/weights/weight.h5'
LP_weights = 'LP_detect_yolov7_500img.pt'

I have the same error, any solutions.

you can comment/delete line 35 ( model.half()  # to FP16 ) in detect.py

you can delete/comment line 35 ( model.half() # to FP16 ) in detect.py

It actually solved for me. Thank you.
Can you please briefly explain what was happening ?

Ah I guess because our hardware are different.
On Wed, Aug 23, 2023, 03:45 guerrarj @.***> wrote:

you can delete/comment line 35 ( model.half() # to FP16 ) in detect.py
It actually solved for me. Thank you.
Can you please briefly explain what was happening ?
—
Reply to this email directly, view it on GitHub
https://github.com/mrzaizai2k/License-Plate-Recognition-YOLOv7-and-CNN/issues/5#issuecomment-1688908619,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJYP3LYP7256B2NELXF6CWDXWUK7DANCNFSM6AAAAAAXJFXUUE
.
You are receiving this because you commented.Message ID:
<mrzaizai2k/License-Plate-Recognition-YOLOv7-and-CNN/issues/5/1688908619@
github.com>

you can delete/comment line 35 ( model.half() # to FP16 ) in detect.py

It actually solved for me. Thank you. Can you please briefly explain what was happening ?

it's just data type difference between the model and the input data. If you dont delete that line of code, the model will have the format c10::half (a data type that calculates on the cuda kernel) and input data is float (calculates on cpu). that's what i understand


Deserialize from InputStream allowing for partial reads

Search before asking

[X] I had searched in the issues and found no similar issues.

Version
Fury v0.4.1, Java JDK 8, Ubuntu 20.04
Component(s)
Java
Minimal reproduce step
test.dat.gz is a gzipped file containing many serialized objects of type MyClass. I don't know how many objects are in the file so I loop through the file while input is available to deserialize them as below. However as Fury#readToBufferFromStream assumes complete reads of the serialized size, an exception is thrown. This "slow" inputstream issue was partially resolved in PR https://github.com/apache/incubator-fury/pull/1034.
int i = 0;
try (InputStream input = new GZIPInputStream(new FileInputStream("test.dat.gz"))) {
  while (input.available() > 0) {
    ++i;
    tick = (MyClass) fury.deserialize(input);
  }
} catch (Exception e) {
  System.out.printf("Exception for object #%d%n", i);
  throw e;
}

What did you expect to see?
All objects in the gzipped file should deserialize.
What did you see instead?
java.lang.IllegalArgumentException
at io.fury.util.Preconditions.checkArgument(Preconditions.java:47)
at io.fury.Fury.readToBufferFromStream(Fury.java:1209)
at io.fury.Fury.deserialize(Fury.java:766)
at io.fury.Fury.deserialize(Fury.java:760)
[...]
Anything Else?
The slow InputStream issue addressed in PR https://github.com/apache/incubator-fury/pull/1034 could be extended to allow partial reads of the serialized size in the same way the PR fixed this for the serialized object read. Here's my attempt to fix Fury#readToBufferFromStream:
  private static void readToBufferFromStream(InputStream inputStream, MemoryBuffer buffer)
      throws IOException {
    buffer.readerIndex(0);
    int read = readBytes(inputStream, buffer.getHeapMemory(), 0, 4);
    Preconditions.checkArgument(read == 4);
    int size = buffer.readInt();
    buffer.ensure(4 + size);
    read = readBytes(inputStream, buffer.getHeapMemory(), 4, size);
    Preconditions.checkArgument(read == size);
  }
  private static int readBytes(InputStream inputStream, byte[] buffer, int offset, int size) throws IOException {
    int read = 0;
    int count = 0;
    while (read < size) {
      if ((count = inputStream.read(buffer, offset + read, size - read)) == -1) {
        break;
      }
      read += count;
    }
    return (read == 0 && count == -1) ? -1 : read;
  }

Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

Hi @phogh , your fix looks good to me. Would you like to create a PR for it?


introduce mitogen_ssh_check_host_keys for dynamically added hosts

When adding a managed node to the current inventory using add_host the variable ansible_host_key_checking is not honoured. Let's say we have a vanilla machine ansible-test-100 and this playbook:
---
- hosts: localhost
  gather_facts: no
  tasks:
    - add_host:
        name: ansible-test-100
        ansible_host: <IP_ADDRESS>
        ansible_ssh_private_key_file: /tmp/ansibletest-leases/100/id_ed25519

- hosts: ansible-test-100
  remote_user: ansible
  become: no
  tasks:
    - copy: content="Hello world" dest=/tmp/blah
    - file: path=/tmp/blah state=absent

As ssh doesn't know about the ssh host key yet, the playbook will prompt for a fingerprint confirmation:
$ ANSIBLE_STRATEGY=linear ansible-playbook foo.yml

PLAY [localhost] ******************************************************************************************************

TASK [add_host] *******************************************************************************************************
changed: [localhost]

PLAY [ansible-test-100] ***********************************************************************************************
The authenticity of host '<IP_ADDRESS> (<IP_ADDRESS>)' can't be established.
ED25519 key fingerprint is SHA256:JzKOGkgn5xX67/IAksbd/S/cof9Vzn1FD25a+pQfgXQ.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

To circumvent this, we can add ansible_host_key_checking: no to the add_host task:
    - add_host:
        name: ansible-test-100
        ansible_host: <IP_ADDRESS>
        ansible_ssh_private_key_file: /tmp/ansibletest-leases/100/id_ed25519
        ansible_host_key_checking: no

Now the playbook runs fine:
$ ANSIBLE_STRATEGY=linear ansible-playbook foo.yml

PLAY [localhost] ******************************************************************************************************

TASK [add_host] *******************************************************************************************************
changed: [localhost]

PLAY [ansible-test-100] ***********************************************************************************************

TASK [copy] ***********************************************************************************************************
--- before
+++ after: /tmp/blah
@@ -0,0 +1 @@
+Hello world
\ No newline at end of file

changed: [ansible-test-100]

TASK [file] ***********************************************************************************************************
--- before
+++ after
@@ -1,4 +1,4 @@
 {
     "path": "/tmp/blah",
-    "state": "file"
+    "state": "absent"
 }

changed: [ansible-test-100]

PLAY RECAP ************************************************************************************************************
ansible-test-100           : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Yet this doesn't work with mitogen:
$ ANSIBLE_STRATEGY=mitogen_linear ansible-playbook foo.yml

PLAY [localhost] ******************************************************************************************************

TASK [add_host] *******************************************************************************************************
changed: [localhost]

PLAY [ansible-test-100] ***********************************************************************************************

TASK [copy] ***********************************************************************************************************
fatal: [ansible-test-100]: UNREACHABLE! => {"changed": false, "msg": "Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.", "unreachable": true}

PLAY RECAP ************************************************************************************************************
ansible-test-100           : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

I suggest to add mitogen_ssh_host_key_checking which accepts accept, enforce or ignore to mimic this behaviour:
    - add_host:
        name: ansible-test-100
        ansible_host: <IP_ADDRESS>
        ansible_ssh_private_key_file: /tmp/ansibletest-leases/100/id_ed25519
        ansible_host_key_checking: no
        mitogen_ssh_host_key_checking: ignore

=>
$ ANSIBLE_STRATEGY=mitogen_linear ansible-playbook foo.yml

PLAY [localhost] ******************************************************************************************************

TASK [add_host] *******************************************************************************************************
changed: [localhost]

PLAY [ansible-test-100] ***********************************************************************************************

TASK [copy] ***********************************************************************************************************
--- before
+++ after: /tmp/blah
@@ -0,0 +1 @@
+Hello world
\ No newline at end of file

changed: [ansible-test-100]

TASK [file] ***********************************************************************************************************
--- before
+++ after
@@ -1,4 +1,4 @@
 {
     "path": "/tmp/blah",
-    "state": "file"
+    "state": "absent"
 }

changed: [ansible-test-100]

PLAY RECAP ************************************************************************************************************
ansible-test-100           : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

I'll open a draft pr for this, it'd be nice if you could have a look. Or maybe I'm just reinventing the wheel and such a feature already exists somehow :smile:

If vanilla respects ansible_host_key_checking and Ansible+Mitogen doesn't, then I think we should fix that rather than add another variable. Did you have other reason(s) for adding mitogen_ssh_host_key_checking?

The reason I used a dedicated variable was because the skeleton for check_host_keys accepting 'accept', 'enforce' and 'ignore' was already there. Vanilla ansible only takes a bool as argument (which translate to 'enforce' or 'ignore' in mitogen) but I did not want to break any possible features regarding 'accept'. Also it was easier for me to test :innocent:
But I'm totally fine with hooking to ansible_host_key_checking and ansible_ssh_host_key_checking.

I changed the pr to use ansible_host_key_checking and ansible_ssh_host_key_checking. For now it's an extra commit but I'd squash them if you like the general idea of this pr.

I confirm the issue when add_hosts is passed ansible_host_key_checking.
It doesn't occur using env var ANSIBLE_HOST_KEY_CHECKING=no instead.
There are other differences I was unaware of. These may also qualify as bugs.
Fixing/amending them is probably outside scope of this issue.
Related differences

Ansible prompts user to accept an unknown host key, Mitogen does not
Ansible adds an accepted key to known_hosts, Mitogen+Ansible does not

Notes to self

In ansible-core v2.16.6 parakmiko_ssh & ssh are the only connection plugins that mention ansible_host_key_checking.
ansible_ssh_host_key_checking is accepted by paramiko_ssh, ansible_paramiko_ssh_host_key_checking has higher priority.
Used rev 4996ec2f09ad31a4 (#1065, very close to current master).

Reproduction
# issue1066_repro.yml
- hosts: localhost
  gather_facts: false
  tasks:
    - known_hosts:  {name: "<IP_ADDRESS>", state: absent}
    - add_host:     {name: ansible-test-100, ansible_host: "<IP_ADDRESS>"}

- hosts: ansible-test-100
  gather_facts: false
  tasks:
    - ping:

# issue1066_repro2.yml
- hosts: localhost
  gather_facts: false
  tasks:
    - known_hosts:  {name: "<IP_ADDRESS>", state: absent}
    - add_host:     {name: ansible-test-100, ansible_host: "<IP_ADDRESS>", ansible_host_key_checking: false}

- hosts: ansible-test-100
  gather_facts: false
  tasks:
    - ping:

Playbook runs
Vanilla Ansible, add_hosts
$ ANSIBLE_STRATEGY=linear ansible-playbook issue1066_repro.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] *************************

TASK [known_hosts] ***********************
ok: [localhost]

TASK [add_host] **************************
changed: [localhost]

PLAY [ansible-test-100] ******************

TASK [ping] ******************************
The authenticity of host '<IP_ADDRESS> (<IP_ADDRESS>)' can't be established.
ED25519 key fingerprint is SHA256:AXEqIPmNmX02Nqs4H0fsIV286vmXvYhZXfPTO373c10.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? ^C [ERROR]: User interrupted execution

Vanilla Ansible, add_hosts, ANSIBLE_HOST_KEY_CHECKING=no
Result: Playbook completes, key is added to known_hosts
$ ANSIBLE_STRATEGY=linear ANSIBLE_HOST_KEY_CHECKING=no ansible-playbook issue1066_repro.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] *************************

TASK [known_hosts] ***********************
ok: [localhost]

TASK [add_host] **************************
changed: [localhost]

PLAY [ansible-test-100] ******************

TASK [ping] ******************************
ok: [ansible-test-100]

PLAY RECAP *******************************
ansible-test-100           : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Mitogen + Ansible, add_hosts
Result: No prompt, playbook fails
$ ANSIBLE_STRATEGY=mitogen_linear ansible-playbook issue1066_repro.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] *************************

TASK [known_hosts] ***********************
changed: [localhost]

TASK [add_host] **************************
changed: [localhost]

PLAY [ansible-test-100] ******************

TASK [ping] ******************************
[WARNING]: Unhandled error in Python interpreter discovery for host ansible-test-100: Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.
fatal: [ansible-test-100]: UNREACHABLE! => {"changed": false, "msg": "Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.", "unreachable": true}

PLAY RECAP *******************************
ansible-test-100           : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
localhost                  : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Mitogen + Ansible, add_hosts, ANSIBLE_HOST_KEY_CHECKING=no
Result: Playbook succeeds, key is not added to known hosts
$ ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_HOST_KEY_CHECKING=no ansible-playbook issue1066_repro.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] *************************

TASK [known_hosts] ***********************
ok: [localhost]

TASK [add_host] **************************
changed: [localhost]

PLAY [ansible-test-100] ******************

TASK [ping] ******************************
ok: [ansible-test-100]

PLAY RECAP *******************************
ansible-test-100           : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Mitogen + Ansible, add_hosts with ansible_host_key_checking=false
Result: Playbook fails, no prompt
$ ANSIBLE_STRATEGY=mitogen_linear ansible-playbook issue1066_repro2.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] *************************************************

TASK [known_hosts] ***********************************************
ok: [localhost]

TASK [add_host] **************************************************
changed: [localhost]

PLAY [ansible-test-100] ******************************************

TASK [ping] ******************************************************
[WARNING]: Unhandled error in Python interpreter discovery for host ansible-test-100: Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.
fatal: [ansible-test-100]: UNREACHABLE! => {"changed": false, "msg": "Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.", "unreachable": true}

PLAY RECAP *******************************************************
ansible-test-100           : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Characterisation
# inv.ini
mitogen     ansible_host=<IP_ADDRESS>

# issue1066_ping.yml
- hosts: mitogen
  gather_facts: false
  tasks:
    - ping:

Playbook runs
Vanilla Ansible, host from inventory.
Result: prompts on an unknown key.
$ ansible -i inv.ini -o localhost -mknown_hosts -a"name={{ hostvars.mitogen.ansible_host }} state=absent"
localhost | SUCCESS => {"changed": false,"gid": 20,"group": "staff","hash_host": false,"key": null,"mode": "0600","name": "<IP_ADDRESS>","owner": "alex","path": "/Users/alex/.ssh/known_hosts","size": 13196,"state": "file","uid": 501}
$ ANSIBLE_STRATEGY=linear ansible-playbook -i inv.ini issue1066_ping.yml

PLAY [mitogen] *********************

TASK [ping] ************************
The authenticity of host '<IP_ADDRESS> (<IP_ADDRESS>)' can't be established.
ED25519 key fingerprint is SHA256:AXEqIPmNmX02Nqs4H0fsIV286vmXvYhZXfPTO373c10.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? ^C [ERROR]: User interrupted execution

Vanilla Ansible, host from inventory, ANSIBLE_HOST_KEY_CHECKING=no
Resut: Completes, key is added to known_hosts
$ ANSIBLE_STRATEGY=linear ANSIBLE_HOST_KEY_CHECKING=no ansible-playbook -i inv.ini issue1066_ping.yml

PLAY [mitogen] *********************

TASK [ping] ************************
ok: [mitogen]

PLAY RECAP *************************
mitogen                    : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Mitogen + Ansible, host form inventory
Result: doesn't prompt, playbook fails
$ ansible -i inv.ini -o localhost -mknown_hosts -a"name={{ hostvars.mitogen.ansible_host }} state=absent"
localhost | CHANGED => {"changed": true,"gid": 20,"group": "staff","hash_host": false,"key": null,"mode": "0600","name": "<IP_ADDRESS>","owner": "alex","path": "/Users/alex/.ssh/known_hosts","size": 13196,"state": "file","uid": 501}
$ ANSIBLE_STRATEGY=mitogen_linear ansible-playbook -i ~/ansible_inventory.yml issue1066_ping.yml

PLAY [mitogen] *********************

TASK [ping] ************************
[WARNING]: Unhandled error in Python interpreter discovery for host mitogen: Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.
fatal: [mitogen]: UNREACHABLE! => {"changed": false, "msg": "Host key checking is enabled, and SSH reported an unrecognized or mismatching host key.", "unreachable": true}

PLAY RECAP *************************
mitogen                    : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0

Mitogen + Ansible, host form inventory, ANSIBLE_HOST_KEY_CHECKING=no
Result: Playbook completes, key is not added to known hosts
$ ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_HOST_KEY_CHECKING=no ansible-playbook -i ~/ansible_inventory.yml issue1066_ping.yml

PLAY [mitogen] *********************

TASK [ping] ************************
ok: [mitogen]

PLAY RECAP *************************
mitogen                    : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Notes to self, these aren't things to address within this issue/PR

Ansible SSH option is "host_key_checking"

ansible-core 2.16.6 ansible.plugins.connection.ssh.Connection._build_command() adds -o StrictHostKeyChecking=no if the option evaluates False (default True)

OpenSSH 9.6 StrictHostKeyChecking accepts any of true, false, yes, no, ask, off, accept-new https://github.com/openssh/openssh-portable/blob/V_9_6_P1/readconf.c#L913-L922

Mitogen <= 0.3.7 maps Ansible's host_key_checking -> kwarg check_host_keys

host_key_checking
check_host_keys

False
ignore

True
enforce

check_host_keys accepts any of accept, enforce, ignore

enforce -> StrictHostKeyChecking yes
accept -> StrictHostKeyChecking ask and Mitogen answers
any host key prompts with yes.
ignore -> StrictHostKeyChecking no, UserKnownHostsFile /dev/null, GlobalKnownHostsFile /dev/null

ansible_mitogen.transport_config contains a mishmash of naming conventions.

no prefix (e.g. Spec.port, Spec.become_exe)
prefix (e.g. Spec.mitogen_kind)
prefix & plugin name (e.g. Spec.ansible_ssh_timeout, ansible_doas_exe, mitogen_lxc_path)

ansible_mitogen.connection.convert_bool() possibly duplicates ansible.module_utils.parsing.convert_bool.boolean(), and/or it should be somewhere more generic.


Output is grayscale

I tried running your colornet_script.py. Like in your example, i tried running it with the same image as training and test data. It runs smoothly, but the output image is grayscale. What might be the cause for that?

I tried too, the output is also grayscale
https://github.com/microic/niy/tree/master/examples/colorizing_photos

It's tricky to get good results. A lot of has to do with how many epochs you train it and which training data you use. I'd recommend starting with 20-100 images and saving at regular intervals. Once you get a feel for it, you can increase the number of images. Also, use a lot of validation images to understand where it's good and where it struggles.
Analyzing the loss data can also be hard. Initially, I noticed that the batch normalization makes the pictures sepia looking. Then it needs additional training to create colors. The loss curve can be misleading because of this.
For better results, I'd recommend adding a weighted classification, to favor vibrant colors. If I were to redo it today, I'd experiment with the pix2pixHD GAN structure: https://github.com/NVIDIA/pix2pixHD

Thanks for your relay, I will remove batch normalization and try again


x/net/http: support content negotiation

Content negotiation is, roughly, the process of figuring out what content type the response should take, based on an Accept header present in the request.
An example might be an image server that figures out which image format to send to the client, or an API that wants to return HTML to browsers but JSON to command line clients.
It's tricky to get right because the client may accept multiple content types, and the server may have multiple types available, and it can be difficult to match these correctly. I think this is a good fit for Go standard (or adjacent) libraries because:

there's a formal specification for how it should behave: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
it's annoying to implement yourself, correctly; you have to write a mini-parser.
it would take one function to implement, which makes it annoying to import an entire third party library for (assuming you find the right one)

I've seen people hack around this in various ways:

checking whether the Accept header contains a certain string
checking for the first matching value,
returning different content types based on the User-Agent
requiring different URI's to get different content.

There's a sample implementation here with a pretty good API: https://godoc.org/github.com/golang/gddo/httputil#NegotiateContentType
// NegotiateContentType returns the best offered content type for the request's
// Accept header. If two offers match with equal weight, then the more specific
// offer is preferred.  For example, text/* trumps */*. If two offers match
// with equal weight and specificity, then the offer earlier in the list is
// preferred. If no offers match, then defaultOffer is returned.
func NegotiateContentType(r *http.Request, offers []string, defaultOffer string) string

offers are content-types that the server can respond with, and can include wildcards like text/* or */*. defaultOffer is the default content type, if nothing in offers matches. The returned value never has wildcards.
So you'd call it with something like
availableTypes := []string{"application/json", "text/plain", "text/html", "text/*"}
ctype: = NegotiateContentType(req, availableTypes, "application/json")

If the first value in offers is text/* and the client requests text/plain, NegotiateContentType will return text/plain. This is why you have to have a default - you can't just return the first value in offers because it might include a wildcard.
In terms of where it could live, I'm guessing that net/http is frozen at this point. Maybe one of the packages in x/net would be a good fit? There is also a similar function for parsing Accept-Language headers in x/text/language. Open to ideas.

Funny you should mention this, I was just looking for this for use in x/perf. Your proposed API is reasonable, but you should explicitly document what happens in exceptional circumstances:

What happens when multiple content types end up with the same q? I think I would expect the first one in offers to be chosen.
What happen if the Accept header(s) cannot be parsed?

What happens when multiple content types end up with the same q? I think I would expect the first one in offers to be chosen.

That sounds reasonable to me.

What happen if the Accept header(s) cannot be parsed?

The spec includes a grammar but doesn't really say what happens if you can't match it, other than you should return a 406 if you can't match anything. I think we should just return the default?

@bradfitz suggested (if we want to go forward with this proposal) it could live in net/http/httputil.

I also mentioned that it seems like defaultOffer string could go away and we say that the first element in the slice was the default.

Sorry, I tried to edit the description to cover that case.

I also mentioned that it seems like defaultOffer string could go away and we say that the first element in the slice was the default.

I think the problem with this would be, if you had "text/*" as the first element in offers, it would match if the client sent text/plain and text/plain would be returned from the function.
If we return the first value in offers as the default, then the response value contains a wildcard, which it doesn't in any other circumstance.

@kevinburke  What's wrong with returning text/plain if the first offer is text/*? I don't see why it has to return the exact string passed in—don't you need to know the negotiated type to set the header in the response?
Also, if negotiation fails does it return the empty string? I'd rather have an error to distinguish between expected failure, negotiation failed, and unexpected failure, bad request.

@kevinburke, any response to @jimmyfrasche? This seems fine if the simplified signature works. You want to prepare a CL?

Also, we like to make sure we append "; charset=utf-8" to Content-Types to be explicit. Can we make sure that that's still automatic?

offers are content-types that the server can respond with, and can include wildcards like text/* or */*

I don't think wildcards should be allowed in the offers. The server knows exactly what content types it supports and returning a wildcard content type seems weird. Nor do I think the RFC says wildcards are OK in the content-type header.
Content-Type (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17) mentions media-type (https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7) that does not have wild cards.
Accept (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1) mentions media-range which includes wild cards.
I agree with @jimmyfrasche that returning an error seems better so that the caller can know the reason if a default (first offered) is returned. maybe even not return a default at all. If there is a default the caller can handle that rather than build it as part of this method.
Since the RFC for Accept supports multiple parameters (such as charset) how about returning something more than just a string like:
type NegotiatedContentType struct {
   ContentType string
   Params map[string]string
}

func NegotiateContentType(r *http.Request, offers []string) (NegotiatedContentType, error)

@kevinburke, what's the status here?
It can also live in x/net if you want.
It's probably too late for Go 1.10, though.

It's too late and I'm buried in work stuff unfortunately, I probably won't have time to try to offer an implementation. I remember when I tried to implement it I ran into non-trivial problems with the design and some kinds of inputs.

I can do this.
Any feedback on my proposal from 7/20 or do you wanna stick with just returning (string, error)?

Any chance this could be decoupled from http? Content-Type (and arguably Accept) can be seen in non-http contexts and nothing in the logic described above ties it to http (apart from the initial retrieval of the header value). Other (non http) systems (eg messaging) may use headers, and this negotiator could be useful

@cellfish, do Params happen in practice? I think just a string seems fine. People who care about more details can use https://golang.org/pkg/mime/#ParseMediaType

@ericbottard, when you say decoupled from http, would you consider httputils still being an ok place because having a function that just takes a string seems trivial.
@bradfitz, The only time I've seen params used in practice it was a pretty one-off case with application specific logic. I just figured that in the case someone actually care the library have probably parsed the parts anyway so why not return them structured... If you just care about the string the String method on the struct would obviously return things "nicely". For example if the accept header contains text/html;q=0.8;charset=UTF-8 and that is the best match I would assume you want the returning string to just be text/html;charset=UTF-8 (dropping the q-value). But I guess it is true that parsing can be simplified if params are only preserved and only the q-value is actually parsed (and dropped).

@cellfish Having functions not taking http related (like http.Request) parameters is a first step. The functions not residing in http related packages is a second, nice to have, step. How about https://golang.org/pkg/mime ?

@bradfitz The new Signed Exchanges spec makes use of params during content negotiation [ref].

What's the status of this proposal? Is there any chance to have this implemented in the nearest future?

@lokhman The proposal has been accepted and is marked "help wanted". Anyone can, and is encouraged, to send a CL that implements this.

I tried implementing this and ran into some problems/complexity with the implementation/behavior that made me unhappy with the whole thing. I dropped it and don't have plans to work further on it.

@bontibon @kevinburke I'm currently working on one of my open-source projects that requires exactly this functionality (sort of a comprehensive web framework), so I decided to read about the topic, analyse various existing solutions and create own variant. I hope it should cover all edge cases, do the job quickly and memory efficiently.
So if you see this implementation valuable, please use it in the proposal or contribute to the existing project. The current version of the code is here: gowl/header.go.

If no one is currently working on this, I would be happy to take it up.

Go for it. No need to ask for permission. :)

Permit me to note that Accept is not the only header that needs this sort of parsing.  Accept-Encoding and Accept-Language have nearly the same syntax and need virtually the same parsing.  A generic implementation would be welcome.

Notice that there is already such a negotiation in the x/text/language package, in the ParseAcceptLanguage function

Has any made any progress on this? I'd be interested in using some of this functionality. A suggestion for an incremental improvement that could be merged first: Make a variant of mime.ParseMediaType that just parses the first media type from a list, and returns a slice containing the unparsed portion. (Basically, check for , here.)

I've just ported goautoneg which is used by Kubernetes and Prometheus to parse accept headers into a Github repository at https://github.com/markusthoemmes/goautoneg.
Would it be a valuable first step to add a ParseAccept function to httputil to get this going? We need to parse it first to get negotiation going anyway and it seems like these projects could take advantage of such an interim step.

I'm interested in working on this, but I wonder if it makes sense to follow x/text/language's example, and provide a Matcher type, so that the provided CTs needn't be parsed for every HTTP request.
Any objections to this approach?
If so, what should we call it? AcceptMatcher?

@markusthoemmes I see in your port of goautoneg that you're proposing in its readme be internalized into the stdlib you dropped the Negotiate function. Many web apps are also going to need to match against a content-type they have as a supported content type and shouldn't just use the results of the parser verbatim. Providing a Matcher like @flimzy suggested would go a long way and might be a good replacement for goautoneg's Negotiate if it's going to be left out.
As an example we use the goautoneg Negotiate function here in a way that I think many web apps would.

Since Go standard library (and no library I could find) does not support content negotiation that follows RFC 7231, I wrote my own: https://github.com/elnormous/contenttype
I would be happy if you could take a look at it and consider including the functionality in the standard library.

I've also written a library for this - which is BSD-3 licensed (like Go) and handles a lot of the edge cases I've hit before when writing these (more info on the blog)
gitlab.com/jamietanna/content-negotiation-go

Just for the record, I have written (in Go) a content negotiation plugin for the caddy webserver:
https://github.com/mpilhlt/caddy-conneg
It relies on @elnormous's library mentioned above, adding stuff from go's own x/text/language libraries. (Will have a look at @jamietanna's library, too - when I find the time to do so, that is.)
Thanks to you all for this issue and discussion, and for all your efforts, obviously. I am posting this here so that it may eventually provide some ideas about use cases and parameters that one would maybe like to throw at the library/libraries.

FWIW, I just noticed Gin provides another implementation for this, with the gin.Context.NegotiateFormat(accepted ...string) string function
https://pkg.go.dev/github.com/gin-gonic/gin#Context.NegotiateFormat
It does not handle quality factors, AFAICS, though.

FWIW, I just noticed Gin provides another implementation for this, with the gin.Context.NegotiateFormat(accepted ...string) string function
https://pkg.go.dev/github.com/gin-gonic/gin#Context.NegotiateFormat
It does not handle quality factors, AFAICS, though.

Many people have been writing the same or similar code for their projects. Me also is not an exception. I remember writing a library for this functionality. Unfortunately, it was done for a closed-source project which is not controlled by me, so all the code is lost there. But this is not the case. I am surprised how long does it take for developers of this language to accept offers made by people across the Internet. We see that there are a lot of examples of already written code which is already working, but this issue is still opened and we do not see this fuctionality in the standard Go language.

I ended up here trying to find this in the standard library. Echoing what others have said, I expected it to be part of the standard library because:

Many applications of nontrivial complexity will need this eventually
The spec is tricky to implement properly

Many of the 3rd party packages linked here have a complicated API or don't implement the spec as-per the RFC, e.g. the quality scores.
For my own use-cases, the API I'd most like to see would be a single func along the lines of:
func ResponseType(accept string, offers ...string) string

// or

var r *http.Request
r.ResponseType(offers ...string) string

Rationale:

This makes switching on the result possible
Default/zero behaviour is delegated to the caller
Doesn't introduce errors to handle, as some packages do
(method on *http.Request) Doesn't require the caller to manually extract the "Accept" header value, which is tedious.

A common use case might look like:
switch r.ResponseType("text/html", "application/json") {
case "text/html":
    writeHtmlResponse(w, ...)
case "application/json":
    writeJsonResponse(w, ...)
default:
    w.WriteHeader(http.StatusNotAcceptable)
}

In case it helps anyone, I use a shim for this for my own projects as follows, using github.com/golang/gddo/httputil which seems to be a solid implementation:
import "github.com/golang/gddo/httputil"

func ResponseType(r *http.Request, offers ...string) string {
    return httputil.NegotiateContentType(r, offers, "")
}

Hi there. Original author of the goautoneg library here. My apologies @markusthoemmes, I never saw your bug reports and only just today learned that it got used in things like Kubernetes and Prometheus (because I was wondering if Caddy could do autoneg). As Go developed more sophisticated and somewhat opinionated packaging infrastructure, now long ago, I probably got tired of keeping up with it. I also no longer had the original use case that made me write it to begin with.
Anyways, though it's a bit late now, but just to say that I am perfectly happy for it to get used wherever you like under some sort of free license. Sorry for stuffing license information into the README! It would make me happy if some small piece of it made it into Go's system libraries.


[QUESTION] Auditing dlt Code

Hi There!
I'm just getting started with dlt.  I was wondering if there is any way to audit the code that your abstractions are generating.  Just curious what's actually going on behind-the-scenes when I run an ingestion pipeline.  Thanks for the help!

https://dlthub.com/docs/getting-started/build-a-data-pipeline#why-build-pipelines-with-dlt
dlt will "extract" data from your source via microbatching into "extracted" packages. If your source is generator, you will essentially microbatch it via the ram to hard disk.
After extraction is finshed, the extracted pakcages are normalised in the same manner into load packages, for which a schema with loading hints can be generated.  This is then used to load the data to the destinaton.
To see how that happens you can inspect the load info and trace. The load_info object returned by the pipeline.run() method contains a wealth of information about the recently loaded data. About trace, read here: https://dlthub.com/docs/running-in-production/running#inspect-and-save-the-load-info-and-trace
Does this answer your question?


slack_socket_mode_no_reply_received_error bot stopped responding with socket mode

Description
Hello we had an issue with an internal slack bot that we have written.
It stopped responding to us and when we checked the logs they were full of:
{"code":"slack_socket_mode_no_reply_received_error"}
[ERROR]  socket-mode:SocketModeClient:0 cannot send message when client is not connected
(node:1) UnhandledPromiseRejectionWarning: Error: Cannot send message when client is not connected
    at Object.sendWhileDisconnectedError (/opt/app/node_modules/@slack/socket-mode/dist/errors.js:56:26)
    at /opt/app/node_modules/@slack/socket-mode/dist/SocketModeClient.js:333:33
    at new Promise (<anonymous>)
    at SocketModeClient.send (/opt/app/node_modules/@slack/socket-mode/dist/SocketModeClient.js:329:16)
    at ack (/opt/app/node_modules/@slack/socket-mode/dist/SocketModeClient.js:466:24)
    at App.processEvent (/opt/app/node_modules/@slack/bolt/dist/App.js:424:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async SocketModeClient.<anonymous> (/opt/app/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js:90:13)

Not sure if it's a mistake in our implementation or something lower level, any guidance welcomed,
The code can be found here: https://github.com/hmcts/slack-help-bot/blob/main/app.js
What type of issue is this? (place an x in one of the [ ])

[x] bug
[ ] enhancement (feature request)
[x] question
[ ] documentation related
[ ] example code related
[ ] testing related
[ ] discussion

Requirements (place an x in each of the [ ])

[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version:
3.0.0
node version:
v14.8.0
OS version(s):
3.11.6
NAME="Alpine Linux"
Steps to reproduce:

I assume it's to do with network connections not being handled properly but we only saw this once so far

Expected result:
bot reconnects automatically
Actual result:
bot was stuck in a disconnected state and didn't respond to new events / messages until it was restarted
Attachments:
https://github.com/hmcts/slack-help-bot/blob/main/app.js

Hey @timja!
Thanks for reporting this! Is the code still doing this or did the problem go away after you restarted the app?

Hey @timja!
Thanks for reporting this! Is the code still doing this or did the problem go away after you restarted the app?

Went away after restarting it

Glad to hear that! I'm going to leave this issue open for a little while to see if others are facing it.

Hello, I also faced an issue where the app was successfully running in socketMode and when a temporary network issue occurred, the app was unable to automatically reconnect and a manual restart of the application was required to get it running again.
I'm running @slack/bolt version 3.8.1 on Node 12.22.8 without any special configuration.
const app = new App({
  token: process.env.BOT_TOKEN,
  appToken: process.env.SLACK_APP_TOKEN,
  socketMode: true,
});

...

(async () => {
  await app.start();
})();

The only thing that was logged from the connection issue was:
0|index    | [INFO]  socket-mode:SocketModeClient:0 A ping wasn't received from the server before the timeout of 30000ms!
0|index    | [INFO]  socket-mode:SocketModeClient:0 unable to Socket Mode start: A request error occurred: getaddrinfo ENOTFOUND slack.com

@Ohiekkar I implemented this work around to have my process monitor (Kubernetes in this case) restart it if this happened:
https://github.com/hmcts/slack-help-bot/pull/46
No reports of issues since implementing that

@timja Thanks for sharing the workaround 🙇
I've applied a bunch of improvements to the underlying @slack/socket-mode library. The behavior can be much stabler with the latest RC version. You can try the updated one by installing the RC version by running the following command:
npm i @slack/socket-mode@next
# or npm i<EMAIL_ADDRESS>
If you are interested in all the changes included in the release, refer to https://github.com/slackapi/node-slack-sdk/releases/tag/%40slack%2Fsocket-mode%401.3.0-rc.0 for the details. If everything goes well, we will release v1.3.0 next week!
Also, SocketModeClient#badConnection is a private property in the class. If you continue using your health check endpoint, switching to the newly added public method isActive(): boolean would be a safer way in terms of long-term maintenance.
Since we won't have any further activities on this thread, let me close this issue now. Thanks again for taking the time to share the issue here!


Feature Request: sha1 sum of a file as a S3 key

FineUploader will by default generate an uuid for S3 upload file name.
This allows one to upload exact same file unlimited times.
Would it be possible to have an option in FineUploader calculate sha1 sum of the file before its uploaded to S3, and use the hex hash of the sum as S3 key value?

No reason for Fine Uploader to do this. Use th API to do it yourself. In particular, read the objectProperties.key configuration docs.

Any tips for how to hook into FineUploader and perform the sha1checksum?

You can get th file using the getFile API method. From there you can do anything you like with the file bytes


use_backend seems to get prio…?

I'm back at trying to set up letsencrypt how I want it. The issue I'm having now is that for the only site I'm allowing http I'm using "use_backend" on the same frontend as the plugin is used. But that seems to interfer with this plugin and gets prio. So for the below http config, there's no problem for the redirected subdomains, but blog.woodenstake.se fails:
frontend http
    mode http
    bind *:80
    option httplog

    stats enable
    stats hide-version
    stats realm Haproxy\ Statistics
    stats uri /haproxy
    stats auth viktor:8203101418

    # Letsencrypt: https://github.com/janeczku/haproxy-acme-validation-plugin
    acl url_acme_http01 path_beg /.well-known/acme-challenge/
    http-request use-service lua.acme-http01 if METH_GET url_acme_http01

    redirect scheme https code 301 if { hdr(Host) -i repo.woodenstake.se } !{ ssl_fc }
    redirect scheme https code 301 if { hdr(Host) -i jenkins.woodenstake.se } !{ ssl_fc }

   use_backend ghost if { hdr(host) -i blog.woodenstake.se }

Running with virtualenv: /home/viktor/.local/share/letsencrypt/bin/letsencrypt certonly --text --webroot --webroot-path /var/lib/haproxy --renew-by-default --agree-tos --email<EMAIL_ADDRESS>-d jenkins.woodenstake.se -d jenkins-nas.woodenstake.se -d repo.woodenstake.se -d blog.woodenstake.se -d transmission.woodenstake.se -d uniplybeta.woodenstake.se -d crm.woodenstake.se --test-cert --break-my-certs
Failed authorization procedure. blog.woodenstake.se (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://blog.woodenstake.se/.well-known/acme-challenge/Y4CpPlqq14aONp7Wr6nXcHR2ZGa_3dEtWf49GEzdank [<IP_ADDRESS>]: 400

Any idea?

So to be clear: commenting out use_backend ghost if { hdr(host) -i blog.woodenstake.se } validation goes through.

Oh, I could just make a conjunctive acl:
 acl url_acme_challenge path_beg /.well-known/acme-challenge/
    http-request use-service lua.acme-http01 if METH_GET url_acme_challenge

    redirect scheme https code 301 if { hdr(Host) -i repo.woodenstake.se } !{ ssl_fc }
    redirect scheme https code 301 if { hdr(Host) -i jenkins.woodenstake.se } !{ ssl_fc }

    acl host_blog hdr(host) -i blog.woodenstake.se

    use_backend ghost if host_blog !url_acme_challenge

Still struggling with haproxys config language :)

But I wonder why the redirects doesn't bite here though? The validation works for those domains too…

@hedefalk
The use_backend taking precedence over http-request use-service is very likely a HAProxy bug worth reporting on the HAProxy mailing list. Great that you found a workaround though! :smile:

Still struggling with haproxys config language :)

Totally understandable. HAProxy config has kind of a steep learning curve.

@hedefalk I can't reproduce this on HAProxy 1.6.3. Which version were you using when you encountered this issue? Thanks!

@janeczku I have the same problem but I do redirect in backend like this:
backend accounts_backend
    redirect scheme https if !{ ssl_fc }
....

with HA-Proxy version 1.7.6-1ppa1~xenial 2017/06/18


[cross_file] XFile.fromData name field is empty.

Steps to reproduce
final file = XFile.fromData(
  byteData,
  mimeType: 'application/pdf',
  name: 'Receipt.pdf',
)

file.name is return as empty string.
Expected results
file.name should return the value passed while constructing.
Actual results
file.name is return as empty string.
Code sample
Code sample
final file = XFile.fromData(
  byteData,
  mimeType: 'application/pdf',
  name: 'Receipt.pdf',
)

Screenshots or Video

Screenshots / Video demonstration

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.19.3, on macOS 14.4 23E214 darwin-arm64, locale en-SE)
    • Flutter version 3.19.3 on channel stable at /Users/ibrtelma/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ba39319843 (7 weeks ago), 2024-03-07 15:22:21 -0600
    • Engine revision 2e4ba9c6fb
    • Dart version 3.3.1
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/ibrtelma/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/ibrtelma/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
    • Ibrahim’s iPhone (mobile)   • 00008120-001A688E3C70201E            • ios            • iOS 17.4.1 21E236
    • iPhone 15 Pro Max (mobile)  • AE7EFA35-17D8-42B0-AC44-A4274ABA553C • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)             • macos                                • darwin-arm64   • macOS 14.4 23E214 darwin-arm64
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 124.0.6367.79

[✓] Network resources
    • All expected network resources are available.

• No issues found!

This is working as documented. See https://github.com/flutter/flutter/issues/87812.
Closing from here.
Thank you


Add Pull Request Number to GitHub Environment

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


[S3 Upload] Expose ContentDisposition

Depends on https://github.com/livekit/protocol/pull/525
And is related to #518

@spennihana can you update the protocol reference to fd7066503feeef328b73c7cd07414836ceb8c682?


Dp zoom in feature added

Issue solved: #497
Hey, @narayan954 I adding the following this features
Profile picture zoom in
View instantly profile picture after choosing it
Now if I load on the profile page it does not show the 404 error page it redirects to the home page
You can see below
https://github.com/narayan954/dummygram/assets/94003231/8a244cea-0691-4c4c-90d5-056654757862

looks good to me!

Hey, I was just asking based on this feature can it is possible to increase level 1 to level 2?

looks good to me!

Hey, I was just asking based on this feature can it is possible to increase level 1 to level 2?

Yeah sure!


Add break properties fallback

break-inside, break-before, break-after properties should fallback to page-break- alias.
This fallback has removed from autoprefixer https://github.com/postcss/autoprefixer/issues/972
I made postcss-page-break plugin for this and want to add it to postcss-preset-env. But first, break- feature should be added to css-db.

Yes, this is exactly where this plugin belongs. First, you’ve done such a great job here. I am so impressed that you not only added the PR here but also to cssdb. You’ve made me very happy. Let me review this. I have one concern with the order of the output (the fallback properties appearing after the future property).

the fallback properties appearing after the future property
It is mistake in the readme, the actual order in the output code is correct. I will fix readme soon.

Added via https://github.com/jonathantneal/postcss-preset-env/commit/96225f7840baf35f9f18b47b40b4481b97e462fb
PR made to update your README https://github.com/shrpne/postcss-page-break/pull/1


Snackbar does not go away if you change browser tab

What Angular MDC version are you using?
0.41.1
What browser(s) is this bug affecting?
Chrome, Edge, Firefox
What OS are you using?
Windows 10
What are the steps to reproduce the bug?
Show snackbar, switch browser tab or click a link that opens another browser tab.
https://trimox.github.io/angular-mdc-web/#/snackbar-demo
What is the expected behavior?
Snackbar should always go away
What is the actual behavior?
Snackbar stays in the screen. It only goes away after the action is clicked, but you can also have snackbars without action.

@zunamo Thanks for reporting this.
I checked upstream material-components and found a long standing open issue; https://github.com/material-components/material-components-web/issues/1398
@Garbee made a good point for screen readers.

I'd assume this is when the tab is switched back to the MCW tab being active. The snackbar is given focus since it is used as a priority message system that users may need to interact with within the given time constraint. So making that the focus before returning to page focus is there for screen readers and other accessible technology. This way, users actually get the information provided.

Also, the MDC team is currently reimplementing Snackbar to more closely match the latest Material spec. We'll see if this is included..
reference: https://github.com/material-components/material-components-web/pull/4091

@Garbee Appreciate your input, and as usual great points. I was secretly hoping to lure you with the mention earlier :smile:, always found your insight on material-components-web helpful.
In my haste writing my comment earlier, I meant to add optional override; requiring developers to pass a flag via MdcSnackbarConfig to remove a snackbar after timeout. Default behavior following MDC / Material specs still.
Since MDCSnackbar is in the process of re-implementation upstream; think it best we wait and see if it's addressed inside the MDC Snackbar Foundation. If not, we can definitely revisit as enhancement..

When doing the initial docs around what became MCW we opted to do our best to never provide options that gave an inferior user experience. Instead forcing a better UX (as defined by the spec, which as far as we could tell in this case what we did held true to the spec) since that is what users deserve.
If people want to give bad experiences to users, they should work for it.

What about checking for tab change (window focus) to deal with this problem? If this is possible, it would work around the UX issue.

The same (Window Visibility) API that is used to detect a tab switch to pause the queue is the same one that should be used to restart the queue timing when the tab is switched back to. As I said previously, if it isn't doing that by default then it is a bug in the implementation.
Switching tabs should not cause an infinitely appearing snackbar. Those don't exist in the specification.

The upcoming snackbar rewrite (see https://github.com/material-components/material-components-web/pull/4091) should not have this problem, because we're removing the visibilitychange and focus/blur handlers
(to avoid bugs like this one).


Build Docs Differently

Currently, they are built and pushed to the main branch of the repository. This forces us to remove the protection rules on the main branch (i.e., requiring a PR before merging). Ideally, we use a different recipe for the docs so that the main branch can be protected again.

Resolved with #211


chore(deps): update docker.io/golangci/golangci-lint docker tag to v1.53.3 - abandoned

This PR contains the following updates:

Package
Type
Update
Change

docker.io/golangci/golangci-lint

minor
1.52.2 -> v1.53.3

docker.io/golangci/golangci-lint

minor
v1.52.2 -> v1.53.3

docker.io/golangci/golangci-lint
final
minor
v1.52.2 -> v1.53.3

Configuration
📅 Schedule: Branch creation - "on monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Autoclosing Skipped
This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.


Removed Unnecessary Commas and Fixed Typos

Description of the change: A few commas were additional and unnecessary, so I removed them.
Reason for the change: Easier reading experience
Link to original source: https://sendgrid.com/docs/for-developers/sending-email/getting-started-email-activity-api/

Closes #

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Fix getattr

When loading a texture in a headless server, we get an AttributeError:
 File "/home/circleci/project/src/project/graphics.py", line 90, in load_texture
    img = pyglet.image.load(tex_path)
  File "/home/circleci/.local/lib/python3.7/site-packages/pyglet/image/__init__.py", line 190, in load
    image = decoder.decode(file, filename)
  File "/home/circleci/.local/lib/python3.7/site-packages/pyglet/image/codecs/pil.py", line 78, in decode
    image_data_fn = getattr(image, "tobytes", getattr(image, "tostring"))
AttributeError: 'Image' object has no attribute 'tostring'

The default part of getattr should not be run if the first attribute is found.

As ccanepa mentioned, it might be a good idea to add this to the encoder too.

I added the fix to the encoder

Thanks @CourchesneA for the pull request, and thanks @ccanepa for your help.
I'll merge this in. I'm preparing a new point release in the next day or so, which will have this in it.


✨ Component: Dropdown Menu

[ ] Implementation
[ ] Example
[ ] Animation
[ ] Storybook/Histoire
[ ] Tests
[ ] Docs

I couldn't find a reference to this component in the documentation/code. Could this potentially be re-opened?

@hcrawfdev Using the issues to track component progress has been deprecated in favor of the README roadmap :)


⚠ Jellyfin has degraded performance

In 361f641, Jellyfin (https://jellyfin.underthere.xyz) experienced degraded performance:

HTTP code: 200
Response time: 26231 ms

Resolved: Jellyfin performance has improved in 12c9e20 after 1 minute.


Keyboard appearance

Hi!
Is there any plans to support .keyboardAppearance for textfields?
Thanks for great lib :)

b45415547719265da43792926be834fc9624b7f1 I added the properties you need, theme_keyboardAppearance.
Here are some ways to use it:
someTextField.theme_keyboardAppearance = [.default, .dark, .light]
someTextField.theme_keyboardAppearance = "somePlistKeyPath"

Objective-C:
// Note: StringStyle is not case sensitive.
someTextField.theme_keyboardAppearance = [ThemeKeyboardAppearancePicker pickerWithStringStyles:@[@"Default", @"Dark", @"Light"]];
someTextField.theme_keyboardAppearance = [ThemeKeyboardAppearancePicker pickerWithKeyPath:@"somePlistKeyPath"];

I noticed that if the keyboard appears while the theme is switched, the keyboard does not immediately switch the style. Reappear when it is ok, it should be the behavior of the system, for this situation you can manually resign the keyboard. Of course, I think this scene may be very rare.

Great! Many thanks!

Hi!
How can I update lib through cocoapods? When I'm trying pod update it says that there is no new version.
Regards

I did not release a new version, so you can specify a commit:
pod 'SwiftTheme', :git => 'https://github.com/jiecao-fm/SwiftTheme', :commit => 'b454155'

Thanks for the help, I'll try it


Adding transport-agnostic abstraction

Most of this code is moving from com.google.api.gax.grpc. I'm doing this as an additive change to allow for easier migration. The diffs from the existing code can be seen in the "diff PR" at https://github.com/googleapis/gax-java/pull/328 .

Codecov Report

Merging #329 into master will decrease coverage by 10.62%.
The diff coverage is 15.27%.

@@              Coverage Diff              @@
##             master     #329       +/-   ##
=============================================
- Coverage     70.11%   59.49%   -10.63%
- Complexity      358      397       +39
=============================================
  Files            73      101       +28
  Lines          1921     2412      +491
  Branches        158      179       +21
=============================================
+ Hits           1347     1435       +88
- Misses          506      906      +400
- Partials         68       71        +3

Impacted Files
Coverage Δ
Complexity Δ

...java/com/google/api/gax/rpc/UnaryCallSettings.java
0% <0%> (ø)
0 <0> (?)

...ain/java/com/google/api/gax/rpc/ClientContext.java
0% <0%> (ø)
0 <0> (?)

...le/api/gax/core/InstantiatingExecutorProvider.java
0% <0%> (ø)
0 <0> (?)

...java/com/google/api/gax/rpc/PagedCallSettings.java
0% <0%> (ø)
0 <0> (?)

.../com/google/api/gax/rpc/StreamingCallSettings.java
0% <0%> (ø)
0 <0> (?)

...ava/com/google/api/gax/rpc/SimpleCallSettings.java
0% <0%> (ø)
0 <0> (?)

.../main/java/com/google/api/gax/rpc/PageContext.java
0% <0%> (ø)
0 <0> (?)

.../java/com/google/api/gax/rpc/BatchingCallable.java
0% <0%> (ø)
0 <0> (?)

...a/com/google/api/gax/rpc/BatchingCallSettings.java
0% <0%> (ø)
0 <0> (?)

...java/com/google/api/gax/rpc/OperationCallable.java
0% <0%> (ø)
0 <0> (?)

... and 47 more

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 34c6d9c...fffcf44. Read the comment docs.

I have addressed feedback, added tests, and merged from master, PTAL

Committed to a branch in https://github.com/googleapis/gax-java/pull/334


Move Bayyinah lecture alongside other per Ayat actions

Suggestions

Add video icons with tooltip "Watch lecture by Bayyinah"
Click on icons will open the video popup
This will make UI more consistence, all action in one place plus will save lot of spaces

Agree this is probably what we want to do in the future. Right now we want it to be in the user's face because Bayyinah worked really hard in making this videos and we want to maximize the usage.


change Pose2 derivative convention to match GTSAM

Defines custom derivatives for Pose2.init, Pose2.rot, and Pose2.t, following the convention from [1] section 5.1.
Adds some tests verifying that derivatives match some of the the theorems about derivatives in [1]: derivatives of left and right multiplication from sections 5.2 and 5.4, and derivatives of the inverse from section 5.3.
Resolves #8.
[1] https://github.com/borglab/gtsam/blob/develop/doc/math.pdf

Thanks for all the comments! This is pretty fun.
I've addressed all your comments except for the adjoint naming question. I asked you about that inline.
I discovered that it will be very nice to have a Vector2 type because there are a lot of places in this PR where I'm doing rotations of Vector2-like things and I have to type out the rotation transformation every time. But I would like to add Vector2 later in a separate PR, to keep this one reasonably small.

This is great! Having actual matrices as tangent vectors would unblock a lot of stuff :)

I've updated the TangetVector to use Vector3, and I've made all the suggested changes in the names and doc comments. Please take another look when you have time :)
The adjoint is currently named groupAdjoint because that's what it seemed like we were leaning towards in https://github.com/borglab/SwiftFusion/issues/21 when I updated that part of the code. I'd be happy to change it to Adjoint if we eventually land on that. Maybe we can make that change after merging this PR, though, so that this PR isn't blocked by a long naming discussion :)


Filter should add to URL

This is similar to #709 but I thought it was good to break out itself.
The filtering is reset upon navigating the site. Also, sharing a link with the filter in the URL would be very useful. Like:
https://distiller.lbl.gov/4dcamera&2022-01-01&2022-01-02 to show January 1st, 2022 data.

Fixed by #729


Added filter for ASPX files and additional error handling

Added error handling and aspx page type filter
Related to issue #101

Thx @pkbullock , merged this one.


Rearrange indentation in data block

Rearrange the indentation in the data block

generated code looks more well formed
promotes readability
saves whitespace

Released with version 1.60.02


[Doc] Add configuration description for Java client

@yjshen could you please help review?

@sijie @yjshen thanks for your review.
@sijie could you please help merge?

Fix a part of https://github.com/apache/pulsar/issues/4509


[BUG] - Images created before 3-14-2023 in invoke will not open

Description
As described, images created on 3-13-2023 or earlier in invoke AI will not open. No error message or anything, simply nothing happens when dragged in. This roughly corresponds to release 2.3.2, so it's possible this is something to do with versions prior to that one.
Reproduction steps
Drag image with date older than 3-13-2023 into the window.
Absolutely nothing happens.
Image file
From 3-13-2023:

From 3-15-2023:

Version
1.3.2
OS
Windows
Tool
InvokeAI

I have confirmed that the prompt sections of these two images are slightly different. Thank you for providing the image from the early versions of Invoke AI. This will allow me to make SD Prompt Reader support a wider range of formats. I will be releasing beta2 within the next few days to solve this issue.

You might want to check on the Invoke discord regarding even earlier versions.

https://github.com/receyuki/stable-diffusion-prompt-reader/releases/tag/v1.3.3-beta.2
I just released beta 2. Try it out.


Portuguese Demo app review results/issues

corrections_Nov2021_JimNotes.docx
@kazlauskis All the issues / comments from Brazil have been reviewed.
Where appropriate I have correct the master spreadsheet.
There are issues relating to the use of the term 'flower/floral visitor' in preference to 'insect' - these have been updated in the Portuguese in Transifex, but will need to be updated in the Brazil version English - I'm happy to do that if you can let me know where I'd make those changes.
Jim

@CCarvell Just for your information Claire. The majority of the Brazil changes related to the need to change from 'insect' to 'flower visitors' so that it makes more sense in the bat/hummingbird context.

@JimChiazzese1 thanks for the comments in the doc. I am splitting these up into multiple tickets for convenience.


Revert "Update DC/OS CLI Version"

Reverts mesosphere/dcos-commons#1856
Because of errors like this https://teamcity.mesosphere.io/viewLog.html?buildId=866935&buildTypeId=ClosedSource_MesosphereEnterpriseDcOs_IntegrationTests_DcOsCommonsSmokeTest&tab=buildLog&_focus=2796
Copy pasting @mellenburg comments  :

we define a specify SHA to pull down github.com/dcos/dcos-cli
dcos/dcos-cli only has a top-level setup.py file for the dcos module. The dcoscli module is a completely separate module that lives inside the cli folder. When pip3 installs the specific SHA of dcoscli, it completely ignores dcoscli because its not in setup.py and therefore effectively doesnt exist to pip
shakedown is the next dependency on the list. It is only linked to a top-level pypi version of dcos/dcoscli. When pip3 tries to install that, it does so from PYPI, where the dcos/dcos-cli has been exported as a wheel or something. In that case, the packaging included ALL of the files in the repository so the dcoscli is pulled in this time as a module (edited)

Ways this could have been prevented:

don't have two python projects in one repo (too late)
only use the CLI as a CLI. I.E. do not invoke its python internals as this has not been maintained/published/packaged as a dcos interface library (also, too late, but we can definitely work towards the ideal here)

How we can fix this:

work with pip to make sure it knows to pull in this additional, nonstandard module
only use a coherent CLI, which is released as a binary and invoked only as a CLI

For now, I would suggest a revert on that CLI change so you don't have a borked dev container

Please hold off merging this.


New hooks for request validating

Added a post-processing hook for subclasses of BaseValidatingInterceptor.

Coverage decreased (-0.005%) to 81.745% when pulling 6096c546348b7414a9c491f5866e6877788c0b43 on new_hooks_for_request_validating into 0d066275a31bbebdd1a6d13af36bfbd24cd3dfab on master.

Coverage increased (+0.005%) to 81.755% when pulling 59da1aa31a353be36f9f4847410816b479df589f on new_hooks_for_request_validating into 0d066275a31bbebdd1a6d13af36bfbd24cd3dfab on master.


RangeError: Maximum call stack size exceeded

Hi! I'am using your component and it is very useful for me.
But I'am confusing some strange behaviour. For example, when I try to set rawValue, it show in console RangeError: Maximum call stack size exceeded. Here jsfiddle link, where I reproduce a problem https://jsfiddle.net/sLd8fpk5/2/. The second problem is when I try to delete some digit in input, cursor jump to the right side of input. For example, enter in jsfiddle 1234567, then try to remove 2.
Why it happening? Can you explain or give me some advice?
Thank you in advance!
PS: I'am using documentation about React version of Cleave.js https://github.com/nosir/cleave.js/blob/master/doc/reactjs-component-usage.md

Because you call setRawValue in the change event, which will trigger change event again, which causes an infinite loop. Basically in change event callback, you shall just setState to update your view
There is an known issue, let's track it here: https://github.com/nosir/cleave.js/issues/350
Thanks


Update experimental.md

Fix 404 at https://babeljs.io/docs/advanced/transformers/comprehensions
Link for es7.comprehensions is broken

Thanks


WIP: [Release] Verify release-18.1.0-rc0

PR to verify Release Candidate

@github-actions crossbow submit  --group verify-rc-source --param release=18.1.0 --param rc=0

Just wondering should the fixing below in?

https://github.com/apache/arrow/pull/44542
https://github.com/apache/arrow/pull/44387

@mapleFU that's a bit late :( are these critical?

rc1 started

Hey @mapleFU, while it would be nice to have the fixes in, I think both can wait until 19.0.0. Happy to continue discussing it though.

https://github.com/apache/arrow/pull/44542 is a segfault (i.e. Critical Fix) which would be a good reason to consider it but I don't think it's a high impact one. I marked the corresponding issue accordingly.
https://github.com/apache/arrow/pull/44387 doesn't look like a critical fix


fix: comparison histogram

Codecov Report
Base: 90.64% // Head: 90.64% // Decreases project coverage by -0.00% :warning:

Coverage data is based on head (cf0888b) compared to base (ef90115).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1228      +/-   ##
===========================================
- Coverage    90.64%   90.64%   -0.01%
===========================================
  Files          186      186
  Lines         5647     5645       -2
===========================================
- Hits          5119     5117       -2
  Misses         528      528

Flag
Coverage Δ

py3.8-ubuntu-latest-pandas
90.64% <100.00%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/pandas_profiling/visualisation/plot.py
80.64% <100.00%> (-0.11%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Object processors in rules using assignment with mixed objects

This is linked to issue #72, which looked like it was resolved. But I have found a more complex set of rules that do not work in release 1.7.1 (with #72 fixed), both with python2.7.15 and with python3.6.5.
In release 1.6.1 it works as expected only with python2. Release 1.6.1 with python3 behaves weirdly.
Example code:
from textx.metamodel import metamodel_from_str

call_counter = 0
grammar1 = u"""
foo:
    'foo' m_formula = Formula
;

Formula:
    ( values=FormulaExpression values='+' ( values=FormulaExpression)* )
;

FormulaExpression:
    values=bar
;

bar:
    m_id=/[a-f0-9]+/
;
"""

grammar2 = u"""
foo:
    'foo' m_formula = Formula
;

Formula:
    ( values=FormulaExpression ( values=FormulaExpression)* )
;

FormulaExpression:
    values=bar
;

bar:
    m_id=/[a-f0-9]+/
;
"""

grammar3 = u"""
foo:
    'foo' m_formula = Formula
;

Formula:
    ( values=FormulaExpression values='+' ( values=FormulaExpression)* )
;

FormulaExpression:
    values=/[a-f0-9]+/
;

"""

def default_processor(obj):
    global call_counter
    call_counter+= 1
    print("PROCESSING " + str(obj.__class__.__name__))

def parse_str(grammar, lola_str):
    lola_str = str(lola_str)
    obj_processors = {
        "foo": default_processor,
        "Formula": default_processor,
        "FormulaExpression": default_processor,
        "bar": default_processor,
        }

    meta_model = metamodel_from_str(
        grammar, ignore_case=True, auto_init_attributes=False
        )
    meta_model.register_obj_processors(obj_processors)
    model = meta_model.model_from_str(lola_str)
    return model

test_str = u"foo a323 + a111"
call_counter = 0
parse_str(grammar1, test_str)
print(call_counter)  # expecting call_counter == 6
print("---")
test_str = u"foo a323 a111"
call_counter = 0
parse_str(grammar2, test_str)
print(call_counter)
print("---")  # expecting call_counter == 6
test_str = u"foo a323 + a111"
call_counter = 0
parse_str(grammar3, test_str)
print(call_counter)  # expecting call_counter == 4

What breaks processors in major way is rule Formula which uses assignment with object of different types (textx resolved object and unicode string).
For 1.6.1 with python2 it works as I expected with all three grammars:
bar, Formula, FormulaExpression and foo processors are called.
Note in grammar3 there is no bar rule, so only in 'grammar1' and 'grammar2' are expected to call processor for bar.
For 1.7.1 with python2
In grammar2 and grammar3 processors are called correctly.
But in grammar1 processor for rule bar is not called.
For 1.6.1 and 1.7.1 with python3, grammar2  looks like is processed correctly.
Using grammar1 does not start object processors for rules FormulaExpression and bar.
Using grammar3 does not start object processors for rules FormulaExpression.
I know textx accepts only unicode so I've used prefix 'u' to enforce unicode be used for grammars and test strings for python2 (this prefix still works in python3). But either way, there seems to be major differences how textx behaves in python2 and python3.

Thanks for a detailed report. There has been some recent work on object processors call by @goto40 on #79. That work is not released yet but is merged on master.
I did a quick test and it seems that your example works correctly for both python 2.7 and 3.6.
Could you test with the current master?
BTW, thanks for the test. I'll incorporate it in the set of unit tests so we will let CI run it for all supported versions.

Pulled master, ran the code i posted and it works as expected in python 2.7.15
But in python 3.6.5 it does not. In grammar1 and grammar3 processors for rules FormulaExpression and bar are still not called correctly.
I start to wonder, maybe my code snippet is flawed for python3.
But as long as it works for python2, I'm content and can call this issue resolved.

Agreed. Closing.


Exit code when validation fails with --mode compare

When using --mode compare to verify the replicate command, the command currently exits 0 even when the validation fails.
$ riot "${RIOT_SOURCE[@]}" replicate "${RIOT_TARGET[@]}" --mode compare --progress ascii ; echo $?
Comparing 100% [============================================] 101/101 (0:00:00 / 0:00:00) ?/s >0 T0 ≠101 ⧗0
0

It would be useful to be able to force the command to exit non-zero if validation fails

🎉 This issue has been resolved in v3.1.1 (Release Notes)


Resin Sync should follow the COPY commands from the Dockerfile

It would be useful if resin sync could figure how how to correctly sync files based on the COPY commands it reads in the Dockerfile.

@shaunmulligan I think a better place for this issue would be the https://github.com/resin-io-modules/resin-sync project, since that's where the sync logic is implemented.
I'll move it for you and close this one.


rpcd-mod-luci: luci hangs loading overview page

I updated rpcd-mod-luci with 0c7a33523027e2241d4ff93dc987c97ce233912e, and now the system hangs loading the status page.
rpcd-mod-luci also needs a version bump with the change
cc @jow-

Cannot reproduce it here.

ubus call luci-rpc getDHCPLeases worked fine, but something else was causing it to segfault when loading the overview page.
I just rebuilt it from the SDK rather than installing from the overnight build, and all appears to be working now.


RFC6902 "JSON Patch" support

I hit a use case where I wanted to collapse ~6 individual templates, nearly identical, into a single template. However, I couldn't find a way to achieve that without changing the LogicalName for the ECR in the template, which resulted in a replace in the changeset. I've added example/patching to illustrate the scenario where I encountered this.
I used Kustomize's support (where Kustomize is loosely, stack_master for Kubernetes) for JSON Patches (RFC6902) as inspiration: it's commonly used to handle complex but predictable, modifications like this.
Including this change would allow me to define the templates I mentioned earlier as a single YAML template using CloudFormation parameters, rather than writing a SparkleFormation dynamic to dynamically define resource and output names.
Roadmap

[x] Add examples
[x] Add functionality
[ ] Add tests for new functionality

Discussion points

Like Kustomize, this feature supports both JSON and YAML formatted patches. This is a superset of RFC functionality.

Would we prefer to stick to the RFC more strictly?

Template output changes somewhat when patches are applied, as it goes through a String->Hash->String round-trip.

Is this a breaking change? The behaviour should only be observed when patches are used.

Is hana the ideal gem for this job? The output error messages aren't particularly helpful for the user, but it's both the most popular and most recently updated JSON Patch gem.
Do we want to support inline patches on the stack definition? e.g.stacks:
  us-east-1:
    a_stack:
      template: a_template.yml
      json_patches:
        - op: remove
          path: /Resources/UnnecessaryResource

The most common use case is to build a VPC in n number of AZs/Subnets.
This example illustrates to me the inflexibility of CloudFormation JSON/YAML templates.
An example of that here would help understand the usefulness of this solution with more examples than just the ECR one.
@patrobinson

The base style of patching will not help that scenario much, it's more about making small, targeted changes. I wouldn't encourage it, but you could do something like:
- op: copy
  from: /Resources/FirstSubnet
  path: /Resources/SecondSubnet

- op: replace
  path: /Resources/SecondSubnet/CidrBlock
  value: <IP_ADDRESS>/24

- op: replace
  path: /Resources/SecondSubnet/AvailabilityZone
  value: us-east-1b

# etc.

My aim with proposing this patch approach was to handle small, specific and targeted changes that can't otherwise be handled without major template changes.

Ok that's not as horrible as I thought it would be :D


[HOLD for payment 2023-07-24] [$1000]  Invalid number stays in contacts list

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Start a new chat with an invalid number, for example +916541237890
Close the error
Click on FAB > New chat

Expected Result:
The invalid number should not appear on the contact list
Actual Result: The invalid number stays in th
e contact list
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.36-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/ee96c10e-9864-4aa2-be2c-b9528cebd3e5
https://github.com/Expensify/App/assets/43996225/f806b1a3-6bba-40ef-bdd8-8814c4fcc228
Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688409641152459
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~010bc8c0b49aadb102
Upwork Job ID:<PHONE_NUMBER>252989440
Last Price Increase: 2023-07-07

how can i send proposal in github?
to apply for job

Contributor details
Your Expensify account email:
Upwork Profile Link:  where to write this !!!

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/omarirfan

now how can i submit the proposal

Just follow the format like this.

@narefyev91 - how are the proposals here?

Proposal of @dukenv0307 looks good to me - https://github.com/Expensify/App/issues/22209#issuecomment-1620610279
🎀 👀 🎀 C+ reviewed

Member assigned.

Hiya folks. I'm OOO today, but just today. If you absolutely need payment today, please reach out in the open source slack channel. Otherwise, I'll do these tomorrow. Thanks!

External issue reporter: @Nathan-Mulugeta has a $250 payment offer here: https://www.upwork.com/nx/wm/pre-hire/c/8577561/offer/25751205
Contributor that fixed the issue: @dukenv0307 paid $1500 here: https://www.upwork.com/ab/feedbacks/c/1328455843768528896/contract/34187160
Contributor+ that helped on the issue and/or PR: @narefyev91 is from Callstack.
@narefyev91 - we need the checklist completing here before this can be closed please: https://github.com/Expensify/App/issues/22209#issuecomment-1638749327