1inch safe app tx is displayed as custom transaction in Queue on prod mainnet

Title/Description
1inch safe app tx is displayed as custom transaction in Queue on prod mainnet
Environment

Browser: Chrome/MacOS
Safe: 0x8675B754342754A30A2AeF474D114d8460bca19b
Wallet: MM
App Version: 3.0.0
Environment:

production (mainnet)
https://gnosis-safe.io/app/#/safes/0x8675B754342754A30A2AeF474D114d8460bca19b/transactions

Steps to reproduce

Go to 'safe= 0x8675B754342754A30A2AeF474D114d8460bca19b
Check tx with nonce=180 and 183 in Queue
Current result:
1inch safe app tx is displayed as custom transaction

Expected result
The safe app tx should be recognised and contain app name and logo
Screenshots

The core service has this info:
https://safe-transaction.gnosis.io/api/v1/safes/0x8675B754342754A30A2AeF474D114d8460bca19b/multisig-transactions/?nonce=180
The client gateway doesn't seem to have this info:
https://safe-client-mainnet.gnosis.io/v1/transactions/0x05bedd3377e57370600cee6aa553c3eb492dc3771a901a788b937fc5e550e981
@rmeissner @jpalvarezl any idea why that is? Could it be that it's related to the 429s we get from ipfs.io when fetching the Safe app info (logo etc)?

Fixed:
Related to 429s when pulling safe app manifest from ipfs
Related issues to prevent this in the future:
https://github.com/gnosis/safe-client-gateway/issues/246
https://github.com/gnosis/safe-client-gateway/issues/224

Thanks! Closing this then since the issue tracked in the client gateway on the other issues.


Unable to add triggers via REST api

When performing a POST to http://<container_ip>:<container_port/triggers with parameters:
"headers": {
    "content-type": "application/json",
    "accept": "application/vnd.cosmos.triggers+json;version=1.0.0",
    "cache-control": "no-cache",
    "postman-token": "54e25963-7623-e73b-f502-acfe263c1a68"
}

"body": {
	"name" : "Always set triggered to true",
	"action" : "Set triggered to true",
	"policy" : {
		"type" : "data_point_registration",
		"data_stream" : "Temperature"
	},
	"conditions" : []
}

The response status code is "500 Internal Server Error" and the body is: "ObjectNotFound: Decoder not found for given schema". It is also coming as "text/plain" according to PostMan (see image attached).

On the latest docker image, the insert and retrieval are working as expected. Closing the ticket


Add Rating

I added Rating Component to BlazorFabric.
Pls check if it is OK in this way
Thank you

It looks good to me.


plumb ctx all the way through the OTLP clients

#226 is asking for something I've wanted to do for a while. The first step in making this possible is to plumb context through the OTLP clients, so that there's a place to tunnel errors in and out so they can be displayed. This also presents a path to eliminate the final remaining global in otlpclient.Diag and replace it with context tunneling.

@mterhar I got it this far for connection errors.
atobey@USLPDDHW5M3 ~/src/otel-cli $ go build && env -i PATH=/bin ./otel-cli status --endpoint localhost:44444
{
    "config": {
        "endpoint": "localhost:44444",
        "traces_endpoint": "",
        "protocol": "",
        "timeout": "1s",
        "otlp_headers": {},
        "insecure": false,
        "otlp_blocking": false,
        "tls_ca_cert": "",
        "tls_client_key": "",
        "tls_client_cert": "",
        "tls_no_verify": false,
        "service_name": "otel-cli",
        "span_name": "todo-generate-default-span-names",
        "span_kind": "client",
        "span_attributes": {},
        "span_status_code": "unset",
        "span_status_description": "",
        "force_span_id": "",
        "force_trace_id": "",
        "traceparent_carrier_file": "",
        "traceparent_ignore_env": false,
        "traceparent_print": false,
        "traceparent_print_export": false,
        "traceparent_required": false,
        "background_parent_poll_ms": 10,
        "background_socket_directory": "",
        "background_wait": false,
        "background_skip_parent_pid_check": false,
        "span_start_time": "now",
        "span_end_time": "now",
        "event_name": "todo-generate-default-event-names",
        "event_time": "now",
        "config_file": "",
        "verbose": false,
        "fail": false
    },
    "span_data": {
        "is_sampled": "true",
        "span_id": "f293c03186f0b7ae",
        "trace_id": "32cc67787a086322c6b1a90b51bda1e6"
    },
    "env": {
        "PATH": "/bin"
    },
    "diagnostics": {
        "cli_args": [
            "status",
            "--endpoint",
            "localhost:44444"
        ],
        "is_recording": true,
        "config_file_loaded": false,
        "number_of_args": 3,
        "detected_localhost": true,
        "insecure_skip_verify": false,
        "parsed_timeout_ms": 1000,
        "endpoint": "grpc://localhost:44444",
        "endpoint_source": "general",
        "error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp <IP_ADDRESS>:44444: connect: connection refused\"",
        "exec_exit_code": 0,
        "retries": 4
    },
    "errors": [
        {
            "Timestamp": "2023-06-23T15:21:09.476353318-04:00",
            "Error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp <IP_ADDRESS>:44444: connect: connection refused\""
        },
        {
            "Timestamp": "2023-06-23T15:21:09.876525485-04:00",
            "Error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp <IP_ADDRESS>:44444: connect: connection refused\""
        },
        {
            "Timestamp": "2023-06-23T15:21:09.876534878-04:00",
            "Error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp <IP_ADDRESS>:44444: connect: connection refused\""
        }
    ]
}


Release 1.1.0-rc.1

atac

[x] PeakVI #165
[x] PoissonVI #179
[x] scbasset_batch #166
[ ] scbasset https://github.com/scverse/scvi-tutorials/actions/runs/7133507513

dev

[x] data_tutorial #180
[x] model_user_guide #167
[x] module_user_guide #168

hub

[x] minification #169
[ ] scvi_hub_intro_and_download #174
[x] scvi_hub_upload_and_large_files #170

multimodal

[x] cite_scrna_integration_w_totalVI #171
[x] MultVI_tutorial #172
[x] totalVI_reference_mapping #175
[x] totalVI #176

quick_start

[x] api_overview #177
[x] data_loading #178

scrna

[x] amortized_lda #181
[x] AutoZI_tutorial #182
[x] cellassign_tutorial #190
[x] contrastiveVI_tutorial #204
[x] harmonization #186
[x] linear_decoder #183
[x] query_hlca_knn #184
[ ] scarches_scvi_tools https://github.com/scverse/scvi-tutorials/actions/runs/7133671731/job/19426842721
[x] scVI_DE_worm #185
[x] seed_labeling #187
[x] tabula_muris #189

spatial

[ ] cell2location_lymph_node_spatial_tutorial https://github.com/scverse/scvi-tutorials/actions/runs/7122671576/job/19394075468
[ ] DestVI_tutorial https://github.com/scverse/scvi-tutorials/actions/runs/7122672392/job/19394077690
[x] gimvi_tutorial #199
[x] stereoscope_heart_LV_tutorial #197
[ ] tangram_scvi_tools https://github.com/scverse/scvi-tutorials/actions/runs/7122675417/job/19394086030

tuning

[x] autotune_new_model #194
[x] autotune_scvi #201

Remaining tutorials will be fixed and rerun for either 1.0.0-rc.2 or 1.1.0


Create InexorBot on Bintray for deployment

So we don't need to use our private accounts.

Done. Core team members can login using the GitHub InexorBot account.


Make the category checked only if all the services are checked

I have noticed that the category gets checked even if one of the services is checked, this seems strange to me as when you toggle the category all the services get toggled.
All the tests still pass.
A different approach that I would need some help implementing:
Add an option for the category logic with two options "AND" and "OR".
The "AND" option would mean that all services would need to be enabled for the category to be enabled.
The "OR" option would be if any service is enabled (how it currently works).

Seems like something useful. The behavior of the toggle button can be misleading.

@orestbida could you please take a look at this PR?

The current toggle behaviour is the only one valid for me: whether you have accepted one or all tracking services, tracking is enabled nonetheless, so treat the category as enabled.
Having an option to make it so that the category is on only when all its services are enabled would be way more misleading for the end user.


Update README.md

Remove reference to Crisp chatbox (currently deactivated on docs site and homepage)

Remove email address to concentrate communications in visible locations such as Slack and forums. @fharper


[QUESTION] How to send 204 response?

I tried to send 204 response in delete method
Example handler
@router.delete('/{order_id}/', tags=['smart order'], status_code=204)
async def cancel_smart_order(
        session: Session = Depends(get_session),
        order_id: UUID = Path(...)
):
    order = await session.get(order_id)

    if order.status != OrderStatus.open:
        raise HTTPException(409, f'Order have status: {order.status}')

    order.status = OrderStatus.canceled

    await session.commit_only(order)

But got error h11._util.LocalProtocolError: Too much data for declared Content-Length. Seems framefork convert None to null but set content length 0.

Not sure why the content-length is wrong; that may be a bug. But if you want to return an actual empty response, just set response_class=Response in the route decorator (the default is JSONResponse, which converts None to "null" as you have noticed).

It is a bug. I found that if (event.status_code in (204, or request_method == b" or (request_method == b" and 200 <= event.status_code < 300)) than content length set to 0, but by defualt if return None then framevork try to conver None to json and got (null(len 4)). Need to add check on status code and try to convert only if the expression above is False.

@heckad
Could you share where this check is performed in the code?
I don't necessarily think it's a bug for a JSONResponse to convert None to "null", regardless of the status code you return; it's up to you to specify that the response class should be Response and not JSONResponse. But it definitely is a bug if it manually sets the content length to 0 even when that's not the case.
I personally think the most consistent solution would be to drop the special case for the 204 status code (at least for JSONResponse).
It could make sense to display some kind of warning if using a 204 response code with a JSONResponse though?

Could you share where this check is performed in the code?

_body_framing method in _connection in h11 file.

I don't necessarily think it's a bug for a JSONResponse to convert None to "null", regardless of the status code you return; it's up to you to specify that the response class should be Response and not JSONResponse. But it definitely is a bug if it manually sets the content length to 0 even when that's not the case.

I wish he didn't put anything into the body. Add JSONResponse not remove the body and not solve the problem.
I have poor English and I don’t attack, I just speak briefly.

I meant this check:
(event.status_code in (204, or request_method == b" or (request_method == b" and 200 <= event.status_code < 300)) (which I assumed was in fastapi or starlette).
Is that in h11?

Yes, copy it from h11 file.
Stacktrace:
Traceback (most recent call last):
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\fastapi\applications.py", line 139, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\applications.py", line 134, in __call__
    await self.error_middleware(scope, receive, send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\middleware\errors.py", line 178, in __call__
    raise exc from None
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\middleware\errors.py", line 156, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\exceptions.py", line 73, in __call__
    raise exc from None
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\exceptions.py", line 62, in __call__
    await self.app(scope, receive, sender)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\routing.py", line 590, in __call__
    await route(scope, receive, send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\routing.py", line 208, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\routing.py", line 44, in app
    await response(scope, receive, send)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\responses.py", line 128, in __call__
    await send({"type": "http.response.body", "body": self.body})
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\exceptions.py", line 59, in sender
    await send(message)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\starlette\middleware\errors.py", line 153, in _send
    await send(message)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 479, in send
    output = self.conn.send(event)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\h11\_connection.py", line 464, in send
    data_list = self.send_with_data_passthrough(event)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\h11\_connection.py", line 498, in send_with_data_passthrough
    writer(event, data_list.append)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\h11\_writers.py", line 69, in __call__
    self.send_data(event.data, write)
  File "C:\Users\Asus\.virtualenvs\order_crud-5YVFcgZR\lib\site-packages\h11\_writers.py", line 88, in send_data
    raise LocalProtocolError(
h11._util.LocalProtocolError: Too much data for declared Content-Length

Huh, well that could be a good reason to change the behavior when content-type is 204 regardless of what feels best in FastAPI. Or maybe it makes sense to request a change to the upstream behavior; seems weird that it would override the content length depending on the status code when it is going to check the actual length elsewhere, and potentially raise an error...

So what is the best way to handle this right now? I have a function that returns 204 when results are not ready (but are in progress), and then a regular 200 when its all OK (with content).
I tried to achieve this with:
@api.get(
    "/test_request_results/{test_request_id}",
    response_model=schemas.TestRequestResults,
    responses={204: {"model": None}},
)
async def read_test_request_results(test_request_id: int, response: Response):
    # ... snipped ...
    if not complete:
        response.status_code = HTTP_204_NO_CONTENT
        return None

and I run into the same error as posted. Is there a workaround?

Instead of returning None, and instead of injecting the response, just return a newly created response. It would look like:
@api.get(
    "/test_request_results/{test_request_id}",
    response_model=schemas.TestRequestResults,
    responses={204: {"model": None}},
)
async def read_test_request_results(test_request_id: int):
    # ... snipped ...
    if not complete:
        return Response(status_code=HTTP_204_NO_CONTENT)

The reason you are getting content is because FastAPI uses a JSONResponse by default (instead of a Response), which converts the returned value None to "null". By returning a Response directly, you prevent FastAPI from using the JSONResponse and encoding the None.

Yep. Just what @dmontagu said :point_up:

@tiangolo I've just been reported this bug by mobile devs:
HTTP FAILED: java.net.ProtocolException: HTTP 204 had non-zero Content-Length: 4
I believe FastAPI should handle this and set response to Response class if response_code is set to 204

This works I need:
return Response(status_code=HTTP_200_OK)
Thanks all!

@tiangolo It does seem that a lot of lower-level frameworks/tools are explicitly checking for 204s to be empty, and raising errors when they aren't. The way things are implemented now, it admittedly feels like it would be a little unnatural to automatically modify the response class for just a single value of the return code, but given the extent to which this is special-cased in other tools, maybe it makes sense.
Either way, it probably makes to at least make a note of this behavior in the docs (probably somewhere near this section, which does explicitly discuss the 204 response code: https://fastapi.tiangolo.com/tutorial/response-status-code/#about-http-status-codes).

using status_code=HTTP_204_NO_CONTENT I had the same problem but only  on a Windows machine:
File "[...]\lib\site-packages\h11\_writers.py", line 89, in send_data
    "Too much data for declared Content-Length"

Running the same code on OSX did not return an error.
Any idea why?

using status_code=HTTP_204_NO_CONTENT I had the same problem but only on a Windows machine:
File "[...]\lib\site-packages\h11\_writers.py", line 89, in send_data
    "Too much data for declared Content-Length"

Running the same code on OSX did not return an error.
Any idea why?

I have the same problem:
File "...\lib\site-packages\h11_writers.py", line 97, in send_data
raise LocalProtocolError("Too much data for declared Content-Length")

Hi @dmontagu and @tiangolo
I believe FastAPI can do the right thing here with regards to returning empty body when handler declares its status_code as 204. It's not a trivial to spot and is a potential time sink. Speaking from the fresh experience - I had a code that did:
@app.delete("/", status_code=HTTPStatus.NO_CONTENT)
    async def die():
    # some work
    return

It works fine locally, e.g. when browsing localhost with Chrome or FF. Then I deploy to Google Cloud Run and start getting HTTP 503 Service Unavaialable. Cloud Run is relatively new, so I turn to GCP support and back&forth several hours later I land here to join the club of other devs bit by the same issue.
Too bad, what do you think?
The current full fix is as follows:
from http import HTTPStatus
from fastapi import FastAPI, Response

app = FastAPI()

@app.delete("/", status_code=HTTPStatus.NO_CONTENT)
async def die():
    # some work
    return Response(status_code=HTTPStatus.NO_CONTENT.value)

But even that is not without a quirk - the handler declaration accepts HTTPStatus enum as is, but Response doesn't resulting in weird HTTP logs like
INFO:     <IP_ADDRESS>:49710 - "DELETE / HTTP/1.1" HTTPStatus.NO_CONTENT No Content

Again, too many details to dig into for something I would expect to work out of the box (by high FastAPI standards). Opinions?

This is a bug: FastAPI is not conforming to the HTTP RFC:
https://tools.ietf.org/html/rfc2616#section-10.2.5

The 204 response MUST NOT include a message-body, and thus is always  terminated by the first empty line after the header fields.

FastAPI should made it difficult to produce an invalid HTTP response, not allowing to create a valid one with a workaround.

Dunno why, but today I ran into the same issue with python3.9. fastapi==0.63.0 and uvicorn==0.13.3, h11==0.12.0 on Debian10:
app_1  | INFO:     <IP_ADDRESS>:52908 - "DELETE /api/v1/users/user/2/ HTTP/1.1" 204 No Content
app_1  | ERROR:    Exception in ASGI application
app_1  | Traceback (most recent call last):
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 394, in run_asgi
app_1  |     result = await app(self.scope, self.receive, self.send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
app_1  |     return await self.app(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 199, in __call__
app_1  |     await super().__call__(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 111, in __call__
app_1  |     await self.middleware_stack(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
app_1  |     raise exc from None
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
app_1  |     await self.app(scope, receive, _send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 86, in __call__
app_1  |     await self.simple_response(scope, receive, send, request_headers=headers)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 142, in simple_response
app_1  |     await self.app(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 26, in __call__
app_1  |     await response(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/responses.py", line 228, in __call__
app_1  |     await run_until_first_complete(
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/concurrency.py", line 18, in run_until_first_complete
app_1  |     [task.result() for task in done]
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/concurrency.py", line 18, in <listcomp>
app_1  |     [task.result() for task in done]
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/responses.py", line 223, in stream_response
app_1  |     await send({"type": "http.response.body", "body": chunk, "more_body": True})
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 148, in send
app_1  |     await send(message)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 156, in _send
app_1  |     await send(message)
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 487, in send
app_1  |     output = self.conn.send(event)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_connection.py", line 468, in send
app_1  |     data_list = self.send_with_data_passthrough(event)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_connection.py", line 501, in send_with_data_passthrough
app_1  |     writer(event, data_list.append)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_writers.py", line 58, in __call__
app_1  |     self.send_data(event.data, write)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_writers.py", line 78, in send_data
app_1  |     raise LocalProtocolError("Too much data for declared Content-Length")
app_1  | h11._util.LocalProtocolError: Too much data for declared Content-Length

This helped, just use: response_class=Response
example:
from fastapi import Path, Response

...

@router_v1.delete('/user/{id}/', status_code=204, response_class=Response)
async def delete_user(id: int = Path(..., gt=0)) -> None:
    await UserService.delete(id)

...

Just to mention, I had no issues previously on versions fastapi==0.54.1, uvicorn==0.11.3, h11==0.9.0 (Ubuntu 20.04, python3.8)

Dunno why, but today I ran into the same issue with python3.9. fastapi==0.63.0 and uvicorn==0.13.3, h11==0.12.0 on Debian10:
app_1  | INFO:     <IP_ADDRESS>:52908 - "DELETE /api/v1/users/user/2/ HTTP/1.1" 204 No Content
app_1  | ERROR:    Exception in ASGI application
app_1  | Traceback (most recent call last):
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 394, in run_asgi
app_1  |     result = await app(self.scope, self.receive, self.send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
app_1  |     return await self.app(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 199, in __call__
app_1  |     await super().__call__(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 111, in __call__
app_1  |     await self.middleware_stack(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
app_1  |     raise exc from None
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
app_1  |     await self.app(scope, receive, _send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 86, in __call__
app_1  |     await self.simple_response(scope, receive, send, request_headers=headers)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 142, in simple_response
app_1  |     await self.app(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 26, in __call__
app_1  |     await response(scope, receive, send)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/responses.py", line 228, in __call__
app_1  |     await run_until_first_complete(
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/concurrency.py", line 18, in run_until_first_complete
app_1  |     [task.result() for task in done]
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/concurrency.py", line 18, in <listcomp>
app_1  |     [task.result() for task in done]
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/responses.py", line 223, in stream_response
app_1  |     await send({"type": "http.response.body", "body": chunk, "more_body": True})
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/cors.py", line 148, in send
app_1  |     await send(message)
app_1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 156, in _send
app_1  |     await send(message)
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 487, in send
app_1  |     output = self.conn.send(event)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_connection.py", line 468, in send
app_1  |     data_list = self.send_with_data_passthrough(event)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_connection.py", line 501, in send_with_data_passthrough
app_1  |     writer(event, data_list.append)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_writers.py", line 58, in __call__
app_1  |     self.send_data(event.data, write)
app_1  |   File "/usr/local/lib/python3.9/site-packages/h11/_writers.py", line 78, in send_data
app_1  |     raise LocalProtocolError("Too much data for declared Content-Length")
app_1  | h11._util.LocalProtocolError: Too much data for declared Content-Length

This helped, just use: response_class=Response
example:
from fastapi import Path, Response

...

@router_v1.delete('/user/{id}/', status_code=204, response_class=Response)
async def delete_user(id: int = Path(..., gt=0)) -> None:
    await UserService.delete(id)

...

Just to mention, I had no issues previously on versions fastapi==0.54.1, uvicorn==0.11.3, h11==0.9.0 (Ubuntu 20.04, python3.8)

the easiest way:
response = JSONResponse()
response.status_code = 204
response.body = b''
return response

the easiest way:

I think the best way to handle this is @georgealar solution: (aka setting response_class=Response in the decorator)
@router_v1.delete('/user/{id}/', status_code=204, response_class=Response)
async def delete_user(id: int = Path(..., gt=0)) -> None:
    await UserService.delete(id)

the easiest way:

I think the best way to handle this is @georgealar solution: (aka setting response_class=Response in the decorator)
@router_v1.delete('/user/{id}/', status_code=204, response_class=Response)
async def delete_user(id: int = Path(..., gt=0)) -> None:
    await UserService.delete(id)

When I do this for a PUT request, I get the following error:
pydantic.error_wrappers.ValidationError: 1 validation error for Response
description
  field required (type=value_error.missing)

That says your response model has the description field defined and it's not being set.

That says your response model has the description field defined and it's not being set.

@dmig-alarstudios Thanks! I had defined the decorator like @georgealar (using the response_class parameter, 204 status,  and no description). I tried adding the description parameter to the annotation and now I'm seeing the h11._util.LocalProtocolError: Too much data for declared Content-Length error again.

@robmoore and anyone who sees this in the future.
I think the issue you were having is one I also ran into. I was apparently importing this from starlette.responses import Response instead of from fastapi.responses import Response
This solved my issue, anyways.

Instead of returning None, and instead of injecting the response, just return a newly created response. It would look like:
@api.get(
    "/test_request_results/{test_request_id}",
    response_model=schemas.TestRequestResults,
    responses={204: {"model": None}},
)
async def read_test_request_results(test_request_id: int):
    # ... snipped ...
    if not complete:
        return Response(status_code=HTTP_204_NO_CONTENT)

The reason you are getting content is because FastAPI uses a JSONResponse by default (instead of a Response), which converts the returned value None to "null". By returning a Response directly, you prevent FastAPI from using the JSONResponse and encoding the None.

and how can I add a message to that Response?

@robmoore and anyone who sees this in the future.
I think the issue you were having is one I also ran into. I was apparently importing this from starlette.responses import Response instead of from fastapi.responses import Response
This solved my issue, anyways.

Well in fact in version 0.75.1 you must use Response form "fastapi".
from fastapi import Response
Which in turn seems to import it from starlette.responses or something like that. By default Pycharm importe it from "fastapi.openapi" and that one did not work.

Instead of returning None, and instead of injecting the response, just return a newly created response. It would look like:
@api.get(
    "/test_request_results/{test_request_id}",
    response_model=schemas.TestRequestResults,
    responses={204: {"model": None}},
)
async def read_test_request_results(test_request_id: int):
    # ... snipped ...
    if not complete:
        return Response(status_code=HTTP_204_NO_CONTENT)

The reason you are getting content is because FastAPI uses a JSONResponse by default (instead of a Response), which converts the returned value None to "null". By returning a Response directly, you prevent FastAPI from using the JSONResponse and encoding the None.

and how can I add a message to that Response?

Well, that's the whole idea with 204: you shouldn't. If you want to add a message to a Response, just return status code 200 and the message in JSON or whatever.


[5.0][stdlib] Support throwing yields in all _modify accessors

This cherry picks the following PRs to the 5.0 branch:
https://github.com/apple/swift/pull/20918 -- [stdlib] Refactor Dictionary.subscript._modify for better layering
https://github.com/apple/swift/pull/21045 -- [stdlib] Dictionary: Support throwing yields in _modify accessors
(The first one isn't strictly necessary, but including it prevented a conflict and lets the two branches remain in sync.)
rdar://problem/46489668

@swift-ci test

@swift-ci benchmark

Build comment file:
Performance: -Onone

TEST
OLD
NEW
DELTA
RATIO

Regression

ExclusivityIndependent
73
83
+13.7%
0.88x

How to read the data
The tables contain differences in performance which are larger than 8% and
differences in code size which are larger than 1%.
If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.
Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

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


Create jquery.age.min.js

Reduced size by using Closure Compiler (default settings).

@thekondrashov Thanks for minimizing but if this isn't integrated into the Cakefile it won't be maintained. Is it possible to look into minimizing as part of the build process?


Does not compile under freebsd 11.2 i386 (clang)

http://matrix.cpantesters.org/?dist=CSS-Sass+3.4.12
Might also be related to some other build failures.
It looks like clang (linking) could be the real culprit.
Reproducable via FreeBSD VM:
pkg install wget
pkg install perl5
wget css-sass.tgz
tar xzf css-sass.tgz
perl Makefile.PL
make

Fixed via https://github.com/sass/perl-libsass/commit/de07e74d755c9c4f826dd5a7d5a95f4d0bf8c34d


Upgrade react-native-windows to 0.63.11

This should fix the failing Windows CI.

There might be some work in going from 0.62 to 0.63. Consider just updating to the latest patch version of 0.62 if you want to fix CI issues building.
cc @jonthysell in case the auto-linking errors for webview are interesting.

Downgraded to<EMAIL_ADDRESS>We should figure out why 0.63.x doesn't work; don't want to fall too far behind on that.

Hi guys, any plan about when to merge this and upgrade to 0.63.x?
Thanks for the nice work.

Hi guys, any plan about when to merge this and upgrade to 0.63.x?
Thanks for the nice work.


Properties are no longer updating in template in latest versions

Is anyone else having issues with their data properties not updating in the template when changing them via a method? In vue devtools I can see they update fine, but never update in the template, they always remain the default value they were set in data

Hi there!
Thanks for filing the issue 😄 . Please follow the Issue Reporting Guidelines and provide a minimal JSFiddle or JSBin containing a set of reproducible steps that can lead to the behaviour you described, this would help us a lot 😉


Firmware version for D415

Hi,
Can anyone please let me know what is the significance of "recommended_firmware_version" key. Is it showing the latest firmware version available ?
Also what is the difference between "asic_serial_number" and "serial_number".

@itachi134999 hello,
The 'recommended firmware version' is the minimal stable version that delivers the set of capabilities advertised in the associated Librealsense release. Using firmware version older than this one may result in missing functionality and or being affected by the known issues.
The "ASIC serial number is the one assigned to the main board and also the one that is reported via "lsusb .. " call on Linux.
The "Serial number" attribute is the number assigned to the camera's optical module.


Snapshot Tests not Creating Xcode Groups

I'm not sure if it would even be possible, but currently, whenever tests are run and recorded, directories are created but not Xcode groups. Would it be possible to create them so that __Snapshots__ and the content within are visible directly in Xcode?
To Reproduce

Record snapshots
Observe that the snapshot recordings aren't visible from the Xcode navigator

Expected behavior

Record snapshots
Observe that the snapshot recordings are visible from the Xcode navigator

Hi @nikitaame, sorry but this is not really feasible. We do not want to make edits to the Xcode project file from the library. That can cause Xcode to crash and corrupt the project file. If you put your tests in an SPM package then this will work automatically.
Also since this is not an issue with the library but rather a feature request, I am going to move it to a discussion. Feel free to continue the discussion there.


Understanding implicit error message

I'm currently trying to use F*'s implicit parameters, and ran
into an error that I don't understand. The simplified code I have is:
module Incr

type sint (n:int) =
  | SInt : x:int{x = n} -> sint n

val sincr : #n:int -> f:(int -> sint n) -> sint (n + 1)
let sincr #n f = match (f 0) with
  | SInt x -> SInt (x + 1)

val stest1 : sint 11
let stest1 = sincr (fun x -> SInt 10)

I get the error message:
Incr(11,29-11,33): (Error 66) Failed to resolve implicit argument ?6 of type Prims.int introduced for flex-flex quasi:	lhs=Instantiating implicit argument in application	rhs=Instantiating implicit argument in application (see also Incr(11,29-11,36))

My guess is that this is related to higher-order unification failing, but I'm wondering what is failing/what the error means?
If I give the lambda term a type:
val foo : int -> sint 10
let foo x = SInt 10

val stest2 : sint 11
let stest2 = sincr foo

then everything goes through, (why I think that this is related to a combination of inference and implicit instantiation).

Two things are being combined here for inference to fail.
Your sincr application needs to return an sint 11, so F* infers that ?n + 1 has to be 11, where ?n is the implicit for sincr. Notably this does not get simplified to ?n = 10. This is only true since + has an inverse, but the unifier it has no special treatment of + for this.[1]
Now, the body of the abstraction, SInt 10 has to be at type sint ?n. One can certainly expect this will unify n to 10, but that information comes only from a refinement type, namely the fact that 10 must have type x:int{x = ?n}. F* will not use this information for inference, however, hence the failure. (This would also require some primitive treatment on equality, since this could very well <= instead.)
I'm not confident this style of constraining via refinements will scale up well, but there's a neat way of fixing your problem here. Define sincr instead as:
val sincr : #n:pos -> f:(int -> sint (n-1)) -> sint n
let sincr #n f = match (f 0) with
  | SInt x -> SInt (x + 1)

This makes inference behave better backwards, since n will be fully unified with the expected type instead of just having a ?n + 1 = ?expected_n constraint. Not sure F* can do better in general here, but others might know better.
[1] This would instead work well if one were using a unary representation of naturals, as is common in Coq, and one wrote S n for the return type.

Thanks!


Normalize.css + cleanup

Some arguments for switching to normalize:

https://stackoverflow.com/a/8357635
http://nicolasgallagher.com/about-normalize-css/

Most of it looks good. Again I'm not sure about removing the 10px but I can give it a try I guess.

Most of it looks good. Again I'm not sure about removing the 10px but I can give it a try I guess.

I feel the same way about the font-size. Whats the purpose though?

Having 10px as the base kinda messes up things if they are totally unstyled. Eg if there is text outside of a <p />. Since the designs we'll have to implement will follow the 8pt grid I think it makes sense to have that as the base. However I don't feel too strongly about it and can revert if you want to.

Yes I agree with what you say… It's quite contradictory to set the html font size to 10px if we're using normalize…
We can give it a try and go back if needed.

I thought I answered, but yes, I guess we should give it a try without 10px on the html+using normalize


How?

hola guapos 7u7
how to do when a player with specific ip, enter in the game this automatic get a user role?
my english is bad :v

idk but this is a really good idea !!

maybe if u change the local ip to their ip and then ?

Two functions than you can need:
In playerTracker object:
userRole
socket.remoteAddress

You will need to add individual roles and ip's.
Or you can use userRoles JSON object:
https://github.com/Megabyte918/MultiOgar-Edited/blob/master/src/enum/userRoles.json
And simple, when you want to add anyone rol to one ip, just put new line in JSON and in the object from gameServer (https://github.com/Megabyte918/MultiOgar-Edited/blob/master/src/GameServer.js#L152)

@pabloalber84 i don't understand anything XD

@imnotNxhz1 First learn how to script in nodejs/javascript, next see my response.

#Savage

@imnotNxhz1 Try replacing your JoinGame function in PlayerTracker.js to this:
PlayerTracker.prototype.joinGame = function(name, skin) {
    if (this.cells.length) return;

    if (skin) this.setSkin(skin);
    if (!name) name = "An unnamed cell";
    var UserRoleEnum = require("./enum/UserRoleEnum");
if (this.PID == "specific ID")
this.userRole = UserRoleEnum.ADMIN; // < replace admin with whatever role you want
    this.setName(name);
    this.spectate = false;
    this.freeRoam = false;
    this.spectateTarget = null;
    var packetHandler = this.socket.packetHandler;

Or do what @pabloalber84, but my method is easier and clearer.

Any more questions, feel free to ask me! (make sure you tag me though lol)

https://github.com/Megabyte918/MultiOgar-Edited/commit/7e248f093b6fc8c37dd785c4f15417255d9f1608
https://github.com/Megabyte918/MultiOgar-Edited/commit/16f75ee09d49340809019e7e486c4672d5037bf6
https://github.com/Megabyte918/MultiOgar-Edited/commit/055affe1c7d6cac7ff9cbf294e35851a9e29c349
:)
I dont tested :baby:

@MastaCoder @Megabyte918 @FantasyIsBae
No response.

thanks :100:  @pabloalber84  @AlexHGaming


Suddenly VS Code is running too slow and lagging a lot

Type: Performance Issue
On Startup It started loading slow.
Commands in terminal too slow as well.
VS Code version: Code 1.91.0 (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:52:22.949Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 2304)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
15.76GB (5.93GB free)

Process Argv
--crash-reporter-id 3e5279b2-a9db-46e4-b348-e75bae046fd9

Screen Reader
no

VM
0%

Process Info
CPU %	Mem MB	   PID	Process
    1	   132	 16428	code main
    0	    73	  1876	   crashpad-handler
    0	   148	  3664	extensionHost [1]
    0	   128	  1812	     electron-nodejs (tsserver.js )
    3	   325	 10928	     electron-nodejs (tsserver.js )
    0	   101	  3960	       electron-nodejs (typingsInstaller.js typesMap.js )
    0	   171	 16664	     electron-nodejs (eslintServer.js )
    1	   223	 11268	   gpu-process
    2	   104	 12932	ptyHost
    0	     5	 11988	     "C:\Program Files\Git\bin\bash.exe" --init-file "c:\Users\ASrivastava2\AppData\Local\Programs\Microsoft VS Code\resources\app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"
    1	    11	 15856	       "C:\Program Files\Git\bin\..\usr\bin\bash.exe" --init-file "c:\Users\ASrivastava2\AppData\Local\Programs\Microsoft VS Code\resources\app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"
    0	     5	 14992	     "C:\Program Files\Git\bin\bash.exe" --init-file "c:\Users\ASrivastava2\AppData\Local\Programs\Microsoft VS Code\resources\app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"
    0	    12	 10816	       "C:\Program Files\Git\bin\..\usr\bin\bash.exe" --init-file "c:\Users\ASrivastava2\AppData\Local\Programs\Microsoft VS Code\resources\app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"
    0	     9	 18288	         "C:\Program Files\Git\bin\..\usr\bin\bash.exe" --init-file "c:\Users\ASrivastava2\AppData\Local\Programs\Microsoft VS Code\resources\app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"
    0	     8	   316	           "C:\Program Files\Git\mingw64\bin\git.exe" pull
    0	     8	 19880
    0	   105	 20800
    0	     7	 15644	     conpty-agent
    0	     7	 16556	     conpty-agent
    0	    81	 13304	   utility-network-service
    0	   124	 13960	shared-process
    2	   124	 15244	fileWatcher [1]
    0	   105	 15432	window [3] (Issue Reporter)
    4	   265	 16656	window [1] (useTimelineBar.tsx - threat-intel-ui - Visual Studio Code)

Workspace Info
|  Window (useTimelineBar.tsx - threat-intel-ui - Visual Studio Code)
|    Folder (threat-intel-ui): 930 files
|      File types: tsx(255) html(241) snap(51) ts(42) yaml(12) js(6) json(6)
|                  png(4) md(3) svg(3)
|      Conf files: dockerfile(2) settings.json(1) makefile(1) package.json(1)
|                  tsconfig.json(1);

Extensions (4)

Extension
Author (truncated)
Version

vscode-eslint
dba
3.0.10

prettier-vscode
esb
10.4.0

dotenv
mik
1.0.1

python
ms-
2024.8.1

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:31067544
chatpanelt:31048053
dsvsc021:30996838
da93g388:31013173
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
2f103344:31071589
legacy_priority:31082724

I seem to have the same problem..

I also seem to have issues with git frezing up although its a fairly small project and only a single file was modified.. sometime reload of window works, sometime I have to reload the whole system for it to work a liitle again, but it seems to only work for a small period of time..
Its just stuck like this:

it started with last update of vscode..

Please see https://github.com/Microsoft/vscode/wiki/Performance-Issues for creating actionable performance problem issues.
/label info-needed

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Nyc not producing any coverage info on Jenkins (RHEL) build server, works fine on Mac OS & Ubuntu

Expected Behavior
I recently tried to integrate Nyc coverage reports into the build process of one of our apps. It works perfectly fine on my local Mac OS dev machine:
$ nyc mocha src/test/javascript/**/*.spec.js
Generates coverage report as expected (All files |    90.79 |    60.29 |    83.12 |    90.79 |, and so on... ).
Observed Behavior
However, I am unable to get Nyc to produce any coverage information on our build server (running Red Hat Enterprise Linux 7.2). The tests are executed just fine, but the output of nyc itself is just an empty list (All files |  Unknown  |  Unknown |  Unknown |  Unknown |).
I set up a vagrant box running Ubuntu 14.04 LTS and built the same project, and it worked fine (just as on my Macbook itself).
I figured it might be an issue with the project itself, so I also integrated Nyc into the build process of another project (which does not use anything fancy like Babel), but the result was the same: Works on MacOS & Ubuntu, does not work on RHEL.
Bonus Points! Code (or Repository) that Reproduces Issue
The only difference between environments that i can think of is the OS, as mentioned above. Is there some kind of a "verbose" switch I can use to try to collect some more information?
Forensic Information
Operating System:
$ cat /etc/*-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.2 (Maipo)"
Environment Information:
$ node -v
v6.9.1
$ npm -v
4.0.3
$ npm ls
...
├─┬<EMAIL_ADDRESS>...
Node, Npm and Nyc versions are the same on all three OS that I tried (RHEL, Mac OS, Ubuntu).

@wicked539 sorry for the slow reply; have had somewhat of a backlog of issues that we're working through.
We use the npm module os-homedir to store temporary runtime information for nyc; I recommend checking the folder that it returns in the RHEL environment, and checking whether the npm bin would have write permission to it.

Thanks for your reply!
I added a pre-build shell script to my jenkins job:
touch $(target/node/node -e "const osHomedir = require('os-homedir');console.log(osHomedir());")/foo.txt
ls -lah $(target/node/node -e "const osHomedir = require('os-homedir');console.log(osHomedir());")/foo.txt
And in the build's output, it shows that the file was created successfully:
-rw-r--r-- 1 jenkins_zoe jenkins_zoe 0 May 17 09:04 /home/jenkins_zoe/foo.txt
So yes, the user running the build does have write permissions to that folder.

@wicked539 what version of RHEL are you running? also out of curiosity, do you have a RHEL instance you can try manually running the tests on, rather than having to kick of  a Jenkins build each time.

@bcoe as stated above, we're running RHEL 7.2. Also, the result is the same when i run the build manually (by logging into the server).

Was the reason for this ever found? I stumbled upon it as well.

If this is still an issue with the latest version of nyc, please open a new issue with a link to a minimal reproduction repo.


[$1000] Violations are not shown as approver

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.41-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1707848268463619
Action Performed:

Go to OldDot staging.expensify.com and open or create a Collect policy
Make tags required for the policy

Go to Settings > [Workspace] > Tags
Enable "People must tag expenses"
Add a tag

Set violations for category as to be required
Go to the policy page
In the JS console with the policy open do:

p = Policy.getCurrent();
p.policy.isPolicyExpenseChatEnabled = "true";
p.save();

Invite a user to the policy as employee
As an employee sign in to the NewDot, create a expense report without category and tag set
Open the report as approver logged in to NewDot

Expected Result:
Error message for violations are shown
Actual Result:
Not seeing violations as approver
Workaround:
unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01ebca0f5b1a041068
Upwork Job ID:<PHONE_NUMBER>287419392
Last Price Increase: 2024-02-22

Proposal
Please re-state the problem that we are trying to solve in this issue.
Approvers are not seeing the expected error messages for violation of expense report policies, specifically when category and tag settings are required but not set by the employee on the report.
What is the root cause of that problem?
The root cause may involve the policy enforcement logic within the approver's view. It appears the validation checks that trigger error messages for missing categories or tags are not executing correctly, or the UI is not displaying the results of these checks as it should.
What changes do you think we should make in order to solve the problem?

Review the expense report validation flow to ensure that the checks for required fields are triggered when an approver reviews a report.
Update the UI components responsible for displaying the error messages to approvers to ensure they are activated correctly when violations are detected.
Ensure that the state management for the report correctly reflects the presence of violations and binds this state to the UI elements for error message display.
Conduct tests on all supported platforms to ensure that upon opening a report with set violations, the approver is presented with the appropriate error messages.

What alternative solutions did you explore? (Optional)

An alternative solution could be to implement a pre-approval validation step, prompting the employee to correct the violations before submission to the approver. However, this may not be desirable as it shifts the responsibility from the approver to the employee.

@cead22 is this something you're planning on working on yourself, or is this something that contributors can tackle?

Contributors can tackle it, I just assigned myself so I can be the reviewer of the PR since I've been leading violations and am familiar with the coe

Sweet - OK, awaiting proposals.

Was going to update my proposal here, but I am having a really hard time reproducing this issue. I'm not able to see this details request screen in ND. I'm also not able to access any workspace that supports tags inside of ND. There's no way to view a workspace other than free workspace in ND in prod right now. I don't think this is an urgent issue but maybe thats just me

Posted for help in the #qa channel

I have edited the OP. Please check if this helps.

Thanks @kavimuru!

No full proposals after a week, let's increase the bounty

Updated Proposal
Problem Statement
Approvers are not seeing the expected error messages for violation of expense report policies, specifically when category and tag settings are required but not set by the employee on the report.
Root Cause
The root cause of the problem is that the getErrorForField function, which is responsible for determining and displaying error messages for field violations, does not include checks for category and tag violations. As a result, even when these fields are required by the policy and left unset by the employee, no error messages are displayed to the approver.
https://github.com/Expensify/App/blob/d33bf6e0454fae9550422da28b0407f01b23c969/src/components/ReportActionItem/MoneyRequestView.tsx#L204
Proposed Changes

Update getErrorForField Function: Modify getErrorForField function to include checks for category and tag violations. This will ensure that error messages are displayed for these fields when they are required by the policy but not set by the employee.

Ensure Correct Dependency Handling: Update the dependency array of the useCallback hook for the getErrorForField function to include transactionCategory and transactionTag. This will ensure that the function updates correctly when these values change.

const getErrorForField = useCallback(
    (field: ViolationField, data?: OnyxTypes.TransactionViolation['data']) => {
        // Checks applied when creating a new money request
        // NOTE: receipt field can return multiple violations, so we need to handle it separately
        const fieldChecks: Partial<Record<ViolationField, {isError: boolean; translationPath: TranslationPaths}>> = {
            amount: {
                isError: transactionAmount === 0,
                translationPath: 'common.error.enterAmount',
            },
            merchant: {
                isError: !isSettled && !isCancelled && isPolicyExpenseChat && isEmptyMerchant,
                translationPath: 'common.error.enterMerchant',
            },
            date: {
                isError: transactionDate === '',
                translationPath: 'common.error.enterDate',
            },
            category: {
                isError: !transactionCategory,
                translationPath: 'common.error.selectCategory',
            },
            tag: {
                isError: !transactionTag,
                translationPath: 'common.error.selectTag',
            },
        };

        // .. code is the same
    },
    [transactionAmount, isSettled, isCancelled, isPolicyExpenseChat, isEmptyMerchant, transactionDate, transactionCategory, transactionTag, hasErrors, canUseViolations, hasViolations, translate, getViolationsForField],
);

This https://github.com/Expensify/App/pull/36821/ might fix this.

@Tony-MK that PR addresses MoneyRequestPreview. This ticket root cause is related to MoneyRequestView

Still working on it

It will

Is this still reproducible?

Asked QA to retest in Slack

QA are still able to reproduce @cead22
https://github.com/Expensify/App/assets/38236554/51a99e3d-d9e9-463c-be36-3a07ac5152d7

Thanks, I think I found the bug

There are two things happening here:

We're not returning transaction violations for anyone other than the user that made the request in OpenReport
We don't push transaction violations to all the relevant users from the RequestMoney API command

I'll fix 1. for this issue, and 2. as part of https://github.com/Expensify/App/issues/37013

PR submitted for item number 1. above

PR submitted for item number 2. above

Nice! With both of those merged and on production, can we close this issue now?

Yup!


TGG Runtime Testing

[x] System boot up, eth training, reset
[x] Try out CPP unit tests on all chips
[ ] Tweak multi device APIs if needed
[ ] Running models

Currently, we have one TGG for development <IP_ADDRESS>
Another TGG has module issues <IP_ADDRESS>:
https://github.com/tenstorrent/cloud/issues/2850#issuecomment-2260982571


[1.6] 'istioctl verify-install' reports 'Checked 0 custom resource definitions'

istioctl verify-install is not checking the Istio Installation.  It reports
Checked 0 custom resource definitions
Checked 0 Istio Deployments
No Istio installation found

According to my library of old istioctl versions, 1.6.0-rc.1 has this problem, 1.6.0-alpha.1 did not.  See also https://github.com/istio/istio/issues/26265
The problem, in this case, is that I had the IstioOperator from https://github.com/istio/istio/issues/25830#issuecomment-663568679 installed on my cluster for debugging.  The behavior is somewhat correct ... it does report that it found 0 Istios and sets $? to 1.  The problem is that it makes no sense to the user.  A second problem is that it does not report that there are two IstioOperators for the same Revision, ""

Re-opening.  The problem here is the message.  It is not sufficient for further troubleshooting.  Using the IOP from https://github.com/istio/istio/issues/25848 I see this message, even though I have an Istio install.


Migrate package to null-safety

First of all thanks so much for creating this package. Working with iOS 14 widgets is so much faster without having to write all the boilerplate for reloading timelines or setting NSDefault values on the native side.
I ran the migration tool for null-safety and this is what it came up with(the changes are really minimal because it doesn't depend on anything in pubspec.yaml).
One thing I'm not really sure about is restricting the flutter version to >=2.0.0 under environment in pubspec.yaml. I checked a few other packages and some seem to make the restriction while others don't.

/cc @tomLadder

Why is the pubspec.lock the only proposed merge? Shouldn't we update the pubspec.yaml?
It would be awesome to have this PR reviewed and merged!

I just noticed the migration tool changed removeItem to returnbool? instead of a bool. It'd probably be better if it wasn't null-able. I'll fix this if the author agrees it's better. 👍
I checked a couple of the packages in https://github.com/flutter/plugins/tree/master/packages and they all seem to have their Flutter environment constraints set to flutter: ">=1.12.13+hotfix.5" so maybe there's no need to raise that constraint after all.

Hi @ThrowJojo, thanks for the contribution! I also think it would be better if it's not null-able. To be honest I'm not really sure about the version increase. Maybe someone has more experience than me in this regard.

I agree there shouldn't be a need to raise the constraint, and looking at the code it is safe to make removeItem return a bool, @ThrowJojo are you working on the fix? Otherwise, I'm available too

@dancamdev Yeah I'm on it, I think it's done I'm just going to try using my fork with my project to check everything is in order again. 👍

Okay everything seems to be working 👍
I think leaving the constraints as they are is the right course. I tried a couple of different combinations and I think if the constraints are left how they are people who have upgraded to Flutter 2.x.x but haven't turned on null-safety yet will still be able to use the latest (null-safety) version of the package.
If any body has a spare couple of minutes, could somebody try running the example app on a simulator and making sure it works okay with the widget? I got an m1 this week and I can run the example app on the simulator but the widget isn't showing up for some reason 😂. My project has the same issue but I could at least test that on a physical device(code-signing etc.). It should work fine because I had no issues with the project depending on my fork.
/cc @tomLadder

@ThrowJojo I'm testing on a non-M1 Macbook, I'll let you know in a minute

It's working perfectly!
cc. @tomLadder

Thanks for checking! Was almost gonna bust out my 15-inch Macbook Pro™.

Sorry it took me a bit, I was really busy in the last few days, it would be great to see this one merged now 🙌

Sorry it took me a bit, I was really busy in the last few days, it would be great to see this one merged now 🙌

Now it looks great 👍🏼 this is ready for release null-safety and not only pre-release null-safety.
LGTM

Just published v1.0.3 🚀
Thank you all for the contribution!

Awesome, Thank you @tomLadder, and thank you @ThrowJojo for the hard work!

Thanks for merging this and pushing a new release @tomLadder! Thank you too @dancamdev and @Ahmadre for checking everything. 🚀


Use one central typescript configuration

Thanks!
Why not sharing types root as well?

@DxCx I think every path that is defined in each config, is relative to that config's directory.
It means that if I put typesRoot in the central config, it won't see those @types/* in each packages/*/node_modules/@types/.

Alright thanks!


Add 100% test coverage

Add tests for Bag.Get and failing conditions of New bag:
go test -cover
PASS
coverage: 100.0% of statements
ok      github.com/luizbranco/querybag  0.003s

Thanks for the contributions :). Awesome!

Fixed :)


Showing child view

Hi
I have one question, how i can display sometimes only child view? (like ParentItem, ParentItem, ChildItem, ParentItem...).
I try in ItemCellParentViewHolder return child view but this way i make a lot of problems.
Is it possible?
Ty
Luka

Hi @lukachuuu,
We don't currently have the ability to show a parentless child easily. You could extend the adapter and extend onBindViewHolder and onCreateViewHolder and getItemViewType to return a third type of view and handle that before calling super.
Will having multiple parent view types make this simpler for you (considering this for a future release)?

I have a lot of similarities between parent and child view, then I in  onBindParentViewHolder method checking if parentItem have child. If have child show dropdown button if haven't don't show. This solution is very amiss but is working.
I will try to create third type of view and return before call super method. This solution sounds simple.
Thank you for your response. L


Create aryannargotra

Notes for Reviewers
This PR fixes #
Signed commits

[ ] Yes, I signed my commits.

🚀 Preview for commit 8d31ae4cf6926463a225355a3ff81caac1743aad at: https://6707d65175854f2ebacb49f7--meshery-docs-preview.netlify.app


Having chained fk in list_editable always triggers "You have unsaved changes..." message when trying to execute admin action

And I don't mean after changing something - simply opening a list view that enables editing a chained fk and trying to execute any action shows this message. From a breif time I spent investigating (I'm using mostly android tablet and therefore have no sensible way of debugging javascript live) I've found that the creation/refresh of a chained FK field triggers django's "changed" flag which doesn't check if the value really changed.

@mkaluza it might have to do with #95 , I found this error while using smart-selects with django-suit which has a modify checker on unload.

nope. it's this https://github.com/gbonvehi/django-smart-selects/blob/master/smart_selects/widgets.py#L148
and it's fixed with this https://github.com/mkaluza/django-smart-selects/commit/2820c7590c6f757c412cad3986466e82bfcacb62
by the way - your external js stuff is great - imho it's the way to go!  I've added a few things:
https://github.com/mkaluza/django-smart-selects/commits/js-external-with-inline
only one is missing right now (issue #92) which I have solved here https://github.com/mkaluza/django-smart-selects/commit/39c8747161d6abd7b8161542f69ef49ab0bd56c4 but haven't ported to your branch yet. Once I did it - I switch and vote for merging your branch upstream

@mkaluza thanks! I've just created the pull request, if it's merged we can then improve it there. Hope it is as chained within inlines is really helpful

This should be fixed when b074ebb334c32c1f535a9134a05798b80d4d773c is tested and merged into master.

I just released version 1.2.6 to PyPI and it should fix this. Please test and reopen this issue if it still happens. Thanks!


Use .net 6 json source generators for performance

https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/
Benchmarks show 30-40% faster serialization performance.

Would this require a version bump of .NET 5 to .NET 6?

The main branch is actually behind. On Release 2.3 net 6 is the lowest version so this should be doable now. I think it mostly requires jut adding annotations to the correct objects - there's two different ways that the objects get serialized - either for JSON format output (though sarif is recommended and I don't think this would help in that respect as the sarif SDK uses newtonsoft rather than System.Text.JSON) and for the internal serialization used to store collected data in the sqlite database. For the second aspect I think the things that need to be annotated are the things that inherit from Collect/Compare objects. I think this also requires updating the JsonUtils helper to use System.Text.Json instead of Newtonsoft to actually take advantage of the perf uplift.
https://github.com/microsoft/AttackSurfaceAnalyzer/blob/ff468b93c28d91b0f3f70bed122038656623540b/Lib/Objects/CollectObject.cs#L12
https://github.com/microsoft/AttackSurfaceAnalyzer/blob/ff468b93c28d91b0f3f70bed122038656623540b/Lib/Utils/JsonUtils.cs#L38

Something that I discovered that is necessary to complete this in a semi similar fashion with the Dehydration of CollectObjects is https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism?pivots=dotnet-8-0 this feature set is not supported in .NET 6 and I had to remove the .NET 6 support to test out the feature.
After removing the .NET 6 support I am receiving this error even on the derived class of CertificateObject.
System.NotSupportedException: Deserialization of types without a parameterless constructor, a singular parameterized constructor, or a parameterized constructor annotated with 'JsonConstructorAttribute' is not supported. Type 'Microsoft.CST.AttackSurfaceAnalyzer.Objects.SerializableCertificate'. Path: $.Certificate | LineNumber: 0 | BytePositionInLine: 31. ---> System.NotSupportedException: Deserialization of types without a parameterless constructor, a singular parameterized constructor, or a parameterized constructor annotated with 'JsonConstructorAttribute' is not supported. Type 'Microsoft.CST.AttackSurfaceAnalyzer.Objects.SerializableCertificate'.

Is this still something you want to proceed with?

For the first issue, I might need to get back to you on removing net 6 support - since NET 8 is the new LTS that may be possible to switch to Net 8 only (which also may allow some new language features).
For the second issue, I think the issue may be both Newtonsoft and System.Text.Json use [JsonConstructor] as the name of the attribute to specify a specific parameterized constructor for serialization (From this table it looks like they used the same name for the tag: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-9-0#specify-constructor-to-use-when-deserializing) - I hypothesize it may be the case that  SerializedCertificate is importing newtonsoft rather than system.text.json, so when it gets to try to serialize the SerializableCertificateObject it won't recognize the attribute and thus can't determine what constructor to us?

I can have a look into this pretty soon maybe tonight or this weekend. Let me double check the namespace.

So I annotated and replaced all of the serialization and deserialization in JsonUtil and got the hydration test suite to pass with green lights.
I will slowly pick away at the rest of the application.
Do we want to completely uninstall Newtonsoft as a dependency since this switch over to System.Text.Json is happening?

Sorry about the multiple replies. I realized this morning I misread your
question. To continue supporting .NET 6 there is a way to serialize derived
classes that should work across 6, 7, and 8 that might be a good idea to
proceed with. It’s the .NET 6 version. I would have to refactor some code I
did last night to fix that.
Either way please do let me know what the suggestion is to move forward.
On Thu, May 30, 2024 at 3:36 PM Gabe Stocco @.***>
wrote:

For the first issue, I might need to get back to you on removing net 6
support - since NET 8 is the new LTS that may be possible to switch to Net
8 only (which also may allow some new language features).
For the second issue, I think the issue may be both Newtonsoft and
System.Text.Json use [JsonConstructor] as the name of the attribute to
specify a specific parameterized constructor for serialization (From this
table it looks like they used the same name for the tag:
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-9-0#specify-constructor-to-use-when-deserializing)

I hypothesize it may be the case that SerializedCertificate is
importing newtonsoft rather than system.text.json, so when it gets to try
to serialize the SerializableCertificateObject it won't recognize the
attribute and thus can't determine what constructor to us?

—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/AttackSurfaceAnalyzer/issues/625#issuecomment-2140744214,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BEG2SNEZ6PYZ6T6NI6G2O63ZE55U3AVCNFSM5KQ4PU5KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJUGA3TINBSGE2A
.
You are receiving this because you commented.Message ID:
@.***>

Do we want to completely uninstall Newtonsoft as a dependency since this switch over to System.Text.Json is happening?

I think the goal ideally is to migrate all the direct ASA code to use System.Text.Json, though, it can't be eliminated as a transitive dependency because its required by the Sarif SDK.

Also what about some of these JsonSeralization/Deseralization methods that are taking options? I am importing the System.Text.Json one and it seems like lots of these options don't exist.

Do you mean like the Should Serialize methods like this one? https://github.com/microsoft/AttackSurfaceAnalyzer/blob/ff468b93c28d91b0f3f70bed122038656623540b/Lib/Objects/CompareResult.cs#L96
There is an alternate way to have custom logic but only on NET 7+. https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/custom-contracts
I think we do want to keep the behavior that empty fields aren't serialized if possible, it saves a fair few bytes, it looks like for .NET 6 it is possible to not serialize default values, which is likely the first thing to try.  If there's other places in particular you're concerned about not having an equivalent option and you can point them out I may be above to advise more explicitly how I'd prefer to handle them.

To continue supporting .NET 6 there is a way to serialize derived
classes that should work across 6, 7, and 8 that might be a good idea to
proceed with.

That sounds great, if it can work across all the currently supported frameworks that's I think simpler to merge, but its not I think a hard requirement as there's only a couple months of support left for .NET 6/7 anyway.

I was mostly referring to the Serializer settings that are accpected as a parameter to the JsonSerializer for Newtonsoft like the following in WriteMonitorJson.
JsonSerializer serializer = JsonSerializer.Create(new JsonSerializerSettings()
{
    Formatting = Formatting.Indented,
    NullValueHandling = NullValueHandling.Ignore,
    DefaultValueHandling = DefaultValueHandling.Ignore,
    Converters = new List<JsonConverter>() { new StringEnumConverter() }
});

I think it would be good to preserve similar functionality with system text.json ahen possible. I think there are equivalent settings for each of those in the link I sent above for converting from newtonsoft to system.text..

Perhaps I'm a little out of depth with that task at hand to convert these over, but I am not seeing the same name properties within JsonSerializerOptions as JsonSerializerSettings.

@WingZer0o That's okay then, I can handle putting those back when you put up a PR to review if you want to skip it then. Finding the equivalent for each is a bit of a scavenger hunt and they're not always 1:1, but this page has the mappings for most Newtonsoft settings: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-9-0
For example the closest equivalent to IgnoreDefaultValues is by setting the DefaultIgnoreCondition value in the settings: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/ignore-properties#ignore-all-default-value-properties.

Ah excellent then, I will see what ones I can find this weekend, I will have some time to make a few more commits.


sw-check-in getting 404 response resulting in ReservationCancelledError

I have had about 5 check-in's fail recently and I think something is wrong with the sw-check-in lambda check-in request. It found the reservation when scheduling the check-in which is why I opened this up as a separate issue than https://github.com/DavidWittman/serverless-southwest-check-in/issues/50 but they could be related. I am getting 404 responses.
Most of the failures are international flights (Mexico -- all passengers had passport info entered beforehand) but one is domestic which is concerning. Logging wasn't helpful so I added more logging in hopes that I'll get more info on the return flight checkin failure in a few days.
[INFO]	2018-11-20T15:55:06.650Z	847af378-2df5-4322-806c-bd87d54149a4	Checking in [{'firstName': 'John', 'lastName': 'Doe'}] (XXXXXX)
<<Response [404]>>
[ERROR]	2018-11-20T15:55:08.546Z	847af378-2df5-4322-806c-bd87d54149a4	Reservation XXXXXX has been cancelled

Checking in manually with the same names and confirmation numbers as the cloudwatch logs worked which makes me think this isn't related to the parser.
Do you have a way of manually executing the swa.py script or sw-check-in lambda? Check-ins are repeatable so I might be able to get more debug info today if I attempt again with more logging.

Thanks for reporting this... I had some successful check-ins this morning
for domestic flights, but I'd appreciate you digging in if you find the
time. You can install the requirements from lambda/requirements.txt and
then just run the python interactive shell and import the swa lib.
(while in the lambda dir)
$ python
Python 3.6.3 (default, Oct  4 2017, 06:09:15)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lib import swa
>>> help(swa.check_in)

>>> swa.check_in([{'firstName': 'John', 'lastName': 'Doe'}], 'ABC123')

On Tue, Nov 20, 2018 at 10:53 AM Scott Bishop<EMAIL_ADDRESS>wrote:

I have had about 5 check-in's fail recently and I think something is wrong
with the sw-check-in lambda check-in request. It found the reservation
when scheduling the check-in which is why I opened this up as a separate
issue than #50
https://github.com/DavidWittman/serverless-southwest-check-in/issues/50
but they could be related. I am getting 404 responses.
Most of the failures are international flights (Mexico -- all passengers
had passport info entered beforehand) but one is domestic which is
concerning. Logging wasn't helpful so I added more logging in hopes that
I'll get more info on the return flight checkin failure in a few days.
[INFO]	2018-11-20T15:55:06.650Z	847af378-2df5-4322-806c-bd87d54149a4	Checking in [{'firstName': 'John', 'lastName': 'Doe'}] (XXXXXX)
<<Response [404]>>
[ERROR]	2018-11-20T15:55:08.546Z	847af378-2df5-4322-806c-bd87d54149a4	Reservation XXXXXX has been cancelled
Checking in manually with the same names and confirmation numbers as the
cloudwatch logs worked which makes me think this isn't related to the
parser.
Do you have a way of manually executing the swa.py script or sw-check-in
lambda? Check-ins are repeatable so I might be able to get more debug info
today if I attempt again with more logging.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/DavidWittman/serverless-southwest-check-in/issues/53,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AArmL6m0d9At012lpC2Gs31Zv7t4FfATks5uxDOWgaJpZM4Yrhbs
.

Ok here is the response. I am able to lookup the same reservation on https://mobile.southwest.com/check-in with no issues.
('response: ', {u'message': u'Service not found', u'code': 404411182, u'infoList': [{u'value': u'https://api-travel-int-a.pdc.swacorp.com/v1/air-travel/reservations/record-locator/ABC123/travelers/boarding-passes', u'key': u'url'}], u'requestId': u'no-exp-id:NTCDzH4CTByIVQOPw5T3MQ:air-travel', u'httpStatusCode': u'NOT_FOUND'})

lib.exceptions.ReservationCancelledError: status_code=404 data={'names': [{'lastName': 'John', 'firstName': 'Doe'}]} msg="Service not found"

I've confirmed this is for international travel only. I had previously entered all my passport information, so I don't think that was the issue. Still unclear why this is happening.


Punch up the URQL site

The URQL documentation site needs to be more immediately useful. Have a look at the Material-UI site:

Right on the home page they have installation and usage, right below the big logo. That's what people want to know; how do I install it, how do I make my first query.
Following on from that should be a tight section about what distinguishes URQL from other GraphQL clients.
Also, the title needs to change from 'urql Documentation' to something like 'URQL: Fast, Easy, Reliable GraphQL client', or whatever your tag line is.

We've discussed some options internally and I believe we have a couple of tasks for this:

[ ] Add a "Quick Start" guide to the docs and make it the index page
[ ] Move the current "Introduction" page to be "Overview"
[ ] Add code snippets and up-to-date features to the homepage
[ ] Add a "Comparison" page to the docs somewhere

All in all, the "Quick Start" guide should cover the most basic usage and also discuss the "Why someone would use urql" briefly as well as list some features, to enforce the homepage's message.
The homepage itself needs to simply be updated. The feature set isn't up-to-date and doesn't "sell" the library very well.

Happy to review any PR you have up for that. This is a great library.

Maybe a few more comments, having gone through the docs trying to understand exchanges.

The wonka library is cool, but us as an end user of the library I'm not sure why I'm learning about it. I've written a working app that uses queries, mutations, and subscriptions, and I haven't used wonka at all. Can we take that information out? Or just make it a small sidebar?
The exchanges information needs use cases for when and why I would alter them. For example, you might use an exchange to automatically add authentication, or something like that.
There is a spelling error on the streams patterns page; framewrk should be framework.
The Operations stream and results stream graphic could be made more operational by changing out the A, B, and C nodes with the default set of exchanges, then noting best practice places for extension. For example, here is where you would add an exchange to alter the payload before it goes to the client. Here is where you would add an exchange to alter the response from the client.
The site could use an FAQ. Topics could include; How queries could be merged? How do I get started with SSR?  That kind of thing

Sorry to just drop this all in here. Honestly trying to help out.

Also awesome addition would be migration docs from Apollo to describe what is needed. The process is very straight forward so showing people how easy it is it could persuade them to switch. We personally hesitated for several weeks because of the migration unknowns and were pleasantly surprised how easy it was.

Great idea @jakubriedl!

Just wanted to weigh in with a counterpoint to @jherr about wonka. I agree that it's not immediately useful, but I found that kind of low-level information about architecture conceptually useful. I'm coming from Relay where the docs are frequently outdated/incomplete and much of the architecture is opaque (despite the presence of architecture docs on their site).
The fact that urql's docs go so deep into the streams architecture was a key reason why I decided to migrate from Relay. I read it cover to cover and came away with full confidence that there wouldn't be too many surprises because I understood the library's core. (And by the way, the illustrations are excellent.)
Perhaps if it's too distracting for some users, the wonka parts could be moved into another section rather than reduced to a sidebar? Personally, I like them just as they are, but I understand why others might not.


[HOTFIX] log into truefoundry only when tfy connection is required

Remove constant TRUEFOUNDRY_CLIENT that creates a Truefoundry connection on Bootstrap.
Log into Truefoundry only when Truefoundry resources are being accessed.

Fixes #382

lgtm can we disable truefoundry loader being registered in the loader registry? all registered loaders are sent to frontend and tfy loader wouldn't work without a.client.

https://github.com/truefoundry/cognita/blob/main/backend/modules/dataloaders/__init__.py#L9
Already handled here ^^


parse-string should not accept trailing junk

Right now this works:
(cheshire.core/parse-string "{\"foo\": 1}asdf") ; => {"foo" 1}

Instead, it should raise an exception about the trailing asdf. This is confusing and incorrect behavior for a function called parse-string, which reads a single JSON value from a string. It only makes sense that the entire string should be a valid JSON object.
(This issue is related to #52 -- in that bug, you identified that a string is a valid JSON value, which is certainly true; however, the problem there, as here, is that parse-string accepts trailing junk.)
The reason this bug exists (and the reason the same exact bug is in data.json and clj-json) is that parse-string is implemented using a streaming JSON reader (jackson in this case). The (pseudo-)code is essentially
(read-json-object-from-stream (StringReader. s))

If you use a streaming parser on a single string like this, you need to also check that the StringReader is empty (drained) after parsing the JSON value.
For comparison, Go, Javascript, Ruby, and Python all have JSON parsers in their standard libraries which all have some kind of parse-string equivalent function that rejects trailing data.

Any update on this? Would love to see a fix.

Also would love to see a fix

Me too! This was very surprising!

+1 Just bit me also.

Closed by #122

I still think it's misleading that the default parse-string function accepts a string that's invalid JSON, but at least there's a workaround for people after they're bitten by this :|


Dplayer Error

https://user-images.githubusercontent.com/72739555/103290281-be2b1900-4a1b-11eb-9858-55c01eb0aae4.jpg

this issue is urgent. please acknowledge me

this issue is urgent. please acknowledge me


Feature: wrap abbreviation on each visually selected item

Given the following example
test
test
test

In vscode if you visually select all 3 lines and then do Emmet: wrap with abbreviation and you pass in the arguments ul>li* the result will be

test

test

test

But when using this plugin in Neovim the result is

		test
		test
		test

Do you think this plugin could support abbreviation multiplication in visually selected items as well just like in insert mode with emmet-language-server?

Hey! that's already possible but not directly I would say and I don't think I'm going to add a command for that specific case. In vim/neovim you can execute commands for each line in a selection. So you can do:

Select the lines in visual line mode
While in selection press the following :norm YOUR_KEYBIND_FOR_WRAP_WITH_ABBREVIATION.

https://vi.stackexchange.com/questions/4418/execute-normal-command-over-range
And that should do the work. Let me know if that helps.

Thank you very much for your reply. If that works i'm totally ok with it. I will try it out after i get home later tonight.

Do you happen to know how to pass the keybind which in my case is the default recommended by this plugin <leader>xe? If I change it to xe then it works. Do I have to do some kind of escaping for <leader> to be recognized by :norm? In my case <leader> is just space (mapleader = " ").

{commands} cannot start with a space.  Put a count of 1 (one) before it, "1 " is one space.

I managed to do it like this. Thank you again very much for your help.

Can you tell me how to set up key binding for wrap with abbreviation? Thanks

@TurbulentTomato an example is in the readme.

@dpetka2001 hey, maybe you can use mattn/emmet-vim 's emmet plugin, maybe Neovim not work. but you can remap to work, just add two map, such as:
map("v", "", ':call emmet#expandAbbr(2,"")')
map("i", "", '=emmet#expandAbbr(0,"")')
It work so well with me

map("v", "", ':call emmet#expandAbbr(2,"")')
map("i", "", '=emmet#expandAbbr(0,"")')

GitHub some key upload issue, map like this

@1096015776 Tnx, looks interesting. I'll check it out :smile:


Add a function to load an XPM image directly as a RGB888 surface

This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:

path (patch_XPM_image_RGB888.diff, text/plain, 2017-11-04 14:16:43 +0000, 2711 bytes)

Reported in version: unspecified
Reported for operating system, platform: All, All
Comments on the original bug report:
On 2017-11-04 14:16:43 +0000, Sylvain wrote:

Created attachment 3066
path
It would be nice to have a function that loads directly an XPM image as RGB888 surface. Path already exists in SDL_image. so the patch is almost only to expose this as a function.
(remove also MAX macro un-used).

On 2017-11-05 05:05:08 +0000, Sam Lantinga wrote:

What's the use case for this?

On 2017-11-05 10:47:19 +0000, Sylvain wrote:

My use case is probably marginal.
I have a few xpm files that I rescale linearly at run-time, so I need something else that a palette format.
So, this function prevents a call to SDL_ConvertFormat() to converting them out of a palletized format.
Moreover, this way, surfaces are also immediately in the natural renderer pixel format.

Added in https://github.com/libsdl-org/SDL_image/commit/6157c238a77de861827fec5faaf31bf4dd51cdc4


Run mnist_with_summaries.py error：can not open shared object libcupti.so.8.o

error info as below:
2017-07-31 11:18:47.859639: I tensorflow/stream_executor/dso_loader.cc:129] Couldn't open CUDA library libcupti.so.8.0. LD_LIBRARY_PATH:  2017-07-31 11:18:47.859724: F ./tensorflow/stream_executor/lib/statusor.h:205] Non-OK-status: status_ status: Failed precondition: could not dlopen DSO: libcupti.so.8.0; dlerror: libcupti.so.8.0: cannot open shared object file: No such file or directory

I have add the path to libcupti.so.8.0 to LD_LIBRARY_PATH, but no use.
export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
if you have any ideas to solve this, please leave your message.

Please provide details about what platform you are using  (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary?  Make sure you also include the exact command if possible to produce  the output included in your test case. If you are unclear what to include  see the issue template displayed in  the Github new issue template.
We ask for this in the issue submission template, because    it is really difficult to help without that information. Thanks!

Note that the error message says that your LD_LIBRARY_PATH is empty. I would double check that environment is set correctly

What does your current value of $LD_LIBRARY_PATH say and how does it compare to the instructions here? Note that depending on your system you might not have an install path that includes the '-8.0', it might just have to be set as '/usr/local/cuda/lib64'.

This issue is automatically closed due to lack of activity. Please re-open if this is still an issue for you. Thanks!

Hi!
I have the same problem with tensorflow 1.6 and cuda 9.0. I am using Pycharm editor and LD_LIBRARY_PATH contains /usr/local/cuda-9.0/extras/CUPTI/lib64, I check LD_LIBRARY_PATH in Pycharm terminal.
2018-03-12 16:23:37.319154: I tensorflow/stream_executor/dso_loader.cc:141] Couldn't open CUDA library libcupti.so.9.0. LD_LIBRARY_PATH:
2018-03-12 16:23:37.319179: F ./tensorflow/stream_executor/lib/statusor.h:212] Non-OK-status: status_ status: Failed precondition: could not dlopen DSO: libcupti.so.9.0; dlerror: libcupti.so.9.0: cannot open shared object file: No such file or directory

@laetitiaoist  it seems I have the problem like you ,did you solve this problem?

Sorry yes, I solved by installing it another way:
sudo apt-get install libcupti-dev
I had the library in my cuda folder, I changed LD_LIBRARY_PATH but only this other install worked!

@laetitiaoist  Thank you for your kind reply ! I will try it ,hoping it will work for me .

I met the same issue.
Try to find where libcupti.so.9.0 (or different version) and add it into LD_LIBRARY_PATH fixed this issue.
export LD_LIBRARY_PATH="/usr/local/cuda-9.0/lib64:/usr/local/cuda-9.0/extras/CUPTI/lib64"

For me what solved it was to sudo cp the file from /usr/local/cuda-9.0/extras/CUPTI/lib64 to /usr/local/cuda-9.0/lib64/, leaving the LD_LIBRARY_PATH unchanged.

hi, I met the same issus.
I used pycharm with Run the python file.  it didn't work.
but when I use terminal with python3 filename.py .  It  work!
so, if U are same with me. you can try like me


Application Status Overlay

Summary

The following additions/changes have been made in this PR:

Added ApplicationStatusOverlay and ApplicationStatusOverlayProvider APIs.
Only one Status View can be rendered per ApplicationStatusOverlayProvider. If more than one ApplicationStatusOverlay is specified, then the last rendered gets the preference
Restricted the terra-status-view props to include only:

buttonAttrs
message
title
variant

Provided ApplicationStatusOverlayProvider through the following:

ApplicationBase
ApplicationNavigation
ModalManager
SlidePanelManager

Closes #30
Deployment Link

https://terra-applic-applicatio-8mn4zu.herokuapp.com/home
Testing

Added and tested using Jest and WDIO tests

@avinashg1994 Thank you for putting this together. A couple things:

I would recommend updating the base name for this component from ApplicationPageStatus to ApplicationStatusOverlay. I'm open to challenges here, but this is an overlay. It's not transparent, but it overlays the other page content. And while the concept of a "Page" is something we plan on introducing in the future, I'm not sure I want to get that term out here now without the related components in place.

Similarly, the status overlay should have similar accessibility considerations to the ApplicationLoadingOverlay. We need to inert the content behind the status view. Otherwise, users will be able to tab behind it and screen readers will access it. You can manipulate this in the demo if you're quick. We can't rely on consumers rendering nothing behind the overlay to account for this.

I would recommend updating the base name for this component from ApplicationPageStatus to ApplicationStatusOverlay.

Renamed to ApplicationStatusOverlay and updated all references

Similarly, the status overlay should have similar accessibility considerations to the ApplicationLoadingOverlay. We need to inert the content behind the status view. Otherwise, users will be able to tab behind it and screen readers will access it.

Added the logic to make the background children elements inert when the status is overlaid

Added background-color for the Status Overlay and also made it themeable : https://github.com/cerner/terra-application/pull/47/commits/347793a8fbb9ff8781d9fce146c1f5a351097b4f

Functional review complete. No issues identified.


Rename any use of the term "Pimp" to "Enrich"

There's been a number of discussion on Twitter about how horrible the choice of term "Pimp" was to the impression of Scala:

https://twitter.com/coda/status/93003343965851648
https://twitter.com/coda/status/93049114106920961

Refactored: plz don't use the "pimp" metaphor; it has unintended connotations which have offended and alienated potential Scala programmers.

The standard replacement is "Enrich", "Enrichment", or "RichX".
I sometimes call them "method injection" or "static monkey patching", but never pimp.

I've never stopped to think about what pimp actually means. So I'm in for this change 👍 Good idea.


Timesheet - 29/04/2021 - James Pang

Task 1
Went through design of landing page design
Proof of Work

N.A.

Time Spent
1 hours

Task 2
Worked on the weekly progress page. Tried to structure the data in a more proper manner
Proof of Work

Changes are in local

Time Spent
1.5 hours

Total Time Spent
2.5 hours
Account Number
c54c04774efaae20746fd3f29cdd619fea512e119bc1082b863572b2e8844104

Approved

Approved


Ability to add discussion link for tools

Same as #3739 but for tools. Will require change to webservice as well as frontend.
┆Issue is synchronized with this Jira Story
┆Issue Number: DOCK-1624
┆Sprint: Sprint 50- Yellowfin Tuna
┆Issue Type: Story

Works but a few things to note though.

When there's no discussion forum, it displays it as blank. Not entirely sure this is what we want.
When a change is triggered, a refresh occurs which is less than ideal since it takes long and has nothing to do with actual workflow content

Works but a few things to note though.

When there's no discussion forum, it displays it as blank. Not entirely sure this is what we want.
When a change is triggered, a refresh occurs which is less than ideal since it takes long and has nothing to do with actual workflow content

Reviewed the wrong issue, this is not done

Reviewed the wrong issue, this is not done


Make different type aliases compaitble in diff, intersect and merge

Description
Make it works when calling diff, intersect or merge on two collections having the same type but with different aliases like int and integer
This applies on:
int, integer
bool, boolean
float, double
Motivation and context
Code like this should work without having to construct both collections as int or integer
(new Collection('integer', [1, 2, 3]))->diff(new Collection('int', [1, 2]));

How has this been tested?
I added a method to test it in CollectionManipulationTest
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING.md document.
[x] I have added tests to cover my changes.

Thank you for contributing! 🎉
I committed this in 77a182ecd8ffe67a1eeebaccb2b5c4d5e6753f66.


Incorrect details shown on browse page on navigating from search page

Clicking the TV Show button (or any button for that matter) navigates to the browse page and shows the wrong data

thanks for reporting

Fixed


DOC: Add graphics to solve_ivp examples

Looks all right to me. I suggest that you should name the commit as "DOC: Add graphics to solve_ivp examples" and consider my minor remarks. I will merge after that.

Also update the master branch and rebase your branch on it to handle the build error.

I'm closing this pull request and will open a new one as I don't know how to rebase my repository. So, thanks so far

It's not a good reason to close the PR. To rebase you need.

Checkout your local master branch.
Do git pull upstream master.
Switch back to your branch.
Do rebase master.

Go ahead, reopen and rebase.

@nmayorov He'll also have to force push to his repository after the rebase, right?
git push origin <your_branch_name> --force

Sure.