Automatic splitting of long embeds for pagination.

Currently if a list of ripped assets is longer than 2048 characters when sent in an embed, the embed won't be able to be sent due to too many characters.
Solution would be to automatically split the embed into more than one part and paginate the whole thing to avoid any issues.

Added in Release 1.1.0.


how can I transfer the video stream from one android device to another and play it

how can I transfer the video stream from one android device to another and play it
just in lan
Like sending a file? Do all rendering and playback need to be implemented by myself?

Is there any recommended library

srtdroid is only a network library. It does not handle video, or record anything. You can imagine it is a complexe UDP socket and that's it.
About the contribution part, I developed a live streaming library that captures camera, microphone and send the streams to a SRT server: StreamPack
About the delivery, I also made a PoC on an SRT Player.
But both are made to work as a socket client, so you can't connect them. I don't know what you are trying to achieve but you usually don't stream directly from one device to another, you use a server in the middle.

ok, thanks for replying

ok, thanks for reply
I just want to implement a function to push the stream to another device under the LAN without a server
just like  protake
and I learned that it uses this library，But I don't know how it is implemented
I decompiled it ,  I learned that it uses srtdroid to send and receive byte data
I think the effect it achieves is still very good
how can i achieve it？

Hi,
As I said, to push camera+audio streams to another device, use StreamPack.
You could also implement this feature by yourself.
This library is just a wrapper around libsrt and nothing more. To achieve to create an application, you will have to develop by yourself.


How to evaluate representations for visuomotor control like r3m

Hello, how can I evaluate on Franka Kitchen simulation environments.

Yeah i have same question


Typo in create-user.md

See Considerations.
Should be "Usernames:" instead of "Role names:".

Seems like this was taken from CREATE ROLE: https://www.cockroachlabs.com/docs/stable/create-role.html.

Thanks for reporting this, @imjching!


[Feature] Log scanner should support fetch the logs tiered into lake

Search before asking

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

Motivation
Currently, since lakehouse is another tiered storage of logs, log scanner should support to scan logs from the lakehouse while the remote logs has been cleaned by ttl. Also, scan log from lakehouse should be more efficient since it's columar and compressed format.
Solution
Server can tell log scanner the logs to be fetch is in lake, and then log scanner can fetch data from lake directly.  It shoudn't be much complex since the lake formats expose rich read api to  help us do that.
Anything else?
No response
Willingness to contribute

[ ] I'm willing to submit a PR!

I am currently sorting out the timing diagram of fluss, and will have preliminary communication with you when everything is ready.


New release

Hi!
Would you mind making a new release?
For example 0.3.1. For ROS releases it's also important that a git tag with the corresponding version exists.
Thank you!

Or only add a git tag 0.3.0 corresponding to the current package.xml would also suffice :+1:

@Timple New tag added. Hope this helps.

Thanks!


[WIP] [1.x] Externalize KeyPackageStorage and update join and write to storage generation API

Background:
As laid out in #207, we want to externalize all storage objects that interact with mls-rs so internal functionality is not directly dependent on a user-provided storage mechanism.
Description of feature:
Key Package Storage
Currently when a Client joins a group with Client::join_group, it will retrieve the private key that corresponds with the key package that was used to add it to the group. Later when the created Group is saved with Group::write_to_storage, it will delete that private key in the KeyPackageStorage implementation.
Before (0.x)
Join Group API
// Make a key package store that conforms to the KeyPackageStorage trait
let key_package_store = MyKeyPackageStore::new();

let client = Client::builder()
        .key_package_repo(key_package_store) // Transfer the ownership of the key package repo to a client via the ClientBuilder
        ....
        .build();

// Join a group.
let (group, new_member_info) = client.join_group(tree_data, welcome_message).unwrap();

In the above, join_group internally finds the key package private key by calling KeyPackageStorage::get on (a clone of) the key_package_store with all key package references included in the welcome_message.
Write to Storage API
// Join a group
let (group, new_member_info) = client.join_group(tree_data, welcome_message).unwrap();

// Store state of the joined group.
group.write_to_storage().unwrap();

In the above, write_to_storage internally deletes the key package private key used to join by calling KeyPackageStorage::delete on (a clone of) the key_package_store owned by client.
After (1.x)
Join Group API
Client joins a group in three steps. First, it parses the Welcome message which returns information needed to fetch the private key from the storage. The same function will be used to parse other MLSMessage types like Commit, Proposal. Second, Client retrieves the private key and, third, it joins using the private key.
// Make a key package store that conforms to the KeyPackageStorage trait
let key_package_store = MyKeyPackageStore::new();

let client = Client::builder()
        .... // No key package specific configuration
        .build();

// Parse the Welcome message
let parsed_message = client.parse_message(welcome_message);

let ParsedMessage::Welcome {
    key_package_refs, // List of key package refs found in the message
    cipher_suite,
} = parsed_message
else {
    // Handle the case where this is not a Welcome message
};

// Independently retrieve key package private key
let private_kp_data = key_package_store.get(key_package_refs, cipher_suite).unwrap();

// Join group
let (group, new_member_info) = client.join_group(tree_data, welcome_message, private_kp_data).unwrap();

Write to Storage API
Instead of calling various storage interfaces internally, the write_to_storage function outputs a diff between the last write and the current state, which is used by the application to update the storage. Here we focus on key packages.
// Join a group
let (group, new_member_info) = client.join_group(tree_data, welcome_message).unwrap();

// Export a diff between the current group state and the last group state written to storage
let group_state_diff = group.write_to_storage().unwrap();

// The diff contains (group state update and) a possibly a key package to delete.
if let Some(key_package_ref) = group_state_diff.key_package_to_delete {
    key_package_store.delete(key_package_ref).unwrap();
}

Thanks for the write-up, Marta! This looks very nice to me.
I believe that this will overall make all method calls to Client and Group be "idempotent" (if that's the right word?)? That is, if I call it Client::join_group twice with the same arguments, I get the same (group, new_member_info) values back?
(Module any randomness that might be picked when the values are created, but semantically the values would compare equal after two calls.)

You're right that join_group will be idempotent. I'm not 100% sure about Group functions. E.g. if you call Group::process_incoming_message with a ciphertext, I think for forward secrecy, Group should delete the decryption key from memory? Of course if you create Group again with the same snapshot, then you can receive the ciphertext for the second time.

Yes, the good news is we already have this in place in order to support processing multiple messages before the user calls write to storage.


Loading diffuse textures too

Context:
In mtl files separate textures can be defined for appearance in ambient lighting (Ka), diffuse lighting (Kd), and for specular reflections (Ks). Our current loader only looks for texture in Ka and treedy saves its textures under Kd. Since our code does not distinguish between the two, this fix loads both in the same way. If both are present, only Ka is loaded for legacy behavior.
Edit:
Added a fix to the code that loads texture files.

@algrs Another pass?

@aw is this good?


unpak_from error

Thank you for your program.
In using viz_rgba.py to read my original file, unpack_from error occurred.
It says:
unpack_from requires a buffer of at least 8 bytes for unpacking 4 bytes at offset 4 (actual buffer size is 4)
File "C:\Users\vscode\vox-py-io\py-vox-io\examples\viz_rgba.py", line 9, in
m = VoxParser('test2.vox').parse()
How can I avoid this error?

It seems a problem of Blender option program (https://github.com/Spyduck/voxwriter) because If I re-open and re-save by MagicaVoxel the file that shows error, the error disappears.


Iteration Plan for November 2022

Dates
Start iteration: 24-10-2022
End iteration: tba
Beta testing from: tba
Sprint Goals

Performance and reliability

Legend of annotations:

Mark
Description

🔺
P0 - first to to be worked on

💪
Stretch goal for this iteration

🕜
In Progress

⛔
Blocked

🤞
To be released

Shall we fill this up with issues now that it's started?


Concurrent map iteration and write exception

I'm using the library in an application where multiple go-routines are marshalling JSON (potentially at the same time). Although I've run a number of times successfully, today I got a concurrent map access exception from within the go-json library. Is the library intended to be thread-safe?
The stack trace given was:
goroutine 3287070 [running]:
runtime.throw({0x1830962, 0x10000000186d480})
        /usr/local/go/src/runtime/panic.go:1198 +0x71 fp=0xc04931da40 sp=0xc04931da10 pc=0x444e91
runtime.mapiternext(0x1787760)
        /usr/local/go/src/runtime/map.go:858 +0x4eb fp=0xc04931dab0 sp=0xc04931da40 pc=0x41f26b
runtime.mapiterinit(0x1, 0xc04931db00, 0xc0438baa80)
        /usr/local/go/src/runtime/map.go:848 +0x236 fp=0xc04931dad0 sp=0xc04931dab0 pc=0x41ed36
reflect.mapiterinit(0x1a95250, 0xc0438baa80)
        /usr/local/go/src/runtime/map.go:1340 +0x45 fp=0xc04931db10 sp=0xc04931dad0 pc=0x472065
github.com/goccy/go-json/internal/encoder/vm.Run(0xc0777cc000, {0xc0438baa80, 0x0, 0x6a80}, 0xc00013b1c0)
        /home/astock/go/pkg/mod/github.com/goccy/go-json@v0.8.1/internal/encoder/vm/vm.go:406 +0x2ad7 fp=0xc049320fc0 sp=0xc04931db10 pc=0x10a03d7
github.com/goccy/go-json.encodeRunCode(0x203012, {0xc0438baa80, 0x203012, 0xc04a82bb00}, 0xc0c545de80)
        /home/astock/go/pkg/mod/github.com/goccy/go-json@v0.8.1/encode.go:307 +0x68 fp=0xc049320ff8 sp=0xc049320fc0 pc=0x10ca968
github.com/goccy/go-json.encode(0xc0777cc000, {0x1755620, 0xc04a82bb00})
        /home/astock/go/pkg/mod/github.com/goccy/go-json@v0.8.1/encode.go:232 +0x21c fp=0xc049321078 sp=0xc049320ff8 pc=0x10ca85c
github.com/goccy/go-json.marshal({0x1755620, 0xc04a82bb00}, {0x0, 0x0, 0xc0cfc5d128})
        /home/astock/go/pkg/mod/github.com/goccy/go-json@v0.8.1/encode.go:147 +0xba fp=0xc0493210d8 sp=0xc049321078 pc=0x10ca51a
github.com/goccy/go-json.MarshalWithOption(...)
        /home/astock/go/pkg/mod/github.com/goccy/go-json@v0.8.1/json.go:186
github.com/goccy/go-json.Marshal({0x1755620, 0xc04a82bb00})
        /home/astock/go/pkg/mod/github.com/goccy/go-json@v0.8.1/json.go:171 +0x2a fp=0xc049321110 sp=0xc0493210d8 pc=0x10ca9ea```

The current implementation doesn't lock when encoding the map.
Therefore, if you refer and encode the same map from multiple goroutines, panic may occur.
Perhaps this will happen with the standard library as well.

Thanks for the fast reply. As far as I'm aware I'm not using the data I'm encoding elsewhere while marshalling as each goroutine creates and manages its own data. I will have a check/think about whether there could be concurrent access.
As far as you're aware / expecting, I should be able to concurrently call Marshal on different objects without potential for issues - is that correct?
Thanks

As an additional comment, I've never seen this error with the standard library so I either got unlucky (possibly) or it's a difference in the implementations (I've only recently switch to go-json to try to improve performance).

I agree. If uses different map object in all goroutines,  i think that the map object could be encoded without problems.
If you encounter problems in that state, it's likely that there is a problem with go-json, so I'll investigate it.

I had same problem in 0.8.1 version. Than updated to master(0.8.2) and got
recovered from panic: runtime error: makeslice: len out of range
goroutine 8473 [running]:
runtime/debug.Stack()
	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/debug/stack.go:24 +0x88
gitlab.ozon.ru/platform/scratch/pkg/mw/http.Recover.func1.1(0x14001869200, {0x1065a3200, 0x1402acbbc50})
	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/panic.go:1038 +0x21c
github.com/goccy/go-json/internal/encoder.NewMapContext(0x6e656e6f706d6f63)
	/Users/oelizarov/go/pkg/mod/github.com/goccy/go-json@v0.8.2-0.20211227143828-2d98d47d0f92/internal/encoder/encoder.go:265 +0x88
github.com/goccy/go-json/internal/encoder/vm.Run(0x140006ecd00, {0x14013038000, 0x0, 0x400}, 0x1401243c0c0)
	/Users/oelizarov/go/pkg/mod/github.com/goccy/go-json@v0.8.2-0.20211227143828-2d98d47d0f92/internal/encoder/vm/vm.go:406 +0x2b4c
github.com/goccy/go-json.encodeRunCode(0x140006ecd00, {0x14013038000, 0x0, 0x400}, 0x1401243c0c0)
	/Users/oelizarov/go/pkg/mod/github.com/goccy/go-json@v0.8.2-0.20211227143828-2d98d47d0f92/encode.go:307 +0x170
github.com/goccy/go-json.encode(0x140006ecd00, {0x10636c3e0, 0x1402f73ef60})
	/Users/oelizarov/go/pkg/mod/github.com/goccy/go-json@v0.8.2-0.20211227143828-2d98d47d0f92/encode.go:232 +0x288
github.com/goccy/go-json.marshal({0x10636c3e0, 0x1402f73ef60}, {0x0, 0x0, 0x0})
	/Users/oelizarov/go/pkg/mod/github.com/goccy/go-json@v0.8.2-0.20211227143828-2d98d47d0f92/encode.go:147 +0xbc
github.com/goccy/go-json.MarshalWithOption(...)
	/Users/oelizarov/go/pkg/mod/github.com/goccy/go-json@v0.8.2-0.20211227143828-2d98d47d0f92/json.go:186
github.com/goccy/go-json.Marshal({0x10636c3e0, 0x1402f73ef60})
	/Users/oelizarov/go/pkg/mod/github.com/goccy/go-json@v0.8.2-0.20211227143828-2d98d47d0f92/json.go:171 +0x38

This marshal() is called in child goroutine of http.Serve . My struct is ~
map[string]interface{"text1":[]element{element{field1:map[string]interface{}}}}
Can't repeat problem in single goroutine with that struct, but if field1 is nil or empty(len=0) than it doesn't panic
There is no panic if using encoding/json , json-iterator or sonic
Hope that you will fix it , because I like this project. ❤

Thank you for the reporting.
I tried to reproduce this problem, but still I couldn't ...
My testing codes is the following .
package json_test

import (
	"sync"
	"testing"

	"github.com/goccy/go-json"
)

func TestEncodeConcurrentMap(t *testing.T) {
	type T struct {
		M map[string]interface{}
	}
	n := 100000
	var wg sync.WaitGroup
	wg.Add(n)
	for i := 0; i < n; i++ {
		go func() {
			v := map[string]interface{}{
				"a": []T{
					{
						M: map[string]interface{}{
							"foo": "bar",
						},
					},
				},
				"b": "baz",
			}
			for j := 0; j < 10; j++ {
				if _, err := json.Marshal(v); err != nil {
					t.Fatal(err)
				}
			}
			wg.Done()
		}()
	}
	wg.Wait()
}

Thanks for following this up. After raising this, we got another (but different) concurrent access error while JSON marshalling. I now suspect that there was some object sharing between the goroutines and that may have been the cause of this error. We've put a fix into our codebase and will try this library again and see if we see the issue again.

Thanks for following this up. After raising this, we got another (but different) concurrent access error while JSON marshalling. I now suspect that there was some object sharing between the goroutines and that may have been the cause of this error. We've put a fix into our codebase and will try this library again and see if we see the issue again.

I got the same problem with copy a sync.Map to a normal build-in normal map

@Max-Cheng
Wow! Is it possible to write reproducible test code?

Context:

rawdata:=&sync.Map{}
// Add some data
targetMap:=make(map[string]interface{})

rawdata.Range(func(key,value interface{})bool{
    targetMap[key.(string)] = value
})

data:=gjson.Marshal(targetmap)              // panic here

Stack:
goroutine 43 [running]:
runtime.throw({0x10536923a, 0x26})
	/Users/co1a/go/go1.17.5/src/runtime/panic.go:1198 +0x54 fp=0x1400130f210 sp=0x1400130f1e0 pc=0x104c58804
runtime.mapiternext(0x140001402c0)
	/Users/co1a/go/go1.17.5/src/runtime/map.go:858 +0x538 fp=0x1400130f290 sp=0x1400130f210 pc=0x104c30708
reflect.mapiternext(0x140001402c0)
	/Users/co1a/go/go1.17.5/src/runtime/map.go:1346 +0x28 fp=0x1400130f2b0 sp=0x1400130f290 pc=0x104c884a8
github.com/goccy/go-json/internal/encoder/vm.Run(0x140012c4000, {0x14000f22000, 0x0, 0x400}, 0x140006441c0)
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/internal/encoder/vm/vm.go:457 +0x6e0 fp=0x14001313b90 sp=0x1400130f2b0 pc=0x104fd2370
github.com/goccy/go-json.encodeRunCode(0x140012c4000, {0x14000f22000, 0x0, 0x400}, 0x140006441c0)
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/encode.go:308 +0x170 fp=0x14001313bf0 sp=0x14001313b90 pc=0x104ffee20
github.com/goccy/go-json.encodeNoEscape(0x140012c4000, {0x105505180, 0x14001313e40})
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/encode.go:259 +0x1d0 fp=0x14001313c80 sp=0x14001313bf0 pc=0x104ffebf0
github.com/goccy/go-json.marshalNoEscape({0x105505180, 0x1400006de40})
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/encode.go:172 +0x7c fp=0x14001313d00 sp=0x14001313c80 pc=0x104ffe59c
github.com/goccy/go-json.MarshalNoEscape(...)
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/json.go:176

I'll try to help you add some unit test code.

Context:
rawdata:=&sync.Map{}
// Add some data
targetMap:=make(map[string]interface{})

rawdata.Range(func(key,value interface{})bool{
    targetMap[key.(string)] = value
})

data:=gjson.Marshal(targetmap)              // panic here

Stack:
goroutine 43 [running]:
runtime.throw({0x10536923a, 0x26})
	/Users/co1a/go/go1.17.5/src/runtime/panic.go:1198 +0x54 fp=0x1400130f210 sp=0x1400130f1e0 pc=0x104c58804
runtime.mapiternext(0x140001402c0)
	/Users/co1a/go/go1.17.5/src/runtime/map.go:858 +0x538 fp=0x1400130f290 sp=0x1400130f210 pc=0x104c30708
reflect.mapiternext(0x140001402c0)
	/Users/co1a/go/go1.17.5/src/runtime/map.go:1346 +0x28 fp=0x1400130f2b0 sp=0x1400130f290 pc=0x104c884a8
github.com/goccy/go-json/internal/encoder/vm.Run(0x140012c4000, {0x14000f22000, 0x0, 0x400}, 0x140006441c0)
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/internal/encoder/vm/vm.go:457 +0x6e0 fp=0x14001313b90 sp=0x1400130f2b0 pc=0x104fd2370
github.com/goccy/go-json.encodeRunCode(0x140012c4000, {0x14000f22000, 0x0, 0x400}, 0x140006441c0)
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/encode.go:308 +0x170 fp=0x14001313bf0 sp=0x14001313b90 pc=0x104ffee20
github.com/goccy/go-json.encodeNoEscape(0x140012c4000, {0x105505180, 0x14001313e40})
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/encode.go:259 +0x1d0 fp=0x14001313c80 sp=0x14001313bf0 pc=0x104ffebf0
github.com/goccy/go-json.marshalNoEscape({0x105505180, 0x1400006de40})
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/encode.go:172 +0x7c fp=0x14001313d00 sp=0x14001313c80 pc=0x104ffe59c
github.com/goccy/go-json.MarshalNoEscape(...)
	/Users/co1a/go/pkg/mod/github.com/goccy/go-json@v0.9.1/json.go:176

I'll try to help you add some unit test code.

Not only v0.9.1``v0.9.4

Ah, Looking at the stack trace, it seems that you are using json.MarshalNoEscape instead of json.Marshal . This does not escape the argument, so this API will cause problems depending on the timing of the GC. I want to know the pattern of bugs that occur in json.Marshal.

Ah, Looking at the stack trace, it seems that you are using json.MarshalNoEscape instead of json.Marshal . This does not escape the argument, so this API will cause problems depending on the timing of the GC. I want to know the pattern of bugs that occur in json.Marshal.

Nope. I using default pattern

@Max-Cheng Ummm... json.MarshalNoEscape is always used in the stack traces you posted.

No more panic after using map[string]interface{} and gjson.marshal, thanks! @goccy

@Max-Cheng Thank you for your report !!
@watchforstock @OlegElizarov
This problem may have been fixed by some modifications to the map encoder.
If you encounter similar issues with v0.9.6 or later, please reopen this.

@goccy
i'm still having this issue on v0.9.10
i don;t know how to reproduce it, but it happens once in a couple of days on my server
golang version 1.18
stack trace:
fatal error: concurrent map iteration and map write
--
Sat, Aug 27 2022 3:47:12 pm |
Sat, Aug 27 2022 3:47:12 pm | goroutine 70 [running]:
Sat, Aug 27 2022 3:47:12 pm | runtime.throw({0x16d3ae8?, 0x1?})
Sat, Aug 27 2022 3:47:12 pm | /usr/local/go/src/runtime/panic.go:992 +0x71 fp=0xc000f0c258 sp=0xc000f0c228 pc=0x43a1f1
Sat, Aug 27 2022 3:47:12 pm | runtime.mapiternext(0xe?)
Sat, Aug 27 2022 3:47:12 pm | /usr/local/go/src/runtime/map.go:871 +0x4eb fp=0xc000f0c2c8 sp=0xc000f0c258 pc=0x411bcb
Sat, Aug 27 2022 3:47:12 pm | reflect.mapiternext(0x3?)
Sat, Aug 27 2022 3:47:12 pm | /usr/local/go/src/runtime/map.go:1378 +0x19 fp=0xc000f0c2e0 sp=0xc000f0c2c8 pc=0x4665d9
Sat, Aug 27 2022 3:47:12 pm | github.com/goccy/go-json/internal/encoder/vm.Run(0xc002a0cf70, {0xc00107a000?, 0x527ddc?, 0x0?}, 0x8?)
Sat, Aug 27 2022 3:47:12 pm | /go/pkg/mod/github.com/goccy/go-json@v0.9.10/internal/encoder/vm/vm.go:461 +0x75b fp=0xc000f0f720 sp=0xc000f0c2e0 pc=0xa026db
Sat, Aug 27 2022 3:47:12 pm | github.com/goccy/go-json.encodeRunCode(0xc000f0f790?, {0xc00107a000?, 0xc003a214a0?, 0x1?}, 0xc000f0f7a8?)
Sat, Aug 27 2022 3:47:12 pm | /go/pkg/mod/github.com/goccy/go-json@v0.9.10/encode.go:310 +0x68 fp=0xc000f0f758 sp=0xc000f0f720 pc=0xa2eb28
Sat, Aug 27 2022 3:47:12 pm | github.com/goccy/go-json.encode(0xc002a0cf70, {0x140be80, 0xc00542cdd0})
Sat, Aug 27 2022 3:47:12 pm | /go/pkg/mod/github.com/goccy/go-json@v0.9.10/encode.go:235 +0x21c fp=0xc000f0f7d8 sp=0xc000f0f758 pc=0xa2ea1c
Sat, Aug 27 2022 3:47:12 pm | github.com/goccy/go-json.marshal({0x140be80, 0xc00542cdd0}, {0x0, 0x0, 0x40cf76?})
Sat, Aug 27 2022 3:47:12 pm | /go/pkg/mod/github.com/goccy/go-json@v0.9.10/encode.go:150 +0xba fp=0xc000f0f838 sp=0xc000f0f7d8 pc=0xa2e6da
Sat, Aug 27 2022 3:47:12 pm | github.com/goccy/go-json.MarshalWithOption(...)
Sat, Aug 27 2022 3:47:12 pm | /go/pkg/mod/github.com/goccy/go-json@v0.9.10/json.go:186
Sat, Aug 27 2022 3:47:12 pm | github.com/goccy/go-json.Marshal({0x140be80?, 0xc00542cdd0?})
Sat, Aug 27 2022 3:47:12 pm |  /go/pkg/mod/github.com/goccy/go-json@v0.9.10/json.go:171 +0x2a fp=0xc000f0f870 sp=0xc000f0f838 pc=0xa2ebaa
--
Sat, Aug 27 2022 3:47:12 pm | bonus-management-go/services/bonuses/bonus_limits.createBonusLog({_, _, _}, _, _, {0x5c077d2, {{0xc006417320, 0x0}, {0xc0064172a0, 0x0}, ...}, ...})


Support for permission scopes in authorize_url. Fix ratelimit response if no request made.

Check that API rate limit information exists before trying to return it (ie. a reply has been received from the API from a request). This is from Rate Limit Bug #81

Any comments? Any reason why these can't be committed? It has been 3 weeks now :)

Sorry, thanks.


3.3.23 show Liander branding

We might want to change this with a new release.

Did you move this topic to Jira?

Has been moved to JIRA
Kevin Smeets | Experienced Software Engineer,
Application Services | CGI
Stationstraat 49, 6411 NK Heerlen, Nederland
T: +31 88 564 4005 | M: +31 6 5060 5292
kevin.smeets<EMAIL_ADDRESS>| www.cgi.comhttp://www.cgi.com/ | www.cginederland.nlhttp://www.cginederland.nl
Volg CGI Nederland op: LinkedInhttp://www.linkedin.com/company/cgi-in-nederland | Twitterhttp://twitter.com/CGI_NL | Facebookhttp://facebook.com/CGINederland | YouTubehttp://www.youtube.com/user/CGINederland
CGI Nederland B.V., registered office in Amstelveen, The Netherlands
Registration Number Chamber of Commerce: 33136004
[cgi-logo-email-45x25]
P Save a tree. Don't print this e-mail unless it's really necessary~
CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.
From: Sander Jansen<EMAIL_ADDRESS>Sent: maandag 22 februari 2016 8:59
To: OSGP/Documentation
Cc: Smeets, Kevin
Subject: Re: [Documentation] 3.3.23 show Liander branding (#13)
Did you move this topic to Jira?
—
Reply to this email directly or view it on GitHubhttps://github.com/OSGP/Documentation/issues/13#issuecomment-187061179.


[PE-D][Tester C] UG: Wrong add command syntax for deadline field

UG says deadline should be a date formatted as such:

But the example given (also in the UG) shows that the deadline has an additional "name" portion to it (the Feed dog - ... part)

Similarly, the parameters for the add command are also inconsistent in the help text in the app (does not include timestamp, deadline, etc):

Labels: type.DocumentationBug severity.Medium
original: filbertphang/ped#5

Tester misread, the table shown is constraints for deadlines not the format of inputting deadlines.


Percent remaining isn't accurate to the correct day

In a Twitter thread starting with the tweet below, a number of people discussed the accuracy of the Year Remaining percentage.
https://twitter.com/BoundlessJackal/status/1613929514303913987
Specifically, it was noted that:

-((.967*365) - 365) = 12 days 1 hour 4 minutes 48 seconds

In other words, today being the 13th of January, the 96.7% remaining technically falls into the 12th of January.
Contributors to discussion:
https://twitter.com/BoundlessJackal
https://twitter.com/JustUnderReal
https://twitter.com/Mastacheata

Issue resolved on main branch in this commit.


Blows up when receiving a request that doesn't have a "Host" header

I tried to deploy a "scalable app" on OpenShift. I discovered that OpenShift's app monitors ping the app by sending it an HTTP/1.0 request that doesn't include the Host header (HTTP_HOST). This exposes a usually-but-not-always-valid assumption in rack-subdomain that HTTP_HOST is present in the request. I got a nil reference as the symptom, and feel lucky that it only took a couple of weeks to understand the problem. (I don't have the HTTP specification memorised.)
I have a terrible patch that seems to work at least to some degree on one machine so far. I'm so open to suggestions for improvement. I haven't thought deeply about the implications of the patch yet, because I want to get my app off Heroku onto OpenShift NOW.

This relates to the problem: http://stackoverflow.com/questions/22319538/undefined-index-serverhttp-host-openshift-scalable-app

@jbrains Apologies for taking so long to respond to this. I'm sure your situation has changed since you originally posted this, but I wanted to let you know that 450edde should fix the bug you described. If not, please let me know. Thanks!

I won't be able to confirm this for you, but I appreciate it all the same.


Add Bitcoin Forge to the list of dev tools.

If the Bitcoin Forge is approved to be part of bitcoin-only, then this merge is intended to resolve #66

Looks brilliant - Thanks for the comprehensive Issue+PullRequest Combo

My pleasure 😉.
Thanks for adding the project


Bump Kotlin plugin to 1.5.31

:scroll: Description
Continuation of https://github.com/getsentry/sentry-dart/pull/762
:bulb: Motivation and Context
Flutter template already uses Kotlin plugin 1.6.x and we're using 1.5.x which is incompatible with some 3rd plugins already.
See #762
:green_heart: How did you test it?
:pencil: Checklist

[X] I reviewed submitted code
[ ] I added tests to verify changes
[ ] I updated the docs if needed
[X] All tests passing
[ ] No breaking changes

:crystal_ball: Next steps

Codecov Report

Merging #763 (a967d71) into main (edc6acd) will increase coverage by 3.51%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #763      +/-   ##
==========================================
+ Coverage   92.13%   95.65%   +3.51%
==========================================
  Files          17        2      -15
  Lines         483       46     -437
==========================================
- Hits          445       44     -401
+ Misses         38        2      -36

Impacted Files
Coverage Δ

dio/lib/src/failed_request_interceptor.dart

dio/lib/src/breadcrumb_client_adapter.dart

dio/lib/src/tracing_client_adapter.dart

flutter/lib/src/file_system_transport.dart

flutter/lib/src/widgets_binding_observer.dart

flutter/lib/src/sentry_asset_bundle.dart

dio/lib/src/sentry_transformer.dart

flutter/lib/src/flutter_sentry_attachment.dart

flutter/lib/src/sentry_flutter_options.dart

.../lib/src/navigation/sentry_navigator_observer.dart

... and 5 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 edc6acd...a967d71. Read the comment docs.


SNMP message timing parameters not in windows of trust

I'm trying to setup SNMP v3 to v2c trap forwarder and getting the error "SNMP message timing parameters not in windows of trust" during testing. I have attached my server & client configurations and debug logs from server & client.
I did some tracing and found the condition given here  (in pysnmp) is failing is the root cause.
Please have a look at my configuration and help me understand if any of my configuration is causing the problem or there is a bug in pysnmp.
Environment details:
CentOS 7.5.1804

Python 2.7.5 (in virtualenv)

$ pip list
pip           18.0
ply           3.11
pyasn1        0.4.4
pycryptodomex 3.6.6
pysmi         0.3.1
pysnmp        4.4.5
setuptools    28.8.0
snmpfwd       0.3.3
wheel         0.29.0

Test traps are sent using following command
snmptrap -v 3 -e 0x0102030405070809 -l authPriv -u test-user -a MD5 -A authkey1 -x DES -X privkey1 <IP_ADDRESS>:1162 12345 <IP_ADDRESS>.2.5 sysDescr s myagent
server_debug.log
client_debug.log
client.cfg.txt
server.cfg.txt

Thank you for raising this issue and providing quality context!
Please, try current master and make sure to configure snmp-security-engine-id in your snmpfwd server to match SNMP engine ID of your SNMPv3 TRAP sender.
Also see this example.

Thanks for the fix. SNMP v3 with auth+priv is working as it should but this breaks v2c & v1 traps.
Please look at the error given below.

2018-09-03 14:34:19,977 ERROR poll error: Traceback (most recent call last):
;  File "/usr/local/lib/python3.7/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 46, in runDispatcher
    use_poll=True, map=self.__sockMap, count=1)
;  File "/usr/local/lib/python3.7/asyncore.py", line 207, in loop
    poll_fun(timeout, map)
;  File "/usr/local/lib/python3.7/asyncore.py", line 188, in poll2
    readwrite(obj, flags)
;  File "/usr/local/lib/python3.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
;  File "/usr/local/lib/python3.7/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
;  File "/usr/local/lib/python3.7/asyncore.py", line 422, in handle_read_event
    self.handle_read()
;  File "/usr/local/lib/python3.7/site-packages/pysnmp/carrier/asyncore/dgram/base.py", line 163, in handle_read
    self._cbFun(self, transportAddress, incomingMessage)
;  File "/usr/local/lib/python3.7/site-packages/pysnmp/carrier/base.py", line 70, in _cbFun
    self, transportDomain, transportAddress, incomingMessage
;  File "/usr/local/lib/python3.7/site-packages/pysnmp/entity/engine.py", line 152, in __receiveMessageCbFun
    self, transportDomain, transportAddress, wholeMsg
;  File "/usr/local/lib/python3.7/site-packages/pysnmp/proto/rfc3412.py", line 433, in receiveMessage
    PDU, maxSizeResponseScopedPDU, stateReference)
;  File "/usr/local/bin/snmpfwd-server.py", line 257, in processPdu
    msgId = trunkingManager.sendReq(trunkId, trunkReq, self.trunkCbFun, cbCtx)
;  File "/usr/local/lib/python3.7/site-packages/snmpfwd/trunking/manager.py", line 32, in sendReq
    return trunk.sendReq(req, cbFun, cbCtx)
;  File "/usr/local/lib/python3.7/site-packages/snmpfwd/trunking/client.py", line 48, in sendReq
    self.send(protocol.prepareRequestData(msgId, req, self.__secret))
;  File "/usr/local/lib/python3.7/site-packages/snmpfwd/trunking/protocol.py", line 112, in prepareRequestData
    r[k] = req[k]
;KeyError: 'snmp-security-engine-id'
caused by <class 'KeyError'>: 'snmp-security-engine-id'


feat: write out results of tested seed phrase reconstruction to txt file

While the double_check_shares() function does ensure that the original seed phrase can be reconstructed for any t shares, it doesn't display the results to the user (it only shows Ok/Fail). So if someone wants to validate this themselves, they will need to manually via the cargo run reconstruct... command. This can be fairly time-consuming and error prone depending on how many combinations there are. If someone wants to test a 2 of 4 reconstruction for all combinations, it will take quite a while.
This change updates that function to output each n of m combination that is tested and then writes out the results to a file called reconstructed_seed_phrases.txt. For example, using the example from the README: cargo run --features double-check split -t 2 -n 3 --secret "permit universe parent weapon amused modify essay borrow tobacco budget walnut lunch consider gallery ride amazing frog forget treat market chapter velvet useless topple", then the content of the txt file are automatically populated with the following:
Original seed phrase:
"permit universe parent weapon amused modify essay borrow tobacco budget walnut lunch consider gallery ride amazing frog forget treat market chapter velvet useless topple"

Reconstructed seed phrase from combination 1:
  Share 1: "health attract purpose load weasel brother vague laundry utility zero olive word portion interest clock thrive stove present bar endless distance input quick pool"
  Share 2: "clown cloth royal artwork true pride drama stem shift supply gym exhibit candy apology odor head figure faint entry credit staff leg enroll skirt"
  Reconstructed seed phrase:
    "permit universe parent weapon amused modify essay borrow tobacco budget walnut lunch consider gallery ride amazing frog forget treat market chapter velvet useless topple"

Reconstructed seed phrase from combination 2:
  Share 1: "health attract purpose load weasel brother vague laundry utility zero olive word portion interest clock thrive stove present bar endless distance input quick pool"
  Share 3: "topic silver real jealous boring decide zero real stove desk agent daughter play camp arctic mind talk pass safe verb soccer wheat behind letter"
  Reconstructed seed phrase:
    "permit universe parent weapon amused modify essay borrow tobacco budget walnut lunch consider gallery ride amazing frog forget treat market chapter velvet useless topple"

Reconstructed seed phrase from combination 3:
  Share 2: "clown cloth royal artwork true pride drama stem shift supply gym exhibit candy apology odor head figure faint entry credit staff leg enroll skirt"
  Share 3: "topic silver real jealous boring decide zero real stove desk agent daughter play camp arctic mind talk pass safe verb soccer wheat behind letter"
  Reconstructed seed phrase:
    "permit universe parent weapon amused modify essay borrow tobacco budget walnut lunch consider gallery ride amazing frog forget treat market chapter velvet useless topple"

updated PR title format

Resolved linting issues


Find a way to prevend quay.io to use git cache when generating the KPA container

Even if we tried in every way, it seems impossible to get git clone to always download from the latest commit.
It almost always happens that cache is used and the repository cloned in the container is not up-to-date.
This must be fixed.

Created this: https://access.redhat.com/articles/quayio-help#comment-2357630 to see if someone can give a hint.


Can it run SDXL?

Thanks for your interest in my work. I have no plans to update this project. At first I just did it to show the possibility of running SD on mobile. For SDXL you can try to convert it yourself. You can refer to this repo: diffusers-ncnn

Thanks, I`ll try to do it.

How would you conceptionally do it? Just convert the sdxl or dreamshaper model to ncnn and integrate it in your code?
Appreciate your reply!

I want to run SDXL model on my PC. I don`t have a GPU, but I have a powerful CPU and a lot of RAM.

Replacing SDXL is tedious because it is a completely different model. You need to change “text encoder”, “unet”, “vae”.

I want to run SDXL model on my PC. I don`t have a GPU, but I have a powerful CPU and a lot of RAM.

Would you only change the diffuser?

Replacing SDXL is tedious because it is a completely different model. You need to change “text encoder”, “unet”, “vae”.

Is it so difficult to convert three models to NCNN?

Is it so difficult to convert three models to NCNN?

Привет, Совёнок. Пожалуйста, конвертируй в NCNN стандартные модели SD 1.4, SD 1.5 и SD 2.1.

Is it so difficult to convert three models to NCNN?

Привет, Совёнок. Пожалуйста, конвертируй в NCNN стандартные модели SD 1.4, SD 1.5 и SD 2.1.

Извини, сам ещё не разобрался.
Sorry, I am learning how to do it now.

you might want to try this: https://github.com/autocyz/pytorch2ncnn


libsuricata: Integrate suricata-verify

Integrate suricata-verify with libsuricata by
adding the run_library script that allows to
run the suricata-verify suite with suricata_client. Modify run.py to support stream files.
Add a list of excluded tests library-excluded-tests when running in library mode because some functionalities are still missing.
Adapt some tests to run in both executable and library mode. More in details:

bug-130, bug-3286*: remove pcap_cnt field not supported in library mode.
stream-http-extraction-multiple, stream-http-extraction-pipelined, stream-http-signature-matching: add tests for the library stream interface.
All the other tests: add callback section to suricata.yaml.

Corresponding suricata PR: https://github.com/OISF/suricata/pull/8683


Refresh cache problem?

Hello @kwalski !
I followed your instructions regarding setting async version of MysqlRedis:
const { MysqlRedisAsync, HashTypes, Caching } = require("mysql-redis");
const redis = asyncRedis.createClient(settings.REDIS_PORT, settings.REDIS_HOST);
const pool = mysql.createPool({
    host: settings.MYSQL_HOST,
    user: settings.MYSQL_USER,
    password: settings.MYSQL_PASS,
    database: settings.MYSQL_DB
});
const promisePool = pool.promise();
const defaultCacheOptions = {
    expire: settings.REDIS_CACHE_RETENTION,
    keyPrefix: "sql.",
    caching: Caching.CACHE
};
const mysqlRedis = new MysqlRedisAsync(
    promisePool,
    redis,
    defaultCacheOptions
);
and then I execute simple query:
query = "SELECT * FROM categories where id=2;"
with async function
        [queryOutput, queryDetails]=await mysqlRedis.query(query,
           {
           keyPrefix: 'sql.',
               expire: settings.REDIS_CACHE_RETENTION,
               caching: cachingOption
          });
exchanging cachingOption with either
Caching.CACHE
or
Caching.REFRESH
I understand that if CACHE is used it uses Redis, if REFRESH it should update Redis with mysql data and return data from mysql
So now the problem...
I did query with Caching.CACHE and it created entry in Redis:
<IP_ADDRESS>:6379> keys *
1) "sql.M/LnlpXD5l24tMjRGgSX5w=="
All good
Then I updated DB manually with some small change...
again executing with  Caching.CACHE and it gets (now outdated) data from Redis...
so far - ALL GOOD
so now I execute the same function but with Caching.REFRESH
and what should happen here?
from what I see it creates another entry in Redis
<IP_ADDRESS>:6379> keys *
1) "sql.Dg/8759875Xj3gS8cOzUbw=="
2) "sql.M/LnlpXD5l24tMjRGgSX5w=="
and it shows valid (updated) data from DB
but then when I switch back to Caching.CACHE it uses first entry (outdated) from Redis and displays wrong data...
shouldn't it be taken from new Redis entry?
Did I misunderstand something?

@MicZet If you look at the hash function, it is based on your sql statement (including any params you pass in your statement). You must be querying a different statement on two occasions to get a different hash.

closing as it is likely user error


Image names in a subdirectory are truncated to the same length as the directory name

For example, the file a/abcd.png is written as a/a.h, and abc/abcd.png is written as abc.h.

Well that's weird


Picklist values not retrieved for Entitlement object

Summary
When retrieving the Entitlement object picklist values are not brought over from the org. This issue was reproduced in two unrelated orgs.
Steps To Reproduce
Retrieve the object either from the org browser or through a package retrieve
System Information
{
  "architecture": "darwin-arm64",
  "cliVersion"<EMAIL_ADDRESS>  "nodeVersion": "node-v20.12.2",
  "osVersion": "Darwin 23.4.0",
  "rootPath": "/Users/km****************/.local/share/sf/client/2.42.6-2b3c407",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.18 (core)",
    "@oclif/plugin-commands 3.3.4 (core)",
    "@oclif/plugin-help 6.0.22 (core)",
    "@oclif/plugin-not-found 3.1.9 (core)",
    "@oclif/plugin-plugins 5.0.21 (core)",
    "@oclif/plugin-search 1.0.24 (core)",
    "@oclif/plugin-update 4.2.12 (core)",
    "@oclif/plugin-version 2.1.2 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.19 (core)",
    "@oclif/plugin-which 3.1.10 (core)",
    "@salesforce/cli 2.42.6 (core)",
    "apex 3.1.11 (core)",
    "auth 3.6.11 (core)",
    "data 3.3.5 (core)",
    "deploy-retrieve 3.6.14 (core)",
    "info 3.2.8 (core)",
    "limits 3.3.7 (core)",
    "marketplace 1.2.5 (core)",
    "org 4.1.10 (core)",
    "packaging 2.4.4 (core)",
    "schema 3.3.6 (core)",
    "settings 2.2.6 (core)",
    "sobject 1.4.2 (core)",
    "source 3.3.12 (core)",
    "telemetry 3.3.7 (core)",
    "templates 56.2.7 (core)",
    "trust 3.6.11 (core)",
    "user 3.5.8 (core)",
    "sfdx-decomposer 3.3.10 (user)",
    "sfdx-git-delta 5.40.0 (user)"
  ]
}

To pull the values for a Picklist that is on a Standard Object (eg: Account > Type), you need to run sf project retrieve start -m StandardValueSet:AccountType.
A list of supported Standard Value Sets can be found here:
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm
(Sidenote: If you find a standard value set on that list ^ that is not working, we will likely need to add it to this registry stdValueSetRegistry.json)
You can confirm if a Standard Value Set is supported by running:
sf data query -q "SELECT Id, MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = 'EntitlementType'" --use-tooling-api
In your case, you can run sf project retrieve start -m StandardValueSet: EntitlementType. It looks like the other picklist EntitlementStatus is not supported. If you need support for that, I believe you would have to open a support case for it to be assigned to the team that owns that metadata type.


XVim breaks Playground

I use the XVim plugin, and it works perfectly in an IOS project. However, when in a Playground project, it has at least the following consequences (there may be more)

Cursor is not shown
Statements are NOT evaluated, and hence result not shown in right pane.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28048732-xvim-breaks-playground?utm_campaign=plugin&utm_content=tracker%2F252770&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F252770&utm_medium=issues&utm_source=github).

The second problem reported in this issue is a dup of #874

The latest 'develop' branch should fix these problems. Please check.

Confirmed fix, latest dev branch fixes both issue for me.

Merged to master.


component-model: bindgen macro generates traits whose lifetimes are too loose for state with explicit lifetime

Consider the example from the bindgen docs:
use wasmtime::component::*;
use wasmtime::{Config, Engine, Store};
use my::project::host::Host;

bindgen!();

struct MyState {
    // ...
}

// Note that the trait here is per-interface and within a submodule now.
impl Host for MyState {
    fn gen_random_integer(&mut self) -> wasmtime::Result<u32> {
        Ok(rand::thread_rng().gen())
    }

    fn sha256(&mut self, bytes: Vec<u8>) -> wasmtime::Result<String> {
        // ...
    }
}

fn main() -> wasmtime::Result<()> {
    let mut config = Config::new();
    config.wasm_component_model(true);
    let engine = Engine::new(&config)?;
    let component = Component::from_file(&engine, "./your-component.wasm")?;

    let mut linker = Linker::new(&engine);
    HelloWorld::add_to_linker(&mut linker, |state: &mut MyState| state)?;

    let mut store = Store::new(
        &engine,
        MyState { /* ... */ },
    );
    let (bindings, _) = HelloWorld::instantiate(&mut store, &component, &linker)?;

    // Note that the `demo` method returns a `&Demo` through which we can
    // run the methods on that interface.
    bindings.demo().call_run(&mut store)?;
    Ok(())
}

If MyState here is instead MyState<'render> (in my case, MyState owns an Option<wgpu::RenderPass<'render>>), the bindgen macro generates a trait which is implemented like this:
impl<'render> HostGpuCommandEncoder for WizardRuntimeState<'render> {
    fn begin_render_pass<'life0, 'async_trait>(&'life0 mut self, self_: wasmtime::component::Resource<GpuCommandEncoder>, descriptor: GpuRenderPassDescriptor) ->  ::core::pin::Pin<Box<dyn ::core::future::Future<Output = wasmtime::Result<wasmtime::component::Resource<GpuRenderPassEncoder>>> + ::core::marker::Send+'async_trait>> where 'life0: 'async_trait, Self:'async_trait {

but here, Rust is unable to assume that 'life0 outlives 'render and I cannot specify it as 'life0: 'render because that's a stricter requirement than the trait.

Could you share some more code as a reproducible example? This for example compiles ok for me locally:
mod with_lifetimes {

    wasmtime::component::bindgen!({
        inline: "
package my:project

interface host {
    gen-random-integer: func() -> u32
    sha256: func(bytes: list<u8>) -> string
}

world hello-world {
    import host

    export demo: interface {
        run: func()
    }
}
        ",
        async: true,
    });

    struct MyState<'a> {
        _x: Option<wgpu::RenderPass<'a>>,
    }

    // Note that the trait here is per-interface and within a submodule now.
    #[async_trait::async_trait]
    impl my::project::host::Host for MyState<'_> {
        async fn gen_random_integer(&mut self) -> wasmtime::Result<u32> {
            loop {}
        }

        async fn sha256(&mut self, _bytes: Vec<u8>) -> wasmtime::Result<String> {
            loop {}
        }
    }
}

@alexcrichton apologies for the increase in complexity of the example, but this more accurately reflects the problem I'm having and demonstrates the correct lifetimes issue. Uses slab and wgpu
mod with_lifetimes {

    wasmtime::component::bindgen!({
        inline: "
package my:project

interface host {
    gen-random-integer: func() -> u32
    sha256: func(bytes: list<u8>) -> string
}

world hello-world {
    import host

    export demo: interface {
        run: func()
    }
}
        ",
        async: true,
    });

    struct MyState<'a> {
        render_state: Option<RenderState<'a>>,
    }

    pub struct RenderState<'a> {
        pub command_encoders: slab::Slab::<GpuCommandEncoderState<'a>>,
    }

    impl<'a> RenderState<'a> {
        pub fn new() -> RenderState<'a> {
            RenderState {
                command_encoders: slab::Slab::new()
            }
        }
    }

    pub struct GpuCommandEncoderState<'a> {
        pub encoder: wgpu::CommandEncoder,
        pub render_passes: slab::Slab::<wgpu::RenderPass<'a>>
    }

    impl<'a> GpuCommandEncoderState<'a> {
        pub fn new(encoder: wgpu::CommandEncoder) -> GpuCommandEncoderState<'a> {
            GpuCommandEncoderState {
                encoder,
                render_passes: slab::Slab::new()
            }
        }
    }

    #[async_trait::async_trait]
    impl my::project::host::Host for MyState<'_> {
        async fn gen_random_integer(&mut self) -> wasmtime::Result<u32> {
            let render_state = self.render_state.as_mut().expect("Render state");
            let command_encoder_state = render_state.command_encoders.get_mut(0 as usize).unwrap();

            let render_pass_encoder = command_encoder_state.encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
                label: None,
                color_attachments: &[],
                depth_stencil_attachment: None
            });

            let pass_id = command_encoder_state.render_passes.insert(render_pass_encoder);

            wasmtime::Result::Ok(1)
        }

        async fn sha256(&mut self, _bytes: Vec<u8>) -> wasmtime::Result<String> {
            loop {}
        }
    }
}

Thanks! I unfortunately think though that this isn't related to Wasmtime or bindgen!. The error message from rustc could probably be improved in this case, but for example this fails to compile which has all the wasmtime bits removed:

struct MyState<'a> {
    render_state: Option<RenderState<'a>>,
}

pub struct RenderState<'a> {
    pub command_encoders: slab::Slab<GpuCommandEncoderState<'a>>,
}

impl<'a> RenderState<'a> {
    pub fn new() -> RenderState<'a> {
        RenderState {
            command_encoders: slab::Slab::new(),
        }
    }
}

pub struct GpuCommandEncoderState<'a> {
    pub encoder: wgpu::CommandEncoder,
    pub render_passes: slab::Slab<wgpu::RenderPass<'a>>,
}

impl<'a> GpuCommandEncoderState<'a> {
    pub fn new(encoder: wgpu::CommandEncoder) -> GpuCommandEncoderState<'a> {
        GpuCommandEncoderState {
            encoder,
            render_passes: slab::Slab::new(),
        }
    }
}

impl MyState<'_> {
    fn gen_random_integer(&mut self) {
        let render_state = self.render_state.as_mut().expect("Render state");
        let command_encoder_state = render_state.command_encoders.get_mut(0 as usize).unwrap();

        let render_pass_encoder =
            command_encoder_state
                .encoder
                .begin_render_pass(&wgpu::RenderPassDescriptor {
                    label: None,
                    color_attachments: &[],
                    depth_stencil_attachment: None,
                });

        command_encoder_state
            .render_passes
            .insert(render_pass_encoder);

        loop {}
    }
}

I believe the root cause of this is that wgpu::RenderPass<'a> is storing a pointer to the wgpu::CommandEncoder field, which makes your GpuCommandEncoderState type a self-referential structure, which Rust doesn't handle well.
That's at least the problem, but I don't know enough about wgpu to know how best to restructure to fix this. Regardless though I think that this is unrelated to Wasmtime?

Ok, that's a good assessment. I'll have to do some more digging on my end to figure out how to manage that. I'm happy to close the issue in that case. Thanks for your help!

I guess I do have one follow up @alexcrichton -- specifying that the lifetime of self ('life0, defined by the async_trait) is longer than 'render fixes the problem, which I think is how I need to define the lifetime relationship (the global state lifetime outlives the lifetime of the render call.) If you remove the wasmtime trait, this code is valid. But wasmtime doesn't allow it because there is no way to specify 'life0: 'render. There may be an alternative way to configure this struct but as it stands, wasmtime is indeed getting in the way here.
impl<'life0: 'render, 'render> MyState<'render> {
    async fn gen_random_integer(&'life0 mut self) -> wasmtime::Result<u32> {
        let render_state = self.render_state.as_mut().expect("Render state");
        let command_encoder_state = render_state.command_encoders.get_mut(0 as usize).unwrap();

        let render_pass_encoder = command_encoder_state.encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
            label: None,
            color_attachments: &[],
            depth_stencil_attachment: None
        });

        let pass_id = command_encoder_state.render_passes.insert(render_pass_encoder);

        wasmtime::Result::Ok(1)
    }

    async fn sha256(&mut self, _bytes: Vec<u8>) -> wasmtime::Result<String> {
        loop {}
    }
}

Unfortunately while that works and passes the compiler it is not possible to actually call that function. 'life0: 'render can be thought of "'life0 outlives 'render". In your object first though 'render must exist first because that's used to create MyState. Afterwards MyState is then borrowed with 'life0 which is guaranteed to be shorter than 'render. That ends up meaning that even if you could write that down it would be impossible to safely call.

😕 I think I'd rather deal with use after free bugs... Thank you for the explanation and I understand that this out of scope for wasmtime so I appreciate you taking the time to make that clear to me.

If you're up for it I suspect the wgpu authors would be happy to hear from you and might be able to assist. You may not be the first that wanted to store those two structures next to each other so they may have pointers about how to approach this already.

I'll give it a try, thanks again for your help.


[F2 - Create A NFT Collection] Add NFT Collection creation page

Description

Add NFT collection creation page with needed components.
Connect the form to BE API.
Add form validation errors support.
Update unit tests.

Trello

Link: https://trello.com/c/pmkIpqLa/36-f2-create-a-nft-collection-3

Extra Info

 F2 - create a NFT collection 3


Export/Perf: use foreach_{get,set} for image encoding

Closes #1017.
This uses the new image.pixels.foreach_{get,set} functions in Blender 2.83 to avoid going through lists when encoding images with numpy (ie. it now reads/writes directly from a numpy array). This is fast enough that we can delete the compositor code #812 added and just use the numpy code again (hooray!).
Also uses these for copying pixels over from dirty images on the happy path.
This is only slightly faster in my tests, but much simpler code and has no edge cases with bad performance to worry about.
As another bonus, because the compositor code that used to render a temp scene is gone, IMO this also closes #932.

Should I also bump the blender version in bl_info to (2, 83, 9)? (That's the first release that has these new functions.)

I went ahead and bumped it.


memberlist reconnect

add reconnection support for dead peers
todo:

[x] tests (only verified manually so far)
[x] metrics
[x] cleanup extra unused bits (most of this code is taken from https://github.com/hashicorp/serf/blob/80ab48778d/serf/serf.go)
[x] decide on "smart" defaults for DefaultReconnectInterval and DefaultReconnectTimeout

edit:
I also included the logWriter{} wrapper I was using to expose memberlist logging. It's very verbose, and doesn't really conform to how we've been logging, so I'm not sure how best to expose it (or if I should just remove it from this PR).

@simonpasquier

Thanks, I'll have a look!

when a peer restarts, the other peer still tries to reconnect even after the successful rejoin of the first one because the name (ULID) of the first peer has changed. One solution would be use the peer's address instead of its name as the key.

sounds good to me.

with asymmetric configurations (eg peer A is started without --cluster.peer, peer B with --cluster.peer=), peer B will never try to reconnect if A is down when B starts.

Ah, so checking the result of the initial memberlist.Join and adding any non-connected nodes to the failedPeers list. Makes sense.

updated. feel free to suggest a better way to grab the nodes that we failed to connect to.

@simonpasquier I think I've addressed all your comments, let me know what you think

Going to merge this so we can get another rc out

@stuartnelson3 Let me know if you want me to follow up with https://github.com/prometheus/alertmanager/pull/1363 and https://github.com/prometheus/alertmanager/pull/1364.

as soon as I feel confident about https://github.com/prometheus/alertmanager/pull/1389 let's push this out. That's the only thing (in my mind) blocking 0.15.0
There were issues with message queueing (we were generating more messages than could be gossiped) that I need to resolve; I'll be working on it tomorrow.


MongoDB version is v3.2, but parse server prerequisites says that it should be 2.6.x or 3.0.x

Hello. I have one question. How do I change MongoDB version on DocumentDB? Because now, after creating it using the publication of Parse Server with Azure Managed Services, it's v3.2.0, but whenever I try to migrate parse database, it says that I need 2.6.x or 3.0.x. Of course, I can ignore this error, but I've found out that when using v3.2.0 there appears to be some bugs in queries etc. And mongodb v2.6 or v3.0 is in parse server prerequisites.
Thanks!

Hi Aurintas - are you also asking this question on other channels?  The same people watch Azure Forums, Stack Overflow, Twitter, and this, so asking multiple channels doesn't assist.  If this is a new question, then I'll get an answer - if you have asked this in other channels, please close this question for us so we aren't duplicating effort.

Yes, I've also asked it elsewhere. Thanks.


glider gps lat/lon issue

@FBRTMaka @DanielJMaher i had an issue with gps position not being in the streaming causing the glider load to fail. this is a short term fix in case you need it...
  File ".../uframe/controller.py", line 143, in data_streams_in_instrument
    parameters_dict[data_stream['stream']],
KeyError: u'glider_gps_position'

@DanielJMaher @birdage  I'm getting this error too. So this PR just skips the glider gps streams for now?

@birdage @DanielJMaher @Bobfrat ,  It'll omit that one record, possibly to take it one step further and ensure this doesn't happen again would be to replace the IF with a try/except block that handles KeyErrors.  We'd still want to see other errors if they pop up, but handling this exception nicely would be a bonus (rather than ignoring it with a IF).

@FBRTMaka @Bobfrat was a quick fix for those who are getting the issue, i agree a more permanent solution would be preferable!

@birdage great! I'm actually not using this (I implemented the try/except) so I can make a PR for that and close this one if no objection.

@FBRTMaka sounds good!

@birdage you got it!  @DanielJMaher PR coming in with a perma solution that'll provide error handling.


STORM-2665: Adapt Kafka's release note generation script for Storm

See https://issues.apache.org/jira/browse/STORM-2665

@srdo Can you please add a screenshot, or a link for a sample of the output. Thanks.

Whoops, seems like there's a different jira module in the directory I put the script in than I expected. Will move it. Here's some sample output after running $ ./release_notes.py 1.1.1 > relnotes.html https://paste.apache.org/JFDP

+1 for the change, and it would be better to rename existing python package directories and include this to dev-tools directory anyway.

I think this is good to go. @ptgoetz would this script work for you?

+1 again, and waiting for @ptgoetz opinion.

Addressed comments.

+1. Let's squash the commits and it's good to go as far as I am concerned. Thanks @srdo

+1
Minor nit: It generates html, but not an html document (i.e. missing head, body, etc. tags), but that's just a few print statements that can be added at merge time.

Added the missing html tags and a title.

Still +1

Thanks, merging.


Cannot Access Template Helper Functions in Client Integration Tests

In Meteor, Template helper functions used to be formatted like this:
Template.dashboard.tasks = function () {
    ...
};

But that has been deprecated, and the new format is:
Template.dashboard.helpers({
    tasks: function(){
        ....
    }
});

In Jasmine, with the previous formatting, I used to be able to access helper functions like:
Template.dashboard.tasks();

But this no longer works. To be honest, I'm not sure if this is something which needs to be added to Jasmine, or if there is some way to access these functions which I am missing.

Hi, I have the same issue as presented here
conorstrejcek commented on 18 Nov 2014
@Sanjo , thank you for all the help. I actually tried calling the event using the method you just outlined from @tomitrescak 's tutorial. However, I get an error:
Error: There is no current view
But I don't seem to find the solution.
@conorstrejcek How did you manage to get rid of this error. I have the same one when I try to call a template event in my jasmine tests.
Thanks.

@boboci9 I don't believe I was ever able to resolve the error -- I still haven't had success in calling template events. I've only been able to call template helpers successfully.

OPTION 1
JQuery can trigger most events for you
$(locator).trigger($.Event(event,{ which:13 }));

OPTION 2
You can trigger a helper directly with something like this:
Template.<template>.__eventMaps[0][event + locator]({});

But it's a lot of work as you also have to think about the context of the Template and mess around with Blaze... all the things that you're probably not interested in testing!
OPTION 3
You may also want to factor out your code to make it more testable. You can pass in functions to your event like:
var _eventMap = {
    'click something' : function() {}
}
Template.myTemplate.events(_eventMap);
// now you can keep the _eventMap somewhere for testability, possibly on the template itself like this:
Template.myTemplate.__eventMap = _eventMap;

OPTION 4
If you want to get fancy, you can use a mini IoC container:
// FILE /client/miniIoC.js
function Container () {
  this.objects = {};
}
Container.prototype.register = function (name, object) {
  return this.objects[name] = object;
};
Container.prototype.get = function (name) {
  return this.objects[name];
};
window.container = new Container();

and now in your app code you can do this:
Template.myTemplate.events(container.register('myTemplate.Events', {
  'click button': function () {
    // do something
  }
}));

And in your test code you can access the methods easily like this:
var myClickButtonEvent = container.get('hello.Events')['click button'];

Shameless plug... thanks for asking this here, I will be including it in The Meteor Testing Manual :)

@samhatoum Thank you this was very helpful :)
@conorstrejcek If for any reasons you still want to call the event as it was presented earlier in this post var eventContext = {templateInstance: function() {}};
var event = {}
Template.dashboard.__eventMaps[0]["click button.btn-ela"].call(eventContext, event);
be sure to add
var data = null;
spyOn(Blaze, "getData").and.returnValue(data);
before the call, but samhatoum's options are much better, I also change my code according to his first option.

@samhatoum Thanks for the answer.
I close this.

I just created an IoC package you can use for this exact purpose:
https://github.com/xolvio/inverter
Hopefully you'll find it useful


DBPedia and HotPotQA scores are missing for almost all models

Currently, no models on the MTEB(Classic) leaderboard have a mean score, since these two tasks are missing from the main table, likely due to missing results.
This is strange, since, in theory, old leaderboard scores were all scraped and added to the results repo.

I'm wondering if this is an error, or if we really mean to use all three as eval splits.

In old leaderboard by default test split was used

I opened a PR #1554


Xml escaping

Sorry, ended up on the wrong repo from the GitHub UI. I hope I didn't cause too much hassle.


play kube should honor container.seccomp.security.alpha.kubernetes.io

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
Not sure /kind bug or /kind feature.
Probably /kind feature.
Description

play kube should honor container.seccomp.security.alpha.kubernetes.io
And also container.apparmor.security.beta.kubernetes.io
Steps to reproduce the issue:
Play-kube the following yaml
apiVersion: v1
kind: Pod
metadata:
  name: bk
  annotations:
    container.apparmor.security.beta.kubernetes.io/bk: unconfined
    container.seccomp.security.alpha.kubernetes.io/bk: unconfined
spec:
  containers:
  - name: bk
    image: moby/buildkit:master-rootless
    imagePullPolicy: Always
    args:
    - --oci-worker-no-process-sandbox

Describe the results you received:
Doesn't work because seccomp is not unconfined
Describe the results you expected:
seccomp should be unconfined
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Version:            1.3.0-dev
RemoteAPI Version:  1
Go Version:         go1.12.2
OS/Arch:            linux/amd64

Output of podman info --debug:
debug:
  compiler: gc
  git commit: ""
  go version: go1.12.2
  podman version: 1.3.0-dev
host:
  BuildahVersion: 1.8-dev
  Conmon:
    package: podman-1.3.0-21.dev.gitb01fdcb.fc31.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.12.0-dev, commit: 3c163e4635ea7ed15cde0814e3bbf87fb759ee25'
  Distribution:
    distribution: fedora
    version: "31"
  MemFree:<PHONE_NUMBER>
  MemTotal:<PHONE_NUMBER>
  OCIRuntime:
    package: runc-1.0.0-92.dev.gitc1b8c57.fc31.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc7+dev
      commit: 82c0db510c11ff6ea97d86b5a4f441d8b5376a84
      spec: 1.0.1-dev
  SwapFree:<PHONE_NUMBER>
  SwapTotal:<PHONE_NUMBER>
  arch: amd64
  cpus: 2
  hostname: fb4099539e47
  kernel: 5.0.0-13-generic
  os: linux
  rootless: false
  uptime: 22h 37m 52.75s (Approximately 0.92 days)
insecure registries:
  registries: []
registries:
  registries:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 2
  GraphDriverName: vfs
  GraphOptions:
  - overlay.mountopt=nodev
  GraphRoot: /var/lib/containers/storage
  GraphStatus: {}
  ImageStore:
    number: 2
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

Additional environment details (AWS, VirtualBox, physical, etc.):

Hi @AkihiroSuda, thanks for opening the issue! @baude, I also added the good first issue label. I think it's a nice task for interns.

@weirdwiz Any progress on this?

There was a failure in podman play when I started working on this, after that I couldn't get a chance to work on this. I shall look into this again.

@haircommander PTAL

@haircommander Any progress?

Just going to add a comment as this would be a nice to have.

Yes, I think I will go through some of these play kube issues and implement them.


Miscalculates sizes and positions inside transform: scale

Current Behavior
If I add a SimpleBar to a element that’s inside an container with transform: scale(0.5), the scrollbars have a quarter of the length and half the range that they should.
For example, if the element is declared height: 800px and thus displays as 400px tall, SimpleBar displays a vertical scrollbar with length at most 100px that only moves within the top 200px of its 400px track. You also get a horizontal scrollbar even if no horizontal scrollbar is needed.
Expected behavior
In that example, the vertical scrollbar should be displayed with length up to 400px and move within its entire 400px track.
Reproducible example
Demo on JSFiddle.
Additional context
SimpleBar inside transform: scale may sound like a silly edge case, but I actually ran into this when trying to migrate Zulip from perfect-scrollbar to SimpleBar, because Zulip’s modal dialogs open with a CSS transition from transform: scale(0.5) to transform: scale(1), and the relevant lengths are only calculated at the start of this animation.
Your environment

Software
Version(s)

SimpleBar
3.1.3

Browser
Firefox 65, Chrome 73

npm/Yarn
N/A

Operating System
Ubuntu 19.04

Hello,
I didnt understand exactly is that solution or question?

Same problem here. Can easily re-produce by putting SimpleBar onto an element with animation frame from transform: scale(0.5) to transform: scale(1).
@andersk Did you find out any solution on this?


CORS doesn't work with a driver different than session

If I modify the default guard in config/auth.php to use a driver different than 'session' the CORS headers are not being sent (I use 'passport' driver instead).
    'defaults' => [
        'guard' => 'web',
        'passwords' => 'users',
    ],
    ...
    'guards' => [
        'web' => [
            'driver' => 'passport', // here I use passport instead of session
            'provider' => 'users',
        ],
    ],

I get no errors in the log and I have no clue about what is going on. Do you know if laravel-cors is strongly tied to the 'session' driver when using the default web guard?

I think i have the same error.

Same problem here.

I solved it by not using this package but instead writing my own middleware. Very simple and it worked just fine.
<?php

namespace App\Http\Middleware;

use Closure;

class CorsMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        return $next($request)
            ->header('Access-Control-Allow-Origin', '*')
            ->header('Access-Control-Allow-Methods', 'GET, POST, PUT, OPTIONS')
            ->header('Access-Control-Allow-Headers', 'Content-Type, Accept, Authorization, X-Requested-With, Application');
    }
}

@larsemil  I got full stuck on this, CORS works nicely on GET (using same own Mildleware pretty much as yours) but this methods just kills it:
https://github.com/laravel/framework/blame/56a58e0fa3d845bb992d7c64ac9bb6d0c24b745a/src/Illuminate/Routing/RouteCollection.php#L236-L239
It will always return 200 with Allow => POST and does not pass it to next midleware at all. No idea why as this has been there for 3 years?
< HTTP/2 200
< server: nginx/1.13.9
< content-type: text/html; charset=UTF-8
< vary: Accept-Encoding
< x-powered-by: PHP/7.1.14
< allow: POST
< cache-control: no-cache, private
< date: Mon, 12 Mar 2018 08:00:08 GMT
<

I'm closing this due to inactivity. If you still encounter this issue on the latest version (2.0.1 at the moment), please open a new issue with detailed information.


Information

Description
I'm in new User And I Want Know More About Coder Is There Any One To Help ?
A brief description of the question or issue:

Closing this issue since this doesn't seem to be about a specific issue with this project


Implement an AVL tree

Can this be done in Java?

@sauravvishal8797 Unfortunately no, this is a C++ Library.

Hi, @xorz57 , can you tell which functions you need in this implementation.

The following functions are absolutely necessary

Insert
Delete
Search

Check the implementation of the other data structures implemented and try to follow the coding style or even fix the coding style of them as well if you have any suggestions! 😃

@xorz57 can you please provide a link to your code on github

@tejas2005 Sure! https://github.com/xorz57/forest

i would like to contribute. thanks

I would like to contribute to this. Thanks!

Added in #31


[WIP] More scheduling tools

In this PR:

Support for manual override of session size when assigning rooms
Support for incremental scheduling of additional sessions (with some local hackery; still needs work to be more usable)
Poor Georgia

Coverage decreased (-2.3%) to 51.581% when pulling bfeaad5e080f5024fac36a18836871a4ef625025 on more-scheduling-tools into d6b33c748da5093617f8d37df9202389b37e45aa on master.

@pcantrell is this still WIP, or can we merge it?

I think we can merge it. IIRC, I just didn't want to merge any scheduling algo changes that touched DB & models right before the event, just in case I was breaking something.
I’d meant to add some notes/docs about how to use the manual override stuff I added, maybe make it a little more convenient to use — but obviously that hasn’t happened. Yet. Best to merge it!


[Spring Cloud Gateway MVC] Filters are not run when doing internal forwarding

Versions used
<java.version>17</java.version>
<spring-cloud.version>2023.0.3</spring-cloud.version>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway-mvc</artifactId>

Routes configuration
spring:
  cloud:
    gateway:
      mvc:
        routes:
          - id: route1
            uri: http://localhost:9000
            predicates:
              - Path=/route1
            filters:
              - AddRequestHeader=Route1-Header, ThisIsPresent
          - id: route2
            uri: forward:/route1
            predicates:
              - Path=/route2
            filters:
              - AddRequestHeader=Route2-Header, ThisIsMissing

Expected behavior
When doing a GET on /route2, the id: route2 should be matched, the its filters should be applied - that is the Route2-Header should be added - and then the request should be forwarded to id: route1 where filters are applied and the request sent over network.
Actual behavior
The id: route2 is matched, its filters ARE NOT applied, then it is forwarded to id: route1 where the filters are correctly applied and then the request goes over network.
So the request received by the target service only has the Route1-Header.

That's a great question if this can work.
It's doing a servlet forward https://github.com/spring-cloud/spring-cloud-gateway/blob/2295b9aaab18f72b78453d108a466a0d1ff9f494/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/handler/HandlerFunctions.java#L49-L52
I'd have to check the semantics to see why it didn't happen, but I'm not sure of another way of doing this.
Maybe @rstoyanchev might have an idea.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


Issue on ConstraintsLayout's layout_width

We're migrating Paparazzi snapshot testing to Roborazzi for legacy View-based UI.
During the migration, I encountered an issue where Roborazzi fails to capture anything when the TextView's width is set to 0dp and we set text from a test. Paparazzi doesn't seem to have any issues with the layout, but Roborazzi doesn't show anything (screenshot attached at the bottom). Changing layout_width=0dp to layout_width=wrap_content resolves the issue, but I don't think that's a desirable solution.
Can anyone provide insights into the cause of this issue? Any thoughts or suggestions would be greatly appreciated.
Example of simplified snapshot_test.xml
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="@color/android_green"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TextView
        android:id="@+id/title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="3"
        android:textIsSelectable="false"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toTopOf="@id/subtitle"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="Steve Avocado, Steve Burgess, and all the other Steves" />

    <TextView
        android:id="@+id/subtitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title"
        tools:text="Subtitle" />

</androidx.constraintlayout.widget.ConstraintLayout>

Example of test
@Config(sdk = [33])
class ViewBasedRoborazziTest : RoborazziBaseTest() {
  private lateinit var binding: SnapshotTestBinding

  @Before
  fun setup() {
    scenario.onActivity { activity ->
      binding = SnapshotTestBinding.inflate(LayoutInflater.from(activity))
    }
  }

  @Test
  fun testView() {
    with(binding) {
      title.text = "test test test test test test test title"
      subtitle.text = "subtitle subtitle subtitle subtitle subtitle"
      root.snapshot() // basically, `captureRoboImage()` call
    }
  }
}

Thanks. I'm also not sure why it happens.
However, 0dp in ConstraintLayout is used as match_constraint. I have some options to try. I think you can try specifying qualifiers like RobolectricDeviceQualifiers.Pixel5. Additionally, I think you can try adding a wrapper with a fixed width or calling the layout method of the View.

Thanks for taking a look. RoborazziBaseTest from the above code already has these. I'll try other suggestions.
@RunWith(AndroidJUnit4::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@Config(qualifiers = RobolectricDeviceQualifiers.Pixel5)
abstract class RoborazziBaseTest {...}

Setting title.layoutParams.width = ViewGroup.LayoutParams.WRAP_CONTENT in a test shows text so I don't need to touch our complex UI components from the design system, but constraints with surrounding UI elements are slightly off due to wrap_content. I'm at least unblocked and see if Roborazzi can do something here. Thank you.

I'm using a blank activity for the snapshot testing only.
Also, tried ComposeActivity for ActivityScenario. Still the same issue.
class TestRoborazziActivity : AppCompatActivity() {
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.snapshot_roborazzi_activity)
  }
}
--------

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

-------
// Define scenario from `RoborazziBaseTest`
  private val scenario = ActivityScenario.launch(TestRoborazziActivity::class.java)

Thank you! I understand the situation. That's certainly weird.

I would like to know what happens if we set layout_width="400dp" here. Could you check it out?
// snapshot_roborazzi_activity.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

Interesting question. It makes a blank snapshot with a size of 418px * 2340px. This is wild.

@hellohj
I forgot this but could you try @Config(sdk = [33]) ?
https://github.com/takahirom/roborazzi?tab=readme-ov-file#q-the-images-taken-from-roborazzi-seem-broken

And I think you can also try using test.systemProperties["robolectric.pixelCopyRenderMode"] = "hardware".
https://github.com/DroidKaigi/conference-app-2024/blob/4c70202b90fc9597e3dc539546caecf1f29f9b96/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/AndroidRoborazziPlugin.kt#L27

Thanks for suggestions. sdk 33 is already specified from my code example so it didn't help.
For the hardward rendermode option, it's already defined in my gradle file and it also didn't help. 😢

I'm busy with DroidKaigi and won't be able to work on this for two weeks. If you could provide a sample for reproduction, that would be great.

@takahirom No worries. Sorry, it took long time to provide you a sample.
Here is my sample project. With this setup, my test even fails with this error. The layout is shown properly in the design view and the app runs properly. 🤔
width and height must be > 0
java.lang.IllegalArgumentException: width and height must be > 0
	at android.graphics.Bitmap.createBitmap(Bitmap.java:1111)
	at android.graphics.Bitmap.createBitmap(Bitmap.java:1078)
	at android.graphics.Bitmap.createBitmap(Bitmap.java:1028)
	at android.graphics.Bitmap.createBitmap(Bitmap.java:989)
	at androidx.core.view.ViewKt.drawToBitmap(View.kt:232)
	at androidx.core.view.ViewKt.drawToBitmap$default(View.kt:228)
	at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage(Roborazzi.kt:107)
	at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage(Roborazzi.kt:66)
	at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage$default(Roborazzi.kt:61)
	at com.example.myapplication.RoborazziMainTest.testBasic$lambda$1(RoborazziMainTest.kt:37)
	at androidx.test.core.app.ActivityScenario.lambda$onActivity$2(ActivityScenario.java:794)
	at androidx.test.core.app.ActivityScenario.onActivity(ActivityScenario.java:804)
	at com.example.myapplication.RoborazziMainTest.testBasic(RoborazziMainTest.kt:32)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at com.github.takahirom.roborazzi.RoborazziRule$runTest$evaluate$1.invoke(RoborazziRule.kt:150)
	at com.github.takahirom.roborazzi.RoborazziRule$runTest$evaluate$1.invoke(RoborazziRule.kt:148)
	at com.github.takahirom.roborazzi.RoborazziRule.runTest(RoborazziRule.kt:174)
	at com.github.takahirom.roborazzi.RoborazziRule.access$runTest(RoborazziRule.kt:27)
	at com.github.takahirom.roborazzi.RoborazziRule$apply$1.evaluate(RoborazziRule.kt:132)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)

Thank you for creating the reproducing repository. I was able to check it. The reason you are encountering an error is that your view is not attached to the activity you launched.
If we attach the view to MainActivity, it works. However, the view is added to MainActivity, resulting in a duplicated view.
     @Test
     fun testBasic() {
         val scenario = ActivityScenario.launch(MainActivity::class.java)

         scenario.onActivity { activity ->
-            binding = ActivityMainBinding.inflate(LayoutInflater.from(activity))
-            with (binding) {
+            binding = ActivityMainBinding.inflate(
+                LayoutInflater.from(activity),
+                activity.findViewById(android.R.id.content),
+                true
+            )
+            with(binding) {
                 title.text = "This is a title text"
                 subtitle.text = "This is a subtitle"
                 root.captureRoboImage()

I reviewed your code, and it seems that the issue might be that your View is not included in the Activity.

I'll close this issue as the cause seems to be clear. If you have any other questions or problems, please let me know, and I can reopen this issue


Set up react and redux

Description
By now you've used many different gems with Rails and this exercise will have you connect previous knowledge with new knowledge as you get a chance to use Webpack with jsbundling-rails gem.
General requirements

Make sure that there are no linter errors.
Make sure that you used the correct Gitflow.
Make sure that you documented your work in a professional way.

Ruby requirements

Follow our list of best practices for Ruby.
NOTE: Use Rails >=7 for this project so that you can follow the guidelines and instructions included in the curriculum. If you need help installing different versions of Rails, check this tutorial.

Project requirements

Create a new Rails app called 'hello-rails-react'.

Use the command rails new -j webpack my_new_rails_app as described in the previous lesson's tutorial.

Verify that the jsbundling-rails gem is added to your Gemfile.
Initialize your project with Git.
Install needed node dependencies as described in the previous lesson's tutorial.
Create a babel.config.js in the root folder of your project as described in the previous lesson's tutorial.
Update webpack.config.js to include the babel loader as described in the previous lesson's tutorial.
Make sure that your project has a Postgres database set up.
Create a table for storing your messages and create 5 different greetings.
Create an API endpoint that selects a random greeting from your table (you will need a controller with an action and Rails route).
Create a static view that will be the root of your app.

Create the App component with react-router and render it in your static view.
Create the Greeting component that will display a greeting. Set it up as a route in your App component.
Create a store, an action, and a reducer that will connect to your API endpoint to get the random greeting.
Display the random greeting in your Greeting component.

Evidence:
Message on the API endpoint (Rails):

Message on the browser (React component):

I have tried to follow the lessons and other articles or posts, but they
aré incomplete, and the app doesn't render anyrhing, using webpack, and
jsbundling. I don't know how you ask something that is more difficult to
achieve, when there aré simpler ways to do it.
I supone I won't finish the program. Thanks a lot
El sáb., 23 de marzo de 2024 9:55 p. m., Aakash Verma <
@.***> escribió:

@.**** requested changes on this pull request.
Hi @jcmunav63 https://github.com/jcmunav63,
Good job so far 👍🏻
There are some issues that you still need to work on to go to the next
project but you are almost there!
STATUS: REQUIRE CHANGES 🔴
https://camo.githubusercontent.com/d04a9834a68a4f36068a6349891bf0caad0e195c4597214fe8b5966e3d8febc3/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f76312e59326c6b505463354d4749334e6a4578596a426b5a574931595467784e4467345932517a4d5755324d6a6b794e6a51324d6d59314d6d497a4d6a4d345a6d49314d4755314f435a6c634431324d563970626e526c636d35686246396e61575a7a583264705a6b6c6b4a6d4e305057632f664457484a416d6772436549772f67697068792e676966
Highlights

Good PR title ✅
Descriptive PR description ✅
Implement the features ✅

Required Changes ♻

Well done @jcmunav63 https://github.com/jcmunav63, you did a great
job so far, as I can see that you implemented the functionalities for both
front-end and back-end. But I can't approve your project because you are
not fulfilling the requirements properly. I agree with the screenshots you
attached in the PR description, which seems like you ran back-end
application on different port like 3000 and front-end application on
the 3001 port. But in actual you should run both front-end and back-end
services on the same port. Which means that you should not run a
separate servers on the system. Just ./bin/dev your server should run
automatically and the front-end build the file automatically based on the
changes you will make on the components etc.
Based on what I mentioned above let me clarify few things using
screenshots, as you can see below in the screenshot you are rendering the
App component which is just returning the Message string but not the
whole frontend folder, which does contain all the functionality of the
application that you were running on the separate server.
code.png (view on web)
https://github.com/jcmunav63/rails-react-hello-one/assets/66476329/9c02f7d3-408e-4e6a-a3eb-a013cce785a3

Please follow the article provided in the project requirements for
creating one application Rails project using js_bundling power
properly. Because the solution you provided is a two app project
within a same folder.

Check the comments under the review.
Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop
the approval of this PR. However, I strongly recommend you take them into
account as they can make your code better.
Cheers, and Happy coding!👏👏👏 ⚠ WARNING ⚠
Please, do not open a new Pull Request for re-reviews. You should use the
same Pull Request submitted for the first review, either valid or invalid
unless it is requested otherwise.
Have any doubt ❓
Feel free to leave any questions or comments in the PR thread if something
is not 100% clear.
Please, remember to tag @skyv26 https://github.com/skyv26 in your
question so I can receive the notification. You can also follow me on the
below platforms
[image: @skyv26] https://github.com/skyv26 [image: linkedin-skyv2022]
https://www.linkedin.com/in/skyv2022/ [image: @vrma_aakash]
https://twitter.com/vrma_aakash [image: @skybrel]
https://www.instagram.com/skybrel/ [image: @skybrel]
https://www.frontendmentor.io/profile/skyv26
As described in the Code reviews limits policy
https://microverse.zendesk.com/hc/en-us/articles/1500004088561 you have a
limited number of reviews per project (check the exact number in your
Dashboard). If you think that the code review was not fair, you can request
a second opinion using this form https://airtable.com/shrQAqnBwek5a0O0s.
—
Reply to this email directly, view it on GitHub
https://github.com/jcmunav63/rails-react-hello-one/pull/3#pullrequestreview-1956469237,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC2442JPOOUW3FYYD24O3D3YZZFBXAVCNFSM6AAAAABFFGFJW6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNJWGQ3DSMRTG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

@jcmunav63 Please let me know whenever you will be free and I will show you the instructions on the article will work with any problem by following instructions step by step. Even I will help you to run your project on the same port.

With the help of my code reviewer, I could config the .bin/dev command option, to run this project using one console and one port (3000), running Webpack server in watch mode, and running Rails server on port 3000.
Here are two images of the console...
Console showing the Webpack server compiling the React app...

Console running the Rails server...

Displayed Random Message (in Chrome browser)...

Thank you.

Thank you very much, Aakash! Have a great week!


Issue in installation on window 10 with pip

Error: from ubjson import __version__ as version
ModuleNotFoundError: No module named 'ubjson'
I am installing crossbar its fail due to this error, experimenting whole a day with this minor issue. i just change ubjson to json in setup.py at line 37, then install correctly.
So resolve this issue in global repository that by pip work for rest of the world.

Thank you for the issue report. In the environment you're trying to use, could you please run and attach the output of: pip list

I just tried the following under Windows 10, and it works fine for me:

Download & install Python 3.8.5

Installed for all users, with PYTHONPATH updated

In a new command line window

python -mvenv myenv
myenv\Scripts\activate
pip install py-ubjson
python -c "import ubjson; print(ubjson.__version__)"

Since you're talking about crossbar - it sounds to me like some other problem, but given the lack of information it's difficult to tell.

Sorry for late reply!!!
NOTE: I do all the set-up manually and avoid using Microsoft Package Installer(.msi) because this give me more clarity on both the environment windows as well as Linux.
If you want to try this set-up do following steps
1.Just Download binary package(zip file) of Python not executable Installer and extract the package where you want to put it on your Hard Disk.
2. set two location in your PATH variable one indicate pythen rood directory and second for scripts directory within the root folder.
3. Now download get-pip.py script as: 'curl https://bootstrap.pypa.io/get-pip.py -o get-pip.pythen' and run this python script. This will download pip, wheel and setuptools for you.
4.There is one modification to work pip in manual set-up. There is a file in root folder as 'python38._pth' . (file name will be as your downloaded python version no) Just open the fiel in notepad and uncomment this line : '#import site' save and close. now pip will work for you.
So i try with above setup and get the problem and resolve as mention in the issue.
I also try with package installer(.msi) as your recommendation and you are right, there is no issue, so if you want to test my issue following is my steps from issue arise to resolve it. Thank you.
As i told, try to install Crossbar and the problem arise, Prompting me as a message:'ModuleNotFoundError: No module named ubjson'
So i try to install 'ubjson' manually by downloading zip file, extract the zip and go inside the folder where is 'setup.py' script file present. in my case: 'D:\WEB_SERVERS\PyTHON\WORKSPACE\AuthobahnPyClient\py-ubjson-0.16.1.tar\dist\py-ubjson-0.16.1\py-ubjson-0.16.1'
Now i try to install it manually as: 'python setup.py install'  and this give me error as:
Traceback (most recent call last):
File "setup.py", line 36, in
from ubjson import version as version
ModuleNotFoundError: No module named 'ubjson'
So for this problem I just make a little modification in 'setup.py' script file at line no 36: 'From from ubjson import version as version' to 'from json import version as version'
and now i run: 'python setup.py install'	Now this install the 'py-ubjson' package.

$pip list
before installation
Package    Version
pip        20.2.2
setuptools 49.6.0
wheel      0.35.1
After Installation
Package    Version
pip        20.2.2
py-ubjson  2.0.9
setuptools 49.6.0
wheel      0.35.1

So i try to install 'ubjson' manually by downloading zip file, extract the zip and go inside the folder where is 'setup.py' script file present.

The problem here is that normally, during a Python package installation, the setup.py can import the modules being installed (in this case ubjson). Due to how you've (manually) set up your PATH/PYTHONPATH/etc, it evidently is not in the PYTHONPATH.
It doesn't make sense to modify it to import from the json package. Why? Because it is a completely unrelated package which is part of the Python standard library. So the version defined by json.__version__ has nothing to do with ubjson.__version__.
This is visible in your pip list output - 2.0.9 is not the current py-ubjson release (0.16.1).
Note that importing the package to get its version during install is common practice: See point 6 in this guide. In other words: It can't be right that all packages that have adopted this approach must be changed.

Definitely this is not the issue with ubjson package because when i go with installer package(.msi) setup of python then no issue occur in ubjson installation.
So i can this is the problem with my setup of pythen environment. I will experiment with this, so now i want to close the issue.

But this is also true, with the same setup other packages installed successful, but why ubjosn not? Like pygame successfully install and work.
D:>pip list
Package    Version

pip        20.2.2
pygame     1.9.6
setuptools 49.6.0
wheel      0.35.1

Like pygame successfully install and work.

That's because in that project they hard-code the version inside setup.py itself.

Not only pygame many package installed in my setup with pip install, but ubjson not. If hard-code work then why not ubjson do the same.

If hard-code work then why not ubjson do the same.

Because this enables for the version to interrogated during runtime with from ubjson import __version__. In the end maybe it's not that useful - but that's how it started.
I'm sorry you've had frustrating problems with getting this to work. But right now I don't have the time to change it.


Invalid CSRF token

Describe the bug
When trying to upload a file, it shows this error:
error :: 2021/08/05 17:17:03 server.go:128: Invalid CSRF token
To Reproduce
Steps to reproduce the behavior:

Run oneshot -u .
Upload file from a browser.
It shows this error error :: 2021/08/05 17:17:03 server.go:128: Invalid CSRF token

Expected behavior
File Uploaded Successfully.
Output and error messages
error :: 2021/08/05 17:17:03 server.go:128: Invalid CSRF token
Desktop (please complete the following information):

OS: Arch Linux
Version v1.5.0

Thanks for the bug report!
This is now fixed in v1.5.1


Issue 69 primary action btn refresh

This PR closes Issue #69 Primary action button not refreshing after re-ordering actions
@MrRobz Kindly review.

@MrRobz
My bad I missed the collection switch scenario.
Your approach is cleaner and optimum. I've updated the PR accordingly,
Thanks for the feedback! This is a good learning experience.


Decommission livereload?

livereload does result in speedy refreshes for me as I change things. please leave in place - at least for now - and in a few days I will see how I fare without it

Solved with a separate docker-compose-dev-minimal.yml in which livereload is disabled together with selenium services, resulting in very significantly faster Docker network rebuild and page load times(for @docuracy at least).

more power to ya!
fwiw, docker-compose on the server doesn't load those things


Changed /etc/systemd/system/docker.service.d/docker-options.conf file for successful parsing mount aguments

Changed /etc/systemd/system/docker.service.d/docker-options.conf file for successful parsing mount aguments.
Earlier you could saw in syslog this message:
'[/etc/systemd/system/docker.service.d/docker-options.conf:3] Failed to parse mount flag , ignoring.'

Please verify CLA signature.

Please verify CLA signature.

ci check this

What is common reason for "gitlab-ci/pipeline/initalize — An error occurred in initial pipeline execution" and how can I fix it?

@dshuvar we had problems with pipeline triggering regarding GDRP accepting from bot user, now it's fixed and you should ignore error about: An error occurred in initial pipeline execution now pipeline is running, and we will check back when it's finished.


No support for Pointer type field

You can add by PR

The test is passing, If you Accept the pull request, and provide beta release. I will test it further with bigger payload in my project.

I will adding GitHub Actions today evening


[Bug Report] Button-group with dropdown bug

Element UI version
2.4.3
OS/Browsers version
Any
Vue version
2.5.16
Reproduction Link
https://jsfiddle.net/43x2mwoc/2/
Steps to reproduce
Create button group with 2 or more buttons. Put dropdown in any place of the row except the first.
What is Expected?

What is actually happening?

ButtonGroup does not support nested dropdown. If must, there is a work-around way: https://jsfiddle.net/43x2mwoc/6/