chore: move from jest to vitest

Vitest spike
Reason for my wanting to spike was through frustration at having to polyfill to fix tests broken by an MSW update, only for that polyfill to break a load of other tests.
Description
Music year: 1962

List of changes

Issue(s)
Fixes #
How to test

Go to {owa_deployment_url}
Click on ______
You should see ______

Screenshots
How it used to look (delete if n/a):
{screenshots}
How it should now look:
{screenshots}
Checklist

[ ] Added or updated tests where appropriate
[ ] Manually tested across browsers / devices
[ ] Considered impact on accessibility
[ ] Design sign-off
[ ] Approved by product owner
[ ] Does this PR update a package with a breaking change

I think this is well worth it. Vitest is faster and seems to be better maintained than Jest. I think it handles concurrency slightly differently so I think this would be another thing to look out for - specifically where beforeAll etc has not been used for the setup and tear down

Closing as it didn't get the traction required


ci: add arch

I just fixed the ubuntu failure, please rebase on that. May also help you here - and it looks like you don't have a dbus-daemon running. See the ubuntu commands, we start it manually there too.


IfTag should support filters, same as ForTag does

IfTag should support filters so we can do things like {% if name|contains:"Bar" %}
I wonder if there is a way we could just generally support filters in all nodes, instead of raw variables, thus avoiding having to add this at each node level?

I agree and something I've wanted to implement for 1.0. It's pretty simple to support filters in most cases.
Pretty much all you need to do is the following:
let filter = try parser.compileFilter(variable)

Then you have a Resolvable type that you can resolve just like variables.
This is one of the reasons that I deprecated supporting spaces in filters in the previous release as this would add a lot of complexity to knowing the difference between a filter and an if expression components in the parser, especially while keeping the two components separated in the code base. I don't want spaces to only be supported in some places as it leads to confusing behaviours for template authors based on the context.

Awesome, thanks! :)


Chat Session Visibility

Context
Initial PR from @philipperolet was here: https://github.com/dust-tt/dust/compare/chat-session-visibility?expand=1
I decided to restart from scratch because:

We wanted a toggle over a button to choose the visibility (private / workspace).
The API in the initial PR was introducing a new route /w/[wId]/use/chats/[cId]/shared while I assumed we could simply patch /w/[wId]/use/chats/[cId].
The initial PR was also introducing a refactoring of the header which was more complex & that can still be owner by @philipperolet.
PR had a lot of commits including multiple "Merge branch 'main' into chat-shareable-conversations", which is something I never succeed to work with as rebases are a nightmare.

On this PR

[x] Add a new field visibility to ChatSession, default to "private".
[x] Route /w/[wId]/use/chats/[cId] can be patched to change the visibility
[x] Route /w/[wId]/use/chats/[cId] can be get to get the detail of a ChatSession.
[x] In the Chat App, we get the ChatSession not from getServerSideProps but from a useChatSession that allow mutation.

If PR is approved, I'll make a sparkle component of the toggle field.

Next immediate PRs

[ ] Make a sparkle component of the toggle field.
[ ] Add an icon to copy the link to the session (not a button, discussed with Gab)
[ ] Give access to "workspace chat sessions "following the designs in Figma.

@spolu This is what it looks like when cropped, WDYT?

Eventually we want to replace the toggle "private / workspace" by icons that would be self-explanatory.
I experimented with LockClosed and LockOpen but it could give the impression of "conversation locked for new messages", and another with 'User Users` (from heroicons) but wasn't cristal clear either.  Waiting for Ed's reco when he is back, in the meantime I think this one is good but let me know if you think it needs immediate rework!

Let’s use 1 person / multiple people as icons which might not be perfect but let’s do it on mobile only so that we don’t give up on responsiveness?

 On Small screeen (code is on this PR https://github.com/dust-tt/dust/pull/1055/files, I got lazy to do in this one and rebase the other 🙈. Both will be shipped at the same time)


qemu/qmp: implement function to hotplug vsock-pci

Implement function to hotplug vsocks,	vsocks are needed
to communicate processes are running inside the VM
with processes are running on the host.
Signed-off-by: Julio Montes<EMAIL_ADDRESS>

@devimc Looks okay to me, but could you add a body to your commit message?

@markdryan changes applied, thanks

Coverage increased (+0.2%) to 75.55% when pulling 203bebefe7abd7f777a183c9171393cb8a372c7b on devimc:topic/vsockHotplug into ff2401825e0930811919c86c36d64b113aa00083 on intel:master.

@sboeuf change applied, thanks


Wait queue size for rpc requests was made optional

Maybe just use the Option for the second semaphore? @bobs4462


Contributed webview context menu actions

Feature request
Allow extensions to contribute to the context menu in a webview
(From FB meeting)

+1

+1

Any update on this issue? It's been on the backlog for quite a while now.

My idea is adding an API that wraps Electron's Menu.popup and opens a context menu at the specified position to vscode.window.
  const template = [
    {
      label: 'Menu Item 1',
      click: () => { console.log('click') }
    },
    { type: 'separator' },
    { label: 'Menu Item 2', type: 'checkbox', checked: true }
  ]
  vscode.window.openContextMenu(position, template)

When you want to open a custom context menu instead of the default one, you colud preventDefault contextmenu event and use vscode.window.openContextMenu instead.

Would love to get some updates on this as well. Thanks!

Some of the duplicate issues listed above refer to custom editors. This issue seems to be limited to web views. It would be helpful to either include custom editors in the title here.
I would argue that the custom view/editor support in the extension API is incomplete without context menu support. The default context menu with Copy, Cut, and Paste may not make sense for a custom interface (not to mention appears not to work - I can provide details if needed). VS Code is too mature IMO to have this functionality omitted at this point.

Does this work and if so how? I can't seem to find any documentation for it. If i've contributed my own webview to the debug context for instance, how do I provide a context menu for that web view?

Another vote for this.
Right now I'm using CSS/Javascript to create a context menu, but the context menu can't leave the webview render space, so in small windows the context menu is rather limited.

I would really love to have this as well -- even if menus were a part of the https://github.com/microsoft/vscode-webview-ui-toolkit (/cc @daviddossett @hawkticehurst) that would only help for custom menus, and as other have mentioned we'd still be bound to the webview box as well, which is certainly not ideal.
@mjbvz is something like this in the cards?

@eamodio FYI we're tracking that here but would also prefer this to come from core.

@daviddossett definitely, I don't think effort in the webview toolkit would be worth it, and then you'd be stuck with an inferior version of the menu when this does happen.

Here is another vote for having this feature supported natively.

FYI, I've started a draft PR to get this working -- would love feedback: https://github.com/microsoft/vscode/pull/154524#issuecomment-1179155555

Reopening to track finalizing

We held off on finalizing this last iteration so that we could think about how extensions could pass data to contributed webview context menu commands. A motivating use case: passing the value of a text input back to an extension
I considered two approaches to this:
data-vscode-context-arg
The first option would use an additional data attribute (such as data-vscode-context-arg) to pass along arguments:

If the user right clicks on the inner div, any context menu commands would be passed ["custom", "data", 123] as the first argument.
This has the benifit of working even if scripts are disabled.
The downside is that extensions have to mutate the dom to pass along dynamic data. You could either do this eagerly (such as updating data-vscode-arg when the user types in an input box), or try to do the dom mutation dynamically on the contextmenu event
Modify the context menu event
The second option is to allow extensions to pass data back on the contextmenu event itself:
el.addEventListener('contextmenu', e => {
    // Use a custom symbol to store the new property
    e[vscode.contextMenuArgSymbol] = ["custom", "data", 123];

   // This custom data can then be read by VS Code
});

This upside to this is that it's clearer that the data is only needed when the event is fired. It also get around some somewhat tricky questions about how data-vscode-context-arg would propagate in the dom (do child nodes inherit the value of their parent? Do we merge it like we do with data-vscode-context?)
The downside is that it requires scripts to be enabled

For either case, I'm now confident we could add this functionality after finalizing the current api. We should be good to finalize the api as it stands this iteration

@mjbvz When building this I had a very similar thought to data-vscode-context-arg (I called it data-vscode-context-menu-value in some initial prototypes), but I ultimately left it out, because while it would semantically separate the context from callback specific data, it didn't feel like it was needed -- since we were already providing the context to the callback (which is important).
Given that, I definitely like your 2nd proposal to allow custom args to be added into the context menu event as that feels different and provides an alternative method that isn't possible with the DOM attr approach. But also agree that this type of added functionality could be layered on top of the existing proposal.

🎉 Woo! Thanks @mjbvz!


Minor behavior difference with python/libev version : getopt

Python/libev version uses getopt to parse command line argument, which behaves differently with go's flag package.
https://github.com/shadowsocks/shadowsocks/blob/master/shadowsocks/shell.py#L144
https://github.com/shadowsocks/shadowsocks-libev/blob/master/src/server.c#L1458
http://stackoverflow.com/questions/1714236/getopt-like-behavior-in-go

Not a bug.


How to skip mutators

You can manually edit $model->attributes array.
By the way this is wrong place to ask help questions.


on slow networks, open http give TimeoutError, and unable to extend it

With a big file and a slow connection, open raise a TimeoutError (5 minutes):
import fsspec
path = "filecache::https://osmdata.openstreetmap.de/download/land-polygons-split-4326.zip"
with fsspec.open(path) as f:
    pass

Traceback

TimeoutError                              Traceback (most recent call last)
<ipython-input-79-92cb3b96a922> in <module>
      1 import fsspec
      2 path = "filecache::https://osmdata.openstreetmap.de/download/land-polygons-split-4326.zip"
----> 3 with fsspec.open(path) as f:
      4     pass

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/core.py in __enter__(self)
    100         mode = self.mode.replace("t", "").replace("b", "") + "b"
    101
--> 102         f = self.fs.open(self.path, mode=mode)
    103
    104         self.fobjects = [f]

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/implementations/cached.py in <lambda>(*args, **kw)
    389             # all the methods defined in this class. Note `open` here, since
    390             # it calls `_open`, but is actually in superclass
--> 391             return lambda *args, **kw: getattr(type(self), item).__get__(self)(
    392                 *args, **kw
    393             )

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/spec.py in open(self, path, mode, block_size, cache_options, **kwargs)
    938         else:
    939             ac = kwargs.pop("autocommit", not self._intrans)
--> 940             f = self._open(
    941                 path,
    942                 mode=mode,

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/implementations/cached.py in <lambda>(*args, **kw)
    389             # all the methods defined in this class. Note `open` here, since
    390             # it calls `_open`, but is actually in superclass
--> 391             return lambda *args, **kw: getattr(type(self), item).__get__(self)(
    392                 *args, **kw
    393             )

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/implementations/cached.py in _open(self, path, mode, **kwargs)
    603                     f2.write(data)
    604         else:
--> 605             self.fs.get(path, fn)
    606         self.save_cache()
    607         return self._open(path, mode)

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/asyn.py in wrapper(*args, **kwargs)
     70     def wrapper(*args, **kwargs):
     71         self = obj or args[0]
---> 72         return sync(self.loop, func, *args, **kwargs)
     73
     74     return wrapper

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/asyn.py in sync(loop, func, timeout, *args, **kwargs)
     51     event.wait(timeout)
     52     if isinstance(result[0], BaseException):
---> 53         raise result[0]
     54     return result[0]
     55

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/asyn.py in _runner(event, coro, result, timeout)
     18         coro = asyncio.wait_for(coro, timeout=timeout)
     19     try:
---> 20         result[0] = await coro
     21     except Exception as ex:
     22         result[0] = ex

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/asyn.py in _get(self, rpath, lpath, recursive, **kwargs)
    230         lpaths = other_paths(rpaths, lpath)
    231         [os.makedirs(os.path.dirname(lp), exist_ok=True) for lp in lpaths]
--> 232         return await asyncio.gather(
    233             *[
    234                 self._get_file(rpath, lpath, **kwargs)

~/anaconda3/envs/xsar/lib/python3.9/site-packages/fsspec/implementations/http.py in _get_file(self, rpath, lpath, chunk_size, **kwargs)
    191                 chunk = True
    192                 while chunk:
--> 193                     chunk = await r.content.read(chunk_size)
    194                     fd.write(chunk)
    195

~/anaconda3/envs/xsar/lib/python3.9/site-packages/aiohttp/streams.py in read(self, n)
    378         # without feeding any data
    379         while not self._buffer and not self._eof:
--> 380             await self._wait("read")
    381
    382         return self._read_nowait(n)

~/anaconda3/envs/xsar/lib/python3.9/site-packages/aiohttp/streams.py in _wait(self, func_name)
    304             if self._timer:
    305                 with self._timer:
--> 306                     await waiter
    307             else:
    308                 await waiter

~/anaconda3/envs/xsar/lib/python3.9/site-packages/aiohttp/helpers.py in __exit__(self, exc_type, exc_val, exc_tb)
    654
    655         if exc_type is asyncio.CancelledError and self._cancelled:
--> 656             raise asyncio.TimeoutError from None
    657         return None
    658

TimeoutError:

From the traceback, asyncio.TimeoutError is raised from aiohttp.
From help(fsspec.implementations.http.HTTPFileSystem), I've seen that client_kwargs is passed to aiohttp.ClientSession and it as a timeout option.
So I've tried:
import geopandas as gpd
with fsspec.open('filecache::https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_land.zip',
                  http={'client_kwargs': {'timeout' :aiohttp.ClientTimeout(total=1)}}) as f:
    gpd.read_file(f)

But the timeout is not changed (I've put a very short timeout)
However, I was able to change the timeout with this code:
with fsspec.filesystem('http', client_kwargs={'timeout' :aiohttp.ClientTimeout(total=1)}).open('https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_land.zip') as f:
    gdf=gpd.read_file(f)

So how can I change the http timeout with `fsspec.open('filecache::https://....') ?

The matching of kwargs sets to filesystem backend is done by the protocol used in the URL. So, I think the only change you need here is
https={'client_kwargs': ...}

within open.

So I had to just replace http with 'https`.
Following code works as expected:
import geopandas as gpd
import fsspec
import aiohttp
with fsspec.open('filecache::https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_land.zip',
                  https={'client_kwargs': {'timeout' :aiohttp.ClientTimeout(total=1)}}) as f:
    gdf=gpd.read_file(f)

thx


enhancement: improve NestJs support

Currently, when creating a new Prici SDK instance in a NestJs app the app does not know about
the SDK instance in any way. This means that the SDK does not work in tandem with the Nest runtime.
By abstracting the SDK instance in a custom module, the following could be achieved:

A simpler interface to work with.
Less setup work.
Less boilerplate code.
Adding support for projects that use @nestjs/config
and possibly other Nest related packages in the future.
Passing default config options when instantiating
the SDK in a central place and then using them all over the app.

Basically you want the SDK to be an injectable? and to have the guard as "given"?
sounds great. go for it !  🚀

You are correct about the SDK being injectable. Not sure about what you meant by "given"
but basically, the SDK will be instantiated in a service that the new module will export
and I will add an optional  defaultErrorMessage property to PriciSDKOptions (for cases
where the user wants one default message for all routes that is not "payment required").
With these 2 changes, the guard doesn't have any required options anymore and can be
reduced to:
@UseGuards(IsAllowedGuard())

P.S I was able to implement the guard in a slightly different way that doesn't require
invoking it with the new keyword


Paste dirty string to dropdown column

How to reproduce:

Go to https://bossanova.uk/jexcel/v4/examples/date-and-datetime-picker
Copy to clipboard some random string, like "Test test test"
Paste it to cell B1 (Region dropdown). Cell looks empty. It is ok.
In browser console exec: document.getElementById('spreadsheet').jexcel.getData();
Result is:

0: Array(3) [ "Flag Fen", "Test test test", "2020-04-19" ]
1: Array(3) [ "Bristol Aero Collection (BAC)", "South West", "2019-04-03" ]
...

Table don't show me unexpected value, but may send it to server.
What I expect? - Empty value will be ok, I think.
Screenshot attached.
I see the same thing on calendar type with any format settings.
How do you recommend to bypass this trouble?

The same issue also exist on other restricted column types such as calendar and numeric.

Have a big impact when ms excel to jexcel multicolumn and multiline block copy-paste.
Result on screen looks ok but server validation fails "somewhere".

For now, the event onbeforechange or onbeforepaste might help. I am going to keep it open for potential improvements in future versions.


[REVIEW]

customize Flutter UI Package
https://github.com/Aniketkhote/customize

Some thoughts:

add some content to the https://github.com/Aniketkhote/customize/blob/main/CONTRIBUTING.md
maybe use conventional commit messages

I would love to give some suggestions on your project :

Add code of conduct and pull request template to the project
Add actions to your project
Increase the size of the heading in the readme.md

thnx for the suggestions, I'll make changes.

@Aniketkhote did you want to mean to close the issue? We can review it on a live stream


[BUG]🐛 send photo by URL throws an error.

Steps to Reproduce
the same as README example, but send_photo
Expected behaviour
sendPhoto API method should support both InputFile and String, as per documentation

Actual behaviour
but it throws an error because auto generated type expects InputFile only
Operating System
Windows
Version of Rust, Ferrisgram & dependencies
latest

Relevant log output
No response
Additional Context

Hello, since the library is yet under construction. Working of the methods related to InputFile are yet to be determined. We will let this issue opened until we fix it.
Thanks

Hey @7flash! would you like to join us and become a maintainer of the project?

Hey @7flash! would you like to join us and become a maintainer of the project?

Thanks for invitation! Send me a message in telegram @berliangur

Hey @7flash! would you like to join us and become a maintainer of the project?

Thanks for invitation! Send me a message in telegram @berliangur

Hello! I've sent you a message on telegram through t.me/CaptainPicard

This has been fixed.


Pull requests need to be up to date with master?

At the moment we are able to merge a PR if it has no merge conflicts with the master branch.
The problem with this is that we run the tests on code that isn't actually what ends up master. Hence the PR tests could pass but master could fail.
We had a recent example of this when the unit tests became too long for Travis and this wasn't spotted before it took down master.
I wonder: Is it possible to get Travis to merge from master then run the tests? This would mean that what you see when you look at the results of tests is what you get.

OK I have added some checks to master branch. To view them look here.
https://github.com/GPflow/GPflow/settings/branches/master

Looks good, let's tick that 'include administrators' box too.
On 12 April 2016 at 13:41, Alexander G. de G. Matthews <
<EMAIL_ADDRESS>wrote:

OK I have added some checks to master branch. To view them look here.
https://github.com/GPflow/GPflow/settings/branches/master
—
You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub
https://github.com/GPflow/GPflow/issues/32#issuecomment-208884971

It looks as though it is still possible to merge even if there are commits on master that aren't on the PR as long as there are no merge conflicts. So we still haven't quite got the behaviour we want.

Hmmn, I guess it's an unusual case that an automatic merge could take two
branches which both pass and create one that fails. That's what happened to
us, but only because of the increased build time. Perhaps we should't worry
about it unless it becomes a recurring problem.
On 12 April 2016 at 18:03, Alexander G. de G. Matthews <
<EMAIL_ADDRESS>wrote:

It looks as though it is still possible to merge even if there are commits
on master that aren't on the PR as long as there are no merge conflicts. So
we still haven't quite got the behaviour we want.
—
You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub
https://github.com/GPflow/GPflow/issues/32#issuecomment-209008558

I guess but we're still quite close the timeout threshold. Let's see what happens.


[Bug]: Cannot rename entities?

What happened?
This is working pretty well overall.  However, I renamed my entity_ids to be human readable.  Things were fine for a while, but then I noticed all my entities were unavailable.  When I checked the integration, my renamed entities were unavailable but the original entities were back.  So it seems it does not honor entity id changes for some reason.
Version
0.0.11
What device are you seeing the problem on?
EB3A
What bluetooth connection are you using?
ESPHome bluetooth proxy
Have you changed the integration settings?
Yes (Please write down the changed settings in the next step)
Integration settings (if you changed them)
Polling interval changed to 45 seconds.

Relevant log output
No response

Could you try beta version 0.0.17? I couldn't reproduce this behavior

Hrm, I thought I would be able to reproduce it.  It definitely happened before, but I renamed one entity I'm not referencing (DC Input Power) and rebooted, and could not get it to happen.
So I updated to your 0.0.17 and also tried 0.0.19 and in both cases the integration no longer functions for me.  I am working again by reinstalling the 0.0.11.  Relevant logs from 0.0.19:

Platform bluetti_bt does not generate unique IDs. ID bluetti_eb3a2334000902890_ac_output already exists - ignoring binary_sensor.bluetti_eb3a2334000902890_ac_output
Platform bluetti_bt does not generate unique IDs. ID bluetti_eb3a2334000902890_dc_output already exists - ignoring binary_sensor.bluetti_eb3a2334000902890_dc_output

Unexpected error fetching Bluetti polling coordinator data: argument of type 'int' is not iterable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/coordinator.py", line 70, in _async_update_data
    return await self.reader.read_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/bluetooth/device_reader.py", line 105, in read_data
    self.bluetti_device.build_setter_command(
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/base_devices/BluettiDevice.py", line 55, in build_setter_command
    device_field = next(
                   ^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/base_devices/BluettiDevice.py", line 56, in <genexpr>
    f for f in matches if any(f.address in r for r in self.writable_ranges)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/base_devices/BluettiDevice.py", line 56, in <genexpr>
    f for f in matches if any(f.address in r for r in self.writable_ranges)
                              ^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

Data from coordinator is None. Skipping update for bluettXXXXXXXXXXeb3a2334000902890_total_battery_percent
Data from coordinator is None. Skipping update for bluettXXXXXXXXXXeb3a2334000902890_total_battery_voltage
Data from coordinator is None. Skipping update for bluettXXXXXXXXXXeb3a2334000902890_ac_input_voltage
Data from coordinator is None. Skipping update for bluettXXXXXXXXXXeb3a2334000902890_internal_dc_input_voltage
Data from coordinator is None. Skipping update for bluettXXXXXXXXXXeb3a2334000902890_led_mode


Wait for lock expiration in the restore crash tests

since we crash the replica that initiated the restore it's backupstore
lock will still be present, so we need to wait till the lock is expired,
before we can delete the backups.
longhorn/longhorn#612
Signed-off-by: Joshua Moody<EMAIL_ADDRESS>

Just to understand, now we have a lock mechanism and while restoring a backup it can't be deleted.
Currently, the expiration time is 150 secs for a lock but going forward we'll delete the locks which are not required because of the crashing of replica etc.
Will this deletion of locks be part of the feature?

Just to understand, now we have a lock mechanism and while restoring a backup it can't be deleted.

The lock mechanism works like this, once a lock is acquired there is a refresh routine that refreshes the lock every 60s, a locks duration is 150s (2 minutes 30s) which means that if one refresh fails we still have another try.
The tradeoffs are

The longer the lock duration the longer a crashed operation is still presumed to be active.
The lower the lock duration the more writes a needed to keep a lock active.

So we decided for a refresh interval of 1 minute, to have a second chance in case a refresh fails we used a lock duration of 2 minutes and 30s.

Currently, the expiration time is 150 secs for a lock but going forward we'll delete the locks which are not required because of the crashing of replica etc.
Will this deletion of locks be part of the feature?

We will not delete a lock of a failed operation, it will remain on the backupstore indefinitely till the volume gets deleted.
In the future we could add the ability to cleanup expired locks after a certain time, we could do this as part of a backup delete operation. Please create a separate issue for this.
For the longhorn-tests code you can refactor the wait for lock expiration code to deleting the locks from the backupstore.
Since we know that the lock is no longer in use and the reason why it has not been cleaned up.


Introducing error code 501 "Not Implemented"

This PR is related to #81 and align to PR #104 reformatting errors according to the guidelines.

Thanks @jlurien for the first review. Guess this PR is an easy one. Waiting for one additional review/approval.


permission_unknown error

Hi,
I followed the steps given in  authenticate.rb (https://github.com/pengwynn/linkedin/blob/master/examples/authenticate.rb)
At the line client.authorize_from_request(rtoken, rsecret, pin) which for me is
client.authorize_from_request(rtoken, rsecret, 13404)
I am getting the following error:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/oauth-0.4.6/lib/oauth/consumer.rb:178:in re quest': permission_unknown (OAuth::Problem)         from C:/Ruby193/lib/ruby/gems/1.9.1/gems/oauth-0.4.6/lib/oauth/consumer. rb:194:in token_request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/oauth-0.4.6/lib/oauth/tokens/re
quest_token.rb:18:in get_access_token'         from C:/Ruby193/lib/ruby/gems/1.9.1/gems/linkedin-0.3.7/lib/linked_in/he lpers/authorization.rb:29:in authorize_from_request'
How do I resolve this?
Thanks
Mahboob

For reference:
1- Generate API Key (consumer API) and consumer secret from the website.
2- Generate request_token and URL for authorization
client = LinkedIn::Client.new(<consumer_api>, <consumer_secret>)
request_token = client.request_token({}, :scope => "r_fullprofile")
rtoken = request_token.token
rsecret = request_token.secret
request_token = client.request_token({}, :scope => "r_fullprofile")
puts rtoken
puts rsecret
puts request_token.authorize_url
#=> 54--5738......484
#=> 66-87237.....233
#=> https://api.linkedin.com/uas/oauth/authorize?oauth_token=<generated_token>

Do not call the above code again or it will generate a new token. Record the rtoken and rsecret values
3- Visit the generated URL to grant permission
4- Fetch the access keys
client = LinkedIn::Client.new(<consumer_api>, <consumer_secret>)
puts client.authorize_from_request(rtoken, rsecret, pin)
#=> ["176658....", "167857..."]

Record the access keys
5- Use the access keys from now on
client = LinkedIn::Client.new(<consumer_api>, <consumer_secret>)
client.authorize_from_access("176658....", "167857...")

client.profile
#...


Actually update payment info

Realized that this was only half done! Was fun to clean up with our new stuff, tho!

I think the failure's due to Travis encrypting differently :/ Any ideas? Comment those tests out on Linux?

I think the failure's due to Travis encrypting differently :/ Any ideas? Comment those tests out on Linux?

yeah I been wrapping all tests with #if !os(Linux) for anything snapshotting encrypted values :/


Add ability to specify arbitrary short report data for observable

Request Type
Feature Request
Work Environment

Question
Answer

OS version (server)
RedHat,

OS version (client)
Ubuntu,

Problem Description
It would be very helpful if it would be possible to add a short analyzer report to the observable via API without running an analyzer on cortex.
Simply to specify json or a string that should be displayed as a report for observable - just like a tag.
The advantage over tags would be that reports are color marked based on severity or findings.
Thanks to that custom enrichers that do not have to rely on cortex could be incorporated into TheHive environment.
Possible Solutions
report = { title: report_title, score: value, designation: malicious / suspicious / benign }
api.observable.add_report(observable_id, report)
Complementary information
I've wrote a lot of enrichers that do not rely on cortex (contenerized scripts) and I realy think it would be beneficial to allow for a custom reports for observables.

the reports attribute is dedicated to results from Cortex. It's not a good idea to introduce custom label in it. We wanted to keep it dedicated to Cortex analysis results.


Support custom validators

Right now, unrecognized types are mapped to a custom click.ParamType instance, which uses TypeAdapter(field.annotation).validate_json() to convert the raw argument from the command-line into a Python object. Would be nice to allow user to provide custom logic for this.
E.g:
@from_pydantic(..., validators={"foo.bar": lambda x: map(int, x.split(",")})
def cli():
  pass

would transform --foo-bar "1,2,3" into [1, 2, 3].

Can be done with Pydantic only, I leave what I've tried here for the record:
import click
from pydantic import BaseModel
from typing_extensions import Annotated
from typing import List, Callable, Any, Type
from dataclasses import dataclass
from pydantic_core import CoreSchema, core_schema
from pydantic import GetCoreSchemaHandler

from pydanclick import from_pydantic

@dataclass
class CustomValidator:

    func: Callable[[Any], Any]
    return_type: Type

    def __get_pydantic_core_schema__(self, source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema:
        """Gets the Pydantic core schema.

        Args:
            source_type: The source type.
            handler: The `GetCoreSchemaHandler` instance.

        Returns:
            The Pydantic core schema.
        """
        return core_schema.no_info_before_validator_function(
            self.func, handler(self.return_type)
        )

class CustomModel(BaseModel):

    values: Annotated[str, CustomValidator(lambda x: map(int, x.split(",")), return_type=List[int])]

@click.command()
@from_pydantic(CustomModel)
def test(custom_model: CustomModel):
    click.echo(custom_model.model_dump_json(indent=2))

if __name__ == "__main__":
    test()

I created a draft pull request here, would be curious to have your thoughts on it


Exported SVG is too large.

The size of the SVG got large due to unwanted font-face data included in the SVG file. So we need only the Fonts-face data that is used for the currently export SVG file.
After removing the unwanted fonts the size SVG got decreased.

The files having the same code text with 2x size are in the following zip file.
Archive.zip
Description
components/Editor.js

Initialized fontFamily to store the current font-family chosen by the user
Used replace with regex to remove the unwanted font-face data from the file.
.all-contributorsrc
Added my GitHub details

HOPE THIS DESCRIPTION HELPS

I have updated the regex having s?, by removing it. Have tested the SVG download and works fine

Thanks @Joel-hanson 🙏

Thanks a lot @mfix22 for the last changes and for merging my pull request.

I really appreciate people going and adding optimizations to Carbon like this! If you have other ideas, feel free to post them in the issues!


DBZ-6163 Properly handle zoned timestamp within PostgreSQL

https://issues.redhat.com/browse/DBZ-6163

@Naros Applied, thanks


Add support for bastion-based connections

There are cases where the connection to a remote host must be established via a bastion.  We could add support for this in the remote.Connection args.

That's pretty much needed

Another plus 1 for this, my existing code using the paramiko-based provider in Python uses the 'gateway' parameter to proxy SSH connections.

Absolutely, this should be highest priority in my opinion.

+1

This is a duplicate of #131 and was implemented by #269.


compiling /dlib/dlib/cmake_utils/test_for_cuda/ ends in "std" has no member "__builtin_fpclassify"

Expected Behavior

Compiling the test for cuda
Current Behavior

It's missing somehow the std.
If I modify/comment the line
/optimization_line_search.h(215): error: namespace "std" has no member "__builtin_fpclassify"
the next error is
dlib/dlib/cmake_utils/test_for_cuda/../../dnn/../matrix/../serialize.h(1549): error: namespace "std" has no member "to_string"
Steps to Reproduce

nanu@xyW-R:~/src$ git clone https://github.com/davisking/dlib.git
Klone nach 'dlib' ...
remote: Counting objects: 42599, done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 42599 (delta 43), reused 41 (delta 24), pack-reused 42530
Empfange Objekte: 100% (42599/42599), 17.12 MiB | 3.33 MiB/s, Fertig.
Löse Unterschiede auf: 100% (29792/29792), Fertig.
nanu@xyW-R:~/src$ mkdir testcuda
nanu@xyW-R:~/src$ cd testcuda/
nanu@xyW-R:~/src/testcuda$ cmake ../dlib/
appveyor.yml       dlib/              examples/          .gitignore         .hgtags            MANIFEST.in        README.md          tools/
CMakeLists.txt     docs/              .git/              .hgignore          ISSUE_TEMPLATE.md  python_examples/   setup.py           .travis.yml
nanu@xyW-R:~/src/testcuda$ cmake ../dlib/dlib/cmake_utils/test_for_cuda/
CMakeLists.txt  cuda_test.cu
nanu@xyW-R:~/src/testcuda$ cmake ../dlib/dlib/cmake_utils/test_for_cuda/
-- The C compiler identification is GNU 5.4.1
-- The CXX compiler identification is GNU 5.4.1
-- Check for working C compiler: /usr/bin/gcc-5
-- Check for working C compiler: /usr/bin/gcc-5 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++-5
-- Check for working CXX compiler: /usr/bin/g++-5 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr (found suitable version "8.0", minimum required is "7.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nanu/src/testcuda
nanu@xyW-R:~/src/testcuda$ make
[ 50%] Building NVCC (Device) object CMakeFiles/cuda_test.dir/cuda_test_generated_cuda_test.cu.o
/home/nanu/src/dlib/dlib/cmake_utils/test_for_cuda/../../dnn/../matrix/../optimization/optimization_line_search.h(215): error: namespace "std" has no member "__builtin_fpclassify"

1 error detected in the compilation of "/tmp/tmpxft_00004593_00000000-7_cuda_test.cpp1.ii".

COLLECT_GCC=g++-5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.5.0-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.1 20171010 (Ubuntu 5.5.0-1ubuntu1)

gcc-5 -v
Using built-in specs.
COLLECT_GCC=gcc-5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.5.0-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.1 20171010 (Ubuntu 5.5.0-1ubuntu1)

-- Found CUDA: /usr (found suitable version "8.0", minimum required is "7.5")
-- Looking for cuDNN install...
-- Found cuDNN: /usr/lib/x86_64-linux-gnu/libcudnn.so
-- Building a CUDA test project to see if your compiler is compatible with CUDA...
-- *** CUDA was found but your compiler failed to compile a simple CUDA program so dlib isn't going to use CUDA. ***
CMake Warning (dev) at /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:200 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "c" will no longer be dereferenced when the policy is
  set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:324 (_OPENMP_GET_FLAGS)
  dlib/CMakeLists.txt:615 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenMP_C: -fopenmp (found version "4.0")
-- Found OpenMP_CXX: -fopenmp (found version "4.0")
-- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA

Weird.  Something is wrong with your compiler if it's missing fpclassify().  I would try reinstalling gcc and/or nvcc, depending on which ones are missing this function.

okey, removing my complete cuda installation like described here:
https://askubuntu.com/questions/530043/removing-nvidia-cuda-toolkit-and-installing-new-one
and reinstalling
then the cuda 9 isn't working with gcc-5/g++-5 but
with  export CXX=/usr/bin/g++-6 && export CC=/usr/bin/gcc-6

did you find a solution to this?

This export CXX=/usr/bin/g++-6 && export CC=/usr/bin/gcc-6 was my solution

Is there any solution to this problem. I am unable to compile DLIB with CUDA. It shows namespace "std" has no member "__builtin_fpclassify".
Ubuntu: 17.10
GCC version used: 4.8
CUDA: 8.0
Cudnn: 6.0
Thank you

I think you have to use
GCC version used: 6

Yes, you have to read the manual.  https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html  It tells you what compilers are supported by CUDA.

Thank you for your response but DLIB compilation asks to use a GCC version lower than 5.0.That's why I downgraded the GCC to 4.8.
My GPU compute capability is 2.1 so will that affect DLIB execution on GPU even if I do manage to compile DLIB correctly.
Thank you

Dlib doesn't require a gcc version lower than anything.  Where does it say
lower than 5.0?

Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "7.5")
-- Looking for cuDNN install...
-- Found cuDNN: /usr/local/cudnn/lib64/libcudnn.so
-- Building a CUDA test project to see if your compiler is compatible with CUDA...
-- *****************************************************************************************************************
-- *** CUDA was found but your compiler failed to compile a simple CUDA program so dlib isn't going to use CUDA.
-- *** The output of the failed CUDA test compile is shown below:
-- ***   Change Dir: /home/hgupta/dlib/build/temp.linux-x86_64-2.7/dlib_build/cuda_test_build

***   Run Build Command:"/usr/bin/make"
***   [ 50%] Building NVCC (Device) object CMakeFiles/cuda_test.dir/cuda_test_generated_cuda_test.cu.o
***   In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
***                    from :0:
*****   /usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!**
***    #error -- unsupported GNU version! gcc versions later than 5 are not supported!
***     ^~~~~
***   CMake Error at cuda_test_generated_cuda_test.cu.o.cmake:218 (message):
***     Error generating
***     /home/hgupta/dlib/build/temp.linux-x86_64-2.7/dlib_build/cuda_test_build/CMakeFiles/cuda_test.dir//./cuda_test_generated_cuda_test.cu.o

***   CMakeFiles/cuda_test.dir/build.make:63: recipe for target 'CMakeFiles/cuda_test.dir/cuda_test_generated_cuda_test.cu.o' failed
***   make[2]: *** [CMakeFiles/cuda_test.dir/cuda_test_generated_cuda_test.cu.o] Error 1
***   CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cuda_test.dir/all' failed
***   make[1]: *** [CMakeFiles/cuda_test.dir/all] Error 2
***   Makefile:83: recipe for target 'all' failed
***   make: *** [all] Error 2

-- *****************************************************************************************************************
I used below cmd
sudo python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA --set CMAKE_PREFIX_PATH=/usr/local/cudnn

Ok, that's not a dlib message. It's CUDA.  In any case, you have to use the
compiler required by CUDA.

but when I switch to GCC 4.8 I get namespace "std" has no member "__builtin_fpclassify".

I don't know. But this isn't related to dlib.  https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html  Read the instructions.  You aren't supposed to use GCC 4.8 on ubuntu 17.04.  You have somehow terribly messed up the CUDA install.  Read the NVIDIA instructions and follow them carefully.

Okay. I will check there.
Thanks a lot for the help.


ssrBuild with async Vue3 components / routes , trouble with import to require conversion in built files.

Describe the bug
I've been spending some time with the mostly undocumented ssrBuild feature of Vite + Vue3, so this might not actually be a bug but working as intended and i might be doing something wrong.
I am trying to run the ssrBuild with a router that defines some async components as below:
export default function (type) {
  const routerHistory = type === 'client' ? createWebHistory() : createMemoryHistory();

  return createRouter({
    history: routerHistory,
    routes: [
      { path: '/', component: Home, props: true },
      { path: '/a', component: () => import('./components/PageA.vue'), props: true },
      { path: '/b', component: () => import('./components/PageB.vue'), props: true },
    ]
  });
}

However, once i built my entry files with ssrBuild it converts the router part in the entry file to:
function createRouter$1(type) {
  const routerHistory = type === "client" ? createWebHistory() : createMemoryHistory();
  return createRouter({
    history: routerHistory,
    routes: [
      {path: "/", component: script$2, props: true},
      {path: "/a", component: () => Promise.resolve().then(function() {
        return require("./PageA.161ddab2.js");
      }).default, props: true},
      {path: "/b", component: () => Promise.resolve().then(function() {
        return require("./PageB.f65a13cd.js");
      }).default, props: true}
    ]
  });
}

The problem here is how the requires are defined:
 return require("./PageA.161ddab2.js");

The above code does end up not being able to find the component. If i manually go into the built files and add a .default behind this, the code works fine and my pages load / hydrate correctly.
 return require("./PageA.161ddab2.js").default;

since the exported pages all have default exports, this seems to be logical. E.g. in PageA:
"use strict";
var renderer = require("@vue/server-renderer");
var script = {
  name: "PageA",
  props: {
    msg: String
  },
  data() {
    return {
      randomNumber: 0,
      initialized: false,
      count: 0
    };
  }
};
function ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  _push(`<h1${renderer.ssrRenderAttrs(_attrs)}>I AM PAGE A</h1>`);
}
script.ssrRender = ssrRender;
script.__file = "src/components/PageA.vue";
exports.default = script;

Is this actually a bug with vite where it should be adding the .default to the required components? Am I doing something wrong here and should i define my imports differently? Happy to provide additional info if needed.
System Info

required vite version: ^1.0.0-rc.4
required Operating System: win10 with WSL1
required Node version: v14.7.0

Related to #720

For async component, you should use defineAsyncComponent wrapper it.The rfc is here https://github.com/vuejs/rfcs/blob/async-component/active-rfcs/0026-async-component-api.md

@underfin I tried the same code with defineAsyncComponent, it does not change the way the code is compiled and has the same problem with how import is converted to a require that lacks the default part of the import.

The compiled behavior is correct, defineAsyncComponent will handle default of module.

@underfin this does not seem to be the case, i might be doing something wrong?
Here is my router:
export default function (type) {
  const routerHistory = type === 'client' ? createWebHistory() : createMemoryHistory();

  return createRouter({
    history: routerHistory,
    routes: [
      { path: '/', component: Home, props: true },
      { path: '/a', component: defineAsyncComponent(() => import("./components/PageA.vue")), props: true },
      { path: '/b', component: defineAsyncComponent(() => import("./components/PageB.vue")), props: true },
    ]
  });
}

which is being compiled to:
function createRouter$1(type) {
  const routerHistory = type === "client" ? createWebHistory() : createMemoryHistory();
  return createRouter({
    history: routerHistory,
    routes: [
      {path: "/", component: script$2, props: true},
      {path: "/a", component: vue.defineAsyncComponent(() => Promise.resolve().then(function() {
        return require("./PageA.161ddab2.js");
      })), props: true},
      {path: "/b", component: vue.defineAsyncComponent(() => Promise.resolve().then(function() {
        return require("./PageB.f65a13cd.js");
      })), props: true}
    ]
  });
}

When running the server, i'm getting a warning and the page components do not render.
[Vue warn]: Component  is missing template or render function.

However, when i change  return require("./PageB.f65a13cd.js"); to  return require("./PageB.f65a13cd.js").default; everything works as expected. This is with the following versions of vue:
"vue": "^3.0.0-rc.9",
"@vue/compiler-sfc": "^3.0.0-rc.9",
"@vue/server-renderer": "^3.0.0-rc.9",

Can you provider your repo for me track this?

@underfin yes, i just set this up https://github.com/tbgse/vite-ssr-example
it's super basic, so i completely ignore hydration etc. in this example. But just by running npm run build and after that npm run serve you should be able to see the errors with the components not being found. Thanks for taking the time to look into this. You should be able to find the issue with the router in the build files (index.js) around line 1454. If you add .default to those requires and run npm run serve again, it will then correctly render the routes.

I try fix it,it is a bug with vue core. You can track here https://github.com/vuejs/vue-next/pull/2034

Awesome @underfin I'll keep a close eye on the PR in vue core.

You shouldn't use defineAsyncComponent with the router views, it's not necessary as they are resolved by the router navigation guards. So this is likely a bug in vue router missing some handling in the extractComponentsGuards function. It's handling it the same way as the previous vue-router, so it's weird. If someone could open an issue on vue-router-next with a boiled down repro, that would hepl

thanks for jumping in on this @posva with so many moving pieces (router, vue, vite) it was really hard for me to pinpoint where things were going wrong here. I posted a very minimal setup of the repo here: https://github.com/tbgse/vite-ssr-example and just updated it by removing defineAsyncComponent, so you can use it to reproduce the issue and debug the router.

Thanks, well for some reason the generated module is missing the __esModule property so we don't get the default.
@underfin I think there might be a bug in the transpilation on SSR: shouldn't the dynamic import output a require(...).default? Or add the __esModule property?
Checking for default in the resolved import should work but I'm not sure if it would break in some scenarios

Yeah.It look like lost __esModule  property.

@tbgse .You can add blew code into vite.config.js as a workaround.
module.exports = {
  rollupInputOptions: {
    preserveEntrySignatures: 'strict',

  },
  rollupOutputOptions: {
    preserveModules: true,
  },
}

Thanks  @underfin this works fine and hydration works like a charm with it too. It does create a massive amount of files compared to the default settings though, so i'm keeping a close eye on your pr #3780 and hoping it'll make it into an upcoming release

@underfin following up since https://github.com/rollup/plugins/pull/552 seems to have been merged. I'm not 100% sure if this would need further adjustments in the vite config files (or internally?) or should it now work out of the box with the latest rollup version?

@underfin @antfu I could not get this to work with the latest rollup version, I also tried to change some of the options passed to the commonjs plugin in the createBaseRollupPlugins of vite but had no luck in getting this to work. Is there anything i can do to move this forward?

I add comment with https://github.com/rollup/rollup/issues/3760#issuecomment-706645485, please wait for answer.

@underfin it seems like a fix was merged in rollup https://github.com/rollup/rollup/pull/3822
could you advise how to proceed to set this up correctly in vite?


Separate fabric and tile configuration

This PR separates the fabric and tile configuration. This has several benefits:

It's cleaner:
The fabric config only describes the fabric and the Tile/ folder contains all information about tiles
The git history for tile changes / fabric changes is separate
It is easier easier to swap whole "tile libraries", just point to different tiles in fabric.csv
Code is a bit more separated

I carefully tried to not break anything and tested this PR with both the Verilog and VHDL writers: load_fabric is successful for both of them. For Verilog all subsequent commands work as expected, for VHDL run_FABulous_fabric throws an error that is unrelated to this PR. See #153.
Fixes #149.

I think you will have other significant changes as well. We will need to maintain the current file structure for a tutorial shortly. I have started a new branch called FABulous2.0-development; let's have file structure changes happen there, and when it is all ready, we can put everything into master.

Sounds good! I have changed the base branch to FABulous2.0-development.


Smoke test is not catching basic failures in the vsix

If the python extension fails to load only in the vsix case, the smoke test will still pass as it doesn't use the VSIX output to run the test.
I believe Don's new UI tests could be used instead to verify this doesn't happen anymore.

We had this happen in the datascience stuff and it broke the insider's build over the weekend. Customer's then hit this trying to use the insider's build.

Dup of #5912


Already using alexzzzz's roslyn integration

What should I do to begin using this incremental compiler if I'm already using alexzzzz's? Do I just install it into my project anyway and it'll work or?

Unity3D.IncrementalCompiler uses alexzzzz's work as a binder but both are mutual exclusive. So if you want to use IncrementalCompiler, you should remove alexzzzz's one 😉


question about review reconstruction loss

https://github.com/Tribleave/SCAPT-ABSA/blob/5f341fd811af62e7c0c8c8417c3a89f45179d663/model/module/misc.py#L27
you add the encoder's [CLS] hidden states to every input word embeddings as transformer decoder's input, which may be not consistent with your claim "hi acts as a beginning- of-sentence input embedding in the decoding process to control the whole generation"
Thanks for you reply in advance!

Thanks for pointing out this! The mention in our paper may not fully illustrate the fully implementation.
The propose adding [CLS] hidden states to every step has two considerations:

Act as the beginning-of-sentence input embedding
Compensate for the missing source memory
Because here we mainly pre-train the h_i rather than decoder itself,  this way could be more efficient in pre-training.

Thanks for pointing out this! The mention in our paper may not fully illustrate the fully implementation. The propose adding [CLS] hidden states to every step has two considerations:

Act as the beginning-of-sentence input embedding
Compensate for the missing source memory
Because here we mainly pre-train the h_i rather than decoder itself,  this way could be more efficient in pre-training.

Fair enough. Nice work. Many thanks for you reply!


Over resource limits on Streamlit Cloud

Hey there :wave: Just wanted to let you know that your app on Streamlit Cloud deployed from this repo has gone over its resource limits. Access to the app is temporarily limited. Visit the app to see more details and possible solutions.

Thanks for letting me know. Restarted the server and everything should be up and running.


Add commit message release trigger

Description

This adds a trigger to the action to only run the action when a PR is merged to main AND the head commit message contains the text 'Update to version'.
It's janky, but it requires minimal intervention.
Related Issues

Checklist

[x] Is this code covered by new or existing unit tests or integration tests?
[x] Did you run make test successfully?
[x] Do new classes, functions, methods and parameters all have docstrings?
[x] Were existing docstrings updated, if necessary?
[x] Was external documentation updated, if necessary?

Additional Notes or Comments

Codecov Report
Patch coverage has no change and project coverage change: -0.10% :warning:

Comparison is base (d1d18fd) 78.43% compared to head (ff794cd) 78.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #819      +/-   ##
==========================================
- Coverage   78.43%   78.33%   -0.10%
==========================================
  Files          80       80
  Lines        5160     5160
==========================================
- Hits         4047     4042       -5
- Misses       1113     1118       +5

see 1 file with indirect coverage changes

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

To be clear, this makes the release implicit by adding a certain substring "update to version" in a commit message?

@blythed Exactly. What do you think? Convenient, or a footgun waiting to go off?


Does Response in Controller make sense

Does the Response object in Controller make sense since we're returning a string from the action methods as opposed to returning a Response?

Returning string for now as in klein doc. Handling Response later. Closing for now.


https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details
Problem

In the first paragraph of the localization best practices (Note on localizers), it says at the end:

VCS systems

but VCS stands for version control system and already has the word system included. So written-out it actually says:

version control system systems

which makes no sense unless the text is really referring to systems of version control systems but I doubt that.
Suggested solution
Replace that part with:

version control systems (VCSs)

@winklerrr thanks for reporting. I've fixed this now.


Add an option to add space padding for message when creating formatter

In logrus's built-in TextFormatter, it formats the msg with right space padding (https://github.com/Sirupsen/logrus/blob/69df0d2ed71e288309a424ac82040635d7e29731/text_formatter.go#L119), which makes it easier to tell apart the logged event name (the msg) and the attributes associated with the event.
In this PR, I added one more exposed field called "SpacePadding" for TextFormatter, so that users can provide a value like "44" to achieve the same result as logrus's built-in TextFormatter.
[2016-11-02T15:08:45.302+08:00] DEBUG Service is initializing                  eventCount=10 name=apiserver
[2016-11-02T15:08:45.302+08:00]  INFO Service is starting up                   name=zombie server size=20

Thanks for this PR


Expand System Workflows

Is your request related to a problem? Please describe.
Currently system workflows is a global level version of Workflows that Administrators can use for functionality. However as additional functionality has come into the solution, we need to show additional workflow types on this page.
Describe the solution you'd like
Have different Workflow types for different scenarios

System (or new name)
Template (used by the Template functionality)
System Defaults (ones that cannot be deleted, only parameters filled in).

Describe the benefits or justification for this request
Allows us to utilize workflows and the activity for a more robust extensible solution

New enhancement created to track the features not being closed out in this release https://app.zenhub.com/workspaces/boomerang-flow-5f9600754a5aa9001521ccc1/issues/boomerang-io/roadmap/224

Removing request as we are restructuring Flow to provide a system team for admins with templates managed for everyone. If there is to be a workflow that is default for admins, load into the system team.


Upgrading dependencies

You can upgrade all dependencies??

Dependencies of web and nativescript projects are upgraded to their latest compatible versions.


Vision setup

Implementation of the Vision service.

This is the updated PR for #632.

This is a very solid foundation that I think we should merge immediately into the vision topic branch. I'm very impressed with the usability of this implementation. It was obviously a lot of work. Bravo, @blowmage!


fix(GRA-919): use netmaker logo

TESTING STEPS

build netclient gui
run the gui
check that the netmaker logo shows as the app icon (may not work on GNOME as an extra .desktop file may be needed)

will wait on changes


Only show "changes" after they are made?

How about we only show "changes" (audit log) after changes are made?
ie. if entry.audits.count > 1 instead of if entry.audits.any?

Fixed in https://github.com/DefactoSoftware/Hours/pull/287


Improvement on "Analyzing function arguments at cross references"

In the snippet regarding the extraction of arguments, if I'm understanding the code correctly, is iterating through all the instructions until it reaches a CALL and then check again that the address is the one we are interested in, but it's possible to ask for the opcode directly from an address passing it as an argument to getPcodeOps()
From the help:
>>> help(high_func.getPcodeOps)
Searching API for ghidra.program.model.pcode.HighFunction.getPcodeOps()...
Searching API for ghidra.program.model.pcode.PcodeSyntaxTree.getPcodeOps()...
-----------------------------------------------------
Iterator getPcodeOps()
  return all PcodeOps (alive or dead) ordered by SequenceNumber

  @return java.util.Iterator<ghidra.program.model.pcode.PcodeOpAST>: -- Iterator to PcodeOps

-----------------------------------------------------
-----------------------------------------------------
Iterator getPcodeOps(Address addr)
  return all PcodeOps associated with a particular instruction Address

  @param addr (ghidra.program.model.address.Address): -- Address of instruction generating PcodeOps
  @return java.util.Iterator<ghidra.program.model.pcode.PcodeOpAST>: -- Iterator to PcodeOps

-----------------------------------------------------

From a terminal session
>>> from ghidra.app.decompiler import DecompileOptions
>>> from ghidra.app.decompiler import DecompInterface
>>> from ghidra.util.task import ConsoleTaskMonitor
>>> monitor = ConsoleTaskMonitor()
>>> ifc = DecompInterface()
>>> options = DecompileOptions()
>>> ifc.setOptions(options)
True
>>> ifc.openProgram(currentProgram)
True
>>> func = getFunctionContaining(currentAddress)
>>> func
KeyboardBridgeServer::connectedChanged
>>> res = ifc.decompileFunction(func, 60, monitor)
>>> res
ghidra.app.decompiler.DecompileResults@46c33206
>>> high_func = res.getHighFunction()
>>> high_func.getPcodeOps(toAddr(0x00c8d64))
java.util.AbstractMap$2$1@4511ac6b
>>> pcodeops = high_func.getPcodeOps(toAddr(0x00c8d64))
>>> op = pcodeops.next()
>>> op
 ---  CALL (ram, 0x3b0e0, 8) , (unique, 0x10000009, 4) , (unique, 0x1000000d, 4) , (const, 0x0, 4) , (const, 0x0, 4)
>>> op.getInputs()
array(ghidra.program.model.pcode.Varnode, [(ram, 0x3b0e0, 8), (unique, 0x10000009, 4), (unique, 0x1000000d, 4), (const, 0x0, 4), (cons

In this way you can avoid a lot of overhead.

Awesome thank you for submitting this! I'll update the snippet or add an additional snippet tonight with credit to you.

perfect!

I've added your code. Thanks again :)
https://github.com/HackOvert/GhidraSnippets/commit/f891442036ad80142a46ae2946f751def7459473


bundler doesn't recognize --help

$ bundle --help
Could not find command "--help".
$ bundle --version
Bundler version 1.12.5

This is an ubiquitous convention and should be respected by Bundler.

This is a bug fixed in 1.13.0.rc.2


How to decode with from_utf8_lossy?

"invalid string value: data is not UTF-8 encoded"
Some characters is invalid, but I think it's not important.
Some users may submit invalid utf-8 character, and I can't avoid it.

https://github.com/tokio-rs/prost/blob/87cea1d49a4e5df1d4bfd3c26045a444c5f37955/src/encoding.rs#L847

If you don't need UTF-8 validation, you can change the type of the field to bytes, which will yield Vec<u8> and utf-8 validation will be skipped.  This change is considered wire-compatible per the Protobuf spec.

Protobuf-Java uses String but it behaves like Rust's from_utf8_lossy. That's the reason that we gave up porting Java apps to Rust for now. We have hundreds of schemas and these schemas are more like cross-team contracts. I know changing the type to bytes works, but it's not that easy in the situation.

Protobuf-Java uses String but it behaves like Rust's from_utf8_lossy. That's the reason that we gave up porting Java apps to Rust for now. We have hundreds of schemas and these schemas are more like cross-team contracts. I know changing the type to bytes works, but it's not that easy in the situation.

It sounds like a social problem rather than a technical problem.
How about
pub type JavaString = Vec;
and then use JavaString in your Prost structures when porting?


x,y pixles locations of predicted masks

Hi, Is there any way that I can find the list of (x,y) coordinates of all the predicted masks.

@vcarehuman
#309

I can see the mask is a tensor. I need the mask boundaries (x,y) points. How can i do it.

@vcarehuman from the tensor use the imantics-python library to easily from the tensor you will able to get the mask boundaries as  polygon points

I can see the mask is a tensor. I need the mask boundaries (x,y) points. How can i do it.

@vcarehuman did you solve that ?

I can see the mask is a tensor. I need the mask boundaries (x,y) points. How can i do it.

@vcarehuman did you get the polygon x,y coordinates? If yes please let me know!

@areebsyed
        masks = masks[:num_dets_to_consider, :, :, None]
        mask_out = (masks.sum(dim=0) >= 1).float().expand(-1, -1, 3).contiguous()
        mask_out_1 = mask_out.cpu().numpy()

        indices = np.where(mask_out_1[:,:,:]==1)

        x = indices[0][:]
        y = indices[1][:]

@Marwen-Bhj I replaced your lines with lines 189 onwards as mentioned by dboyla but the output is till same. No coordinates being displayed anywhere


Fix seeking

Hopefully closes #131. Now we start from the beginning of a file when the current offset is ahread of the desired offset.

The test first failed with attempt to subtract with overflow and after the fix it no longer fails.

Seems fine to me, thanks!

Can you smash that Bell Icon Approve button?


added example to instantiate _GPIO in order to setup non-random input bit

I made improvement of the existing example with GPIO instance

I may have use setup method improperly, what do you think I need to fix in order to be able to emulate GPIO input?


General ChartRepository support

To date, microbean-helm works mostly with releases and looks at charts only as a way to "get to" a release.  There is a lot of value to be had by carefully grooming the idea of a chart repository such that its concept is divorced from its underlying representation.  See https://lairdnelson.wordpress.com/2017/06/25/helm-from-java-part-5/ for more details.

Implemented with #34.


[BUG] LWIP_PBUF_FROM_CUSTOM_POOLS and PBUF_POOL_SIZE don't seem to be set up in a reasonable way

Reproduction steps
LWIP_PBUF_FROM_CUSTOM_POOLS and PBUF_POOL_SIZE are used by some of our config headers (as in, its value is used in ReliableMessageProtocolConfig.h), but where are they supposed to be defined by consumers?  Some things seem to have them in lwipopts.h, but our config headers  don't include lwipopts.h, right?
How is this supposed to work?
Bug prevalence
Always
GitHub hash of the SDK that was being used
b02c9842e3dedc8f81f16760da5c322affdf27ee
Platform
other
Platform Version(s)
No response
Anything else?
No response

PBUF_POOL_SIZE is one of LwIP's public options hence it's ok to rely on it being defined. LwIP user code can explicitly #include <lwipopts.h>, so that seems like a valid solution (when CHIP_SYSTEM_CONFIG_USE_LWIP is set, of course).

Interestingly, we have other headers using LWIP_PBUF_FROM_CUSTOM_POOLS without obviously including lwipopts.h.  But maybe those are just broken?
For now I am going to condition the use of the LwIP things on CHIP_SYSTEM_CONFIG_USE_LWIP, and then we'll see what happens when we actually try to turn on -Wundef on the LwIP-using platforms.

lwipopts could be transitively picked up via any other lwip include somewhere in the tree. #include "lwip/opt.h" is the first thing any lwip include does, opt.h in turn includes lwipopts.h to pick up user settings.
so actually, small correction: the right thing to do is to #include "lwip/opt.h", to make sure defaults are correctly applied.


Create a better experience for reading comics on the site

Currently comics are a somewhat stripped-down version of articles. They have a single image with alt text. There are some ways we could make the experience of reading comics better, without drastic alterations to the page:

Add back/forward buttons for comics in a series (see mockup)
Allow content editors to upload comics as separate panels for multi-pane strips, so they could reflow on mobile devices (see also: https://github.com/wellcomecollection/wellcomecollection.org/issues/7652)
(Maybe) add a "random" button that takes you to a random issue of the comic

The webcomic and article type in Prismic are currently the same, but we may want to diverge them as part of this work – we should embrace the differences, rather than shoehorn one into the other.

This is related to #8398.

To create a more responsive experience, I propose editing the layout of the comics to a singular image and adding arrows to the left and right of the viewing area to enable readers to navigate through each one. The content team either receive the comics as a full panel (like how they're shown currently), or they break them up into singular images for social media so they'll be available in that format.
Desktop: https://zpl.io/Q0OZp0R
Mobile: https://zpl.io/GENr6EW
I've included the same numbering component as what we use within the collections image viewer as a means of indicating how many panels are within that comic.

Ah, so I think I was maybe unclear in the initial explanation of the ticket (or maybe I’m confused).
I think there are two purposes these buttons could serve:

Moving between panels of an individual comic
Moving between issues of a comic

Both of your mockups do (1) I think the Stories team also wanted (2). I’d double check with Danny; sorry if I was unclear about this.
Or maybe I’ve missed something in the mockups?

Aah, I didn't realise that (2) was expected from the image area, seeing as the rest of the comic series is linked underneath.
@dannybirchall can you clarify the above?
As a means of navigating (1) and (2), there could be an option of showing the comic thumbnails (for 1), and using the side buttons to navigate to the next comic (2): Comics navigation

In the case there are e.g. 6 panels (as in the mock-ups above), would we make them break from 3-across to 2-across at 'tablet' size before going into a single column on mobile, or would we always break straight from the desktop view to the mobile view?
Are the panels always going to be square. If not, can we always place them inside a square container in the mobile view (and what are the visual implications if not)?

Yes to breaking the panels to 2-across on tablets, the single on mobile
As far as I'm aware, the majority of the time the panels will be square. If they're not, I imagine they would still need to fit within the square width (like how the full panels do now), but probably worth clarifying with @dannybirchall

tbh it's probably  going to be more profitable to check with Ben Gilbert

Putting this in the 'Ready for review' column while the content team try it out.


How to add gps tracking in maps

I want add automatic location detector using gps how can i do it @lelandrichardson
please help.

@sayedatif You should see docs prior, there is enough documentation.
On mapview use property followsUserLocation={true}
this will place a person's location on a map. on IOS you need to have additional settings since it'll request  a location from a user.

@jeveloper how to implement live tracking on phone from other GPS device using react-native-maps

@iiitmahesh would you like professional consulting services?
I can provide that.


How to set url from java file i mean programmatically set url to RiveAnimationView?

Hi @piyush85730 you'll need to load the HTTP file and set the resource with animationView.setRiveBytes
You can find an example here: https://github.com/rive-app/rive-android/blob/master/app/src/main/java/app/rive/runtime/example/HttpActivity.kt

Going to close this issue, but feel free to reopen. Also be sure to reach out to the team on Discord if you have implementation questions where we can help out with similar issues.

To avoid confusion, the above is only recommended if you want to programatically update your Rive animation through code (loaded from a URL). The easiest way is to instead set the URL once off through XML - see Add RiveAnimation to your XML layout


Lemmalisten-Infoseite: Lemma-Zahlen missverständlich

(i) the hieroglyphic/hieratic lemma list (1,090 thous. entries), based on texts written in hieroglyphic or hieratic script, and (ii) the Demotic lemma list (325 thous. entries), based on text written in Demotic. Soon, a third list with Coptic lemmata will be added (see below).

Schon verbessert.


feat: add "language-xxx" to  elements for prism syntax highlighting.

Prism forces you to use the correct element for marking up code: <code>. On its own for inline code, or inside a <pre> for blocks of code. In addition, the language is defined through the way recommended in the HTML5 draft: through a language-xxxx class.

Prism requires "laguage-xxx" class in both code and pre blocks.
I've already opened an issue in https://github.com/yogthos/markdown-clj/issues/199 to add an option to add classes to pre tags.

ok, ping me whenever the upstream issue is fixed


Notification Start Event

I always get upset when developing a custom notification I can subscribe to the @destroy event, but there is no emit @start. Please add emit, it will help to configure notifications more flexibly or tell me how I can solve my problem? Thanks

added here


Support for setting geo-replication clusters on topic level

Motivation
Currently, when we try to enable the geo-replication, we need to set multiple clusters for the namespaces, and all the topics under the namespace will start to replicate data across clusters.
It's useful for adding the replicate clusters in the topic level so that we can achieve the topics under a namespace can have different replication clusters such as topic A(cluster-a <-> cluster-b) topic B(cluster-b <-> cluster-c).
Documentation
I'm not sure if the doc could generate automatically. If no, I will update the doc later.

I'm not sure if the doc could generate automatically. If no, I will update the doc later.


Wait For Elements State disabled/enabled doesn't respect 10 sec wait time

Describe the bug
When using the function "Wait For Elements State"   enabled / disabled. It will fail frequently.
New message: Error: page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null at eval (eval at  (eval at callFunction (:304:29)), :3:17) at eval (eval at  (eval at callFunction (:304:29)), :3:26) at eval (eval at callFunction (:304:29), :4:78) at onRaf (:2087:37) at :2097:13 at InjectedScript._runAbortableTask (:2154:24) at InjectedScript.pollRaf (:2078:21) at eval (eval at callFunction (:304:29), :4:39) at UtilityScript.callFunction (:305:24) at UtilityScript. (:1:44) Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
It doesn't seem to respect the retry interval of 10seconds like with hidden or visible.
When I add "sleep 1s" before checking the state.... the check passes. But it would assume that robotframework-browser would do this when required (sleeping)
Found with v2.4.2

Some extra information.
*** Test Cases ***
UC1000-TC001 Maak van een string een base64 gecodeerde string
    New Browser    chromium    headless=false
    New Context
    New Page    https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2
    Wait For Elements State    id=myText      enabled

When I execute this I get the following (unexpected error)
Error: page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.

And here is the corresponding debug log

{"level":30,"time":"2021-01-06T16:32:08.887Z","pid":15020,"hostname":"<a host>","msg":"Listening on 53805"}
2021-01-06T16:32:09.115Z pw:api => browserType.launch started
2021-01-06T16:32:09.627Z pw:api <= browserType.launch succeeded
2021-01-06T16:32:09.652Z pw:api => browser.newContext started
2021-01-06T16:32:09.666Z pw:api <= browser.newContext succeeded
2021-01-06T16:32:09.666Z pw:api => browserContext.addInitScript started
2021-01-06T16:32:09.666Z pw:api <= browserContext.addInitScript succeeded
{"level":30,"time":"2021-01-06T16:32:09.667Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
2021-01-06T16:32:09.696Z pw:api => browserContext.newPage started
2021-01-06T16:32:09.971Z pw:api <= browserContext.newPage succeeded
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Video path: undefined"}
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:09.971Z pw:api => page.goto started
2021-01-06T16:32:09.973Z pw:api navigating to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2", waiting until "load"
2021-01-06T16:32:10.095Z pw:api   navigated to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2"
2021-01-06T16:32:10.241Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.296Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.391Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.391Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.478Z pw:api   navigated to "https://accounts.google.com/o/oauth2/iframe#origin=https%3A%2F%2Fwww.w3schools.com&rpcToken=447218133.8222313&clearCache=1"
2021-01-06T16:32:10.545Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.547Z pw:api   "load" event fired
2021-01-06T16:32:10.547Z pw:api <= page.goto succeeded
{"level":30,"time":"2021-01-06T16:32:10.557Z","pid":15020,"hostname":"<a host>","msg":"unparsed args: e => !e.disabled, id=myText, {}"}
2021-01-06T16:32:10.558Z pw:api => page.$ started
2021-01-06T16:32:10.575Z pw:api <= page.$ succeeded
2021-01-06T16:32:10.576Z pw:api => page.waitForFunction started
2021-01-06T16:32:10.588Z pw:api <= page.waitForFunction failed
================= Original suppressed error =================
page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
    at Connection.sendMessageToServer (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\connection.js:69:15)
    at Proxy.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:44:61)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:344:48
    at Frame._wrapApiCall (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:72:34)
    at Frame.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:341:21)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:60
    at Page._attributeToPage (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:202:20)
    at Page.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:21)
    at Object.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\index.js:70035:45)
    at step (c:\python37\lib\site-packages\Browser\wrapper\index.js:69941:23)
=============================================================
2021-01-06T16:32:10.598Z pw:api => page.screenshot started
2021-01-06T16:32:10.846Z pw:api <= page.screenshot succeeded
2021-01-06T16:32:10.856Z pw:api => page.title started
2021-01-06T16:32:10.858Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.862Z pw:api => page.bringToFront started
2021-01-06T16:32:10.864Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.867Z pw:api => page.title started
2021-01-06T16:32:10.868Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.880Z pw:api => page.bringToFront started
2021-01-06T16:32:10.881Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.883Z pw:api => browserContext.close started
2021-01-06T16:32:10.902Z pw:api <= browserContext.close succeeded
2021-01-06T16:32:10.933Z pw:api => browser.close started
2021-01-06T16:32:11.159Z pw:api <= browser.close succeeded

Some extra information.
*** Test Cases ***
UC1000-TC001 Maak van een string een base64 gecodeerde string
    New Browser    chromium    headless=false
    New Context
    New Page    https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2
    Wait For Elements State    id=myText      enabled

When I execute this I get the following (unexpected error)
Error: page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.

And here is the corresponding debug log

{"level":30,"time":"2021-01-06T16:32:08.887Z","pid":15020,"hostname":"<a host>","msg":"Listening on 53805"}
2021-01-06T16:32:09.115Z pw:api => browserType.launch started
2021-01-06T16:32:09.627Z pw:api <= browserType.launch succeeded
2021-01-06T16:32:09.652Z pw:api => browser.newContext started
2021-01-06T16:32:09.666Z pw:api <= browser.newContext succeeded
2021-01-06T16:32:09.666Z pw:api => browserContext.addInitScript started
2021-01-06T16:32:09.666Z pw:api <= browserContext.addInitScript succeeded
{"level":30,"time":"2021-01-06T16:32:09.667Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
2021-01-06T16:32:09.696Z pw:api => browserContext.newPage started
2021-01-06T16:32:09.971Z pw:api <= browserContext.newPage succeeded
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Video path: undefined"}
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:09.971Z pw:api => page.goto started
2021-01-06T16:32:09.973Z pw:api navigating to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2", waiting until "load"
2021-01-06T16:32:10.095Z pw:api   navigated to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2"
2021-01-06T16:32:10.241Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.296Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.391Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.391Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.478Z pw:api   navigated to "https://accounts.google.com/o/oauth2/iframe#origin=https%3A%2F%2Fwww.w3schools.com&rpcToken=447218133.8222313&clearCache=1"
2021-01-06T16:32:10.545Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.547Z pw:api   "load" event fired
2021-01-06T16:32:10.547Z pw:api <= page.goto succeeded
{"level":30,"time":"2021-01-06T16:32:10.557Z","pid":15020,"hostname":"<a host>","msg":"unparsed args: e => !e.disabled, id=myText, {}"}
2021-01-06T16:32:10.558Z pw:api => page.$ started
2021-01-06T16:32:10.575Z pw:api <= page.$ succeeded
2021-01-06T16:32:10.576Z pw:api => page.waitForFunction started
2021-01-06T16:32:10.588Z pw:api <= page.waitForFunction failed
================= Original suppressed error =================
page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
    at Connection.sendMessageToServer (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\connection.js:69:15)
    at Proxy.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:44:61)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:344:48
    at Frame._wrapApiCall (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:72:34)
    at Frame.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:341:21)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:60
    at Page._attributeToPage (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:202:20)
    at Page.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:21)
    at Object.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\index.js:70035:45)
    at step (c:\python37\lib\site-packages\Browser\wrapper\index.js:69941:23)
=============================================================
2021-01-06T16:32:10.598Z pw:api => page.screenshot started
2021-01-06T16:32:10.846Z pw:api <= page.screenshot succeeded
2021-01-06T16:32:10.856Z pw:api => page.title started
2021-01-06T16:32:10.858Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.862Z pw:api => page.bringToFront started
2021-01-06T16:32:10.864Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.867Z pw:api => page.title started
2021-01-06T16:32:10.868Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.880Z pw:api => page.bringToFront started
2021-01-06T16:32:10.881Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.883Z pw:api => browserContext.close started
2021-01-06T16:32:10.902Z pw:api <= browserContext.close succeeded
2021-01-06T16:32:10.933Z pw:api => browser.close started
2021-01-06T16:32:11.159Z pw:api <= browser.close succeeded

This is true, if there error in Pleywright side Browser library does not retry, instead the above error is shown. I think it is not correct and we should fix it.

This is true, if there error in Pleywright side Browser library does not retry, instead the above error is shown. I think it is not correct and we should fix it.

I looked at this problem.
I had the following xpath selector: //*[@id='ordernumber'] to select an input html element(Not there is only 1 element that matches this xpath (when using chrome browser)
When I did this:
Browser.Wait For Elements State    //*[@id='ordernumber']     disabled
I got an error message (as seen above) and the test fails
When I change the selector to '//index[@id='ordernumber']', the check is performed correctly.
I don't know if this a problem in robotframework-browser or playwright.
Does robotframework-browser accept all normal xpath queries ? Or are there any restrictions ?

I looked at this problem.
I had the following xpath selector: //*[@id='ordernumber'] to select an input html element(Not there is only 1 element that matches this xpath (when using chrome browser)
When I did this:
Browser.Wait For Elements State    //*[@id='ordernumber']     disabled
I got an error message (as seen above) and the test fails
When I change the selector to '//index[@id='ordernumber']', the check is performed correctly.
I don't know if this a problem in robotframework-browser or playwright.
Does robotframework-browser accept all normal xpath queries ? Or are there any restrictions ?

Please ignore previous solution.
I have tested this in Ride before placing 'solution' above.
I'm sure it worked, but know I see the problem again with //input ....  xpath selector
I don't understand this, but please ignore this solution

Please ignore previous solution.
I have tested this in Ride before placing 'solution' above.
I'm sure it worked, but know I see the problem again with //input ....  xpath selector
I don't understand this, but please ignore this solution

I thought I was losing my marbles.... but now I see what causes the problem.
When using robotframework-browser HEADLESS checking if a field is disabled/enabled fails.
It doesn't matter if //*[@Id="someId"] or //input[@Id="someId"] is used.
When running robotframework-browser with a visible browser checking if the fields is 98 % accurate. Mostly it works, and 1 out of 10 it will still fail.
So I think the library or playwright is acting differently when in headless mode

I thought I was losing my marbles.... but now I see what causes the problem.
When using robotframework-browser HEADLESS checking if a field is disabled/enabled fails.
It doesn't matter if //*[@Id="someId"] or //input[@Id="someId"] is used.
When running robotframework-browser with a visible browser checking if the fields is 98 % accurate. Mostly it works, and 1 out of 10 it will still fail.
So I think the library or playwright is acting differently when in headless mode

It's common or not unusual that browser or applications running in the browser might behave differently when running in headless mode. Example PDF preview doesn't work in headless mode and there have been several reports in SeleniumLibrary side from similar cases.
But there is a bug in the Browser library that we don't respect the timeout if there is exception in playwright side.

It's common or not unusual that browser or applications running in the browser might behave differently when running in headless mode. Example PDF preview doesn't work in headless mode and there have been several reports in SeleniumLibrary side from similar cases.
But there is a bug in the Browser library that we don't respect the timeout if there is exception in playwright side.

@aaltat ,
Anny chance that this problem in the browser library will be fixed soon?
Greets Erik

nice. RoboCon has some interesting topics !!
Can anyone attend these meetings ? I assume it will be all online due to the pandemic

Tickets are available at https://robocon.io/ Getting tickets will support Robot Framework development

@aaltat
Thanks. I had a few test failing because of this. A way to fix this is to use "Wait For Network Is Idle' before the check on field to be disabled/enabled.
I was able to remove this when using browser 4.5.0. !!

@aaltat
I spoke too soon
I still have problems to check state disabled when page is refreshed, or a button triggers a change on the page.
Here are some debug logs:
Most of the time the test (which performs a "Wait For Elements State    disabled, after a click on a button) fails. Mostly when using robotframework-browser headless. When using browser with visible browser the test sometimes works. Hope this helps in finding the problem. (tested with robotframework-browser 4.5.0)
playwright-log-headless-error.txt
playwright-log-visible-error.txt
playwright-log-visible-noerror.txt

4.5.0 doesn't have the fix, next release will have. If you want to try this fix, you need install from the repository directly.

Sorry for that. Because the issue was closed I assumed the fix was in the
4.5.0 release.
Any idea when the release will be released which contains the fix?
Greets Erik
On Thu, May 13, 2021, 20:31 Tatu Aalto @.***> wrote:

4.5.0 doesn't have the fix, next release will have. If you want to try
this fix, you need install from the repository directly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MarketSquare/robotframework-browser/issues/629#issuecomment-840748912,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARLATWMDAA6KJW4BQFDEEK3TNQLI3ANCNFSM4VTH3AHA
.

Most likely we will push release out in next week.

Euh.
Isn't it in release 4.5.2?
Greets
On Sun, May 16, 2021, 16:41 Tatu Aalto @.***> wrote:

Most likely we will push release out in next week.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MarketSquare/robotframework-browser/issues/629#issuecomment-841826758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARLATWJZ74U5NVJYIUGQYNDTN7KRXANCNFSM4VTH3AHA
.

Ah, true. I did forget that it was released.