sverhoeven - namespace, extraVolumes and extraVolumeMounts configurable ingress gateway

…extraVolumes ,extraVolumeMounts
Please provide a description of this PR:
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

[ ] Ambient
[x ] Configuration Infrastructure
[ ] Docs
[x ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ x] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Hi @sander-verhoeven. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Advanced customizations can be done like https://istio.io/latest/docs/setup/additional-setup/customize-installation-helm/

Don't you think this should be a standard to add volumes and volume mounts, instead of this approach:
{{- range $gateway.secretVolumes }}
        - name: {{ .name }}
          mountPath: {{ .mountPath | quote }}
          readOnly: true
        {{- end }}
        {{- range $gateway.configVolumes }}
        {{- if .mountPath }}
        - name: {{ .name }}
          mountPath: {{ .mountPath | quote }}
          readOnly: true
{{- end }}
{{- end }}

This is the legacy gateway chart anyways: https://artifacthub.io/packages/helm/istio-official/gateway

This is the legacy gateway chart anyways: https://artifacthub.io/packages/helm/istio-official/gateway

Ah I see, so we need to migrate to the new chart. I think we can close this pull request and we will do a migration to the new chart.

I take a look at the new chart but no volume has been configured in this chart. Shall I implement the extraVolumes/Volumemount in the new chart? @howardjohn

I think that can be done using the kustomize as mentioned.
On Mon, Jan 2, 2023, 5:35 AM Sander Verhoeven @.***>
wrote:

I take a look at the new chart but no volume has been configured in this
chart. Shall I implement the extraVolumes/Volumemount in the new chart?
@howardjohn https://github.com/howardjohn
—
Reply to this email directly, view it on GitHub
https://github.com/istio/istio/pull/42572#issuecomment-1368952979, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEYGXLWXGJUFRKSR74HHUTWQLKRFANCNFSM6AAAAAATKKHWF4
.
You are receiving this because you were mentioned.Message ID:
@.***>

For the 'new' helm chart - I would appreciate some research on how this is
done by popular charts ( and if there is any recommendation ).
If it is a common pattern - I don't mind it, but I would like the config to
look like a Pod ( i.e. not 'extraSomething' or new keywords, but closer
to what kustomize would look like ).
For the even newer install method - Istiod automatically creating the
deployment when K8S Gateway resources are created - I believe the
approach is to also create a Deployment with whatever volumes and settings
you need ( as if you were creating a regular install ), and Istiod will
just patch it ? John, can you confirm if this is the intended long term or
just a step ? I was wondering what will happen when ambient gets broadly
adopted - keeping injection around just for gateway seems overcomplex (
Istiod creates the pods and has all info, no need for another roundtrip ),
having
a 'template' that Istiod can apply without injection would  be simpler. And
we can keep the template in the same syntax as a Pod.
If you are currently using the old template - maybe worth moving directly
to the new 'new method', or at least try it and provide feedback
on any gaps.
On Mon, Jan 2, 2023 at 7:52 AM John Howard @.***> wrote:

I think that can be done using the kustomize as mentioned.
On Mon, Jan 2, 2023, 5:35 AM Sander Verhoeven @.***>
wrote:

I take a look at the new chart but no volume has been configured in this
chart. Shall I implement the extraVolumes/Volumemount in the new chart?
@howardjohn https://github.com/howardjohn
—
Reply to this email directly, view it on GitHub
https://github.com/istio/istio/pull/42572#issuecomment-1368952979, or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAEYGXLWXGJUFRKSR74HHUTWQLKRFANCNFSM6AAAAAATKKHWF4
.
You are receiving this because you were mentioned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/istio/istio/pull/42572#issuecomment-1369050750, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAUR2X6OJNXAM5URT6IWZ3WQL2SBANCNFSM6AAAAAATKKHWF4
.
You are receiving this because your review was requested.Message ID:
@.***>


Rerebase master (undo accidental history rewrite)

As discussed, an unintented history rewrite (of about 300 commits) happened here..
Steps to fix it:

git remote add LiaScript https://github.com/LiaScript/LiaScript-DevServer
git fetch --all
git checkout -b main-rerebase LiaScript/main
git cherry-pick 4ee7c30^..7ce6ab4

Which is what I did to end up with https://github.com/eMPee584/LiaScript-DevServer xD

nice, can you make a PR so that I can merge it?

(Resolved, force-pushed 8f9538abed6934b18f887ae6582b9c272f835ef6 last week..)


Failed to convert Qwen2-57B-A14B-Instruct when tp_size 8

when i set tp_size 8
[TensorRT-LLM] TensorRT-LLM version: 0.12.0.dev2024080600
0.12.0.dev2024080600
Loading checkpoint shards: 100%|████████████████████████████████████████████████| 29/29 [00:03<00:00,  8.20it/s]
############## tp_size:  8 ############# num_head:  4
v.shape: torch.Size([512, 3584])
############## tp_size:  8 ############# num_head:  4
v.shape: torch.Size([512, 3584])
############## tp_size:  8 ############# num_head:  4
v.shape: torch.Size([512])
Traceback (most recent call last):
File "/root/TensorRT-LLM/examples/qwen/convert_checkpoint.py", line 308, in
main()
File "/root/TensorRT-LLM/examples/qwen/convert_checkpoint.py", line 300, in main
convert_and_save_hf(args)
File "/root/TensorRT-LLM/examples/qwen/convert_checkpoint.py", line 256, in convert_and_save_hf
execute(args.workers, [convert_and_save_rank] * world_size, args)
File "/root/TensorRT-LLM/examples/qwen/convert_checkpoint.py", line 263, in execute
f(args, rank)
File "/root/TensorRT-LLM/examples/qwen/convert_checkpoint.py", line 246, in convert_and_save_rank
qwen = QWenForCausalLM.from_hugging_face(
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/model.py", line 315, in from_hugging_face
weights = load_weights_from_hf_model(hf_model, config)
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/convert.py", line 1223, in load_weights_from_hf_model
weights = convert_hf_qwen(
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/convert.py", line 758, in convert_hf_qwen
k_bias = dup_kv_weight(k_bias, num_key_value_heads,
File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/models/qwen/convert.py", line 528, in dup_kv_weight
v.shape[1])
IndexError: tuple index out of range
But when i set tp_size 4 its OK

Similar issue to https://github.com/NVIDIA/TensorRT-LLM/issues/2198.

currently we don't support the situation when num_attention_heads % tp_size != 0.


Serve Whitehall assets from S3 in Asset Manager in production

We'll need to serve Whitehall assets from S3 so that they're being served with the custom Last-Modified and ETag headers that are set in the database. These custom values are ignored if we serve from NFS.
We'll need to do this before merging and deploying https://github.com/alphagov/govuk-puppet/pull/6721.

I'm going to work on this now.

I've opened https://github.com/alphagov/govuk-puppet/pull/6736 to enable the proxying of Whitehall asset requests to S3 in production.

I've merged https://github.com/alphagov/govuk-puppet/pull/6736 and am going to ask someone to deploy govuk-puppet to staging and production.

Release 19555 of govuk-puppet (which includes the changes in https://github.com/alphagov/govuk-puppet/pull/6736) has recently been deployed to staging and production so I'm going to close this issue.


[ru_ru] Update

Fluid vacuum and bricks translation + an improved phrasing for "game by"

Thank you! Merging now.


Intl.format slow performance when using PlainDate instead of Date

When using PlainDate with a cached Intl.DateTimeFormat the performance is 15x worse than using Date.
Is this expected because it is just a polyfill ?
Date:

PlainDate:

Please can you share your benchmarking code?

Our main focus with the polyfill so far has been to ensure it's compliant to the Temporal spec. So we haven't spent a lot of time on perf optimizations, other than the most obvious ones like caching our usage of Intl.DateTimeFormat instances which can cost 10+ milliseconds to create.
But if you find an optimization opportunity in the polyfill, PRs are always welcome!
That said, seeing slower perf in this case isn't surprising. The polyfill's Intl.DateTimeFormat implementation is built on top of the native pre-Temporal Intl.DateTimeFormat implementation, which only accepts a Date parameter. So in order to call format, the polyfill needs to convert the Temporal.PlainDate to a Date.
This conversion is a relatively expensive operation that runs hundreds of lines of JS code and that makes at least one additional call to Intl.DateTimeFormat.prototype.format. (Maybe two, I forget if our DST-handling algorithm requires two of those calls.) You can trace through the call in a debugger to get a sense for what the polyfill has to do to make that conversion. It's a lot!
Note that the Temporal.PlainDate=>Date conversion is actually two steps: first convert Temporal.PlainDate to a Temporal.Instant in the current time zone (this is slow), and then convert the Temporal.Instant into an milliseconds-since-epoch value which is equivalent to a Date (this is very fast).
There's also some one-time costs associated with the first use of some Temporal APIs, while the polyfill sets up internal caches (notably a single cached Intl.DateTimeFormat instance that's used for time zone conversions as well as a list of time zone IDs). So the first call that deals with time zones will likely cost a few tens of milliseconds. I think there's other  Intl.DateTimeFormat-specific caches too, so if you format a Temporal.PlainDate with a particular polyfilled Intl.DateTimeFormat instance and later format a Temporal.PlainMonthDay, there's a cache-setup cost for each Temporal type.
A native implementation will be a lot, lot faster: likely faster than Intl.DateTimeFormat.prototype.format with a Date argument, because with Temporal.PlainDate there's no need to use a time zone to convert the argument to Year/Month/Day values that will be formatted.
But given the Temporal polyfill's dependency on native pre-Temporal Intl.DateTimeFormat implementation, we're kinda limited in how fast it can be.
If you have a particular, perf-sensitive use case that you want to share more details about, then we can probably recommend a faster way to achieve that use case that avoids expensive Temporal.PlainDate=>Instant conversions.
Here's a few techniques that could work:

If you have a few Temporal.PlainDate values that you'll be formatting regularly with different formatting options, then set up a cached map of Temporal.PlainDate=>Temporal.Instant conversions.
If you have a few Temporal.PlainDate values that you'll be formatting regularly with different formatting options, then set up a cached map of Temporal.PlainDate=>formatted-string.
Format Temporal.Instant instances instead. I suspect if you run the same benchmark with a Temporal.Instant instance, which has the same data model (time since epoch) as Date, then I'd expect Intl.DateTimeFormat.prototype.format(instant) to be only a little bit more expensive (at most 2x) than Intl.DateTimeFormat.prototype.format(date).
There are also some use cases where Temporal.ZonedDateTime can be faster, because Intl.DateTimeFormat.prototype.format(zdt.toInstant()) will be very fast. You still may incur conversion costs while creating the ZDT instance, so this will likely only be faster in use cases where the ZDT was created directly from a Temporal.Instant (e.g. instant.toZonedDateTimeISO('UTC')) as opposed to being created from an ISO string.

Thanks for trying out this polyfill!

Thank you for the detailed information.
I cannot use Temporal.Instant because I need the timezone information to get the day of the week -> plainDate.toZonedDateTime(timezone).dayOfWeek
Customers are ordering outside of germany in a different timezone but delivery is happening in germany. So I need to check if date in german timezone is sunday/saturday or if it is a holiday.
Thats why I need the timezone conversions.

For getting the day of the week in zoned time, I would suggest not going through formatting at all! Formatting other than with toString() is basically always going to be slow. Something like this:
function isWeekendInGermany(requestedDeliveryTime: Temporal.ZonedDateTime) {
  const {dayOfWeek} = requestedDeliveryTime.withTimeZone('Europe/Berlin');
  return dayOfWeek === 6 || dayOfWeek === 7;
}

For getting the day of the week in zoned time, I would suggest not going through formatting at all! Formatting other than with toString() is basically always going to be slow. Something like this:
function isWeekendInGermany(requestedDeliveryTime: Temporal.ZonedDateTime) {
  const {dayOfWeek} = requestedDeliveryTime.withTimeZone('Europe/Berlin');
  return dayOfWeek === 6 || dayOfWeek === 7;
}

Tried that already and it is not significantly faster since the performance loss is from converting to the specific timezone.
In my example PlainDate and Date both get converted to the timezone specific format, but PlainDate is a lot slower.

I see, so the bottleneck is the internal TimeZone.prototype.getPlainDateTimeFor call, not actually the formatting? (the formatting also has to convert exact time to plain time via the time zone, so that's what's slowing it down, I guess)
One possible workaround, if you only need the Europe/Berlin time zone functionality, is to create a custom time zone object that implements the DST transitions in Germany, and use that instead of the built-in time zone. (In a real implementation of Temporal, or a polyfill that brings its own time zone data instead of deriving it from Intl, a built-in time zone would always perform better than a custom one, but that doesn't seem to be the case here.)
An example of that is here, although that example has been languishing as an unmerged PR until I've finished some other higher-priority things so it might need some updating. That example is probably more comprehensive than you would need. You could probably cut out the parsing code, for example.

Are you originally starting with a date like 2023-08-25 or an exact point in time like 2023-08-25T12:34:56Z?
If the former, then the solution is very easy and fast: don't bother with time zones at all:
pd = Temporal.PlainDate.from('2023-08-25');
console.log(pd.dayOfWeek);
// 5

You can probably shave a few tends of microseconds by using a cached calendar:
isoCalendar = Temporal.Calendar.from('iso8601');
pd = Temporal.PlainDate.from('2023-08-25');
console.log(isoCalendar.dayOfWeek(pd));
// 5

But if you're starting with an exact instant (e.g. a Date or a Temporal.Instant) and need to figure out the date of that instant in a particular time zone, then any spec-compliant Temporal polyfill is pretty much guaranteed to be much slower than a single call to Intl.DateTimeFormat, because a lot of JS code needs to be run to do the conversion. You can minimize that code by using a cached time zone and a cached calendar:
const tzBerlin = Temporal.TimeZone.from('Europe/Berlin');
isoCalendar = Temporal.Calendar.from('iso8601');
function isWeekendInGermany(instant) {
  const dt = tzBerlin.getPlainDateTimeFor(instant);
  const dayOfWeek = isoCalendar.dayOfWeek(dt);
  return dayOfWeek ===6 || dayOfWeek === 7;
}
isWeekendInGermany(new Date().toTemporalInstant());
// => false
isWeekendInGermany(new Date().toTemporalInstant().add({hours: 24}));
// => true

If that's still not fast enough for your use case, then the custom time zone that @ptomato recommends seems like your best bet. Although at that point, given that you already have a workable solution using Intl.DateTimeFormat, then I'd probably just stick with that one.  Polyfills are, by definition, going to be slower than native solutions.
All that said, a difference of 0.1-0.2 milliseconds is fairly small!
When opening the year view, the days get checked to disable years if needed.
But I also have some other additional performance issue here which I need to investigate.

Cool. I'm going to close this issue because it sounds like the Temporal part is resolved. This was an interesting discussion. Thanks!


How to utilize Discord_Initialize() to connect to second local instance of Discord

Attempting to test locally for Rich Presence game joining, and utilizing Canary for a second instance of Discord.  However, I am not seeing how to attach to this second instance - the Discord API seems to mention a 5th argument, "pipe", as a way of connecting to an alternate instance.
Am I missing something?

There was a pipe argument available at a time but no release for it was ever made. The change was reverted in this commit and has not received a release.

So how would I utilize this functionality - or is a release planned including this in a release?

This library only adds an interface for the official SDK, if they decide not to make a release with this feature I can't either. You will have to ask them for any further details on its status.

Ahh, I understand my confusion - I thought the documentation was correct, and missed that the commit you referred to was from the official SDK.
Many thanks.


Switch is re-mounting the same component on route change

Version
4.0.0-beta.6
Test Case
Same issue as described here, the test case is from it
bug exists
http://codepen.io/ReactJSTraining/pen/ZLggog
no bug, but uses non-supported array as Route path
http://codepen.io/anon/pen/qReegR
Steps to reproduce
UsersIndex component is the one, that is persistent across the routes. Change the route to reproduce the bug (this component is re-mounted).
Expected Behavior
When route is changed, UsersIndex component is not re-mounted, only passed props are changing.
Actual Behavior
When route is changed, UsersIndex component is re-mounted on every route change.
This could be solved with Route path array support or current Switch component fix.

This might have to do with the usage of React.cloneElement in the <Switch> components render function. I tested this with my <ConfigSwitch>, which uses React.createElement, and it worked as expected (codepen).

Sanity check: Is this actually a problem? Mounting : unmounting !:: construction : destruction.
Switch's goal should be just to juggle which Route is mounted based on the current location. The component is actually instantiated into an element by the render function of the Switch's container. cloneElement is only used as a trick to inject some props into an already instantiated component. Otherwise, we'd just return the appropriate Route, mounting it onto the render tree.

@timdorr it's a common pattern to fetch data in componentDidMount(), it will also trigger on every route change. Same goes for render(), no way to prevent re-rendering.

Sorry, still not getting it (I'm trying!). What's the problem with that? If I've got some user profile page up, navigate away, the user posts some new content, and navigate back to the profile page, I would want to see that new content. So a fresh fetch from the lifecycle method would be good, no?

@timdorr in my use-case the component needs to be persistent across several routes.

When you navigate to /users, you can see UsersIndex with a list of users.
When you navigate to /users/create, you can see the same UsersIndex list of users and UsersCreate form (modal window).

So, when you navigate across this routes, UsersIndex is always visible and has to be mounted and fetched only once. When the user is added, the users list is automatically updated, no need to re-fetch.

Sort of. Why are you using a Switch for that? Just have a non-exact Route for the list:
<Route path="/users" component={UserIndex} />
<Route path="/users/create" component={UserCreate} />

That would do the same thing.

@timdorr it will render UserIndex on all /users routes, even on /users/not/found/route.
I want to render NotFound route on all undefined routes.

As i mentioned above, Switch can be replaced with an array of paths, passed to Route, but currently it's not supported (but working).
<Route exact path={['/users', `/users/create`]} component={UsersIndex} />

@timdorr I consider this a bug.
@VladShcherbin Please let's not talk about array paths in here, that's a totally different conversation :)

Hmm, maybe we don't use cloneElement? In any case, I'd love to see a failing test for this. Makes it a lot easier to fix.

cloneElement shouldn't cause a remount, I was just looking at the code and I'm a bit stumped

It's React.Children.toArray that causes this by setting the keys of the <Route>s.

Returns the children opaque data structure as a flat array with keys assigned to each child. Useful if you want to manipulate collections of children in your render methods, especially if you want to reorder or slice this.props.children before passing it down.

(docs)
Not sure exactly why this was added. If it's needed for flattening or sth, overwriting the key in cloneElement seems to work as well.
Anyway, I think there are arguments for both behaviors, both in terms of how you'd initially expect it to work and in terms of what you want to do with it. Though it seems that with the suggested behavior, one could force the remount by themselves, which is not possible the other way around, e.g.:
<Route render={() => <Comp key="1" />} />
<Route render={() => <Comp key="2" />} />

<Switch>
  <Route render={() => <Comp key="1" />} />
  <Route render={() => <Comp key="2" />} />
</Switch>

That feels more intuitive to me

Here's a test case:
  it('does not remount a route', () => {
    const node = document.createElement('div')
    const history = createMemoryHistory({ initialEntries: ['/'] })

    let mountCount = 0

    class App extends React.Component {
      componentWillMount() { mountCount++ }
      render() { return
 }
    }

    ReactDOM.render((
      <Router history={history}>
        <Switch>
          <Route exact path="/" component={App}/>
          <Route path="/foo" component={() =>
}/>
        </Switch>
      </Router>
    ), node)

    expect(mountCount).toBe(1)
    history.push('/foo')
    expect(mountCount).toBe(1)
    history.push('/')
    expect(mountCount).toBe(2)
  })

But I must be doing something wrong, because it passes...

@timdorr I guess it is:
ReactDOM.render((
  <Router history={history}>
    <Switch>
      <Route exact path="/" component={App} />
      <Route exact path="/foo" component={App} />
    </Switch>
    <Route path="/foo" component={() =>
}/>
  </Router>
), node)

Oh, I'm totally missing things. The App component should not be remounted at all when switching between two component'ed Routes. I thought it was remounting too much just in general (not when going between two unique Routes). My bad...
Let me work that into the test...

OK, here's a failing test:
  it('does not remount a route', () => {
    const node = document.createElement('div')
    const history = createMemoryHistory({ initialEntries: ['/foo'] })

    let mountCount = 0

    class App extends React.Component {
      componentWillMount() { mountCount++ }
      render() { return
 }
    }

    ReactDOM.render((
      <Router history={history}>
        <Switch>
          <Route path="/foo" component={App}/>
          <Route path="/bar" component={App}/>
        </Switch>
      </Router>
    ), node)

    expect(mountCount).toBe(1)
    history.push('/bar')
    expect(mountCount).toBe(1)
    history.push('/foo')
    expect(mountCount).toBe(1)
  })

And changing the top of Switch's render to this fixes it:
    const { children:routes } = this.props
    const { location } = this.state

It's React.Children.toArray that causes this

Nailed it, @taurose. Thanks :)

@mjackson Can we get a release for this one?

@wmertens Just released this morning in beta 7

I am now running beta7 but I'm still seeing my component being remounted. Any quick tips to find the responsible parent?

I can confirm there is no bug in beta 7.
@wmertens it's probably re-rendering due to props change on route change, not re-mounting.
Thank you, guys! 👍

No, the constructor is getting called, and I have to figure out which
parent is responsible…
On Sat, Mar 4, 2017, 9:14 AM Vlad Shcherbin<EMAIL_ADDRESS>wrote:

I can confirm there is no bug in beta 7.
@wmertens https://github.com/wmertens it's probably re-rendering due to
props change on route change, not re-mounting.
Thank you, guys! 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ReactTraining/react-router/issues/4578#issuecomment-284136399,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADWllyPAsyLz-0UGy2rvcw6Hx6uRKEUks5riR1ngaJpZM4MIqcN
.

Found it in code of my own (merge mishap). All I had to do was put a breakpoint in Reacts mountComponent and make it conditional on truthy doConstruct. The first component to hit the breakpoint has the culprit parent. Will remember that one, useful.
  mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
[...]
    // Initialize the public class
    var doConstruct = shouldConstruct(Component);
/*=> here*/    var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);

I am a bit new to React & React-Router. I am creating a SPA where I do not want components to be unmounted when I switch b/w routes. I am using 4.1.2 version of React-Router but ComponentDidMount is being called every time when I return to a mounted component after switching the route. Could you please suggest the version I should use.

Try looking at the unmount/remounts via the timeline as explained in
https://facebook.github.io/react/blog/2016/11/16/react-v15.4.0.html - see
which component stays mounted, that is the one responsible for remounting
the rest
On Fri, Aug 11, 2017 at 12:28 PM VaishaliJain0209<EMAIL_ADDRESS>wrote:

I am a bit new to React & React-Router. I am creating a SPA where I do not
want components to be unmounted when I switch b/w routes. I am using 4.1.2
version of React-Router but ComponentDidMount is being called every time
when I return to a mounted component after switching the route. Could you
please suggest the version I should use.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ReactTraining/react-router/issues/4578#issuecomment-321778928,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADWlmbpq8woeyih0jKG216HY5bcUhRIks5sXCzCgaJpZM4MIqcN
.

This still seems to be a problem if Switch is given an array of Route components (because of the key prop?).
So this doesn't cause a re-mount:
<Switch>
	<Route
		component={App}
		exact
		path="/"
	/>
	<Route
		component={App}
		exact
		path="/other"
	/>
</Switch>

But this does:
<Switch>
	{[
		<Route
			component={App}
			exact
			key="1"
			path="/"
		/>,
		<Route
			component={App}
			exact
			key="2"
			path="/other"
		/>,
	]}
</Switch>

Is that intentional/am I missing something?

What happens if you don't pass a key, or pass the same key twice?
And what are the circumstances of the remounting?
On Thu, Aug 17, 2017 at 8:26 PM Katie Peters<EMAIL_ADDRESS>wrote:

This still seems to be a problem if Switch is given an array of Route
components (because of the key prop?).
So this doesn't cause a re-mount:

But this does:

	{[
		,
		,
	]}

Is that intentional/am I missing something?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ReactTraining/react-router/issues/4578#issuecomment-323155243,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADWlo8e0jneofN5jNBumYcZDtlf8iGuks5sZIXkgaJpZM4MIqcN
.

@katiepeters Yes, React's reconciler will always unmount the existing component and mount a new one when two element's keys are different.

Ya, I ended up passing them the same key to get it to work. Wasn't sure if that was ideal, but maybe it's ok since Switch only renders one Route at a time

@wmertens , @pshrmn , @timdorr please take a look on this case with react-router-config here: https://github.com/ReactTraining/react-router/pull/5430

I'm not sure, this commit fixed the bug, I upgraded the latest version v4.2.0 as your release, and try it, the component also remount.
Here is my layout:
const Layout = ({children, location}) => {
  // url like /:personId/a, /:personId/b
  const personId = location.pathname.split('/')[2]
  // b or a path
  const activeKey = location.pathname.split('/')[3]
  // The problem is every time the path changed, the Profile always componentDidMount.
  return

    <Profile personId={personId}/>
    <Tabs
      type="card"
      activeKey={location.pathname.split('/')[3]}
      onTabClick={(key) => {
        const paths = location.pathname.split('/')
        history.push(`/person/${personId}/${key}`)
      }}
    >
      {tabs.map(tab =>
        (<TabPane tab={tab.title} key={tab.key}>
          {children}
        </TabPane>),
      )}
    </Tabs>

}

The below is the Router config:
const routes = [
  {
    path: '/a',
    component: A,
  },
  {
    path: '/b',
    component: B,
  },
  {
    path: '/c',
    component: C,
  },
]
const Router = ({ match }) => (
  <Switch>
    {
      routes.map(({ path, exact, strict, component: Comp }) =>
        (<Route
          key={path}
          path={`${match.url}${path}`}
          exact={exact}
          strict={strict}
          render={
            props => (
              <Layout {...props}>
                <Comp {...props} />
              </Layout>
            )
          }
        />),
      )
    }
  </Switch>
)

Every time the path change, the  component will didMount again, so maybe my usage is the incorrect way to reuse the layout?

I am causing the same problem. Any updates to this ?

@TimoRuetten that is very weird, can you share your whole code? This one looks too simplified…

@wmertens Yeah - its a bit simplified - but at the end not that much. This is the current code of our  which is the first rendered Main-Component after all Provider we are using:
export default () => (

    <Switch>
      <Route
        path="/:langCode"
        component={App}
      />
      <Route
        path="/:langCode/p/:nodeSlug/:nodeId"
        component={App}
      />
      <Route
        path="/:langCode/l/:regions*"
        component={App}
      />
    </Switch>

);

Then we have in our  a simple log in componentWillMount which gets always fired when clicking on a  link.

Are you sure it's the Switch and not something higher up? You can also put ?react_perf in your url and then you can use a Performance recording to see unmounts in the user events

Hey @wmertens - You were right, I'm sorry. A HOC of my <App /> produced this problem! Sorry for the confusion and thanks for the fast response & help!

@KaroseLiu you should give your Routes all the same key…

I still seem to be getting this issue (v4.2.2). I have confirmed that I have no HOC's or anything else affecting my app

This snippet works as expected without any unnecessary remounts, so the problem must be somewhere else.

for anyone searching here, I am not getting remounts on switch, UNLESS switch is wrapped with react transition group's TransitionGroup/CSSTransition components.

correction, I believe my above comment is only an issue when passing a key to switch, which react transition group requires.
Itb seems animating a switch with react transition group requires a location for the switch component, which intern is causing a remount on the routes called component.

You can also forego the switch and make sure only one route matches at a
time…
On Wed, Oct 11, 2017, 6:32 PM Noah Mason<EMAIL_ADDRESS>wrote:

correction, I believe my above comment is only an issue when passing a key
to switch, which react transition group requires.
Itb seems animating a switch with react transition group requires a
location for the switch component, which intern is causing a remount on the
routes called component.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ReactTraining/react-router/issues/4578#issuecomment-335868826,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADWlgvDvEf1g5Ee6rgh2phKLBzS_PPYks5srO2OgaJpZM4MIqcN
.

What if I want my route to unmount and also be in a switch...  Using react-router-dom 4.1.1, my routes inside the switch don't unmount.  I need them inside a switch to be able to use a catch all route.  Seems like it wouldn't be hard to add a prop to coerce an unmount?  Any advice for my use case?


Use Poetry workflow

Here a small PR using poetry in replacement of requirement.txt, setup.py, twine
I let the scripts because Tom seems to like that.
Small explanations for those who do not  know poetry : https://poetry.eustace.io/
About the changes :
Everything is stored in the pyproject.toml (pep 518)
venv become .venv because poetry auto find .venv virtualenv
install optional requirement via -E
I have to add  toml depedency and tweak a bit __init__ because apistar uses his own version number.
This assumes you already have poetry on your sytem (like pip)

<3 poetry

Build it to look at generated setup.py.

poetry does packaging and pyproject.toml seems to be python future.
I totally agree the project is very new

What @shulcsm said, what is the benefit of poety over existing projects like https://github.com/jazzband/pip-tools or https://docs.pipenv.org (the official recommendation)? The page doesn't have a section about this, so I'm actually curious. While it looks great, I assume that regarding adoption of apistar it is a good idea to go with something that is widely in use.

or https://docs.pipenv.org (the official recommendation)?

This is a huge misconception, PYPA, the Python Packaging Authority, merged a PR back when pipenv was still pretty young that included a doc change saying they recommended it officially. There was a huge amount of controversy, a lot of heated threads and discussions, because the recommendation was basically self-done, Kenneth just said yep I recommend my own project, it wasn't a community decision or one backed by anything other than what felt like a narcissistic action by the creator promoting his own library. I am not taking a side here, just trying to clear some stuff up. After all this controversy Kenneth amended the statement saying it is the recommended tool for applications, and not for libraries, because pipenv was not built for libraries, there is discussion here about it.
tl;dr: pipenv is official recommendation for applications, and it was not designed for building libraries and falls down in this area

what is the benefit of poetry over existing projects like https://github.com/jazzband/pip-tools

Poetry is an existing, established project as well. It was designed to support libraries and meets the use-case well, it takes cognitive overhead off of library maintainers and people who are contributing to the repo by simplifying dependency management.
Anyways, pip still works just fine, and most Python people already know it. Try poetry out and see if you like it, if you do, use it, we don't need to make a holy war out of this, but as for tools to manage this repo, pipenv simply just wasn't built for libraries.

@audiolion I'm not advocating pipenv over poetry but i'm against committing to it. "established" seems like a stretch since it has been around for less than a year and seems to have lots of churn.

Thanks for clearing that up, I was referring to this talk https://pyconweb.com/talks/01-07-2018/pipenv-python-dev-workflow-for-humans but did not double check. I can imagine the trouble after such selfmade recommendation. The application vs library use case is a good point. I am actually pretty happy with virtualenvwrapper + pip-tools myself, but combining their functionality sounds convenient, so am currently looking into pipenv and will do so for poetry as well.

This pr was mostly a try, to look what it looks like. I thougt it would be closed for a long day by tom :blush:

Thanks for having a look at this. Going to take a pass on either poetry or pipenv.


Add /getip

add a command that displays the ip and tells you the location (country and city)

It would require additional API or GeoIP db, doesnt fit into basic functional

It would require additional API or GeoIP db, doesnt fit into basic functional

This is a sketch of an idea. Thank you for your opinion


Sample output

Why is there no sample output in the README.md? I dont know what exactly does "markdown documentation for table schema" mean, though the project seems interesting and rather than have to try it, I'd like to see sample output.
I currently use sadisplay for generating ER diagrams for my Postgres DB schema and the word documentation in your project caught my attention. Thanks!

Thanks for the feedback. I agree this might be useful. To set your expectations, this generates markdown tables that document the current schema, including column name, type, default value, and null ability for all your tables. It doesn't generate ERDs. It's designed to serve as a reference for current table state for projects that manage SQL directly.
I hope that helps for now. I'll work on getting a sample output set up soon; probably over the holidays.

Thanks!


Build fails (with deprecated webpack functions)

Hello, we wanted to test this plugin for compatibility with fylr.
But the build with make all fails:
webpack --config webpack.config.js build/webfrontend/custom-data-type-ubhdgnd.entry.js build/webfrontend/custom-data-type-ubhdgnd.js
[webpack-cli] Failed to load '/home/philipp/go/src/github.com/programmfabrik/plugins/easydb-custom-data-type-ubhdgnd/webpack.config.js' config
[webpack-cli] TypeError: UglifyJsPlugin is not a constructor
    at Object.<anonymous> (/home/philipp/go/src/github.com/programmfabrik/plugins/easydb-custom-data-type-ubhdgnd/webpack.config.js:21:7)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at WebpackCLI.tryRequireThenImport (/home/philipp/go/src/github.com/programmfabrik/plugins/easydb-custom-data-type-ubhdgnd/node_modules/webpack-cli/lib/webpack-cli.js:223:30)
    at loadConfigByPath (/home/philipp/go/src/github.com/programmfabrik/plugins/easydb-custom-data-type-ubhdgnd/node_modules/webpack-cli/lib/webpack-cli.js:1406:38)
    at /home/philipp/go/src/github.com/programmfabrik/plugins/easydb-custom-data-type-ubhdgnd/node_modules/webpack-cli/lib/webpack-cli.js:1460:88
make: *** [Makefile:61: build/webfrontend/custom-data-type-ubhdgnd.js] Error 2

Maybe the referenced UglifyJsPlugin is just old/deprecated? I found https://stackoverflow.com/questions/69468568/typeerror-webpack-optimize-uglifyjsplugin-is-not-a-constructor.
Is there anything we need to fix here (use some specific versions?), or could you please update the referenced libraries in the plugins?
Best regards,
Philipp Hempel
Programmfabrik GmbH

Dear Philipp Hempel,
sorry the code is not up to date in this repository, I used this repository to cooperate with @iulusoy and @GwydionJon on the implementation of the CustomDataTypeUpdater.
The latest version is not hosted on Github, but on the Gitlab Instance of UB-Heidelberg.
https://gitlab.ub.uni-heidelberg.de/fdm/easydb-custom-data-type-ubhdgnd/
I can send a pull request to update the code here also.
Thanks for reaching out and testing.
Best Regards,
Nils Weiher

Thank you!
For now, we will use the version from gitlab then.


Bug report: SharePoint checkout seems to be broken via JS API

Priority
(Medium) I'm annoyed but I'll live
Description
Running spo page section add via the JS API when the file is not already checked out seems to check out the file but then fail to actually add the section. However the command still succeeds and throws no error. This is possibly the case with other page manipulation functions too, but I haven't been able to test any others.
Steps to reproduce
Here is a simple script that demonstrates my issue.

npm install @pnp/cli-microsoft365
Replace the domain and site name in the below script and save it as demo.js
Run node demo.js

#!/usr/bin/env node
const { executeCommand } = require('@pnp/cli-microsoft365');

async function demo(){
    const page = "demo.aspx"
    const listener = {
        stdout: console.log,
        stderr: console.error
    }
    const options = {
        webUrl: "<MY SHAREPOINT DOMAIN>/sites/<MY SITE NAME>",
        debug: true
    }

    console.error("Adding page")
    await executeCommand("spo page add", {
        name: page,
        ...options
    }, listener)
    console.error("Adding section")
    await executeCommand("spo page section add", {
        pageName: page,
        ...options
    }, listener)
    console.error("Listing sections")
    await executeCommand("spo page section list", {
        pageName: page,
        ...options
    }, listener)
}

demo()

Run m365 spo page section list --webUrl <MY URL> --pageName demo.aspx

Expected results
I would expect the above commands to create a new section in the newly created page.
Actual results
The m365 spo page section list command returns nothing, indicating that no sections exist.
Also, if you inspect the (very verbose) debug output, and look at the API calls made after "Adding section" is called but before "Listing sections", we have:

/_api/sitepages/pages/GetByUrl('sitepages/demo.aspx')?$select=CanvasContent1,IsPageCheckedOutToCurrentUser
/_api/sitepages/pages/GetByUrl('sitepages/demo.aspx')/checkoutpage

In other words, the file is being checked out but not actually modified.
Interestingly, if you modify the above script and duplicate the section creation (run it twice), the first call checks out the file, and the second call does the actual creation. This acts as a workaround for now.
I love the auto-checkout functionality, it's very user friendly, but it would be nice for the command to do the thing being requested as well.
Diagnostics
No response
CLI for Microsoft 365 version
v6.7.0
nodejs version
v18.15.0
Operating system (environment)
Linux
Shell
zsh
cli doctor
{
  "os": {
    "platform": "darwin",
    "version": "Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:07 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8110",
    "release": "21.6.0"
  },
  "cliVersion": "6.7.0",
  "nodeVersion": "v18.15.0",
  "cliAadAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
  "cliAadAppTenant": "common",
  "authMode": "DeviceCode",
  "cliEnvironment": "",
  "cliConfig": {},
  "roles": [],
  "scopes": [
    "AllSites.FullControl",
    "AppCatalog.ReadWrite.All",
    "ChannelMember.ReadWrite.All",
    "ChannelMessage.Send",
    "ChannelSettings.ReadWrite.All",
    "Directory.AccessAsUser.All",
    "Directory.ReadWrite.All",
    "Group.ReadWrite.All",
    "IdentityProvider.ReadWrite.All",
    "Mail.ReadWrite",
    "Mail.Send",
    "Policy.Read.All",
    "Reports.Read.All",
    "Tasks.ReadWrite",
    "Team.Create",
    "TeamMember.ReadWrite.All",
    "TeamsApp.ReadWrite.All",
    "TeamsAppInstallation.ReadWriteForUser",
    "TeamSettings.ReadWrite.All",
    "TeamsTab.ReadWrite.All",
    "TermStore.ReadWrite.All",
    "User.Invite.All",
    "User.ReadWrite.All",
    "profile",
    "openid",
    "email",
    "AllSites.FullControl",
    "AppCatalog.ReadWrite.All",
    "ChannelMember.ReadWrite.All",
    "ChannelMessage.Send",
    "ChannelSettings.ReadWrite.All",
    "Directory.AccessAsUser.All",
    "Directory.ReadWrite.All",
    "Group.ReadWrite.All",
    "IdentityProvider.ReadWrite.All",
    "Mail.ReadWrite",
    "Mail.Send",
    "Policy.Read.All",
    "Reports.Read.All",
    "Tasks.ReadWrite",
    "Team.Create",
    "TeamMember.ReadWrite.All",
    "TeamsApp.ReadWrite.All",
    "TeamsAppInstallation.ReadWriteForUser",
    "TeamSettings.ReadWrite.All",
    "TeamsTab.ReadWrite.All",
    "TermStore.ReadWrite.All",
    "User.Invite.All",
    "User.ReadWrite.All",
    "AllSites.FullControl",
    "AppCatalog.ReadWrite.All",
    "ChannelMember.ReadWrite.All",
    "ChannelMessage.Send",
    "ChannelSettings.ReadWrite.All",
    "Directory.AccessAsUser.All",
    "Directory.ReadWrite.All",
    "Group.ReadWrite.All",
    "IdentityProvider.ReadWrite.All",
    "Mail.ReadWrite",
    "Mail.Send",
    "Policy.Read.All",
    "Reports.Read.All",
    "Tasks.ReadWrite",
    "Team.Create",
    "TeamMember.ReadWrite.All",
    "TeamsApp.ReadWrite.All",
    "TeamsAppInstallation.ReadWriteForUser",
    "TeamSettings.ReadWrite.All",
    "TeamsTab.ReadWrite.All",
    "TermStore.ReadWrite.All",
    "User.Invite.All",
    "User.ReadWrite.All"
  ]
}

Additional Info
No response

Was able to reproduce it. Now checking what causes the issue.

Found the culprit, and fixed it in a PR. We'll try to merge this ASAP, thank you to bring this to the surface.

@multimeric the PR has been merged and the fix is now available in our beta release.
You can install it by running
npm i -g @pnp/cli-microsoft365@next

Once again thank you for bringing this bug to the surface! 🙏


Kuadrant extension enhancements

What
Kuadrant extensions for the Openapi 3.0.3 to add Gateway API HTTPRoute and Rate Limit Policy
Info level kuadrant extension
Kuadrant extension that can be added at the info level of the OpenAPI spec.
info:
  x-kuadrant:
    route:  ## HTTPRoute metadata
      name: "petstore"
      namespace: "petstore"
      labels:  ## map[string]string
        deployment: petstore
      hostnames:  ## []gateway.networking.k8s.io/v1beta1.Hostname
        - example.com
      parentRefs:  ## []gateway.networking.k8s.io/v1beta1.ParentReference
        - name: apiGateway
          namespace: gateways

Path level kuadrant extension
Kuadrant extension that can be added at the path level of the OpenAPI spec.
This configuration at the path level is the default when there is no operation level configuration.

What's new? disable field. Optional and defaults to false. This means, that unless explicitly excluded, all OpenAPI operations will be included in the HTTPRoute

What's new? pathMatchType field. Specifies how to match against the path Value. Valid values: [Exact;PathPrefix]. Optional. Default: Exact

paths:
  /cat:
    x-kuadrant:  ## Path level Kuadrant Extension
      disable: true  ## Remove from the HTTPRoute. Optional. Default: false
      pathMatchType: Exact ## Specifies how to match against the path Value. Valid values: [Exact;PathPrefix]. Optional. Default: Exact
      backendRefs:  ## Backend references to be included in the HTTPRoute. []gateway.networking.k8s.io/v1beta1.HTTPBackendRef. Optional.
        - name: petstore
          port: 80
          namespace: petstore
      rate_limit:  ## Rate limit config. Optional.
        rates:   ## Kuadrant API []github.com/kuadrant/kuadrant-operator/api/v1beta2.Rate
          - limit: 1
            duration: 10
            unit: second
        counters:   ## Kuadrant API []github.com/kuadrant/kuadrant-operator/api/v1beta2.CountextSelector
          - auth.identity.username
        when:   ## Kuadrant API []github.com/kuadrant/kuadrant-operator/api/v1beta2.WhenCondition
          - selector: metadata.filter_metadata.envoy\.filters\.http\.ext_authz.identity.userid
            operator: eq
            value: alice

Operation level kuadrant extension
Kuadrant extension that can be added at the operation level of the OpenAPI spec.
Same schema as path level kuadrant extension.

What's new? disable field. Optional and defaults to false. This means, that unless explicitly excluded, all OpenAPI operations will be included in the HTTPRoute

What's new? pathMatchType field. Specifies how to match against the path Value. Valid values: [Exact;PathPrefix]. Optional. Default: Exact

paths:
  /cat:
    get:
      x-kuadrant:  ## Path level Kuadrant Extension
        disable: true  ## Remove from the HTTPRoute. Optional. Default: path level "disable" value
        pathMatchType: Exact ## Specifies how to match against the path Value. Valid values: [Exact;PathPrefix]. Optional. Default: Exact
        backendRefs:  ## Backend references to be included in the HTTPRoute. Optional.
          - name: petstore
            port: 80
            namespace: petstore
        rate_limit:  ## Rate limit config. Optional.
          rates:   ## Kuadrant API github.com/kuadrant/kuadrant-operator/api/v1beta2.Rate
            - limit: 1
              duration: 10
              unit: second
          counters:   ## Kuadrant API github.com/kuadrant/kuadrant-operator/api/v1beta2.CountextSelector
            - auth.identity.username
          when:   ## Kuadrant API github.com/kuadrant/kuadrant-operator/api/v1beta2.WhenCondition
            - selector: metadata.filter_metadata.envoy\.filters\.http\.ext_authz.identity.userid
              operator: eq
              value: alice

OpenAPI doc example with the new extensions
---
openapi: "3.0.3"
info:
  title: "Pet Store API"
  version: "1.0.0"
  x-kuadrant:
    route:
      name: "petstore"
      namespace: "petstore"
      labels:
        label1: "labelvalue1"
        label2: "labelvalue2"
      hostnames:
        - example.com
      parentRefs:
        - name: istio-ingressgateway
          namespace: istio-system
servers:
  - url: https://example.io/api/v1
paths:
  /cat:
    x-kuadrant:  ## Path level Kuadrant Extension
      backendRefs:
        - name: petstore
          port: 80
          namespace: petstore
      rate_limit:
        rates:
          - limit: 1
            duration: 10
            unit: second
        counters:
          - request.headers.x-forwarded-for
    get:  # Added to the route and rate limited
      operationId: "getCat"
      responses:
        405:
          description: "invalid input"
    post:  # NOT added to the route
      x-kuadrant:  ## Operation level Kuadrant Extension
        disable: true
        pathMatchType: PathPrefix
        backendRefs:
          - name: petstore
            port: 80
            namespace: petstore
        rate_limit:
          rates:
            - limit: 2
              duration: 10
              unit: second
          counters:
            - request.headers.x-forwarded-for
      operationId: "postCat"
      responses:
        405:
          description: "invalid input"
  /dog:
    get:  # Added to the route and rate limited
      x-kuadrant:  ## Operation level Kuadrant Extension
        backendRefs:
          - name: petstore
            port: 80
            namespace: petstore
        rate_limit:
          rates:
            - limit: 3
              duration: 10
              unit: second
          counters:
            - request.headers.x-forwarded-for
      operationId: "getDog"
      responses:
        405:
          description: "invalid input"
    post:  # Added to the route and NOT rate limited
      x-kuadrant:  ## Operation level Kuadrant Extension
        backendRefs:
          - name: petstore
            port: 80
            namespace: petstore
      operationId: "postDog"
      responses:
        405:
          description: "invalid input"
  /mouse:
    x-kuadrant:  ## Path level Kuadrant Extension
      disable: true
    get:  # NOT added to the route
      operationId: "getMouse"
      responses:
        405:
          description: "invalid input"

@eguzki looks good to me, the label copying much better!


Information about 2D bounding boxes

In the final result, the generated txt contains 3d information. I would like to know how the result of'(a) part' mentioned in the picture of your paper is transferred to'(b) part', you can tell How is this part of my content reflected in the code?

In other words, at which step is the result of the 2D bounding box stored, because I want to replace the 2D bounding box information, thank you for your help

Hi, our result of the 2D bounding boxes is generated here during training and here during inference. You can check more details by tracing our code of bbox head.


Installation fails without IsoSpecPy installed on mac os x 10.14.3

Followed installation instructions, during setup.py, there is a problem installing dependency IsoSpecPy:
Running IsoSpecPy-2.0.1/setup.py -q bdist_egg --dist-dir /var/folders/kt/pkd6vlkx51n88jjls5j6l87r0000gp/T/easy_install-56ffs0at/IsoSpecPy-2.0.1/egg-dist-tmp-p3m01oo0
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from IsoSpec++/unity-build.cpp:27:
IsoSpec++/allocator.cpp:18:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 warning and 1 error generated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

I was able to get around this problem by retrieving the source for the IsoSpec dependency from here
and in IsoSpecPy-2.0.1/setup.py, adding the suggested command line option stdlib=c++:
cmodule = Extension('IsoSpecCppPy',
                    sources = ['IsoSpec++/unity-build.cpp'],
                    extra_compile_args = '-stdlib=libc++ -mtune=native -march=native -O3 -std=c++17'.split() #+ ['-DDEBUG']
                    )

after that, just run make in IsoSpecPy-2.0.1, which will put this dependency on the easy-install.pth.
re-running the wassersteinms/setup.py script works for me now

Hi, (IsoSpec maintainer here)
We can't really just add the "-stdlib=libc++" as it breaks the build on all other platforms (GCC doesn't accept that as a valid parameter). That seems to be needed for clang/OSX, but on macosx the "gcc" command is often actually clang masquerading as GCC, but sometimes not, and we'll probably have to add some convoluted logic to detect that...

@michalsta, Could you use platform.system() to conditionally include or exclude the stdlib=libc++ flag in extra_compile_args?

Nah, not that easy, that'd break the build on OSXes where g++ really is g++ and not clang pretending to be g++. Regardless, I think I've managed to work some (rather ugly...) workaround for this, would you mind running pip install IsoSpecPy==2.0.2b1 and seeing if it works now?

Hey @michalsta, pip install IsoSpecPy==2.0.2b2 is working for me.


修复application.yml与file.conf里分组名不一致的问题

@slievrly @xingfudeshi @zjinlei PTAL

@slievrly, I'll fire a new pull request as you advice.


Davies bouldin index returning inf due to self distance computation between cluster centers

When trying to compute Davies Bouldin score on time series clustering results, I ended up with infinite value.
After some investigation, I found that distance between centroids returns 0 when computing distance between a centroid and itself (here)
Yet, when computing the final score, no distinction seems to be made on these values. So davies_bouldin() function returns inf because it looks for the max value between any distances and an infinite value.
And this infinite value is always included, no matter what because of the first condition above.
See : https://github.com/nglm/pycvi/blob/9a356a554e4ed23cc64ed5f4b49cb18e60d92005/pycvi/cvi_func.py#L1007
This line's purpose is unclear to me : why adding infinite value when distance is 0, is it possible to have two different clusters with a null distance between their centroids ? Otherwise, distance between a cluster center and itself should just be ignored, right ?
Is it something specific to the Davies Bouldin score implementation ? Does anyone encountered the same problem ?
I may be wrong but what about changing this line to :
if i != j else 0

I feel like it would just ignore the cases where distance have been computed between a cluster center and itself ? (and so that it doesn't impact the _dist_between_centroids() function that may be used for other purposes/metrics)
What do you think ?

Hi @benjaminh ! Thank you again for sharing your comments!
I think you found something in the code that is actually not consistent with the original paper as the paper does specify that i should be different from j when computing the max value (which indeed makes senses because, as you pointed out, it would otherwise always pick this infinite value).
However, I am not sure your suggested solution would be "loyal" to the original paper [^DB], as two clusters could have the exact same centroid while being actually very well separated (imagine 2 concentric circles of different radius). And, in this case, Davies Bouldin index would actually completely fail to assess those clusters as well separated and will then give them a bad "score" (inf). As of now, I don't think it is PyCVI's task to "fix" the original index as in this case, it was intended that clusters with identical centroids would give a bad Davies-Boulding score instead of being ignored and pretend that there is nothing wrong in the given clustering.
I just updated the master branch with the following code instead:
# Compute R_ijs even when i=j
R_ijs = [
    [
        (S_is[i] + S_is[j]) / dist_between_centroids[i][j]
        if dist_between_centroids[i][j] != 0 else np.inf
        for j in range(k)
    ] for i in range(k)
]

# Remove the case i == j as described in the paper
R_ijs = [
    [
        R_ijs[i][j] for j in range(k) if i != j
    ] for i in range(k)
]

# Compute R_is = max_j of R_ijs when i != j
R_is = [
    np.amax(R_ijs) for i in range(k)
]

Doing it in two steps allows us to distinguish between cases where dist_between_centroids[i][j] == 0 because i == j (which we want to ignore as the original paper suggests) and cases where dist_between_centroids[i][j] == 0 with i != j but because the centroids of the clusters are actually the same (which we want to penalize in terms of Davies-Bouldin results).
What do you think of this solution? Does it still answer your concerns?
[^DB]: D. L. Davies and D. W. Bouldin, “A cluster separation measure,” IEEE
Transactions on Pattern Analysis and Machine Intelligence, vol. PAMI-1, pp.
224–227, Apr. 1979.

Hello @nglm ,
thank you for your quick feedback. You're right, I missed the case when Davies-Bouldin should indeed return np.inf if two different clusters share the same center (like in your illustrating example).
Your solution seems allright to me and does answer my concerns !
Thanks again :)


TransitionContainer should be able to have a transition

Fadeout or (un)reveal, probably.

This is technically supported now via manager passing styles down. To be decided if it's really needed though.


style(api-client): address bar loading background

this pr increases z index on loading background in address bar component, in order to fix color inconsistencies when submitting request without focus as seen below:
before

after

🔥


Added HTML Jinja2 Template card

The filename key in hacs.json can not be used until v.014 of HACS is released, until then I can not accept this PR, since it will give errors on every installation.

Could you estimate a date of the release?

best guess 1 or 2 weeks


Update shiki to latest

WIP

Deprecated by https://github.com/microsoft/TypeScript-Website/pull/1545


Vertical scrolling?

It seems reasonable to implement an optional for vertical scrolling / horizontal scrolling. Will vertical scrolling be implemented?

vertical scrolling is implemented for the windows platform only. horizontal scrolling is implemented for android and ios.
we are currently not planing to implement new scrolling features.

I’m looking for vertical scrolling on IOS. Any idea when it will come out? Is there an experimental branch that this currently exists on?
Josh Terrill
On Aug 14, 2017, 2:22 AM -0700, Felix Schauerte<EMAIL_ADDRESS>wrote:

vertical scrolling is implemented for the windows platform only. horizontal scrolling is implemented for android and ios.
we are currently not planing to implement new scrolling features.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I misread your comment, so you're not planning on implementing any vertical scrolling on android and IOS?

A couple more questions, if you're not planning on integrating vertical scroll for iOS/android, may I ask why? Is it because technically speaking it's not possible / very difficult to do? Or is it because the feature itself does not align with the goal of the repo, therefore you don't want to add it? If someone did implement an option for vertical scroll on iOS/android, would you accept it?

May be someone already implemented this feature in a github fork. You would have to check that out on your own.
Any pull requests are welcome. They need to be documented and tested. We prefer implementaions that cover windows, android and ios, but implementations for one or two platforms are also welcome.

Okay. This specific implementation would cover that, because the feature is already available and implemented in one, and not the other two. I’ll see what it will take if I can’t find another library to do it.
On Aug 14, 2017, 6:59 AM -0700, Felix Schauerte<EMAIL_ADDRESS>wrote:

May be someone already implemented this feature in a github fork. You would have to check that out on your own.
Any pull requests are welcome. They need to be documented and tested. We prefer implementaions that cover windows, android and ios, but implementations for one or two platforms are also welcome.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Any update on this?
Has anyone found a fork with vertical scrolling enabled?


Issue with menu-item on At-spi branch

Expected Behavior
We should be able to click on a menu item when running . This is a new issue that was found on the at-spi branch
We are trying to click on a menu item like this.

Actual Behavior
An exception is being thrown when trying to access the menu item. We located the source of the error over at one of the site-packages.

After commenting out the source of the error, it clicks the menu item just fine.
Steps to Reproduce the Problem

After the menu item pops up, we try to click on the menu item
When trying to find the window, this is where the exception gets thrown.

Short Example of Code to Demonstrate the Problem

Specifications

Pywinauto version: at-spi(latest)
Python version and bitness: 3.8.3 64 bit
Platform and OS: Windows 10

This is a new issue that was found on the at-spi branch

Is this meaning that didn't occur in version 0.6.8 but occurred in the atspi branch?


Service Fabric Manifests and API Port updates to require endpoint is specified in env var

Adds some container deployment-related resources for backend services:

Dockerfiles and Docker-compose files
Service Fabric manifests

Also, updates ApiPort to require the PortabilityService endpoint be explicitly set (for now) either through an env. var or a command line switch (-e).

I can see that. Where would you prefer the manifests to live? In a ServiceFabric folder in root? Perhaps in Deploy/ServiceFabric?

Something like deploy/ServiceFabric sounds good to me.

Ah, I just realized that ApiPort tests are busted by my change to require -e. Investigating...

Tests are now fixed.

LGTM Are you ready to merge in?

in case you were wondering, I was opening/closing as the CI wasn't building the PR - was hoping to trigger it.


Pattern: develop content array section with pictograms

User Story

As a [user role below]:
developer using the ibm.com Library

I need to:
have a content array with pictogram pattern that can be used

so that I can:
leverage it within my application

Additional information

Pictogram Array Functional Specs
Pictogram Array Visual Specs [sketch][png]
Content group #745
Pictogram object #744
Markdown utility #743

Acceptance criteria

[ ] tested React component within the Patterns Storybook
[ ] Story within Storybook with corresponding knobs
[ ] minimum 80% unit test coverage
[ ] Utilize Carbon
[ ] Content Group with title
[ ] List of Pictogram Content Objects
[ ] Part of @carbon/ibmdotcom-patterns
[ ] Design, Development, & OM Approved

@RobertaJHahn @jeffchew based on #680 I broke this story down into a couple of stories #745, #744, #743, updated the description with the correct links and updated its dependencies and acceptance criteria.


Rotation Issue of throwing an error for the second iteration whose k is not the power of 2

Hi,
I've been following this https://github.com/tuneinsight/lattigo/discussions/327
and I found the first iteration could succeed, but the second iteration throws an error when running the rotation statement.

error:

I'm not sure what the problem is, would you have a look? The way I use is wrong? the problem of the code itself? or some bugs?
BR

I found that the problem may be the rotation param "k".
for a ciphertext which consists of 64 values, I want to move the first slot right to the second slot, but this rotation function uses left move, so I should move the first slot left 63 slots, but the error shows, why?
And how to avoid this error?
BR

According to test,
evaluator.Rotate(encInputCopy, 0, encInputCopy) // succeed
evaluator.Rotate(encInputCopy, 1, encInputCopy) // succeed
evaluator.Rotate(encInputCopy, 2, encInputCopy) // succeed
evaluator.Rotate(encInputCopy, 3, encInputCopy) // error
evaluator.Rotate(encInputCopy, 4, encInputCopy) // succeed

Must all rotate relative methods in ckks.evaluator have the rotation offsets which must be the power of 2?
Then how to rotate by 3 for example?
Does it mean I need to manually rotate 2 and then rotate 1? Cause 3 = 2+1
BR

Hi @macknight,
Have you made sure that you have computed the required rotations keys for your circuit?

Hi @macknight,
Have you made sure that you have computed the required rotations keys for your circuit? If you are using the default ones of the example, it will indeed only work for powers of two.

Is this the default way?

BR

@macknight You have to generate one key for each different rotation that you will use. The example in ckks/advanced/lut shows how to do it for the centralized scheme, and the example in drlwe for the threshold variant. Please make sure you research first before opening an issue.


Formula reference link broken

See also: Formula reference (https://docs.microsoft.com/en-us/maker/canvas-apps/formula-reference.md) reports 404 page not found

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

ID: e88a817c-546d-a124-4bd6-0f3dd89b53a1
Version Independent ID: 1334d387-c087-0ed6-3cbb-558f89256d75
Content: Use Power Fx with commands - Power Apps
Content Source: powerapps-docs/maker/model-driven-apps/commanding-use-powerfx.md
Service: powerapps
GitHub Login: @caburk
Microsoft Alias: caburk

Checking back on this, the link has been fixed.


Updating Partners Section

Solves Issue #95
Description: Removed Partners/Sponsor's name from below the Partner's logo and added an on-hover display effect for the same.
Checklist

[x] I've followed the Contributing guidelines provided in the repository.
[x] I've made the changes which were demanded in the linked issue.
[x] I've tested my code on a Chromium based browser.
[x] I've tested my code on Mozilla Firefox.
[x] My code gave a clean console on debugging. (no warnings/errors)

As of now on clicking, each logo is redirecting to a page of that particular partner.
But I think we will be having a single page for all partners !!

@ankiiitraj I think we can merge this now.


Segmentation fault

Helo everybody.
I finally managed to compile my project inside the codeblocks.
Apparently, all depthai-core dependency libraries have been properly compiled and installed.
After a good spanking, my program finally finds libdepthai-core.so.
So I took the example given in: depthai-core / examples / src / camera_video_example.cpp.
However, when I try to run it bursts on the line “dai :: Device d (p);”.
With the following error: "Segmentation fault".
I have already enabled the Raspberry pi 3 camera interface.
3D camera on and connected via USB.
I keep trying to solve it.
Any tips on what could be the problem?
Thanks.

@AndreFCosta608 does compiling the example using CMake as described in README work for you?
And WRT to your specific case, can you run the example under gdb and post the backtrace?
$ gdb camera_video
gdb> run
... crash
gdb> bt


Update README.md

Codecov Report

Merging #97 (82d8e00) into master (2b0f9f3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #97   +/-   ##
=======================================
  Coverage   79.79%   79.79%
=======================================
  Files           4        4
  Lines         960      960
=======================================
  Hits          766      766
  Misses        194      194

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 2b0f9f3...82d8e00. Read the comment docs.


Remove mountingLens from ConfigOps

Motivated by downstream needs for SD-1667
Also brings ConfigOps closer to its typeclass disposition

:+1:

[Current coverage][cc-pull] is 79.19%

Merging [#1201][cc-pull] into [master][cc-base-branch] will decrease coverage by 0.18%

2 files (not in diff) in ...rc/main/scala/quasar were modified. more

Misses +2
Hits -2

2 files (not in diff) in ...in/scala/quasar/repl were modified. more

Misses +2
Hits -2

5 files (not in diff) in ...sar/physical/mongodb were modified. more

Misses +5
Hits -5

3 files (not in diff) in ...ain/scala/quasar/std were modified. more

Misses +2
Hits -2

2 files (not in diff) in ...ain/scala/quasar/sql were modified. more

Misses +1
Hits -1

2 files (not in diff) in .../scala/quasar/jscore were modified. more

Misses -1
Hits +1

2 files (not in diff) in ...cala/quasar/fs/mount were modified. more
5 files (not in diff) in ...main/scala/quasar/fs were modified. more

Misses +4
Hits -4

2 files (not in diff) in ...main/scala/quasar/fp were modified. more
3 files (not in diff) in .../scala/quasar/effect were modified. more

Misses +4
Hits -3

@@             master      #1201   diff @@
==========================================
  Files           169        169
  Lines          9871       9871
  Methods        9620       9619     -1
  Messages          0          0
  Branches        120        117     -3
==========================================
- Hits           7839       7817    -22
- Misses         2032       2054    +22
  Partials          0          0

Powered by Codecov. Last updated by [b011bc9...fd08076][cc-compare]
[cc-base-branch]: https://codecov.io/gh/quasar-analytics/quasar/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/quasar-analytics/quasar/compare/b011bc93c67b1ecec6d686e40ebfcf51fdf2228e...fd080762ab36585b510201e76785c7adba06a9de
[cc-pull]: https://codecov.io/gh/quasar-analytics/quasar/pull/1201?src=pr


Add get_current_time() function

This pull request adds a timestamp (last_updated) to the MediaStatus class. This attribute is used in the method MediaStatus.get_seek_time() which returns the approximate current seek time.
It is unknown whether buffering would cause this to return an inaccurate seek time. I am not able to test this because I am fortunate enough to have fast internet! From what it seems, however, since the MediaStatus would be updated each time buffering or playing occurs, it should work just fine.

That should do it. Let me know if you think there's anything else it might need. Love the program, thanks for putting in all the work!


StayInLane gets confused with multi pupose car/track lanes.

see https://github.com/CitiesSkylinesMods/TMPE/issues/705#issuecomment-586749537
This part is fixed:

This is because the innerSimilarIndex of the track matches the innerSimilarIndex of the road.
There has to be extra check using the CanConnect function that I recently introduced.

This issue should fix  #703 too.
Asymmetrical tracks/max turning angle would be particularly challenging.

simple track fix:

It still can get confused with asymmetrical tracks and mixed track/road stuff.
track roads are not part of the lane Arithmetic of quick-fix.
Stay In lane is mostly solved though. Still needs test for edge cases.

Result from #706 : There is nothing wrong with the picture bellow.

Is this issue resolved for all practical purposes? I guess if both roads have mixed tram+car lanes this this gets confused but I cannot find such a road.

Ill make this issue low priority until someone encounters the problem in practice.

Just to clarify, is this where a lane supports both road+tracked at same time (like vanilla) but not where a track lane is placed above a separate road lane?

Mixed bag!


Doesn't tell me what and endpoint is

I'm trying to follow the steps in this guide, but it asks me to fill in the "endpoint URL" but does not give me any guidance about what that is.

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

ID: 9229b6e1-4353-089c-b021-04d65d2ce46f
Version Independent ID: ab4208fd-1151-4a18-27a1-3a6c750e3840
Content: Azure CLI script sample - Subscribe to resource group
Content Source: articles/event-grid/scripts/event-grid-cli-resource-group.md
Service: event-grid
GitHub Login: @tfitzmac
Microsoft Alias: tomfitz

@codefoster Thank you for your feedback! We will review and update as appropriate.

@codefoster Follow the az eventgrid event-subscription doc which explain this with many examples.

@codefoster Just following up here... Hope my previous comment helps.

Thanks for the follow up. I'm sure it will, though I haven't tried yet. That said, if I spun wheels trying to figure out how it was suppose to work, then others may too. Perhaps at the top where you're spelling out the pre-reqs, let readers know that they need to run the other part of the tutorial first.

@codefoster For now will proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Selection box not proper shape

Here's a screenshot:
https://i.imgur.com/OqIgouH.jpg
Selection box should not be a full block for wedge shapes.
Thanks for an awesome mod :-)

Minecraft doesn't get along with triangles already so this isn't something that can be fixed easily. I will revisit the idea in 1.14 when the bounding box code is improved.

Well, thanks for taking your time to reply :-)
On Sun, 28 Jul 2019, 23:30 EpicSquid<EMAIL_ADDRESS>wrote:

Minecraft doesn't get along with triangles already so this isn't something
that can be fixed easily. I will revisit the idea in 1.14 when the bounding
box code is improved.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MysticMods/Blockcraftery/issues/56?email_source=notifications&email_token=AAXESRVTI7PPK45RMVB2UI3QBYFWHA5CNFSM4IHMZVY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27G5XY#issuecomment-515796703,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXESRWZ247XQXHAVTWRNKTQBYFWHANCNFSM4IHMZVYQ
.


Miner should only submit best X records

Currently the miners submit the best OPR they find, so if you launch 15 miners, you get 15 OPRs. This is fine for development, but for production, we should really have an aggregator that only submits the best X records.
I don't know if submitting the best 1, best 2, or some algorithm based on identities is best. If anyone has any suggestions as the best way to handle OPR submission, I'm all ears.
My current though is to create an aggregator. Each OPR mined will be sent on a channel to the aggregator, at which it will only keep the top X. At minute 9, it submits the top X.
If someone wants to change the logic, they can change it in the aggregator, vs having to change miner logic.

For milestone1, a simple aggregator that submits the top X is sufficient, though how many to submit should be left up to the user (via flag or something): 0 < X <= # of miners

That was my initial thought as well. :+1:


Update README.md

add CodeCov badge

Codecov Report
Patch and project coverage have no change.

Comparison is base (1794187) 65.71% compared to head (0531ce3) 65.71%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@           Coverage Diff           @@
##           master       #1   +/-   ##
=======================================
  Coverage   65.71%   65.71%
=======================================
  Files          46       46
  Lines        5232     5232
=======================================
  Hits         3438     3438
  Misses       1794     1794

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Permissions for non-managed resources: Unexpected ability to query timestream

I'm adding SST/Ion to an existing CDK based application, and want to be able to access resources from the existing deployment from a NextJs application.  The intention is to implement a dashboard UI that provides access to the existing resource, such as metrics stored in Timestream, service configurations in Dynamo etc.  If all goes well I will import the resources into the SST application, but for now I just want to experiment with the frontend deployment.
My first test was to be able to query a Timestream table and produce a table of results in the UI.  Timestream isn't a supported component type in SST, and anyway, the database/table already exists so I can't 'import' it as an SST managed resource, and all I need to be able to do is access it by name/ARN.
I was expecting to need to add appropriate permissions to the NextJs instance in the sst.config.ts, but I have been able to issue a query without doing so.  I cannot see from the created IAM role/policies (app-user-DashboardDefaultRole-region) how the access is being granted, as this appears to be just the minimum required for SST access its resources (S3, Queue, Dynamo, lambda).
I have a single set of AWS credentials in ~/.aws/credentials which are for my AWS console user, and provides the necessary access for SST to deploy.
I'm a complete novice with SST (both CDK and Ion variants) so may not be approaching this correctly.  In my CDK app that creates those resources, I use a least permissive approach as per AWS guidelines, so any existing resource such as a user or function is explicitly granted the permissions required (e.g. a function only gets Timestream Query permissions if that's all it needs).  I don't think therefore that there can be an existing policy that would unintentionally grant access, other than the user that SST is using for deployment.  The DashboardDefaultFunction has the DashboardDefaultRole assigned and the console permissions viewer only shows the expected resources and doesn't include Timestream.
This is my sst.config.ts file:
/// <reference path="./.sst/platform/config.d.ts" />

export default $config({
  app(input) {
    return {
      name: "replicated",
      removal: input?.stage === "production" ? "retain" : "remove",
      home: "aws",
    };
  },
  async run() {
    new sst.aws.Nextjs('Dashboard', {
      path: 'packages/dashboard',
    })
  },
});

One thing I realised is that when working locally, I was using sst dev instead of sst dev next dev and was running next in dev mode separately.  What I reported above was experienced both in sst dev mode, and after sst deploy when accessing the CF endpoint.
When I switch to sst dev next dev, I now get

"Error: The operation to discover endpoint failed. Please retry, or provide a custom endpoint and disable endpoint discovery to proceed."

which is what I had expected to encounter in the first place (without permissions).
However, if I add the permissions for timestream:DescribeEndpoints and timestream:Select to my config, it still fails with the same message, and inspecting the DashboardDefaultRole does not show the timestream permissions.
Here is the update Nextjs instance:
    new sst.aws.Nextjs('Dashboard', {
      path: 'packages/dashboard',
      permissions: [
        { actions: ['timestream:DescribeEndpoints'], resources: ['*'] },
        { actions: ['timestream:Select'], resources: ['arn:aws:timestream:eu-west-1:<REDACTED>:database/<REDACTED>/table/<REDACTED>'] },
      ]
    })

I've tried a fresh deploy, but the IAM role doesn't seem to get updated with the permissions.

There is a slightly cleaner way of intercepting the server function to add the permissions:
    new sst.aws.Nextjs('Dashboard', {
      path: 'packages/dashboard',
      transform: {
        server: (fn) => {
          if (Array.isArray(fn.permissions)) {
            fn.permissions = [
              ...fn.permissions,
              { actions: ['timestream:DescribeEndpoints'], resources: ['*'] },
              { actions: ['timestream:Select'], resources: ['arn:aws:timestream:eu-west-1:<REDACTED>:database/<REDACTED>/table/<REDACTED>']
              },
            ]
          }
        }
      }

It seems that the transform function was designed without taking account of Pulumi handling values that are T | Promise<T> | OutputInstance<T>, which makes alterations tricky.  Pulumi contains a function output that is designed to unwrap any value and return an OutputInstance, whilst allowing changes to be made using the .apply() method.
The transform function only allows T | undefined, which doesn't allow for unwrapping.  It would be better if the transform also allowed an OutputInstance so that you could then do:
{
  transform: {
    server: (args: FunctionArgs) => {
      return output(args).apply(args => {
          fn.permissions = [
            ...fn.permissions,
            { actions: ['timestream:DescribeEndpoints'], resources: ['*'] },
            { actions: ['timestream:Select'], resources: ['arn:aws:timestream:eu-west-1:<REDACTED>:database/<REDACTED>/table/<REDACTED>']
            },
          ]
      }
   }
}

A useful helper function to disambiguate whether the function property is an Output or a Promise to apply the changes more succinctly:
function apply<T>(input: Input<T> | undefined, fn: (input: T) => void) {
  if (Output.isInstance(input)) {
    input.apply(fn)
  } else if (input instanceof Promise) {
    input.then(input => {
      fn(input)
      return input
    })
  } else if (input !== undefined) {
    fn(input)
  }
}

Use like:
      transform: {
        server: (fn) => {
          const databaseName = '<REDACTED>'
          const tableName = '<REDACTED>'
          apply(fn.permissions, perms => {
            perms.push({ actions: ['timestream:DescribeEndpoints'], resources: ['*'] })
            perms.push({ actions: ['timestream:Select'], resources: [`arn:aws:timestream:eu-west-1:<REDACTED>:database/${databaseName}/table/${tableName}`] })
          })
          apply(fn.environment, env => {
            env.METRICS_DATABASE_NAME = databaseName
            env.METRICS_TABLE_NAME = tableName
          })
        }
      }

There is a slightly cleaner way of intercepting the server function to add the permissions:
    new sst.aws.Nextjs('Dashboard', {
      path: 'packages/dashboard',
      transform: {
        server: (fn) => {
          if (Array.isArray(fn.permissions)) {
            fn.permissions = [
              ...fn.permissions,
              { actions: ['timestream:DescribeEndpoints'], resources: ['*'] },
              { actions: ['timestream:Select'], resources: ['arn:aws:timestream:eu-west-1:<REDACTED>:database/<REDACTED>/table/<REDACTED>']
              },
            ]
          }
        }
      }

It seems that the transform function was designed without taking account of Pulumi handling values that are T | Promise<T> | OutputInstance<T>, which makes alterations tricky. Pulumi contains a function output that is designed to unwrap any value and return an OutputInstance, whilst allowing changes to be made using the .apply() method.
The transform function only allows T | undefined, which doesn't allow for unwrapping. It would be better if the transform also allowed an OutputInstance so that you could then do:
{
  transform: {
    server: (args: FunctionArgs) => {
      return output(args).apply(args => {
          fn.permissions = [
            ...fn.permissions,
            { actions: ['timestream:DescribeEndpoints'], resources: ['*'] },
            { actions: ['timestream:Select'], resources: ['arn:aws:timestream:eu-west-1:<REDACTED>:database/<REDACTED>/table/<REDACTED>']
            },
          ]
      }
   }
}

we should put this on documentation

Should be fixed in v0.0.324.
Feel free to reopen if the issue persists.