I/O Address Unmapping Safety

During I/O calls, we check the NaCl VMMap to make sure our buffer address is valid before we send the call to RustPOSIX. The gap between the address check and the actual pipe operation is a TOCTTOU bug that could result in a Trusted Fault, which we handle gracefully but results in Lind terminating. To ensure this doesn't happen, we have to make sure the buffer addresses cannot be umapped after the VMMap address check.
Fixing this issue without sacrificing performance in our worst case pipe scenarios is tricky, due to issues with deadlock/starvation and the cost of mutexes. Deadlock issues potentially arise from having I/O calls within the same cage (i.e Cage 1/Thread 1: in blocking read, Cage 1/Thread 2: attempts to write). While a potential starvation issue comes from locking out ALL mapping during a block I/O call (same as above, but thread 2 needs to map an area).
This issue has technically been around since the beginning of Lind. NaCl didn't worry about the vmmap check being preserved entirely for things such as read/write because they were handled by the kernel calls.
Since we never technically unmap any user addresses, what we are actually worried about are addresses being remapped as PROT_NONE, or mprotected to PROT_NONE (or changed to an invalid prot). The calls that could affect this to my knowledge are: mprotect(), mmap() (with MAP_FIXED), munmap(), and shmdt() (if the address was originally assigned as shared memory).
So altogether, we need to find a solution that:

Prevent the buffer address being unmapped between the address check and data being copied into/from the checked buffer
Prevent blocking I/O calls from causing deadlock with other I/O calls within a cage
Prevents starvation during blocking I/O calls with map calls
Doesn't incur further performance penalties to read()/write() calls, since our scenario where read and write buffers are 2^4 has only ~8% margin over native pipelines.

Currently there is one mutex in NaCl in the read/write pipe pathways. It's used to manage the NaClDescs, which I've talked about in the past. These mutexes take ~12% of each I/O call when buffers are small (2^4). This mutex doesn't handle any of the scenarios above, but could be replaced by another mutex can handle the desc concurrency as well as I/O in relation to mapping.
However, to be able to give rustposix access to other I/O calls when one is currently blocking, we'd have to design that mutex as a RWLock. Unfortunately testing these in C demonstrates results that are ~2.5x slower than normal mutexes, which is enough to cause a performance drop that kills the small buffer gains.
Solution A:
I implemented a solution using a counter where in I/O calls:

A flag is set inside of an I/O call mutex
The Cage's I/O counter is incremented
The mutex is released
The call proceeds to RustPOSIX
The counter is decremented

And inside of map calls:

The mutex is grabbed
If the counter > 0: spinlock until 0

This would solve deadlock between I/O calls but would still deadlock with combined blocking I/O and mapping.
Solution B:
A different solution would be similar to above, but instead of spinlocking, having the call return an error, such as EACCES or EAGAIN. This would be starvation free, but could possibly cause software to fail incorrectly.
Mythical Solution C:
A more correct solution would only block/fail unmapping calls that are in the same range as the address for the I/O call, but I haven't been able to brainstorm a solution that is both concurrency safe and doesn't cause additional performance overhead.
I'm leaning towards Solution B currently but would like to open this up for some discussion.

I think I've figured out a simple solution here.
When our signal handler catches the SIGSEGV, it assumes its a trusted fault because it happens within RustPOSIX. However, siginfo provides information on what address caused the fault.
I should be able to check if the signal is SIGSEGV and if so check if the fault address is within our cage memory space. If so, I can change the teardown mechanism to be for an untrusted fault, and therefore only need to teardown the faulting cage and not the whole system.

I was able to implement a fix for this issue, though it took some headscratching for a bit. Apparently, PTHREAD_CANCEL_ASYNCHRONOUS seems to not be on by default after the libc 2.34 update which was causing the teardown handler not to work as it previously did (looking into this a bit more it was weird that it WAS set before). This will also let me fix the exiting threads on exit() call issue somewhat simply, and I will do that shortly.
There are some good things and bad things here, and I want to fully discuss them before I merge these changes. I want to be clear that the problems here don't specifically apply to the above issue but apply to the notion of being able to safely remove ANY faulting cage without having to abort Lind fully (as well as being able to properly exit multi-threaded cages in blocking cases).
The Good:

Cancellation of a thread in Rust invokes Unwind which nicely cleans up any resources we have there.
As all NaCl pthreads are launched as detached, thread resources also should properly get cleaned up (and we free the cage shared resources before freeing the nap structure)

The Bad:
Actually having to enable PTHREAD_CANCEL_ASYNCHRONOUS led me down a rabbit hole about this setting where the responses vary from "there be dragons here" to "this is never safe" to "well... this sometimes can be fine".
According to the manpage
 Asynchronous cancelability
       Setting the cancelability type to PTHREAD_CANCEL_ASYNCHRONOUS is
       rarely useful.  Since the thread could be canceled at any time,
       it cannot safely reserve resources (e.g., allocating memory with
       malloc(3)), acquire mutexes, semaphores, or locks, and so on.
       Reserving resources is unsafe because the application has no way
       of knowing what the state of these resources is when the thread
       is canceled; that is, did cancellation occur before the resources
       were reserved, while they were reserved, or after they were
       released?  Furthermore, some internal data structures (e.g., the
       linked list of free blocks managed by the malloc(3) family of
       functions) may be left in an inconsistent state if cancellation
       occurs in the middle of the function call.  Consequently, clean-
       up handlers cease to be useful.

       Functions that can be safely asynchronously canceled are called
       async-cancel-safe functions.  POSIX.1-2001 and POSIX.1-2008
       require only that pthread_cancel(3), pthread_setcancelstate(),
       and pthread_setcanceltype() be async-cancel-safe.  In general,
       other library functions can't be safely called from an
       asynchronously cancelable thread.

       One of the few circumstances in which asynchronous cancelability
       is useful is for cancellation of a thread that is in a pure
       compute-bound loop.

If the execution is within a cage and we are cleaning up that cage, I think this is always safe.  Even if malloc, etc. are happening, the resulting memory doesn't matter because the pages will just be unmapped.
We do need to handle the case where a call is in RustPOSIX.

I definitely think this is safe in terms of resources shared between threads within a cage which are suspended and removed. There also aren't any resources shared between cages that could cause problems. What I am slightly worried about is problems within the trusted system's glibc ie a thread is canceled within the trusted malloc which messes up state somehow.
I don't think this example is actually a problem with how malloc is implemented with threads now, but thinking of things along these lines.

Note, if we can suspend / resume threads as we desire (i.e.,
co-scheduling), this problem becomes a lot more manageable.
I'm thinking we can do this only in cages, not in the microvisor.
On Tue, Jan 3, 2023 at 7:17 PM Nicholas Renner @.***>
wrote:

I definitely think this is safe in terms of resources shared between
threads within a cage which are suspended and removed. There also aren't
any resources shared between cages that could cause problems. What I am
slightly worried about is problems within the trusted system's glibc ie a
thread is canceled within the trusted malloc which messes up state somehow.
I don't think this example is actually a problem with how malloc is
implemented with threads now, but thinking of things along these lines.
—
Reply to this email directly, view it on GitHub
https://github.com/Lind-Project/lind_project/issues/288#issuecomment-1370353798,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGROD2AUQSUYN2EBFXBBJTWQS6RXANCNFSM6AAAAAAS4YZWPU
.
You are receiving this because you were assigned.Message ID:
@.***>

After great conversations with @moyix and @JustinCappos yesterday I think I've found a solution based on some of their suggestions and a few other insights.
I'm able to toggle the thread such that once the flag is set I can inhibit code from passing from untrusted to trusted, or vice versa. This is useful because I can lock untrusted code in an untrusted state, and can cancel threads at this point usint pthread_cancel with the ASYNC flag. We can set all threads to be ASYNC cancellable, but only use pthread_cancel for threads we know are in untrusted space.
Otherwise, I've set up our own version of cancel points where we can tell a thread that should be torn down to safely exit. I have these positioned at the entry/exit points of syscall handlers, but we should also be able to add them at places we've designed to block (ie inside pipe_read/pipe_write loops). There's still some design hardships I need to work out with calling the NaCl cancel function from inside Rust but this all should be doable.
This should handle most cases for untrusted teardowns, though there are still some corner cases such as threads stuck in a blocking recv() (we can probably redesign blocking recvs with a select loop and a cancel point inside). I think this will be the safest way to handle this without leaving cages hanging or doing unsafe cancels.

I believe this is all implemented for crashes and properly exiting thread groups. I probably am going to need to add a counter/timer to the cancel point in pipe_read so it doesn't trigger every iteration, because that would probably add a ton of overhead.
Going to test a bit more before putting up a PR.

While merging and testing this I found that besides pipe read/recv, theres also possible hang up points in RustPOSIX for condvars and mutexes. @jesings is going to fix up the implementations there so that we can periodically check cancel points.

This is finally fixed with the recent cancellation PR.


Fix timeout errors and add more fields to GroupWrapper

Exploring the RN thread getting completely locked sometimes, I managed to create 3 reproducible tests:

creating 10 groups in // : not a real use case but interesting to see that creating 9 groups in // works all of the time, creating 10 groups in // fails all of the time, on iOS + Android
listing many groups' members in // : this is closer to what we do in Converse and it's interesting to see that Android is able to list 50 groups's members in // while iOS fails at 20
doing other stuff not linked to the database while we have locked the database => other RN methods should still work, but they get blocked until the timeout throws, the whole thread is blocked

These lock last 30 seconds (I guess that's the duration of the db lock?)
During these 30 seconds, no other call to the SDK resolves (even calls to the SDK that don't rely on the database, like canMessage v2 version - the call just does not reach the native code)
Also in Converse it happens in a loop because during the sync process

try to sync => cause a 30 sec lock & timout
after 30 sec fail => retries a sync

There is an increasing backoff for retries but it explains why it looks like the app is "bricked" forever, as soon as it gets unlocked, it goes into a lock again.
We should probably understand why these calls cause a timeout and fix it (creating 10 groups should be possible, even if we need to wait a bit for the pool, here it seems we never get back the pool connection and it times out)
We should also understand why if one async call to the sdk is locking, other calls to the sdk, even not using the database, lock as well => should a pool connection awaitance cause a thread lock?

This PR now Fixes https://github.com/ephemeraHQ/converse-app/issues/422 and Fixes https://github.com/xmtp/libxmtp/issues/955
And adds functionality for addedBy and members list to the group
Closes https://github.com/xmtp/xmtp-react-native/issues/476
Closes https://github.com/xmtp/xmtp-react-native/issues/475

Android
iOS


Teacher must be able to upload/update the picture of the course

A new field 'select a display picture' needs to be added in the current course creation popup, the rest should remain the same.
here is the design:

Requirements:

Add a check that file upload accepts only image files, file with other extensions should be rejected with an error message 'Please upload image files only with the extensions .jpg, .jpeg, and .png'

This option is not mandatory, if the user does not upload an image, the default image should be the one that we currently have (soco)

The user should be able to edit/change/remove the image once uploaded or even before clicking on 'confirm' button

Changing/removing the image option should appear in the 3 dot menu close to the course name

clicking on this options open the select file menu as for the firs time.
Once image is uploaded a success message is shown 'Course display image updated successfully'
(Additional: while you are doing this, please change the S to s in 'Notifications Settings' option

If the user removes his uploaded image, the default soco image should be applied with the same success message 'Course display image updated successfully'

a part of #1258

@ahmedmohyh based on the discussion in the last biweekly meeting, the default image for the course cards will be a random image, (e.g. the ones that are on moodle etc) but not the soco image as mentioned in the issue description.


wide cookie banner

In #608 I've opted to not go full-width. These screenshots should illustrate why but it's easy enough to tweak sizing and positioning when the new designs come along 👍
Full-width:

Pull request implementation:


WIP: gh-208. Add basic interface for an access-blob-storage package

Regarding interface:

blob storage should be generic for any blob content, in other words it's should not include any entities like Preview or CSV files
under 'generic' we mean that customers of it's API can write and read blobs, navigate over buckets/folders , generate links with auth access

class BlobStorage

    writeBlob(options, readableStream) {}

    makeFolder(options) {}

   / **
     * @returns {ReadableStream}
    **/
    readBlob(options) {}

    generateLink(options) {}

    list(folder, options)

    remove(options)

Interface is raw and for discussible, just to show an idea

interface is ok, we need integration tests here to prof that module can work with minio


Fix 'Open in Portal' for deployment slots

Fixes https://github.com/microsoft/vscode-azureappservice/issues/2101

ლ(¯ロ¯"ლ)


commit blk during log replay in rep dev

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.42%. Comparing base (1a0cef8) to head (a57cfc9).
Report is 49 commits behind head on master.

Files
Patch %
Lines

src/lib/replication/repl_dev/raft_repl_dev.cpp
87.50%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #524       +/-   ##
===========================================
+ Coverage   56.51%   67.42%   +10.90%
===========================================
  Files         108      109        +1
  Lines       10300    10428      +128
  Branches     1402     1401        -1
===========================================
+ Hits         5821     7031     +1210
+ Misses       3894     2720     -1174
- Partials      585      677       +92

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

As discussed in DM,  this PR is not right as there is no guarantee the data has been written to the allocated blks before the restart.

        HomeRaftLogStore::end_of_append_batch(start_lsn, count);
        HISTOGRAM_OBSERVE(m_rd.metrics(), raft_end_of_append_batch_latency_us, get_elapsed_time_us(cur_time));

        cur_time = std::chrono::steady_clock::now();
        // Wait for the fetch and write to be completed successfully.
        std::move(fut).wait();

we can put std::move(fut).wait() before end_of_append_batch.
if data is written but log is not flushed, that`s fine, since the block is not committed

yes we can, it is trading regular IO latency vs space leak during recovery, which I am not sure it worth to .
Prior to that, we have to solve the rollback stuff.

Prior to that, we have to solve the rollback stuff.

rollback happens when a request is pre_committed but not committed.
1 in normal case, we can free the blk in on_rollback.
2 in recovery case , since the blk is not commited (commit_blk will be called in on_commit), so blk leak will not happen.
in on_log_found, if the lsn of a log  entry is bigger than dc_sln, we can just discard it.
any input?

discussion: https://ebay-eng.slack.com/archives/CAVQXEAKS/p1724866496708579


Editor goes berserk and start scrolling on mouse movements

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.93.0
OS Version: Manjaro Linux

Steps to Reproduce:

Use VSCode for many many consecutive hours (I have no idea what triggers the issue)

Sometimes, randomly, the IDE seems to go completely berserk and it will start "following" the mouse cursor with scrolling.
Meaning that when I move the mouse cursor up, the editor will scroll up, when I move the mouse cursor down, the editor will scroll down. A dotted non-blinking caret is visible at all times at the end of the line at whose height the mouse cursor is; this is besides the normal blinking text cursor.
With this, the IDE becomes completely unusable.
Restarting stops this madness.

Several people have reported the same problem on this Reddit thread.
This seems to be associated with shift+drag-and-drop of files from outside the editor. I.e. the cursor is the exact same one as what appears when I drag a file from the desktop into VS Code while holding shift.
Moreover, the issue can be fixed (for the moment) by dragging a file into vscode, which will do nothing, except make the dotted line/cursor disappear.


The Documentation is wrong for CommonJS

Hi,
For CommonJS version you need to put:
const configureStore = require('redux-mock-store').default;
instead of
const { configureStore } = require('redux-mock-store'), also this:
const configureStore = require('redux-mock-store') doesn't work.
the problem is related with the double export statement that you make:
export function configureStore ...
export default configureStore
Regarding of that, it's a great tool for testing!

The export syntax has been changed, you shall use now with latest version the following export
const { createMockStore }  = require('redux-mock-store')


Add spectator (spec framework)

Hi @veelenga,
this PR adds spectator.

@veelenga you mean weekly CI builds on the spectator shard?
I'm not the maintainer of it.
But I guess we can ask @icy-arctic-fox whether there are periodical builds.

Hey, @alexanderadam , thanks for this PR!
Spectator has had CI setup in GitLab. I just enabled weekly builds.
https://gitlab.com/arctic-fox/spectator/pipelines


error validating schema: chainId: conflicting values 103 and 0

pls i keep getting an automerge error while trying to use the token-list repo,any help on how i can fix this pls

Same problem here

i have seen various submissions erroring like that; that generally means you put the new json block in the wrong place, like one level too deep (inside another coin's block).  link a PR and someone can verify that that's the issue (but please try to take this advice and resubmit)

https://github.com/solana-labs/token-list/pull/6637 is an example of the problem i mentioned

Hi keone. I have the same issue. this is my PW: https://github.com/solana-labs/token-list/pull/6637. I have added my code at the last position. So I had to add a comma to the previous coins block. Can that cause the error? I left everything else untouched. The level should be ok, its not in another coins block. Would be great if you could check. Here you can see my code: https://github.com/solana-labs/token-list/pull/6637/commits/f56e4051c94066b8d4bc6a951dce3100c6091f76

actually nvm, i agree that it seems like a red herring or an unrelated error. will look into it

I had the same problem. The issue was vccode adding a newline at the end of the tokenlist file.
Disabling the editorconfig extension allowed me to remove the line and submit it properly.

I used TextEdit in Mac and had the same "error validating schema: chainId: conflicting values 103 and 0"
I was adding extensions to a token.

error persists error validating schema: chainId: conflicting values 103 and 0

PR# 10956

Hi,
I have the same with PR #11568.
Did you find a solution ?
Thanks

Hi, I have the same with PR #11568. Did you find a solution ? Thanks

https://github.com/solana-labs/token-list/issues/6552#issuecomment-991998267

Same issue with PR #11613

Same with PR #11689

has there been an update? I'm getting this same issue with PR #11644

has there been an update? I'm getting this same issue with PR #11644

Try getting rid of the last line here. That's what made it work for me.

Hi guys. is anyone using Visual Studio (pressing "period" button)  to activate the console in Github (or did use it) to edit fork before committing it their own repository?
I have exact same error. Looks like Visual Studio might be causing errors? Im not sure?
I have "No newline error" the red circle - stating a line was deleted
Cant automerge as conflicting values 103 and
Beeman above says he solved it - but I cant tell what he did?
I assume he deleted line 66691 ?? anyway I've tried a series of different line deletions - nothing has worked so far
I can see its missing at 66678 above _ I have same type of issue. I have tried to use little red arrow to re-add line
but that's not worked??
Be great to know if someone has worked it out...
Thanks

I eventually just used Notepad to edit the json file. My editor, Atom, kept
auto formatting and deleting then adding that line
On Wed, Jan 26, 2022 at 5:09 PM Aqualibre @.***> wrote:

Hi guys. is anyone using Visual Studio (pressing "period" button) to
activate the console in Github (or did use it) to edit fork before
committing it their own repository?
I have exact same error. Looks like Visual Studio might be causing errors?
Im not sure?
I have "No newline error" the red circle - stating a line was deleted
Cant automerge as conflicting values 103 and
Beeman above says he solved it - but I cant tell what he did?
I assume he deleted line 66691 ?? anyway I've tried a series of different
line deletions - nothing has worked so far
I can see its missing at 66678 above _ I have same type of issue. I have
tried to use little red arrow to re-add line
but that's not worked??
Be great to know if someone has worked it out...
Thanks
—
Reply to this email directly, view it on GitHub
https://github.com/solana-labs/token-list/issues/6552#issuecomment-1022750435,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARLILRJCHY6JZ6KM2SX2NMLUYCLNDANCNFSM5JT4AXZA
.
You are receiving this because you commented.Message ID:
@.***>

I have the same issue on doughdao add #17029 could you help me?

I have the same issue on doughdao add #17029 could you help me?

Remove your trailing slash

see explanation here: https://github.com/solana-labs/token-list#error-validating-schema-chainid-conflicting-values-103-and-0


Implement the correct method in the server_connection

The first implementation used upgrade, which was then changed to upgrade_protocol, but the change wasn't reflected in the implementation of the session used by the actual http server.

@mfelsche @sacovo what is the bug that this fixes?

Hi @sacovo,
The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.
Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 78.md to match the number of this pull request.
The basic format of the release notes (using markdown) should be:
## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.


[Example] Add bare-metal example with STM32 target

would be awesome if this example mounted a fatfs file system as the root node


Fix macOS CI with Bazel 0.27

Signed-off-by: Lizan Zhou<EMAIL_ADDRESS>Description:
Risk Level: Low
Testing: CI
Docs Changes:
Release Notes:

Isn't Python 2 about to become officially deprecated?

@moderation that is tracked by #4552, while bazel 0.27 (which we install from today as mac CI install latest) default to python3 that breaks thrift test.


p2p authenticate peer on handshake

One of the security enhancements identified as part of #291. Jonathan G. to support.

I intend to use boost::asio's native support for OpenSSL to achieve this.  It will support peer authentication using any of a purely local certificate authority, a distributed private certificate authority, or a recognized global certificate authority.  This accommodates everything from testnets to loosely affiliated producers to contractually bound producers establishing a major chain.
Note that the example uses don't correspond to any particular scenario.  A testnet may be organized using certificates issued by a global CA and a major chain may be established with a private CA, at the discretion of the producers.

Created cmakelists that generates a local certificate authority.

This is nice and all, but we need to authenticate peers against blockchain state which is the ultimate certificate authority.
In particular, we will need to authenticate connections against producers.
I can see using OpenSSL to establish a secure encrypted connection, but authentication will have to be done by signing an ECDH shared secret using an EOS private key.

Is a shared secret useful in some other context?  It seems an unnecessary vulnerability in this context.
If a single shared secret is compromised, an attacker could impersonate an arbitrary number of producer nodes in the network.  If instead a producer's companions are identified by their public keys, an attacker would have to compromise each producer's private key individually in order to impersonate them.

Launcher now generates node keys and certificates.

Revised how certificates were being generated.  Previous method was invalid.  Integration of certificate use is ongoing.

Abandoning OpenSSL, much as it pains me.  It could be sufficiently automated that using an SSL-equipped connection would be relatively painless, but enabling that was invading more and more of the code.
Using producer keys at the application level instead.

After a deep dive into the fc library, I have found the tools I need to do the job without reinventing any wheels.  I expect task completion within the next 24 hours.

Somehow, some way, the key is unrecoverable.  Detailed debugging tomorrow.

Pushed a patch which works, except on my system when one of the nodes has no producers, that node throws an exception trying to retrieve the genesis producers from the database.

Blocked by #552.

Pull request initiated.  All tests now pass.

Updated launcher to generate the new config file options.  Now testing.

Testing revealed some issues.  My favorite technique for sharing boost program options between plugins didn't work, so peer private keys had to get their own config file option.  Also reworked for ease of merging with ongoing sync work.  Testing now looking good.

Pushed new pull request.

Now supports authenticating producers, non-producing peers, and/or not authenticating. Authentication now occurs by public key rather than producer name. Protocol extended to eliminate replay attack: packet now contains a PGP-style message, hash, and hash signature, not just hash and hash signature. Only the peer configured to authenticate will check the handshake. If both sides are configured to authenticate, the connection is validated from both sides. ECDH shared secrets could not be used while supporting non-authenticated peers.

Finished.


Improve django url intellisense parameters completion

Hey hey,
Hesse commits:

Fix a small typo
Remove a redundant cast
add the PTVS Apache License in a file where it should be

but more importantly, it improves the way django url parameters are completed.
It will propose the context variables as completion, as long as not enough parameters have been provided to the url template tag. And it will propose the unused named parameters also as completion.
Some changes are a "preparation"  to the django url namespace support I'm working on.
Cheers,
David

Just so you're aware, I'm happy to take this now as is, but we are in the final stages of locking down for VS 2017's release. I haven't yet figured out what our branching strategy will be - will probably start a "3.0" branch for that release and keep using "master" for our first update - but the future namespace support will probably not be able to make it into the initial release at this stage.


Panic in font_atlas_set.rs

System

Linux 64 bit
Wayland (sway)

Description
On Running

Cargo  run --features wayland --example breakout
INTEL-MESA: warning: Haswell Vulkan support is incomplete
thread '' panicked at 'called Option::unwrap() on a None value', crates/bevy_text/src/font_atlas_set.rs:53:42
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

On x11 client it is working fine. (tested on i3wm)
Debug

examples(master)$ RUST_BACKTRACE=1 cargo run --features wayland --example breakout
Finished dev [unoptimized + debuginfo] target(s) in 0.40s
Running /home/gireesh/Trash/bevy/target/debug/examples/breakout
INTEL-MESA: warning: Haswell Vulkan support is incomplete
thread '' panicked at 'called Option::unwrap() on a None value', crates/bevy_text/src/font_atlas_set.rs:53:42
stack backtrace:
0: rust_begin_unwind
at /rustc/5180f3da5fd72627a8d38558ad1297df38793acd/library/std/src/panicking.rs:475
1: core::panicking::panic_fmt
at /rustc/5180f3da5fd72627a8d38558ad1297df38793acd/library/core/src/panicking.rs:85
2: core::panicking::panic
at /rustc/5180f3da5fd72627a8d38558ad1297df38793acd/library/core/src/panicking.rs:50
3: core::option::Option::unwrap
at /home/gireesh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:370
4: bevy_text::font_atlas_set::FontAtlasSet::add_glyphs_to_atlas
at /home/gireesh/Trash/bevy/crates/bevy_text/src/font_atlas_set.rs:53
5: bevy_ui::widget::text::text_system
at /home/gireesh/Trash/bevy/crates/bevy_ui/src/widget/text.rs:40
6: core::ops::function::Fn::call
at /home/gireesh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:70
7: core::ops::function::impls::<impl core::ops::function::FnMut for &F>::call_mut
at /home/gireesh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:247
8: <Func as bevy_ecs::system::into_system::IntoQuerySystem<(),(Ra,Rb,Rc,Rd),(A,)>>::system::{{closure}}
at /home/gireesh/Trash/bevy/crates/bevy_ecs/src/system/into_system.rs:186
9: <bevy_ecs::system::into_system::SystemFn<State,F,ThreadLocalF,Init,SetArchetypeAccess> as bevy_ecs::system::system::System>::run
at /home/gireesh/Trash/bevy/crates/bevy_ecs/src/system/into_system.rs:61
10: bevy_ecs::schedule::parallel_executor::ExecutorStage::run_ready_systems::{{closure}}
at /home/gireesh/Trash/bevy/crates/bevy_ecs/src/schedule/parallel_executor.rs:313
11: rayon_core::scope::ScopeFifo::spawn_fifo::{{closure}}::{{closure}}
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/scope/mod.rs:495
12: <std::panic::AssertUnwindSafe as core::ops::function::FnOnce<()>>::call_once
at /home/gireesh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:308
13: std::panicking::try::do_call
at /home/gireesh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:373
14: __rust_try
15: std::panicking::try
at /home/gireesh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:337
16: std::panic::catch_unwind
at /home/gireesh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:379
17: rayon_core::unwind::halt_unwinding
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/unwind.rs:17
18: rayon_core::scope::ScopeBase::execute_job_closure
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/scope/mod.rs:561
19: rayon_core::scope::ScopeBase::execute_job
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/scope/mod.rs:549
20: rayon_core::scope::ScopeFifo::spawn_fifo::{{closure}}
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/scope/mod.rs:495
21: <rayon_core::job::HeapJob as rayon_core::job::Job>::execute
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/job.rs:167
22: rayon_core::job::JobRef::execute
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/job.rs:59
23: <rayon_core::job::JobFifo as rayon_core::job::Job>::execute
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/job.rs:211
24: rayon_core::job::JobRef::execute
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/job.rs:59
25: rayon_core::registry::WorkerThread::execute
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/registry.rs:753
26: rayon_core::registry::WorkerThread::wait_until_cold
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/registry.rs:730
27: rayon_core::registry::WorkerThread::wait_until
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/registry.rs:704
28: rayon_core::registry::main_loop
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/registry.rs:837
29: rayon_core::registry::ThreadBuilder::run
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/registry.rs:56
30: <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}}
at /home/gireesh/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.8.0/src/registry.rs:101
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

This is actually expected behavior. The example adds characters to an atlas until it runs out of space (not the message that indicates that the atlas has run out of space). I guess capturing the error and failing gracefully would be better.

This is actually expected behavior. The example adds characters to an atlas until it runs out of space (note the message that indicates that the atlas has run out of space). I guess capturing the error and failing gracefully would be better.

Why it is happening only in Wayland?

Solved:
sorry to it was kind of my fault. while running examples i have to be in bevy root directory. I was running it from examples directory that was causing this issue.


chore(main): release 0.0.4

:robot: I have created a release beep boop
0.0.4 (2022-04-24)
Documentation

delete changelog of v0.0.2 as it was not released (b815679)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/remisbaima/license-checker-cyclonedx-maven-plugin/releases/tag/v0.0.4 :sunflower:


Fix resource name typo

Error
sh-4.4# oc get network cluster -o jsonpath='{.spec.networkType}'
Error from server (Forbidden): networks.config.openshift.io "cluster" is forbidden: User "system:serviceaccount:openshift-backplane-managed-scripts:openshift-job-r2krl" cannot get resource "networks" in API group "config.openshift.io" at the cluster scope

This PR will fix the resource name typo

/lgtm

/lgtm
/approve


Autoencoder example uses deprecated API and doesn't compile anymore

TF-193 is the ongoing issue. If you are interested, you are welcome to join the effort! We plan to move swift-models to a SwiftPM package. This is blocked by the fact that the autoencoder example is not using the latest high-level APIs yet.
If you are interested and start to make progress, please send a reply here and to the JIRA bug. The changes should be committed to the master branch instead of the stable branch. Thanks!


use per-instance temp-files for curpage, history and links

When using multiple astro instances at onc, they will interfere with each other due to using the same temp files.
We avoid this by creating individual temp files per instance via 'mktemp'

Hello again. That's a cool feature. Thanks for working on this.


Pop Up Trigger Input Boolean not working

Hi,
The Pop Up Trigger is still not working oin my dashboard. Tried also diffrent pop up cards!
I tried a input_boolean and a light entitie. Both triggers are not working!

Hi and thanks for the feedback!
I've just fixed it, I will release a new version today 🙂

I've just released it:
https://github.com/Clooos/Bubble-Card/releases/tag/v1.6.4


hide_ch_settings: true | not working

Hello,
I would like to report that the function:
hide_ch_settings: true does not work.
If I set it to true I am able to access the Custom Header options when I click on the Lovelace options button (three vertical dots, top right corner) as well as if I set it to false.
I've tested this on:
my PC (Using Chrome 84.0.4147.135 official build)
iPhone 11 (using the Home Assistant app v0.114.4)
Amazon Fire HD 8 tablet (using Fully Kiosk Browser v1.39.3-fire)
Custom Header (v1.7.5) was installed via HACS (v1.5.2) and both are updated to the latest version as of today September 2nd, 2020
I am using the following configuration:
custom_header:
  exceptions:
    - conditions:
        user: Amazon Fire HD 8
      config:
        compact_mode: true
        disable_sidebar: true
        hide_ch_settings: true
        hide_config: true
        hide_help: true
        hide_raw: true
        hide_unused: true
        menu_dropdown: false
        menu_hide: true
        options_hide: false
        reverse_button_direction: false
        voice_dropdown: false
        voice_hide: true
        reverse_tab_direction: false

I am not finding any error messages regarding CH on HA log file.
I am sorry if this has already been reported.
Thank you

Thanks, I see the issue. Will have it fixed up soon.

Thanks, I see the issue. Will have it fixed up soon.

Just updated to v1.7.6 and the issue is resolved. Awesome work and super fast!
Thank you!


Alpha transparency in image not obeyed

Drop a PNG with alpha transparency into a Word document then save as PDF. Use itext7.pdfimage to generate a bitmap then save that to PNG or JPG. The resulting image paints all the transparent parts of the original PNG as black.

It's definitely much much better, but I something's not quite right. There is still an artefact at the edge of the signature image on my example. I'll attach the file so you can see.

It looks like it's rendering the fully transparent pixels as transparent, but those with a transparency > 100% it is rendering as if they were on a black background.
Might this be to do with the embedded image already having its own mask? I'm pretty out of my depth here, but this stack overflow question (albeit about embedding an image into a PDF rather than extracting and rendering) seems like it might be relevant.

That's exactly what I fixed back then. If you found a solution in the mean time (or another nuget that solves the problem), I would gladly implement the fix.


Change in import behavior for already existing spaces

With the new module system, I got the following error:
(Error (import! GroundingSpace-0x12a7846d8 space.metta) import! destination argument must be a symbol atom naming a new space, or &self.  Found: GroundingSpace-0x12a7846d8)

Why can't we import into the already existing space? It is inconvenient.

The short answer is because the behavior of the import! atom is a bad conceptual fit for the abstractions in the new MeTTa (or any language's) module system.  For example, it wouldn't make any sense in Python to say from numpy import * into torch.  If torch needed something from numpy it would do the import itself.
In MeTTa there is also a question about what to do about tokens from the modules, although that question also exists for just importing into a new space.  https://github.com/trueagi-io/hyperon-experimental/blob/8540b90d8669484e945fb78d0d11135b68de9233/docs/modules_internal_discussion.md?plain=1#L41C1-L42C1
The arguments to import! need to be redone to better reflect the underlying semantics of the operation as discussed here: https://github.com/trueagi-io/hyperon-experimental/issues/509 and also https://github.com/trueagi-io/hyperon-experimental/pull/580#discussion_r1491332304
But this issue seems to be about providing a convenience.  So I have two ideas:
1.) The inline! operation.  I could add a space argument to it.  So any atoms created by the inlined code would go into the specified space. inline! seems to be what a lot of people want for a lot of reasons.
2.) An automatic space-merge if the specified space already exists.  I don't like this because it further muddies up what import! is conceptually supposed to do.  But it would bring back the old behavior.

The current behavior of the import! operation is a bad conceptual fit for the abstractions in the new MeTTa (or any language's) module system. For example, it wouldn't make any sense in Python to say from numpy import * into torch

I would repeat that the initial proposal way to consider importing modules and loading spaces as two different use cases. And initial implementation of import! was more about loading spaces than about importing modules. But import! and extend-py! was merged into one, instead of separating them further. However, I disagree with from numpy import * into torch analogy. If you keep importing modules as spaces and since MeTTa does have a good and clear conceptual explanation what it means to load atoms to spaces, and in contrast to many languages it allows working directly with code and it is extremely useful to work (add / remove / etc.) with code in separate spaces, removing the possibility to load something into a space, was definitely a bad idea. Even if we restore this functionality, saying that it's a bad conceptual fit to have the possibility to load additional content into modules at runtime is debatable. Why a human can add something to a module manually, but MeTTa cannot? I believe not all the design patterns of "all other languages" are applicable to MeTTa because of its self-reflective nature.
I don't like inline! name too much. In any case, I wonder, if loading another space into an imported module space will work.

All in all, I disagree with the "conceptual" argument. If we can import something into &self space, we should be able to import something in another space, e.g. via executing import! to &self in the context of this space. Making artificial restriction to this is just wrong. If the restriction is made not because of conceptual reasons, but because of natural implementation, this is another argument, which has more weight.

All in all, I disagree with the "conceptual" argument. If we can import something into &self space, we should be able to import something in another space

That's precisely the issue.  import! &self is just a legacy way to trigger "import *" behavior, but it doesn't make sense to think of import! as having a destination.  All import behaviors ("import module as name", "import * from module", "import foo from module [as name]") effectively import into the currently running module.  ie. self.  For example !(import! &new-space my_mod) imports a new token into the self module's Tokenizer, to reference the sub-module's space.

Programming language design is mostly about convenience.

100% agreed on that point.  So we (our team) need to do the hard work of thinking through all the edge cases, so we can come up with an API and a language that presents the best balance of an ergonomic, intuitive, and coherent interface with all the power and expressiveness people will want.
So along those lines, what convenience do you think makes sense to offer?
One option is a merge-space operator, so you could run
!(import! &new_space the_mod)
!(merge-space &new_space &destination)

This is more verbose than !(import! &destination the_mod), but merge-space will certainly have uses beyond just importing.  Also another downside of this pattern is that &new_space will be unnecessary leftover trash.
An alternative idea might be to not use import! here, and instead add something to provide an accessor for a module's space.  Like this:
!(merge-space (mod-space! the_mod) &destination)

What do you think?

I don't like inline! name too much.

Is it just the name you don't like, or the semantic as well?

One option is a merge-space operator, so you could run...

I'd propose to start with use-cases, and make it convinient for them. My current use case was that there is a bunch of metta-files constituting bio-atomspace, and all of them are supposed to be loaded into the same space. It will be inconvenient to load them first in their own spaces (and assigning tokens to them), and then to merge them. I was also thinking about the function which would return the space atom, into which the content is loaded (unlike import!). However, it's still not precisely what needed, because loading additional content to the existing space might be more efficient than loading it into a separate space and then merging them (it, of course, depends on how spaces are implemented; if we have an algebra over spaces, then merge of spaces should not necesserily be a "physical" merge; OTOH such algebra poses some challenging for indexing mechanisms, so I wouldn't make it obligatory for any kind of spaces). In any case, while merging spaces can be useful by itself for other cases, I wouldn't introduce it for this case.
Thus, I think we need to restore the former functionality of loading additional content into the existing spaces. Obviously, it should not necessarily be import!. Although if we go away from importing to anywhere but &self, then we need to make it less misleading, because &self is a space. And it is definitely an inconsistent notation that we can pass &self space to import! but we cannot pass another space, and instead we need to specify a token for a new space. This is a separate discussion, however, and I wouldn't like to introduce rush changes to import! syntax without really thinking through it carefully and coming up with the version, which will be stable. Right now, it's definitely not a blocking issue. What is more urgent is the now missing functionality.
OK, let it not be import!. We need to load the content of a file to the already existing space. But there is still more that one sub-cases. One may want to load a pure space (but it can possibly contain numbers and strings as grounded atoms), or one can want to interpret the code of another script in the content of the existing space. This situation appeared in metta-motto, and after new modules were introduced I had to emulate this behavior in the metta-motto itself (which is ok for better controllability). As for bio-atomspace case, it will work for me with this PR https://github.com/trueagi-io/hyperon-experimental/pull/593 (which is needed not only to workaround the changed behavior, but for performance reasons as well).
Thus, I'd wait for other use cases to understand if we need first loading a pure spac, or running a script in context of existing module/space. Meanwhile, we have other useful features to implement like module downloading and installation.

Is it just the name you don't like, or the semantic as well?

It's the name. Although the details of semantics are to be discussed.

Can we say that we have "importing" and "loading" operations. When module is imported then atoms of the module become a part of a destination module and tokens of the module are used to parse following atoms of the destination module. (Strictly speaking import! not necessary loads atoms into the destination module but it makes them available for the destination module. But at the moment it is implemented by adding atoms into the destination module.) When module is loaded then atoms of the module also become a part of destination space but tokens of the module are used only to parse the modules itself. Thus from the atoms perspective importing and loading are not different at least before we have "import as" which will extend the semantics of the import. From this perspective inline! not so bad name but load! could be more clear. And import! is different because it treats tokens (and potentially atoms) differently.

@luketpeterson , it should be prioritized as many metta coders complain about this

I like the name include! because I use it to include functions defined in  .metta files.  Also there are cases when I am including the same files that have directives I need into multiple metta files.

I realized (after implementing it) that a merge-atoms operation to copy all atoms from a src space to a dst space is unneeded on account of the nested-space behavior.  Therefore: !(add-atom &dst_space (mod-space! mod_name)) should be enough.

mod-space!  op atom added in https://github.com/trueagi-io/hyperon-experimental/pull/615

Assigning back to issue originator to confirm change addresses the root issue.

@luketpeterson , what will be the canonical way to load several scripts into the same space?

@luketpeterson , what will be the canonical way to load several scripts into the same space?

When you say "canonical" what do you mean?  This will work if the modules are findable by the module resolution logic:
!(add-atom &the_space (mod-space! mod1))
!(add-atom &the_space (mod-space! mod2))
!(add-atom &the_space (mod-space! mod3))

If they're not findable, you can do:
!(register-module! /path/to/script1.metta)
!(add-atom &the_space (mod-space! script1))
!(register-module! /path/to/script2.metta)
!(add-atom &the_space (mod-space! script2))

I mean, previously, we could do:
!(bind! &space (new-space))
!(import! &space script1)
!(import! &space script2)

What is the equivalent now? Or are we waiting for inline! from you?

If script1 and script2 are findable, the exact same behavior will be accomplished by:
!(bind! &space (new-space))
!(add-atom &space (mod-space! script1))
!(add-atom &space (mod-space! script2))

the same behavior will be accomplished by:

It doesn't seem to work. I'm still getting the error (Error (import! GroundingSpace-0x1035d4ba8 a1_symbols) import! destination argument must be a symbol atom naming a new space, or &self.  Found: GroundingSpace-0x1035d4ba8)

It doesn't work as desired.
!(bind! &space (new-space))
!(add-atom &space (mod-space! a1_symbols))

!(match &space $x $x)

returns GroundingSpace-top:a1_symbols and doesn't delegate the matching process to the inserted a1_symbols space.

Huh.  I'm confused because import! has created nested sub-spaces from the beginning.  https://github.com/trueagi-io/hyperon-experimental/blob/586e2b2a050fe79bd7b7edb7055e5d2593730200/lib/src/metta/runner/stdlib.rs#L117
I am not sure why the nested sub-space are not traversed in this case.  I'll need to investigate.

Investigating further, it seems to be a quoting / reducing issue.
!(bind! &space (new-space))
!(bind! &a1_space (mod-space! a1_symbols))
!(add-atom &space &a1_space)
!(match &space (isa red $x) $x)

produces [color], but
!(bind! &space (new-space))
!(add-atom &space (mod-space! a1_symbols))
!(match &space (isa red $x) $x)

produces []

Indeed.  !(add-atom &self (mod-space! a1_symbols)) leads to the unreduced expr (mod-space! a1_symbols) being added to the space.  But get-atoms was showing me the same results in both paths because it was reducing the output.  I had to inspect the space internals to see they contained different atoms.

We can do:
(= (inline! $dst $src)
  (let $x (mod-space! $src) (add-atom $dst $x)))
!(inline! &space a1_symbols)

But such inline! will not insert atoms from a1_symbols to &space.

Hard to say what the most user-friendly option would be.  I guess my preference would be for this:
(= (merge $dst $space)  (let $x $space (add-atom $dst $x)))

which could be called as
!(merge &space (mod-space! src_mod))

I raised https://github.com/trueagi-io/hyperon-experimental/pull/617 to add the merge-space op in MeTTa code.
!(bind! &space (new-space))
!(merge-space &space (mod-space! a1_symbols))

!(match &space (isa red $x) $x)

The above code now returns [color]

@Necr0x0Der Does the add_reduct operation, as demonstrated above, solve this issue?

Yes, it works as a workaround. However, it looks a little bit indirect, so if we suppose it to be an idiomatic way to achieve this functionality, we may want to add it into standard examples. Maybe, we need a sort of short tutorial on imports covering different cases.

I haven't followed the changes to the import mechanism, except of the unification of extend-py! and import! which, albeit I personally don't like two quite different things being sold under the same umbrella, I at the same time find it convenient (it makes it simpler for the user), and can hence agree with the design decision.
Now when it comes to complicating the idea of importing spaces into other spaces, I don't see why one would want to add additional complexity for the user when previously an import! was all that was necessary. MeTTa has very different requirements in regards how spaces and code can be modified at runtime than Python.


Feature: Simpler way to handle pages created on clicking a[target="_blank"]; wait for loading and include timeouts

Overview
I'm looking for a simpler way to handle clicking on links which open new pages (like target="_blank" anchor tags).
Here handle means:

get the new page object
wait for the new tab to load (with timeout)

Steps to reproduce
Tell us about your environment:

Puppeteer version: ^1.11.0
Platform / OS version:  64-bit, win 10 pro
URLs (if applicable): none
Node.js version: v10.15.0

I've looked at related issues:
#386
#3535
#978
and more
What steps will reproduce the problem?
I've included the code snippet below
I'm trying to:

Get the object for the new page when clicking on a link opens a new tab. (The links are dynamically generated, capturing href might not be the most elegant way)
Wait till the new page loads (with timeout). I'd like it if you can use page.waitForNavigation for consistency
close the tab and return the earlier tab to continue further operations

Please include code that reproduces the issue.
// as referenced here on #386 : https://github.com/GoogleChrome/puppeteer/issues/386#issuecomment-425109457
    const getNewPageWhenLoaded =  async () => {
        return new Promise(x =>
            global.browser.on('targetcreated', async target => {
                if (target.type() === 'page') {
                    const newPage = await target.page();
                    const newPagePromise = new Promise(y =>
                        newPage.once('domcontentloaded', () => y(newPage))
                    );
                    const isPageLoaded = await newPage.evaluate(
                        () => document.readyState
                    );
                    return isPageLoaded.match('complete|interactive')
                        ? x(newPage)
                        : x(newPagePromise);
                }
            })
        );
    };

const newPagePromise = getNewPageWhenLoaded();
await page.click('my-link'); // or just do await page.evaluate(() => window.open('https://www.example.com/'));
const newPage = await newPagePromise;

What is the expected result?
An easier and consistent way to handle new tabs
What happens instead?
The developer has to write what looks like plumbing (internal/ low level) commands.
Usage of waitForTarget might simplify this, but I've not been able to get the predicate to return the right types. Here's my non-functional code
private async getNewPageWhenLoaded() {
        const newTarget = await this._browser.waitForTarget(async (target) => {
            const newPage = await target.page();
            await newPage.waitForNavigation(this._optionsNavigation);
            // const newPagePromise = new Promise(() => newPage.once('load', () => x(newPage)));
            return await newPage.evaluate("true");
        });
        return await newTarget.page();
    }

// elsewhere in the code
            const newPagePromise = this.getNewPageWhenLoaded();
            await resultItem.element.click();
            const newPage = <Page>await newPagePromise;

//I get the following error
DevTools listening on ws://<IP_ADDRESS>:31984/devtools/browser/bf86648d-d52d-42d8-a392-629bf96211d4
(node:5564) UnhandledPromiseRejectionWarning: Error: Navigation failed because browser has disconnected!
    at CDPSession.LifecycleWatcher._eventListeners.helper.addEventListener (<path-to-my-project>\node_modules\puppeteer\lib\FrameManager.js:1181:107)
    at CDPSession.emit (events.js:182:13)
    at CDPSession._onClosed (<path-to-my-project>\node_modules\puppeteer\lib\Connection.js:231:10)
    at Connection._onMessage (<path-to-my-project>\node_modules\puppeteer\lib\Connection.js:103:19)
    at WebSocketTransport._ws.addEventListener.event (<path-to-my-project>\node_modules\puppeteer\lib\WebSocketTransport.js:41:24)
    at WebSocket.onMessage (<path-to-my-project>\node_modules\ws\lib\event-target.js:120:16)
    at WebSocket.emit (events.js:182:13)
    at Receiver.receiverOnMessage (<path-to-my-project>\node_modules\ws\lib\websocket.js:741:20)
    at Receiver.emit (events.js:182:13)
    at Receiver.dataMessage (<path-to-my-project>\node_modules\ws\lib\receiver.js:417:14)
  -- ASYNC --
    at Frame.<anonymous> (<path-to-my-project>\node_modules\puppeteer\lib\helper.js:144:27)
    at Page.waitForNavigation (<path-to-my-project>\node_modules\puppeteer\lib\Page.js:644:49)
    at Page.<anonymous> (<path-to-my-project>\node_modules\puppeteer\lib\helper.js:145:23)
    at newTarget._browser.waitForTarget (<path-to-my-project>\pageObjects\MyPage.js:104:27)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:5564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5564) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:5564) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 300000ms exceeded
    at Promise.then (<path-to-my-project>\node_modules\puppeteer\lib\FrameManager.js:1276:21)
  -- ASYNC --
    at Frame.<anonymous> (<path-to-my-project>\node_modules\puppeteer\lib\helper.js:144:27)
    at Page.waitForNavigation (<path-to-my-project>\node_modules\puppeteer\lib\Page.js:644:49)
    at Page.<anonymous> (<path-to-my-project>\node_modules\puppeteer\lib\helper.js:145:23)
    at newTarget._browser.waitForTarget (<path-to-my-project>\pageObjects\MyPage.js:104:27)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:5564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Is this the most simple way to handle this? (credits: https://github.com/GoogleChrome/puppeteer/issues/2912#issuecomment-446395521)
const link = await page.$('selector')
await link.click()    // at this time, a new page was successful opened in a new tab in chromium
//waits until the target is available [see browser.targests]
const newPage = await browser.waitForTarget(target => target.ur() === link.textContent());

// get all pages
pages = await browser.pages()
for (const page of pages) {
    console.log(page.url())   // new page now appear!
}

This is the simplest I've gotten it to be
const pageTarget = this._page.target(); //save this to know that this was the opener
await resultItem.element.click(); //click on a link
const newTarget = await this._browser.waitForTarget(target => target.opener() === pageTarget); //check that you opened this page, rather than just checking the url
const newPage = await newTarget.page(); //get the page object
// await newPage.once("load",()=>{}); //this doesn't work; wait till page is loaded
await newPage.waitForSelector("body"); //wait for page to be loaded

For this we're experimenting with a new page.ensureNavigation API that will make sure the current navigation reached the desired state. It's not landed yet, but there are promising results.

@aslushnikov is this tracked somewhere? I couldn't find this on the chrome bug tracker

run the click function first of all and within the promise remove the global keyword like this
`const browser = await puppeteer.launch();
await page.click('my-link');
const getNewPageWhenLoaded =  async () => {
return new Promise(x =>
browser.on('targetcreated', async target => {
if (target.type() === 'page') {
const newPage = await target.page();
const newPagePromise = new Promise(y =>
newPage.once('domcontentloaded', () => y(newPage))
);
const isPageLoaded = await newPage.evaluate(
() => document.readyState
);
return isPageLoaded.match('complete|interactive')
? x(newPage)
: x(newPagePromise);
}
})
);
};
const newPagePromise = getNewPageWhenLoaded();
const newPage = await newPagePromise;`

@ignacioainol
Example working almost perfectly, except i get hundreds of event handlers attatched 😆
Should  browser.on   be  browser.once  ?

@sadortun
I'm having the same problem, independent of using once or on
Error: Request is already handled!

run the click function first of all and within the promise remove the global keyword like this
const browser = await puppeteer.launch();
await page.click('my-link');

const getNewPageWhenLoaded =  async () => {
        return new Promise(x =>
            browser.on('targetcreated', async target => {
                if (target.type() === 'page') {
                    const newPage = await target.page();
                    const newPagePromise = new Promise(y =>
                        newPage.once('domcontentloaded', () => y(newPage))
                    );
                    const isPageLoaded = await newPage.evaluate(
                        () => document.readyState
                    );
                    return isPageLoaded.match('complete|interactive')
                        ? x(newPage)
                        : x(newPagePromise);
                }
            })
        );
    };

const newPagePromise = getNewPageWhenLoaded();
const newPage = await newPagePromise;

For me, it worked like a charm.
Copy and paste, and from there on, everything is done against newPage instead of page.
...
await page.click('div[title="rcel"]');

const newPagePromise = getNewPageWhenLoaded();
const newPage = await newPagePromise;

await newPage.click('input[value="blah"]');
await newPage.waitForSelector('a#btn_gen_cmp', {visible: true});
...

Thank you @ignacioainol !

run the click function first of all and within the promise remove the global keyword like this
const browser = await puppeteer.launch();
await page.click('my-link');

const getNewPageWhenLoaded =  async () => {
        return new Promise(x =>
            browser.on('targetcreated', async target => {
                if (target.type() === 'page') {
                    const newPage = await target.page();
                    const newPagePromise = new Promise(y =>
                        newPage.once('domcontentloaded', () => y(newPage))
                    );
                    const isPageLoaded = await newPage.evaluate(
                        () => document.readyState
                    );
                    return isPageLoaded.match('complete|interactive')
                        ? x(newPage)
                        : x(newPagePromise);
                }
            })
        );
    };

const newPagePromise = getNewPageWhenLoaded();
const newPage = await newPagePromise;

For me, it worked like a charm.
Copy and paste, and from there on, everything is done against newPage instead of page.
...
await page.click('div[title="rcel"]');

const newPagePromise = getNewPageWhenLoaded();
const newPage = await newPagePromise;

await newPage.click('input[value="blah"]');
await newPage.waitForSelector('a#btn_gen_cmp', {visible: true});
...

Thank you @ignacioainol !

So this worked for me, but now I have to figure out how to ignore HTTPS errors for this new popup page (SAML login)...

The solution works but it is bad. The main problem of this code is that it should not be used more than once because there is no event unsubscribing.
I improved it a little:
async function getNewBrowserTab(browser) {
    let resultPromise

    async function onTargetcreatedHandler(target) {
        if (target.type() === 'page') {
            const newPage = await target.page()
            const newPagePromise = new Promise(y =>
                newPage.once('domcontentloaded', () => y(newPage))
            )

            const isPageLoaded = await newPage.evaluate(
                () => document.readyState
            )

            browser.off('targetcreated', onTargetcreatedHandler) // unsubscribing

            return isPageLoaded.match('complete|interactive')
                ? resultPromise(newPage)
                : resultPromise(newPagePromise)
        }
    }

    return new Promise(resolve => {
        resultPromise = resolve
        browser.on('targetcreated', onTargetcreatedHandler)
    })
}

// Using
const browser = await puppeteer.launch({ headless: false })
const page = await browser.newPage()

await page.goto('https://www.google.com/')

// Click on link with middle button to open in new browser tab
await page.click('a[href]', { button : 'middle' })

// Wait for new tab and return a page instance
const newPage = await getNewBrowserTab(browser)

// Switch to new tab
await newPage.bringToFront()

// Wait a bit to see the page
await new Promise(resolve => setTimeout(resolve, 1000))

await newPage.close()
await page.close()
await browser.close()

const getNewBrowserTab = (browser: Browser) => {
  let resultPromise: (page: Page | Promise<Page>) => void;

  async function onTargetcreatedHandler(target: Target) {
    if (target.type() === 'page') {
      const newPage = await target.page();

      if (newPage === null) throw Error('newPage was null?');

      const newPagePromise = new Promise<Page>((resolve) =>
        newPage.once('domcontentloaded', () => {
          resolve(newPage);
        })
      );

      const isPageLoaded = await newPage.evaluate(() => document.readyState);

      browser.off('targetcreated', onTargetcreatedHandler); // unsubscribing

      return isPageLoaded.match('complete|interactive') ? resultPromise(newPage) : resultPromise(newPagePromise);
    }
  }

  return new Promise<Page | Promise<Page>>((resolve) => {
    resultPromise = resolve;
    browser.on('targetcreated', onTargetcreatedHandler);
  });
};

Here is a typescript adaptation from @PredokMiF's version in case anyone else needs it.


@bentley/imodeljs-native 4.0.6

Had to downgrade @types/node to 18.16.1 from 18.16.2, otherwise I got:
--[ FAILURE: @itwin/core-backend ]---------------------------[ 4.38 seconds ]--
src/rpc/multipart.ts(67,16): error TS2345: Argument of type 'HttpServerRequest' is not assignable to parameter of type 'IncomingMessage'.
Type 'HttpServerRequest' is missing the following properties from type 'IncomingMessage': headersDistinct, trailersDistinct

Had to downgrade @types/node to 18.16.1 from 18.16.2, otherwise I got:
--[ FAILURE: @itwin/core-backend ]---------------------------[ 4.38 seconds ]--
src/rpc/multipart.ts(67,16): error TS2345: Argument of type 'HttpServerRequest' is not assignable to parameter of type 'IncomingMessage'. Type 'HttpServerRequest' is missing the following properties from type 'IncomingMessage': headersDistinct, trailersDistinct

fyi @swbsi


feat: nth fibonacci number using memoization.

Description of Change
Added the implementation of Memoization to get the nth Fibonacci number.
Checklist

[x] Added description of change
[x] Added file name matches File name guidelines
[x] Added tests and example, test must pass.
[x] Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
[x] Relevant documentation/comments is changed or added
[x] PR title follows semantic commit guidelines
[x] Search previous suggestions before making a new one, as yours may be a duplicate.
[x] I acknowledge that all my contributions will be made under the project's license.

I noticed no file explaining the memoization technique to get the nth Fibonacci number, which is the key aspect of dynamic programming.

Please refer to the contribution guidelines for coding format and docs and consider adding detailed documentation for the code. 😃

Coding format and docs are modified according to repository standards. @Panquesito7 @foo290

@Panquesito7 I am unable to figure out what is wrong with my code, the checks keeps failing in code formatter section.

Please fix clang-tidy warnings.

error: assignment of read-only location which is obviously due to const std::vector<uint32_t> &term.
When removing const, the clang-tidy throws error: non-const reference parameter 'term', make it const or use a pointer [google-runtime-references,-warnings-as-errors] uint32_t nthFibonacci(const uint32_t &n, std::vector<uint32_t> &term). What should I do ?

Please fix clang-tidy warnings.

error: assignment of read-only location which is obviously due to const std::vector<uint32_t> &term.
When removing const, the clang-tidy throws error: non-const reference parameter 'term', make it const or use a pointer [google-runtime-references,-warnings-as-errors] uint32_t nthFibonacci(const uint32_t &n, std::vector<uint32_t> &term). What should I do ?

Try to remove the & for the term variable and see if everything works properly. 🙂


Please start with "why" and the benefit your tool brings

Why should I use it? Please put this on the top of the readme.

From the first paragraph in the README:

This is a small sample repository that uses Babel to transform TypeScript to plain JavaScript, and uses TypeScript for type-checking. This README will also explain step-by-step how you can set up this repository so you can understand how each component fits together.


Adding changes to implement pure LDAP provider

Fixes #195

Travis is failing:
https://travis-ci.org/unosquare/passcore/builds/414566088#L2030

Just committed a change to declare <LangVer>7.3</LangVer> that should fix the Travis issue.  Not sure why AV bombed out, no detail there.

Hmm, Travis still failed with the same error -- now I'm confused.  Why would it be failing on this?

Let me check on my computer.

Doh!

Thanks. We are going to test and publish a new release soon.


Interface mode property

This PR adds a mode parameter to the network_config type which is intended to describe in the interface is a regular untagged ethernet interface, a tagged vlan interface, a bond group, a tunnel, etc..  At present only :raw and :vlan are supported mode with the default being :raw but the hope is that ~:bond can be added in the near future.
In this implementation the raw device that a new vlan is configured on is inherently implied by the name of the :vlan mode interface.  An alternative to making the raw interface name implicit would be to track the the name of the :raw interface a vlan is dependent on.  However, that raises some resource dep. issues which I feel can be added on to this minimal implementation.
The design of this implementation is discussed in https://github.com/adrienthebo/puppet-network/issues/48

@igalic @adrienthebo - I've rebased on the current master and updated the redhat network_config provider unit tests to work with changes made to puppet-filemapper.  It's likely in a mergable state but testing by "someone who is not me" would be wise.

@jhoblitt gave this a stern look, and it seems quite okay to me.

Let's get this out of limbo. Thanks for the contribution!

\o/


[YouTube]: ERROR: InfoExtractor._download_json() got an unexpected keyword argument 'cndn'

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting a bug unrelated to a specific site
[X] I've verified that I have updated yt-dlp to nightly or master (update instructions)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood
Hello!
Today i have YT extractor problem.
It's the same output for all videos. It's ok in my browser.
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', 'SO83KQuuZvg', '-F']
[debug] Encodings: locale cp1251, fs utf-8, pref cp1251, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>from yt-dlp/yt-dlp [4d9231208] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: fa2be9a7c
[debug] Python 3.12.0 (CPython AMD64 64bit) - Windows-11-10.0.22621-SP0 (OpenSSL 3.0.11 19 Sep 2023)
[debug] exe versions: ffmpeg 2024-08-01-git-bcf08c1171-full_build-www.gyan.dev (setts), ffprobe N-90796-ge5ba5fab49
[debug] Optional libraries: sqlite3-3.42.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1835 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version<EMAIL_ADDRESS>from yt-dlp/yt-dlp
yt-dlp is up to date<EMAIL_ADDRESS>from yt-dlp/yt-dlp)
[youtube] Extracting URL: SO83KQuuZvg
[youtube] SO83KQuuZvg: Downloading webpage
ERROR: InfoExtractor._download_json() got an unexpected keyword argument 'cndn'
Traceback (most recent call last):
  File "H:\Projects\python\yt-dlp\yt_dlp\YoutubeDL.py", line 1626, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\YoutubeDL.py", line 1761, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\extractor\common.py", line 741, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\extractor\youtube.py", line 4369, in _real_extract
    webpage, master_ytcfg, player_responses, player_url = self._download_player_responses(url, smuggled_data, video_id, webpage_url)
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\extractor\youtube.py", line 4333, in _download_player_responses
    player_responses, player_url = self._extract_player_responses(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\extractor\youtube.py", line 3930, in _extract_player_responses
    pr = pr or self._extract_player_response(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\extractor\youtube.py", line 3814, in _extract_player_response
    return self._extract_response(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\extractor\youtube.py", line 1037, in _extract_response
    response = self._call_api(
               ^^^^^^^^^^^^^^^
  File "H:\Projects\python\yt-dlp\yt_dlp\extractor\youtube.py", line 670, in _call_api
    return self._download_json(url,
           ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: InfoExtractor._download_json() got an unexpected keyword argument 'cndn'

I found out what the problem was. My file system was corrupted last night. Cloning the project to another disk solved the problem.
I'm sorry to bother you.


added fill_event, and fill_event_page methods

Fixes https://github.com/bluesky/event-model/issues/89

Fixes https://github.com/bluesky/event-model/issues/88

Another useful test to add:
with pytest.warns(UserWarning):
    # Make a Filler with inplace=None


realloc pipe buffer when pipe count decrease

Another pipeline issue that I observed when using VPP+OpenSSL with engine that supports pipelines, I see that 3.0 has the same code s I assume issue was not resolved yet.
From<PHONE_NUMBER>376051884a8f34a4e6485dd5370b7f Mon Sep 17 00:00:00 2001
From: Ofer Heifetz<EMAIL_ADDRESS>Date: Tue, 15 Mar 2022 14:46:30 +0200
Subject: [PATCH] realloc pipe buffer when pipe count decrease

By default OpenSSL setups the write buffer according to record
layer numpipes, when a write request uses more pipes then allocated,
OpenSSL first releases the allocated buffers and then allocates buffer
for all requested pipes.

An issue was observed when using VPP + openssl-dpdk-engine with pipe
support, to fix the issue the release of record layer buffers is
performed on any pipe number change (also for decreased pipe count)

Signed-off-by: Ofer Heifetz<EMAIL_ADDRESS>---
 ssl/record/rec_layer_s3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index b2a7a47..b976800 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -688,7 +688,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
         /* if it went, fall through and send more stuff */
     }

-    if (s->rlayer.numwpipes < numpipes) {
+    if (s->rlayer.numwpipes != numpipes) {
         if (!ssl3_setup_write_buffer(s, numpipes, 0)) {
             /* SSLfatal() already called */
             return -1;
--
2.17.1

can you please open a PR for this?


Parse table level primary key constraints

Hi,
I noticed that this create table statement is not parsed:
create table t1 (c1 text,c2 text,primary key(c1,c2))
as far as I know this I the only way to create a compound primary key in sqlite.

Hi, thanks for the bug report. I've fixed this on the master branch. Do you need a new release to PyPI?

Hi Ian,,
Thanks for the quick fix! No need for me for an imminent release to PyPI


Use proper tags for artifacts

istio.RELEASE points to the next release and will be updated once a new release is created and tagged. This number is used to create tags and the version in binary. Once we branch out, there will a different istio.RELEASE version for every release branch.

Jenkins job manager/presubmit passed

Jenkins job manager/e2e-smoketest passed

Jenkins job manager/presubmit passed

Jenkins job manager/e2e-smoketest passed


add a transactionId header to the response for Jetty&Tomcat

default to off, no header added to the response.
header name can be configured.
header value i.e. transactionId is url-encoded by default.

More convenient to check the current specific transaction.
Enable to trace the transaction for the apps/devices.
To view the transaction, you may check #4790 if you are use V1 UI and
if you are use V2 UI, you may check via the url https://youdomain/v2/transactionDetail/{txId}/0/{agentId}/-1.
If your txId is jt4zp-<IP_ADDRESS>^1581804767659^1, then the agentId is jt4zp-<IP_ADDRESS>.

Codecov Report

Merging #6543 into master will decrease coverage by 0.02%.
The diff coverage is 5.35%.

@@            Coverage Diff            @@
##           master   #6543      +/-   ##
=========================================
- Coverage   39.53%   39.5%   -0.03%
=========================================
  Files        3090    3090
  Lines       92127   92175      +48
  Branches    11892   11900       +8
=========================================
- Hits        36420   36414       -6
- Misses      52705   52761      +56
+ Partials     3002    3000       -2

Impacted Files
Coverage Δ

...corp/pinpoint/plugin/jetty/JettyConfiguration.java
0% <0%> (ø)
:arrow_up:

...y/interceptor/AbstractServerHandleInterceptor.java
0% <0%> (ø)
:arrow_up:

...nterceptor/StandardHostValveInvokeInterceptor.java
0% <0%> (ø)
:arrow_up:

...navercorp/pinpoint/plugin/tomcat/TomcatConfig.java
28.07% <25%> (-0.82%)
:arrow_down:

...uster/zookeeper/exception/ConnectionException.java
0% <0%> (-28.58%)
:arrow_down:

.../cluster/zookeeper/ZookeeperExceptionResolver.java
24.13% <0%> (-17.25%)
:arrow_down:

...p/pinpoint/rpc/stream/StreamChannelRepository.java
75% <0%> (-10%)
:arrow_down:

...r/zookeeper/CuratorZookeeperConnectionManager.java
68.75% <0%> (-6.25%)
:arrow_down:

...r/zookeeper/ZookeeperClusterDataManagerHelper.java
80% <0%> (-4.45%)
:arrow_down:

...rver/cluster/zookeeper/CuratorZookeeperClient.java
87.61% <0%> (-0.96%)
:arrow_down:

... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0802795...c7ae8be. Read the comment docs.

Unfortunately Pinpoint does not use response headers.
I still don't know all the benefits and risks of using a response header.
Why do you want to use response headers?

Android or Ios apps call my http api, but the apps can not use java agent. My app may log the txId fetching from the response header. Check the log and find out the txId and view the transaction.

useful update for me

thread-safe problem？


refactor(cp): change logourl to icon

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Specified Reivewers:
/assign @your-reviewer

/approve


Update header value format to be "Chrome parsable"

Fixes #5
I understand that the format updated format is not what's specified in W3C draft
But it works:
Middleware=11241.11 ,ActiveRecord=54.18 ,Router=472.69 ,Controller=51.4 ,Redis=49.86 ,View=16536.12 ,Total=28405.39

Until the spec is finalized, I think we should use a format that Chrome can parse now

Thanks much @PikachuEXE. Based on the additional information provided in the comment thread on #5, I've instead added a note to the README on Chrome 64 support. See https://github.com/scoutapp/ruby_server_timing/commit/9a10c2e4c9b663645dba9e1486802645fda3ccf9.


ESLint: The template root requires exactly one element.(vue/no-multiple-template-root)

Environment

Operating System: Darwin
Node Version:     v21.5.0
Nuxt Version:     3.10.2
CLI Version:      3.10.1
Nitro Version:    2.8.1
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      future, app, srcDir, vite, ssr, build, experimental, typescript, imports, modules, shadcn, tailwindcss, runtimeConfig
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
Enable global transition
Create a new page
turn off transition with definePageMeta on that page
Add multiple root nodes on the template
Describe the bug
https://github.com/nuxt/eslint-config/blob/main/packages/eslint-config/index.js#L77
This rule does not take into account when you have global transition enabled but you disabled it on certain pages with
definePageMeta({
	pageTransition: false,
})

I still get The template root requires exactly one element.(vue/no-multiple-template-root) error.
The error should not be present because transition for that page is false. Thus, we should be allowed to use multiple root nodes.
Additional context
No response
Logs
No response

The rules are not config-based and always apply. Feel free to disable or override the rule in your own eslint config ☺


IMAP Email Content marking all mails as read

Home Assistant release with the issue:
0.84.2
Component/platform:
imap_email_content.py
Description of problem:
The sensor is marking all emails as read, even when a sender is defined. (Leaving my phone with no notifications as all my emails are marked as read)
As I understand from the documentation it should only process emails from the list of senders:
(string)(Required)A list of sender email addresses that are allowed to report state via email. Only emails received from these addresses will be processed.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
- platform: imap_email_content
  name: imap
  server: imap.gmail.com
  port: 993
  username<EMAIL_ADDRESS>  password: ****
  senders:
    -<EMAIL_ADDRESS>

Is this still an issue you are experiencing? Can you please try upgrading to the latest version of Home Assistant (0.90) and report back if this is still a problem? Thanks!


psycopg2 is missing in image langflowai/langflow-backend 1.0.16 & latest

Bug Description
Unable to use langflowai/langflow-backend:1.0.16 and latest with PostgreSQL database, missing library psycopg2-binary (or any replacement)

My values file:
postgresql:
  enabled: true
  fullnameOverride: "langflow-ide-postgresql-service"
  global:
    storageClass: "local-path"
  auth:
    username: "USERNAME"
    password: "PASSWORD_HERE"
    database: "DATABASE_NAME"

langflow:
  frontend:
    service:
      type: NodePort
      port: 8080
  backend:
    env:
      - name: LANGFLOW_AUTO_LOGIN
        value: "False"
    externalDatabase:
      enabled: true
      driver:
        value: "postgresql"
      host:
        value: "langflow-ide-postgresql-service"
      port:
        value: "5432"
      database:
        value: "DATABASE_NAME"
      user:
        value: "USERNAME"
      password:
        valueFrom:
          secretKeyRef:
            key: "password"
            name: "langflow-ide-postgresql-service"
    resources:
      limits:
        nvidia.com/gpu: "1"
    sqlite:
      enabled: false

I made a quick fix by adding following line at the end of Dockerfile extending original image but better to update requirements.txt
RUN pip install psycopg2-binary

Reproduction

Deploy Helm chart on Kubernetes of version 1.0.0 with latest langflow release
Configure it to use Postgres
Backend won't start because of missing library

Expected behavior
Backend service starts.
Who can help?
@italojohnny
Operating System
Debian Linux 12
Langflow Version
1.0.16
Python Version
None
Screenshot
No response
Flow File
No response

Hi, @Vihos . I hope you're doing well.
As you pointed out, v1.0.16 does have this issue. We've already fixed it, and v1.0.17 with the correction will be available soon.
Alternatively, you can clone the repository and build the images locally with the latest changes from the main branch


[WIP][Chef-16] Disable caching for adhoc build as it causes build failures

Signed-off-by: Neha Pansare<EMAIL_ADDRESS>
Description

Disable caching in adhoc pipeline using environment variable IGNORE_CACHE, otherwise it results in failures ever since chef16 started getting built with ruby31.
Failures will be mostly on the lines of

I \| 2022-12-15T11:13:08+02:00 \| Deleted tag 'restore_here' (was 167c20b5)
--
  | The following shell command exited with status 128:
  |
  | $ git -c core.autocrlf=false -c core.ignorecase=false --git-dir="/var/cache/omnibus/chef/cache/git_cache/opt/chef" --work-tree="/opt/chef" checkout -f restore_here
  |
  | Output:
  |
  | (nothing)
  |
  | Error:
  |
  | fatal: bad object refs/heads/master

UPDATE: This is currently blocked with packages team as even if the IGNORE_CACHE is set config.yml, buildkite builds don't pick up the set value until we explicitly set it when triggering the build via UI or CLI, e.g builds referenced in comments below.
Related Issue

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

[ ] I have read the CONTRIBUTING document.
[ ] I have run the pre-merge tests locally and they pass.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.
[ ] All commits have been signed-off for the Developer Certificate of Origin.

Adhoc build testing this https://buildkite.com/chef/chef-chef-chef-16-omnibus-adhoc/builds/71

I updated a couple of things to get past the windows and mac build errors. I also tried to fix the amazon linux issue
      def current_rhel_tz
        return nil unless ::File.exist?("/etc/sysconfig/clock")

        # https://rubular.com/r/aoj01L3bKBM7wh
        /ZONE="(.*)"/.match(::File.read("/etc/sysconfig/clock"))[1]
      end

That code, taken from timezone.rb line 99 or so was originally called for Amazon Linux. The problem is that /etc/sysconfig/clock doesn't exist so the return is nil and then a failure in parsing time data.
Calling timedatectl status can return a failure if not run as root. However chef-client should be running elevated when this is executed. So I'm a little stumped as to why that fails. The code also fails if you try to change the timezone while not elevated as well.

Latest build https://buildkite.com/chef/chef-chef-chef-16-omnibus-adhoc/builds/86

The issue is no longer there in adhoc builds, hence closing


Could provide the bbox annotation file for the CDS2K dataset?

I am doing hidden defect target detection, Could provide the annotation file of the bbox of the dataset? Also is it possible to provide a benchmark for target detection?
thanks，
Chialin

Hi,
You can generate via the object-level mask. We didn't provide the bbox of annotation currently.
Best,
Deng-Ping


Only works for Android 5.1

When running these tests against Android 6.0(emulator) or greater.  However this project works great out of the box against 5.1
`Starting 0 tests on Pixel_XL_API_26(AVD) - 8.0.0
Tests on Pixel_XL_API_26(AVD) - 8.0.0 failed: Instrumentation run failed due to 'Process crashed.'
com.android.builder.testing.ConnectedDevice > No tests found.[Pixel_XL_API_26(AVD) - 8.0.0] FAILED
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).
:app:connectedDebugAndroidTest FAILED`

The problem is the reporting folder: use the previous to last commit https://github.com/sebaslogen/CleanGUITestArchitecture/commit/6d1abf0bc869c9a1eacaecd6634a44bd476fceb4
I tried on emulators with Android v25 and 26 (both Pixel XL) and it works.

I experience the same error message 'Process crashed.' In logcat I see that Cucumber crashes at its init phase, as it doesn't have the necessary permissions to create the cucumber-report folder. If I try with /data/data/ as suggested, then the test reports won't get pulled at the end (I see an empty directory). (I saw you mentioning somewhere else that the test reports are already deleted by then.)
Would be curious what would be your suggested location for the test reports, or alternatively how to give write permissions to the package before Cucumber is started?

Try using the same reports folder also in the gradle task that pulls the reports from the device:
https://github.com/sebaslogen/CleanGUITestArchitecture/blob/a9da908cca5d4ac2639d58e7003dfe0531b64378/app/build.gradle#L43


RE-724 Implement pre_merge_test hook (kilo)

This patch implements the RPC Release Engineering pre_merge_hook
as documented in [1] making use of the existing job definition
in the rpc-gating repo.
For the most part it intentionally does not change how the job
is executed - it is meant to be a simple transfer of all logic
from rpc-gating into the rpc-openstack repository so that the
RPC-O team can own the entire test execution in a branched
repository.
The job which uses this hook is defined in https://github.com/rcbops/rpc-gating/pull/462
[1] https://rpc-openstack.atlassian.net/wiki/spaces/RE/pages/19005457/RE+for+Projects
Issue: RE-724

recheck_trusty_swift_deploy

Both jobs are failing in the same way:

failed: [raktdsp-50-2383_utility_container-09e13547] => (item=/opt/tempest_c69d06dbb4c14eec305ed6f0db947af77427c04c) => {"attempts": 5, "cmd": "/opt/tempest_c69d06dbb4c14eec305ed6f0db947af77427c04c/bin/pip install --isolated --pre --allow-all-external --index-url http://rpc-repo.rackspace.com/pools --extra-index-url https://pypi.python.org/simple --trusted-host pypi.python.org --trusted-host rpc-repo.rackspace.com /opt/tempest_c69d06dbb4c14eec305ed6f0db947af77427c04c", "failed": true, "item": "/opt/tempest_c69d06dbb4c14eec305ed6f0db947af77427c04c"}
msg: Task failed as maximum retries was encountered

recheck_cit_trusty_deploy_swift

recheck_trusty_swift_deploy

None of this takes effect until https://github.com/rcbops/rpc-gating/pull/462 merges, so I'd suggest that we merge this and follow up with the appropriate changes related to that specific issue in a follow up card.


What can we do when GitHub is "Down"...?

GitHub get's "taken down" by "DDOS" on a fairly regular basis...

See:

http://arstechnica.com/security/2015/04/ddos-attacks-that-crippled-github-linked-to-great-firewall-of-china/
https://github.com/blog/1981-large-scale-ddos-attack-on-github-com
https://www.hackread.com/ddos-attack-dns-sites-suffer-outage/

Should we consider "backing up" our GitHub issues in case the DDOS is worse the next time....?

@nelsonic I think this sounds great. I have been thinking about making something that pulls down issues / pulls / branches to my pc so I can work when I have no internet. Can we combine these two ideas?

@des-des!!

We need to back-up everything so that we don't fear the git push --f from a joker or noob

also, it might be worth getting @gabrielperales involved at some stage
because this might be a tool that is useful to people
who are considering migrating from GitHub to GitLab...
see: https://about.gitlab.com/2016/09/13/gitlab-master-plan/
Not that I don't love GitHub... 😍
just that some people prefer to have a "backup plan"... 😉

For people who wants to play with Haskell it might be worth to see if we can use this repo: https://github.com/joeyh/github-backup
"In case something happens to GitHub. More generally because keeping your data in the cloud and relying on the cloud to back it up is foolish."

@SimonLab that sounds like a perfect way to learn Haskell! 😉
I knew someone would have done something like this already. ✨
(less work for us!)

@SimonLab have you tried the github-backup Haskell project?
(I tried it last week but could not get it to compile... so gave up and went back to my work...)
If you are able to get it working on your laptop, would mind showing it to me some time?


Reimplement runState in terms of hoistStateIntoStateT

Then we can get rid of the interpretInStateT, and stateful and friends --- a nice simplification of Polysemy.Internal.Combinators
This should be pretty easy: runState s = flip S.runStateT s . hoistStateIntoStateT, and then eliminate dead code from there.

Changing runState to be
runState s = fmap swap . flip S.runStateT s . hoistStateIntoStateT
results in a failure in "Union proofs should simplify" : error.
Also slightly off-topic but: Won't this make eventual removal of dependence on mtl more difficult?

runStateT in mtl is just a re-export from transformers, AFAIK.

@googleson78 dang, I was hoping this would be super easy. I'm traveling for the next few weeks, but would love to take a look at this together when I'm home!

A question, slightly off-topic maybe.
I feel like there is something similar about this hoist function and the MonadRandom thing we have been talking about over in polysemy-zoo.
All of them are ways of trying to accommodate a different version of an effect that polysemy supports.
So, two questions:

Maybe these should be in a separate library, polysemy-mtl or polysemy-interop?  That would get rid of the dependencies for users who don't care about mtl.
What is the ideal form for such a thing?  I can imagine three versions, though maybe not all would work equally well for all effects.

Something like hoist:  hoistX:: Sem (X ': r) a -> XT (Sem r) a
Some kind of orphan instance: instance (Member X r) => MonadX (Sem r) where ...
A function--like liftIO---which discharges the constraint within Sem : liftX :: (MonadX m, Member X r) => m a -> Sem r a.
I'm not quite sure how that third version would work, but it seems like it keeps most of the convenience of instances without the issue of actually having them.

I'm going to think about how to do that for MonadRandom in RandomFu.

@googleson78 make sure the new runState is marked as INLINE, also all the functions it calls!

It seems hoistStateIntoStateT itself isn't fusing(/doesn't have SNat proofs eliminated) properly.
I tried running the proof elimination fusion test using it.

Okay, yeah, I see why hoistStateIntoStateT wouldn't fuse --- it's not written in the form Sem $ \k -> m $ \u -> .... But unfortunately it can't be, because we don't actually produce a Sem! I'm reasonably sure that !668 will fix this, but until them, we can hold off on this ticket.

I don't think this is worth doing.


Suggest Set NoSignal = true When create CurlEasy object

libcurl in multi-thread will coredump if enabled signal support(libcurl internal use signal to implemented dns query timeout timer), will coredump, because signal mechanism in multi-thread Situation behavior is undefined!
this will lost dns query timeout function, but we can suggest user compiled c-ares support libcurl to restore dns query timeout function.
Just a suggesstion :-)

Merged. Thanks @lailongwei