Error building libwebsockets with OpenSSL via FetchContent

Hi,
I am trying to build libwebsockets with OpenSSL using FetchContent in CMake.
Here is the relevant part of my CMakeLists.txt:
set(BUILD_OPENSSL ON)
set(OPENSSL_BUILD_VERSION 3.3.2)

FetchContent_Declare(
    openssl-cmake
    URL https://github.com/jimmy-park/openssl-cmake/archive/main.tar.gz
)
FetchContent_MakeAvailable(openssl-cmake)

set(LWS_WITH_SSL ON CACHE BOOL "" FORCE)

FetchContent_Declare(
  libwebsockets
  GIT_REPOSITORY https://github.com/warmcat/libwebsockets.git
  GIT_TAG v4.3-stable
  GIT_SHALLOW TRUE
  GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(libwebsockets)

From the logs, I can see that libwebsockets found the openssl-cmake headers and library locations:
[cmake] Git commit hash: 5102a5c
[cmake] Compiling with SSL support
[cmake] OpenSSL include dir: .../MYPROJECTDIR/build/_deps/openssl-source-src/include;.../MYPROJECTDIR/build/_deps/openssl-source-build/include
[cmake] OpenSSL libraries: .../MYPROJECTDIR/build/_deps/openssl-source-build/libcrypto.lib;.../MYPROJECTDIR/build/_deps/openssl-source-build/libssl.lib

However, CMake then throws the following error:
[cmake] CMake Error in build/_deps/libwebsockets-src/lib/CMakeLists.txt:
[cmake]   Target "websockets_shared" INTERFACE_INCLUDE_DIRECTORIES property contains
[cmake]   path:
[cmake]
[cmake]     .../MYPROJECTDIR/build/_deps/openssl-source-src/include"
[cmake]
[cmake]   which is prefixed in the build directory.

How can i fix it?

I think libwebsockets has a problem with target_include_directories() when exporting CMake targets.
Could you build with set(LWS_WITH_EXPORT_LWSTARGETS OFF)?

And you should add add_dependencies(websockets OpenSSL::SSL) after FetchContent_MakeAvailable(libwebsockets) to correct the build order.

Thank you! That helped to get rid of that error.
However, now I'm facing issues during the build process. I'm not sure which library is causing the problem, but when I try to build my application with openssl-cmake, I get the following error:
[build] .../build/_deps/libwebsockets-src/include/libwebsockets/lws-genhash.h:85:18: error: field has incomplete type 'HMAC_CTX' (aka 'struct hmac_ctx_st')
[build]         HMAC_CTX ctx;
[build]                  ^
[build] /Users/orlovmaxim/Documents/Games/BattleWater/build/_deps/openssl-source-src/include/openssl/types.h:135:16: note: forward declaration of 'struct hmac_ctx_st'
[build] typedef struct hmac_ctx_st HMAC_CTX;
[build]

But if I try to build with the OpenSSL installed on my system via Homebrew, the compilation succeeds.
I tried googling it and found this page: https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.cmake.md, specifically, the second section.
Does this mean that openssl-cmake is failing libwebsocket`s checks for openssl version?

Sorry, I accidentally closed it.

I found that libwebsockets requires the pre-built OpenSSL library in its CMake configuration.
In this case, it needs to build OpenSSL before the libwebsockets configuration.

So Do i need to build it manually and install in some project directory before using project's cmake?

Yes... I can't think of a better way right now.

Thanks for help!


Why babel-* modules are dependencies instead of devDependencies in package.json?

If a user is using a different version of babel in their package.json, this may cause error

There are two different types of dependencies that Radium supports:

git based dependencies. In this case, we don't commit dist/ to source, so it needs to be built from scratch, which means babel-* dependencies. A git dependency uses https://github.com/FormidableLabs/radium/blob/master/package.json which you're looking at.
npm based dependencies. In this case, we publish dist/ to the npm registry so don't need to rebuild it. Because in this case we don't need the babel- deps, we rewrite package.json as to not included them on publishing (not committed to source) via a bespoke script. (Side note -- we'll be upgrading this soon to use the https://github.com/FormidableLabs/publishr tool which is built explicitly to support this use case). If you look at<EMAIL_ADDRESS>you'll see a much more terse dependencies (and we have a ticket for removing rimraf from prod deps):

  "dependencies": {
    "array-find": "^1.0.0",
    "exenv": "^1.2.1",
    "inline-style-prefixer": "^2.0.5",
    "prop-types": "^15.5.8",
    "rimraf": "^2.6.1"
  },

Hope that clears it up!

Thanks for the details explanation!


Support for Receive-RSJob -Wait -AutoRemoveJob

Do you want to request a feature or report a bug?
Feature Request: Support for -Wait and -AutoRemoveJob in Receive-RSJob (as done in the built-in Receive-Job).
What is the current behavior?
Without this implemented, one must separate processing and cleanup, like so
1..10 | Start-RSJob {
    "I am $($_)"
} | Wait-RSJob | Receive-RSJob

Get-RSJob | Remove-RSJob -Force

If it were implemented, it would allow for single-pipe processing and (I presume) lessen the memory load when a large number of objects are piped in.
1..10 | Start-RSJob {
    "I am $($_)"
} | Wait-RSJob | Receive-RSJob -AutoRemoveJob

For the project I am currently working on, I created a function to emulate this behavior (and -Wait, as in the builtin Receive-Job), but I'm sure it would be faster if implemented in PoshRSJob.
function Receive-CompletedJobs {
  param([switch]$AutoRemoveJob, [switch]$Wait, [int]$WhileGT = 0, [uint32]$SleepMS = 500)

  do
  {
    $jobs = @(Get-RSJob)
    $done_jobs = @($jobs | where {$_.Completed})

    foreach ($job in $done_jobs)
    {
      $job | Receive-RSJob -ea Continue -WarningAction Continue -InformationAction Continue
      if ($AutoRemoveJob) { $job | Remove-RSJob -Force }
    }

    if (-not $Wait) {
      break
    }
    elseif ($jobs.Count - $done_jobs.Count -gt $WhileGT) {
      sleep -Milliseconds $SleepMS
    }
    else {
      break
    }
  } while ($Wait)
}

Would also appreciate this. :)

I will PR this if @proxb is still accepting.


Support IncorrectOriginalSpelling in DwC Checklist importer

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (256f9e3) 85.81% compared to head (c8d6785) 59.94%.

:exclamation: Current head c8d6785 differs from pull request most recent head 5d0660b. Consider uploading reports for the commit 5d0660b to get more accurate results

Files
Patch %
Lines

app/models/import_dataset/darwin_core/checklist.rb
0.00%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@               Coverage Diff                @@
##           development    #3647       +/-   ##
================================================
- Coverage        85.81%   59.94%   -25.88%
================================================
  Files             2020     1519      -501
  Lines            74283    46165    -28118
================================================
- Hits             63749    27675    -36074
- Misses           10534    18490     +7956

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Varlength numeric types

If you think it'd be a good idea, I'd like to add a couple types to the language. Notably: variable-length integers and fractions.
Your thoughts on the matter?

Ah yeah that would be cool! It would be great if the numeric types were more flexible.

Question: do you want them to be explicit types, or just triggered on overflow? Explicit types would be faster, triggered automatically would be easier to use.

Ooo that's a tough call. I think I'm leaning towards ease of use on this one.


Set working directory

Thanks for a great package!
My situation is this. We have a monorepo at work with several Python projects in it. When I run python-pytest-file, it chooses the repo root as the working directory, from where it can't find the module being tested.
In  my case the directory I want to run pytest from is somewhere in the middle between the root and the test file.
Is it possible to somehow set the working directory?
And if not, it's a feature request :)

i understand the issue and making it work in such situations would indeed be usfeul.
that said, i think it would be best if you can somehow convince projectile what the ‘root’ of your project it is, since emacs-python-pytest uses projectile for quite a few things, one of which is finding the right directory to run from. (another example is finding matching test files and so on.)

https://docs.projectile.mx/projectile/projects.html
this may be useful. perhaps it makes sense to search for pytest.ini or something like that? it wouldn't be water tight since pytest options can also be set from different config files. 🤔

Thanks for the answer!
I started down a little rabbit hole to see if I could temporarily change the projectile-project-root variable. I first tried adding it in .dir-locals.el but that messes things up with Projectile itself. Then I saw that you have the option to run hooks before and after the tests are run, so my idea was to read .dir-locals.el for some flag, and before the test run the projectile-project-root to the package directory, and then reset it afterwards.
But after inspecting the source code, I found that these hooks are run after the pytest buffer is created, so the method won't work.
So it looks like maybe one has to changes in pytest.el itself, maybe.

Hm! I got an idea on how to get this to work: use the pre test hook to look in .dir-locals.el for some custom variable, then temporarily change the pytest command to PYTHONPATH=path/to/my/package pytest.
I'll test it later today.

Update:
I think I solved it :)
I added the following hook:
  (add-hook 'python-mode-hook
            (lambda ()
              (when-let ((r (locate-dominating-file default-directory ".pyroot")))
                       (setq python-pytest-executable (concat "PYTHONPATH=" r " python -m pytest"))
                       )))

Then if I have a .pyroot file in the root of the project, the project is added to PYTHONPATH, and pytest finds the modules.

awesome, that sounds like a reasonable  solution! it won't even clash with projectile's behaviour that way.

Do you think it would be a good idea to add this snippet with an explanation of the problem it solves to the readme?

@pkryger Personally I really like it when Readmes contain solutions to common problems :) But if the issues list is labelled well, that could also help.

pull requests to improve the readme are always welcome 😉


Setup codeclimate and DRY up code

This will setup the codeclimate configuration and also increase this cookbook's score a bit. 😉

LGTM 👍


Add X-RateLimit-Remaining API

When calling the instagram API, you're limited to 5000 calls per hour per token.
It would be very useful if your class/code had an attribute that stored that info so I could keep track of where my users are in their current hour's limit.
Is there a call to be made that will give the current limit without expending 1 call? Doesn't seem like it.

Or maybe you could just add a counter separately inside the code which logs every api call.

A counter inside the code doesn't make sense. How does the code know if you've made other calls using a given token and thus used more of your 5000 hourly limit. Really, the only option is to return the authoritative results: Instagram's header.

Well, it does make sense if you are not given any other option.  Anyway if Instagram would provide this via its headers would be much more appreciated.

Instagram DOES provide it via the headers...

Hey,
check out my response here http://stackoverflow.com/questions/27586025/instagram-api-access-rate-limit-information-with-specific-php-class/27761804#27761804 because I resolved the problem with X-Ratelimit-Remaining. No expending calls, it simply works perfectly :) Let me know if you have any issue

@GMusliaj you should submit a pull request ;) I would be interested in this as well.

@robertark done! :)

Thanks :)


Print Double.self instead of a double instance

This fixes test/testcases/lang/swift/tmd_symbol by forcing the metadata for Double to be generated in a more reliable way.

@swift-ci please test

@swift-ci please test

@swift-ci please test

@scallanan , this is not Swift syntax ;)
func generic_print<T>(T t) {

@DougGregor That's the new Objective-Swift++ syntax. You haven't been disclosed on it yet.

@swift-ci please test

@swift-ci please test

I code swift the good

main.swift is still broken because t is undefined in main().  I will fix that.

@swift-ci please test

@swift-ci please test

This continues to baffle me on Linux and I'm told by the LLDB team that this test is no longer important.
I'm going to abandon this pull request.


[Device Registry] Features, Enhancements and Bugs

Features, Enhancements and Bugs
WHAT DOES THIS PR DO?

[x] Creates a new endpoint for getting device measurements

[ ] Ensure that the indexed fields do not store/retrieve duplicate values

[ ] Deal with DB query optimisations.

[x] Updates the paths for all endpoints related to Events

[x] Fix a runtime error with Device Deploy/Recall/Maintain - "sometimes, devices could be deployed successfully before recall"

[x] Introduces caching on the GET Events endpoint.

[x] Adds a new CRUD endpoints for location activities (deploy, maintain and recall).

[ ] For maintenance, if date is null, then use the next maintenance function. Otherwise, use the one provided by the user.

[x] For deployment, the return response including the device details. Should also include the ID of the device.

WHAT JIRA STORY/TASK IS RELATED TO THIS PR?
PLAT-242
WHAT IS THE LINK TO THE PR BRANCH
https://github.com/airqo-platform/AirQo-api/compare/staging...hotfix-event-timestamps
HOW DO I TEST OUT THIS PR?
cd AirQo-api/src/device-registry
npm install
In another shell tab, start your Redis server accordingly (run redis-server for Linux)
In your .env file, momentarily change the REDIS_SERVER to point <IP_ADDRESS>
Remember to undo this change at the end of it all.

For Linux

npm run stage-mac

For Windows

npm run stage-pc
WHICH ENDPOINTS SHOULD BE READY FOR TESTING?:

[x] get Events [GET]: http://localhost:3000/api/v1/devices/events?comp={COMPONENT_NAME}&device={DEVICE_NAME}&tenant={TENANT}

[x] Add Events [POST]: http://localhost:3000/api/v1/devices/events/add?device=aq_100&component=aq_100_s2_pm2_5&tenant=airqo

[x] Add Events in Bulk [POST]: http://localhost:3000/api/v1/devices/events/add/bulk?device=aq_100&component=aq_100_s2_pm2_5&tenant=airqo

[x] Push One Event [POST]: http://localhost:3000/api/v1/devices/events/push/one?tenant=airqo
Use the write Key for any of the test devices: aq_501 or aq_601 while at it.

[x] Push Many Events [POST]: http://localhost:3000/api/v1/devices/events/push?tenant=airqo
Use the write Key for any of the test devices: aq_501 or aq_601 while at it.

[x] Update an activity log [PUT]: http://localhost:3000/api/v1/devices/ts/activity/update?tenant=airqo&id={OBJECT_ID}

[x] Delete an activity log [DELETE]: http://localhost:3000/api/v1/devices/ts/activity/delete?tenant=airqo&id={OBJECT_ID}

[x] List Logs [GET]: http://localhost:3000/api/v1/devices/ts/activity?tenant=airqo&device={DEVICE_ID}

SCREENSHOTS

Update log

Add Events in Bulk

Push One Event

Push Many Events

Add Events

Updated Activity Responses to include Updated Device Details

IS THERE ANY JENKINS CONSOLE LINK FOR CODE COVERAGE AND BUILD INFO?
N/A
ARE THERE ANY RELATED PRs?
N/A

Thanks @lilly-muyama

When a parameter is missing, can we have error messages that correspond to the issue. E.g when the tenant id is missing, the message says unable to find component... This should also be done for when the device name or component name is missing.

Let me review this asap - shall share a new commit asap

It doesn't seem to work for KCCA devices

Yeah, kind of. So it works but it takes long. WHY? We need to apply optimisation techniques like indexing and sharding. This definitely needs to be addressed BEFORE we merge this PR. Thanks. :)

Since this endpoint gets data from the events collection, it is hard to review it conclusively since that table seems to have data for less than 10 devices and very few records, in some cases, only one for a component. My suggestion is the problems with streaming data into the events table should be addressed first before this PR is merged.

[ ] The current content in the Events table should not be a blocker. WHY? This PR is just about retrieving content from that collection. This PR is not meant to address the effectiveness/performance of the already deployed streaming jobs.  Work on investigating the performance of the streaming jobs is found in a separate PR.

[ ] The records in the Events collection have been increasing with time. KCCA has over 100K records and AirQo now have over 5K records. So you may want to "skip" and examine the latest records.

add events to the path of the endpoint

Hi @sserurich :
Using the same details in your screenshot, I am unable to reproduce your issue. Please see the screenshot

The endpoint for adding even values doesn't succeed as shown in attached image. complains of certain required field. Also it could be better if we list the missing fields instead of it being generic in the response.

@Baalmart , not sure what I might be missing. @danielogen  had same issue when he tested it out.

Also @Baalmart  on the api for pushing one event, am getting this

Hi @sserurich :
Let us try out the "manual" approach below:
Just switch to staging branch, delete local PR branch, pull PR branch again from origin and then test again.

Also @Baalmart on the api for pushing one event, am getting this

Hi @sserurich :
Let us try out the "manual" approach below:
Just switch to staging branch, delete local PR branch, pull PR branch again from origin and then test again.

Also @Baalmart on the api for pushing one event, am getting this

alright @Baalmart , will let you know.

Hi @sserurich :
Let us try out the "manual" approach below:
Just switch to staging branch, delete local PR branch, pull PR branch again from origin and then test again.

Also @Baalmart on the api for pushing one event, am getting this

alright @Baalmart , will let you know.

@Baalmart , I did this and was examining everything line by line and observed , I had a typo in uncertaintyValue.. endpoint nows succeeds , thanks

Hi @sserurich :
Let us try out the "manual" approach below:
Just switch to staging branch, delete local PR branch, pull PR branch again from origin and then test again.

Also @Baalmart on the api for pushing one event, am getting this

@Baalmart , even the one for pushing one event has succeeded.  the reason I was getting issue was because "api_key" , I had used it successfully to push multiple events.. but on further inspecting again, I have realized for one event , its "apiKey".. may be the improvement here could be ensuring consistency.


Syntax error

I might be doing something wrong, but i just get a syntax error, whenever i'm trying to run the script.

That's probably because you're running it with Python 2. I realized there's no good reason to make such a simple script require Python 3, though, so I've changed it to be compatible with Python 2. Does it work now?


Create standalone EF Core console app with Jabbr Schema

Skip repository for now (ie skip IJabbrRepository), this is just a simple standalone sample app that:

Has model classes migrated from legacy JabbR
Uses .net core
Uses EF core
Has connect string
Is able to create database
Is able to add/edit/load data
Use LocalDB for this (specified in connect string)
Test various models. Check indexes in this app vs. the indexes created from Jabbr legacy

remove "virtual" from all collections in models

Command in the Package Manager Console to reverse engineer DB: Scaffold-DbContext "Server={SERVER NAME};Initial Catalog={DB NAME};User ID={USER ID};Password={PASSWORD];"
It will then ask for the Provider which is Microsoft.EntityFrameworkCore.SqlServer

Curious, what's the command line dotnet.exe option for this? this seems like the powershell version.

Lets implement (a good testing ground for another app) encryption for connection string ala task #19 Ensure credentials don't make it into repo (if appsettings or code. Its just localdb now but this ensures it doesn't accidentally get updated in the future. Feel free to add directions in a readme.MD for the test project to have directions as per what James found out in #19 to set this up.

To test this you need to:
-Set the target project to JabbR.EFTest by right clicking on the project and selecting "Set as Startup Project".
-In the package manager console set "JabbR.EFTest" as the default project
-Run "Update-Database" in the package manager console
This should create a localdb for you with all of the proper tables. Modify Program.cs as needed to test adding in various objects then run the project.

To test this you need to:
-Set the target project to JabbR.EFTest by right clicking on the project and selecting "Set as Startup Project".
-In the package manager console set "JabbR.EFTest" as the default project
-Run "Update-Database" in the package manager console
This should create a localdb for you with all of the proper tables. Modify Program.cs as needed to test adding in various objects then run the project.

Note: There were also a lot of warnings about discrepancies in the targeted NuGet package. Still ended up testing fine! :shipit:


feat(load-test): sort output pipelineruns CSV by SucceededDuration column

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Issue ticket number and link
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:

[x] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added meaningful description with JIRA/GitHub issue key(if applicable), for example HASSuiteDescribe("STONE-123456789 devfile source")
[ ] I have updated labels (if needed)

/test load-test-ci-max-concurrency-basic
/test load-test-ci-10u-10t

/test load-test-ci-10u-10t

/retest

/retest

/retest


removed debug logging

reverts changes made in the logging made in the last commit

@tfsoares plz review, merge and publish the new artifact


lint spelling on EULA

Corrected some misspelled words.

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

Thanks @taithethai! @bryphe does this require a new version of the EULA to be published (v1.2 or something?)

Thanks @taithethai , really appreciate the fixes! Changes look good.
Good question @zbaylin - since these are just spelling corrections, and there aren't material changes to the EULA, we don't need to version bump.


Serviceworker slows down first page load (Download cache before crucial files are downloaded)

I want to request a bug.
I've create a app with about 10 routes. Only one is crucial (route-categories) for the app (The other nine routes are for admin purpose). When I visit the page for the first time the needed route gets downloaded, all right. But in the background, the serviceworker starts to download the remaining routes (and all other resources, like images, icons etc.). The problem is that I need some JSON for my crucial route and the service worker starts downloading all other stuff before this.
Is there a way to solve this problem, maybe a delay before the service worker starts ?
Sometime the service worker starts downloading the files after the 'menu' and sometimes before.

I've been moving towards delaying SW installation a little bit via setTimeout to fix this.


feature request: rate limit factor as decorator parameter

Hey, I've been trying out your nice library for a personal project with success.
My use case is to rate limit some tasks which request an upstream API.
I have some tasks which perform multiple API requests.
I'd love to make the TokenBucket aware of it.
# If my task has `factor` set to 2 it means it consumes to tokens from the bucket.
@rate_limit(token_bucket_name="my_bucket", factor=2)

Great idea. We also thought about that.
The current implementation however has some challenges doing so.
The decorator consumes an item from the queue. AFAIK the kombu queue does not offer to receive multiple items in one call.
https://github.com/RegioHelden/django-celery-token-bucket/blob/324cdc3231abc67cc44a650cf8ecec0f72cac6c8/django_celery_token_bucket/decorators.py#L26
So let's assume we would iterate and consume as many tokens as requested. Running multiple workers in parallel could lead to the situation that when your bucket is getting close to be empty, the concurrent workers would start consuming from the queue without ever reaching their desired count and all would fail.
If there would be a way to consume multiple items in an atomic transaction, we could go ahead and implement this.
However, I am not aware of one.


Get Device Twin request from IoT Hub not working

Describe the bug
I'm working on a code sample to utilize the IoT Hub device twin, where the first step is to request the device twin from cloud to device. After the request is sent, there is no message received and there is no telling if the cloud (IoT Hub) received the request.
The code is based on the Azure IoT Hub Arduino Nano RP2040 Connect example from https://github.com/Azure/azure-sdk-for-c-arduino/tree/main/examples/Azure_IoT_Hub_Arduino_Nano_RP2040_Connect . I built the example with PlatformIO, which worked. However, the device twin request doesn't seem execute properly. The device twin code is based on:

https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/src/azure/iot/az_iot_hub_client_twin.c
https://github.com/djaus2/Azure_IoT_Hub_Arduino_RPI_Pico_Telemetry

Exception or Stack Trace

Serial reading from the microcontroller
(Sensitive information sensured out with XXXXX)
[INFO] Attempting to connect to WIFI SSID: XXXXX

[INFO] WiFi connected, IP address: XXXXX, Strength (dBm): -48
[INFO] Syncing time.
.........
[INFO] Time synced!
[INFO] Initializing Azure IoT Hub client.
[INFO] Azure IoT Hub hostname: XXXXX.azure-devices.net
[INFO] Azure IoT Hub client initialized.
[INFO] Initializing MQTT client.
[INFO] UTC Current time: 2023-03-17 12:31:57 (epoch:<PHONE_NUMBER> secs)
[INFO] UTC Expiry time: 2023-03-17 13:31:57 (epoch:<PHONE_NUMBER> secs)
[INFO] Local Current time: 2023-03-17 14:31:57
[INFO] Local Expiry time: 2023-03-17 15:31:57
[INFO] Client ID: XXXXX
[INFO] Username: XXXXX.azure-devices.net/XXXXX/?api-version=2020-09-30&DeviceClientType=c/1.5.0-beta.1(ard;nanorp2040connect)
[INFO] MQTT client initialized.
[INFO] Connecting to Azure IoT Hub.
[INFO] Connected to your Azure IoT Hub!
[INFO] Subscribed to MQTT topic: devices/+/messages/devicebound/#
[INFO] Subscribed to MQTT topic: $iothub/twin/res/#
[INFO] Subscribed to MQTT topic: $iothub/twin/PATCH/properties/desired/#
[INFO] Arduino Nano RP2040 Connect requesting device twin document . . .
[INFO] MQTT Client publishing to $iothub/twin/GET/?$rid=get_twin
[INFO] Request for Device Twin Document sent.

To Reproduce

Set up a IoT Hub with a IoT device with default settings (symmetric key).
Clone this repo, and use the Arduino Nano RP2040 example: https://github.com/Azure/azure-sdk-for-c-arduino/tree/main/examples/Azure_IoT_Hub_Arduino_Nano_RP2040_Connect
Change the main file (<main_file>.ino if using Arduino IDE, or main.cpp if using PlatformIO in VS Code)
Update the iot_configs.h file, build, upload and monitor.

Code Snippet

The .ino-file (main.cpp file for PlatformIO projects)
/*--- Libraries ---*/
// Arduino
#include <Arduino.h> // Needs to be added when not using Arduino IDE

// C99 libraries.
#include <cstdbool>
#include <cstdlib>
#include <cstring>
#include <time.h>

// Libraries for SSL client, MQTT client, and WiFi connection.
#include <ArduinoBearSSL.h>
#include <ArduinoMqttClient.h>
#include <WiFiNINA.h>

// Libraries for SAS token generation.
#include <ECCX08.h>

// Azure IoT SDK for C includes.
#include <az_core.h>
#include <az_iot.h>

// Azure IoT Device Twin Utilitie(s)
//#include <ArduinoJson.h>

// Sample header.
//#include "iot_configs.h"
#include "iot_configs_secrets.h"

// Logging
#include "SerialLogger.h"

/*--- Macros ---*/
#define BUFFER_LENGTH_MQTT_CLIENT_ID 256
#define BUFFER_LENGTH_MQTT_PASSWORD 256
#define BUFFER_LENGTH_MQTT_TOPIC 128
#define BUFFER_LENGTH_MQTT_USERNAME 512
#define BUFFER_LENGTH_SAS 32
#define BUFFER_LENGTH_SAS_ENCODED_SIGNED_SIGNATURE 64
#define BUFFER_LENGTH_SAS_SIGNATURE 512
#define BUFFER_LENGTH_DATETIME_STRING 256

// QoS levels
#define QOS_0 0 // At most once (not guaranteed)
#define QOS_1 1 // At least once (guaranteed)
#define QOS_2 2 // Exactly once (guaranteed)

#define LED_PIN 2 // High on error. Briefly high for each successful send.

// Time and Time Zone.
#define SECS_PER_MIN 60
#define SECS_PER_HOUR (SECS_PER_MIN * 60)
#define GMT_OFFSET_SECS (IOT_CONFIG_DAYLIGHT_SAVINGS ? \
                        ((IOT_CONFIG_TIME_ZONE + IOT_CONFIG_TIME_ZONE_DAYLIGHT_SAVINGS_DIFF) * SECS_PER_HOUR) : \
                        (IOT_CONFIG_TIME_ZONE * SECS_PER_HOUR))

// Exit into infinite loop
#define EXIT_LOOP(condition, errorMessage) \
  do \
  { \
    if (condition) { \
      Logger.Error(errorMessage); \
      while (1); \
    } \
  } while (0)

/*--- Sample static variables --*/
// Clients for WiFi connection, SSL, MQTT, and Azure IoT SDK for C.
static WiFiClient wiFiClient;
static BearSSLClient bearSSLClient(wiFiClient);
static MqttClient mqttClient(bearSSLClient);
static az_iot_hub_client azIoTHubClient;

// MQTT variables.
static char mqttClientId[BUFFER_LENGTH_MQTT_CLIENT_ID];
static char mqttUsername[BUFFER_LENGTH_MQTT_USERNAME];
static char mqttPassword[BUFFER_LENGTH_MQTT_PASSWORD];

// Device Twin variables
static az_span const twin_document_topic_request_id = AZ_SPAN_LITERAL_FROM_STR("get_twin");
static void requestDeviceTwinDocument();

/*--- Functions ---*/
// Initialization and connection functions.
void connectToWiFi();
void initializeAzureIoTHubClient();
void initializeMQTTClient();
void connectMQTTClientToAzureIoTHub();

// Telemetry and message-callback functions.
void onMessageReceived(int messageSize);

// SAS Token related functions.
static void generateMQTTPassword();
static void generateSASBase64EncodedSignedSignature(
    uint8_t const* sasSignature, size_t const sasSignatureSize,
    uint8_t* encodedSignedSignature, size_t encodedSignedSignatureSize,
    size_t* encodedSignedSignatureLength);
static uint64_t getSASTokenExpirationTime(uint32_t minutes);

// Time and Error functions.
static unsigned long getTime();
static String getFormattedDateTime(unsigned long epochTimeInSeconds);
static String mqttErrorCodeName(int errorCode);

/*---------------------------*/
/*    Main code execution    */
/*---------------------------*/

/*
 * setup:
 * Initialization and connection of serial communication, WiFi client, Azure IoT SDK for C client,
 * and MQTT client.
 */
void setup()
{
  while (!Serial);
  delay(1000);

  Serial.begin(SERIAL_LOGGER_BAUD_RATE);

  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, HIGH);

  connectToWiFi();
  initializeAzureIoTHubClient();
  initializeMQTTClient();
  connectMQTTClientToAzureIoTHub();

  requestDeviceTwinDocument();

  digitalWrite(LED_PIN, LOW);
}

/*
 * loop:
 * Check for connection and reconnect if necessary.
 * Send Telemetry and receive messages.
 */
void loop()
{
  if (WiFi.status() != WL_CONNECTED)
  {
    connectToWiFi();
  }

  // MQTT loop must be called to process Telemetry and Cloud-to-Device (C2D) messages.
  mqttClient.poll();
  delay(50);
}

/*-----------------------------------------------*/
/*    Initialization and connection functions    */
/*-----------------------------------------------*/

/*
 * connectToWifi:
 * The WiFi client connects, using the provided SSID and password.
 * The WiFi client synchronizes the time on the device.
 */
void connectToWiFi()
{
  Logger.Info("Attempting to connect to WIFI SSID: " + String(IOT_CONFIG_WIFI_SSID));

  WiFi.begin(IOT_CONFIG_WIFI_SSID, IOT_CONFIG_WIFI_PASSWORD);
  while (WiFi.status() != WL_CONNECTED)
  {
    Serial.print(".");
    delay(IOT_CONFIG_WIFI_CONNECT_RETRY_MS);
  }
  Serial.println();

  Logger.Info("WiFi connected, IP address: " + String(WiFi.localIP()) + ", Strength (dBm): " + WiFi.RSSI());
  Logger.Info("Syncing time.");

  while (getTime() == 0)
  {
    Serial.print(".");
    delay(500);
  }
  Serial.println();

  Logger.Info("Time synced!");
}

/*
 * initializeAzureIoTHubClient:
 * The Azure IoT SDK for C client uses the provided hostname, device id, and user agent.
 */
void initializeAzureIoTHubClient()
{
  Logger.Info("Initializing Azure IoT Hub client.");

  az_span hostname = AZ_SPAN_FROM_STR(IOT_CONFIG_IOTHUB_FQDN);
  az_span deviceId = AZ_SPAN_FROM_STR(IOT_CONFIG_DEVICE_ID);

  az_iot_hub_client_options options = az_iot_hub_client_options_default();
  options.user_agent = AZ_SPAN_FROM_STR(IOT_CONFIG_AZURE_SDK_CLIENT_USER_AGENT);

  int result = az_iot_hub_client_init(&azIoTHubClient, hostname, deviceId, &options);

  EXIT_LOOP(az_result_failed(result), "Failed to initialize Azure IoT Hub client. Return code: " + result);

  Logger.Info("Azure IoT Hub hostname: " + String(IOT_CONFIG_IOTHUB_FQDN));
  Logger.Info("Azure IoT Hub client initialized.");
}

/*
 * initializeMQTTClient:
 * The MQTT client uses the client id and username from the Azure IoT SDK for C client.
 * The MQTT client uses the generated password (the SAS token).
 */
void initializeMQTTClient()
{
  Logger.Info("Initializing MQTT client.");

  int result;

  result = az_iot_hub_client_get_client_id(
      &azIoTHubClient, mqttClientId, sizeof(mqttClientId), NULL);
  EXIT_LOOP(az_result_failed(result), "Failed to get MQTT client ID. Return code: " + result);

  result = az_iot_hub_client_get_user_name(
      &azIoTHubClient, mqttUsername, sizeof(mqttUsername), NULL);
  EXIT_LOOP(az_result_failed(result), "Failed to get MQTT username. Return code: " + result);

  generateMQTTPassword(); // SAS Token

  // MQTT Client ID, username, and password
  mqttClient.setId(mqttClientId);
  mqttClient.setUsernamePassword(mqttUsername, mqttPassword);

  mqttClient.onMessage(onMessageReceived); // Set callback

  Logger.Info("Client ID: " + String(mqttClientId));
  Logger.Info("Username: " + String(mqttUsername));

  Logger.Info("MQTT client initialized.");
}

/*
 * connectMQTTClientToAzureIoTHub:
 * The SSL library sets a callback to validate the server certificate.
 * The MQTT client connects to the provided hostname. The port is pre-set.
 * The MQTT client subscribes to IoT topics.
 */
void connectMQTTClientToAzureIoTHub()
{
  Logger.Info("Connecting to Azure IoT Hub.");

  // Set a callback to get the current time used to validate the server certificate.
  ArduinoBearSSL.onGetTime(getTime);

  while (!mqttClient.connect(IOT_CONFIG_IOTHUB_FQDN, AZ_IOT_DEFAULT_MQTT_CONNECT_PORT))
  {
    int code = mqttClient.connectError();
    Logger.Error("Cannot connect to Azure IoT Hub. Reason: " + mqttErrorCodeName(code) + ", Code: " + code);
    delay(5000);
  }

  Logger.Info("Connected to your Azure IoT Hub!");

  //mqttClient.subscribe(AZ_IOT_HUB_CLIENT_C2D_SUBSCRIBE_TOPIC);
  //Logger.Info("Subscribed to MQTT topic: " + String(AZ_IOT_HUB_CLIENT_C2D_SUBSCRIBE_TOPIC));

  //mqtt_client.subscribe(AZ_IOT_HUB_CLIENT_METHODS_SUBSCRIBE_TOPIC);
  //Logger.Info("Subscribed to MQTT topic: " + String(AZ_IOT_HUB_CLIENT_METHODS_SUBSCRIBE_TOPIC));

  mqttClient.subscribe(AZ_IOT_HUB_CLIENT_TWIN_RESPONSE_SUBSCRIBE_TOPIC, QOS_1); // (Default: QoS 0 At most once, not guaranteed)
  Logger.Info("Subscribed to MQTT topic: " + String(AZ_IOT_HUB_CLIENT_TWIN_RESPONSE_SUBSCRIBE_TOPIC));

  mqttClient.subscribe(AZ_IOT_HUB_CLIENT_TWIN_PATCH_SUBSCRIBE_TOPIC, QOS_1); // (Default: QoS 0 At most once, not guaranteed)
  Logger.Info("Subscribed to MQTT topic: " + String(AZ_IOT_HUB_CLIENT_TWIN_PATCH_SUBSCRIBE_TOPIC));

}

/*--------------------------------------------------------------*/
/*    Device Twins, Telemetry and message-callback functions    */
/*--------------------------------------------------------------*/

/*
 * onMessageReceived:
 * The function called when device receives a message on the subscribed topics.
 * Callback function signature is defined by the ArduinoMQTTClient library.
 * Message received is printed to the terminal.
 */
void onMessageReceived(int messageSize){

  Logger.Info("Message received: Topic: " + mqttClient.messageTopic() + ", Length: " + messageSize);
  //receivedMessageDeviceTwinDoc(messageSize);

/*
  Logger.Info("Message: ");
  while (mqttClient.available())
  {
    Serial.print((char)mqttClient.read());
  }
  Serial.println();
*/
}

/*
 * requestDeviceTwinDocument:
 * The Azure IoT SDK for C client creates the MQTT topic to publish a telemetry message.
 * The MQTT client creates and sends the telemetry mesage on the topic.
 */
static void requestDeviceTwinDocument()
{
  Logger.Info("Arduino Nano RP2040 Connect requesting device twin document . . . ");

  char deviceTwinTopic[BUFFER_LENGTH_MQTT_TOPIC];
  // Get the Twin Document topic to publish the twin document request.
  int result = az_iot_hub_client_twin_document_get_publish_topic(
      &azIoTHubClient, twin_document_topic_request_id, deviceTwinTopic, sizeof(deviceTwinTopic), NULL);
  EXIT_LOOP(az_result_failed(result), "Failed to get twin document publish topic. Return code: " + result);

  // Publish the twin document request.
  mqttClient.beginMessage(deviceTwinTopic);
  //mqttClient.print("");
  mqttClient.endMessage();

  Logger.Info("MQTT Client publishing to " + (String)deviceTwinTopic);
  Logger.Info("Request for Device Twin Document sent.");
  delay(100);
}

/*************************************/
/*    SAS Token related functions    */
/*************************************/

/*
 * generateMQTTPassword:
 * The MQTT password is the generated SAS token. The process is:
 *    1. Get the SAS token expiration time from the provided value. (Default 60 minutes).
 *    2. Azure IoT SDK for C creates the SAS signature from this expiration time.
 *    3. Sign and encode the SAS signature.
 *    4. Azure IoT SDK for C creates the MQTT Password from the expiration time and the encoded,
 *       signed SAS signature.
 */
static void generateMQTTPassword()
{
  int result;

  uint64_t sasTokenDuration = 0;
  uint8_t signature[BUFFER_LENGTH_SAS_SIGNATURE] = {0};
  az_span signatureAzSpan = AZ_SPAN_FROM_BUFFER(signature);
  uint8_t encodedSignedSignature[BUFFER_LENGTH_SAS_ENCODED_SIGNED_SIGNATURE] = {0};
  size_t encodedSignedSignatureLength = 0;

  // Get the signature. It will be signed later with the decoded device key.
  // To change the sas token duration, see IOT_CONFIG_SAS_TOKEN_EXPIRY_MINUTES in iot_configs.h
  sasTokenDuration = getSASTokenExpirationTime(IOT_CONFIG_SAS_TOKEN_EXPIRY_MINUTES);
  result = az_iot_hub_client_sas_get_signature(
      &azIoTHubClient, sasTokenDuration, signatureAzSpan, &signatureAzSpan);
  EXIT_LOOP(az_result_failed(result), "Could not get the signature for SAS Token. Return code: " + result);

  // Sign and encode the signature (b64 encoded, HMAC-SHA256 signing).
  // Uses the decoded device key.
  generateSASBase64EncodedSignedSignature(
      az_span_ptr(signatureAzSpan), az_span_size(signatureAzSpan),
      encodedSignedSignature, sizeof(encodedSignedSignature), &encodedSignedSignatureLength);

  // Get the MQTT password (SAS Token) from the base64 encoded, HMAC signed bytes.
  az_span encodedSignedSignatureAzSpan = az_span_create(encodedSignedSignature,
                                                        encodedSignedSignatureLength);
  result = az_iot_hub_client_sas_get_password(
      &azIoTHubClient, sasTokenDuration, encodedSignedSignatureAzSpan, AZ_SPAN_EMPTY,
      mqttPassword, sizeof(mqttPassword), NULL);
  EXIT_LOOP(az_result_failed(result), "Could not get the MQTT password. Return code: " + result);
}

/*
 * generateSASBase64EncodedSignedSignature:
 * Sign and encode a signature. It is signed using the provided device key.
 * The process is:
 *    1. Decode the encoded device key.
 *    2. Sign the signature with the decoded device key.
 *    3. Encode the signed signature.
 */
static void generateSASBase64EncodedSignedSignature(
    uint8_t const* sasSignature, size_t const sasSignatureSize,
    uint8_t* encodedSignedSignature, size_t encodedSignedSignatureSize,
    size_t* encodedSignedSignatureLength)
{
  int result;
  unsigned char sasDecodedKey[BUFFER_LENGTH_SAS] = {0};
  az_span sasDecodedKeySpan = AZ_SPAN_FROM_BUFFER(sasDecodedKey);
  int32_t sasDecodedKeyLength = 0;
  uint8_t sasHMAC256SignedSignature[BUFFER_LENGTH_SAS] = {0};

  // Decode the SAS base64 encoded device key to use for HMAC signing.
  az_span configDeviceKeySpan = az_span_create((uint8_t*)IOT_CONFIG_DEVICE_KEY, sizeof(IOT_CONFIG_DEVICE_KEY) - 1);
  result = az_base64_decode(sasDecodedKeySpan, configDeviceKeySpan, &sasDecodedKeyLength);
  EXIT_LOOP(result != AZ_OK, "az_base64_decode failed. Return code: " + result);

  // HMAC-SHA256 sign the signature with the decoded device key.
  result = ECCX08.begin();
  EXIT_LOOP(!result, "Failed to communicate with ATECC608.");

  result = ECCX08.nonce(sasDecodedKey);
  EXIT_LOOP(!result, "Failed to do nonce.");

  result = ECCX08.beginHMAC(0xFFFF);
  EXIT_LOOP(!result, "Failed to start HMAC operation.");

  result = ECCX08.updateHMAC(sasSignature, sasSignatureSize);
  EXIT_LOOP(!result, "Failed to update HMAC with signature.");

  result = ECCX08.endHMAC(sasHMAC256SignedSignature);
  EXIT_LOOP(!result, "Failed to end HMAC operation.");

  // Base64 encode the result of the HMAC signing.
  az_span signedSignatureSpan = az_span_create(sasHMAC256SignedSignature, sizeof(sasHMAC256SignedSignature));
  az_span encodedSignedSignatureSpan = az_span_create(encodedSignedSignature, encodedSignedSignatureSize);
  result = az_base64_encode(encodedSignedSignatureSpan, signedSignatureSpan, (int32_t*) encodedSignedSignatureLength);
  EXIT_LOOP(result != AZ_OK, "az_base64_encode failed. Return code: " + result);
}

/*
 * getSASTokenExpirationTime:
 * Calculate expiration time from current time and duration value.
 */
static uint64_t getSASTokenExpirationTime(uint32_t minutes)
{
  unsigned long now = getTime();  // GMT
  unsigned long expiryTime = now + (SECS_PER_MIN * minutes); // For SAS Token
  unsigned long localNow = now + GMT_OFFSET_SECS;
  unsigned long localExpiryTime = expiryTime + GMT_OFFSET_SECS;

  Logger.Info("UTC Current time: " + getFormattedDateTime(now) + " (epoch: " + now + " secs)");
  Logger.Info("UTC Expiry time: " + getFormattedDateTime(expiryTime) + " (epoch: " + expiryTime + " secs)");
  Logger.Info("Local Current time: " + getFormattedDateTime(localNow));
  Logger.Info("Local Expiry time: " + getFormattedDateTime(localExpiryTime));

  return (uint64_t)expiryTime;
}

/**********************************/
/*    Time and Error functions    */
/**********************************/

/*
 * getTime:
 * WiFi client returns the seconds corresponding to GMT epoch time.
 * This function used as a callback by the SSL library to validate the server certificate
 * and in SAS token generation.
 */
static unsigned long getTime()
{
  return WiFi.getTime();
}

/*
 * getFormattedDateTime:
 * Custom formatting for epoch seconds. Used in logging.
 */
static String getFormattedDateTime(unsigned long epochTimeInSeconds)
{
  char dateTimeString[BUFFER_LENGTH_DATETIME_STRING];

  time_t epochTimeInSecondsAsTimeT = (time_t)epochTimeInSeconds;
  struct tm* timeInfo = localtime(&epochTimeInSecondsAsTimeT);

  strftime(dateTimeString, 20, "%F %T", timeInfo);

  return String(dateTimeString);
}

/*
 * mqttErrorCodeName:
 * Legibly prints AruinoMqttClient library error enum values.
 */
static String mqttErrorCodeName(int errorCode)
{
  String errorMessage;
  switch (errorCode)
  {
  case MQTT_CONNECTION_REFUSED:
    errorMessage = "MQTT_CONNECTION_REFUSED";
    break;
  case MQTT_CONNECTION_TIMEOUT:
    errorMessage = "MQTT_CONNECTION_TIMEOUT";
    break;
  case MQTT_SUCCESS:
    errorMessage = "MQTT_SUCCESS";
    break;
  case MQTT_UNACCEPTABLE_PROTOCOL_VERSION:
    errorMessage = "MQTT_UNACCEPTABLE_PROTOCOL_VERSION";
    break;
  case MQTT_IDENTIFIER_REJECTED:
    errorMessage = "MQTT_IDENTIFIER_REJECTED";
    break;
  case MQTT_SERVER_UNAVAILABLE:
    errorMessage = "MQTT_SERVER_UNAVAILABLE";
    break;
  case MQTT_BAD_USER_NAME_OR_PASSWORD:
    errorMessage = "MQTT_BAD_USER_NAME_OR_PASSWORD";
    break;
  case MQTT_NOT_AUTHORIZED:
    errorMessage = "MQTT_NOT_AUTHORIZED";
    break;
  default:
    errorMessage = "Unknown";
    break;
  }

  return errorMessage;
}

Expected behavior
The expected behavior of the code is to receive a "message" which includes the device twin Json document. However, this code only checks if there is any message received, and prints the message-topic and message length. The code has not yet implemented code to read the message. It ONLY verifies if the device twin was sent to device.
Setup:

OS: Windows 11
Microcontroller: Arduino Nano RP2040 Connect
IDE: VS Code + PlatformIO or Arduino IDE 2.0.4
PlatformIO libraries

Azure SDK for C 1.1.3
ArduinoBearSSL 1.7.3
ArduinoECCX08 1.3.7
ArduinoMqttClient 0.1.6
WiFiNINA 1.8.13

Additional context
Note1: If the problem does not relate to Azure SDK for C, I suspect limitations/problems with ArduinoMQTT. I would like to give an request for adding a device twin example in the Azure SDK for C Arduino repository.
Note 2: (Update 20.03.2023) I made another test with two functionaliteis implemented, twin get request and D2C message in the same code. The code first sends a D2C message, which I detect in Azure Portal (with az iot hub montir-events --hub-name ...). The second step is to send a twin get request over MQTT connection. After the request is sent, I can no longer recieve D2C messages in the cloud (IoT Hub). Not able to see this happen. Will try to replace the ArduinoMqttClient with SubPubClient.
Note 3: (Update 20.03.2023) Tested PubSubClient library, same result. Suspect problem with the arduino porting repository (https://github.com/Azure/azure-sdk-for-c-arduino). NB! Im posting this issue here, as the arduino-ported repo does not have a issue tab.
Note 4: (Update 21.03.2023) In the arduinoMqttClient library there is a macro (MQTT_CLIENT_DEBUG), commented out by default. With it enabled, it confirmed that the topics where subscripted to correctly (MQTT received data for each subscription). And, as suspected only sends and does NOT receive data when sending a "get_twin" request.
Note 5: (Update 21.03.2023) In D2C / Telemetry messages, the Azure SDK for C (for arduino) seem to treat the payload section as non-JSON syntax. Due to the backslashes for each quotation mark, as shown here:
{
    "event": {
        "origin": "XXXXXXXXXX",
        "module": "",
        "interface": "",
        "component": "",
        "payload": "{ \"msgCount\": 0 }"
    }
}

Is this as expected? or is the code in the Arduino framework affecting the handling of Strings/characters, such that the payload behaves wierd? And could this possible affect the "get_twin" request aswell?
Information Checklist
Please make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[x] Bug Description Added
[x] Repro Steps Added
[x] Setup information Added

I was able successfully implemented the twin device request by extending the example Azure_IoT_Central_ESP32 based on the sample ino that you've provided above. So thank you for that.
One thing I noticed that you are not subscribing to the topic '$iothub/twin/GET/?$rid=get_twin'.  The response to the GET request will be posted there. Have you tried adding an additional subscription to that topic?
For what it's worth here's an extract from my log output which shows all topics I'm using
[ 17910][I] esp_mqtt_event_handler(): MQTT client connected (session_present=0x00000000).
[ 17914][I] mqtt_client_subscribe_function(): MQTT client subscribing to '$iothub/methods/POST/#'
[ 18015][I] esp_mqtt_event_handler(): MQTT topic subscribed (message id=0x00009e5c).
[ 18024][I] mqtt_client_subscribe_function(): MQTT client subscribing to '$iothub/twin/res/#'
[ 18099][I] esp_mqtt_event_handler(): MQTT topic subscribed (message id=0x0000569f).
[ 18104][I] mqtt_client_subscribe_function(): MQTT client subscribing to '$iothub/twin/PATCH/properties/desired/#'
[ 18174][I] esp_mqtt_event_handler(): MQTT topic subscribed (message id=0x0000c7b9).
[ 18184][I] azure_iot_do_work(): *******************  REQUESTING TWIN DOCUMENT  *********************
[ 18206][I] mqtt_client_publish_function(): MQTT client publishing to '$iothub/twin/GET/?$rid=get_twin'
[ 18220][I] mqtt_client_subscribe_function(): MQTT client subscribing to '$iothub/twin/GET/?$rid=get_twin'
[ 18290][I] esp_mqtt_event_handler(): MQTT message received.
[ 18290][I] on_device_twin_received(): Device Twin received: {"desired":{"state":"on","temp":55,"deviceName":"foo" ....
[ 18425][I] esp_mqtt_event_handler(): MQTT topic subscribed (message id=0x00009019).
[ 18430][I]                  (): *******************  TWIN DOCUMENT GOTTEN  *************************

Hope this helps

@meta-space Interesting to see that it works for you with ESP32.
When it comes to $iothub/twin/GET/?$rid=get_twin, from the official examples, you are not supposed to subscribe to it. You only need to publish to it. I gave it a try to see if subscribing to it worked aswell. However, the same result.
...
[INFO] MQTT client initialized.
[INFO] Connecting to Azure IoT Hub.
[INFO] Connected to your Azure IoT Hub!
[INFO] Subscribed to MQTT topic: devices/+/messages/devicebound/#
[INFO] Subscribed to MQTT topic: $iothub/methods/POST/#
[INFO] Subscribed to MQTT topic: $iothub/twin/res/#
[INFO] Subscribed to MQTT topic: $iothub/twin/PATCH/properties/desired/#
[INFO] Subscribed to MQTT topic: $iothub/twin/GET/?$rid=get_twin
[INFO] Requesting device twin document . . .
[INFO] MQTT Client publishing to $iothub/twin/GET/?$rid=get_twin

And no reply.
And as mentioned, the odd part is that I can't receive any C2D Messages  nor publish with D2C messages,
after I tried to publish to $iothub/twin/GET/?$rid=get_twin.

@engemil , first, to confirm everything is set up correctly on the Hub side, please use the same device identity with the sample within this repository:  https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_twin_sample.c
I'm able to run the sample and use Azure IoT Explorer to modify twin's desired properties and receive updates on the device side.
The two topics you must subscribe to are: AZ_IOT_HUB_CLIENT_TWIN_PATCH_SUBSCRIBE_TOPIC and AZ_IOT_HUB_CLIENT_TWIN_RESPONSE_SUBSCRIBE_TOPIC.
Then, you must use the az_iot_hub_client_twin_document_get_publish_topic and az_iot_hub_client_twin_patch_get_publish_topic APIs to obtain the correct publish topics. This is described in the diagram here: https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#iot-hub We do not recommend hardcoding any of the topics when using the SDK (they are subject to change in future versions).
Also, please keep in mind that Twin is not available on all IoT Hub SKUs: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-scaling?branch=release-iotbasic (since you mentioned C2D works, I assume this is not a Basic hub).
Based on the logs above, the topics seem to be correct and Hub should have responded to the request. Since the logs though do not show MQTT acknowledgements, we don't know if the connection was terminated or if the subscriptions were successful.
To further investigate this issue, we need service-side logs. Please follow https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request to open a ticket.

@engemil You are correct. I removed the subscription call and the twin document still arrived.
I think I had accidentally messed up the state in the state machine which resulted in the response not being processed previously

@CIPop The IoT Hub (free tier) seem to be set up correctly. I managed to run the paho_iot_hub_twin_sample.c from Windows, and I got the following result (Iot hub name sensured with XXXXXXXXX):
AZ_IOT_HUB_HOSTNAME = XXXXXXXXX.azure-devices.net
AZ_IOT_HUB_DEVICE_ID = paho-sample-device1
AZ_IOT_DEVICE_X509_CERT_PEM_FILE_PATH = C:\azure-sdk-for-c\sdk\samples\iot\device_cert_store.pem
AZ_IOT_DEVICE_X509_TRUST_PEM_FILE_PATH = C:\azure-sdk-for-c\sdk\samples\iot\BaltimoreCyberTrustRoot.crt.pem

SUCCESS:        MQTT endpoint created at "ssl://XXXXXXXXX.azure-devices.net:8883".
SUCCESS:        Client created and configured.
                MQTT client username: XXXXXXXXX.azure-devices.net/paho-sample-device1/?api-version=2020-09-30&DeviceClientType=azsdk-c%2F1.6.0-beta.1

SUCCESS:        Client connected to IoT Hub.
SUCCESS:        Client subscribed to IoT Hub topics.
                Client requesting device twin document from service.

                Waiting for device twin message.

SUCCESS:        Client received a device twin message from the service.
SUCCESS:        Client received a valid topic response.
                Topic: $iothub/twin/res/200/?$rid=get_twin
                Payload: {"desired":{"$version":1},"reported":{"$version":1}}
                Status: 200
SUCCESS:        Client parsed device twin message.
                Message Type: GET

                Client sending reported property to service.
SUCCESS:        Client published the Twin Patch reported property message.
                Payload: {"device_count":0}

                Waiting for device twin message.

SUCCESS:        Client received a device twin message from the service.
SUCCESS:        Client received a valid topic response.
                Topic: $iothub/twin/res/204/?$rid=reported_prop&$version=2
                Payload:
                Status: 204
SUCCESS:        Client parsed device twin message.
                Message Type: Reported Properties

                Waiting for device twin message.

                Receive message timeout expired.
SUCCESS:        Client disconnected from IoT Hub.

C:\azure-sdk-for-c\build\sdk\samples\iot\Debug\paho_iot_hub_twin_sample.exe (process 21612) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

I tried to open a ticket with the instructions given in the link you gave, however, the "New support request"-interface sent me to a Diagnostics summary, summarizing that nothing seems to be wrong and recommended steps given where "no action should be needed".
I suspect the issue is in the arduino ported version of Azure SDK for C (https://github.com/Azure/azure-sdk-for-c-arduino), or in my own code. I'm available for further troubleshooting if you have more ideas for what should be tested.


Fixed some broken tests and began to write IdentityComparer testing c…

@mafurman,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

:shipit:


semver.Version renaming to semver.VersionInfo breaks pynitrokey

even though the semver still documents that Version is to be used: https://pypi.org/project/semver/
the implementation changed to VersionInfo instead

Wrong! The python-semver package in ArchLinux is outdated: https://archlinux.org/packages/extra/any/python-semver/ ... so closing this issue

Funny that I stumbled upon this issue by accident. :smile:
@daringer I'm the maintainer of python-semver. Just wanted so say hello :wave: and to leave some (hopefully) helpful information.
Yes, it is correct, that the VersionInfo class was renamed to Version. The former is deprecated now, although version 3 still contains the old name. To make the migration to the new version a bit easier. However, don't rely on it, it will be removed in a future release. :wink:
Keep in mind, version 2 of semver won't receive any updates anymore so I'd recommend to update to version 3 soon. Find more information in the migration chapter.
If you need more information, head over to the semver project and start a discussion, open an issue, or just say hello.
Happy coding!


devicons2 does not display

Runtime Environment
Operating system and version: archlinux 5.13.9
Terminal emulator and version: st 0.8.2
Python version: 3.9.6
Ranger version/commit: 1.9.3
Locale: None.None
Current Behavior
I have followed the guide from devicons2 ,

clone the repo to .config/ranger/plugins
add the script in my rc.conf
install nerd-font (sauce code pro nerd font)
change my st terminal default font to nerd font ( I have even changed my system default font)

Expected Behavior
my ranger should show devicons after I follow the guide completely

Do you compile st from sources? Can you show your config.h (especially static char *font and post screenshot?
I've tried vanilla st from aur , LukeSmithxyz's version and vanilla verison from suckless compiled with make, and every version works fine for me.
You can also try to run fc-cache -v to update your fonts cache and fc-match 'your-font-name-from-config-h' to check is font installed without errors
p.s. I'm using static char *font = "DejaVuSansMono Nerd Font Mono:pixelsize=18"; in my config

I took your advice and change my fonts setting in st and it works finally.
Thanks you so much


Add support for TypeScript

Thanks!

For TypeScript, the documentation tool of choice seems to be "you can mash JSDoc into it... but you really want TypeDoc so you don't duplicate the type declarations".
Judging by the conversation in this issue and a few others, it already produces JSON output alongside the HTML which may or may not be suitable for Inch CI.

@ssokolow have you got an example of the paired usage by chance?

Unfortunately not. At the time I posted that, I was making preparations for my first use of TypeScript and I came across this while accumulating a list of resources.
Before I could produce anything, more important things came up and I haven't had time to do anything beyond maintenance work on the codebases I want to retrofit with TypeScript. (Ironic, considering that the whole goal was to ease maintainability.)


move PlayerDelegate method to value observer didSet.

move PlayerDelegate method to value observer didSet.

Add playbackEdgeTriggered  that indicate whether self.delegate?.playerBufferingStateDidChange(self) and  self.delegate?.playerPlaybackStateDidChange(self) should be called when bufferingState  and playbackState is set (the value may not be changed) or just set when the value is changed.

great PR, thanks @2sui ✌


Using UploadWidget on json schema with Vue3 and NaiveUI

Hi,
I would use @before-upload event of naive-ui Upload component. The  json schema is :
    "imgUrl": {
      "title": "Upload",
      "type": "string",
      "ui:action": "http://localhost:5000/uploadfile",
      "ui:widget": "UploadWidget",
      "ui:list-type": "image-card",
      "ui:btnText": "Browse",
      `ui:onBeforeUpload`  << not work
      `ui:beforeUpload`   << not work
      `ui:@beforeUpload`   << not work
      `ui::beforeUpload`   << not work
   }

How to add the call to naive-ui event on json schema ?
Thank's

Try this
"ui:on-before-upload": "doSomething"

Thanks, but it seems not working.
The event seems not passed or hooked to/from upload.js component (the internal upload lib used from upload component naive)

Provide a minimal reappearance link ？

Hi, i'm a collegue of @clabnet.
I solved the problem using "ui:widget": "uploadWidget" and inside the custom component i add the Naive event handle the image upload.


Add bech32 for mainnet and testnet

See https://github.com/satoshilabs/slips/blob/master/slip-0173.md#registered-human-readable-parts

thx for this contributuion!


(preview|dev) --host not working

Describe the bug
./node_modules/.bin/histoire preview --host <IP_ADDRESS>

Preview server listening on http://localhost:6006/

 $ ./node_modules/.bin/histoire dev --host <IP_ADDRESS>
  ➜  Local:   http://localhost:6006/
  ➜  Network: use --host to expose

Reproduction
--
System Info
--

Used Package Manager
pnpm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
[X] The provided reproduction is a minimal reproducible example of the bug.

I'm sorry but this parameter doesn't exist:
https://github.com/histoire-dev/histoire/blob/08a27ee79a80223d8ed8f261c2140a8cd71707dc/packages/histoire/src/node/bin.ts#L16-L22

Exposing your running app (e.g. when used within a docker setup) is not part of histoire itself but of the underlying vite server.
Instead of trying to pass vite args to histoire you should setup vite within histoire.config.ts accordingly:
import { HstVue } from '@histoire/plugin-vue2'
import { defineConfig } from 'histoire'

export default defineConfig({
  plugins: [
    HstVue(),
  ],
  vite: {
    server: {
      host: '<IP_ADDRESS>',
    },
  },
})


Composer "Ambiguous class resolution" warning

Warning: Ambiguous class resolution, "Iris\OrderHistory" was found in both "/var/www/app/vendor/bandwidth/iris/src/simpleModels/History.php" and "/var/www/app/vendor/bandwidth/iris/src/simpleModels/OrderHistory.php", the first will be used.

This will be fixed in our next release

FYI this looks resolved @jmulford-bw.. closing :)
Thank you!


PR imagepos on canvas within image-keyboard-response

Option to set canvas size and image position + draw canvas border

Thanks very much for submitting this improvement to the image-keyboard-response @igmmgi! We'll look at it ASAP 👍

Thanks very much for submitting this improvement to the image-keyboard-response @igmmgi! We'll look at it ASAP 👍

Thanks again - this looks like a really nice addition to the image plugins.
In order to merge this we'll need to test it, change the image-button-response and image-slider-response plugins to be consistent, and update the docs. Unfortunately we won't have time to do this for v6.3 because we need to finish it up ASAP, so I'm marking this for v7.0.

Bumping this to 7.1 given the complexities of merging into 7.0 directly.

I'm a little worried about the complexities that this would introduce. Right now the render_on_canvas feature is meant to be just a background implementation thing. If we add these parameters then they would only work when render_on_canvas is true. We could consider implementing the equivalent code for the HTML element version. I think that would be necessary to make this behave intuitively.
I'm going to close this specific PR since it targets <= 7.0. I've opened an issue #2403 to track this feature request.


Make Status and Method Directly Codable

I'm working a PR for Swift AWS Lambda Events to adopt Swift HTTP Types.
Would it be acceptable to add Codable conformance directly to HTTPResponse.Status and HTTPRequest.Method to better support this / would you welcome a PR for this?

Yeah absolutely, thanks!


Models crash in 2D

Open the 3D models Sandcastle example and switch to 2D.

Also crashes in 1.25.  @bagnell are you looking at this?

I'm looking into it, it seems to be related to OIT + shadows.


Add option for snp when architecture x64 EFI

Description
Every source online I can find when it comes to ipxe and booting architecture type 00007 ( aka x64 EFI ) suggests using snp.
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml - 00x00 00x07 - x64 EFI
Examples around showing that 00007 (x64 efi) architecture type needs snp:
https://theforeman.org/2019/06/install-esxi-through-foreman-using-ipxe-bootstrapping.html
https://gist.github.com/mintsoft/e4bf8391cdc3a9d9014b185897cef41c
https://www.dell.com/support/article/en-us/how12285/how-to-configure-pxe-booting-over-uefi-on-a-poweredge-without-using-server-2012-and-windows-deployment-services
In my case snp is the only one that would work.  Since using snp and this is obviously chainloading made sense to use snponly.
So if the architecture matches this serves snponly.efi
Why is this needed
Some nics are unsupported.  #78 is a good reference of the conversation leading up to this
Fixes: #
How Has This Been Tested?

How are existing users impacted? What migration steps/scripts do we need?

Checklist:
I have:

[ ] updated the documentation and/or roadmap (if required)
[x] added unit or e2e tests
[ ] provided instructions on how to upgrade

@mmlb might be of interest to you.
Also just to note.. this was really complicated to get through all of the nested makes to finally get it compiled and working on our machines.
I can imagine the actual artifacts you'll want some how generated by someone in tinkerbell community?  So I guess someone there would want to do that and check in their snponly.efi and bindata.go
I'm going to leave a few comments on various things I had to change to get this to work

For security, we need to ensure that the binary file provided in this PR matches what we can build in a sanitized environment. At some point it would be good to automate this process, but if this is urgent we can ask some folks internally to prioritize testing this.

I'll definitely re-build this first only because I'm not sure if ipxe is reproducible and would like to find out.

For security, we need to ensure that the binary file provided in this PR matches what we can build in a sanitized environment.

For sure! Totally understand this.  Building again also changed a few of the other ipxe binaries and for sure changed the bindata.go.
If easier on this PR I can revert the changes to any binaries and just leave the build script changes.

At some point it would be good to automate this process, but if this is urgent we can ask some folks internally to prioritize testing this.

Yes definitely seems like if this has to be done very often this will quickly become a priority. For us as long as the actual way of identifying and giving snponly is good we can continue working off of a fork for a while if need be

I'll definitely re-build this first only because I'm not sure if ipxe is reproducible and would like to find out.

It did seem to change the checksums of all ipxe files when I did a make on all targets

I'll definitely re-build this first only because I'm not sure if ipxe is reproducible and would like to find out.

It did seem to change the checksums of all ipxe files when I did a make on all targets

Were you using nix-shell and same version of gcc?

Also just to note.. this was really complicated to get through all of the nested makes to finally get it compiled and working on our machines.

Yep I through this together a few years ago and it worked pretty well at the time, but I'm seeing now that the rules/deps aren't tracked correctly. Let me see about fixing that.
Thanks for going through it.

gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

It wasn't too bad.  Just took some reading through make files to understand what needed done to update the specific files.  Read a bit through go-bindata to understand that.  But overall It only took me 2-3 hours to figure out once I sat down and started.  So not bad at all really. :)

Just checking in here.  Anything I need to change on this PR?

@mmlb @nathangoulding any thoughts on how we can move this forward?  We're moving our evaluation forward and would really rather not maintain a fork increases complexity a lot

I hate to keep bumping this.. but also would like to see this merged or have chance to make the needed changes so this can be merged.  🙏 Happy New Years!

I hate to keep bumping this.. but also would like to see this merged or have chance to make the needed changes so this can be merged.  🙏 Happy New Years!

Hey @geekgonecrazy sorry about ghosting, I lost notifications of this. I'm picking this back up atm.

Hey @geekgonecrazy sorry about ghosting, I lost notifications of this. I'm picking this back up atm.

No problem happens all too easy with GitHub notifications :)
Perfect timing as well as will be focusing in on tinkerbell

No problem happens all too easy with GitHub notifications :)
Perfect timing as well as will be focusing in on tinkerbell

Hey @geekgonecrazy so I've opened up https://github.com/tinkerbell/boots/pull/117 and would like to rebase this PR on top of that one, but I'm running into a build issue atm which needs to get figured out first.

Hey @geekgonecrazy so I've opened up https://github.com/tinkerbell/boots/pull/117 and would like to rebase this PR on top of that one, but I'm running into a build issue atm which needs to get figured out first.

if anything I can do to help out with it definitely let me know :+1:

if anything I can do to help out with it definitely let me know :+1:

@geekgonecrazy do you have the "Allow Maintainers" to push commits checked? I tried rebasing on top of latest master but can't push :(.

@geekgonecrazy do you have the "Allow Maintainers" to push commits checked? I tried rebasing on top of latest master but can't push :(.

Hmm also in other news, this PR isn't going to work out in this form. We can't do snponly because we need to keep the ability to use other nics in iPXE scripts. I asked in irc and got:

17:00  mmlb: the "only" part of "snponly" means that you won't get any other NICs.  Use ipxe.efi (or snp.efi) instead if you want access to the other NICs in the system

Would snp work for your case? If not we might need to come up with something a bit more clever than just x64 EFI == snponly

Hmm also in other news, this PR isn't going to work out in this form. We can't do snponly because we need to keep the ability to use other nics in iPXE scripts. I asked in irc and got:

17:00  mmlb: the "only" part of "snponly" means that you won't get any other NICs.  Use ipxe.efi (or snp.efi) instead if you want access to the other NICs in the system

Would snp work for your case? If not we might need to come up with something a bit more clever than just x64 EFI == snponly

@geekgonecrazy do you have the "Allow Maintainers" to push commits checked? I tried rebasing on top of latest master but can't push :(.

Would snp work for your case? If not we might need to come up with something a bit more clever than just x64 EFI == snponly

I think snp would be fine.  I used it because from my perspective if it hits boots on that interface there isn't much need for it to be able to use the other interfaces on the machine as thats obviously the one connected to the network that boots is on.

@geekgonecrazy do you have the "Allow Maintainers" to push commits checked? I tried rebasing on top of latest master but can't push :(.

Would snp work for your case? If not we might need to come up with something a bit more clever than just x64 EFI == snponly

I think snp would be fine.  I used it because from my perspective if it hits boots on that interface there isn't much need for it to be able to use the other interfaces on the machine as thats obviously the one connected to the network that boots is on.

Hmm odd, I'm getting:
git push -f
ERROR: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to 'github.com:geekgonecrazy/boots.git'
Exception: git exited with 1
[tty 15], line 1: git push -f

Hmm odd, I'm getting:
git push -f
ERROR: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to 'github.com:geekgonecrazy/boots.git'
Exception: git exited with 1
[tty 15], line 1: git push -f

Looks like that was due to and fixed by https://github.com/git-lfs/git-lfs/issues/2291#issuecomment-305887405. One more reason to avoid lfs I guess :D

Looks like that was due to and fixed by https://github.com/git-lfs/git-lfs/issues/2291#issuecomment-305887405. One more reason to avoid lfs I guess :D

Ok I've pushed my rebase. @geekgonecrazy can you rework for snp.efi instead of snponly.efi? We can't go snponly because we have use cases where a client wants to chainload to another ipxe script that  fetches  files from a different nic connected to a separate segment.

Ok I've pushed my rebase. @geekgonecrazy can you rework for snp.efi instead of snponly.efi? We can't go snponly because we have use cases where a client wants to chainload to another ipxe script that  fetches  files from a different nic connected to a separate segment.

@mmlb sure thing.  What about the actual binary.  Does it need compiled and checked in still?

@mmlb sure thing.  What about the actual binary.  Does it need compiled and checked in still?

Skip the building the binary, I think we'll just get #116 in first?

Skip the building the binary, I think we'll just get #116 in first?

@geekgonecrazy still up to continue this PR? If not I can get it past the finish line.

@geekgonecrazy still up to continue this PR? If not I can get it past the finish line.

sorry for delay.  I think that does it.  I need to get new binary built and do full end to end testing again. :see_no_evil:

sorry for delay.  I think that does it.  I need to get new binary built and do full end to end testing again. :see_no_evil:

@mmlb ok I think I rebased everything properly.  :crossed_fingers:

ok wow.  A few force pushes later.  Commit renamed and title changed of the PR

ah sorry and added more detailed commit message. Thanks :)

No worries, :D. Testing it over here on our end, looking to merge soon!

I'm reviewing some stale PRs, this one got some good momentum, but seems to have fizzled out. Can anything be done to revive it? I imagine there's been a lot of drift that may complicate the rebasing.

@ScottGarman I fixed the conflicts I believe.  But based on the changes i'm not sure if something else might be missing for build?

Looks like go vet caught an issue to fix.

It looks like yet another change made to master that now conflicts.  It’d be nice to get this merged so we can stop playing this merge conflict game.  🙏 Let me know if you’ll be ready to merge and I can fix again.

It looks like yet another change made to master that now conflicts. It’d be nice to get this merged so we can stop playing this merge conflict game. 🙏 Let me know if you’ll be ready to merge and I can fix again.

Sorry that this sat unmerged long enough to get another merge conflict. Please rebase and then ping me and @mmlb directly so that we can take another look.
Thanks so much for continuing to drive this forward!

Hey @geekgonecrazy, apologies for this being such a moving target to get through. If you would like, we could pair up to get this through? If that's something of interest to you, you can reach out to me on the Tinkerbell slack here and we can get this pushed through! Thanks for your patience and contributions!

This is still very relevant and I'd say blocking this PR from getting merged.

Hmm also in other news, this PR isn't going to work out in this form. We can't do snponly because we need to keep the ability to use other nics in iPXE scripts. I asked in irc and got:

17:00  mmlb: the "only" part of "snponly" means that you won't get any other NICs.  Use ipxe.efi (or snp.efi) instead if you want access to the other NICs in the system

Would snp work for your case? If not we might need to come up with something a bit more clever than just x64 EFI == snponly

I'm :+1: for adding snponly builds of ipxe but can't enable by default for x86 UEFI. We'd have to come up with some means to choose snponly over the current .efi build.

There isn't really a good way to specify an ipxe binary or quirk in the hardware data model, but I can very see adding something like that. Real hardware is quirky, I can definitely see situations where different machines would have competing/mutually exclusive needs for ipxe builds.

Closing this PR as stale. Please reopen this PR when you are ready to retake a look at it. Thank you for your contribution!


Grammar correction

v2.11.0

You are running PHP CS Fixer with xdebug enabled. This has a major impact on runtime performance.
If you need help while solving warnings, ask at https://gitter.im/PHP-CS-Fixer, we will help you!
Loaded config default from "/applications/listings/.php_cs".
Paths from configuration file have been overridden by paths provided as command arguments.

The last sentence should read: ..... Paths from configuration file has been .....

Just realised it is PathS :)

no worry, thanks for raising the ticket anyway ! that's good attitude !


Could you please release the trained model weights file?

have you got the model weights file?

@PKUbahuangliuhe could you share the weights files? thanks a lot!

have you got the model weights file?


[RFC] XGBoost 1.1.0 Release Candidate

Roadmap: #5337
We are about to release version 1.1.0 of XGBoost. In the next two weeks, we invite everyone to try out the release candidate (RC).
Feedback period: until the end of ~May 8, 2020~ May 15, 2020 (extended because we made RC2). No new feature will be added to the release; only critical bug fixes will be added.
@dmlc/xgboost-committer
Now available

Python package. RC2 available on PyPI. Try it out with the command

python3 -m pip install xgboost==1.1.0rc2

R package. RC2 available from the Releases section. Download the tarball file xgboost_<IP_ADDRESS>.tar.gz and run

R CMD INSTALL xgboost_<IP_ADDRESS>.tar.gz

JVM packages. RC2 available from our Maven repository. Add XGBoost4J as dependency to your Java application.

Maven
<dependencies>
  ...
  <dependency>
      <groupId>ml.dmlc</groupId>
      <artifactId>xgboost4j_${scala.binary.version}</artifactId>
      <version>1.1.0-RC2</version>
  </dependency>
  <dependency>
      <groupId>ml.dmlc</groupId>
      <artifactId>xgboost4j-spark_${scala.binary.version}</artifactId>
      <version>1.1.0-RC2</version>
  </dependency>
</dependencies>

<repositories>
  <repository>
    <id>XGBoost4J Release Repo</id>
    <name>XGBoost4J Release Repo</name>
    <url>https://s3-us-west-2.amazonaws.com/xgboost-maven-repo/release/</url>
  </repository>
</repositories>

For scala.binary.version, you may choose 2.11 or 2.12.
SBT
libraryDependencies ++= Seq(
  "ml.dmlc" %% "xgboost4j" % "1.1.0-RC2",
  "ml.dmlc" %% "xgboost4j-spark" % "1.1.0-RC2"
)
resolvers += ("XGBoost4J Release Repo"
              at "https://s3-us-west-2.amazonaws.com/xgboost-maven-repo/release/")

TODOs

[x] Create a new branch release_1.1.0.
[x] Create Python wheels and upload to PyPI.
[x] Upload RC2 to our Maven repo.
[x] Create a tarball for the R package and upload to the Releases section
[ ] Write release note

Known limitations

(Python package) When early stopping is activated with early_stopping_rounds, the prediction method (xgb.train()) behaves in a surprising way. If XGBoost runs for M rounds and chooses iteration N (N < M) as the best iteration, then the prediction method will use M trees by default. To use the best iteration (N trees), users will need to manually take the best iteration field  bst.best_iteration and pass it as the ntree_limit argument to xgb.predict(). See #5209 for additional context.
GPU ranking objective is currently not deterministic (#5561).
When training parameter reg_lambda is set to zero, some leaf nodes may be assigned a NaN value. (See discussion) For now, please set reg_lambda to a nonzero value.

Deprecation notices

Python 3.5. This release is the last release to support Python 3.5. The following release (1.2.0) will require Python 3.6.
CUDA 9.0. This release is the last release to support CUDA 9.0. The following release (1.2.0) will require CUDA 10.0.
Scala 2.11. Currently XGBoost4J supports Scala 2.11. However, if a future release of XGBoost adopts Spark 3, it will not support Scala 2.11, as Spark 3 requires Scala 2.12+. We do not yet know which XGBoost release will adopt Spark 3.
Python package manager (Pip). Your Linux machine may have an old version of Pip and may attempt to install a source package, leading to long installation time. This is because we are now using manylinux2010 tag in the binary wheel release. Ensure you have Pip 19.0 or newer by running python3 -m pip -V to check the version. Upgrade Pip with command

python3 -m pip install --upgrade pip

Outstanding patches that should make it into the 1.0.0 release:
Merged after RC1:

[x] #5596
[x] #5597, #5602, #5606
[x] #5600
[x] #5604
[x] #5617

When early stopping is activated with early_stopping_rounds, the prediction method (xgb.train()) behaves in a surprising way. If XGBoost runs for M rounds

That's only true for Python.

@trivialfis Thanks. I've added (Python package) prefix.

RC2 is released.

Added merged after RC2 section.

1.1.0 is now on PyPI. I'm still working on the release note and will put it up soon.


fixing [#868] bug where deepgram client fails due to langauge

Description:
This PR fixes a bug in the DeepgramSTTService where the language parameter, defined as an enum, was causing a WebSocket connection failure during the pipeline initialization. The issue occurred because Deepgram's API expects the language parameter as a string, but an enum was being passed directly.
Changes Made:

Ensured the language parameter is converted from an enum to its string value (Language.EN.value) before being passed to the API.

Thanks for the proposed fix!
For whatever reason I can't repro this, but this does seem like the right thing to do.
One suggestion, since it's also possible to pass a string via live_options, let's add a check like this:
if hasattr(merged_options.language, "value"):
    merged_options.language = merged_options.language.value

This will allow either a string of an enum to be passed. With that, I think this change is ready.

@markbackman this is up for review, lmk if there is any change required.

@markbackman pushed once more change as per ruff, for some odd reason pycharm ruff didn't catch it 🤦

The linter wants it as:
# deepgram connection requires language to be a string
if isinstance(merged_options.language, Language) and hasattr(
    merged_options.language, "value"
):
    merged_options.language = merged_options.language.value

That is, one less tab before merged_options.language, "value".

Had the same issue. This did the trick to make the deepgram client connect successfully, but it messed up the TTS audio (using elevenlabs) in the downstream frames.

@jonnyjohnson1 do you mind filing a separate issue for what you're seeing with ElevenLabs? Might it be that the TTS audio issue is unrelated and now that the STT error is resolved, the TTS error is revealed?

Possibly. I'll create an issue for it


AssertionError error thrown during Epoll channel cleanup

We received a bug report [1] that our client which uses Netty 4.1.14, was failing some user tests due to throwing an assertion error:

java.lang.AssertionError
at io.netty.channel.epoll.EpollEventLoop.remove(EpollEventLoop.java:159)
at io.netty.channel.epoll.AbstractEpollChannel.doDeregister(AbstractEpollChannel.java:142)
at io.netty.channel.epoll.AbstractEpollChannel.doClose(AbstractEpollChannel.java:118)
at io.netty.channel.epoll.AbstractEpollStreamChannel.doClose(AbstractEpollStreamChannel.java:703)
at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:685)
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$700(AbstractChannel.java:419)
at io.netty.channel.AbstractChannel$AbstractUnsafe$5.run(AbstractChannel.java:646)
at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:233)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:748)

Looking into the stracktrace, it seems that it is complaining the EpollEventLoop.remove() operation is not being run on the event loop thread. From the stack, it seems to be running on the GlobalEventExecutor.
Following the trace back to see how that might happen, I supposed it could be from that executor being returned here: https://github.com/netty/netty/blob/netty-4.1.14.Final/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java#L210 and used to schedule the task. If so, I also noticed the line before the executor was returned has actually already run the method throwing the assertion later when run on the executor. From the code it seemed like this would only happen with so_linger set, and indeed looking into the test further showed it does appear to be using options to set that.
[1] https://issues.apache.org/jira/browse/QPIDJMS-314

@gemmellr let me check

@gemmellr fixed by https://github.com/netty/netty/pull/7162. Please check

I gave #7162 a try out from the branch and it indeed looks to fix the issue, previously the originating client test showing the problem would fail first time for me, with the updated artifact it ran successfully in a loop for some time.
I noticed while doing so that the instructions at http://netty.io/wiki/native-transports.html#building-the-linux-native-transport could be outdated, as they mention installing libgcc.i686 glibc-devel.i686 which aren't for x86_64. Separately but related, I noticed the most recent netty-transport-native-kqueue snapshots published at https://oss.sonatype.org/content/repositories/snapshots/io/netty/netty-transport-native-kqueue/4.1.16.Final-SNAPSHOT/ lack the osx-x86_64 qualified artifact, though the oldest snapshot does have it.


[FX-5973] Update tag to span

FX-5973
Description
As we allow pass ReactNode to the Tag.Rectangular, users have errors when passing something else than span, because different tags cannot be rendered inside paragraph. Tag is also rendered as a span.
How to test

Temploy
FIXME: Add the steps describing how to verify your changes

Screenshots

Before.
After.

Insert screenshots or screen recordings
Insert screenshots or screen recordings

Development checks

[x] Add changeset according to guidelines (if needed)
Double check if picasso-tailwind-merge requires major update (check its README.md)
Read CONTRIBUTING.md and Component API principles
[x] Make sure that additions and changes on the design follow Toptal's BASE design, and it's been already discussed with designers at #-base-core
Annotate all props in component with documentation
Create examples for component
[x] Ensure that deployed demo has expected results and good examples
Ensure the changed/created components have not caused accessibility issues. How to use accessibility plugin in storybook.
[x] Self reviewed
Covered with tests (visual tests included)

Breaking change

codemod is created and showcased in the changeset
test alpha package of Picasso in StaffPortal

All development checks should be done and set checked to pass the
GitHub Bot: TODOLess action

PR commands

List of available commands:

@toptal-bot run package:alpha-release - Release alpha version
@toptal-anvil ping reviewers - Ping FX team for review

PR Review Guidelines

When to approve? ✅
You are OK with merging this PR and

You have no extra requests.
You have optional requests.

Add nit: to your comment. (ex. nit: I'd rename this variable from makeCircle to getCircle)

When to request changes? ❌
You are not OK with merging this PR because

Something is broken after the changes.
Acceptance criteria is not reached.
Code is dirty.

When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:

There are leftovers like unnecessary logs, comments, etc.
You have an opinionated comment regarding the code that requires a discussion.
You have questions.

How to handle the comments?

An owner of a comment is the only one who can resolve it.
An owner of a comment must resolve it when it's addressed.
A PR owner must reply with ✅ when a comment is addressed.

@toptal-bot run package:alpha-release

@toptal-anvil ping reviewers

@toptal-anvil ping reviewers

@toptal-anvil ping reviewers


fixing some additional formatting blips

Wraps some long blocks, adds some carriage returns that were preventing code gating, and hints said code blocks as none where the bash highlighting would be confusing.
Signed-off-by: LRubin<EMAIL_ADDRESS>

Deploy preview ready!
Built with commit b817088c57b7bdbeee1f4130733ae6dcc051731a
https://deploy-preview-851--docker-docs.netlify.com

Confirmed that this fixes formatting. Merging.


flutter config should show current configuration settings

The current output shows what can be set but does not show current values for those settings...
$ flutter config
Configure Flutter settings.

The Flutter tool anonymously reports feature usage statistics and basic crash reports to help improve
Flutter tools over time. See Google's privacy policy: https://www.google.com/intl/en/policies/privacy/

Usage: flutter config [arguments]
-h, --help                  Print this usage information.
    --[no-]analytics        Enable or disable reporting anonymously tool usage statistics and crash reports.
    --gradle-dir            The gradle install directory.
    --android-studio-dir    The Android Studio install directory.

Run "flutter help" to see global options.
Analytics reporting is currently enabled.

It does show, at the bottom:
Settings:
  gradle-dir: /Users/devoncarew/homebrew/

Perhaps if not settings are set if should say something to that effect?

Exactly. Its not obvious to the new user that the values are unset or have a default value if there is one.

Yeah, this is not at all obvious.  But should be an easy fix.

This is covered in our documentation now (for web.desktop) and should be sufficient, clsoing


add "group filter" feature

i my case i need to change default order of groups.
In this realisation order can be set by array of groupName or function "groupsFilter" ( work like group-by)

resolve the same issues as #356

Can you please add an example somewhere in /examples?

done

Ah, your changes are in the /dist directory.  These files are only changed when we push a new release so we'll need to make sure there are no changes in /dist

but if i not change dist, the demo will not work,
so i need to revert changes in dist ?

Yup, it will work after we merge, I will build dist.  Sorry for the workflow, it's confusing, I agree and I know.

This was merged at #969


fix: Collection page query over-fetching

PR Type

[ ] Bugfix
[ ] Feature
[x] Refactoring

Context

fix: removed unnecessary extra call with all nfts
fix: removed duplicate get collection drops api calls
perf:get collection drops earlier
[x] Closes #11038
[x] Closes #11041
[x] Closes #11046
[x] Closes #11055

Before

After

Screenshot 📸

[x] My fix has changed something on UI;

Before

After

Not sure if it's my network. It did not show the basic info about collection when I opened the link:
https://deploy-preview-11039--koda-canary.netlify.app/ahk/collection/u-2024

@Jarsen136 fixed, can you check again

The chart can't be shown. It could be fixed on another issue as it's also happening in Canary.

@Jarsen136 added https://github.com/kodadot/nft-gallery/issues/11055 in this pr  8a0cc9d
that page is heavy  so the issue might be that it takes a lot of time,, it's working on my end ,  can you try again ?

@Jarsen136 added #11055 in this pr -> 8a0cc9d
that page is heavy so the issue might be that it takes a lot of time ( related with #10416 ) , it's working on my end , can you try again ?

Awesome, it works well on my side. Thank you!


added theme: graywhite

The PR adds a new theme (graywhite).

Hey there! Please pull the typescript codebase, and use prettier formatting before pushing 😁 sorry for the inconvenience!

@janaSunrise The former is not necessary, as the forked repo does include it. As for the latter, I will make a new PR instead (formatted w/ prettier); I will tag both of you there.


MapFileResolver returns null if asked for delisted tickers

Description

Update dates logic in MapFileResolver.ResolveMapFile(symbol, date) for cases where asked date is posterior to delisting date.
Also, check for null at SecurityIdentifier.GetFirstTickerAndDate.
Related Issue

Closes #4049
Motivation and Context

If we ask for a ticker for a date posterior to its delisting, MapResolver shouldn't return any map at all.
Requires Documentation Change

No.
How Has This Been Tested?

New test was added, all tests are green.
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] Refactor (non-breaking change which improves implementation)
[ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[x] My code follows the code style of this project.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.
[x] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

The actual behavior, i.e. return the latest available map file even when delisted, was intended.
It was explicitly tested here:
https://github.com/QuantConnect/Lean/blob/835c99e55c2ff8ca41d694c608c56e336767d94c/Tests/Engine/DataFeeds/Auxiliary/MapFileResolverTests.cs#L134
Also, algorithm.AddEquity("AAA", Resolution.Daily); uses today as date for resolving the map file.


ftp is still broken

Are you guys ever going to fix the ftp so that the the legacy paths still work?  If not, you should at least post up a file of old_path -> new_path  for files that existed prior to the change.  It is sort of maddening that this happened with out public notice.

I will work on it this morning.
-M

On Mar 22, 2018, at 8:45 AM, jimdavis1<EMAIL_ADDRESS>wrote:
Are you guys ever going to fix the ftp so that the the legacy paths still work?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/PATRIC3/patric3_website/issues/1926, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLd73cYjQnVf4U9_UepOrH7mc5UVKAvks5tg6rggaJpZM4S3Esj.

Is there anything specific you were looking for?

On Mar 22, 2018, at 8:47 AM, Maulik Shukla<EMAIL_ADDRESS>wrote:
I will work on it this morning.
-M

On Mar 22, 2018, at 8:45 AM, jimdavis1<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Are you guys ever going to fix the ftp so that the the legacy paths still work?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/PATRIC3/patric3_website/issues/1926, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLd73cYjQnVf4U9_UepOrH7mc5UVKAvks5tg6rggaJpZM4S3Esj.

We are REQUIRED to maintain the two FTP links to the AMR data that we published in previous papers.  This means that these links must remain active (I don't care if they redirect).
ftp://ftp.patricbrc.org/BRC_Mirrors/AMR/  and
ftp.patricbrc.org/patric2/current_release/RELEASE_NOTES/PATRIC_genomes_AMR.txt

Jim issue triage comment: Highest level problem.  We have published FTP links in previous papers that must be maintained and kept up to date (check out: https://www.nature.com/articles/srep27930).
In my view this is the worst kind of problem because it erodes user trust.  Furthermore, we are staking our reputations on the reliability of PATRIC, and this is a case where that is not happening.

ftp://ftp.patricbrc.org/patric2/patric3/genomes/9606.33
Doesn't seem to work


match handshake csv

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

34 of 34 (100.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+3.3%) to 88.421%

Totals

Change from base Build<PHONE_NUMBER>:
3.3%

Covered Lines:
168

Relevant Lines:
190

💛  - Coveralls


Release 5.4.3

Bumps the version number and fixes CircleCI. Unfortunately, Travis is still timing out.

Now that the Angular team is starting to finish up Ivy, they're starting to look at projects that have been neglected. I can't speak for them, but I think the intention is to do more with Protractor in the next few months.


Figure out how to run pytests in parallel

Right now, everything is single-threaded and boxed because things can interfere with each other through global roscore processes otherwise.

Note that simulation tests are not yet running in boxed environments. We might need to do so when we have multiple test files.

So throwing some thoughts out.
Currently in test_utils/mock_nodes, the listener node is created and then we do a crappy attempt to tear it down at each iteration, this sometimes works, but not always.
Another option is to create a single "test_listener_node". Then, this listener subscribes and unsubscribes to topics for each test, but the node is essentially a singleton that self-modifies instead of being recreated. This is a bit more stuff to self manage, but not a whole lot more.
This also allows multiple listeners in multiple threads, meaning that you can run this in parallel pretty easily, as long as you prepend a test namespace per test, even on a single roscore.
The other thing we can try to do is create multiple roscores, but that is still proving difficult.

update: I think I know how to spawn multiple roscores, finally!!!
(this also allows multiple gazebo's in parallel)