Motion detection not work

Motion detection on Reolink E1 Zoom not work in HA.I used HA locally and the sensor does not work. What could be the problem.
Version on HA:supervisor-2021.09. 0
Reolink E1 Zoom:
Hardware N.
IPC_515BSD6
Config Version
v<IP_ADDRESS>
Firmware Version
v<IP_ADDRESS>_21040708
Logger: homeassistant.components.camera
Source: components/camera/init.py:465
Integration: Camera (documentation, issues)
First occurred: 9:19:52 PM (1 occurrences)
Last logged: 9:19:52 PM
The camera entity camera.camera does not support requesting width and height, please open an issue with the integration author
WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration reolink_dev which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

can you specify your firmware version and also bring output of this URL:
https//your_camera_ip/cgi-bin/api.cgi?cmd=GetMdState&rs=&user=admin&password=blablah

can you specify your firmware version and also bring output of this URL:
http://your_camera_ip/cgi-bin/api.cgi?cmd=GetMdState&rs=&user=admin&password=blablah

I have the same problem with the RLC-410 5mp camera, firmware version v<IP_ADDRESS>_20121100
Heres the output of what you asked for.
[ { "cmd" : "GetMdState", "code" : 0, "value" : { "state" : 0 } } ]

Weirdly I got motion detection working again, it always worked fine up until a couple of months ago.
I just uninstalled it from hacs and started from scratch and it started detecting motion again.
Still get malformed user input when trying to change settings.
I just configure through .storage.

@Eddie46848 I suspect it's due to the refresh time which Reolink has changed, do you have the possibility to move in front of the camera and try to get the output of http://your_camera_ip/cgi-bin/api.cgi?cmd=GetMdState live ?
it should show "value" : { "state" : 1 } } instead of 0 . If it's 1 then please configure HA with a scan interval of less than 5 seconds:
reolink_dev:
scan_interval: 2

I have similar issue - related to subscription on NVR cams i believe.  I have had some limited short term success on reinstalls, but soon the issue again.   I’m running latest release  versions of everything.  Partial logs below show good on individual cams but none of the NVR cams.
2021-09-26 15:29:18 INFO (MainThread) [custom_components.reolink_dev.base] Host <IP_ADDRESS> subscribed successfully to webhook http://<IP_ADDRESS>:8123/api/webhook/62157eb528c986d1183ae176eb2bdd280af60c7a4748d80865d32dc7dbe94d31
2021-09-26 15:29:19 ERROR (MainThread) [custom_components.reolink_dev.base] Host <IP_ADDRESS> error renewing the Reolink subscription
2021-09-26 15:29:19 ERROR (MainThread) [custom_components.reolink_dev.base] Host <IP_ADDRESS> error renewing the Reolink subscription

@Eddie46848 I suspect it's due to the refresh time which Reolink has changed, do you have the possibility to move in front of the camera and try to get the output of http://your_camera_ip/cgi-bin/api.cgi?cmd=GetMdState live ? it should show "value" : { "state" : 1 } } instead of 0 . If it's 1 then please configure HA with a scan interval of less than 5 seconds:
reolink_dev: scan_interval: 2

Hi goodday, I used the url and I got the state to be 1 when motion was detected, and zero when none was detected. However, I am using the rlc-410w and the binary sensor for motion detection is not updating. Additionally, i do not see an option for setting the scan interval but there is an option for timeout and "motion sensor of delay". Any assistance would be appreciated.
Note: I have uninstalled and reinstalled the addon from HACS and the problem still persists.

@trancer86 : remember that E1 model is not supported by this lib, yet please try the latest version again. (@fwestenberg  if you could provide some background to this limitation so it can be documented for future reference?)
@StephenGhool : any error message in your logs?

@Eddie46848 I suspect it's due to the refresh time which Reolink has changed, do you have the possibility to move in front of the camera and try to get the output of http://your_camera_ip/cgi-bin/api.cgi?cmd=GetMdState live ? it should show "value" : { "state" : 1 } } instead of 0 . If it's 1 then please configure HA with a scan interval of less than 5 seconds:
reolink_dev: scan_interval: 2

thank you all for this integration!
it seems also my case with RLC-410.
pooling that URL with my laptop I see state changing from 0 to 1.
Which is the default value for scan_interval?
so this integration is polling the reolink camera to check if a motion has been detected?
2 is the value you suggested? why not having 2 as default?

@cpainchaud I have reviewed the logs and I am not seeing anything related to the reolink camera. So no there are no error messages in the logs

When you make your own binary_sensor with scan interval=2 it means that each sensor will hit the camera with an API call every 2 seconds so 2 sensors = 2 calls every 2 seconds. That could take CPU of the camera down, especially with newest firmware which forces you to use SSL.
This integration relies on getting the camera to send its updates by calling a webhook on HA, if you get no update it means that the camera is not able to hit the webhook. If you you get no webhook notification then please check that your internal URL is setup correctly and don't use DNS names but IP address of HA.

Finally it works! Thank you @cpainchaud. Problem was I used the mDNS name and not the IP address as the Internal URL. I created a PR to clarify things I have been stuck with when setting up this integration. Now I can delete the polling based sensors.

What webhook error @zerocritical  ?
Please enable more logging:
logger:
  default: warning
  logs:
    custom_components.reolink_dev: debug
    custom_components.reolink_dev.base.data: warning
    reolink: debug

i checked in home assistant logs and the subscription seems fine. I run a tcpdump while triggering a motion detection on my RLC 410, and I'm able to see POST sent from my camera to hass, but nothing in the logs in the same timeframe

I also emailed Reolink about this. But they are less than helpful, stating there is no API/SDK. And that motion push notification is only supported in the App, which is utter bs.

I did actually get a more useful reply when I told him this integration uses the ONVIF protocol (which I assume is true?):
He says the our ONVIF has not supported letting the NVR and IPC make "motion clear" ONVIF callback. But we are now developing this aspect and it may take about 2 months to realize it.

Sorry about that but it will come true in about 2 months.

2 months ... ffs ... let me check why the code 'timeout self detection' doesn't work

RLC-511WA with Firmware: v<IP_ADDRESS>_21040809 have the same issue. External URL https://xxx.duckdns.org, Internal URL http://homeassistant.local:8123. No update of motion sensors. The rest was running well.
After hours of try & error: it's running now! Problem was that I used homeassistant.local insteed of the IP-Address...

RLC-511WA with Firmware: v<IP_ADDRESS>_21040809 have the same issue. External URL https://xxx.duckdns.org, Internal URL http://homeassistant.local:8123. No update of motion sensors. The rest was running well.
After hours of try & error: it's running now! Problem was that I used homeassistant.local insteed of the IP-Address...

that's a classic! :)


Update our OpenGraph image and favicon

Is your feature request related to a problem? Please describe.
I'm always frustrated when our OG image and favicon use red color and not blue
Describe the solution you'd like
Change it to blue, like on https://widget.vaxx.nz
Additional context
Need resources from @mollyderecourt for this

Molly posted those in #design channel on Discord


PHOENIX-1712 Adding INSTR Function

PHOENIX-1712
I've added the INSTR function. These are initial changes.
Please review if anyone has some time.
Thanks.

Adding some more changes related to Test.

This code looks pretty good (with the exception of a few code-formatting issues). I think that the test coverage should be extended a bit though, with the following things being added:

tests using both sort orders (ascending and descending)
a test where a the input value is null
a test where the search string isn't found to verify the return value in that situation
a test where the function is used in a filter (as this ensures that the function is serialized/deserialized)

Specifically around the serialization/deserialization, there will be a no-args constructor needed, as well as an init method to initialize the search string. See the implementation of RegexpSplitFunction for an example of how this is done.

A couple of additional test cases which would also be good:

testing with strings that contains multi-byte characters
testing with empty (but not null) strings

Thanks Gabriel. I will work on adding some more test cases to this and changes mentioned.

@gabrielreid I added all the changes which you mentioned. Also I created testcases for all types of combinations, including multibytes and empty strings.

@naveenmadhire the added test cases look good, but it looks like your most-recent commit also removed the integration test.
The integration test should include a test like before (basically checking that the function works in a real use case), as well as checking that it works when used as a filter, something like:
select * from table t where instr(t.value, 'test') > 5

I am having some configuration issues when running a end-2-end test cases. I will figure out today and run that.

@gabrielreid I wrote the required test cases in InstrFunctionIT.java. All ASC test cases are working fine. But for DESC I am getting inverted value as output. For expected value 5 the select statement is giving -6. I confirmed that INSTR function is returning the correct value both for DESC and ASC however the output of select is returning different values for DESC. Is there anything else which I need to handle for DESC scenarios.
Interestingly, all the testcases of InstrFunctionTest are working fine.

The tests you've added look good. It looks like the reason that you're getting issues with the DESC tests is because you're returning the SortOrder of the underlying column in the getSortOrder method. Just removing the getSortOrder method completely should resolve this.
It looks like the filter tests also won't work. This will be because the function instance isn't correctly being deserialized/initialized on the server side. Adding in the following method will ensure that the initialization happens correctly:
@Override
public void readFields(DataInput input) throws IOException {
    super.readFields(input);
    init();
}

I also took a closer look at the actual testing of the string searching functionality. It looks to me like this could be a lot more simple, although maybe I'm missing something. However, wouldn't it work to just do the following in the evaluate method:
@Override
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) {

    if (!getStringExpression().evaluate(tuple, ptr)) {
        return false;
    }

    String sourceStr = (String) PVarchar.INSTANCE.toObject(ptr, getStringExpression().getSortOrder());

    int position = sourceStr.indexOf(strToSearch);
    ptr.set(PInteger.INSTANCE.toBytes(position));
    return true;
}

Could you see if that works ok for all test cases, etc? It looks like the code in the searchString method is doing a lot of unnecessary array copying otherwise.

@gabrielreid I didn't realize we have pre defined method already available in stringUtil. I've modified the code accordingly and all the test cases are working fine.
Do you see any other test cases need to be added?

Looks good, and I think that the test cases cover what needs to be covered.
Could you rebase the patch on the master branch, and squash the commits into a single commit? If you're not familiar with how to do this, just let me know and I'll do it when I commit the code.

@gabrielreid I tried to do this, but messed it up and created a new Pull request 61. I am closing this request.


Path of Exile: Changing resolution or settings crashes DXVK

Software information
Name of the game, settings used etc.
System information

GPU: NVIDIA GTX 1050 Ti 4GB
Driver: 418.31.03
Wine version: v4.3
DXVK version: v1.0-11-ga40d8d4

Log files

d3d11.log: PathOfExile_x64Steam_d3d11.log
dxgi.log: PathOfExile_x64Steam_dxgi.log
Proton: steam-238960.zip

002a:fixme:vulkan:wine_vk_device_convert_create_info Application requested a linked structure of type 0x3b9db032.
002a:fixme:vulkan:wine_vk_device_convert_create_info Application requested a linked structure of type 0x3b9b3760.
err:   Failed to create swap chain

This is pretty easy to reproduce, and it probably covers similar reports like #813 because the game may try to recreate the swap chain at start due to non-matching in-game and desktop resolution.
I am able to reproduce it while in the options and switch vsync mode and MSAA modes, the swapchain issue may usually show up when switching MSAA to off. But it may work sometimes, especially when switching options from the lobby/login screen there's a much higher chance of the game not crashing. So for reproduction I recommend testing this from in-game options.

Do you still need a full DXVK/DXGI log?

It should be an absolute no-brainer to post them for any issue you might be having.

Also, please run the game with WINEDEBUG=vulkan and post the full console output. Failed to create swap chain itself isn't very conclusive and could be caused by pretty much anything.

Sorry, this was more or less meant as a first draft of the issue. Creating those logs is a no-brainer, yes. Thanks for pointing out you'd also need the wine vulkan log. I'll be updating the issue asap.

Log files added...

Looks like vkCreateSwapchainKHR returns VK_ERROR_INITIALIZATION_FAILED for some reason, it is never supposed to return that.
Can you please run it with VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_standard_validation set, assuming you have the Vulkan debug layers installed, and post the full output? I'm not sure how to inject that env var into Proton so you might need to capture the output manually.

@kakra Does PoE crash for you? I'm on AMD RX 470 with radv and when I set some resolutions (or ALT-Tab), I can reliably reproduce a "ring gfx timeout":
[drm:drm_sched_job_timedout [gpu_sched]] *ERROR* ring gfx timeout, but soft recovered
I have to kill the process to get back to the desktop.
Anyways I tried to catch something with the VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_standard_validation env. I get a lot of validation messages.
@doitsujin I have no idea if it's useful in any way, but here my logfile:
PoE_change_res_VK_std_val.log

@edmondo are you using the latest version of DXVK? The validation layers complain about vkCmdBlitImage, but DXVK doesn't use that function at all.

I tried to recreate the crash as described by OP on my end, but wouldn't happen no matter how much I play around with VSync and MSAA. The only issue I can reproduce with this game is the one in ticket #813
GPU: NVIDIA GTX 1060 6GB
Driver: 418.43
Wine version: v3.18 (staging + esync)
DXVK version: v1.0

@doitsujin Interesting. I'm using the DXVK version from proton 3.16-8 Beta (game started from Steam):

I tried to start the game without the Steam overlay, but it doesn't really change the log. Let me know if you have any idea for more useful information.
In the next days I will try it without Steam and only with the standalone PoE client with your latest DXVK  code from git and check if something different. Apart from these small issues, the game is running perfectly on my setup, so there is absolutly no urgency for me.

@doitsujin As promised here the validation log file with the standalone PoE client, wine 4.4 and the lastest DXVK.
PoE_start_1080p_change_720p.log
I'm just starting the game and changing the resolution to 1280x720.
I see the resolution change but then it "freezes" there and I get regular "[drm:drm_sched_job_timedout [gpu_sched]] ERROR ring gfx timeout, but soft recovered" kernel messages. I have to kill the PoE process.
I get the vkCmdDraw and vkCmdDrawIndexed validation errors even without the resolution change, so it's probably not related to that.

Should be fixed in latest master. This is essentially another game bug which came to light because DXVK didn't handle empty viewports properly.


introduce PFS

discussion https://github.com/boto/botocore/issues/1822

Codecov Report

Merging #1823 into develop will decrease coverage by 0.33%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #1823      +/-   ##
===========================================
- Coverage    92.54%   92.21%   -0.34%
===========================================
  Files           53       53
  Lines         9958     9971      +13
===========================================
- Hits          9216     9195      -21
- Misses         742      776      +34

Impacted Files
Coverage Δ

botocore/session.py
98.08% <ø> (ø)
:arrow_up:

botocore/utils.py
97.82% <100%> (-0.17%)
:arrow_down:

botocore/endpoint.py
98.6% <100%> (+0.01%)
:arrow_up:

botocore/args.py
100% <100%> (ø)
:arrow_up:

botocore/client.py
99.76% <100%> (ø)
:arrow_up:

botocore/httpsession.py
92.57% <100%> (+0.12%)
:arrow_up:

botocore/awsrequest.py
92.45% <0%> (-5.91%)
:arrow_down:

botocore/compat.py
88.95% <0%> (-4.98%)
:arrow_down:

botocore/handlers.py
96.45% <0%> (-0.48%)
:arrow_down:

botocore/hooks.py
95.98% <0%> (-0.41%)
:arrow_down:

... and 2 more

Continue to review full report at Codecov.

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

I've checked each file this PR touches in the codecov reports and all the LOC codecov says are not covered are not any LOC this PR changed...

code review?
@jamesls
@JordonPhillips
@awstools
@kyleknap

@chrisdlangton I think at this point trying to offer configuration for every knob in the SSLContext is too much and it's probably a better approach to just allow a custom SSLContext to be passed as a client configuration.

@joguSD thank you for commenting.
Basically a custom SSLContext was impossible, i'll evaluate the new botocore state once the PR that removes the vendored requests is merged

@joguSD it is curious you mention this, should I also refactor out the use_ssl and expect an end-user to know how to construct the primitives themselves?
no...
that is crazy fora framework/library.. it's nonsensical to suggest frameworks/libraries should not introduce a feature flag.
THis PR is introducing a feature flag so an end-user can simply chose to enforce the feature called pfs (Perfect Forward Secrecy as it is known) which is actually just a select ciphersuite that (few) people actually know the correct options to use to do this (probably why not many people are doing this today, it's damn hard)
So i fundamentally disagree, we should definitely be abstracticting away these extremely complex features behind a feature flag, botocore does this is almost every line of code.. the most analogous feature flag is the use_ssl flag...

@joguSD it is curious you mention this, should I also refactor out the use_ssl and expect an end-user to know how to construct the primitives themselves?
no...
that is crazy..
For a framework/library, it is nonsensical to suggest frameworks/libraries should not introduce a feature flag.
This PR is introducing a feature flag so an end-user can simply chose to enforce the feature called pfs (Perfect Forward Secrecy as it is known) which is actually just a select ciphersuite that (few) people actually know the correct options to use to do this (probably why not many people are doing this today, it's damn hard)
So i fundamentally disagree, we should definitely be abstracticting away these extremely complex features behind a feature flag, botocore does this is almost every line of code.. the most analogous feature flag is the use_ssl flag...


statusChanged + status "ended" in R5 (MedicationRequest)

After reviewing the specifications of R4, we identified some shortcomings related to our use cases. First, we feel the need for a status like "ended," which is available in R5.
Secondly, we require a timestamp indicating when the status was changed. In R5, we found the "statusChanged" feature, which meets our requirements. This is essential for sorting the list of prescriptions and providing this information to the executors or prescribers.
What would be our best way forward from here, considering we currently have to stay on R4?

We can support the following statuses and reasons:

"expired" means status = cancelled, statusReason = "expired"
"manually cancelled" means status = cancelled, statusReason = "revoked"
For this reason, we decide:
a) we do not need the status "ended" in R4, since our needs are met with status and statusReason as above
b) we will preadopt the statusChanged element from R5 into an extension to our R4 resource profile. This is pending with business updating the functional specs


Persist Flannel network in Etcd

Hi, I am running Flannel in a Docker container, the deployment process is:

Start Flannel in a Docker container using restart=always policy
Configure Docker daemon to use Flannel
Restart Docker daemon

But in real use case, when a user's node is down for 2 days, and starting the node will cause Flannel get a new network. See: https://github.com/coreos/flannel/issues/205
One of the solution I can find is to mount the flannel subnet.env to host path and update the Docker systemd unit file to source subnet.env file and append the flannel config to docker daemon. This need to restart Docker daemon twice.
I think adding an option to flanneld, such as --persist-network to make the Flannel network persist in Etcd to solve this issue.
And, is there any other solution? Thanks.

Are you suggesting that --persist-network would make the assignments of subnets to hosts persist forever, no timeouts?  I presume there is a need to handle the case of a host that leaves the system permanently.  How would that be handled?

@MikeSpreitzer Users should manually remove the network from Etcd.
And maybe a simple tool to scan and clean the network which will be run by a user manually.

@chenzhiwei See https://github.com/coreos/flannel/blob/master/Documentation/reservations.md#reservations for some guidance on this

@tomdee Thanks, I think I can close this issue now.


Console erasing/truncating buffer history

From @MaximoTrinidad on May 26, 2017 15:51
This bug-tracker is monitored by developers and other technical types.  We like detail!  So please use this form and tell us, concisely but precisely, what's up.  Please fill out ALL THE FIELDS!
If you have a feature request, please post to the UserVoice.  If you're reporting a BSOD, don't post here!  Instead, e-mail<EMAIL_ADDRESS>and if possible attach the minidump from "C:\Windows\minidump".

Your Windows build number:  (Type ver at a Windows Command Prompt)
Microsoft Windows [Version 10.0.16199.1000]

What you're doing and what's happening:  (Copy&paste specific commands and their output, or include screen shots)
After executing a number of Linux commands, I scroll-up to review what I type. The history displayed is limited and only scrolling one page.

What's wrong / what should be happening instead:
Seems like buffer history it's been erase or truncated so when you scroll-up only a limited number lines are displayed back. It should display all commands with results of what I've done.

See our contributing instructions for assistance.
Copied from original issue: Microsoft/WSL#2161

From @MaximoTrinidad on May 27, 2017 2:55
No! Could be any command that returns over one page on screen. You still can't page-up or scroll up to see the content.

From @zadjii-msft on May 26, 2017 19:49
You previously ran apt in that console window, right?
This is #1984 IIRC

From @sunjoong on May 27, 2017 9:46

Could be any command that returns over one page on screen.

"cat /etc/inputrc" returns over one page on screen. I commanded "df -h", "cat /etc/inputrc", and then scrolled screen up;

From @MaximoTrinidad on May 30, 2017 18:33
Hum!  I'm currently trying to rebuild my Windows 10 Bash subsystem manually.  It became a little unstable as it gave an error (0x80070091) when trying both uninstall and install.
I will update this incident later!

From @zadjii-msft on May 30, 2017 16:2
Nope, it's not about returning more than one screen of content. apt install sets the scroll margins in a very particular way, or cleans then in a certain way that conhost doesn't clean up properly. I'm sure there are other applications that do this too, but I know for a fact that I can repro this with apt install.

From @zadjii-msft on October 16, 2017 19:53
@gabbayo  what Windows build number are you on?

From @gabbayo on October 16, 2017 17:47
I also notice that this phenomenon appears only after running "apt install".

From @zadjii-msft on October 16, 2017 20:0
Thanks! You're on the Creator's Update, and I think a patch for this issue is available in Fall Creator's update, which should be rolling out tomorrow, so let me know if updating to the latest build doesn't fix this!

From @gabbayo on October 16, 2017 19:57
@zadjii-msft 15063.674


Create an official, Automated Build image on Docker Hub

Docker Hub allows you to create Automated Builds from source: https://docs.docker.com/docker-hub/builds/
It would add another packaging/distribution/installation method, whose buildings would be triggered automatically on each commit. It also allows to create different image tags from git tags & branches (thus allowing to test :develop right away, as shown).
Also, documentation could easily include a canonical docker run statement to quickly try the tool with just a single command.
By making the image build via an AB, you give the resulting image verifiability and auditability. Also, the build is fully automatic. You can have the latest image tag build from HEAD and individual image tags from git's release tags.
Some people avoid non-verifiable (manually uploaded) images due to security & traceability reasons. Docker search command clearly displays AB when listing images.
Just a free Docker Hub account and a quick setup would do. Ping me if you need help.

I will do like in SpamScope. Travis will build and push images for me here

I completely understand your preference on using Travis because it's more convenient for the current workflow (I'm not too familiar with it as of now).
However, that approach has the drawback of not being tagged as an AB on all Docker UIs (web and cli). Verifiability is desirable for some. Added to that, both options are complementary, and an AB on each commit/branch & tag would enable wider testing and convenience to run a specific version.
How does that sound to you?
I also plan to port the tests as run on Travis into the Dockerfile, for running them on each hack/test cycle, but not sure about the convenience, especially if they're too long/heavy. What do you recommend? Which ones would be a good balance between speed/coverage?

I solved this issue with this commit.


Elastic error when update alert with a file

Request Type
Bug
Work Environment

Question
Answer

OS version (server)
Debian

TheHive4py version
1.5.3

Problem Description
hi!!
When I try to update an alert by sending a file-type observable (100KB) I get the elasticSearch error:
document contains at least one immense term in field

if this file is uploaded at the creation of the alert I have no problem.
Steps to Reproduce

Create alert
Update alert with a file observable with a large file

Complementary information
I don't know if you can refer to this:
https://github.com/TheHive-Project/TheHive4py/issues/119
thanks!!

Hello @joseluratm could please share the code sample that generates this issue, and what field contains that immense term in field?
Do you have a better log output form TheHive (/etc/thehive/application.log)


Fix compound binding regex when a binding is preceded with text with { or ]

As outlined by @david-saslawsky in his comment another edge-case for the regex is
[YES]/[NO] {{computeCompound('world', 'username ', 'Hello {0} ')}}
Therefore the regex is once again (sorry for the multiple PR's) changed to also cover this edge-case. Updated the original test-case to reflect this change.

@kevinpschaaf PTAL

There has been a problem reported in https://github.com/GoogleWebComponents/google-chart/issues/73#issuecomment-156607495 where the regex updated in #2705 matched the JSONArray, which it did not before. I have derived two possible actions:

Do not do anything. While this sounds weird, the JSONArray does match the description in the docs: A binding annotation consists of a property name or subproperty name enclosed in curly brackets ({{}}) or square brackets ([[]]).. The "name" is a list of JSONObjects. However, in order to circumvent this issue, a new regex can be even more strict, as shown in option 2:

Further restrict the allowed names to bind on. This solution is again more intelligent, but with every update it also lowers the maintainability and might cause collateral damage (like what happened with the JSON). It would allow all tests to pass, but creates more edge-cases. The regex I came up with:

// Regex with comments, compiles to:
// ((?!\{\{|\[\[).+?)?(\{\{|\[\[)((?:!)?(?:(?:[\w\s\-\_\.\:\$]+?)|(?:[\w\s\-\_\.\:\$]+\(.*?\))))(?:\]\]|\}\})
_bindingRegex: (function() {
  // Opening Binding options
  var ob = '\\{\\{|\\[\\[';
  // All allowed characters in a name of property or computed function
  var name = '[\\w\\s\\-\\_\\.\\:\\$]+';

  return new RegExp('((?!' + ob + ').+?)?'  // Everything that is not a {{ or [[
    + '(' + ob + ')'                        // The mode (two- or one-way)
    + '('                                   // Start of contents of the binding
      + '(?:\!)?'                           // Is the binding a negation
      + '(?:'                               // Can either be name or computed function
        + '(?:' + name + '?)'               // A normal name for a property
      + '|'                                 // Or
        + '(?:' + name                      // The name of the computed function
        + '\\(.*?\\)'                       // The arguments of the function within ()
        + ')'                               // End of computed function match
      + ')'                                 // End of name of property or computed function match
    + ')'                                   // End of the whole match returned as m[2]
    + '(?:\\]\\]|\\}\\})'                   // The binding closing

    ,'g')
  })(),

Both options have pro's and con's. Option 1 requires users to put JSON as return value of a computed function or property, option 2 is significantly more difficult to maintain and understand. Personally, I don't know what the way to go is. I only wanted to show that both options are possible.
I hope this information is useful, please let me know what option would be desirable.
cc @ebidel @kevinpschaaf @azakus @sorvell

1 would be a breaking change, so I'm not sure we have much of an option other than to get this working again as it was.

For option #1, couldn't you also put a space between the brackets? I believe "[ [1, 2, 3], [3, 4, 5] ]" would passed through unscathed.

@arthurevans Yes that is correct. This would not match on the regex, but parse as JSON.

Future complexity may be tamed by decoupling the one-way data binding anchors from valid JSON (choosing new anchors)
Here are some more cases but the intent here may be ambiguous between the use of existing features:

one-way data binding w/ literal
JSON string literals in attributes with intent of Array or Object deserialization:

[[0]]
[[0.01]]
[[true]]

I have inserted another option to counterfeit JSON edge-cases as pointed out by @jongeho1

I think the problem with the option #3 is not that is is too complex but that it not tight enough to prevent all false positive matches.
The current parser is not that simple to maintain, it does not recognizes things it should:
[[localize(',')]]

[[alert('[[caution]]')]]

[[
foo (
   bar, 123
)
]]

It also recognizes things it shouldn't - which creates a risk of collision with other syntax and makes typos harder to find:
[[compound(foo]]     // silently removed

So it seems to me that there are also maintenance and complexity costs with option #1
I mean, polymer is great as it is. You sure don't run into these problems everyday and there are workarounds in pretty much all cases - but still, trying to match an airtight syntax does not seem that expensive to me:
var NUMBER = '(:?' + '[0-9]+' + ')';
var STRING = '(:?' + '\'[^\']*\'' + ')';    // todo: string escaping and double quotes
var IDENTIFIER = '(:?' + '[\\w\\s\\-\\_\\.\\:\\$]+' + ')';

var ARGUMENT = '(:?' + IDENTIFIER + '|' + NUMBER + '|' +  STRING + ')';
var ARGUMENT_LIST = '(:?' + ARGUMENT + ',?' + ')*';
var COMPUTED_FUNCTION = '(:?' + IDENTIFIER + '\\(' + ARGUMENT_LIST + '\\)' + ')';
var BINDING = '(:?' + COMPUTED_FUNCTION + '|' + IDENTIFIER + ')';
var EXPRESSION = '\\[\\[' + BINDING + '\\]\\]' + '|' + '\\{\\{' + BINDING + '\\}\\}';

var bindingRegex = new RegExp(EXPRESSION, "g")

Improving and testing each individual sub-expression is still easy.
If this "one regular expression to rule them all" approach doesn't work (it runs but I haven't tested the speed or the compatibility), another option is to use the RE as a poor man's lexer that split the input string into a stream of tokens - as soon as something that looks like a binding is detected.
The trick would be to bail out and leave the HTML untouched in case of parser error. Ambiguities between json and polymer syntax are rare and wouldn't take long to resolve anyway.

@ebidel Just as a point of order, I want to point out that not disambiguating nested JSON array literals from one-way bindings has been a long-standing issue (https://github.com/Polymer/polymer/issues/1734) which only temporarily worked for two releases (v1.2.0 and v1.2.1) as an unintentional side-effect of changes that came with compound binding, so I'm inclined to go a little more slowly w.r.t. reacting to that particular "breakage".
That said, I'm reviewing @david-saslawsky's expression for performance impact and if we can make it work with the existing bespoke string escaping.

I really like the syntax of @david-saslawsky , but keep in mind this is a breaking change regarding naming of variables. (I think this limitation is the way to go to prevent updating this regex every week) The consequence would be that update must become a MAJOR update according to semver.

Sorry if this is not the right place to discuss this.
I've made more a complete version of the regex:
var NUMBER = '(:?' + '[-+]?[0-9]*\.?[0-9]+(:?[eE][-+]?[0-9]+)?' + ')';

var SQ_STRING = "\\'(?:\\\\.|[^'\\\\])*\\'";
var DQ_STRING = '\\"(?:\\\\.|[^"\\\\])*\\"';
var STRING = '(:?' + SQ_STRING + '|' + DQ_STRING + ')';

var IDENTIFIER = '(:?' + '[\\w\\s\\-\\_\\.\\:\\$]+' + ')';

var ARGUMENT = '(:?' + IDENTIFIER + '|' + NUMBER + '|' +  STRING + ')';
var ARGUMENT_LIST = '\\(' + '(:?' + ARGUMENT + '(:?,|\\))' + ')*';
var COMPUTED_FUNCTION = '(:?' + IDENTIFIER + ARGUMENT_LIST + ')';
var BINDING = '(:?' + COMPUTED_FUNCTION + '|' + IDENTIFIER + ')';
var EXPRESSION = '(\\[\\[|\\{\\{)' + '(' + BINDING + ')' + '(:?\\]\\]|\\}\\})';

var bindingRegex = new RegExp(EXPRESSION, "g")

Floats and string escaping work. Spaces and newlines are not supported but this shouldn't have much impact on the performance (I would expect that most of the time is spent looking for the [[ or {{).
This is almost airtight but I can't find a way to handle comma correctly in the argument list.
[[foo(123,'d\'oh','[[x]]')]]    // this is recognized
[[foo(123,'d\'oh','[[x]]',]]    // ... but so is this

In the long term, the "Regexp as a lexer" approach seems even more robust and flexible. Maybe something like:
var SYMBOL = "[,\\(\\)]";
var re = new RegExp('(' + NUMBER + ')|(' + STRING + ')|(' + SYMBOL + ')' + ...);
...
re.lastIndex = (index of the '[[') + 2;
while((match=re.exec(str)) !== null) {
    // parser state machine
    switch(parser.state) {
        ...
        case STATE_ARGUMENT_LIST:
            if(match[1])) { /* accept number */ }
            else if(match[2])) { /* accept string */ }
            else { /* error */ }
    }
}

This can parse things impossible to parse with a regexp:
foo(bar(),[['baz']])    // nested functions and JSON constants

Please let me know if I can be of any help.

@david-saslawsky It might be good to create a PR with your fix so it can be reviewed more easily. I think I have the solution for the argument comma problem.

@david-saslawsky I modified your regex to pass the tests when integrated with Polymer and then ran some rudimentary perf tests against it.  While much more correct than the previous, it highlighted a potential catastropic backtracking situation due to the repeating quantifiers for IDENTIFIER characters nested inside repeating ARGUMENT expressions when failing a partial match.  I finally resolved the perf issue using an approximation for atomic groups using lookahead+immediate back-referencing, which made it a little more complex but still an overall improvement.
In my tests, it now parses faster than the regex on master and pretty close to the parsing speed in v1.1.5 before we added compound bindings, so I'm inclined to go with this solution, despite being slightly more strict about identifier characters allowed (I fail to see this as any sort of practical problem).  I will put up a PR for this shortly.
It also has the happy side-effect of once-again excluding most nested JSON array literals (due to the stricter expression matching) and makes the google-chart repro work again.

Closing in favor of #3017


Export as library

So it can be used instead of having to rely on submodule
Depends on #6

#6 is closed, does it mean there's no blocker anymore?

None detected at least!


Opening an image from the results trigger the SQL commands

Bug description
When downloading and importing into a Gelbooru instance, two posts are made and tags are not valid.
Steps to reproduce

Followed the GelBooru documentation for Bionus.
Install the QTMySQL drivers (See Issue 1892)
Set up connection to SQL server.
4.. Use the same commands in the Bionus guide.
5.. Save an image from any source.

Context
main.log

Providing your settings.ini file will greatly help maintainers reproduce your problem if it may be caused by your configuration.

settings.zip
System information

OS: Windows 10
Grabber version: V7.2.1
Gelbooru version: Beta 0.1.11

Additional context
This is a Booru server that is hosted on a different server than the host I am on. I also tried the nightly build with the same issues.

I can see the double SQL execution of "INSERT INTO posts" in your log, so I'll investigate why this happens for you.
However, I'm not sure what you mean by "broken tags"? Is it caused by the double insert in the posts? Because the SQL for tags doesn't seem to have any issues?

I'm not sure exactly what is causing it but the tags are kind of "phantom" so to speak. They get made and linked to the image, but there's no tag count (amount of images with that tag) and they are all hidden on the booru by default unless you show them.
I've attached an image, hopefully it helps make sense of the issue. I know how to fix the broken thumbnails I just didn't fix them as a sort of sensor.

There are no longer two images on the booru when saving in the nightly build however the tag's still have the same issues for me.

Not sure why you say it's related to tags since it's just because the thumbnail was not generated?
Check the bottom part of the tutorial, it's mentioned there:
https://bionus.github.io/imgbrd-grabber/docs/commands/gelbooru.html#thumbnails
You should open thumbs_fix.php.

Running the thumbnail fix doesn't correct the tag count or put it in the newest image category.

Did you properly add the "tag" command? Because from your settings file it seems like you haven't:
INSERT INTO tag_index(tag, index_count) VALUES("%tag%", 1) ON DUPLICATE KEY UPDATE index_count = index_count+1;

Just added the tag command back in, it still does the same thing. I'm not sure if this will help but I've included an updated log from when I tested.
main.log

Just added the tag command back in, it still does the same thing. I'm not sure if this will help but I've included an updated log from when I tested.

I just checked your log and it contains:
[16:21:18.949][Info] SQL execution of "INSERT INTO tag_index(tag, index_count) VALUES("'Steven_Universe'", 1) ON DUPLICATE KEY UPDATE index_count = index_count+1;
"

I see two main issues here:

Why is there a line break at the end of your command? (it can be seen by the double quote on a new line) Did you add the commands by editing the INI file somehow?
The tags are getting escaped but are already in double quotes, so in your database you're having both Steven_Universe (generated from adding the image, and without count), and 'Steven_Universe' with single quotes (generated from the tag command, with a count of 1).

My bad then, you should use the command without the quotes around %tag%:
INSERT INTO tag_index(tag, index_count) VALUES(%tag%, 1) ON DUPLICATE KEY UPDATE index_count = index_count+1;

That seems to fix the tagging issue (I deleted my config and remade it in the client with the new setting you posted above). Images still don't appear to be showing up in Newest Images, but at least the tags are working now.


fix(dial): fixes quantisation display issue with dials

fix #67

:tada: This PR is included in version 1.2.4 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Returns available data when doing remote read and warnings if remote read fails.

This is a remake of: https://github.com/prometheus/prometheus/pull/4426
Reasonably significant changes were made since that PR and I feel as though the comments and whatnot aren't very relevant anymore, so I remade it.
The purpose of this PR is to fix an issue with remote read where if any remote read source failed, then the entire query would fail. With this change, any query errors that occur that aren't from the primary data source (the local tsdb) are instead returned as a list of warnings and the query continues. In addition, if a query fails midway through, no data from that data source is returned, keeping the all-or-nothing approach used in most cases.
On thing that I still think should be done is displaying the warnings on the web UI in the same manner that errors are displayed. But I'd like to get this up for review while I work on this. @brian-brazil has given me a lot of feedback on the other PR and I'm hoping this solution is a better approach.
Signed-off-by: Mark Knapp<EMAIL_ADDRESS>

On thing that I still think should be done is displaying the warnings on the web UI in the same manner that errors are displayed.

That would be good, but it doesn't have to happen all in the one PR.

@brian-brazil I'm seeing now that there's some new merge conflicts, but I was wondering if you had a chance to look over this again? Thanks

Apologies, I didn't realize you were talking about literal "TODO" comments in the code, I thought you meant stuff that you had requested. I'm not sure what the best way to handle warnings in the federation is. Right now there's a metric for the number of errors occurring, would it be appropriate to do the same for the number of warnings?

Log it at debug level and bumping a metric sounds good to me. Really federation should only be using local data, so long term it won't matter.

TODO's are now TODONE and the merge conflicts are resolved @brian-brazil

You've got a conflict still.

That must have come up over the weekend, resolved now. @brian-brazil

One last thing, the API docs need updating for the new field.

I wasn't sure how in depth you wanted the description, let me know what you think @brian-brazil

@brian-brazil I fixed a merge conflict and changed the description in the docs, what do you think now?

It would be good to document this, I added a docs issue for that: https://github.com/prometheus/docs/issues/1243


branch specification

It might be handy to be able to specify which branch to commit to

I think this is addressed by https://github.com/rstad/Jira-Workflow-XML-Logger/commit/ebd74e07ff4e8f14b28c3873cbe6dbe19daf415d


Rename Vectord to VectorNd

This PR resolves #199.

Codecov Report

Merging #209 into master will increase coverage by 0.02%.
The diff coverage is 81.81%.


fix computed signal cycle

Closes https://github.com/rodydavis/signals.dart/issues/349
Shoutout to @tdomarkas for catching it

LGTM!


How can i set the ID for Hidden Input?

I'm trying to set the ID for my hidden input. Something like:
{{ Form::hidden('name', 'value')->id('id') }}
I've searched here and at BootForm package and didn't find a solution.
Thanks.

@ricardovigatti, sorry for the delay.  You can indeed set the ID, just as you are in the above example.
{!! Form::hidden('name', 'value')->id('id') !!}

Outputs:
<input type="hidden" name="name" id="wat">

This works in both form and bootforms packages (bootforms actually delegates this to the base form builder) using PHP's magic methods.  Any method not defined by form/bootforms will delegate to attribute().  Example...
{!! Form::hidden('name', 'value')->attribute('lol', 'catz') !!}
{!! Form::hidden('name', 'value')->lol('catz') !!}

Both of the above examples will output:
<input type="hidden" name="name" lol="catz">

I'm getting a FatalErrorException: Call to a member function id() on a non-object.
And i'm trying to use exactly like said above.
{!! Form::hidden('name', 'value')->id('someid') !!}

// with attribute the error is the same
{!! Form::hidden('name', 'value')->attribute('id', 'someid') !!}

@ricardovigatti weird.  Can you confirm which package version you have installed?  If you are on mac or linux, you should be able to run this to find out which version is currently installed:
cat composer.lock | grep '"name": "adamwathan/form"' -C 1

i'm on Windows, anyway, i'm using the last version, tagged as v0.8.10.
I decided to try again and see whats happens:
// did not work
{!! Form::hidden('name', 'value')->attribute('id', 'someid') !!}

// surprise! that works.
{!! BootForm::hidden('name', 'value')->attribute('id', 'someid') !!}

@ricardovigatti Curious what Form facade/alias is set to in your /config/app.php?

@JesseLeite Awesome! You found the problem.
I remembered of changing my facades to use the Form Collective package.
'AdamForm'  => 'AdamWathan\Form\Facades\Form',
 'BootForm'  => 'AdamWathan\BootForms\Facades\BootForm',
// [ ... ]
'Form'      => 'Collective\Html\FormFacade',
'Html'      => 'Collective\Html\HtmlFacade',

Now i'm using AdamForm::hidden() in my views.
Thanks.

@ricardovigatti No problem.  Don't mix your drugs!  And definitely don't mix your form packages!  Adam's base form package is (IMO) a huge improvement to the collective form package.  Unless you are using that collective form package, you could just rip it out ;)


Document how to parse enums without ReflectDecorators

I want to deserialize an enum property without ReflectDecorators:
enum Color { red="RED", green="GREEN", blue="BLUE" }

@jsonObject
class Thing {
    @jsonMember({what: "todo?"})
    public color?: Color
}

console.log(TypedJSON.parse('{"color": "green"}', Thing));
// should log Object { color: "green" }

console.log(TypedJSON.parse('{"color": "infradead"}', Thing));
// should throw error

How do I populate those @jsonMember options to achieve this? Enum types don't have a constructor.
The only solution I've found is:
function deserializeColor(value: string): Color {
    const keyValue = value as keyof typeof Color;
    if (keyValue in Color) {
        return Color[keyValue];
    } else {
        throw new SyntaxError(`${keyValue} is not a valid Color`);
    }
};

@jsonObject
class Thing {
    @jsonMember({deserializer: deserializeColor})
    public color?: Color
}

but that's pretty verbose, and requires a separate deserializer function for each enum type (or at least I haven't found a workable way to make it generic).

I understand it's perhaps not the most intuitive thing ever, but you have to think with the runtime code here, i.e. that your enum is in fact a string at runtime:
enum Color { red="RED", green="GREEN", blue="BLUE" }

@jsonObject
class Thing {
    @jsonMember({ constructor: String })
    public color?: Color
}

Keep in mind that this is not going to be value-checked at runtime. To do that, you can instead use jsonMember with an accessor, e.g.:
enum Color { red="RED", green="GREEN", blue="BLUE" }

@jsonObject
class Thing {
    private _color?: Color;

    @jsonMember({ constructor: String })
    public get color(): Color ...
    public set color(value: Color) ...
}


Imprecision in the documentation

@mdesimoneIWG commented on Mon May 04 2020
I wanted to report that to the headword "In the Windows Configuration Wizard experience, adding a local Active Directory (AD) domain is not supported. If you plan to add a computer to an AD domain, during installation you must select the Configure Windows link with a local account. You can then add the domain from your computer settings. " mention is made of the impossibility of adding the PC to the local domain, this is however possible via Windows Autopilot via the Intune connector. This paragraph should be updated.
Greetings.

Dettagli del documento
⚠ Non modificare questa sezione. È necessaria per i collegamenti relativi ai problemi tra docs.microsoft.com ➟ GitHub.

ID: 7a7a5351-21c0-946d-fdc0-5e1943aa0a01
Version Independent ID: acf0eb8d-109f-c3b4-b862-adb61ae8fdc7
Content: Aggiungere un nuovo dispositivo Windows 10 con Azure AD in fase di completamento dell'installazione
Content Source: articles/active-directory/devices/azuread-joined-devices-frx.md
Service: active-directory
Sub-service: devices
GitHub Login: @MicrosoftGuyJFlo
Microsoft Alias: joflore

@srvbpigh commented on Mon May 04 2020
Hello, @mdesimoneIWG
Thank you for your feedback.
We are actively reviewing your comments and will get back to you soon.
Kind regards,
Microsoft DOCS International Team

@mdesimoneIWG Thanks for bringing this to our notice. We are checking into the same and will update you shortly.

@MicrosoftGuyJFlo Could "THIS" document be updated as needed ?

@CeciAc So the statement in the document is correct you cant by default join an on-premises AD DS domain from the first run experience. This document if directing people to Azure AD join their devices.

#please-close


Wrong URL

The URL "www.mstfconnecttest.com" ist wrong and should be "www.msftconnecttest.com".

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

ID: 5de1e69c-aee8-2cd4-3f69-5288253d9b2a
Version Independent ID: 3bcee52a-c7be-6ce3-05a9-2409ec30661c
Content: Other endpoints not included in the Office 365 IP Address and URL Web service - Microsoft 365 Enterprise
Content Source: microsoft-365/enterprise/additional-office365-ip-addresses-and-urls.md
Service: o365-administration
GitHub Login: @kelleyvice-msft
Microsoft Alias: kvice

@StefanZGit Thank you for your feedback. We have made changes to the document via PR#https://github.com/MicrosoftDocs/microsoft-365-docs/pull/8331
Once the author approves, the changes will be live.
Thanks
Sri

@yogkumgit This can be closed.

@msbemba Thank you very much for the contribution and updating the documentation with PR. @StefanZGit Hope this update is helpful for you. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


Created support for CSS transitions

Closes #119
Changes/Additions:

Created support for CSS transitions in the global CSS schemes loader
Implemented transitions on existing buttons and console opening / closing
Now supporting the prefers-reduced-motion media feature
Simplified the Console component by removing an unnecessary element

LGTM


Rename steps_not_to_run and --no-steps

I renamed these to steps_to_skip and --skip-steps because it was more understandable, the former was a little confusing to read.

Checklist

[x] Developer's Guide has been updated
[x] API documentation in the Developer's Guide (api.md) has any new or modified class, method and/or functions listed
[x] Documentation has been built locally and changes look as expected

I did build the documentation locally and it looked as expected. I didn't run any tests, but I can if that seems like it would be useful.


Inv migrate error

Hello I want to set up my InvenTree on Rpi4. I done installation and when I type inc migrate I get that:
========================================
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/pi/inventree-env/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/pi/inventree-env/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/home/pi/inventree-env/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/pi/inventree-env/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/home/pi/inventree-env/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pi/inventree/InvenTree/label/models.py", line 11, in <module>
    from blabel import LabelWriter
  File "/home/pi/inventree-env/lib/python3.7/site-packages/blabel/__init__.py", line 5, in <module>
    from .blabel import LabelWriter
  File "/home/pi/inventree-env/lib/python3.7/site-packages/blabel/blabel.py", line 6, in <module>
    from weasyprint import HTML
  File "/home/pi/inventree-env/lib/python3.7/site-packages/weasyprint/__init__.py", line 469, in <module>
    from .css import preprocess_stylesheet  # noqa isort:skip
  File "/home/pi/inventree-env/lib/python3.7/site-packages/weasyprint/css/__init__.py", line 27, in <module>
    from . import computed_values, counters, media_queries
  File "/home/pi/inventree-env/lib/python3.7/site-packages/weasyprint/css/computed_values.py", line 15, in <module>
    from .. import text
  File "/home/pi/inventree-env/lib/python3.7/site-packages/weasyprint/text.py", line 11, in <module>
    import cairocffi as cairo
  File "/home/pi/inventree-env/lib/python3.7/site-packages/cairocffi/__init__.py", line 50, in <module>
    ('libcairo.so.2', 'libcairo.2.dylib', 'libcairo-2.dll'))
  File "/home/pi/inventree-env/lib/python3.7/site-packages/cairocffi/__init__.py", line 45, in dlopen
    raise OSError(error_message)  # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory

The same error appears when I type pythons manage.py migrate.
Please help me with this issue.

@pawcio0928 Please see the "Solving Cairo Error" note in the doc: https://inventree.readthedocs.io/en/latest/start/install/#create-admin-account
That should help you solve your problem :smiley:

@pawcio0928 Please see the "Solving Cairo Error" note in the doc: https://inventree.readthedocs.io/en/latest/start/install/#create-admin-account
That should help you solve your problem :smiley:

@eeintech Thank you for solving my issue.

@eeintech Thank you for solving my issue.


Use of parameter "chunk_size" with "GROUP BY" causes invalid JSON response

Bug report
System info:
Ubuntu 14.04.4 LTS, 64-bit (trusty)
InfluxDB 0.13.0 (installed from package)
Steps to reproduce:
The following script reproduces the issue.
https://gist.github.com/mhodson-qxbranch/2516ed2308c28d2c6d8ff543bf63d979
Expected behavior:
Expect these queries to return a single JSON response with a single "results" section.
Actual behavior:
The current response is multi-line, one per series, with each line being an independent valid JSON response with a unique set of tags.
Additional info:
The effect of this bug when for example using the ruby bindings is that a JSON parse error is raised.
As a work-around, multi-line response parsing and merging of the resulting hash (or equivalent) can be performed on the client. However it is not known if this work-around has any edge cases (it depends whether any top-level item other than "results" is possible in the hash).
This should be fixed on the server-side.

I suspect this isn't a bug, but intentional. The format you describe is known as JSON streaming: https://en.wikipedia.org/wiki/JSON_Streaming
It's useful to prevent from having to load the entire response payload into memory, which can be extremely expensive with tens of thousands of records.
Though I could find no documentation stating that this is the expected behavior, so at the very least that should at least be done.

I had never heard of that. Good pickup. The issue for myself as an end-user was via the official Ruby bindings, which throw a JSON parse error when this occurred. I've stood up a fork to address it which seems to work (https://github.com/mhodson-qxbranch/influxdb-ruby/tree/support-chunk-size) but will have to take it through the process of review. There's no PR yet.
If your experienced devs could consider where this might occur, and what the proper action is, we can compare notes and at least stand up a robust solution for the Ruby client?

The alternative of course within a single response is still to perform the merge on the server side. That would alleviate any client-side issues.

If chunking is enabled, the response that's returned will be streaming JSON with each batch being a maximum size of the chunk size. If you have multiple series get returned, they get streamed as separate batches even if they haven't hit the chunk size.
I hope this PR helps clarify the behavior: influxdata/docs.influxdb.com#530. I'm going to close this since I don't think there's any action to take for the database itself. Please comment and I can reopen if there is something I'm missing. Thanks.

No problem. I'm updating the PR for influxdb-ruby to support this feature.


RecoveryServices Backup Onboarding for Python SDK

Code generated against: https://github.com/Azure/azure-rest-api-specs/blob/3396af0038f19b21ac417e14c6f82a7b5e646e60/arm-recoveryservicesbackup/readme.md
PR: https://github.com/Azure/azure-rest-api-specs/pull/1267
Tests:

One end to end scenario for IaaSVM

Get policies
Configure protection
Track operation
Trigger backup
Get Recovery points
Trigger Restore
Provision ILR connection
Track operation and validate
Revoke ILR connection
Remove protection

List all operations via Operations_List API

@DheerendraRathor,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Codecov Report

Merging #1203 into master will increase coverage by 0.64%.
The diff coverage is 70.73%.

@@            Coverage Diff             @@
##           master    #1203      +/-   ##
==========================================
+ Coverage   54.99%   55.64%   +0.64%
==========================================
  Files        2255     2424     +169
  Lines       62408    65084    +2676
==========================================
+ Hits        34323    36216    +1893
- Misses      28085    28868     +783

Impacted Files
Coverage Δ

...kup/models/azure_iaa_scompute_vm_protected_item.py
100% <100%> (ø)

...ns/protected_item_operation_statuses_operations.py
100% <100%> (ø)

...ryservicesbackup/models/protected_item_resource.py
100% <100%> (ø)

...overyservicesbackup/models/ilr_request_resource.py
100% <100%> (ø)

...t/recoveryservicesbackup/models/restore_request.py
100% <100%> (ø)

...dels/azure_iaa_svm_protected_item_extended_info.py
100% <100%> (ø)

...ervicesbackup/models/long_term_retention_policy.py
100% <100%> (ø)

...vicesbackup/models/instant_item_recovery_target.py
100% <100%> (ø)

...recoveryservicesbackup/models/protection_policy.py
100% <100%> (ø)

...servicesbackup/models/workload_protectable_item.py
100% <100%> (ø)

... and 328 more

Continue to review full report at Codecov.

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

@DheerendraRathor looks good to me!!
I just pushed the packaging files of your package (because Autorest generates good Python code, but not correct packaging files).
Should I release this on Monday?

@lmazuel Yeah, sure! That will be great, Thanks!

@DheerendraRathor released:
https://pypi.python.org/pypi/azure-mgmt-recoveryservicesbackup/0.1.0


skip_row does not detect the difference when m2m objects are being updated

skip_row method does not the difference between ManyToMany objects in instance or original because the instance related objects remain unchanged.
When using skip_row all models where m2m changed are detected as unchanged thus the whole transaction is skipped

To workaround this, I overrode skip_row and added a clause like this:
            if field.attribute == 'tags':
                tags = split_tags(self._row.get('Tags'), self._all_tags, separator=',')
                orig_tags = set(field.get_value(original).all().values_list('name', flat=True))
                if tags != orig_tags:
                    return False

Which is a lousy hack, but does the job.

Am I missing something or did you cache the file row data in _row somewhere else (looking at the 0.7.0 & 1.0.0 releases

This is my workaound attempt at fixing this issue. For M2M, I sent in the row parameter and use that to detect whether the value of the export is different than the value in the row. Note that this only works if the export value is unique. You'll have to modify the skip_row function to include the new row parameter.
def skip_row_fix(self, instance, original, row):
    if not self._meta.skip_unchanged:
        return False
    for field in self.get_import_fields():
        if isinstance(field.widget, ManyToManyWidget):
            if self.export_field(field, original) != row[field.attribute]:
                return False
        else:
            try:
                if list(field.get_value(instance).all()) != list(field.get_value(original).all()):
                    return False
            except AttributeError:
                if field.get_value(instance) != field.get_value(original):
                    return False
    return True

I also struggled to update a M2M field which was defined like this:
tags = fields.Field(column_name="tags", attribute="tags", widget=ManyToManyWidget(Tag, field="name"))

What I ended up doing was to write custom code in the import_obj() method, where I manually compare the instance.tags with the row.tags, and do a instance.tags.set() with the corresponding ids (having transformed the tag names into ids beforehand). More importantly, and similarly to a comment above, I add self._m2m_updated = True (False if no changes) before calling super, so that I'm able to set skip_row() to False for these rows.
Please let me know if there is something easier to do 🤔 🙏
Full code below, hope it helps :)
class QuestionResource(resources.ModelResource):
    category = fields.Field(
        column_name="category",
        attribute="category",
        widget=ForeignKeyWidget(Category, field="name"),
    )
    tags = fields.Field(
        column_name="tags", attribute="tags", widget=ManyToManyWidget(Tag, field="name")
    )

    def import_obj(self, instance, row, dry_run):
        """
        Manually manage M2M column
        - tags: get the row's comma-seperated tags, get their ids, check if they are
        different than the instance, and finally set them to the instance
        """
        tags = row.get("tags")
        tag_ids = []
        if tags != "":
            tags_split = tags.split(",")
            for tag_string in tags_split:
                tag = Tag.objects.get(name=tag_string)
                tag_ids.append(tag.id)
            tag_ids.sort()
        if list(instance.tags.values_list("id", flat=True)) != tag_ids:
            instance.tags.set(tag_ids)
            self._m2m_updated = True
        else:
            self._m2m_updated = False
        super(QuestionResource, self).import_obj(instance, row, dry_run)

    def skip_row(self, instance, original):
        """
        Highlight row if M2M column was updated
        """
        if self._m2m_updated:
            return False
        return super(QuestionResource, self).skip_row(instance, original)

    class Meta:
        model = Question
        skip_unchanged = True
        report_skipped = True


[Docs Site] Landing Page

Finish the landing page including dynamic components.
Figma design: https://www.figma.com/proto/jxzg0xbPBLbWz2BFsFPPx1/Prototypes?node-id=1654%3A22500&scaling=min-zoom&page-id=1429%3A21963&starting-point-node-id=1654%3A22500

@10thfloor should this issue belong to a different repo? we should move or close this one


allow for line breaks in translations

My fix to allow line breaks (\n) in the translation js files was to introduce a line of code on line 159 of i18n.js:
	__: function () {
		var msg = this.translate(this.locale, arguments[0]);

		if (arguments.length > 1) {
			msg = vsprintf(msg, Array.prototype.slice.call(arguments, 1));
		}

		msg = msg.replace(/\n/g, "
"); //allow line breaks

		return msg;
	},

that means that an input like this:
{
"Never miss out, you can watch a replay.": "永远不会错过，\n您可观看重播",
}

outputs like this in express.js:
in template file: <%- __("Never miss out, you can watch a replay.") %>
actual code printed on page: 永远不会错过，
您可观看重播
Is there a better way to do this? Or any plan to allow for  output in future?

Could you make a pull request for this ? Your fix seems interesting


How mesh is extracted?

Hi @jetd1,
Thanks for your great work!
I would like to ask how the mesh was extracted?
I checked the paper but could find it, maybe I missed something.
Thank you.

@anhquancao  I see that there is a depth map in the model output in the code. Maybe you can get mesh by combining the depth map with the mvs code

Hi @liusang , thanks for your info!


Anchore plugin added

Update will be rolling out somewhere this week to make it more space friendly. Will update it as soon as I will receive a notification from developer.

Making new PR with new version of Anchore which partially solves space issue.


[SPARK-34660][TESTS][3.1] Don't use ParVector with withExistingConf which is not thread-safe

What changes were proposed in this pull request?
This PR aims to remove ParVector usage with withExistingConf in CastSuite in order to fix UT failures.

This was added by SPARK-33498 .
master branch doesn't use ParVector.

- new ParVector(ALL_TIMEZONES.toVector).foreach { zid =>
+ ALL_TIMEZONES.foreach { zid =>

Why are the changes needed?
withExistingConf is not thread-safe like the following. We should not use ParVector on it.
def withExistingConf[T](conf: SQLConf)(f: => T): T = {
  val old = existingConf.get()
  existingConf.set(conf)
  try {
    f
  } finally {
    if (old != null) {
      existingConf.set(old)
    } else {
      existingConf.remove()
    }
  }
}

Does this PR introduce any user-facing change?
BEFORE
$ build/sbt "catalyst/testOnly *AnsiCastSuiteWithAnsiModeOn *ExpressionEncoderSuite -- -z parse -z nested"
...
[info] *** 4 TESTS FAILED ***
[error] Failed: Total 8, Failed 4, Errors 0, Passed 4
[error] Failed tests:
[error] 	org.apache.spark.sql.catalyst.encoders.ExpressionEncoderSuite

AFTER
$ build/sbt "catalyst/testOnly *AnsiCastSuiteWithAnsiModeOn *ExpressionEncoderSuite -- -z parse -z nested"
...
[info] All tests passed.

How was this patch tested?
Pass the CIs on branch-3.1. Currently, it's broken.

Test build #135857 has started for PR 31775 at commit 6bfb870.

cc @leanken , @cloud-fan , @rednaxelafx , @maropu , @kiszk , @viirya

Great analysis!

Thank you, @kiszk !

This is a test-only PR and I tested this manually. Merged to branch-3.1 to recover the branch.

late lgtm.

late LGTM

late lgtm

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/40439/

Test build #135857 has finished for PR 31775 at commit 6bfb870.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135857/

Thank you, @maropu , @cloud-fan , @viirya .
BTW, @maropu . Could you make a follow-up, please?

nit: It looks like we don't need to wrap SQLConf.withExistingConf now.

Yea, I'll do it later.


Can't install by using go install

Version
1.23.0
What happened?
1.23.0 can't be installed by go install. Seems like that version doesn't support Go 1.20 and older.
Relevant log output
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
../../../go/pkg/mod/github.com/pingcap/tidb/parser@v0.0.0-20231010133155-38cb4f3312be/charset/charset.go:17:2: package cmp is not in GOROOT<EMAIL_ADDRESS>../../../go/pkg/mod/github.com/sqlc-dev/sqlc@v1.23.0/internal/analyzer/analyzer.go:8:2: package log/slog is not in GOROOT<EMAIL_ADDRESS>note: imported by a module that requires go 1.21
../../../go/pkg/mod/github.com/pingcap/tidb/parser@v0.0.0-20231010133155-38cb4f3312be/charset/charset.go:18:2: package slices is not in GOROOT<EMAIL_ADDRESS>
Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
No response
What operating system are you using?
Linux, macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
 Update your Go to 1.21 and go install should work.


Migrate from tslint to eslint

Because tslint is deprecated, I propose to migrate to eslint with typescript support and use prettier to handle the code style rules.
Steps to reproduce
If you view the tslint repo they have a message stating "TSLint will be deprecated some time in 2019".  As such, updating this repo to use eslint instead.
Proposed change

Upgrade to latest TypeScript version.
Add relevant eslint and prettier dependencies.
Migrate the rules to be close to the previously applied tslint code logic rules.
Turn off code style rules and rely on prettier for code style.

Relevant references
My go to guide for setting up typescript, eslint, prettier: https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
Pull request

https://github.com/jquery/esprima/pull/2009

#2009 is canceled; I'm going to re-work this into some smaller PRs.


Question about nuscenes camera2lidar extrinsic

For one scenario in nuscenes dataset, take 61 as example, the sensor2lidar_translation between CAM_FRONT and lidar_top differs from one timestamp to another timestamp.
such as: [-0.01613824 0.43552529 -0.32067179], [-0.00871988 0.5708719 -0.31998898]
0.5708719 - 0.43552529 = 0.13, the y direction of translation is the vehicle's forward direction.
From my opinion,the extrinsic should ideally remain constant or minor variation.
Could someone give explanation?
Best regards

def obtain_sensor2top(nusc,
                      sensor_token,
                      l2e_t,
                      l2e_r_mat,
                      e2g_t,
                      e2g_r_mat,
                      sensor_type='lidar'):
    """Obtain the info with RT matric from general sensor to Top LiDAR.
    Args:
        nusc (class): Dataset class in the nuScenes dataset.
        sensor_token (str): Sample data token corresponding to the
            specific sensor type.
        l2e_t (np.ndarray): Translation from lidar to ego in shape (1, 3).
        l2e_r_mat (np.ndarray): Rotation matrix from lidar to ego
            in shape (3, 3).
        e2g_t (np.ndarray): Translation from ego to global in shape (1, 3).
        e2g_r_mat (np.ndarray): Rotation matrix from ego to global
            in shape (3, 3).
        sensor_type (str): Sensor to calibrate. Default: 'lidar'.
    Returns:
        sweep (dict): Sweep information after transformation.
    """
    sd_rec = nusc.get('sample_data', sensor_token)

    print("calibrated_sensor_token  ",sd_rec['calibrated_sensor_token'])

    cs_record = nusc.get('calibrated_sensor',
                         sd_rec['calibrated_sensor_token'])

    pose_record = nusc.get('ego_pose', sd_rec['ego_pose_token'])

    data_path = str(nusc.get_sample_data_path(sd_rec['token']))

    if os.getcwd() in data_path:  # path from lyftdataset is absolute path
        data_path = data_path.split(f'{os.getcwd()}/')[-1]  # relative path
    sweep = {
        'data_path': data_path,
        'type': sensor_type,
        'sample_data_token': sd_rec['token'],
        'sensor2ego_translation': cs_record['translation'],
        'sensor2ego_rotation': cs_record['rotation'],
        'ego2global_translation': pose_record['translation'],
        'ego2global_rotation': pose_record['rotation'],
        'timestamp': sd_rec['timestamp']
    }
    l2e_r_s = sweep['sensor2ego_rotation']
    l2e_t_s = sweep['sensor2ego_translation']
    e2g_r_s = sweep['ego2global_rotation']
    e2g_t_s = sweep['ego2global_translation']

    print("l2e_r_s  ",l2e_r_s)
    print("l2e_t_s   ",l2e_t_s)
    print("e2g_r_s ",e2g_r_s)
    print("e2g_t_s  ",e2g_t_s)

    # obtain the RT from sensor to Top LiDAR
    # sweep->ego->global->ego'->lidar

    l2e_r_s_mat = Quaternion(l2e_r_s).rotation_matrix
    e2g_r_s_mat = Quaternion(e2g_r_s).rotation_matrix

    R = (l2e_r_s_mat.T @ e2g_r_s_mat.T) @ (
        np.linalg.inv(e2g_r_mat).T @ np.linalg.inv(l2e_r_mat).T)

    T = (l2e_t_s @ e2g_r_s_mat.T + e2g_t_s) @ (
        np.linalg.inv(e2g_r_mat).T @ np.linalg.inv(l2e_r_mat).T)

    T -= e2g_t @ (np.linalg.inv(e2g_r_mat).T @ np.linalg.inv(l2e_r_mat).T
                  ) + l2e_t @ np.linalg.inv(l2e_r_mat).T
    sweep['sensor2lidar_rotation'] = R.T  # points @ R.T + T

    sweep['sensor2lidar_translation'] = T

    print("sensor_type  ",sensor_type)
    print("sensor2lidar_rotation  ",R.T)
    print("sensor2lidar_translation  ",T)
    return sweep

This seems to be an issue related to the nuScenes dataset. Please open an issue in their repository instead. Thanks!


Feeds not updating since 07/15/2015

Issue as stated in the title. Is the daemon on the public server not functioning today? If I may, please take a look at the problem while you have time. Thanks so much for all you have done so far!

2 days ago.

The prolbem is that my server ip is blocked by sogou.com

Bad luck... Thanks for letting us know. By the way, I tried your code and it worked like a charm! But I am curious how did you generate an RSS feed? Thanks!

Glad you like it.
I will push the whole code of weirss on github later, which contains RSS.

有的公众号可以更新，有的却不行。

对的，我也发现了。

当ip被封时，不能更新，如果更新时ip恰好解封，就可以更新

我因为开发有很多服务器资源，只是偶尔用，如果可以的话，脚本改成可以分布抓然后回传到你的服务器怎么样

@HACK21  那太好了，是你抓取传到我的服务器还是我的服务器通过你的服务器作代理抓取？


Intermittend Failing To Get Type

When running the pyclr_initialize function, it will intermittently error with an "INVALID_ARG" error. This is likely due to SysAllocString and BSTR args in general.

This appears to be fixed by forcing python to do the BSTR handling instead of leveraging SysAllocString.


Snippet suggestion triggered incorrectly

VSCode Version: Version 1.1.0 (1.1.0)
OS Version: Mac OS X Yosemite 10.10.5 (14F27)

Steps to Reproduce:

Create a user snippet with a prefix "sup"
(I created mine in ~/Library/Application Support/Code/User/snippets/elixir.json)
In a file matching the language, type S or s, intellisense correctly suggests snippet "sup"
When proceeding to type non-matching characters, e.g. erv intellisense still suggests snippet "sup"

Expected behavior:
When the typed characters no longer match the start of a snippet prefix, the snippet suggestion should not be shown.

@23min Can you share you snippet with us? Trying this with the class snippet in JavaScript doesn't allow me to repo

{

	// Place your snippets for Elixir here. Each snippet is defined under a snippet name and has a prefix, body and
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
	// Example:
	"Print to console": {
		"prefix": "log",
		"body": [
			"console.log('$1');",
			"$2"
		],
		"description": "Log output to console"
	},

		"Print to Somethjing": {
		"prefix": "Lassa",
		"body": [
			"console.log('$1');",
			"$2"
		],
		"description": "Log output to console"
	},

	"Supervisor Template": {
		"prefix": "sup",
		"body": [
			"defmodule $1.Supervisor do",
				"\tuse Supervisor",
				"",
				"\tdef start_link do",
					"\t\tSupervisor.start_link(__MODULE__, [])",
				"\tend",
				"",
				"\tdef init(_) do",
					"\t\tchildren = [",
						"\t\t\tworker($1.Server, [])",
					"\t\t]",
					"",
					"\t\tsupervise(children, strategy: :one_for_one)",
				"\tend",
				"",
			"end",
			"$2"
		],
		"description": "Creates a skeleton supervisor"
	},

	"GenServer Template": {
		"prefix": "gens",
		"body": [
			"defmodule $1 do",
				"\tuse GenServer",
				"",
				"\tdef start_link do",
					"\t\tGenServer.start_link(__MODULE__, :ok, [name: __MODULE__])",
				"\tend",
		    "",
			"end",
			"$2"
		],
		"description": "Creates a minimal skeleton genserver"
	}
}

Understood. It is like this because we compare suggestions against their label, codeSnippet, and filterText. The first and last are clear to me but I don't remember why we filter against the codeSnippet...

Reopening and reverting this due to #6620

Now depends on #6620

Sorry, need to revert again due to #8531. There is still something wrong with the json language which doesn't allow me to make this change

Thanks @jrieken !

This also affects "inbuilt" snippets: when working in Typescript, typing "c" shows the completion for the "class" snippet -- however, finishing out to "const" leaves the "class" snippet still selected, so an  keypress to move to the next line for a bunch of consts gets me a class snippet.
So this isn't so much a case of "the wrong snippet selected" as "no snippet actually matches the word, but last last matching snippet is still selected".
I stumbled across this report from searching GitHub issues for vscode and snippets -- if this addition should be put somewhere else, please advise.


CDF Brand Kit Update

We'd like an updated version of the CDF brand kit. A number of different tweaks and enhancements have been suggested, and we'd like to see the suggestions addressed in a concerted branding update effort rather than piecemeal.
Our most pressing request is that we come up with an alternative to the Spiral graphic:

as this has turned out to be very difficult to incorporate into collateral. We'd like a simpler and more portable core branding artifact, perhaps based on the infinity sign?
Other requests include a "mascot" character, along with a customized mascot to represent the CDF Ambassador program. I'll let others add comments or links to related requests in other issues.

Opening with design team, and will get something on the calendars to coordinate updated messaging.


Add tests to cover line numbering edge cases with JRuby

What problem is this PR intended to solve?
While working on line numbering with a ruby-based project that is tested against CRuby and JRuby, I noticed JRuby was not returning the same line numbers. Specifically, when XML prolog was included in a source XML document, the line numbers generated by JRuby were off by one. You can see detail in this PR: https://github.com/rapid7/recog/pull/390.
This DRAFT PR serves as a discussion point and method to execute these tests using the Nokogiri CI, given my issues obtaining a suitable development environment to validate them. I will similarly open an issue linking to this PR.

Have you included adequate test coverage?
I've added three new tests. Two currently fail for JRuby when running bundle exec rake compile test under JRuby <IP_ADDRESS>. However, I'm having an issue getting a CRuby environment set up with nokogiri.

Does this change affect the behavior of either the C or the Java implementations?
It should impact the Java implementation once fixed. The CRuby implementation that relies on libxml appears to work fine.

Hi, thank you for getting involved in Nokogiri development!
For previous work done in this area, please read #1223 and #2177.
Please don't worry about your CRuby environment, the JRuby and CRuby implementation handle line numbers completely differently, so you can focus on JRuby.

I've pushed a commit that marks these tests as "pending" on JRuby, per discussion at #2380. Marking as "ready for review" and we'll see what CI  says.

Pushed a commit that fixes multiline comments.

The remaining pending test, "properly numbers lines with documents containing XML prolog", we should talk more about, because it reveals a significant difference between the JRuby and CRuby implementations than I realized ...
Libxml2's concept of "node line number" is the line number in the original document. Here's some code that demonstrates how this works. Note that the final output is identical, but the line value changes. We can conclude that the node line is the line in the original text and not in the final output form.
doc = Nokogiri::XML.parse(<<~XML)
  <root>
    Test
  </root>
XML
doc.at_css("b").line # => 2
doc.to_xml
# => "<?xml version=\"1.0\"?>\n" +
#    "<root>\n" +
#    "  Test\n" +
#    "</root>\n"

doc = Nokogiri::XML.parse(<<~XML)
  <?xml version="1.0" ?>
  <root>
    Test
  </root>
XML
doc.at_css("b").line # => 3
doc.to_xml
# => "<?xml version=\"1.0\"?>\n" +
#    "<root>\n" +
#    "  Test\n" +
#    "</root>\n"

This same code run through JRuby/Xerces demonstrates what we already know from staring at the implementation: the node line number reflects the final structure of the document, after corrections and formatting have been applied.
doc = Nokogiri::XML.parse(<<~XML)
  <root>
    Test
  </root>
XML
doc.at_css("b").line # => 2
doc.to_xml
# => "<?xml version=\"1.0\"?>\n" +
#    "<root>\n" +
#    "  Test\n" +
#    "</root>"

doc = Nokogiri::XML.parse(<<~XML)
  <?xml version="1.0" ?>
  <root>
    Test
  </root>
XML
doc.at_css("b").line # => 2
doc.to_xml
# => "<?xml version=\"1.0\"?>\n" +
#    "<root>\n" +
#    "  Test\n" +
#    "</root>"

I think I'd like to reflect this difference by updating the documentation and putting this expectation into the test explicitly (rather than "pend" the test).

I've taken the liberty of pushing one more commit that embraces the behavior of JRuby, documents it and encodes the expectations in the tests. WDYT?

Ping, let me know if you think I'm taking the API in the wrong direction. I'm planning to merge this today or tomorrow.

Rebased on latest main. Will merge when it goes green (unless someone raises an objection).

@flavorjones sorry for the delay. I think this was the right decision for now. Would be nice to make nokogiri one day have consistent results no matter the engine, but this is a decent compromise for where we're at today.


[1.31] bump kubernetes release information page

PR updates the https://www.kubernetes.dev/resources/release/ page to point to the ongoing 1.31 Release cycle timeline.
cc: @kubernetes/sig-release-leads @neoaggelos

cc @natalisucks @cpanato
(as you both approved the 1.30 PR. thanks!)

/lgtm

Sorry, I have no juice here :)

/lgtm
/approve


Homepage redesign

Redesigned call to action section of recipe submission and explore section in home page .
Issue #15

can you make it mobile responsive too

Yeah .

thanks for the contribution

Yeah . Can i work on designing a form page for submitting recipe ?


The image size is 640x640 or shorter side is 1200, long side is less than 1600?

I used 640x640 to get trained model, it only can get mAP of 68.8 on hard subset of validation set of WIDER FACE. In the original paper, the image is that shorter side is 1200, and long side is not longer than 1600. So can you give me some advice? Thanks

@nttstar ， I think the parameters are the same as what you said. But the results I got are far from the results you got. It is very strange. Any advice will be appreciated. Thanks

@nttstar  what is the batch size, 8 or 16?  Thanks

use default setting in config.py


Get rid of Cassandra Map for data resurrection

Today we are seeing more resurrection issues in Prod cluster, the items we deleted in timerMap and activityMap can be resurrected back and causing mutableState corrupted.
As we have moved events into eventCache, it's not big problem anymore if we put the maps into mutableState record.
The only concern is that every activity heartbeat will be updating the whole mutableState record instead of one item in the map. But this should be fine because it is not common use case that user would do heartbeating for many activities -- if so, we could furthur optimize it by batching the heartbeating.  On the other hand, this will solve the tombstone issues for our activtyMap and timerMap.

Cassandra resurrection issues are solved with Cassandra v4 and Cadence v1+


performance: Build library for estimating height of zulip messages without rendering

Currently, by a significant margin, the single most expensive part of rendering the Zulip main message feed is determining whether to automatically collapse messages for being too long.  That feature is useful, but definitely not important enough to justify that level of investment.  This feature is expensive in part because it requires rendering the message in the actual feed in order to know whether the message is tall enough to collapse.  It seems like we should come up with a metric that's a function of the HTML of a message's body, and approximates the height of a message, that we can use for this purpose.
A really good version of this metric probably will somehow be parameterized by width (either by returning data that can be combined with the width to compute the expected height in pixels or taking the width as input).  I think regardless, the algorithm should be something that adds up virtual height units (maybe "predicted pixels") from the various parts of a message body.  E.g. a .message_inline_image is 100px high, which is easy.  A bulleted list or series of paragraphs adds some fixed amount per line, with extra for particularly long bodies on text/inline emoji/etc. on a given line.  A markdown link is the size of just the text.  Etc.  I think "good enough" is probably a height metric that's within 20% or so of accurate; the purpose is just to determine "is this message super long" or not.
Because of local echo, we'll need a JS implementation of this library (see zulip.readthedocs.io/en/latest/markdown.html), so we should probably start with that (and some good unit tests) and only do a Python version if needed.
(As a sidenote, I think automatic collapsing on newly sent messages may just be broken right now, since I haven't seen it work in a while).

Can we address this by caching?  In other words, once we compute a message's height using the existing rendering methodology, can't we just attach that to the message object?

I think we do already cache it; see _message_content_height_cache in static/js/condense.js.  But it's still (apparently) like 2/3 of the first-time rendering time loading the homepage.
Actually, we should probably test that by removing the feature temporarily and seeing if things actually get faster -- this might just be one of those browser perf things where the thing actually taking time is the rendering and this is just when that rendering is forked to first happen.

Yeah, I'm a little curious whether this has something to do with waiting for images to load or something like that.  For first-time rendering the cache isn't gonna help, but even without caching, the code looks pretty innocent.

Image loading should be an issue -- we set a 100px height box for each image in the CSS, at least for inline images, and I think emoji have a similar setup where their size is clear without images loading.

@showell caching wouldn't really work since the message body width can be different at different screen widths.

Well, you could record the width and only trust the cache if the width didn't change, which is most of the time.

I have strong reason to believe Tim's theory that height calculation isn't really the issue here, and it's just a measurement issue that points to the height calculations.  I did some performance profiling recently on similar code, and I found what I thought was the "slow" section of code.  As soon as I removed the "slow" section of code, the following code became slow.   Which suggests this is more of a browsers-are-slow-in-general kind of problem.

This aligns with an issue Tim and I talked about with how the profiler seems to neglect to mention some other events that seem to be running concurrently which slows down processes at times. More digging to be done at some point, but this perhaps isn't a high value fix.

Another thing to try is to remove chunks of CSS.

Well I think the simplest test to see if this issue is irrelevant is just to try disabling the collapsing feature and see if that impacts load times.
We know for a fact that scroll performance on Mac is currently limited most by the way we're scaling emoji for reactions (fix is in progress).  That same issue isn't the main scroll performance thing on mobile.

On the front of collapsing, it'd be pretty easy to just test disabling the feature and see if it helps loading perf.  If it doesn't, I think we can close this issue since the strategy outlined above would not be helpful.


vscode website: footer doesn't cover bottom part of the page fully

On the https://code.visualstudio.com/ website, the footer height doesn't cover the bottom part fully.
Only happens on wider screens, on smaller screens, the footer doesn't leave a gap.
Preview of the issue:

Element in question: body > footer
Suggested change:
from
@media (min-width: 1200px)
footer {
    height: 90px;
}

to
@media (min-width: 1200px)
footer {
    height: fit-content;
}

Preview of the fix:

Here's what I see. It looks similar in terms of the padding-bottom to what you have in your fix. What OS/browser are you on where you're seeing the issue in the original picture?

New website doesn't have this issue


Testing with Eureka

I'm just wondering if there are any examples of how to test Eureka based feign clients for a microservice architecture? I have tests that make calls to other services. At the moment these break as I get java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: service-name. Do I need to use eureka.client.enabled: false ?

Usually when we do testing with ribbon, we swap out the server list implementation (we essentially remove eureka from ribbon).  See here for a full example.
TL;DR
Ribbon configuration class:
	// Load balancer with fixed server list for "local" pointing to localhost
	public static class LocalRibbonClientConfiguration {
		@Value("${local.server.port}")
		private int port = 0;

		@Bean
		public ServerList<Server> ribbonServerList() {
			return new StaticServerList<>(new Server("localhost", this.port));
		}
	}

Annotate your test configuration class like so:
@RibbonClient(name = "localapp", configuration = LocalRibbonClientConfiguration.class)

Then calls to the localapp via RestTemplate or LoadBalancerClient will get localhost:<testport>.

Thanks will give this a shot.


Move package to @crystallized/controllers

Since we'll no longer be an "element" but only two controllers for Lit 2, it makes sense to switch to an org and add a controllers package. Any additional Lit-related work in future can remain here in the repo and published under the @crystallized NPM org.

Done!


API Create new export snapshot

return result:

Error

Hi @sujunze, can you please provide us with enough information for us to replicate the error that you're seeing? Labeling configuration, installation method, data, and anything else to help us reproduce the error and determine if it's a bug would be very helpful. Thanks!


#187 Lazyload pages

Description

implemented lazy loading for the pages using dynamic import

please stop opening new pull requests.
use the same PR.


Unable to open two windows to the same folder

I just updated my VS Code and now I am no longer able to open two windows to the same folder. When I already have a folder open in on VS Code window, I go to New window > Open Folder > Select same folder as other window >> nothing happens. Additionally, I can no longer use "code ." in git bash to open a new vs code window to the same folder. This is a pretty annoying issue and completely disrupts my workflow.

@MashaMSFT I was not aware this was ever possible due to that we have F1 > duplicate workspace command.
Assigning to @aeschli and @sandy081 to check if something broke here

@isidorn, i didn't know this was an option :) i tried it and it works.. and now you have me questioning myself if this has ever worked this way. I'm fairly positive it has but now have no way to verify! :)

@MashaMSFT we have, just download an older version of vscode
Modify this uri as what suits your use case
https://vscode-update.azurewebsites.net/1.25.1/win32/stable

@isidorn, does this mean my only recourse from now on is to use an older version, or is this something that may change back in a future release?

VS Code did not support to open a folder in two windows.
Please follow the discussion in https://github.com/Microsoft/vscode/issues/2686


Implement logging operator

Logging would be provided by Infrastructure, right?

The underlying logger yes.
Imagine something like:
multi.onItem().log(); // use the infrastructure logger to log the received items
multi.onItem().log(Level level); // use the infrastructure logger to log the received items, apply the Level (using the JUL Level to avoid adding a dependency)
multi.onItem().log(Logger logger, Level level); // use the given logger with the given level, I'm not even sure we should provide that because it would be very close to an `invoke()` and the benefit is not high.

It would apply to all the events.

The thing is if you start having levels and loggers you tie Mutiny to some API (or JUL, or even a custom abstraction).
I was more thinking about something along the lines of:
multi
  .log() // aka log events {onSubscribe, onItem, cancel, ....}
  .onItem().{....}

where what happens when you log is a callback set at the Infrastructure level

Yes, as I don't want to have yet another logging API, we should just have log for now. If we start seeing a need for "level", we can rediscuss (but JUL would avoid adding another dep)

An alternative to level are string tags, but indeed unless we see a need for it I'd stick to some simple stuff. And logging is more a kind of debugging tool in this context, if you want fine grained logging then you can always use invoke.


Github pipeline docs ambiguous on whether draft PR trigger pipeline

The docs appear to contradict themselves as to whether a draft PR will trigger a pipeline run or not:
The draft PR validation section states:

By default, pull request triggers fire on draft pull requests [...]

but just below the opting out of PR validation, a Note states

Draft pull requests do not trigger a pipeline.

Those two statements appear to contradict each other.

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

ID: bfba9a21-e0f9-4fc6-43fc-bfdc51af31d3
Version Independent ID: d93c7852-ce63-a6d0-417a-45f8cf2fc522
Content: Build GitHub repositories - Azure Pipelines
Content Source: docs/pipelines/repos/github.md
Product: devops
Technology: devops-cicd-repos
GitHub Login: @vijayma
Microsoft Alias: vijayma

@anno1985 -- Christian, thank you for your thorough feedback.  Please consider these resources:

Azure DevOps Services
Azure DevOps on Stack Overflow

@vijayma -- Vijay, please look into this issue.