micropython on Beetle (Zephyr)

I completed the porting of micropython on Beetle via Zephyr and I found few minor issues that have been solved with my patch set below.

@fvincenzo : Thanks for the patches. I've cherry-picked "lib: Remove compilation warning" to master, but turned it broke other ports, so I had to redo it differently. Anyway, that issue is fixed now.
For other 2 changes, I'd prefer to squash them with earlier @daniel-thompson's patches, the motivation being is that I'd like to have Zephyr port be a "model" for new ports, and thus have a clean history. The drawback is that your authorship info will be lost. The changes are small, so I hope that's ok, but let me know if that's of concern to you.
4th change you just pushed looks good, will cherry pick to master next step.
Another note: I found that yesterday's change to zephyt master broke the build: https://gerrit.zephyrproject.org/r/#/c/5863/ . I pushed a stop-gap fix to this branch, while raising this issue and seeing if it can be fixed differently. Depending on the version of zephyr you use, you may need to revert that change locally ("zephyr/zephyr_getchar: Update for recent Zephyr refactor of console hooks.")

Ok, please rebase your branch.

@pfalcon I do not have any problem to loose the authorship if you keep the signed-off information into the commit message.

Ok, these changes were squashed with Pin impl (sign-off's preserved), and pushed upstream as https://github.com/micropython/micropython/commit/67b6d9d499bee6283ae1005d0c829b8f552ac5af (please see it for more comments). Thanks!


driver.get_qr() isn't working

I dunno if this lib is maintained anymore or not but
after installing this lib i followed the quickstart from Readme.md
and driver.get_qr() gives the following error
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: img[alt="Scan me!"]
Stacktrace:
WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:393:5
element.find/</<@chrome://remote/content/marionette/element.js:305:16

upon checking the source of whatsapp web they now use canvas tag to display the qr not the img

yep, I noticed the same thing, hopefully it will be fixed in no time

Try https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/947


websocket ping api

Add an easy API for pinging an open websocket to keep it from timing out.
try ws.ping(every: 10)

    try background { [weak ws] in
        if ws?.state == .open {
            print("ping")
            try? ws?.ping()
            drop.console.wait(seconds: 10)
        }
    }

@PorterHoskins until we implement this internally, you can use the code snippet to keep your ws alive.

@tannernelson are you sure this snippet is right?
try background { [weak ws] in
        if ws?.state == .open {
            print("ping")
            try? ws?.ping()
            drop.console.wait(seconds: 10)
        }
    }

This seems to ping it only once. Shouldn't it be while ?

@AlexKel yes, yes it should. Thanks for that, for anyone who wants to see how that looks:
    try background { [weak ws] in
        while true {
            if ws?.state == .open {
                print("ping")
                try? ws?.ping()
                drop.console.wait(seconds: 10)
            }
        }
    }

Oops, yeah I meant to write while ws?.state == .open

@tannernelson @LoganWright
Using while like this will block a GCD thread permanently.
Better use a DispatchSource:
var timer = DispatchSource.makeTimerSource()
let interval = DispatchTimeInterval.seconds(10)
timer.scheduleRepeating(deadline: .now() + interval, interval: interval, leeway: .seconds(1))
timer.setEventHandler { [weak ws, weak timer] in
    guard ws?.state == .open else {
        timer?.cancel()
        timer = nil
        return
    }
    print("ping")
    try? ws?.ping()
}
timer.resume()

// `timer` needs to be retained as long as the WebSocket lives


feat: adds ApplicationContext support

adds support for ApplicationContext as specified in https://developer.paypal.com/docs/api/payments/v1/#definition-application_context
Useful for express checkouts.

Thank you @Shamanoid, merging it to master. Will increase tag after that.


WalletConnect support

Is there any interest to add walletconnect support to this (in addition to ledger). I was surprised to see it not in here already considering its supported of the binance.org website. Thanks!

Right. walletconnect is only supported in binance.org website. Maybe we will add this feature to sdk in the future


Dynamic sorting extarctor

This is being put on the long-term backburner for development/integration into pipelines. Sticking with append mode writing method for now

Closing this PR but keeping branch for future reference, if we ever want to revisit this approach.
Recommended approach is to use append more through NwbSortingExtractor.write_sorting(sorting_extractor, ..., overwrite=False) to add data from a custom sorting_extractor object.


Dropdown focus border

Can i set a border to selected item in dropdown?

Do you mean highlighting the selected item in the dropdown menu? like this:

Yess!

I'm not the one who created this issue, but thank you so much for your quick response.
It is very helpful indeed.

How can I change the bottom border color when widget is focused like image below?


Address State is not resolved because of this typo

This issue is making problems with resolving of State addresses using Google Maps API. Someone misspelled tag that we get from Google and that was not resolving this issue.
Please can you we push this change to the most recent upgrade.

Thank you for the fix!

Hello David,
When do you think that this change might reach the production environment? I have never contributed before with NPSP therefore I had to ask it ☺
Thank you,
Alen
From: David Habib<EMAIL_ADDRESS>Sent: Tuesday, June 7, 2016 4:26 PM
To: SalesforceFoundation/Cumulus<EMAIL_ADDRESS>Cc: Alen Husanovic<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [SalesforceFoundation/Cumulus] Address State is not resolved because of this typo (#2107)
Thank you for the fix!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/SalesforceFoundation/Cumulus/pull/2107#issuecomment-224297236, or mute the threadhttps://github.com/notifications/unsubscribe/AS4fuvyVDIw0BJ5yev3a7U2cVLLHnzuzks5qJX-FgaJpZM4Iv7bT.

we are just ending our sprint today, so normally this would be released to sandboxes tomorrow, and product in one week.  But since we are in the Summer '16 upgrade window, we won't be making a release until after Summer '16 is out to all customers, so I think the last week of June.  @jlantz correct me if I got the dates wrong.

Thank you David so much!! Looking forward to see these changes on Sandbox environment.
From: David Habib<EMAIL_ADDRESS>Sent: Tuesday, June 7, 2016 4:41 PM
To: SalesforceFoundation/Cumulus<EMAIL_ADDRESS>Cc: Alen Husanovic<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [SalesforceFoundation/Cumulus] Address State is not resolved because of this typo (#2107)
we are just ending our sprint today, so normally this would be released to sandboxes tomorrow, and product in one week. But since we are in the Summer '16 upgrade window, we won't be making a release until after Summer '16 is out to all customers, so I think the last week of June. @jlantzhttps://github.com/jlantz correct me if I got the dates wrong.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/SalesforceFoundation/Cumulus/pull/2107#issuecomment-224302211, or mute the threadhttps://github.com/notifications/unsubscribe/AS4fumPHWbES28pCcWcb-Vh8uWms9YQTks5qJYMKgaJpZM4Iv7bT.


[MgmtCommon] Remove commented code

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

link issue: https://github.com/Azure/azure-sdk-for-net/issues/29035


WIP: More multiple outputs

Add multiple outputs to various packages that get included on the install CD.
Needs more testing, the individual packages build ok, but haven't tried to rebuild many of the reverse dependencies.

This breaks the installer tests when they try to install procps in the user profile. I'm not sure exactly why this fails though, AFAIU all of procps's necessary outputs should be available in the system profile's closure.

Are there any updates on this pull request, please?

Closing due to inactivity, feel free to reopen if interest is here again


Add overflow-y style to combobox dropdown to allow scrolling

See #1279.

We will be addressing this in an upcoming release. Thank you!


RB-2.2 - Compilation warning fixes - VS2017 & VS2015

Here are three patches to fix some warnings with VS2017 (and VS2015) and the branch RB-2.2.
When compiling OIIO I did not see them. But these warnings were present when compiling OCIO with VS2017 & VS2015. So I built these patches to avoid disabling some compiler flags in the OCIO project. They all seem to be easy fixes but some could highlight precision concerns (i.e. simd.h). So, please carefully review them before changing the OIIO code.
fmath_h_patch.txt
simd_h_patch.txt
ustring_h_patch.txt

Thanks, Patrick. I'll turn this into a PR and get it integrated.
I'll test everything and make sure there are no problems for precision.

ustring: very embarrassing, but the real fix is simply that the return type of stof ought to be float, not int!
fmath: I don't quite understand what the fix is. What warning did you get here? Why did it need const? I'm happy to make these changes, I just don't understand why they are warnings in the first place.

fmath: Only the float cast on q is needed. The const keywords were leftover from previous changes i.e. not mandatory.


AspNetCoreMvcFormatter uses syncrhonous deserialisations

I have an app that throws this error:
System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Utf8Json.JsonSerializer.FillFromStream(Stream input, Byte[]& buffer)
at Utf8Json.JsonSerializer.Deserialize[T](Stream stream, IJsonFormatterResolver resolver)
at Deserialize(Stream , IJsonFormatterResolver )
at Utf8Json.JsonSerializer.NonGeneric.Deserialize(Type type, Stream stream, IJsonFormatterResolver resolver)
at Utf8Json.AspNetCoreMvcFormatter.JsonInputFormatter.ReadAsync(InputFormatterContext context)
at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
I don't know if it is because my web app runs in a windows service but it appears to start here:
https://github.com/neuecc/Utf8Json/blob/608cf01589cb3feb225a6e51a2324a24466fdaa6/src/Utf8Json.AspNetCoreMvcFormatter/Formatter.cs#L80
Here a Read is called instead of a ReadAsync.... the resolution to make everything synchronous (as suggested In the error) is not the right way to go ofcourse.

whoops, it is a double, i checked the issues but because of the name I missed this one:
https://github.com/neuecc/Utf8Json/issues/186
it appears to be a .NET Core 3.1 issue

Closed because of being duplicate


fix(mat-selection-list): do not allow ctrl + a when mat-selection-list is disabled

Fixes #12542

@googlebot I signed it!

@crisbeto could you please have a look again when you have some time? I was thinking to add a disabled check in the MatListOption#toggle() method, but decided this is enough. Let me know your thoughts.

@crisbeto do we still want to proceed with this change?

This was resolved in https://github.com/angular/components/pull/18885. Closing.


Add a lesson on creating excellent reports

Needs things like:

[x] How to make good figures (annotations, scans, diagrams instead of CAD, transforming CAD renderings into meaningful figures, etc)
[x] What belongs in an appendix and what doesn't.
[x] How to describe the big picture and sufficient detail in few pages.
[x] How to design a figure that communicates what you want to communicate (instead of just pasting in CAD models)

This lecture was created, will need improvements for the future, but closing this now.


Enabling other users (with password) to upload ?

Is it possible to allow other users, to which I gave the permission (password) to (view) folder, also to upload their images in this shared folder?

That's not possible, but maybe planned as a part of the multi-user-feature: https://github.com/electerious/Lychee/issues/132


strv: Implement From for constant GStr slices

This was implemented for GString and &str but not for &GStr.

Please let me know if the test is redundant.

For reference, this is the code that wasn't working
    glib::StrV::from([
        gio::FILE_ATTRIBUTE_STANDARD_NAME,
        gio::FILE_ATTRIBUTE_TIME_CREATED,
        gio::FILE_ATTRIBUTE_TIME_CREATED_USEC,
        gio::FILE_ATTRIBUTE_TIME_MODIFIED,
        gio::FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
    ])
    .join(Some(","))

This PR looks good but, for the use case of file attributes I think we should probably just make a macro at some point to match the C string concatting behavior


#697 I updated qulice version. And fix warnings.

#697 I updated qulice version. I removed PMD.AvoidDuplicateLiterals suppression and add usage of diamond operator.

@xupyprmv Thanks, I will ask someone to do a code review here, thanks for your pull request

@krzyk review this one,please

@xupyprmv looks good (+1 for using latest qulice version :)

@rultor merge pls

@rultor merge pls

@krzyk Thanks for your request. @yegor256 Please confirm this.

@yegor256 Please, review this PR.

@yegor256 Please, review this PR.

@rultor merge

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 17min)

@elenavolokhova please, check this issue for QA compliance, as per par.24

@rultor deploy pls

@rultor deploy pls

@davvd OK, I'll try to deploy now. You can check the progress here

@rultor deploy pls

@davvd Done! FYI, the full log is here (took me 17min)

@krzyk
According to our quality rules:

The code reviewer found at least three problems in the code.

There were no issues found during review.
Please confirm that you will try to find at least three problems next time.

@elenavolokhova I confirm

@davvd  Quality is acceptable here.

@davvd  Quality is acceptable here.

@elenavolokhova thanks a lot, next time everybody should try to make it better

@krzyk I added 10 mins to @elenavolokhova (for QA review) in transaction 97253157
thank you, added 18 mins to your acc, payment num is 97253167, 129 hours and 46 mins spent in total to complete
extra minutes for review comments (c=3)
+18 added to your rating, current score is: +1350


Node server 'error' event not fire

When i use express-ws, the 'error' event is no more fired when there is a EADDRINUSE error for example.
let Express = require('express');
let ExpressWs = require('express-ws');
let HTTP = require('http');

// First server
let expressApp = Express();
let nodeServer = HTTP.createServer(expressApp);
nodeServer.listen(8080, ()=>console.log('started'));

// Second Server
let expressApp2 = Express();
let nodeServer2 = HTTP.createServer(expressApp2);
ExpressWs(expressApp2, nodeServer2);

nodeServer2.listen(8080, ()=>console.log('started'));

// => event catched when there is no ExpressWs
nodeServer2.on('error',(err)=>console.log('error : '+err.code));

i use node v7.5.0, express v4.15.2

Same problem here.


Save pidfiles for logrotate to pkill HUP

I get a weekly email from my container complaining about
/etc/cron.daily/logrotate:
pkill: pidfile not valid

It turns out the issue is that logrotate is trying to HUP the clamav processes, but there are no pidfiles for them.  This patch changes the run scripts to create pidfiles where the /etc/init.d scripts used by logrotate expect them to be.  I'm not sure if it'll get rid of the error message if clamav is disabled, but it's a start.  :)

I am not sure if i understand correctly, this problem should be fixed with this commit : https://github.com/hardware/mailserver/commit/1273e1176c468e74409bc359abc430dadd444d2e
I don't have the cron notification since this fix.

I can confirm I have received several in October.

I have received some emails like that as well.

Ok i see, my commit fix this issue only when clamav is disabled. To resolv this problem you can add this lines in clamd.conf and freshclam.conf :
# /etc/clamav/clamd.conf

PidFile = "/var/run/clamav/clamd.pid"

# /etc/clamav/freshclam.conf

PidFile = "/var/run/clamav/freshclam.pid"

I don't know why I deleted these lines with version 1.1 :
https://github.com/hardware/mailserver/blob/v1.0-legacy/rootfs/etc/clamav/clamd.conf#L80
https://github.com/hardware/mailserver/blob/v1.0-legacy/rootfs/etc/clamav/freshclam.conf#L28
# /etc/init.d/clamav-daemon

if [ -z "$THEPIDFILE" ]
then
  # Set the default PidFile.
  THEPIDFILE='/run/clamav/clamd.pid'
fi

reload-log)
  if [ "$RELOAD" = "1" ]; then
    log_daemon_msg "Reloading log file for $DESC" "$NAME"
    pkill -HUP -F $THEPIDFILE $THEDAEMON 2>/dev/null
  else
    log_failure_msg "reload-log does not work in supervised mode."
    # unimplemented feature
    exit 3
  fi

I'm confused: those files don't exist in the repository for 1.1.  Are you saying to echo those lines into the files from run.sh?
(I'm also wondering why the approach I used is undesirable, since the pidfile is only used to run logrotate.)

I'm confused: those files don't exist in the repository for 1.1. Are you saying to echo those lines into the files from run.sh?

Yes.

I'm also wondering why the approach I used is undesirable, since the pidfile is only used to run logrotate.

Because i'm not sure if $$ is safe in this situation.

What do you mean by "safe"?  Neither clamav or freshclam are configured to fork themselves (the confguration is Foreground true for both), so $$ will contain the correct process id.

After some testing, your solution seems to be good. Thanks.


[Storage] Rename ParallelTransferOptions to StorageTransferOptions

As per API review rename ParallelTransferOptions to StorageTransferOptions

It's strange that git does not see the recording file changes as simple renames.

@KrzysztofCwalina git does not see the recording file rename changes because we created new json files with different names and content. Created PR  to remove the old recordings for ParallelTransferOptions


Encryption Keys, how to find it ?

Anyone know how to take the Encryption Keys to decrypt packet in wireshark using the dissector ?
I try all in my knowledge but I'm not having success.
My scenario:
I have a Matter plug "Sengled", and i use the chip-tool to connect with it. Everything work right, but my goal is create the Interaction Model for wireshark. And my problem is being able to find the decryption key, in particulary during the exchange.
Thank you very much for everyone who will help me in this work.

@tuppulix unfortunately even if you instrument your chip-tool to output the session keys generated here, the current version of the dissector does not incorporate the nodeid in the nonce calculation, so decryption of production devices isn't supported.

@turon Is it possible during the connection to take the key that the device exchanges with the chip tool? Maybe printing it to a log file. And then use it on WireShark to decrypt it?


Adding support for topologySpreadConstraints

Q
A

Bug fix?
no

New feature?
Yes

API breaks?
no

Deprecations?
no

Related tickets
1356

License
Apache 2.0

What's in this PR?

Adds a new configuration parameter "topologySpreadConstraint" to the webhook deployment template and the values.yaml.  README updated with  this new parameter

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.John Woo seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Remove Keycloak service.

The last PR duplicated the Keycloak service. This one removes the
service with the wrong names, leaving the service with the original
names

Yep. I deployed to prod last night and it looks ok.


[Bug] Banner doesn't show the image

@Qolzam  we also discuss about the banner image issue, actually banner image uploading successfully but when we set the banner image then it will not show the image for the cropping or edit,
it shows the blank space there.

Choose image banner cover pic not working
After uploading the banner image:

When we select the set banner image button:

Originally posted by @Abhiranjanchaurasia in https://github.com/red-gold/react-social-network/issues/116#issuecomment-496231419

@Qolzam we have discussed the bug on the banner image update :
=> Actually banner image uploading successfully but when we set the banner image then it will not show the image for the cropping or edit, it shows the blank space there.
The bug has been fixed by updating the cors implementation in the project, please make sure and merge the code.


[BUG]: type regression with moduleResolution: bundler

What happened?
I am using "moduleResolution": "bundler" in my tsconfig compilerOptions in a typescript nextjs app and the latest version of this library has broken the types. Downgrading to 2.4.0 fixes the issue.
I looked at the changes from 2.4.0 to 3.0.0, but unfortunately cannot seem to find what exactly causes the issue. Changing moduleResolution to node fixes the issue, but the problem is that new apps created with create-next-app using typescript set the moduleResolution to bundler by default (I just verified this).
The linked reproduction has an open terminal that shows no type issues on 2.4.0, and the current type issue on the latest version.
Environment
Node v20.10.0 on Windows 11
Reproduction
https://codesandbox.io/p/devbox/stripe-reproduction-5gfdtn?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clsjfti1o0007356hi2sliwvz%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clsjfti1o0002356hwi8pclqk%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clsjfti1o0004356hti4luwwd%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clsjfti1o0006356h254tka7x%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clsjfti1o0002356hwi8pclqk%2522%253A%257B%2522id%2522%253A%2522clsjfti1o0002356hwi8pclqk%2522%252C%2522tabs%2522%253A%255B%255D%257D%252C%2522clsjfti1o0006356h254tka7x%2522%253A%257B%2522id%2522%253A%2522clsjfti1o0006356h254tka7x%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clsjfti1o0005356hnidihqet%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A3000%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clsjfti1o0005356hnidihqet%2522%257D%252C%2522clsjfti1o0004356hti4luwwd%2522%253A%257B%2522id%2522%253A%2522clsjfti1o0004356hti4luwwd%2522%252C%2522activeTabId%2522%253A%2522clsjftl0s004d356h2w7jhsao%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clsjfti1o0003356hznjg67z5%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%257D%252C%257B%2522id%2522%253A%2522clsjftl0s004d356h2w7jhsao%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522clsjg1pj2000edkhe6knabmlp%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

We are actively investigating the best path forward for fixing this issue. In the meantime, we recommend usage of version 2.4.0, which is our last stable release. Thank you for your patience with this issue.

Thank you for bringing up this issue with our team. We have published a new release which should resolve the issues you were having. Please upgrade to v3.0.1 instead of v3.0.0. Let us know if you continue to encounter any issues!

v3.0.1 fixes my issue. Thank you so much @maxwelly-stripe !


CI: Automatically close broken links issues when new ones are created

Closes: #5806
What is the purpose of the change
Improves our developer experience by automatically closing old Broken Links issues when we create new ones during our automated run.
Workflow explanation:

only-issue-labels: automated issue,Broken links: To close only issues with those labels (I added the Broken links label to the action to make it more unique)
close-issue-message: ...: To have a message explaining the close, and a link to our open issues - if any - with the labels.

The token needs the issues: write permission for the message to be written. Unsure if it has those permissions.

days-before-stale: -1: To not mark it as stale, ever
days-before-close: 0: To automatically close the issue.

I could not find examples in the stale documentation on if this works, but 'logically' it should. This is the main reason I'd want to see about manually running the workflow to check it works.

Testing and Verifying
There are no tests for the action, but one way to manually verify if this works is to

Reopen https://github.com/osmosis-labs/osmosis/issues/5806 with an added Broken links label
Run the Check Broken Links action with my changes
View the run and expect no errors
Check that the above issue has been closed on run, with the message linking to our PRs with label(s).

Note: It's possible that no new issue gets created if there are no broken links. We can confirm it works as expected by ensuring there are no failures during the CI run. We know the action works since it has created issues before, so the functionality we care about is the new step Close Existing Broken Links Issue(s) not breaking the CI proccess.
Documentation and Release Note

[ ] Does this pull request introduce a new feature or user-facing behavior changes?
[x] Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

[ ] Specification (x/{module}/README.md)
[ ] Osmosis documentation site
[ ] Code comments?
[ ] N/A

@pysel The action has a workflow_dispatch, so you should be able to manually run it on the action here - if you have the permissions to. Although it would have to be post-merge. I tried seeing if I can run it from my fork but the action doesn't appear.

@mattverse awesome! If we manually kick it off, we'll want to make sure the latest broken links issue is open and has "Broken links" label. Once we run it, if it works, it'll close that issue and create a new issue.
If y'all can manually run it from the actions tab, i think its possible to run the action from a specific branch. That way we don't merge this until verifying the action from this branch.


[Feature] Gemini 2.0 Support

What Would You Like to See with the Gateway?
Is there a timeline already for supporting Gemini 2.0 in Portkey. We are using Portkey and would love to use the new models
Context for your Request
No response
Your Twitter/LinkedIn
No response

Hey @markwitt1 gemini 2.0 and any newer models are supported by default in the gateway, you can use them by simply changing the model field
I suppose you're referring to support in the SAAS version UI. we're adding it there. But you should be able to use it from the API, and SDK right away whenever a new model is released


Replacing openid extension with OAuth2-proxy

#1386 #1110
What is being addressed
Since openid extension only returned the token_id and we needed the access token, we are changing the way we authenticate:
use oauth2 proxy instead of the guacamole open id extension.
This also fix the issue of not supporting refresh tokens as the proxy handles this
How is this addressed

add a service to the tomcat server that starts up the oauth2-proxy
This service is the new entry point to the web app
proxy listens on 8085 port and redirect traffic after its being authenticated
our custom guacamole extension gets the token as a request header and pass it if needed to the underlying api
extra: upgraded guacamole to 1.4.0

Why is this a draft PR?
-- UPDATED --

[x]  tests are not finished - Decided to do in the next iteration
[x] port is 8085 but it should be 8080 -Decided to leave it like that
[x]  need to validate the refresh token more thoroughly (tested manually over 9 hours with an open session)
[x]  option to consider: not using tomcat server and build another docker file that hosts the needed processes - decided not to go on with that option.
[x] vm list is not updated without logging out and in (regression) - will be handled separately
[x] When you login to Guacamole you get the login screen (which can be configured to be skipped):

/test

I'm getting:
id_token did not contain an email and profileURL is not defined

Any ideas?

I'm getting:
id_token did not contain an email and profileURL is not defined

Any ideas?

When are you getting this?

/test

/test-extended


Applications built by Ko complains about GitHub commit id missing from kodata

Applications built by ko generate a lot of lines like this in CI logs (I'm looking at Tekton CI for instance https://storage.googleapis.com/tekton-prow/pr-logs/pull/tektoncd_pipeline/995/pull-tekton-pipeline-integration-tests/1144026938617106434/build-log.txt):
I0626 23:56:51.574] [gopath-test] [step-test-build] {"level":"warn","ts":1561593313.3031838,"logger":"fallback-logger","caller":"logging/config.go:69","msg":"Fetch GitHub commit ID from kodata failed: \"KO_DATA_PATH\" does not exist or is empty"}

As far as I understand, setting the commit ID in kodata is not mandatory, so this should not be logged at "warn" level, which generates a lot of noise when troubleshooting actual issues.
I would propose reducing the log level to info at least, or even better to debug so that it could be filtered out during normal operations.

That's coming from here, not ko.

oh, thanks!

@afrittoli How did you solve this?

@JCzz that error means you're using knative.dev/pkg/logging, which could fail in a couple ways:

You're not symlinking to HEAD, e.g. see here: https://github.com/knative/serving/tree/4f7130bc97dfdf0040dd0975e27451a5097abfad/cmd/controller/kodata
You're using an old version of ko that doesn't chase symilnks, see here: https://github.com/google/ko/pull/73


Added vm ip in LabInstance status

Description
This PR adds the virtual machine IP in the LabInstance status, so that it can be retrieved and the vm can be accessed through ssh

/rebase


beforeScenario and beforeFeature

Hi, I just want to know if there is beforeScenario and beforeFeature functionality.
I saw afterScenario and afterFeature, and was wondering where is the other part.
Or do some sort of "before" in the Background sector?
Many thanks.

please please read the docs ! https://github.com/intuit/karate#hooks


caching-writer is old version

https://github.com/yahoo/ember-intl/blob/master/package.json#L25

:+1:

Are there breaking API changes between 1.1.0 and 2.x?

https://github.com/yahoo/ember-intl/commit/08578fa51f2efc5a6276e341329a8f93ed2c25c0 changes are here

Why does this break an different plugin?

Not sure, didn't spend time looking into it.  Changes are on the branch and should reproduce it.

Not sure, didn't spend time looking into it. Changes are on the branch and should reproduce it.

If you ping me tonight, i can take a look (i will forget if not reminded :P)

Actually I bet it was npm on my box.  Will try again tonight because you're right that doesn't make sense.

af9b9a711e51412055ec50a204ab1363421ffeea


Install Tekton Logs Collector using Kustomize generator

ArgoCD CR's Application/ApplicationSet CR isn't available in every cluster. So we switched to using kustomize generator for vector installation.

/test appstudio-e2e-tests

/test appstudio-e2e-tests

/lgtm

Vector got deployed to Dev env.

/hold cancel


bug when tooltip template has text (e.g. new line character) in between s

When there is text in tooltip 'template' option (e.g. new line character), a bug is reported in jQuery. Tracing the bug leads to Tooltip.prototype.applyPlacement where on line 1500 $tip.offset(offset) is called and $tip contains 'text' nodes (which don't have offset, or at least ownerDocument.defaultView.getComputedStyle( elem, null ) doesn't want 'elem' to be 'text' when 'ownerDocument' is #document):

$tip: jQuery.fn.init[7]
0: div#tooltip981716.tooltip.fade.bottom.in
1: text
2: div#tooltip981716.tooltip-arrow.fade.bottom.in
3: text
4: div#tooltip981716.tooltip-inner.fade.bottom.in
5: text
6: div#tooltip981716.fade.bottom.in
length: 7
....
This is the error message:

And this is the state:

The best would be to skip the text elements or at least the documentation of Tooltip should state that not even eonls are allowed in between the s

Could you post a JS Bin that demonstrates the problem?

Hi Chis,
sure I can, but it's a part of a bigger project so pairing it down will
take some time, and I have urgent time commitments - so sometimes after Tu
should be more feasible...
Jan
Dr. Jan Stelovsky, Founder and CTO
www.parwinr.com, jan AT parwinr.com, +1-808-673-0035
2903 Bunker Hill Ln #150, Santa Clara, CA 95054
This electronic message transmission contains information from the Company
parWinr, Inc. that may be proprietary, confidential and/or privileged. The
information is intended only for the use of the individual(s) or entity
named above. If you are not the intended recipient, be aware that any
disclosure, copying or distribution or use of the contents of this
information is prohibited. If you have received this electronic
transmission in error, please notify the sender immediately by replying to
the address listed in the "From:" field.
On Fri, Apr 3, 2015 at 7:27 PM, Chris Rebert<EMAIL_ADDRESS>wrote:

Could you post a JS Bin that demonstrates the problem?
—
Reply to this email directly or view it on GitHub
https://github.com/twbs/bootstrap/issues/16219#issuecomment-89367663.

Presumably your template consists of more than 1 top-level element, which isn't valid (hence the likewise invalid repetition of the same autogenerated ID). Example: http://jsfiddle.net/7a2eutbt/3/

Hi @cvrebert!
You appear to have posted a live example (http://fiddle.jshell.net/7a2eutbt/3/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

line 38, column 3: W007: Found one or more <button>s missing a type attribute.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)


Add CI for RustPython/Ruff tests

Instead of only running Rust tests, we should also add jobs for running RustPythons (and Ruffs if there's the desire?) tests with every PR.
This will result in a larger wait time but should catch some confusing bugs, i.e https://github.com/RustPython/RustPython/issues/4995

I'd like to suggest to create tests using this test https://github.com/RustPython/Parser/blob/main/ast-pyo3/test_ast.py
We don't need to run RustPython but still can test if the parser result is same as CPython.

Was thinking more along the lines of a subset, i.e test_grammar.py etc. Anything basically related to parsing would be nice to have.
If it's too much of a hassle, having at least something would definitely be good.


[AMBARI-25124] ambari-audit.log entries span multiple lines (apappu)

What changes were proposed in this pull request?
Removed moving the entries to new line - instead separated out with "," and brackets "()"
(Please fill in changes proposed in this fix)
How was this patch tested?
(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
Deployed the changes in live ambari server and tested flows like,

logged with admin and non-admin users
add a new service
add a new repo version.
delete service.
Please review Ambari Contributing Guide before opening a pull request.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5064/
Test FAILed.
Test FAILured.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5094/
Test FAILed.
Test FAILured.

Cherry picked PR FROM https://github.com/apache/ambari/pull/2899

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5141/
Test FAILed.
Test FAILured.


Add a little documentation for A100 use

Is your feature request related to a problem? Please describe.
Since Torch2, the Shivam Colab fails, at least for me, 3/4 of the time on a basic T4. The Colab was established as a tightly-optimized script with no margin for error, and the advent of Torch 2 has (in my experience) made a successful training on a T4, on this Colab, now relatively precarious.
For those of us, like me, who are solving the problem by spending out on an A100 instance, there is no comprehensive documentation that explains how to set the script up for an A100 instead of a T4.
Describe the solution you'd like
I would like the Colab to contain 1 paragraph of extra advice for use on an A100, which at least mentions useful but unreferenced flags such as '--not_cache_latents', and any other flags that would help the user to maximize use of the A100, but which are not actually present currently, either as commented-out code or in the help text.
Describe alternatives you've considered
I have trawled Reddit, Discord, Google and even PMs with Shivam, in search of a comprehensive guide to rejigging the settings for an A100, but the advice is scrappy, and the best place for a definitive para of advice is in the Colab itself.
It should also be mentioned that actions such as not using FP16 (i.e., setting the flag to 'no') will likely slow down training considerably, as might deleting 8-Bit Adam flag from the training parameters.
The help text could put forward the pros and cons of these changes.

Probably some of these are use case, so depends on the training task at hand I would imagine. I use the A100 on Google colab. If you are training on houses, landscapes, etc. 8-Bit is prob fine, but for more complex structures and humans, etc. Removing the flag will work better. The only thing I do differently is remove the 8-Bit Adam flag, I still use fp16 as I've tried both and not seen a difference, it takes twice as long. What I'm getting at is I doubt there is much difference, there's literally just a couple of things you can do to improve performance, regarding the flags. Many other things can be changed that don't involve them, such as the noise scheduler, dropout, unet cross attention dim, leaning rate, weight decay, adam betas and the optimizer

Getting this error today:
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.5/224.5 kB 6.7 MB/s eta 0:00:00
  Building wheel for diffusers (pyproject.toml) ... done
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.3/63.3 MB 12.1 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 215.3/215.3 kB 5.8 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 68.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.1/53.1 kB 6.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━ 34.1/62.5 MB 93.0 MB/s eta 0:00:01
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    bitsandbytes==0.35.0 from https://files.pythonhosted.org/packages/aa/f1/6ff7784b946672e59e84470a1ee31eba48a2f03dad85eee7f6bdca6e0a20/bitsandbytes-0.35.0-py3-none-any.whl:
        Expected sha256 3ba4046114b7bc66284baa8dac6bb00e2e57881a31467e5e98c34de27b0ca13c
             Got        88ce0633c6bfa1b292cc0cec7218f2dc122ae6ac4c25555c966ddb0761d6c372


TP2000-1145  Add page numbers to workbasket changes, transaction views pagination

TP-??? Your PR title here

Why

What

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

Comparison is base (7b6b9b4) 92.73% compared to head (f301e06) 92.72%.
Report is 1 commits behind head on master.

Files
Patch %
Lines

workbaskets/views/ui.py
73.68%
5 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1111      +/-   ##
==========================================
- Coverage   92.73%   92.72%   -0.01%
==========================================
  Files         460      460
  Lines       35179    35204      +25
  Branches     2687     2689       +2
==========================================
+ Hits        32624    32644      +20
- Misses       2025     2028       +3
- Partials      530      532       +2

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


⚠ Processors has degraded performance

In 6bd32f5, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 154 ms

Resolved: Processors performance has improved in 76a6a54.


Error when running shutdown of a instance

Required information

Distribution: bionic
Distribution version: 18.04.5
The output of "lxc info" or if that fails:

Kernel version: 5.4.0-59-generic
LXC version: 4.10
LXD version: 4.10
Storage backend in use: ext4

Issue description
Sometimes, when shutting down an instance. Looking at the logs, I get the following error msg:
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/01/13 15:45 UTC
Status: Stopped
Type: container
Profiles: default

Log:

lxc ubuntu-behave-image-build--xenial1610552373112973<PHONE_NUMBER>4521.142 WARN     cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1152 - File exists - Failed to create directory "/sys/fs/cgroup/cpuset//lxc.monitor.ubuntu-behave-image-build--xenial1610552373112973"
lxc ubuntu-behave-image-build--xenial1610552373112973<PHONE_NUMBER>4521.144 WARN     cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1152 - File exists - Failed to create directory "/sys/fs/cgroup/cpuset//lxc.payload.ubuntu-behave-image-build--xenial1610552373112973"
lxc ubuntu-behave-image-build--xenial1610552373112973<PHONE_NUMBER>4521.152 WARN     cgfsng - cgroups/cgfsng.c:fchowmodat:1573 - No such file or directory - Failed to fchownat(17, memory.oom.group,<PHONE_NUMBER>, 0, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW )
lxc<PHONE_NUMBER>4615.391 WARN     commands - commands.c:lxc_cmd_rsp_recv:126 - Connection reset by peer - Failed to receive response for command "get_state"

Steps to reproduce
This issue seems to appear randomly, so there is no steps to reproduce it

Nothing shown here looks wrong. Those warning messages are harmless and seen on most containers.

Nothing shown here looks wrong. Those warning messages are harmless and seen on most containers.

Chatting privately, it seems like the issue is something in the container calling shutdown and then the container not actually shutting down. When this happens, the issue is usually in the container with some service not wanting to shut down or some systemd issue.
During such a clean shutdown, LXD isn't involved at all, other than once init in the container exits, it unmounts the storage of the instance and releases any of its devices.
Closing for now, feel free to reopen when you have more details about what's going on and if it then looks like there's still some issue involving LXD.

Chatting privately, it seems like the issue is something in the container calling shutdown and then the container not actually shutting down. When this happens, the issue is usually in the container with some service not wanting to shut down or some systemd issue.
During such a clean shutdown, LXD isn't involved at all, other than once init in the container exits, it unmounts the storage of the instance and releases any of its devices.
Closing for now, feel free to reopen when you have more details about what's going on and if it then looks like there's still some issue involving LXD.


Last break-after not working

Hi, me again,
During some tests, i wrote this code http://codepen.io/anon/pen/VvbzOr and the results is quite strange. The last break-after is not applied whatever the number of regions.
Any ideas ?

Hi,
Thanks for the bug report. I can confirm I see this issue here.
I'm currently in the process of relocating to Seattle so I may not have much time to spend on this issue but I suspect this must lie in the extractOverflowingContent code. There's some code there that tries to take forced breaks into consideration, and for some reason it does not run on the before-last split, which is interesting.
My wild guess is that the whole content is actually fitting in the region so the code detects no break are required to fit the region and therfore does not apply the forced break fix, since no fragmentation is initiated.
EDIT: This hypothesis was confirmed by changing the height of the regions to 300px. In that case, no breaking happen at all. If you want to attempt a fix, I can point you in the right direction. Otherwise you may have to wait a bit before I can get free time to work on this, as I have already a few things before this.

https://github.com/FremyCompany/css-regions-polyfill/blob/master/src/css-regions/polyfill.js#L126 is where one should start to investigate the issue

Finally i resolved this issue replacing
#elements {
  flow-into: flowbox contents;
}

by
#elements {
  flow-into: flowbox content;
}

Try it : http://codepen.io/anon/pen/NGaNYe


When to use derived state blog post

TODO:

[ ] Add Code Sandbox link for function binding reset demo

The fonts end up really jumpy.

Maybe let's make the intro shorter? Or not use the code highlighting inside a link. Or fix it to look better.

Okay. I've added a link to a Code Sandbox timer-based demo. I am unable to test it currently b'c of the terrible Internet connection I'm on.

Okay. I think I've responded to the things you haven't yet responded to. I mentioned Redux (briefly) and updated the Code Sandbox demos to use 16.3 and better match the examples they follow in the post.

I'm closing this PR because it has gotten a little noisy. I'll apply feedback and create a fresh PR with it (and link it here).

Continued with PR #934


Fixing "too many open files" error in tests

Currently "too many open files" error appears in tests. The error is rooting in how recursive deletion is implemented in scorex.testkit.utils.FileUtils.remove(). This PR fixes the problematic recursive files deletion.
The fix is made by @knizhnik and extracted from the #362 .

Coverage remained the same at 46.984% when pulling 97c0a07748be8c0265c92177e2b424d98f677d1a on toomany into 8ddf4af17cfb335abc431dfbe27abcf8f45cf9b5 on master.


Page in the screenshot

Not really an issue, but I'm new to github and don't know how to message someone...
I love the note that you used for the screenshot of your Obsidian theme, but cannot find it anywhere. Any chance you could share it?

That was one of my personal notes in my Obsidian notebase. I'm afraid I changed my system and no longer use that notebase, and unfortunately, I can't find a backup of the file. Put simply, I had followed a personal knowledge management framework that separated notes by different aspects: Capture, Incubate, Synthesize, and Present. Capturing was the kind of notetaking that occurs when studying or researching or otherwise finding something worth adding to the notebase; these notes served to merely capture ideas and data. Incubating was a different mode of notetaking where new ideas are being generated from captured notes, a kind of open, freethinking exercise of connecting captured notes together. Synthesizing was more serious concentration in building an argument, a thesis, really anything that is a fully formed idea or sequence of ideas. And Presenting was a more final form of writing based on synthesized notes. This system was intended to separate notetaking concerns into their different aspects, meaning, processes that occur discretely over the lives of researching and writing projects. It was a useful system in its own way. I opted for something else because of my own thought patterns and what it's like for me when I encounter data worth annotating or thinking about. Hope this is useful.


🚀 Feature: Upload Files through Software Templates

🔖 Feature description
Enable a requestor to upload a file through software template,
🎤 Context
is it possible using reactJson Schema that enables uploading a file.
✌ Possible Implementation
Depends on feasibilty
👀 Have you spent some time to check if this feature request has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
None

see #12912

see #12912

Hi! the page for discussion 12912 now results in 404. could someone help out with where to read about file uploads through software templates?
https://github.com/backstage/backstage/discussions/12912

@CarlosPet, There's some examples here: https://rjsf-team.github.io/react-jsonschema-form/ under Files.
In short, you'd need to do something like:
parameters:
  myYamlFile:
    type: string
    format: data-url
    title: Pick a yaml file
    ui:options:
      accept: .yaml

And then you will get a base64 dataUrl that you should parse in the the action with the file contents.

@CarlosPet, There's some examples here: https://rjsf-team.github.io/react-jsonschema-form/ under Files.
In short, you'd need to do something like:
parameters:
  myYamlFile:
    type: string
    format: data-url
    title: Pick a yaml file
    ui:options:
      accept: .yaml

And then you will get a base64 dataUrl that you should parse in the the action with the file contents.

thanks, in case anyone else comes to this page from google (like I did) to handle multiple files you can use an array like this:
        docs:
          title: Docs
          type: array
          description: ''
          items:
            type: string
            format: data-url
          ui:backstage:
            review:
              show: false

I published this on the discord too but this is causing a follow up issue: it cannot handle more than 10MB or so, when I upload two 10MB files it breaks with a Backend request failed, 413 Payload Too Large error.
Is there any standard/accepted way to make it handle bigger files?

And then you will get a base64 dataUrl that you should parse in the the action with the file contents.

Is there any example on parsing the dataUrl or do we have an action for the same? @benjdlambert

@CarlosPet You'll probably want to update the bodyparser limit. https://github.com/backstage/backstage/issues/12075#issuecomment-1160607427 something like this should help.
@aswathysen, there's nothing supported out of the box, but you could build an action that takes the input and then uses something like https://www.npmjs.com/package/parse-data-url to parse the files and write it to the workspace.

And then you will get a base64 dataUrl that you should parse in the the action with the file contents.

Is there any example on parsing the dataUrl or do we have an action for the same? @benjdlambert

If it helps you, I created a custom action for handling a single file upload, the relevant part of the script would be:
const explodedFile = ctx.input.myFile.split(";");
const base64File = explodedFile[explodedFile.length-1].split(",")[1];
const fileContents = Buffer.from(base64File, 'base64')

@CarlosPet You'll probably want to update the bodyparser limit. #12075 (comment) something like this should help.
@aswathysen, there's nothing supported out of the box, but you could build an action that takes the input and then uses something like https://www.npmjs.com/package/parse-data-url to parse the files and write it to the workspace.

I tried, and like the other comment in that thread, Changing that parameter didn't solve my issue initially.
To anyone who comes across this page. be sure to declare the route as the first option in the code. otherwise it will not work. so it will look like this:
  const apiRouter = Router();
  apiRouter.use(bodyParser({ limit: '50mb' })); // add this right after declaring the apiRouter
  apiRouter.use('/catalog', await catalog(catalogEnv));
  apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv));
  // ... other routes

it works for me now

@CarlosPet maybe you can add some of this to the documentation under input examples?

@CarlosPet maybe you can add some of this to the documentation under input examples?

Hi! as soon as I get all the details lined up, sure. But there are multiple implications i think. for example now I am facing a new issue. Could you point me in the right direction again? When uploading the files I am doing so with a custom action that basically iterates over the array of data-url strings and writes them to disk. If I try this with my two 10mb files it justs hangs forever. upon further investigation i tried uploading files one by one. this time the error seems to indicate it was a memory issue.
After the first file has been uploaded, the second action fails with an error:
scaffolder error Failed to parse template string: ${{ parameters.docs }} with error Isolate was disposed during execution due to memory limit type=plugin
is there a way to increase the memory scaffolder has access to? if it's needed instead to increase the memory available to the whole app instead, what would be the way to do that using yarn?

This is something that I am needing to implement and looked to see if there was anything already outlined. I was encouraged by this thread, but seems like this has stalled? Seems like it would be a nice feature. In any case, @benjdlambert or @CarlosPet , if you happened to make any progress, I'd love to see what you've done.

Oh apologies @CarlosPet, I missed your last message. I think that this is because there's a limit that we give to the sandbox in which some of the templating strings are running. This limit is set pretty high at the moment, what sort of file size were you trying?
https://github.com/backstage/backstage/blob/26ca6a43424ee621d4f521572f6052680b0859f6/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts#L140
@chrisccoy although there seems to be limited documentation for this, you should be able to achieve file uploads by combining:
template.yaml changes:
https://github.com/backstage/backstage/issues/18704#issuecomment-1831437901
parsing the file:
https://github.com/backstage/backstage/issues/18704#issuecomment-1834516635
and maybe updating the router with a better limit for uploads:
https://github.com/backstage/backstage/issues/18704#issuecomment-1836580918
I wonder if you could contribute some documentation into the input examples section of the Software Templates once you have something that works for you @chrisccoy? :pray:

@benjdlambert If I can get something working, I will- thanks


HTTP 301 response code is not followed

Many service list providers use HTTP 301 to redirect from a permanent alias URL to an operational URL.
The Reference Client should follow the redirection offered by HTTP 301 "Moved Permanently".

If the reference app is used over https:// then any service list requests using http:// will not work, even if it is just a redirect to https://

Agreed, but 301 can also be used for http->http or https->https aliasing

Some atricles suggest that the Query $.get() api should follow redirects, but perhaps only 302, 303, 307, 308

I did a quick test, seems like 301 redirect works but the 301 response needs to have the Access-Control-Allow-* headers set correctly. Also,if the redirect is to a different domain/protocol, then the service list URL needs to handle the preflight OPTIONS-request.

Lets close this - it seems to be related more to webserver configuration of CORS than the DVB-I Reference Client.


TC meeting on 2024-03-07

Thanks a lot for the minutes of the meeting and that you had time to discuss RCM OSS. I try to answer the questions concerning RCM OSS in the pull request today.


Response compiles incorrectly, keys of object contain \u0000 (unicode like chars)

What version of gRPC and what language are you using?
We use gRPC version "1.24.11". Backend is on Scala (2.7.5) and Backend for Frontend on NodeJS (14.16.0);
Libraries:
"grpc": "1.24.11",
"@grpc/proto-loader": "0.6.4",
"google-protobuf": "3.13.0",
"protobufjs": "6.11.2",
What did you do?
We have a service proto:
// api.proto
syntax = "proto3";
package general;

service Service {
  option (service_description) = "Service description";

  rpc GetStatistics (GetStatisticsRequest) returns (GetStatisticsResponse) {
    option (method_description) = "Returns statistics";
  }
}

message GetStatisticsRequest {
  repeated int64 ids = 1 [(field_description) = "Download ids"];
}

message GetStatisticsResponse {
  map<int64, Statistics> statistics = 1 [(field_description) = "Download id -> download statistics"];
}

message Statistics {
  int32 total = 1 [(field_description) = "Total count"];
  int32 errors = 2 [(field_description) = "Errors count"];
}

In NodeJS backend we define resource with grpc library like this:
// base-resource.js
const path = require('path');
const grpc = require('grpc');
const { loadSync } = require('@grpc/proto-loader');
const each = require('lodash/each');

function baseResource({ protoPath, serviceAddress }) {
    const packageDefinition = loadSync(
        path.resolve(
            process.cwd(),
            'path/to/proto/dir',
            protoPath
        ),
        {
            keepCase: false,
            longs: String,
            enums: String,
            arrays: true,
            objects: true,
            defaults: true,
            oneofs: true,
            includeDirs: [
                path.resolve(process.cwd(), 'path/to/proto/dir'),
            ],
        }
    );

    const root = grpc.loadPackageDefinition(packageDefinition);
    const Service = root.someService;

    const service = new Service(serviceAddress, grpc.credentials.createInsecure(), {
        'grpc.max_receive_message_length': 1024 * 1024 * 100,
    });

    each(service.$method_names, method => {
        this[method] = function(
            req,
            params,
            { metadata = {} } = {}
        ) {
            const meta = new grpc.Metadata();

            for (const key in metadata) {
                if (metadata.hasOwnProperty(key)) {
                    meta.add(key, metadata[key]);
                }
            }

            const deadline = Date.now() + 60000;

            const isStream = service[method].responseStream;

            if (isStream) {
                return service[method](
                    params,
                    meta,
                    { deadline }
                );
            }

            return new Promise((resolve, reject) => {
                service[method](
                    params,
                    meta,
                    { deadline },
                    (error, data) => {
                        if (error) {
                            reject(error);
                            return;
                        }
                        resolve(data);
                    }
                );
            });

        };
    });
}

module.exports = baseResource;

And try to get data like this:
const BaseGrpcResource = require('./base-resource');
const resource = new BaseGrpcResource({
    protoPath: 'general/api.proto',
    serviceAddress: `${host}:80`,
});

const ids = [1,2,3];
const result = await resource.GetStatistics(req, { ids }); // will be send as a json to client

What did you expect to see?
I expect to get an object like:
{
    "1": {
        "total": 12749,
        "errors": 6,
    },
    "2": {
        "total": 12736,
        "errors": 6,
    },
    "3": {
        "total": 12736,
        "errors": 6,
    },
}

What did you see instead?
On client I get this:
{
    "º\u0002\u0000\u0000\u0000\u0000\u0000\u0000": {
        "total": 12749,
        "errors": 6,
    },
    "´\u0002\u0000\u0000\u0000\u0000\u0000\u0000": {
        "total": 12736,
        "errors": 6,
    },
    "µ\u0002\u0000\u0000\u0000\u0000\u0000\u0000": {
        "total": 12736,
        "errors": 6,
    },
}

In NodeJS logs these keys looks like ½\x02\x00\x00\x00\x00\x00\x00

µ\u0002\u0000\u0000\u0000\u0000\u0000\u0000 looks like a bytes representation, so it can be casted to number (to BigInt as it is an int64 or to String) with Buffer. For example:
Buffer.from('µ\u0002\u0000\u0000\u0000\u0000\u0000\u0000').readBigInt64LE().toString();

>> 177602


Moved dependencies to the right spot, formatting, and fixed wrong attribute names

Does the new eslint config have some different rules that led to the ' --> " changes and semicolon additions?

@aej11a Correct, lmk if you don't like it and I can change those rules 👍

@NotoriousGOR I think the ' --> " change is good, but it would be better to remove the semicolons :)
Thanks

@aej11a done!


Pin package versions

fabric-client seems to have removed Client.newEventHub in later versions. That caused the following error for me when trying to add tuna or change holders in the client app:
TypeError: fabric_client.newEventHub is not a function

Pinning it (and some dependencies) solved the issue for me.

I've anonymized your pull request.
My corresponding pull request is number 132 at hyperledger/education.


ReferenceError: global is not defined for 2.7-preview@1

Describe the bug
I'm implementing server component tests for generator-teams via. supertest npm package. I implemented a sample test (you can find it here):
https://github.com/cagdasdavulcu/cd-test-05/blob/master/src/app/__tests__/Server.spec.ts
if i run the tests, then i'm getting an exception ReferenceError: global is not defined from the package 'express-msteams-host'.
You can use my sample repository for reproducing the problem (just clone it and run the command 'npm run test'):
https://github.com/cagdasdavulcu/cd-test-05
Screenshots

ReferenceError: global is not defined
   5 | import { MsTeamsApiRouter, MsTeamsPageRouter } from "express-msteams-host";
   6 | import * as debug from "debug";
>  7 |
     | ^
   8 | // Initialize debug logging module
   9 | const log = debug("msteams");
  10 |

  at eval (eval at Object.<anonymous> (node_modules/botframework-connector/src/index.ts:1:2), <anonymous>:3:13)
  at Object.<anonymous> (node_modules/botframework-connector/src/index.ts:1:213)
  at Object.<anonymous> (node_modules/botbuilder/src/botFrameworkAdapter.ts:10:1)
  at Object.<anonymous> (node_modules/botbuilder/src/index.ts:9:1)
  at Object.<anonymous> (node_modules/express-msteams-host/lib/routers/MsTeamsApiRouter.js:43:20)
  at Object.<anonymous> (node_modules/express-msteams-host/lib/routers/index.js:5:26)
  at Object.<anonymous> (node_modules/express-msteams-host/lib/index.js:9:10)
  at Object.<anonymous> (src/app/server.ts:7:30)
  at Object.<anonymous> (src/app/__tests__/Server.spec.ts:4:16)

Detailed information

Generator version: [2.7.1-preview@1]
OS: [Windows]
Node version: [10.15.3]
Npm version: [6.9.0]

You can get around that issue by adding window.global = window; to the test-shim.js file. But that leads to further issues down the road. As the project is compiled with two different tsconfig files; one for the server side components (tsconfig.json) and one for the client side components (tsconfig-client.json).

Thank you!


We have a stable release, youhou

Hi, thanks for the PR. Sadly these changes cause the CI to fail. See https://circleci.com/gh/kurlltd/silex-doctrine-migrations-provider/16. It looks like doctrine/migrations require php 5.4.x but the composer.json in this projects states 5.3.x.

Well 5.3 and 5.4 are unsupported now.

You could tag a new version that support 5.5 onward and use a stable version of doctrine migrations.

I've had a look and ^5.5|^7.0 (lazily copy and pasted from doctrine migrations) works.

@breenie done but it seems like you have to update the circle ci configuration to test on 5.5, 5.6 and 7

Sure, good point. I'll update it tomorrow and do a release. Thanks.

Contrary to what the git hub report states this now passes CI. It was a royal pain due to some changes in doctrine migrations and some idiocy from me. I've released v0.2.0 so 0.1.x users don't have a nightmare on older php versions. Thanks for the PR.


Trace is null or empty (PS 5.1 and 7)

Windows Server 2016 v1607 build 14393.4283.
Name                           Value
----                           -----
PSVersion                      5.1.14393.3866
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.3866
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

and
Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0ÔÇª}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Installed the module (3.0.0) from PSGallery, cloned this repo and ran the example from README.md.
$trace =  Trace-Script -ScriptBlock { & "demo-scripts/MyScript.ps1" }
PS5.1:
Running in PowerShell 5.1.14393.3866.
Tracing...
Trace is null or empty.
At C:\Program Files\WindowsPowerShell\Modules\Profiler\3.0.0\Trace-ScriptInternal.ps1:137 char:9
+         throw "Trace is null or empty."
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Trace is null or empty.:String) [], RuntimeException
    + FullyQualifiedErrorId : Trace is null or empty.

PS7:
Running in PowerShell 7.1.3.
Tracing...
Exception: C:\Program Files\WindowsPowerShell\Modules\Profiler\3.0.0\Trace-ScriptInternal.ps1:137
Line |
 137 |          throw "Trace is null or empty."
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Trace is null or empty.

Same for SleepyScript.ps1.
I tried 3.0.0 rc2 (via Install-Module -Name Profiler -RequiredVersion 3.0.0-rc2 -AllowPrerelease) (which took an age to install due to AV pricking it's ears up). Same result unfortunately.
I feel as though perhaps I'm missing some pre-requisite, but unsure. Any ideas? Thanks!

Do you get any output from this?
Import-Module Profiler
[Profiler.Tracer]::Patch($PsVersionTable.PSVersion.Major, $ExecutionContext, $host.UI)
Set-PSDebug -Trace 1
$null = Get-Process
Set-PSDebug -Trace 0
[Profiler.Tracer]::Unpatch()
[Profiler.Tracer]::Hits | ft

PS C:\Program Files\PowerShell\7> Import-Module Profiler
PS C:\Program Files\PowerShell\7> [Profiler.Tracer]::Patch($PsVersionTable.PSVersion.Major, $ExecutionContext, $host.UI)
MethodInvocationException: Exception calling "Patch" with "3" argument(s): "Attempted to divide by zero."
PS C:\Program Files\PowerShell\7> Set-PSDebug -Trace 1
PS C:\Program Files\PowerShell\7> $null = Get-Process
$null = Get-Process: Attempted to divide by zero.
PS C:\Program Files\PowerShell\7> Set-PSDebug -Trace 0
Set-PSDebug -Trace 0: Attempted to divide by zero.
PS C:\Program Files\PowerShell\7> [Profiler.Tracer]::Unpatch()
[Profiler.Tracer]::Unpatch(): Attempted to divide by zero.
PS C:\Program Files\PowerShell\7> [Profiler.Tracer]::Hits | ft
[Profiler.Tracer]::Hits | ft: Attempted to divide by zero.

As you can see, after it borks on Patch::() every command afterwards reports an attempted to divide by zero error. Same for both PS5.1 and 7.
For info:
PS C:\Program Files\PowerShell\7> $PsVersionTable.PSVersion.Major
7
PS C:\Program Files\PowerShell\7> $ExecutionContext

Host           : System.Management.Automation.Internal.Host.InternalHost
Events         : System.Management.Automation.PSLocalEventManager
InvokeProvider : System.Management.Automation.ProviderIntrinsics
SessionState   : System.Management.Automation.SessionState
InvokeCommand  : System.Management.Automation.CommandInvocationIntrinsics

PS C:\Program Files\PowerShell\7> $host.UI

RawUI                                                                   SupportsVirtualTerminal
-----                                                                   -----------------------
System.Management.Automation.Internal.Host.InternalHostRawUserInterface                    True

And... I just ran this on my W10 desktop in PS5.1 and it worked fine. I'm not sure how to dig into/debug [Profiler.Tracer]::Patch() otherwise I'd try to help. Let me know if I can provide anything else.

Works on Windows Server 2019 too.
Name                           Value
----                           -----
PSVersion                      5.1.17763.1852
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.1852
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

There are only two divisions in the C# code.
"-tps-"
[timespan]::TicksPerSecond
"-f-"
[System.Diagnostics.Stopwatch]::Frequency
"-gts-"
[System.Diagnostics.Stopwatch]::GetTimeStamp()

what is the output of this?

[timespan]::TicksPerSecond
10000000
[System.Diagnostics.Stopwatch]::Frequency
2343750
[System.Diagnostics.Stopwatch]::GetTimeStamp()
7532418260

Seems like it's [System.Diagnostics.Stopwatch]::Frequency? 10000000 on all other systems.

One more please:
[System.Diagnostics.Stopwatch]::GetTimeStamp(); Start-Sleep 1 ; [System.Diagnostics.Stopwatch]::GetTimeStamp()

9711765734
9714185883

Mkay so I do the math correctly, just assuming incorrectly that the number will be a whole number. It needs to use double/decimal instead of long:
[timespan]::fromticks((9714185883-9711765734)/(2343750/10000000))
-> 1s

And we can get the max precision like this [int] (1e9/2343750) -> 427ns

Fixed in #28

Thanks for such quick work on this. Much closer now but still hitting an issue (sorry). Running with 3.0.1 installed in the default location (and pulling the latest copy of this repo into F:\Profile for the demo scripts):
PS F:\Profiler> $trace =  Trace-Script -ScriptBlock { & "demo-scripts/MyScript.ps1" }
Running in PowerShell 5.1.14393.4350.
Starting trace.
Stopwatch is high resolution, max resolution of timestamps is 427ns.
before
Run finished after 00:00:10.6333435.
Tracing done. Got 60014 trace events.
Processing 60014 trace events.
Figuring out flow.
Sorting events into lines.
Figuring out durations per line.
Counting averages and percentages.
Getting Top50 with the longest Duration.
Getting Top50 with the longest average Duration.
Getting Top50 with the longest SelfDuration.
Getting Top50 with the longest average SelfDuration.
Getting Top50 with the most hits.
Cannot create object of type "Profiler.Trace". Unable to cast object of type 'System.Management.Automation.PSObject'
to type 'Profiler.LineProfile[]'.
At C:\Program Files\WindowsPowerShell\Modules\Profiler\3.0.1\Trace-Script.ps1:338 char:5
+     $script:processedTrace = [Profiler.Trace] @{
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : ObjectCreationError

Duration: A: 00:00:00
Done. Try $trace.Top50Duration | Format-Table to get the report. There are also Top50Average, Top50SelfDuration, Top50Se
lfAverage, Top50HitCount, AllLines and Events.

Cannot create object of type "Profiler.Trace". Unable to cast object of type 'System.Management.Automation.PSObject' to type 'Profiler.LineProfile[]'. Exception calling "CompleteInput" with "3" argument(s): "Sequence contains no elements"

Does that work on other systems again, but not just this one?

Correct (working on W10 and 2019). Tested on a second 2016 server just to be sure and got the same error.

@robinmalik  I just merged changes that will hopefully show better error about the cast. Or at least which property is it. Can you pull main from this repo and run it against the version from there? I started pushing the .dlls as well so you don't have to build, just run . ./demo.ps1

@nohwnd Pulled and running demo.ps1 from main under PS5.1:
Running in PowerShell 5.1.14393.4350.
Starting trace.
Stopwatch is high resolution, max resolution of timestamps is 427ns.
Trace-ScriptInternal : Unable to find type [Profiler.ProfilerTracer].
At F:\Profiler\Profiler\Trace-Script.ps1:122 char:14
+ ...    $trace = Trace-ScriptInternal -ScriptBlock $ScriptBlock -Preheat $ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Profiler.ProfilerTracer:TypeName) [Trace-ScriptInternal], RuntimeExce
   ption
    + FullyQualifiedErrorId : TypeNotFound,Trace-ScriptInternal

Processing 0 trace events.
Figuring out flow.
Sorting events into lines.
Cannot index into a null array.
At F:\Profiler\Profiler\Trace-Script.ps1:200 char:22
+     foreach ($hit in $trace[2..($traceCount-3)]) {
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Figuring out durations per line.
Counting averages and percentages.
Getting Top50 with the longest Duration.
Getting Top50 with the longest average Duration.
Getting Top50 with the longest SelfDuration.
Getting Top50 with the longest average SelfDuration.
Getting Top50 with the most hits.
Duration: A: 00:00:00
Done. Try $trace.Top50Duration | Format-Table to get the report. There are also Top50Average, Top50SelfDuration, Top50Se
lfAverage, Top50HitCount, AllLines and Events.

@nohwnd Ok, odd situation. Pulled from this repo, imported the module, and ran demo.ps1 and it generated two errors. The first as mentioned above and a second which I now only remember as referring to foreach ($hit in $trace[2..($traceCount-3)]) {. Made a post here.
I then realised that there may have been a conflict between the module at C:\Program Files\WindowsPowerShell\Modules\Profiler\3.0.1 and the imported copy from main, so I deleted the version in Program Files and re-ran the test. It ran without an error so I deleted the post I made.
This is the output:
Running in PowerShell 5.1.14393.4350.
Starting trace.
Stopwatch is high resolution, max resolution of timestamps is 427ns.
before
Run finished after 00:00:10.6339225.
Tracing done. Got 60014 trace events.
Processing 60014 trace events.
Figuring out flow.
Sorting events into lines.
Figuring out durations per line.
Counting averages and percentages.
Getting Top50 with the longest Duration.
Getting Top50 with the longest average Duration.
Getting Top50 with the longest SelfDuration.
Getting Top50 with the longest average SelfDuration.
Getting Top50 with the most hits.
Duration: A: 00:00:00
Done. Try $trace.Top50Duration | Format-Table to get the report. There are also Top50Average, Top50SelfDuration, Top50SelfAverage, Top50HitCount, AllLines and Events.

but $trace is empty.
Of course now I see demo.ps1 is forcefully importing the local copy of Profiler.psd1 so it should have run the same both times. Anyway, I'm trying to see if I can get the errors back to report them...

Managed to get it. Installed 3.0.1 again and ran the demo line from readme.md which gives the original error, then:
PS F:\Profiler> Import-Module .\Profiler\Profiler.psd1 -force
PS F:\Profiler> .\demo.ps1
Running in PowerShell 5.1.14393.4350.
Starting trace.
Stopwatch is high resolution, max resolution of timestamps is 427ns.
Trace-ScriptInternal : Unable to find type [Profiler.ProfilerTracer].
At F:\Profiler\Profiler\Trace-Script.ps1:122 char:14
+ ...    $trace = Trace-ScriptInternal -ScriptBlock $ScriptBlock -Preheat $ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Profiler.ProfilerTracer:TypeName) [Trace-ScriptInternal], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound,Trace-ScriptInternal
Processing 0 trace events.
Figuring out flow.
Sorting events into lines.
Cannot index into a null array.
At F:\Profiler\Profiler\Trace-Script.ps1:200 char:22
+     foreach ($hit in $trace[2..($traceCount-3)]) {
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray
Figuring out durations per line.
Counting averages and percentages.
Getting Top50 with the longest Duration.
Getting Top50 with the longest average Duration.
Getting Top50 with the longest SelfDuration.
Getting Top50 with the longest average SelfDuration.
Getting Top50 with the most hits.
Duration: A: 00:00:00
Done. Try $trace.Top50Duration | Format-Table to get the report. There are also Top50Average, Top50SelfDuration, Top50SelfAverage, Top50HitCount, AllLines and Events.

The first output looks actually incorrect, there are many events but the duration is 0. Duration is lastevent - first event. So there must be some error in the processing.
The second output looks like you loaded new module, but had older version of the dll loaded (as you said), and all the errors are coming from that (the type does not exist), which leads to 0 events in the trace -> null array.

Please get it back to the state where you get 0 errors, and 0 duration, and after the run call Get-LatestTrace, and poke around in the object (and post the contents) if you get any.

Sure:
Top50Duration     :
Top50Average      :
Top50HitCount     : {MyScript.ps1, MyScript.ps1, MyScript.ps1, MyScript.ps1...}
Top50SelfDuration :
Top50SelfAverage  :
TotalDuration     : 00:00:00
StopwatchDuration : 00:00:10.4800042
AllLines          : {MyScript.ps1, MyScript.ps1, MyScript.ps1, MyScript.ps1...}
Events            : {00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000...}

Okay. what is:
$trace.Events[0..10] |ft
$trace.Events[-10..-1] |ft

and $trace.AllLines[0..10] |Ft ?

After running demo.ps1 all those lines report a single error: Cannot index into a null array.
After running $trace = Trace-Script -ScriptBlock { & "demo-scripts/MyScript.ps1" }:
$trace.Events[0..10] |ft
Path                                          Line Column Text                                                                                Timestamp StartTime                  SelfDuration Duration Source Extent
----                                          ---- ------ ----                                                                                --------- ---------                  ------------ -------- ------ ------
F:\Profiler\Profiler\Trace-ScriptInternal.ps1  133     17 $null = [Profiler.Tracer]::Patch($PSVersionTable.PSVersion.Major, $ExecutionContext, $host.UI, $tracer) -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\Profiler\Trace-ScriptInternal.ps1  142     13 $null = & $ScriptBlock                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
                                                 1     37 {                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
                                                 1     39 & "demo-scripts/MyScript.ps1"                                                                           -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1            1      1 $upperLimit = 10000                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1            2      5 $_profiler                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1            6      5 $values = 1..$upperLimit                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1            9      5 $_profiler                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           16      5 Write-Host "before"                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           17      5 $Values | foreach {...                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           17     23 {                                                                                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent

and
$trace.Events[-10..-1] |ft

Path                                          Line Column Text                                            Timestamp StartTime                  SelfDuration Duration Source Extent
----                                          ---- ------ ----                                            --------- ---------                  ------------ -------- ------ ------
F:\Profiler\demo-scripts\MyScript.ps1           21     57 }                                    -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           21     23 {                                    -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           21     32 $newValues += $_ + 10                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           21     57 }                                    -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           21     23 {                                    -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           21     32 $newValues += $_ + 10                -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\demo-scripts\MyScript.ps1           21     57 }                                    -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
                                                 1     69 }                                    -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\Profiler\Trace-ScriptInternal.ps1  148     13 $null = Set-PSDebug -Trace 0         -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent
F:\Profiler\Profiler\Trace-ScriptInternal.ps1  156     17 $null = [Profiler.Tracer]::Unpatch() -9223372036854775808 -10675199.02:48:05.4775808 00:00:00     00:00:00        Profiler.ScriptExtent

and
$trace.AllLines[0..10] |Ft

Percent HitCount Duration Average  SelfDuration SelfAverage Name                                 Line Text                                                  Path
------- -------- -------- -------  ------------ ----------- ----                                 ---- ----                                                  ----
      0    30000 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                           21 $newValues += $_ + 10                                 F:\Profiler\demo-scripts\MyScript.ps1
      0        1 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                           16 Write-Host "before"                                   F:\Profiler\demo-scripts\MyScript.ps1
      0        1 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                            9 if ($_profiler) {                                     F:\Profiler\demo-scripts\MyScript.ps1
      0        1 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                            6 $values = 1..$upperLimit                              F:\Profiler\demo-scripts\MyScript.ps1
      0        1 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                           21 $Values | foreach {        $newValues += $_ + 10    } F:\Profiler\demo-scripts\MyScript.ps1
      0        1 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                            2 if ($_profiler) {                                     F:\Profiler\demo-scripts\MyScript.ps1
      0        1 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                            1 $upperLimit = 10000                                   F:\Profiler\demo-scripts\MyScript.ps1
      0        1 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                           17 $Values | foreach {                                   F:\Profiler\demo-scripts\MyScript.ps1
      0        3 00:00:00 00:00:00 00:00:00     00:00:00    bce0de4e-b85b-41d7-93a6-e3c6515ffd59    1 & "demo-scripts/MyScript.ps1"                         bce0de4e-b85b-41d7-93a6-e3c6515ffd59
      0    10000 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                           19 }                                                     F:\Profiler\demo-scripts\MyScript.ps1
      0    10000 00:00:00 00:00:00 00:00:00     00:00:00    MyScript.ps1                           18 $newValues += $_ + 10                                 F:\Profiler\demo-scripts\MyScript.ps1

Hope this helps!

Ah that is probably because you are running the demo like ./demo.ps1, but you need to dotsource it to keep $trace variable in scope: . ./demo.ps1. Posted it above, but it's easy to miss. Should have pointed that out, sorry.

So yeah, it looks like our code works all correctly, you don't get any output on the Top50 because each one of the filter to >0, and you have non of those, except for hit counts. I don't think we even calculate the start time, and the timestamps are negative so weird. Need to have a look at this later.

Re:  ./demo.ps1 - I'd noticed that, but hadn't realised it was making any difference. Should have realised 🤦♂ No rush on my part by the way - thanks for everything you've done so far.

Okay, so start time is calculated from the timestamp. And the timestamp seems to return all the same values, so that is why the duration is 0.
So either the timestamp is static, or I am dividing it so much that it would not change in any reasonable time. OR maybe there is some overflow? OR maybe the frequency changes.
Please pull this branch, and try it, you should see additional output regarding timestamps:
https://github.com/nohwnd/Profiler/tree/timestamp-issues

My guess is that the frequency math doe not work in some way, because the source of timestamp is the same since before 1.0.0


to -check

Thisis the code from the razeek pls check

This is  AbdulRazeek

This is  AbdulRazeek

To change in my local repo


We should use FlashStore insteadof FlashStoreSync

In our code, we are using FlashStoreSync:
https://github.com/padlocal/wechaty-puppet-padlocal/blob/a4b04b723fc4f75d08596a2952e08f4b5037983c/src/padlocal/cache-manager.ts#L7
the FlashStoreSync will provide a sync API with the cost of ... load all data in memory, which is not very efficient for memory usage.
I'd like to suggest that we should replace the FlashStoreSync with the FlashStore and using its async API. (with the latest version, with LevelDB backend).
Best practice
The wechaty-puppet-service module can shows the best practice for using FlashStore:
https://github.com/wechaty/wechaty-puppet-service/blob/main/src/client/payload-store.ts

Althougth FlashStoreSync has beed used in the code, BUT it is FlashStore indeed. Because import FlashStoreSync from https://github.com/huan/flash-store; will import FlashStore by default. I prefer it's a typo.

Great to see that we continue fixing the ESM branch this week!
Yes, using a explicit import will be recommended (instead of using the default export):
import { FlashStore } from 'flash-store'


proxyRequest does not proxy the Accept header

Environment
Node 18.16.1
Reproduction
N/A
Describe the bug
Following https://github.com/unjs/h3/pull/646, proxyRequest ignores any Accept headers.
This is breaking my application (following a nuxt upgrade from 3.9 -> 3.11) as we proxy api requests via the server to a backend API, which requires us to send through an Accept header.
As a fix for the timebeing I can explicitly pass through the Accept header as follows
  return proxyRequest(event, targetPath, {
    headers: {
      Accept: event.headers.get('Accept') || ''
    }
  })

but this feels a bit unnecessary to me, I would have expected h3 to send through this header by default.
Additional context
No response
Logs
No response

I too believe this was a bit of breaking change and doesn't work as expected. I'm using nuxt's routeRules to specify proxies and I don't there is a way to manually forward headers from there. For API responses, I can probably hard code it:
  routeRules: {
    '/api/**': {
      proxy: {
        to: '...',
        headers: { accept: 'application/json' }
      }
    },

But I also have stuff like:
    '/images/**': {
      proxy: {
        to: '...'
      }
    },

I want the backend to be able to determine what the browser supports. Currently it always responds with the fallback format instead of modern ones like avif even if the browser support them because that info is removed while proxying.

I am facing this issue, too. I am missing the following headers when using routeRules:

"accept": "application/json",
"x-xsrf-token": "...=",


⚠ Samsung has degraded performance

In 8cde08b, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2585 ms

Resolved: Samsung performance has improved in 6c11c24.


Fix close_output test.

The close_output test was randomly failing on rust-lang/rust's CI.  This should fix the error. I ran the test in a loop on the rust-lang 16-thread CPU for 10,000 times over the course of 1.5 hours without fail.  The same stress test without this patch failed relatively easily.
I'm a bit on the fence, as this means the test is no longer testing a realistic scenario (the compiler usually doesn't emit a megabyte of diagnostics). Moving this test to a single-threaded runner should also solve the problem. I can't decide if it matters enough to bother.  WDYT?
Closes #8564

r? @alexcrichton
(rust_highfive has picked a reviewer for you, use r? to override)

From a "speed" perspective, do we have an idea of which is faster? I suspect the 1MB of output is faster personally, but maybe I'm wrong? We could also consider locking stdout in the loop instead of re-locking it on every iteration...

Yea, this is quite a bit faster and simpler.  On my system, this test takes about 3s.  The alternative would mean building and linking a whole separate test.  I guess another alternative would be to #[ignore] it and then run cargo test -- --test-threads=1 --ignored build::close_output.  Either way, it makes running tests more awkward and complicated.

@bors: r+
FWIW I think the forked process theory is at least one explanation. A thread forks, holds open the file descriptor, then gets unscheduled. While it's unscheduled the entire test finishes and Cargo writes everything to a defunkt pipe, not failing. We then fail the test because Cargo didn't fail (because all output fit in the pipe buffer). There may be other bugs in play but that's at least one sure-fire way to expose this bug.

:pushpin: Commit 191250b910154e7aa6aefa029007cc1b1d2ec4d8 has been approved by alexcrichton

:hourglass: Testing commit 191250b910154e7aa6aefa029007cc1b1d2ec4d8 with merge 1653f354644834073d6d2541e27fae94588e685e...

:sunny: Test successful - checks-actions
Approved by: alexcrichton
Pushing 1653f354644834073d6d2541e27fae94588e685e to master...


run binaries from resources path without copying to host

Kitematic seems to copy docker and docker-machine binaries to the host system. I use multiple docker and machine binaries in my path and i am worried theres a conflict between the two. Also i don`t want to fill my hdd with stuff that i don't know is being put there. It would be great if there is some notification of what is being installed. However by looking at the code it looks as if it runs from resources?:
  command: function () {
    return path.join(process.cwd(), 'resources', 'docker-machine-' + this.version());
  },```

The app is entirely self-contained except for:

Downloading & Installing VirtualBox if you don't have it already
Copying the latest docker and docker-machine binaries to /usr/local/bin for convenience. But I agree this isn't very transparent.

We'll make this more clear on the download page. Thoughts? Thanks for the issue!

@pandrew assuming this is okay. Closing for now. Please re-open if you'd like more information.
Thanks!


Consider the idea of an Any type

If we go down this route it would be preferable to be able to configure its availability to a given user via the profile.
Idea is that you could use a JavaScript library method and put the result into an Any  type.
You can then use  methods (following same rules as 'system methods') on that type, with Elan syntax, but with no type or identifier checking.  You could pass in Elan types. There could be a generic method to convert an Any into an Elan type, but recognising that that method may fail with an exception.
(This would also allow us to teach the idea of dynamic typing within Elan - as a transition to, say, Python or JavaScript).

No strong case for this at present.