Add SidecarTimeout to MeshConfig.

Description:
Add SidecarTimeout to MeshConfig.

Testing done:
Done

Affected area:

Functional Area

New Functionality
[ ]

CI System
[ ]

CLI Tool
[ ]

Certificate Management
[ ]

Control Plane
[ ]

Demo
[ ]

Documentation
[ ]

Egress
[ ]

Ingress
[ ]

Install
[ ]

Networking
[ ]

Observability
[ ]

Performance
[ ]

SMI Policy
[ ]

Security
[ ]

Sidecar Injection
[ ]

Tests
[ ]

Upgrade
[ ]

Other
[X]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? no

Is this a breaking change? no

Has documentation corresponding to this change been updated in the fsm-docs repo (if applicable)? no

Codecov Report
Patch coverage: 6.66% and project coverage change: -0.14% :warning:

Comparison is base (cd40e30) 52.68% compared to head (1622b82) 52.54%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
- Coverage   52.68%   52.54%   -0.14%
==========================================
  Files         175      175
  Lines       12804    12819      +15
==========================================
- Hits         6746     6736      -10
- Misses       6027     6052      +25
  Partials       31       31

Flag
Coverage Δ

unittests
52.54% <6.66%> (-0.14%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed
Coverage Δ

pkg/configurator/methods.go
24.34% <0.00%> (-0.39%)
:arrow_down:

pkg/configurator/mock_client_generated.go
0.00% <0.00%> (ø)

pkg/messaging/broker.go
65.09% <100.00%> (-2.20%)
:arrow_down:

... and 2 files with indirect coverage changes

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


Upgrading to 2.0 beta breaks react-powerplug library

After doing a little digging, it looks like react-powerplug is pinning @babel/runtime to beta49. Trying to build after upgrading to the latest version of react scripts produces errors like ./node_modules/react-powerplug/dist/react-powerplug.esm.js Module not found: Can't resolve '@babel/runtime/helpers/builtin/es6/assertThisInitialized'.
I think this has to do with the alias for @babel/runtime added in the webpack configs in react-scripts. powerplug is expecting the dependency to be resolved from its local node_modules folder.

Duplicate of https://github.com/facebook/create-react-app/issues/5116, thanks!

👍 sure thing


How TO

any chance to add How TO instruction for setup?

I spent a lot of time trying to make it works on my own server. After installing everything, debugging, i have a blank page with "hello world". Nothing more. The routing system is not working but i can't find why

The attached readme file should be enough for people with some PHP knowledge, provided some look-up work, to get the project online.
The purpose of this repository was to make code public not so anyone could just run it on any computer and server.
I recommend that developers only use the code as the basis for something they reboot themselves. The front-end code is very outdated and should really be rewritten.

Thanks, i finally made it works yesterday 😊


dts: xtensa: espressif: esp32s2: Add TWAI node

This adds the TWAI node to the ESP32S2 devicetree.

I have some follow up changes that I'll post after to add support for the Lolin S2 Mini board that I used to test this with using the isotp example.


connections slow

Sorry if this is such a vague question, but we're currently having issues w/ connections taking a few seconds (or more) to be established.
We're working with Google's Cloud SQL. I know they have an option where the system goes to sleep after inactivity, but we have that option off (so the system is up 24/7).
This doesn't happen all the time, to be honest, I would say that it's the system waking up, but I'm actually working w/ Google right now on this issue and, just as any vendor would, they insist that the system is not going to sleep.
So, I was wondering if there's anything w/ the pool connections that "go to sleep", or if people know of a mysql option, or ...

Hi @gotmikhail , I''m really sorry your issue seems to have fallen through the cracks. Do you still need help on this?

We are experiencing the same issue with Microsoft Azure. If our application has not received any requests for a while, MySQL queries suddenly takes 10-60 seconds to go through and finish. The "funny" part is that we used the exact same configuration with Amazon EC2, where it worked every time. We are also working with Microsoft as we speak to solve this issue, and even they claim their system is not going to sleep after a period of inactivity.
I Actually made the discovery of a quick fix, where the idea was to keep the MySQL connections busy with queries being made every three seconds to every database in use. This solved the issue, but is not a clean fix. We are desperate to get to the bottom of this.

@thomaaam are you using IP address or host name to connect? ( maybe it's DNS lookup issue sometimes? )

Have tried connecting using both IP address and host name, and sadly it does not eliminate the problem, but thanks anyway!

Our problem was with the Azure Load Balancer dropping idle connections on timeout. Our database connections are at the time being external and thus do not reside within the Azure boundaries, therefore making connections painfully slow after periods of inactivity.

Ah, makes sense. If there is not a way to adjust your Azure Load Balancer timeout settings, you can always queue up periodic conn.ping() commands to keep the connections busy :)!


Error device not found although it's connected after a reboot of printer

During my test using a USB to serial adapter PL2303, i have a issue with the library in this scenario.
1 : the python process is running and the printer is on and connecté et visibilité using lsusb. i create a new printer.Usb that it's working fine and i can print using the printer api.
2 : i turn off the printer. in that case i got an exception in the python process as the device doesn't respond anymore and i call the method close of the printer object before clearing it in my class to don't use this instance of printer anymore.
In lsusb i can still see the PL2303 usb adaptater even if the device is no longer here.
3 : i turn on the printer and i try in the same python process to create a new printer.Usb instance to be able to use it again and in that case the escpos api raise an exception
Traceback (most recent call last):   File "/opt/node/repo/cohorteiot/iotill/printer/printer_comm.py", line 173, in _init_connection     self._printer = printer.Usb(w_usb_info[PRINT].get_vendor_id(),w_usb_info[PRINT].get_device_id(),None,0,w_usb_info[PRINT].get_endpoint_in_address(),w_usb_info[PRINT].get_endpoint_out_address())   File "/usr/local/lib/python3.6/dist-packages/python_escpos-3.0a9.dev26+g84a97e5-py3.6.egg/escpos/printer.py", line 53, in __init__     self.open(usb_args)   File "/usr/local/lib/python3.6/dist-packages/python_escpos-3.0a9.dev26+g84a97e5-py3.6.egg/escpos/printer.py", line 62, in open     raise USBNotFoundError("Device not found or cable not plugged in.") escpos.exceptions.USBNotFoundError: USB device not found (Device not found or cable not plugged in.)
4 : Finally, if i stop the python process, create a new one and create a new printer.Usb to use it. it works. So it seems when we close the printer, there is still something that is not properly clear that is a side effect of the fact that the lsusb of the PL2303 is still here even if the printer is down.
So my question is do you have a solution to ensure that every is cleared when we close the printer.Usb instance to ensure when we create a new one we don't have this behavior ?
Thanks in advance for your answser

Use a Serial device and ttyUSB0 or ttyACM0 port.
Usb implementation is for usb connection (usb B - usb A) cable.


feat (BizTalk360): Added a QuickStart for BizTalk360

Summary
A concise description of the changes being introduced. If you are submitting a PR for a
new quickstart please review the pre merge checklist section to validate this PR is ready for review.

Pre merge checklist

[x] Did you check you NRQL syntax? - Does it work?
[x] Did you check your dashboard image quality? -  Do they look good?
[x] Did you check that your alerts actually work?
[x] Did you include an InstallPlan and Documentation reference?
[x] Did you check your descriptive content for voice, tone, spelling and grammar errors?
[x] Did you attach images of your dashboards to the PR so we can see them working?

Screenshots
Attach images of any visual changes, such as a dashboard here.

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

This is failing the image validation could you resolve this as well @raja2raj02 ?
yarn run v1.22.17
$ node validate_images.js
Error: Images should be of format .png,.jpeg,.jpg,.svg:


<EMAIL_ADDRESS>

<EMAIL_ADDRESS>(currently used by ganache-core) accidentally shipped breaking changes due to messing up its exports. Ganache is not actually impacted due to its use of the package, but 2.5.3 is deprecated, and all future non-breaking changes will be shipped under the 3.0.0 major version.

I have no idea why the shrinkwrap diff is so large. 🤔

shrinkwrap diff is large because I used npm v7 to work around some other npm bug (https://github.com/trufflesuite/ganache-core/commit/4b3f588a7ded29ee07e27139222e9cb2a4c162c1)

Oh, and thanks for this! I've got a couple more PRs I want to get in the next release, so this should go out with those soon!

fixed by https://github.com/trufflesuite/ganache-core/pull/711

fixed by https://github.com/trufflesuite/ganache-core/pull/711


nixpkgs-fmt: 1.2.0 -> 1.3.0

Description of changes
Bumped nixpkgs-fmt to the latest version.

Commits

Result of nixpkgs-review run on x86_64-linux 1

3 packages built:

nix-update
nixpkgs-fmt
vscode-extensions.b4dm4n.vscode-nixpkgs-fmt

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 178096 run on x86_64-linux 1

3 packages built:

nix-update
nixpkgs-fmt
vscode-extensions.b4dm4n.vscode-nixpkgs-fmt


Automatically refresh an empty notification page on new notifications

Empty: https://github.com/notifications

New notification comes

GitHub don't care

Refined GitHub cares and reloads the page

One concern
It's easy to do this when the first notification comes in because the indicator appears in the dom, but I'm not sure if we can know if any further notifications are there without repeating API calls.
If anyone picks this up, they should probably keep this in mind.

Is that possible? I've don't think GitHub would update the notification icon.

Yeah they do update the icon, which is why it's strange they wouldn't also update the view.
If we do this, we should only update if the view is empty or document.hidden === true, otherwise it's hard to manage a diff and it'd make links move down.

I think the one concern kinda kills the idea, short of regularly fetching the notifications. I pull the request

short of regularly fetching the notifications

We could do that, right?

fetch if the tab is visible
display instantly if the page is empty
otherwise display "There are X more notifications. Click to display"

Notifications Beta has it! 🎉


RuntimeWarning: divide by zero encountered in divide

Hi
I met the following warning when I was tuning  parameters for RVR.
fast_rvm.py:48: RuntimeWarning: divide by zero encountered in divide
deltaL[recompute] = Qrec2 / (Srec + 1. / delta_alpha) - np.log(1 + Srec*delta_alpha)**
What is the potential reason for this warning?

+1. Same problem here.

I am hitting a similar error when trying to run the Relevance Vector Machine Jupyter Notebook on Windows 10.
The log terms in lines 47-49 of fast_rvm.py are sometimes being given negative values as arguments.

+1 same issue. It seems to happen on some dataset, while behave normally on others, I could not pinpoint the issue yet.

Did anyone ever discover the issue here?


Build stabilization: Improve concrrenty handling in TailTest

the TailTest includes testing some of the Tail's asynchronous behavior. At the moment, this yields unstable builds as test results may depend on a race condition between the available processors and disk i/o. This should be improved by means of greater control of the execution flow.

Implemented, done!

Not done: We need to better than this and introduce means of awaiting test conditions to better handle the asynchronous Tail tests (https://travis-ci.org/unic/neba/builds/143972346):
Failed tests:
  TailTest.testHandlingOfRemovedLogFile:136->assertErrorMessageIsSent:188
Wanted but not invoked:
remote.sendString("file not found");
-> at io.neba.core.logviewer.TailTest.assertErrorMessageIsSent(TailTest.java:188)
Actually, there were zero interactions with this mock.

Fixed. Done.


LED is not blinking

Hello there and thank you so much for your great library and work. I want to start playing around with the ULP copro and as a first step, I want to get the blinky example getting to run. I am working with micropython 1.18 on Heltec Wifi Kit32. On this board, the onboard LED is on GPIO25, so I have changed the definition to:
#define RTCIO_GPIO25_CHANNEL 6
If I start the program it will run without an error and I still can see the print output changing from 1 to 0 and vice versa, but the LED doesn´t light. Could you give me a hint, of what I am doing wrong?
Thanks in advance and best regards,
Werner

I had a quick look and I have the feeling the PIN might not be in output mode.
This line sets the output mode: https://github.com/micropython/micropython-esp32-ulp/blob/master/examples/blink.py#L63
Did you change the RTC_IO_TOUCH_PAD2_REG and RTC_IO_TOUCH_PAD2_MUX_SEL_M appropriately? As per this mapping table, those constants need to be changed to RTC_IO_PAD_DAC1_REG  and RTC_IO_PDAC1_MUX_SEL_M  respectively (see comments at the end of each line of the table for the "normal" GPIO pin number for reference).
Give it a try. If that doesn't do it - I happen to have a "Heltek Wireless Stick", which also has its onboard LED on GPIO 25 / RTC 6, so I could test it on my board at some point.

Thanks for letting me know. I will try update the example file to better explain this for future users.


Make x3boundary less error prone

x3boundary in IntervalDomain is, by default, (:left, :right). This can cause confusion in drivers if it seems that the interp/gradient kwargs can be arbitrarily named.
I think simply removing the default would be a simple fix.

See #52

I think the problem here is that the gradient constructor doesn't really know about the domain, it is matched fairly late.
One immediate improvement would be to probably not have defaults for the domain and explicitly require the correct number of boundary labels, that forces them to be specified.
We probably could throw an error during the instantiate part of the stencil setup where the applied BC in the expression operators would be checked against the spaces.  Not sure how best to handle that this case.


Update demos for v0.6.1

Issue link
#281
What changes have been made

Updated notebooks to reflect changes in v0.6.1
Also polished various bits to be more informative/up-to-date

Checks

[x] I've made sure the tests are passing.
Testing Strategy

[ ] Unit tests
[ ] Manual tests
[x] Testing is not required for this change

@tedhtchang @jbusche the only reason that the batch demos were removed is because they were redundant (so not actually being removed). Take a look in the PR at guided-demos/2_basic_jobs.ipynb and guided-demos/notebooks-ex-outputs/2_basic_jobs.ipynb and let me know if you feel anything in there does not encompass what was in the batch demos.

@MichaelClifford needs to approve this PR.


Support ability to shrink log file of database involved in Availability Group

One thing that I've found to be a challenge is to shrink a database log file that is in an alwaysOn configuration. Could you automate that process so that I don't have to remove the database and re-enter it into the AG?

You do not have to remove the database in an AG to shrink the log file. You simply can only do this on the primary replica. However if there are inactive portions of the log file then the shrink operation will work.
If you do not see it shrink you follow the normal process just like it is a normal (non AG) database on why the log space is not being released. Which if you are having to constantly do that then there are other issues that should be fixed.

You should be able to utilize the Invoke-DbaDatabaseShrink and specify the LogsOnly to shrink the database, just make sure you point that command at the primary replica.


Fixed Callback URL Issue

Description
This pull request fixes the callback URL issue that was causing the website to redirect to localhost:5000 after Google authentication. The issue was resolved by updating the Google auth callback URL in the .env and index.js files to https://imagine-ai-17zf.vercel.app/auth/google/callback.
Fixes #(#603)
Changes Made:

Updated the Google auth callback URL in .env and index.js to https://imagine-ai-17zf.vercel.app/auth/google/callback.

Screenshots
Checklist

[x] Tests have been added or updated to cover the changes
[x] Documentation has been updated to reflect the changes
[x] Code follows the established coding style guidelines
[x] All tests are passing

@SurajPratap10,please review and merge my pull request

@SurajPratap10,please review and merge my pull request


chore(deps): upgrade dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-k8s-26-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 2520

Questions ?
Please refer to the Backport tool documentation


Change DevconID to String in ASX / ASN and resulting JavaScript

Change DevconID to String is solved on the issuer side in #118. Follow that change

Hi @colourful-land,
I have implemented the change in the branch DevconIDToString, similarly I have updated the autogenereation script and incorporated the related changes (DevconID to String) in my development branch asn1js-parser-serializer(#108).
I can create the pull request from required branch as you suggest. My dev branch asn1js-parser-serializer has some work in progress changes but we can create the draft PR if you suggest.


add an option to wait for updates to the C++ fregion reader API

This also cleans up the reported types for stored sequences (so they hide the storage details of linked arrays).  You'll have to use a fresh build of 'hi' to test the output files.
I have a few small things I'd like to add here on the language/query side but this should be a good test for the pure C++ API allowing blocking reads.
From the outside, the only change is that rseries::next takes an optional timeout argument, defaulted to 0 (which means no wait).  If you set the timeout to -1 then it will block indefinitely, else it's milliseconds to wait.

I tested this fregion.H change on macOS only, will watch the Linux build.  It might be problematic to test this behavior on Linux with travis-ci due to a docker/inotify break recently in their infra.

Still have a few loose ends to tie up with tests and other bits of the query infra.  The main thing here is that the reader API from C++ can optionally block to wait for updates.
I also changed the type description for stored sequences to a nominal type hiding the actual storage structure, so it doesn’t clutter descriptions of stored types.  This has been a long-standing issue to clean up.

I found an issue with the hog test during my type description refactoring -- this would cause the test to block indefinitely.  I have a fix for that here, will need to follow up with another change to apply my type description refactoring to the dynamically-decided sequence types in hog as well (ie: not just the ones statically decided in fregion.H).


Add interviewer note

What is the context of this PR?
This adds interviewer note support in runner to interstitial and question block. The change is described on Trello card. It requires validator PR to be merged first.
How to review
New test schema (test_interviewer_note) has been added. Run new functional test using ./node_modules/.bin/wdio tests/functional/wdio.conf.js --spec tests/functional/spec/interviewer_note.spec.js.
Checklist

[x] New static content marked up for translation
[x] Newly defined schema content included in eq-translations repo

 (I) Interviewer Note highlighting on heading (S)


net: ieee802154 security with mbedTLS or TinyCrypt

DNM/RFC
I wanted to check if it is possible to use 15.4 security
with  mbedTLS or TinyCrypt.
Both libraries work with the changes in this patch.
mbedTLS was only tested with sample rpl_node due to lack of time.
It seems that both libraries do not support CCM* mode and so only
the security levels five or higher are possible.

Codecov Report

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

@@           Coverage Diff           @@
##           master    #8318   +/-   ##
=======================================
  Coverage   64.53%   64.53%
=======================================
  Files         420      420
  Lines       40122    40122
  Branches     6763     6763
=======================================
  Hits        25892    25892
  Misses      11110    11110
  Partials     3120     3120

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 f58d9ca...5ac2af1. Read the comment docs.

thanks @jfischer-phytec-iot for figuring out this, this was made only on top of cc2520 so ... (its crypto device is probably not in shape as well)

Both libraries work with the changes in this patch.
mbedTLS was only tested with sample rpl_node due to lack of time.

Cool, and how TinyCrypt case was tested? How does one go about such testing at all (i.e. how to set up security-enabled 15.4 networking)? Sorry if that sounds like a dumb question, but I for one don't know how to do that. And then if someone shows up and says that it doesn't work, it's interesting to know how it had been tested before, so adding such info to reviews is useful. Thanks.

Cool, and how TinyCrypt case was tested? How does one go about such testing at all (i.e. how to set up security-enabled 15.4 networking)? Sorry if that sounds like a dumb question, but I for one don't know how to do that. And then if someone shows up and says that it doesn't work, it's interesting to know how it had been tested before, so adding such info to reviews is useful. Thanks.

The support is experimental and was probably only tested with cc2520. I investigated if it would be possible to use Zephyr OS for a customer project and what should be changed for it. I tested (tested:= tried if it works) it with rpl_border_router and rpl_node samples by using net ping  or br coap toggle , how to set up a project can be seen in 5ac2af1fea590a0f3298d53aa4e2484a790922fb. But yes 15.4 is a painful way on many systems.

Is this PR abandoned @jfischer-phytec-iot ?

@ioannisg yes, also it was example/DNM/draft PR, can be closed.


AngularJS ng-model value not correct

Look at this image from https://jsfiddle.net/nosir/q58sh22t/:

the AngularJS ng-model value is not correct.
Steps to reproduce:

enter some digits, eg.<PHONE_NUMBER>23456
continue entering another arbitrary digit, eg. 7

Result:
The value in the input is<PHONE_NUMBER>23456 which is correct as 7 exceeds the credit card length,
while the raw (ng-model) value is<PHONE_NUMBER>234567.
Please fix this issue.

I have the same problem, especially with validation. If I use cleave numeral on a input and make the input required, typing non numeric character would set the ng-model to the non numeric character bu the input field is empty. This would pass the required validation.

Created a Plunk to make the issue a bit clearer if it helps anyone:
https://plnkr.co/Xi9Mes

Cleave.js changes the DOM value, not the reactive value in the framework (Angular, Vue, React, etc).
This is why you you type "12345a" and the reactive value shows "12345a" but the input "12345".
Then when you write another letter, lets say "b", you will get "12345b" in the reactive value.
My trick has been to use onInput event to get the formatted value returned, strip all numeric chars with value.replace(/\D/g, "") and update reactive raw value with it.


Failed to retrieve Airlock Review configuration

While reviewing import / export request, I clicked on *Create on Review VM option and received following error.
Error creating review resource
Failed to retrieve Airlock Review configuration for workspace dc5f477d-9512-4396-80c6-34f1e8d2b6d5. Please ask your TRE administrator to check the configuration. Details: 'airlock_review_config'

Airlock workspace & Airlock VM does exists before reviewing request.
Steps to reproduce

See above

@RIashfaqahmed please check this guide and revert back if need further help, or resolves the issue. Thanks.
https://microsoft.github.io/AzureTRE/tre-admins/configure-airlock-review/


Fix User Status, currently always Offline

fixed https://github.com/sopra-fs23-group-32/SoPra23_Server/commit/8423fbcf91f079944c4eef34c1bddf82672f4ab9


Unable to build a sample app using yeoman

Reported by johnicholas in Stellar Public Slack. Below is my attempt on my own machine.
irisli@Iriss:~/yotest  npm install -g yo generator-interstellar
irisli@Iriss:~/yotest  yo interstellar sample-app
  Error interstellar sample-app

  You don't seem to have a generator with the name interstellar installed.
  You can see available generators with npm search yeoman-generator and then install them with npm install [name].
  To see the 0 registered generators run yo with the `--help` option.

What is happening here?

Do any of these tips solve this problem for you?

It says that my npm and node.js version is outdated. Which is a given since we're using legacy node.
But I thought you use v0.10.33 too?

Trying to solve a problem with johnnicholas on Slack.


Un-deprecate Transactional Macro

Community has said there is still use for this macro, especially for easily placing some logic into its own transactional layer.
No reason to deprecate it.

We also need to add it back all of the nomination-pools calls.

bot merge

Could you backport this to polkadot-v0.9.25 branch?

okay ill work on it

Could you backport this to polkadot-v0.9.25 branch?

Does it work for you if we get this in .26 instead? That is set to release very soon.

Could you backport this to polkadot-v0.9.25 branch?

@jasl Does it work for you if we get this in .26 instead? That is set to release very soon.

Yeah I can fast forward to 0.9.26


Would like an intuitive way to set a monitored resource type

To set the monitored resource to a k8s cluster, I'm currently doing:
	attrs := []attribute.KeyValue{
		attribute.String("cloud.provider", mexporter.CloudProviderGCP),
		attribute.String("cloud.zone", zone),
		attribute.String("k8s.cluster.name", cluster),
	}

and then feeding attrs to a WithResource controller option.
Am I missing some mechanism to auto-detect these options?

You can find the detectors at https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/detectors/gcp.

Closing as not planned, workaround exists


Vulnerability roundup 112: openssh-8.8p1: 1 advisory [3.7]

search, files

[ ] CVE-2021-36368 CVSSv3=3.7 (nixos-21.11, nixos-unstable)

CVE details
CVE-2021-36368
** DISPUTED ** An issue was discovered in OpenSSH before 8.9. If a client is using public-key authentication with agent forwarding but without -oLogLevel=verbose, and an attacker has silently modified the server to support the None authentication option, then the user cannot determine whether FIDO authentication is going to confirm that the user wishes to connect to that server, or that the user wishes to allow that server to connect to a different server on the user's behalf. NOTE: the vendor's position is "this is not an authentication bypass, since nothing is being bypassed."

Scanned versions: nixos-21.11: efea022d6fe; nixos-unstable: 710fed5a248.
Cc @dasJ

8.9 for unstable is already on staging-next. Not sure what to do about 21.11. Maybe pick the commit? Or just do nothing?

I would leave 21.11 alone since this is a low-impact vulnerability.

9.0 is now in 22.05 and unstable


Sidenav closing/opening on window resizing doesn't call the 'onClose' or 'onOpen' option

When you create a sidenav you can add the options 'onClose' or 'onOpen' but when you resize the browser, it will automatically open/close, however this does not call these functions. It should execute it because it is either getting closed or opened.
How i came across this issue
My sidenav is automatically opened at the beginnning (would be nice if you can specify that as a sidenav option too to avoid a sliding-open effect to keep it open at the beginnning)
I have a div that holds content that needs to be pushed depending on if the sidenav is open or not, so that is why i am using the onOpen and onClose events of the sidenav, this is how i found out about this issue.
My sidenav code
  $(document).ready(function() {

    let sideNav = $('.side');

    sideNav.sideNav({
        menuWidth: 300, // Default is 300
        edge: 'left', // Choose the horizontal origin
        closeOnClick: false, // Closes side-nav on <a> clicks, useful for Angular/Meteor
        draggable: false, // Choose whether you can drag to open on touch screens,
        onOpen: function(el) {
            if($(window).width() >= 992) {
                $('#displayer').css('marginLeft', 340);
            }
            }, // A function to be called when sideNav is opened
        onClose: function(el) {
            if($(window).width() >= 992) {
                $('#displayer').css('marginLeft', 40);
            }
            }, // A function to be called when sideNav is closed
    });

    $('body').resize(function() {
       if( $('body').css('overflow') === 'hidden' ) {
           $('#displayer').css('marginLeft', 40);
       } else {
           $('#displayer').css('marginLeft', 340);
       }
    });

    if($(window).width() >= 992) {
        sideNav.sideNav('show'); // open it at the start
    }
});

PS: would really be great, once again, if you can specify if it is open at the beginning or not.

Fixed in v1-dev


Update Product Based Audiences AI Label

Proposed changes

Recommendation Audiences is now called Product Based Audiences.
Updated the name in the AI nutrition facts label.
Added a redirect from the old page.
Updated the links in the side navigation.

Merge timing

ASAP once approved.

Related issues (optional)
#7039

is "Product Based" hyphenated?

Nope.


[Bug Report] Holding arrow key down on radio button causes the whole screen to turn white

Element UI version
2.3.9
OS/Browsers version
WIndows 10/Chome- latest
Vue version
2.5.16
Reproduction Link
https://jsfiddle.net/7rkvvmw1/
Steps to reproduce
Select one of the radio buttons using the mouse
Hold down the right or left arrow key for a few seconds
What is Expected?
The values to bounce back and forth
What is actually happening?
The whole screen gets overtaken by white circles until you let go of the arrow key.

interesting...

Demo Link is lost and I dont't know what you say

Can confirm on Linux/Chrome latest (firefox behave correctly though).
The culprit seems to be span.el-radio__inner::after that keeps growing.


There is no way to animate a Button since Button Root is not animatable.

Description
https://github.com/gluestack/gluestack-ui/blob/main/packages/themed/src/components/Button/styled-components/Root.tsx

Notice this doesnt use AnimatedPressable thus button root is not animatable. It would be super useful is there was a way to make any element animatable by passing an animatable prop to styled config object.
It seems cumbersome to have to define if it will ever be animated from the start.
i.e:
import { styled } from '@gluestack/style';

const AnimatableButton = styled(Button, {}, {
  animatable: true,
});

Problem Statement
All components and pieces of components should be animatable
Proposed Solution or API
import { styled } from '@gluestack/style';

const AnimatableButton = styled(Button, {}, {
  animatable: true,
});

Alternatives
No response
Additional Information
No response

Hey @milesingrams, We have as prop through which you can change the component.
<Button as={AnimatedPressable} />

Using this API you will be able to animate the component. We are working on adding support to resolve animation props for the same. I'll update you once we release stable version for the same.

Thanks for the reply! This definitely would resolve my issue. I'll use the "as" prop in the future for these cases

Closing this issue as this is resolved in the latest version. Feel free to reopen if the issue persists.


[Bug]: LNURL-Channel doesn't work properly

Describe the bug
After scanning lnurl-channel it usually needs a few app restarts to finally open a channel
Also on channel details this new channel has no name before it is opened
Reproduce

Scan LNURL-channel
Watch the app

Screenshots / Recording
https://github.com/synonymdev/bitkit/assets/155891/1473abdf-e83b-4bad-a01f-bc9bc2e24cc6
Operating system
iOS
Bitkit version
v94
Log output
bitkit_ldk_logs_1705059027826.zip

From Bitkit I tried to open a channel with the Blocktank widget.
When I was about to pay, I scanned the LNURL invoice.
Bitkit: I received the error message "Time out error". The amount had gone through. However, there is no trace in the Bitkit transaction history.
Blocktank widget: Transaction successful and asks me to claim the channel.
In order to claim the channel, I scan the QR code, I get the error message: "Unable to Open Channel (LNURL)"
Translated with www.DeepL.com/Translator (free version)
ERROR 1 - no history of the transaction
ERROR 2 - impossible to open channel

#1546


🐛 [Bug]: Treeselect tree selection in TinyNg needs to support custom templates, and some text and icons cannot be customized.

@holiday-wx Please report a bug at https://github.com/opentiny/ng/issues


Last Reported Skill date can be slow to load

If a Project has many users and an extensive history, the last reported skill date can be slow to load. Currently that is included as part of the project details query and can introduce unnecessary latency. Consider extracting the last reported skill date into it's own endpoint.

PR: https://github.com/NationalSecurityAgency/skills-service/pull/1571

pr: https://github.com/NationalSecurityAgency/skills-service/pull/1581

:+1:


Add category to JSON

Add category information to the API. This information is used to organize openFPGA cores in the 1.1-beta-5 firmware.

I'm not sure where we want to place category in the JSON. There is other information available in the <platform>.json file that we might also want to surface, which might affect how we structure the JSON.

That was a quick implementation! What do you think about breaking up the analogue-pocket.md into multiple tables (one per category)? Another option would be to add a category column however I don't believe the layout allows for a very wide table.


[fix] propagate mongodb service name in yunohost

Problem

In Buster, the wrong MongoDB service name is advertised to YunoHost webadmin (mongodb instead of mongod)

Solution

Use the available $mongodb_servicename variable in yunohost service add commands.

PR Status

[x] Code finished.
[ ] Tested with Package_check.
[ ] Fix or enhancement tested.
[ ] Upgrade from last version tested.
[x] Can be reviewed and tested.

For those affected by this small issue:
sudo yunohost service remove mongodb
sudo yunohost service add mongod --description "MongoDB daemon" --log "/var/log/mongodb/mongodb.log"

This should be covered while upgrading.
The code has yet to be tested though.


Updates HubSpot contact properties if record already exists based on email address.

Resolves issue #17, by submitting an update to a contact based on their email address if the first attempt to save a new contact fails due to a record already existing.
Have bumped to version 2 as there's a breaking change come in from a PR and also as this is a change to behaviour (it might be some people wouldn't want to do an update, so they should opt into it by upgrading).

Code looks good.


Remove vscode-commons dependency

https://github.com/fabric8-analytics/fabric8-analytics-vscode-extension/blob/d8182888563aa72110f67297b394826196e27d07/package.json#L10
See https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-use-this-library and YAML integration as an example

Please use vscode-redhat-telemetry 0.2.0

Please prioritize this. It'll help to reduce the amount of telemetry traffic.

@mathur07  please try vscode-redhat-telemetry 0.3.0

0.3.0 and 0.4.0 are broken, please use 0.4.2

Please fix and release this ASAP


Begin migration of calc functions to methods

This will supersede functions such as calc.pow(5, 6) by 5.pow(6) or int.pow(5, 6), for example.
The calc functions will remain available for the time being, however.
Implementation details
Some things still have to be sorted out, but here are the main highlights (currently):

Right now, I'm moving most functions to methods under i64 and f64.
There is currently quite a bit of duplication with calc; I'm trying to trim it down as much as possible, but there's also this idea of trying not to depend so much on calc in order to eventually be able to remove as much as possible from it in the future.
I'm not sure if I should add .abs() methods for length, ratio and fr as well (currently, I've added it to i64, f64 and angle). But it sounds plausible at first, with length being the only possible problem, given it already has an abs field and a to_absolute method.
calc.min and calc.max are in a bit of a weird state right now. Those methods accept any comparable values, so it's hard to tell what I should do with it; perhaps we should add methods for each comparable value, but that sounds a bit excessive in principle. For now, I've added int.min and float.min which accept anything that compares to numbers.
The remaining methods not mentioned above were pretty smoothly dealt with.

Worth noting that I didn't add any warnings to migrated methods; tell me if that'd be desirable.
Docs
I did not update the docs, only adapted existing docs to the new methods. Some more major docs changes (involving a Ctrl+F search of calc across all docstrings) are in order though, but I'm not sure how much of it I should do in this PR instead of separately, if at all.
Regarding the #[scope] macro
Constants
I wanted to move calc.e, calc.nan etc. to float.e, float.nan etc., but currently the f64Ext trait generated by #[scope] does not appear to add the constants correctly.
Functions
Of note, I had to append _ to some method names (e.g. pow_) because the #[scope] proc macro (or perhaps #[func]) kept generating some code which tried to use i64::pow (or similar) directly, instead of i64Ext::pow, thus leading to an error of "unexpected parameters" when the signatures didn't match. I didn't have to add an underscore when the function signatures did match. Note that the underscore isn't visible to the end user (int.pow works). This might be interesting to somehow fix in the future (though feels out of scope for this PR).
As a result, i64Ext and f64Ext were generating methods called pow__data (from the {ident}_data format), triggering a non_snake_case warning. Since these methods are internal, I've worked around it by simply ignoring the warning for the generated trait, but it's worth mentioning.
I also added pub(super) to the generated i64Ext and f64Ext traits so their implementations can be reused by each other.
Finally, the lack of self: Spanned<Self> led me to use the callsite span for errors related to self on multiple occasions. I think that works for now. (I guess we'll be able to more trivially solve that when Rust implements support for arbitrary receivers.)

Closing this for now. If we make some future changes to calc/methods, it will likely be moving methods to calc instead. If we reconsider, we can always reopen.


HWKAGENT-121 mark avail as down if we fail to get the value

this passes on my box, travis is just annoying. I need someone to look this over and merge. Its a simple change - just wrapped some code around a try-catch block

LGTM

Travis passed but then hung and the status was not updated here.  Merging...


Build error | 1 Test Fails

@taminobaumann
Please try again with --refresh-dependencies
I think the ssikit needs to be updated on your local repo cache.
br

All tests are passing as of the current commit.


Have ability to validate with multiple keys on the same node

In refactoring in #3296 we came across the idea that we'd like to have the ability to have multiple "validator keys" in the keystore to be able to run multiple validators from the same node.
So for instance in GRANDPA we would replace something like this:
fn is_voter(
	voters: &Arc<VoterSet<AuthorityId>>,
	keystore: &Option<KeyStorePtr>,
) -> Option<AuthorityPair> {
	match keystore {
		Some(keystore) => voters.voters().iter()
			.find_map(|(p, _)| keystore.read().key_pair::<AuthorityPair>(&p).ok()),
		None => None,
	}
}

To something like this:
fn is_voter(
	voters: &Arc<VoterSet<AuthorityId>>,
	keystore: &Option<KeyStorePtr>,
) -> Vec<AuthorityPair> {
	match keystore {
		Some(keystore) => voters.voters().iter()
			.filter_map(|(p, _)| keystore.read().key_pair::<AuthorityPair>(&p).ok()).collect(),
		None => vec![],
	}
}

However, the change is not this simple. Currently (as I understand it) a future for GRANDPA is started in run_grandpa_voter which is essentially a state machine keeping track of voting behavior for one validator, picking the key for that validator with the is_voter function above. Basically just picking the first key it finds that matches an active validator for the Era.
If we wanted to vote on behalf of multiple validators, we would need a way to have one of these state machines per key that we have, instead of just looking for the first active key we can find.
This is a bit of an inversion of responsibility, where now the GRANDPA voter is responsible for looking for a key that is active and using that (if there are multiple it would be like an arbitrary choice of any active key). We would need to change this around to have something push the keys to use to the future, which means we need to re-instantiate the future somehow when the keys rotate and we get new session keys in place in the keystore.
This would have some effect on networking as well, as we can't associate an address with a single validator anymore, but behind one address might be multiple validators.
Have talked this through with @andresilva who considers this non-trivial. Would like to hear thoughts from @rphmeier and @tomaka as well who might have some insight into how to best achieve this goal.
Hopefully I'm clear enough in this issue about what needs to be accomplished and the problems I see right now.

This exact change is something I've had in mind for a long time, and requires as a first step #3097, which is blocked by refactoring the service creation code, which itself is blocked by #3296.
In the long term, I don't even see the need for the keystore. The key should just be read from the RPC endpoint and we'd directly modify the GrandPa state machine, as you described, and to me the reason why the keystore exists at all is just because we are unable to do that.
In the short term, I don't really know what to do. We can hack around this by creating a channel between GrandPa and the keystore, or something like that.

This would have some effect on networking as well, as we can't associate an address with a single validator anymore, but behind one address might be multiple validators.

I don't think this has an effect on the networking, unless the GrandPa code somehow relies on the PeerId.

In the short term, I don't really know what to do. We can pile up another hack by creating a channel between GrandPa and the keystore, or something like that.

IMO (though @gavofyork might disagree) this is not needed for short-term and would accept getting this in at the end of those refactorings assuming we highly prioritize getting those done. Personally I’d rather work on that refactoring rather than a hack to get this in.

Are these these use cases in mind?

implement in one node a bridge between substrate chains using grandpa
run babe as block production on parachains

Are these these use cases in mind?

The point is that the code should be designed in such a way that the use case doesn't matter.
All that the GRANDPA code needs is access to a gossiping interface and to a database of blocks.
All that the BABE code needs is access to some database of blocks.

In the long term, I don't even see the need for the keystore. The key should just be read from the RPC endpoint and we'd directly modify the GrandPa state machine, as you described, and to me the reason why the keystore exists at all is to bypass the current issues with the code design.

The RPC endpoint does not know anything about the key. We have 2 endpoints, one for setting one key to the keystore and another one that rotates all session keys at once. So in general, all this data is just opaque for the endpoint and it does not even know the number of sessions keys the runtime is using.
I don't see the keystore as any hack because of the current design. You need something that persists the keys and makes them available for all. You don't want to re-implement password protected key management in every part of Substrate.
We could provide some sort of channel that informs about new keys for a given key type, but that wouldn't solve the Grandpa problem. Babe couldn't also not do anything with the information at the point we insert a new key. After inserting a new key, it is not used by the consensus. You will first need to register the key in the runtime and wait for a new era for your new keys to be activated.
For Babe having multiple active validator keys at one node, shouldn't be any problem. Even if all validator keys for one slot are on one validator, producing multiple blocks would not make any sense at all. You maybe loose the uncle reward, but you also have configured multiple valid keys at one machine.
For Grandpa we have this problem as described by @folsen. It more looks like we should spawn multiple futures per authority rotation. If the authorities rotate, we look into the keystore and start a future for each authority we have on our node.
I don't see any reason at all why something like Grandpa should expose to the service the kind of keys it require. For Aura, that supports different types of keys, we need to set the type accordingly but not more. These "sub-services" or however you want to name them, should just be polled and anything else should be done internally.

For BABE we can have the proposer try all the available keys that are active in the current set. This is easier than spinning one proposer per-key because we don't need to track authority set changes (we check at proposal time), but it's less efficient and less concurrent.
For GRANDPA the internal state-machine can be divided into two parts: the finality-grandpa state machine (that runs the GRANDPA protocol), and keeping track of authority set changes to update state and restart the voter. For GRANDPA we need to spin up multiple voters, but since we already track authority set changes in the state machine, when one happens we check all keys available in key store and start a voter task for each key that is in the authority set (we do the same thing on startup).
This feature also makes things like https://github.com/paritytech/substrate/pull/3353 more complicated. What should we do if one GRANDPA voter fails? It doesn't seem reasonable to shutdown the node if we have other voters validating, but right now we also have no way of effectively notifying the user about it.

In the long term, I don't even see the need for the keystore. The key should just be read from the RPC endpoint and we'd directly modify the GrandPa state machine, as you described, and to me the reason why the keystore exists at all is to bypass the current issues with the code design.

I'm maybe miss-reading this, but..  I'd favor this flow:

an operator first sends an RPC request to generate a session key, or maybe a one part of a session key,
substrate creates the new key, stores the session key pair into the keystore, and return only the public keys to the operator, and
the operator signs the full session public key with their controller key and returns this session certificate via the RPC.

A node might validate with multiple session keys merely by possessing multiple valid session certificates by different controller keys, but a later session certificate issued by the same controller key becoming valid should invalidate its older session certificate.
We do not want session secret keys to be handled manually or even exist outside the keystore and substrate process.  If they do then validators will be slashed needlessly, ala cosmos.
In future, if running in SGX, then in step 2 the public key would also be signed by the SGX enclave, which becomes a promise to the operator and their nominators that the session secret key will never leave that SGX enclave.

This exact change is something I've had in mind for a long time, and requires as a first step #3097, which is blocked by refactoring the service creation code, which itself is blocked by #3296.

The second link is to a merged PR, so I assume that is not a blocker anymore.
Re the first one(putting everything into Service), it might be a good idea to do (part-of-)it while solving a specific problem, such as the one highlighted here, as opposed to as a stand-alone refactoring.
Is anyone working on this already?
If not, I would be interested. If this requires moving grandpa into the service, it could be done at the same time, addressing part of #3097


Markerless AR for web using WebVR

Han anyone tried markerless augmented reality using WebVR Since its compatible with most web browsers and devices unlike WebXR?

This seems like a question more appropriate for the WebVR Slack

Nope that's not even close


Browser compatibility. Diagnostics and error printing.

To finish integration of AssemblyScript with browser playground I should retrieve diagnostic errors when compiler can't process existing code. But AS use a lot of node specific process.stderr.write for that. So I thinking of best way to resolve this.

As a starting point, there is the silent option to suppress printing to stderr. You can then manually manage diagnostics.

Of coarse I use silent option, and everything ok until input code is correct. And sometimes compileString sometimes call process.stderr.write

Hmm, are you calling validate() on the module? Just asking because that's a binaryen function hard-wired to output text format to console on validation errors.


Add utility to click on DOM element by selector

It's a huge work. In fact provide all event trigger api is a better work, but it's more difficult.

It's actually quite simple, I just tested the following and it works:
suspend fun ChromePageSession.clickOnElement(
    selector: CssSelector,
    clickDurationMillis: Long = 100,
    mouseButton: MouseButton = MouseButton.left
) {
    val box = dom.getBoxModel(selector) ?: error("Cannot click on element, no node found using selector '$selector'")
    val elementCenter = box.padding.center

    input.dispatchMouseEvent(
        DispatchMouseEventRequest(
            type = "mousePressed",
            x = elementCenter.x,
            y = elementCenter.y,
            button = mouseButton,
            clickCount = 1,
        )
    )
    delay(clickDurationMillis)
    input.dispatchMouseEvent(
        DispatchMouseEventRequest(
            type = "mouseReleased",
            x = elementCenter.x,
            y = elementCenter.y,
            button = mouseButton,
        )
    )
}

Actually simulating clicks like this is better than JS .click() because during in my tests the pop-ups open via JS were automatically blocked by chrome. Using simulated clicks acts "like a human" and is not blocked by chrome.

In fact provide all event trigger api is a better work

What do you mean? You normally already have access to all events of all domains. Is there something in particular you didn't find?

I means if you provide a clickOnElement api, do we need a keyDownOnElement ? It will be a huge works... lol

I see your point. The idea is to ensure all low-level primitives are here (which should be the case, since all domains are generated), and then add some higher-level extensions on top of that for the most common use cases.
Clicking on an element is very common, maybe entering some data in an input field as well, this sort of things.


Founder of Buy Listers LLC

I have been trying to improve my computer skills by being a member of Windows Insiders and I have a lifetime of experience in sales, where I started my first business at 14 and have been fortunate enough to have been my own boss my entire life .
I believe in my abilities in seeing opportunities others miss, as my computer knowledge evolves I believe I can find markets overlooked by traditional big box stores .
I want to thank Dell, Microsoft, and you Insiders for giving me awesome service for 25 years.
Sincerely, Lister Harrell,

Hello! Thank you for the kind words. We are glad that you have had a wonderful experience with us.


LibWeb: Use the realm from the ServiceWorker client

vm.realm() might not exist, and was probably not even the right realm to use in the first place.

This fixes the crash in #2011, but then immediately runs into #1816.

Do you have a reduced test case that we can add as a LibWeb test by any chance?

Do you have a reduced test case that we can add as a LibWeb test by any chance?

I do:
navigator.serviceWorker.register('sw.js');

but it requires HTTP/HTTPS:
Registration failed with TypeError: scriptURL must have a scheme of 'http' or 'https'

Testing this properly needs an https server for testing, so I'll merge as-is.


Destroy method not working?

I am initializing multiple particle instances like this
function initialize_particles(){
    particlesJS.load('particles_1', my_particles.particles_json);
    particlesJS.load('particles_2', my_particles.particles_json);
    particlesJS.load('particles_3', my_particles.particles_json);
    particlesJS.load('particles_4', my_particles.particles_json);
    particlesJS.load('particles_5', my_particles.particles_json);
}

they are inside #particles_1... elements.
I would like to destroy them if the screen size iz smaller than 700px so I tried
$(window).on('resize', function(){
    if ($(window).width() > 700) {
        initialize_particles();
    } else {
        particlesJS.fn.vendors.destroy();
    }
});

The initialization part works (I see them recreating when resizing the screen), but destroying them will give me

Uncaught TypeError: Cannot read property 'vendors' of undefined

I tried with pJS instead of particlesJS, I tried with particlesJS.destroy(), nothing worked. What am I doing wrong here?

I've got the exact same issue...did you fix it?

Did you try
pJSDom[0].pJS.fn.vendors ?
Also I didn't found any vendors.destroy() function, but an vendors.destroypJS() (maybe what you're looking for).
Second choice, the #158 could help you.

Hi, I stopped working on the project that was using this, don't remember how we ended up fixing this, but thanks for the reply, it could prove useful to some maybe :) I'll close the issue.


Bug(transloco): Missing translation error in lazy-loaded pages on initial load

Is there an existing issue for this?

[X] I have searched the existing issues

Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
No
Current behavior
I'm experiencing an issue with Transloco in my Angular project. In a lazy-loaded page, after refreshing, a "Missing translation for 'home'" error appears in the console on the initial load. However, when I navigate to another page and then return to the lazy-loaded page, the error no longer appears.
It seems that on the initial load, the translation file doesn’t load in time, causing the page to render before translations are available.
Steps to Reproduce:
1- Open the lazy-loaded page.
2- Refresh the page.
3- Observe the console for the "Missing translation" error.
4- Navigate to a different page.
5- Return to the lazy-loaded page.
6- Notice that the error is no longer present.
Expected behavior
When navigating to a lazy-loaded page, all required translation files should be fully loaded before the page renders, so that no "Missing translation" errors appear in the console. The page should display all translations correctly, even on the initial load after a refresh.
Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.
https://codesandbox.io/p/sandbox/vibrant-water-flm8df?workspaceId=c3977a48-d7c1-411a-83ed-053355f0c600
Transloco Config
No response
Please provide the environment you discovered this bug in
"@jsverse/transloco": "7.4.2"

Browser
No response
Additional context
No response
I would like to make a pull request for this bug
No

Is there an existing issue for this?

[x]  I have searched the existing issues

Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
No
Current behavior
I'm experiencing an issue with Transloco in my Angular project. In a lazy-loaded page, after refreshing, a "Missing translation for 'home'" error appears in the console on the initial load. However, when I navigate to another page and then return to the lazy-loaded page, the error no longer appears.
It seems that on the initial load, the translation file doesn’t load in time, causing the page to render before translations are available.
Steps to Reproduce: 1- Open the lazy-loaded page. 2- Refresh the page. 3- Observe the console for the "Missing translation" error. 4- Navigate to a different page. 5- Return to the lazy-loaded page. 6- Notice that the error is no longer present.
Expected behavior
When navigating to a lazy-loaded page, all required translation files should be fully loaded before the page renders, so that no "Missing translation" errors appear in the console. The page should display all translations correctly, even on the initial load after a refresh.
Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.
https://codesandbox.io/p/sandbox/vibrant-water-flm8df?workspaceId=c3977a48-d7c1-411a-83ed-053355f0c600
Transloco Config
No response
Please provide the environment you discovered this bug in
"@jsverse/transloco": "7.4.2"

Browser
No response
Additional context
No response
I would like to make a pull request for this bug
No

Yes, I am experiencing the same issue. When using Transloco in an Angular project, specifically on a lazy-loaded page, refreshing the page results in a "Missing translation for 'key'" error in the console. However, the issue resolves itself when navigating to another page and then returning to the lazy-loaded page.

is there any solution for it??

I tried to find a workaround for this and added this code to my app configuration, which helped me solve the problem :
    {
      provide: APP_INITIALIZER,
      useFactory: (translocoService: TranslocoService) => () => {
        // this line to make sure to load translations on first load and avoid missing trads
        // https://github.com/jsverse/transloco/issues/811
        lastValueFrom(translocoService.selectTranslate('app.title')).then();
      },
      deps: [TranslocoService],
      multi: true,
    },

The problem is related to lazy loading translation files. Here's an example configuration I am using with Transloco for lazy loading a route:
{
  path: "lazy",
  loadComponent: () =>
    import("./lazy.component").then((LazyComponent) => LazyComponent),
  providers: [provideTranslocoScope("users")],
}

In the HTML file, translations work perfectly when using the pipe. However, in the TypeScript file, when I use the TranslocoService to fetch translations, the keys are not translated.
HTML example (this works fine):
<h1>{{ 'title' | transloco }}</h1>

TypeScript example (this has an issue):
this.translocoService.translate('title'); // Returns the key 'title', not the translated value

It seems that when using TranslocoService in lazy-loaded components, the translation files have not been fully loaded yet, resulting in untranslated keys in TypeScript.
Is there any specific configuration or method to ensure that translation files are fully loaded before using the TranslocoService? Or do I need an async approach to fetch translations when working in TypeScript?

Problem is that APP_INITIALIZER is deprecated and provideAppInitializer should be used instead. Not sure yet how to adjust the app.config to use it so translations would be loaded before guards.

The issue I'm facing with provideTranslocoScope is that while it works fine in the HTML when using the Transloco pipe (translations are correctly applied), in the TypeScript files, when I use the TranslocoService to fetch translations, they are not recognized after the lazy-loaded module.
In other words, the translations are available in the HTML, but not in TypeScript after the module is loaded using the scope provided in the route.
Do you have any suggestions for how I can make sure the translations are accessible in TypeScript when using provideTranslocoScope in lazy-loaded routes?
Everything in my project works correctly, except in cases where I use the provideTranslocoScope provider, I encounter an issue.
I expect this to work:
{
  path: "lazy",
  loadComponent: () =>
    import("./lazy.component").then((LazyComponent) => LazyComponent),
  providers: [
    provideTranslocoScope("users"),
  ],
}

But should it be resolved with a Resolver instead?
{
  path: 'lazy',
  loadComponent: () =>
    import('./lazy.component').then((LazyComponent) => LazyComponent),
  resolve: {
    translations: TranslationResolver,
  },
}

@Injectable({
  providedIn: 'root',
})
export class TranslationResolver implements Resolve<any> {
  constructor(private translocoService: TranslocoService) {}

  resolve() {
    return this.translocoService.load('users').toPromise();
  }
}


Cockroach University Robots issue

In Cockroach University Admin (LearnDot) replace the file named robot.txt to be this new txt file (attached) but with the URL at /robots.txt
Search crawlers only search for Robots.txt files under .com/robots.txt but the current file there is an HTML page that has nothing to do with Robots. The correct placement for the attached file should live under:
https://university.cockroachlabs.com/robots.txt
robots.txt

I think this was handled by the Training team. @jeffreyroach, @dweatherbee, if not, please create a Jira issue for this.


recreate demo issue (missing colon) using OLLAMA for testing

I'm running https://github.com/SWE-agent/test-repo/blob/main/tests/missing_colon.py as follow
division(23, 0)
I have the following error
    def division(a: float, b: float) -> float                                              ^ SyntaxError: invalid syntax

It's a test file to test SWE-agent's capability to fix issues (such as syntax errors). In other words: working as expected


COVID-19 Gender Bias?

At least China and Finland data suggest that there is roughly 2:1 male-to-female bias with Covid-19.
What can we learn about this? What could be causing it? Hormones? Habits? Culture? Something else?

One broad take on this: https://www.todayonline.com/singapore/explainer-are-men-really-more-vulnerable-women-covid-19-experts-weigh
Central point: It remains still unclear if gender difference is a matter of gender bias in the exposures.
However, there are results derived from animal studies suggesting estrogen (or like) hormone(s) adding resistance to corona viruses such as SARS and COVID-19.
Notable is also that with Covid-19 like in other viral diseases (chickenpox, hepatitis A), children seem to be only very mildly affected if at all.

Newer take:
https://www.latimes.com/science/story/2020-03-21/why-is-the-coronavirus-more-deadly-for-men-than-for-women
The statistics released by Italy show that while there have been more male infections (58%), they have 75% higher death rate among hospitalized COVID-19 patients. China's reported statistics show the same trend with about 65 higher fatality rate in men with confirmed COVID-19 cases than in women.
Much more common smoking tobacco among man likely explains some part of the gender difference. Studies with corona viruses in mice have shown estrogen as a cause fewer death in affected female mice. (Estrogen affects many facets of the female physiology, so pinpointing the exact causal chain of relationships, even in mice, will not come easily.)

I'll try to look for actual scientific paper on the matter, if anything beyond the mouse study exists.


Request: Have a new parameter to get the config filename

I need to explore registered components with Python from the iotkit.
Is possible to have a new parameter to get the config filename
In the file iotkit-agent/admin/components.js
The new fonction called by cli action
function getConfigFile () {
    var filename = common.getDeviceConfigName();
    if(filename) {
        console.log(filename);
    }
}

The new parameter for cli
        program
            .command('config-filename')
            .description('Displays the config filename')
            .action(getConfigFilename);

Regards,
Olivier

and then from Python, I could read the registered components
import json
from pprint import pprint

json_data = open('/usr/lib/node_modules/iotkit-agent/data/device.json')
data = json.load(json_data)

for component in data['sensor_list']:
    pprint(component)
json_data.close()

We have in our backlog task for adding getter for data-directory. It will be added in future release.

OK for a next release. I can do without actually


Question - Create Drawer with main container

How can i create drawer (side menu) with MAIN container. Your demo app does not have an example of this.
Thanks you !

+1 i would love to see how this actually work :)


Systematic testing

Use Pytest and the current mappings in the folder test, to systematically test the engine.

This will be done by @leviheichou in a separate repository


Paus/play-button is looking weird

Hi! Love the theme! But unfortunally it seems like the play/paus button is multiplying itself. Is there a soulution to fix that?

Forgot to add the screens :/

Send screenshot + config.

Aa the config. Ofc. I'm guessing config-xpui
`[Setting]
prefs_path              = C:\Users\kevin\AppData\Roaming\Spotify\prefs
color_scheme            = Comfy
inject_css              = 1
overwrite_assets        = 1
check_spicetify_upgrade = 0
spotify_path            = C:\Users\kevin\AppData\Roaming\Spotify
current_theme           = Comfy
replace_colors          = 1
spotify_launch_flags    =
[Preprocesses]
remove_rtl_rule       = 1
expose_apis           = 1
disable_upgrade_check = 1
disable_sentry        = 1
disable_ui_logging    = 1
[AdditionalOptions]
extensions            = bloom.js|comfy.js
custom_apps           = marketplace
sidebar_config        = 1
home_config           = 1
experimental_features = 1
[Patch]
xpui.js_find_8008 = ,(\w+=)32,
xpui.js_repl_8008 = ,${1}56,
; DO NOT CHANGE!
[Backup]
version = <IP_ADDRESS>2.gcc529952
with    = 2.10.2
`

Bloom extension conflict issue, remove the extension. I had a hunch when the Play button looked like Bloom's as this is what Comfy's look like.

Aa. Makes sense. Awesome! Thank you! :D


fix(firestore-send-email): added local smtp server for running tests

fixes: #789

Codecov Report

Merging #794 (54d9c02) into next (ddcfcb4) will increase coverage by 0.60%.
The diff coverage is 84.62%.

@@            Coverage Diff             @@
##             next     #794      +/-   ##
==========================================
+ Coverage   50.19%   50.79%   +0.60%
==========================================
  Files          30       31       +1
  Lines        1329     1335       +6
  Branches      197      191       -6
==========================================
+ Hits          667      678      +11
+ Misses        661      656       -5
  Partials        1        1

Impacted Files
Coverage Δ

firestore-send-email/functions/src/index.ts
5.36% <0.00%> (+0.16%)
:arrow_up:

...send-email/functions/__tests__/createSMTPServer.ts
100.00% <100.00%> (ø)


Add Scope as interface for NonThrowingCloseables that work with current context.

This interface allows users to write a shorter, more descriptive type name when
using scoped tags or spans.

Codecov Report

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

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

Thanks.  I deprecated NonThrowingCloseable.


Add tests for commands

Add unit tests for every command..
..so that bugs like #80  don't happen anymore :grimacing:

deploy command tests: PR #94

Missing command tests:

add_pr_comment
create_pr_preview
create_preview
delete_pr_preview
sync_apps

add_pr_comment: PR #120
delete_pr_preview: PR #118

sync_apps: PR #125
still missing:

create_pr_preview
create_preview

:tada: This issue has been resolved in version 4.2.2 :tada:
The release is available on:

v4.2.2
GitHub release

Your semantic-release bot :package::rocket:


Computational resources?

Hi, thank you sharing your great work!
It is quite interesting to use molecular structure as well as text information.
I wonder that such a language model seems require heavy computational resources.
How rich GPUs are required to pretrain the model when I want to try your work.
Thank you in advance:)

Thank you for your interest in our work!
We utilize the T5-small model as our backbone, which consists of 64 million parameters. Pretraining can be effectively performed on a single 32 GB GPU. Additionally, you have the option to employ gradient accumulation to further mitigate memory requirements.

Thank you for your interest in our work!
We utilize the T5-small model as our backbone, which consists of 64 million parameters. Pretraining can be effectively performed on a single 32 GB GPU. Additionally, you have the option to employ gradient accumulation to further mitigate memory requirements.

@zhao-ht Thank you for your kind reply!
That’s awesome only a single GPU is required for pretraining.
I appreciate also for the helpful option.
I will try it:)


Extract upload() from upload_changed/some

Both code segments were essentially identical. This is a first step to identifying why our uploads fails.

@ilevkivskyi @JelleZijlstra @hauntsaninja @alexwaygood @Akuli Sorry for the spam, but could one of you review this so we can get this resolved ASAP?


Override signature provider

Since signing url are mandatory, to make it easier when you want to use external signature provider, we added a function to override the signing process.
New config:
let config = {
    enabled: true,
    signProvider: signProvider,
    signProviderHost: 'https://tiktok.isaackogan.com/',
    signProviderPath: 'webcast/sign_url',
    extraParams: {},
};

Test:
const { WebcastPushConnection, signatureProvider } = require('tiktok-live-connector');
const axios = require('axios').create({
    timeout: 5000
});

// Set custom signature provider before connect
signatureProvider.config.signProvider = async function (url, headers, cookieJar, signEvents) {
    try {
        // Get signature from server
        let params = {
            url: url
        }
        let signResponse = await axios.get("https://your-sign-server/sign_url", { params, responseType: 'json' });

        // Set headers
        headers['User-Agent'] = signResponse.data['User-Agent'];

        // Set cookies
        cookieJar.setCookie('msToken', signResponse.data['msToken']);

        // Emit success event
        signEvents.emit('signSuccess', {
            originalUrl: url,
            signedUrl: signResponse.data.signedUrl,
            headers,
            cookieJar,
        });

        // Return signed url
        return signResponse.data.signedUrl;

    } catch (error) {
        // Emit error event
        signEvents.emit('signError', {
            originalUrl: url,
            headers,
            cookieJar,
            error,
        });

        throw new Error(`Failed to sign request: ${error.message}; URL: ${url}`);
    }
}

// Username of someone who is currently live
let tiktokUsername = "officialgeilegisela";

// Create a new wrapper object and pass the username
let tiktokLiveConnection = new WebcastPushConnection(tiktokUsername);

// Connect to the chat (await can be used as well)
tiktokLiveConnection.connect().then(state => {
    console.info(`Connected to roomId ${state.roomId}`);
}).catch(err => {
    console.error('Failed to connect', err);
});

Adierebel, if you have access to a working external signing provider I would gladly be willing to pay for access. Can you reach me at<EMAIL_ADDRESS>to discuss? I couldn't find your twitter or any other way to reach out before commenting on your commit, lol. Thank you!

Adierebel, if you have access to a working external signing provider I would gladly be willing to pay for access. Can you reach me at<EMAIL_ADDRESS>to discuss? I couldn't find your twitter or any other way to reach out before commenting on your commit, lol. Thank you!

I don't have that. You can deploy your own signing server https://github.com/carcabot/tiktok-signature

Adierebel Is that the signing server you're using? You can confirm that works? Thank you so much for responding.

Adierebel Is that the signing server you're using? You can confirm that works? Thank you so much for responding.

That software is not a signing server, it generates tokens. It does not have support for msToken, but it is a strong step for self-hosting a signing server :)

I don't have that. You can deploy your own signing server https://github.com/carcabot/tiktok-signature
msToken from automated browser (puppetter/playwright) is invalid. if you take from regular browser (with user logged in) it may work, but sometimes not.
Thanks for your work on this!

Would you be able to provide more detail on how you hook the msToken to the process (from your comment above)? I don't mind if it has to be manually done, I just don't know how to fit it into the workflow for that library.

Sorry for the delay here. It might be necessary to restructure the library in the near future. At the moment I am still thinking about how to proceed. Currently, no more signatures are generated for the client. However, we can apply the customizations as an option if someone want to use his own signature provider (which currently does not work reliably because TikTok blocks the IP of the client).


Avoid boxing in Framing

Adds a specialized indexOf(Byte, Int) to all ByteString implementations, similar to what is done on the ByteIterator, in order to avoid boxing/unboxing when searching for a byte.
This speeds up framing quite a bit.
Benchmark results (Java 11, Scala 2.13, Apple M3 Max):
Old

Benchmark                 (framePerSeq)  (messageSize)   Mode  Cnt         Score         Error  Units
FramingBenchmark.framing              1             32  thrpt    3  10113843.601 ±  347860.528  ops/s
FramingBenchmark.framing              1             64  thrpt    3   9649511.788 ±  275242.133  ops/s
FramingBenchmark.framing              1            128  thrpt    3   8121220.174 ± 1320460.364  ops/s
FramingBenchmark.framing              1            256  thrpt    3   5466330.854 ± 3260665.704  ops/s
FramingBenchmark.framing              1            512  thrpt    3   2859562.317 ±  489750.599  ops/s
FramingBenchmark.framing              1           1024  thrpt    3   1594647.037 ±   52601.259  ops/s
FramingBenchmark.framing              8             32  thrpt    3   1772199.560 ±   36471.572  ops/s
FramingBenchmark.framing              8             64  thrpt    3   1595775.427 ±   94933.072  ops/s
FramingBenchmark.framing              8            128  thrpt    3   1074911.259 ±  198661.935  ops/s
FramingBenchmark.framing              8            256  thrpt    3    715528.264 ±  117832.304  ops/s
FramingBenchmark.framing              8            512  thrpt    3    388890.655 ±   23628.881  ops/s
FramingBenchmark.framing              8           1024  thrpt    3    218333.423 ±    3502.994  ops/s
FramingBenchmark.framing             16             32  thrpt    3   1073203.353 ±   56959.738  ops/s
FramingBenchmark.framing             16             64  thrpt    3    835697.061 ±   61190.351  ops/s
FramingBenchmark.framing             16            128  thrpt    3    620562.797 ±    4529.555  ops/s
FramingBenchmark.framing             16            256  thrpt    3    380776.167 ±    3069.815  ops/s
FramingBenchmark.framing             16            512  thrpt    3    201483.021 ±   27772.140  ops/s
FramingBenchmark.framing             16           1024  thrpt    3    110883.293 ±    2468.349  ops/s
FramingBenchmark.framing             32             32  thrpt    3    589338.870 ±   48664.767  ops/s
FramingBenchmark.framing             32             64  thrpt    3    438839.627 ±   98301.907  ops/s
FramingBenchmark.framing             32            128  thrpt    3    318200.080 ±    3745.204  ops/s
FramingBenchmark.framing             32            256  thrpt    3    196484.642 ±    1439.287  ops/s
FramingBenchmark.framing             32            512  thrpt    3    102559.681 ±    1066.612  ops/s
FramingBenchmark.framing             32           1024  thrpt    3     55713.288 ±    1021.259  ops/s
FramingBenchmark.framing             64             32  thrpt    3    260941.068 ±   11029.238  ops/s
FramingBenchmark.framing             64             64  thrpt    3    213252.824 ±    2763.842  ops/s
FramingBenchmark.framing             64            128  thrpt    3    152106.933 ±    3544.177  ops/s
FramingBenchmark.framing             64            256  thrpt    3     97187.752 ±   16306.733  ops/s
FramingBenchmark.framing             64            512  thrpt    3     51460.170 ±     851.556  ops/s
FramingBenchmark.framing             64           1024  thrpt    3     27853.852 ±    1002.975  ops/s
FramingBenchmark.framing            128             32  thrpt    3    143485.697 ±    2294.380  ops/s
FramingBenchmark.framing            128             64  thrpt    3    108585.695 ±    1580.502  ops/s
FramingBenchmark.framing            128            128  thrpt    3     74709.074 ±    1104.879  ops/s
FramingBenchmark.framing            128            256  thrpt    3     49446.714 ±    3098.863  ops/s
FramingBenchmark.framing            128            512  thrpt    3     25852.970 ±    2643.999  ops/s
FramingBenchmark.framing            128           1024  thrpt    3     13979.600 ±     221.422  ops/s

New

Benchmark                 (framePerSeq)  (messageSize)   Mode  Cnt         Score        Error  Units
FramingBenchmark.framing              1             32  thrpt    3  12488386.857 ± 550524.197  ops/s
FramingBenchmark.framing              1             64  thrpt    3  10825562.059 ± 619829.640  ops/s
FramingBenchmark.framing              1            128  thrpt    3  10298423.557 ± 379279.669  ops/s
FramingBenchmark.framing              1            256  thrpt    3   7195103.283 ± 489354.505  ops/s
FramingBenchmark.framing              1            512  thrpt    3   5318261.366 ± 271701.067  ops/s
FramingBenchmark.framing              1           1024  thrpt    3   3380494.654 ± 293146.013  ops/s
FramingBenchmark.framing              8             32  thrpt    3   1876127.541 ± 228271.371  ops/s
FramingBenchmark.framing              8             64  thrpt    3   1777053.701 ± 146526.586  ops/s
FramingBenchmark.framing              8            128  thrpt    3   1430280.685 ±  97618.551  ops/s
FramingBenchmark.framing              8            256  thrpt    3   1130490.909 ± 134372.173  ops/s
FramingBenchmark.framing              8            512  thrpt    3    784673.367 ±  42187.315  ops/s
FramingBenchmark.framing              8           1024  thrpt    3    496979.878 ±  65898.234  ops/s
FramingBenchmark.framing             16             32  thrpt    3   1085230.634 ±  80359.239  ops/s
FramingBenchmark.framing             16             64  thrpt    3    972758.829 ±  47127.839  ops/s
FramingBenchmark.framing             16            128  thrpt    3    794532.378 ±  35834.092  ops/s
FramingBenchmark.framing             16            256  thrpt    3    601945.868 ± 120485.938  ops/s
FramingBenchmark.framing             16            512  thrpt    3    414966.392 ± 187654.169  ops/s
FramingBenchmark.framing             16           1024  thrpt    3    259000.528 ±  58471.624  ops/s
FramingBenchmark.framing             32             32  thrpt    3    593169.099 ±   4840.018  ops/s
FramingBenchmark.framing             32             64  thrpt    3    528762.400 ±  23527.622  ops/s
FramingBenchmark.framing             32            128  thrpt    3    429482.997 ±  13070.825  ops/s
FramingBenchmark.framing             32            256  thrpt    3    321971.065 ±  35385.581  ops/s
FramingBenchmark.framing             32            512  thrpt    3    214747.165 ±  34767.609  ops/s
FramingBenchmark.framing             32           1024  thrpt    3    130871.717 ±  30464.051  ops/s
FramingBenchmark.framing             64             32  thrpt    3    318087.922 ±   7819.818  ops/s
FramingBenchmark.framing             64             64  thrpt    3    259738.166 ±   9262.097  ops/s
FramingBenchmark.framing             64            128  thrpt    3    208251.362 ±   9641.613  ops/s
FramingBenchmark.framing             64            256  thrpt    3    154602.853 ±  17896.718  ops/s
FramingBenchmark.framing             64            512  thrpt    3    101678.754 ±  20105.737  ops/s
FramingBenchmark.framing             64           1024  thrpt    3     62230.188 ±  19234.156  ops/s
FramingBenchmark.framing            128             32  thrpt    3    150634.966 ±  15251.295  ops/s
FramingBenchmark.framing            128             64  thrpt    3    127661.514 ±   2498.963  ops/s
FramingBenchmark.framing            128            128  thrpt    3    105351.600 ±   6728.938  ops/s
FramingBenchmark.framing            128            256  thrpt    3     80119.663 ±  11005.101  ops/s
FramingBenchmark.framing            128            512  thrpt    3     52383.251 ±  11319.119  ops/s
FramingBenchmark.framing            128           1024  thrpt    3     28313.662 ±  11664.417  ops/s

Both (Interleaved)

Benchmark                     (framePerSeq)  (messageSize)   Mode  Cnt         Score        Error  Units
FramingBenchmark.framing_old              1             32  thrpt    3  10113843.601 ±  347860.528  ops/s
FramingBenchmark.framing_new              1             32  thrpt    3  12488386.857 ± 550524.197  ops/s
FramingBenchmark.framing_old              1             64  thrpt    3   9649511.788 ±  275242.133  ops/s
FramingBenchmark.framing_new              1             64  thrpt    3  10825562.059 ± 619829.640  ops/s
FramingBenchmark.framing_old              1            128  thrpt    3   8121220.174 ± 1320460.364  ops/s
FramingBenchmark.framing_new              1            128  thrpt    3  10298423.557 ± 379279.669  ops/s
FramingBenchmark.framing_old              1            256  thrpt    3   5466330.854 ± 3260665.704  ops/s
FramingBenchmark.framing_new              1            256  thrpt    3   7195103.283 ± 489354.505  ops/s
FramingBenchmark.framing_old              1            512  thrpt    3   2859562.317 ±  489750.599  ops/s
FramingBenchmark.framing_new              1            512  thrpt    3   5318261.366 ± 271701.067  ops/s
FramingBenchmark.framing_old              1           1024  thrpt    3   1594647.037 ±   52601.259  ops/s
FramingBenchmark.framing_new              1           1024  thrpt    3   3380494.654 ± 293146.013  ops/s
FramingBenchmark.framing_old              8             32  thrpt    3   1772199.560 ±   36471.572  ops/s
FramingBenchmark.framing_new              8             32  thrpt    3   1876127.541 ± 228271.371  ops/s
FramingBenchmark.framing_old              8             64  thrpt    3   1595775.427 ±   94933.072  ops/s
FramingBenchmark.framing_new              8             64  thrpt    3   1777053.701 ± 146526.586  ops/s
FramingBenchmark.framing_old              8            128  thrpt    3   1074911.259 ±  198661.935  ops/s
FramingBenchmark.framing_new              8            128  thrpt    3   1430280.685 ±  97618.551  ops/s
FramingBenchmark.framing_old              8            256  thrpt    3    715528.264 ±  117832.304  ops/s
FramingBenchmark.framing_new              8            256  thrpt    3   1130490.909 ± 134372.173  ops/s
FramingBenchmark.framing_old              8            512  thrpt    3    388890.655 ±   23628.881  ops/s
FramingBenchmark.framing_new              8            512  thrpt    3    784673.367 ±  42187.315  ops/s
FramingBenchmark.framing_old              8           1024  thrpt    3    218333.423 ±    3502.994  ops/s
FramingBenchmark.framing_new              8           1024  thrpt    3    496979.878 ±  65898.234  ops/s
FramingBenchmark.framing_old             16             32  thrpt    3   1073203.353 ±   56959.738  ops/s
FramingBenchmark.framing_new             16             32  thrpt    3   1085230.634 ±  80359.239  ops/s
FramingBenchmark.framing_old             16             64  thrpt    3    835697.061 ±   61190.351  ops/s
FramingBenchmark.framing_new             16             64  thrpt    3    972758.829 ±  47127.839  ops/s
FramingBenchmark.framing_old             16            128  thrpt    3    620562.797 ±    4529.555  ops/s
FramingBenchmark.framing_new             16            128  thrpt    3    794532.378 ±  35834.092  ops/s
FramingBenchmark.framing_old             16            256  thrpt    3    380776.167 ±    3069.815  ops/s
FramingBenchmark.framing_new             16            256  thrpt    3    601945.868 ± 120485.938  ops/s
FramingBenchmark.framing_old             16            512  thrpt    3    201483.021 ±   27772.140  ops/s
FramingBenchmark.framing_new             16            512  thrpt    3    414966.392 ± 187654.169  ops/s
FramingBenchmark.framing_old             16           1024  thrpt    3    110883.293 ±    2468.349  ops/s
FramingBenchmark.framing_new             16           1024  thrpt    3    259000.528 ±  58471.624  ops/s
FramingBenchmark.framing_old             32             32  thrpt    3    589338.870 ±   48664.767  ops/s
FramingBenchmark.framing_new             32             32  thrpt    3    593169.099 ±   4840.018  ops/s
FramingBenchmark.framing_old             32             64  thrpt    3    438839.627 ±   98301.907  ops/s
FramingBenchmark.framing_new             32             64  thrpt    3    528762.400 ±  23527.622  ops/s
FramingBenchmark.framing_old             32            128  thrpt    3    318200.080 ±    3745.204  ops/s
FramingBenchmark.framing_new             32            128  thrpt    3    429482.997 ±  13070.825  ops/s
FramingBenchmark.framing_old             32            256  thrpt    3    196484.642 ±    1439.287  ops/s
FramingBenchmark.framing_new             32            256  thrpt    3    321971.065 ±  35385.581  ops/s
FramingBenchmark.framing_old             32            512  thrpt    3    102559.681 ±    1066.612  ops/s
FramingBenchmark.framing_new             32            512  thrpt    3    214747.165 ±  34767.609  ops/s
FramingBenchmark.framing_old             32           1024  thrpt    3     55713.288 ±    1021.259  ops/s
FramingBenchmark.framing_new             32           1024  thrpt    3    130871.717 ±  30464.051  ops/s
FramingBenchmark.framing_old             64             32  thrpt    3    260941.068 ±   11029.238  ops/s
FramingBenchmark.framing_new             64             32  thrpt    3    318087.922 ±   7819.818  ops/s
FramingBenchmark.framing_old             64             64  thrpt    3    213252.824 ±    2763.842  ops/s
FramingBenchmark.framing_new             64             64  thrpt    3    259738.166 ±   9262.097  ops/s
FramingBenchmark.framing_old             64            128  thrpt    3    152106.933 ±    3544.177  ops/s
FramingBenchmark.framing_new             64            128  thrpt    3    208251.362 ±   9641.613  ops/s
FramingBenchmark.framing_old             64            256  thrpt    3     97187.752 ±   16306.733  ops/s
FramingBenchmark.framing_new             64            256  thrpt    3    154602.853 ±  17896.718  ops/s
FramingBenchmark.framing_old             64            512  thrpt    3     51460.170 ±     851.556  ops/s
FramingBenchmark.framing_new             64            512  thrpt    3    101678.754 ±  20105.737  ops/s
FramingBenchmark.framing_old             64           1024  thrpt    3     27853.852 ±    1002.975  ops/s
FramingBenchmark.framing_new             64           1024  thrpt    3     62230.188 ±  19234.156  ops/s
FramingBenchmark.framing_old            128             32  thrpt    3    143485.697 ±    2294.380  ops/s
FramingBenchmark.framing_new            128             32  thrpt    3    150634.966 ±  15251.295  ops/s
FramingBenchmark.framing_old            128             64  thrpt    3    108585.695 ±    1580.502  ops/s
FramingBenchmark.framing_new            128             64  thrpt    3    127661.514 ±   2498.963  ops/s
FramingBenchmark.framing_old            128            128  thrpt    3     74709.074 ±    1104.879  ops/s
FramingBenchmark.framing_new            128            128  thrpt    3    105351.600 ±   6728.938  ops/s
FramingBenchmark.framing_old            128            256  thrpt    3     49446.714 ±    3098.863  ops/s
FramingBenchmark.framing_new            128            256  thrpt    3     80119.663 ±  11005.101  ops/s
FramingBenchmark.framing_old            128            512  thrpt    3     25852.970 ±    2643.999  ops/s
FramingBenchmark.framing_new            128            512  thrpt    3     52383.251 ±  11319.119  ops/s
FramingBenchmark.framing_old            128           1024  thrpt    3     13979.600 ±     221.422  ops/s
FramingBenchmark.framing_new            128           1024  thrpt    3     28313.662 ±  11664.417  ops/s

The byte searching can do with SIMD too, but I lack of time to do this:(

@Roiocam @jxnu-liguobin @jrudolph Would you like to get a look into this?

I think we can delegate the indexOf[B >: Byte](elem: B, from: Int): Int to indexOf(elem: Byte, from: Int): Int with Byte.unbox, wdyt, the reduce the duplicated code. @JD557

Unfortunately, I don't think that would work, as the signature requires [B >: Byte]. B could be Any and in that case we need the slow implementation that falls back to Object.equals 😕
Code example:
case class MyByteSeq(data: List[Byte]) {
  def fastIndexOf(byte: Byte): Int = data.indexOf(byte)
  //def indexOf1[B >: Byte](x: B): Int = fastIndexOf(Byte.unbox(x)) // This won't compile
  def indexOf2[B >: Byte](x: B): Int = fastIndexOf(Byte.unbox(x.asInstanceOf[Object])) // This can fail at runtime
  def indexOf3[B >: Byte](x: B): Int = x match {
    case b: Byte => fastIndexOf(b) // I think the pattern match already unboxes it
    case _ => ??? // I can't call fastIndexOf here, so I need a duplicated version of the code anyway
  }
}

THANKS, But I checked the bytecode, it was Java.lang.Objrct, not sure why that would   fail at Runtime.

@JD557 do you have any further improvement on this pr , I would like to merge this and improvement can come up later.

@JD557 do you have any further improvement on this pr ?I would like to merge this and improvement can come up later.

Not really, feel free to merge this and improve later

That still feels like a footgun, since it is quite unclear in which situations the new overload will be selected? Should we document in which case the static overload resolution will choose the new method?

I don't have any strong feelings about the naming. I used this scheme because it's the same that's used by ByteIterator (See: https://github.com/apache/pekko/blob/3cd08016b57e95f9244f0990282dd956c173b82e/actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala#L498-L502).
If we change the method here (e.g. to indexOfByte, like in 18c5db1), then I think it should also be changed in ByteIterator.
However, on that note:

Is it somehow possible to avoid the massive code duplication here (probably hard since the whole existing scheme is built around the function of Any.==)? If not it should be documented.

Looks like ByteIterator avoids the duplication by delegating the comparison to indexWhere. Not sure if the lambda could have a performance impact, though. I would need to benchmark this again.

@JD557 I think we can delegate the current version to the specialized version, even it can happen in type theory but will not happen in real use case if user don't try to do strange thing.

So, I was doing some more tests with a specialized version of indexWhere, but that's noticeably slower (even though it's faster than ByteIterator#indexWhere). So I don't see many ways to reduce the duplication.
As such, I'm not sure how to proceed with this PR:

Should I introduce a specialized indexWhere anyway, leading to code multiplication?
Do I keep the indexOf name (like the ByteIterator does) or do I name it something else?

@JD557 I think if you want to change the method name, you can using the name of firstIndexOf.
And for the api, because it's using the scala collection's indexOf，so the input B where is actually a Byte, but now can be a any.
As for selection, I think the compiler will choose this new method when it know the elem for testing is a type Byte but will not when It doesn't.
As for the old index Of, which will always return -1 us the elem is not a Number/can boxed to Byte, so a quick check and delegate to the specified one will not harm too much. Who will using a ByteString to indexOf a any?

In BoxedRuntime.java
    public static byte unboxToByte(Object b) {
        return b == null ? 0 : ((java.lang.Byte)b).byteValue();
    }

    public static java.lang.Byte boxToByte(byte b) {
        return java.lang.Byte.valueOf(b);
    }

In Byte.java
    public boolean equals(Object obj) {
        if (obj instanceof Byte) {
            return value == ((Byte)obj).byteValue();
        }
        return false;
    }

I don't think that BoxesRunTime trick is enough, unfortunately.
Say one asks ByteString.indexOf(500). This should obviously return -1, as it is impossible for a byte to have that value.
However BoxesRunTime.toByte(500) returns -12: Byte.
Ideally we would check if the number is between Byte.MinValue and Byte.MaxValue before boxing, but even that is not enough, due to floating point values (BoxesRunTime.toByte(127.9) == 127.toByte == 127.0).
Although I imagine most problems would come from Int and Char.

Another thing is , when we using code like indexOf(a, 0) the new method will not be selected too :(

As for selection, I think the compiler will choose this new method when it know the elem for testing is a type Byte but will not when It doesn't.

Probably, yes. If the general overload would not exist, the new one would also work for literals like 12 or 'a'. So, maybe it's really the best we can do right now? With this solution it will at least choose the faster version whenever the user is explicitly looking for a byte.

@JD557 need another update to make mima happy

I can try to fix it, but out of curiosity, isn't it OK to have MiMa issues, since this only targets 1.1.x?
I was ignoring the issue because I thought 1.1.0 was going to break bincompat with 1.0.x anyway

I can try to fix it, but out of curiosity, isn't it OK to have MiMa issues, since this only targets 1.1.x?

Pekko core follows SemVer, so the only acceptable MiMa issues are for internal code (i.e. @InternalApi) or with false positives

I was ignoring the issue because I thought 1.1.0 was going to break bincompat with 1.0.x anyway

No it doesn't.

OK, I think the MiMA issues should be fixed now.

@jrudolph do you still think this PR change needs more work?

@sirthias Would you like to give some input about this too？

The only comment I have is that there would be a potentially much more efficient implementation of indexOf(elem: Byte, from: Int) if we somehow had low-level (unsafe) access to the byte array and could read 8 bytes at once into a long.
Then we could use SWAR (SIMD within a register) and reduce the loop count by 8 (asymptotically) over the current implementation.
Doesn't pekko already have an Unsafe access construct somewhere?
IIRC Akka did...

Yes, there is a (much more complicated) SWAR loop implemented in borer's JSON parser.
Here we only have to look for a single known byte rather than a whole set of different characters and we also don't have to copy segments and do UTF8 decoding at the same time.
But the whole thing only makes sense if we can really get down to raw byte access via Unsafe or more modern means. And on ScalaJS a SWAR approach will just create overhead and be a lot slower than the simple loop.

@He-Pin @mdedetrich @Roiocam @samueleresca @raboof @jxnu-liguobin should we get this sorted out before 1.1.0-M1 RC or should we look at this again after the 1.1.0-M1 release?

Sorry for now response, holidays here. I think we can including this in m1 and try with SWAR after that.

Merged - thanks @JD557