Updates to QR code page

Folks are really using the QR code but with some frustration.  Here are some things we can do to improve
#1. Fat Fingers.   with a little CSS, the old guys working these crews could actually use this to report back in the field the work is done with their big ole numbs.     here are some suggestions to making this easier to work with.
Before (current view)

After:

[ ] re-arrange header information to fit side by side with phone numbers
[ ] make the case status icons possibly bigger

[ ] make the case status selectors as big as makes sense.   big enough for the fat fingers to easily choose a status.

#2. Photos.   Right now, they are asking crews to take pics, email them to the command center where the manually upload them to the case (slow and tedious). We already have a cool photo button,  lets add it to the page with the QR code so they can just scan their paper, hit the photo button, and then take pics with their phone.  I can already do that on my phone from a case.. so doing it from the QR code page seams a bit easier..

[ ] add the photos button from the QR code page (see picture above)

@tabiodun   Did some testing on staging for what you added.   Pretty cool,   here are a few issues I noticed.

[ ] Saved Image Display issues.   When you take a picture they do not show up after you take or upload them.. only the old images (if any were there) show up.   Refreshing the page does not load them either.    in fact,  there several images loaded, but on the QR page it is not refreshing well and when I re-generate the PDF of the case, only the last image shows on the PDF, not the several that are now attached.

[ ] When I take a pic with my phone, the thumbail is often sideways, but the image load up correctly... weird...

[ ] We should probably use a proper image carrousel or control to display images so they can load up better in full screen mode on a phone.

Completed.


[FEATURE] Support zoom-levels higher than 14

Planetiler currently limits the maximum zoom level to 14 since that was the highest needed for the OpenMapTiles port.  Other schemas may want to go higher though.  It should at least be possible to go to z15, and possibly z16.

The main issue to resolve to go higher than z14 is how TileCoord packs z/x/y coordinates into a 32-bit integer:
https://github.com/onthegomap/planetiler/blob/04da2864a6a41f84a65b6618cf98fca018bfb57c/planetiler-core/src/main/java/com/onthegomap/planetiler/geo/TileCoord.java#L70-L80
So that the tile coordinate can be used as the most-significant 32-bits of the 64-bit long key that features get sorted by to group into tiles:
https://github.com/onthegomap/planetiler/blob/main/planetiler-core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fonthegomap%2Fplanetiler%2Fcollection%2FFeatureGroup.java#L92-L97
It should be possible to pack z15 tile IDs into 32 bits since there are 1.4 billion tile IDs, but to go to z16 we'd need 33 bits (steal one bit from another part of the sort key) since there are 5.7 billion IDs.

@ZeLonewolf what do you think about z15 vs. z16 as the upper limit for tile generation for "micro-mapped" features?

@ZeLonewolf what do you think about z15 vs. z16 as the upper limit for tile generation for "micro-mapped" features?

With regard to feature utility in a map, there are lots of features that don't make sense to display until very high zoom.  If I were rendering manhole covers for exmaple, I'd probably start them at z19 😁
Is there a technical reason why we wouldn't make the maximum zoom level user-configurable?  It's really just a trade-off between disk space and download tile size.

@ZeLonewolf what do you think about z15 vs. z16 as the upper limit for tile generation for "micro-mapped" features?

With regard to feature utility in a map, there are lots of features that don't make sense to display until very high zoom.  If I were rendering manhole covers for example, I'd probably start them at z19 😁
Is there a technical reason why we wouldn't make the maximum zoom level user-configurable?  It's really just a trade-off between disk space and download tile size.

A few reasons to limit:

We're packing feature sort keys into 64 bits and tile id into a 32-bit integer now, which can fit z15 but to go to z16 or beyond we'd need to adjust. Not impossible but only want to do it if there's a strong use case
output mbtiles size is currently ~80gb, it would be 200-300gb for z15 and close to 1tb for z16 so it starts to get unwieldy
processing time goes up by similar multiples

Since a client-side style can limit showing some feature until a higher zoom level, the only real benefit to generating higher zoom levels is to limit tile size of the max zoom level you generate. Currently with the openmaptiles config, the biggest z13 tile is 366kb but  a few z14 tiles get up to 1.8mb. If you include more detailed poi's/trees that might push 3-4mb.
So maybe the best way to guesstimate this is to make a schema with all the "micro" features you might want to include in openmaptiles, then generate z14 and collect some stats on the avg/max bytes used per layer per tile to know how far we'd need to push down the micro features to make tile sizes reasonable.
My hunch is z15 would keep tiles under 1mb, and z16 would keep max zoom tiles comparable with the rest of the tiles (200-300kb max)

I'd say z15 is the most important because of the openmaptiles plan to add that zoom level, while we don't have a specific use case for z16.


My PC doesn't like this app

Windows Terminal version (or Windows build number)
Version 10.0.19042.928
Summary
I've attempted to install this on a couple different occasions, having seen some screenshots that looked promising. Originally I wanted to look at the source just for fun, but it became clear pretty quick that building it wasn't gonna be an 'on my lunch break' type of task. At that point I realized it's on the Winstore. Here's where it gets confusing because if the app were going to work, surely this would be the place to install it from. Winstore will not move past the 'you own this app.' I can sit there clicking 'Install' all day, not a thing happens. That's the first occasion. I figured "eff-it" I was only impressed by some screenshots anyway. Wont miss what I don't know, right?
A few days later, I'm doing something totally unrelated yet here I am again, having been directed here by some Blog that was calling this ‘Colortool‘ but it links to Microsoft/console. It took me to your releases page, where I read a bit about the several different releases. Cool, there's a stable! So I downloaded the .msixbundle, it launched it's self as soon as it completed and the result was a new shortcut.ink added to my Start Applist. Success! I think....
but.... I can click this shortcut all day and not a thing happens. Seriously, usually you'd at least expect the start menu to close once an app has been clicked... just sits there. So, I refer you to the title of this post and wish you guys luck. I'll probably end up back here eventually.
Steps to reproduce
Download stable release, format=msixbundle, install=succeded, AppLaunch=failed
Locate stable on Windows Store, Owned a copy, Install=button does nothing
Expected Behavior
Launch app
Actual Behavior
Not launch app

I can sit there clicking 'Install' all day, not a thing happens.

Curious, did you try sending feedback via the Feedback Hub? If you record the problem with the Feedback Hub, it should capture some helpful diagnostics that the store team might be able to use.

some Blog that was calling this ‘Colortool‘ but it links to Microsoft/console

Ah yes, colortool was the first thing we had on this repo long before it was the Terminal repo. Colortool is totally different from the Terminal, it's a tool for running inside your commandline session. You can find it nowadays at https://github.com/microsoft/terminal/tree/main/src/tools/ColorTool. (When we released the Terminal, we renamed the repo from Microsoft/Console -> microsoft/terminal. Some older links probably still point at the old place).

I downloaded the .msixbundle, it launched it's self as soon as it completed and the result was a new shortcut.ink added to my Start Applist. Success! I think....
but.... I can click this shortcut all day and not a thing happens

Interesting.

Does anything show up in Event Viewer when you do this?
Do you have any antivirus software installed?
Are you running an activated copy of Windows?
Does a WindowsTerminal process show up in TaskManager, but running "suspended" by any chance?

I'm kinda grasping at straws here. Usually when the Terminal fails to launch, there's some feedback of some sort.


Enable add systemd flag to the centos build

What does this PR do?
This PR enables systemd build on the default source build of Centos
Motivation
We want to enable the journald integration on Centos 7. For this, we need to enable the build flag systemd on Centos
Note:
The build succeeded https://gitlab.ddbuild.io/DataDog/datadog-agent/pipelines/715202
And the binary worked on

Centos 6
Centos 7 (with systemd)
Amazon Linux
Amazon Linux 2 (with systemd)

It worked on the image built by https://github.com/DataDog/datadog-agent-builders/pull/68

Is there any way for me to get my hands on this build without having to compile from source? None of the rc tag provide a binary.


Using in conjunction with multiple meta queries in REST url

Is it possible to use this query in conjunction with other meta queries with a relation of OR?
For example, I need to pull in a bunch of listings based on their lat and long values, but also need to include all listings with a listing_type of 'National' and 'State-wide'.
I currently query the National and State-wide listings via this filter in the url:
'?filter[meta_query][relation]=OR&filter[meta_query][0][key]=state_wide_state&filter[meta_query][0][value]=' + this.state + '&filter[meta_query][1][key]=cause_type&filter[meta_query][1][value]=National'
Is there a way I can use this geo-query as another meta_query or combine them in some way?
Many thanks
Reuben

Hi Reuben,
I guess the AND  case would be covered with the Rest API usage example mentioned here:
https://github.com/birgire/geo-query
using the PHP snippet there and then:
https://example.com/wp-json/wp/v2/posts?geo_location={"lat":"64.128288","lng":"-21.827774","radius":"50"}&...other...
But I'm not sure at the moment what would be the best way to handle it with OR  as the geo query is not part of the WP_Meta_Query class. Maybe that would be an interesting path to look at for the plugin?
I remember playing with:
https://wordpress.stackexchange.com/a/178492/26350
for meta query and a simple title search. and also a way to combine two WP_Query  here:
https://github.com/birgire/wp-combine-queries
but these methods might not be useful here?
It looks you're not using the native WP REST API filters, if I recall correctly the filter parameter is no longer supported.  I guess you're using a plugin for that, maybe that plugin has a support for such an adjustment with other queries?

Thanks for the reply.
I'll take a look at the links you sent over and see if I can possibly make a custom endpoint for this specific use case.
I was just wondering though, with the custom filter for the geo-query, would it at all be possible to add in a relational meta query into the filter itself. This may be a bit out there and not possible at all, but as all I need to do it modify the lat long returned response to also include posts with a meta query value, could something like this work?
`
add_filter( 'rest_cause_query', function( $args, $request ) {
$geo = json_decode( $request->get_param( 'geo_location' ) );
if ( isset( $geo->lat, $geo->lng ) ) {
    $meta_query = array(
                    'key'     => 'cause_type',
                    'value'   => 'National',
                    'compare' => 'IN',
                );

    $args['geo_query'] = [
        'lat'                         =>  (float) $geo->lat,
        'lng'                        =>  (float) $geo->lng,
        'lat_meta_key'       =>  'latitude',
        'lng_meta_key'      =>  'longitude',
        'radius'                  =>  ($geo->radius) ? (float) $geo->radius : 50,
        'order'                    =>  'ASC',
        'meta_query'         =>  $meta_query,
        'relation'                =>  'OR',
    ];
}
return $args;

}, 10, 2 );
`
Or would this require configuration of the plugin itself?
Thanks again.

Actually clearly that would require re-writing the plugin.
It would be good if it were possible to have the geo-query as part of the WP_Meta_Query class. Then we could use this in conjunction with other queries.


only acccept cloud config files for certain providers

Replaces https://github.com/openshift/library-go/pull/389.

"Change looks good otherwise and is needed to unblock work." (@derekwaynecarr)
@deads2k asked us to move it forward to unblock other teams
/approve
/lgtm


Images are too small

This, and probably most other pages, can benefit of "click and zoom" on the images it presents, most of them you can't read the
text on the images which makes it difficult to follow up the content.
Sincerely,
Luis

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

ID: 588fc4d6-0c4d-297d-cfe1-8562728fdc4d
Version Independent ID: cf117c91-90fa-036b-9763-a3c16b398a33
Content: Tutorial - Create an Azure Active Directory B2C tenant
Content Source: articles/active-directory-b2c/tutorial-create-tenant.md
Service: active-directory
Sub-service: b2c
GitHub Login: @kengaderdus
Microsoft Alias: kengaderdus

nvm, you can right-click --> open image in a new tab,

Thank you for the feedback.


How can we get USDT balance with only the public key?

I looked at the sample, seems like we can only get the balance if we have the private key.
This shouldn't be the case.

#38, I have managed to find a workaround by modifying the source code.. But not sure if that is the correct way.


Document cbindgen dependency

What does this PR do?
Adds cbindgen and its required version to the readme to the requirements section.
Motivation
Building C headers requires cbindgen which is not mentioned in the readme.
Ubuntu package of cbindgen is of an old version which does not work, producing cryptic errors.
Additional Notes
None
How to test the change?
N/A

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.37%. Comparing base (15aa48d) to head (2b935cf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #514   +/-   ##
=======================================
  Coverage   70.37%   70.37%
=======================================
  Files         204      204
  Lines       27824    27824
=======================================
  Hits        19581    19581
  Misses       8243     8243

Components
Coverage Δ

crashtracker
16.70% <ø> (ø)

datadog-alloc
98.76% <ø> (ø)

data-pipeline
51.15% <ø> (ø)

data-pipeline-ffi
0.00% <ø> (ø)

ddcommon
86.10% <ø> (ø)

ddcommon-ffi
74.15% <ø> (ø)

ddtelemetry
59.37% <ø> (ø)

ipc
84.66% <ø> (ø)

profiling
78.63% <ø> (ø)

profiling-ffi
58.19% <ø> (ø)

serverless
0.00% <ø> (ø)

sidecar
36.19% <ø> (ø)

sidecar-ffi
0.00% <ø> (ø)

spawn-worker
54.98% <ø> (ø)

trace-mini-agent
69.70% <ø> (ø)

trace-normalization
97.79% <ø> (ø)

trace-obfuscation
95.75% <ø> (ø)

trace-protobuf
77.16% <ø> (ø)

trace-utils
91.21% <ø> (ø)


states:StopExecution permissions are incorrect for the aft-invoke-customizations-execution-role

Terraform Version & Prov:
AFT Version:
(Can be found in the AFT Management Account in the SSM Parameter /aft/config/aft/version)
CURRENT
Terraform Version & Provider Versions
N/A
Bug Description
aft-invoke-customizations-execution-role is given states:StopExecution permissions but the resource that is specified does not give it any permissions to stop executions, as it specifies stateMachine resources and not execution resources.
https://github.com/aws-ia/terraform-aws-control_tower_account_factory/blob/26667e52d0e2f46e3213239933a1c8fcf1a83166/modules/aft-customizations/iam/role-policies/aft_states_invoke_customizations_policy.tpl#L29
Expected behavior
Add "arn:${data_aws_partition_current_partition}:states:${data_aws_region_aft-management_name}:${data_aws_caller_identity_aft-management_account_id}:execution:aft-*" to the resources allowed by this statement
Related Logs
Provide any related logs or error messages to help explain your problem.
Additional context
Add any other context about the problem here.

Hi @bmorrissirromb,
Thanks for letting us know about the improper resource type for the policy action. Is this causing an active issue for you while using AFT?

@stumins
I don't think it is -- I think we have upstream failures that are causing the StopExecution call to be made, so that's our current blocker. But we do get CloudTrail failures for insufficient permissions to run StopExecution.

Understood, thanks for the context - I've added a backlog item for us to fix this policy.

We've addressed this in the latest AFT release!
https://github.com/aws-ia/terraform-aws-control_tower_account_factory/releases/tag/1.12.0


uv incorrectly determines local package availability as part of install_requires

First of all - wow this thing is fast! I recently moved a project's six of the linters/formatters to ruff and now uv is equally impressive. Cheers folks, splendid work!
I think there is an issue when you attempt to install two packages from a local folder that depend on each other.
Steps to reproduce below. We have two packages - aaa and bbb. bbb depends on aaa on some version. Both aaa and bbb share a package namespace foo. The packages themselves are empty.
Package aaa:
$ tree aaa
aaa
├── foo
│   ├── __init__.py
│   └── aaa
│       └── __init__.py

$ cat aaa/setup.py
from setuptools import setup, find_packages

version = "1.2.3"

setup(
    name="foo-aaa",
    namespace_packages=["foo"],
    extras_require={},
    version=version,
    packages=find_packages(),
    description="aaa",
)

$ cat aaa/foo/__init__.py
__import__("pkg_resources").declare_namespace(__name__)

Package bbb:
$ tree bbb
bbb
├── foo
│   ├── __init__.py
│   └── bbb
│       └── __init__.py

$ cat bbb/setup.py
from setuptools import setup, find_packages

version = "3.2.1"

setup(
    name="foo-bbb",
    namespace_packages=["foo"],
    version=version,
    install_requires=["foo-aaa~=1.2.3"],
    extras_require={},
    packages=find_packages(),
    description="bbb",
)

$ cat bbb/foo/__init__.py
__import__("pkg_resources").declare_namespace(__name__)

Installing aaa:
$ uv pip install -e "./aaa"
   Built file:///Users/ikalchev/dev/test/aaa                                                                                Built 1 editable in 352ms
Resolved 1 package in 0.23ms
Installed 1 package in 0.74ms
 + foo-aaa==1.2.3 (from file:///Users/ikalchev/dev/test/aaa)

Installing bbb (fails):
$ uv pip install -e "./bbb"
   Built file:///Users/ikalchev/dev/test/bbb                                                                                Built 1 editable in 262ms
  × No solution found when resolving dependencies:
  ╰─▶ Because foo-aaa>=1.2.3, <1.3.dev0 was not found in the package registry and foo-bbb==3.2.1 depends on foo-aaa>=1.2.3,<1.3.dev0, we can
      conclude that foo-bbb==3.2.1 cannot be used.
      And because you require foo-bbb==3.2.1, we can conclude that the requirements are unsatisfiable.

      hint: foo-aaa was requested with a pre-release marker (e.g., foo-aaa>=1.2.3,<1.3.dev0), but pre-releases weren't enabled (try:
      `--prerelease=allow`)

Oddly enough, when I change the install_requires=["foo-aaa~=1.2"] (just remove the maintenance version part), it fails again but have a look at the "found" version for foo-aaa:
$ uv pip install -e "./bbb"
   Built file:///Users/ikalchev/dev/test/bbb                                                                                Built 1 editable in 368ms
  × No solution found when resolving dependencies:
  ╰─▶ Because foo-aaa>=1.2, <2.dev0 was not found in the package registry and foo-bbb==3.2.1 depends on foo-aaa>=1.2,<2.dev0, we can conclude that
      foo-bbb==3.2.1 cannot be used.
      And because you require foo-bbb==3.2.1, we can conclude that the requirements are unsatisfiable.

      hint: foo-aaa was requested with a pre-release marker (e.g., foo-aaa>=1.2,<2.dev0), but pre-releases weren't enabled (try:
      `--prerelease=allow`)

Note that if I try to install bbb after that with pip, it succeeds:
$ pip install -e "./bbb"
Obtaining file:///Users/ikalchev/dev/test/bbb
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: foo-aaa~=1.2.3 in ./venv_test/lib/python3.10/site-packages (from foo-bbb==3.2.1) (1.2.3)
Building wheels for collected packages: foo-bbb
  Building editable for foo-bbb (pyproject.toml) ... done
  Created wheel for foo-bbb: filename=foo_bbb-3.2.1-0.editable-py3-none-any.whl size=3085 sha256=bc90e3fc0255e0e3e1321b87f3a0c6dc32339a6ef0a1b83e592f39febd6c1dd3
  Stored in directory: /private/var/folders/8p/znpv_6555dnc6tqwv_bvkdb80000gn/T/pip-ephem-wheel-cache-h0lzvry0/wheels/83/66/26/26bae4c6dee3068d97be61cb5b3594a7140a46d287d2f915f0
Successfully built foo-bbb
Installing collected packages: foo-bbb
Successfully installed foo-bbb-3.2.1

Env:

macOS 14.4 (23E214)
python 3.10
uv 0.1.26 (7b685a815 2024-03-28)

Let me know if I can be of further help.

Same issue here, can observe with >= requirements too.
Example is installing bitsandbytes when a torch already exists locally. pip would succeed in this case while uv will go and reinstall torch again.

This looks like a duplicate of https://github.com/astral-sh/uv/issues/1661 which was resolved in #2596 and will be in the next release.


Add privacy and UX related options

Allow to disable showing read receipts and showing/sending type notifications, disable markdown with a visual setting (currently is only possible via undocumented /markdown off command), change the message font size.

i'm implementing the languages selection dialog after i will merge your PR (i will need to modify few things)

I've fixed the preferences keys being locale-dependent and added a couple of new settings for media. Now it only requires 3 taps (if you set the preferred defaults) to take and post a photo instead of 5. Much more convenient.

Oh, and since the contributing guide requires sign off and allows to put it to the pull request comment I'll drop a line here:
Signed-off-by: Sergey Shpikin<EMAIL_ADDRESS>

Removed obsolete settings and regrouped the rest. Seems that they need to be ported to PreferencesManager.

Hi @rkfg ,
Seem that your PR has been forgotten, sorry about that. Riot does contains a font size settings now, and the code has changed a lot since you've submitted the PR.
I'm afraid it will be hard to rebase it.
What do you want to do with this PR?
Benoît

Thanks for your attention. This patch is mostly obsolete, however I'd still like to have some bits of it implemented: the default media source and default compression settings. It would make posting photos so much more convenient. For now I always have to select the source (photo), take a picture, then select the same compression (medium). Having a preference for those would be nice and it's really easy to implement like I already did once. Other than that this PR can be closed safely.


New GET /stewardship/{reference} is redundant

Summary
I tried the new GET /stewardship/{reference} API on 1.1.0-rc2 with verbosity 5 logging and find that it is redundantly retrieving chunks from the swarm.  Consider the following log snippet
time="2021-08-17T16:32:45-04:00" level=trace msg="retrieval: requesting chunk 9015edfe9a060078585b8be5a772a2012cc6f3d0a5398a1635600486dafa0232 from peer 91dd5b99ebac7e3ec5e3a420f6b010bc7b1f573480bb86e7b92e5fd9e0281282"
time="2021-08-17T16:32:45-04:00" level=trace msg="retrieval: requesting chunk 9015edfe9a060078585b8be5a772a2012cc6f3d0a5398a1635600486dafa0232 from peer 91dd5b99ebac7e3ec5e3a420f6b010bc7b1f573480bb86e7b92e5fd9e0281282"
time="2021-08-17T16:32:45-04:00" level=trace msg="retrieval: requesting chunk ebdcd51ffe05df73d8dc8555a81f4f2e9a4105bf7ad85b8f5368285e489ea21a from peer e03d1d763cac5a2c74b5fed77adf256e62d7ecf6849a60b25dc1b2e9583e3dd5"
time="2021-08-17T16:32:46-04:00" level=trace msg="retrieval: requesting chunk ebdcd51ffe05df73d8dc8555a81f4f2e9a4105bf7ad85b8f5368285e489ea21a from peer e03d1d763cac5a2c74b5fed77adf256e62d7ecf6849a60b25dc1b2e9583e3dd5"
time="2021-08-17T16:32:46-04:00" level=trace msg="retrieval: requesting chunk d27803264142a3ab1e005a74c96edf0162799e2d5b2b01cf57cfafd8b12596e2 from peer d167955bf135ca77e24627c64e95ee0bd7831239590cb06aefc140217f4a88a2"
time="2021-08-17T16:32:47-04:00" level=trace msg="retrieval: requesting chunk f56fbea515876ceeb192a425b3d78745f32205f43ad0b56bf5465dd2205d71c4 from peer f0390f6c51da964358f73368f09ca686350b118b4e2d65fe3372a450a95f5bd1"
time="2021-08-17T16:32:47-04:00" level=trace msg="retrieval: requesting chunk f56fbea515876ceeb192a425b3d78745f32205f43ad0b56bf5465dd2205d71c4 from peer f0390f6c51da964358f73368f09ca686350b118b4e2d65fe3372a450a95f5bd1"
time="2021-08-17T16:32:47-04:00" level=trace msg="retrieval: requesting chunk ff09675287e219f2bd4549c21d1429714f7c65e0928ec3ef1a646df46c3eb7ef from peer f0390f6c51da964358f73368f09ca686350b118b4e2d65fe3372a450a95f5bd1"
time="2021-08-17T16:32:48-04:00" level=trace msg="retrieval: requesting chunk 94ab9c7ed0f9a6e8069907459998103550634c97abd2804d2b9f5de9ffad7a5a from peer 91dd5b99ebac7e3ec5e3a420f6b010bc7b1f573480bb86e7b92e5fd9e0281282"
time="2021-08-17T16:32:48-04:00" level=trace msg="retrieval: requesting chunk 94ab9c7ed0f9a6e8069907459998103550634c97abd2804d2b9f5de9ffad7a5a from peer 91dd5b99ebac7e3ec5e3a420f6b010bc7b1f573480bb86e7b92e5fd9e0281282"
time="2021-08-17T16:32:48-04:00" level=trace msg="retrieval: requesting chunk 34a92135e2864049e53a9cc38e7b3da686f2094d5d5575d2a17e445d40899411 from peer 345e089c1caa86690b8bffdd63dd534ec600d6db56d9ac5ed02e77021f4bb641"
time="2021-08-17T16:32:49-04:00" level=trace msg="retrieval: requesting chunk 538d36ff1ee31d2c0be217989d5205c4fb872846bd12303feac79fde3da4ab20 from peer 50b40d00877c7e396fb8f18d7bb12fa369c8d5a4764cdb231ade73cc7325ebe9"
time="2021-08-17T16:32:49-04:00" level=trace msg="retrieval: requesting chunk 538d36ff1ee31d2c0be217989d5205c4fb872846bd12303feac79fde3da4ab20 from peer 50b40d00877c7e396fb8f18d7bb12fa369c8d5a4764cdb231ade73cc7325ebe9"
time="2021-08-17T16:32:50-04:00" level=trace msg="retrieval: requesting chunk c34d3b2b09f1b38cc0d5628fd6951bb2e135549421502bc9c2b5ca03a3e54493 from peer c65e3e78625120476fbe2797482b925d592e23356ffd9368cae429e766767dc8"
time="2021-08-17T16:32:50-04:00" level=trace msg="retrieval: requesting chunk d2f87d80301e695e2f5a3ed258ad6f867a256ac3f7fb1e8077fb1f44eb4ac759 from peer d167955bf135ca77e24627c64e95ee0bd7831239590cb06aefc140217f4a88a2"
time="2021-08-17T16:32:51-04:00" level=trace msg="retrieval: requesting chunk d2f87d80301e695e2f5a3ed258ad6f867a256ac3f7fb1e8077fb1f44eb4ac759 from peer d167955bf135ca77e24627c64e95ee0bd7831239590cb06aefc140217f4a88a2"
time="2021-08-17T16:32:52-04:00" level=trace msg="retrieval: requesting chunk 8857a5222d92f72aee48a3127c8b2cb1034226428fe0a7ab6fd31041ce922f93 from peer 808bd08bdb8c2854160be3d58bf37d8462085a7150212d69a62ddfa384e81a32"
time="2021-08-17T16:32:52-04:00" level=trace msg="retrieval: requesting chunk ebdcd51ffe05df73d8dc8555a81f4f2e9a4105bf7ad85b8f5368285e489ea21a from peer e03d1d763cac5a2c74b5fed77adf256e62d7ecf6849a60b25dc1b2e9583e3dd5"
time="2021-08-17T16:32:52-04:00" level=trace msg="retrieval: requesting chunk ebdcd51ffe05df73d8dc8555a81f4f2e9a4105bf7ad85b8f5368285e489ea21a from peer e03d1d763cac5a2c74b5fed77adf256e62d7ecf6849a60b25dc1b2e9583e3dd5"
time="2021-08-17T16:32:52-04:00" level=trace msg="retrieval: requesting chunk d27803264142a3ab1e005a74c96edf0162799e2d5b2b01cf57cfafd8b12596e2 from peer d167955bf135ca77e24627c64e95ee0bd7831239590cb06aefc140217f4a88a2"

You will notice there are a LOT of redundant retrievals of a single chunk from the SAME peer.  I could understand a possible retry of a missing chunk via a different peer, but to fetch the same chunk from the same peer is just a waste of SWAP bandwidth (and possible BZZ if it moved faster).
Steps to reproduce
curl http://localhost:1633/stewardship/a6ab79baf718f5ad76249e5b1cb1c3eee7d1c6d8e079d36566098493e148e361
is the collection that I was testing with on the xdai mainnet swarm.
Expected behavior
I would expect each chunk to be fetched only once per stewardship check of a given reference.
Actual behavior
As you can see from the log snippet above, it is redundantly fetching the same chunk from the same peer repeatedly.  And that's just a fraction of the log.  If necessary, I can provide the full log (which is still running) if you ask for 20's xdai5-L.out.
Actually, the full capture of retrieval logs from the /stewardship check is at:
https://gateway.ethswarm.org/access/74ac26c6002caf3bdd6e42139b4aad272ea54d436eb2abd0c25aee591b625ac8

So... this is a naive implementation. Keeping track of chunks that belong to a certain root hash is very costly once the set grows and this can send the node to an OOM kill. We intended the API to behave this way because optimizing this is not very trivial and can have quite a complexity with our current architecture. We will improve on  this in the future, but I don't think this is a significant issue and certainly not on prio.

Then I will continue by "collect-bee" implementation in TrueScript using mantaray-js and bee-js.
Any chance of getting a header flag on the stewardship to have it do just the single specified object and not the entire manifest on both GET and PUT?  Or do a stewardship/bytes with GET/PUT that only do what /bytes would do?
Right now if I detect a hole in the manifest at, for instance, the node that is 0/, if I do a stewardship on that reference, it ends up processing the entire manifest from that point on down, which is WAY more than is necessary, especially on the PUT.

Any chance of getting a header flag on the stewardship to have it do just the single specified object and not the entire manifest on both GET and PUT? Or do a stewardship/bytes with GET/PUT that only do what /bytes would do?

Not sure what you mean by "single specified object". The root hash which you give to traverse can be a variety of things and we need to go guesswork on traversals (both for GETs and PUTs). I agree that there is an inefficiency but this has been built with relatively small data sets in mind. For larger data sets we would need to be able to serialize a pointer to where exactly in the graph traversal we were and resume from that pointer both for PUTs and GETs (preventing the incurred cost of traversal or upload of the parts which do not need to be uploaded), however, having toyed with implementing this, it would require quite some changes on our abstractions to support such complex operations

I'm doing some outside work with mantaray-js and bee-js and might be able to work around this request.   But if you don't mind keeping it open just in case I see an easy way in the go code to manage it.


Append to existing parquet file?

Hi,
Is it possible to run csv2parquet in a way that means it appends to an existing parquet file?  I have a large number of CSV file with a fixed schema that I'd like to convert into a single parquet file.
Thanks

The nature of the Parquet format is such that you can't really update an existing file. (Wellllll, maybe it's technically possible to do surgery and add new row groups and then update the footer. It'd require using relatively low-level APIs in the parquet library, though.)
We could provide an experience that mimics this, but it'd be recreating the entire file each time.
Would some other options work:

do nothing - the user has to create a single CSV, e.g. by:

(cat file1.csv; tail -n+2 file2.csv; tail -n+2 file3.csv) > tmp.csv
csv2parquet tmp.csv
rm tmp.csv

permit process substitution, so we support (1) but without the intermediate file

csv2parquet <(cat file1.csv; tail -n+2 file2.csv; tail -n+2 file3.csv)

Currently, this will fail with No such file or directory: /dev/fd/63.parquet.

permit taking an arbitrary number of CSV file arguments, but use the 1st as the source of column names/types:

csv2parquet file1.csv file2.csv file3.csv

My gut feeling is that (3) would be a nice addition, and a relatively small change to the existing code. If the concern is that you want to append to avoid doing the computation work that compresses/optimizes the parquet file, none of these is suitable, though.

Hi,
Ah yes I recall reading somewhere that parquet is not something that naturally lends itself to simple appending, so I understand the difficulties here.
For now I had come up with some bash for loops to combine my nested dir structure and cat all the *.csv.gz files into one large .csv.gz.  I was then gunzip'ing this and calling csv2parquet.  So pretty much a variant of (1).
Unfortunately at this point I discovered that occasionally the rows in the CSV has extra commas, hence yesterdays pull request to help me discover which lines are broken!
So if you have lots of CSV files then (3) is good, although how would this work with xargs for example?
However there is an argument that (2) e.g. read from stdin would allow you to pipe the output of zcat directly into csv2parquet without the need to decompress to disk first.
Thanks

So if you have lots of CSV files then (3) is good, although how would this work with xargs for example?

Wouldn't it just work? :) e.g.:
find -type f -print0 | grep .csv$ | xargs -0 csv2parquet (apologies, I always forget the correct usage of -name, so am using grep to filter)
The only case where it'd fail is if your list of files was so big that your shell environment space was exhausted. Is that what you're getting at?

read from stdin would allow you to pipe the output of zcat directly into csv2parquet

If this is common (and it probably is), I'd support teaching csv2parquet how to sniff the file and do the gzip decompression on the fly. Process substitution has some subtle warts - it's not supported across all shells, and failures in the underlying process don't bubble up, e.g.:
$ echo <(false)
/dev/fd/63
$ echo $?
0

I feel like this is probably done better without loading the files into Py. You can do it from shell:
Suppose you have file1,csv, ... file3.csv and you'd like to concatenate them so that they are 1, 2, 3 stacked.
# remove header from f2 and 3
sed -i '' 1d file2.csv
sed -i '' 1d file3.csv
# append file2 to file1
file2.csv >> file1.csv
# append file3 to file1
file3.csv >> file1.csv


readline() hangs in 0.4.0-rc2 kernel

In the 0.3.11 kernel, the following works fine:
sometext = readline()

This brings up a little box that says STDIN> which allows you to enter text for readline(). However, when the same code is submitted in the 0.4.0-rc2 kernel, no textbox appears; the kernel just hangs. When interrupted after submitting this code, the following messages appear:
LoadError: InterruptException:
while loading In[2], in expression starting on line 1

 in process_events at ./stream.jl:708
 in wait at ./task.jl:360
 in wait at ./task.jl:286
 in wait_readbyte at stream.jl:347
 in readuntil at stream.jl:924
 in readuntil at io.jl:162
 in readline at stream.jl:910
 in readline at stream.jl:912

This suggests to me that it's trying to read something, i.e. the readline() is working, but no means of entering text is given, so nothing happens.
It's not entirely clear to me whether this is an issue with JuliaBox, IJulia, or Jupyter, so if it's unrelated to JuliaBox I'd be happy to go bother someone else instead.

Seems to be an issue with rc2. Works fine when updated to the final release.

That's great! Any idea when the 0.4.0 release will go live on JuliaBox.org?

They will go live on Saturday.

fixed via #310


Document search showing result with attachmentCount, but no urls for attachments

I'm getting results from the document endpoint that have a positive attachmentCount but with no url for accessing the attachment. For example (this is a printout of Python JSON):
{u'agencyAcronym': u'DOD',
 u'allowLateComment': False,
 u'attachmentCount': 1,
 u'commentDueDate': u'2007-06-11T23:59:59-04:00',
 u'commentStartDate': u'2007-04-11T00:00:00-04:00',
 u'commentText': u'Please see attached.\n',
 u'docketId': u'DOD-2006-OS-0216',
 u'docketTitle': u'Limitations on Terms of Consumer Credit Extended to Service Members and Dependents',
 u'docketType': u'Rulemaking',
 u'documentId': u'DOD-2006-OS-0216-0230',
 u'documentStatus': u'Posted',
 u'documentType': u'Public Submission',
 u'numberOfCommentsReceived': 1,
 u'openForComment': False,
 u'postedDate': u'2007-06-11T00:00:00-04:00',
 u'rin': u'0790-AI20',
 u'title': u"World's Foremost Bank"}

Is this a bug? I see there's a field for attachments but I don't know under what conditions to expect to get that in the query response. Thanks!

If the attachmentCount is greater than 1 you should expect to see the attachments field.  Below is the JSON for attachments that I get for the given document id.
"attachments": [
{
"attachmentOrderNumber": 1,
"fileFormats": [
"https://api.data.gov/regulations/v3/download?documentId=DOD-2006-OS-0216-0230&attachmentNumber=1&contentType=pdf"
],
"postingRestriction": "No_restrictions",
"title": "World's Foremost Bank Attachment"
}
],

Ok, this works for me now. I think my original ticket was invalid--I was looking at data from the documents endpoint. Thanks for your help!


FarmingStrategyBase stakingPool

FarmingStrategyBase

stakingPool

Strategies upgrade

FarmingStrategyBase 1.1.2
CompoundFarmStrategy 1.1.1
CurveConvexFarmStrategy 1.0.1
DefiEdgeQuickSwapMerklFarmStrategy 1.1.1
GammaQuickSwapMerklFarmStrategy 1.1.1
GammaRetroMerklFarmStrategy 2.0.1
IchiQuickSwapMerklFarmStrategy 1.1.1
IchiRetroMerklFarmStrategy 2.0.1
QuickSwapStaticMerklFarmStrategy 1.0.1

Cover it Jude


Extension causes high cpu load

Issue Type: Performance
Extension Name: python
Extension Version: 2018.12.1
OS Version: Linux x64 4.15.0-42-generic
VSCode version: 1.30.1

:warning: Make sure to attach this file from your home-directory: /home/selpo/ms-python.python-unresponsive.cpuprofile.txt :warning:
Find more details here: https://github.com/Microsoft/vscode/wiki/Explain:-extension-causes-high-cpu-load
ms-python.python-unresponsive.cpuprofile.txt

Closing as a duplicate of #3737 unless you wish to open a new issue with our issue template filled out as the info provided is more for VS Code's benefit than ours.


Aqua console and gateway pods restarting.

Hi, I've been finding that Aqua console and gateway pods are restarting. I've just been following the logs of the console and this is all I see:
$ oc logs aqua-console-6dfc555885-kstvs -f
...
...
2022-07-19 16:34:47.081 INFO    successfully initialized Aqua Units
2022-07-19 16:35:12.941 INFO    successfully initialized Aqua Units
2022-07-19 16:35:13.300 INFO    successfully initialized Aqua Units
2022-07-19 16:35:25.727 INFO    successfully initialized Aqua Units
2022-07-19 16:35:26.060 INFO    successfully initialized Aqua Units
2022-07-19 16:36:22.840 INFO    successfully initialized Aqua Units
2022-07-19 16:36:23.353 INFO    successfully initialized Aqua Units
2022-07-19 16:37:25.727 INFO    successfully initialized Aqua Units
2022-07-19 16:37:26.093 INFO    successfully initialized Aqua Units
2022-07-19 16:37:26.923 INFO    successfully initialized Aqua Units
2022-07-19 16:37:27.681 INFO    successfully initialized Aqua Units
2022/07/19 16:37:54 terminated

The console was up for about 20 minutes.
It then restarts, as do the logs:
$ oc logs aqua-console-6dfc555885-kstvs -f
2022-07-19 16:38:25.969 INFO    Logger started with level INFO
2022-07-19 16:38:31.445 INFO    Initializing Aqua CSP Management Console        {"version": "2022.4.81"}
2022-07-19 16:38:31.504 INFO    Trying to connect to Postgres DB Host [aqua-database-svc]
2022-07-19 16:38:31.539 INFO    Host [aqua-database-svc] schema [public] database [scalock] connection established successfully with SSL mode [disable]
2022-07-19 16:38:31.539 INFO    Locking the postgres database...
2022-07-19 16:38:31.541 INFO    Checking postgres version...
2022-07-19 16:38:31.547 INFO    Postgres version 11.16, minimum required version is 9.5.0, validation successfully passed.
2022-07-19 16:38:31.547 INFO    Checking if database scalock exists
2022-07-19 16:38:31.553 INFO    scalock database already exists, there is no need to create it.
2022-07-19 16:38:31.553 INFO    Connecting to DB instance "scalock", schema "public"
2022-07-19 16:38:31.571 INFO    Database "scalock" maximum connections: 20
2022-07-19 16:38:31.571 INFO    Database "scalock" maximum connection lifetime: 900 sec
2022-07-19 16:38:31.571 INFO    Database "scalock" current schema: public
2022-07-19 16:38:31.618 INFO    Checking database version for upgrade...

The pods have restarted a few times in the last hour:
$ oc get pod
NAME                                      READY   STATUS              RESTARTS        AGE
aqua-audit-database-848cf694cc-x4zbw      1/1     Running             0               62m
aqua-console-6dfc555885-kstvs             1/1     Running             3 (3m32s ago)   62m
aqua-database-7d6586794f-lpglm            1/1     Running             0               62m
aqua-gateway-5d7bd74477-sl6hx             1/1     Running             2 (3m34s ago)   62m

Describing the console pod shows:
$ oc describe pod aqua-console-6dfc555885-kstvs | grep "Containers\:" -A15
Containers:
  web:
    Container ID:   cri-o://e313afc7010276db493bdaedabf298dc6fde4aaa0639c4e21373f12b5f093ae5
    Image:          registry.aquasec.com/console:2022.4
    Image ID:       registry.aquasec.com/console@sha256:395986f50f963ef61ebb8ed2cda10a0760f10c5f40a4f7e0ad0d27a3c240a1be
    Ports:          8080/TCP, 8443/TCP
    Host Ports:     0/TCP, 0/TCP
    State:          Running
      Started:      Tue, 19 Jul 2022 17:38:22 +0100
    Last State:     Terminated
      Reason:       Error
      Exit Code:    137
      Started:      Tue, 19 Jul 2022 17:12:41 +0100
      Finished:     Tue, 19 Jul 2022 17:38:17 +0100
    Ready:          True
    Restart Count:  3

And for the gateway it shows:
$ oc describe pod aqua-gateway-5d7bd74477-sl6hx | grep "Containers\:" -A15
Containers:
  gate:
    Container ID:   cri-o://1252e10fc94714e51f5d05f625f8b3bb709007d5a6701469a5f993ca82d3b8a9
    Image:          registry.aquasec.com/gateway:2022.4
    Image ID:       registry.aquasec.com/gateway@sha256:3c57340393ed1675fe9f8353a75fa4aeebdc50e944fa02feb9047dfc3f6a74ca
    Ports:          3622/TCP, 8443/TCP
    Host Ports:     0/TCP, 0/TCP
    State:          Running
      Started:      Tue, 19 Jul 2022 17:38:21 +0100
    Last State:     Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Tue, 19 Jul 2022 17:12:36 +0100
      Finished:     Tue, 19 Jul 2022 17:38:15 +0100
    Ready:          True
    Restart Count:  2

Any thoughts please? Thank you.

Hi @mtcolman By looking at the logs nothing suspicious, can you please provide your cluster information(k8s type & version), helm install command, if possible values.yaml (without creds).
I don't see any error type logs in the console, can you also check the DB pod logs, and console logs and provide them here?

@mtcolman any update on it?

@mtcolman
Please reopen the issue if it is still relevant please open a new issue and add more details


Unclear message on ParseUrl failure

Fixed by https://github.com/pagespeed/ngx_pagespeed/pull/1150
See https://github.com/pagespeed/ngx_pagespeed/issues/1148 for a situation where this would have been helpful.

Released in <IP_ADDRESS>.


Inlay hints: Allow ctrl/cmd+click to go to a type's definition

Testing #129381
I tried ctrl+clicking TerminalIcon here intuitively:

Going to an argument definition would also be handy/expected

In a similar vein, the hover for the inlays should show for the type they're hovering imo

I don't know what the plans are for inlay hints, but I think this is doable with injected text.
However, the injected text feature needs to be extended to support hovers & decorations that just apply to a specific part of the injected text.

@jrieken Adding you since I believe VS Code's inlay hints api would need to be modified to support this

Yeah, we want that

Stretch for September

Just sample/dummy data but the interaction is real!
https://user-images.githubusercontent.com/1794099/148101798-e972b1fb-177b-4d39-8418-45f9b6854786.mov

@weswigham @RyanCavanaugh @DanielRosenwasser We want to make sure that TypeScript would be able to support this API
With the current proposal, TypeScript would need to generate the links for the inlay hint when it returning them. Do you believe this will be feasible TypeScript, or would the performance costs would be too high? We only request the hints for the current viewport but each hint could potentially contain multiple clickable symbols

Hm, when I did the same for my interactive diagnostics experience I returned a handle for the symbol (or generated a link that referenced the handle) that could then be used for further requests. Would a deferred access pattern like that be more suitable?

Yeah, there is two options. The link-approach or a more explicit way:

The inlay hint text uses markdown links, like [Map](file:///path/lib.d.ts#L88776)<T> or command-links. The latter will allow for said indirections. This will work but is a little unspecific and asks for escaping issues...
The inlay hint object will "known" about links, so InlayHint#text can be string or StringWithLinks (similar to tsserver's display parts) and the provider will have the ability to resolve a hint which means it must fill in link targets. The document link provider uses a similar pattern. So, at provide-time we need to know that something (one or more parts of an inlay) will be a link and at resolve-time those links need to be enriched with targets.

@weswigham Would there be cases where we think something would be a link but then can't resolve it?
@jrieken Have we considered deferring computing the links until the user hovers over the inlay hint, similar to how cmd+hover works with normal code?

I'm just thinking you want a symbol reference that you could use for arbitrary LS operations so you can then use it to provide a hover, find all refs, go to definition, and other symbol operations (rename?). So maybe a link to a declaration location works, but the plugin parses the link to use the location to provide the context menu items. (Which makes it sound a bit more specific than a normal arbitrary location link.)
However, as you guess, there are definitely some things that could appear in inlay hints that don't have traditional authoritative declaration locations you could use as a "source location" for the LS operation - for example string literals support the rename operation (we find and replace all the matching literals), so in theory one could want to rename such a literal, or just do a find a refs, but I don't think they usually have a definition site. A non-location ref (short-lived, likely only until the next inlay hints request) from the LS could work here, but would need new LS operations for resolving the results of various LS operations at those refs.
So I see links as a pretty quick and dirty way to get like 80% of the way there, but the last 20% would need the different, more structured solution, I think.

Also - I also am generally a fan of providing a general-purpose output format instead of markdown. Having every language wrangle edge-cases of markdown when not every editor may understand markdown natively doesn't seem like an optimal way to layer things. A response format where editors could choose however rich/bare to display these would probably be much more flexible and usable long-term for VS Code.

Also - I am generally a fan of providing a general-purpose output format instead of markdown. Having every language consider edge-cases of markdown when not every editor may understand markdown natively doesn't seem like an optimal way to layer things.

@DanielRosenwasser Yes, esp for LSP that makes a lot of sense. Tho, for VS Code and markdown (and since recently the equivalent subset of html) make sense to me. We have some utils in MarkdownString to help construct them but those can be improved. A general-purpose output format can only differ in ergonomics but not in functionality. This is because all of the API (esp. of providers) is just structured output for specific rendering purposes. The markdown/html vs more structure discussion is usually driven by our decisions how to render/constrain things, e.g for inlay hints we can define more API for such links/commands or leave it a little more open by allowing (some) markdown/html. I believe in this case things will be functionally equivalent because a command-link is the most powerful thing we have. It's about developer ergonomics and clarity.

@jrieken Have we considered deferring computing the links until the user hovers over the inlay hint, similar to how cmd+hover works with normal code?

@mjbvz I was concerned about discoverability but it's definitely an option. I believe the question if this is more like the cmd+hover gesture or more like code lens or plain links? Anyone having strong feelings about the (inactive) underline that always shows?

/cc @dbaeumer

Had a good chat with @dbaeumer and we came up with the following API/idea
	export class InlayHintLabelPart {
		value: string;
		action?: Command | Location; // used with provider
	}

	export class InlayHint {

		label: string | InlayHintLabelPart[];

		// rest...
	}

	export interface InlayHintsProvider<T extends InlayHint = InlayHint> {

		resolveInlayHint?(hint: T, part: InlayHintLabelPart, token: CancellationToken): ProviderResult<T>

		// rest...
	}

The label of an inlay hint can be a normal string or an array of label parts. The label part is a string and an "action" which can either be a command or a location. The action can be filled-in lazy via the resolveInlayHint-call. The editor would call resolve on hover for instance. The "action"-property (better name tbd) can be

command which we will simply invoke on click. This is very similar to code lens and others
location is a source location which we will use with applicable providers, e.g source might be "uri: some/path/lib.d.ts, range: L23,11" and we would invoke the references provider with that location but at the position of the inlay hint. This effectively allows to show a context menu very similar to the one we show over "real" positions.

@jrieken not familiar with this API area but is this forward thinking for the idea of "overlay" hints as well? https://github.com/microsoft/vscode/issues/128162

@Tyriar overlay hints is something that we have in mind but it's not to related to this issue. I suggest we leave that with its issue

Did a prototype implementation of the ideas mentioned above (https://github.com/microsoft/vscode/issues/129528#issuecomment-1007487324). We are seeing a fake inlay hints provider but as label part "action" it returns locations into lib.d.ts. With that the hover logic figures that there is hover provider for TypeScript files and invokes it for the corresponding location. All is lazy, eg the label part is resolved lazy and the hover as well. What needs to be know upfront is the label part (w/o action).
https://user-images.githubusercontent.com/1794099/148598073-9e5b3fc8-1013-4e98-83fe-b810f74c7c7c.mov

What about inlay hints that don't have a defined symbol location, like "foo" or calculated anonymous types? The LS knows how to provide hovers/refs/etc for something that, it just needs a way to refer to it that doesn't rely on a declaration location.

What about inlay hints that don't have a defined symbol location, like "foo" or calculated anonymous types?

It's not strictly limited to the defining location of the symbol but about any location that when hovered/clicked would yield the desired result. Tho, I do admit that this is usually the definition. Also, you can always use the Command which allows to do anything but with much less comfort.

:wave: I think this change isn't backwards compatible (at Monaco level):
-	provideInlayHints(model: model.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
+ 	provideInlayHints(model: model.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHintList>;

Because you used to return an array of hints, and now you need to return the object with hints (and it crashes if you pass the array ) https://github.com/microsoft/TypeScript-Website/issues/2247

Inlay hints are still proposed API which means breaking changes are happening. Also, there is no stability guarantee wrt API for monaco

@jrieken
Sorry for asking in not the most appropriate place, please point me to the right issue, if any is present.
I'm reusing the proposed API in rust-analyzer and came up with a small test change: https://github.com/rust-analyzer/rust-analyzer/compare/master...SomeoneToIgnore:kb/vscode-inlay-hints?expand=1
Similar changes worked and displayed the hints on early proposal's stages, but not now:

with the let i = 22; line receiving the first item from the json array on the right.
I see no errors or warnings in any logs available, ensured that all experimental APIs are enabled and the extension installs and starts normally, so interested, what else have I missed?

Hard to distance-diagnose... Is the feature enabled? Check the "editor.inlayHints.enabled": true-setting?
Also, do "F1 > Log Level > Trace" and check the extension host log via "F1 > Show Logs > Extension Host". It should show message "similar" to these [2022-02-09 13:39:16.135] [exthost] [trace] [vscode.typescript-language-features] INVOKE provider 'j=>j.provideInlayHints(f.URI.revive(U),N,W)'

The former is on, but the latter does not happen (no trace entries in the logs).
I will check that more, but if you happen to have any API usage example at hand (the one from the video, maybe?), that would help me drastically.
Thanks nonetheless.

Can you check the trace log of the window for messages like [2022-02-09 13:58:11.398] [renderer1] [trace] [DEBOUNCE: InlayHint] for file:///Users/jrieken/Code/vscode/src/vs/editor/common/services/editorSimpleWorker.ts is 40.166666666666664ms? That is a good indication if the feature has a provider it wants to work with...
The sample snippet from the video above is this. Notice how it is registered for the fooLang (which is my test/fiddle language). Changing that to rust or typescript should enable this
vscode.languages.registerInlayHintsProvider('fooLang', new class implements vscode.InlayHintsProvider {
        // onDidChangeInlayHints?: vscode.Event<void> | undefined;
        provideInlayHints(doc: vscode.TextDocument, range: vscode.Range, _token: vscode.CancellationToken) {
            const result: vscode.InlayHint[] = [];
            const text = doc.getText();

            {
                let end = doc.offsetAt(range.end);
                let pos = doc.offsetAt(range.start);
                while (pos < end) {
                    const idx = text.indexOf('bar', pos)
                    if (idx < 0) {
                        break;
                    }
                    pos = idx + 4;
                    const start = doc.positionAt(idx);
                    result.push(new vscode.InlayHint(start, [{ value: 'foo' }]))
                    // result.push(new vscode.InlayHint('FooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo', start))
                }
            }
            {
                let end = doc.offsetAt(range.end);
                let pos = doc.offsetAt(range.start);
                while (pos < end) {
                    const idx = text.indexOf('foo', pos)
                    if (idx < 0) {
                        break;
                    }
                    pos = idx + 4;
                    const start = doc.positionAt(idx + 3);
                    const label: vscode.InlayHintLabelPart[] = [
                        { value: ': ' },
                        { value: 'Map' },
                        { value: '<number, ' },
                        { value: 'typeof document' },
                        { value: '' },
                        { value: '>' },
                    ]
                    const hint = new vscode.InlayHint(start, label);
                    hint.paddingLeft = true;
                    hint.command = { command: 'extension.helloWorld', title: 'sss' }
                    result.push(hint)
                }
            }
            return result;
        }

        async resolveInlayHint(hint: vscode.InlayHint): Promise<vscode.InlayHint> {
            await new Promise(resolve => setTimeout(resolve, Math.random() * 1234))
            hint.tooltip = new vscode.MarkdownString('I am **Resolved** $(zap)', true);

            if (typeof hint.label !== 'string') {
                for (let part of hint.label) {
                    if (part.value === 'Map') {
                        part.location = new vscode.Location(
                            vscode.Uri.file('/Users/jrieken/Code/vscode/extensions/node_modules/typescript/lib/lib.es2015.collection.d.ts'),
                            new vscode.Position(20, 10)
                        )
                        part.tooltip = new vscode.MarkdownString('`lib.es2015.collection.ts`', true)
                        part.command = { command: 'helloWorld', title: 'Hello World', tooltip: 'dddd' }

                    } else if (part.value === 'typeof document') {
                        part.location = new vscode.Location(
                            vscode.Uri.file('/Users/jrieken/Code/vscode/extensions/node_modules/typescript/lib/lib.dom.d.ts'),
                            new vscode.Position(17160, 13)
                        )
                        part.tooltip = new vscode.MarkdownString('`lib.dom.ts`', true)
                    } else if (part.value === 'foo') {
                        part.command = {
                            command: 'helloWorld',
                            title: 'Hello World',
                            tooltip: 'dddd'
                        }
                        part.tooltip = new vscode.MarkdownString('I am a _label_ *part* $(check)', true)
                        part.location = new vscode.Location(
                            vscode.Uri.file('/Users/jrieken/Code/vscode/extensions/node_modules/typescript/lib/lib.es2015.collection.d.ts'),
                            new vscode.Position(20, 10)
                        )
                    }
                }
            }

            // console.log('DONE', hint.label)
            return hint;
        }
    })

For me it does:
TRACE [DEBOUNCE: InlayHint] for file:///home/grayshade/Projects/rust-analyzer/crates/rust-analyzer/src/to_proto.rs is<PHONE_NUMBER>6666666ms

[2022-02-09 20:24:22.000] [exthost] [trace] [matklad.rust-analyzer] INVOKE provider 'Q=>Q.provideInlayHints(h.URI.revive(W),O,$)'
[2022-02-09 20:24:22.084] [exthost] [trace] [InlayHints] 0 inlay hints from 'matklad.rust-analyzer' for [object Object]
[2022-02-09 20:24:22.084] [exthost] [trace] [matklad.rust-analyzer] provider DONE after 84ms

although the extension is returning a good amount of hints.

Strange, so our range is (323, 0) - (552, 0), the hint position is (471, 0), but the range doesn't contain that position?

Oh... That is very interesting and very good drilling 👏 It is likely that position isn't an instance of vscode.Position but just a lookalike. TypeScript doesn't enforce instanceof-compatibility, e.g its structured typing ignore prototypes or ctor-functions and therefore we don't successfully exercise contains. Today, you can workaround this by using new vscode.Position(...) but I will also push a fix to relax this

This isn't working as I was expecting it to, ctrl+click goes to the symbol the type is annotating, not the type itself.

Cursor feedback is also not great

@Tyriar I think that's the default behavior (if you look closely, I believe it actually underlines the var in this case)
We haven't actually hooked this up for JS/TS yet but I'll open a TS issue for this

@mjbvz makes sense, thanks


Restarting Debugger Failing to Kill Nodemon

VSCode Version: 1.26.1
OS Version: MAC OS 10.12.6

Steps to Reproduce:

Start Debugger fn + F5
Restart debugger from the debugger panel. It first crashes the app and then tries to restart but it gets timeout saying this

Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED <IP_ADDRESS>:29557).

When i see in the integrated terminal it show me up

[nodemon] app crashed - waiting for file changes before starting...

My launch configuration
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch via Nodemon",
      "type": "node",
      "request": "launch",
      "runtimeExecutable": "nodemon",
      "program": "${workspaceFolder}/api/api.js",
      "restart": true,
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "env":{"NODE_ENV":"development"},
      "timeout": 10000
    },
  ]
}

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

Please note also that if you quit VS Code after launching nodemon-hosted processes and don't stop them all manually in each process terminal with Cntrl-C you will find orphaned Node processes in Activity Monitor still running and consuming CPU after VS Code has stopped. These can of course be manually force-quit in Activity Monitor. I have requested an update for tasks to allow automatic process clean-up via a task (https://github.com/Microsoft/vscode/issues/65986). But "proper" support for nodemon such that Debug Stop and Debug Restart kill all relevant processes is the best solution assuming this is possible. For reference, I use compound of launch configs that look like below.
        {
            "type": "node",
            "request": "launch",
            "name": "Api",
            "runtimeExecutable": "nodemon",
            "cwd": "${workspaceFolder}/built",
            "program": "${workspaceFolder}/built/app.js",
            "restart": true,
            "env": {
                "NODE_ENV": "development",
                "DOMAIN": "xxx",
                "FORCE_COLOR": "10"
            },
            "port":9300,
            "runtimeArgs": [
                "--inspect-brk=9300"
            ],
            //"outputCapture": "std",
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen"
        },

This really needs to be fixed, asap.
In my case, if I forget to manually kill the orphaned nodemon processes, they will eventually get stuck in a loop and start consuming 100% CPU. It's a major problem, and one that makes development using nodemon completely impractical.

Wait a second - it actually looks like I have some success with the --exitcrash argument mentioned in https://github.com/Microsoft/vscode/issues/40430#issuecomment-352442430.
When that argument is specified, it actually looks like the nodemon process is killed when debugging is stopped or restarted :tada:
If that's really all it takes, the documentation here should probably be updated to mention that, instead of the current tip, which suggests that we must manually kill the orphaned nodemon processes.

Great posts @thomas-darling. --exitcrash stops abandoned node processes for me.
However the next problem I have then is that 'Restart Debugging' generally opens a new integrated terminal (only sometimes reuses an existing terminal) and since I run a compound debug config (multiple processes) I end up with multiple abandoned terminals with last line showing "[nodemon] app crashed". This problem would be solved I believe by the ability to specify the presentation property (incl. terminal group) for a launch config. (See https://github.com/microsoft/vscode/issues/68123#issuecomment-478341780). This would allow to specify presentation.panel as dedicated or new to choose if an existing terminal should be reused on 'Restart Debugging'. This issue is also relevant when using external terminals.
(As a side note, right now for me I can't use nodemon and integrated terminals at all (!) due to https://github.com/microsoft/vscode/issues/71850 😟. But I hope that will get resolved not too long away.)

I have a different issue even while nodemon if I save a file the server restarts but after that 2 processes with node --inspect-brk=port keep running with high CPU usage.
They have a port that doesn't match with the debugger port shown in the terminal.
And even if I terminate those processes nodemon keeps running, indicating that those processes have no relation to the currently running server with nodemon.
Even if I quit VSCode those 2 processes keeps running. And there are only 2 processes never more than 2 or less than 2.
Attaching screenshots below:

You can see in the screenshot there are 3 node processes, the bottom one is the actual process which is running the server, which has quite low CPU usage.
The top 2 processes are using too much CPU.
Here is the screenshot of the integrated terminal showing the debugger port:

Launch config:
{
      "name": "Launch Nodemon in Debug Mode",
      "type": "node",
      "request": "launch",
      "runtimeExecutable": "npx",
      "program": "${workspaceFolder}/build/app.js",
      "cwd": "${workspaceRoot}",
      "preLaunchTask": null,
      "runtimeArgs": [
        "nodemon",
        "--nolazy",
        "--exitcrash"
      ],
      "env": {
        "NODE_ENV": "development",
        "NEW_RELIC_ENABLED": "false",
      },
      "console": "integratedTerminal",
      "outFiles": [
        "${workspaceRoot}/**/*.js"
      ],
      "sourceMaps": true,
      "protocol": "inspector",
      "restart": true
}

We since have a new debugger that handles child processes and trees like Nodemon in a more reliable way. Please let us know if you're still running into problems, and if so open an issue on that repo.


import.html file

For the people that are using d3 with web components, an import.html file would be an essencial addition.
It is simply an import.html with the following content:
<script src="d3.min.js" charset="utf-8"></script>

When working with web components, every component that uses d3 will import it through:
<link rel="import" href="../d3/import.html">

This will prevent importing d3 more than once.
I can make a pull request if you want, but it is a very simple task.

Merging into #2391.


how to avoid takes up the full height while it's initialized?

In FloatingSearchView how to avoid 'takes up the full height ' or any way to display results when the screen is initialized ? I just want to avoid the empty blank screen below the FloatingSearchView screen when it is initialized !
For Ex:

Hi @LOG-TAG ,
have you looked at #46 ?


I want a dracula theme like highlight group

I don't intend to ship any colour themes with this plugin, but if you can list me the colours you want it's trivial to write a bit of code that you can add to your configuration.


Sometimes quoting across line breaks doesn't work

Sometimes when I try to quote across a paragraph split (i.e. two newlines) the highlighting doesn't move past the first newline, so I need to create two separate quotes to find the indices, and then manually combine them (i.e. change <<1 - 10>><<12 - 17>> to <<1 - 17>>).
It doesn't always happen though, so without more testing I'm not sure what's responsible.

This is known/intentional, though not ideal. I had to split up the story into chunks as a rendering optimization (so the UI doesn't try to re-render the whole story every time the set of highlighted tokens changes, which made things lag). I could either:

Put some <hr/>s in there so it's clear where the boundaries are
Think about it and try to come up with a solution that is invisible to the user

I figure it's not a huge priority since I think this should happen pretty rarely and has an easy workaround. I can come back to it later if all the higher-priority issues are fixed. How do you feel about there just being some random horizontal rules between some paragraphs?


shell: local fs export is broken

Problem
As of 0.14.0, exporting to the local filesystem is broken:

export to a path without . or / characters: silent fail. The directory is not created.

⋈ .directory | export mydir
⋈

export to any path with . or / characters: error.

⋈ .directory | export mydir/foo
declare: invalid name "mydir/foo"

⋈ .directory | export /foo
declare: invalid name "/foo"

⋈ .directory | export ./foo
declare: invalid name "./foo"

Looks like "export" is clashing with<EMAIL_ADDRESS>type DeclClause struct {
	// Variant is one of "declare", "local", "export", "readonly",
	// "typeset", or "nameref".
	Variant<EMAIL_ADDRESS>	Args<EMAIL_ADDRESS>}

Since this only applies to LangBash an easy fix is to set the parser to LangPOSIX (as in sh instead of bash).

Just beware that switching to POSIX also loses you Bash syntax that users probably expect to work, such as foo |& bar, if [[ foo == bar ]], let x = y - z, and so on.

Thanks for the input @mvdan. Yeah, we need to bikeshed what we want to support or not. Not just syntax but also shell builtins (I don't mean Dagger Shell builtins, in mean mvdan/sh builtins).


How can I use classpath feature in migrate ant target?

What version of Flyway are you using?
3.2.1 or 4.0
What database are you using (type & version)?
oracle <IP_ADDRESS>.0
What operating system are you using?
linux
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)

I created db/migration directories under my-project/src/main/resources
I put V1__test.sql file under db/migration/ directory
Builded my project. I have my-project.jar package.
When I extract my-project.jar package, I can see db/migration/V1__test.sql
I try to use classpath feature for locations but I took "Unable to resolve location classpath:db/migration" error.

Where should I put my-project.jar in migrate ant target?
What should I write to lyway.locations value in migrate ant target?
What did you expect to see?
I expected to migrate sql files from my-project.jar without extract its content anywhere.
What did you see instead?
I took "Unable to resolve location classpath:db/migration" error.

I'm having the same problem @husnusenturk

Add your jar to the Flyway classpath (as described in the usage section) and everything should work as expected: https://flywaydb.org/documentation/ant/

Thanks for your help.


docs: Update getting started dockerfile

Ubuntu 16.04 still installs Python:2.7 and pip. Thus, the getting-started docker image doesn't build as expected.
So, an update to Ubuntu:20.04 is needed for the images to build successfully.

This fixes build error, how can we get someone to look at this?

If someone is interested in merging this, I can fix the pipelines :D

@SweeXordious, You need to add DCO sign-off to your commits.  Details here; https://github.com/hyperledger/indy-sdk/pull/2438/checks?check_run_id=4056269767

@WadeBarnes Can you please let me know why the CI is not passing ? I don't have access to jenkins

@WadeBarnes Can you please let me know why the CI is not passing ? I don't have access to jenkins

It's a rust (cargo) version issue that is failing the builds. https://github.com/hyperledger/indy-sdk/pull/2452#issuecomment-988177968

Thanks, will wait until it's fixed then rebase

A fix for the build issues has been implemented (https://github.com/hyperledger/indy-sdk/pull/2470).  Please rebase this PR on the latest from the main branch so it is no longer blocked by the related build issues.

@SweeXordious, Sorry, it looks like the merge form another PR has created a conflict with your change.  Could you please review.

@WadeBarnes Thanks for letting me know. Conflicts resolved.


logcat via adb shell doesn't get anything

I have the Tuya android app v3.8.5 (latest) and tried the adb shell trick to get the keys for the smartplugs I'm using with Tuya. I can get a shell just fine on my android phone while connected to USB, and then I tried removign and re-adding the smartplugs, killing the app, etc, but logcat | grep BindDeviceSuccessPresenterlogcat doesn't get anything at all ...
Has the log entry name changed?

In case you haven't found this yourself already. This approach seemed to have worked only up to version 2.8.1 (see https://github.com/clach04/python-tuya/wiki).
Now you can find the appropriate Ids, when you follow this guide: https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md

Updated the docs, thanks!


Update MD file on new branch 2017-11-26_07-31-05

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/content1.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Refactor python-agent in golang

High level set of tasks:

Basic Framework for handling events - Not Daishan
Get project into CI - Not Daishan
Packaging of project and integration into rancher/cattle - Not Daishan
Refactor the following processes to be launched by monit (instead of the go-agent launching/owning them) - Not Daishan

cadvisor
host-api

Events

compute

compute.instance.activate
compute.intance.deactivate
compute.force.stop
compute.instance.inspect
compute.instance.pull
compute.instance.remove

storage

storage.image.activate
storage.volume.activate
storage.volume.deactivate
storage.volume.remove

delegate

delegate.request

Ping logic

Dropped ping logic that causes agent to sever connection after N pings are dropped
Reporting containers for sync/backpopulation logic
Reporting host status using our collectors:

cpu
disk
iops
memory
operate system

Implement new/remaining docker api parameters #4708

Starting with v1.2.0-pre4-rc2, we've started using the new go agent. Any bugs for it will be filed separately.


Add QueryParam to swagger without request object

@dj-nitehawk I want to add a QueryParam to my swagger without define a extra request object like this one:
 public class Request
 {
     [QueryParam]
     public string? Status { get; set; }
}

i tried to add this in my summary without the request object but swagger did not show this information:
s.Params["status"] = "XXXX";
My full endpoint:
public class AllUsersEndpoint : EndpointWithoutRequest<IEnumerable<UserListItemResponse>, AllUsersMapper>
{
    public ApplicationUserService ApplicationUserService { get; set; } = null!;

    public override void Configure()
    {

        Summary(s =>
        {
            s.Params["status"] = "xx"; // NOT VISIBLE IN SWAGGER
        });
        Get("users");
    }

    public override async Task HandleAsync(CancellationToken c)
    {
        string? status = Query<string>("status", isRequired: false);
        ...
    }
}

i see...
well, without a request DTO, there's no place to infer query parameter details from.
if it was a route parameter like the following, it will just work:
public class AllUsersEndpoint : EndpointWithoutRequest
{
    public override void Configure()
    {
        Get("users/{status}");
        AllowAnonymous();
        Summary(
            s =>
            {
                s.Params["status"] = "xx";
            });
    }

    public override async Task HandleAsync(CancellationToken c)
    {
        var status = Route<string>("status");
        await SendAsync(status);
    }
}

in minimal apis, the parameter info is inferred from the delegate signature:
app.MapGet("/users", ([FromQuery] string status) => Results.Ok(status));

in FE, since there's no delegate to infer from, the only place that info can be gathered from is the request dto. i.e. request dto is the equivalent of the minimal api request delegate signature. (but in accordance with REPR pattern)
so if there's no request dto, there won't be any automatic addition of swagger params for query strings.
if you really must, you can write your own nswag operation processor to add the query parameters to the operation, but i have no idea from where you'd actually infer the query param details if there's no request dto.
hope you can see why this cannot be done with FE.
thoughts?


make publish crate script recoverable

This PR makes publish script recoverable after a recent failure.

@mergifyio refresh


Upgrade gensymbol

close #120
@staticfloat @giordano @ViralBShah
Add symbols for LAPACK 3.10, 3.11 and 3.12.

Can we do a new release 5.9.0?

I'll be able to get to it in a couple of days - but @amontoison do you have rights to tag packages in this org?

No, I only have the rights on JuliaSparse.

I just tagged the release, and also invited you to the org.

@ViralBShah Thanks Viral!
I will compile it with Yggdrasil.


Add Templates and Update Readme 🎉

Description
Adds templates
Updates the Readme

👩🔬 Test Instructions

Provided by PR Assignees

Try the generators

🔎 Reviewer Checklist

Checked off by PR Reviewers

[ ] Merge destination is correct
[ ] Code is correct as understood and conforms to quality standards
[ ] Tests have been added where appropriate (unit, visual, end-to-end)
[ ] Acceptance Criteria have been met

Roles & Responsibilities
👨💻 Assignee

Initiator of this PR (be sure to set in GitHub UI)
Addresses feedback and change requests
Merges PR once approved (usually deletes branch unless develop or release)

👩💻 Reviewer

Invited to review PR by Assignee (via GitHub UI)
Is expected to complete a review and address followup

@blaketarter great work on this! 🎉


Fix uninstallation problem in rpm

Issue #, if available:
Description of changes:
$ sudo rpm --force -e ec2-hibinit-agent-1.0.3-3.fc33
rpm: only installation and upgrading may be forced
[davdunc@ip-172-31-32-29 SPECS]$ sudo rpm -ivh --force ../RPMS/noarch/ec2-hibinit-agent-1.0.3-3.fc33.noarch.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:ec2-hibinit-agent-1.0.3-3.fc33   ################################# [100%]
Cannot load profile(s) 'nothp_profile': Cannot find profile 'nothp_profile' in '['/etc/tuned', '/usr/lib/tuned']'.
warning: %post(ec2-hibinit-agent-1.0.3-3.fc33.noarch) scriptlet failed, exit status 1
[davdunc@ip-172-31-32-29 SPECS]$ sudo rpm -e ec2-hibinit-agent-1.0.3-3.fc33
Cannot load profile(s) 'nothp_profile': Cannot find profile 'nothp_profile' in '['/etc/tuned', '/usr/lib/tuned']'.
error: %preun(ec2-hibinit-agent-1.0.3-3.fc33.noarch) scriptlet failed, exit status 1
error: ec2-hibinit-agent-1.0.3-3.fc33.noarch: erase failed

While building the spec file, it gets the current profile which is nothp_profile. Then use it to return it back to uninstall
if u build spec file in instance that has default profile, it will work. Due to it is a macro, the code executes in build process not in runtime (installation time)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This merged manually


Add EqualsOnSignatureLine

This PR adds a new rule to enforce the placement of the = sign for functions that use expression based syntax.
For example, these are valid:
function foo() = 5

function foo() =
    5

But this is considered invalid:
function foo()
    = 5

Isn't this already covered by ktlint?


Allow overriding or disabling rules for certain files/directories.

What version of this package are you using?
10.0.0
What problem do you want to solve?
Override/disable rules for certain files/directories
What do you think is the correct solution to this problem?
Reading per-directories eslintrc configuration files to override default rules. In my case, I have tests in the "test" directory and would like to disable (@typescript-eslint/no-unused-expressions) or I get lint errors for expect() assertions.
Are you willing to submit a pull request to implement this change?
Yes, though I would appreciate some guidance on where this change should be made.

Hey! @tarruda
Thanks for your report!
You don't need disable any rules for tests for example.
You can provide the envs array options according to your test framework.
See: https://github.com/standard/ts-standard#-packagejson-options

Hi @Divlo , thanks for the reply
I saw the "env" option, but it is not clear how it would help in this case. From what I understood "env" is about defining globals that are environment-specific (such as "process" in node.js). In my case, I have no problem with any test-specific globals, but with the @typescript-eslint/no-unused-expressions rule which disallows expressions that return a value to be unsued (which is the case of "expect" assertions).

Hi @Divlo , thanks for the reply
I saw the "env" option, but it is not clear how it would help in this case. From what I understood "env" is about defining globals that are environment-specific (such as "process" in node.js). In my case, I have no problem with any test-specific globals, but with the @typescript-eslint/no-unused-expressions rule which disallows expressions that return a value to be unsued (which is the case of "expect" assertions).

Could you provide a Code example of what you are refering to?

Could you provide a Code example of what you are refering to?

Sure, here's an example "jest" test file:
describe('jest suite', function() {
  it('should pass', function() {
    expect(1 + 1).toEqual(2)
  })
})

The above does not pass the @typescript-eslint/no-unused-expressions rule because expect().toEqual() returns a value which is not used.

@Divlo TBH I just found out that the error was caused by me using the jest API in the wrong way. In one of my tests I had
expect(someExpr).toBeUndefined;

While the correct way would be
expect(someExpr).toBeUndefined();

The first is an unused expression because the matcher function was not called. I somehow assumed it would just work because many years ago I used mocha + chai, which allowed me to do this:
expect(someExpr).to.be.undefined;

Sorry for the noise.

Hey! I'd like this to be reopened. As @tarruda alluded to in their last comment, this can happen with mocha and chai with something like expect(true).to.be.true which is a valid chai assertion: https://www.chaijs.com/api/bdd/#method_true
Instead of littering my code with // eslint-disable-line no-unused-expressions statements, I'd love to be able to use something like this:
  "ts-standard": {
    "env": [
      "mocha"
    ],
    "overrides": [{
      "files": ["test/**/*.js"],
      "rules": {
        "no-unused-expressions": "off"
      }
    }]
  }

which seems to be the standard (hah!) way of getting around this problem with regular ESLint setups.

Did you figured out any way to override certain rule? @lumaxis

Did you figured out any way to override certain rule? @lumaxis

If you want to override rules, you can always use eslint and extends the config from ,eslint-config-standard-with-typescript.

That "overrides" key is not working in my setup. I took a look to the lib code, and i didn't find any match.
However, from your last commit, it looks like if i need to change any rule, i need to use directly eslint and give my own configuration. But this replaces completely the behaviour of ts-standard, making it useless. isn't it?

+1 On this :)
I've run into the same roadblock. It would be nice if it respected a .eslintrc file or had some other way of disabling rules.


Pageant named pipe IPC support

Hello, many thanks for the project.
PuTTY/Pageant 0.74 supports named pipe transport for agent queries.
Simon's comment from one of implementation commits

Pageant runs a named-pipe server as well as a WM_COPYDATA
server, we prefer the former (if available) for agent forwarding, for
the same reasons as on Unix: it lets us establish a simple raw-data
streaming connection instead of agentf.c's complicated message
boundary detection and buffer management, and if agent connections
ever become stateful, this technique will cope.

Can this api be supported as well? Current pipe name format is here windows/winpgntc.c:134

Yeah, I can do that. Though all I'm going to be doing is redirecting one named pipe to another pipe\pageant to pipe\openssh-agent.
I see you have commits to PuTTY, so you may save me some time, whats does capi_obfuscate_string("Pageant"); do? does it return the exact same string each time?

Also, do you know of a program that uses the pageant named pipes, so I may test?

I see you have commits to PuTTY, so you may save me some time, whats does capi_obfuscate_string("Pageant"); do? does it return the exact same string each time?

It's putty-local function with some comments inside:

CRYPTPROTECTMEMORY_CROSS_PROCESS causes CryptProtectMemory to
use the same key in all processes with this user id, meaning
that the next PuTTY process calling this function with the same
input will get the same data

So, at least it should be different per every user.

Though all I'm going to be doing is redirecting one named pipe to another: pipe\pageant to pipe\openssh-agent.

I've tried to build PuTTY with just changed pipe name (to \.\pipe\openssh-ssh-agent) to see how it works.
First of all, pipe existence checking is broken at least in my environment, if fix it - PuTTY fails to communicate with ssh-agent pipe as is

I finished this a few days ago but procrastinated.
Here it is: no extra config options. It works on the setup I managed (i made npiperelay redirect to pageant pipe instead of openssh pipe). Let me know if it works for you on any programs that use this named new putty named pipe.
I wasn't able to get it to output an identical sha256, but I'm not sure if that even matters. Ultimately though I think any program implementing pageant named pipes should also make it look for the windows openssh pipe as well.
winssh-pageant-v1.1_386.zip
winssh-pageant-v1.1_amd64.zip

I wasn't able to get it to output an identical sha256, but I'm not sure if that even matters
thanks, but pipe name must be identical over all processes for one user, or processes will be unable to communicate to pageant.
as it happens.

please refer code below, should give correct pipe suffix
import (
    "syscall"
    "unsafe"
    "crypto/sha256"
    "encoding/hex"
)

const CRYPTPROTECTMEMORY_BLOCK_SIZE    = 16
const CRYPTPROTECTMEMORY_CROSS_PROCESS = 1

var (
	crypt32                = syscall.NewLazyDLL("crypt32.dll")
	procCryptProtectMemory = crypt32.NewProc("CryptProtectMemory")
)

func capi_obfuscate_string(realname string) string {
	cryptlen := len(realname) + 1
	cryptlen += CRYPTPROTECTMEMORY_BLOCK_SIZE - 1
	cryptlen /= CRYPTPROTECTMEMORY_BLOCK_SIZE
	cryptlen *= CRYPTPROTECTMEMORY_BLOCK_SIZE

	cryptdata := make([]byte, cryptlen)
	copy(cryptdata, realname)

	pDataIn := uintptr(unsafe.Pointer(&cryptdata[0]))
	cbDataIn := uintptr(cryptlen)
	dwFlags := uintptr(CRYPTPROTECTMEMORY_CROSS_PROCESS)
	// pageant ignores errors
	procCryptProtectMemory.Call(pDataIn, cbDataIn, dwFlags)

	hash := sha256.Sum256(cryptdata)
	return hex.EncodeToString(hash[:])
}

That did it, thanks @themiron !
Updating to 1.1 release.

thanks, works perfectly.
please refer special build of PyTTY 0.74 with pipe IPC only for testing purposes
putty64.zip

Hi, @ndbeals I tried to set the per user environment variable SSH_AUTH_SOCK to the pageant pipe file.
The SSH_DOCK_AUTH environment variable is used by docker cli to communicate with docker daemon.
But setting SSH_AUTH_SOCK environment per user doesn't work as each new user session/login seems to produce a new pipe file name, the suffix seems to change each time my computer restarts.
Any idea how to solve this problem?