[FEATURE] Synthetics Design Document

Synthetics Design Document

Overview
Motivation
How is it different from other plugins?
Requirements
UI Mockups
Architecture
Miscellaneous
Data Model
OpenSearch/Plugins REST endpoints
Appendix
References

Code: https://github.com/opensearch-project/observability/tree/uptime
1. Overview
Synthetics is a new module in observability that enables users to monitor availability and response times of applications and services in real time. This tool provides the ability to understand availability and response time components of services and applications. Users can detect problems before they affect their end customers.
2. Motivation
Synthetics systems are useful for measuring stability, reliability and analysis of health on live systems.  Continuous monitoring of micro-service based software systems is an essential component of observability. Synthetics opens up the door for infrastructure visibility by proactively pinging API endpoints. This can be considered as an auto-pilot extension to human observation, especially when merged with other OpenSearch capabilities namely: reporting, anomaly detection and alerting.
Synthetics can be utilized for the following use-cases:

Measure availability of apps or a services from a public endpoint, as well as specific components
Showcasing different response times from different locations around the world
Get historical view of logs over a period of time
Get live status view of apps and services

3. How is it different from other plugins?

App Analytics module in observability is mainly responsible for aggregating logs, traces and metrics under one umbrella. The availability part in App Analytics home page comes from pre-indexed data queried over with a PPL Query. Whereas, Synthetics component fetches it from an API request run at scheduled intervals. It drills down further into analysis of individual test-suites metrics including duration, requests over time and historical data.
Alerting plugin notifies a user when data from one or more OpenSearch indices meets certain conditions. Unlike Synthetics, Alerting doesn’t monitor public endpoints and retain live/historic values of the responses.

4. Requirements
4.1 Functional Requirement

Users must be able to make endpoint API requests as scheduled jobs.
Users must be able to make endpoint API requests on Demand
Users should be able to create synthetics test-suites for public endpoints.
Users should be able to create test-suites for OpenSearch, OpenSearch Dashboards and its plugins using REST endpoints.

4.1 Dashboards Observability
4.1.1 Synthetics Home

Users should be able to view summary graphs of test-suites availability and pings over time.
Users should see a history table of all recent requests made from all test-suites.
Users should be able to filter the graphs and table on home page with a PPL search bar.
Users should be able to filter home page with a date filter.
Users should be able to investigate deeper into a test-suite with links to related events, visualizations, panels and App Analytics page.

4.1.2 Test-Suite View

Users should see test-suite summary table with locations, URL, protocol and tags.
Users should be able to view 3 graphs: test-suite duration, pings over time and location(table/map) based test-suites.
Users should be able to see a history table with recent pings (1000), each row should expand with the detailed request view of response headers, body and timing chart.
Users should be able filter the history table by location and sort table by response duration, error message or response code.

4.1.3 Add & Configure Test-Suite

Users should be able to add new test-suites to the synthetics plugin.
Users should be able to process response with PPL queries, to validate the app and service being up.
Users should be able to configure a test-suite with the options below:

Id
Name
Protocol/Type of endpoint: [http, tcp, imcp]
App Id
Notebook Id
Saved Query Id
Saved Visualization Id
Panel Id
Enabled bool
Scheduler Job Id
ipv4 bool
ipv6 bool
ip resolver mode
timeout
tags
keep_null
Type specific configuration:

ICMP:

Hosts Array
Wait duration

TCP:

hosts
ports
check
proxy url
proxy resolver
ssl

certificate authorities
certificate [for client SSL auth]
key [for client SSL auth]
supported protocols e.g ["TLSv1.0", "TLSv1.1", "TLSv1.2"]
key-passphrase
verification-mode: [full, strict, verification, none]

HTTP

hosts
max redirects
proxy url
proxy headers
username
password
ssl [similar to tcp]
index headers
index response: [on_error, never, always] controls when to index the response
check: [method/status, headers, body] applies for both request and response

Note: Username and passwords are stored for accessing an endpoint with HTTP basic authentication.
More detailed HTTP request:
# Synthetics Client in Opensearch-Observability

## Test-Suite Configuration:

Taking a look at `sample_testsuite.yml`, we can see:
---
  name: "Sample Test Suite"
  type: "http"
  appId: ""
  notebookId: ""
  savedQueryId: ""
  savedVisualizationId: ""
  operationalPanelId: ""
  ipv4: true
  ipv6: true
  resolverMode: "all"
  timeoutSeconds: 16
  tags:
  - "news"
  - "apis"
  keepNull: true
  hosts:
  - "https://opensearch.org"
  - "https://opensearch.org/synthetics"
  - "https://github.com/opensearch-project"
  maxRedirects: 1
  proxyURL: ""
  proxyHeaders: {}
  username: ""
  password: ""
  ssl:
    enabled: false
    default: true
    certificateAuthorities: CAINFO
    certificate: ""
    key: ""
    supportedProtocols: "TLSv1.1" # https://curl.se/libcurl/c/CURLOPT_SSLVERSION.html
    keyPassphrase: ""
    ecAlgorithmCurves: ""
    falseStart: false # https://curl.se/libcurl/c/CURLOPT_SSL_FALSESTART.html
    cipherList: "" # https://curl.se/docs/ssl-ciphers.html
    verifyHost: true # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html
    verifyPeer: true # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html
  indexHeaders: true
  indexResponse: "always"
  request:
    method: "GET"
    headers: {'Accept-Encoding': None, 'Content-Encoding':'gzip'}
    body: ""
    json: {}
  response:
    status:
    - 200
    - 301
    headers: {}
    body: {}
  scheduler:
    scheduleType: "interval"
    schedule:
      period: 20
      unit: "seconds"

* The `name` field is the name you specify for this particular Test-Suite, has to be alpha-numberic.
* `type` is the protocol for this Test-Suite, you can choose from either http, tcp, or icmp.
* `appId`, `notebookId`, `savedQueryId`, `savedVisualizationId`, and `operationalPanelId` are all neccessary ids for if you want to connect this Test-Suite with other OpenSearch components.
* `ipv4` is a boolean value specifying if the request should be handled through IPv4
* `ipv6` is a boolean value specifying if the request should be handled through IPv6
* `resolverMode` takes a string that specifies the resolver mode
* `timeoutSeconds` is the amount of time (in seconds) before any connection should time out, takes a number
* `keepNull` is about whether fields with no values should be kept null, takes a boolean
* `hosts` can be a list of endpoints that are in the Test-Suite and will be pinged based on the schedule
* `maxRedirects` is the max number of redirects the connection should go through before being cut off.
* `proxyURL` takes a url that can be the proxy url
* `proxyHeaders` are the headers that would go with the proxy url
* `username` is a string that can be attached onto the request that will act as a username
* `password` is a string that can be attached onto the request that will act as a password
* `ssl` is where various ssl certificates' paths can be specified and used:
  - `enabled` by default (also when ssl is not specified) will not attempt to use SSL. However, if true is specified, then SSL is required for all communication or there will be an ERROR thrown
  - `default` is an option, where if true, will attempt to find and use CA bundles contained in the `certifi` library. If false, a CA path is needed in `certificateAuthorities`.
  - `certificateAuthorities` is a needed file path leading to a valid CA cert bundle for SSL unless `verifyPeer` is false, in which case an empty file can be given.
  - `certificate` should be a file path leading to a certificate with the type "PEM".
  - `key` should be a file path to a private key with type "PEM".
  - `keyPassphrase` would be the password required to use `key`
  - `supportedProtocols` is the protocol version range for the SSL/TLS handshake to use. The input protocol verison will be the minimum protocol used, where later versions can be used as well. For exmaple, if the value here is "TLSv1.1", then TLSv1.1, TLSv1.2, and TLSv1.3 would be available for use. The default value is "TLSv1.0". This method of input is in use to keep behavior of TLS libraries consistent.
  - `ecAlgorithmCurves` needs input as a colon delimited list of EC algorithms.
  - `falseStart` is a boolean with a default value of false, where when true false start would be in use. False start is a mode where a TLS client saves a round trip on a full handshake by sending data before verifying the server message.
  - `cipherList` needs to be a colon delimited string of one or more ciphers. Default follows an internal configuration.
  - `verifyHost`, when true, verifys that the connecting server has the same name in the certificate and host name, and will fail if otherwise. Default is true.
  - `verifyPeer` checks if the server certificate is authentic. This authenticity is based in the CA certificates supplied. Default is true. Disabling makes communication insecure and allows for man-in-the-middle attacks.
* `indexHeaders` is a boolean that will index the headers if true
* `indexResponse` specifys whether an index response should return or not
* `request.method` is the protocol's method that should be used
* `request.headers` are the request headers that will be sent along with the request. Must be in JSON format.
* `request.body` is the body that will be sent along with the request
* `request.json` is a json that can be sent along with the request
* `response.status` are possible statuses that can result in an 'UP' status for a host.
* `response.headers` are headers that the response will check to have
* `response.body` is a body that the response will check to have
* `scheduler.schedule-type` is the type of schedule that should be used. Possible types are 'interval' and 'cron'
* `scheduler.schedule` can either have two settings based on what the schedule-type was:
  - example interval:

    period: 20
    unit:

The period specifies the quantity of time between each interval (has to be a number) and the unit specifies the unit of that time (has to be one of "weeks, "days", "hours", "minutes", and "seconds"). The job will trigger once and then after each interval occurs. Documentation

example cron:

    year: "*"
    month: "*"
    day: "*"
    week: "*"
    day_of_week: "*"
    hour: "*"
    minute: "*"
    second: "0,15,30,45"

This is like 'cron' based scheduling, where the time in each component is the time in which the job triggers. There can either be a valid string put in or '*' can be used as a wildcard. So in the above example, the job will trigger at every minute on the 0th, 15th, 30th, and 45th second. Note that each component's default value is the wildcard so most components can be left out. Just looking up 'cron'  will give more neccessary information on how to use this scheduler. Documentation

The below configurations can be added to either interval or cron based scheduling.

    start_date: '2010-10-10 09:30:00'
    end_date: '2014-06-15 11:00:00'
    timezone: ''
    jitter: 120

4.1.4 Certificates

Users should be able to store certificates for TLS/SSL requests.
Users should be able to view a table of all certificates with their name, age, expiration date, issuer and SHA fingerprints.

4.1.5 Settings

Users should be able select certificate age threshold, to display certificate warning.
Users should be able to configure the auto-delete interval for deleting old endpoint responses stored in the observability index.

4.2 OpenSearch Observability
4.2.1 Observability Scheduler

Register scheduled jobs for running synthetics test-suites in the jobs-definition.

Based on intervals
Based on cron jobs

Use Endpoint Client APIs to run scheduled jobs at given interval/cron time.
Callback Endpoint Client after a scheduled job is run, to store the response and timings.

4.2.2 Endpoint Client

Allow users to make calls to ICMP, TCP and HTTP endpoints.
Endpoint client should be to make auth based requests with certificates and other SSL configurations.
Endpoint client should be to send a payload in request and validate received payload in response.
Endpoint client should be able to support SOCKS5 proxy endpoints.

4.2.3 Indexing Client

Query and store monitor configuration including endpoint details in .opensearch-observability index.
Query and store endpoint certificates in .opensearch-observability index.
Query and store all request information (headers, responses and timings) in a new observability-synthetics-logs index
Use the scheduler to auto-delete old response at regular intervals.

4.3 Optional requirements:
4.3.1 Plugin Integrations

Reporting needs a direct integration to the synthetics component, there is no “custom” way to use it like alerting and anomaly detection.
For Alerting & Anomaly Detection, users can configure alerts and detectors on the  observability-synthetics-logs index. This index will store the logs generated by synthetics test-suites.

4.3.2 Reporting

Users should be able to generate reports on summary of synthetics stats for a given time period.
Users should be able to generate report for a particular test-suite.

4.3.3 Anomaly Detection

Users should be able add a detector to find anomaly in response time over a given period for a test-suite.
Users should be able to view/delete/edit added anomaly detectors.

4.3.4 Alerting

Users should be able to add and configure alerting monitors for:

A down status of an endpoint
A down status over a period of time
Increase in response time over a threshold

Users should be able to view all the alerting monitors configured for synthetics
Users should be able to delete an alerting monitor.

6. Architecture
6.1 Architecture 1

6.1.1 OpenSearch-Observability

Index client: As of OSS 1.2.0 observability backend plugin is already part of OpenSearch plugins. This backend has an indexing client to add/get/delete/update the observability index. We can extend this backend plugin to perform similar operations with new types of data model:  syntheticsTestSuite, synthetics``Logs and syntheticsSettings

Endpoint client: This will be a new component added to the observability backend. This component will be responsible to perform all the API requests and store the result to the index using index client APIs. The component will also validate the response using PPL processors.

PPL Processors: Once the endpoint response is fetched, the logs are indexed in observability-synthetics-logs . The user has the capability to run PPL queries on the request or response parameters, to check for values and validate if the pinged app or service is up. These PPL queries are called PPL processors. They’ll specifically run on each response of the endpoint. The other values added by PPL processor is as follows:

Reduce the number of exported fields
Add more metadata or metrics to the logs
Perform additional operations over response data

Client Requests: The Endpoint client should be able to make requests to:

External endpoints provided by users in synthetics test-suites.
REST endpoints exposed by OpenSearch Plugins.

Job Scheduler: The observability plugin will have its own abstract component of the OpenSearch job scheduler SPI. This will enable other observability components to use its extensible interfaces to register a job and run those with appropriate callbacks on completion of the job. Later, synthetics test-suites will use these interfaces to run the pings to respective endpoints. Apart from the scheduled synthetics requests, an auto-deletion job should be scheduled as a daily cron job to delete logs below a given threshold. The log age threshold may be changed in the setting page of synthetics.

6.1.2 Dashboards-Observability

Synthetics Test-Suite UI:

The UI component of synthetics test-suites will be integrated to the existing dashboards-observability plugin.
The graphs used in UI will use plotly library, similar to other module in observability.
The cumulative stats in history/summary will be generated with a PPL query over observability-synthetics-logs index.

Plugin Usage & Integrations:

Alerting: Users can navigate to the Alerting plugin to create synthetics specific alerts. They can create a “custom alerting monitor” on observability index. Further then can create an “extraction query” as a trigger that meets conditions on a DSL query response.
Reporting: This integration will be similar to Notebooks, users can see reporting menu options if it is available. They should be also able to create reports through the reporting plugin.
Anomaly Detection: Similar to alerting, users can create custom anomaly detectors with observability index as a data source. Further, they can use a DSL query to parse syntheticsRequests and get a field e.g. response duration or even a collection of fields. Finally, users can configure their ML model over extracted fields.

Pros

The plugin stays within the OpenSearch cluster realm.
OpenSearch Job-scheduler is extended and re-used.

Cons

The endpoint client making requests to public endpoints, may need lot of security changes to be used in VPC domains.

6.2 Architecture 2

6.2.1 OpenSearch-Observability

Endpoint Client: In Architecture 2, the Endpoint Client is moved out of the OpenSearch cluster. It interacts with the OpenSearch using a client library (Python, Java, etc). The Endpoint client is polled by Job-Schedular based on set time intervals.
Rest of the components remain same as Architecture 1.

6.2.2 Dashboards-Observability

No Changes UI remains same as Architecture 1.
Plugin integrations & usages remain same as Architecture 1.

Pros

The endpoint client stays outside the OpenSearch realm and only pushes log data to the OpenSearch. The would be easier to work with, in VPC domains/domains with secure gateways.
OpenSearch Job-scheduler is extended and re-used.

Cons

The scheduler still polls the endpoint client with the test-suite meta-data. Therefore, need to make exception on gateway for the endpoint client.

6.3 Architecture 3 [Preferred]

6.3.1 OpenSearch-Observability

Endpoint Client:

In Architecture 3, the endpoint client handles the work of job scheduler on its own.
The test-suite configurations would be stored at .yml files, instead of docs in the .observability-index.
There would be many instances of endpoint client working to push the log data to OpenSearch. The endpoint client would make the scheduled requests and store the logs in observability-synthetics-logs index.

OpenSearch SPI Job-Scheduler is not used. Rest of the components remain same as Architecture 1.

6.3.2 Dashboards-Observability

UI doesn’t have major changes here, it behaves similar to trace-analytics UI. UI reads the observability-synthetics-logs index and populates the pages.
Plugin integrations & usages remain same as Architecture 1.

Pros

The endpoint client works on a push mechanism. No need for two communication between OpenSearch and endpoint client
No need for special security gateway changes.

Cons

OpenSearch job-scheduler is not re-used.

7. Miscellaneous
7.1 FGAC for OpenSearch

observability-synthetics-logs must adhere to all access control permissions
PPL queries/calls made throughout the plugin must adhere to all access control permissions

7.2 Options for having location in Synthetics:
Some potential solutions:

Require users to provide their own Location requesting service with their own api key so that they can be responsible with how many requests they might make
Find some way to keep a database for location requesting in our own service as to allow users to make unlimited calls
Pay for it ourselves (not recommended)
Have a location table index, where IP addresses are prepopulated and the customer can just grab the index and do the IP-location conversion themselves. This can then be incorperated into any information/maps in Synthetics UI [preferred]

8.
// Returned Job Scheduler Id is stored in the test-suite index.
{
    "scheduler": {
        "schedule_type": "recurring",
        "schedule": {
            "interval": {
                "period": 12,
                "unit": "HOURS",
                "start_time":<PHONE_NUMBER>333
            },
            "enabled": true,
            "enabled_time":<PHONE_NUMBER>332
        }
    }
}

8.2 syntheticsTestSuite (Architecture-2 6.3)

Stores synthetics test-suite configuration in synthetics-client

---
  name: "Sample Test Suite"
  type: "http"
  appId: ""
  notebookId: ""
  savedQueryId: ""
  savedVisualizationId: ""
  operationalPanelId: ""
  enabled: true
  ipv4: true
  ipv6: true
  resolverMode: "all"
  timeoutSeconds: 16
  tags:
  - "news"
  - "apis"
  keep_null: true
  hosts:
  - "http://opensearch.org"
  - "http://opensearch.org/synthetics"
  - "http://github.com/opensearch-project"
  maxRedirects: 0
  proxyURL: ""
  proxyHeaders: {}
  username: ""
  password: ""
  ssl: {}
  indexHeaders: true
  indexResponse: "always"
  request:
    method: "GET"
    headers: {'Accept-Encoding': None, 'Content-Encoding':'gzip'}
    body: ""
    json: {}
  response:
    status:
    - 200
    headers: {}
    body: {}
  scheduler:
    schedule-type: "interval"
    schedule:
      period: 20
      unit: "seconds"

8.3 syntheticsLogs

Stores synthetics logs in observability-synthetics-logs index.

{
    "syntheticsLog": {
        "syntheticsSuiteId": "",
        "status": "UP",
        "type": "http",
        "URL": "http://samplehost:8000",
        "request": {
            "method": "GET",
            "headers": {},
            "body": ""
        },
        "response": {
            "status": 200,
            "headers": {},
            "body": {}
        },
        "startTime":<PHONE_NUMBER>345,
        "endTime":<PHONE_NUMBER>398,
        "dnsTimeMs": 100,
        "ConnectionTimeMs": 500,
        "sslTimeMs": 0,
        "ttfbMs": 121,
        "downloadTimeMs": 2,
        "contentSizeKB": 3.5
    }
}

[Optional] 8.4 syntheticsSettings

Stores synthetics plugin configuration in .opensearch-observability index.

{
    "syntheticsSettings": {
        "certificateThresholdDays": 30, //UI will show a warning if a certificate is under the mentioned threshold
        "logAutoDeletePeriod": 30, // Logs above this age will be auto deleted
        "logAutoDeleteUnit": "DAYS"
    }
}

9. OpenSearch/Plugins REST endpoints
9.1 Using pre-existing REST endpoints
9.1.1 Stats APIs

OpenSearch and many of its plugins have pre-exposed REST APIs, on which the users can create synthetics test-suites. These APIs are exposed with FGAC controls. Below are some links to stats API docs:

Search Stats
Backpressure Stats
Node Stats
Alerting Stats
KNN Stats
Anomaly Detector Stats

9.1.2 Other miscellaneous APIs

OpenSearch and OpenSearch Dashboards also expose other REST APIs to users like CAT, Index, Cluster, Search, Status, etc. Users can use these endpoints for creating synthetics test-suites. An easy way to digest the output of these APIs is to use PPL processors over the endpoint response.

9.2 Health Check endpoints

Health Check endpoints will be one stop shop, to check health status of all OpenSearch & OpenSearch-Dashboard plugins. The API endpoints will provide users the capability to check each plugin and get their detailed health status. These health check endpoints can be used to create synthetics test-suites.
Health Checks conceptualize two types of APIs

Startup Check APIs - This check makes sure that the plugin has initialized(after a start/restart), doesn’t have any internal issues and is ready to take incoming requests
Liveness check APIs - This check makes sure that the plugin is still running post startup, doesn’t have any internal issues and is ready to take incoming requests

Synthetics test-suites can utilize the liveness check APIs. The response from liveness APIs can be checked with PPL processors.
More details on health checks can be seen here:  https://github.com/opensearch-project/opensearch-plugins/issues/74

10. Appendix
10.1 Alerting & Anomaly Detection

Synthetics test-suites users with surely use the alerting and anomaly detection plugins, as their combined value is the real MVP.  Therefore, to make it easy for initial users we can provide sample alerts and detectors with dummy synthetics test-suites.

10.2 Reporting

Reporting needs a deeper integration with all the observability components. Hence, we can come up with an integration plan that works with all the components.

10.3 Synthetic monitoring

Going further, the Endpoint client can be extended for monitoring APIs with synthetic testing. Chain HTTP requests and execute API calls sequentially with Multistep API tests

11. References
11.1 https://geekflare.com/monitor-website-uptime/
11.2 https://www.datadoghq.com/uptime-monitoring-tools/
11.3 https://cabotapp.com/
11.4 https://github.com/arachnys/cabot#single-service-overview
11.5 https://alyvix.com/learn/introduction.html

Synthetics Demo Video from @paulstn
https://user-images.githubusercontent.com/4348487/166389693-f2a8fc62-af7e-42da-a7d6-5632650176b2.mov

Issues associated:
Synthetics client

#707
#708
#709
#710
#711
#712
#713
#714
#715
#716
#717

Synthetics UI
TODO: add work breakdown/ pending issues

hey is this still tracking for 2.3?


Pytocs.Gui: Use *.resx for localization purposes

I can start on this. Is there any particular language you want to localize to?

I can transtate it to russian. If you just give me english resx-file.

I've added Resources.resx and Resources.ru.resx in the Core and Gui projects. Feel free to add Russian translations at your convenience.

Hi,
I can also add Turkish translation. Could you please add Resources.tr.resx?


Added OAuth1 functionality to the generic HTTP connector

What does this PR do?

Added OAuth1 functionaly to the generic HTTP connector

What ticket does this PR close?
Connected to #1297
Checklists
Change log

[x] The CHANGELOG has been updated, or
[ ] This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

[x] This PR includes new unit and integration tests to go with the code changes, or
[ ] The changes in this PR do not require tests

Documentation

[ ] This PR does not require updating any documentation, or
[x] Docs (e.g. READMEs) were updated in this PR, and/or there is a follow-on issue to update docs

(For releases only) Manual tests

[ ] Manually tested Keychain provider
[ ] Manually run Kubernetes-Conjur demo with a local Secretless Broker image build of your branch

Last 2 force pushes were fixing markdown and go lint tests

I know I'm coming to this late in the game
But why didn't we just make a standalone oauth1 connector vs adding an oauth1 "generic" config option that overrides any other headers (or just Authorization headers?) provided to the generic HTTP connector?
I have this sense that that's effectively what we did, but we put it in the connector/http/generic/ folder instead of in connector/http/ directly. The oauth1 key that can be provided in the generic HTTP connector config is not useful for any other HTTP connector besides oauth1.
It's possible I'm reading too much into this and this is the right call, but I would really like to question this - cc @sgnn7 @jonahx @BradleyBoutcher @doodlesbykumbi @diverdane

@izgeri I'm copying this convo here for future reference
There's a few reasons we didn't got that route. TLDR; We explored this possibility, but the issue we ran into was how much duplicate code was involved. Essentially, we'd have to import the entire generic connector or rewrite the existing code used for parsing templates, which led us to implement it as a protocol within the generic connector. The generic connector is meant to be consumed exclusively, and doesn't allow for logic to be performed on the ejected configuration after its been instantiated.
First, there are values that are required by oauth, and they aren't distinguishable without specific keys. So, we decided to keep those keys seperate in the oauth section, which allows us to further validate and access them using existing generic connector functionality. However, that isn't the issue. We have to perform logic on the values provided by the user to generate params required by oauth1, and that logic can only take place before the generic connector is instantiated, in the same way we parse Headers and QueryParams

Rebased with master


Question: module resolution in yarn workspaces?

Does snowpack fully support yarn workspaces in its module resolution?
It seems that snowpack is already resolving external / node_modules depedencies even if they were hoisted to the monorepo level, which is good.
But I am experiencing problems with imports from other packages inside the same monorepo. I have the frontend as one package named monorepo/packages/frontend (which I am trying to build with snowpack), and it relies on another package under monorepo/packages/model. The imports are "deep" imports, e.g. model/ModelA. This doesn't seem to work. I am getting:
⠼ snowpack installing... chart.js, dateformat, fast-copy, isomorphic-fetch, model/ModelA
✖ Package "model/ModelA" not found. Have you installed it?

Yarn has linked monorepo/node_modules/model to monorepo/packages/model, which seems correct.

Oh interesting. I bet Yarn is using a symlink so that node_modules/model exists as a symlink but node_modules/model/ModelA doesn't actually exist. We'd need to add an explicit check for a symlink (using only part of the immport), and if it exists the resolve the file from there.
You'll run into caching issues though: packages are installed once at start and then cached. I wonder how we could treat linked dependencies as source code instead, so that we can get updates as we code without re-installing your deps on every save.


libdrm-dev version conflict during image do_rootfs

I started noticing errors like this recently on master builds during do_rootfs of my image:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/kkiefer/code/yocto/poky/build/tmp/deploy/ipk/armv8a_tegra194/libdrm-dev_2.4.100-r0.1_armv8a_tegra194.ipk' -> '/home/kkiefer/code/yocto/poky/build/tmp/work/mymachine-oe-linux/runtime-image/1.0-r0/oe-rootfs-repo/armv8a_tegra194/libdrm-dev_2.4.100-r0.1_armv8a_tegra194.ipk'

I can see the following in my deploy directory:
/home/kkiefer/code/yocto/poky/build/tmp/deploy/ipk/armv8a_tegra194/libdrm-dev_32.3.1-r0.2_armv8a_tegra194.ipk
/home/kkiefer/code/yocto/poky/build/tmp/deploy/ipk/armv8a_tegra194/morgue/libdrm-dev_2.4.100-r0.1_armv8a_tegra194.ipk

The lower-versioned libdrm-dev gets pushed into morgue in favor of the higher-versioned libdrm-dev, which is being provided by libdrm-nvdc. Deleting tmp, or cleaning out the libdrm and libdrm-nvdc makes the error go away for the build, but it comes back at some point, depending on the order libdrm gets staged relative to libdrm-nvdc.
libdrm-nvdc is deploying its copy of libdrm.so.2 to a different directory, and it has this library marked as PRIVATE_LIBS. This is working fine. The problem appears when libdrm-nvdc adds the symlink from tegra/libdrm.so.2 to libdrm_nvdc.so, because skipping this step during do_install, the issue goes away. So this sort of smells like a problem with the OE shared library resolver, but I'll start by raising a flag here in case you have some other ideas.

I had fixed this for the main libdrm-nvdc package, but missed the -dev and -dbg packages.   Should be fixed now.  Thanks!


Using TextField as user.id index is a bad idea.

Specifically referring to: https://github.com/frankie567/fastapi-users/blob/master/fastapi_users/db/tortoise.py#L11
I'm sorry I got here so late (via #59 from https://github.com/tortoise/tortoise-orm/issues/246), but a TextField is a really bad primary key.
It is a very-large text field, as in a gigabyte large.  Also MySQL will at best index the first 1023 bytes (about 255 Unicode chars) and then just stop indexing.
So this is wide open for abuse, and bugs.
It will also perform terribly as both MySQL and PostgreSQL will only ever store a reference to an external block for the row.
A better, and preferable option would be fields.CharField(max_len=255, pk=True)

Wow 😱Thank you for pointing this out @grigi, I didn't pay enough attention when I merged this PR. Of course, this is bad. I'll change it ASAP.

Wow, that was fast!

Didn't want to keep something that huge too long in the codebase 😅Thank you very much 👍

@all-contributors add @grigi  for bug


Update snippets for OverReact UiComponent2

Is there a way to edit the snippets or upgrade them so that they use UiComponent2 instead of UiComponent?

Hey! I'd be happy to update but I'm actually not with the OverReact team anymore and I don't get a chance to use Dart much now so I don't think I'd be able to offer great support. But I'd be happy to give ownership of this repo/the VSCode extension to them if they want it /cc @greglittlefield-wf @aaronlademann-wf

I heard there is a way to edit the snippet on WebStorm. Is this feature available on VsCode also?


Footer not aligned well

The footer doesn't share the grid with the content area, and lacks whitespace at the bottom.

Hey, I'd like to pick this task up. Couldn't find a contributors guide. Is it okay just to get started on this and send in a pull request?

We have to change the footer to add the sponsor's logos #130 so I think it's better that you don't work on this now. When it's ready or I find something else I will ping you.
Thanks for offering your help!


Can't find gibberish_detector and big.model

missing pip installation for gibberish_detector
rework big.model import from /tmp directory or something else

Fixed


🚀 [FEATURE]: Performance - Generate Test Fixture for Jmeter

👀 Background
As part of RestQA is to allow backend engineers to have an easy way to run performance test with their favorite tool.
✌ What is the actual behavior?
Currently the users can generate test fixture for the following performance tool:

Artillery

🕵♀ How to reproduce the current behavior?

Install RestQA npm i -D @restqa/restqa
Enable performance testing see documentation

🤞 What is the expected behavior?
We would love to be able to choose another tool such as Jmeter
😎 Proposed solution.

[ ]  Generate k6 Fixture
[ ] Update documentation
[ ] Update Report UI
[ ] Create a video for the screencast

🙏 Would you be willing to submit a PR?
Yes
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Codebase to modify:

https://github.com/restqa/restqa/blob/master/packages/core-performance/src/vendors/index.js
https://github.com/restqa/restqa/blob/master/packages/core-performance/src/vendors/jmeter.js


Support Data Class Generation Macros

Bloc + Equatable is very cool but creating boilerplate code for Constructor, probs from Equatable, toString method, copyWith method, or JSON serialisation can be boring. There is a VSCode plugin called Data Class Generator becomes very handy to fix this problem. Same functionality could be created for NVIM sessions using Lua. The example functionality could be seen at this link; https://github.com/huang12zheng/Dart-Data-Class-Generator

I’m currently working on it. Feel free to keep an eye on this repository; I’ll be making progress on it over the weekend.


Warn users about release-controller not honoring the cluster

This has come up a few times recently in #forum-testplatform, and is worth calling out.

/label tide/merge-method-squash

/lgtm


Upgrade github.com/emicklei/go-restful to version 3.8.0 or higher

github.com/emicklei/go-restful v2.9.5+incompatible is vulnerable
https://github.com/helm/helm/blob/main/go.mod#L79
See https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMEMICKLEIGORESTFUL-2435653

@irmasheriff PRs is welcome.

The specific code in go-restful that causes CVE-2022-1996 is used in helm? or we can ignore it


feat: Sync display name to Keycloak

Summary
This PR adds the feature to sync organization displayNames to Keycloak.
See internal ticket APUB-523 for more information.

Thanks!


Make accent color cover more ground

At the moment, accent color seems to only change the color of the folder icon when it's open which is not very useful. There are so many places like border bottom of the active tab, text for the currently opened file, etc. where accent color can be applied. However, it's always kind of teal color atm. Is this by design?

Is there a reason why most of the property/key texts are set to white (light grey)? It looks so pale at a glance. Is it possible we use a different color for this type, like any less intrusive color will do. Everything just looks so bright on a dark theme

Here where accent color is used:

This is the full properties list:
{
      "activityBarBadge.background": "#64FFDA",
      "list.activeSelectionForeground": "#64FFDA",
      "list.inactiveSelectionForeground": "#64FFDA",
      "list.highlightForeground": "#64FFDA",
      "editorSuggestWidget.highlightForeground": "#64FFDA",
      "textLink.foreground": "#64FFDA",
      "progressBar.background": "#64FFDA",
      "pickerGroup.foreground": "#64FFDA",
      "tab.activeBorder": "#64FFDA"
}

Visual studio code allows you to complete override theme and color scheme colors, please check the readme section:
https://github.com/equinusocio/vsc-material-theme#override-theme-colors

Thanks for the reply and closing issues so swiftly.
As you can see from the screenshot below, my choice of accent color - purple is only effective on current folder. All other places you've marked above remain teal at all time no matter what color I changed.
I've also tried reinstalling the theme, but no luck. I'm using VS Code Insider 1.22
Meanwhile, some explanation on item 2 above would be much appreciated. Thanks.

The issue tittle is "Make accent color cover more ground". Nice, there is a lot of place where accent color is used. If you don't see them, there is another issue (if you want open a related one).

The second point is a subjective consideration. What you see as "so bright" can be "so dark"  for others. Since i can make happy all people, material theme start with a default set of colors (picked up from the consolidated sublime text version) then people can adjust the colors based on personal preferences, as described in the README.


Document the done() contract

When I call done() passing a non Error instance (let's say an error Object Literal, for instance) I get the following message:

done() invoked with non-Error: [Object object]

If the contract is that you should pass an Error instance to the async done handler, then that should be documented. I couldn't find that when looking at the site, only looking at the internals (which, as we all know, should not be relied upon).
If you pass a String (done("it should not do this")), according to the source, it is supposed to be casted accordingly, but then the result will be something like:

done() invoked with non-Error: it should not do this

That is interpreted as a mistake, but then the docs should reflect what should be done to prevent that mistake.
Below is the relevant piece of code from source (2.4.5):
function callFnAsync(fn) {
  fn.call(ctx, function(err) {
    if (err instanceof Error || toString.call(err) === '[object Error]') {
      return done(err);
    }
    if (err) {
      if (Object.prototype.toString.call(err) === '[object Object]') {
        return done(new Error('done() invoked with non-Error: '
          + JSON.stringify(err)));
      }
     return done(new Error('done() invoked with non-Error: ' + err));
    }
    done();
  });
}

TL DR;
Document that done accepts either undefined or an Error object to reflect the current undocumented behavior.

This issue was moved to mochajs/mocha#3134


Fix test failure

I'm not sure how this test is supposed to work but at least after @frogamic suggestions it's now syntactically correct, and it passes, so I'll leave it up to pyOCD developers to see if it actually does what they want it to do.


Added support for inline currentScript calls in IE and Edge

Added support for inline currentScript calls in IE and Edge

Also fixed a few linting issues

Hey @amiller-gh, I think I got it blazingly fast!

Beautiful! Thank you so much 🎉


build: latest a9

v11.2.4 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems.


Support M1 mac with docker image

Failed when run ./minifab up on M1 mac.

current we do not support M1 chipped mac os. It got a lot of issues which not related to how minifabric is done.


Update 19115-1/-3 writer to use schemas at schemas.isotc211.org instead of standards.iso.org

The 19115-1/-3 gmlWrapperTypes2014 schema at standards.iso.org has an import for gml with a broken link. This causes 19115-1/-3 records to fail to validate.
See https://standards.iso.org/iso/19115/-3/gmw/1.0/gmlWrapperTypes2014.xsd
<xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19136_Schemas/gml.xsd"/>
Based on the May 6th comment in issue #217 the location for the schemas should be https://schemas.isotc211.org/...
I ran into this last year and created a PR to update the link in standards.iso.org. I didn't get a response.
Based on the above comment, the location for the schemas should be schemas.isotc211.org not standards.iso.org.
I've verified using the Saxon parser that the schemas at schemas.isotc211.org validate.

This seems reasonable to make this change.


Continue #27: Support multi-threaded compression

This is based on #27 with a minor version bump and some new tests. Closes #27.

Interesting, that mac failure.
Which liblzma version the multithreading was introduced. Maybe it's time to use pkgconfig by default.

So the minimum version is 5.2.0: https://github.com/xz-mirror/xz/blob/master/NEWS#L1085-L1110
In #34 I added a pkgconfig-depends asking for 5.2.2 (the version on ubuntu 18.04 used for CI atm).
Could you rebase on top of current master.

And, strangely, it works with ghc-9.2 on macOS. It might be related to ghc-9.4.1. Let's rerun the CI and see.

@phadej can we merge this?

https://hackage.haskell.org/package/lzma-<IP_ADDRESS> with this patch is on Hackage


Update bezel to 1.2

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

Thank you for the contribution. It was merged directly as aebf5ff1b8d04dab009b639acbf7b58da4d98915. Your contribution is still credited to you.


Error installing SPK on DS223j

Getting an error message when I try to install any of the spk files for the latest release: "This package is not supported on the platform of Synology NAS or is incompatible with the current DSM version.
I tried install all 7.2 DSM releases of the 0043 release, I am running DSM 7.2.2 and have a DS223j which I believe is a 64-bit CPU so not sure what's going on, maybe the 223j isn't powerful enough?
Any lead is helpful!

Hi, DS223j has a Realtek RTD1619B CPU which has ARMv8 architecture. This package is not supported on ARM architectures, since Perforce no longer distributes P4D binaries for ARM.

Thanks for the response, that was my suspicion. Am I out of luck for running P4D on my NAS then?

As long as Perforce doesn't supply binaries for ARM, this will be impossible.


[WIP] do/issue-345: cachix readme and use in nix img build/publissh

Description of PR
Caching nix binaries is a good thing. Let's do this.
Tests

CI passes (it won't yet because the secret needs to be added to the repo settings).

publish images

The following docker images:
awsutils, helmsman-aws, magic-wormhole-mailbox, pki-validator
have been published on Docker Hub.

publish images

The following docker images:
awsutils, helmsman-aws, magic-wormhole-mailbox, pki-validator
have been published on Docker Hub.

Closing this in favor of https://github.com/Nebulaworks/nix-garage/pull/29.


ENH: Remove NINF, PINF, Inf,... usages

Hi!
Due to NumPy's main namespace being changed in https://github.com/numpy/numpy/pull/24357, here I update warning imports. Here I delete aliases that were decided to be removed.

Hi @mtsokol, thanks for the PR! As CuPy v13 currently targets NumPy 1.25 API set as the baseline, I'd like to have keep these aliases for now. Maybe like this?
# APIs to be removed in NumPy 2.0.
# Remove these when bumping the baseline API to NumPy 2.0.
# https://github.com/cupy/cupy/pull/7800
PINF = Inf = Infinity = infty = numpy.inf  # NOQA
NINF = - numpy.inf  # NOQA
NAN = NaN = numpy.nan  # NOQA
PZERO = 0.0  # NOQA
NZERO = -0.0  # NOQA

c.f. https://github.com/cupy/cupy/issues/7796#issuecomment-1670625628

Hi @mtsokol, thanks for the PR! As CuPy v13 currently targets NumPy 1.25 API set as the baseline, I'd like to have keep these aliases for now. Maybe like this?
# APIs to be removed in NumPy 2.0.
# Remove these when bumping the baseline API to NumPy 2.0.
# https://github.com/cupy/cupy/pull/7800
PINF = Inf = Infinity = infty = numpy.inf  # NOQA
NINF = - numpy.inf  # NOQA
NAN = NaN = numpy.nan  # NOQA
PZERO = 0.0  # NOQA
NZERO = -0.0  # NOQA

c.f. #7796 (comment)

Hi @kmaehashi, sure! This is also the same approach that I was asked to push in Jax: https://github.com/google/jax/pull/17041/files. I will update the PR.

@kmaehashi I updated PR and it's ready from my side.

Thanks, LGTM!
/test mini


Touchevents don't fire for readonly inputs

This is a (multiple allowed):

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Framework7 Version:  V2

Platform and Target: All mobile

Live Link or JSFiddle:  Will provide if needed

It appears FW7 doesn't allow touch events for readonly inputs.  This does work for mouse clicks.  The issue has been verified on android and ios devices.  Touching a readonly input does nothing.
So why do I need this? I have a page that has many number fields.  These fields need to be incremented or decremented by the user.  Real estate is limited so the stepper component is not an option.  Instead, I added the increment and decrement functions to the toolbar where the user can up click or down click the values once he focuses the input.  The problem I ran into was on IOS.  The keyboard just doesn't behave properly and is open and closing on various events causing confusion and scrolling of the page.  This is a known focus problem with IOS and the suggestion to fix this is to make the inputs readonly.  When readonly, the keyboard won't open and the user will rely on my tool bar for inputs.  This works great in a browser as well as on my mobile site.  The trouble is FW7 is not playing nicely.  Why the difference between touch and click events in this case?
IOS and Android both allow readonly fields with their respective browsers.  Since we are using the same webview forthe app, it seems reasonable to have the same functionality within the app. Is there a technical reason for this decision?
Thanks.

Didn't get anything. Provide more details and fill the issue form please, what are you trying to achieve, what you expect and get, etc.

In addition to comments above.
Expected Behavior
Readonly inputs (e.g. <input readonly ...>) for regular mouse clicks events will show the cursor in the input but not let users type.  This is standard behavior on browser platforms as well as tap events  in IOS and Android webviews. In contrast, Disabled inputs don't show a cursor and prevent typing.
Actual Behavior
FW7 Tap events treat both readonly and disabled as disabled.  This is inconsistent with ios and android browsers.

https://jsfiddle.net/s1774ds4/ no cursor on desktop. Can't see much sense to have cursor focused in readonly input, and i can't remember i saw anything like this in apps. Anyway, just add no-fastclick to input if you want to disable F7's touch behavior on it

I don't think you understand.  The cursor is not the problem (although firefox shows a cursor, chrome doesn't).  There is no focus on tap where there is on click.  Now, you can argue there shouldn't be a focus on readonly but there is on click but not tap.  All I'm saying is click and tap should work the same regardless.


V2Ray服务端Invalid User错误（TLS+WebSocket，id/alterid/时间 均已自查无误）

你正在使用哪个版本的 V2Ray？（如果服务器和客户端使用了不同版本，请注明）
4.18.0
你的使用场景是什么？比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
使用 Chrome 通过 Socks/VMess 代理浏览网页和观看视频
你看到的不正常的现象是什么？（请描述具体现象，比如访问超时，TLS 证书错误等）
客户端无法与服务端连接，在服务端error_log中有Invalid User日志
你期待看到的正确表现是怎样的？
能正常通过代理上网。
请附上你的配置（提交 Issue 前请隐藏服务器端IP地址）。

服务器端配置:
{
  "log": {
    "access": "/var/log/v2ray_access.log",
    "error": "/var/log/v2ray_error.log",
    "loglevel": "debug"
  },
  "api": {
    "tag": "api",
    "services": []
  },
  "dns": {
    "hosts": {},
    "servers": ["<IP_ADDRESS>", "<IP_ADDRESS>", "localhost"],
    "tag": "dns_inbound"
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "type": "field",
        "protocol": ["bittorrent"],
        "outboundTag": "forbidden"
      }
    ],
    "balancers": []
  },
  "policy": {
    "levels": {
      "0": {
        "handshake": 4,
        "connIdle": 300,
        "uplinkOnly": 2,
        "downlinkOnly": 5,
        "statsUserUplink": false,
        "statsUserDownlink": false,
        "bufferSize": 102400
      }
    },
    "system": {
      "statsInboundUplink": false,
      "statsInboundDownlink": false
    }
  },
  "reverse": {},
  "inbounds": [
    {
      "port": 6000,
      "listen": "<IP_ADDRESS>",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "918f4d1e-60ba-4820-ab3b-dc2fcb789f5e",
            "level": 0,
            "alterId": 16
          }
        ]
      },
      "streamSettings": {
        "wsSettings": {}
      },
      "tag": "vmess_in",
      "sniffing": {
        "enabled": false,
        "destOverride": ["http", "tls"]
      },
      "allocate": {
        "strategy": "always"
      }
    }
  ],
  "outbounds": [
    {
      "sendThrough": "<IP_ADDRESS>",
      "protocol": "Blackhole",
      "settings": {},
      "tag": "forbidden",
      "streamSettings": {},
      "mux": {}
    },
    {
      "sendThrough": "<IP_ADDRESS>",
      "protocol": "Freedom",
      "settings": {
        "domainStrategy": "AsIs",
        "userLevel": 0
      },
      "tag": "freedom",
      "streamSettings": {},
      "mux": {}
    }
  ],
  "transport": {
    "tcpSettings": {},
    "kcpSettings": {},
    "wsSettings": {
      "path": "/download",
      "headers": {
        "Host": "baidu.com"
      }
    },
    "httpSettings": {},
    "dsSettings": {},
    "quicSettings": {}
  }
}

客户端配置:
客户端配置由V2RayW工具生成
{
  "dns": {
    "servers": [
      "localhost"
    ]
  },
  "inbounds": [
    {
      "port": 1081,
      "listen": "<IP_ADDRESS>",
      "settings": {
        "udp": true
      },
      "protocol": "socks"
    },
    {
      "port": 8001,
      "listen": "<IP_ADDRESS>",
      "protocol": "http"
    }
  ],
  "log": {
    "error": "C:\\Users\\fourstring\\Downloads\\V2RayW\\log\\error.log",
    "access": "C:\\Users\\fourstring\\Downloads\\V2RayW\\log\\access.log",
    "loglevel": "debug"
  },
  "outbounds": [
    {
      "sendThrough": "<IP_ADDRESS>",
      "mux": {
        "enabled": false,
        "concurrency": 8
      },
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "xxx.com",
            "users": [
              {
                "id": "918f4d1e-60ba-4820-ab3b-dc2fcb789f5e",
                "alterId": 16,
                "security": "aes-128-gcm",
                "level": 0
              }
            ],
            "port": 443
          }
        ]
      },
      "tag": "vmess outbound",
      "streamSettings": {
        "wsSettings": {
          "path": "/download",
          "headers": {
            "Host": "baidu.com"
          }
        },
        "quicSettings": {
          "key": "key",
          "security": "none",
          "header": {
            "type": "none"
          }
        },
        "tlsSettings": {
          "allowInsecure": false,
          "alpn": [
            "http/1.1"
          ],
          "serverName": "xxx.com",
          "allowInsecureCiphers": false
        },
        "httpSettings": {
          "host": [
            ""
          ],
          "path": ""
        },
        "kcpSettings": {
          "header": {
            "type": "none"
          },
          "mtu": 1350,
          "congestion": false,
          "tti": 50,
          "uplinkCapacity": 5,
          "writeBufferSize": 2,
          "readBufferSize": 2,
          "downlinkCapacity": 20
        },
        "tcpSettings": {
          "header": {
            "type": "none"
          }
        },
        "security": "tls",
        "network": "ws",
        "sockopt": {}
      }
    }
  ],
  "routing": {
    "name": "全部使用主服务器",
    "domainStrategy": "AsIs",
    "rules": [
      {
        "type": "field",
        "port": "0-65535",
        "outboundTag": "vmess outbound"
      }
    ]
  }
}

请附上出错时软件输出的错误日志。在 Linux 中，日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:
2019/03/03 04:45:59 [Info] [2008864076] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49088 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:45:59 [Info] [1382786507] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49090 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:00 [Info] [927063124] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49092 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:00 [Info] [1647945536] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49094 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:01 [Info] [990396942] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49096 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:02 [Info] [3549109221] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49098 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:02 [Info] [1096418142] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49100 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:03 [Info] [1972922788] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49102 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:04 [Info] [982388611] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49104 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:05 [Info] [2978680535] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49106 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:05 [Info] [603748192] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49108 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:06 [Info] [2164742343] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49110 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:06 [Info] [3431389640] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49112 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:07 [Info] [3914027589] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49114 > v2ray.com/core/proxy/vmess/encoding: invalid user
2019/03/03 04:46:07 [Info] [1937052758] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: invalid request from <IP_ADDRESS>:49116 > v2ray.com/core/proxy/vmess/encoding: invalid user

客户端错误日志:
2019/03/03 12:45:57 [Info] [2765989532] v2ray.com/core/proxy/socks: TCP Connect request to tcp:www.youtube.com:443
2019/03/03 12:45:57 [Info] [2765989532] v2ray.com/core/app/dispatcher: taking detour [vmess outbound] for [tcp:www.youtube.com:443]
2019/03/03 12:45:57 [Info] [2765989532] v2ray.com/core/transport/internet/websocket: creating connection to tcp:xxx.com:443
2019/03/03 12:45:57 [Warning] [1182462542] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://xxx.com/download): 502 Bad Gateway > websocket: bad handshake] > v2ray.com/core/common/retry: all retry attempts failed
2019/03/03 12:45:57 [Info] [1182462542] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe
2019/03/03 12:45:57 [Info] [2765989532] v2ray.com/core/transport/internet/websocket: creating connection to tcp:xxx.com:443
2019/03/03 12:45:58 [Info] [2765989532] v2ray.com/core/transport/internet/websocket: creating connection to tcp:xxx.com:443
2019/03/03 12:45:59 [Info] [2765989532] v2ray.com/core/transport/internet/websocket: creating connection to tcp:xxx.com:443
2019/03/03 12:45:59 [Info] [2765989532] v2ray.com/core/transport/internet/websocket: creating connection to tcp:xxx.com:443
2019/03/03 12:46:01 [Warning] [2765989532] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://xxx.com/download): 502 Bad Gateway > websocket: bad handshake] > v2ray.com/core/common/retry: all retry attempts failed

请附上访问日志。在 Linux 中，日志通常在 /var/log/v2ray/access.log 文件中。

Nginx配置文件：
server {
    server_name xxx.com;
    listen 80;
    return 301 https://xxx.com$1;
}
server {
    server_name xxx.com;
    listen               443 ssl http2;
    server_tokens        off;
    ssl_certificate      /etc/letsencrypt/live/xxx.com/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/xxx.com/privkey.pem;
    ssl_dhparam          /etc/letsencrypt/dhparams.pem;
    ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384';
    ssl_prefer_server_ciphers  on;
    ssl_ecdh_curve secp384r1;
    ssl_protocols              TLSv1.2 TLSv1.3;
    ssl_session_cache          shared:SSL:50m;
    ssl_session_timeout        1d;
    ssl_session_tickets        on;
    ssl_stapling               on;
    ssl_stapling_verify        on;
    resolver                   <IP_ADDRESS> <IP_ADDRESS> valid=300s;
    resolver_timeout           10s;
    add_header    Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
    location /download {
                proxy_redirect off;
                proxy_pass http://v2ray:6000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_set_header Host $http_host;
    }
}

Nginx错误日志：
2019/03/03 04:46:03 [error] 6#6: *1973 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"
2019/03/03 04:46:04 [error] 6#6: *1975 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"
2019/03/03 04:46:05 [error] 6#6: *1977 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"
2019/03/03 04:46:05 [error] 6#6: *1979 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"
2019/03/03 04:46:06 [error] 6#6: *1981 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"
2019/03/03 04:46:06 [error] 6#6: *1983 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"
2019/03/03 04:46:07 [error] 6#6: *1985 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"
2019/03/03 04:46:07 [error] 6#6: *1987 upstream prematurely closed connection while reading response header from upstream, client: <IP_ADDRESS>, server: xxx.com, request: "GET /download HTTP/1.1", upstream: "http://<IP_ADDRESS>:6000/download", host: "baidu.com"

常见的导致Invalid user的情况都与我的问题不符。客户端和服务端的id相同，alterid设置也相同。客户端和服务端虽然时区不同，但UTC时间几乎没有差别。另外，虽然服务端nginx开启了TLS1.3，但也可以使用TLS1.2，而且既然能在由nginx反代的v2ray服务端中看到错误日志，说明客户端到nginx并不存在问题。
烦请大佬们检查一下我的配置或理解是否有误，非常感谢！

服务端 wsSettings 需要指定 path

@lcdtyph inbound连接的streamSettings如果没有指定的话是继承全局的。而且加上以后也没有作用。

@fourstring

服务端缺少 "network": "ws"
服务端outbounds第一个是blackhole，所有未指定路由流量都会被block

"headers": { "Host": "baidu.com" }要么为空，要么就填自己域名，baidu.com应该是错误设置

@lcdtyph @winds365 主要问题应该是inbound连接没有指定网络类型，非常感谢！

建议升级一下服务端版本，保存客户端和服务端的版本一致。我也遇到类似问题，升级服务端版本后解决


Lack of http.refresh and probe.interval settings from config cause panic

Enviornment:

OS: [Linux: Linux urandom 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux]
EaseProbe Version [main branch]

Describe the bug
I removed some options from the config (expecting easeprobe defaults to kick in) and this caused easeprobe to panic.

I will investigate further to see if i can spot where the bug lies exactly.
To Reproduce
Steps to reproduce the behavior:

Use the provided config (see below)
start easeprobe easeprobe -f test.yaml
See error

Expected behavior
I would expect easeprobe to fail gracefully.

test.yaml

settings:
  sla:
    backups: 3
    debug: false

  notify:
    dry: true
    retry: # Global settings for retry
      times: 5
      interval: 10s

  loglevel: "info"
  timeformat: "2006-01-02 15:04:05 UTC"

http:
 - name: test
   url: http://localhost:8181/

notify:
  discord:
    - name: "Server #Alert"
      webhook: "https://discord.com/api/webhooks//"
      avatar: "https://img.icons8.com/ios/72/appointment-reminders--v1.png"
      thumbnail: "https://freeiconshop.com/wp-content/uploads/edd/notification-flat.png"
      dry: true
      retry:
        times: 3
        interval: 10s

Good catch!
This is because the probers is nil, then the *probers in for loop cause the nil point error.
Originally, I thought the SLA HTML web page would be refershed to automatically with the same interval of the probe if we didn't set that.  it's not good.
And I agree with you, if didn't set the refresh time, just disable it, and we can set that on url.
I will do the refactory.

Tested and works as expected


[RFE] [Monitoring V2] windows-exporter should no longer depend on rancher/wins

This is a tracking issue for https://github.com/rancher/windows/issues/223 in rancher/rancher, which is ready to be tested on dev-v2.8.

tested on v2.8-head (421ce19)

deploy a windows cluster on 1.27 using the currently released chart

upgrade the chart to 103.1.0-rc1+up45.31.1 -- pass

deploy a windows cluster on the latest k8s version available (1.28)

install the chart 103.1.0-rc1+up45.31.1 -- pass


Updated build instructions.

Breaks CI. The PR changed the container name; .github files need to be updated to match - this also affects the API validator.

Its working now.


tweak the look of the index page slightly

Tweak the look of the index page slightly:

strong FAILURE ==> em Failure
add a text-muted bullet between package versions, for easier readability

Fair warning, I have not tried to run this locally; not 100% sure if there's a way for me to do a dry run with a small number of packages.
@astashov

LGTM :+1:

Thanks! Looking forward to the new dartdocs.


TypeScript typings do not export

Are you reporting a bug?
Yes.
I'm trying to upgrade a project to v6, and one of the first things I'm running into is that I want to import { Root} from 'react-static', but TypeScript tells me

Module '"react-static"' has no exported member 'Root'. (2305)

Which is correct: I don't see Root being exported from index.d.ts.
Environment

react-static -V:
6.0.9
node -v:
v10.14.1
npm -v:
6.4.1
yarn -v (I use Yarn):
1.12.3
Operating system:
Ubuntu 18.04.1 LTS

Steps to Reproduce the problem
Base your steps off of any freshly installed react-static template!
I can't really provide the steps from a basic template yet as I have yet to write a plugin for TypeScript, but basically, the line import { Root, Routes } from 'react-static' that is in the freshly-installed template will not work if TypeScript were to be enabled.
Expected Behavior
The TypeScript typings to be up-to-date with v6.

Feel free to submit a PR with the necessary changes

Closing for now, since typescript is not technically or officially supported by React Static (but is absolutely possible and used by some today).
Would love to see a PR to fix this.

Yes, I hope to look at it over the holidays. I take it the typings as a whole then are not updated for v6?
Btw, if it's not officially supported, it might be worthwhile to consider moving the typings to DefinitelyTyped? That's usually a sign that they're more likely to be lagging behind the official project compared to when the project itself hosts them. But for now I'll submit them here if I get around to it :)

That would be aswesome.
For now I just added:
export class Root extends React.Component {}


add support for Azure Openai for LLM based testing

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently, for LLM based testing, it uses openai. it would be better if we can evaluate based on azure openai as well.
Describe the solution you'd like
A clear and concise description of what you want to happen.
add a method which accepts azure openai
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I could not use evalute LLM based due to this. I had to implement one myself.
Additional context
Add any other context or screenshots about the feature request here.

@senthilkumarimuth I can definitely do this, however I have never worked with Azure OpenAI before nor do I have an Azure OpenAI deployment.
From what I can gather and correct me if I'm wrong, I'll need AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT,  openai_api_version, and  azure_deployment_name. Is there anything I've missed?

Also please come to our discord for better communication and I can resolve the issue faster: https://discord.com/invite/a3K9c8GRGt

@senthilkumarimuth I can definitely do this, however I have never worked with Azure OpenAI before nor do I have an Azure OpenAI deployment.
From what I can gather and correct me if I'm wrong, I'll need AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT,  openai_api_version, and  azure_deployment_name. Is there anything I've missed?

Yes that's all you need.

@senthilkumarimuth it's out! https://docs.confident-ai.com/docs/metrics-llm-evals#using-azure-openai
Version 0.20.36

@senthilkumarimuth it's out! https://docs.confident-ai.com/docs/metrics-llm-evals#using-azure-openai
Version 0.20.36

So quick. Appreciate it. Let me some test cases then. Good day!

Yes please let me know if it doesn't work, because I don't have an azure account so I couldn't test it.

@senthilkumarimuth its done, new docs are here: https://docs.confident-ai.com/docs/metrics-introduction#using-azure-openai
Please join our discord for all future questions and 10/10 customer support :) https://discord.gg/a3K9c8GRGt


parse-cron supports timezones ?

I am also interested in this. What are the steps needed to make the result timezone-aware.

Time zones are hard. Especially hard to get correct (our company builds a calendar, so unfortunately, I know that I'm right).
I rather would not go down that path given that I barely have the time to respond here. Though if anyone wants to explore in that directeion: feel free to attach a PR!
Great to hear that setting the time_source works for you!


Config: Read from file / Generate to file

Currently the Config struct only supports type safe defaults and setter methods. It should also support

Reading partial configs from file and merging them with the defaults.
Generating the defaults to a file
Generate the setter methods via macro
Validate config via cli command

Use https://github.com/FlixCoder/sample-config instead.


[Enhancement] KanBan: Save Order Of Issues on Boards

Add a filed ProjectBoardOrder or use Priority from/to Issue struct.
0 = default
highest number is on the top of the list ...
thoughts how to impement the backend:
issue with prio 4 -> 2:
new prio is lower so "Update prio=prio+1 where issue.project_id= .... and prio >= 2 and prio < 4"
issue with prio 3 -> 7:
else "Update prio=prio-1 where issue.project_id= .... and prio > 3 and prio <= 7"
x.ID(issue.id).UpdateCol(prio=newPrio)

Pseudo code don't take it to serious
Blocked by #8346

kanban was not merged jet

will be closed by #12506

Unfortunately PR #12506 has been closed by @patcito  that "cannot commit to redo the backend" (needed to fulfill reviewer requests). Is there any plan for a sustainable order of issues in the kanban ?

Unfortunately PR #12506 has been closed by @patcito  that "cannot commit to redo the backend" (needed to fulfill reviewer requests). Is there any plan for a sustainable order of issues in the kanban ?


Add builtin macro-like attributes

We also have to know about these to resolve them
bors r+

changelog skip


McInnes et alia: UMAP and HDBSCAN

See also #28 (comparing clusters to Allen cell types)

Nature Biotech paper (2018): Dimensionality reduction for visualizing single-cell data using UMAP)
his tSNE juxt UMAP (2018) talk
Notice end of page: UMAP and HDBSCAN
HDBSCAN perf
Accelerated Hierarchical Density Clustering McInnes & Healy

UMAP => hdbscan
This sounds like it could scale rather well.
Impact of cancer mutational signatures on transcription factor motifs in the human genome

We first used the UMAP dimensionality reduction method on the table of exposure values of the 2708 samples, and then defined clusters using the hdbscan method, as implemented in the largeVis R-package.

HDBSCAN
McInnes PCA(50) => HDBSCAN

UMAP => hdbscan
This sounds like it could scale rather well.
Impact of cancer mutational signatures on transcription factor motifs in the human genome

We first used the UMAP dimensionality reduction method on the table of exposure values of the 2708 samples, and then defined clusters using the hdbscan method, as implemented in the largeVis R-package.

https://umap-learn.readthedocs.io/en/latest/clustering.html

How to filter outliers to train a model on cleaner data?
How about tune UMAP to accentuate outliers. The HDBSCAN cluster. The take only the clustered nodes and run them through UMAP.
https://youtu.be/DinhTHoDRjk?t=1038


release 0.7.0-alpha.1

might have to disaple scrape-examples, will have to see

bors r+
:shipit:

It worked!
https://docs.rs/twitch_api/0.7.0-alpha.1/twitch_api/client/trait.ClientDefault.html#method.default_client

alright, it's probably not possible to support this.
cargo publish strips away workspace members. See https://doc.rust-lang.org/cargo/commands/cargo-package.html#description
This however doesn't describe how they are stripped away, should maybe ask about this upstream and in docs.rs about how this would work

I think that is the way no? Release and publish each workspace member singly then?

I'm not sure I understand, why would we publish the examples?


ToOptions doesnt't satisfy  props.

Describe the bug

thing I need - a Component, that wraps , so I can add predefined styles to all of my links. To use "more advanced" paths with them, I found a Type - ToOptions (https://tanstack.com/router/v1/docs/framework/react/api/router/ToOptionsType), that I can pass to Link.
So I created my own Link component that in its basic form looks like this:

import { Link, ToOptions } from '@tanstack/react-router';
import * as React from 'react';
type MyLinkProps = {
  toOptions: ToOptions;
};
const MyLink: React.FC<React.PropsWithChildren<MyLinkProps>> = ({
  children,
  toOptions,
}) => {
  return <Link {...toOptions}>{children}</Link>;
};
export default MyLink;

It works - I get a nice help from TypeScript autocompletes. It says - that I need "from" property in some situations.

I want routes that looks like this:
posts/$id
posts/$id/A
posts/$id/B

In posts/$id.tsx - I display  so I can see the subroutes.
If you run attached project like this - it works, MyLink component is fine.
(See here) https://stackblitz.com/edit/github-rb4ewj?file=src%2FMyLink.tsx
When I navigate to posts/$id -  contains nothing... So - I was wondering - and added a new file posts/$id/index.tsx.
(I created a Fork from the previous stackblitz here: https://stackblitz.com/edit/github-rb4ewj-tg9tx2?file=src%2FMyLink.tsx)
And this is where things go wrong - Link now complains about something not satisfying something...
Type '{ children: ReactNode; to: "/" | "/posts/$id" | "/posts/$id/A" | "/posts/$id/B" | "/posts/$id/"; hash?: true | Updater<string> | undefined; state?: true | NonNullableUpdater<HistoryState> | undefined; from?: RoutePathsAutoComplete<...> | undefined; search?: true | ... 1 more ... | undefined; params?: true | ... 1 mo...' is not assignable to type 'IntrinsicAttributes & ({ to?: ToPathOption<Route<any, "/", "/", string, "__root__", RootSearchSchema, RootSearchSchema, RootSearchSchema, ... 12 more ..., any>, string, "/" | ... 3 more ... | "/posts/$id/"> | undefined; hash?: true | ... 1 more ... | undefined; state?: true | ... 1 more ... | undefined; from?: Route...'.
  Type '{ children: ReactNode; to: "/" | "/posts/$id" | "/posts/$id/A" | "/posts/$id/B" | "/posts/$id/"; hash?: true | Updater<string> | undefined; state?: true | NonNullableUpdater<HistoryState> | undefined; from?: RoutePathsAutoComplete<...> | undefined; search?: true | ... 1 more ... | undefined; params?: true | ... 1 mo...' is not assignable to type 'MakePathParamOptions<true | ParamsReducer<{} | {} | { id: string; } | ({ id: string; } & {}), {} | {} | ({ id: string; } & {})>>'.
    Types of property 'params' are incompatible.
      Type 'true | ((current: {} | {} | { id: string; } | ({ id: string; } & {})) => never) | undefined' is not assignable to type 'true | ParamsReducer<{} | {} | { id: string; } | ({ id: string; } & {}), {} | {} | ({ id: string; } & {})>'.
        Type 'undefined' is not assignable to type 'true | ParamsReducer<{} | {} | { id: string; } | ({ id: string; } & {}), {} | {} | ({ id: string; } & {})>'.(2322)

All I did - was just create an index.tsx under posts/$id folder.
maybe I am just doing this wrong? How else I can make a default subroute? I do need a common component that wraps children (in this case, it is /src/routes/posts/$id.tsx
Your Example Website or App
https://stackblitz.com/edit/github-rb4ewj?file=src%2FMyLink.tsx
Steps to Reproduce the Bug or Issue

Go here: https://stackblitz.com/edit/github-rb4ewj?file=src%2FMyLink.tsx
Add index.tsx file under /src/routes/posts/$id/ folder (you might neeed to restart vite dev so it regenreates the content for the file)
Open MyLink component and see the issue.

Expected behavior
I expect Link to not complain about ToOptions passed to it.
Screenshots or Videos
No response
Platform

OS: ?
Browser: ?
"@tanstack/react-router": "^1.19.0",

Additional context
No response

ToOptions wouldn't satisfy all the possible options that a <Link> could take.
Try this.
import { LinkProps, Registered router } from "@tanstack/react-router"

interface MyLinkProps {
  linkProps: LinkProps<RegisteredRouter['routeTree']>
}

...
<Link params {...props.linkProps}>

LinkProps includes RegisteredRouter by default

export type LinkProps<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom ....

And it doesn't work either.
Type '{ children: ((string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | ((state: { ...; }) => ReactNode)) & (string | ... 4 more ... | ReactPortal)) | null | undefined; ... 287 more ...; onTransitionEndCapture?: TransitionEventHandler<...> | undefined; }' is not assignable to type 'IntrinsicAttributes & ({ to?: ToPathOption<Route<any, "/", "/", string, "__root__", RootSearchSchema, RootSearchSchema, RootSearchSchema, ... 12 more ..., any>, string, "/" | ... 3 more ... | "/posts/$id/"> | undefined; hash?: true | ... 1 more ... | undefined; state?: true | ... 1 more ... | undefined; from?: Route...'.
  Type '{ children: ((string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | ((state: { ...; }) => ReactNode)) & (string | ... 4 more ... | ReactPortal)) | null | undefined; ... 287 more ...; onTransitionEndCapture?: TransitionEventHandler<...> | undefined; }' is not assignable to type 'MakePathParamOptions<true | ParamsReducer<{} | {} | { id: string; } | ({ id: string; } & {}), {} | {} | ({ id: string; } & {})>>'.
    Types of property 'params' are incompatible.
      Type 'true | ((current: {} | {} | { id: string; } | ({ id: string; } & {})) => never) | undefined' is not assignable to type 'true | ParamsReducer<{} | {} | { id: string; } | ({ id: string; } & {}), {} | {} | ({ id: string; } & {})>'.
        Type 'undefined' is not assignable to type 'true | ParamsReducer<{} | {} | { id: string; } | ({ id: string; } & {}), {} | {} | ({ id: string; } & {})>'.

@schiller-manuel did anything change here? LinkProps used to work just fine.

Adding
{...toOptions}
from={"/"}

satisfies props.. But this will overwrite the "from" from the toOptions

Not sure if it covers all your use-cases, but I was able to get a Link wrapper working with something like this. Personally I find it cleaner passing the whole route object as opposed to just the to. That also allowed me to get by without having to pass a generic type to my custom Link component since typescript can directly infer it from the route prop.
// helper types
type AtLeastOne<T, U = { [K in keyof T]: Pick<T, K> }> = Partial<T> & U[keyof U];
type ExcludeEmpty<T> = T extends AtLeastOne<T> ? T : never;

// seem to be as safe/strict as the props of the tanstack-provided Link component
type RouteParams<T extends AnyRoute = RegisteredRouter['routeTree']> = ExcludeEmpty<
  T['types']['params']
> extends never
  ? { params?: never }
  : { params: T['types']['params'] };
type RouteSearch<T extends AnyRoute = RegisteredRouter['routeTree']> = ExcludeEmpty<
  T['types']['searchSchema']
> extends never
  ? { search?: never }
  : {
      search?: T['types']['searchSchema'] | ((args: T['types']['fullSearchSchema']) => T['types']['searchSchema']);
    };

// component props
type MyLinkProps<T extends AnyRoute = RegisteredRouter['routeTree']> = {
  route: T;
  children: React.ReactNode;
  className?: string;
  disabled?: boolean;
} & RouteParams<T> &
  RouteSearch<T>;

// custom Link component
function MyLink<T extends AnyRoute = RegisteredRouter['routeTree']>({
  route,
  children,
  ...other
}: MyLinkProps<T>) {
  return (
    <Link<AnyRoute> to={route?.to} {...other}>
      {children}
    </Link>
  );
}

So turns out this is what works.
const MyLink = <
  TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
  TFrom extends RoutePaths<TRouteTree> | string = string,
  TTo extends string = '',
  TMaskFrom extends RoutePaths<TRouteTree> | string = TFrom,
  TMaskTo extends string = '',
>(
  props: React.PropsWithoutRef<
    LinkProps<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> &
      Omit<React.HTMLProps<'a'>, 'children' | 'preload'>
  >
) => <Link {...props} />

can we make use of this in createLink?
I don't want to expose all of these generics as public API, otherwise we cannot modify them without causing breaking changes

So did anyone inspected - what's wrong with ToOptions? In my optinion - that is a user friendly type to be used in this place!

This code was working
type MenuItem = {   label: string;   route: LinkProps; };
const MENUS: MenuItem[] = [   {     label: 'Test',     route: {       params: (old) => old,       search: (old) => ({...old, test: true}),     },   }];
But I updated from 1.16.6 to 1.20.1 and it does not work anymore. I got the error :
Type '{ params: (old: never) => never; search: (old: {}) => { appModal: string; businessId: undefined; gedItemKey: undefined; }; }' is not assignable to type 'LinkProps'.   Property 'to' is missing in type '{ params: (old: never) => never; search: (old: {}) => { appModal: string; businessId: undefined; gedItemKey: undefined; }; }' but required in type 'CheckPathError<Route<any, "/", "/", string, "__root__", RootSearchSchema, RootSearchSchema, RootSearchSchema, RootSearchSchema, ... 11 more ..., any>>'.ts(2322) link.d.ts(72, 5): 'to' is declared here. Test.tsx(14, 3): The expected type comes from property 'route' which is declared here on type 'MenuItem'

I've seen many similar issues/discussions and stackoverflow posts. At this point, we could really use some official document / examples on how to wrap  components in a type safe way. Even the customized solutions that work, only the to prop is typed but things like search and params do not get type safety that match to.

Yeah, this is basically the same as #1194.

I tried to update my typings based on @jaens example, but unfortunately it does not work in 1.22.0. My previous typing worked fine in 1.19.4

I've seen many similar issues/discussions and stackoverflow posts. At this point, we could really use some official document / examples on how to wrap components in a type safe way

100% this. There is a a clear need to create a custom wrapper for the provided Link component and it becomes a big problem if the typings of the library do not remain stable.

I also tried this version by @SeanCassiere. This was interesting because my editor is happy but npm run build still breaks:

Not sure if this helps, but there's a variation of this, that I'm using that works.
const AppNavigationLink = <
  TRouteTree extends AnyRoute = RegisteredRouter["routeTree"],
  TFrom extends RoutePaths<TRouteTree> | string = string,
  TTo extends string = "",
  TMaskFrom extends RoutePaths<TRouteTree> | string = TFrom,
  TMaskTo extends string = "",
>(props: {
  name: string;
  props: Omit<
    React.PropsWithoutRef<
      LinkProps<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> &
        Omit<React.ComponentPropsWithoutRef<"a">, "preload">
    >,
    "children" | "className" | "activeProps" | "inactiveProps"
  >;
}) => {
  const { name, props: linkProps } = props;
  return (

      <Link
        className="..."
        activeProps={{ className: "..." }}
        inactiveProps={{ className: "..." }}
        {...linkProps}
      >
        {name}
      </Link>

  );
};

Source

I've seen many similar issues/discussions and stackoverflow posts. At this point, we could really use some official document / examples on how to wrap components in a type safe way

@ziw 100% this. There is a clear need to create a custom wrapper for the provided Link component and it becomes a big problem if the typings of the library do not remain stable.

We are working on this!
From what I can gather, most of the questions on the Discord questions channel and here related to this topic, is around having a type which can be applied into a custom component's props, to then later be applied on the TSR provided <Link> component.
import { Link, type SomeNewLinkPropsType } from "@tanstack/react-router";

function CustomLink({ linkProps } : { linkProps: SomeNewLinkPropsType }) {
  const { className, ...rest } = linkProps;
  return <Link className={`foo-bar ${className}`} {...rest} />
}

Once we figure out the correct story for the user-facing types for this, we'll make sure the documentation is updated to reflect the correct way forward.

So I looked at createLink, and I think it works pretty much the way we want it to, regarding type-safety and everything. Here's a TS playground:
https://tsplay.dev/Wzq93m
I've tested with additional properties, searchParams validation etc, it all looks good. One issue is that createLink freezes the browser at runtime. No kidding, this was weird, but I have a PR open that fixes it.
Once that is merged, I think createLink is a good abstraction to use in user-land, because it's type-safe and you can compose over every component that you want.
Only requirement is that props are being spread onto an actual a tag. This is something that is not type-safe, and maybe something that we should document.
Let me know if there's anything I'm missing

So I looked at createLink, and I think it works pretty much the way we want it to, regarding type-safety and everything. Here's a TS playground:
https://tsplay.dev/Wzq93m

ok, cool, that seems to mostly work..
One issue though is that once the component is wrapped in createLink it has some props which are set to undefined or an empty object. When deconstructing these into the component they overwrite any props set by the component (as intended, if the props were actually set by the consumer).
eg the className set in the example below is overwritten with undefined from the props.
const MyStyledRouterLink = createLink(MyStyledLink);

function MyStyledLink({ children, ...props }: React.ComponentProps<"a">) {
  return (

      {children}

  );
}

if I stringify & parse the props to remove the undefined it works as intended.
{...JSON.parse(JSON.stringify(props))}

also.. I was pleasantly surprised when I initially used Link for external links and it all seemed to work fine. While testing createLink I noticed that it complained about the absolute url not being assignable, then I tested Link and it did the same so I thought I must have been tripping, but looking at the code it looks like it's intended to work, so I include the props I see for those as well..

and submit a PR which I believe resolves the props issue.. (but not the type error on to with absolute urls)
https://github.com/TanStack/router/pull/1386

I am using 1.32.5 and the custom component linkProps does throw some TS issues:
Type TRouteTree does not satisfy the constraint AnyRouter

I think this is related to the same issue, I had following code which does not satisfy TS any longer:
function TabbedNavigationItem<
  TRouteTree extends AnyRoute = RegisteredRouter["routeTree"],
  TFrom extends RoutePaths<TRouteTree> | string = string,
  TTo extends string = "",
  TMaskFrom extends RoutePaths<TRouteTree> | string = TFrom,
  TMaskTo extends string = ""
>({
  label,
  activeHref,
  linkProps
}: {
  linkProps: LinkProps<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> &
    Omit<React.HTMLProps<"a">, "children" | "preload">
  label: string
  activeHref: LinkProps["to"]
}) {

The weird TS issues I was having seems to be resolved in version 1.33.4. This worked for me, with the exception of having to add a ts-expect-error on the actual <Link/> component. Unsure exactly how to resolve it, but usage of this component works in practice.
// ...omitted
import type { LinkProps, RegisteredRouter, RoutePaths } from '@tanstack/react-router';
import { Link } from '@tanstack/react-router';

export type LinkButtonProps<
  TRouter extends RegisteredRouter = RegisteredRouter,
  TFrom extends RoutePaths<TRouter['routeTree']> | string = string,
  TTo extends string = '',
  TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom,
  TMaskTo extends string = '',
> = Pick<LinkProps<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>, 'params' | 'search' | 'to'> &
  StrictOmit<ButtonProps, 'onClick'>;

export const LinkButton = <
  TRouter extends RegisteredRouter = RegisteredRouter,
  TFrom extends RoutePaths<TRouter['routeTree']> | string = string,
  TTo extends string = '',
  TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom,
  TMaskTo extends string = '',
>({
  params,
  search,
  to,
  ...props
}: LinkButtonProps<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>) => {
  return (
    // @ts-expect-error Not sure what's causing this type error
    <Link params={params} search={search} to={to}>
      <Button {...props} />
    </Link>
  );
};

In practice:
// No type error
<LinkButton params={{ productId: "123" }} to="/app/product/$productId" label="Go to Product"   />

// Type error (expects params prop)
<LinkButton to="/app/product/$productId" label="Go to Product"   />

Since creating a custom wrapper component for Link with working typing seems to be both a) difficult, b) easy to break with version updates and c) not officially supported (not mentioned in documentation), we decided to create our links using the official Link component, but by also wrapping it with our own StyledLink, which adds styling. It looks like this:
function StyledLink({ children, testId }: StyledLinkProps) {
  const childrenWithClassName = Children.map(children, (child) =>
    cloneElement(child, {
      className: classes.styledLink,
      "data-testid": testId,
    }),
  );

  return <>{childrenWithClassName}</>;
}

We use it like this:

@Jarzka did you try out createLink?
we are still gathering feedback about this before we promote it from experimental

didn't know that createLink is experimental but really, it works great on type level and on runtime (since I fixed it 😂). Also no type parameters needed in user-land. All those solutions with 5 type parameters are way too complicated for app level code.
Here's what I do:
import { Button } from 'my-design-system'

const ButtonWrapper = (props: Omit<React.ComponentProps<typeof Button>, 'as'>) => <Button as="a" {...props} />

export const RouterButton = createLink(ButtonWrapper)

that's it 🤷 . Now I can do:
<RouterButton to="/my/route/" params={{ this: 'is', typesafe: true }}>Hello</RouterButton>

everything is styled like my normal <Button as="a"> and we get type-safe to navigation. What's not to love :)

@TkDodo how do you apply activeProps without having to pass them every time?
I want to be able to achieve something like this:
import { ListItem } from 'my-design-system';

function NavListItem(props: ButtonProps & LinkProps) {
    return <ListItem as={Link} {...props} activeProps={{ className: 'Button-active' }} />;
}

<NavListItem to="/my/route" params={{ foo: 'bar' }}>
  My Link
</NavListItem>

@Jarzka did you try out createLink? we are still gathering feedback about this before we promote it from experimental

Yes, I am aware of createLink, but we did not want to use it of a few reasons:

We are slowly heading towards production and don't want to use experimental / undocumented features at this point
I have bad memories of the removal of buildLink during the beta period as it caused us to do massive refactoring of almost all links.
We want to keep the possibility to change the library in case of emergency, so we do not rely too much on TanStack specific features.

@TkDodo how do you apply activeProps without having to pass them every time?

Haven't done this yet since I only want this passed for our sideBar navigation, where I pass it manually. But you should be able to do one more layer of nesting:
import { ListItem } from 'my-design-system'

const ListItemWrapper = (props: Omit<React.ComponentProps<typeof ListItem>, 'as'>) => <ListItem as={Link} {...props} />

const CreatedNavListItem = createLink(ListItemWrapper)

export const NavListItem: LinkComponent<typeof ListItemWrapper> = (props) => (
  return <CreatedNavListItem {...props} activeProps={{ className: 'ListItem-active' }} />
)

And what about ToOptions type? What is the purpose of it? Where is it suppose to be used? Maybe it shouldn't even be exported

And what about ToOptions type? What is the purpose of it? Where is it suppose to be used? Maybe it shouldn't even be exported

The ToOptions type mostly comes in handy when you need access to the inference of the Router's available routes. For custom functions, etc... It's delicate since it needs access to generics to work correctly, and it's something that can certainly change as we push for better ts-performance.
It's not a magic bullet type for use with <Link> or useNavigate(), rather it's for more fine-grained types.


RuntimeError: shape '[640, 768]' is invalid for input of size 1310720

Just installed SD Forge and LayerDiffuse. Getting this error when trying to generate image,

SOLVED. I had a NON SDXL model loaded.


github wrong link

it is generating github link in the post like
eg : github.com/facebookresearch/co-tracker](https://github.com/facebookresearch/co-tracker
where it should create github.com/facebookresearch/co-tracker

Please check this issue

thanks for reporting, I haven't received this notification - I plan to add more features, will check


[outline] Fix .Release.Name access in range

Would be lovely if this could get merged :D

@nushkovg Sorry for direct mention, but maybe you could take a look?

@Morishiri @geoah Disregard my previous comment, I did the update myself in #15, so no worries, the fix is available in version 1.0.1 (my way of saying sorry for waiting so long).


Attribute Error being generated every minute after install

My system:
ERPNext : v13.11.1
Frappe:     v13.11.0
Running on a Ubuntu 20.04 LTS VPS (KVM virtualization) server with 4gb RAM, 4 CPU, 4gb Swap, 60GB SSD main drive
After installing the active_users application my system started generating the following error every minute:
(Note: my refresh frequency is also set to one minute, but that may or may not be relevant)
AttributeError: 'str' object has no attribute 'nodes_'
This only 'appears' to be happening to users with the roles that are defined in the Active Users Settings although my limited testing ability cannot tie that statement down as a unique positive. There may also be others conditions where the error is popping up.
However, when it does pop up it stops all other system UI processing. It looks like this on the screen:

Additionally, I have never been able to access the Active Users list through the icon at the top of the screen. It only generates a rotating set of squares GIF that lasts until the next iteration of the AttributeError above and then drops out. It looks like this:

If I can come up with any more data to be of help, I will post again.
~BKM

@bkm888 Thanks for your report..
This error is python related. I have updated the plugin so please update and check if the same error still pops up..

Wow, okay. Thanks for the fast reply. I did not expect anyone to reply today on Sunday so I tore down my server and started the rebuild process to get it back into testing condition.
It will still be another 2 hours before it is ready to go back to testing mode again. I have to restore a 7gb database to it first.
May have to wait until tomorrow to get back to testing your app (but I absolutely will finish testing it).
~BKM

@bkm888 I apologize for what you had to go through..
I will be waiting for your reply..
And I'm very thankful for your help..

@bkm888 Where you able to try the latest update? I want to know if the problem still exists of not..

This issue will be considered as resolved since @bkm888 didn't confirm the issue status in the latest update..


Adjusting styles in Chrome Developer Tools

A common workflow when adjusting styles on DOM elements is doing it from the Chrome Developer Tools. When using styletron it's pretty difficult to know where the styles comes from, also the styles seems to be uneditable in the styles window (see image). Is there some kind of debug mode or something that makes this easier?

This is actually a bug in Chrome, which unfortunately, is currently marked as wontfix: https://bugs.chromium.org/p/chromium/issues/detail?id=387952.
A possible workaround would be something like this: https://github.com/rtsao/styletron/pull/41/files#diff-9ec14c405e99179ce40c68455cf7ac20 in a development mode. Alternatively you can use Safari/Firefox devtools.
Or you can use the ".cls" option and toggle classnames with that.
I ultimately want to have a nice Chrome DevTools integration that makes debugging/editing easier.

Just added a proof of concept of a Chrome DevTools extension here: https://github.com/rtsao/styletron/pull/111

As of Chrome 85, CSSOM-injected styles are now editable in DevTools: https://developers.google.com/web/updates/2020/06/devtools


No FAQ anchor links on landing page work

To reproduce:

Go the http://getbem.com
Scroll down to the FAQ section
Press one of the two first links.

You are then presented with an empty page

strange, cannot reproduce. can you provide (os & browser) version? while i cannot reproduce, can you also show some kind of gif or video?

I'll get to it tomorrow, hopefully.

@fatso83 thanks! This code is responsible for navigation and not working properly with anchor hashes.

Quicktime video showing the bug in Safari
I have also tried the same in Chrome. Happens exactly the same thing.
Safari 9.1
Chrome 49
OS X 10.11.4


Add a comment to help future maintainers.

The dependency tracker is allocated as a local in performFrontend and at first glance, it appears that it could be moved into the following block. But it can't. This PR adds a comment to that effect.

@swift-ci please smoke test

@swift-ci please smoke test

Thanks!