FastAPI with Pydantic v2

Is FastAPI with support for Pydantic v2 working for you (0.100.0-beta1)?
Let me know in this discussion on the link: https://github.com/tiangolo/fastapi/discussions/9709
(don't comment in this issue, please go to the discussions and follow the instructions there)

Hi! I just updated my project to fastapi v0.100.0-beta1 and pydantic v2.0b2 and I'm getting the following error:
pydantic.errors.PydanticImportError: pydantic:BaseSettings has been removed in V2.

For further information visit https://errors.pydantic.dev/2.0b2/u/import-error

Is there any official migration guide from pydantic v1 to pydantic v2?

Yes. There is: https://docs.pydantic.dev/dev-v2/migration/

Parsing of Literal types seems to be broken with Pydantic v2.
Take this example:
from typing import Literal

from pydantic import BaseModel

class Health(BaseModel):
    status: Literal["ok", "error"]

Doing print(Health.model_json_schema()) seems to return the right thing ({'properties': {'status': {'enum': ['ok', 'error'], 'title': 'Status'}}, 'required': ['status'], 'title': 'Health', 'type': 'object'}
However, if I use it as the return model for a path operation, the schema is broken in the swagger docs. Weirdly the examples do use one of the values.

Here is a pastebin with the generated openapi.json: https://pastebin.com/a95Tujah

@aradkdj please check the instructions on the discussion and comment there: https://github.com/tiangolo/fastapi/discussions/9709

@tiangolo this is not working with a basic setup:
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def root():
    return "hello world"

if __name__ == "__main__":
    import uvicorn

    uvicorn.run(app, host="<IP_ADDRESS>", port=8000)
    ```

(.venv) ➜  fastapi_pydantic pdm run main.py
Traceback (most recent call last):
File "/Users/xxxdevelopment/fastapi_pydantic/main.py", line 1, in
from fastapi import FastAPI
File "/Users/xxx/development/fastapi_pydantic/.venv/lib/python3.11/site-packages/fastapi/init.py", line 7, in
from .applications import FastAPI as FastAPI
File "/Users/xxx/development/fastapi_pydantic/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 16, in
from fastapi import routing
File "/Users/xxx/development/fastapi_pydantic/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 22, in
from fastapi import params
File "/Users/xxx/development/fastapi_pydantic/.venv/lib/python3.11/site-packages/fastapi/params.py", line 6, in
from ._compat import PYDANTIC_V2, Undefined
File "/Users/xxx/development/fastapi_pydantic/.venv/lib/python3.11/site-packages/fastapi/_compat.py", line 50, in
from pydantic._internal._fields import Undefined as Undefined
ImportError: cannot import name 'Undefined' from 'pydantic._internal._fields' (/Users/xxx/development/fastapi_pydantic/.venv/lib/python3.11/site-packages/pydantic/_internal/_fields.py)

dependencies = [
"fastapi==0.100.0-beta1",
"uvicorn"
]

Why not move to release 1.X ?

Why not move FastAPI to release 1.X ?

I think it depends on starlette. Thats core dependency for FastAPI, and still doesn't provide major release. Starlette can change internal behavior without backward compatibility (like dropping support for graphql in version 0.17) but that unacceptable for stable major version. That's why FastAPI also in minor release cycle like starlette

Even if Starlette release 1.0, FastAPI will not follow immediately. I think Sebastián has some changes planned before 1.0.

It's not a problem, if there is a breaking change, the version can be a version 2 and next, ...
FastAPI is mature, lot of projects use it in production, it's time to release a version 1.X

Going through pydantic docs to try to discover the root cause of an issue I am seeing.
Previously you could do
def dict(self, *args, **kwargs):
   kwargs["exclude_none"] = True
   return super().dict(*args, **kwargs)

According to pydantic v2 docs dict -> model_dump and it still supports exclude_none etc.
But in fastapi responses I am now seeing the keys with None values appearing, and I can't track down where the disconnect between myself, fastapi and pydantic v2 lies.
I've tried overloading every method I can detect that is called during fastapi serialization to see if any of them are called, but it seems to not be hitting any of the pydantic methods.
Despite the following code, the endpoint returns as if nothing has gone wrong.

    def model_dump(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().model_dump(*args, **kwargs)

    def model_dump_json(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().model_dump_json(*args, **kwargs)

    def to_python(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().to_python(*args, **kwargs)

    def dump_python(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().dump_python(*args, **kwargs)

    def dict(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().dict(*args, **kwargs)

Any assistance would be great, looking forward to upgrading our systems to fastapi with pydantic v2, but can't seem to get past this one on my own.

Minimum example
import fastapi
import pydantic

app = fastapi.FastAPI()

class Model(pydantic.BaseModel):
    data: str | None

    def model_dump(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().model_dump(*args, **kwargs)

    def model_dump_json(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().model_dump_json(*args, **kwargs)

    def to_python(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().to_python(*args, **kwargs)

    def dump_python(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().dump_python(*args, **kwargs)

    def dict(self, *args: ..., **kwargs: ...) -> str:
        raise Exception
        kwargs["exclude_none"] = True
        return super().dict(*args, **kwargs)

@app.get("/")
async def root() -> Model:
    return Model(data=None)

$ curl <IP_ADDRESS>:8000
> {"data":null}

@EdgyNortal please report it in the discussion from the link above, not here, that way it's easier to track the conversation: https://github.com/tiangolo/fastapi/discussions/9709

While integrating MongoDB, which uses BSON instead of the JSON type of data makes the retrieved data not possible to iterate over, forcing the BSON serialization to String (Only the _id of the inserted items are BSON).
FastAPI 0.99.1
Pydantic 1.10.11
With these versions of libraries, it was possible to make such a serialization with the following line of code:
pydantic.json.ENCODERS_BY_TYPE[ObjectId] = str
while importing the bson object, which is not separately installed but came with the pymongo[srv] installation alongside.
from bson import ObjectId
Sadly, this conversion is completely broken by both @pydantic and @fastapi with their latest releases.

@woosal1337 given your versions, this is not related to Pydantic v2.
Please create a new question in GitHub Discussions following the template.

Is it #9709? On it.

@woosal1337 given your versions, this is not related to Pydantic v2.
Please create a new question in GitHub Discussions following the template.

Is it #9709? On it.

Yes. This was already reported: https://github.com/tiangolo/fastapi/discussions/9709#discussioncomment-6396226.

Thanks for the reference! I'll do a more thorough search next time 😄

Issue 1. Seems like the pydantic issue, since the it is generating the following signature:
<Signature (*args: 'Any', **kwargs: 'Any') -> 'None'>. Whereas the stdlib dataclasses generate the signature as expected.

@tiangolo , after upgrade to fastapi==0.100.0 and pydantic==2.0.2 I got following issues below. Both worked fine with fastapi<0.100.0 and pydantic==1.10.11. See MRE:
from collections.abc import Sequence
from typing import Annotated, Any, Generic, TypeVar

from fastapi import Depends, FastAPI
from pydantic import BaseModel, TypeAdapter
from pydantic.dataclasses import dataclass as pydantic_dc

api = FastAPI()

fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]

T = TypeVar('T')

class ItemOut(BaseModel):
    item_name: str

class PaginationOut(BaseModel, Generic[T]):
    page: int
    per_page: int
    pages: int
    total: int
    items: Sequence[T]

    @classmethod
    def model_parametrized_name(cls, params: tuple[type[Any], ...]) -> str:
        return f'{params[0].__name__.removesuffix("Out")}{cls.__name__}'

@pydantic_dc()
class CommonQueryParams:
    q: str | None = None
    skip: int = 0
    limit: int = 100

@api.get("/items/")
async def read_items(
    commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
) -> PaginationOut[ItemOut]:
    pagination = PaginationOut[ItemOut](
        page=1,
        per_page=1,
        pages=1,
        total=1,
        items=TypeAdapter(list[ItemOut]).validate_python(fake_items_db)
    )
    return PaginationOut[ItemOut].model_validate(pagination)

Query parameters turned into args and kwargs:

Incorrect definition for PaginationOut[ItemOut] model. The name should be ItemPaginationOut (the class defined model_parametrized_name) and pagination attributes should be of proper type instead of any:

Thanks!

What's the compatible code for V1?

Issue 1. Seems like the pydantic issue, since the it is generating the following signature: <Signature (*args: 'Any', **kwargs: 'Any') -> 'None'>. Whereas the stdlib dataclasses generate the signature as expected.

Right. I'm going to take a look.

@Kludex , thank you!
@tiangolo , to give you some context why I'm using pydantic dataclasses instead of stdlib dataclasses (this was intentionally omitted for simplicity sake):
from pydantic.dataclasses import dataclass. # import pydantic dataclass
from ... import model_config  # config dict for parent BaseModel, having alias_generator

@dataclass(config=model_config)
class PaginationGet(BaseParameters):
    page: Annotated[int, Query(gt=0)] = 1
    per_page: Annotated[PerPage, Query()] = PerPage.VALUE_025
    all_items: Annotated[bool, Query()] = False

This allows to automatically generate aliases for Query parameters, without needing to set alias for each Query explicitly. The same approach can be used to generate aliases for  Path, Form or File parameters as well (as long as they are "wrapped" into pydantic dataclass). I think it should be a legit use case.

I'll lock this issue. As @tiangolo said, the idea of this issue was to redirect people to the discussion on #9709. 👀
It's easier to organize the issues if everything is over there. 😅
If you have an issue with FastAPI + Pydantic V2, please post it on #9709, or create a new discussion. 🙏


Create Iron-Iconsets

@muereb - the file is missing it's extension, so it won't work. Can you resubmit and rename to include the .markdown extension?  Thanks!

PS - the build failure with the PR appears to be a broken build that has nothing to do with this PR


SB-21731: Certificate generator

SB-21731  Migration to Flink Job & Refactoring - Certificate Generation job

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please choose appropriate options.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Ran Test A
[ ] Ran Test B

Test Configuration:

Software versions:
Hardware versions:

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

@PradyumnaNagendra - let us not have this big PRs next time. There are some more review feedback.

The Rest API calls are not successful, we should through the exception. Check UserFeed and Notifier ProcessFunctions.
Mutable variables used at few places. We can change that logic to use immutable.
To construct Java Map, we used inline put methods. We can change it and create Scala map and use asJava to convert.


Update headers

Update headers as was done in #35 to go along with the http update.

@bors-servo r+
Thanks!

:pushpin: Commit d761231 has been approved by jdm

:hourglass: Testing commit d76123184461c60e8fc1a67de081001a82cfd947 with merge c2948c8605131c881e32c1ab2fcc6ea3caa7e355...

:sunny: Test successful - checks-travis
Approved by: jdm
Pushing c2948c8605131c881e32c1ab2fcc6ea3caa7e355 to master...


Name the nodes in pandas-iris

The nodes of pandas-iris are unnamed and that results in some very long autogenerated names. Some deployment tutorials depend on this starter as an example and sometimes the unfriendly names of the nodes makes it harder for the reader to understand what is happening.

I have changed the node names to be one word only, which makes them different than the function names as @lorenabalan suggested.

I have changed the node names to be one word only, which makes them different than the function names as @lorenabalan suggested.


getApplicationName undefined

why getApplicationName() is undefined use version 0.21.5 iOS

I have a similar issue: getBundleId of undefined.
0.21.5 iOS
RN 0.54.2

Use the template to report a problem.

remove the libRNDeviceInfo-tvOS.a work for me


proposal: encoding/binary: cache dataSize across invocations of Read and Write

As of current tip (dfbc9c83a910c79cb3cc34dbfaed3c436e1b6ecb), using binary.Read to repeatedly unmarshal a struct duplicates a lot of work. This is because the size of the struct is re-computed on every invocation, which causes a lot of work via reflection.
You can observe this by looking at a CPU profile of the ReadStruct benchmark from the standard library:
(pprof) top binary.Read -cum
Active filters:
   focus=binary.Read
Showing nodes accounting for 460ms, 43.40% of 1060ms total
Showing top 10 nodes out of 48
      flat  flat%   sum%        cum   cum%
         0     0%     0%      990ms 93.40%  std/encoding/binary.BenchmarkReadStruct
      20ms  1.89%  1.89%      990ms 93.40%  std/encoding/binary.Read
         0     0%  1.89%      990ms 93.40%  testing.(*B).launch
         0     0%  1.89%      990ms 93.40%  testing.(*B).runN
         0     0%  1.89%      640ms 60.38%  std/encoding/binary.dataSize
      90ms  8.49% 10.38%      640ms 60.38%  std/encoding/binary.sizeof
      20ms  1.89% 12.26%      490ms 46.23%  reflect.(*rtype).Field
      60ms  5.66% 17.92%      360ms 33.96%  reflect.(*structType).Field
     130ms 12.26% 30.19%      300ms 28.30%  std/encoding/binary.(*decoder).value
     140ms 13.21% 43.40%      250ms 23.58%  runtime.mallocgc

Here, binary.dataSize accounts for almost 60% of runtime, even though the size of a type is fixed and does not change between invocations.
I've written a patch which caches the result of binary.dataSize in a sync.Map, with the following effect on the benchmark:
name                    old time/op    new time/op     delta
ReadStruct-8              1.06µs ± 1%     0.39µs ± 6%   -62.87%  (p=0.000 n=16+16)

name                    old speed      new speed       delta
ReadStruct-8            70.6MB/s ± 1%  190.4MB/s ± 6%  +169.74%  (p=0.000 n=16+16)

name                    old alloc/op   new alloc/op    delta
ReadStruct-8                200B ± 0%        80B ± 0%   -60.00%  (p=0.000 n=16+16)

name                    old allocs/op  new allocs/op   delta
ReadStruct-8                16.0 ± 0%        1.0 ± 0%   -93.75%  (p=0.000 n=16+16)

As you can see, we pretty much recoup the 60% seen in the CPU profile. I think Write may see a similar speed up, but haven't checked. However, the patch has a problem: the cache can grow without bounds, and there is no way to reset it except by restarting the program.
I think the correct solution to this would be to introduce something like an Encoder / Decoder to binary which "owns" the cache. But it seems like this might go against the spirit of the  package. Looking at https://godoc.org/?q=binary there are many programs that would benefit from a faster Read / Write, so I'd like to explore this option nonetheless.

The above is my straw man CL, hopefully it can spur some discussion.

Adding a map to the default encoder will mean that some programs will permanently burn memory that would prefer not to lose forever.  I'm not sure that's the best choice.

@ianlancetaylor @bradfitz can either of you take another look?

Looking at https://golang.org/cl/199539, it seems that NewReader and NewWriter are unnecessary.  The map can be lazily initialized if it is needed.  So the proposal is to add two new types to encoding/binary: Reader and Writer.  They have Read and Write methods, respectively, but they are not instances of io.Reader and io.Writer.
type Reader struct { ... }

func (r *Reader) Read(r io.Reader, order ByteOrder, data interface{}) error

type Writer struct { ... }

func (w *Writer) Write(w io.Writer, order ByteOrder, data interface{}) error

Whether the existing Read and Write functions use Reader and Writer is an implementation detail.
It seems odd to have to pass in the io.Reader and ByteOrder each time.  Presumably they are going to be the same for each use of a Reader or Writer.  and Read and Write methods normally implement io.Reader and io.Writer, but these can't, so perhaps we should follow encoding/json and use Encode and Decode.  That suggests:
type Reader ...

func NewReader(io.Reader, ByteOrder) *Reader

func (r *Reader) Decode(interface{}) error

type Writer ...

func NewWriter(io.Writer, ByteOrder) *Writer

func (w *Writer) Encode(interface{}) error

They have Read and Write methods, respectively, but they are not instances of io.Reader and io.Writer.

Yes, that's true. I figured it would be better to stick with the terminology of binary with Read and Write. Looking at json and gob I would have preferred Decoder and Encoder but those already exist unexported in the code.

It seems odd to have to pass in the io.Reader and ByteOrder each time. Presumably they are going to be the same for each use of a Reader or Writer.

This isn't true for the two use cases I have in mind.
First, I'm reading perfEventHeader from multiple distinct ring buffers. With your proposed API I'd have to do one of the following:

Have one binary.Reader and one "swappableReader" which just forwards to another io.Reader. Not nice, but minimal overhead.
Have one binary.Reader per ring buffer. Nicer than the above, the added overhead for another map, etc. is probably negligible.
The perf improvement for this case is ~8%.

Second, I use binary to decode the keys and values of a Map object exposed by the Linux kernel. The object is usually long lived, and key and value map to a single Go type. Users will repeatedly do lookups / insertions into the map. Here, caching dataSize results in ~15% speed up for a moderately complicated struct.
I think those improvements are nice, but as always looked better in the microbenchmarks. I also think that the second use case would benefit from being able to avoid io.Reader entirely. Combined with the fact that I can't come up with a nice API tells me that my requirements might be non-standard, and that just forking binary for my own purposes is easier. I happy to withdraw this proposal if you agree.

You are saying that you vary the io.Reader?  But you presumably don't vary the ByteOrder?
If you want to continue with this proposal, do you want to propose a different API?

Please no. encoding/binary can be made arbitrarily more complex in an effort to make it "fast". It was never intended to be fast, only convenient.

Adding a map to the default encoder will mean that some programs will permanently burn memory that would prefer not to lose forever.

It was never intended to be fast, only convenient.

The size of the map is presumably proportional to the number of distinct types passed to encoding/binary. That set has a fixed (and generally) small upper bound, except for the types synthesized by the reflect package.
Is it possible to detect types synthesized by the reflect package? If so, we could omit those from the map, and then I'm not sure that a global map would really be so bad — it would avoid the need for changes in the package API, and programs that really care about run-time overhead can always marshal through a more restricted set of types (or avoid encoding/binary entirely).

You are saying that you vary the io.Reader? But you presumably don't vary the ByteOrder?

That's correct.

Please no. encoding/binary can be made arbitrarily more complex in an effort to make it "fast". It was never intended to be fast, only convenient.

Agreed. In fact the package is so convenient that there isn't much else out there, see the godoc.org link I referenced earlier. My thinking is that the ecosystem benefits if we can get a substantial speed up for a very commonly used package.

The size of the map is presumably proportional to the number of distinct types passed to encoding/binary. That set has a fixed (and generally) small upper bound, except for the types synthesized by the reflect package.

I think that is correct. I was looking at reflect to figure out how heavy a reflect.Type is, and it turns out that the package already has global caches just like the one I propose here:

https://github.com/golang/go/blob/5eec0a91eadd76a45197ee2588306bdc85570549/src/reflect/type.go#L1371
https://github.com/golang/go/blob/5eec0a91eadd76a45197ee2588306bdc85570549/src/reflect/type.go#L1740
https://github.com/golang/go/blob/5eec0a91eadd76a45197ee2588306bdc85570549/src/reflect/type.go#L1755
etc.

Adding a sync.Map caching just the struct sizes makes a big difference:
bradfitz@go:~/go/src/encoding/binary$ go test -v -run=XXX -bench=ReadStruct$ -count=5
goos: linux
goarch: amd64
pkg: encoding/binary
BenchmarkReadStruct
BenchmarkReadStruct-4            2036982               588 ns/op         127.49 MB/s
BenchmarkReadStruct-4            2030828               593 ns/op         126.44 MB/s
BenchmarkReadStruct-4            2032056               595 ns/op         126.04 MB/s
BenchmarkReadStruct-4            2031474               593 ns/op         126.41 MB/s
BenchmarkReadStruct-4            2042948               588 ns/op         127.60 MB/s
PASS
ok      encoding/binary 9.016s
bradfitz@go:~/go/src/encoding/binary$ go test -v -run=XXX -bench=ReadStruct$ -count=5
goos: linux
goarch: amd64
pkg: encoding/binary
BenchmarkReadStruct
BenchmarkReadStruct-4             741402              1523 ns/op          49.24 MB/s
BenchmarkReadStruct-4             807487              1517 ns/op          49.45 MB/s
BenchmarkReadStruct-4             816326              1523 ns/op          49.23 MB/s
BenchmarkReadStruct-4             796476              1518 ns/op          49.42 MB/s
BenchmarkReadStruct-4             804229              1519 ns/op          49.37 MB/s
PASS
ok      encoding/binary 6.120s

diff --git a/src/encoding/binary/binary.go b/src/encoding/binary/binary.go
index 8c2d1d9da4..8b1e97cb2d 100644
--- a/src/encoding/binary/binary.go
+++ b/src/encoding/binary/binary.go
@@ -26,6 +26,7 @@ import (
        "io"
        "math"
        "reflect"
+       "sync"
 )

 // A ByteOrder specifies how to convert byte sequences into
@@ -377,6 +378,8 @@ func dataSize(v reflect.Value) int {
        return sizeof(v.Type())
 }

+var structSize sync.Map // reflect.Type -> size
+
 // sizeof returns the size >= 0 of variables for the given type or -1 if the type is not acceptable.
 func sizeof(t reflect.Type) int {
        switch t.Kind() {
@@ -386,6 +389,9 @@ func sizeof(t reflect.Type) int {
                }

        case reflect.Struct:
+               if size, ok := structSize.Load(t); ok {
+                       return size.(int)
+               }
                sum := 0
                for i, n := 0, t.NumField(); i < n; i++ {
                        s := sizeof(t.Field(i).Type)
@@ -394,6 +400,9 @@ func sizeof(t reflect.Type) int {
                        }
                        sum += s
                }
+               if t.Name() != "" { // don't cache reflect-created types
+                       structSize.Store(t, sum)
+               }
                return sum

        case reflect.Bool,

I'm fine with that.
It's a bounded number of structs.

I've updated the CL based on your code @bradfitz, with a little twist: we only cache the result of dataSize, which should mean that there are less items in the cache and that the sync.Map lookup is not in the recursive function.

Given that the code is so small and the memory footprint is bounded, I withdraw my objection to adding this cache.
Does anyone else still object? Otherwise it seems like this is a likely accept.
Leaving open a week for final comments.


Canonical URL and sitemap URLs need to match

canonical url
https://crate.io/docs/sql-99/en/latest/appendices/
vs.
sitemap url
https://crate.io/docs/sql-99/en/latest/appendices/index.html
it seems that index.html gets stripped from the canonical url, same happens on this page here: https://crate.io/docs/sql-99/en/latest/chapters/index.html
not sure if this is by design, either way, if this is an issue, the tech writers need to adjust their buildtools to account for that
(from @msbt)

AFAIK, this is by design. The examples on [1] reflect the very same behavior. Please reopen this issue if this is actually a problem for anything or anyone.
[1] https://pypi.org/project/sphinx-sitemap/


Complete failed status translations with tryComplete

In reference to @alexandru's comment in #38 , try to complete the future when faced with untranslatable statuses instead of throwing.
Also:

Turn the PartialFunction definition into a val because it is constant
Add a new Status, UnhandledStatus for holding untranslatable SpyMemcached OperationStatuses

Coverage decreased (-0.9%) to 83.636% when pulling f5be74e6942dfd43dfc3bd84ab6d82871bcbc8f1 on lloydmeta:refactor/spy-memcached-impl into 8e7d871f09bbdbcf4994cdf7af7f5152b353878c on alexandru:master.

Hah, coverage decreased because I added lines to handle cases that should never happen (missed translation of status...)

Does it work? :-)

Coverage increased (+1.5%) to 86.071% when pulling acfa56317ef29f064538091889a2d0b074bfa956 on lloydmeta:refactor/spy-memcached-impl into 8e7d871f09bbdbcf4994cdf7af7f5152b353878c on alexandru:master.

Ah, was still polishing the PR :) DRY'ed it up a bit more to make failure handling a bit less repetitive on the SpyMemcachedIntegration level and now we have +1.5% coverage.

Does it work? :-)

So far the tests are passing, which is a good sign. Since it's a bit hard to force the underlying SpyMemcached to throw unsupported statuses, I manually disabled handling of valid cases in realAsyncGet, ran the tests again, and saw that we got the following:
[info]   shade.UnhandledStatusException: For key hello - shade.memcached.internals.CASNotFoundStatus$
[info]   at shade.memcached.MemcachedImpl.shade$memcached$MemcachedImpl$$throwExceptionOn(MemcachedImpl.scala:291)

which looks like the proper failure path in the MemcachedImpl layer that we want. Looking at the previous code, I don't think we would have ever been able to get to MemcachedImpl.scala:291, since as you mentioned, the future would never get completed due to error throwing !

Dude, so overall looks good.

👍 so if you think it's good, you can merge.


Add all old translations to CurseForge page

Add all the old translations to the CurseForge page for automatic localization.

Translations added. Will be packaged with next release.


SteamVR tracking not responding

OK, so I've got SteamVRBridge, and have set it up to track a virtual HMD with a yellow ping-pong ball. So far, it seems to be working - the position is tracked fine in the config tool.
However, for whatever reason the position in SteamVR does not change. I've run the driver installer, it's showing the cameras within the VR space, but it isn't actually tracking anything.
I've tried various things (uninstalling/reinstalling, unlinking the driver and restarting, etc) but the only idea that I currently have is that there's a problem somewhere with one of my other drivers - namely, TrueOpenVR.
I'm using a DIY headset, made using TrueOpenVR on the FreeTrack setting (Along with an Arduino, a screen, and FreePIE) for the stereoscopic view and rotation tracking. I have a feeling that the driver changes made by TOVR are in some way interfering with PSMS, however I have no way of checking this.
SteamVRBridge version - 1.6.0 (Latest)
SteamVR version - latest
TrueOpenVR version - 0.7 Portable (Latest)
PSMoveService.log

Have you found a fix yet? Im having the same issue. Head tracking works fine in the config tool but in steamVR only my hands work. Im using riftcat

Not quite. I did figure out though, that (at least with my setup) you could run both the SteamVR Bridge AND FreePIE Bridge at the same time. Since I was already using FreePIE to track rotation, I just added the Headset position to the script (tracking a virtual controller) and it worked great.


Bug: blank png downloaded alongside correct png each time 'Download PNG' is clicked

During testing using the BODS Data Visualisation Demo version, I am experiencing a bug where the diagram is generated correctly - but when I click 'Download png', it downloads a blank file called bods.png and then a correct second png is downloaded called bods (1).png.
See example pngs generated using mixed-direct-and-indirect-ownership.json:

I carried out tests using the following two BODS version 0.4 JSON example files:
mixed-direct-and-indirect-ownership.json
fermcat (1).json
I'm on a MacBook Pro running 14.6.1 MacOS Sonoma using Chrome Version 129.0.6668.100 (Official Build) (arm64).

When I try to recreate this issue, what happens is that on clicking the 'Download PNG' button, two dialog boxes open (to save the image to my machine). I'm on Ubuntu 20, Firefox 131

I was able to recreate the bug as follows:
OS: MacOS Big Sur version 11.6, chip M1 2020
Browsers: Version 129.0.6668.100 (Official Build) (arm64) & Safari Version 14.1.2 (166<IP_ADDRESS>.6)

First attempt to download the PNG, only one file is downloaded, as expected.
Without refreshing the page, if the same data is pasted, on clicking the 'Download PNG' button, 2 files are download as described in the issue.
Upon refreshing the page and repeating the steps, only one file is downloaded, as expected.


Create dummy database of 100 people with different information

Putting this off to the second iteration to focus on creating more endpoints now.

Closing this for now just so I don't have to look at it.


Why multiplying rstd instead of dividing by rstd?

https://github.com/OpenRLHF/OpenRLHF/blob/a534764229fe17a44f461712a37c84af3712a199/openrlhf/trainer/ppo_utils/replay_buffer.py#L214
When normalizing the advantages, why multiplying the standard deviation instead of dividing by the standard deviation?

Using rstd (the reciprocal of the standard deviation's square root) instead of 1/std is primarily to avoid numerical instability.


Possibility to support touchscreen?

Because now we can't wake onScreenKeyboard, when using hyprlock without keyboard, we can't unlock it. Any possibility to use OSK in hyprlock, or provide a 9 dots method like in phone, which allow us to draw some lines as password to login?

9 dots method would work without any work from the hl side. Technically, no protocol as of right now allows for an OSK over a lockscreen, unless the lockscreen itself provides an osk.

9 dots method would work without any work from the hl side. Technically, no protocol as of right now allows for an OSK over a lockscreen, unless the lockscreen itself provides an osk.

Sorry, I didn't understand. How can I implement a 9 dots? as widgets?

I meant without any code needing to change in hyprland. You'd still need to write the code in hyprlock for the 9 dots.

I noticed this from the wayland protocol website for ext_session_lock_v1

The only surfaces that should be rendered while the session is locked are the lock surfaces created through this interface and optionally, at the compositor's discretion, special privileged surfaces such as input methods or portions of desktop shell UIs.

Also from here, looks like layer-shell surfaces can be drawn above the lockscreen surface.
I do know that my current setup involves hyprland starting with exec-once = hyprlock. I also have a script that hyprctl plugins load the hyprbar library, which results in a "plugin loaded successfully!" popup on the top right. This script also exec-onces, so what happens is the popup is drawn above the hyprlock surface, with the full animation. (my current hyprlock surface is a solid black screen, that's another issue)
would something like squeakboard be able to draw itself on top? Not sure how surfaces work in ext_session_lock but just wanted to bounce some thoughts

hyprland doesn't allow anything to render over the lock. That's our current "compositor policy"


Suspense Fallback disappears when interacting with counter

Describe the bug
When using the default/base solid start template and implementing simple streaming with the renderStream server function in the entry-server.tsx. the Suspense fallbacks disappear when interacting with the counter component.
Your Example Website or App
https://github.com/adamaho/suspense-fallback-bug
Steps to Reproduce the Bug or Issue

Clone the repo
pnpm install
pnpm dev
Open http://localhost:3000
Observe the loading p1... and loading p2... fallbacks
While the one or more fallbacks are present, press the counter button
Observe the fallbacks disappear until the promises are resolved after the timeout, at which point the content of the promise appears

Expected behavior
As a user, I expect the fallback to remain on the page while clicking the counter button until the stream has completed and the content from the promises is shown.
Screenshots or Videos
https://user-images.githubusercontent.com/56700218/225392459-9abb890c-0a72-454b-ab7f-687d4e037383.mov
Platform

OS: macOS - M1 macbook air
Browser: Chrome
Version: 111.0.5563.64

Additional context
No response

Ok hah.. I found the bug. Not what I thought.  Literally I removed all the placeholder when it realizes it needs to bail out. But that's the wrong timing. It shouldn't do that until the data comes in. Thanks for reporting.


YouTube search bar fault

Hi,
I have recently upgraded all of my servers to the latest version of the script, however, when attempting to search on YouTube, I get redirected back to the error page. All plugins are enable in the config, and
I have added the following to my TestPlugin.php:
$event['request']->headers->set('user-agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36');
Any help would be much appreciated!
Thanks.

This can't be right. This site: https://unblockvideos.com/ uses the last version of php-proxy, and YouTube there works just fine. Run this command in your proxy directory:
composer show -i

and post the output

Hi,
The output is the following:
athlon1600/php-proxy     dev-master 8ade1e9 symfony/event-dispatcher v2.8.4             Symfony EventDispatcher Component
Thanks!

Also, might be worth noting, that on my server, when I go to search on YouTube, the suggestions list appears. However, on unblockvideos.com, nothing appears. Could this be due to client side scripting?
Thanks!

Nevermind, used composer update and there was an update available. I think the ready made download on php-proxy.com may be outdated.
Thanks!


WIP feat: add layout code page content

moved from https://github.com/carbon-design-system/carbon-website/pull/352
Ref #339
Closes #273

Hey @alisonjoseph I noticed this issue was closed, my design specs issue is still open, but that didn't seem like the place to comment either... I have a few notes about the grid demos, so I just reopened this issue and put it here.
Just noticed a couple of things looking at the grid demos, the side margin jumps from 32px to 40px causing the edge of the grid to be misaligned with the paragraph above.

Can we keep it at 32px so there's a nice even 16px border around the grid at the top and the bottom?

it's correct (32px) up til about 1176px:

Then the margin jumps to 40px

Also, right now the type within the grid cells has a 16px margin, could we reduce that to 8px top 8px side to help with breakage at smaller breakpoints

Responsive breakpoints example:

everything just stacks at table to mobile for responsive breakpoints, which doesn't really make sense

this is my fault for not specifying a table and mobile behavior but since tablet has an 8 col grid and mobile has a four column grid, this is how the "responsive columns" demo should behave at tablet and mobile

I’ll make those updates.
We removed the view more from the code snippet for the theme for some reason, but I can add it back for the website.

@alisonjoseph thanks for looking at those... I realize this is a lot to add at the last minute... I didn't have these multi breakpoint examples specified in my design... I know you have a lot to do with data viz too and you have a vacay coming up, so let's just do the best we can with this, but if it has to extend into the next release it can.

@alisonjoseph couple things:

I think we can keep the padding at 16px top and bottom for the type within the grid demos, especially if we're simplifying them for tablet and mobile

also, talked to @joshblack and mike about having the demos respond as the grid would to the tablet and mobile breakpoints. Josh thinks we could just display the code for the 8 column grid at tablet and display the code for the four column grid at mobile. I understand there might be some use cases where people might want 16 column grid code while looking at the site in a tablet or mobile view... but that doesn't concern me too much. Seems worse to have the demo visually displaying something that is not correct at that breakpoint.

Code Tab: Final push
(all above comments still outstanding are captured here)

[ ] Aspect ratio demo (update to include the 3:2 ratio, remove the 1:2 ratio you have at the bottom)

This is the correct spec

[ ] Add a demo for the Full bleed scenario (Josh has this is his grid demo but I forgot to add it

This is the correct spec

[ ] Shell demo is missing both the collapsed side bar and the expanded panel; also the collapsed side bar has a fixed width of 48px at every breakpoint where it appears; the open side panel has a fixed with of 256px

This is the correct spec at DESKTOP

[ ] Show/hide functionality on code snippets (you said this may have to be deferred but I wanted to include it in the list

Tablet and mobile views and code for certain examples:
Hide or add new code to reflect 8 column options at tablet and 4 column options at mobile for the following

[ ] Respsonsive options demo

spec

[ ] Offsetting columns demo

spec

[ ] Shell open (panel) demo (the shell is a flyover, not a grid influencer in mobile and tablet)

spec

[ ] Shell collapsed (sidebar) demo (the collapsed sidebar is the SAME in tablet, just showing it for consistency, it ONLY changes in mobile, where it disappears)

spec

[ ] Equal width columns mobile

spec

Show/hide functionality on code snippets (you said this may have to be deferred but I wanted to include it in the list

@jeanservaas I updated the examples if you want to re-review. (I still need to double check the actual code snippets, but they should be displaying correctly)

hey Alison looks great, couple things

shell collapsed -- sidebar needs to have fixed width of 48px and panel needs to have a fixed width of 256px ... right now they both look too small

code snippet is not attached or wide enough here

gutter is 2px in the condensed scenario right now this looks like 1px... looks good, but just want to make sure that it's accurate

weird margin bottom under H4s here in mobile

Hey girl, very small thing

just looking at this, not sure the 1:1's are actually square at tablet mobile, just want to double check

just need to streamline the margin bottoms for comfortable, cozy and condensed in tablet and mobile, (can condensed margin bottom match the top two)?

both of those should be fixed now @jeanservaas

@jeanservaas just merged in your latest updates, so everything should be in this branch now 🙏

Hi Alison,
I think this is almost ready to go. Jan and Anna's comments have been resolved.

I'm wondering if we should hide the code snippet for for the Narrow grid mode as @joshblack suggested (Jan changed the names from Comfortable and Cozy to Wide and Narrow) — even though the code class name is different than the name of the grid mode... @aagonzales made the point that if it's not going to be updated anytime soon... shouldn't people just be able to use it as is and we make a note?

I notice the names Comfortable and Cozy are still in some of the class names in your code...although i don't see them in the actual build. Not sure if anything needs to be changed on the code end since Comfortable and Cozy have been changed to Wide and Narrow.

I notice the names Comfortable and Cozy are still in some of the class names in your code

Those classnames are just there so I can target the different colors for the demos, I updated them to match the new naming conventions.

@emyarod it was renamed in the nav to 2xgrid and another tab was added, the first page content is basically the same with a  few edits

@jeanservaas just waiting on your final approval to merge! let me know if there are any updates still needed


bug: DGS Webflux subscriptions' responses different to DGS MVC WebSocket

Please read our contributor guide before
creating an issue.
Expected behavior
Consistent behaviour between DGS Webflux (Reactive) and DGS MVC subscriptions
Actual behavior
Given the following Graphql subscription:
type Subscription {
    stocks: Stock
}

type Stock {
    name: String
    price: Float
}

Given the following query
subscription StockWatch { stocks { name price } }

Then, DGS Webflux subscription response:
{
    "errors": [],
    "data": {
        "stocks": {
            "name": "NFLX",
            "price": 500.0
        }
    },
    "extensions": null,
    "dataPresent": true
}

Then, DGS MVC subscription response:
{
    "data": {
        "stocks": {
            "name": "NFLX",
            "price": 500.0
        }
    },
    "errors": []
}

The DGS Webflux subscription adds two extra fields, extensions and dataPresent, to its response.
This issue is twofold, firstly dataPresent is not part of the Graphql Spec. Secondly, WebSocketGraphQLClient does not support responses that contain extensions or dataPresent.
Using  WebSocketGraphQLClient to subscribe to a DGS Webflux subscription throws the following exception:
reactor.core.Exceptions$ErrorCallbackNotImplemented: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "extensions" (class com.netflix.graphql.types.subscription.DataPayload), not marked as ignorable (2 known properties: "data", "errors"])
Steps to reproduce
Run the following test - DGS Webflux subscription. It will fail.
Tes DGS Webflux Websocket Subscription
There is an existing test for DGS MVC subscription. It will pass.
Tes DGS MVC Websocket Subscription
_Note: A test case would be highly appreciated, but we understand that's not always possible
Useful pointers
DGS Webflux subscription response
DGS MVC subscription response
Payload used by WebSocketGraphQLClient

Fixed by #1050


advanced search might be broken?

I cannot select  "submit" after selecting a GO term.....

Hmm its working now but my history was just wiped so something happened?

Hopefully that was just a temporary glitch while switching to HTTPS.


Is there a way to not keep idle connections?

It seems that establish_idle_connections() is called on drops (and some other places):
https://github.com/sfackler/r2d2/blob/711af4b38fd68a9be2c6a5a0465f2c2002f5b87a/src/lib.rs#L193
So r2d2 always have certain number of (idle) connections, and the setting idle_timeout is not very useful. Could you please share why is it decided that way? Thank you.

The minimum number of connections in the pool is controlled by https://docs.rs/r2d2/0.8.9/r2d2/struct.Builder.html#method.min_idle.
Generally speaking, the entire point of a connection pool is to keep connections around between uses so they're immediately available next time a request comes in.

Thank you.
min_idle is fine for "keeping x number of connections around". It'd be nice though that x doesn't have to be max_size almost all the time. It'd help in an environment where the DB is shared and prefer clients to play nice instead of  keeping too many connections at all time (many of which are idle).

Why would min_idle have to be max_size almost all the time?

Sorry I didn't make it clear. I was just describing what r2d2 is doing currently.
Let use an example: if we set min_idle=1 and max_size=10, then r2d2 will not only maintain at minimum 1 idle connection (which is great) but it also try to maintain exactly 10 connections at almost all time (which is not very flexible).
I think with this config, the behavior should be:
A. keep at least 1 idle connection
B. open at max 10 connections. And do not pro-actively try to open more idle connections than min_idle
Please correct me if my observation is wrong. Thank you.

What specific conditions do you mean when you refer to "at almost all time"? If there is no usage of the pool, it will tend towards having exactly min_idle connections in it. If a single thread is using the pool, that will result in min_idle + 1 connections existing.

From what I have tried, one case is: when a connection reaches idle_timeout, it is dropped, but a new idle connection is created right away filling the place.
From what I understand from the code, it does that in every case (during drop_conn, establish_idle_connection is called - as referenced in the opening post above)

establish_idle_connections only adds connections up to min_idle. If the pool is already larger than min_idle, establish_idle_connections does not create new connections.

ohhhhhhh yes, I see why, the default value for min_idle is equal to max_size. I'm sorry I missed this. I thought default value is 0 :D
It seems to be a weird default choice though.
Anyway I think we can close this issue. Thank you very much.


Parameter 'context' is not use in Basic Sample

The parameter context is not use in DatabaseCreator.java

DatabaseCreator was removed entirely in #231


Replace CDK random suffix with Pulumi random suffix

Hello!

Vote on this issue by adding a 👍 reaction
If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

CDK automatically adds a random suffix to the resource logicalId to make the name that is eventually generated by CFN unique. We use the LogicalId as the Pulumi resource Id and then autonaming will add it's on random suffix so we end up with two random suffixes which does not look great. For example, we might end up with a role name like testapimyapiCloudWatchRoleA84BAE8E-120b18f
The cdk.Stack class has a protected property allocateLogicalId which is responsible for creating this LogicalId. We should override this method to having our own naming logic.
Affected area/feature

Added to epic https://github.com/pulumi/home/issues/2191


Provide users the ability to test submitting an expense.

This issue builds on the: Provide users a way to test SmartScan without a real receipt #51513
Problem: People are interested in testing submitting an expense to someone, but either don't have someone to submit to, or don't trust the product enough to risk submitting to them.
 If a user has never submitted to a fake boss, input a user Bobby Boss (test with me<EMAIL_ADDRESS>as their recent contact in the Submits to field so users can then try submitting a fake IOU.
When the user clicks Submit $X.XX we'll then drop the user in a DM with Bobby Boss, auto-approve the expense, and send a message like:

[Expensepreview]
See how easy that was! Now you can expense, at the speed of chat! Try submitting to your real boss and get $250 when your team adopts.
Have any questions on how Expensify works? Chat with concierge here.

We're working on mocks for this so still making progress.

Closing this one because I think the other one is more important. It's going to end up being one issue I'd guess. https://github.com/Expensify/App/issues/51513


Cannot not handle X-Forwarded-For properly

Using caddy as reverse proxy and Cloudflare as CDN service.
Cannot read client real IP with header X-Forwarded-For
Part of caddy configuration:
            {
              "match": [
                {
                  "host": ["example.com"]
                }
              ],
              "handle": [
                {
                  "handler": "subroute",
                  "routes": [
                    {
                      "match": [
                        {
                          "path": ["/dns-query"]
                        }
                      ],
                      "handle": [
                        {
                          "handler": "reverse_proxy",
                          "headers": {
                            "request": {
                              "set": {
                                "X-Forwarded-For": ["{http.request.header.CF-Connecting-IP}"]
                              }
                            }
                          },
                          "upstreams": [
                            {
                              "dial": "<IP_ADDRESS>:8053"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "handle": [
                        {
                          "handler": "file_server",
                          "root": "/path/to/caddy"
                        }
                      ],
                      "terminal": true
                    }
                  ]
                }
              ]
            }

If I replace X-Forwarded-For with X-Real-IP, then the server is able to read client real IP. I don't know if this is caused by caddy or dns-over-https.

Doh-server is programmed to require the client IP to be a globally routable IP. (In other words, if your server is in the same private network with your client, doh-server may see something like <IP_ADDRESS> and decide to ignore that, since it cannot help with GeoDNS.)
Can you check whether the submitted X-Forwarded-For IP is a globally routable one?
If there are multiple X-Forwarded-For IPs, doh-server deletes any non-global IPs and then chooses the farthest one on the proxy chain for GeoDNS.

Using caddy as reverse proxy and Cloudflare as CDN service.
Cannot read client real IP with header X-Forwarded-For
Part of caddy configuration:

            {

              "match": [

                {

                  "host": ["example.com"]

                }

              ],

              "handle": [

                {

                  "handler": "subroute",

                  "routes": [

                    {

                      "match": [

                        {

                          "path": ["/dns-query"]

                        }

                      ],

                      "handle": [

                        {

                          "handler": "reverse_proxy",

                          "headers": {

                            "request": {

                              "set": {

                                "X-Forwarded-For": ["{http.request.header.CF-Connecting-IP}"]

                              }

                            }

                          },

                          "upstreams": [

                            {

                              "dial": "<IP_ADDRESS>:8053"

                            }

                          ]

                        }

                      ]

                    },

                    {

                      "handle": [

                        {

                          "handler": "file_server",

                          "root": "/path/to/caddy"

                        }

                      ],

                      "terminal": true

                    }

                  ]

                }

              ]

            }

If I replace X-Forwarded-For with X-Real-IP, then the server is able to read client real IP. I don't know if this is caused by caddy or dns-over-https.

No, it's correct, from cloudflare

close as likely to be wont fix


Can't Run Warping Inference

> sh test_VITON.sh
------------ Options -------------
batchSize: 32
data_type: 32
dataroot: /home/ec2-user/repos/VITON-HD
display_winsize: 512
fineSize: 512
gen_checkpoint: checkpoints/PFAFN/gen_model_final.pth
gpu_ids: [0]
input_nc: 3
isTrain: False
label_nc: 13
loadSize: 512
max_dataset_size: inf
nThreads: 1
name: cloth-warp
no_flip: False
norm: instance
output_nc: 3
phase: test
resize_or_crop: none
serial_batches: False
tf_log: False
unpaired: True
use_dropout: False
verbose: False
warp_checkpoint: checkpoints/warp_viton.pth
-------------- End ----------------
#training images = 64
/home/ec2-user/.conda/envs/dci-vton/lib/python3.8/site-packages/torchvision/transforms/transforms.py:332: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
  warnings.warn(
/home/ec2-user/.conda/envs/dci-vton/lib/python3.8/site-packages/cupy/cuda/compiler.py:464: UserWarning: cupy.cuda.compile_with_cache has been deprecated in CuPy v10, and will be removed in the future. Use cupy.RawModule or cupy.RawKernel instead.
  warnings.warn(
/home/ec2-user/.conda/envs/dci-vton/lib/python3.8/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  /opt/conda/conda-bld/pytorch_1646755903507/work/aten/src/ATen/native/TensorShape.cpp:2228.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
/home/ec2-user/.conda/envs/dci-vton/lib/python3.8/site-packages/torch/nn/functional.py:4193: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
  warnings.warn(
/home/ec2-user/repos/PF-AFN/PF-AFN_test/data/cp_dataset.py:67: RuntimeWarning: invalid value encountered in divide
  pose_data[9] = point + (pose_data[9] - point) / length_b * length_a
/home/ec2-user/repos/PF-AFN/PF-AFN_test/data/cp_dataset.py:68: RuntimeWarning: invalid value encountered in divide
  pose_data[12] = point + (pose_data[12] - point) / length_b * length_a

Script just breaks after writing all these warnings. I have no clue how the code should be updated to solve these warnings...

after #training images = 64, It shows no checkpoint, but I have already put PF-AFN/warp_model_final.pth and gen_model_final.pth,. Could you give me some suggestions?


Links to Neurosity console are broken

Going through the docs, the links to access the Neurosity console are not working.
Example page

Thanks for fixing this!


Fix: Docker image names in readme files

Good catch @akshay-ap !
Sorry for the delay in getting to this.
Some of the READMEs were fixed a while back.
There was one remaining README needing fixing. It was simpler just to change that one README via a new PR rather than use the PR here. That was done, see #98.
Thanks again for your contribution @akshay-ap :+1:

Good catch @akshay-ap !
Sorry for the delay in getting to this.
Some of the READMEs were fixed a while back.
There was one remaining README needing fixing. It was simpler just to change that one README via a new PR rather than use the PR here. That was done, see #98.
Thanks again for your contribution @akshay-ap :+1:


NameUsageIndexServiceEs timeout

This might have just been a temporary issue but 1141 failed to import with the error, "Dataset 1141 import failed. java.io.IOException: listener timeout after waiting for [30000] ms. Log to db." It might be related to  #297 but the stacktrace is different:
org.col.es.EsException: java.io.IOException: listener timeout after waiting for [30000] ms
	at org.col.es.NameUsageIndexServiceEs.indexDataset(NameUsageIndexServiceEs.java:62)
	at org.col.importer.ImportJob.importDataset(ImportJob.java:209)
	at org.col.importer.ImportJob.run(ImportJob.java:116)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: listener timeout after waiting for [30000] ms
	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:905)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:229)
	at org.col.es.EsUtil.deleteByQuery(EsUtil.java:104)
	at org.col.es.EsUtil.deleteDataset(EsUtil.java:90)
	at org.col.es.NameUsageIndexServiceEs.createOrEmptyIndex(NameUsageIndexServiceEs.java:179)
	at org.col.es.NameUsageIndexServiceEs.indexDataset(NameUsageIndexServiceEs.java:46)
	... 7 common frames omitted

No I don't think it's related to #297 but a perfomance issue of es's delete_by_query api. Will see if anything can be done about it

I have drastically pulled up the socket timeout & request timeout

Still get the 30000 ms timeout when the index is refreshed during indexing:
life.catalogue.es.EsException: java.io.IOException: listener timeout after waiting for [30000] ms
	at life.catalogue.es.name.index.NameUsageIndexServiceEs.indexAll(NameUsageIndexServiceEs.java:201)
	at life.catalogue.command.es.IndexAllCmd.run(IndexAllCmd.java:31)
	at life.catalogue.command.es.IndexAllCmd.run(IndexAllCmd.java:18)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
	at io.dropwizard.cli.Cli.run(Cli.java:79)
	at io.dropwizard.Application.run(Application.java:94)
	at life.catalogue.WsServer.main(WsServer.java:78)
Caused by: java.io.IOException: listener timeout after waiting for [30000] ms
	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:905)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:229)
	at life.catalogue.es.EsUtil.executeRequest(EsUtil.java:238)
	at life.catalogue.es.EsUtil.refreshIndex(EsUtil.java:192)
	at life.catalogue.es.name.index.NameUsageIndexServiceEs.indexAll(NameUsageIndexServiceEs.java:192)

This brings down the indexAllCmd. I will catch this and do a retry, but we really need to figure out how to increase the timeout in place here.

It says it times out after 30000ms ... so apparently we are up against another timout that you can set programmaticaly with the _deleteByQuery API (which now simply waits a day if necessary). Probably a lower-level timeout. Will look into it

seen today again:
INFO  [2019-12-14 06:28:15,995] life.catalogue.es.name.index.NameUsageIndexServiceEs: Index 89/221 dataset 2006
INFO  [2019-12-14 06:28:46,000] com.zaxxer.hikari.HikariDataSource: HikariPool-1 - Shutdown initiated...
INFO  [2019-12-14 06:28:46,008] com.zaxxer.hikari.HikariDataSource: HikariPool-1 - Shutdown completed.
life.catalogue.es.EsException: java.io.IOException: listener timeout after waiting for [30000] ms
	at life.catalogue.es.name.index.NameUsageIndexServiceEs.indexDatasetInternal(NameUsageIndexServiceEs.java:98)
	at life.catalogue.es.name.index.NameUsageIndexServiceEs.indexAll(NameUsageIndexServiceEs.java:213)
	at life.catalogue.command.es.IndexCmd.run(IndexCmd.java:57)
	at life.catalogue.command.es.IndexCmd.run(IndexCmd.java:20)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
	at io.dropwizard.cli.Cli.run(Cli.java:79)
	at io.dropwizard.Application.run(Application.java:94)
	at life.catalogue.WsServer.main(WsServer.java:78)
Caused by: java.io.IOException: listener timeout after waiting for [30000] ms
	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:905)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:229)
	at life.catalogue.es.EsUtil.executeRequest(EsUtil.java:234)
	at life.catalogue.es.EsUtil.deleteByQuery(EsUtil.java:175)
	at life.catalogue.es.EsUtil.deleteDataset(EsUtil.java:106)
	at life.catalogue.es.name.index.NameUsageIndexServiceEs.createOrEmptyIndex(NameUsageIndexServiceEs.java:226)
	at life.catalogue.es.name.index.NameUsageIndexServiceEs.indexDatasetInternal(NameUsageIndexServiceEs.java:81)

It is still happening, today on dev when importing Index Fungorum:

EsException: java.io.IOException: listener timeout after waiting for [30000] ms

@ayco-at-naturalis this is still an important issue to address!

OK, I will look into this. My other project is a bit in completion fever but next week I will definitely all the major things: push all the streamlined/pruned es code; fix the NPE, and this.

NPE is done now

I'm afraid it will get undone because I think there is no other way but to replace the entire es folder in master with what I did last week. Do you you which issue it was? It will have to be reopened

@ayco-at-naturalis please do not blindly replace the existing code but try to properly merge it back in. There have been a few small changes and depending on when you last pulled the entire maven module names and directories have changed when the colplus- prefixes have been removed. Here are the small changes: https://github.com/CatalogueOfLife/backend/commits/master/dao/src/main/java/life/catalogue/es

I have tried, but I have re-distributed and renamed the
code/classes/packages so drastically, it was a hopeless exercise. I try to
locate  the changes you mentioned and fix them
On Fri, 20 Mar 2020 at 16:43, Markus Döring<EMAIL_ADDRESS>wrote:

@ayco-at-naturalis https://github.com/ayco-at-naturalis please do not
blindly replace the existing code but try to properly merge it back in.
There have been a few small changes and depending on when you last pulled
the entire maven module names and directories have changed when the
colplus- prefixes have been removed. Here are the small changes:
https://github.com/CatalogueOfLife/backend/commits/master/dao/src/main/java/life/catalogue/es
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/CatalogueOfLife/backend/issues/435#issuecomment-601767082,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABXJ6PZNEMHEK3IL5GRYNZDRIOFK5ANCNFSM4IIWIBYA
.

--
Met vriendelijke groet,
Ayco Holleman
Lead Programmer
+31717519245 - -
<EMAIL_ADDRESS>- www.naturalis.nl
Darwinweg 2, 2333 CR Leiden
Postbus 9517, 2300 RA Leiden
https://www.naturalis.nl/over-ons https://www.naturalis.nl/lang-leve

Note that while I did all this this reshuffling under es, meanwhile the containing folders had changed names (colplus-dao -> dao). That exceeded my merge capacities

@gdower got some timeouts today again.
It might be good to check that we use batch requests properly, but also that our ES instance is setup/tuned correctly: https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-indexing-speed.html
@ayco-at-naturalis can you investigate and report all of this here through the ES API or do you need my help to check installation details which you cannot retrieve from the API?

@mdoering
Rest assured I studied that article rather meticulously ...
Otherwise, I think the problem is a bit more subtle than I initiallly thought. I saw you introduced some multi-threading (asynchronicity)  in the (es) indexAll method. This in itself is not necesarrily a problem (the timeout anyhow seems to be especially rampant with delete_by_query requests), but we need to introduce it elsewhere so we can control what happens if individual bulk or delete_by_query requests fail.
Also I think we should really use at most one extra thread besides the main thread, certainly initially.
In other words ... this takes a bit more time than today.

the indexAll method worked fine last time I used it with 4 threads, no timeouts then.

OK - so indexAll now consistently works fine? The 2nd stack trace really seems about the indexing itself (more precisely refresh waiting for the indexing to complete.
Interesting that 4 threads do matter. You would say that Java/Postgres data retrieval/transformation can hardly outpace Elasticsearch indexing the data.

The Postgres (and ES) server has 32 cores so it can obviously handle multithreaded reads well. The multithreaded indexing is not only for throwing data at ES - most of the bottleneck is the notoriously complex SQL to generate the rich NameUsageWrapper instances. If you profile the indexAll method you will get > 85% of time spent waiting for postgres

Will tentatively close this for now, although we can only know for sure if my modifications work as time goes on


abc9: tolerate &mfs failure by writing output file before calling it (and using that if it fails)

Since &mfs can give a decent QoR improvement, I'm loathe to flat out disable it (my first approach). This PR does two things:
(a) write the output file before every &mfs call
(b) tolerate ABC9 with nonzero exit code (downgrading error to a warning) if output file exists
The idea is that even if &mfs fails -- at least with the default script -- we can still use the pre-&mfs result as if it was disabled. This approach makes less sense when using some more complex scripts like:
https://github.com/YosysHQ/yosys/blob/ae115fa3aac9acf7534b3f7c08afaa1b86bfc4ad/passes/techmap/abc9.cc#L45-L76
in which multiple mapping rounds using &save/&load may be superior to one round with &mfs.
In those cases, you may wish to disable &mfs explicitly using:
scratchpad -set abc9.nomfs 1
before:
synth_{ecp5,xilinx} -abc9 (the two architectures known to trigger it so far)

Horrible suggestion: given &mfs only rarely breaks and does give a QoR improvement, what about detecting the failure and only then rerunning abc without &mfs in the script?

Horrible suggestion: given &mfs only rarely breaks and does give a QoR improvement, what about detecting the failure and only then rerunning abc without &mfs in the script?

Less horrible: write out an AIG before and after &mfs, and prefer the latter.

@daveshah1 What do you think of 3d7b98335? I've left the abc9.nomfs option behind as using other flows without &mfs could mean it may still be superior to the result just before the first &mfs (plus there are &save/&load considerations too).

Seems reasonable to me, I don't have a testcase to hand either though.

Just tested and can confirm it works.
I have used 215ac18f736cff06a4186e11b9abaa3d669f32e7 commit hash of dev branch of https://github.com/SpinalHDL/SaxonSoc.git which is known to cause this issue.

Thanks @kost! Would you mind uploading the Verilog somewhere, I can't seem to get it working. Even better would be if you could minimise the design to find a small testcase that triggers it -- in my experience that can be quite hit-or-miss so don't worry if you're not successful.

@eddiehung managed to extract the generated verilog and it is located here:
http://misc.linux.hr/ulx3s/yosys-bugs/yosys-abc9-sigabrt.tar.gz
Just untar it and run make. Just tested that it generates the error reported.
Minimisation of the Verilog I would leave to experts like you. If you're able to document how you do it, i'll be happy to do it myself next time.

@eddiehung managed to extract the generated verilog and it is located here:
http://misc.linux.hr/ulx3s/yosys-bugs/yosys-abc9-sigabrt.tar.gz
Just untar it and run make. Just tested that it generates the error reported.
Minimisation of the Verilog I would leave to experts like you. If you're able to document how you do it, i'll be happy to do it myself next time.

Thanks @kost, really appreciate you doing that. I can reproduce the assertion fail on latest master (db27f2f37). I'm in the process of minimising it right now, once it succeeds I'll explain my process (which I've made much less ad-hoc now that I have to explain it to someone!)
However, even after all that, the problem I've run into the past and am running into here is that any testcase for this is very brittle. The same case doesn't fire an assertion on 57d6bd365 of #1926 which applies ABC9 in a slightly different way.

Guys, is &mfs in ABC still broken ? I cannot compile my two year old project based on VexRiscV (pretty basic one), it asserts at this very same please with -abc9 option enabled . If I disable -abc9, it passes synth ok, but the design does not fit into ECP5 (25k). Two years ago it worked fine, -abc9 worked and it did a load of optimization producing working bitstream. Please advise.

Hi, it seems to be still broken :
68.21.5. Executing ABC9.
Running ABC command: "/yosys-abc" -s -f /abc.script 2>&1
ABC: ABC command line: "source /abc.script".
ABC:
ABC: + read_lut /input.lut
ABC: + read_box /input.box
ABC: + &read /input.xaig
ABC: + &ps
ABC: /input : i/o =    835/    630  and =    7481  lev =   46 (5.91)  mem = 0.14 MB  box = 429  bb = 380
ABC: + &scorr
ABC: Warning: The network is combinational.
ABC: + &sweep
ABC: + &dc2
ABC: + &dch -f
ABC: + &ps
ABC: /input : i/o =    835/    630  and =    9442  lev =   27 (3.92)  mem = 0.16 MB  ch = 1401  box = 429  bb = 380
ABC: + &if -W 300 -v
ABC: K = 7. Memory (bytes): Truth =    0. Cut =   60. Obj =  140. Set =  636. CutMin = no
ABC: Node =    9442.  Ch =  1088.  Total mem =    1.90 MB. Peak cut mem =    0.30 MB.
ABC: P:  Del = 5157.00.  Ar =   10144.0.  Edge =    12494.  Cut =   102955.  T =     0.02 sec
ABC: P:  Del = 4991.00.  Ar =    9903.0.  Edge =    12237.  Cut =   101767.  T =     0.03 sec
ABC: P:  Del = 4991.00.  Ar =    4012.0.  Edge =     9319.  Cut =   242423.  T =     0.05 sec
ABC: F:  Del = 4990.00.  Ar =    2755.0.  Edge =     8181.  Cut =   202456.  T =     0.05 sec
ABC: A:  Del = 4987.00.  Ar =    2576.0.  Edge =     7525.  Cut =   191173.  T =     0.07 sec
ABC: A:  Del = 4987.00.  Ar =    2557.0.  Edge =     7495.  Cut =   197294.  T =     0.07 sec
ABC: Total time =     0.29 sec
ABC: + &write -n /output.aig
ABC: + &mfs
ABC: Assertion failed: (iLitNew >= 0), function Gia_ManInsertMfs, file src/aig/gia/giaMfs.c, line 386.
Warning: ABC: execution of command ""/Users/me/Applications/oss-cad-suite/libexec/yosys-abc" -s -f /var/folders/f3/3fbt1wk95112sbbw8wbk8t640000gn/T/yosys-abc-tweXaM/abc.script 2>&1" failed: return code 134.

Will try to report it upstream.

//=========================================================================
// Baud rate generators
//=========================================================================

reg        r_tx_ena;
reg [11:0] v_tx_gen; // no error when moved here !!

always@(posedge bus_rst or posedge bus_clk) begin : TX_BAUD_RATE

//reg [11:0] v_tx_gen; // if declared here .... error with return code 134 !!!!!! //

    if (bus_rst) begin
        r_tx_ena <= 1'b0;
        v_tx_gen <= 12'd0;
    end
    else begin
        // Transmitter
        if (v_tx_gen == 12'd0) begin

            v_tx_gen <= 12'd216; // 115200 @ 25 MHz
            //v_tx_gen <= 12'd433; // 115200 @ 50 MHz
            //v_tx_gen <= 12'd867; //115200 @ 148.5 MHz
            //v_tx_gen <= 12'd1288; //115200 @ 148.5 MHz
            //v_tx_gen <= 12'd1301; //115200 @ 150 MHz
            //v_tx_cnt <= 12'd1170; //115200 @ 135 MHz
            //v_tx_cnt <= 12'd867; // 115200 @ 100 MHz
            //v_tx_cnt <= 12'd703; // 115200 @ 81 MHz
            //v_tx_cnt <= 12'd86;  // 115200 @ 10 MHz
            //v_tx_cnt <= 12'd171; // 115200 @ 20 MHz

            r_tx_ena <= 1'b1;
        end
        else begin
            v_tx_gen <= v_tx_gen - 12'd1;
            r_tx_ena <= 1'b0;
        end
    end
end


Snackbar

I've added newlines and fixed enum type cases where necessary to make the tests pass.

I signed it!
(Google CLA)

Thanks for the PR @michel-zimmer!
@sgomes Can you take a look at this? I’m not yet proficient in Closure :fearful:

Thanks for the PR, @michel-zimmer! I'm a bit confused by it, though.
It seems to be making changes to the demo.js file for the animation component, yet is being PRed against the snackbar branch? That's an experimental branch where @Garbee is implementing a new component; our main development is instead happening in master.
Also, the changes seem to be partly a regression, in that you're switching to String and Number, which would be wrapper types instead of native objects, and thus discouraged. Could you elaborate on which tests were failing with string and number?

(Sry, for the delay.)
Looks like it has been resolved in another place and MDL had nothing to do with it.
I was trying to compile a version including snackbars.
When I ran gulp all, it failed with two different errors - each multiple times.
One was the "need" for a new line before tags dfb88c0f0ef25aa7.
And the other was not using the "correct type" for the enums 3e60f386ebe9de32.
"..." because I don't remember the exact fail message.
However, I'm unable to reproduce the error with a fresh clone, checkout and npm install now. (Even though, I reproduced it before I posted the PR.)
My best guess (I consider myself far from being an experienced dev) is that something changed within the dependencies.


main published example is showing up at my feet

tried updating headset and didnt fix it
same thing with battery and power
going to grab the dev log later since others might hit this if their headset gets stuck in whatever odd configuration mine currently is in

creating this issue as a starting point - not an issue across all users, just odd and i want to make sure it gets tracked or close in case people hit this as well in future

examples.mrjs.io
https://github.com/Volumetrics-io/mrjs/assets/19377312/7eb48a4a-3453-42ef-8ca1-a1b70e6774eb

meta quest browser had an update changing origin of webxr - per michael: https://discord.com/channels/1137890872688660500/1137891148573200514/1205347724896112701
 OTA for the browser. Origin used to be in the middle of the room now it's the floor.

more notes: https://discord.com/channels/1137890872688660500/1137891148573200514/1205957234656419840
the browser is interpetting 'local' referenceSpace as 'local-floor' for webXR sessions, making the floor the origin, so the panel appears on the ground instead of in front of the usder if it has no set anchor value.

https://github.com/mrdoob/three.js/issues/27727

since https://github.com/Volumetrics-io/mrjs/issues/389 is closed, this should be as well, closing


feat: fiat currencies support for application

Description
Blocked by: https://github.com/shapeshift/lib/pull/495
also needs: #1342 for tests to pass.
WIP: adding support for top 20 fiat currencies other than USD
Notice

[x] Have you followed the guidelines in our Contributing guide?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Pull Request Type

[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[x] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)
Risk
Sending crypto with the amount chosen in fiat is not tested yet... so test it at your own risk (there probably will be a small difference in the fiat amount).
Testing
Open up the settings modal and change your currency to the 20 options available,
all of the prices in the app should respect the chosen fiat.
Screenshots (if applicable)

@stackedq You might want to mergefix this, currently there are 27 conflicted files

closing in favor of

https://github.com/shapeshift/web/pull/1859
https://github.com/shapeshift/web/pull/1873


[PM-1681] Remove peergroups unused by midnight

tag created https://github.com/input-output-hk/scalanet/releases/tag/v0.1.7


[new] Add SummarizationLoader

Description：增加了jsonl格式的summarization dataset loader
Main reason: 扩充dataset loader的适用性
Checklist  检查下面各项是否完成
Please feel free to remove inapplicable items for your PR.

[√] The PR title starts with [$CATEGORY] (例如[bugfix]修复bug，[new]添加新功能，[test]修改测试，[rm]删除旧代码)
[√] Changes are complete (i.e. I finished coding on this PR)  修改完成才提PR
[ ] All changes have test coverage  修改的部分顺利通过测试。对于fastnlp/fastnlp/的修改，测试代码必须提供在fastnlp/test/。
[√ ] Code is well-documented  注释写好，API文档会从注释中抽取
[ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change  修改导致例子或tutorial有变化，请找核心开发人员

Changes: 逐项描述修改的内容

添加了新模型；用于文本摘要的dataset_loader，适用于预处理成jsonl的CNN/Daily Mail, Newsroom, NYT, DUC2002数据集

Mention: 找人review你的PR

Codecov Report

Merging #158 into master will increase coverage by 12.02%.
The diff coverage is 14.28%.

@@            Coverage Diff             @@
##           master    #158       +/-   ##
==========================================
+ Coverage   60.48%   72.5%   +12.02%
==========================================
  Files         101      83       -18
  Lines        8958    7474     -1484
==========================================
+ Hits         5418    5419        +1
+ Misses       3540    2055     -1485

Impacted Files
Coverage Δ

fastNLP/io/dataset_loader.py
49.3% <14.28%> (-4.89%)
:arrow_down:

fastNLP/core/callback.py
67.88% <0%> (-1.23%)
:arrow_down:

reproduction/Chinese_word_segmentation/utils.py

reproduction/HAN-document_classification/train.py

reproduction/CNN-sentence_classification/model.py

reproduction/CNN-sentence_classification/train.py

...oduction/HAN-document_classification/preprocess.py

...production/HAN-document_classification/evaluate.py

reproduction/Char-aware_NLM/test.py

...eproduction/CNN-sentence_classification/dataset.py

... and 10 more

Continue to review full report at Codecov.

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


Fix _RESOLVER_TYPE for async functions

Description
Fixes generic type arguments for Coroutine in RESOLVER_TYPE. The given types are incorrect: It is Coroutine[YieldType, SendType, ReturnType].
This allows catching when the return type of an async resolver is incompatible with the field type. For example:
async def resolver_func() -> int:
  ...

# currently not caught by typechecker
field: str = strawberry.field(resolver=resolver_func)

With the change made in this PR, the above code will be caught by typecheckers.

Types of Changes

[ ] Core
[x] Bugfix
[ ] New feature
[ ] Enhancement/optimization
[ ] Documentation

Issues Fixed or Closed by This PR

Fixes #3071

Checklist

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Hi, thanks for contributing to Strawberry 🍓!
We noticed that this PR is missing a RELEASE.md file. We use that to automatically do releases here on GitHub and, most importantly, to PyPI!
So as soon as this PR is merged, a release will be made 🚀.
Here's an example of RELEASE.md:
Release type: patch

Description of the changes, ideally with some examples, if adding a new feature.

Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :)
Here's the tweet text:
🆕 Release (next) is out! Thanks to Bryan Ricker for the PR 👏

Get it here 👉 https://beta.strawberry.rocks/release/(next)

I am converting this to Draft while I investigate some unexpected test failures

Unfortunately, according to Github, "the logs for this run have expired and are no longer available". This also hides the "re-run jobs" button for me. Could you try to mark this PR as ready for review? Hopefully this will trigger CI again and I can take a look.

Dynamic field creation failed (or may be i doing something wrong).
Suppose you have code
def create_get_data_format_query(obj: SomeClass) -> tuple[str, Any, Field[DataSchema]]:
    async def resolver_func() -> DataSchema:
        db = session_context.get()

        s = await SomeClass.load_from_database(db, obj.id)

        if s is None:
            raise ValueError

        return await serialize_schema(s) # This function return DataSchema and typing is ok

    resolver: StrawberryField = strawberry.field(
        resolver=resolver_func,
        name="get_schema", description="Get schema",
    )

    return "get_schema", DataSchema, field(default=resolver)

And this produce following error
error: Argument "resolver" to "field" has incompatible type "Callable[[], Coroutine[Any, Any, DataSchema]]"; expected
"StrawberryResolver[Never] | Callable[..., Never] | Callable[..., Coroutine[Any, Any, Never]] | Callable[..., Awaitable[Never]] | staticmethod[Any, Never] | classmethod[Any, Any, Never]"  [arg-type]
            resolver=resolver_func,

Why DataSchema become Never? What do i do wrong or what do typing do wrong?
I tried to change StrawberryField to DataSchema - it not hepled.


Need to use specific platform separator for paths defined in webpack.config.js

webpack.config.js:
var path = require('path');

module.exports = {
    ...
    resolve: {
        fallback: [
            __dirname,
            __dirname + '/js',

            // This is my preferred way, but it does not work in Windows:
            __dirname + '/../../dir1/dir2/dir3',

            // This works in Windows, but not in Linux:
            __dirname + '\\..\\..\\dir1\\dir2\\dir3',

            // This works both in Windows and Linux. I think it should be done internally by Webpack:
            path.join(__dirname, '/../../dir1/dir2/dir3')
        ]
    }
    ...
};

@sokra This also applies to include/exclude paths, is there a workaround there?

This also applies to include/exclude paths

yes.

is there a workaround there?

Just use the correct separator. Write helper functions... Use path.resolve.


Loading property not updated correctly on subsequent requests

There seems to be a bug with updates of loading property on subsequent requests.
export default new VueApollo({
  defaultClient: apolloClient,
  defaultOptions: {
    $loadingKey: 'loading'
  }
})

export default {
  name: 'ProjectsList',

  data () {
    return {
      projects: [],
      loading: 0
    }
  },

  apollo: {
    projects: {
      query: PROJECTS_QUERY,
      watchLoading (isLoading, mod) {
        console.log({
          loading: this.loading,
          isLoading,
          mod
        })
      },
      fetchPolicy: 'network-only'
    }
  }
}

I've added a watchLoading function to find out what's going on. On first load it works nicely and the results are:
{loading: 1, isLoading: true, mod: 1}
{loading: 0, isLoading: false, mod: -1}

Then when I change the route and come back later I get:
{loading: 0, isLoading: true, mod: 1}
{loading: 0, isLoading: false, mod: -1}

So obviously the loading is tracked, but for some reason it's not reflected to loading property on component.
I've noticed that this is only happening when using default $loadingKey. If I specify loadingKey directly in query options, it works, so that is a workaround for me atm.
However I've noticed that initially the Vue component is having apollo key in it's $options e.g.
$options: {
  apollo: {
    $init: true
    $loadingKey: "loading"
    projects: {
      query: { ... }
    },
    ...
  }
  ...
}

So the default options are merged to the component options, but later after route change, the apollo key is not in the $options anymore. It might be the cause why this.loadingKey getter called in applyLoadingModifier function returns undefined and the loading prop is never updated in that case.

Try how?


Product inventory reference-example-components install not successful

Description
Product inventory from reference-example installation not successfull.
$ kubectl get pods pq-productinventoryapi-6b98d866b5-stwsk -n components -o wide
NAME                                      READY   STATUS             RESTARTS        AGE   IP             NODE                                                 NOMINATED NODE   READINESS GATES
pq-productinventoryapi-6b98d866b5-stwsk   1/2     CrashLoopBackOff   7 (4m53s ago)   15m   <IP_ADDRESS>   gke-ihc-componentsteams-default-pool-8d72aae5-33rz
$ kubectl get exposedapis -n components
NAME                                             API_ENDPOINT                                                               IMPLEMENTATION_READY
pq-productinventory-partyrole                    https://<IP_ADDRESS>/pq-productinventory/tmf-api/partyRoleManagement/v4   true
pq-productinventory-productinventorymanagement   https://<IP_ADDRESS>/pq-productinventory/tmf-api/productInventory/v4
$ kubectl get components -n components
NAME                  DEPLOYMENT_STATUS
pq-productinventory   In-Progress-CompCon

I am also getting the following error installing the productcatalog component:
ODA-CANVAS-20124:Failed to list apis of ODA component instance[r1-productcatalogmanagement] in namespace[canvas]


Incorrect TextStyle applied to title  when using ListTile with PopupMenuItem

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce

Use a ListTile inside PopupMenuItem as suggested in the comments to include a leading icon.
TextTheme.bodyLarge is used on the title instead of the TextTheme.labelLarge as mentioned in the M3 spec.

Expected results
ListTile with a title style of TextTheme.labelLarge.
Actual results
ListTile with a title style of TextTheme.bodyLarge. The defaults of the ListTile is not being overriden by the PopupMenuItem when used with it.

Menu:

ListTile:

Code sample
Code sample
import 'package:flutter/material.dart';

void main() {
	runApp(const App());
}

class App extends StatelessWidget {
	const App({super.key});

	@override
	Widget build(context) {
		return MaterialApp(
			theme: ThemeData.dark(useMaterial3: true),
			home: Scaffold(body: Center(child: PopupMenuButton(
				offset: const Offset(0, 56),
				itemBuilder: (context, ) {
					final theme = Theme.of(context);
					final text = theme.textTheme;
					final colors = theme.colorScheme;

					return [
						const CheckedPopupMenuItem(
							checked: true,
							child: Text("Checked"),
						),
						const PopupMenuItem(
							child: ListTile(
								leading: Icon(Icons.check_rounded),
								title: Text("Checked"),
							),
						),
						PopupMenuItem(
							child: ListTile(
								leading: const Icon(Icons.check_rounded),
								title: Text("Checked", style: text.labelLarge?.copyWith(color: colors.onSurface)),
							),
						)
					];
				}
			)))
		);
	}
}

Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.10.2, on Arch Linux 6.3.5-arch1-1, locale en_US.UTF-8)
    • Flutter version 3.10.2 on channel stable at /home/<REDACTED>/Sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9cd3d0d9ff (2 weeks ago), 2023-05-23 20:57:28 -0700
    • Engine revision 90fa3ae28f
    • Dart version 3.0.2
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc2)
    • Android SDK at /opt/android-sdk
    • Platform android-33, build-tools 34.0.0-rc2
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+7)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 15.0.7
    • cmake version 3.26.4
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (2 available)
    • <REDACTED> (mobile) • <REDACTED> • android-arm64 • Android 12 (API 31)
    • Linux (desktop)     • linux      • linux-x64     • Arch Linux 6.3.5-arch1-1

[✓] Network resources
    • All expected network resources are available.

Hi @Curstantine
As far as I can see, it's displaying as expected:

md.sys.typescale.label-large.size: 14
md.sys.typescale.body-large.size: 16

labelLarge
bodyLarge

Verified on the latest Flutter master channel.
When applying labelLarge style to ListTile's title, it's displaying with md.sys.typescale.label-large.size. Is there anything that I'm missing here?

Sorry, I accidentally pressed on the close button.
In the specification, a menu item should use label large, which is respected in flutter if you directly use a Text widget inside a PopupMenuItem, but this senari

when using a ListTile, this text style restriction is ignored.

Sorry, but I'm still not clear this. As the demo below, ListTile and Text have been rendered the same size (labelLarge) as expected.

ListTile
Text

ListTile with a title style of TextTheme.bodyLarge

Can you please share the screenshot of your actual result along with the target environment info? (I don't think this is an issue on specific platform, though)

It does style when we override it, yes. But not on its own.
When a ListTile is used inside a PopupMenuItem, it should default to the labelLarge since the preferred way of adding icons and such to a PopupMenuItem is by using a ListTile.
ListTile uses its own default bodyLarge when it should've been defaulted to labelLarge when the parent is a MenuItem.
The reason I filed this issue is because it gets repetitive to override the text style everytime a MenuItem needs a leading/trailing icon.
As I pointed out in the second code, the PopupMenuItem overrides the default bodyLarge text style when a Text widget is used directly, but not when a ListItem nests a title Text widget.
[
	PopupMenuItem(
		child: Text("Text"), // Uses the TextStyle.labelLarge style
	),
	PopupMenuItem(
		child: ListTile(
			title: Text("ListTile"), // Uses the TextStyle.bodyLarge style when it should've been the TextStyle.labelLarge style
		),
	)
]

Ah, I see the issue now. I was not able to identify this because your original sample code has overrided labelLarge style to ListTile's title to work around this. I think you should mention expected "default" style in the original comment (same as your comment above)
M3 specs: https://m3.material.io/components/menus/specs#ad796ca6-3d66-4e7e-9322-c0d93bff5423

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.10.4, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
    • Flutter version 3.10.4 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 682aa387cf (2 days ago), 2023-06-05 18:04:56 -0500
    • Engine revision 2a3401c9bb
    • Dart version 3.0.3
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.66.0

[✓] Connected device (3 available)
    • Pixel 3a (mobile) • 964AY0WL20 • android-arm64  • Android 12 (API 32)
    • macOS (desktop)   • macos      • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 114.0.5735.106

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.12.0-3.0.pre.81, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
    • Flutter version 3.12.0-3.0.pre.81 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5f8000aa75 (78 minutes ago), 2023-06-12 21:51:08 -0400
    • Engine revision d02b15ef34
    • Dart version 3.1.0 (build 3.1.0-201.0.dev)
    • DevTools version 2.24.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.79.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.66.0

[✓] Connected device (4 available)
    • Pixel 3a (mobile) • 964AY0WL20                               • android-arm64  • Android 12 (API 32)
    • iPhone (mobile)   • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.7.2 19H218
    • macOS (desktop)   • macos                                    • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
    • Chrome (web)      • chrome                                   • web-javascript • Google Chrome 114.0.5735.106

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Hi @Curstantine
This is working as expected. ListTile and PopupMenuItem are two separate widgets using their correct default text styles.

ListTile with a title style of TextTheme.bodyLarge. The defaults of the ListTile is not being overriden by the PopupMenuItem when used with it.

PopupMenuItem isn't supposed to detect differences and override their style. Please share a link to specs if this is incorrect

Use a ListTile inside PopupMenuItem as suggested in the comments to include a leading icon.

Check out CheckedPopupMenuItem to achieve.  If you can wanna still use ListTile, you can provide a custom style.
Closing as this isn't actionable.

@TahaTesser
CheckedPopupMenu still uses the incorrect text style, and more to the point, it does not allow you to specify your own icon over the internal checkmark icon. Refer to the code posted in this comment to compare.
The PopupMenuItem documentation mentions that:

Typically the child of a PopupMenuItem is a Text widget. More elaborate menus with icons can use a ListTile.

CheckedPopupMenuItem is a wrapper on ListTile.  As the name suggests, it provides a check icon.

The PopupMenuItem documentation mentions that:

Typically the child of a PopupMenuItem is a Text widget. More elaborate menus with icons can use a ListTile

You can use  ListTile and customize the leading icon and style as the doc suggests.

But that would imply you modify every item in your list with a new text style if you want to have an icon that is not a checkmark. Even then, as I mentioned earlier, even CheckedPopupItem is using the incorrect text style. It is using the style of the default ListTile instead of the one specified in menu specification.
Link to the related spec: https://m3.material.io/components/menus/specs#ad796ca6-3d66-4e7e-9322-c0d93bff5423

A

That sounds fair. It is a little too tide to ListTile.
Now I can also there is an animation for the leading icon. If we use ListTile, we have to copy the animation too.
I'll fix this.

Fixing this for Material 3 specs will also bring quality improvements.

(blocked by https://github.com/flutter/flutter/issues/128877)