Implement a2dp samples

Implement the a2dp samples: a2dp_source and a2dp_sink.
I have tested with the NXP RT1060 + AW-AM457-D-uSD with https://github.com/zephyrproject-rtos/zephyr/pull/31583

20K LOC of samples, that's a lot.
This looks to have plenty of drivers in the sample code. Should these be made as proper drivers perhaps?

20K LOC of samples, that's a lot.
This looks to have plenty of drivers in the sample code. Should these be made as proper drivers perhaps?

It is mainly caused by the RT1060 board's WM8960 codec support, I played the a2dp_sink's streamer to this codec. In the long run, the all NXP pepherals drivers need be replaced by the Zephyr drivers. I know there are going WM8960 codec support to upstream to Zephyr, after it is done I will improve the demo. For now and this PR, I think it is better to focus on the A2DP. Thanks @joerchan.


Is there a way for multiple developers to use the same phinx database?

We have our setup like this:
Each developer has there own server to develop on, but we share the same database.
When I try to migrate and rollback a phinx script, and another dev has created one before me, it will not allow me to rollback my script because their script does not exist in my file structure.
Error is: Target version<PHONE_NUMBER>0001) not found . How can we get around this? Is it normal for multiple developers to use phinx at the same time?

Afaik each developer (locally) has his own DB for this to work. Why are you sharing the same DB?

We share databases to keep data integrity, and to limit resources needed. I'm not sure what you mean by "each developer (locally) has his own DB".

On your own server you have a test-clone of the actual master-database.
That is how the migrations are supposed to work.

I was unaware that phinx created a local database.. I knew it created a database in the server's phinxlog table.

What @dereuromark is trying to say is that each developer should have a copy of database on its computer and work on that. Otherwise you cannot possibly do a development on branches that each needs a different schema.

#1197

Closing as duplicate then.


Customize instance, hostname, mDNS? (CON-685)

Hello,
Currently, the instance/hostname/mDNS are defined in Matter service. Where can we modify those?
Thank you

The hostname, instance name, service name, and protocol name are restricted by SPEC(4.3 Discovery) for matter device. So you can not change the instance name or host name for matter mDNS service but you can add additional PTR/SRV/TXT record under  the matter mDNS hostname, you can use the APIs from connectedhomeip/src/lib/dnssd/minimal_mdns if you want to use the minimal mDNS implemented in connectedhomip repo. But we would suggest you to use platform mDNS by disabling minimal mDNS in menuconfig.

@wqx6  I have disabled minimal_mdns and attempt to set TXT record with mdns_service_txt_set after esp_matter::start() but it results in crash.
    /* Matter start */
    err = esp_matter::start(app_event_cb);
    if (err != ESP_OK) {
        ESP_LOGE(TAG, "Matter start failed: %d", err);
    }

    /* Add mDNS TXT record under HTTP TCP */
    ESP_ERROR_CHECK(mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0));
    mdns_txt_item_t serviceTxtData[3] = {
        {"board","{esp32}"},
        {"u","user"},
        {"p","password"}
    };
    //set txt data for service (will free and replace current data)
    ESP_ERROR_CHECK(mdns_service_txt_set("_http", "_tcp", serviceTxtData, 3));

Crash log:
ESP0x400d926b: app_main at /home/espuser/esp-git/esp-matter/examples/im/outlet/build/../main/app_main.cpp:440 (discriminator 1)

file: "../main/app_main.cpp" line 433
func: void app_main()
expression: mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0)

abort() was called at PC 0x40093c0b on core 0
0x40093c0b: _esp_error_check_failed at /home/espuser/esp/esp-idf/components/esp_system/esp_err.c:47

Backtrace: 0x4008226e:0x3ffbba10 0x40093c15:0x3ffbba30 0x4009a0a2:0x3ffbba50 0x40093c0b:0x3ffbbac0 0x400d926b:0x3ffbbaf0 0x401e2511:0x3ffbbc40 0x40096c91:0x3ffbbc80
0x4008226e: panic_abort at /home/espuser/esp/esp-idf/components/esp_system/panic.c:423

0x40093c15: esp_system_abort at /home/espuser/esp/esp-idf/components/esp_system/esp_system.c:153

0x4009a0a2: abort at /home/espuser/esp/esp-idf/components/newlib/abort.c:38

0x40093c0b: _esp_error_check_failed at /home/espuser/esp/esp-idf/components/esp_system/esp_err.c:47

0x400d926b: app_main at /home/espuser/esp-git/esp-matter/examples/im/outlet/build/../main/app_main.cpp:440 (discriminator 1)

0x401e2511: main_task at /home/espuser/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/port_common.c:131 (discriminator 2)

0x40096c91: vPortTaskWrapper at /home/espuser/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154

Please ensure that you call the platform_mdns APIs after the platform_mdns is initialized. The initialization will post the event chip::DeviceLayer::DeviceEventType::kDnssdInitialized.

@wqx6 Is there some type of xEventGroupWaitBit that we can wait on chip::DeviceLayer::DeviceEventType::kDnssdInitialized is true?
Currently thinking something like this..
while (1)
    {
        if (chip::DeviceLayer::DeviceEventType::kDnssdInitialized)
        {
            ESP_ERROR_CHECK(mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0));
            mdns_txt_item_t serviceTxtData[3] = {
                {"board","{esp32}"},
                {"u","user"},
                {"p","password"}
            };
            //set txt data for service (will free and replace current data)
            ESP_ERROR_CHECK(mdns_service_txt_set("_http", "_tcp", serviceTxtData, 3));
            break;
        }
        vTaskDelay(1000 / portTICK_PERIOD_MS);
    }

@law-ko You can add use the registered event handler app_event_cb in app_main.cpp to handle the chip::DeviceLayer::DeviceEventType::kDnssdInitialized event.
static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg)
{
    switch (event->Type) {
    case chip::DeviceLayer::DeviceEventType::kDnssdInitialized:
        ESP_ERROR_CHECK(mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0));
        ...
        ESP_ERROR_CHECK(mdns_service_txt_set("_http", "_tcp", serviceTxtData, 3));
        break;
    }
}

Could you please move the add service code under chip::DeviceLayer::DeviceEventType::kCommissioningComplete event. Or you need to set the mdns server hostname before you add service.

@wqx6 Do you mean to have
mdns_txt_item_t serviceTxtData[] = {
            {"board", "esp32"},
            {"path", "/"}
        };

        ESP_ERROR_CHECK(mdns_service_add("ESP32-WebServer", "_http", "_tcp", 80, serviceTxtData,
                                        sizeof(serviceTxtData) / sizeof(serviceTxtData[0])));
        ESP_LOGW(TAG, "mDNS TXT Record set");
        break;

in both chip::DeviceLayer::DeviceEventType::kCommissioningComplete and chip::DeviceLayer::DeviceEventType::kDnssdInitialized case? But the chip::DeviceLayer::DeviceEventType::kDnssdInitialized will still crash.
Also I think you mentioned due to Matter specifications, we cannot define our own desired hostname. Then what do you mean by this:

Or you need to set the mdns server hostname before you add service.

I think calling  mdns_hostname_set("my-esp32"); would overwrite Matter defined hostname.

in both chip::DeviceLayer::DeviceEventType::kCommissioningComplete and chip::DeviceLayer::DeviceEventType::kDnssdInitialized case?

Only in chip::DeviceLayer::DeviceEventType::kCommissioningComplete

I think calling  mdns_hostname_set("my-esp32"); would overwrite Matter defined hostname.

You can construct the host name according to SPEC <IP_ADDRESS>. Host Name Construction and then set it.

@wqx6 chip::DeviceLayer::DeviceEventType::kCommissioningComplete case will not be triggered if commissioning is complete and then ESP32 reboots.
I think I am still having some issues with mdns_service_add with ESP_ERR_INVALID_ARG return:
        {
            ESP_ERROR_CHECK(mdns_hostname_set("my-esp32")); // added to ensure this is not the issue
            mdns_txt_item_t serviceTxtData[] = {
                {"board", "esp32"},
                {"path", "/"}
            };
            ESP_ERROR_CHECK(mdns_service_add("ESP32-WebServer", "_http", "_tcp", 80, serviceTxtData,
                                            sizeof(serviceTxtData) / sizeof(serviceTxtData[0])));
            ESP_LOGW(TAG, "mDNS TXT Record set");
            break;
        }

Log:
E (18290) chip[SVR]: Server initialization complete
I (18290) chip[DIS]: Updating services using commissioning mode 0
I (18300) chip[DIS]: CHIP minimal mDNS started advertising.
I (18310) chip[DIS]: Advertise operational node 84CE2EA06AA86EEF-BB9F56397A918490
I (18320) chip[DIS]: CHIP minimal mDNS configured as 'Operational device'; instance name: 84CE2EA06AA86EEF-BB9F56397A918490.
I (18330) chip[DIS]: mDNS service published: _matter._tcp
ESP_ERROR_CHECK failed: esp_err_t 0x102 (ESP_ERR_INVALID_ARG) at 0x400d8ecb
0x400d8ecb: app_event_cb(chip::DeviceLayer::ChipDeviceEvent const*, int) at /Users/user/esp-git/esp-matter/examples/test/outlet/main/app_main.cpp:183 (discriminator 1)

file: "./main/app_main.cpp" line 178
func: void app_event_cb(const chip::DeviceLayer::ChipDeviceEvent*, intptr_t)
expression: mdns_hostname_set("my-esp32")

abort() was called at PC 0x40093c0b on core 1

The same error happens also with putting mdns_service_add chip::DeviceLayer::DeviceEventType::kCommissioningComplete case

The mdns_hostname_set() should be call after mdns_init() so it should be call after chip::DeviceLayer::DeviceEventType::kDnssdInitialized event is posted and mdns_service_add() should be call after mdns_hostname_set(). So you can do the following things after receive the chip::DeviceLayer::DeviceEventType::kDnssdInitialized event

set the mdns_hostname according SPEC <IP_ADDRESS>. Host Name Construction
add the mdns service

static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg)
{
    switch (event->Type) {
    case chip::DeviceLayer::DeviceEventType::kDnssdInitialized:
        char host_name[32];
        uint8_t eth_mac[6];
        esp_wifi_get_mac(WIFI_IF_STA, eth_mac);
        snprintf(host_name, 32, "%02x%02x%02x%02x%02x%02x.local", eth_mac[0], eth_mac[1], eth_mac[2], eth_mac[3],
                     eth_mac[4], eth_mac[5]);
        ESP_ERROR_CHECK(mdns_hostname_set(host_name));
        ESP_ERROR_CHECK(mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0));
        ...
        ESP_ERROR_CHECK(mdns_service_txt_set("_http", "_tcp", serviceTxtData, 3));
        break;
    }
}

@wqx6 Tried with disabling minimal mDNS but results in earlier crash before commissioning, crash at the init stage:
Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1
W (3461) app_main: Dnssd initialized
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400014fd  PS      : 0x00060630  A0      : 0x80001459  A1      : 0x3ffef960
A2      : 0xe425754c  A3      : 0xe4257548  A4      : 0x000000ff  A5      : 0x0000ff00
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3ffef930
A10     : 0x3ffdfa94  A11     : 0x3fff4b70  A12     : 0x00060021  A13     : 0xfffffffd
A14     : 0x3ffe43b8  A15     : 0x0000abab  SAR     : 0x0000001a  EXCCAUSE: 0x0000001c
EXCVADDR: 0xe425754c  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff

Backtrace: 0x400014fa:0x3ffef960 0x40001456:0x3ffef970 0x40001445:0x3ffef990 0x401295d1:0x3ffef9b0 0x4012daf7:0x3ffef9f0 0x4012db9a:0x3ffefa40 0x400d8e65:0x3ffefa60 0x401d818d:0x3ffefad0 0x4013e63d:0x3ffefaf0 0x4013e91a:0x3ffefb10 0x4013e94d:0x3ffefb80 0x40096c91:0x3ffefba0
0x401295d1: _mdns_allocate_txt at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/managed_components/espressif__mdns/mdns.c:2491

0x4012daf7: _mdns_allocate_txt at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/managed_components/espressif__mdns/mdns.c:2484
 (inlined by) mdns_service_txt_set_for_host at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/managed_components/espressif__mdns/mdns.c:5996

0x4012db9a: mdns_service_txt_set at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/managed_components/espressif__mdns/mdns.c:6025

0x400d8e65: app_event_cb(chip::DeviceLayer::ChipDeviceEvent const*, int) at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/main/app_main.cpp:179 (discriminator 2)

0x401d818d: chip::DeviceLayer::Internal::GenericPlatformManagerImpl<chip::DeviceLayer::PlatformManagerImpl>::DispatchEventToApplication(chip::DeviceLayer::ChipDeviceEvent const*) at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/build/esp-idf/chip/../../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl.ipp:336

0x4013e63d: chip::DeviceLayer::Internal::GenericPlatformManagerImpl<chip::DeviceLayer::PlatformManagerImpl>::_DispatchEvent(chip::DeviceLayer::ChipDeviceEvent const*) at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/build/esp-idf/chip/../../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl.ipp:301

0x4013e91a: chip::DeviceLayer::PlatformManager::DispatchEvent(chip::DeviceLayer::ChipDeviceEvent const*) at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/build/esp-idf/chip/../../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/include/platform/PlatformManager.h:505
 (inlined by) chip::DeviceLayer::Internal::GenericPlatformManagerImpl_FreeRTOS<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/build/esp-idf/chip/../../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp:257

0x4013e94d: chip::DeviceLayer::PlatformManager::RunEventLoop() at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/build/esp-idf/chip/../../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/include/platform/PlatformManager.h:405
 (inlined by) chip::DeviceLayer::Internal::GenericPlatformManagerImpl_FreeRTOS<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) at /Users/lawrenceko/esp-git/esp-matter/examples/im/outlet/build/esp-idf/chip/../../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp:280

0x40096c91: vPortTaskWrapper at /Users/lawrenceko/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154

I have added idf.py add-dependency "espressif/mdns^1.2.0" mDNS dependency and include with #include "mdns.h"

Please ensure the txt entries are valid when you call mdns_service_txt_set as the log shows the _mdns_allocate_txt fails

Thanks.

Is there a way to change the netif hostname, which get's tracked by the DHCP? I found the esp-idf documentation, but obviously I'm not able to simple create or get the proper netif. Can you give advice, if this is possible in esp-matter?


Running optimizer in containers complicated by ValidateOptimizerMachineName

As a part of exploring using the adapter and optimizer, I've been working on running them in docker containers. Given the ephemeral nature of containers, the OptimizerMachineName is subject to change if we were to recreate the containers. In a mature k8s setup using deployments, it is not possible to enforce the same pod name through changes to the container's pod.
The only workaround I can think of currently is to update/remove the rows from the OProcessorTracking table, but that doesn't feel great.
Not looking for this to be solved necessarily, just wanted to bring it up as food for thought. Running the Adapter and Optimizer in containers is a must if we were going to use it in production.

This machine name validation was added to avoid situations in which users inadvertently use connection strings that point to the incorrect database, accidentally run multiple copies of the same service against a database, upgrade the application on one server and not another, etc. Those sorts of issues could cause data integrity issues with potential downstream effects. The workaround of updating the records in the OProcessorTracking table is a good solution as it would work in the scenario that you have outlined and would also require the individual(s) setting-up the process to at least be aware of what they are doing and less likely to run into these issues accidentally.

A new DisableMachineNameValidation setting was added in v2.0.10 to address this issue of machine name changes in hosted environments.


How to blur the boundary

Hi, I saw Vision Pro and Quest blurred the boundaries for their stereoscopic videos. Is that possible to do something similar for this project? Thx.

Hi, I saw Vision Pro and Quest blurred the boundaries for their stereoscopic videos. Is that possible to do something similar for this project? Thx.

Thank you for your advice, I've tried it before, but the effect isn't perfect in current rendering pipeline.


O(log n) add and remove for sorted*

A C implementation of sorted* could give O(log n) add and remove methods. It remains to be seen if that would really boost performance, as the number of comparisons is already O(log n) and the tree can't be that tall anyway -- max height is now 16 in the C source.

@matteodellamico Have you tried the pure-Python SortedContainers module? For sorted* add and remove it's much faster than blist.


AuthenticatedMiddleware cannot use route Decorators

Informations

Type
Version

Bug
4.x

Description
My custom AuthenticatedMiddleware makes use of the "@HeaderParams()" decorator. But my Typescript compiler seems to have an issue with it.
src/modules/auth/MyAuthenticatedMiddleware.ts(6,22): error TS2415: Class 'MyAuthenticatedMiddleware' incorrectly extends base class 'AuthenticatedMiddleware'.
  Types of property 'use' are incompatible.
    Type '(endpoint: any, request: any, next: any, userTokenHeader: any) => Promise<any>' is not assignable to type '(endpoint: EndpointMetadata, request: Request, next: NextFunction) => void'.

Acceptance criterias

[x] Example (log, usecase, etc...)
[x] Ts.ED version (bug/question)

Hi @Kapulara,
This is the problem if you inherit your class from the original class. You need to keep the same signature. So the solution is to not inherit your class from the AuthenticatedMiddleware.
Just look the original implementation of the AuthenticatedMiddleware ;). But I think, isn't a problem.
See you,
Romain


Run tests in parallel and adapt Spark test config

Includes changes to prevent race conditions and resource allocation conflicts.
This change reduces the running time of all CAPS tests by more than 20% on my local machine:
Master:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Cypher for Apache Spark ............................ SUCCESS [  5.501 s]
[INFO] Cypher for Apache Spark - Trees .................... SUCCESS [  4.578 s]
[INFO] Cypher for Apache Spark - API ...................... SUCCESS [  2.959 s]
[INFO] Cypher for Apache Spark - IR ....................... SUCCESS [  6.788 s]
[INFO] Cypher for Apache Spark - Logical Planning ......... SUCCESS [  7.532 s]
[INFO] Cypher for Apache Spark - CORA ..................... SUCCESS [  3.887 s]
[INFO] Cypher for Apache Spark - Spark .................... SUCCESS [02:37 min]
[INFO] Cypher for Apache Spark - Cypher on Scala Collections SUCCESS [  2.734 s]
[INFO] Cypher for Apache Spark - TCK ...................... SUCCESS [02:28 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:40 min

With PR:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Cypher for Apache Spark ............................ SUCCESS [  4.564 s]
[INFO] Cypher for Apache Spark - Trees .................... SUCCESS [  3.716 s]
[INFO] Cypher for Apache Spark - API ...................... SUCCESS [  3.511 s]
[INFO] Cypher for Apache Spark - IR ....................... SUCCESS [  7.010 s]
[INFO] Cypher for Apache Spark - Logical Planning ......... SUCCESS [  7.237 s]
[INFO] Cypher for Apache Spark - CORA ..................... SUCCESS [  3.155 s]
[INFO] Cypher for Apache Spark - Spark .................... SUCCESS [01:52 min]
[INFO] Cypher for Apache Spark - Cypher on Scala Collections SUCCESS [  2.574 s]
[INFO] Cypher for Apache Spark - TCK ...................... SUCCESS [02:05 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:30 min

Disabled parallel test execution. The improvement is mainly due to the Spark config change, and the extra 10 seconds are not worth getting test results out of order in the log.


[FSDP2][1/n] construct NF4Tensor from bf16/fp16/fp32

addressing to(bf16/fp16/fp32) with __torch_function__, as suggested by @cpuhrsch
NF4Tensor.dtype is the dtype from construction. For example,  to_nf4(fp32_tensor) will return nf4tensor with dtype fp32
dtype=fp16/bf16/fp32 in pytest test/dtypes/test_nf4.py
tested in torchtune with pytest tests -m integration_test @rohan-varma

it brings 2 benefits

fixes https://github.com/pytorch-labs/ao/pull/133 brought by @drisspg
unblock FSDP2 since grad.dtype == param.dtype

support fp32 required by torchtune
removing bf16 dtype hardcoding and added unit tests from https://github.com/pytorch-labs/ao/pull/133/files

error test/kernel/test_galore_downproj.py seems to be irrelevant. it's throws error when parsing nvidia-smi

Great! Thank you! Can you try rebasing to see if CI runs green?

Great! Thank you! Can you try rebasing to see if CI runs green?

rebasing now

CI fails at torch=2.2.2. looking into the issue now


Revert "Sanity checks use guard" - fix activity toasts not appearing

Changing these conditions to guard means that they are now reversed, thus breaking activity toast behavior. This PR simply reverts back to the original if let conditionals.
(I personally believe these cases are clearer using if let _ =  anyway.)
This reverts commit 2ac97b4dcd738790b875d03f1cc754b87d1f5891

Fixed on master. Thanks!


warning change

@ChackDan : Thanks for your contribution! The author, @rwike77, has been notified to review your proposed change.

#sign-off

@ChackDan: I'm sorry - only the author of this article, @rwike77, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

Fine with me.  #sign-off

@ktoliver : Thanks for your contribution! The author, @rwike77, has been notified to review your proposed change.


WIP: New random

This is out of WIP.  It is the first in a series of PR's that will end up with a complete replacement of RAND_bytes and friends.

@paulidale please take a look.  I'm going to pause a bit before I big the next part, which will probably be to only start with a random pool and then use siphash to generate the random bytes.  Thoughts?

Why are you going with siphash and not for instance chacha20?

Either’s fine, and since chacha is already required for TLS 1.3 that’s probably the better choice.  The key point is to stir the pool once at init and then get a stream of bytes out.  Make sense?

We should add new entropy at regular intervals.

Anyway, please consider doing that in an other PR. Maybe we should just start with having a RNG per thread.

And I assumed that this PR was just about being able to get the random data from the OS.

We should add new entropy at regular intervals.

I am not positive, but I do not think this is necessary.  Once seeded all we need is the stream cipher.

I took this out of WIP, making it the first of a set of PR's.  I also updated the title to avoid confusion.
This is ready for review.

As I understand it, there are 2 reasons to reseed or add new entropy:

Depending on the algorithm there is a limited amount of data you can extract from it so that it stays unpredictable.
An attacker might somehow get to learn some details about the internal state and adding new entropy will fix that.

There are implementations that constantly add new entropy, but I suggest we do something like after extracting 1 GB out of it that you add new entropy. Maybe a time limit of for instance 1 hour is useful too.

Sure, that’s a reasonable thing to do.

Fixed, thanks

This could be a bit long winded.  Entropy and randomness are interests of mine.
Architecture
I've been thinking along the lines of more radical changes to the architecture:  a single global RNG that is seeded with good entropy from the OS and that is continuously reseeded.  Each SSL_CTX has its own RNG which is seeded from the global context.  Each SSL has its own RNG which is seeded from the SSL_CTX's RNG.  In other words a hierarchy of RNGs.
The idea being that a compromise of the RNG state for a SSL doesn't lead to a compromise of the state of any others.  A compromise of the SSL_CTX state doesn't leverage to other SSL_CTX's.  A compromise of the global RNG is bad but the continuous reseeding should help limit the damage.
This is predicated on RNGs being reasonably efficient to create.  This does not depend on entropy availability from the OS, rather it will predominately depend on the mixing function used.  I've no strong preference as to the mixing function.  Any cryptographic hash should be okay.  Block ciphers can also be used.  It isn't necessary for each RNG in the hierarchy to use the same mixing function but there is no reason not to.
The intermediary SSL_CTX layer could be omitted, if the additional risk is acceptable.  The risk should be low but paranoia is oft sensible.  The global RNG might also be better as two, one getting high quality entropy and hashing just this.  This feeds into a PRNG that supplies the rest of the system.
I do like the idea of per thread RNGs however.  I hadn't properly considered the impact of threading on the architecture.  One RNG per thread seems like a great idea.  Obtaining uncorrelated entropy for each thread would be difficult.  A single global well seeded RNG feeding per thread RNGs which feed the rest might work, although it might make more sense for the per thread RNG to feed into the SSL ones.
Having a separate thread to manage the global RNG is probably a good idea, although the OpenSSL threading wrappers don't include thread creation.  It is possible to avoid a thread by sprinkling entropy gathering calls throughout the TLS stack.  This part can be made with a surprisingly low overhead and doing both together is viable.
For non TLS use, either grab entropy from the global RNG or create a new RNG seeded from it.  Again per thread RNGs are a good suggestion.  For long term things (key pairs etc) make sure to use fresh entropy from the OS where possible.
Reseeding
Regular addition of new state to all RNGs is vital.  Algorithm data limits aside (which are a legitimate concern), if the entropy pool of a RNG is compromised, it will remain compromised for all time.  Adding new entropy mitigates this.  Time and number of bytes produced are good criteria for triggering this reseed.  One hour is a long time, a few minutes is worth considering.  The cheaper the RNGs are in terms of compute, the more often reseeding is possible.
Each RNG reseeds from the one above it in the hierarchy by requesting more bytes.  i.e. SSLs reseed from their SSL_CTXs which reseed from the global RNG.  The global RNG doesn't explicitly reseed.  Each reseed should be using a substantial amount of data (the why is below).
On a fork, all the RNGs should be reseeded starting with fresh entropy for the global RNG.
Entropy
Entropy gathering is a bit of a can of worms.  I'll skip over the gory details and boil the major items down to a few points.  No doubt I'll forget some things.

Entropy cannot be generated quickly.  A continuous gather and cache process works better than trying to gather a lump on demand.  A continuous gathering process also wastes less entropy than a stop-start one.  The slowness of gathering is a problem at start up when there is no entropy available.  I've not been able come up with a good solution to this.  Because entropy is slow, pushing entropy into a RNG works better than the RNG asking for entropy, although both can be accommodated.

Entropy should be added to RNGs in large lumps.  If a RNG's state is compromised then the addition of a byte of entropy to a pool can be cracked relatively easily.  The addition of many bytes not so.  For a 128 bit pool, one byte can be cracked in 2^8 time if the attacker knows where it is being XORed and 2^12 if it is known it is being applied at a byte boundary but not which.  The theoretical worst case of eight bits spread throughout is about 2^48 time.  Ideally XOR the full state with new randomness each reseed.

Use multiple entropy sources.  Relying on a single source means only one source needs to be compromised to break the RNG.  Relying on many sources mitigates this: the RNG will produce good output so long as one source remains uncompromised.  Each source should maintain its own buffer of collected entropy and release this to the global pool in blocks.  The extra layer of buffering makes attacks like this harder but not impossible.

Sources produce entropy at different rates.  High speed timers can be sampled relatively quickly, system memory or disc activity statistics less so.  Instead of checking all sources on every call to gather entropy, an event based system with periodic scheduling reduces the overheads significantly.

Sources need to be statistically assessed.  The quality of the entropy being produced needs to be estimated so that enough can be released to properly seed the RNG.  The dieharder and TESTU01 suites are good but they both require prohibitively large amounts of random data to operate.  NIST's SP800-90B tests seem to be statistically sound and have manageable data requirements.  Their sample Python script is glacially slow and a couple of the tests require some minor revision.

Can I suggest reviewing the various threads here (you have to be a member of the dormant<EMAIL_ADDRESS>email list to see it):
https://mta.openssl.org/mailman/private/prng/2016-January/thread.html
There was quite some discussion a year or so ago about PRNG requirements which we should factor into any design.

Done.

And perhaps also see the thread on the cryptography mailing list that I started.  Full archives of the list here: http://www.metzdowd.com/pipermail/cryptography/

Interesting. When I was looking at some FIPS requirements for FIPS 140-2 I ran into some of the problems. Back then RAND_METHOD was not opaque and it couldn't be changed because it was in a stable branch so revision wasn't really possible. Some of the enhancements which would've been very useful at the time are similar to those @paulidale suggested. Something like this...
Support for multiple RNG instances. Currently we only have one single global state. Effectively that means only one RNG type is usable and any change to that affects everything. One way to solve that is to have an RAND_CTX instantiated by RAND_METHOD. An appropriate RAND_CTX could then be attached to whatever structures want it (e.g. SSL_CTX, SSL). There would still be a global RAND_CTX for compatiblity.
Need for a "flags" field in RAND_METHOD. In my work this would've been very useful to indicate if the RNG was suitable for FIPS use. It might well have other uses.
Entropy sources. There should be a way to cleanly add entropy sources instead of lumping them all together in RAND_poll etc. A separate entropy source API perhaps?

Something I've been previously asked for is the possibility of an optional "context" label for RAND_bytes() calls.

I'll start a message on openssl-dev about general issues.  Let's leave this PR for commenting on just this code.

On 06/26/2017 05:49 AM, Salz, Rich wrote on the openssl-dev list:

Please take a look at GitHub pull request

Is the RNG topic going to be discussed on github, or on openssl-dev?
What about other topics?
Having some topics one place and some another seems like a Bad Idea™
Having a single topic split across multiple venues seems even worse.

Discussino should be over there on the mailing list.  As I wrote above, please keep this PR for just talking about the code in this PR.

Bump.  Outside of the commentary, which is now happening on openssl-dev, this PR should really be non-controversial.  No API changes.  No semantic changes.  Just code-cleanup and laying the groundwork for future stuff.

additional commit pushed addressing @kaduk 's feedback so far.

I need something stronger than “maybe” ☺

I'm not going to block the commit just because of the name; if you don't like my suggestion we can probably just leave it with your name.

I’ll take your suggestion, just wanted to make sure you wanted it and not that you were fishing around.

renamed and additional commit pushed

ping.  this is just existing code cleanup.  no user-visible changes.

Need to rebase past the egd refactor :-/

Rebased/pushed

I was saving that blank line for a rainy day ☺
Two style nits fixed, thanks.

Thanks!  Merged to master with commit da8fc25.  Next step, #3862, anyone..


Added extension for SQLAlchemy

I added an extension for SQLAlchemy. It is very similar to the extension provided for Tortoise.
I use the inspection capabilities of SQLAlchemy to determine if it is applicable. Then the field values are extracted from attrs attribute of the Inspector object. These are not necessarily equal to the arguments accepted by __init__, but should cover most cases.
A minimalistic unittest (essentially a copy of the tortoise unittest) is also provided.

I think this is awesome. Thank you for being a 2nd contributor to this small open source project.
I just left a small comment but great job!


Question about PDF

Off topic a bit... What template+software did you use to make the PDF? I like it a lot.

I use a custom LaTeX template that I wrote. I may make it public in the future


Druid Totem Affixes not recognized

Hey man,
as you can see here

the affixes for druid totems are not getting recognized. Any idea why?

There was a bug in the previous versions which is now fixed. When Lite Mode is active all items with Damage per second are seen as weapon. This includes the totem as well.
If you want to have different affixes for your weapons and totem you need to disable the Lite Mode.
In the previous versions the Totem was not excluded causing it to sometimes use the weapon affixes and other times the totem affixes.

Alright - when i disable the lite mode then the affixes for the totem get detected. But the affixes for 2 and 1 hand Axes and Maces won't get detected anymore. Only Staffs :/

That's why Lite Mode is very easy. You only need the damage per second image.
When you turn that off you need an image for each item type.
Check the Types folder for the axes and maces images. You might need to add them yourself.

I added the images and now it gets detected (=


Suggestion: Implement Google smart lock for login

If you've never installed an app that supports Smart Lock, you may not realize how seamless it is, even moreso than relying on Autofill. You open the app the first time and if you've ever logged into that service from Chrome or another Android phone with Smart Lock enabled, you get a little pop-up asking you if you'd like to login using those saved credentials. No tapping on the user/email field to fill them up, no waiting and unlocking whichever Autofill app you use. It's a simple tap and you're logged in.

As suggested here

Does it require Google Play Services ? Is there a fallback ?

@teolemon I think I may have brought this up before somewhere actually. Not sure, I'd need to look into it more.

@teolemon I've implemented the Google Smart Lock for Password. But should I trigger the credential dialogue box in onStart method or on email EditText click?

@jaindiv26 I would suggest onStart (or onCreate if it's called that) personally. Minimises user input that way. Thanks for working on it :)

I think this can be closed. @teolemon @deniger


Adding support of UDN usage

Using --udn option create a UserDefinedNetwork object on the netperf ns
Type of change

[ X] New feature

Description
This new option deploys a UDN network in the netperf Namespace. All the pods are using the UDN interface to contact each other.
It does not support Service and IPv6 (even if the implementation of v6 looks straightforward).
Related Tickets & Documents

Related Issue # PERFSCALE-3552
Closes #

Checklist before requesting a review

[ ] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.

Testing

OCP cluster baremetal 4.17.2 - TechPreview enabled.
Run the default netperf.yml config, without the Service Test.

https://redhat-internal.slack.com/archives/C077NGF5HE1/p1728676760441059 - I wonder if the annotation will eventually get better?

@jtaleric @rsevilla87 did you have the time to take a look at it?

@rsevilla87 @jtaleric I have updated the PR. Sorry for the late response, I had no OCP cluster to test the change last week.

@rsevilla87 @jtaleric is it okay to merge this? My next step would be to add the UDN support for VMs


Update p7b to include Identrust Chain

I ran the following commands:
openssl pkcs7 -inform DER -outform PEM -in config/tls/Certificates_PKCS7_v5.6_DoD.der.p7b -print_certs > config/tls/certificate_bundle.cer

openssl crl2pkcs7 -nocrl -certfile config/tls/ECA_Root_CA_4.cer -certfile config/tls/IdenTrust-ECA-S23.cer -certfile
 config/tls/certificate_bundle.cer -outform DER -out config/tls/milmove-cert-bundle.p7b

In the initial PR here, I did not run the first command, and that basically broke our certificate chain because we effectively didn't have our chain in the p7b.

To be absolutely sure here, I'm going to deconstruct the config/tls/milmove-cert-bundle.p7b into PEMs and make sure all the certs are in this P7B container.

At first glance here @chtakahashi, I don't think we need this file checked in. config/tls/certificate_bundle.cer. That's only the output from the v5.6 as certificates as is only used in the creation of config/tls/milmove-cert-bundle.p7b so we shouldn't need it in the repository.

Warnings

:warning:
Please add the JIRA issue key to the PR title (e.g. MB-123)

  Generated by :no_entry_sign: dangerJS against 243863b1f35d6eb0d996bca62efa0c19fbadb06c

merging


beaconReceivedRequestSummary misses requestParameters representation

The beaconReceivedRequestSummary should IMO also represent the request parameters (requestParameters from beaconRequestBody), not only the filters.
https://github.com/ga4gh-beacon/beacon-framework-v2/blob/e961cabd80711b95b39d0a580cd422928126c9cd/responses/sections/beaconReceivedRequestSummary.json#L15

I truly believe it was there, as the example documents show ;-)


Add unit test for dataset use case

Fix #31

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


BSA 102 installing exception handler at EL2, even if running at EL1

BSA 102 is testing Memory Response in a finite amount of time, the test is expected to potentially cause an exception. So BSA installs its own exception handler (using the RegisterInterruptHandler of the UEFI CPU Arch Protocol), but is doing so at EL2.
In a VM case, UEFI may be running at EL1/EL0, and the VM firmware (in the hypervisor) has its own exception handler installed, which may triggers a system reboot since the BSA handler doesn't handle the exception.
BSA should check the EL level its running at, and install its exception handler at same EL level.

Hi @PhatFree,
As discussed internally, ACS installs the exception handler at the EL on which it is running.
Thanks,
ACS team

Hi @PhatFree,
We will open the issue once the ESR value dump is received for further checking why exception was routed to EL2.
Thanks,
ACS team


CASMCMS-7676 Add support for templating IMS recipes

Summary and Scope
Summarize what has changed. Explain why this PR is necessary. What is impacted? Is this a new feature, critical bug fix, etc?
Update cray-import-kiwi-recipe-image helm chart to pass dictionary of IMS recipe template keys/values to the ims-load-artifacts container.
Is this change backwards incompatible, backwards compatible, or a backwards compatible bugfix?
Yes
Issues and Related PRs
List and characterize relationship to Jira/Github issues and other pull requests. Be sure to list dependencies.

Resolves CASMCMS-7676

Testing
List the environments in which these changes were tested.
Tested on:

mug

Test description:
How were the changes tested and success verified? If schema changes were part of this change, how were those handled in your upgrade/downgrade testing?
Created a test recipe helm chart based on the updated cray-product-install-chart and ims-load-artifacts container. Installed this test recipe helm chart on mug. Saw that the recipe was added to IMS as expected, including that all templating during the helm install occurred as expected. Verified that building the recipe using IMS templated the recipe as expected.

Were the install/upgrade-based validation checks/tests run (goss tests/install-validation doc)? No
Were continuous integration tests run? If not, why? No
Was upgrade tested? If not, why? Yes
Was downgrade tested? If not, why? Yes
Were new tests (or test issues/Jiras) created for this change? No

Risks and Mitigations
Are there known issues with these changes? Any other special considerations?
Pull Request Checklist

[x] Version number(s) incremented, if applicable
[x] Copyrights updated
[x] License file intact
[x] Target branch correct
[x] CHANGELOG.md updated
[x] Testing is appropriate and complete, if applicable
[x] HPC Product Announcement prepared, if applicable
[ ] Do not merge until CSMv2.5 code can be merged

Any functional updates to this PR need to also be made in the new repository: https://github.com/Cray-HPE/cray-import-kiwi-recipe-image/


fix prometheus integration

If it is ok, can you generate a new version to us? Thanks.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>7
Details

1 of 4 (25.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.07%) to 89.644%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

django_q/cluster.py
1
4
25.0%

Files with Coverage Reduction
New Missed Lines
%

django_q/core_signing.py
1
80.85%

Totals

Change from base Build<PHONE_NUMBER>6:
-0.07%

Covered Lines:
3376

Relevant Lines:
3766

💛  - Coveralls


(feature): [Safe Apps] App Transaction List Details

Ticket #502
Adding Icon and App name in TX originated by a third-party app.

Travis automatic deployment:
https://pr601--safereact.review.gnosisdev.com

Looks good

I had no more issues with that flicker i reported in the previous comment.
Other issue:
I cannot execute the Tx about compound:
Clicked "execute" > signed with MetaMask > waited for Metamask to confirm the signing > The Tx is still in "Awaiting execution" 5 mins later

@Uxio0 Nico asked me to tag you on these one

@francovenica Can you provide the tx hash? :)

Could this be related https://github.com/gnosis/safe-react/issues/585 ?

Travis automatic deployment:
https://pr601--safereact.review.gnosisdev.com/app

@mikheevm ready for review
@francovenica ready to QA

Travis automatic deployment:
https://pr601--safereact.review.gnosisdev.com/app

I'm still having the issue of the Tx not executing.
I've tried with 3 new safes

Travis automatic deployment:
https://pr601--safereact.review.gnosisdev.com/app

@nicosampler I can't see your changes. Did you forget to push or something?

Travis automatic deployment:
https://pr601--safereact.review.gnosisdev.com/app

@francovenica the feature to fallback the icon and name in the TX list, was implemented on #621

Travis automatic deployment:
https://pr601--safereact.review.gnosisdev.com/app


Added generate_mipmap

This is very basic and just exposes the existing API of CommandBuffer.

@ebkalderon good point! Added now.

Ok, published in 0.16.1 now

Now that I think of it, T should have a BlendFormat bound.

On Jul 3, 2017, at 22:24, Eyal Kalderon<EMAIL_ADDRESS>wrote:
@ebkalderon approved this pull request.
Sweet, looks good!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


OpenFaaS function for Caire content aware image resize library.

Signed-off-by: esimov

I think this will be a good addition. We just need some way to help the users to understand how to use the function once it's deployed in the UI.

Great, let me know if i have to adapt in some way the current implementation.

Derek add label: blocked

https://github.com/openfaas/store/pull/41#issuecomment-423164950
This is a great function - our UI just can't support the rich set of user-input/data that is required. An issue has been opened in openfaas/faas, but nobody has worked on it.
https://github.com/openfaas/faas/issues/890

@alexellis what do you think about including an optional form based on json schema? of course the question remains how to register the json schema which belongs to a function in the gateway.

Having a clear-up on GitHub issues / PRs over 1 month old. Let's revisit as necessary. Thank you for the PR.


Buttons not clickable emptyState

Describe the bug
In the DataTable component, when using the emptyState prop to display a custom empty state containing any interactive button, the button becomes unresponsive. However, if the same component is rendered directly instead of within emptyState, the button works as expected. This appears to be an issue with DataTable’s handling of the emptyState prop.
To Reproduce

Use the DataTable component with emptyState to render an interactive component containing a button (e.g., Button or ActionIcon).
Attempt to click the button in the rendered empty state.
The button does not respond to clicks within emptyState.
Move the same component outside of DataTable’s emptyState and observe that the button becomes responsive.

Sample code of what I'm referring to:

function ExampleTable({ data, openModal }) {
  // Direct rendering example for comparison (works as expected)
  if (data.length === 0) {
    return (
      <Group justify="center" gap="lg">
        <ActionIcon size={24} onClick={openModal}>
          <IconPlus />
        </ActionIcon>
        <Stack align="left" gap={0}>
          <Text c="dimmed" size="sm">
            No records found.
          </Text>
          <Text c="dimmed" size="sm">
            Click the + button to add one
          </Text>
        </Stack>
      </Group>
    );
  }

  // DataTable rendering using emptyState (button does not work)
  return (
    <DataTable
      records={data}
      columns={[
        { accessor: "name", title: "Name" },
        { accessor: "age", title: "Age" }
      ]}
      emptyState={
        <Group gap="lg">
          <ActionIcon size={24} onClick={openModal}>
            <IconPlus />
          </ActionIcon>
          <Stack align="left" gap={0}>
            <Text c="dimmed" size="sm">
              No records found.
            </Text>
            <Text c="dimmed" size="sm">
              Click the + button to add one
            </Text>
          </Stack>
        </Group>
      }
    />
  );
}

Expected behavior
Buttons within the emptyState prop of DataTable should respond to clicks.
Screenshots
Using emptyState prop:
https://github.com/user-attachments/assets/23016287-f5c3-4e6c-855f-c5e8d5c4920f
Rendering directly with early return:
https://github.com/user-attachments/assets/f642c3ed-c0fb-4e7a-8a38-2743b1267b0d
Gyazo links in case embeds stop working:
https://gyazo.com/3c8cd0879ccdba8665433d2d40124384
https://gyazo.com/a7d9577f0c29bbb51be265280ba03622
Desktop (please complete the following information):

OS: MacOS Sonoma 14.6.1
Google Chrome
Version 130.0.6723.69 (Official Build) (arm64)

Thanks for reporting!
This was addressed in 7.14.3, which should hit the npm registry in a few minutes.

@mariansimecek
Oops, you're right. Will revert in a minute.

@mariansimecek Fixed in 7.14.4. Apologies for the inconvenience.
@pfo-omicsstudio To add interactive empty state content, make adjust the styling as explained here: https://icflorescu.github.io/mantine-datatable/examples/empty-state/#interactive-custom-empty-state-content


GVM doesn't work with Fish shell

The previous work-around for using GVM with the Fish shell was to add all the 'current' links to the PATH. This appears to be broken with newer versions of GVM. The 'current' link is only set to the default version of the given tool and doesn't get updated when 'use'-ing a different version.

Not cool guys, totally not cool. I've been using GVM alongside fish shell for about 1 year and today my setup was totally broken after update from GVM to sdkman.

As before, we do not officially support fish shell. If you want to get involved to make it compatible, feel free to fork and contribute to this free service that we are providing to you.

+1

http://tedwise.com/2016/02/26/using-sdkman-with-the-fish-shell

Thanks but this is not working solution.
Simple workaround, add to ~/.config/fish/config.fish:
# sdkman
set PATH $PATH (find ~/.sdkman/candidates/*/current/bin -maxdepth 0)

Sorry, fixed the post.

You should support fish-shell, I don't think that should be a difficult task and fish-shell is much better than the old fashioned bash shell. Also thanks for this great work, sticking with bash for now.

We still have no major plans to support fish shell as it still has a pretty
small user base. You could always try ZSH of course ;-P
On Tue, 19 Apr 2016 at 16:01 Giancarlo Chiappe<EMAIL_ADDRESS>wrote:

You should support fish-shell, I don't think that should be a difficult
task and fish-shell is much better than the old fashioned bash shell. Also
thanks for this great work, sticking with bash for now.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/sdkman/sdkman-cli/issues/294#issuecomment-211966527

So, this is all about popularity :) I dont get why happy fish user could try ZSH? Could you explain?

Probably because making sdkman compatible with a new shell (with
corresponding automated tests) is a lot of work and effort. Remember that
this project is free and worked on in our own spare time.
If the fish shell community wants to be supported, we would gladly
accommodate them and we welcome good quality PRs to our project.
On Tue, 19 Apr 2016 at 20:25, Mariusz Smykuła<EMAIL_ADDRESS>wrote:

So, this is all about popularity :) I dont get why happy fish user could
try ZSH? Could you explain?
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/sdkman/sdkman-cli/issues/294#issuecomment-212077909

Closing this issue as sadly no PRs were received.

i know is a closed post, but just FYI, you can add fish shell support easily with this snippet of code
function sdk
     bass source ~/.sdkman/bin/sdkman-init.sh --no-use ';' sdk $argv
end

has a dependency on the bass library : https://github.com/edc/bass

Please take look at blog entry describing sdkman along with fish shell ;) http://tedwise.com/2016/02/26/using-sdkman-with-the-fish-shell (praises for Ted Wise).

@Markcial this doesn't work for me.
 ❯ sdk list
$  is not a valid variable in fish.
- (line 33): printf "                                                         $ sdk install activator";printf '
                                                                               ^
from sourcing file -
        called on line 14 of file ~/.config/fish/functions/bass.fish

in function “bass”
        called on line 2 of file ~/.config/fish/functions/sdk.fish
        with parameter list “source /home/amos/.sdkman/bin/sdkman-init.sh --no-use ; sdk list”

in function “sdk”
        called on standard input
        with parameter list “list”

source: Error while reading file “-”

 ❯

@amosbird Fixed on edc/bass, can you try upgrading your edc/bass with fisher up edc/bass  please?

@Markcial Thanks. It works now.

I wrote a script like this and saved as $HOME/.config/fish/conf.d. Seems it works. And it does not depend on bass:
#!/usr/bin/fish

# sdk command
function sdk
        bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk $argv"
end

# add paths
for ITEM in $HOME/.sdkman/candidates/* ;
        set -gx PATH $PATH $ITEM/current/bin
end

@ctwise I'm getting	lots of errors:
~> sdk list
mktemp: too few X's in template ‘env’
mktemp: too few X's in template ‘env’
bash: -c: line 0: syntax error near unexpected token `newline'
bash: -c: line 0: `source ~/.sdkman/bin/sdkman-init.sh && sdk list && printenv > '
~/.config/fish/functions/sdk.fish (line 12): Invalid redirection target: $path_env
          echo "$elem" >> $path_env
                       ^
in function “sdk”
	called on standard input
	with parameter list “list”

It seems the interface of mktemp has changed:

TEMPLATE must contain at least 3 consecutive 'X's in last component.

So, simple fix:
set after_env (mktemp -t env.XXX)
set path_env (mktemp -t env.XXX)

Thanks a lot, huge help!
I wonder how much work it would be to make this into a PR. Sdkman's installer could detect if .config/fish exists and then write those scripts of yours in the correct places?

@ctwise The list of commands apparently need an update, too: outdated doesn't exist anymore. (I didn't check everything).
Maybe, at this point, it'd be good to have a Github project for your scripts (and deploy them via fisher or similar), then we could collaborate to keep it up to date more easily. Are you up for setting that up?

@reitzig not sure what you mean. Are you on the latest version of sdkman? The outdated command and all it's references in help have all been removed long ago.

@marc0der The fish script @ctwise posted on his blog still has it (but otherwise works fine). Sorry for highjacking your bugtracker for communicating with him about something you have no intentions to support; will endeavour to move the discussion elsewhere.

No probs, feel free to keep discussing it here. I just didn't understand the context so my bad...

@reitzig Please use @yookoala solution, works like a charm.

@mariuszs I can see how @yookoala's snippet makes sdk and installed binaries available (and more simply so than the other alternatives); it doesn't provide auto-completion, though (which is the bigger part of @ctwise's post).

I set up a repo: reitzig/sdkman-for-fish. There is some work to do on the completions; pull requests appreciated.
@ctwise and @yookoala, I hope you are fine with the MIT license and credits; if not, please let me know.

@marc0der At this point, would it be conceivable to have the SDKMAN! installer detect the presence of fish, and either install support there (potentially destructive, so meh) or give the user a hint how they can get it?

I'm open to either approach. We seem to have a lot of fish shell users now so why not give them first class support?
The installer script can be found here:
https://github.com/sdkman/sdkman-hooks/blob/master/app/views/install.scala.txt

I posted a draft: https://github.com/sdkman/sdkman-hooks/pull/9
It would be great if one of the other fish users could chime in. As the author of the (not yet fully matured and battle-tested) integration I feel slightly awkward pushing this.


Cayley.io is down again

Related to #947 site seems to be down again.

Still down, FYI.

Such a shame, this really is cool project worth continuing.

there are plenty contributor who could take it over if the main developer had to move on. even if it mean giving up the name

I'm open to adding someone to the project to keep the development. See #963 .

I'm open to adding someone to the project to keep the development. See #963 .

hi @dennwc, I'm not a contributor (yet) but I pushed the site to cloudflare pages in case you want to set a CNAME and bring cayley.io back up
https://cayleygraph-website.pages.dev/
it comes from https://github.com/amery/cayleygraph-website/tree/built, for some reason their hugo integration didn't work out of the box, will try to fix that so it comes directly out of master

https://cayleygraph.github.io/ works now.  The website repo was renamed to cayleygraph/cayleygraph.github.io to make this work.
The cayley.io domain will not work until we can get a CNAME.   Perhaps @barakmich, says Dennis.

We're live again!


designer view different from debug view

hello i have this issue first i thought it only exist in vs2015 community
then i try to install vs2013 community too and the issue seems to exist too..
my problem was in design mode it shows black panel while in debug mode the metro ui shows..
its hard to design where you cant see what you are designing .. anyone can help please thanks.
here's the screenshot for more info.

@madalilng This is not a bug by MahApps. This is usual view of a Window in the VS designer (it's also happen with normal Window).

o okay .. how can i change that to follow mahapps design, is there a way?

Having the same issue. Not sure if its meant  to be this way.


After 1.14 release dependency is missing

After 1.14 release of builds are failing:

Workedaround by installing the missing dependency:
npm i -g regenerator-runtime

Happening for me too

Good spot. Should be sorted in 1.14.1


feat: use let instead of var

Is your feature request related to a problem? Please describe.
js-confuser generated code uses var instead of the preferred let alternative.
js-confuser using var makes reverse engineering easier, because it eases differentiating between js-confuser generated and normal code.
Before upgrading to the latest version, I was simply replacing all var  with let  and then shoving it into esbuild, which … worked!
Now, it fails due to (I'd assume) control flow changes (erroring due to redeclaration of var).
Describe the solution you'd like
Always use let instead of var.
If support for older JS runtimes is required, the user could always shove the output into another transpiler.

Hi you're right. JS-confuser only places var right now. The obfuscator has a much easier time dealing with var code and dislikes the use of let and const
For instance, Control Flow Flattening completely ignores blocks of code that use let/const due to the lexical bindings having stricter rules.
Being able to differentiate between obfuscator code (var) and user code (let) is a big flaw, so here are solutions:

Make the obfuscator use let so there is no difference (all let solution)
Change the users code to use var, and keep obfuscator using var (all var solution)

What do you think?

I'd prefer all let, because doing var -> let yourself is a lot harder than let -> var (if you need the other for some reason).


fix linter after grpc upgrade

coverage: 80.594% (-0.01%) from 80.605%
when pulling 13f30825503adab6222dbc104e55f7d16b506be6 on jwtty/grpc
into c60acdf90c844f4356014886285a34d96e1ef172 on main.


[Transforms] Add constant_tensors_folding pass

This PR implements constant_tensors_folding pass (RFC: PR #183) in issue #56 and issue #146:

The input MLIR function entry will be split into two functions: entry() and runtime_fold(). The runtime_fold() function contains the constant operations whose input tensors and output tensors are all constant. The new entry() function contains other operations that depend on the variable values and folded constant tensors.
When needed, compile_time_fold() can be enabled to fold constant tensors during compile time.
A constant tensor may be fully folded by several sequential operations. If fully folding increases the data size dramatically (i.e., by BroadcastOp), we choose a partial folding.
Swaps the constant BroadcastOp and the constant operations after it, so that these constant operations can be included into partial folding. Currently there are strong constraints on these ops to ensure correctness.
Necessary information for runtime execution is added as GlobalOp to the MLIR module.
During the pass, the buffers for storing folded tensors are allocated using the APIs provided by the constant cache manager, which will be implemented by another PR #342.

Though the PR is ready_to_review, we need PR #342 and benchgc's support to fully enable this feature. For OpenVINO integration, this feature can be enabled by modifying file.


Mark serverless-integrations test as optional

What does this PR do?
Marks flaky integration tests as optional, until we can fix the underlying flakiness
Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

[ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
[ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
[ ] A release note has been added or the changelog/no-changelog label has been applied.
[ ] Changed code has automated tests for its functionality.
[ ] Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
[ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
[ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
[ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
[ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
[ ] If applicable, the config template has been updated.

Be aware that with this solution, even if the serverless integration tests fail, they will still get a ✅ green check. This could mean missing real errors when they arise and that concerns me.


Clean up asf-site branch by deleting website src and most other directories

To make it more clear that doc source changes need to be checked into the master branch, delete almost all of the content on the asf-site branch, leaving the top level files and website/generated-content.
git rm -r sdks website/src release gradle ownership buildSrc examples model .test-infra runners vendor

@swegner PTAL?


Localize submit and cancel button on dialog

Hi,
Thank you for this great extension.
I have a small issue  and I can't figure it out myself. I'm using the MudExObjectEdit in a dialog.
How would I be able to change the text on the cancel and submit button as well as the color of the submit when I use dialogService.EditObject?
I tried already a lot with adding parameters like:
var parameters = new DialogParameters();
        parameters.Add("CancelText", _localizer[LK.Global_DialogCancelText].Value);
        parameters.Add("SubmitText", _localizer[LK.Global_DialogSubmitText].Value);
        parameters.Add("Color", Color.Primary);

But it doesn't seem to find the values I need. Could you help me?
Thanks,
Dennis

Yes. Thanks I found it.
1 small more question. I'm trying to add a select into a form. The data the select needs comes from the database.
In your examples I can only find examples how a select would work with an Enum like:
meta.Property(m => m.Gender)
.WithDescription("This changes the Variant if Age is at least 18 and is enabled if Age is more than 1")
.AsReadOnlyIf(m => m.Age <<> 1)
.WithAttributesIf(model => model.Age >= 18, new Dictionary<string, object>
{
{nameof(MudSelect.Variant), Variant.Filled}
});
How can you fill a MudSelect with MudSelectItems?
Kind regards,
Dennis

You can configure your own component or delegate the items in an async manner.
What i've done for the same problem.
Look in this case. My model is OrganDto and data comes from Backend. I registered a global default for OrganDto with my component OrganSelect
RenderDataDefaults.RegisterDefault<OrganDto, OrganSelect>(s => s.Value);

And the component itself is very very simple and small. I just derive from my "MudExChipSelect"
@using Symvopath.Application.Common.Models
@using System.Threading
@inherits MudExChipSelect<Symvopath.Application.Common.Models.OrganDto>

@Inherited()

@code {
    public override string HelperText { get; set; } = "Select Organ";
    protected RenderFragment Inherited() => builder => base.BuildRenderTree(builder);

    protected override Task<IList<OrganDto>> GetAvailableItemsAsync(CancellationToken cancellation = default)
        => _api.Organs_GetAllAsync(null, cancellation);

    protected override void OnInitialized()
    {
        ViewMode = ViewMode.NoChips;
        MultiSelect = false;
        base.OnInitialized();
    }

}

Result then looks like this

Hi,
Thanks. That helped a lot to get into the correct direction.
I'm able to get data in a dropdown now. The only thing is, it takes the class name full path instead of a value

Selected data in your TranslationDto should be TranslationCategoryDto then.
And for representing the Name you can override ItemNameRender(T item) in your CategorySelect control, or override ToString()in your TranslationCategoryDto
public override string ItemNameRender(TranslationCategoryDto item) => item?.Name;

And one more info.  RenderDataDefaults.RegisterDefault should only be done once for one type. Because this extends the default behavior for a type independent of its containing model.
That means I would call it once on a static initialization instead of in ConfigureMeta  I for example have done it as Extension before registering MudExtensions in general
internal static class RenderDataManager
{
    public static IServiceCollection AddMudExWithExtendedDefaults(this IServiceCollection services)
    {
        RegisterDefaults();
        return services.AddMudExtensions();
    }

    private static void RegisterDefaults()
    {
        // Custom Domain
        RenderDataDefaults.RegisterDefault<OrganDto, OrganSelect>(s => s.Value);
        RenderDataDefaults.RegisterDefault<ICollection<SpecializationDto>, IEnumerable<SpecializationDto>, SpecializationsSelect>(s => s.Selected);
        RenderDataDefaults.RegisterDefault<IEnumerable<SpecializationDto>, SpecializationsSelect>(s => s.Selected);
        RenderDataDefaults.RegisterDefault<IEnumerable<UploadRequest>, UploadRequestEdit>(edit => edit.UploadRequests);
        RenderDataDefaults.RegisterDefault<UploadRequest[], IList<UploadRequest>, UploadRequestEdit>(edit => edit.UploadRequests, requests => requests?.ToList() ?? new List<UploadRequest>(), requests => requests?.ToArray() ?? Array.Empty<UploadRequest>());
        RenderDataDefaults.RegisterDefault<IList<UploadRequest>, UploadRequestEdit>(edit => edit.UploadRequests);
    }
}

if you use  RenderDataDefaults.RegisterDefault the registered types are rendered on the configured way independent of the model. That means if you have multiple classes with this type as property it dont need to be configured seperatly.

class TranslationDto{
  ...
  public TranslationCategoryDto Translation {get; set}
}

class SomeModel{
  ...
  public TranslationCategoryDto Translation {get; set}
}

That means it make sense to use if have a property of type TranslationCategoryDto in more classes.
Hope you understand what I mean. Is hard to describe :-) ..
However otherwise you can also use in ConfigureMeta but then
    public Task ConfigureAsync(ObjectEditMeta<TranslationDto> meta)
    {
        meta.Property(m => m.TranslationCategory)
            .RenderWith<CategorySelect, TranslationCategoryDto>(c => c.Id);
    }

Hope this helps. Otherwise just contact me :-)

Hi,
First, thanks for all your help.
I managed to get the list in the select:

One more issue left now is that the selected item  still points to the class name.

I'm already crawling through the component, but can't really find how to override it.
If you have 1 more suggestion I would be really happy :)

Im not sure if I understand correctly. But the component is the same?  Looks like that on the 2. image its maybe not the CategorySelect.
If I override the ItemNameRender in my OrganSelect like this
...
...
...
public override string ItemNameRender(OrganDto item) => item.Name;

It looks like this

Maybe try to override ToString in your TranslationCategoryDto class

The ToString override worked!
Everything fine now with the dropdown thank you.
Still struggling with the Texts

I would like to customize the texts dialog that opens as well. Could you give property some extra configuration in how it should be rendered like:

I general you should put your configurations as classes somewhere. Then you can make something like this to have for example base properties configured the same way. Like Id readonly for example or whatever
public class IcdDtoMetaConfiguration: BaseDtoMetaConfiguration<IcdDto, int>
{
    public override Task ConfigureAsync(ObjectEditMeta<IcdDto> meta)
    {
        meta.Property(dto => dto.Name).WrapInMudItem(i => i.md = 12);
        meta.Property(dto => dto.IcdVersion).Ignore();
        return base.ConfigureAsync(meta);
    }
}

public abstract class BaseDtoMetaConfiguration<T, TId> : IObjectMetaConfiguration<T> where T : IDtoBase<TId>
{
    public virtual Task ConfigureAsync(ObjectEditMeta<T> meta)
    {
        meta.Property(x => x.Id)
            .WithAdditionalAttributes(true,new KeyValuePair<string, object>(nameof(MudBaseInput<TId>.Disabled), true))
            .WithOrder(0);
        if (meta.Value.IsNew)
            meta.Property(x => x.Id).Ignore();
        meta.Property(x => x.IsNew).Ignore();
        meta.WrapEachInMudItem(i =>
        {
            i.xs = 12;
            i.md = 6;
        });
        return Task.CompletedTask;
    }
}

And sure seperate configuration behaviours can also shared static if you want.
For example I have some fiields where I need to have a small HtmlEdit. and want so have always the same config for them but because of type is only string I need to call configure for different properties.
In this case I use SfRichTextEditor from synfusion (bad decision by the way .. 🙈  )  But however create a static method like this
    internal static Action<SfRichTextEditor> RichTextOptions()
    {
        return e =>
        {
            e.EnableResize = true;
            e.Height = "250px";
        };
    }

And then you can use them in all property configs you need to.
        meta.Properties(m => m.StringProperty1, m => m.StringProperty2, m => m.StringProperty3, m => m.StringProperty4)
            .WithGroup("My group").WithOrder(30).RenderWith(e => e.Value, RichTextOptions()).WithSeparateLabelComponent().WithSeparateValidationComponent();

Hope this helps.
One small Information.
If you create a config for a class in general like here with UserModel
public class UserModelMetaConfiguration: IObjectMetaConfiguration<UserModel>
{
    public Task ConfigureAsync(ObjectEditMeta<UserModel> meta)
    {
        meta.Properties(m => m.FirstName, m => m.LastName)
            .WrapInMudItem(mudItem => mudItem.xs = 6);
        meta.Property(m => m.Password)
            .RenderWith<MudTextField<string>, string>(field => field.Value, field =>
            {
                field.InputType = InputType.Password;
            })
            .WrapInMudItem(mudItem => mudItem.xs = 12);
        return Task.CompletedTask;
    }
}

Then this config works also for the generated dialogs if you edit a UserList for example. What currently is not working. If you have the UserModel as property in another class like this
class SomeClass {
  public string AnotherProperty {get; set;}
  public UserModel User {get; set;}
 public int Something {get; set;}
}

Then the IObjectMetaConfiguration for the UserModel UserModelMetaConfiguration: IObjectMetaConfiguration<UserModel>  doesn't work automatically when you edit an instance of SomeClass this is something I want to change for one of the next versions but currently you need then to create another IObjectMetaConfiguration for SomeClass and configure needed properties the same way or create a seperate component for Edit UserModel that than also be can use a MudExObjectEditForm. Sorry for that I know that is currently not great and I want to change this somehow

Thank you.
That helped a lot. I managed to get the Translation as well as the TranslationText working properly.
Is there a way to override the + Add text on a list and the Dialog buttons and title that are opened by it?

Yes. But currently not as simple Parameter looks I forgot to add Params for this. But all labels will be localized if possible. That means if you have localization enabled you can have a key for Add and for Edit {0}

Did this help? I want to close the issue if everything is fine now

Hi Florian,
Sorry was busy with other stuff.
This is solved, thank you.
Still having some issues though. Mainly with a markdown component that loads the text before the render of the component.
You need to click in the text area to see the text. Was trying to figure out if you could do something like load data after render.

Markdown is not a control created by me. But I have had similar issues with PrettyCode because it only loads the text on initialization what is wrong.  I solved this with a workaround. I used the DynamicComponent  and bind Parameters as Dictionary and the rendertype and after change ich change type and params as required.
Like this
<DynamicComponent Type="@RenderType" Parameters="@RenderParameters"/>

    private Type RenderType = typeof(PrettyCode);
    private Dictionary<string, object> RenderParameters;

   ....

    private string File
    {
        get => _file;
        set
        {
            _file= value;
            RenderType = typeof(MudAlert);
            RenderParameters = new Dictionary<string, object>
            {
                { "Text", "Loading..." },
                { "Severity", Severity.Info }
            };
            StateHasChanged();

            RenderType = typeof(PrettyCode);
            RenderParameters = new Dictionary<string, object>
            {
                { "Title", File},
                { "CodeFile", File}
            };
            StateHasChanged();
        }
    }

Is ugly but worked for me. Maybe something like this can help you as well.


intermittently experiencing on-peek ddos

Describe the bug, optionally with screenshots
I am still getting hit by the on-peek ddos/spam issue. It was fixed for a few days, but now is coming back with a vengeance. If there is a manual fix to this (such as moving these groups off my main planet or other similar options, I am not against it, but of course a proper fix would be preferable.
Seems like it is related to https://github.com/tloncorp/landscape-apps/issues/1442 but was not fixed by https://github.com/urbit/urbit/pull/6150...
To Reproduce
Steps to reproduce the behavior:

Be on the network for a while, host a variety of groups and group dms directly on your planet.
have Tlon do dope overhaul to Groups application so that it is way sicker
???
See tons of dojo on-peek spam that makes the performance of your ship so bad as to be unusable.

%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.9.17..06.47.08
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.7.28..04.52.15
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.4.19..20.03.27
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.5.04..04.51.32
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.4.14..06.25.11
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.11.30..17.26.51
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.9.14..18.14.55
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.8.10..04.56.24
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.8.26..22.31.28
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.10.24..18.23.07
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/self
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/human-scale-business
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.7.26..23.01.50
%group-store: on-peek on path /x/groups/ship/~sarlev-sarsen/~2022.10.18..21.18.58

Printing at ~20 lines per second.
Expected behavior
No dojo spam, fast and snappy performance that occurs when this is not hitting my dojo.
Additional context:

Ship type: planet
Instance type: self-hosted, Vere v1.13
OS/browser: experiencing on Safari on iOS, Brave on MacOS, and within Realm.

@thelifeandtimes Can you confirm your base hashes via +vats for %landscape and %groups?

> +vat %landscape
%landscape
  /sys/kelvin:      [%zuse 417]
  base hash:        0vp.llhuf.pg57r.5piau.ea5hr.pq5ct.b79c0.3q6hl.g0n6o.n5jlu.jq6nu
  %cz hash:         0vp.llhuf.pg57r.5piau.ea5hr.pq5ct.b79c0.3q6hl.g0n6o.n5jlu.jq6nu
  app status:       running
  force on:         ~
  force off:        ~
  publishing ship:  [~ ~lander-dister-dozzod-dozzod]
  updates:          remote
  source ship:      ~lander-dister-dozzod-dozzod
  source desk:      %landscape
  source aeon:      33
  kids desk:        ~
  pending updates:  ~
::
> +vat %base
%base
  /sys/kelvin:      [%zuse 417]
  base hash:        0v1r.0fp5a.98elp.votc5.3ne9d.aei0r.0k1pm.dr69j.iukr2.067p8.2ucn6
  %cz hash:         0v1r.0fp5a.98elp.votc5.3ne9d.aei0r.0k1pm.dr69j.iukr2.067p8.2ucn6
  app status:       running
  force on:         ~[[%dbug %.y]]
  force off:        ~
  publishing ship:  ~
  updates:          remote
  source ship:      ~sartyr
  source desk:      %kids
  source aeon:      14
  kids desk:        %kids
  pending updates:  ~
::

@jamesacklin this seems to have died down; its it because other ships have given up trying to reach me, or has a fix come through for this?

 I was able to |hi your ship on-network.
@arthyn Is ~4 days expected for the OTA to sneak its way through the loop?

my desk hashes remain the same as what was listed above, just ftr.

Got it, thanks. I believe this was Groups-side; we released qhhae late Friday.

Groups +vat output:
> +vat %groups
%groups
  /sys/kelvin:      [%zuse 417]
  base hash:        0v12.2omn2.q86go.5dtu8.229kp.fl360.c15kg.vs41k.11e15.3lfec.3shua
  %cz hash:         0v12.2omn2.q86go.5dtu8.229kp.fl360.c15kg.vs41k.11e15.3lfec.3shua
  app status:       running
  force on:         ~
  force off:        ~
  publishing ship:  ~
  updates:          remote
  source ship:      ~sogryp-dister-dozzod-dozzod
  source desk:      %groups
  source aeon:      5
  kids desk:        ~
  pending updates:  ~
::

The person spamming you likely needed to get the upgrade first so if their update was delayed that could have been it.

got it. is there a way to figure out who the spam is coming from? in the future would be helpful for that info to be included in dojo prints.

So the library that prints all this stuff is called verb and as is currently doesn't show which patps things are coming from. It should though. It comes from the kernel so we should just have them change it.

yup, understood. @belisarius222 perhaps that might be a worthy grant for a new contributor?


feat: Make the example work on Linux

This makes it easier for Linux users to play with it.
It was missing the platform boilerplate.
Pre-launch Checklist

[ ] I have updated CHANGELOG.md with my changes
[x] I have run "dart format ." on the project
[ ] I have added/updated relevant documentation

I've removed the example/linux/flutter/ephemeral directory, as that's generated automatically by the build.
Also solves the nagging about it being in .gitignore


Fix: don't use a blob URL for unknown MIME types

Short description
Resolves #3380
As per this comment, if an audio file is fetched from a server that doesn't send the correct MIME type, the downloaded blob might fail to play in an audio element.
Implementation details
I've added a check when setting an audio src to a blob URL: if the MIME type is not supported, it will fallback to the original audio URL.

@719media could you test this branch against the problematic server?

I have confirmed that the https://blob-type.wavesurfer-js.pages.dev/ page works for loading "bad mime-type" file examples as discussed in the linked issue. Vs current master where it continues to not work (no waveform/nothing plays)

Awesome, thank you! 🙏

@katspaugh Is it possible to add a config for canPlayType check? It is tough to upgrade wavesurfer version in my system because of the server side.

You mean to optionally skip this check?

You mean to optionally skip this check?

Yes. we can choose whether to use this check.

I would suggest an alternative to that: specify a MIME type in the options. E.g.
WaveSurfer.create({
  container: '#container',
  url: 'music.mp3',
  mimeType: 'audio/mpeg',
})

It would then use this MIME type when fetching a blob:
fetch('url-to-your-data')
  .then(response => response.blob()) // Get the blob from the response
  .then(blob => {
    if (options.mimeType) {
      const newType = options.mimeType
      const dataBlob = new Blob([blob], { type: newType }); // Override the MIME type
      return dataBlob;
    }
    return blob
  })

This seems to work for me, and this design is consistent with the record plugin(mediaRecorder.mimeType). let me have a try. Thanks for your great suggestion！


feat/MYNW-154 Added Explore page

Figma design https://www.figma.com/file/qVgRY71P3XjttByfO6prmG/Explore-A?node-id=1%3A175
Added:

Explore page /explore
NavBar link to explore
Light sidebar banner on the wallet page

Make cards fill all the space available?

There is space on the left and right corners, according to the design cards should be aligned with header block?

There is space on the left and right corners, according to the design cards should be aligned with header block?

Don't get it what you talking about

Uploading Screen Recording 2022-08-31 at 14.49.31.mov…
Layout bug

Uploading Screen Recording 2022-08-31 at 14.49.31.mov…
Layout bug

Broken padding on banner slides

Dimension: iPhone SE
no padding before footer

Need to add x2 picture. Banner is blurry on retina


Add colored leaf as icon to the leaf detail panel

@rlskoeser @jhimpele  take a look at a few options I'm proposing, I'm struggling with alignment, your feedback to my question below might help me – I tried a few different leaf shapes and I like the thin one I'm showing most.
I think from a ux perspective it makes most sense when the leaf is placed by the branch or on top of the panel rather than placing it by the title. If you think otherwise please justify it to help me.

@gissoo I like putting the leaf with the branch label best — both semantically (connection to other leaves in the same branch) and for best use of vertical space.  I like it best with the smaller leaf on the left (second option in your third column), but I don't feel strongly about left or right.

Left of branch title.

@rlskoeser @jhimpele thanks for your responses.

We discussed in person and all agreed on using the version with the narrower leaf placed on the left of the branch label.
This is what the mobile version would look like – on desktop the leaf width is 20px and on mobile I've made it 14px, because it was too large.

what do you think?

Looks great!


runme: v3.8.3 → v3.10.2

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

commit message and PR title should be
runme:  3.8.3 → 3.10.2

@rawkode can you include link to release notes and or diff in commit and PR description
this is per
https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#commit-conventions
you can see other examples
git log | grep -i diff

@kirillrdy fixed
The project has no changelog, so I've used a git comparison.


Relax indexmap dependency

Halloo,
Noticed some version resolve errors when trying to use the indexmap features.
❯ cargo add pyo3 --features indexmap
❯ cargo add serde_yaml
    Updating crates.io index
      Adding serde_yaml v0.9.16 to dependencies.
error: failed to select a version for `indexmap`.
    ... required by package `pyo3 v0.17.3`
    ... which satisfies dependency `pyo3 = "^0.17.3"` of package `pyo3-indexmap v0.1.0 (/home/dn/repos/pyo3-indexmap)`
versions that meet the requirements `>=1.6, <1.8` are: 1.7.0, 1.6.2, 1.6.1, 1.6.0

all possible versions conflict with previously selected packages.

  previously selected package `indexmap v1.9.0`
    ... which satisfies dependency `indexmap = "^1.9"` of package `serde_yaml v0.9.16`
    ... which satisfies dependency `serde_yaml = "^0.9.16"` of package `pyo3-indexmap v0.1.0 (/home/dn/repos/pyo3-indexmap)`

failed to select a version for `indexmap` which could resolve this conflict

Couldn't find a specific reason for this limitation so I tried upgrading the dependency and running the tests.
Ran the tests locally with indexmap==v1.9.2:
❯ cargo test --features indexmap conversions::indexmap
...
running 4 tests
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_insertion_order_round_trip ... ok
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_to_python ... ok
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_into_python ... ok
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_into_dict ... ok

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

(Tried running cargo xtask ci but it failed on some warnings in the generated FFI code)
This relaxes the restrictions on indexmap so that the latest version is also supported,
hope that's okay.
Cheers,
Gilad

As the CI indicates, this does indeed need a news fragment describing the change, c.f. https://github.com/PyO3/pyo3/blob/main/Contributing.md#documenting-changes.

bors r+


[Feature]: Can it load the model locally? 可以本地加载本地模型吗？

Is there an existing issue for this?

[X] I have searched the existing issues.

Is your feature request related to a problem? Please describe.
Our server has issues accessing the Hugging Face website. Therefore, is it possible to download the model to the local machine and then continue working by adjusting the local loading of the model using Towhee? Is so, how? Thanks. 我们的服务器访问huggingface网站有问题。所以，是否可以下载模型到本地，然后通过调整Towhee在本地加载模型的形式来继续工作吗? 如果可以的话，怎么操作呢？谢谢！
Describe the solution you'd like.
No response
Describe an alternate solution.
No response
Anything else? (Additional Context)
No response

https://towhee.io/sentence-embedding/transformers

Just pass the local Hugging Face model directory

https://towhee.io/sentence-embedding/transformers  Just pass the local Hugging Face model directory

Hello, There is a question may related this issue , how can I config this model loaded from my folder (not from remote url)

https://towhee.io/sentence-embedding/transformers  Just pass the local Hugging Face model directory

Hello, There is a question may related this issue , how can I config this model loaded from my folder (not from remote url)

Pass weights by checkpoint_path

https://towhee.io/sentence-embedding/transformers  Just pass the local Hugging Face model directory

Hello, There is a question may related this issue , how can I config this model loaded from my folder (not from remote url)

Pass weights by checkpoint_path

i use this, but got an error.
import sys
from towhee import pipe, ops
import json

image_path = sys.argv[1]

img_pipe = (
    pipe.input('url')
    .map('url', 'img', ops.image_decode.cv2_rgb())
    .map('img', 'vec', ops.image_text_embedding.clip(
        model_name='clip_vit_large_patch14_336',
        modality='image',
        checkpoint_path='~/local/huggingface/hub/models--openai--clip-vit-large-patch14-336/'))
    .output('img', 'vec')
)

That you can see the error logs:
AttributeError: type object 'CLIPModel' has no attribute 'from_config'

I find yours clip.py, and I'm not sure is my fault or yours.
def create_model(model_name, modality, checkpoint_path, device):
    if checkpoint_path is None:
        hf_clip_model = CLIPModel.from_pretrained(model_name)
    else:
        hf_clip_config = CLIPModel.from_config(model_name)
        hf_clip_model = CLIPModel.from_pretrained(
            checkpoint_path, config=hf_clip_config)
    hf_clip_model.to(device)
    hf_clip_model.eval()

    if modality == 'image':
        clip = CLIPModelVision(hf_clip_model)
    elif modality == 'text':
        clip = CLIPModelText(hf_clip_model)
    else:
        raise ValueError("modality[{}] not implemented.".format(modality))
    return clip

@wxywb

@wxywb

so, what's next?

@HarwordLiu ,I've updated the operator, please remove your cached operator and try it again.

@HarwordLiu ,I've updated the operator, please remove your cached operator and try it again.

i saw u remove the config, before u update, i try like u do in my local, and i got the same error.
i guess maybe my loal model cache files root path is wrong?
let me show u my local model cache files.
my local path is direct here:

@HarwordLiu ,It seems you want use your cached weights, in such case, you can use clip directly. the path is useful when you have your  saved customized clip model.
img_pipe = (
    pipe.input('url')
    .map('url', 'img', ops.image_decode.cv2_rgb())
    .map('img', 'vec', ops.image_text_embedding.clip(
        model_name='clip_vit_large_patch14_336',
        modality='image'))
    .output('img', 'vec')
)

save the model
from PIL import Image
from transformers import CLIPProcessor,CLIPModel

model = CLIPModel.from_pretrained("openai/clip-vit-large-patch14-336")
model.save_pretrained('models--openai--clip-vit-large-patch14-336')

load from it.
img_pipe = (
    pipe.input('url')
    .map('url', 'img', ops.image_decode.cv2_rgb())
    .map('img', 'vec', ops.image_text_embedding.clip(
        model_name='clip_vit_large_patch14_336',
        checkpoint_path='./models--openai--clip-vit-large-patch14-336',
        modality='image'))
    .output('img', 'vec')
)

@HarwordLiu ,It seems you want use your cached weights, in such case, you can use clip directly. the path is useful when you have your saved customized clip model.
img_pipe = (
    pipe.input('url')
    .map('url', 'img', ops.image_decode.cv2_rgb())
    .map('img', 'vec', ops.image_text_embedding.clip(
        model_name='clip_vit_large_patch14_336',
        modality='image'))
    .output('img', 'vec')
)

save the model
from PIL import Image
from transformers import CLIPProcessor,CLIPModel

model = CLIPModel.from_pretrained("openai/clip-vit-large-patch14-336")
model.save_pretrained('models--openai--clip-vit-large-patch14-336')

load from it.
img_pipe = (
    pipe.input('url')
    .map('url', 'img', ops.image_decode.cv2_rgb())
    .map('img', 'vec', ops.image_text_embedding.clip(
        model_name='clip_vit_large_patch14_336',
        checkpoint_path='./models--openai--clip-vit-large-patch14-336',
        modality='image'))
    .output('img', 'vec')
)

Thanks for all your help.
and it's helpful, it's work now.

@wxywb  Why still download the file from 'huggingface' after successfully loading the model?
And this is my test log:

I think if i use local model,  should not download any files from 'huggingface' any more.

@HarwordLiu ,this is because of tokenizer(that's why we need model_name). Usually saved model folder would not contain tokenizer, so we provide model_name to specify tokenizer explicitly. If you have a folder contains tokenizer(something like vocab.json), you can fill model_name with that path and let tokenizer and processor loaded from that path.

@HarwordLiu ,this is because of tokenizer(that's why we need model_name). Usually saved model folder would not contain tokenizer, so we provide model_name to specify tokenizer explicitly. If you have a folder contains tokenizer(something like vocab.json), you can fill model_name with that path and let tokenizer and processor loaded from that path.

Amazing, i can't believe it, althought it's worked.

Fill model_name by file path, it's look so hack.

This hack is beyond the initial design. Since huggingface transformer will connect to server although it cached the tokenizer.

This hack is beyond the initial design. Since huggingface transformer will connect to server although it cached the tokenizer.

That’s it, no wonder I replaced the cached file for server (~/.cache) but still connect to huggingface to download.
Think you for all.

https://towhee.io/sentence-embedding/transformers  Just pass the local Hugging Face model directory

Hello, There is a question may related this issue , how can I config this model loaded from my folder (not from remote url)

.map('img', 'embedding', ops.image_embedding.timm(model_name='resnet50'))
Can not access huggingface, how to solve the problem？

@ycqu , network issue is beyond the framework's capability.


side bar iteration issue

should be posts.length instead of 5.
for (var i = 0; i < posts.length; i++)
and one statement needs terminator.
if (!$parent) {
return;
};

fixed by https://github.com/wbkd/ghost-wbkd/pull/2


socketClient.js returning wrong part of message payload

src/lib/socketClient.js line 38: const message = JSON.parse(msg.data);
returns the whole message payload, not the data part of the payload. So when you run it, on each message received you get an “Unprocessed method” error.
It should be something like:
const payload = JSON.parse(msg.data);
const message = payload.data;
I also suggest to change the error message text on line 48 to “Unknown method” to distinguish it from the message on line 45.
Best,
Peter

Thanks for the response. We will figure out a way to handle it gracefully, thanks.

Cool, thanks!
On Mon, 1 Nov 2021 at 10:51, ishuen @.***> wrote:

Thanks for the response. We will figure out a way to handle it gracefully,
thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/binance/binance-websocket-examples/issues/25#issuecomment-956085994,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFM6R5JRQMHQEQJZULBZPMLUJZPKHANCNFSM5GVK26EQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--
Peter Vegh


Remove redundant check

This was found with Cppcheck. C language uses "short circuiting" so no need for the second cipher check - just makes the reader think more than needed.

A slightly different version of this which addresses the same issue has been merged. Closing.


Backwards compatibility / migration expectations should be made clear

To this point, we have largely provided migrations as a convenience to users without any strong backwards compatibility guarantees between versions and our general guiding rule has been that if you update from Machine version to Machine version, there shouldn't be issues, but if you skip versions there may be.  If there are problems it isn't always a huge deal as most users are just using virtualbox or other local providers and just have to re-create their VMs, but it is annoying and potentially catastrophic in the case of production infrastructure.
There is a framework to migrate configs today but it is hairy and I think we need to draw a line in the sand somewhere, which probably will entail cutting a 1.0 release at some point in the future that has strong backwards compatibility guarantees.  I think we need to work on deciding where and what that should entail.

cc @docker/machine-maintainers


Update release versions for all readme and build files.

Created https://github.com/census-instrumentation/opencensus-java/issues/1009 to update some remaining files (don't have bazel installed on my laptop).

Codecov Report

Merging #1010 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1010   +/-   ##
=========================================
  Coverage     81.81%   81.81%
  Complexity     1139     1139
=========================================
  Files           181      181
  Lines          5319     5319
  Branches        498      498
=========================================
  Hits           4352     4352
  Misses          838      838
  Partials        129      129

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 8df5b60...a06583f. Read the comment docs.