[Feature Request] Add API Key Ability

Hi, first of all, great work!
In the Ollama server instance I have, I require the use of an API Key for each request in the header. In the documentation of this node, I don't see the ability to add an API Key for every call, could this be updated as a setting in a future release?
Thank you!

Hi @iotemylabs
Thank you for your kind words :)
First of all, could you let me know if sending an API Key is actually supported by Ollama.js (and Ollama itself), and I just forgot to implement it?
Or maybe you have a custom Ollama setup that supports receiving API Keys?
Alternatively, are you perhaps referring to a completely independent server that accepts requests and then forwards them to Ollama?
If it's the first case, please point me to where in the Ollama/Ollama.js documentation the API Key parameter is mentioned, and I'll be happy to correct my oversight as soon as possible.
The other two cases would fall outside the scope of this project.
The goal of this project is to stick strictly to the functionality provided by Ollama.js without going beyond what this library offers.
Of course, that doesn't mean I don't want to help. Maybe it’s just a matter of creating a new project that builds upon this one but adds the functionality needed for your specific use case.


Need advice on creating query against Azure Search

When a client calls our API, we want to query Azure Search Index and return them the results.
I like to know which is the best way to convert GraphQL queries to Azure Search API calls? i.e. how should we convert a Graph QL Projection and where clause to Azure Search index query? If you can point us to best and easy way to do this, its much appreciated!!

How do you query azure serach outside the context of graphql?

We use this SDK - https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk to query Azure Search. The where clause required is in OData. The whereclause which we will get in GraphQL will be a different format though.
So one option is to define a filter like where: filter eq 'ODATA string in azure search format'. The other option will be to navigate the GraphQL AST and convert graphql where clause (like name eq 'ashish' and age > 15) to ODATA format.
Are there other options, which option is best way to do this?


Define Goal - Iteration 2

Acceptance Criteria
Scenario 1
GIVEN I am on the Decision Making Framework
WHEN I click on the info icon next to the title text
THEN I should see content as 'Defining the goal will help you determine what kind of information you need to make a decision.'
Scenario 2
GIVEN I am on the Decision Making Framework
WHEN I am on the Define Goal screen
THEN I should see question text as 'What decision are we trying to make?'
AND hint text as Think of SMART Goals, Specific, Measurable, Achievable, Realistic, Time-based
Scenario 3
GIVEN I am on the Define Goal screen
WHEN I check the input field height
THEN it should be equal to pixels equivalent to 3 lines

@luan-murilo-de-oliveira-e-souza @leilafaez can either of you pick this one up as well

@m-gurung11 Hi Milan,
I have added the question mark after "Whats is the goal",
But I have changed the second point , but I did not get what do you mean by hint text!
Do you mean a tool tip with SMART Goal Modal?

@mhallaq , sorry I meant this:


404: https://github.com/godotengine/godot/issues/CONTRIBUTING.md

Godot version
3.2.3.stable
System information
Windows 10
Issue description
FYI: https://github.com/godotengine/godot/issues/CONTRIBUTING.md is offline. About to file a bug and read the doc and found it missing.
Steps to reproduce
Navigate to https://github.com/godotengine/godot/issues/CONTRIBUTING.md
Minimal reproduction project
No response

Where did you find this link?

Oh, on the bug reporting page. Got there from a google search for godot bugs.
https://github.com/godotengine/godot/issues/new?assignees=&labels=&template=bug_report.yml

Here's the actual link on the page which is different from what you posted: https://github.com/godotengine/godot/issues/CONTRIBUTING.md#reporting-bugs


Need support for Raven2

I installed hackintosh on my AMD
LAPTOP, but the microphone type is  raven2.Could you please add the support for raven2?

I tested it and it works.


Hyprland crashes on startup

Here is the error:
Hyprland: symbol lookup error: Hyprland: undefined symbol: _ZN10Hyprcursor18CHyprcursorManagerC1EPKcPFv19eHyprcursorLogLevelPcE

how did you install hyprland(package manager or built manually)?

This is an issue on your end. Probably something is compiled wrong

how did you install hyprland(via package manager or built manually)?

I installed it from OpenSUSE official repos

Still happens on OpenSUSE tumbleweed. Guess the package is booked.


Fix observability

Reworking the observability stack to get metrics, logs and events from all differentes phases of processing.

Not a fan of having the "exposed" API with individual actions instead of just calling pushEvent() directly, but 🤷

As discussed refactor with PushEvent() only exposed.


Specify that any dir with specs can be published

Adding the Gauge spec for this scenario revealed that Gauge (core Gauge,
not this Gauge Confluence plugin) currently has a bug where the spec
details are not being propagated as they should be to documentation
plugins.  That means that the Gauge spec added in this test will
fail (which also means that this pull request will have a failed build
and so  cannot be merged) until the bug in core Gauge is fixed.

The bug in core Gauge has now been fixed and merged, in release 1.4.2, meaning that this PR is now ready to be merged as well, as soon as it has one approving review.


[5.4] Container:Extend and Rebinding bug or feature?

Laravel Version: 5.4.23
PHP Version:7.1
Database Driver & Version:NA

Hi，
Recently, I am learning the source code of container, there is something that I can not figure out whether it is a bug or a feature:
Description:
This is a test for bind():
    public function testExtendReBinding()
    {
        $_SERVER['_test_rebind'] = false;

        $container = new Container;
        $container->rebinding('foo',function (){
            $_SERVER['_test_rebind'] = true;
        });
        $container->bind('foo',function (){
            $obj = new StdClass;

            return $obj;
        });

        $container->make('foo');

        $container->extend('foo', function ($obj, $container) {
            return $obj;
        });

        PHPUnit_Framework_Assert::assertFalse($_SERVER['_test_rebind']);
    }

If we use bind() function to bind abstract, the rebinding() will not be fired by extend() after make() function.
However,this is a test for instance():
    public function testExtendReBindingInstance()
    {
        $_SERVER['_test_rebind'] = false;

        $container = new Container;
        $container->rebinding('foo',function (){
            $_SERVER['_test_rebind'] = true;
        });

        $obj = new StdClass;
        $container->instance('foo',$obj);

        $container->make('foo');

        $container->extend('foo', function ($obj, $container) {
            return $obj;
        });

        PHPUnit_Framework_Assert::assertTrue($_SERVER['_test_rebind']);
    }

if we use instance() function to bind abstract, the rebinding() will be fired by extend().
So extend() will have different affect on rebinding() under bind() and instance(), is it reasonable?

I'm sorry but this is not the right place for such questions, please use the forums, I'm sure people will help you there.


IndexedDB

Use IndexedDB to add offline functionality
Ensure transactions created while offline, are automatically uploaded to MongoDB upon re-connection

Integrated under: commit dbede61022ae4761709b7a5230154fd1b92899c9 .


Some changes on top of 0.9

These are the changes we made on top of 0.9 in order to prevent a memory leak and unnecessary reconnects

Sorry but I can't understand where your changes solves which leak problems

Now I have bit more time to elaborate:

Many messages are stored in the MessagesStore and never deleted. They would have been deleted on reconnect but for our usecase that never really happens and thus the MessageStore grows infinitely. We pulled out the remove method to the interface and added calls to it in relevant places. As we remove the message, there is no way to call the onAcknowledged handler anymore (and we don't need it so we just removed it, sorry :-D )

Using isWritable means that we completely skip the Netty queue. isWritable returns false if the channel is active but currently busy - enqueuing in that situation is IMHO the wrong decision.

We removed the PUBACK handler as a broker shouldn't receive a PUBACK (or should it? we are mere beginners in working with MQTT so please tell me if we are wrong here!)

Messages with QOS2 were stored with two different GUIDs, this is fixed in MessagesPublisher

I'm keen to get your feedback on our changes as you are the expert here. Sorry for not rebasing this onto the latest master but this is happening during paid working hours :-D

On Wed, Mar 22, 2017 at 10:41 PM, fbeister<EMAIL_ADDRESS>wrote:

Now I have bit more time to elaborate:

This is a fail in the protocol spec, if a client is with clean session
false and never reconnect, the broker must store the messages. We could
think to something like TTL or a command line too that clean old messages.
In this are MQTT v5 solve this issue introducing the concept of TTL.

Many messages are stored in the MessagesStore and never deleted. They
would have been deleted on reconnect but for our usecase that never really
happens and thus the MessageStore grows infinitely. We pulled out the
remove method to the interface and added calls to it in relevant places. As
we remove the message, there is no way to call the onAcknowledged handler
anymore (and we don't need it so we just removed it, sorry :-D )
You are right, I'm the way to move the persistent queue out of MapDB so
that impact also this queuing, I expect to change this.

Using isWritable means that we completely skip the Netty queue.
isWritable returns false if the channel is active but currently busy -
enqueuing in that situation is IMHO the wrong decision.
No, when the broker publish QoS1 to a Subscriber it has to listen for the
PUBACK from the subscriber (the same for the QoS2 messages, the publish
from the server is dual to what append when the broker receives a publish)

We removed the PUBACK handler as a broker shouldn't receive a PUBACK
(or should it? we are mere beginners in working with MQTT so please tell me
if we are wrong here!)
I've to check this, is not good if the broker has such behaviour

Messages with QOS2 were stored with two different GUIDs, this is fixed
in MessagesPublisher
Can you share more details about the project (just to let me know in which
contexts Moquette are used)

I'm keen to get your feedback on our changes as you are the expert here.
Sorry for not rebasing this onto the latest master but this is happening
during paid working hours :-D
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/andsel/moquette/pull/287#issuecomment-288548890, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA_Y0WPTVt3yTKCMQg04scftbzkQPHKvks5roZWVgaJpZM4Mj1HN
.

On 22.03.2017 23:08, Andrea Selva wrote:

On Wed, Mar 22, 2017 at 10:41 PM, fbeister<EMAIL_ADDRESS>wrote:

Now I have bit more time to elaborate:

This is a fail in the protocol spec, if a client is with clean session
false and never reconnect, the broker must store the messages. We could
think to something like TTL or a command line too that clean old messages.
In this are MQTT v5 solve this issue introducing the concept of TTL.

Can't we delete the message when all clients have acknowledged the
message (immediately for Qos0, on PUBACK for QoS1 and on PUBCOMP for
Qos2) as done in the pull request? Moquette is keeping messages it has
already received acknowledgements for.

Many messages are stored in the MessagesStore and never deleted. They
would have been deleted on reconnect but for our usecase that never really
happens and thus the MessageStore grows infinitely. We pulled out the
remove method to the interface and added calls to it in relevant
places. As
we remove the message, there is no way to call the onAcknowledged handler
anymore (and we don't need it so we just removed it, sorry :-D )
You are right, I'm the way to move the persistent queue out of MapDB so
that impact also this queuing, I expect to change this.

Using isWritable means that we completely skip the Netty queue.
isWritable returns false if the channel is active but currently busy -
enqueuing in that situation is IMHO the wrong decision.
No, when the broker publish QoS1 to a Subscriber it has to listen for the
PUBACK from the subscriber (the same for the QoS2 messages, the publish
from the server is dual to what append when the broker receives a publish)

Oh, I see. I have put the respective call to processPubAck back in. The
onAcknowledge handler doesn't work after making the changes to the
message deletion so in our codebase we just removed it. Depending on the
outcome of the above discussion, the handling here might have to be
revamped.

We removed the PUBACK handler as a broker shouldn't receive a PUBACK
(or should it? we are mere beginners in working with MQTT so please
tell me
if we are wrong here!)
I've to check this, is not good if the broker has such behaviour

Messages with QOS2 were stored with two different GUIDs, this is fixed
in MessagesPublisher
Can you share more details about the project (just to let me know in which
contexts Moquette are used)

We do detection of UAV (commercial drones) with distributed sensors.

I'm keen to get your feedback on our changes as you are the expert here.
Sorry for not rebasing this onto the latest master but this is happening
during paid working hours :-D
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/andsel/moquette/pull/287#issuecomment-288548890,
or mute
the thread

https://github.com/notifications/unsubscribe-auth/AA_Y0WPTVt3yTKCMQg04scftbzkQPHKvks5roZWVgaJpZM4Mj1HN

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/andsel/moquette/pull/287#issuecomment-288555314, or
mute the thread
https://github.com/notifications/unsubscribe-auth/AHLHvjzLxdjQLqI5y2nOZwBEqmH0kmXxks5roZv5gaJpZM4Mj1HN.

--
Frederic Beister
PGP Fingerprint = 75F7 F0DF 7DCA E46D EBB6 679C CA38 3D52 A3F5 478B


fix: ensure ftruncate writes envelope

Here's an attempt at a fix but I very strongly would love a thorough review and maybe some suggestions for other tests to run.
Extracted the creation of the envelope and wrapper header xattrs into a File method (initializeEnvelopeKey) and call it from both doWrite and truncateGrowFile.

That makes sense and actually could explain some of the other issues people have seen with certain products. I'd love @landrew3 opinion as well as he worked on the envelope encryption. I would be curious if the non-envelope option has the same issue or not. We might want to run it in "standard" mode as well to see if truncate causes any issues there. When running this in envelope mode, can you just truncate a file and cause these issues?

I did build master, initialized a new mount, and ran the test successfully without any of these changes.
Yes, the following test causes a panic on tkfs branch:
package main
import "os"
func main() {
        fn := "lizard/local/data/index/foo"
        os.Remove(fn)
        f, _ := os.OpenFile(fn, os.O_CREATE|os.O_WRONLY, 0600)
        f.Truncate(16384)
        f.Write(make([]byte, 16384))
}

A breakdown of what I found while debugging is at https://trustedkeep.atlassian.net/browse/TK-237?focusedCommentId=11339

I couldn't quite get xfstests to run (might be worth a backlog ticket) but this seems to be working through all sorts of truncating (grow/shrink) and as an rclone vfs cache dir.

The standard xfstests don't work with FUSE filesystems.  We had an adapted one (from https://github.com/rfjakob/fuse-xfstests I think) that we ran long ago.  Not sure if we still have the setup available or not.  In either case, this looks good for now.


[TACHYON-927] [Tachyon-perf] Remove unreachable catch block for IOException in tachyon.perf.fs#TachyonPerfFs

https://tachyon.atlassian.net/browse/TACHYON-927

Duplicate: #1486

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/Tachyon-Pull-Request-Builder/4746/
Test PASSed.


[Breaking change] Unify error handling

Unifying the error handling so that both GraphQL errors and network errors will be presented in the form of rejected promises or errors on observers. This makes it easier to deal with both types of errors and not have to always introduce two different types of error handling code.
TODO:

[x] Update CHANGELOG.md with your change
[x] Make sure all of the significant new logic is covered by tests
[x] Rebase your changes on master so that they can be merged easily
[x] Make sure all tests and linter rules pass

@stubailo should be ready for review

This looks great to me. Given that this is a big breaking change, I think we should prepare some other stuff to merge at the same time. Can you submit a PR to the docs for this as well?
@jbaxleyiii we probably have to do some stuff in react-apollo to support this, right? Perhaps we can just now pass through one ApolloError object, and people can read the properties off there?

@stubailo No change needed :+1:
So it won't be a breaking change in angular2-apollo or anything like that.

@stubailo Sure, I'll write up some docs that describe how ApolloError works and submit a PR for that.

@stubailo Added the above PR to apollostack/docs. I guess we can merge this + docs once we've introduced other breaking changes as well.

@Poincare thanks for updating docs for angular2! :)


Style guide?

Should we have a consistent style guide?

I assume this is beyond clang format? If it's not too onerous to read then I think it's a good idea

This is beyond clang format. It would be a set of broad rules as described in the docs (if we adopted our own) or it would be a link to one that has been written for another project/organization.
@junghans and @rbberger might have some insight into what a good style guide might be that we could point to.

We could automatically enforce with a code linter. The google style guide for example is enforced by cpplint.py which one can distribute with a project. That's what we do in Parthenon.

I thought I heard somewhere that google says don't follow the google style guide lol (I heard it was written for a specific project but is applied beyond that). But regardless, I'd be happy to have a style guide as long as it's fairly short and easy to digest. We don't need anything too pedantic and we don't need a million rules to follow.

Typically the style guides aren't too onerous. My understanding is that yes the google style guide has some problems and is very google-specific though.

@Yurlungur Don't remember who to quote on that, but as far as I remember even Google itself discourages other projects to use their style guide, since it is very specific for them.


Elasticsearch 2.0 support

This plugin will not install on Elasticsearch 2.0.
root@elasticsearch-vagrant:/usr/share/elasticsearch-2.0.0/elasticsearch_2.0.0# bin/plugin install polyfractal/elasticsearch-segmentspy
-> Installing polyfractal/elasticsearch-segmentspy...
Trying https://github.com/polyfractal/elasticsearch-segmentspy/archive/master.zip ...
Downloading ..................................................................................................................DONE
Verifying https://github.com/polyfractal/elasticsearch-segmentspy/archive/master.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
ERROR: Could not find plugin descriptor 'plugin-descriptor.properties' in plugin zip
root@elasticsearch-vagrant:/usr/share/elasticsearch-2.0.0/elasticsearch_2.0.0#

plugin-descriptor.properties

Had same issue. Download and unpack in pugins folder then create  "plugin-descriptor.properties":
description=segmentspy
version=master
site=true
name=segmentspy �
Restart elastic. Plugin is really beautiful.


Update ignored words

Add/fix typos which are currently failing on develop.

@AlexejPenner oh! I just saw your message now :) Too late...


[FEATURE] Prior to vertica 11 doesn't have session level parameter for AWSEnableHttps.

Spark connector V2 try to alter session for AWSEnableHttps but prior to vertica 11 doesn't support session level parameter for AWSEnableHttps.
So this connector doesn't work for prior to vertica 11 and object storage that is not configured ssl mode.
vertica=> select version(), parameter_name, allowed_levels from configuration_parameters where parameter_name = 'AWSEnableHttps';
version               | parameter_name | allowed_levels
-------------------------------------+----------------+----------------
Vertica Analytic Database v10.1.1-6 | AWSEnableHttps | DATABASE

Thanks for the report. Likely for support of this in earlier Vertica versions, we'll have to rely on the user setting this globally and skipping this step.


WSL Patch for RSYNC

Add in Windows Subsystem for Linux capabilities.
The node-rsync package allows modifying the executable.  Added batch script to execute the command correctly on Ubuntu Bash.
Still missing ssh workaround for triggers as node-openssh doesn't allow swapping out the executable.  Added to readme notes about using native git ssh and keeping .ssh folders matching between C:\Users\username.ssh and bash home folder.

looks ok, might be more simple than using cygwin. but cygwin also comes with other tools. but choice is good.

i just published new release 0.9.19
you should get the update with your patch automatically in atom editor

Thanks!  I'll try to keep my eye out if any issues pop up but feel free to ping me if needed.  I'm pretty impressed with WSL thus far and rsync was really the only reason I found myself using cygwin these days.

sure, i try to keep the plugin up to date. but actually i am switching back to phpstorm and will use atom.io less, because itellisense on atom is really bad. and lately atom is unstable and indexing a lot etc. often freezes. not happy with it. but i will use it still sometimes in parallel.
so you are using the windows10 "bash" feature from the insider preview, so basically a tiny headless ubuntu in windows. i tried bash a bit but nothing works stable. so i stick with cygwin or use real linux on server or shell on osx. windows-bash is not ready for primetime yet.


Error list explodes in a vscode extension development environment

It's linting all of the downloaded VSCode-linux-x64 folder, .vscode-test should be ignored.

Duplicating with 7457 as at the end they are similar - ignoring files
duplicates #7457

Reopening this as #7457 is a different

@Tyriar I would like to reproduce this and see where and how these errors are generated from.. Can you please provide steps how you got this?
Thanks

@sandy081 try clone Tyriar/vscode-xml, run npm install, npm test and then open declares.d.ts

@Tyriar Typescript compiler is compiling all folders except node modules folder.. After updating tsconfig everything looks good
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"outDir": "out",
"noLib": true,
"sourceMap": true,
"rootDir": "."
},
"exclude": [
"node_modules",
".vscode-test"
]
}

Created https://github.com/Microsoft/vscode-generator-code/issues/42 to fix the problem at the yeoman generator then. Thanks.


Perspective of Returned Stable Matchings

Currently:

the resulting matching for SM is a dictionary with the men as keys
the resulting matching for HR is a dictionary with the residents as keys
the resulting matching for SPA is a dictionary with the students as keys

Proposal:
Either: Allow the user to specify which side of the matching should be used as the key.
Or: Include both perspectives together in the stable_matching dictionary.
Rationale for creating this issue:
I noticed this issue while check the results of the hospital-oriented HR algorithm against an existing example. The correct answer was given with the hospitals as the keys and sets of residents as values. Checking that each hospital had the correct set of residents was more effort since, in our current code, residents are being used as keys.
This is relevant in the HR and SPA cases, because it is often simpler and more efficient to use set operations, and because it is neater to show the matching in this way.
I made this an issue in order to get your feedback on which of the above options you think is preferable.

yea this is a good point, of the two options, including both perspectives seems better to me. we'd be doing the same work for either one regardless, just have to see which is more usable. with user being given both options they don't then need to re-run the algorithm to see the other one

The operator ':=' causes strange outputs.
Separating out the statement into two lines fixes this issue.
Python version: 3.12.3

Expected output:
{'man_sided': {'m1': 'w2', 'm2': 'w4', 'm3': 'w1', 'm4': 'w3'}, 'woman_sided': {'w1': 'm3', 'w2': 'm1', 'w3': 'm4', 'w4': 'm2'}}
Actual ouput:
{'man_sided': {'m1': True, 'm2': True, 'm3': True, 'm4': True}, 'woman_sided': {'w1': '', 'w2': '', 'w3': '', 'w4': '', True: 'm4'}}


[BUG] API custom properties are missing in API export

API-Mgr. CLI version
1.0.0
API-Manager and Service-Pack Version
7.6.2 SP4
Expected behavior
As I am able to import API custom properties, I would expect to export the same.
Actual behavior
As orgAdmin if I export an API with apim api get -id ... -f json, the API proxy gets exported but without custom properties.
Log-Output in Debug
Test case sample

Please describe the steps you have done to replicate the issue

@jschaefer77, of course your expectation is correct. I'll investigate and let you know.

I can confirm this issue.

Improved API-Export integration test to include customProperties and implemented a fix for it. Will be fixed with 1.0.1


added workflows, updated dependencies and replaced lazy_static with once_cell

This looks amazing, thanks for the work on this. I am a little busy at the moment to test, but I'll review this in a couple of days.
Thanks again!

I made the suggested changes and added cargo test and cargo clippy to workflow.

@meguminloli Thanks a lot for working on this, but unfortunately it is outdated, let me take your changes and merge it. Sorry for the late reply.

The changes are now in master, will be closing this.


Now that ALVR client is on the app store can we have more automations?

I don't want to touch my PC so I'd like to always run ALVC server on the tray and whenever my "auto-connect" client starts up the server should "Start Server". Also after disconnection from clients and after X secs of inactivity I'd like it to stop the server and maybe kill the steam vr services so my CPU doesn't burn to the ground.
Maybe add wake on lan as well so that whenever the client starts it wakes up the last server it connected to.
This way I'll never have to go to my PC room ever again.
You could also allow me to automate this manually. What I'd like is on the server side: "Run this app on connect" , "Run this app on disconnect".
On client side I'm not sure I can do the wake on lan thing externally. I think whatever oculus app is on foreground everything else like tasker stops working. It would be cool though if I could run a tasker task on startup.

It's an interesting idea. It would be nice if users can ignore all bothersome operations.

"Run this app on connect" , "Run this app on disconnect".

It's a good idea. It can be used for general purpose and very useful. I will add this feature on next release.

On client side I'm not sure I can do the wake on lan thing externally.

I think I can add WoL on client side, but this lacks versatility. As you said, Using Tasker may be good.
But can Oculus Go run Tasker?

Okay. I will try to integrate with Tasker.
This document may help us.
https://tasker.joaoapps.com/developers.html
Server side has been done on the new release, v2.0.4.

What is the usecase for the run app on connect or disconnect?

To start steam vr or stop steam vr and launcher, raise volume to full, change soundcard to bluetooth, disable notications and/or automatically starting last game played without touching the pc

Yah ok fair bump

I think that the biggest challenge to the usefulness of this idea is the fact that the controller and speakers/headphones still need to be connected to the PC. You might be able to go one room over if this is implemented, but that's about it. And we'd have to figure out a way to get SteamVR to open in Big Picture Mode as soon as ALVR connects, otherwise you wouldn't have a way of launching games if you're not in front of the computer.
So overall I agree with adding some automation, but the ability to have your controller paired to your headset needs to be revisited. I've been using Moonlight lately to stream 2D Games to my Oculus Go, and it works extremely well with the controller paired to the headset. Other users have used VirtualHere with ALVR to be able to pair the controller to the headset. I know that there have been concerns about it affecting latency, but it doesn't appear to be with 3rd party implementation. And you'd think that having another App running at the same time would add even more potential latency. So a native implementation seems to be viable.

I have replaced steam vr home with bigpicture beta so I can launch games remotely without touching the pc.

you have to change a vrmanifest file in steam folder to do that

I agree thought. If somehow instead of reimplementing moonlight you could integrate it it would be awesome

I managed to get my steam controller working using steam link running on the go today. So can control big picture with it.  It worked for playing 2d games thru virtualhere, but I dont have any vr games that use gamepad controller so wasnt able to test if it worked for native vr games too. But i agree, an inbuilt solution is best.

Now that run command on connect/disconnect can you make it so server starts by default and listen for client connections without steam VR open and only run steam VR whenever a client connects?

listen for client connections without steam VR open

All communication with client is done in Steam VR driver. So we cannot implement it by design.
It is possible to create external tool to listen client broadcast and start ALVR.
For example:
https://gist.github.com/polygraphene/d4b5ebe6946a8526ce7015098c991a7d

nice!! thanks!

Ok I modified your code to this for my raspberry pi that is always online so that it automatically wakes up the PC and starts all the VR services / changes resolution / priorities etc:
https://gist.github.com/vrokolos/8a884f9d83dbb80a69be6ffc2245f27d

This works fine. Here is what I'm doing on VRON on my PC with Everghost for anyone looking to automate


Fix backtrace filtering

And make it work with e.g. gemsets.
This works: https://gist.github.com/djanowski/afed5a759687921f0569

Won't $LOAD_PATH often include the files that your code under test is stored in? If that's the case, you'll often end up with an empty stack trace.

Not if you require this file before anything else, which is the most common use case, right?

That's true (though I know of at least one project where I'd end up with empty backtraces :blush:).
Perhaps this is a good use case for Ruby's awk inheritance: BEGIN { $ORIGINAL_LOAD_PATH = $LOAD_PATH.dup }.

The constant is created when the module is required, and the array is the result of adding Gem.path to $LOAD_PATH. So further modifications to $LOAD_PATH won't be a problem. Is that what you mean?

Yes.
Consider the / my typical Rakefile:
$LOAD_PATH.unshift File.expand_path("./lib")

require "cutest" # or require "test_helper"
require "my_library"

task(:foo) { MyLibrary.do_something! }
task(:bar) { MyLibrary.do_something_else! }
task(:test) { Cutest.run(FileList["test/*_test.rb"]) }

In such cases you'd end up with an empty backtrace and it will not be obvious why. Capturing the $LOAD_PATH in a BEGIN block avoids this at least partially: it will execute before anything else does.
Another situation where you'd end up with an empty backtrace is running a single test file using ruby -I lib test/my_library_test.rb. A BEGIN block won't avoid this, unfortunately.

Yes, it's true, this is opinionated based on the fact that I never include my application's directories in $LOAD_PATH. I always use require for libraries, require_relative for code inside my app.
Maybe just using Gem.path is enough.


THE BUFF DOOM DESERVES

⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧                                                                                ⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥ BUFF PLS⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥
⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥⛥

xd another great buff from another memelord!
 Not saying you haven't, just wanted to make sure you were aware of that.
Most PRs here are usually memes.

lul


Support union arguments in new IDL

We're seeing syntax like the following in Blink IDL:
  [ImplementedAs=namedGetter] getter (NodeList or Element) namedItem(DOMString name);
This requires C++ code that handles both types to be generated.
I'm modifying the template to throw for now when this case is encountered at runtime.

Closed unions are generated as dynamic until Dart supports either union or function overloading.


Option For Custom Models + Custom Model Config

Hey! Would it be too out of the question to include an option for a custom model and a place to put the custom model config? I have a DD model I made I'd like to use with this :o

Sweet I would love that! You can find the model here: https://huggingface.co/oculardegen/ngpx2022/blob/main/ngpx2022.pt and the configuration is as follows:
model_config.update({
'attention_resolutions': '16',
'class_cond': False,
'diffusion_steps': 1000,
'rescale_timesteps': True,
'timestep_respacing': 'ddim100',
'image_size': 256,
'learn_sigma': True,
'noise_schedule': 'linear',
'num_channels': 128,
'num_heads': 1,
'num_res_blocks': 2,
'use_checkpoint': use_checkpoint,
'use_fp16': True,
'use_scale_shift_norm': False,
})
  It is a pixel art model :)

I have added Custom Models support to the UI, you can configure it using this guide here: https://uetuluk.github.io/disco-diffusion-ui/Guide#custom-models


Add #filter(f) to Maybes and Results

Closes https://github.com/origamitower/folktale/issues/133

Thanksies :)


[Bug]: request.postData() is undefined when request sent via navigator.sendBeacon

Bug description
Steps to reproduce the problem:
Run this sample:
const puppeteer = require("puppeteer");

const html = `
<body>
<script>
const url = 'https://jsonplaceholder.typicode.com/todos';
const body = '{foo: "bar"}';

// bug: postData => undefined
navigator.sendBeacon("https://tracking.ott.yandex.net/v1/watch-batch", new Blob([JSON.stringify(body)],  {type : "application/json"}));

// correct: postData => {foo: "bar"}
fetch(url, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({foo: "bar"})
});
</script>
</body>
`;

let browser;
(async () => {
    browser = await puppeteer.launch({headless: true});
    const [page] = await browser.pages();
    page.on('request', (req) => console.log(`
        resourceType: ${req.resourceType()}
        method: ${req.method()}
        postData:${req.postData()}
        ----------------------------------`));
    await page.setContent(html);
})()
    .catch(err => console.error(err))
    .finally(() => browser?.close());

Result:
       resourceType: other
       method: OPTIONS
       postData:undefined <= its correct because its OPTIONS request
       ----------------------------------

       resourceType: other
       method: OPTIONS
       postData:undefined <= its correct because its OPTIONS request
       ----------------------------------

       resourceType: ping
       method: POST
       postData:undefined <= its bug
       ----------------------------------

       resourceType: fetch
       method: POST
       postData:{"foo":"bar"} <= its correct
       ----------------------------------

Puppeteer version
15.5
Node.js version
16.9.1
npm version
6.14.16
What operating system are you seeing the problem on?
macOS
Relevant log output
No response

Able to reproduce: it does not look like Chromium sends the post data to Puppeteer in this case.

It appears that in this case the request is blocked because it's cross-origin. I wonder if the postData is there if the request is not blocked?

Filed https://bugs.chromium.org/p/chromium/issues/detail?id=1348867


How to optionally configure custom prompts?

I see that prompts are mixed with themes. How do I add a new prompt that is optional. Like how plugins can be enabled? Am I missing something?

Not sure I understand what you're looking for...
Themes really are prompts - if you want a custom prompt, just copy one of the existing ones and make the changes you want.

@nwinkler - I understand that from personal use point of view. What if I wanted to contribute it here?
Actual use case - I am trying to add Kubernetes kubectl context to my prompt. I would also like to contribute that back to bash-it. But not everyone would want it to be enabled right? How can I let people who want it, to enable it?

Got it, thanks, that makes sense.
We don't have a standard approach for that, but here are a couple of ideas:

If you want to make your functionality available for all themes, add the function that retrieves the data to the base.theme. This way, it can be used in any theme.
Some of the themes have configurable parts, e.g. the powerline-multiline theme. See the theme's readme (https://github.com/Bash-it/bash-it/tree/master/themes/powerline-multiline) for more info. I think this is a good pattern - add the functionality, document how to add it and then let the user decide which information to include in their theme.

Once you've made the changes that implement this new feature, feel free to create a Pull Request and we'll review that together.

One way to see the Kubernetes prompt is to use https://github.com/jlesquembre/kubeprompt/ with Bathit. But I could not get it to work.

Greetings All !
Regarding Optionally Configuring
As @nwinkler mentioned, the Powerline themes are an excellent example of a theme that lets you optionally include different pieces of information into your prompt.
In Powerline, each different piece of information is called a segment.
Each segment has a code name and you use the code names to chose which segments you want, AND in which order they should be displayed.
Example with scm context
export POWERLINE_PROMPT="user_info scm cwd"

Example without scm context and different segment order
export POWERLINE_PROMPT="cwd user_info"

Regarding K8s Context:
Have a look at recently-added PR #1476 and the discussion I started there.
It introduces logic to for the k8s_context with my recommendation being to centralize that logic so all themes can take advantage of it.
I imagine that the k8s segment would be incorporated into bash-it similar to how the scm segment is incorporated, so you might want to look at that for inspiration.
@manojlds, you and @Diogo-Costa might be able to collaborate on this effort.
-D

Hi, thanks for this input. I'm still stuck with this, though. I want to add a simple segment to my powerline. If $MY_ENV_VAR exists, print its value, with the colors I want. I have been trying to find for example where "user_info" segment is defined so I could copy it, but I just cannot find any references to it, or any of the segment names. Where are they defined? Thanks!

Hey @tuomassa - thanks for the question.
The user_info segment function is defined here:
https://github.com/Bash-it/bash-it/blob/9e92ef342f9673559e78220b14cd535aa631f4c7/themes/powerline/powerline.base.bash#L16
The naming convention for the Powerline segments is __powerline_segment_prompt, all of the functions can be found in the powerline.base.bash file. So for the node segment, the function is called __powerline_node_prompt, for example.
Does that help?

@nwinkler Yes, thanks alot! I was actually trying to modify powerline-multiline and didn't notice it actually sources the normal powerline theme so I was not looking in the right place!


Typescript type-safe usage with a wrapper function

I'm trying to implement a wrapper nestJS service around the DataMapper. But, I'm not an expert with generics in Typescript and also unsure about AsyncIterator. This is what I have so far:
a DynamoDBDataMapperService:
import { Injectable } from '@nestjs/common';
import { DynamoDB } from 'aws-sdk';
import { DataMapper, ScanParameters } from '@aws/dynamodb-data-mapper';

@Injectable()
export class DynamoDBDataMapperService {
    private client: DynamoDB;
    private mapper: DataMapper;

    constructor() {
        this.client = new DynamoDB({
            region: 'us-west-2',
            endpoint: 'http://localhost:8000',
        });
        this.mapper = new DataMapper({ client: this.client });
    }

    public put<T>(item: T): Promise<T> {
        return this.mapper.put(item);
    }

    /**
     * Scans for an the passed item type
     * @param item generic dynamoDB data mapper annotation type
     * @returns AsyncIterator<T> Intended to be consumed with a `for await ... of` loop.
     */
    public get<T>(item: T): AsyncIterator<T> {
        const scanParameter: ScanParameters = { valueConstructor: item };
        return this.mapper.scan(scanParameter);
    }
}

and then a nestJS service that uses the wrapper:
import { Injectable } from '@nestjs/common';
import { CreateCatDto } from './dto/create-cat.dto';
import { Cat } from './schemas/cat.schema';
import { DynamoDBDataMapperService } from '../dynamodb-data-mapper/dynamodb-data-mapper.service';

@Injectable()
export class CatsService {
  constructor(private readonly mapper: DynamoDBDataMapperService) {}

  async create(createCatDto: CreateCatDto): Promise<Cat> {
    const createdCat = new Cat();
    createdCat.name = createCatDto.name;
    createdCat.age = createCatDto.age;
    createdCat.breed = createCatDto.breed;
    return this.mapper.put(createdCat);
  }

  async findAll(): Promise<Cat[]> {
    return await this.mapper.get(Cat);
  }
}

I'm running into 2 problems:

When I try to set the return type of DynamoDBDataMapperService.get() to AsyncIterable<T> I get the error

[ts] Cannot find name 'AsyncIterator'.

I could just be a noob at generics in Typescript, but I'm not sure how to pass the generic type along to DataMapper.scan()

[ts]
Type '{ valueConstructor: T; }' is not assignable to type 'ScanParameters<StringToAnyObjectMap>'.
  Type '{ valueConstructor: T; }' is not assignable to type 'CtorBearer<StringToAnyObjectMap>'.
    Types of property 'valueConstructor' are incompatible.
      Type 'T' is not assignable to type 'ZeroArgumentsConstructor<StringToAnyObjectMap>'.

reproduction case
https://github.com/CoreyCole/nest/tree/sample/dynamodb-data-mapper-annotations/sample/20-dynamodb-data-mapper-annotations
questions
I could simply solve my problem by instead exposing the mapper as a public property and then reference it directly in my CatsService, but I'd like to learn how to make this wrapper in a type-safe way. I'd like to submit this sample to nestJS for others trying to use dynamodb-data-mapper in a nestJS project using best practices as advised from you guys 😃(why I'm not asking on stack overflow)

How do I properly use AsyncIterator? It looks like it's been supported in Typescript since 2.3 and my example project is on 2.8
How can I pass the generic type along in a ScanParameters object to DataMapper.scan()?
Do you have any other suggestions to how I might improve my github example to better follow your suggested best-practices?

Hi @CoreyCole,

You'll need to add esnext.asynciterable to the lib section of your project's tsconfig file. Support has been included since TypeScript 2.3, but it's still opt-in (see https://www.typescriptlang.org/docs/handbook/compiler-options.html for more on this point).
scan will infer a type by default, but you can pass it in (e.g., mapper.scan<T>(constructor)). Keep in mind that for query and scan, you wouldn't pass in an item but instead the constructor for the mapped class that should be used for query and scan results.
I'm not really familiar with NestJS or its conventions, but I wouldn't use get as the name of a method that will perform a full table scan. (get normally indicates that a method with look up a single record.)

To gather all results for a query or scan into an array, you would need to iterate over it. The async iterator returned is lazy -- it will only send requests to DynamoDB as you iterate. To collect them all, you would want to do something like:
const results: Array<T> = [];
for await (const item of mapper.scan(MyClass)) {
    results.push(item);
}

Thanks!


Where is the link to this app?

This looks NOTHING like the "Power BI Premium Capacity Metrics" app that I see in AppSource and mentioned on this page: https://docs.microsoft.com/en-us/power-bi/service-admin-premium-monitor-capacity
How do I get the app mentioned on this page?

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

ID: 4843cde8-6191-2773-7500-272b87ad8084
Version Independent ID: 27ff08bc-43e8-4c8d-2cf5-ad096b6f11ff
Content: Power BI Premium Metrics app - Power BI
Content Source: powerbi-docs/service-premium-metrics-app.md
Service: powerbi
Sub-service: powerbi-admin
GitHub Login: @davidiseminger
Microsoft Alias: davidi

Hi, @klinejordan -- thanks for asking! Assigning to the writer to investigate.

Hi, any feedback on this?

I'm sorry you're having trouble finding that app.
Is this the link you're using? https://powerbi.microsoft.com/en-us/blog/introducing-power-bi-premium-capacity-metrics-app-as-a-template-app/
I would also suggest posting to the community,found at https://community.powerbi.com, since many folks there may be able to point you in the right direction, help you determine why yours looks different, and the like.


[Kernel][LoRA]  Add assertion for punica sgmv kernels

Add an assertion for the input token numbers of the Punica SGMV kernel to avoid incorrect kernel calculation results. This is particularly useful for supporting LoRA in Vision-Language models.
Fix some typo errors

ping @Yard1

/ready

@DarkLight1337  could you plz look at this PR?


How to switch between multiple GVRSceneobjects

I create one GVRScene and multiple GVRSceneobjects, Now i want to interact with Sceneobjects like when click one GVRSceneobject some GVRSceneobjects hide on the screen, when i click another one the hide objects are shown. How?

The gvr-pickandmove sample shows how to move the currently picked object. The gvr-switch sample shows how to selectively enable a single scene object among many. I think you could combine the logic from these two to accomplish what you want.


Compiling C generated files from Nuitka into WASM

I raised an initial stackoverflow in: https://stackoverflow.com/questions/76655779/compiling-nuitka-c-generated-code-into-wasm
in case anyone wants to consult the issue in more detail.

Nuitka version, full Python version, flavor, OS, etc. : *

system: Apple M1 Pro 2021
OS: macOS 13.1
1.7.1
Commercial: None
Python: 3.10.0 (default, Aug 10 2022, 10:39:02) [Clang 13.0.0 (clang-13<IP_ADDRESS>)]
Flavor: pyenv
Executable: /Users/***/dev/wasm-test/nuitka-exp/venv/bin/python
OS: Darwin
Arch: arm64
Version C compiler: /usr/bin/gcc (gcc).

How did you install Nuitka and Python

I installed nuitka via pip in a virtualenv

The specific PyPI names and versions

Package     Version

Nuitka      1.7.1
ordered-set 4.1.0
pip         23.1.2
setuptools  67.8.0
wheel       0.40.0
zstandard   0.21.0

Many times when you get an error from Nuitka, your setup may be special

Provide in your issue the Nuitka options used

python -m nuitka --standalone --output-dir=output HelloWorld.py

Also supply a Short, Self Contained, Correct, Example

I started with a small Hello World file:
def talk(message):
    return "Talk " + message

def main():
    print(talk("Hello World"))

if __name__ == "__main__":
    main()

I wanted to try compiling python to C and from C to WASM.
To do this, I ran
python -m nuitka --standalone --output-dir=output HelloWorld.py
which produces two folder in output, HelloWorld.build and HelloWorld.dist.
No issues with the binary, but then when I try to use EMCC to compile the c files into wasm files. I'm getting several errors:

'nuitka/prelude.h' file not found

module.__main__.c:19:10: fatal error: 'nuitka/prelude.h' file not found
   19 | #include "nuitka/prelude.h"
emcc: error: '/Users/gui/dev/wasm-test/emscripten/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -Werror=implicit-function-declaration --sysroot=/Users/gui/dev/wasm-test/emscripten/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat module.__main__.c -c -o /var/folders/vd/s7y9nsh17j58nlkxbx68vhmw0000gn/T/emscripten_temp_e9g16g7c/module.__main___0.o' failed (returned 1)

then after showing it where nuitka can find that file, i.e. : venv/lib/python3.10/site-packages/nuitka/build/include within my virtualenv, I am faced with subsequent errors:
In file included from module.__main__.c:19:
/Users/gui/dev/wasm-test/nuitka-exp/venv/lib/python3.10/site-packages/nuitka/build/include/nuitka/prelude.h:34:10: fatal error: 'patchlevel.h' file not found
   34 | #include "patchlevel.h"
      |          ^~~~~~~~~~~~~~
1 error generated.
emcc: error: '/Users/gui/dev/wasm-test/emscripten/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -Werror=implicit-function-declaration --sysroot=/Users/gui/dev/wasm-test/emscripten/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -I/Users/gui/dev/wasm-test/nuitka-exp/venv/lib/python3.10/site-packages/nuitka/build/include module.__main__.c -c -o /var/folders/vd/s7y9nsh17j58nlkxbx68vhmw0000gn/T/emscripten_temp_bn_sl3md/module.__main___0.o' failed (returned 1)

Again, had to show the emcc where it could find the patchlevel.h file within nuitka package using -I option on emcc.
emcc ..... -I/Users/gui/.pyenv/versions/3.10.0/include/python3.10
Then after showing him where to find my patchlevel.h which was contained within my python installation from pyenv (v3.10.0) I finally got the final error:
In file included from module.__main__.c:19:
In file included from /Users/gui/dev/wasm-test/nuitka-exp/venv/lib/python3.10/site-packages/nuitka/build/include/nuitka/prelude.h:58:
In file included from /Users/gui/.pyenv/versions/3.10.0/include/python3.10/Python.h:63:
/Users/gui/.pyenv/versions/3.10.0/include/python3.10/pyport.h:746:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  746 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
      |  ^
1 error generated.

This last error  suggests that there is a mismatch between the expected and actual size of the long data type on your platform. This can happen if there is a discrepancy between the architecture of your system and the architecture that Python or its libraries were compiled for. For example, if you are using a 64-bit version of Python on a 32-bit system, or vice versa.
I checked that :

Machine architecture is 64bit by doing uname -m
Python 3.10.0 for 64-bit machines
emcc -v:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.42 (6ede0b8fc1c979bb206148804bfb48b472ccc3da)
clang version 17.0.0 (https://github.com/llvm/llvm-project f3b64887de61020c09404bfee97b2fadd30df10a)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /Users/gui/dev/wasm-test/emscripten/emsdk/upstream/bin

I have tried to produce a simple hello world in c, and compiling that with emcc and there was no issues but when attempting to compile any of the c files found within the HelloWorld.build folder I get the errors I described. I know I am getting an error when using emcc, however I think this due to the way that Nuitka compiles its files and was wondering if I could any help in understanding why it seems so difficult to compile the C files produces by Nuitka. Is it possible that there is an issue with the way Nuitka generated the C code?
I am new to C, so any help here would be appreciated.
Thanks in advance and happy to provide any additional information.

The Nuitka generated code should only be compiled with Scons. It will not work otherwise, and I do at this time have no interest, to make the C folder buildable manually, not even with gcc.
Try again by using emcc as CCenvironment variable. And then you probably get to add support for that compiler to our Scons config, I think isGccName will need modification, and maybe Scons too.

I am new to C, so any help here would be appreciated.

I am not deep into wasm, but did you compile Python with wasm as well? Nuitka will not work without libpython ultimately. I thnk you dreamed up an idea here and may not know what you are doing.

Thank you for your quick reply @kayhayen ! I am indeed not experienced in what I am doing, but I have been tasked with exploring the possibility of compiling Nuitka generated C code into WASM using emcc. I am attempting to do this with a very simple example to see if it is possible. If it doesn’t work, that’s fine, but I would like to see this experiment through to the end.
My plan was to use wasm-ld from LLVM to link the WASM files for both libpython (using the pre-built version from Pyodide) and my Nuitka generated code. This should produce a combined WASM file that includes both my code and the Python runtime.
I have attempted to change the CC environment variable in the SCons configuration to use emcc as the C compiler, and I have also modified the isGccName function to recognize emcc as a valid GCC name.
def isGccName(cc_name):
    return (
        "gcc" in cc_name
        or "g++" in cc_name
        or "gnu-cc" in cc_name
        or "gnu-gcc" in cc_name
        or 'emcc' in cc_name
    )

However, I am now getting fatal errors during the Nuitka compilation due to not finding stdio.h. It’s likely that the SCons build script is not correctly passing the include paths to the C compiler now that I’ve made these modifications.
If you could provide any further help on how to modify the SCons configuration to correctly use emcc as the C compiler, I would be very grateful. I understand that this may not be in Nuitka’s or your interest, so I thank you for your time.

Closing for lack of feedback.


Output diagnostics in cargo-style

Checklist

[X] I've looked through the issues and pull requests for similar request
[ ] This feature could be solved with a custom docker image (optional)

Describe your request
cross should output it's warnings, notes and errors in the same way cargo does it
e.g something like this https://github.com/rust-lang/cargo/blob/ca4edabb28fc96fdf2a1d56fe3851831ac166f8a/src/cargo/core/shell.rs#L251-L257
Describe why this would be a good inclusion for cross
This will make integration with cargo look better

When doing this, we could also insert a [c] or something similar as a prefix to the output we make to make it clear what cross is doing

This should also have the verbosity settings: we should also parse quiet.

reopening as there still some action left, i.e info/note messages

Is this closes now that we can erase lines via #911? We should have essentially full support of the functionality of cargo's diagnostics itself.

No, I'm thinking something like
$ cross build --target arm-unknown-linux-gnueabi
  Installing target arm-unknown-linux-gnueabi
      Docker running pre-build hooks
      Docker ...

Basically, instead of some wait time when there's some setup needed for cross, display some nice data so that one doesn't think it's stuck


Instagram Source

Requirements:

[ ] Documentation

Backend

[ ] Connect Instagram channel via API
[ ] Receive Messages and Messaging_postback Webhooks from Instagram: https://developers.facebook.com/docs/messenger-platform/instagram/features/webhook
[ ] Fetch profile information (name, profile_pic) via the User Profile API
[ ] Sending of Messages via the Send API

Frontend

[ ] Display Instagram conversations with source icon
[ ] Render Instagram messages

@steffh I updated the ticket a bit to reflect minimum functionality in the inbox. This assumes that users can only connect channels via the API.


Include stress in captured health status of available

Seems available to the SDK as activities like yoga and breathwork can capture changes in stress in the fit file.

Added - bd96a1882188bc34555b23747be10ba66327e6d7


chore: upgrade individual packages to latest

:tada: This PR is included in version 1.3.2 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Error when closing viewer3DVolume.py example

On macOS with python2.7, PyQt4, the viewer3DVolume.py example leads to the following error  when closed:
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread

Does not occurs on Linux with PyQt5 (python2 and 3)

Outdated, we no longer support neither python2.7 nor PyQt4


Add the ability to create your own formatters

Add a description
I suggest to add the ability to create and use your own formatters for logging not only to a custom format via a callback (for example, LOG_ADD_FORMATTER(&CustomFormatCb, "custom_formatter_name"), or in another way.

I suggest using callbacks to get a string of the desired format. The number of log output formats in the userver is limited and the same LogHelper uses tskv, as written in the description. I suggest using callbacks to create your own formatters. For example:
// Pseudocode
std::string CustomFormatCb(const SomeLogStruct& log)
{
    return fmt::format(R"("timestamp": "{}", "level": "{}", "message": "{}")", log.timestamp, log.level, log.message);
}


I configured the  ip , but it didn't work

Please answer these questions before submitting your issue.

Why do you submit this issue?
[ ] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?

Bug

Which version of SkyWalking, OS, and JRE?

Which company or project?

What happened?
If possible, provide a way to reproduce the error. e.g. demo application, component version.

Requirement or improvement

Please describe your requirements or improvement suggestions.

8.7.0

Don't know what are you saying.

ES version： 7.14.0 ，SkyWalking version ：8.7.0-es7
I configured  gRPC reporter like this

SkyWalking  OAP  error :

[89]: index [sw_log-20210809], type [_doc], id [18909303f26e43f397511a0d313adfcd], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [90]: index [sw_log-20210809], type [_doc], id [8bace155dee445bfa4a06a36a37433c9], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [92]: index [sw_log-20210809], type [_doc], id [cc45386c565f49228ebc52a3115c6261], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [93]: index [sw_log-20210809], type [_doc], id [6778603b29ec43baa16b1159e2021ebb], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [94]: index [sw_log-20210809], type [_doc], id [2e76be2309d44ec88beb1aa3239da761], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [96]: index [sw_log-20210809], type [_doc], id [f077e2abd6b04d4e91eb58c5997ae27e], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [97]: index [sw_log-20210809], type [_doc], id [36c46abd45634108a721e4cfd57af5d3], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [98]: index [sw_log-20210809], type [_doc], id [24bf28ecb3f14871961d6aab054e4da1], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]] [99]: index [sw_log-20210809], type [_doc], id [a73653f1ed2f47a48b85f4aac7e1d267], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Cannot copy field [endpoint_name] to fields [endpoint_name_match]. Copy-to currently only works for value-type fields, not objects.]]]]

I look for information ,ES 7.x not support  copy to with objects

What should I do?

I don't know what you had or did, but ElasticSearch 7 have been tested in every pull request. So, it definitely works, it isn't the thing you referring.

https://github.com/apache/skywalking/blob/bca62f63fa0c57bf3bb5d8ebde9d6969b55b8429/.github/workflows/e2e.storages.yaml#L39

but when i change version to elasticsearch:6.8.18  , apache/skywalking-oap-server:8.7.0-es6 . It works

Again, what you were saying not working, is working in dozens of product env, and also on official demo env. So, it definitely works. Please don't get yourself lost on a certain thing.

This indeed needs some investigation as we only test ES 7.14 in simple basic cases, not including log features, and it seems to be a new issue in 7.14, see https://discuss.elastic.co/t/cannot-copy-field-to-fields-copy-to-currently-only-works-for-value-type-fields-not-objects/280429

A quick test from me shows that it might be a null value (of endpointName) is considered as an object and thus throw the exception

I am confused, this endpoint name query is as same as trace query.

I am confused, this endpoint name query is as same as trace query.

In our test case, the endpoint is not null anyway, so we didn't discover this issue

If you want to confirm, please let's open another issue to track. This title doesn't match.

I am confused, this endpoint name query is as same as trace query.

In our test case, the endpoint is not null anyway, so we didn't discover this issue

I think we may try to just skip null. But let's open another one.


Is it possible to achieve better results?

First, Thank you for the impressive project!
I am trying to auto generate masks for photometric stereo input and am encountering some problems with unclean masks.
 (extreme example)
Do you have any recommendation on how to generate better results ( masks without holes, only mask of the person/face)?
Thank you for your time!

I could solve it via cv2.finContours / drawContours


Not working in angular2-rc6 and webpack

The library doesn't work with webpack and the angular 2 rc6. It seems like external libraries that are compiled to .js needs to have a metadata.json (https://github.com/orizens/angular2-infinite-scroll/issues/77, ). I'm having the same issue as described here, http://stackoverflow.com/questions/39335621/angular2-metadata-error-when-pre-compiling-feature-module.

In our team we're trying to import and export ColorPickerModule, which seems to be present in 'angular2-color-picker', and we're getting what seems to be a similar error at runtime:

compiler.umd.js:14126 Uncaught Error: Unexpected value 'ColorPickerModule' imported by the module 'SharedModule'

where SharedModule is a custom module where we import and export commonly used third-party modules (e.g. angular's FormsModule, ReactiveFormsModule, as well as ColorPickerModule)

Any news on this? We're now on the final release of ng2, would be great if this issue could be fixed, because there are A LOT of webpack users out there.
Thx!

@webtrix yep we were doing the same with a fork of this project: manually copying library source code into our own project subfolder.
Having seen recent commits on original library, we opted to switch back to it, but now we're stuck on those errors.

This should be a valid example of another library being adapted to angular-cli compiler, so to generate metadata files:
feature(build): Added @angular/compiler-cli support

BTW @webtrix the copy-source-in-place does not seem to work for us now. All is fine at build time and when browsing the application. Then when user clicks the field to open color picker popup, the following error shows up in console:
EXCEPTION: Uncaught (in promise): Error: Template parse errors:
'web-admin-app' is not a known element:
1. If 'web-admin-app' is an Angular component, then verify that it is part of this module.
2. If 'web-admin-app' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the<EMAIL_ADDRESS>of this component to suppress this message. ("

    [ERROR ->]<web-admin-app>

"): DialogComponent@19:4

but that doesn't make a lot of sense: the reported component is the root app component, which of course has already been parsed correctly as the application runs already in client. That is the actual original body of page, before angular kicks in.
It looks like somehow the DialogComponent tries to "inflate" the whole body again. Maybe it's an issue related to dynamic component creation, don't know really. Or maybe is due to the presence of BrowserModule within library: there were other libraries where this was mentioned as an issue, as they should import some common module or what else, don't remember precisely.

I don't use the Angular-CLI since it still has to many issues, certainly when using 3rd party libraries.

We're not using it either, we're on webpack too. The angular-cli seems to be needed for the author, in order to build the library so to generate metadata files.
We copied source code in our project and are getting that error. It looks like dynamic component creation has changed (at least in angular 2 final):
Equivalent of $compile in Angular 2

That seems to be strange... I'm using webpack as well and I have had no problems what so ever.
I created a folder in my project called "color-picker". I pasted all the files in there (Typescript only of course) and the template folder. Then added the sass-loader and node-sass to my webpack config.
And then in my app, I added "ColorPickerModule" in the imports array and that was it, all works fine.
I'm on Angular 2.0.0

Thanks. Moved to angular 2 final. Initially has still same issue. Then, after some experiments with webpack CSS loaders, it seems like issue is somehow related to color picker CSS not being correctly picked up during build phase.
If you copied library source code as-is (styleUrls: ['./templates/default/color-picker.css']) and you're on webpack, I guess you're chaining angular2-template-loader after (awesome-?)typescript loader in order to turn template/style URLs into inlined template/style + require() calls. Is that the case?

Until now, the only way we were able to make this work is with this change to color-picker.directive.ts:
@Component({
    selector: 'color-picker',
    //templateUrl: './templates/default/color-picker.html',
    //styleUrls: ['./templates/default/color-picker.css']
    template: require('./templates/default/color-picker.html'),
    styles: [require('./templates/default/color-picker.scss')],  // <-- note also extension change
})
// ...

and then of course enable dedicated Sass loading in webpack, with following loader:
{
  test: [/component\.scss$/, /color-picker\.scss$/],
  loaders: ['raw-loader', 'postcss-loader', 'sass-loader'],
  // ...
}

Sorry, I'm updating the library very soon.
Adding this line (in gulpfile.js):
.pipe(gulp.dest('lib'))
after ->.pipe(inlineNg2Template({base: '/lib'})) in compile task should solve the problem.

Using angular cli this also fails.  I think its due to webpack and barrels.  See: https://github.com/angular/angular-cli/issues/1831
Which implies that export * from ... does not work, you have to explicitly export {Item1, Item2, etc} from ....
I tried modifying node_modules/angular2_color_picker/index.ts to:
export {Hsva, Hsla, Rgba, SliderPosition, SliderDimension} from './lib/classes';
export {ColorPickerDirective} from './lib/color-picker.directive';
export {ColorPickerModule} from './lib/color-picker.module';
export {ColorPickerService} from './lib/color-picker.service';

no luck tho, still the same issue.

@BrainCrumbz you shouldn't use the .css, but the real source and that's the .scss file indeed.
Angular doesn't care if it's .css of or .scss as long as you have the right loaders in your webpack everything is fine.
I'll lay out the steps one more time for everybody else.

Download the full source, zip or what ever from GitHub
Create a new folder in your project called e.g. color-picker
Copy all the files and folders from the src folder into the folder you've just created
Add "sass-loader": "4.0.2", and "node-sass": "^3.10.0", to your package.json dev deps and run npm update
Go to your webpack config and add .scss to your config.resolve.extentions array
Add this code (modify it to your own setup of course) to your config.module.loaders

{
 test: /\.scss$/,
 exclude: root('src', 'app'),
 loader: ExtractTextPlugin.extract({ notExtractLoader: 'style-loader', loader: 'css?sourceMap!postcss!sass' })
},

{
  test: /\.scss$/,
  include: root('src', 'app'),
  loader: 'raw!postcss!sass'
},

Go to your project in your app.module file and add ColorPickerModule to your imports array, or if you use the color picker in a specific module go to that file and add ColorPickerModule to that imports array.

Run your app, you should be good...

Just to be clear, the original library source code references CSS, not SCSS:
styleUrls: ['./templates/default/color-picker.css']

So it's not that I'm intentionally using CSS. I got that from original source, and had then to change it in order to work.
So if you "just" copy the original source, leaving CSS extension, very likely the SCSS loading is not really being involved, probably CSS file is processed by its corresponding loader I guess.

That's a typo, it needs to point to '.scss' and then it works fine.

I'm sure author will address that. It's just something to be aware of when you copy library source over to your project.

@gatapia I'm not sure editing .ts files within node_module package has any effect. Maybe at that point it's the .js one to be picked up, and .ts is basically ignored?

Was having this issue too.
Please check https://github.com/Alberplz/angular2-color-picker/pull/38/commits/e37afec4767b0a2f7140feac940e8ffbc2a28c00 for a working fork. I alto made a PR to @Alberplz

Hello there
Are you closing this issue because it has been solved or what? Also, mentioned PR by @mlessio does not seem merged, so cannot really figure out what happened.
Could you share some more info @Alberplz ? Thank you!

I added a new release (https://github.com/Alberplz/angular2-color-picker/releases/tag/1.2.1 ) to solve that, also included a webpack example. Sorry not to mention that.


Arch Linux Setup: optionally install gazebo from AUR and fix pip Call

Describe problem solved by the proposed pull request
Gazebo is not an official package for Arch Linux but there's a community driven AUR https://aur.archlinux.org/packages/gazebo/ that can be installed with a helper program yay https://github.com/Jguer/yay which is an officially supported package.
Describe your preferred solution
I notices that running pip as sudo on Arch is not a good idea. It installs the python modules in a different location /root/.local/lib/python3.7/site-packages which depending on your environment can be inaccessible later on.
I made an --gazebo option to the arch setup script that is disabled by default. If it's passed as parameter I install all the official libraries that PX4 needs to simulate with gazebo e.g. protobug, eigen... also yay which automatically builds gazebo from source using the AUR description. There's a small workaround necessary because apparently the AUR description contains one single error.
Test data / coverage
Tested on fresh install Manjaro VM:

Disadvantage: It takes a couple of minutes to compile gazebo and all its dependencies.
Additional context
#13111

Update: I commented on the AUR to hopefully get the ignition-cmake fix in such that we can skip the workaround in the future: https://aur.archlinux.org/packages/gazebo/#comment-711597


docs(endpoints): added new example for returning buffers from endpoints

What kind of changes does this PR include?
New content/code-snippet in the docs
Description
The PR adresses this closed issue.
When using the encoding: 'binary' providers like vercel send the buffer as  plain text instead of a binary png. This can be prevented by using the Response object (just like in other frameworks like svelte)

In my opinion the example I added should be the default way to return Buffers in general. Maybe we should replace the 'binary' example completely (as it doesn't work)

I'm going to ask @delucis what he thinks about this!

Thanks for your patience on this this @haasal! Looking at the original astro issue, it looks like you were experiencing this with an SSR adapter, right?
I believe the current example is for static scenarios (where Astro needs to write the endpoint to the filesystem while building). I’m not sure if we actually support returning Response in static mode or not. We should double check Response works in a static scenario and if it doesn’t document clearly these two situations: 1) object with body and encoding in static mode and 2) Response in SSR.

Yes. Now I see it too. However it mentions nowhere in the docs how to do it with SSR on, which is really important (I.e. s3 buckets). So I would simply add my paragraph/example slightly modified to the SSR part of the endpoint guide

@haasal Would you be willing to update this PR to modify the paragraph and example slightly, as you suggested, and move it to the SSR section?

Sure. I'll add the example to the SSR section.

Hi @haasal - Just checking in here to see whether you're still up for this! I'm sorry, I've been so swamped getting next weeks' big launch docs together for our new features, I've been a little slow to follow up on community PRs.
But we would be so happy to have your contribution, if you're still interested!

I think this should be ready. I messed up something with git along the way. Please check if everything is correct before merging.


what problem?

Description
What steps will reproduce the problem?

What is the expected output? What do you see instead?
Please provide any additional information below
File "D:\Anaconda3\lib\site-packages\spyder\plugins_init_.py", line 511, in
toggled=lambda checked: self.toggle_view(checked),
File "D:\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 709, in toggle_view
self.create_new_client(give_focus=False)
File "D:\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 991, in create_new_client
self.connect_client_to_kernel(client)
File "D:\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1018, in connect_client_to_kernel
stderr_file)
File "D:\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1420, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr)
File "D:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 257, in start_kernel
**kw)
File "D:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "D:\Anaconda3\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "D:\Anaconda3\lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "D:\Ana

Thanks for reporting. This is going to be fixed in our 3.2.4 version, to be released in a couple of days.


handleMissingId should treat #top as a valid ID

Describe the bug
The ID #top is a perfectly valid href attribute, which can be used to scroll a user to the top of an HTML document. Per the HTML spec:

If decodedFragment is an ASCII case-insensitive match for the string top, then return the top of the document.

This is also confirmed by MDN.
However, at build time, an anchor tag with href="#top" will throw an error:
Error: The following pages contain links to /foo/bar#top, but no element with id="top" exists on /foo/bar - see the `handleMissingId` option in https://kit.svelte.dev/docs/configuration#prerender for more info:

This shouldn't be the case, as #top is, again, a valid HTML href value.
Further, users shouldn't be forced to adjust their compiler options simply to be able to use something that's in the spec.
Reproduction
Run a static build on a SvelteKit site with a Top link present
Logs
9:24:57 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
9:24:57 AM: file:///opt/build/repo/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:53
9:24:57 AM: 					throw new Error(format(details));
9:24:57 AM: 					      ^
9:24:57 AM: Error: The following pages contain links to /blog/antiquated-react#top, but no element with id="top" exists on /blog/antiquated-react - see the `handleMissingId` option in https://kit.svelte.dev/docs/configuration#prerender for more info:
9:24:57 AM:   - /blog/antiquated-react
9:24:57 AM:     at file:///opt/build/repo/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:53:12
9:24:57 AM:     at prerender (file:///opt/build/repo/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:398:4)
9:24:57 AM:     at async process.<anonymous> (file:///opt/build/repo/node_modules/@sveltejs/kit/src/utils/fork.js:25:17)
9:24:57 AM: Node.js v19.3.0
9:24:57 AM: [vite-plugin-sveltekit-compile] Failed with code 1
9:24:57 AM: error during build:
9:24:57 AM: Error: Failed with code 1
9:24:57 AM:     at ChildProcess.<anonymous> (file:///opt/build/repo/node_modules/@sveltejs/kit/src/utils/fork.js:68:13)
9:24:57 AM:     at ChildProcess.emit (node:events:513:28)
9:24:57 AM:     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
9:24:57 AM:
9:24:57 AM: "build.command" failed
9:24:57 AM: ────────────────────────────────────────────────────────────────

System Info
System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Pro
    Memory: 158.53 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 19.3.0 - ~/.nvm/versions/node/v19.3.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v19.3.0/bin/yarn
    npm: 9.2.0 - ~/.nvm/versions/node/v19.3.0/bin/npm
  Browsers:
    Chrome: 126.0.6478.61
    Edge: 126.0.2592.61
    Safari: 17.5

Severity
annoyance
Additional Information
No response

1st Approach (Add a Dummy Element with id="top")
Open the affected Svelte component file, Add a div with id="top" at the top of the file.

--> Rest of your page content

1.

Back to top

2nd Approach (Adjust SvelteKit Prerender Configuration)
Open your svelte.config.js file, Modify the prerender configuration to ignore missing IDs.
import adapter from '@sveltejs/adapter-static';

export default {
  kit: {
    adapter: adapter(),
    prerender: {
      handleMissingId: 'ignore', // Other options: 'fail', 'warn'
    },
  },
};

@Nirmit4604 I'm aware of both of these workarounds; however, neither should be needed because the code is valid to begin with. It is being inappropriately treated as an error, when it should not be. Developers shouldn't need to embrace workarounds when there's nothing wrong with the code in the first place.
Besides, it's entirely conceivable a developer might want #top to work, but not want other missing IDs to pass.

So can we create a custom preprocessor to handle #top  specifically and then integrate it into your svelte.config.js file?
The handleTopFragment preprocessor specifically looks for href="#top" and replaces it with a JavaScript-based scroll handle. This ensures that #top is handled correctly, while the prerender configuration (handleMissingId: 'warn') continues to apply to other missing IDs.


Fix readFileAsync to extract type also for file upload

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/26940
PROPOSAL: https://github.com/Expensify/App/issues/26940#issuecomment-1740445802
Tests / QA Steps

Open the New Expensify app
Login with any login
In the FAB menu, select Request Money
Raise a MoneyRequest with a receipt
Re-login as the same user
Navigate to the request created in step 4

[x] Verify that no errors appear in the JS console
[x] Verify you can see the request

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

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

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://github.com/Expensify/App/assets/58412969/4e32407d-d4c1-41f0-8afa-607af4e69acc

Mobile Web - Chrome
https://github.com/Expensify/App/assets/58412969/b1b98301-0a2e-42ca-87c6-84a31fa1eb45

Mobile Web - Safari
https://github.com/Expensify/App/assets/58412969/f6387bff-6f83-4bd8-b03a-679ff199568d

Desktop
https://github.com/Expensify/App/assets/58412969/51414e15-6365-41e0-8e18-2218cff099ab

iOS
https://github.com/Expensify/App/assets/58412969/7c8ec8f7-2578-495c-a0be-7f6e626f55c6

Android
https://github.com/Expensify/App/assets/58412969/f424a8fc-2f77-4605-851c-b01ff3eaeb63

@s77rt Can you start the review in parallel?
In the meantime, I will add the video for the platforms

Navigate to the WS room; if you don't have one, create one.

This may be confusing in some cases e.g. you can't request money from #admins room. Let's limit the test to just saying that you need to request money from any user

@s77rt I am done with completing the checklist with videos.

Reviewer Checklist

[X] I have verified the author checklist is complete (all boxes are checked off).
[X] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[X] I verified the steps for local testing are in the Tests section
[X] I verified the steps for Staging and/or Production testing are in the QA steps section
[X] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[X] I checked that screenshots or videos are included for tests on all platforms
[X] I included screenshots or videos for tests on all platforms
[X] I verified tests pass on all platforms & I tested again on:

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

[X] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[X] I verified proper code patterns were followed (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I verified that this PR follows the guidelines as stated in the Review Guidelines
[X] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase
[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

https://github.com/Expensify/App/assets/16493223/da0b1539-1a00-420c-87b2-c8a10cdf6e40

In the Action menu, select Request Money

Can you please use the FAB term instead

Navigate to the room from step 4

No room was referenced in step 4, can you make this a littler clearer?

In the Action menu, select Request Money

Can you please use the FAB term instead

Navigate to the room from step 4

No room was referenced in step 4, can you make this a littler clearer?

@s77rt I have updated the steps

Verify you can see the request

Can you make this as step 7 instead of a checkbox

Verify you can see the request

Can you make this as step 7 instead of a checkbox

I think the checkbox would be better

@roryabraham Can you please merge this?

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.76-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

QA mentioned that the linked issue is still not resolved on staging https://github.com/Expensify/App/issues/26940 can you please double check @s77rt @shubham1206agra

@mountiny I tested it against latest main
Working correctly

🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅


Allow jwt decode without passing a key

When using decode with noVerify, there's no point in passing the key because it's not going to be used. It would make sense if you could call decode(token) without passing a key, and it would decode the token without trying to verify it.
At the moment I have to do something like decode(token, 'dummy_key', true), which is a lot more verbose

This is a bad idea. By default, decode should always verify in order to reduce the chance of incorrectly believing the request is verified. You can also pass undefined as your key for this case.