[Feature Request] Set test mode with UI

Instead of having the users input options as URL parameters, maybe have a list of configuration options under the SpeedTest start button? It would help with UX since you won't have to fiddle around with the URL parameter, which gets annoying especially on mobile.
If it's a question of making it as simple as possible to use, maybe have the user scroll down a bit before the options are presented, or hide them behind an "Advanced Options" button.

It's already on my to-do list. I think I will change the three transparent buttons above the speed test button and show some options to choose like test duration etc. But now the UI is just an SVG. We can give a couple of preset options. I don't know how to handle text input. Features like this will be added to the next major version, so I can rewrite the UI if needed. Now I am going to work on some other projects. I don't know when I can come back to this.


Fixes a race condition in retrying denied/invalid issuances

Fixes #5847
See #5847 for context - this PR fixes a race condition where issuance that results in denied CRs would sometimes result in failed and retried issuances and sometimes be 'stuck'
This PR:

makes all Denied CRs fail issuance and be retried with exponential backoff
makes all Invalid CRs fail issuance and be retried with exponential backoff

In case of denied CRs it could be considered a breaking change, however due to the race condition it seems to have already been the case (at least in all my local testing)
In case of invalid CRs, I am not aware of any issuers that set this CR condition, however the commit description appears to suggest that the intention that this condition should result in failed and retried issuance https://github.com/cert-manager/cert-manager/pull/5366/commits/7b4d04cdefcf564e95b029596a34949334a1c85b
If this PR merges, I will also update CertificateRequest documentation https://cert-manager.io/docs/concepts/certificaterequest/
Certificate issuances are always failed (and retried with a backoff) for denied or invalid CertificateRequests.
This is not necessarily a breaking change as due to a race condition this may already have been the case.

/kind cleanup

/test

/test pull-cert-manager-master-e2e-v1-26-feature-gates-disabled
/test pull-cert-manager-master-e2e-v1-22

Thanks @inteon ! I think I've responded to all comments now.
Could I get another lgtm?

/lgtm

This PR is marked as a cleanup. Should we rather mark it as a bug fix?

I think it could be either, for me it doesn't actually change the behaviour because I always hit the same race condition arm that this PR makes the default behaviour. Your choice @maelvls


[question] Failed to initialize the driver: Timeout while waiting for an ACK from the con troller

I am getting this error:
18:13:25.087 SERIAL » 0x01030015e9 (5 bytes) 18:13:25.088 DRIVER » [REQ] [GetControllerVersion] 18:13:26.091 CNTRLR Failed to execute controller command after 2/3 attempts. Scheduling next try i n 1100 ms. 18:13:27.193 SERIAL » 0x01030015e9 (5 bytes) 18:13:27.194 DRIVER » [REQ] [GetControllerVersion] 18:13:28.199 DRIVER Failed to initialize the driver: Timeout while waiting for an ACK from the con troller 2021-02-06 18:13:28.199 INFO ZWAVE: Controller status: Driver: Failed to initialize the driver: Timeout while waiting for an ACK from the controller 18:13:28.200 DRIVER destroying driver instance...
I am running this on Rancher/Kubernetes (which I am still learning) on a Proxmox VM.  I have passed the USB device through to the VM and can confirm it is working.
I have created a HostPath to /dev/serial/by-id/usb-0658_0200-if00
I have then added a volume that directs to that hostpath with the mount point of /zwavestick
I enter in /zwavestick as the Serial Port in the Control Panel.
I'm not 100% sure this is the correct way of doing it, but its the only one i know at this point.
Also, every time i redeploy the workload, all the settings are reset.

You can test by giving your pod access to all devices, via the privileged option. It's "worse" for security, but it could reveal if this is a permissions thing.

You can test by giving your pod access to all devices, via the privileged option. It's "worse" for security, but it could reveal if this is a permissions thing.

I did just try that.  Same result

Oh - but wait.. You're using the device as a volume.. Devices are special in docker.. You need the --device parameter, and not volumes. What happens with privileged, and then using /dev/serial/by-id/usb-0658_0200-if00 in zwavejs2mqtt ?

Oh - but wait.. You're using the device as a volume.. Devices are special in docker.. You need the --device parameter, and not volumes. What happens with privileged, and then using /dev/serial/by-id/usb-0658_0200-if00 in zwavejs2mqtt ?

Just tried that.  still the same error. and then the serial port setting reverts back to the previous setting

THis is a user error, you need to check the correct path to the device and map it to the docker volume

Just FYI - I had the same problem. In my case, I am using a RaspberryPi, with the zwavejs2mqtt server running within container. I had a correct use of device config of docker compose, paths where correct.
In my case, I had to simply restart Raspi for the device to be visible.

Just FYI - I had the same problem. In my case, I am using a RaspberryPi, with the zwavejs2mqtt server running within container. I had a correct use of device config of docker compose, paths where correct.
In my case, I had to simply restart Raspi for the device to be visible.

Thanks for this. I had the identical problem and a restart fixed it.

Had the same issue, restart didnt resolve the issue, but a different USB port did.

For personal experience I can say this is not related to zwave-js or z2m, it's just the serial port that is not setup correctly from the OS for some reason


Updating to nvim cmp from nvim compe

I understand this is dependent on nvim compe. Was wondering if you be updating this to be compatible with nvim cmp

Hi, this is not dependent on nvim compe. It configures your lua lsp client. You can use any autocompletion plugin that supports lsp


denormalize names

there must be some public api to denormalize the names. when creating a dns packet, pkarr currently makes changes to it and it breaks any user code that does not expect this.

Absolutely, can you suggest an API for that? would signed_packet.packet_with_relative_names() work for example?
I need the normalized to be the default data for DNS reasons, so maybe I can just make signed_packet.relative_records() instead?

think resource_records(&self, name: &str) -> impl Iterator<Item = ResourceRecord> should work. will open a PR shortly

@dvc94ch should it be resource_records(&self, name:&str, type: ...)

users can filter for type and convert it. we could add resource_records_txt, resource_records_ip, but not sure if it's worth it

Now in Main and v0.1.3


censored data functions choke when there are no censored data records

Describe the bug
Censored data summary function will break if there isn't any censored data in the dataset.
To Reproduce
Steps to reproduce the behavior:

download all PUEBLO_POJOAQUE data using TADAdataRetrieval
run summarizeCensoredData
See error message about replacement rows.

Expected behavior
The app should return the input dataset with a message "No censored data to summarize, returning input dataset"
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Note that errors show up for both summarizeCensoredData and simpleCensoredMethods even when only numeric data is in the df. They are just not happy there is no censored data.


Select delivery mode from default config

Depend on #3923
While the user lands in the delivery mode step, radio buttons are unselected. We can pre-select a preferred delivery mode (FR1 - config, FR2 - config/user prefs)
It can be configurable if needed [QUESTION].
The config can use express checkout flag, or new one [QUESTION 2].

The functionality of express checkout guard && service will cause the intended effect


Add residual errors to readme.md

Desired Behaviour
If publishing invalid data is allowed, add residual errors to readme.md (or to a .json or .csv depending on https://github.com/frictionlessdata/specs/issues/364)
To discuss at next sprint planning meeting.

@louisjasek @mattRedBox do you have a view on this feature?
At the end of a Validation step, I'm thinking append the errors to the end of the README.md file
### Known Data Errors

This data is published with the following data errors:

Error message 1
...
Error message n

I'm concerned that:

we don't know if the data was changed but not validated before the export
that people may not look at the provenance as the export currently fails if no provenance is entered

Yeh that's a good point. I guess what is worse for the user?

correct data with potentially incorrect error reporting
potentially incorrect data without error reporting

@mattRedBox as a developer, what would you least prefer?

See #388 for suggestion giving user control of adding error messages to readme

Hi
@Stephen-Gates , @louisjasek
For residual errors:

do users have to have these published with the the metadata?

if it's not compulsory, then we should just allow the user to choose:

if they wish to validate (prompt just before the publishing)
if they wish to add the errors to the metadata.

if it is compulsory, then we should automatically validate right before publishing and add these errors silently to the metadata.

compulsory or not compulsory could also be an option in settings/preferences later

I'm not sure I understand why a person needs to look at the provenance report? I guess just making it clear in the how-tos that whatever the process is, is enough. Or we could somehow track whether the provenance data is simply error collation and remind the user that they haven't added their own data - and check that this is OK before export/publish.

I’ve suggested that the user has control in #388.
If we add automatically then the error that currently shows when no provenance information is present will not appear. I like this error as it prompts users to think about this.
I guess at some stage we could get fancy and track if data changes after writing errors to readme and warn of potentially incorrect provenance information

Hi @Stephen-Gates
There's possibly a way to keep the data added by user and errors separate. We may be able to show the errors as a read-only display, but keep the logic for user entry separate - I guess it's more about the business logic -> is a provenance file with only errors in it, valid? That should determine whether the user still gets prompted.

Makes sense. Protect errors from being changed. Allow user to remove block of errors. Overwrite errors on next "write errors to provenance" command.

Invoke "write errors to provenance" command from bottom panel or pop-out error window after error count message, e.g. error count message, button with tooltip
3 error(s) found in this validation.
 Write errors to Provenance Information
Rough but that's the general idea

@mattredbox can this be closed?

Hi @Stephen-Gates
I believe it works ok from the main window.
I'm not sure this quite works correctly from the separate Errors window, so either keep open or open a separate issue for this.


feat: implement the functionality of erasing the content of the inputs

Requirements:
-In the input type search I want to erase the input value when esc keyboard is press.
-the input type search should have the native icon cancel when typing.

in the input type="search" is not render the native icon when typing


dblab-sqlite3 does not work on OSX

Describe the bug
when try to execute dblab-sqlite on OSX gives this error
Error: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

To Reproduce
Steps to reproduce the behavior:

Download https://github.com/danvergara/dblab/releases/download/v0.16.0/dblab_0.16.0_darwin_arm64.tar.gz
extract and move executable to a directory on path
execute it
See error

Expected behavior
open the database and show the content
Screenshots

OS (please complete the following information):
❱ uname -a
Darwin mary3jane.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
Additional context
Add any other context about the problem here.

A release candidate for a bugfix has been shipped, Please, go check it out!
https://github.com/danvergara/dblab/releases/tag/untagged-663792a1cf9ae3c9e192

seems that rc-1 doesn't include the sqlite version

@kascote thanks, already on it. It has to do with a misconfiguration we have in the goreleaser setup.

https://github.com/danvergara/dblab/releases/tag/v0.16.1-rc1
Try again, please. Note that you can find a different compressed file for every flavor of the binary (regular and sqlite). Not in the same compressed file anymore.

now the app starts but works strange. I can't see the table contents/structure. I can write a sql query but doesn't execute, there is something odd with some keybindings, I tried with Kitty and Terminal app (btw on Terminal the app freeze after trying to execute the sql query). I know this isn't a proper but report, but I don't have time now for a correct review.
I think for now this ticket is fixed. On the weekend I'll try to take another shot and may be wrote some ticket. Thanks!

@kascote got it! I'm closing this since we released the v0.16.1 patch and it is fixing the bug mentioned above.
Please, free to open a new issue with further details on what's happening on your side.
Thanks for all the support.


Need updates from axom for bug fix to enable transient adjoit pr

works with co-develop, but not otherwise.


Implement Text Changes

Add endorsements to page
https://docs.google.com/document/d/1rGqS58aTOlEt86cEx8EFMg_tCzaIFuNKpB5dPGlouGk/edit?pli=1#

Add the following three endorsements:
“While no projection is perfect, we endorse this tool and model as a valid and important way to frame the decisions political leaders must make NOW.”
Nirav Shah, MD, MPH, Senior Scholar, Stanford University Clinical Excellence Research Center; Former Commissioner, New York State Department of Health
“This model offers a great tool for state policy staff who's job it is to advise the Governor and the Director of Health regarding what kinds of policies should be instituted to encourage social distancing to minimize contagion with corona virus. Staff need to be prepared to defend with comparative data their recommendations regarding whether to close schools, close bars, restrict gatherings to a select number or encourage non-essential workers to telecommute.  This web site offers state specific estimates that demonstrate the impact of such policies on the curve of infections, hospitalizations and deaths in a very sophisticated manner. “
Vincent Mor, Florence Pirce Grant University Professor, Professor of Health Services, Policy and Practice, Brown University
Valerie Nurr'araaluk Davidson, former Alaska Commissioner of Health and Social Services, Founder's Council member, United States of Care

Add additional endorsement
Tomas Pueyo, author of
Coronavirus: Why You Must Act Now


Posts in groups on mattermost are incompletely displayed.

Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:
Summary
Mattermost hides a part of a posting on an iphone.+
Environment Information

Device Name: iphone
OS Version: iOS 11.4
Mattermost App Version: 1.9.2
Mattermost Server Version: 5.0.0.

Steps to reproduce
Simply browse through posts in a mattermost group, most posts will look fine, but, some of them only list a few lines, the message is not completely displayed.
Expected behavior
An example of what you can expect is here: http://imgshare.free.fr/uploads/d114a8e829.jpg
Observed behavior
The observation is attached under expected behavior, no error messages of any sort are displayed.
Possible fixes
I'm not enough of a software guy to fix this, but I wanted to share what we found on the https://mattermost.pi9noz.ampr.org/hobbyscoop/channels server.

I modified the image because it did not open the way I expected.

I'm using an iphone 7

Hi @ejo60! Thank you for reporting this.
I wasn't able to repro this but I'm on an v1.10 RC version - I'll check with the team on whether there is a way to test this on a 1.9 version.
I'll let you know the feedback!

Hi @ejo60!
I'm not able to reproduce this on the same environment - would you have any further details on the situation around the issue, e.g.

what types of channels you are seeing this on (DMs, public channels, etc.)?
does it happen when you come to the app after clicking on a push notification?
do those posts ever look normal, e.g. after a refresh or logging out?

Hi @ejo60! Thank you for the additional details.
We are currently working on testing for 1.10 beta (and server v5.1), so I'll keep an eye on this for a few days (also on 1.9.x).

Hi @ejo60! We haven't been able to repro this, would you like to update to the latest app version (v1.10, build 127) to see if the issue is resolved?

Ok I will

Hi @ejo60! Checking in - has the issue been reproducing on the latest version?

Next I restarted the mattermost app, problem gone.
Sent from my iPhone

On 8 Aug 2018, at 14:56, amyblais<EMAIL_ADDRESS>wrote:
Hi @ejo60! Checking in - has the issue been reproducing on the latest version?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi @ejo60, we did have this ticket open to investigate this but it was closed because we haven't been able to reproduce the issue: https://mattermost.atlassian.net/browse/MM-11573. I'll check with team if the ticket should be re-opened for further investigation.


Update links in records.yaml to be valid

Currently most of the links in records.yaml do not work and lead nowhere. Updating them to the new url structure.

[approve ci]


Firewall port opening in documentation.

Hello,
Are any specific ports on the client side should open on firewall to be able zhmc manage HMC console?
Where to get the list of open ports on firewall for zhmcli uasge?
Regards,

Hello. Sorry for the delay.
The ports to open are 6794 (for the HMC REST API) and 61612 (for notifications via JMS over STOMP).
They are documented In the HMC WS API book.
While the zhmccli project has a Setting up the HMC chapter, it does not document anything for the case of a proxy or firewall (such as the ports to be opened). We will add that to the docs.


Updating text of centered tooltip doesn't update the tooltip position

I just stumbled upon this problem.
I was however able to solve it by setting a ref="someName" attribute on the <popper> and then using $refs.someName.popperJS.update() manually.
Here's a JSFiddle. Try clicking the "bottom" link:
https://jsfiddle.net/maxpaj/9qvmn093/

thanks


completeCallback not getting called in "play" function

Hi,
I wish to play another audio on completion of the first one. For this, I have implemented a recursion  function as such:
PlayAllList(i, length, audioArray) {
    var self = this;
    this.nativeAudio.preloadComplex('audio' + i, audioArray[i], 1, 1, 0).then(() => {
      console.log("Load success for audio", i)
      this.nativeAudio.play('audio' + i, () => {
        //COMPLETECALLBACK
        console.log('audio' + i + ' is done playing')
        self.nativeAudio.unload('audio' + i)
        if ((i + 1) == length) {
          console.log("done saying all the audios!! Hurray!!")
        } else {
          console.log("=====Calling the next audio=====")
          self.PlayAllList(i + 1, length, audioArray)
        }
      }).then(() => {
        //SUCCESSCALLBACK
        console.log("Success callback for play ", i)
      }, (err) => {
        //ERRORCALLBACK
        console.log("Error callback for play: ", err)
      })
    }, (loadError) => {
      console.log("========================loadError=========================== ", loadError)
    });
  }

But I cannot get "COMPLETECALLBACK" block running anytime even if the first audio is played successfully. Other blocks i.e. "SUCCESSCALLBACK" and "ERRORCALLBACK" seem to work perfectly fine.
Here my audioArray is an array of base64 strings like ["data:audio/mpeg;base64,UklGRmh6AgBXQVZFZm10IBAAAAABAAEAIlY......", "data:audio/mpeg;base64,UklGRmh6AAAAAABAAEAIlYAAESsAAACABAAZGF0YeSFAQAAAAAAAAAAAAAAAAA......"].
Any help would be very much appreciated.
Thanks!

Same error for me. Any idea?


[Event Hubs] Review AMQP link lifecycle for Sender

As per the API proposal in https://github.com/Azure/azure-sdk-for-js/issues/2718#issuecomment-495389630, we will now have a createSender() method on the Event Hub Client that returns a sender. #3170 tracks the work to implement this change.
This issue is to review the lifecycle of the underlying AMQP link

In the previous design, each client maintained cache of AMQP sender links corresponding to each partitionId for a which a send request was made.

Should we continue to maintain such multiple AMQP links for each "sender" object in the new design or change the target on the link on the fly?
or make createSender() take an optional paritionId have it act as a dedicated sender for that partition?

Each of these links are kept alive forever. When service throws a DetachForcedError in order to kill idle links, we re-establish the links. While this may make sense for the streaming receiver, it might not apply for the senders
Ensure multiple senders can be created and work as expected in parallel

#3192 tracks the conclusion on the first point above as well as the last point
Regarding keeping the sender links alive forever:

Lets continue the current design. The link should be closed only when user closes the sender or the event hub client


Allow getRemoteAddress to return the PID of a connecting Unix connection

Currently when dealing with a UnixServer, its connections do not return a value for getRemoteAddress, the returned value is actually NULL.
I`d like it to return the PID of the connecting client. Is that something you would integrate in this library?
public function getRemoteAddress()
{
    if($this->unix){
        $socket = socket_import_stream($this->stream);

        return socket_get_option($socket, SOL_SOCKET, 17 /*SO_PEERCRED*/);
    }
    return $this->parseAddress(@stream_socket_get_name($this->stream, true));
}

See http://php.net/manual/en/function.socket-get-option.php#101380

Absolutely! I like the idea of returning the PID and can see some very valid use cases (local authentication etc.).
If we can integrate this into this library without introducing a BC break and/or a hard dependency on ext-sockets, then I see no reason why we wouldn't want to get this in :+1: PRs with added tests and documentation would be much appreciated :shipit:

I'd like to ask a few questions before I try to create PR for this :)

The getRemoteAddress method from the ConnectionInterface interface should return the remote address (URI) or null if unknown. In this case only the PID is known, which is an integer. What should we return? There isn't really a URI scheme for a PID as far as I know.
Another solution would be to add another method to a Connection, like getUnixPid (name definitely to be decided). For all non-unix connections this would return null, and for unix connections it would return the pid as an integer.

What are your thoughts on this?

Very good points!
Interestingly SO_PEERCRED socket option should return a ucred structure with pid, uid and gid. Right now, PHP does not really support this constant and simply seems to return the first element only.
A single access may work for now, but I can clearly see some value in the remaining values once PHP actually implements this structure.
As an alternative, what do you think about exposing this as part of the query string?
$client->getRemoteAddress();
unix:///tmp/server.sock?pid=1&uid=2&gid=3

Depending on the parser you can also expose the PID as port number.

I have created the most basic Unix server/client to test this feature with. Leaving it here for future reference.
server.php
<?php

require __DIR__ . "/vendor/autoload.php";

use React\EventLoop\Factory;
use React\Socket\ConnectionInterface;
use React\Socket\UnixServer;

$loop = Factory::create();

$unix_server = new UnixServer("unix:///tmp/server.sock", $loop);

$unix_server->on("connection", function (ConnectionInterface $connection) {
    echo "New connection from (local): " . $connection->getLocalAddress() . PHP_EOL;
    echo "New connection from (remote): " . $connection->getRemoteAddress() . PHP_EOL;
});

echo "Server is listening..." . PHP_EOL;

$loop->run();

Note: after exiting the server you have to manually remove the /tmp/server.sock file from your file system.
client.php
<?php

require __DIR__ . "/vendor/autoload.php";

use React\Socket\ConnectionInterface;
use React\EventLoop\Factory;

$loop = Factory::create();

$connector = new React\Socket\UnixConnector($loop);

$connector->connect('/tmp/server.sock')->then(function (ConnectionInterface $connection) {
    echo "Connected as (local): " . $connection->getLocalAddress() . PHP_EOL;
    echo "Connected as (remote): " . $connection->getRemoteAddress() . PHP_EOL;
    $connection->close();
});

$loop->run();

Current output:
php server.php
Server is listening...
New connection from (local): 'unix:///tmp/server.sock'
New connection from (remote): NULL

php client.php
Connected as (local): NULL
Connected as (remote): 'unix:///tmp/server.sock'

Small update:
After some trial and error I think adding the PID to getRemoteAddress in not a good idea. A Connection can be either server > client or client > server. In the former case getRemoteAddress returns nothing, in the latter case it returns the Unix socket descriptor (as you can see in my previous post). Adding the PID to nothing and to the Unix socket descriptor feels too hacky.
I feel like adding a separate method (like getUnixPid) is the best solution (it does not affect current behavior and people can use it only when they really want to). Next challenge I encounter: do we add this method to the ConnectionInterface?
Another possibility is to create a new implementation of the ConnectionInterface, like a UnixConnection and have the UnixServer return an instance of this class in its handleConnection. That would even allow the public $unix variable to be removed from the Connection.
Looking forward to hearing your thoughts.
Regards,

Following, I was about to enter a similar issue.

@gdejong Thank you very much for looking into this!

After some trial and error I think adding the PID to getRemoteAddress in not a good idea. A Connection can be either server > client or client > server. In the former case getRemoteAddress returns nothing, in the latter case it returns the Unix socket descriptor (as you can see in my previous post). Adding the PID to nothing and to the Unix socket descriptor feels too hacky.

Very good input, sounds reasonable.

I feel like adding a separate method (like getUnixPid) is the best solution (it does not affect current behavior and people can use it only when they really want to). Next challenge I encounter: do we add this method to the ConnectionInterface?

I'm not entirely opposed to the idea, but looking at the suggest PR in #153 makes me wonder how this API is going to be consumed by downstream projects depending on this project.
The SO_PEERCRED socket option is platform dependent and I'm not sure how we can reliably integrate this into this library. This seems to be Linux only(?) and FreeBSD (and Mac?) seems to use LOCAL_PEERCRED instead? This also required ext-sockets, which may or may not be available.
As an alternative, how about we expose the stream resource in way so that downstream packages can use this to manually call this in their code? This can be as simple as this pseudo code:
$connector->connect('unix://server.sock')->then(function (ConnectionInterface $conn) {
    if (isset($conn->stream) && function_exists('stream_socket_import')) {
        $socket = stream_socket_import($conn->stream);
        $pid = socket_get_option($socket, SOL_SOCKET, SO_PEERCRED));
        echo 'Connected to PID ' . $pid . PHP_EOL;
    }
    $conn->close();
});


bookeeper is crashing when using gcp

@sijie any idea why this may be?
Was following this documentation https://twitter.github.io/heron/docs/operators/deployment/schedulers/kubernetes/#google-container-engine
Would I be able to use the stateful bookkeeper for this?

It looks like stateful bookkeeper did work when I brought up a new gcp cluster

@mjschmidt what kind of errors do you encounter?

do you mean daemonset doesn't work for you and statefulset works for you?

Yes. The daemonset would get up and running, but upon trying to launch a topology the bookeepers go into a crash loop.

@mjschmidt do you any logs about the crash loop? and how many nodes do you use? I am wondering if this is related to the number of nodes you are using. because daemonset start one pod each node.

Just 3 nodes total. was just trying to get a quick and dirty heron cluster
up for a conference. Unfortunately no logs.
On Fri, Nov 24, 2017 at 3:27 PM, Sijie Guo<EMAIL_ADDRESS>wrote:

@mjschmidt https://github.com/mjschmidt do you any logs about the crash
loop? and how many nodes do you use? I am wondering if this is related to
the number of nodes you are using. because daemonset start one pod each
node.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/twitter/heron/issues/2586#issuecomment-346892452, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGPeIjPx08Zat0WdurfsJadyxABweO1Cks5s5yadgaJpZM4QqFY0
.

Okay. I will try to reproduce myself and see if I can find the problem.

@mjschmidt  - closing this issue. Reopen if there is a problem.


Unable to check license on SDL packages

Describe the bug
I've run the tool on both an SDL, license-only package, and on a package with both Photoshop with the SDL and the too doesn't seem to be able to detect the license inside. When the package/s are deployed to a device, the tool detects the install licenses fine.
To Reproduce
Steps to reproduce the behavior:
SDL-only package:

Create a package from the Adobe Admin web console with Shared Device Licensing chosen, but no other applications
Download the Adobe Downloader App, use this to download the zipped package/s
Unzip the packages
Run the adobe-license-decoder on the parent directory, build directory or the package itself, e.g.:
./adobe-license-decoder /Users/darren/Downloads/Photoshop-SDL-Test/
./adobe-license-decoder /Users/darren/Downloads/Photoshop-SDL-Test/Build/
./adobe-license-decoder /Users/darren/Downloads/Photoshop-SDL-Test/Build/SDL-Test_Install.pkg
Output:

thread 'main' panicked at 'No license files found in '/Users/darren/Downloads/SDL-Test/Build/SDL-Test_Install.pkg'', src/descriptions.rs:29:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

SDL and application package:

Repeat the above, but for step 1, also select the latest version of Photoshop
Rest of the testing and output is the same.

Observed behavior
Output shows the binary is unable to find a license:
thread 'main' panicked at 'No license files found in '/Users/darren/Downloads/SDL-Test/Build/SDL-Test_Install.pkg'', src/descriptions.rs:29:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior
Command line output as shown on the project readme
Operating System
macOS Big Sur (11.2.2)
Additional context
I'm unsure if I'm holding it wrong, but please let me know if so!
Thanks

Hi folks,
I'm afraid I'm still seeing this error on an SDL package. The new output:
% /Users/darren/Downloads/adobe-license-decoder-2 /Users/darren/Downloads/Photoshop-SDL-Test/Build/Photoshop-SDL-Test_Install.pkg
Error: No license files found in directory: /Users/darren/Downloads/Photoshop-SDL-Test/Build/Photoshop-SDL-Test_Install.pkg

Location:
    src/descriptions.rs:34:13

Hi Darren, the package directory to specify to the tool is the root of the unzipped package, so in this case ~darren/Downloads/Photoshop-SDL-Test.  The license data is in the Photoshop-SDL-Test.ccp file that's in that root directory, along with the Build and Exceptions folders.
It's a bit of an unhappy coincidence that Adobe calls them "installation packages" and Apple calls their installer files "pkg" files.  The Adobe notion of the package is the entire zipped tree.  I'll update the README to make this clearer.


Bert experiments to validate the best layer for features

Proposed changes:

...

Status (please check what you already did):

[ ] added some tests for the functionality
[ ] updated the documentation
[ ] updated the changelog (please check changelog for instructions)
[ ] reformat files using black (please check Readme for instructions)

/modeltest

include:
 - dataset: ["all"]
   config: ["BERT + DIET(bow) + ResponseSelector(bow)", "BERT + DIET(seq) + ResponseSelector(t2t)", "Sparse + BERT + DIET(bow) + ResponseSelector(bow)", "Sparse + BERT + DIET(seq) + ResponseSelector(t2t)"]

Closing this in favour of https://github.com/RasaHQ/rasa/pull/7102


Suppress -std=c++0x option for zOS

The njsc/c++ compiler used for Node.js on z/OS has C++11 support by
default.  The -std=c++0x option currently triggers a FSUM3210 error,
hence, updating gyp files to suppress use of this option on the
platform (similar to what's currently done for Windows).
Signed-off-by: Joran Siu<EMAIL_ADDRESS>

@xzyfer don't think this hurts (event if we don't support zOS), but I'm wondering about the upstream libsass change to swap this old flag for the newer c++11 version

I need to validate we can still compile on CentOS 5 with this change. I
vaguely recall that's why this hasn't been made before.
We've made this change in LibSass so we should do it in v5 for sure.
On Fri., 7 Dec. 2018, 1:21 pm Nick Schonning<EMAIL_ADDRESS>wrote:

@xzyfer https://github.com/xzyfer don't think this hurts (event if we
don't support zOS), but I'm wondering about the upstream libsass change to
swap this old flag for the newer c++11 version
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/pull/2553#issuecomment-445100021, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAjZWAvfq0m6kU6zYcUIHvNNq1olA53Yks5u2dCMgaJpZM4ZAzKF
.

Around 3.5.0 (upgrade to node-gyp after 3.2.0) we have lost ability to build on CentOS 5.
I tried it for fun and there are a couple of things - to run tests, one needs to install git from non-official repositories; https://github.com links no longer work due to TLS issues; python 2.4.3 is the latest version, and gyp needs 2.5 in the version we are using as of 4.12.0
Therefore I believe we should drop this altogether, for all platforms.

These are dropped now for all platforms


Adding firebase setup

We can use firebase as the backend for the app so that we can implement user authentication feature.

I'm Good in Firebase Implementation I already did Firebase login work can i work on this.

Bro I'm already on it. Waiting for the maintainer to assign it to me.

ok

i have a question ? if a issue is already assigned to someone and if i worked on it without assigned and if i make PR then it would be accepted or not , because if we go like this then some of them will never assigned a issue like me

@dheerajkotwani for firebase i need to have a google account, so i guess you gonna provide me that.

I worked with Android in Kotlin and using Firebase for the backend. Will be glad if you assign this task to me.
A gist of what I will do-

Checking the project requirements.
Creating Firebase project and Registering the app
Adding Firebase Configuration file and plugin in Gradle
I might work more on the backend with organisation of the data there and rendering it in the app.
If anyone is new, can follow these steps and do the task if it's not assigned to me.

I worked with Android in Kotlin and using Firebase for the backend. Will be glad if you assign this task to me.
A gist of what I will do-

Checking the project requirements.
Creating Firebase project and Registering the app
Adding Firebase Configuration file and plugin in Gradle
I might work more on the backend with organisation of the data there and rendering it in the app.
If anyone is new, can follow these steps and do the task if it's not assigned to me.

@adiig7 are you working on the issue?

Please assign me this issue under GSSOC'23.


small change to check flakes

What type of PR is this?

Uncomment only one  /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind failing-test
/kind feature
/kind flake
/kind code-refactoring
Documentation changes: Please include [skip ci] in your commit message as well
/kind documentation
[skip ci]

What does does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #?
PR acceptance criteria:

[ ] Unit test

[ ] Integration test

[ ] Documentation

How to test changes / Special notes to the reviewer:

/retest

1st run successful on travis - out of the gate

2nd travis run failed due to api server error. not odo's fault

/test all

prow test passed successfully in 2nd attempt so retrying

/lgtm
/approve

46 Acquiring lease for "aws-quota-slice"
29
2020/08/10 17:00:46 No custom metadata found and prow metadata already exists. Not updating the metadata.
30
2020/08/10 17:00:46 Ran for 2h5m42s
31
error: some steps failed:
32
  * could not run steps: step integration-e2e failed: failed to acquire lease: resources not found

/retest

/test all

After running the tests 5 times - I only saw flake once and that too was infra related. I think we are at a good place now


Applying multiple field options (or using commas) gets marked as a syntax error

Describe the bug
I began noticing this most frequently when using the third-party plugin protoc-gen-validate. This plugin has multiple field options, that can be applied in sequence as well as lists such as "in" and "not_in". These are all valid proto syntax and compile and generate normally, but the plugin marks them as issues once a comma is present.
To Reproduce
Steps to reproduce the behavior:

Install protoc-gen-validate plugin in a project (or create options that can be applied with commas)
Apply field options that contain comments
See red underlines

Expected behavior
Red underlines will not be present for valid syntax
Screenshots

Plugin (please complete the following information):

OS: Windows 10
Plugin version: 0.13.0
IDE: e.g. IntelliJ iDEA 2019.1.3 (Ultimate Edition)

#143 has some discussion on this.

Thanks, I will just close my issue since it is the same.


Missing bulk actions

According to the mockups, we should also provide the following bulk actions:

bulk delete attributes
bulk delete shipping methods

Bulk deleting attributes is already implemented. Bulk deleting shipping methods is not, but it's not a priority for now, I guess we can close it.


Some issues have been on the way

Discussed in https://github.com/orgs/taikoxyz/discussions/7590

Originally posted by QustomQure January  4, 2023
Friction log

Some transactions(specifically bridge from L2 to L1) missing in action and forever pending. And their links to txn explorer leading to:
"Sorry, We are unable to locate this transaction Hash" screen.
https://l2explorer.a1.taiko.xyz/tx/0x496da155553fd19ce8a0c88f8f76cc1e0383baa9c347ca92f7740232172fc9b0
https://l2explorer.a1.taiko.xyz/tx/0xce9e58312d6675b6247ca4ec14364ff5560570f0e78cd7a368071ae3e3e09274
https://l2explorer.a1.taiko.xyz/tx/0xe0973049fb7b42f374dcdb2a6051f9ba116dd0875ae2cac0b7c9c3daa90121f3
https://l2explorer.a1.taiko.xyz/tx/0x80a3422593c5fd841e447868a9bb9ce5351dc877042f0517e7d8e671edf47085

I have issues with claiming HORSE on L2 Taiko A1
I can't just disconnect wallet from app, it stays connected

Other notes

You should definitely show which one transactions is in the pending list. Now it is not clear

0x28f7052caaC00a4491D2422d5449ac897110165c wallet
And i have another wallet where i do not have this issues. This is looking suspicious for me...

0xb8BEB983FCd14929668235e0CB252e1FB4216507 Second wallet

I have not experienced this problem

This is a Metamask issue. You need to go to settings and can click Reset Account to wipe your Queued transactions.


How to perform faster-rcnn on new dataset?

I have followed the instructions and managed to run the demo successfully. According to instructions, to train a model on another dataset, one should use a command like this:
./experiments/scripts/train_faster_rcnn.sh [GPU_ID] [DATASET] [NET]
where [DATASET] can be pascal or coco. How can I run it on another dataset where annotation files are in .txt format, whereas in pascal the annotations are in xml?

I've just done what you ask for. There is a few places you need to change the python code in order to accomplish that.
First of you need to copy the pascal_voc.py in lib/datasets directory and implement your own _load_pascal_annotation function.
Changing the classes your interested in and also where your data files are located could be done in the same file.
Next up you update the factory.py file to include your new dataset.
Lastly you need to update the
./experiments/scripts/train_faster_rcnn.sh and ./experiments/scripts/test_faster_rcnn.sh to include your dataset.

I think you can follow this guide .

Thank you for the helpful guidance. Where can I set the configurations like number of iterations or Momentum or Batch Size ,...?

You can change different params in  lib/model/config.py.

Actually I have run the pascal VOC data based on this page. Do you happen to know a similar file like config.py in that page? thanks a lot for the help

@SamyMe Is  Faster-RCNN_TF/tools/train_net.py
 the file I should modify?

@kalaspuffar , Daniel, Could you please share some of your code on how to make the code working for a new custom dataset. Thank you.

@lyltencent Well depends on your implementation and what you want to accomplice but in my case, I just wanted the x and y coordinates for the boxes and their classification in my file. So I implemented it with simple CSV files.
My code is in a jist
https://gist.github.com/kalaspuffar/24f8f08d5627224a2e002bdddc0fc960
Hope it gives some inspiration to get started at least.

@kalaspuffar, Hi Daniel, thanks for your information.


A clean install of the latest version fails to install SuperGluePretrainedNetwork

If you upgrade from an older version, there's no problem, but if you create a clean Conda env and install hloc from the latest master branch (after cloning with --recursive to pull in the submodules of course), it'll fail to install SuperGluePretrainedNetwork:
[2023/07/29 16:14:31 hloc INFO] Extracting local features with configuration:
{'model': {'max_keypoints': 4096, 'name': 'superpoint', 'nms_radius': 3},
 'output': 'feats-superpoint-n4096-r1024',
 'preprocessing': {'grayscale': True, 'resize_max': 1024}}
Traceback (most recent call last):
  File "/home/sebastiaan/.conda/envs/nerf/bin/ns-process-data", line 8, in <module>
    sys.exit(entrypoint())
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/nerfstudio/scripts/process_data.py", line 404, in entrypoint
    tyro.cli(Commands).main()
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/nerfstudio/process_data/video_to_nerfstudio_dataset.py", line 112, in main
    self._run_colmap(mask_path)
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/nerfstudio/process_data/colmap_converter_to_nerfstudio_dataset.py", line 216, in _run_colmap
    hloc_utils.run_hloc(
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/nerfstudio/process_data/hloc_utils.py", line 103, in run_hloc
    extract_features.main(feature_conf, image_dir, image_list=references, feature_path=features)
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/hloc/extract_features.py", line 252, in main
    Model = dynamic_load(extractors, conf['model']['name'])
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/hloc/utils/base_model.py", line 39, in dynamic_load
    module = __import__(module_path, fromlist=[''])
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/site-packages/hloc/extractors/superpoint.py", line 8, in <module>
    from SuperGluePretrainedNetwork.models import superpoint  # noqa E402
ModuleNotFoundError: No module named 'SuperGluePretrainedNetwork'
Traceback (most recent call last):
  File "/home/sebastiaan/src/ml/nerf_utils/ns-my-pipeline.py", line 111, in <module>
    run_pipeline(args.input_video, args.num_frames_target, args.camera_type, args.model_type, args.max_num_iterations, args.mesh_type, args.render_path_file, args.force_rewrite, args.use_bounding_box, args.bounding_box_min, args.bounding_box_max, args.no_colmap, args.no_train, args.no_mesh, args.no_render)
  File "/home/sebastiaan/src/ml/nerf_utils/ns-my-pipeline.py", line 50, in run_pipeline
    _, elapsed_time = run_command(f"ns-process-data video --data {input_video} --output-dir {colmap_folder} --camera-type {camera_type} --num-frames-target {num_frames_target} --gpu --sfm-tool hloc --matching-method sequential")
  File "/home/sebastiaan/src/ml/nerf_utils/ns-my-pipeline.py", line 14, in run_command
    process = subprocess.run(cmd, shell=True, check=True)
  File "/home/sebastiaan/.conda/envs/nerf/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'ns-process-data video --data /home/sebastiaan/src/ml/nerf/work/mathijs-groundfloor-lq.mp4 --output-dir /home/sebastiaan/src/nerf/work/out/colmaps/mathijs-groundfloor-lq/1200 --camera-type perspective --num-frames-target 1200 --gpu --sfm-tool hloc --matching-method sequential'
returned non-zero exit status 1.

Steps to reproduce:

git clone --recursive https://github.com/cvg/Hierarchical-Localization && cd Hierarchical-Localization
pip install -e .
Try to run your hloc application with superglue (in my case nerfstudio's ns-process-data).
Observe above error.
git checkout 61e0cd04dbc63d1beba1f8ed6c03e95937a76dab
pip install -e .
It'll work now.
git checkout master
pip install -e .
It still works.

Hmm, I just retested it again in a clean env with the latest versions of everything, and it seems to be working fine now. Don't think anything changed in this repo's master branche since, so I guess something must have changed in the submodules, dependencies or in Nerfstudio?
Either way, it seems to be working now, so I guess it can be closed.

I ran into this issue again reinstalling it, so I guess it isn't gone yet after all, but I'm also not sure how to consistently reproduce it.
If anyone else runs into it in the future, at least my workaround of going back to the 1.3 commit, installing, and then going back to the latest still works.


font-manager looks terrible

command executed: font-manager
Output:
[WARNING 12:05:15] Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[WARNING 12:05:15] [Gtk] Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/bullet-symbolic.svg.This may indicate that pixbuf loaders or the mime database could not be found.

Issue description
The UI looks rather broken. E.g. the text on the left column is hardly visible, even though the window is more than large enough to display the text. From my memory this does work on other operating systems, so something must have gone wrong in the packaging.
Steps to reproduce
I am running it inside KDE4.
Technical details
16.09.git.81428dd (Flounder)

This is highly likely an instance of the same problem as in #21463.

I don't see anything bad, really, except that the left part is "too small by default" and thus not fully visible – but that can be easily worked around by dragging the splitter to the right.
/cc maintainer @romildo.

BTW, I'm not getting that pixbuf error on master but still I didn't notice any difference between master and 16.09, and there's no change in the expression for this package itself.

Hmm, and your screenshot is missing icons (which show for me), so these are probably missing in our wrapping.

@vcunat Yes, you are right that the splitter can also be moved. Probably this usability problem is then an upstream issue, but the missing icons thing is a packaging problem.

nix-env -iA nixos.gnome3.adwaita-icon-theme might fix the icons issue. I think the problem here is that it doesn't entirely make sense for an application to depend on a specific icon theme, but it still needs to get icons from somewhere.

We do insert dependencies on a default theme for gtk3 stuff.

An obvious solution seems to be that such icon themes, which are also user dependent need to be configured as part of the user definition as a default (where the ssh public key is defined). If the user then changes the configuration at run-time, it should select another one (but only if that wouldn't fail). Additionally, a wrong run-time configuration should report a message with meta-data as to what the previously configured Nix attribute was which was used to configure it in the first place.
Now, this scope might be a bit big, but that's what I would like to see. Having a system in which every application just doesn't work out of the box is not an interesting proposition.
One could argue that this should be fixed in GTK3, though.
How are we going to make progress on this?

How are we going to make progress on this?

Add that theme into the wrapper, most likely.


Feat/leading trailing date

Checklist
Please put "X" in the below checkboxes that apply:

[x] If committing a change of production code, I have tested it in different browsers (Chrome, Firefox, Safari).
[x] If committing a new feature, I have first submitted an issue (Please note: you are free to open PRs for non-issued features, but opening an issue increases your chance of a successful PR).
[ ] If committing a new feature, I have also written the appropriate tests for it.
[x] I have tried to build the feature in a way, that it does not cause any breaking changes for others (unless
agreed upon in an issue).

This PR solves the following problem**.
Added new class name: sx__is-leading-date, sx__is-trailing-date
This PR solved this problem in this issue https://github.com/schedule-x/schedule-x/issues/360
How to test this PR**.

Go to the calendar with mobile mode then enter month-agenda to view mode and set view.
Calendar will appear and will show news class name sx__is-leading-date or sx__is-trailing-date or both based on the date we selected

Sample style
.sx__is-leading-date, .sx__is-trailing-date {   visibility: hidden; }
Result

Thanks, my team waiting for it in production release :D


Adds missing winston module and require in config/express.js

Simple addition for a missing winston logger which causes the editor to crash if NODE_ENV is not 'development'.
Note: The "insignificant" whitespace diffs are due to some settings I have in my editor to trim trailing whitespace and ensure newline at eof on save.

Thank you!

It appears there's a merge issue with the latest package.json that breaks things.
There's a '7' instead of a ',' that breaks the syntax :)

Crap, I had a second line selected when I updated the version.
Sorry about that.


Some issues with the demo

Hi,
I am trying out this data-grid and found some issues as follows:

The Column Resizer plugin throws the following error:
Uncaught ReferenceError: DataGrid is not defined
at HTMLDivElement. (column-resizer.js:86:9)
Fix on column-resizer.js:
import DataGrid from '../data-grid.js';  //line 2 ... max = DataGrid.elementOffset(e.target).left + grid.offsetWidth - remainingSpace; //line 86
Column Header context menu off alignment.
Fix on data-grid.css:
position: relative; /* fixes alignment issue with context menu - added at line 35  */

Could we get these fixes applied to the source code?
Thank you

Feel free to make a pr :) I'll gladly merge it. I'm not actively using this at the moment (I'm using tabulator instead) but i do have somewhere in my plans to work on improving things..

Hi Thomas,
Thanks for your reply. I just created a PR. Hopefully, they look good to merge from your end.
Also, I was wondering if you ever pick up this project again and would plan to add new features for printing and exporting to file format such as csv and pdf. Alternatively, any kind of resources that you could point me to to get started on making plugins for those new features would be great.
Thanks again

@jackkjhsu yes, i do plan to work on it. and hopefully have a working plugin architecture, it's pretty barebones at the moment. Csv and pdf export is not very high on my list because i tend to do these server side since. the idea here is to have (mainly) a server side paginated grid, and therefore, it's kind of difficult to determine what to export: the whole data set (which could be huge)? only the current paginated view (which is not very useful?).
You might want to have a look at https://github.com/olifolkerd/tabulator which can probably do all that. And there is code in there that can be used as inspiration as well :)

@jackkjhsu i've updated the project. I've changed quite a bit how plugins are working it should be much easier now to use them

Hi @lekoala,
Thanks for the update. I have some fixes coming for some more issues I encountered. I'll create another PR for them.


MacOS support

Check it out. We're cross-platform.
A few tweaks were needed to make this work:

MacOS doesn't let you map character devices, so /dev/zero is no
good for use in tests. /etc/hosts was the first file I thought of
that would be guaranteed to exist and be user-readable.

.at(addr) uses MAP_FIXED_NOREPLACE, which doesn't exist (at least
not with that name) in MacOS. There might be a way to make that work
but for now it returns InvalidInput if you try to use it.

.with_huge_pages(pow) uses MAP_HUGE_MASK on linux, which also
doesn't exist in MacOS. luckily there's a vague equivalent in the
VM_FLAGS_SUPERPAGE_SIZE stuff - except you don't get to choose the
page size, and you apply those flags to the fd instead of passing
them with the other flags.

And with that, mmarinus builds and all tests pass on MacOS. Fun!
Signed-off-by: Will Woods<EMAIL_ADDRESS>

This would be great!

Adapted PR in https://github.com/enarx/mmarinus/pull/12


Delete Empty page

What are you working on?
Since I can't search for text, is there any way to delete an empty page?
Can I check the bitSize of a page or something?
Additional Notes
I'm creating dynamic PDF getting data's from a website.
I already use merge-pdf-buffers, html-pdf-node, pdf-parse and pdf-lib
With pdf-parse I can get the text, however, I can't combinate it with pdf-lib to see which page contains text or not.

Hello, I use a server-side method in bash to detect and then remove blank pages from pdf. I share part of my code with you if it can give you ideas. It needs ghostscript and pdftk.
# Variables
ENTREE=$1
COLLECTE="temp.txt"
TEMP="temp"

# Search blank pages
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=bbox "$ENTREE" 2>&1 | grep "%%BoundingBox:" > $COLLECTE

# Collect blank page numbers
RESULTAT=$(cat -n $COLLECTE | grep "%%BoundingBox: 0 0 0 0" | awk '{print $1}')
NB_PAGES=$(cat -n $COLLECTE | grep "%%BoundingBox: 0 0 0 0" | awk '{print $1}' | wc -l)
rm "$COLLECTE"

if [[ $NB_PAGES -eq 0 ]]; then # Si il n'y a pas de page blanche
	echo $(date +'%Y-%m-%d %H:%M:%S')" / Il n'y a pas de page blanche dans $ENTREE"
	rm "$ENTREE"
	exit 3
fi

# Burst pdf in temp folder
mkdir $TEMP
pdftk "$ENTREE" burst output $TEMP/%04d_temp.pdf
rm "$ENTREE"

# For all empty pages -> delete
for PAGE in ${RESULTAT}; do
	PB=$(ls $TEMP/* | grep "0${PAGE}_temp.pdf")
	if [[ -n "$PB" ]]; then rm $PB; fi
done

# Rebuild pdf
pdftk $TEMP/*.pdf output "$ENTREE"

# Delete temp files
rm -rf $TEMP/

Good luck


Needs a cohesion analyzer.

It could warn when methods only operate on a subset of a class' members and suggest extracting that to a different class. It can also see when a method only operates on a single member and suggest moving that method to the member it operates on. This would be great because it would both increase cohesion as well as reduce coupling.

@jcbowers Your suggestion it's about move method code to member declaration ?

@carloscds Thanks for your question.
If code has the following structure:
    public class Driver
    {
        private Car _car;

        private Brain _brain;

        private bool _hasCoffee;

        public void Stop()
        {
            _car.Velocoty = 0;
        }

        public void Drive()
        {
            _car.Velocoty++;
        }

        public void BeHappy()
        {
            _brain.IsHappy = true;
        }

        public void DrinkCoffee()
        {
            _hasCoffee = true;
        }

    }

    public class Car
    {
        public int Velocoty { get; set; }
    }

    public class Brain
    {
        public bool IsHappy { get; set; }
    }

The diagnostic should recommend the following refactor:
public class Driver
{
    private bool _hasCoffee;

    public void DrinkCoffee()
    {
        _hasCoffee = true;
    }

}

public class Car
{
    public int Velocoty { get; set; }

    public void Stop()
    {
        Velocoty = 0;
    }

    public void Drive()
    {
        Velocoty++;
    }
}

public class Brain
{
    public bool IsHappy { get; set; }

    public void BeHappy()
    {
        IsHappy = true;
    }
}

@jcbowers I have moved your example to the issue's description.
We need to define how the analysis would work:

In which cases it generates a diagnostic?
In which cases it does not?

Also, I am assuming this is a refactoring, so, a hidden analyzer, on the Refactoring category.

@jcbowers After discussing with the other maintainers, we came up with a another question:

The above example will break existing code that calls the methods (ex. stop). This is not acceptable. How would we fix it?

We think we should not do this, we need to understand how it would work. If we can't find the case, we will close the issue, help us understand better. Tks.


cleanup-service

I'm not sure but is the cleanup-service intended to get activated by hand? There is no hint do do so at installation, as far as I remember. Today I tried to figure out why my root-partition got bigger and bigger and analyzed it with filelight. This is what i got:

When I looked into named modules directory I saw what it was:

I looked into this repo and saw, that a system-service was intended to cleanup on startup. I looked for it, and saw, that it was not enabled. I triggered it by hand and of course, it took an eternity to copy - delete - copy -delete... and finally delete all copied directories.
Am I the only one who took that long to notice that? Either way, maybe it would be cool if the PKGBUILD could echo a hint to the console to activate the service.
Not a high-priority thing, but maybe a funny story and a suggestion.

It seems that the file kernel-modules-hook.install was not added to the community repo when the package was added, so users do not see request to enable the systemd service linux-modules-cleanup.
https://github.com/saber-nyan/kernel-modules-hook/blob/d5bb3c3750b8e9f7a45a9e3e7893b42e66cbd084/kernel-modules-hook.install#L1-L16
@shibumi is it possible to enable this service when installing the package or to notify the user to enable it?

FWIW, the daemon-reload instruction is superfluous in light of the systemd-daemon-reload hook that's shipped with the systemd package.
But otherwise, yes, the package as it exists in community currently lacks a notification that enabling the cleanup service is necessary for the advertised cleanup functionality to ...function.
I doubt that enabling or starting the systemd unit on install will be possible, as that's usually considered a user's choice to make, but it might be possible to get an install script notification added to the package.
I've created a feature request with downstream to float this idea, so we'll see how that goes: https://bugs.archlinux.org/task/74592

@saber-nyan Please also add the instructions to the README
https://github.com/saber-nyan/kernel-modules-hook#installation

https://github.com/saber-nyan/kernel-modules-hook/blob/d5bb3c3750b8e9f7a45a9e3e7893b42e66cbd084/linux-modules-cleanup.service#L6
About the cleanup.service. why is it performing rsync to .old directory. Who is suppose to clean that?
Also what is the use of https://github.com/saber-nyan/kernel-modules-hook/blob/master/linux-modules-cleanup.conf, i read pre-hook, post-hook and cleanup.service. No one seems to be using this file.

No one seems to be using this file.

It's in the PKGBUILD. It goes to tmpfiles.

@C0rn3j  Thanks. Didn't knew this usecase of /usr/lib/tmpfiles.d/.
By the way all this copying back and forth (3 times - pre,post,.old). Does it increases Writes on SSDs? Or is BTRFS only copying refrences and not actually copying the whole data again and again with every rsync operation.

Does it increases Writes on SSDs?

Probably.
Your SSD won't explode if you write files to it, it was made for it.


GLOBAL BUSNIESS BLACK&WHITE WORLD'S

[Enter feedback here]

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

ID: 18faeb34-d9ea-dcad-ccf9-0065a8d2e2ae
Version Independent ID: c0c4f63d-413e-6a71-d6cc-efd4e2856a3b
Content: Economy Pricing Meters - PlayFab
Content Source: playfab-docs/features/pricing/Meters/catalog-meters.md
Service: playfab
GitHub Login: @wesjong
Microsoft Alias: wesjong

There is no feedback here. Closing


Allow all variable names to be retrieve from ScopeChain/Scope

Hi,
I want to write a custom function to return all the variable names available from the current context (it's very valuable for debugging purpose). I can get ScopeChain from EvaluationContext, but there is no method exposed to retrieve all the keys from each Scope's backingMap. I got around this by using Java reflection so far, but it will be nice to have this available from the API.
Thanks,
Zemian

I second this, not just for debugging purposes. I've implemented a function that allows expression evaluation within my application (it comes with its own expression language); there is currently no way to pass on the scope chain as bindings.

@ebussieres Can we have this please? This seems very trivial to add (just a function) and I don't see and downside of this. I can send a PR but I'm not sure whether you want this implemented or not.

Sure, just make a PR and I'll gladly review it


Compiler warnings have been resolved.

Description

Compiler warnings have been resolved.

Could you please review and merge this? @chili-ios


`include_mass_scan" seems to fail with the MS scan file format exported by the new version of Zilien

I suppose it's because of the filename? @matenestor

I dont get an error message, the spectra are just not imported together with the rest and I get a simple MSMeasurement object

We didn't change the format of MS scan files. Loading spectra should work for both Zilien versions since #138. The keyword is include_mass_scans with "s" at the end. Don't you have a typo?

No, no typo...

And the mass scan file name IS different!
new zilien:

old zilien:

I changed the directory and file name structure to fit the old and then it's working.

Aha, this change is from June 2022 and was included in Zilien's core version 1.5. The newest version is 2.1. So even the "old" Zilien (with LabView interface) is creating directories with the short name "mass scans". If not, then it must be a very archaic version.
I admit, I missed that during the #138 review, because I didn't know about this double naming. I will create a quick PR soon, when #166 is merged.
According to the current code, it should be searching for the mass scans in "CO2_Epoxy_Chip_Calibration mass scans" directory. I assume your directory is named "mass scans". So if you rename it to the first name, it should work. Could you try, please?

Oh wow. Well, I have a PhD student here guarding over one of our instruments who doesnt want to update Zilien because it might come with more trouble (like different names of the exported data which means all the data analysis scripts break) hint hint ;) So that's why our "old Zilien" data looks like this :)
I won't try with just changing the folder name, then? Thanks for taking care of it!

We take backwards compatibility seriously, so this was a slip, an oversight. It will get fixed. At the moment, Ixdat can read only the old version, so you need to rename it to the format "you-measurement-name" mass scans to make it work.
But later, I strongly suggest to update Zilien to the newest version. Not only it has more features, but mainly safety fixes and it treats the ECMS better. And I think it is better to have a few scripts broken, than the whole ECMS. :) You can always downgrade too anyway, if you have the installer.

Hi Jakub, I'm sorry, my comment (poorly attempted joke) was quite misplaced here. I am generally very happy with the new version of Zilien and I agree that updating the version we have installed on that computer would make sense - even if it was just for the additional safety features - and I'm actively working on changing my colleague's mind :)
For data processing, I will change the name of the folder for the measurements saved with the new naming scheme in the meantime. And thank you for sorting this out - it helps a lot.  :)


feat: responsive classes

Mergin this because there are some breaking changes coming

:tada: This PR is included in version 2.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0-next.1 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Letter statuses aside from "Active" state are not shown on home page table

Describe the bug
Currently, only letters in active status are displayed as active under the status column, and everything else is blank.

Steps to reproduce

Go home page and verify "Status" column
Create a new case and leave the status as "Initial" - The status won't be displayed on the home page table

Expected Behavior
All Letter statuses should be displayed on home page table

This is Low since it does not block functionality but good to fix for sorting


Topic format option #13

Coverage increased (+0.4%) to 76.221% when pulling bcaf51ebfddd1f2a4e737723c062047b5a46c9e0 on topic-format-option-#13 into 59416ca84602f5a0d8551b124c514acf7c482c52 on master.

Coverage increased (+0.4%) to 76.221% when pulling 3f0a454cd0ac07234c1d96a004ef001b3ec3f823 on topic-format-option-#13 into 59416ca84602f5a0d8551b124c514acf7c482c52 on master.

Coverage increased (+0.4%) to 76.221% when pulling 3f0a454cd0ac07234c1d96a004ef001b3ec3f823 on topic-format-option-#13 into 59416ca84602f5a0d8551b124c514acf7c482c52 on master.

Coverage increased (+0.4%) to 76.221% when pulling 3f0a454cd0ac07234c1d96a004ef001b3ec3f823 on topic-format-option-#13 into 59416ca84602f5a0d8551b124c514acf7c482c52 on master.


[UX][Publisher] Couldn't find a way to edit version after creating an API

Description:

There should be an option to change version from the UI if user accidentally add a wrong version number. And if the API is already published we can inform that to the user and drive user to the create new version page and ask user to create a new version and deprecate the old version.

Suggested Labels:

[Type/UX]

Affected Product Version:

2.2.0

We do not support editing the API version. The version along with the context is used as a unique identifier for the API. Once the API has been published the version cannot be changed.


Ping requests reach the user defined middlewares

Describe the bug
When the server shuts down, the client starts sending periodic ping requests to check if the server is back up and then reload. These requests reach the middlewares defined by the users but it should probably be handled by vite before it reaches any of these like the initial websocket upgrade request does. There is also no reliable way to identify these requests for the middlewares to ignore it themselves.
ref: https://github.com/sveltejs/kit/issues/6910
ref: https://github.com/sveltejs/kit/issues/7218
https://github.com/vitejs/vite/blob/c63ba3fa08a64d75bfffa6885dc4c44875b9c5ba/packages/vite/src/client/client.ts#L318-L324
Here it uses the no-cors mode so custom headers won't be sent along, can't use that to identify the ping request, but that can be worked around by abusing the Accept header, something like Accept: text/x-vite-ping and check that instead.
I could submit a PR, but can't tell which file would be responsible for intercepting it, is it ws.ts?
Reproduction
https://github.com/gtm-nayan/vite-ping-repro
Steps to reproduce

Run pnpm install

Run pnpm dev

Open the page

Turn off dev server

Restart the dev server (ideally set a breakpoint on this line to avoid the clutter from unrelated requests)

Observe that the custom middleware from vite.config.js will have first logged the request URL from the ping request

System Info
npmPackages:
    vite: ^4.3.5 => 4.3.5

Used Package Manager
pnpm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

We used to have a __vite_ping endpoint that the client will ping, but that was removed at https://github.com/vitejs/vite/pull/6819 and https://github.com/vitejs/vite/pull/8133, because it was changed to ping the HMR host instead of Vite's http server host. By default, both host are the same but some configuration can have custom setups.
I think it makes sense to handle this in the http server still, so adding a middleware here should be good enough. I'm also fine with the custom Accept header to recognize it.


Introducing support for internal SSL communication.

Secured corporate landscapes may require that communication traffic be encrypted. So we have prepared a change, which makes internal traffic go over SSL, where appropriate. For these purposes:

suitable SSL certificates must be generated and provided as new configuration properties
a java keystore file must be provided inside tomcat/conf. We have included a simple and dummy one
an HTTPS connector in Tomcat must be enabled. The keystore password is "cloudfoundry".
the nginx servers must be recompiled against the OpenSSL library, and several other nginx modules/plugins.
we have adopted the strategy of using a nginx server in front of the cloud controller, having opened both plain HTTP and HTTPS servers.

Note: This change is relevant for Tomcat-powered applications only.
Important: Detailed user guide documentation for this change can be found here: https://github.com/cloudfoundry-collaboration/vcap/wiki/Setup-internal-SSL-communication

any update on this?
because i was wondering why this isn't pulled yet..

Any news on this item? Because it is a much requested feature I think.


Install Kubeflow on OpenShift contains broken markdown and invalid kfDef link

Section "Installing Kubeflow" in https://www.kubeflow.org/docs/distributions/openshift/install-kubeflow/ has a markdown issue and the referenced YAML file does not exist.

We need to just remove ")" from the link at the end, will update here. You can assign it to me

I have updated the link, I can create a merge request for this change.

/assign @himanshu9345

PR: https://github.com/kubeflow/website/pull/2942 should related to this


Use C99 snprintf() for VS2013 or older

With this delta, it worked! Here is the diff https://www.diffnow.com/?report=kna9m (stored for 1 month). :smile:
Can you please apply the change, I will merge and then upstream can continue to emerge! :sunglasses:

Thanks a bunch @saper! Landed in 574b3941559d7759e6b417b607efc67e97047536. Now lets see what the upstream guys think! :thought_balloon:


Click on element(button) is not working .

Facing issue while clicking on  "Proceed to Pay" button in Swiggy  App.
I have attached the screenshot of execution  and maestro hierarchy .
screenshot of code and app :

maestro hierarchy :
hierchy_output_check.txt
App:
https://swiggy.en.uptodown.com/android/download

Thanks for taking the time to raise this issue! There has been a lot of improvements and fixes on Maestro since this was raised so we’ll go ahead and close this one out as part of an issue cleanup - if you still experience issues, please open a new issue with reproduction steps. Thanks again for using maestro!


XML configuration: variables are now case insensitive

layout renderers are case insensitive, and so variables now also.

Codecov Report

Merging #3369 into dev will increase coverage by <1%.
The diff coverage is 92%.

@@          Coverage Diff           @@
##             dev   #3369    +/-   ##
======================================
+ Coverage     81%     81%   +<1%
======================================
  Files        344     344
  Lines      27556   27593    +37
  Branches    3703    3711     +8
======================================
+ Hits       22239   22275    +36
+ Misses      4251    4242     -9
- Partials    1066    1076    +10


Client-side Facebook SDK Login

This implements the Facebook SDK on the client, and allows for grabbing user access tokens through Facebook login. This also includes styling, and support for images, for the Facebook login button.
Currently, the response from facebook is simply going to be console logged until we have a server to send our requests to.
closes #4 , however it opens #10 and #9
Pics:

Could you please merge with "Rebase and Merge"? It'll allow our git history to look a bit cleaner


update folder link in docs

Can one of the admins verify this patch?

I signed it!

Jenkins, test this please


improve syntax for clojure lang

Clojure language use too much symbols and by having the same color for symbols and vars make it harder for the eyes
before

after

Some problems:

You should execute npm install first. As I said in contributing guide, I've setup a pre-commit hook which will regenerate the json file before you commit.
You should add your code in L1722 to avoid conflict.
I noticed that you added a new token named variable, this token will not only change the highlights in clojure, but also highlights in all languages. Tokens like this are put in L5-L170, but we should change any of them once they have been written. To optimize any language, we should modify the language specific tokens instead.

I just tried the code, the second picture is already the expected behavior, so maybe you didn't get the highlight because you have installed some syntax extensions.
But that's OK, I've added part of your code via 76ca770, this issue should be fixed.


Bug/unused redux state

updated address slice unused redux

could you add comments and a line break grouping redux and useState vars to this pr as well?
// redux vars
...
// useState vars
...

i don't see the zone dropdown anymore in location


builder: ensure fontmake args are reset when generating each source file

If a config file contains 2 or more sources, the second sources onwards will inherit the previous source's args. We want fresh args for each source.
Hence why the ci complains in https://github.com/eliheuer/hasubi-mono/runs/6088671254?check_suite_focus=true
Fixes https://github.com/googlefonts/googlefonts-project-template/issues/72
Apologies for crappy explanation. Haven't slept well and I'm having a new floor laid. It's louder than a Dutch Gabber rave.

@simoncozens Lemme add a test for the builder since we don't have any.

Just checked the current gftools on pypi on https://github.com/googlefonts/Libre-Bodoni and it fails ot build. This PR works so I'll add this family as a testcase.


try to split at next key when split key is region start key

What have you changed? (mandatory)
Try to split at next key when the current split key is region start key after adjusted. After batch split has imported, we will don't need this feature any more.
What are the type of the changes? (mandatory)
Improvement
How has this PR been tested? (mandatory)
Unit tests
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
No
Does this PR affect tidb-ansible update? (mandatory)
No

LGTM.

/run-integration-tests

PTAL @BusyJay

I'm worried about the small regions this pr will create, which can be a serious problem if merge is disabled. #3064 seems a better solution.

I'm worried about the small regions this pr will create, which can be a serious problem if merge is disabled. #3064 seems a better solution.

@BusyJay Please see the description After batch split has imported, we will don't need this feature any more.

Batch split will cover this scenario and tikv-ctl support split a region by a specified key, so this pr can be abandoned.


⚠ Bofrost.at has degraded performance

In a6e1ff9, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1718 ms

Resolved: Bofrost.at performance has improved in 9ec5276.


Implement A001, A002 (flake8-builtins)

See: https://github.com/gforcada/flake8-builtins

Hi, I would like to work on it :)

Awesome! Feel free to punt on the autofixing if it gets tricky. The autofix API still relies on manual token parsing.

I am very reluctant about adding autofixing to naming rules. Naming should be done by humans.
type -> type_ is just not good enough.
Moreover, autofixing naming can actually break stuff. Imagine that some copyright or type name is actually required.

For the little my opinion is worth I regularly do stuff like id = ... or type = ... because I think id_ = ... or tp = ... convolutes the name and my type checker will yell at me already if I try to do id = 1; id(...). This is especially true in small self contained functions (that's what namespaces are for). The auto fix would break my code in strange ways. And it's very possible the person running the auto fix is not me.

Sorry, yes, this rule absolutely should not have autofix. (I wrote that comment from my phone and had #273 in my head.)

Resolved by #284!

Thanks! I will work on something else tomorrow :)

Thank you!
P.S. Now that you've gone through the end-to-end process of implementing a rule, feel free to propose any broader refactors that might make that process easier / saner.


How did you fine-tune 65b?

I see that you successfully fine-tuned LLaMA 65B using the alpaca-lora repo on 8xA100 80GB, but what command did you use to train it across multiple GPUs?

I didn't use special much, just used this below:
torchrun --nproc_per_node=8 --master_port=41234 finetune.py

and modified finetune.py is:
# ...
# optimized for RTX 4090. for larger GPUs, increase some of these?
MICRO_BATCH_SIZE = 4  # this could actually be 5 but i like powers of 2
BATCH_SIZE = 256
GRADIENT_ACCUMULATION_STEPS = BATCH_SIZE // MICRO_BATCH_SIZE
EPOCHS = 3  # we don't always need 3 tbh
LEARNING_RATE = 5e-5  # the Karpathy constant
CUTOFF_LEN = 512  # 256 accounts for about 96% of the data
LORA_R = 8
LORA_ALPHA = 16
LORA_DROPOUT = 0.05
VAL_SET_SIZE = 0
TARGET_MODULES = [
    "q_proj",
    "v_proj",
]
DATA_PATH = "koen_alpaca_data_cleaned.json"
OUTPUT_DIR = "lora-alpaca"

device_map = "auto"
world_size = int(os.environ.get("WORLD_SIZE", 1))
ddp = world_size != 1
if ddp:
    device_map = {"": int(os.environ.get("LOCAL_RANK") or 0)}
    GRADIENT_ACCUMULATION_STEPS = GRADIENT_ACCUMULATION_STEPS // world_size

model = LlamaForCausalLM.from_pretrained(
    "decapoda-research/llama-65b-hf",
    load_in_8bit=True,
    device_map=device_map,
)
tokenizer = LlamaTokenizer.from_pretrained(
    "decapoda-research/llama-65b-hf", add_eos_token=True
)
# ...


UnhandledPromiseRejectionWarning

Hi,
today I was running Jinsta, but after some time and no actual like with this info on possible interactions:
info:    like media
info:    response from like: [object Object]
I had this error and jinsta crashed
info:    current progress: 235 / 251
info:    interact with media
info:    like media
(node:3804) UnhandledPromiseRejectionWarning: IgResponseError: POST /api/v1/media/2161027427273349941_7188316441/like/ - 400 Bad Request; Sorry, you cannot like this media
at Request.handleResponseError (/home/michele/jinsta_data/node_modules/instagram-private-api/dist/core/request.js:102:16)
at Request.send (/home/michele/jinsta_data/node_modules/instagram-private-api/dist/core/request.js:49:28)
(node:3804) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3804) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

it could be that this media was an ad... i have to filter them out :) i will do that in the new refactoring!


Add code documentation

will not work more on this now... there is api documentation, it will have to serve as documentation


fix missing inline classes

The use of the InlineModelAdmin.classes attr was missing in your inline template rewriting.
With the following code using this classes inline attr, which is needed for my uses cases, I don't have them rendered:
class MyBeautifulInline(NestedStackedInline):
    # masked code unrelevant for the exemple

    # The Inline classes attr
    classes = ("i_want_thisclass", "i_want_thisclass2")

With this change; I now have, as excptected,  an output for my stacked nested inline with the two desired classes used in my example:

Any reason this isn't being merged?


Postpone iteration number update

Currently the database migration 110 won't go through on prod-preview. I'm postponing it for now.

Reverts "update number for existing iterations (#2314)"

This reverts commit 8674b7b56a9226b3bbd6ebf7b0179f127ff6a0a2.

Revert "Use Postgres CTE to update iteration numbers (#2319)"

This reverts commit e09b8055ac7cff0ad32e12a3fe361888666bbbc9.

/ok-without-tests

It was postponed to #2326


sbt-houserules 0.3.7

To validate this pull request against other sbt modules, please visit this link.


feat(js_formatter): explore embedded language formatting

Summary

Test Plan

😻😻😻

Hello @ah-yu,
Great job on taking on this task!
I've had some experience with embedded language formatting in Prettier, so please allow me to share a few thoughts.
Personally, I'm not a fan of the --embedded-language-formatting option in Prettier. When I first learned about it, I couldn't find any documentation specifying which blocks are considered "embedded" and which languages are supported. It took me a long time digging through its source code to understand the supported languages and the way they are embedded. This made me realize that the auto option doesn't provide developers with enough information to have a clear expectation of how the code will be formatted.
Moreover, due to this lack of transparency and the fact that there are only auto and off choices, this option's functionality is quite limited. In fact, there are several popular issues on Prettier's GitHub where users have suggested enhancing the configurability of this option (see https://github.com/prettier/prettier/issues/4424 and https://github.com/prettier/prettier/issues/5588).
Given this background, and motivated by the need to format XML embedded within JavaScript back then, I developed a Prettier plugin, prettier-plugin-embed, to address this issue. Allow me to quote from its README:

What?
This Prettier plugin (namely prettier-plugin-embed) provides a configurable solution for formatting embedded languages in the form of template literals within JavaScript or TypeScript files.
Why?
Prettier has introduced an option for formatting embedded languages, named embedded-language-formatting. However, this option only offers two modes: auto and off. This limits its functionality, as it does not permit individual formatting adjustments for specific languages. Additionally, it lacks support for customizing which languages require formatting, as well as specifying block comments or tags for embedded language identification. These constraints hinder the feature's overall usability. For in-depth discussions on this matter, see the GitHub issues: prettier/prettier#4424 and prettier/prettier#5588.

In simple terms, this plugin explicitly configures which parts of the code are considered embedded languages. In my plugin, I specified that only tagged templates like css`div { color: red; }` and template literals with preceding block comments like /* css */ `div { color: red; }` are treated as embedded language candidates. The former is a common pattern in css-in-js libs and sql-in-js libs, while the latter is flexible enough to be used for language annotation. Additionally, this plugin provides rich configurable options for users to specify which tag names or block comments correspond to which languages. For details, see https://github.com/Sec-ant/prettier-plugin-embed?tab=readme-ov-file#language-specific-options.
This plugin relies on Prettier's extensive language support plugins to successfully provide embedded code formatting for many languages. The most popular seems to be the SQL family of languages, which is also a highly requested feature by Prettier users: https://github.com/prettier/prettier/pull/12139. Regarding this, I think @karlhorky can provide more insights from a developer's perspective.
Regarding your work on Biome, I see that you have referenced Prettier's approach by introducing the --embedded-language-formatting=auto|off option and hardcoding which nodes are considered embedded CSS code for initial testing. While I don't support this approach, I'm not asking you to start over. Rather, I want to provide you and the other developers with enough background knowledge to help us analyze the path we need to take more comprehensively. After all, adding a new feature is easy, but changing its behavior later is much more difficult.
One more thing, I noticed in your code comments for handling template strings, you mentioned replacing interpolation expressions with placeholders, then parsing, formatting, and finally replacing them back with the original expressions. This method is indeed what Prettier and prettier-plugin-embed use. However, I must point out that different embedded languages may require different forms of placeholders to be recognized as valid tokens by their parsers due to syntax and parser constraints. This can also be affected by the position of the interpolation. IMHO, a more reasonable approach should work like gritql's definition and handling of metavariables: https://github.com/getgrit/gritql/blob/main/CONTRIBUTING.md#language-grammars. We can treat these interpolation expressions as special tokens called metavariables and add them to the language's grammar. This way, all interpolation expressions in various positions we defined in our grammar will be valid and parsable tokens. I mentioned this in a reply to @arendjr before. Otherwise, simply replacing them with a magic string could cause issues when we want to support more languages or even just one language with multiple interpolation expressions in different places.
In all, these are my personal insights. Although I have limited knowledge of parsers and formatters, based on my experience developing the prettier-plugin-embed plugin, I am willing to offer my thoughts and suggestions on this matter. I hope Biome will carefully and thoroughly consider the implementation of this feature.
Thanks! ❤

Oh nice, didn't know about this PR! Cool to see more work being done in the embedded language formatting space 🙌

hardcoding which nodes are considered embedded CSS code

While I don't support this approach

Ahh yeah I would also not support the hardcoded / Prettier approach, it represents a pretty big downside to how Prettier is currently built.
Would be great to avoid this pitfall and offer extensibility from the start, if possible!

Regarding this, I think @karlhorky can provide more insights from a developer's perspective.

Yes, we and our students use SQL-in-JS through prettier-plugin-embed heavily, it's an essential feature for codebases which use SQL-in-JS, which is a growing use case. Lack of this feature would block us from considering migrating to Biome or any other formatter alternative.
I'm guessing there's also other popular embedded languages where the community would benefit from their inclusion, such as XML-in-JS, YAML-in-JS, Markdown-in-JS, and other supported by prettier-plugin-embed.
If Biome doesn't want to "own" and maintain the integrations of these embedded language formatters, then an alternative would be to make it easy (easier than Prettier) for community members to integrate with custom embedded languages. (potentially with an approach similar to Prettier's "Support library-specific plugin" idea (which has not yet been implemented).

@Conaclos

Template literals with preceding block comments

Is this commonly used?

The initiative to support this syntax is not based on how commonly this pattern is used, but rather to provide a versatile enough approach for users to annotate the embedded code in a non-intrusive way. Only supporting tag functions will force the developer to introduce runtime functions simply for dev-time formatting.
Also, this VSCode extension uses block comments to add syntax highlighting support for template literals: https://marketplace.visualstudio.com/items?itemName=bierner.comment-tagged-templates

I definitively like the idea of configuring which template tag is associated to which language. We could have a default mapping like you did in your plugin. Have you some proposal to support this in the Biome config file?

I don't have one now because I see we haven't talked about it elsewhere. But I can do some research and make a proposal later. I'm not very available in the comming days.

This kind of variable can appear everywhere in the embedded code, it can even be part of a keyword.
How do you handle them at the CST level? Bogus nodes?

To be honest, I think we should limit our embedded language formatting functionality to the token or node level interpolation. I would take the approach like what gritql (or astgrep) adopts to support metavariables. It seems just not reasonable to me that one would use `con${"st"}`    a   = 42; in their code and expect the formatter to format it properly.

One more thing, I noticed in your code comments for handling template strings, you mentioned replacing interpolation expressions with placeholders, then parsing, formatting, and finally replacing them back with the original expressions. This method is indeed what Prettier and prettier-plugin-embed use. However, I must point out that different embedded languages may require different forms of placeholders to be recognized as valid tokens by their parsers due to syntax and parser constraints. This can also be affected by the position of the interpolation. IMHO, a more reasonable approach should work like gritql's definition and handling of metavariables: https://github.com/getgrit/gritql/blob/main/CONTRIBUTING.md#language-grammars. We can treat these interpolation expressions as special tokens called metavariables and add them to the language's grammar. This way, all interpolation expressions in various positions we defined in our grammar will be valid and parsable tokens. I mentioned this in a reply to @arendjr before. Otherwise, simply replacing them with a magic string could cause issues when we want to support more languages or even just one language with multiple interpolation expressions in different places.

I can mostly second this, and indeed I expect we'll extend our parsers to support metavariables (the token kind is already there), so it would make sense if we can reuse the same ability here. But if we accept that metavariables are the placeholders, doesn't that closely match the approach already being taken here? Maybe I forgot something since we last discussed it :sweat_smile:

But if we accept that metavariables are the placeholders, doesn't that closely match the approach already being taken here? Maybe I forgot something since we last discussed it 😅

Sorry I wasn't being clear, I meant to express that we should use placeholders defined in the grammar so the parser can correctly parse that placeholder without ambiguity or choking. Currently, the placeholders used in Prettier or my plugin prettier-plugin-embed can only be considered special chosen identifier names, which are way less powerful than metavariables that are defined in the grammar.

@Sec-ant Thank you for your feedback, really appreciate it!

Regarding your work on Biome, I see that you have referenced Prettier's approach by introducing the --embedded-language-formatting=auto|off option and hardcoding which nodes are considered embedded CSS code for initial testing

Personally I don't like the Prettier's approach, the feature shouldn't be tightly bound to some specific css-in-js libraries. And I love the approach your plugin did, using some magic comments to inform the formatter that there is a language embedded is a good idea! Looking forward to your proposal. No hurry, take your time.

We can treat these interpolation expressions as special tokens called metavariables and add them to the language's grammar.

Not sure if introducing extra complexity to the parser to serve the formatter is a good approach, as it seems like a form of coupling to me
I have never used a css-in-js library and have no experience with embedded formatting, so I am not aware of the pain points. You definitely have a better understanding than I do. If you have any ideas you want to validate, feel free to push new commits to the branch.

Not sure if introducing extra complexity to the parser to serve the formatter is a good approach, as it seems like a form of coupling to me

This is to provide a general and reliable way to address the template string interpolation. For example, you use biome-placeholder-0 in your code to transform this
const style = css`div {
  background: ${myColor};
}`;

into this
const style = css`div {
  background: biome-placeholder-0;
}`;

which is still valid CSS syntax after transformation.
But if the user write this code
const style = css`div:nth-child(${myNth}) {
  background: green;
}`

then after transformation it will become:
const style = css`div:nth-child(biome-placeholder-0) {
  background: green;
}`

which is not syntax correct.
Additionally, if we want to support more other languages for embeded formatting in the future, a single solution like biome-placeholder-0 will also not apply for all of them:
const script  = js`
  const a = ${myValue};
`

const script  = js`
  const a = biome - placeholder - 0;
`

More over, from our infrastructure, we have the ability to implement embedded linting as well. While some of the placeholders may pass the parser, they may fail some linter rules, and the diagnostics will be confusing.
So I think augmenting the grammar is the only proper way to solve this problem. And we already start implementing some kind of grammar augmentation for our plugin feature.

So I think augmenting the grammar is the only proper way to solve this problem
Indeed!

@Sec-ant Wonder if https://github.com/biomejs/biome/pull/3228/commits/b10c61527a10ccb6c8cb21880bd5bd680995cdaa is close to the implementation you proposed

@Sec-ant Wonder if b10c615 is close to the implementation you proposed

Yes that's basically the idea 👍.
One thing I'm not sure though is the safety and future-compatibility of the CssGritMetavariable node. If we decide to support other CSS dialects, $ will have sepcial meanings in those languages, which may call for a different handling in the grammar and conflict with the metavariable node. But I'm probably overthinking it because at least right now we only support standard CSS syntax. And from gritql and ast-grep, this $... pattern seems to work fine in most of the languages without any special escaping treatment.

$ will have sepcial meanings in those languages

Maybe Grit needs to introduce new syntax for querying in Sass.

Oh, this is great, nice update @ah-yu ! This will indeed end up helping our CSS support for GritQL as well.
Good to know: Grit actually does a clever trick under the hood, where it replaces the $ metavariable indicators with μ. The actual character they use is even language-specific to avoid syntax clashes but for almost all languages it’s μ. If you replace the character I think it should work here as well.