[feat] Option to set dev server URL manually for @vite (without touching server.hmr)

Hi, very glad to see an official integration for vite in laravel. Much respect for the work! :+1:
I tried to integrate this with DDEV, a local PHP development environment system based on Docker.
Vite runs inside the docker container. The following vite.config.ts is needed to get this working with DDEV router (a reverse proxy. Vite must respond to all network requests via <IP_ADDRESS>:
/* vite.config.ts */
  server: {
    // respond to all network requests
    host: '<IP_ADDRESS>',
    strictPort: true,
    port: 3000
  },

For the HTML output of @vite it would be needed to use the following custom URL
https://my-laravel-project.ddev.site:3000

which would result in
<script type="module" src="https://my-laravel-project.ddev.site:3000/@vite/client"></script>

But: For the above posted config larave/vite-plugin currently resolves the following in public/hot, which doesn't work (of course):
http://[::]:3000

I saw that the dev server URL resolve is handled here:
/**
 * Resolve the dev server URL from the server address and configuration.
 */
function resolveDevServerUrl(address: AddressInfo, config: ResolvedConfig): DevServerUrl {
    const configHmrProtocol = typeof config.server.hmr === 'object' ? config.server.hmr.protocol : null
    const clientProtocol = configHmrProtocol ? (configHmrProtocol === 'wss' ? 'https' : 'http') : null
    const serverProtocol = config.server.https ? 'https' : 'http'
    const protocol = clientProtocol ?? serverProtocol

    const configHmrHost = typeof config.server.hmr === 'object' ? config.server.hmr.host : null
    const configHost = typeof config.server.host === 'string' ? config.server.host : null
    const serverAddress = address.family === 'IPv6' ? `[${address.address}]` : address.address
    const host = configHmrHost ?? configHost ?? serverAddress

    return `${protocol}://${host}:${address.port}`
}

I discussed this at length with DDEV users and DDEV maintainer and they gave me the advice that I should not fiddle around with server.hmr-settings in vite.config.ts because this is not suited for a reverse proxy usage. (Tested it, vite doesn't connect when using hmr.host etc.). (Discussion)
Demo repo: https://github.com/mandrasch/ddev-laravel-breeze-vite#readme
Proposal:
When I manually overwrite public/hot with https://my-laravel-project.ddev.site:3000 everything works fine.
Therefore I would like to suggest to introduce another config option to manually overwrite the dev server url output for @vite.
For example innocenzi/laravel-vite offers an manual override with DEV_SERVER_URL in .env / config/vite.php.
Thanks very much in advance, this may be really helpful for other docker use cases as well I guess!
Best regards, Matthias

Hi @mandrasch,
server.hmr is the offical way of customising Vite to look for the dev server in a different location than it's served, as is the case when using a reverse proxy. This is specifically mentioned in the Vite docs at https://v2.vitejs.dev/config/#server-hmr.
The Laravel Vite plugin also looks at this configuration to determine how to write to the hot file, which makes it consistent with Vite.
I would imagine you'd need at least the following config:
server: {
  // Listen on all addresses inside the container
  host: true,
  hmr: {
    // Force the Vite client to connect via SSL
    // This will also force a "https://" URL in the hot file
    protocol: 'wss',
    // The host where the Vite dev server can be accessed
    // This will also force this host to be written to the hot file
    host: 'my-laravel-project.ddev.site',
  },
},

The port config is optional, but with Vite 3 changing the default port to 5173, you may want to specify it as we have running inside using Sail.
I'm not sure how your traffic is routed from my-laravel-project.ddev.site:3000 to the Vite server running inside the container, but you may need to config Docker port publishing for this port as well.

Closing this as this is more a support question. Please try a support channel if you need help integrating this with Docker.

Thanks very much for responding so fast! 👍
I tried your suggestion and it breaks vite responding to requests in DDEV. Unfortunately I'm not so deep into this to describe why it breaks. Guess the answer is somewhere in https://v2.vitejs.dev/config/#server-hmr (and as I stated other users advised not to user hmr).

I'll try a support channel as you suggested.

Got Enzos take on this (via Discord vite - laravel), asked him why he chose DEV_SERVER_URL as feature in his vite integration:

The official integration and mine chose a different approach, where they communicate with PHP from Vite through creating a file on the disk with an URL, while I communicate from PHP to Vite and let the user configure stuff that could have been auto-generated
Each approach has its advantages, mine is to know the development server URL in advance
I think you can still manage to use their Integration by extending Vite and changing how the tags are generated

Quick update, details for the above comment for interested readers of this issue.
If I understood Enzo correctly,

the @vite Blade directive could be extended, basically it's line 28 which reads the vite dev server URL as string from public/hot https://github.com/laravel/framework/blob/baf526ed6e725d7aa0950b0675361f4009a892af/src/Illuminate/Foundation/Vite.php#L28

this could be changed to use APP_VITE_DEV_SERVER_URL (e.g. https://my-laravel-project.ddev.site:3000) from .env
the whole thing could be turned into a tiny composer package

This would allow it to work in use cases like Docker with the following vite.config without server.hmr.
/* vite.config.ts */
  server: {
    // respond to all network requests
    host: '<IP_ADDRESS>',
    strictPort: true,
    port: 3000
  },

(Background: Others and I had no luck with server.hmr in DDEV. (See DDEV discord discussion).

Hi @mandrasch,
server.hmr is the offical way of customising Vite to look for the dev server in a different location than it's served, as is the case when using a reverse proxy. This is specifically mentioned in the Vite docs at https://v2.vitejs.dev/config/#server-hmr.

This is a misunderstanding of server.hmr.
server.hmr controls what parameters are passed from the Vite dev server to the client.ts script that initiates the HMR web socket after the vite 'nub' script starts up and loads its assets from the vite dev server. It does not "to look for the dev server in a different location than it's served".  It tells client.ts where to look for web socket end point.  That's ALL it does.

The Laravel Vite plugin also looks at this configuration to determine how to write to the hot file, which makes it consistent with Vite.

I'm not a Laravel guy.  "hot file" is not a Vite term. What does this mean?

I would imagine you'd need at least the following config:
server: {
  // Listen on all addresses inside the container
  host: true,
  hmr: {
    // Force the Vite client to connect via SSL
    // This will also force a "https://" URL in the hot file
    protocol: 'wss',
    // The host where the Vite dev server can be accessed
    // This will also force this host to be written to the hot file
    host: 'my-laravel-project.ddev.site',
  },
},

Nope. wrong.
The problem is that @vite() need to resolve differently when you are behind a reverse proxy.  And server.hmr.host is definitely NOT referenced when @vite resolves to the script and style tags it creates.
See this issue  for more info.  But your information here is incorrect, and is frustrating people who are trying to get this to work.

The port config is optional, but with Vite 3 changing the default port to 5173, you may want to specify it as we have running inside using Sail.

I'm not sure how your traffic is routed from `my-laravel-project.ddev.site:3000` to the Vite server running inside the container, but you may need to config Docker port publishing for this port as well.

server.hmr is the offical way of customising Vite to look for the dev server in a different location than it's served, as is the case when using a reverse proxy. This is specifically mentioned in the Vite docs at https://v2.vitejs.dev/config/#server-hmr.

This is a misunderstanding of server.hmr.
server.hmr controls what parameters are passed from the Vite dev server to the client.ts script that initiates the HMR web socket after the vite 'nub' script starts up and loads its assets from the vite dev server. It does not "to look for the dev server in a different location than it's served". It tells client.ts where to look for web socket end point. That's ALL it does.

I'm not sure how this is really different from what I said. Perhaps I could have used better terminology:
server.hmr is the offical way of customising Vite the Vite client to look for the web socket end point of the dev server in a different location than it's served.

I'm not a Laravel guy. "hot file" is not a Vite term. What does this mean?

The "hot file" is a plain text file that this plugin writes to public/hot containing the resolved URL of the Vite HMR server. It is deleted when the Vite dev server is stopped. Laravel uses this file to determine if the Vite dev server is running and to know what URL to use as the base for script and link tags.

The problem is that @vite() need to resolve differently when you are behind a reverse proxy. And server.hmr.host is definitely NOT referenced when @vite resolves to the script and style tags it creates.

I'm not sure what version of this plugin you are using, but since v0.3.0 (this PR specifically) we respect server.hmr.host when determining what URL to write to the public/hot file:
https://github.com/laravel/vite-plugin/blob/89d74e4b87be2076d2139f7281c8162d9c94885a/src/index.ts#L340-L343

In particular, do not do this, which is what you are doing now:
<script type="module" src="[http://[::]:5173/@vite/client](view-source:http://[::]:5173/@vite/client)"></script><link rel="stylesheet" href="[http://[::]:5173/resources/css/app.css](view-source:http://[::]:5173/resources/css/app.css)" /><script type="module" src="[http://[::]:5173/resources/js/app.js](view-source:http://[::]:5173/resources/js/app.js)"></script>

I'm not aware of any situation where the @vite() directive would write that. Are those view-source parts actually being output, or is that a bad copy/paste?

server.hmr is the offical way of customising ~Vite~ the Vite client to look for the web socket end point of the dev server in a different location than it's served.

The trouble with most of the settings under server.hmr is that they either have side effects, or the client.ts script can infer what to do correctly, so the settings are irrelevant (this from sapphi-red, who reviewed some of my code on a vite integration).
server.hmr.host is Mostly Harmless, but Vite itself doesn't really need it.  Were I developing your integration, I'd hesitate to use it to change Laravel's behavior.  In particular, I've seen frustrated Laravel users play with server.hmr.https and server.hmr.port, which just makes their lives worse :-) At most they might want to play with server.hmr.clientPort.

I'm not a Laravel guy. "hot file" is not a Vite term. What does this mean?

The "hot file" is a plain text file that this plugin writes to public/hot containing the resolved URL of the Vite HMR server. It is deleted when the Vite dev server is stopped. Laravel uses this file to determine if the Vite dev server is running and to know what URL to use as the base for script and link tags.

To the file system??  Still haven't figured out where you guys mean with that.

The problem is that @vite() need to resolve differently when you are behind a reverse proxy. And server.hmr.host is definitely NOT referenced when @vite resolves to the script and style tags it creates.

I'm not sure what version of this plugin you are using, but since v0.3.0 (this PR specifically) we respect server.hmr.host when determining what URL to write to the public/hot file:

What version is bundled with Laravel v9.23.0?  I don't see a separate entry in composer.lock for the vite plugin.
In v9.23.0, @vite completely ignores server.hmr.host.

https://github.com/laravel/vite-plugin/blob/89d74e4b87be2076d2139f7281c8162d9c94885a/src/index.ts#L340-L343

In particular, do not do this, which is what you are doing now:
<script type="module" src="[http://[::]:5173/@vite/client](view-source:http://[::]:5173/@vite/client)"></script><link rel="stylesheet" href="[http://[::]:5173/resources/css/app.css](view-source:http://[::]:5173/resources/css/app.css)" /><script type="module" src="[http://[::]:5173/resources/js/app.js](view-source:http://[::]:5173/resources/js/app.js)"></script>

I'm not aware of any situation where the @vite() directive would write that. Are those view-source parts actually being output, or is that a bad copy/paste?

Nope.  Straight out of the view-source window on Firefox, without any formatting.  That is exactly what @vite() resolves to.

@jessarcher If you have the chance, take a look at this issue I just posted. It links a repo of a Laravel user I've been working with, which might make it easier for you to reproduce what we're seeing.

Not sure how the "view-source" stuff ended up in the link. Odd Firefox behavior Here's what I just pulled off view-source for the page in question, using Chrome instead:
<script type="module" src="http://[::]:5173/@vite/client"></script><link rel="stylesheet" href="http://[::]:5173/resources/css/app.css" /><script type="module" src="http://[::]:5173/resources/js/app.js"></script>
 ```

http://[::] is wrong. https://HOSTNAME would be right.

We're using Vite's configureServer hook to listen for when the Vite dev server is listening for connections:
https://github.com/laravel/vite-plugin/blob/89d74e4b87be2076d2139f7281c8162d9c94885a/src/index.ts#L146-L153
The configureServer hook gives us an instance of ViteDevServer which we can use to get the underlying Node HTTP server. From there, we can retrieve the address of the server, but it's only an address and not a hostname. Furthermore, if the server is listening on all addresses, then the only address it gives us is the meta "all addresses" address (:: or <IP_ADDRESS>).
This plugin only has access to what Vite gives us and what the user configures. It has no knowledge of hostnames outside of that.

I think it would be better to look at any proxy headers and get these that way, rather than hacking server.hmr's settings for this purpose.

How would Laravel Framework integration determine the appropriate Vite server address, including the port, from the proxy headers?
I've spun up the project you mentioned and can confirm that by default it tries to retrieve the assets from [::], which is expected, but does not work with this scenario:

If I use the following configuration, then it will successfully make the request to the intended location:
server: {
    hmr: {
        protocol: 'wss',
        host: 'my-laravel-app.ddev.site',
    },
},

I'm not sure what the pnpm error is - I'm not using pnpm though.

Not sure what the pnpm error is either, but probably not our problem, at least here :-)
I can confirm that with the hmr settings you recommend, that the tags now resolve to:
<script type="module" src="https://my-laravel-app.ddev.site:5173/@vite/client"></script><link rel="stylesheet" href="https://my-laravel-app.ddev.site:5173/resources/css/app.css" /><script type="module" src="https://my-laravel-app.ddev.site:5173/resources/js/app.js"></script>
 ```

Also, HMR comes up correctly, which means we have the thing working.

As for:

> How would Laravel Framework integration determine the appropriate Vite server address, including the port, from the proxy headers?

It's been a few years since I've played with these, but X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Host get transmitted across the reverse proxy IIRC.  You'd want the latter two. I'm not sure what PHP or Symfony's request handling (which IIRC Laravel uses, as Drupal and Symfony do) does with these. But you'd get the port as you do now, and pull host and protocol from the X-Forwarded headers.

It feels like a bit of a stretch for Laravel to assume that the proxy it's behind is also where it will find Vite, only on a different port. I'd imagine there are as many users where this is not the case as there are where it is.
I do agree that using server.hmr.host is a bit hacky, as the documentation specifically mentions that this is for locating the HMR websocket server, rather than the HMR HTTP server which is what we're using it for. The Laravel integration is in a bit of a tricky spot here. With Vite's primary use case, the user is browsing directly to Vite's HMR HTTP server to see their app, but in our case the user is browsing to Laravel's server which then needs to load scripts from Vite's HMR HTTP server, which in turn establishes a connection to Vite's HMR websocket server. I'm assuming that for 99% of Laravel users, the HMR HTTP and websocket servers will be one and the same.
server.hmr.host is not the primary way we determine the server location though. By default it just tries to load the scripts from wherever the ViteDevServer.httpServer tells us it's listening, which seems like a safe default. If the user has configured server.host or server.hmr.host then we'll use that. We only document server.host for a specific scenario, and we don't document server.hmr.host at all, as it's really just an escape hatch for advanced use cases like this.
Users are of course also free to use other plugins like laravel-vite.dev or even just configure things themselves. Our primary focus is to make sure things work well with Laravel's first-party dev environments like Valet and Sail.


Why is the new duration predictor model not being merged in this repository?

Checks

[x] This template is only for question, not feature requests or bug reports.
[X] I have thoroughly reviewed the project documentation and read the related paper(s).
[X] I have searched for existing issues, including closed ones, no similar questions.
[X] I confirm that I am using English to submit this report in order to facilitate communication.

Question details
I saw there's a new duration predictor that is supposedly better than the current one, why is it not merged here?

Discussions at #363
It's generally having output speech read faster, and other considerations mentioned there.
If interested, could also help with organizing modules.py in JM's fork repo which is helpful for those need a duration predictor

will close this issue, feel free to open if further questions


Icon Request: NXC

NXC is a programming language for the LEGO NXT Robot, it uses the extension .nxc.
It doesn't have an official icon, but a simplified version of the brick will do fine:

By the way, thanks a lot for making this awesome package!

Hey mate, sorry for taking so long to get back to you. Will this be okay?

I exaggerated some details in order to make it more recognisable at icon-size:

Few more modifications. It'll look like this in Atom:

Thanks! That will do nicely.


bug fixed: some problem about shadow copy

Hi, Luo.
I have some questions about your code:
in controller.py :
192            self.initial_seg = pred
194           pred[pred >= 0.5] = 1
195            pred[pred < 0.5] = 0
self.initial_seg may store the references of pred,which seems to be very crucial in the refinement stage .In your code, you  change pred in the sebsequent lines.I use np.array in order to get a copy of pred.Is that right?

bugs about shadow copy


Micro model testcases

Codecov Report

Merging #46 (cc0bde4) into master (79c64fa) will increase coverage by 13.34%.
The diff coverage is 66.66%.

@@             Coverage Diff             @@
##           master      #46       +/-   ##
===========================================
+ Coverage   58.30%   71.65%   +13.34%
===========================================
  Files          18       18
  Lines        1252     1263       +11
  Branches      214      217        +3
===========================================
+ Hits          730      905      +175
+ Misses        500      289      -211
- Partials       22       69       +47

Impacted Files
Coverage Δ

cimsparql/queries.py
51.76% <58.82%> (+26.99%)
:arrow_up:

cimsparql/model.py
57.91% <83.33%> (+18.19%)
:arrow_up:

cimsparql/constants.py
100.00% <100.00%> (ø)

cimsparql/type_mapper.py
89.88% <0.00%> (+1.12%)
:arrow_up:

cimsparql/url.py
88.88% <0.00%> (+4.44%)
:arrow_up:

cimsparql/query_support.py
65.74% <0.00%> (+10.18%)
:arrow_up:

cimsparql/line_queries.py
38.09% <0.00%> (+20.63%)
:arrow_up:

cimsparql/transformer_windings.py
52.38% <0.00%> (+33.33%)
:arrow_up:

... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Issues running svict

Hi,
I'm trying to run this on a regular bwa mem bam file. I noticed 2 issues:

svict expects "SO:coordinate" as the third column but in the bam that I'm providing it is the fourth. Could you make this more generic?
svict then failed on the second to last decoy contigs, after going through most of the other supercontigs; right on or after NC_007605 and the last one is hs37d5. I didn't get any error messages. Is this a known issue?

Thanks,
Minita

Hi, we will fix (1) shortly. For (2) did you use the latest commit already?
Thanks.

I did a conda install yesterday. I don't see the version in the usage though.

I am still having this issue, was it fixed?


Fix persistent storage example on EFR32

Problem
persisted storage app doesn't compile on EFR32
Summary of Changes

Add static allocation option in freertos config
Fix the pigweed status conversions to not use implicit
conversion which is no longer supported.

Marked as hotfix because it fixes a compilation error.


Update .travis.yml

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@571bd78). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master       #2   +/-   ##
=========================================
  Coverage          ?   54.85%
=========================================
  Files             ?        4
  Lines             ?      669
  Branches          ?        0
=========================================
  Hits              ?      367
  Misses            ?      285
  Partials          ?       17

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 571bd78...8e20ad4. Read the comment docs.


Symlink worktree for discovered shell tests

Instead of copying again the whole directory tree for discovered
shell tests, let's create a symlink to the plan worktree which
already contains everything needed for testing. This saves disk
space and allows to share content between prepare and execute, for
example prepare step can compile binaries which are then used by
tests. Test coverage extended to cover this scenario.

Testsuite fails because of https://github.com/psss/tmt/issues/954

Sorry for the force-push noise here. We're checking with @lukaszachy why the new distgit test was skipped...

All test failures are the weird empty environment file issue, the rest is green, merging.


Issues on integer values using apktool version 2.0.3

I did apktool d apktool b without changing anything on the package Launcher3.apk (http://www.filedropper.com/launcher3).
Then decompiled the rebuilt package, it shows some differences from the original decompiled one for some integer value in xml files. For istance:
ORIGINAL:

REBUILT:

Notice how launcher:y="\ 0" become launcher:y="\u0015".
Did not happen using version 2.0.2/2.0.1 of apktool.

FYI; I've seen the same issue with 2.0.3, but not with the version from git.

Looks like f3e21023ac25a09e662aa876cd0a62db34e4e5a4 fixed your issue.

As @aleksander0m said, this has already been fixed via the commit linked.


Fix for orderable unsubscribing

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
reproducable on https://swimlane.github.io/ngx-datatable/#
When toggling the Name column to off and then clicking the 'Company' column, a stacktrace pops up in the console.
Error: object unsubscribed     at t.h (polyfills.js:1651)     at new t (polyfills.js:1616)     at t.next (polyfills.js:1609) ...
Problem
The KeyValueDiffer is used with an Array, which means it will use the index of the array to check for diffs.
When the Name column is removed the column-array us spliced, so no gaps occure.
This will cause the differ to think that the actual removed column was on the last index, since it went from [0, 1, 2] to [0,1]. The Company column was on this index, so it unsubscribed from the dragStart and dragEnd event emitters of the Company column, instead of the Name column.
Fix
By transforming the QueryElement Array into a map with the column.$$id as key, the KeyValueDiffer uses the column.$$id to diff the objects.
What is the new behavior?
The Company column does not lose its subscription to the draggable directive.
Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:

Awesome idea 👍


Support for Hijri or Jalali or other international calendar in datepicker

Angular Material Datepicker, uses dateAdapter functionality to inject the logic of date calculation for other nationality calendars (jalali, hijri, chines, ...). Every folks can make and inject the appropriate one, depends on their country official calendar. Please have a look to this issue on Angular Material that ended up to produce this great feature:
https://github.com/angular/components/issues/2519
Actually I don't know your main purpose about choosing flatpickr.js, but I found Angular Material Datepicker a great tool either in look and features.

@araselahi ,
Would you be interested in implementing this feature?


circleci for develop branch

Changes made

The same what here: https://github.com/Taraxa-project/taraxa-node/pull/2110
but for develop branch

prnet cleaned-up successfully


[BUG] Starlette path variable convertors not recognized as path variables

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Create a file with the following code

from fastapi import FastAPI
from starlette.requests import Request

@app.get('/myblog/posts/{id}/{slug:path}')
async def view_post(request: Request, id:int, slug: str):
    return dict(request.path_params)

Open the browser and try accessing something like http://<IP_ADDRESS>:8000/myblog/posts/42/my_article_is_very_insightful/this_could_be_anything/whatever
See error.

{"detail":[{"loc":["query","slug"],"msg":"field required","type":"value_error.missing"}]}

A few things to notice:

FastAPI throws a validation error about a missing query parameter.
Making the signature view_post(request: Request, id:int): (no slug:str parameter) causes the error to go away

{"id":"42","slug":"my_article_is_very_insightful/this_could_be_anything/whatever"}

The returned request.query_params object above (which I imagine comes from Starlette because id appears to be a string) still contains the value for slug, meaning it was recognized at some point but FastAPI didn't catch it.
Likewise, making the route URL '/myblog/posts/{id}/{slug}' (no path converter) fixes the issue as long as the slug does not contain any slashes

Expected behavior
In the example provided above, the route should work the exact same way whether or not slug:str is in the function signature.
Environment:

OS: Windows
FastAPI Version: 0.20.0
Python version: Python 3.6.5

While most Starlette convertors are unlikely to be of much use to FastAPI applications (because of the type validation already being performed by FastAPI) ((as well as being undocumented)), the lack of a path wildcard in FastAPI means there still remains this last use case for them. I wouldn't personally mind if this issuewas closed in favor of a different implementation of path wildcards, although the contents of request.path_params raise some interesting questions regarding the way in which FastAPI currently performs route parameter extraction and why there appears to be a mismatch between the request object and that FastAPI sees.

Does that help ?
https://github.com/euri10/fastapi/blob/slugbug/tests/test_slug.py

I think the main conflict we will find here is that there's no way to declare that in OpenAPI: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#pathTemplating
I think that FastAPI's implementation of routing is there from a pre-convertors version in Starlette.
We might think about a workaround, or having custom handling for convertors, although I'm not sure how would we represent that in OpenAPI. For example, there's no way to pass an actual path with Swagger UI. It converts a/b/c to a%2Fb%2Fc.
A current workaround is to not use FastAPI's validation and use Starlette's normal @app.route('/myblog/posts/{id}/{slug:path}'). But in that case you would have to handle validation, etc, by hand.

Ah, right, FastAPI is primarily about OpenAPI, I probably shouldn't try doing something like this in the first place (since it's more of a HTML page routing thing and that's what I was intending to use this for) and instead use Starlette directly.
Actually, that should probably be mentionned in the templating part of the doc, since there are fairly high chances that the people looking at this part are intending to use it for more traditional HTML responses.

@sm-Fifteen it was just solved by @euri10 in #234. It is released in FastAPI 0.22.0.
It works with a/b/c and a%2Fb%2Fc, so, it ends up not being a problem with OpenAPI (even if it's a bit of kind of cheating).
To clarify a bit, FastAPI is made around APIs, and optimized for them, but still, the intention is to support most of the use cases. And the reason of being based in Starlette is to be able to inherit the awesome Starlette features.
So, the idea is that you should be able to do with FastAPI everything you can do with Starlette. And if you build APIs, you get extra benefits.

Soon custom converters available : https://github.com/encode/starlette/pull/458

Looking into the OpenAPI spec further, it would appear that the correct way to do something like this according to both OpenAPI 3.0 and RFC 6570 should actually be something closer to /myblog/posts/{id}/{+slug}, which would be translated in the query parameters as allowReserved: true (that spec is full of surprises!).
Should we be using this instead of path variable convertors?

That's a very interesting finding @sm-Fifteen .
So, OpenAPI defines a way to allowReserved: true: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#fixed-fields-10 but it only applies to parameters in query. Not in path.
The example in Swagger you referenced says what are the convertor equivalences, but not where they are allowed.
Still, even though Swagger started all this, the spec lives now at: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md. So, the examples and docs at Swagger are nice and help, but in case of doubts (as this one), the "single source of truth" is the spec.
I see the example you found is cited in this issue: https://github.com/OAI/OpenAPI-Specification/issues/1288 and they discuss a bit more about styles, although not specifically about path parameters with reserved characters.
For reserved characters in path parameters (exactly what we are discussing here), there's this issue, and they discuss specifically the use of /myblog/posts/{id}/{+slug}: https://github.com/OAI/OpenAPI-Specification/issues/1840:

It is specifically disallowed on path parameters [...]

In Summary
Allowing/handling /myblog/posts/{id}/{+slug} would not be spec-compliant, apart from the extra effort to parse it, etc... :sweat_smile:
I think for now we should stick to the current solution, with the :path Starlette convertor, only for this specific case.
For the rest of the cases, we can use the normal parameter declarations with standard Python types.

Oh, yeah, I get that it's not how you'd be writing your routes in an OpenAPI definition. My point is that the various route and query parameter options are based off of RFC 6570, meaning that a lot of complex route formats that OpenAPI can accept can be expressed in one URL template (and not specifically just allowReserved: true/{+path}, there could be interesting uses for style: matrix/{;list} or style: label/{.list}, not to mention the possibility of adding the query parameters to the route directly to avoid the need for disambiguation between body and query parameters).
{mypath:path} isn't exactly a lot more OpenAPI-compliant than {+mypath}, I just figured that most starlette path convertors are ({id:int}, {distance:float}) already kind of at odds with the way FastAPI handles type conversion with path just being the odd one out, and since most (if not all) OpenAPI parameter formats have an RFC 6570 equivalent while FastAPI tries to put as much information as possible in its function signatures and route annotations that this could be a good way to move parameter properties there.
With that said, though, this might be getting off-topic from the original issue.

Hehe yep.
Supporting the other templating formats might be something that we can think about in the future. For now I think we can use the current ideas.
And yes, {mypath:path} is not OpenAPI-compliant either... But given that it's something not "officially" supported by OpenAPI, keeping the Starlette implementation should work for these use cases, at least for now.
As this is (more or less) solved now, should we close this issue then?

Certainly, I'll probably just open a separate feature request for RFC 6570 templates at some point later.

Cool, thanks!


Do not resolve symlinks when opening into Code

VSCode Version: Code 1.15.0 (8b95971d8cccd3afd86b35d4a0e098c189294ff2, 2017-08-09T20:09:15.006Z)
OS Version: Linux x64 4.10.0-32-generic
Extensions:

Extension
Author (truncated)
Version

vscode-markdownlint
Dav
0.10.0

beautify
Hoo
1.1.1

output-colorizer
IBM
0.1.2

vscode-docker
Pet
0.0.16

hugofy
akm
0.1.0

better-toml
bun
0.2.0

python
don
0.7.0

json-tools
eri
1.0.2

Go
luk
0.6.63

terraform
mau
0.0.16

cpptools
ms-
0.12.2

gitlink
qez
0.2.3

Ruby
reb
0.14.0

vscode-icons
rob
7.12.0

Steps to Reproduce:

mkdir -p ~/.kube
touch ~/.kube/config # this file contains yaml
ln -s ~/.kube/config ~/.kube/config.yaml
code ~/.kube/config.yaml
< at this point i would expect vscode to open ~/.kube/config.yaml and read it as a YAML file because of the extension and the file contents; but instead it opens ~/.kube/config and for some reason decides the contents are "Properties" >

Reproduces without extensions: Yes/No

For me it opens as empty file just like that:

It is true however that we resolve symlinks to their real path, so that is the issue at hand here.

This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable. Thanks for understanding and happy coding!

And there is actually a duplicate that is still open :)


incorporate build condition for raft-cpu-image in multi-arch job

Accounts for this condition for the multiach-manifest job.

/merge


App config Revision retry after

Adds a check for 429s on revisions request and if found waits and retries following the retry after header.

The Build Analyze job failed because of this and another job failed for a transient network issue.


Using OWASP modsecurity CRS Rules cause errors

After installing ModSecurity with the nginx connector (no issue during the install), when I try to do a search on website or visite a category i'm getting the error :  header already sent while sending response to client, client:
Exemple of the errors:
2017/12/20 01:08:50 [alert] 15793#15793: *26 header already sent while sending response to client, client: <IP_ADDRESS>, server: www.bnin.org, request: "GET /?category&cuisine&cooking_method&sort&content-search HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock", host: "bnin.org", referrer: "https://bnin.org/?category&cuisine&cooking_method&sort&content-search"
Any idea what's causing this?
I'm runnign latest nginx version : nginx/1.13.7
I used :  ModSecurity v3/master --single-branch
With : OWASP Core Rule 3
Your help is much needed and appreciated, thank you !

See #41 . Do you have pagespeed enabled?

Nope, just Nginx and https://github.com/mariusv/nginx-badbot-blocker, I tried disabling it of course and cleaning the website configuration, but I just have to disable the includes for OWASP Core Rules to fix it

This is the rule responsible for the error, can someone tell us  :
RESPONSE-953-DATA-LEAKAGES-PHP.zip
This is what's included in the configuration :
Config included.zip
I just have to disable RESPONSE-953-DATA-LEAKAGES-PHP so that everything works.
I really appreciate any feedback on this.
Thank you

Same problem of @beeriz .
Thank you for locate this problem!

The error happens because at phase 4 is too late to change the response http code, as it is already received by the client. The only possibility is to hold the content till the inspection is done, which may imply in a significant performance drop.
Closing this in favor of #41


Increased test coverage

Added a few more tests for:

ViewLookupForPath for invalid paths
HttpResource returns a 404 for invalid path params
TaskArgumentFilterer.filter method

Thanks a bunch!

High five!!
On May 7, 2015 11:37 AM, "Ryan Stout"<EMAIL_ADDRESS>wrote:

Thanks a bunch!
—
Reply to this email directly or view it on GitHub
https://github.com/voltrb/volt/pull/197#issuecomment-99972333.


Silent Payments send support

I tested:

sending to a SP address with 'Send all'
sending to a SP address with a specific amount
sending using all supported UTXO types as inputs (p2wpkh, p2wpkh-p2sh, p2tr)
sending with a normal recipient address (to see the previous stuff didn't break)
sending to a SP address with an outdated firmware (clear error msg appears saying an upgrade is required)
Pocket sell flow with payment requests, to see that part did not break either

And an end-to-end test with sending funds from BitBoxApp to a CakeWallet silent payment account.


refactor: switch from Axios for Fetch API

Description
This PR switch our codebase from the Axios library to the native Fetch API instead.
Screenshot (if UI-related)
To-Dos

[ ] Successful build yarn build
[ ] Translation keys yarn i18n:extract
[ ] Database migration (if required)

Issues Fixed or Closed

Fixes #XXXX

Multiple encounter:
First: in movies and series when changing of sort type it break the image render

Second: when adding a filter half of the show or render

Third: can't comment on issue

Fourth: can't update a user in every section, only permissions one seem's to work, and for editing our account only notifications don't work

Fifth: when clicking on a movie, and clicking on a similar title it render with the image of the previous movie, also similar title movie don't render at all

@Gauvino your fourth bug, is not a bug. You can't save because of our current email validation. That user needs a proper email in their email field then you can save

We need help on this PR.
Running into an issue where every now and then on not that slow but somewhat slow Internet like 30mbps etc. This might be related to the bugs that @Gauvino posted on their comment.
Fetch request keeps timing out.
TypeError: fetch failed
    at node:internal/deps/undici/undici:12618:11
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async JellyfinAPI.get (/home/fallenbagel/code/jellyseerr/server/api/externalapi.ts:76:24)
    at async JellyfinAPI.getItemData (/home/fallenbagel/code/jellyseerr/server/api/jellyfin.ts:349:28)
    at async JellyfinScanner.processMovie (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:63:24)
    at async /home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:514:11
    at async Promise.all (index 18)
    at async JellyfinScanner.processItems (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:511:5)
    at async JellyfinScanner.loop (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:543:7)
    at async JellyfinScanner.run (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:657:11) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (node:internal/deps/undici/undici:7760:28)
      at node:internal/deps/undici/undici:7716:50
      at Immediate._onImmediate (node:internal/deps/undici/undici:7748:13)
      at processImmediate (node:internal/timers:478:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}
Request took 10004ms

So we need input from someone who has any experience in solving this issue

We need help on this PR.
Running into an issue where every now and then on not that slow but somewhat slow Internet like 30mbps etc. This might be related to the bugs that @Gauvino posted on their comment.
Fetch request keeps timing out.
TypeError: fetch failed
    at node:internal/deps/undici/undici:12618:11
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async JellyfinAPI.get (/home/fallenbagel/code/jellyseerr/server/api/externalapi.ts:76:24)
    at async JellyfinAPI.getItemData (/home/fallenbagel/code/jellyseerr/server/api/jellyfin.ts:349:28)
    at async JellyfinScanner.processMovie (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:63:24)
    at async /home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:514:11
    at async Promise.all (index 18)
    at async JellyfinScanner.processItems (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:511:5)
    at async JellyfinScanner.loop (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:543:7)
    at async JellyfinScanner.run (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:657:11) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (node:internal/deps/undici/undici:7760:28)
      at node:internal/deps/undici/undici:7716:50
      at Immediate._onImmediate (node:internal/deps/undici/undici:7748:13)
      at processImmediate (node:internal/timers:478:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}
Request took 10004ms

So we need input from someone who has any experience in solving this issue

Hello,
https://undici.nodejs.org/#/?id=network-address-family-autoselection
UND_ERR_CONNECT_TIMEOUT is an issue related to IPv6, not a slow connection according to the documentation. Additionally, 30mbps is not a slow connection. A timeout of 10004ms is expected to timeout. To test with a bad connection, open the network tab in your browser and set the speed limitation to 2G (40 kbit/s).

We need help on this PR.
Running into an issue where every now and then on not that slow but somewhat slow Internet like 30mbps etc. This might be related to the bugs that @Gauvino posted on their comment.
Fetch request keeps timing out.
TypeError: fetch failed
    at node:internal/deps/undici/undici:12618:11
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async JellyfinAPI.get (/home/fallenbagel/code/jellyseerr/server/api/externalapi.ts:76:24)
    at async JellyfinAPI.getItemData (/home/fallenbagel/code/jellyseerr/server/api/jellyfin.ts:349:28)
    at async JellyfinScanner.processMovie (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:63:24)
    at async /home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:514:11
    at async Promise.all (index 18)
    at async JellyfinScanner.processItems (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:511:5)
    at async JellyfinScanner.loop (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:543:7)
    at async JellyfinScanner.run (/home/fallenbagel/code/jellyseerr/server/lib/scanners/jellyfin/index.ts:657:11) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (node:internal/deps/undici/undici:7760:28)
      at node:internal/deps/undici/undici:7716:50
      at Immediate._onImmediate (node:internal/deps/undici/undici:7748:13)
      at processImmediate (node:internal/timers:478:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}
Request took 10004ms

So we need input from someone who has any experience in solving this issue

Hello,
https://undici.nodejs.org/#/?id=network-address-family-autoselection
UND_ERR_CONNECT_TIMEOUT is an issue related to IPv6, not a slow connection according to the documentation. Additionally, 30mbps is not a slow connection. A timeout of 10004ms is expected to timeout. To test with a bad connection, open the network tab in your browser and set the speed limitation to 2G (40 kbit/s).

Thanks for your response.
These issues are happening on the backend of the application, so it's not possible to debug with browser tools.
For IPv6, we tried things like adding --dns-result-order=ipv4first as argument.
I didn't manage to replicate this issue, but @Fallenbagel did so he may have other insights.
We'd be happy to try out other ideas.

Thanks for your feedback. dns-result-order should not help at all, as it only manages the DNS response order (IPv4 first doesn't prevent you from still getting both IPv4 and IPv6 results).
From the documentation if i'm not misleading the default configuration set getdefaultautoselectfamily to true which use first AAAA record first (if returned), first A, second AAAA, second A etc.
To confirm the IPv6 issue I see two possibilities (I'm not a Node.js expert, so I might miss some steps.) :

Force IPv6 connection with family in the TCP socket.
Using NODE_OPTIONS="--dns-result-order=ipv4first --no-network-family-autoselection" which should return IPv4 first and use the first returned record.

Concerning the root cause, I suspect that Node.js detects your host supports IPv6, but it is misconfigured, which leads to this issue.

Sorry for the news but nothing as change, all of the bugs are still there!
Does I can provide some logs are something to investigate more?

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

v2.0.0
GitHub release

Your semantic-release bot :package::rocket:


Maximum recursion depth exceeded in comparison

Hi there !
I'm writing a summariser of sorts, and to check the validity I'm computing the rouge score of system generated summary and the manual summary.
Now, this worked fine for about 800 documents, and for some unknown reason, the 801th document returned this error:
  File "rouge_letsum.py", line 57, in summary_letsum_looper
    scores[case] = rouge.get_scores(system_generated_summary, manual_summary)[0]
  File "/usr/lib/python3.7/site-packages/rouge/rouge.py", line 85, in get_scores
    return self._get_scores(hyps, refs)
  File "/usr/lib/python3.7/site-packages/rouge/rouge.py", line 97, in _get_scores
    sc = fn(hyp, ref)
  File "/usr/lib/python3.7/site-packages/rouge/rouge.py", line 58, in <lambda>
    rouge_score.rouge_l_summary_level(hyp, ref),
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 273, in rouge_l_summary_level
    prev_union=union)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 221, in _union_lcs
    lcs = set(_recon_lcs(reference_words, evaluated_words))
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 136, in _recon_lcs
    recon_tuple = tuple(map(lambda x: x[0], _recon(i, j)))
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 10 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  [Previous line repeated 64 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 7 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  [Previous line repeated 1 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 248 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  [Previous line repeated 37 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 291 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 21 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  [Previous line repeated 19 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 79 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  [Previous line repeated 6 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 34 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  [Previous line repeated 26 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 14 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 130, in _recon
    return _recon(i - 1, j - 1) + [(x[i - 1], i)]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 134, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 25 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 132, in _recon
    return _recon(i - 1, j)
  [Previous line repeated 30 more times]
  File "/usr/lib/python3.7/site-packages/rouge/rouge_score.py", line 127, in _recon
    if i == 0 or j == 0:
RecursionError: maximum recursion depth exceeded in comparison

Any idea how I can resolve this?

This happens inside the LCS calculation which means that a sequence is too long. Could you check sequence length (counting words)?

The summary lengths are 8735 and 2080 words.
What would be the maximum length allowed in this case then?

This algorithm really is recursive. The actual number of recursion maybe something like O(n x m) for sequences of length (n, m). The max recursion depth may be - by default - order of magnitude lower.
You can print/set it with:
print(sys.getrecursionlimit())
sys.setrecursionlimit(8735 * 2080 + 10)

Thanks for the help, that worked out just fine :smile:
Closing the issue now.

Is it possible that you could rewrite the LCS component to be iterative? Having a recursion limit is sometimes limiting. Thanks!

Hi, I am generating a customized large-scale dataset from Oscar German corpus by corrupting raw text by using an algorithm, PEGASUS (Gap Sentence Generation). Here I am implementing rouge to get top f1 scores of sub tokens of  each datapoint.
I am getting a recursion error:

I have checked the recursion limit in my environment. it's showing 1000.
What would be your suggestion to fix this issue..


Fix byoc graceful shutdown: run node directly instead of npm start

Invoke node directly instead of using npm start up as npm would swallow the SIGTERM which renders the signal handlers useless. See:
https://github.com/npm/npm/issues/4603
https://github.com/GoogleCloudPlatform/buildpacks/issues/160

Close in favour of using "exec npm start up" in package.json


tray error tray: Failed to put tray above 0x3600001 in the stack (XCB_MATCH (8)

The tray is shifted down and to the right from the rest of the bar. All the icons working. Launching polybar through CLI shows that itgives this error:
error: tray: Failed to put tray above 0x3600001 in the stack (XCB_MATCH (8))
every time I launch it.

Polybar config:
polybar.txt

This is because i3 repositions your bar. Set override-redirect = true to prevent that. Nothing else we can do about it.

Should I place that in the polybar config or the i3 config?

EDIT: That places the bar UNDER my windows. Is there any way to fix this?

EDIT: EDIT: error: tray: Failed to put tray above 0x1200001 in the stack (XCB_MATCH (8))
Now I am getting this error as well

EDIT: That places the bar UNDER my windows. Is there any way to fix this?

See this: https://github.com/polybar/polybar/wiki/Known-Issues#override-redirect-in-i3
It's because i3 no longer reserves space for polybar. If you use the latest unreleased changes from i3-gaps, you can also use gaps top in your i3 config.

EDIT: EDIT: error: tray: Failed to put tray above 0x1200001 in the stack (XCB_MATCH (8))

See #425, this is a known issue and we are working on a fix.

Alternatively, if you don't care about the bar being offset 2%, you can remove offset-x and offset-y and set override-redirect = false.

If psuedo-transparency is true, I get the error polybar|error: tray: Failed to put tray above [MemoryAddress] in the stack (XCB_MATCH (8)). When I set it to false, it fixes the error.
[settings]

;...settings here...

; Enables pseudo-transparency for the bar
; If set to true the bar can be transparent without a compositor.
pseudo-transparency = true

It was working for me when I was playing around with polybar example. This issue popped up when I began customizing the configuration.
Unfortunately, it was late, I was tired while I was making changes, and I have not been able to figure out was caused this. Just thought it was worth noting.
I have been playing around with the compositing operators to see if I can get the same effect, but no luck so far.
When I have some time, I'll play around with the example config to see if it still works with the original and try to pin point what I did in the config to break it.

So, I got around to playing with the example config and narrowed down the transparency issue to the setting border-color = #00000000 in the config file.
If this value is changed to any other value, transparency without compositing seems to just fail. The error is still present where polybar says there's an error with the tray stack.
It still goes away when I set pseudo-transparency to false. It comes back when I set it to true.
Even though the error is present, it still fixes the transparency issue.
So, setting pseudo-transparency = true while using border-color = #00000000 seemingly gives the desired result, but still generates this error. As far as I can tell, it seems safe to assume that the value #00000000 is a magic number indicating transparency to something.
Hopefully this can help someone who knows more about polybar to narrow down the issue.


Consider going Predef-less

In the spirit of #315, I know there are other places where we're doing stuff that involves unnecessary wrapping (like string.size as opposed to string.length), and I'd like to see what it would look like to turn on -Yno-predef for everything (excluding tests).
I've pushed a branch with the configuration that's needed.

Done in #526.


Reduce total Cases being returned to 1 for DrB & AM - LFTE

 Update Newsletter Case API - AM & DrB


how do i uninstall oh my tmux?

how do i uninstall it?

Hello @NoahStoessel 👋
It depends on how you installed it. But it boils down to removing the repository you cloned and the .conf symlink you created when installing.

great thank you got it removed


log exception raised from route_request_to_callbacks

Add logging for exception raised from processing the callback function.

ensure anyone using the library can define their own logger

Yes - I believe it is encouraged to add NullHandler to the top-level logger - but here you are defining the NullHandler for each __name__ namespace. So in order for the consumer to override the logging handlers provided here, it is required to override all of the loggers.  I can update the code here to add the handler to only the top-level namespace if you'd like.
https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library

any unexpected crashes the library experiences won't crash anyone's usage of it, but rather will inform them

Yes this small update will do two things:

Do not crash the bot if the "callback" raises an exception
Log the exception and the traceback

Ok, I follow everything you've written here.
Can you show me this?

I can update the code here to add the handler to only the top-level namespace if you'd like.

i've added the top level logger
now you can configure this library to log to whatever by overriding the simple_slack_bot logger like so:
import logging
from logging.config import dictConfig

PATH = os.path.dirname(os.path.realpath(__file__))
LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'formatters': {
        'verbose': {
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
        },
        'simple': {
            'format': '%(levelname)s %(message)s'
        },
    },
    'handlers': {
        'console':{
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'simple'
        },
        'rotate': {
            'level': 'INFO',
            'formatter': 'verbose',
            'class': 'logging.handlers.TimedRotatingFileHandler',
            'filename': os.path.join(PATH, 'logs/dnd.log'),
            'when': 'midnight',
            'backupCount': 7,
        }
    },
    'loggers': {
        'simple_slack_bot': {
            'handlers': ['console', 'rotate'],
            'level': 'INFO'
        }
    }
}
dictConfig(LOGGING)

Ok the only thing I think I'll fix is the logs/dnd.log, as this will be for simple slack bot.
so I'd change i'll change it to logs/simple_slack_bot.log, you cool with that?

I'm dumb. You showed me an example. I thought the PR was showing me your commit. haha


adding defaulting for all the things

Towards https://github.com/giantswarm/giantswarm/issues/12231
We want to move our defaulting webhooks here to replace the one in OPA since it's buggy and we also want to move away from using OPA in general.
see todo list : https://github.com/giantswarm/giantswarm/issues/12231#issuecomment-665602087

I tested the following things on giraffe and they all work:
defaulting for singular CRs:

g8scontrolplane replicas are defaulted to 3 for HA versions
g8scontrolplane replicas are defaulted to 1 for pre-HA versions
awscontrolplane AZs are defaulted to 3 for HA versions
awscontrolplane InstanceType is defaulted to the default type for HA versions
g8scontrolplane replicas are defaulted to 1 in pre-HA Versions

defaulting against another existing CR:

awscontrolplane AZs are defaulted according to the g8scontrolplane replicas in HA Versions
g8scontrolplane replicas are defaulted according to the awscontrolplane AZs in HA Versions
g8scontrolplane infrastructure reference is set to the awscontrolplane if it's created first
g8scontrolplane infrastructure reference is updated to the awscontrolplane if it's created second
awscontrolplane AZ is defaulted according to the awscluster AZ in pre-HA Versions
awscontrolplane InstanceType is defaulted according to the awscluster InstanceType in pre-HA Versions

Furthermore, cluster creation appears stable and https://github.com/giantswarm/giantswarm/issues/12231 does not occur any more.
What is still missing:

The defaulting for the awscluster is still done in OPA.
The matching of controlplane CRs in admission-controller is still done based on the id and not the cluster label.
The READMEs of OPA and admission-controller are not yet updated


The default button from the form component should have a type of submit instead of button.

Describe the feature
I have used a form component to create some forms and I have realised that the default button from the form is of type button instead of submit. I have also implemented a plugin that adds a spinning gif while the form is loading in a tailwindcss form. In that plugin I search for submit inputs, but I cant find those buttons from the forms because they have the type button.

The default button is type submit. Can you provide a reproduction in the playground of your issue?
it’s possible your plugin doesn’t find the button because buttons have ignore=true by default to prevent their empty data from being added to the form data, but this prevents plugin inheritance too.

The default button is type submit. Can you provide a reproduction in the playground of your issue?
it’s possible your plugin doesn’t find the button because buttons have ignore=true by default to prevent their empty data from being added to the form data, but this prevents plugin inheritance too.

I have looked into my problem again and now the button is of type submit. I might have read something wrong. Thanks for the help.


how to indicate to user why an action in menu is greyed out

https://issues.jboss.org/browse/KIALI-2336
Sometimes "Create traffic routing" action is disabled in the menu.
It is disabled if a VS is already present. (if user deletes the existing VS, the action becomes enabled in the menu)
But a clear indication should be added so users understand why it is greyed out.
see attached.

cc @serenamarie125

@abonas

if a user does not have permission to perform the operation, do not show the action
if traffic routing already exists for the service, disable the option and provide a tooltip stating "Traffic routing already exists for this service"


Error in requirement notice?

Is this sentence accurate? "For customers who do not have Azure AD Premium, this approach enables the customer to use security groups to manage role assignments."
My understanding is that Azure AD Premium is required for security group role assignment.

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

ID: 0184d69e-7219-f4f0-6583-32f79f5a76e1
Version Independent ID: 49e5b0f0-69cb-4ab1-c8d9-62eb07778a88
Content: Application roles - Azure Architecture Center
Content Source: docs/multitenant-identity/app-roles.md
Service: architecture-center
Sub-service: reference-architecture
GitHub Login: @MikeWasson
Microsoft Alias: pnp

Thanks for reporting - this issue is under review.  This is a Microsoft Internal DevOps Bug ID AB#241484

@chwolfe you don't need AD Premium to create and use Groups.  For example, I was able to create groups in my MSDN Azure subscription that does not have AD Premium.


feat(ui): implement new activity action bar design

Description:
Implement new activity action bar design
Note: Builds on #2335
Motivation and Context:
Fix #2345
How Has This Been Tested?
Manually
Screenshots:

Types of changes:
UI enhancement
Checklist:

[x] My code follows the code style of this project.
[x] I have reviewed and updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes where needed.
[ ] All new and existing tests passed.
[x] My commits have been squashed into a concise set of changes.

Coverage decreased (-0.02%) to 20.311% when pulling 7e5ff56658193408dac56e4ef549b5a9b71a3f72 on mrfelton:feat/2345-new-activity-header into d597173646240c5a2986b7aecc3c8c8ddb186350 on LN-Zap:next.

Have updated the Spinner so its the same size as the refresh icon @JimmyMow

Tested ACK 3a75fdc


aes-gcm-avx512.pl: fix non-reproducibility issue

Fix #20954. Made changes suggested in this comment. Passed all tests.
CLA: trivial

Note the fact that the CLA: trivial annotation is in the subject line is the reason why the bot is  still complaining about a missing CLA.
A propos CLA:  generally, we set a very low bar to when a pull request becomes non-trivial. (To avoid repeating the same legal discussions over and over, since we are no lawyers.) Only trivial one-line-fixes or typographical corrections are considered trivial. Given the  fact that this is not your first contribution and that the change is borderline, I'd prefer if you could sign and send us a Contributor License Agreement (CLA). Also as a motivation for future, non-trivial contributions from you. :-)

This is definitely not something acceptable with CLA: trivial. So I am glad you're willing to sign a regular CLA.

submitted CLA

Something is causing a build error. looking into it

I will approve once CLA is fixed (which I think will need rebase to remove CLA: trivial from first commit message)

@trigpolynom your pull request now consists of three commits. Those need to be squashed into a single commit, keeping only the commit message of the second commit (with the CLA: non-trivial removed).
Typically, this squashing is done with an interactive rebase (git rebase -i --keep-base master), followed by a force-push (git push --force-with[-lease]). Do you know how to do it yourself? If not, you have two options:

ask me to do the squashing for you
ask me to explain the steps to you and try it yourself

I you choose step 2, don't worry about messing it up: everything can be undone in Git and I will help you if you get in troubles ;-)

@mspncp I'll fix it tonight myself. I swear this isn't my first rodeo, despite how much it seems to be. Just anxious to get my first contribution in here.

Sure, we're not in a hurry. And I know from my own experience that it is much more satisfying for you if you are able to fix the problems by yourself.

@mspncp Okay i think ive finally got the commits in check

This pull request is ready to merge

hi everyone. when will this potentially be merged?

The repository is currently frozen in preparation of the upcoming 3.2 beta release. But it will certainly be merged shortly after that and before the next service release.

@mspncp okay sounds good. just excited. Thanks!

Adding 3.2 on the basis that any approved PR targeting master and at least one other branch should be assumed a candidate for 3.2.

Merged to master, 3.1 and 3.2. Thank you.
This did not merge cleanly to 3.0; you may wish to open another PR for 3.0.


OpenFile is undefined on Android

Versions in use
react-native: 0.48.3,
react-native-doc-viewer: 2.4.7,
Bug description
Everything works fine on iOS.
I tried both auto linking and manual install for Android, but in either case, OpenFile is undefined.
Relevant code
import OpenFile from 'react-native-doc-viewer';

OpenFile.openDocBinaryinUrl([{
    url:"http://mail.hartl-haus.at/uploads/tx_hhhouses/{binaryString}",
    fileName:"sample",
    fileType:"jpg"
}], (error, url) => {
    if (error) {
        console.error(error);
    } else {
        console.log(url)
    }
});

Error message

undefined is not a function (evaluating '_reactNativeDocViewer2.default.openDocBinaryinUrl')

Also, the example application keeps crashing, so I can't test with that.
Thanks in advance!

openDocBinaryinUrl() isn't implemented on android

Thanks for the reply. Are you aware of it being planned for implementation?

Just found this package recently but it doesn't seem to be developed actively.
Currently trying to solve this with react-native-fs and the Linking.openURL() but haven't gotten it working yet

From what I've seen, this package has the most commits and they're more recent than any alternative, but yeah, the last one is from (beginning of) August.

Android Release next week. Verison 2.5.5


Update docs

Add reference folder with entries for user-level functions, add stubs for install and tutorial, and update index.rst.

approved

approved again

approved a third time


"Mangayomi" is no longer available

Steps to reproduce
I tried to open the app as usual by clicking on it but I kept getting the same error.
Expected behavior
It should open as it does normally however it keeps saying it's no longer available.
Actual behavior
The app keeps uninstalling for some reason every few days/weeks. I have to redownload it so it works again. Everything inside the app is fine but it keeps getting removed.
Mangayomi version
0.2.45
Device
Iphone Xr and IOS 17.5.1
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] If this is an issue with an extension, I should be opening an issue in the extensions repository.
[X] I have updated all installed extensions.

This isn’t an issue with the app, it’s a restriction with sideloading. Free developer accounts need to refresh sideloaded apps once a week or the certificates get revoked.


Rounded tox button; now supports clicking tox button to disable; refactor disease status

Pretty self-explanatory.
Pull requests into Flux require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable (N/A) and :white_check_mark:.
Submitter:
Running the Application

[x] Manually tested in Chrome
[x] Manually tested in IE

Documentation

[x] This pull request describes why these changes were made
[x] Recognizes any potential shortcomings/bugs in the description
[x] N/A Cheat sheet is updated
[x] N/A Demo script is updated
[x] N/A Documentation on Wiki has been updated
[x] N/A Additional technical components and libraries are documented and added to wiki as needed

NoteParser

[x] N/A Note parser has been updated if structured phrases change

Code Quality

[x] 4-space indents - convert any tabs to spaces
[x] Use public class field syntax for binding functions - ex. handleChange = () => { ... };
[x] Code is commented

Tests

[x] Existing tests passed
[x] N/A Added UI tests for slim mode
[x] N/A Added UI tests for full mode
[x] N/A Added backend tests for fluxNotes code
[x] N/A Added note parser examples to test new functionality

Reviewer 1: Mike T

[X] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[X] N/A The tests appropriately test the new code, including edge cases
[X] You have tried to break the code

Reviewer 2: Name

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

The buttons look good. Thanks for adding comments and removing the potentially confusing currentlySelected() function. I'm running the tests now, though I don't imagine that this type of change will affect the outcome.

Looks good to me. Button styles match the disease status form now and all the tests still pass.


change dict.iteritems() to dict.items() for Python 3 compatibility

Coverage remained the same at 100.0% when pulling c63d80bef5761cd4d45f13e773c0b18113095597 on bjh/iteritems-fixup into 7d1386379000b6220a3a5219486ef06d91d04845 on master.


fix num_spin_orbitals for FermionicOp with zero spin orbitals

Summary
Fixes a bug where op = FermionicOp({"": 1.0}) was being assigned num_spin_orbitals equal to 1 instead of 0.
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.005%) to 85.68%

Files with Coverage Reduction
New Missed Lines
%

qiskit_nature/drivers/second_quantization/psi4d/psi4driver.py
1
84.43%

Totals

Change from base Build<PHONE_NUMBER>:
-0.005%

Covered Lines:
17022

Relevant Lines:
19867

💛  - Coveralls


US137872 - grey colour updates

This PR makes the following colour changes:

Corundum - #b5bdc2, rgba(181, 189, 194, 0.2) -> #B1B9BE, rgba(177, 185, 190, 0.2). I used a hex-> rgba calculator for this one.
Chromite- #9ea5a9 -> #90989d
Galena - #868c8f -> #6e7477
Tungsten - #6e7376 -> #494C4E
Ferrite - #494c4e -> #202122

Note that icons do not need to be changed, since they are now using Tungsten, which is the old Ferrite.

You'll need to update this line so that icons don't shift their color:
https://github.com/BrightspaceUI/core/blob/main/components/icons/icon-styles.js#L8
That should remove some of the visual-diffs with icons.


(Suggestions)world grenade prediction

Does anyone know how to do this
To where you can see your teammates/enemys grenade

Don't think that's possible

Does anyone know how to do this
To where you can see your teammates/enemys grenade

You can predict yourself with Glow and little bit of Brain.

Don't think that's possible
My friend! This is perfectly possible.


cli flags for settings labels and annotations

Description

Introduce cli flags for settings labels and annotations on KafkaSource.
Changes

introduce --annotation flag for settings metadata.annotations
introduce --label flag for settings metadata.labels

Reference

🎁 New feature: setting metadata.labels and metadata.annotations via CLI flags

/lint
/feature

/ok-to-test

@a7i thanks for the PR! E2E tests need a bit of care to reflect the changes. https://github.com/knative-sandbox/kn-plugin-source-kafka/actions/runs/3247077573/jobs/5364989755#step:5:35

@nak3 FYI, it'd nice to have this PR in the upcoming release tomorrow. I'll keep an eye on it to get it in. :)

@a7i Thanks for the contribution! I've fixed the e2e impl that missed a variable init, etc. To make sure the PR is merged for the tomorrow's release. I hope you don't mind. Cheers!
/approve
/lgtm

Thank you @dsimansk


chore: [WIP] Update gradle?

This is a draft and WIP.
IJ and android studio are both complaining about our outdated gradle version.
This is an exploration to see about changing it.

Cannot change namespace due to (https://stackoverflow.com/a/72190449/5164462). For me the same. First it went well until making a flutter clean and gradle sync. The rest seems to work, I guess. Even with Android API 22 :)


Warning: Cannot update a component while rendering a different component

Description
Warning message when accessing a secured page without beeing logged in.
react-dom.development.js:86 Warning: Cannot update a component (`AuthProvider`) while rendering a different component (`RequireAuth`). To locate the bad setState() call inside `RequireAuth`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
    at RequireAuth (http://localhost:3000/static/js/bundle.js:11361:21)
    at RenderedRoute (http://localhost:3000/static/js/bundle.js:39951:5)
    at Routes (http://localhost:3000/static/js/bundle.js:40394:5)
    at Router (http://localhost:3000/static/js/bundle.js:40332:15)
    at BrowserRouter (http://localhost:3000/static/js/bundle.js:38650:5)
    at RoutesComponent
    at AuthProvider (http://localhost:3000/static/js/bundle.js:11272:21)
    at App
printWarning @ react-dom.development.js:86
error @ react-dom.development.js:60
warnAboutRenderPhaseUpdatesInDEV @ react-dom.development.js:27492
scheduleUpdateOnFiber @ react-dom.development.js:25498
dispatchReducerAction @ react-dom.development.js:17452
isAuth @ PrivateRoute.tsx:44
RequireAuth @ PrivateRoute.tsx:50
renderWithHooks @ react-dom.development.js:16305
mountIndeterminateComponent @ react-dom.development.js:20074
beginWork @ react-dom.development.js:21587
beginWork$1 @ react-dom.development.js:27426
performUnitOfWork @ react-dom.development.js:26557
workLoopSync @ react-dom.development.js:26466
renderRootSync @ react-dom.development.js:26434
performSyncWorkOnRoot @ react-dom.development.js:26085
flushSyncCallbacks @ react-dom.development.js:12042
flushSyncCallbacksOnlyInLegacyMode @ react-dom.development.js:12021
batchedUpdates$1 @ react-dom.development.js:26148
batchedUpdates @ react-dom.development.js:3991
dispatchEventForPluginEventSystem @ react-dom.development.js:9287
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465
dispatchEvent @ react-dom.development.js:6457
dispatchDiscreteEvent @ react-dom.development.js:6430

How to reproduce(required)
Detailed steps to reproduce the behaviour you experienced

Clone the react-auth-kit repo
Go to examples/create-react-app/src
yarn install && yarn start
in the browser navigate to localhost:3000/secure without logging in or login and logout
See the error in the console (i have exactly the same behaviour in my real app)

Correct behaviour
No Warning should be thrown under normal and expected operation
Possible reason
Calling context.dispatch in PrivateRoute.tsx line 44 causes a state to be updated by the useReducer hook which leads to the warning.
Screenshots

Desktop (please complete the following information):

OS: Windows
Browser Chrome
Version latest
node 18.13

Receiving this same error too

Same here!

Potential fix thanks to @federicoguti01 and @davidbro-in
const App = () => {
    //https://github.com/react-auth-kit/react-auth-kit/issues/1023
    const PrivateRoute = ({ Component }) => {
        const isAuthenticated = useIsAuthenticated();
        const auth = isAuthenticated();
        return auth ? <Component /> : <Navigate to="/login" />;
    };

    return (
        <AuthProvider authType={'cookie'}
            authName={'_auth'}
            cookieDomain={window.location.hostname}
            cookieSecure={window.location.protocol === "https:"}>
            <BrowserRouter>
                <div className="App">
                    <Navigation />
                    <Routes>
                        <Route path="/login" element={<Login />} />
                        <Route path="/home" element={<PrivateRoute Component={Home} />}></Route>
                    </Routes>
                </div>
            </BrowserRouter>
        </AuthProvider>
    )
}
export default App

Still relevant.

This issue is coming for the signOut operation. As the signout operation is responsible for a rerender and Navigate to login is taking place at the same time, the error is coming.
Ref: https://github.com/react-auth-kit/react-auth-kit/blob/792dad79c4844d5f02dda2c92cf188cf3934c6c8/src/PrivateRoute.tsx#L58

Here the issue is, the signIn method, takes time to update the context/cookie. In between if the user gets redirected to ProtectedRoute, it fails to authenticateif (!isAuthenticated(context.authState)) {}and forces the user to sign out.
    if (!isAuthenticated(context.authState)) {
        // Redirect them to the /login page, but save the current location they
        // were trying to go to when they were redirected. This allows us to
        // send them along to that page after they login, which is a nicer
        // user experience than dropping them off on the home page.
        context.dispatch(doSignOut());
        return React.createElement(Navigate, { to: loginPath, state: { from: location }, replace: true });
    }

We are completely blocked because of this. Is there any ETA for this bug?

Same error, when the token is refreshed with a refreshApi

I got the same error, anyone has an answer for this?

The issue seems to be that during the redirect two components are being rendered (and having state changed) at the same time.
In my case I was able to work around this by deferring the redirect until the current component has finished a render:
if (loggedIn) {
    setTimeout(() => navigate(redirectTo ?? '/'));
    return <></>;
  }

Looks like this has been open for a while, are there plans to address?

same problem :(

same problem

Same problem here as well! :(

The issue seems to be that during the redirect two components are being rendered (and having state changed) at the same time. In my case I was able to work around this by deferring the redirect until the current component has finished a render:
if (loggedIn) {
    setTimeout(() => navigate(redirectTo ?? '/'));
    return <></>;
  }

what is loggedIn?

Adding a setTimeout for the route push resolution for me.
if (!session) {
setTimeout(() => {
router.push("/login");
}, 100);
return null;

}

const signout = useSignOut();
const handleLogout = async () => {
navigate("/");
setTimeout(() => {
signout();
}, 1000);
};
it worked for me...

    const PrivateRoute = ({ Component }) => {
        const isAuthenticated = useIsAuthenticated();
        const auth = isAuthenticated();
        return auth ? <Component /> : <Navigate to="/login" />;
    };

Thanks

For me what worked was setting a object to authState in signIn function param

For me what worked was setting a object to authState in signIn function param

This also worked for me!

For me what worked was setting a object to authState in signIn function param

I tried this but still is throwing the warning

My solution:
function isTokenExpired(jwtAuthToken) {
    const encodedPart = jwtAuthToken.split(' ')[1]; // "Bearer eyJhbGciOiJ..."
    const decodedToken = jwt_decode(encodedPart); // using jwt_decode lib

    if (decodedToken.exp === undefined) return true;

    const expirationTimeMilliseconds = decodedToken.exp * 1000;
    const hasTokenExpired = Date.now() >= expirationTimeMilliseconds ? true : false;

    return hasTokenExpired;
}

const PrivateRoute = ({ YourProtectedComponent }) => {
    const isAuthenticated = useIsAuthenticated();
    const auth = isAuthenticated();

    const authHeader = useAuthHeader();
    const jwtAuthToken = authHeader();

    if (isTokenExpired(jwtAuthToken) && auth) {
        return YourProtectedComponent;
    }

    return <Navigate to="/login" />
};

const PrivateRoute = ({ YourProtectedComponent }) => {
    const isAuthenticated = useIsAuthenticated();
    const auth = isAuthenticated();

    const authHeader = useAuthHeader();
    const jwtAuthToken = authHeader();

    if (!isTokenExpired(jwtAuthToken) && auth) {
        return YourProtectedComponent;
    }

    return <Navigate to="/login" />
};

function isTokenExpired(jwtAuthToken) {
    if (!jwtAuthToken) return false; // does not exist
    const encodedPart = jwtAuthToken.split(' ')[1]; // "Bearer eyJhbGciOiJ..."
    const decodedToken = jwt_decode(encodedPart); // using jwt_decode lib

    if (decodedToken.exp === undefined) return true;

    const expirationTimeMilliseconds = decodedToken.exp * 1000;
    const hasTokenExpired = Date.now() >= expirationTimeMilliseconds ? true : false;

    return hasTokenExpired;
}

As @Shadowrunner11 says, skip authState in signIn throw this warning for me too (https://github.com/react-auth-kit/react-auth-kit/issues/1193#issuecomment-1627543050). Docs indicate that authState in signInConfig (https://authkit.arkadip.dev/signin/#signinconfig) is not optional, but table that explains signIn params indicate that it is (https://authkit.arkadip.dev/signin/#explanation-of-signinconfig). Seems table is wrong indicating this param is optional.

I got the same error.
I use useEffect https://nextjs.org/docs/pages/building-your-application/data-fetching/client-side

React Auth Kit v3 solves this issue. To solve the issue please use any release after v3.
Thanks!


Firewall rules for Build Agents

By default service fabric blocks all incoming ports. Which ports and IP addresses do I need to open for my Service Fabric cluster so the build works? Currently it only works if I open all ports and IPs. I tried opening specific ports, but the build agent fails to connect.

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

ID: 47625b86-abd5-ee15-6d61-8bcf81861b96
Version Independent ID: be9a6174-a69b-7aed-d584-5f602fcc5eb4
Content: Build and Release Agents - Azure Pipelines & TFS
Content Source: docs/pipelines/agents/agents.md
Product: devops
GitHub Login: @andyjlewis
Microsoft Alias: alewis

@TingluoHuang the agents don't need any incoming ports, right? They open a long poll socket to the server.

@vtbassmatt yes, the agent only needs to reach out to the internet.

@vdevappa can you explain your scenario a bit more? If Service Fabric needs to know outbound ports, it should be 443 (HTTPS) and nothing more. No inbound ports are required.

Thanks for the replies.
I finally managed to get this working. I got the IP range from the XML file for my Central region (DevOps) and I only had to open port 19000. The mistake was trying to give that 19000 port number in both the source and destination port ranges. The correct firewall setting is shown here.
The IP addresses being updated every week is hard. I wish there was just a static list of IPs for these build agents.


WIP: first pass at a temporary debian builder base build for Golang

Issue #, if available:
Description of changes:
First pass at a temporary debian-based golang base image. Dockerfile is based on an upstream Golang dockerfile, with mods made based on our system and to parameterize the version and release values.
This adds the build to the Golang makefile and project, and runs it as part of the standard EKS Go release. In pre-submit it won't push the images.
I wanted to avoid making this a part of the EKS D Minimal Images for the time being; tho if we do have to maintain it for the long-run we should perhaps consider moving it in to the base image builder as a variant of sorts.
We'll need to update the Golang prow jobs to include an image build; I'd like to wait for https://github.com/aws/eks-distro-prow-jobs/pull/419 to be merged before I make changes to those builds.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/retest

/retest

/test golang-1-19-tooling-presubmit

/test golang-1-16-tooling-presubmit

/retest

/retest

/retest

/test golang-1-18-tooling-presubmit
/test golang-1-19-tooling-presubmit

/approve


Update the whole documentation

Summary of changes
Changes introduced in this pull request
Update the README.md for all the contracts
Remove the unnecessary comments from rustfmt.toml files
Reference issue to close (if applicable)
Closes

Looks good to me! Could you also please fix these small lint issues in the mixer/src/test_util.rs?

Done https://github.com/webb-tools/protocol-cosmwasm/pull/49/commits/f10bb05923e7a3bea53a57c59729d237de203be5


Automated Package Upgrade

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


General content

See chapter "6. WORKSHOP" in confluence, see mail.
Deadline Wednesday 15th January

Solved


Bug: pericopies texts list not refreshed when pericope added

On dev environment pericopies texts list not refreshed when pericope added, error at the conslole.


Allow the environment setup without loading the database (settings provider) first

The settings provider won't load until the initial pterodactyl environment is set up. This allows package discovery to keep working on initial install.
This fixes #818

Thanks for the quick patch on this.


Reduce available properties for file uploader sample

Remove unnecessary properties
Remove redudant properties
Convert stream name and file start time to be arguments

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #450 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #450   +/-   ##
=======================================
  Coverage   63.21%   63.21%
=======================================
  Files          32       32
  Lines        1275     1275
=======================================
  Hits          806      806
  Misses        469      469

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 279a5dc...b7d3229. Read the comment docs.