Question about ButtonText

Hi!
First, many thanks for your great project!
One question:
I would like to change the button text (Yes,No...)
I see in your source code that you using resource files.
Wouldnt it be nice to configure the texts in ModalDialogOptions?
If you agree i would change that and make a pull request.
Regards Michael

I’m on holiday at the moment, but I’ll look at it when I’m back. Where you thinking of using  custom text or translations of existing values?
Cheers Simon
Sent from a fiddly little phone with tiny buttons, so don't expect to much.

On 12 Feb 2020, at 11:45, Michael Sandler<EMAIL_ADDRESS>wrote:

Hi!
First, many thanks for your great project!
One question:
I would like to change the button text (Yes,No...)
I see in your source code that you using resource files.
Wouldnt it be nice to configure the texts in ModalDialogOptions?
If you agree i would change that and make a pull request.
Regards Michael
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi Simon, happy holidays ;-)
Currently you store the button texts in a resource file.
Maybe we have a static class which holds the configuration and configure it with DI
Something like this:
 services.AddModalDialog(x=> {   x.BtnTextOk = "Ok";   x.BtnTextCancel = "Cancel"; });
Would this is ok for you?

I'm with the same problem, but in my case I want translate the buttons.

Also, an services.AddModalDialog(x=> { x.BtnTextOk = "Ok"; x.BtnTextCancel = "Cancel"; }); will help...
but if possible I want a api that allow change the text without reload the app


fix: dark mode not applying on login/registration interface

Fix: https://github.com/casdoor/casdoor/issues/3233

@dacongda plz review

@dacongda plz review

and i suggest you to provide a demo video or screenshot

this is demo video
https://github.com/user-attachments/assets/36946143-bc6e-40f3-9ac7-6cd34d52907d


Added a CIE94 distance formula.

FYI, there was a subtle bug in there that made the computations wrong. I've noticed it while adding tests to increase coverage.
The problem was that the L,a,b values of go-colorful are around [0,1] while the formulas you used (and are commonly found online) work with values around [0,100] and thus the constats are in the wrong range.

Oh wow! Good catch. Sorry about that!

No worries, thank you for the implementation! Just thought I'd let you know here in case you were still using this somewhere!


how to show horizontal scroll

hi , im using this angular plugin but im not getting horizontal scroll.
im getting only vertical.
i wrriten like
 <scrollbar style="height:150px;width:400px;padding:5px;border:1px solid;margin-left:20%;" >
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </scrollbar>

and some custom style like
<link rel="stylesheet" href="http://idiotwu.github.io/angular-smooth-scrollbar/bower_components/smooth-scrollbar/dist/smooth-scrollbar.css">

 <style>
        .scroll-content {
            border:1px solid transparent;
            padding-bottom:10px;
        }
       .scroll_style, scrollbar {
            overflow:hidden !important;
        }
    </style>

and finally i have included bellow files
<script src="http://idiotwu.github.io/angular-smooth-scrollbar/bower_components/angular/angular.js"></script>
<script src="http://idiotwu.github.io/angular-smooth-scrollbar/bower_components/smooth-scrollbar/dist/smooth-scrollbar.js"></script>
<script src="http://idiotwu.github.io/angular-smooth-scrollbar/dist/angular-smooth-scrollbar.js"></script>

for reference i attached screen shot

Text contents are default wrapped due to css rule white-space: normal, if you want to show horizontal scrollbar, wrap you texts like:
<scrollbar ...>
  <p style="width: 600px">
     lorem...
  </p>
</scrollbar>

Closed as no response.


Update eslint plugins after ESLint v9 support releases

Unmet peer eslint@9 for ESLint plugins (wait ESLint v9 support releases)

[ ] eslint-plugin-import
[ ] eslint-plugin-jsx-a11y

Use fixupPluginRules from @eslint/compat to fix eslint-plugin-import plugin rules

Issue moved to https://github.com/alexey-koran/eslint-config/issues/4 after migration to alexey-koran/eslint-config in v0.3.8


TypeScript types

First off, thanks for the plugin. 👍
I'm going to be creating the TypeScript types for this package as it's used in the Refined GitHub extension, https://github.com/sindresorhus/refined-github/pull/1987#discussion_r279021201, where I recently helped convert the project to TypeScript.
My question is, would you be willing to host the types in this repository if I put up a PR or am I better off sending a PR to the DefinitelyTyped project?

@nickytonline yup, happy to host types here.

Fixed in 3.0.0.

Fixed in 3.0.0.


Make DDL migrations the default

Remove the migrations_via_ddl flag and add a legacy_migrations
flag with an inverted meaning.
We can tear out the old code in a follow-up.
Three tests needed to be xfailed:

Two tests that changed the body and return type of a function that
was used in an expression. These tests passed as
assert_migration_equivalence tests but the migrations would fail
with ISE from pg if you actually tried to execute them, so this
is not a real regression.
test_schema_migrations_equivalence_23, which converts a type into
an alias. We are probably going to need to add syntax to DDL to do
this sort of modification.
This migration basically did actually work when I tried it,
though it didn't delete the underlying pgsql table and I suspect
more weirdness also still lurked.

Close #1987.

Is there value in keeping legacy_migrations?

I dunno, probably not. I figured I'd do a quick flag-flipping switch to get the right tests running by default before I start tearing code out. (Though it looks like the tearing code out might not go very deep anyway, so maybe it wasn't worth splitting out.)


Multiple prompt colors

It would be very helpful if we could set different colors for different parts of a dynamic prompt string.  Take the following prompt for example:
[current-message] account>

Most shells, editors, and cli tools would allow you to make current-message one color, the square brackets a different color, and account another color.
I can't do that with reedline currently without trying to disable its coloring effects entirely and manually inserting ansi escape sequences in Prompt::render_prompt_left.

I'm not sure I'm following. You're free to change the prompt. This is what mine looks like in nushell.

I'm not talking about nushell.  I'm referring to this library crate, reedline.

Right, but I was just using nushell as an example since it uses reedline. Maybe I'm still misunderstanding but it sounds like you're wanting a reedline config file where you can customize the look?

Implementing reedline::Prompt for a type requires defining get_prompt_color which can only return a single color that gets applied to the entire prompt line.
I'd like to have a way to highlight different parts of the prompt with different colors.
This is for a client I'm writing that I'd like to use reedline for.  Right now this is the only point of friction for me.
How does nushell have multi-colored prompts if the Prompt interface only supports a single color?  Does it embed ansi escapes into the prompt string returned by Prompt::render_prompt_left?

It's been a while since we implemented that code, but I believe nushell sends strings that contain ansi escape sequences. Here's an example (using nushell scripting) of how I build up the left prompt. https://github.com/nushell/nu_scripts/blob/9d12487d11ce028a3601c07f806e1cb5e10704f2/modules/prompt/oh-my.nu#L312-L340. You can also look at the nushell code here https://github.com/fdncred/nushell/blob/6d84eec5cdba5ea927e49274c2336341707f697f/crates/nu-cli/src/prompt.rs#L29-L30

Ok thanks, I will go with the embedded ansi escape approach for now.
Is possible for the reedline::Prompt api to be extended in the future to natively support multiple colors?

i'm sure it's possible. feel free to propose an api or submit a preliminary pr for us to look at. we'd like reedline to be as useful as possible.

I'll try to put together an api proposal later this week


TCP or UDP

If DNSCrypt is running on a router, is there a performance or security difference in choosing to use UDP or TCP ?

In terms of technology difference (https://en.wikipedia.org/wiki/User_Datagram_Protocol#Comparison_of_UDP_and_TCP)...
UDP is almost always a little bit faster since you don't have the full error correction (checksum only) or the 3-way handshake like you do with TCP.
I'd argue TCP is then inherently more secure than TCP. But! Both depend on the security of the application(s) being used.
Anyone have any benchmark numbers to see speed advantages?

war59312,
Thanks for the reply.
So there shouldn't be any noticeable lag using TCP versus UDP ?

Use UDP if possible.
TCP is neither more reliable nor more secure.

Why should UDP be used instead of TCP ?

@uihdff I'd bet no real worthwhile difference, given the developer is recommending UDP.
I'd go with @jedisct1 recommendation.
Probably just a tad bit better performance. Again without numbers, it's only speculative.
Personally, I stay with TCP, but that's just me. I prefer it in cases where there are no real performance differences. But again, my advice is to go with the developer if you don't understand the technology at play.

@war59312,
Thanks for the follow-up.


Spanner session pooling - min/max sessions along with grpc channel configuration -recommendation needed

Hi @meltsufin @ChengyuanZhao
I want to know whats the recommended configuration required for min / max sessions on spanner. whats the ideal count of grpc channels to be configured?
Current defaults used in cloud spanner code min =10 sessions max=400
and grpc channels defaults to 10.
Inorder to handle 100 TPS with spanner node count=2  what is the recommended min / max sessions to be configured and channel count ? Assuming most of our queries finish <50ms .
Any suggestion would greatly help.

@ChengyuanZhao @meltsufin  any update on this ?

@vineela-gampa Please direct query and Spanner performance questions to Cloud Spanner support. We focus on the integration with Spring Data and aren't the best source of advice on this question.

Sure got it.


Unclear how to clear buffer from PubSub ApiClients

When reading the docs for version 2.9.0 of the PubSub .NET documentation, it wasn't clear how to flush the buffers so that my service could be safely shut down.
I eventually found what I believe is the right doc, but even this isn't super clear https://cloud.google.com/dotnet/docs/reference/help/cleanup#grpc-based-apis-and-channels
I'd suggest adding Shutdown or Flush methods to PublisherServiceApiClient and SubscriberServiceApiClient, similar to what's on PublisherClient and SubscriberClient. That would be much clearer.

There aren't any buffers in PublisherServiceApiClient or SubscriberServiceApiClient. They're just stateless RPC clients - unlike PublisherClient and SubscriberClient. The only thing to shut down is the network connection (which varies based on how the client was constructed), and unless you have a currently-active RPC, there's nothing to be careful of there. (As it happens I'll be rewriting that page soon anyway, due to the changes in the next major version, but there still won't be any buffers to flush.)
Does that alleviate your concerns?

Yes! Much appreciate, thanks!


test acr cleanup

Resolves #ISSUE
What is being addressed
Describe the current behavior you are modifying. Please also remember to update any impacted documentation.
How is this addressed

Describe the changes made, and if appropriate, why they are addressed this way
Note any pending work (with links to the issues that will address them)
Update documentation

Has the CIS document been consulted / updated?

Are you adding new resources, or modifying existing ones?
Have settings been set in line with the CIS recommendations?

/test

:robot: pr-bot :robot:
:runner: Running tests: https://github.com/UCLH-Foundry/FlowEHR/actions/runs/4726309293 (with refid d6dafb1e)
(in response to this comment from @jjgriff93)


fix: filter out unsuccessful responses in "attempts to first success" chart (FC-0033)

The "attempts to first success" chart was not filtering out unsuccessful responses. This change updates the chart to only look at successful responses and show the number of attempts before submitting a correct response.

@SoryRawyer 🎉 Your pull request was merged!  Please take a moment  to answer a two question survey so we can improve your experience in the future.


xWebApplication comma seperates SSLFlags, fixes PowerShell/xWebAdministration#232

Updates to xWebApplication:

[x] xWebApplication comma seperates SSLFlags, fixes PowerShell/xWebAdministration#232
[x] Updated xWebApplication unit tests, the test for SSLFlags where not testing this property.

This change is

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable

Just need to fix the merge conflicts here.


Preload seem to not do anything?

It could be just me, or does the Preload function not seem to really assist? Its hard to tell but it feels like you still have to see the load times regardless, wether you ran a preload or not!
anyone else feel this way?

i preload images but i still see a lag when they are rendered on the next view for the first time. Am i missing anything ?

It's still not working on Android :disappointed:
Please reopen issue until complete fix.

@togusa2017 @mnlbox Can the preloading issue on android be reproduced in a minimal example?
The preloading seems to be working in the example application in this repo:

@joecaraccio Hey, can you share how you'v managed to make FastImage.preload to return a promise?
preload to return a promise would completely solve my issue.

@ewalti (or anyone else in this thread) did you end up finding a way to do this?
Using preload in an iOS simulator seems to have no effect. When navigating to a screen that contains the actual <FastImage> with the uri, it just pulls down the image at that point in time.

@DylanVann Why is this closed? Been testing it on iOS, the preload doesn't work.
Preload on one screen, on a later screen the images still are loading.
RN: 0.54.0-rc3
RNFastImage: 4.0.4
React: 16.3.1
Any idea how to fix/what's wrong?

Hi everyone, I am using the following code in the componentDidMount method of my App.js:
await FastImage.preload([{ uri: 'https://app.box.com/shared/static/dz6tvgka56ub8xfii6v4516zco0bmvwq.jpg' }])
await FastImage.preload([{ uri: 'https://app.box.com/shared/static/8e43tmaproz9psvch4s7de5tyff9i71k.jpg' }])
await FastImage.preload([{ uri: 'https://app.box.com/shared/static/udiaehxve4tjunnhe40wtvddvp8h3hdo.jpg' }])
  await FastImage.preload([{ uri: 'https://app.box.com/shared/static/6rbqggrctvsjgebxmr2u630u081w3rrz.jpg' }])
  await FastImage.preload([{ uri: 'https://app.box.com/shared/static/n4fym1ck83nmlo0uo20clpwidipr3e56.jpg' }])
  await FastImage.preload([{ uri: 'https://app.box.com/shared/static/e1fiqrjwqhm5vh77znjr1gfiy5kclw94.jpg' }])

It does not seems to do anything because i can see blank space while the image are being loaded after my app launched.
I am using react native on my ios simulator.
Thanks very much in advance.

This is still not working for me on android:
RNFastImage: 6.0.3
React-Native: 0.59
Please fix this!

@twillstudio that's not going to work because the preload function returns void - therefore, in the sense of a promise, it will resolve immediately.

This is still not working on android:
RNFastImage: 8.1.5
React-Native: 0.61.2

Why was this issue closed? It‘s still not working for me on RN0.61.5 using the latest version of reach-native-fast-image. Thanks for some insights

can you updatei to to return promise so I can't disable loading spinner when it done

Why was this issue closed? It‘s still not working for me on RN0.61.5 using the latest version of reach-native-fast-image. Thanks for some insights

did u find any solution?

Any news on android?

I patched android preloading here https://github.com/DylanVann/react-native-fast-image/issues/657#issuecomment-2312378889


In Safari, Progress bar shows current time as 59:-1 when skip back past start of video

In Safari, the video appears to be allowed to seek to a time before the start of the video and to a time after the end of the video.
I suspect that adding protection for mp4 setCurrentTime to set video.currentTime only to a point in 0-duration might help https://github.com/polimediaupv/paella-core/blob/main/src/js/videoFormats/es.upv.paella.mp4VideoFormat.js#L90-L94. I will attempt this locally...
To duplicate

Open Safari browser (test on Mac Os X)
Go to https://paellaplayer.upv.es/player.html?id=belmar-multiresolution-remote
Click play
Pause the play
click the skip back button a couple times
Notice the timeline bar shows something unexpected like "59:-1" or "59:-30"
EXPECTED: the lowest current time returned by the video wrapper is 0, the lowest time shown in the timeline bar is 0, the lowest time allowed to seekto is 0, the highest time allowed to seek to is video duration (or a couple seconds before the end of video duration)

Verified that this patches the issue in mp4VideoFormat in Safari.
async setCurrentTime(t) {
    if (this._videoEnabled) {
      await this.waitForLoaded();
      const dur = this.video.duration;
+     if (t >= dur) {
+        // restrict seek-forward to 2 seconds to the end
+       this.video.currentTime = dur - 2;
+     }
+     else if (t < 0) {
+        // restrict seek-back to 0
+        this.video.currentTime = 0;
 +    }
 +    else {
 +       this.video.currentTime = t;
 +    }
 -    this.video.currentTime = t;
      return t;
    }
    else {
      this._disabledProperties.currentTime = t;
      return t;
    }
  }


Cython 0.28, enums.pyx "OverflowError: Python int too large to convert to C long"

I could pip install pyav on linux arm with cython 0.28, but when i try to import it i get:
>>> import av
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tangible/.local/lib/python2.7/site-packages/av/__init__.py", line 15, in <module>
    from av.audio.fifo import AudioFifo
  File "/home/tangible/.local/lib/python2.7/site-packages/av/audio/__init__.py", line 1, in <module>
    from .frame import AudioFrame
  File "av/audio/frame.pyx", line 1, in init av.audio.frame
  File "av/codec/codec.pxd", line 6, in init av.frame
  File "/home/tangible/.local/lib/python2.7/site-packages/av/codec/__init__.py", line 1, in <module>
    from .codec import Codec, codecs_available, codec_descriptor
  File "av/descriptor.pxd", line 4, in init av.codec.codec
  File "av/option.pxd", line 4, in init av.descriptor
  File "av/option.pyx", line 18, in init av.option
  File "av/enums.pyx", line 225, in av.enums.define_enum
  File "av/enums.pyx", line 28, in av.enums.EnumType._init
  File "av/enums.pyx", line 32, in av.enums.EnumType._create
  File "av/enums.pyx", line 145, in av.enums.EnumItem.__cinit__
OverflowError: Python int too large to convert to C long

i can see that it's from this bit of code.
        # Establish a hash that doesn't collide with anything that would return
        # true from __eq__.
        hash_ = id(self)
        name_hash = hash(name)
        value_hash = hash(value)
        while hash_ == name_hash or hash_ == value_hash:
            hash_ += 1
        self._hash = hash_

the last one being 145.
If i change _hash declaration to.
cdef unsigned long _hash

Then i can import it correctly.
Doing a PR.

Duplicate of #339. Therefore, your PR, #342, is actually a fix for that.

Closing this, as I took a slightly different direction. See comment in #339.


Dead types not stripped

In SPIR-V output, one can find various types that should not remain after optimization and dead code elimination, that are actually invalid and will trip up some drivers.
This can be things like:
%_ptr_Function__ptr_Input_v3float = OpTypePointer Function %_ptr_Input_v3float

but I think there are other variations too.
These violate the following restriction:
A variable pointer must point to one of the following storage classes:
* StorageBuffer
* Workgroup (if the VariablePointers capability is declared

Unfortunately these do seem to pass spir-val, so that's a separate problem.

try running spirv-opt <file> -O -o <file>. It's pretty good for dead code removal, that's what I use it for at-least.

The reason this happens is a little awkward - the linker runs DCE (which includes dead types) after most linker steps, but before structurization and mem2reg. This means that if mem2reg (which is done for legalization purposes, to remove references to these very types) removes references to a type, it won't get removed. I'll PR a fix adding a second DCE pass after mem2reg (can't move the first DCE to after mem2reg AFAIK, because it's placed there for perf reasons, since structurization is slow)


How can I create a node?

Hi
How can I construct a node so I can make child for it using
$child2 = Category::create(['name' => 'Child 2']); $child2->makeChildOf($root);
I have sent parent_id from my view to my controller and my problem is that I can't find a way to create my $secondOrThirdLevelRootToBeFatherOfMyNewChild
In other words I want to know how can I get a node object from its id?
Thanks

As it seems you'd stopped answering to your question and for those that might gut stock in my situation can do the following to get a node object:
$ancestor = YourModelName::where('id', '=', $request->get('parent_id'))->first();
and after that create a child for this object using the way showed in documentation:
$ancestor->children()->create([...]);


fix documentation

Codecov Report
Attention: Patch coverage is 25.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 77.83%. Comparing base (506d390) to head (ed5e360).
Report is 1 commits behind head on main.

Files
Patch %
Lines

experimental_experiment/convert/convert_helper.py
14.28%
6 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
- Coverage   77.88%   77.83%   -0.06%
==========================================
  Files          66       66
  Lines        7222     7228       +6
==========================================
+ Hits         5625     5626       +1
- Misses       1597     1602       +5

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Proof of concept implementation using NDData

@glentner
Here is a proof of concept implementation using NDdata.
It will fail on Travis, but it might be good enough for us to decide if we want to go this route. If we do, then I'll work it out in more detail.
In particular, that WCS needs more thought. I like many (but not all) ideas in the specutils package for that.

This looks like a start. I'll merge this one and we can continue modifying and adding functionality.
The interpolation method won't work I don't think because the uncertainty= argument is passed twice.

That's why Travis failed...
In general, we should make it pass before we merge, but maybe that's not as important in the first 50 commits or so.


Update-meetCommandParser

Codecov Report

Merging #137 (59fef75) into master (5873cac) will decrease coverage by 0.24%.
The diff coverage is 37.50%.

@@             Coverage Diff              @@
##             master     #137      +/-   ##
============================================
- Coverage     51.99%   51.75%   -0.25%
  Complexity      601      601
============================================
  Files           116      116
  Lines          2587     2599      +12
  Branches        305      305
============================================
  Hits           1345     1345
- Misses         1153     1165      +12
  Partials         89       89

Impacted Files
Coverage Δ

...rc/main/java/seedu/address/logic/LogicManager.java
43.58% <ø> (ø)

...du/address/logic/commands/meeting/MeetCommand.java
0.00% <ø> (ø)

...ddress/logic/parser/meeting/MeetCommandParser.java
0.00% <0.00%> (ø)

src/main/java/seedu/address/model/AddressBook.java
92.30% <ø> (ø)

...rc/main/java/seedu/address/model/ModelManager.java
67.60% <ø> (ø)

...c/main/java/seedu/address/model/person/Person.java
88.54% <ø> (ø)

...va/seedu/address/logic/commands/CommandResult.java
77.77% <100.00%> (ø)

...ain/java/seedu/address/logic/parser/CliSyntax.java
92.85% <100.00%> (ø)

...s/model/person/FieldContainsKeywordsPredicate.java
14.54% <0.00%> (-2.85%)
:arrow_down:

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 5873cac...59fef75. Read the comment docs.


Support multiple attachments

fixes #28

Thanks for the PR! ❤
I noticed you replaced the attachment property in favor of attachments. This, however, will break all existing usages of this plugin that use the former syntax.
Would it be possible to support both?

Updated

Lovely, it now builds again and sending multiple attachments works like a charm! I'll merge and it'll be released shortly after.


scripts: Roundup strings sizes in struct to multiple of 4

vktrace layer needs strings sizes to be multiple of 4 for
data alignment in the trace file.

@davidlunarg, is this still necessary?

Moved to https://github.com/LunarG/VulkanTools/pull/469


BUG: Use stable algorithm for _nanvar.

closes #10242
This PR replaces the sum-of-squares algorithm used to compute the variance by a more stable algorithm. The algorithm here is essentially the same as used in numpy 1.8 and up, and I've added a TODO to replace the implementation with a direct call to numpy when that version is the default.
Somewhat counter to the discussion in #10242, I chose not to go with the Welford algorithm, for two reasons: numpy, and the fact that _nanvar needs to be able to deal with arrays of different shape, which is tricky to get right in Cython.

@shoyer or @jreback Would either of you mind giving this a quick review? Thanks!

So the plan is to replace this with numpy's version once we bump to that to 1.8? Could you open up a separate issue as to reminded us to do that?

we won't be eliminating 1.7 for quite some time FYI
so this would have to be a conditional (and could even be out in now with the conditional on the version)

This looks pretty reasonable to me.

Thanks all for the extensive comments!
@jreback I made a first pass at addressing your comments. Regarding the relative lack of tests, I assumed that the existing tests in test_nanops would be sufficient to check the behavior of the function in the face of NaNs, different ddofs, etc. However, I noticed that the test infrastructure in test_nanops was missing a raise, causing some test errors to be swallowed.  I can make that commit into a separate PR if necessary.

@jvkersch I would like to see an explicty test that checks against a hard value (with an w/o nans), just to lock this down (rather than computing agains np.var which is what we do IIRC). That is generally fine, but since you are addressing this, can't hurt.

Just a quick note: I haven't forgotten about this, but I'm currently lacking the time to finish this off. What's hindering me a bit is the lack of uniformity in the api for the nanops: some cast their arguments to float64 right away, some only do that for int dtypes, ... there's the implicit assumption that the nanop will raise TypeError for non-numeric input, etc. I think it might be worth fleshing out this api in a future PR. If I can't get things to work in a satisfactorily manner I'll just go for the minimally viable implementation here, and work on that instead, before revisiting.

@jreback Would you be able to give this another review? Since last time, I took care of your earlier comments (explicit tests, folding _nanvar into nanvar, using a wide accumulator), but some unexpected side-effects plagued me a little:

Since nanstd called _nanvar directly, having it call nanvar instead meant fixing up some tests.
Numpy generates a RuntimeWarning whenever the number of dofs is not strictly positive. To avoid being swamped by those warnings, I turned off RuntimeWarnings when calling Numpy's var or nanvar.
Some tests for numeric_only called nanvar with non-numeric data and listened for a TypeError. This happened to work with the earlier implementation, but in some cases the new implementation raises a ValueError instead. Implementation-wise this works fine, too, but one test needed to be made a little more flexible.

Thanks!

@jreback I've added some tests for nanstd (though they are not as extensive as the nanvar tests). I couldn't get things to work reliably with tm.assert_array_equal (because of the fixed precision) so I'm hoping this can stay as-is (and I wouldn't mind revisiting this after #10788 has been addressed). Does this look good to you?

looks good. pls rebase/squash. ping when green.

@jreback Done!

merged via https://github.com/pydata/pandas/commit/2d0d58c04114b634072e9425824b34cda3aeaef5
@jvkersch awesome job!
thanks!

@jreback Thanks for the swift and thorough review!


Error saving Numpy tensor

Error saving NumPy tensor. NumPy Error: Unsupported data type 'uint8'.

I want to save weights, but there exists this problem!

Can you share the model file?

The model is a tflite file. #


NavMeshUpdateAll leak suppression (not 100% preventative)

Reset the build when adding potential dirties to the list to ensure it isn't trying to kill off a dirty entry that it's passed by.
mSaveIntermediates = true; causes leakage even with all this. still tracking that end.
Need to remove a dead tile whether there's new data to replace it with or not. Empty tiles are an entirely possible case. Even a probable one if you have high verticality in a level.
Likewise you don't want to re-feed the same geometry list for a given tile in case the conditions have changed.
If no vertcount then clear all geometry entries. (that one might be paranoia)

This looks good to me!

Tested and reviewed. All looks fine!

For folks that get confused by the removal reversion: the method was discussed as a clearer alternative label to NavMeshUpdateAll so folks knew what it was supposed to do, with the agreement being that NavMeshUpdateAll will be removed come 4.0, but kept for now for backwards compatibility.

Great @Azaezel! Thanks for this. We should just to remind the removal of this func for 4.0 release (:


Math.hypot is written to the IEEE standard for hypot... which forces the routine to handle very tiny/large (e-/+250) numbers by scaling the incoming numbers. It slows things down greatly, though not as much as in node... something very wrong there.
Anyway, a CAD package doesn't need to handle such tiny/huge numbers... the "simple" hypot would work just fine.
As I pointed out in a different issue, hypot is VERY critical path in boolean operations. And is used a lot in general.
 I was trying to minimize floating point error, but that is surprising how bad the performance is.
Maybe worth switching back to pythagorean distance. Or adding maths.utils.trigonometry.hypot using Math.sqrt(...) under the hood.

@briansturgill thanks for the insight. I was expecting that Math.hypot is faster since I expectig the performance was the reason begind adding it to Math. It is good to be aware of the performance hit it brings.


Orchard.List "Choose Items" action is not supported under /OrchardLocal sub url.

In development environment, orchard automatically deploy to two urls including:

/
/OrchardLocal

When access admin panel under /OrchardLocal (which is the default one), the choose items button from within a custom list is trying to access url under / (without /OrchardLocal), which redirected to login page and does nothing even successfully logged in.

Which version are you using? What I see is that BaseUrl is used as specified in Settings - not "/".

@sfmskywalker thank you for your reply.
I use version 1.9.0.
BaseUrl is left NULL in my settings which I think is the default value when set up a new Orchard site. I guess that's the problem lead to this error. When I change BaseUrl to http://localhost:30321/OrchardLocal, problem solved.
Although not related to Orchard.List, it's still a little misleading. Since the default setting for BaseUrl is "NULL", and default development url is "/OrchardLocal"
I found only a minor group of features in Orchard (such as Orchard.List module) use BaseUrl setting for root detection. And there are inconsistencies across many different modules. Not to say when involving multi tenancy module.
I'm still learning Orchard at the moment so I can't give proper advice, but maybe some improvements can be done to get Orchard urls usage better organised and documented.
Since it's not related to my original issue, I'll close this ticket.

No worries. Actually, the default value for the base URL setting is set during setup by means of some command executed as part of the Default recipe (and probably Core recipe as well, but didn't check). Regarding better organization, perhaps you could describe and list the inconsistencies you discovered?


How to fill in the configurations in Keys.config file?

Hi all, I have got the PRODUCT_HUNT_APP_ID and PRODUCT_HUNT_APP_SECRET in Keys.config file, but how should I fill in the other three configurations?
PRODUCT_HUNT_APP_ID = @"APP_ID_KEY"
PRODUCT_HUNT_APP_SECRET = @"APP_SECRET_KEY"

PRODUCT_HUNT_FEED_URL = @"PRODUCT_HUNT_FEED_URL"

SEGMENT_PRODUCTION_WRITE_KEY = @"SEGMENT_PRODUCTION_WRITE_KEY"
SEGMENT_DEVELOPMENT_WRITE_KEY = @"SEGMENT_DEVELOPMENT_WRITE_KEY"

Thanks.

SEGMENT_xxx_KEY  seems to be related to Analytics, right?
Then, what is the right value for PRODUCT_HUNT_FEED_URL ?
Thanks.

Yeah my bad, I'm going to remove Segment key and feed url from config file. App should compile and work as it is.

@devladinci Thanks. I'm currently reading the source code of this project, and many thanks to your efforts for sharing this project. :-)

@hujiaweibujidao Always welcome :)


How does Fuse handle accented characters?

I've looked around and made some tests, but haven't figured out yet.
How does Fuse handle accented characters? Both in the search string, and in the searched values. Does it modify them somehow? Or it will end up matching all other characters except for the accented ones? See examples below:
Example 1:
Search string: résumé
Item.title: "This is my resume"
Example 2:
Search string: resume
Item.title: "This is my résumé"
What's is the behavior in these two situations?
Thanks.

Accented characters will match accordingly. In your particular case, "é" will match "é", and "e" will match "e".

We use lodash deburr for such searches

Thanks!


Package Versions Starting with 0 (0.1,0.2,0.3, etc.) Cause "does not exist" error When Referenced in cumulusci.yml Dependencies

Describe the bug
When referencing a package for install in cumulusci.yml dependencies for a package version starting with 0 (e.g. 0.1, 0.2, 0.3, etc.), when attempting to install using a flow like dev_org or update_dependencies, install errors with a "does not exist" error:
    dependencies:
      - namespace: 'Intel_U4SFnCino'
        version: '0.2'

Error:
Error: Could not process MDAPI response: Update of InstalledPackage
Intel_U4SFnCino: Error: InstalledPackage namespace: intel_u4sfncino does
not exist!

Reproduction steps

Add a package version starting with 0 (example starting with 0.3) for a package version that you know exists and is published
Run a flow/task that triggers install (example cci flow run dev_org)
Wait for install step to begin

Result: Error display:
Error: Could not process MDAPI response: Update of InstalledPackage
Intel_U4SFnCino: Error: InstalledPackage namespace: intel_u4sfncino does
not exist!

Expected Result: No error and package install with specified version.
Your CumulusCI and Python versions
CumulusCI version: 3.86.0
Python version: 3.10.0
Operating System
MacOS 14.4.1
Windows environment
No response
CumulusCI installation method
pipx
Error Gist
https://gist.github.com/Julian88Tex/db928dfcb7d60d20329b6b9fd34375a6
Additional information

I have not tried this with a direct command in CLI so I'm not sure if it is a .yml specific issue.
This issue does not occur with version that do not start with 0 as best I can tell.
I am able to install the same package version when I use version_id instead of version in .yml.
I am able to install the same package version when I use the Salesforce UI.
Package I'm attempting to install has a password which may have an impact.

I'm seeing this with a package that does not have a password


Unable to change the default remove behaviour

Hi,
I have troubles handing de DELETE file method
The revert handler works well when upload is done with the component, but when I load
the files preloaded with this format:
{
  source: file,
  options: {
    type: 'local'
  }
}

I'm unable to change the remove file default behaviour
Thanks for your time

I’ll test it this afternoon, it’s set up to remove temporary files, so maybe I missed a use-case 🙃

@aitorllj93 There's currently no remove end-point. It only handles reverting temporary files.
The reasoning behind this is that destructive actions like that should be done after careful consideration ( and would require an undo option or serious confirm popup ). FilePond keeps a list of current files, then, when the parent form is submitted you can determine the differences after the user made changes to the files list and remove the necessary files from the server.
I'm considering adding this as an option but am wondering if the solution above would work for your use-case?

Hi @rikschennink, sorry, was my fault, I had already handled the remove event but didn't saw it.
The problem now is, this event gets called also during revert process so I'm unable to know if that file was already deleted by the revert handler

@aitorllj93 Yes that's also a way handle it. I think a property to indicate the origins of the file would be a nice addition, something like: local, limbo, input. That should offer enough detail to be able to handle file removal in the remove handler.

@aitorllj93 Just added the origin property to the file item and the FileOrigin enum to the FilePond object. The origin is either 1, 2 or 3, and you can use the FileOrigin enum to make your code more readable.
It's available in version 1.6.1
export const FileOrigin = {
    INPUT:1,
    LIMBO:2,
    LOCAL:3
};


feat(server): CaseChecker has single list of allowed regexes (replacement pr)

Replaces  #887
Closes #884

:+1:

Codecov Report

Merging #897 into master will increase coverage by 0.04%.
The diff coverage is 86.66%.

@@             Coverage Diff              @@
##             master     #897      +/-   ##
============================================
+ Coverage     84.23%   84.28%   +0.04%
- Complexity      885      889       +4
============================================
  Files           174      174
  Lines          2684     2691       +7
  Branches        427      429       +2
============================================
+ Hits           2261     2268       +7
  Misses          205      205
  Partials        218      218

Impacted Files
Coverage Δ
Complexity Δ

...src/main/java/de/zalando/zally/rule/CaseChecker.kt
85% <86.66%> (+1.43%)
37 <6> (+4)
:arrow_up:

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 331bdfe...f8cbf74. Read the comment docs.

:+1:

:+1:


X11 Forwarding Fail

I am using https://x.cygwin.com/ on Windows 10 as X Server
With X11 Forwarding enabled, I get the following error message
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
This error was fixed in PuTTY by setting location of X Authority file.
Please support similar option in terminus.
Thanks,
Rakesh

@cibrhusk
Your solution is for switching between X11 sessions. This is not the problem I was describing.
"Your most likely using cygwint openssh to connect to your remote machine" I am not.
Some more details.
Server
OS: Ubuntu 18.04 LTS
SSH Server: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
Client
X Server: Cygwin/X (X server 1.20 and X.Org X11 Release 7.7)
SSH Client: Putty 0.73  without cilent .Xauthority file location set -> Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
SSH Client: Putty 0.73  with cilent .Xauthority file location set -> Works as expected
SSH Client: Eugeny terminus -> Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused

Your right, my bad.
I second this issue with the buildin ssh client, verbose logging would be great for further investigation. My error with the latest is:
SSH   X  Could not connect to the X server :6000: Error: connect ECONNREFUSED <IP_ADDRESS>:6000
xterm: Xt error: Can't open display: localhost:11.0
Same issue does not exist when using cygwin openssh client insude terminus.
N.b.: A gui wrapper for OpenSSH instead of maintaining your own client with all its riscs and support issues would imho be much more preferable.


AWS cost attribution (2c/4): convert Grafana dashboard into a .jsonnet template and version control it

The naming 2x/n is meant to indicate it can be worked in parallell amongside other 2x/n issues

The cost attribution dashboard central source of truth is currently in https://grafana.openscapes.2i2c.cloud where Grafana has it written to a small disk after being developed in the UI. But, we need to deploy it to more places and keep those places updated. So, how do we do that?
Technical context
The https://github.com/jupyterhub/grafana-dashboards project version controlls a few dashboards in .jsonnet format. They are rendered into the Grafana JSON format using the go-jsonnet's jsonnet CLI using the GoLang graffonet library.
Its nicer to work with a dashboard in a .jsonnet format than the big JSON blob it is by default, but its a bit of work to convert the Grafana JSON blob to its equivalent in .jsonnet.
Dashboard ID issue
Currently the documented procedure to deploy the dashboard involves updating a dashboard ID. I think maybe that can be avoided by introducing a dashboard variable that gets autopopulated, and then we reference the variable. I think this is how the jupyterhub/grafana-dashboard function currently with the prometheus datasource - they reference a datasource variable.
Definition of done

[ ] The current openscapes dashboard JSON blob is converted to a .jsonnet dashboard file
[ ] The converted .jsonnet dashboard is verified to look and behave alike the original by deploying it using the deploy.py script from jupyterhub/grafana-dashboards
Use flags like --dashboards-dir=<a folder where we have the .jsonnet file>, --folder-name=<Some grafana folder name>, --folder-uid=aws-ce-grafana-backend
[ ] The developed .jsonnet file is version controlled somewhere
Its fine and perhaps suitable to initially do it in this repository.

@GeorgianaElena no as that project is part of the jupyterhub org, and its inclusion there means also aws-ce-grafana-backend needs go be available and open sourced properly.
Let this be entirely 2i2c specific for now, but do make use of the jupyterhub/grafana-dashboard's deploy script to render and deploy the dashboard.

Should we go for a timeboxed 15 min chat to get started, with the goal to have an empty dummy dashboard to deploy?

The definition of done was respected for the first 3 panels. The reaming depend on the existence of a variable that I could not figure out and I've opened to track this work https://github.com/2i2c-org/infrastructure/issues/4944.


license: any chance you'd reconsider?

Your micro-down parser looks really great but I can't incorporate a gpl-licensed piece in my open source project. Any chance you'd reconsider and use a more permissive license?

Thanks you for the request, over the weekend I read up again on licenses and yes you are right I should not have chosen GPL-3 for this. I will update my small libraries to MIT.


[App]: Not tracking metrics from RCNN from Layout Parser

Current Behavior
I am running a RCNN model from LayoutParser (https://github.com/Layout-Parser/layout-model-training) and trying to use WandB for model experimentation. But WandB does not showed any metrics or graph after the training end? How can I fix this?
Expected Behavior
Expected to see graph of metrics like I run Yolov5 before
Steps To Reproduce

Open google colab
Git clone https://github.com/Layout-Parser/layout-model-training
Setup WandB
Run !bash /content/layout-model-training/scripts/train_prima.sh

Screenshots
No response
Environment
Google Colab
Additional Context
No response

Hi @Ammar-Azman thank you for writing in. Could you show me how you are setting wandb up?

Hello @ArtsiomWB . Thank you for your response. I am running the model on Google Colab with the following setup.
!pip install wandb -qU
import wandb

try:
    wandb.login(key='MY_KEY')
    print('Login suceed')
except:
    print("Error happened during login")

After the login is succeed, then I run the shell file with !bash /content/layout-model-training/scripts/train_prima.sh. As the mode is trained, WandB only collected the system information but no model metrics shown. I tried with ClearML too, but resulted the same.

Hello @ArtsiomWB . I would like to hear any update on the issue. :)

Hi, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!


Project stats

You should consider adding some content to your project object.  Perhaps the languages used or lessons learned from that project.  Adding a URL to link to your git hub repo is also an option.

Word count seems a little pointless here

Also perhaps trying to come up with a home page and move the projects off to a portfolio tab


google-chrome: 131.0.6778.108/109 -> 131.0.6778.139/140

Fixes CVE-2024-12381 and CVE-2024-12382.
https://chromereleases.googleblog.com/2024/12/stable-channel-update-for-desktop_10.html

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

CC @Aleksanaa

Two high severity vulnerabilities in a release from four days ago and no maintainer to be seen. What's up with that?

release from four days ago and no maintainer to be seen

We are all trying to maintain this in our spare time as we have lives outside GitHub.
Sometimes, things do fall off our radar. So we, as maintainers have tried to make the update process as painless as possible by providing a proper update script. If you have an issue getting an update merged quickly, please tag us for review beforehand, as Ofborg pings can take as much as a day.
(And other commiters have permissions to merge, provided they test the package for issues like https://github.com/NixOS/nixpkgs/issues/306010 beforehand)


As a user I want to be able to access the website

@tormod17 @Joshua-Ronan-Phillips The video does not run on safari, it only runs on chrome.
bug?


Syntax highlighting

It used to work in previous versions but it's broken with the latest versions of Firefox (probably Firefox 27 or 28) so I removed it for now.
I'll try to figure out how to load a chrome js file after the page loaded.

+1
I really miss syntax highlighting!

Fixed !

Thank you very much!


[Responsive Navigation] Responsive menu documentation is confusing, sketchy

I've spent the better part of a day getting a realistic responsive menu into shape. Along the way I ran into troubles like the "<- Back" affordance being on top of the (vertical) menu LI that opened it and stack traces (in browser console) from foundation.js parsing data-responsive-menu for the ResponsiveMenu plugin. I think these troubles are in part because the page:
http://foundation.zurb.com/sites/docs/responsive-navigation.html
leaves a lot to be guessed. Chiefly:

What are the allowed values and their combinations for data-responsive-menu and what do these values actually do? Are the values related to CSS classes?

The section on "Responsive Toggle" uses data-dropdown-menu but makes no reference to data-responsive-menu. That's perplexing. In practice, I needed the latter.

The CodePens linked from the documentation (very nice!) make use of classes and data-* items whose relevance isn't clear: submenu, has-submenu, data-submenu for example. Their removal from the CodePen seems not to break anything; their presence encourages a kind of magical thinking then.

I do not mean to devalue the work of contributors to the Foundation project. Indeed, I hope to see the framework's value enhanced by making clearer how to use it most effectively.
Thanks!

We're always happy to accept PR's to improve the docs. In F7 the docs will be vastly improved.

What are the allowed values and their combinations for data-responsive-menu and what do these values actually do? Are the values related to CSS classes?

https://foundation.zurb.com/sites/docs/responsive-navigation.html#responsive-menu

The section on "Responsive Toggle" uses data-dropdown-menu but makes no reference to data-responsive-menu. That's perplexing. In practice, I needed the latter.

This could be improved. Would make for a great first pull request! ;)

The CodePens linked from the documentation (very nice!) make use of classes and data-* items whose relevance isn't clear: submenu, has-submenu, data-submenu for example. Their removal from the CodePen seems not to break anything; their presence encourages a kind of magical thinking then.

I believe those classes are added via JS when the page loads, so they are not needed in the markup.


Text Alignment doesn't work

Tested in both v9 and v10, with and without other modules. Text alignment just doesn't change anything about the way the text is displayed in the drawing.
The following is a text drawing with text alignment set to left.

Technically the text was left aligned, but the line width of the text isn't the same size as the width of the drawing and text itself is centered in the drawing shape. So it only had an effect for multiline text.
I changed this behavior in 2.0.4; now the text itself is positioned according to the text alignment.


Postprocess path that emanate from our generated directories

This difference is not meaningful so we should not report it. We should postprocess this string.

@khaes-kth  was this solved in PatchExplainer?

No. See https://assert-kth.github.io/collector-sahab-experiments/rq2-random-excluded-res/JMRI_3e24272.html.

We can exclude all values with File, Path types, etc.

Solved in #205. Closing.


Please add a LICENSE file

Hello @benthomasson,
Sorry for the late response! The license file has been added in #34. Thanks for the feedback!


fix(viewSelector): tabs are not updated when list/table items are deleted

https://github.com/equinor/dm-core-packages/assets/43639886/ad6a4f2b-00c3-4867-b3d0-3bb200726efb

[ ] view item must be updated to reflect new state (i.e. update index)
[ ] tab should be removed


Update UG

Change images
Moved images into respective folders
Add or remove spaces for formatting

Alrighty, I'll amend all of the above comments in another PR! Thanks Bhanuka!


ios can't display google map normally

environment |
-- | --
"expo": "^38.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
Code：

view：

Android is normal， do not add provider={PROVIDER_GOOGLE}  ios is also normal
Google Maps iOS base map not rendering
How to solve it   thanks

Found the reason because it was useless to overturn the wall

@AKclown , I am facing the same issue. Could you please elaborate on what the reason is?

Found the fix. In my case I had developed everything correctly but I just forgot to enable maps SDK for iOS from the google developer console for my app.

Please check you package name in ios  you can verify or change your package name by opening the project in xcode


Docs: Rewrite tutorial to show hooks as the primary API

We're now at a point where I'm comfortable teaching our hooks API first (which I'm also doing right now as I work on the new "Quick Start" Redux core tutorial page).
Given that, it would be nice to convert the React-Redux tutorial over.  Would still be helpful to have the connect intro somehow as well, albeit secondary.

@markerikson is there any way I can help out with this?

Sure! No one's volunteered to tackle it yet, so it's up for grabs if you'd like to work on it.
For reference, here's the new "Redux Essentials" core docs tutorial where I covered use of the hooks as the default:
https://redux.js.org/tutorials/essentials/part-1-overview-concepts
I'd suggest looking through that and the React-Redux tutorial, coming up with a suggested plan / outline for a rework, and then post that here and we can discuss it.

Okay, will jump on this and get back to you

Related to this, we need more details on what useDispatch even is and how to use it:
https://www.reddit.com/r/reactjs/comments/cc9ehv/need_help_with_new_redux_hooks/etmedoh/

It occurs to me that a good approach here might just be to copy-paste/port the "UI and React" page from the "Redux Fundamentals" tutorial I wrote for the core docs:
https://redux.js.org/tutorials/fundamentals/part-5-ui-react

A couple people have indicated interest in doing this, but no one has actually done so yet.  Still interested in having someone tackle this!

I'm interested in doing that :)

I'm interested in doing that :)

I'd be happy to work with you on that as well. I've worked through the essentials and fundamentals tutorials very recently so the conventions and style are still pretty fresh.

@ligabloo , @wjohnso-insight : Cool :)
Per my tweets and my comment above, I think that the best (and hopefully easiest) approach is to start by copying the content from that "Redux Fundamentals: UI and React" page.
We'd need to make updates to the content to:

Supply introductory context (what the todo app example is, existing app structure)
Replace links to other Redux core docs pages
Add some additional bits of info that are listed later in the "Fundamentals" tutorial, like dispatching using action creators, and using memoized selectors

But I do think that reusing that page gives us 90% of the content we need without having to rewrite it from scratch.
As much as I love the work that @wgao19 did on the existing connect tutorial, I think it's probably time to retire it.  Or, perhaps we add a new "Tutorials" category, move both tutorials under that in the sidebar, but link the hooks tutorial as "Tutorial" in the navbar.
One other issue: right now, the React-Redux docs have this annoying "versioned docs" setup, which makes working on docs content a lot more complicated. Per #1693 , I actually want to drop that versioning setup.
I may try to tackle that myself tomorrow to help make it simpler to work on this.

Sounds like a plan. I like the idea of reusing sections from the existing docs.
@markerikson Would you recommend reading up on Docusarus versioning just to get a feel for the terrain and for some context or is that overkill?

It's probably overkill for now. Really, there's a good chance that I may have it turned off completely by this time tomorrow :)
The short version is that the /docs folder actually becomes the "Next" version on the docs site: https://react-redux.js.org/next/introduction/quick-start
Meanwhile, the "Current (7.2)" version is actually located under /website/versioned_docs/7.2/, and there's also other versioned folders as well. So, if you edit a file under /docs, it won't show up in one of the default visible pages like https://react-redux.js.org/api/hooks - only if you specifically select the "Next" version from the dropdown.  This has repeatedly resulted in people submitting docs PRs that don't actually show up on the site by default, and we have to keep saying "please also edit the duplicate files in the versioned folders!"

Gotcha!

Gotcha!

We're now at a point where I'm comfortable teaching our hooks API first (which I'm also doing right now as I work on the new "Quick Start" Redux core tutorial page).

I'm really glad we're at this point! I think it's the right direction, especially since reactjs.org itself is undergoing the same transition to hooks-first docs.
I've been using hooks and the react-redux hooks since they've come out and I have a few opinionated takes I wanted to share. If you agree with any of these, feel free to take inspiration in the docs (otherwise, feel free to ignore 😅)

Click to reveal wall of text
Why hooks first?
Hooks are the React team's solution to many problems in React. They represent the continued future of React and as stated before, they're also transitioning the current docs to be hooks-first.
I think it's important to state why hooks should be the preferred option over connect. Here are my reasons (no particular order):

Much easier to use with TypeScript
Easier to compose with other pieces of global state (e.g. react-router). Discourages copying state into Redux
Easier to understand due to less indirection
Works well with the default React hooks and replaces the need for some memorization libraries (not a sliver bullet though)

Easier to use with TypeScript
This one is just easy to get out of the way. React hooks were built with static typing in mind. Properly adding types to a higher-order component is complex and confusing. Hooks return the values they inject inline, types intact. This holds true for react-redux.
Easier to compose with other pieces of global state
React hooks were built for composition. If you want to join two or more pieces of state, you can do so in the component inline now.
import { useSelector } from 'react-redux';
import { useParams } from 'react-router';

function Component() {
  // global state from react-router
  const { id } = useParams();

  // global state from redux combined with state from react-router
  const item = useSelector(state => state.entities[id]);

  // local state using the redux state as an initial value
  const [active, setActive] = useState(item.active);

  // ...
}

And custom hooks can elevate these into reusable pieces:
import { useSelector } from 'react-redux';
import { useParams } from 'react-router';

function useItem() {
  const { id } = useParams();
  const item = useSelector(state => state.entities[id]);

  return item;
}

function Component() {
  const item = useItem();
}

This contrasts heavily with some previous best practices back in the day. For example, the purpose of the proejcts react-router-redux and connected-react-router were to copy the state of react-router into redux state just so it could be used in mapStateToProps. Given the complexity of higher-order components, this was a very valid pattern but now seems like the wrong place given the ability to compose inline a component or in custom hooks.
Easier to understand due to less indirection
useSelector/useDispatch are APIs with a lighter footprint. You use them inline, directly in the component.
If you want to grab a particular item from state, you can directly return it from useSelector (with the types intact). If you want to dispatch an action, it's perfectly fine to call dispatch inline
import { selectItem } from '../actions';

function Component() {
  const { id } = useParams();
  const item = useSelector(state => state.items[id]);

  if (!item) {
    return <>Loading…</>;
  }

  return (
    <>

{item.title}

      <button
        onClick={() => {
          dispatch(selectItem(id));
        }}
      >select this item</button>
    </>
  );
}

Compare this with the connect version:
import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { selectItem } from '../actions';

const mapStateToProps = (state, ownProps) => {
  const { location } = ownProps;
  const { id } = location.match;
  const item = state.items[id];

  return { item }
};

// you could return dispatch, directly however that's not the meta for redux
// with useDispatch, you don't have a choice
const mapDispatchToProps = { selectItem };

class Component extends React.Component {
  render() {
    const { item, selectItem, location } = this.props;
    const { id } = location.params;

    if (!item) {
      return <>Loading…</>;
    }

    return (
      <>

{item.title}

        <button
          onClick={() => selectItem(id)}
        >select this item</button>
      </>
    );
  }
}

// it's very hard to add types to this
export default withRouter(connect(
  mapStateToProps,
  mapDispatchToProps
)(Component));

Works well with the default React hooks
In particular, I've found it useful to intentionally not calculate values in useSelector and instead rely on built-in optimizations like useMemo and React.memo.
// note: this is an intentionally complex/contrived example
import { memo, useMemo } from 'react';
import { useSelector } from 'react-redux';

function Wrapper() {
  const { id } = useParams();
  const item = useSelector(state => state.items[id]);

  const { sublist } = item;
  const expensiveCalculation = useMemo(() => {
    return sublist.reduce((acc, next) => { /* ... */ }, {});
  }, [sublist]);

  return <ExpensiveRenderingComponent expensiveCalculation={expensiveCalculation} />;
}

const ExpensiveRenderingComponent = memo(({ expensiveCalculation }) => {
  // ...
});

And useSelector/useDispatch also work well with useEffect
function Component() {
  const dispatch = useDispatch();
  const count = useSelector(state => state.screen.count);

  useEffect(() => {
    if (count > 5) {
      dispatch(showMessage());
    }
  }, [count, dispatch]);

  return // ...
}

In general, I like to be as React idiomatic as possible and hooks-first is the way 😎
Anyway, that's all I got!

@markerikson I also like the idea of reusing the existing redux fundamentals docs, will make it easier to get started for sure.
@wjohnso-insight I appreciate it! How would we go about collaborating in this case? We checkout a new branch from master, push it and then work on it simultaneously? Also, how could we split the work?
@ricokahler those seem like good points to me!

@ligabloo Yeah, if you're going to collaborate on this, I'd suggest that one of you should create a fork of this repo, give the other person collaborator permissions on that fork, and both push changes to that branch as appropriate.  Once you've got something ready, you can PR from that fork back over to here.
I'm playing around with removing the versioning right now, so I think you can safely assume that the new file should live in /docs/tutorials/hooks.md.

@ligabloo Looking forward to working with you! If you want to make the fork and add me as a collaborator that works for me.
Tomorrow I'll take a look at the old code base and the reference from the UI & React tuts and star putting some cards together and we can divvy up from there. Sound good?

@wjohnso-insight sounds awesome! I'll also start tomorrow since it's already kinda late here 😅 I'm setting up the fork and adding you as a collaborator so we can be ready to go.

Great, appreciate both of you jumping in on this! :)  Please feel free to ping me over in the Reactiflux Discord #redux channel if you've got any questions I can help with.

aaaand done! just nuked the versioning setup, so you'll probably want to go ahead and do a fresh pull from master over into your fork before you get started.

@wjohnso-insight I copy-pasted the tutorial from redux essentials into tutorials/hooks.md and made minimal adjustments to the front matter and sidebar config to make docusaurus properly build the site and render the page. For dev purposes I just replaced the sidebar link with the new hooks document, but I'm aware we'll need to restructure that section to show both links in the future.
I suppose we could start by nuking the "Introduction" and "Integrating Redux with a UI" sections and replace them with more specific introductory content about the tutorial and redux-react themselves, right?
@markerikson about the existing links - do we want to keep them redirecting to redux official docs or do we want to replace them with something else? I see some of them link to other steps of the essentials tutorials, would linking directly to them be confusing out of the original context?

Yeah, those are the sorts of "content edits" I'm describing. I'd like this to be a standalone document in the React-Redux repo, instead of blatantly being "the middle of another tutorial we ripped out and copied".
However, it would be good to point to the core docs "Fundamentals" tutorial in a "Prerequisites" info box at the top of the page, similar to how the first pages of the "Fundamentals" and "Essentials" tutorials start by saying "you should know HTML, JS, and React":
https://redux.js.org/tutorials/essentials/part-1-overview-concepts

@ligabloo Have you made me a contributor to your fork yet?

@ligabloo Have you made me a contributor to your fork yet?

Yep - I sent you an invitation, did you get anything in your email / notifications?

Ope! Got sent to spam. I'm in now. Also, are you on Discord? Hit me up. @chef_will

@wjohnso-insight tried finding you there, but I think I need the four-digit tag as well 😛

My b! chef_will#5730

Just a quick update on behalf of @ligabloo and myself. Our refactor to Hooks first documentation is proceeding well.
@ligabloo has re-written the todo list application using hooks and RTX, here .
I drafted the outline for the new tutorial copy here and have started pushing commits to our fork based on this outline. I should have the first draft together in the next day or so.
Once we have a working draft we will perform some quick-and-dirty QA testing by asking Reactiflux members to complete the tutorial and soliciting them for notes/comment. Once we have amended a final draft and incorporated user comment we will open a PR with our fork.

Nice!
My experience with CodeSandboxes for examples is that they work best when the code is actually in a Github repo, and the sandbox is pointed to a specific branch or tag. You can see that in the existing tutorials.
My suggestion would be that we should create a react-hooks-tutorial branch in the existing Fundamentals repo based off of the initial master commit, and merge the RTK-rewritten all-React starting point into that branch.  Then we can have a couple additional commits on that branch with the rest of the code shown in the tutorial.

@wjohnso-insight @ligabloo hey, wanted to follow up on this - are you still working on the tutorial migration?

@markerikson hey, Mark! So, we've had a bit of a pause since last month - personally, I've been kind of busy with work and that messed up my schedules and such, but yeah, I still intend to continue working on this.
This is the progress we've made so far: https://github.com/ligabloo/react-redux/blob/master/docs/tutorials/hooks.md
Also, @wjohnso-insight has created issues for the different sections that are still missing, if you want to check that: https://github.com/ligabloo/react-redux/issues.
I'd appreciate if you could give us feedback on what we've written (well, mostly @wjohnso-insight, I've helped with the code samples and some minor suggestions) so far and if it matches what you're expecting out of the tutorial 😃

@ligabloo gotcha, thanks for the update!
Glancing at that page, I'd actually suggest cutting down on the amount of explanation of basic store setup.  Ultimately the goal here is to teach setting up the React-Redux portion and using it.
I do note that we don't really have a good spot that explains "how to set up configureStore from scratch", exactly.  The "Essentials" tutorial comes with that store setup already in place in the example app.  The "Fundamentals" tutorial does show use of configureStore, but only by migrating existing setup logic.
Perhaps we could add one other "Quick Start" tutorial to the Redux core docs.  We've already got one in the RTK docs at https://redux-toolkit.js.org/tutorials/quick-start , and it would seem reasonable to put that in the Redux docs.
So, I think my main suggestion here would be point to "Understanding of Redux core concepts" as a prerequisite, and focus this section more on the React-Redux APIs.

Hello @markerikson, I've been thinking on this from time to time, and it seems like I can't never really find time to get back to it. 😞 I'm sorry for taking so long to tell, but I decided it would be best to do it know rather then hoarding this task even longer while some other person might be interested in going through with it. I'll try to talk with some of my work colleagues to see if anyone is interested in contributing (and able to do so). Still, I hope to be able to help with something else in the future, since Redux has been a fundamental tool that I've used daily for years.

@ligabloo no worries, I appreciate the effort, and I totally understand being too busy!
Could you do me a favor? Go ahead and open up a PR with whatever content you have so far, and create issues here in the repo matching what you were planning to do.  That way someone else can pick up with the effort.


InjectSoftAssertions doesn't work as expected when parallel mode is enabled.

Summary
Framework: Junit 5
Using InjectSoftAssertions and running tests in concurrent mode are leading to incorrect test results. Tests that should have failed are eventually passed.
Example
@ExtendWith(SoftAssertionsExtension.class)
public class SoftAssertionTest {

    @InjectSoftAssertions private SoftAssertions softAssertions;

    @Test
    @DisplayName("Test 1")
    void test1() {
        softAssertions.assertThat("Test 1").as("Test 1").isEqualTo("Fail");
    }

    @Test
    @DisplayName("Test 2")
    void test2() {
        softAssertions.assertThat("Test 2").as("Test 2").isEqualTo("Fail");
    }
}

Both tests should fail, but one of them passes and the other fails with two errors(from test one and test two).
Screenshot from IDE

If i disable parallel mode in the junit-platfrom.properties or set these two annotations
    @TestInstance(TestInstance.Lifecycle.PER_CLASS)
    @Execution(ExecutionMode.CONCURRENT)

it will help. But this is not a solution for me.
Repository to reproduce the issue. You can run tests by maven or from IDE. The result will be the same.
https://github.com/Rusgallaz/SoftAssertionConcurrent
Version
assertj-core  3.21.0

Thanks for reporting this issue with great details!

I'll try and have a look at this one next week.

This is still an issue as of 3.23.1, any chance it can be looked at as it seems like this issue got missed :)

Hi @JamesPeters98, we'll do our best to keep this issue in scope for 3.24.0.

I'll try and have a look at this one next week.

Sorry, that has been an extremely long week. Hopefully it will get shorter in the coming... errmm... weeks...

This is similar to #3550. It appears that a single test thread entering afterTestExecution collects all assertion errors and reports them together, while other tests with no errors are shown as passing (green).
If handled correctly, this could resolve #3550, though I’m not sure of the exact approach.
One simple solution would be to use the thread-local collector (currently used for isPerClassConcurrent(ctx)) more broadly — to cover all concurrent cases (also per method + concurrent). However, I'm not sure of all the possible implications of this change.


Use some natural sort for list of speakers

The /events/speakers/ page lists all speakers grouped by their first name initial. The sort order is technically correct from a machine point of view. However, non-ASCII initials are grouped separately, which is slightly irritating and somewhat unfair.
Example: "Łukasz Kąkol" is listed separately, but should be included in the group of speakers starting with "L" (between "Lilian" and "Lynn").
Is there a humanized, natural sort function or template filter that can take care of this?

Thanks for spotting that, @bittner , that's a really good catch. Going to submit a patch for this.

In [15]: import locale
    ...: from functools import cmp_to_key
    ...:
    ...: locale.setlocale(locale.LC_ALL, '')
    ...: sorted(['L', 'A', 'Ł', 'Z'], key=cmp_to_key(locale.strcoll))
    ...:
    ...:
Out[15]: ['A', 'L', 'Ł', 'Z']

So, ASCII comes before Eastern Europe. Great. Sounds a bit like, white male comes before colored female or non-binary. Hmm...
I'm not criticizing. Just trying to point out the actual issue.
Ideally, we treat all similar-looking characters the same. Is there an app^H^H^H^H^H module for that?

It's a tricky one.
The website is in English, I think it's fair to sort the alphabet according to the English alphabet (whatever than means when it comes to non-ASCII characters!).
For example, where should Ö fall?

In Swedish: it's at the end of the alphabet, after Z.
In Hungarian: it's near the middle, after O.

If the page is in Polish, it would make sense to sort using the Polish alphabet. If French, then sort using the French alphabet.
(Also take into account the country the page is intended for: I wouldn't be totally surprised if two countries which both use the "same" language had different alphabets.)
How should "foreign" letters be sorted for the English alphabet?  https://english.stackexchange.com/a/212630/9001 suggests: "Ignore diacritics when sorting English — except to break ties", which is what locale is doing in https://github.com/EuroPython/epcon/issues/1008#issuecomment-495541266.
(That link also goes into details about sorting of names which complicates things further, but keep it simple with something like locale!)

Without getting too academic or religious about things, my proposal was to group visually similar letters into what is the visual equivalent in English. English is the lingua franca at EuroPython, I assume.
Hence:

A = Ä, Â, À, Á, Ẵ, Ẫ, Ã, ...
E = Ê, Ễ, Ḛ, ...
I = Î, Ì, Í, Ĩ, ...
J = Ĵ, ...
L = Ł, Ɫ, ...
O = Ö, Ô, Ó, Ò, Ṍ, Ṏ, ...
U = Ü, Û, Ù, Ú, Ữ, ...
V = Ṽ, ...

There should be a package or module doing that already, shouldn't it? The upper and lower string methods handle those characters out of the box in Python, by the way.

I've whipped up a package to help with this: https://pypi.org/project/anglicize/
I can't really find where in epcon this events/speakers/ view is implemented. If someone wants to point me in the right direction, I'd be happy to write a PR.

Hi Radu,
the speaker and session listings use template tags and are
rendered directly on the page (to stay flexible).
Here's the code for the speakers page:
"""
{% load sessions %}
{% speakers "ep2020" as speakerdata %}
{% for name, group in speakerdata.groups_list %}
{{ name }} ...

{% for speaker in group %}
{{ speaker.fullname }}
{% endfor %}

{% endfor %}
{{ speakerdata.count }} speakers in total.
"""
On 3/8/2020 2:03 PM, Radu Ciorba wrote:

I've whipped up a package to help with this:
https://pypi.org/project/anglicize/
I can't really find where in epcon this |events/speakers/| view is
implemented. If someone wants to point me in the right direction, I'd be
happy to write a PR.

--
Marc-Andre Lemburg
http://www.malemburg.com/


Support graceful failure/retries

Is your feature request related to a problem? Please describe.
When discord api is down, the nestjs app cannot start, and hangs in the bootstrapping modules phase, with no error message and no indication of what went wrong.
Describe the solution you'd like
Timeouts and retries, or add an option to allow failures (discord api is non-critical for operation of other parts of this app)
Describe alternatives you've considered
Additional context
Confirmed removing discord module import from my app.module.ts allowed the app to start again without hanging here:
[RouterExplorer] Mapped {/health, GET} route +0ms

EDIT: just realize that this is probably an option of the underlying lib, discord.js, but had already posted here. Looking for a solution to non-blocking module startup either way

Any plans regarding this issue? It seems like a must-have. Having the whole app crash/not start because discord API is down is pretty bad.

Any plans regarding this issue? It seems like a must-have. Having the whole app crash/not start because discord API is down is pretty bad.

Any plans regarding this issue? It seems like a must-have. Having the whole app crash/not start because discord API is down is pretty bad.

Will be added in release 1.0.0


make managed grafana name configurable

What this PR does
the name for managed grafana needs to be unique, so making it configurable allows us to adapt in different environments. for personal dev environments our defaults ensure uniqueness
NameNotUnique - The Grafana Workspace name 'aro-hcp-grafana' is already being used. Please choose another name.

Jira:
Link to demo recording:
Special notes for your reviewer

close in favor of #460 460


Documentation: Link to blueprint library invalid

The readthedocs chapter blueprints contains a link to the blueprint library which is not working. Maybe a "/" is missing.

Just for reference, the correct link should be https://carla.readthedocs.io/en/latest/bp_library/
The link in the python_api_tutorial is missing the /en/latest/


Fix memory leak

Allocate buffer for getline and free memory in get_input function
According to the manpage of getline(),
if *lineptr is set to NULL and *n is set to 0 before the call, getline() will allocate a buffer for storing the line.
This buffer should be freed by the user program even if getline() failed.

In the get_input function, add free(line) after its usage to prevent memory leaks.

Thank @HotMercury for contributing!


WIP: http_filter: REST-based external authentication filter

Description:
This is the external authentication filter that's been powering Ambassador's authentication mechanism for months now. It's used by many - perhaps most - Ambassador installations, including production use at Datawire and elsewhere.
So clearly this PR is a bit overdue, for which I apologize. [ ;) ] That's doubly true in light of Tigera's recent work: Ambassador's auth mechanism is very different from the mechanism that external_authz.proto embodies, and it seems like a discussion is warranted.
Distinctions Between Methods
The big distinctions between Ambassador's auth and the external_authz.proto mechanism are:

The obvious: Ambassador's auth is currently REST-based rather than gRPC-based.

However, we have had requests for gRPC as well as REST; supporting both would probably be a good thing.

When an Ambassador auth service indicates a failure, the response from the auth service is handed back to the client.

"The response" includes HTTP status code, headers, body, the works. This has turned out to be very important for our users, as it provides a lot of flexibility and control.
For example, at Datawire, Ambassador fronts a dashboard service, which is to be accessed by a web browser, and we currently use Auth0 for the heavy lifting of authentication. Giving the auth service control over the response to the client allows us to respond to an unauthenticated request with a 301 to redirect the browser to Auth0's login widget, which makes for a much cleaner user experience... but we can just hand a 401 to a program that would be confused by the redirect.

When the external auth service indicates a success, the filter can copy headers from the auth service response into the client's request before passing it upstream.

Which headers are copied can be configured; only headers specifically permitted are ever copied. This has also turned out to offer a lot of flexibility: for example, the auth service can insert a header indicating what level of access a the authenticated user has, and that header can trigger a routing decision. Or, as we do at Datawire, the extauth service can inject a token into the request after a successful first-time authentication.
Protocol Details
The protocol between the extauth filter and the extauth service is very simple:

Any request that arrives at the filter is sent on to the auth service.

The HTTP method, URL, and headers other than Content-Length are forwarded unchanged.
The Content-Length header is given a value of 0.
No body is sent.

If the auth service responds with an HTTP status of 200, the request is allowed to continue.

Any allowed_headers listed in the extauth filter config are copied from the auth service's response into the request before it continues upstream.
Note well that only 200 will approve the request; any other 2yz response is not an approval.

If the auth service responds with an HTTP status other than 200 (including other 2yz responses), the request is not allowed to continue.

The full response from the auth service - headers, body, everything - is sent as the response to the client.

It's worth noting, given the above, that:

The auth service must be prepared to handle any HTTP method that the client will use.
The auth service can, and is expected to, immediately return a 200 for requests that don't require authentication, but
At present, all requests will be checked with the auth service.

Future Work
Under consideration but not part of this PR:

Performance work. The most obvious thing here is to cache results for a configurable time to cut down on traffic to the auth service; we've prioritized correctness ahead of that, though.
Support for multiple auth services. We've had requests for this, too.

Risk Level: Medium
Testing:
This is WIP because we need to add coverage testing! CI tests should all be passing, though.
Docs Changes: needed but not written until we sort out the path forward [ :) ]
Release Notes: N/A

Thanks for getting this PR up for discussion, and the super detailed PR description. Tagging @saumoh here, hopefully we can kick off some discussion on the various authentication filter approaches here.
It looks like some CI tests are failing although I didn't look very deeply at them. If you can investigate those in the meantime that'd be great.

@louiscryan @wora @mandarjog @kyessenov @spikecurtis @rshriram Looping in folks who were involved in the earlier ext_auth PRs. I think we should have folks take a pass over the design here and offer up thoughts on how we can address the use case you describe with ideally a single ext auth approach.

Thanks @kflynn !
Another way to slice the big distinctions between Ambassador's auth and the external_authz.proto mechanism is that Ambassador's auth is handling both authentication (authn) and authorization (authz), whereas the attempt with external_authz.proto is only to handle the latter.
Many of the use cases you describe that Ambassador's filter supports are around sophisticated authentication flows: redirect unauthenticated users, attach authentication tokens, attach security claims, etc. This stuff is super useful!
Moving forward I think it is important for us to take a modular approach and keep authentication and authorization separate. On the Istio project we are prototyping authentication filters and associated policies---I would love to see those efforts converged with the use cases described here.

@dnoe Yup, looking at CI failures now. I'm actually a bit confused by the Clang build failures -- I ran the tests with --config=clang-asan; should that not have forced a rebuild with Clang?
In any case, I can definitely reproduce the failure here (with bazel build -c dbg --config=clang --verbose_failures //source/exe:envoy-static) and am testing the fix now. Sigh. :)

@spikecurtis Hearing more about what Istio's been exploring sounds great -- having Istio and Ambassador play nicely on this would be a really good thing. If realtime seems easiest there, happy to jump on a call or set up a face visit.
And yes, it was a deliberate decision to allow Ambassador's auth to span both authn and authz -- while separating them certainly has advantages (especially in composability), allowing a single filter to span both avoids a fair amount of complexity, both in the code and in the user experience. It'll be very interesting to see if there's a good way to get the best of both worlds there.

@kflynn Some Istio docs about authn (note you might need to join Istio Dev Group to view)

Istio Authentication Policy
Istio End-User/Per-Request Authentication

I tend to agree with Flynn here that there is utility in allowing this
functionality to span authn & authz. While we may try to promote as much
authn functionality inline into Envoy that will not scale to all use-cases.
Similarly the remote authorization mechanism does need to be able to
influence the error response to the client in ways that we are unlikely to
want to configure into Envoy directly. If this means that 'authorization'
is too narrow a name for whats in Envoy today we should rename it
On Thu, Feb 15, 2018 at 10:38 PM, Flynn<EMAIL_ADDRESS>wrote:

@spikecurtis https://github.com/spikecurtis Hearing more about what
Istio's been exploring sounds great -- having Istio and Ambassador play
nicely on this would be a really good thing. If realtime seems easiest
there, happy to jump on a call or set up a face visit.
And yes, it was a deliberate decision to allow Ambassador's auth to span
both authn and authz -- while separating them certainly has advantages
(especially in composability), allowing a single filter to span both avoids
a fair amount of complexity, both in the code and in the user experience.
It'll be very interesting to see if there's a good way to get the best of
both worlds there.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/envoy/pull/2621#issuecomment-366155962,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIoKPDmtcHM6jBIUMCUKZOYgayG-Pjf7ks5tVSJagaJpZM4SHFyv
.

"The response" includes HTTP status code, headers, body, the works. This has turned out to be very important for our users, as it provides a lot of flexibility and control.

This is the part I like. Though I am not sure shipping an entire html body as part of the response is helpful all the time. One option might be to indicate a template file to be used as a body.
I haven’t read the code yet, but for something like this, it might be useful to have a route level opaque metadata that triggers the filter, such that people can enable this for a few URIs (eg /login) out of all the routes. (Might alleviate the need for caching in short term).

@jsedgwick Thanks for checking over the code! More comments inline as we dig into those points.
@louiscryan, @rshriram Yeah -- in practice, the flexibility has proven a huge win, and we haven't seen much evidence that shipping the HTML body for the error case is a big problem yet. Admittedly we tend not to send large HTML bodies: mostly for us it's a 401 with a WWW-Authenticate header, or a 301.
Finally, @spikecurtis, thanks for the pointers! I'm already a member of the istio-dev group, but I need to reread those and think more about abstracting beyond Istio...

I recommend the filter to be configurable. The set of headers used for auth
should be decided by the operators, not blindly forward everything. For
common cases, you only need a few headers.
Regarding the HTML response, that should be configurable as well. Let's say
you are using Facebook or Google for authentication, do you really want to
trust them to return HTML to your clients, which could be an IoT device or
a financial partner of your business.
Everyone wants to have more control over others, it doesn't mean everyone
else should trust them. Injecting HTML with JavaScript could be its own
disaster in the worst case scenario.

@jsedgwick Thank you for the code review. I will be working on this PR from now on. Fixes will be pushed later this evening (PST).

@jsedgwick Feel free to take another look. Thanks!

Met with @kflynn and @dpn today, the plan to move forward with this is to get some agreement at the design level on how this and ext_authz relate. @kflynn volunteered to write up the use cases that inspired this approach to auth filtering in a Google Doc; hopefully the Istio folks can extend and we can agree on the core use cases that need to be addressed. Ideally we can converge solutions and be able to cover all use cases.

Please share the doc with me when it is ready. I want to make sure the
design of the API meets practical requirements. Thanks.

I'll post a link here when the doc ready, yeah.
Also, in case there's any confusion: @gsagula is working with me on code cleanup. :)

@louiscryan @wora @mandarjog @kyessenov @spikecurtis @rshriram @gsagula @kflynn @htuch @dnoe @saumoh et al:
My general feeling on this PR and functionality in general is that we should merge into the existing extauth HTTP filter that @saumoh has been working on. This would involve:

Enhancing the existing gRPC API to send/receive the needed functionality to cover what is done here.
Also enabling the extauth filter to optionally speak REST/JSON instead of binary gRPC, all driven by the same proto. (Basically how we do xDS).

I think this is the best way forward as I really don't want to end up with 2 auth filters and I see no real reason we can't make everyone happy with the right configuration and API.
So along those lines my recommendation is to:

Close this PR for now.
Do the design doc and send to<EMAIL_ADDRESS>We can flesh out everything there and then make the final call on whether to merge or not.

Anyhow feel free to leave this open if it helps but that's my suggestion on how to proceed FWIW. Thank you very much for working on this @kflynn @gsagula I think this is going to be great for the community.

@mattklein123, thanks for chiming in! Let's leave this open while I get the draft of the design doc done? There are a couple of points I'd like to make sure are clear before we close this one.
For the record, we're definitely not opposed to merging filters. :) We do want to make sure that the folks already using Ambassador's extauth have a smooth path forward, though. Thanks!

@kflynn I'll let you guys decide the design. Meanwhile, If you would like to share the doc with me, it helps in case I need to jump in the code. Thanks!

I'm with @mattklein123  and don't see a reason we can't make everyone happy with the right design.
What I care about with the separation between authN and authZ is primarily about being able to compose them.
@kflynn happy to help where I can with the design.

Same here and for @mjog
On Fri, Feb 23, 2018 at 1:49 PM, Spike Curtis<EMAIL_ADDRESS>wrote:

I'm with @mattklein123 https://github.com/mattklein123 and don't see a
reason we can't make everyone happy with the right design.
What I care about with the separation between authN and authZ is primarily
about being able to compose them.
@kflynn https://github.com/kflynn happy to help where I can with the
design.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/envoy/pull/2621#issuecomment-368148479,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIoKPOnDJn-BaXsHE6ALoF5GmO1myN7vks5tXzKHgaJpZM4SHFyv
.

OK, at long last, design doc is here: https://docs.google.com/document/d/1L3aRk9yaT6Lsb4epI6rdjCdStOuwTfhoeSP82zunkGg/edit?usp=sharing
@htuch @dnoe @mattklein123 @louiscryan @spikecurtis @mandarjog @saumoh and anyone else interested... :)

(Looks like the sharing settings weren't correct earlier -- fixed now, I think.)

@kflynn Thanks!
I've made a couple comments inline on the doc where differences in design goals jumped out at me.
It feels like the next step is to propose something specific for how the existing ext_authz API might be extended for these use cases (or, conclude that it makes more sense to have an entirely separate API). Again, happy to jump on a call and spitball some ideas.

@spikecurtis How about send me email at<EMAIL_ADDRESS>and we'll see about getting something scheduled? Thanks!

I think it makes sense to have a broader discussion. Flynn if you're
willing to coordinate I would appreciate it.
On Mon, Mar 5, 2018 at 2:37 PM Spike Curtis<EMAIL_ADDRESS>wrote:

@kflynn https://github.com/kflynn Thanks!
I've made a couple comments inline on the doc where differences in design
goals jumped out at me.
It feels like the next step is to propose something specific for how the
existing ext_authz API might be extended for these use cases (or,
conclude that it makes more sense to have an entirely separate API). Again,
happy to jump on a call and spitball some ideas.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/envoy/pull/2621#issuecomment-370592651,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIoKPPy4wV1gVXgK5QPATJKNyGi5dl6mks5tbb4pgaJpZM4SHFyv
.

It would be good to provide a synopsis of how this conversation goes at the next Envoy community call (next Tue). Alternatively, we can have the discussion there, but I have a feeling this is > 20 minutes in scope.

I'll coordinate, yeah. @htuch -- definitely agreed! Even if we haven't been able to have the call by Tuesday ( ;) ) I can talk about the situation and where we are.

In other news: we have the design doc open, and it's pretty clear that we have both a desire to work out a way to meet everyone's goals with one mechanism, and an appreciation that we have some work to do to get there. So I'm going to close this PR tomorrow. Further discussion can center around the doc for the moment, and the meeting to come.
If anyone thinks that this'll make it harder for them to be heard, or for us to get to a good outcome, sing out!

@kflynn you mentioned closing this PR in your last comment, so I will go ahead and close. If please comment if you would like to re open.


Use component wrapper on share links component

What

Adds the component wrapper helper to the share links component.

Why
As the trello card states:

Standardising our components to use the component wrapper helper will reduce code, increase standardisation, and improve future feature implementation speed.

Visual changes
None.

@andysellick Weird...I think may be a rebase went wrong? It looks like it ended up in https://github.com/alphagov/govuk_publishing_components/pull/4474

That is weird. And I approved that one, and didn't raise anything at the time... so yeah, bit confused here. Oh well. You've done the work already 😁 🤷

@andysellick 😅 Happy to revert the other PR, and separate the commits if you think it's worth it - will close this PR for now 👍


test: test policy with APIM Gateway SDK

Issue
https://github.com/gravitee-io/issues/issues/7735
Description
Test policy with Gateway Testing SDK

[ ]  Should assign content on request and response using freemarker

Gravitee.io Automatic Deployment
🚀 A prerelease version of this package has been published on Gravitee's private artifactory, you can:

use it directly by updating your project with version: 1.7.0
download it from Artifactory here

:tada: This PR is included in version 2.0.0-alpha.1 :tada:
The release is available on:

2.0.0-alpha.1
GitHub release

Your semantic-release bot :package::rocket:


Minikube warning and sink configuration

Added a link to Sink configuration before Robusta config generation.
Added a warning about Robusta runner remaining in ContainerCreating state.

@pavangudiwada I think the error for being stuck in ContainerCreating state happens at a later stage, right? Not in the gen-config stage.

@pavangudiwada I think the error for being stuck in ContainerCreating state happens at a later stage, right? Not in the gen-config stage.

Correct.  But a user will be asked details in the context of local cluster(minikube) in the gen-config stage. If they are not aware of this issue. They will go ahead with the process, and it ends up not working.
In which case, they should regenerate/ modify the generated_values.yaml file etc. and go through the hassle of choosing a new cluster.

@pavangudiwada  Oh, right. I forgot about that.
Can we change the wording then and just say "Don't install Robusta on Minikube" or something like that. Right now we're describing an error here which isn't relevant to the current stage. We're missing the main message which is "We recommend you don't install Robusta on Minikube..."
In any event, @Sheeproid is working on a change that will make it possible to put the message in the docs at a later stage. See https://github.com/robusta-dev/robusta/pull/516/files

@pavangudiwada perfect.

@Sheeproid FYI