Fix formatting of ternaries

Fixes https://github.com/chipsalliance/verible/issues/887
Formatted test cases from the issue:
module X ();
  assign myvar = check ? {10'b0, foo} : (bar && (baz == '0)) ? hello_longlonglong :
      world_longlonglong ? temp1_longlonglong : temp2_longlonglong;
endmodule : X

module X ();
  assign {dc_wrap, dc_htbt_d} = !(htbt_ctr_q == blink_param_x_i) ?
      {1'b0, dc_htbt_q} : ((dc_htbt_q == duty_cycle_a_i) && pattern_repeat) ?
      {1'b0, duty_cycle_a_i} : (htbt_direction) ? {1'b0, dc_htbt_q} - {1'b0, blink_param_y_i} -
      1'b1 : {1'b0, dc_htbt_q} + {1'b0, blink_param_y_i} + 1'b1;
endmodule : X

module X ();
  assign {phase_wrap, off_phase} = {1'b0, phase_delay_scaled[15:0]} +
      {1'b0, duty_cycle_scaled[15:0]};
endmodule : X

Todo:

unit tests

Ideas for further work:

It would be nice to implement tabular alignment of nested ternary operators.

Codecov Report

Merging #931 (6523af4) into master (ae75a31) will increase coverage by 0.24%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #931      +/-   ##
==========================================
+ Coverage   92.48%   92.73%   +0.24%
==========================================
  Files         315      316       +1
  Lines       20217    20589     +372
==========================================
+ Hits        18698    19093     +395
+ Misses       1519     1496      -23

Impacted Files
Coverage Δ

verilog/formatting/token_annotator.cc
95.68% <100.00%> (+0.02%)
:arrow_up:

verilog/formatting/tree_unwrapper.cc
97.54% <100.00%> (+0.14%)
:arrow_up:

common/parser/parser_param.h
91.66% <0.00%> (-0.65%)
:arrow_down:

common/formatting/align.cc
91.17% <0.00%> (-0.32%)
:arrow_down:

verilog/analysis/symbol_table.cc
98.79% <0.00%> (-0.20%)
:arrow_down:

...erilog/analysis/checkers/disable_statement_rule.cc
97.50% <0.00%> (-0.18%)
:arrow_down:

...ilog/analysis/checkers/uvm_macro_semicolon_rule.cc
97.14% <0.00%> (-0.16%)
:arrow_down:

...analysis/checkers/create_object_name_match_rule.cc
94.36% <0.00%> (-0.16%)
:arrow_down:

...g/analysis/checkers/always_ff_non_blocking_rule.cc
95.60% <0.00%> (-0.10%)
:arrow_down:

...lysis/checkers/numeric_format_string_style_rule.cc
96.15% <0.00%> (-0.08%)
:arrow_down:

... and 94 more

Continue to review full report at Codecov.

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

+1 for fixing the curly-brace concatenation compactness.
I think tabular alignment is something we should strive for, as there are many places where this pattern is used in SystemVerilog code. In a first step, might need to recognize if we would actually destroying an existing artistically aligned ?: chain and don't verschlimmbessern it; because changing
assign myvar = check                ? {10'b0, foo}       :
               (bar && (baz == '0)) ? hello_longlonglong :
               world_longlonglong   ? temp1_longlonglong : temp2_longlonglong;

to
myvar = check ? {10'b0, foo} : (bar && (baz == '0)) ? hello_longlonglong :
      world_longlonglong ? temp1_longlonglong : temp2_longlonglong;

Would not necessarily improve readability and make things worse. So not sure if we should take on tabular alignment in tihs PR as well ? Though might be a good timely follow-up change.
There are possibly different styles as well.
I've seen something like this (a)
  cond_a ? value_a :
  cond_b ? value_b :
  cond_c ? value_c :
           value_d;

Though sometimes the last condition is just added at the end (b)
  cond_a ? value_a :
  cond_b ? value_b :
  cond_c ? value_c : value_d;

But I could imagine if we stick to (a) rarely someone would complain if we change (b) to (a) (nicer ,because more space in the line for complex values; worse, as it violates the 'use less vertical space' goal).
Though for just one condition, I'd probably line up the the : with the ?
  cond_a ? value_a
         : value_b;

Looking at existing code-artwork could give some ideas.
Adding @msfschaffner for further comments.

Likewise, thanks for taking a stab at this @mglb!
Tabular alignment would be very desirable for ternaries indeed.
In general I like @hzeller's suggestions, see below for a couple of comments.

As for whether to use (a) or (b), I think would have a slight preference for (b) since it reduces the amount of lines used. I've seen this in RTL code from other designers as well, e.g.:
https://github.com/lowRISC/opentitan/blob/882f9d24b6b03c8247b9b68edc266801237c9964/hw/ip/keymgr/rtl/keymgr.sv#L558-L559
I would say, go for (b) if it fits, otherwise try (a).

I think I would break a single condition as follows:
  cond_a ? value_a :
           value_b;

rather than
  cond_a ? value_a
         : value_b;

to keep it consistent with the general case. This is what several other designers on OpenTitan also prefer.
See the following examples taken from various blocks (written by different designers) in the OpenTitan code base:
https://github.com/lowRISC/opentitan/blob/882f9d24b6b03c8247b9b68edc266801237c9964/hw/ip/csrng/rtl/csrng_core.sv#L1049-L1050
https://github.com/lowRISC/opentitan/blob/882f9d24b6b03c8247b9b68edc266801237c9964/hw/ip/aes/rtl/aes_sbox_dom.sv#L869-L876
https://github.com/lowRISC/opentitan/blob/882f9d24b6b03c8247b9b68edc266801237c9964/hw/ip/aes/rtl/aes_sbox_dom.sv#L896-L897
https://github.com/lowRISC/opentitan/blob/882f9d24b6b03c8247b9b68edc266801237c9964/hw/ip/keymgr/rtl/keymgr.sv#L494-L495

Now, there are also cases where the conditions and selected expressions are excessingly long.
In such cases, I would just default to something like
assign out = (veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery_long_cond) ?
             very_loooooooooooooooooooooooong_expr0          :
             very_long_eeeeeeeeeeeeeeeeeeeeeeeeeexpr1;

Example from the code base:
https://github.com/lowRISC/opentitan/blob/882f9d24b6b03c8247b9b68edc266801237c9964/hw/ip/otp_ctrl/rtl/otp_ctrl_part_unbuf.sv#L317-L320

+1 for fixing the curly-brace concatenation compactness.
I think tabular alignment is something we should strive for, as there are many places where this pattern is used in SystemVerilog code. In a first step, might need to recognize if we would actually destroying an existing artistically aligned ?: chain and don't verschlimmbessern it; because changing
assign myvar = check                ? {10'b0, foo}       :
               (bar && (baz == '0)) ? hello_longlonglong :
               world_longlonglong   ? temp1_longlonglong : temp2_longlonglong;

to
myvar = check ? {10'b0, foo} : (bar && (baz == '0)) ? hello_longlonglong :
      world_longlonglong ? temp1_longlonglong : temp2_longlonglong;

Would not necessarily improve readability and make things worse. So not sure if we should take on tabular alignment in tihs PR as well ? Though might be a good timely follow-up change.

Tabular alignment would handle detection problem to some degree. More generic detection could be based on continuation comments detection introduced in https://github.com/chipsalliance/verible/pull/858, but implementing it reliably could require as much work as just implementing tabular alignment for multiple styles.
Anyway, it can be introduced in additional PR. As I understand, this PR in its current form (well, ignoring lack of some tests) doesn't make things worse than they currently are, so there's no point in holding this code until other features are completed.

As for multiple style choices for tabular alignment:
I would try implementing possibility to register multiple CellScanner classes and partitioner functions for a single syntax structure (e.g. nested ternary operator, struct members, etc). Each class/function would format the code using different style. When the first one fails to format the code (e.g. due to column limit), a next one would be used, and so on.


WorldIDManager.java - Failure of register

Code location:
https://github.com/CivMC/CivModCore/blob/00243ad09361361b46e808e3379eb739251a4365/paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/global/WorldIDManager.java#L33

Issue:
Setup of WorldIDManager may be incomplete without communicating the error state to the caller.

Solution:
Setup should be done in the constructor with complete failure (throw Exception) on error to make sure that a half constructed object isn't used from the outside.

I'm closing this out as something that we won't fix. It could be revisited in the future, but it's not within our capacity to work on right now.


Event API

In order to offer various integration possibilities, an event API is to be created. Which allows to get all events filtered by the different attributes. E.g. Aggregate type, aggregate id, etc.

[ ] Event API
[ ] Filter possibility

@fgerschwiler you might want to translate this into EN 😁

Will you provide a streaming API ? So we don't have to pull the events but you push them ?

Hi - @gaetancollaud
We haven't completely settled on the design yet. What for sure will come  to live is a pull based API. But besides that an improvement could be a push based approach. Out rough idea is to extend our actions capabilities to run wasm code that can be triggered with events and then emit the event to a target.
If you could wish. What technology/framework/standard would you like to see?

I mean if you have some kind of webhook that would already be nice.
My wish?

Kafka
Grpc streaming endpoint
Webscoket
MQTT over websocket
Graphql subscription

Whatever suits you to be honest. I guess you know best the constraints you have. As soon as you have a streaming API I'm good.

I've no specific use case right now. But I don't like pulling, because it's a waste of resources on both sides. Not to mention the implementation overhead on the client side (pulling, making diff, etc. etc.)

Ok, thanks.
The reason to be a little back holding on push based concepts is that it hands down to us how we deal with backpressure if the target system is not available. Other than that I agree with you.

The reason to be a little back holding on push based concepts is that it hands down to us how we deal with backpressure if the target system is not available. Other than that I agree with you.

This is completely understandable.
Again, a webhook where you discard fail request is already a really good start.

@eliobischof @fforootd I have added some more descriptions especially filter possibilities and data.
What do you think?
And what is your opinion on how the customers get the data?
I see different possiblities:
Pull:

Event API
Logs e.g Stdout

Push:

Webhooks
Actions

I think we should provide this in the first place as a pull API and later bringt it to actions (with #4265 )
The API in my mind should look like /audit in this endpoint i want to have a stream of changes consisting of audit events (the eventstore mainly) and access events (the usage tables)
For easy devex i think we should focus on how to make this easy queriable by providing params so that also Console could profit)
I am open wording changes 😁

Agree with first implementing pull based queries in regards to backpressure issues.

#4907 #4906


Adding spec for Date/TimePicker design updates

Replacing the PR here: https://github.com/microsoft/microsoft-ui-xaml-specs/pull/114, moving this onto the main repo.

@MikeHillberg @jevansaks - I just pushed updates based on the spec review. There's still one to-do about adding a reflection example using the WPF Visual Brush. Is that needed?

I don't think a reflection example is really necessary. It's not in line with the intent of this API.

MonochromaticOverlayPresenter implies the control will only render greyscale or black and white elements.

MonochromaticOverlayPresenter implies the control will only render greyscale or black and white elements.

What about something like RecolorOverlayPresenter

Thanks @oldnewthing - I've applied your suggestions and made more changes based on your feedback.
@mdtauk - I think the discussion/reasoning for "monochromatic" over something with "color" was that it's not an all-purpose tool to replace colors. @jevansaks can fill in the details that I've missed there, though

@mdtauk - I think the discussion/reasoning for "monochromatic" over something with "color" was that it's not an all-purpose tool to replace colors. @jevansaks can fill in the details that I've missed there, though

Right, it turns all colors in the SourceElement into one single color. Hence, monochrome.

@mdtauk - I think the discussion/reasoning for "monochromatic" over something with "color" was that it's not an all-purpose tool to replace colors. @jevansaks can fill in the details that I've missed there, though

Right, it turns all colors in the SourceElement into one single color. Hence, monochrome.

I think I get that, like Transparent = Red for instance.  But it is essentially a recolouring of elements, or a Color Swapper - and is not restricted to a greyscale palette.  I guess its more of a designer interpretation, rather than a technical one.
Also, has there been any thought put to swapping background and foreground colours?  The text colour would adapt to contrast with the background colour.

I guess its more of a designer interpretation, rather than a technical one.

I was trying to see if there was an industry term for this operation but I couldn't find it. It reminds me of a DirectX fixed function operation, but I can't think of what it would be in Photoshop.

Also, has there been any thought put to swapping background and foreground colours? The text colour would adapt to contrast with the background colour.

I'm not sure what you mean? This primitive helps with that -- ReplacementColor is the foreground and the Background is the background. Are you thinking we could auto-magically determine the correct foreground and contrasting background color?

I guess its more of a designer interpretation, rather than a technical one.

I was trying to see if there was an industry term for this operation but I couldn't find it. It reminds me of a DirectX fixed function operation, but I can't think of what it would be in Photoshop.

Photoshop has a Color Overlay effect that replaces the opaque pixels with a new colour.

Also, has there been any thought put to swapping background and foreground colours? The text colour would adapt to contrast with the background colour.

I'm not sure what you mean? This primitive helps with that -- ReplacementColor is the foreground and the Background is the background. Are you thinking we could auto-magically determine the correct foreground and contrasting background color?

I must have misunderstood your comment ''it turns all colors in the SourceElement into one single color''
So the replacement colour is for the foreground colours, like the text colour, or the fill colour of an element within this panel.  And the panel's background colour renders below the elements being filtered?

So the replacement colour is for the foreground colours, like the text colour, or the fill colour of an element within this panel. And the panel's background colour renders below the elements being filtered?

Exactly.

About the "monochrome" name, we had the same difficulty naming BitmapIcon.ShowAsMonochrome. According to the dictionary it's technically accurate to be a color other than black.

MonochromaticOverlayPresenter is an interesting concept. I understand how this is needed to achieve the design goals and like the direction this is going. However, this seems like a bit of a hack. I think a correct design for the XAML framework would be far more complex. The generalized solution here should be the ability to draw the same control using two different styles -- and then change which area a style applies to resulting in a final composite of both styles.
Using a contrived example: Lets say you have a control that is styled using a light theme. However, you want a very specific geometric subsection (could be rectangular) to be rendered with the dark theme. Such a CompositeStylePresenter control would allow a specific geometry of the source control to actually appear to the user on screen using a different, arbitrary style. You could show a subset of a control with dark theme that is otherwise using light theme.
Such a generalized approach is not only more correct from a framework standpoint, it also ensures this is future proofed for further design direction.

I think a correct design for the XAML framework would be far more complex.

Perhaps. We went this direction primarily because for WinUI2, changing the XAML framework for things that we want to work downlevel isn't possible (yet). So we resort to creative hacks such as this. :)
Once we have WinUI3 we can certainly discuss more holistic approaches. But even when we can, sometimes the creative targeted solution like this is still the best option because we have limited time to work on everything and a fully generalized solution isn't a great return on investment.
In this case, where else would such a generalized solution be applicable? And, more importantly, in what ways would that solution handle things that this solution doesn't?

We went this direction primarily because for WinUI2, changing the XAML framework for things that we want to work downlevel isn't possible (yet). So we resort to creative hacks such as this. :) ... Once we have WinUI3 we can certainly discuss more holistic approaches. But even when we can, sometimes the creative targeted solution like this is still the best option because we have limited time to work on everything and a fully generalized solution isn't a great return on investment.

Yea, that's certainly understood.
As always, I also understand your resource constraints but still push for what seems best for the future of the framework itself. Nothing is more permanent than a temporary solution. That said, I don't think there are many concerns here as the MonochromaticOverlayPresenter is just a control (as opposed to a lower-level framework feature) that could be obsolete in the future if more generalized solutions become available.

In this case, where else would such a generalized solution be applicable? And, more importantly, in what ways would that solution handle things that this solution doesn't?

Think of this more as you just got me thinking of some brand-new ideas. I don't recall this scenario being considered before like this so it's new territory. With new territory I think the generalized solution should always be investigated. I'll have to keep thinking about this over time and other more powerful use cases might become apparent.
Finally, the current MonochromaticOverlayPresenter concept seems to be getting into the old WPF BitmapEffect territory. I wonder if resurrecting those ideas (and naming/class conventions) would be beneficial here for the 'hack' as I call it :)

With new territory I think the generalized solution should always be investigated. I'll have to keep thinking about this over time and other more powerful use cases might become apparent.

For sure. The feature that came up in our API spec discussion is that this is very similar to the VisualBrush feature in WPF. What I think would be more generalized is a control that exposes the ability to do a VisualSurface of anything and then apply any composition effect brush to it. That's something which we could easily build without new framework functionality and could enable some cool effects.

For sure. The feature that came up in our API spec discussion is that this is very similar to the VisualBrush feature in WPF.

I may have misunderstood how this was being implemented then. Additionally, VisualBrushes to me are used more for repeating patterns (It would have been nice to have these for the color picker checkered backgrounds). So other than perhaps similar API patterns I'm not sure how this is similar to a VisualBrush. However:

What I think would be more generalized is a control that exposes the ability to do a VisualSurface of anything and then apply any composition effect brush to it.

Conceptually I was thinking the same as what you describe here -- allowing any effect to be applied to the underlying image -- like filters in graphics software. I guess my assumption was the operations to swap out and modify the colors were being done on the rendered bitmap. Seems not? I don't know enough about WinUI's underlying composition system but this still sounding like 'BitmapEffect' from WPF for the most part. You know a lot more about how this is working behind the scenes so I could easily be wrong here.
Also note that a system to swap styles would still be more powerful and general purpose for this specific case (you could modify the background/foreground brushes as the same time in XAML and do it before things are rendered to a bitmap). However, this DatePicker design can also be achieved using a filter effect as you described.

/azp run


[Macos] Add latest ruby versions for macos images.

Description

Remove older ruby version 3.0.
Add latest ruby versions 3.2,3.3.
Add default ruby version as 3.3.

Related issue:
Check list

[ ] Related issue / work item is attached
[ ] Tests are written (if applicable)
[ ] Documentation is updated (if applicable)
[x] Changes are tested and related VM images are successfully generated

The same situation as with NDK. Tool removal and deprecation should be properly announced before applying.


Restoring the ability to use a centralized RNG

Restoring the ability to use a centralized random number generator, as needed for the CRN publication. Can remove later.

In practice, my user script looks like:
ss.options(_centralized=True)
sim = ss.Sim(...)

if rng == 'centralized':
    for dist in sim.dists.dists.values():
            dist.rng = np.random.mtrand._rand

sim.initialize()
sim.run()

Something is not working as I'm getting correlated draws, looking into it now and marking as DRAFT.

The issue was with jumping, now fixed and ready for review.


When clicking nodes section at top get error message

Clicking the nodes stat button just gives error message:
Error while loading nodes data

[error] application - Error processing request [path: /nodes, body: {"host":"tyadr_logging"}]

@ed0724 what version of ES, cerebro and OS are you using? And which nodes stat button is this?

ES - 5.5.0-1
Cerebro - 0.7.1
OS - Centos7 3.10.0-514.6.1.el7.x86_64
On the web page in the top bar to the right of the cerebro icon.  There a tiny stack icon with the word "nodes" next to it.  The page shows the node stats.

Should this be populated with all the ES nodes in the stack ?
A list of known hosts
hosts = [
#{
host = "http://localhost:9200"
name = "Some Cluster"
#},

Error while loading nodes data
{
"error": "JsResultException(errors:List((,List(ValidationError(List('sqHQU1W-RlS3WTTG0D_7Gg' is undefined on object: {"jeW2LpoTQJuwMWg6hnuAWQ":>....................

Could you get the output of:
/_nodes/_all/jvm,os?human=true
/_nodes/stats/jvm,os,fs,process?human=true
/_cat/master?format=json

I believe the list of nodes returned by these calls is not consistent.

here are the outputs
REST cmd outputs.txt

Why am I seeing this:
Nov 30 13:07:22 es01 systemd[1]: Started Cerebro.
Nov 30 13:07:22 es01 systemd[1]: Starting Cerebro...
Nov 30 13:07:24 es01 cerebro[2706]: WARNING: An illegal reflective access operation has occurred
Nov 30 13:07:24 es01 cerebro[2706]: WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/opt/cerebro-0.7.1/lib/com.goog...ctionDomain)
Nov 30 13:07:24 es01 cerebro[2706]: WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
Nov 30 13:07:24 es01 cerebro[2706]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Nov 30 13:07:24 es01 cerebro[2706]: WARNING: All illegal access operations will be denied in a future release

I have the "nodes" page issue fixed, working now.   However when shards are reinitializing and I select "show only affected indices" it does not show any indices.

@ed0724 upgrade to 0.7.2, this last issue has been fixed already.


Downloading flash & fastuniq HW3

Hi,
I'm trying to download flash & fastuniq. I'm working inside a linux docker and when running the command:
"conda install -n lesson3 -c bioconda fastuniq" I get this error-
Channels:

bioconda
conda-forge
defaults
Platform: linux-aarch64
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

fastuniq

Current channels:

https://conda.anaconda.org/bioconda
https://conda.anaconda.org/conda-forge
defaults
https://repo.anaconda.com/pkgs/main
https://repo.anaconda.com/pkgs/r

To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org

and use the search bar at the top of the page.
Which has to do with the fact that I have an aarch64 architecture. Are there any alternatives I can use instead? Couldn't find anything substantial in the conda website.
Thanks in advance,
Arielle.

Hi Arielle, working inside a linux docker is not a setup I'm familiar with or can help you debug remotely. I would suggest to try and install packages using your linux distrobution manager (apt under ubuntu; sudo apt install ). If this does not work you can always follow the download and install instruction given to each tool in its github repo or website

Yes, I figured that would be the answer eventually.
Thanks!


How do I interact with web pages? Where is main.dart.js in the web file under the example file?

1、The wallet is the dart version. The dapp is a web page. How do you interact in this case?
2、

You can interact the same way like any other dapp. The walletconnect_dart sdk can both function as a wallet and dapp.
In the dapp, you have to generate a QR code that can be scanned by your mobile wallet. once scanned, set up the connection using the sdk.


Display, store experiment params

Out of the scope of Collagen.
We could use hydra (https://github.com/facebookresearch/hydra) or trains (https://github.com/allegroai/trains/) instead.


.net core 1.0 support

Any plans to support target platform netstandard and netcoreapp? To allow use of LiteDB from .NET Core 1.0 library or app.
With existing LiteDB support for PCL should not be difficult.

Hi @hopix, take a look in #280


[FEATURE] Adds support to compile the SDK with Swift 5

Priority
High
Description
Now that Swift 5 is out, applications are going to want to compile the SDK using the new ABI-stable release.
This PR completes the minimum viable amount of changes for the SDK to compile.
Notes
There are tons of warnings as a result of the version bump that I didn't want to address quite yet without some discussion. Since a lot of these stem from 3rd party dependencies (like Cryptoswift, HDWallet, etc.) that have already been updated for Swift 5, there's a good argument to be made for us to have a look at re-importing those libraries, or even have a better strategy for including those dependencies in the project.

Hi Nick,
thank you for adding this PR. I will review it this weekend and will contact you by mail regarding a discussion.
Best
Chris.


How to reference variable in an xpath on OpenTest

How to reference a variable in an XPath? I've tried using "+$macroArgs.generalMentionUser+" but getting the error "missed comma between flow collection entries". Below is the code:
  - action: org.getopentest.selenium.Click
    args:
      locator: { xpath: "//div[contains(text(),'"+$macroArgs.generalMentionUser+"')]" }

On selenium, the same variable referencing works.

The below code would work for you.

script: |
$runAction("org.getopentest.selenium.Click", {
locator: { xpath: "//div[contains(text(),'"+$macroArgs.generalMentionUser+"')]" }
});

Here's an alternative to Naveen's solution (not tested):
- script: |
    var xpath = $format("//div[contains(text(),'{0}')]", $macroArgs.generalMentionUser)

- action: org.getopentest.selenium.Click
  args:
    locator: { xpath:  $script xpath}

- description: Click on the element
  script: |
      $runAction("org.getopentest.selenium.Click", {
        locator: { xpath: "//div[contains(text(),'" + $macroArgs.generalMentionUser + "')]" }
      });``

Thanks, @Naveenkumarnnk , this code indeed works.
@adrianth, I did try the solution you provided, however, it doesn't seem to be working. The error message "can not read an implicit mapping pair; a colon is missed" is being displayed. I did add a ";" at the end of the var declared, but the error still displays.

This worked for me

script: |
$localData.Loc_xpath = { xpath: "//div[contains(text(),'"+$macroArgs.generalMentionUser+"')]" }

description: Click on the element
action: org.getopentest.selenium.ActionsClick
args:
locator: $localData.Loc_xpath


EventLoop selector poorly balances cpu usage on cpu cores

Hi,
I've been thinking about how the EventLoop selector currently works for long-lived connections.
If we have an event loop group, the choosen eventloop for new connection is eventloops[counter++ % count].
If people start disconnecting, reconnecting etc...it can quickly get unbalanced and make CPU usage heavier than it should be...(over 100% usage of one core)
I think it may be the cause of some high CPU usage scenarios I can see with my application.
Is there a way to make it choose the next event loop by number of handling connections?
What do you think @normanmaurer @Scottmitch ?
I'll be implementing a proof of concept soon :)

Is there a way to make it choose the next event loop by number of handling connections?

We currently don't keep a "number of connections per EventLoop" count, and I'm not sure we want/need this the core of Netty. I would recommend looking at EventExecutorChooserFactory. Unfortunately wrapping/extending implementations of EventLoopGroup and EventLoop can be challenging (see https://github.com/netty/netty/pull/4819).

EpollEventLoopGroup has a map with channels, so it's epollEventLoop.channels.size();
It's hard to do even with reflection, because the EpollEventLoop class is final, so I'd have to do this at netty level.
EpollEventLoopGroup -> override next() -> iterate over each EpollEventLoop and choose the one with the last active channels

Here's a ready POC, I am about to test it now.
package io.netty.channel.epoll;

import io.netty.channel.DefaultSelectStrategyFactory;
import io.netty.channel.EventLoop;
import io.netty.channel.MultithreadEventLoopGroup;
import io.netty.channel.SelectStrategyFactory;
import io.netty.util.collection.IntObjectMap;
import io.netty.util.concurrent.RejectedExecutionHandler;
import io.netty.util.concurrent.RejectedExecutionHandlers;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadFactory;

/**
 * An EpollEventLoopGroup modification hack that aims to fix
 * CPU core usage balance for long-lived connections...
 */
public class CoolEpollEventLoopGroup extends MultithreadEventLoopGroup {
    private List<IntObjectMap> channelMaps = new ArrayList<>();
    private List<EventLoop> eventLoops = new ArrayList<>();

    private static final Field channelsField;

    static {
        try {
            channelsField = EpollEventLoop.class.getDeclaredField("channels");
            channelsField.setAccessible(true);
        } catch (NoSuchFieldException e) {
            throw new RuntimeException(e);
        }
    }
    /**
     * Create a new instance using the default number of threads and the default {@link ThreadFactory}.
     */
    public CoolEpollEventLoopGroup() {
        this(0);
    }

    /**
     * Create a new instance using the specified number of threads and the default {@link ThreadFactory}.
     */
    public CoolEpollEventLoopGroup(int nThreads) {
        this(nThreads, (ThreadFactory) null);
    }

    /**
     * Create a new instance using the specified number of threads and the default {@link ThreadFactory}.
     */
    @SuppressWarnings("deprecation")
    public CoolEpollEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory) {
        this(nThreads, null, selectStrategyFactory);
    }

    /**
     * Create a new instance using the specified number of threads and the given {@link ThreadFactory}.
     */
    @SuppressWarnings("deprecation")
    public CoolEpollEventLoopGroup(int nThreads, ThreadFactory threadFactory) {
        this(nThreads, threadFactory, 0);
    }

    /**
     * Create a new instance using the specified number of threads and the given {@link ThreadFactory}.
     */
    @SuppressWarnings("deprecation")
    public CoolEpollEventLoopGroup(int nThreads, ThreadFactory threadFactory, SelectStrategyFactory selectStrategyFactory) {
        this(nThreads, threadFactory, 0, selectStrategyFactory);
    }
    @Deprecated
    public CoolEpollEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce) {
        this(nThreads, threadFactory, maxEventsAtOnce, DefaultSelectStrategyFactory.INSTANCE);
    }

    @Deprecated
    public CoolEpollEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce,
                                   SelectStrategyFactory selectStrategyFactory) {
        super(nThreads, threadFactory, maxEventsAtOnce, selectStrategyFactory, RejectedExecutionHandlers.reject());
        Epoll.ensureAvailability();
    }

    public CoolEpollEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce,
                                   SelectStrategyFactory selectStrategyFactory,
                                   RejectedExecutionHandler rejectedExecutionHandler) {
        super(nThreads, threadFactory, maxEventsAtOnce, selectStrategyFactory, rejectedExecutionHandler);
        Epoll.ensureAvailability();
    }

    /**
     * Sets the percentage of the desired amount of time spent for I/O in the child event loops.  The default value is
     * {@code 50}, which means the event loop will try to spend the same amount of time for I/O as for non-I/O tasks.
     */
    public void setIoRatio(int ioRatio) {
       /* for (EventExecutor e: children()) {
            ((EpollEventLoop) e).setIoRatio(ioRatio);
        } */
    }

    @Override
    public EventLoop next() {
        int record = channelMaps.get(0).size();
        EventLoop recordLoop = eventLoops.get(0);

        for (int i = 0; i < eventLoops.size(); i++) {
            EventLoop loop = eventLoops.get(i);
            int size = channelMaps.get(i).size();
            if (size < record) {
                record = size;
                recordLoop = loop;
            }
        }

        return recordLoop;
    }

    @Override
    protected EventLoop newChild(Executor executor, Object... args) throws Exception {
        EpollEventLoop l = new EpollEventLoop(this, executor, (Integer) args[0],
                ((SelectStrategyFactory) args[1]).newSelectStrategy(), (RejectedExecutionHandler) args[2]);
        IntObjectMap m = (IntObjectMap) channelsField.get(l);
        channelMaps.add(m);
        eventLoops.add(l);
        return l;
    }
}

@ninja- there is no need to do it in such a way. Just implement your own EventExecutorChooserFactory that keeps track of registered Channels and based on this choose the EventLoop.

We don't want to rely upon an implementation detail of EpollEventLoop, nor expose this detail. The other EventLoop implementations don't have a map, and we may eventually remove this map from EpollEventLoop in the future.

Exactly... Let me close this as I think it should be possible to implement something just on top of EventExecutorChooserFactory if needed.

@normanmaurer  just fyi I tested the above code and it works perfectly. I just needed to change the lists to lazy-initialize as it's called inside constructor.

Not that a better balancing scheme wouldn't be useful in some situations but I don't think it needs to be baked into the core if it can be accomplished via extensibility points.

This worked really well for us
public class FairEventExecutorChooserFactory implements EventExecutorChooserFactory {

    public enum Strategy {
        LEAST_CHANNELS,
        LEAST_TASKS,
        DEFAULT
    }

    private final Strategy strategy;
    private final Logger LOGGER = LoggerFactory.getLogger(FairEventExecutorChooserFactory.class);

    public FairEventExecutorChooserFactory(String strategy) {
        this.strategy = Strategy.valueOf(Preconditions.checkNotNull(strategy).toUpperCase());
        LOGGER.info("Using EventExecutorChooser strategy - " + this.strategy);
    }

    @Override
    public EventExecutorChooser newChooser(EventExecutor[] executors) {
        switch (strategy) {
            case LEAST_TASKS:
                return new FairEventExecutorChooser(executors, SingleThreadEventLoop::pendingTasks);
            case LEAST_CHANNELS:
                return new FairEventExecutorChooser(executors, SingleThreadEventLoop::registeredChannels);
            case DEFAULT:
            default:
                return DefaultEventExecutorChooserFactory.INSTANCE.newChooser(executors);
        }
    }

    public static class FairEventExecutorChooser implements EventExecutorChooser {
        private final SingleThreadEventLoop[] executors;
        private final Function<SingleThreadEventLoop, Integer> comparableValue;
        private final AtomicInteger index = new AtomicInteger();

        public FairEventExecutorChooser(final EventExecutor[] eventExecutors, Function<SingleThreadEventLoop, Integer> comparableValue) {
            this.comparableValue = comparableValue;
            this.executors = new SingleThreadEventLoop[eventExecutors.length];
            for (int i = 0; i < eventExecutors.length; i++) {
                if (!(eventExecutors[i] instanceof SingleThreadEventLoop)) {
                    throw new IllegalArgumentException("FairEventExecutorChooser only works with SingleThreadEventLoop");
                }
                executors[i] = (SingleThreadEventLoop) eventExecutors[i];
            }
        }

        @Override
        public EventExecutor next() {
            SingleThreadEventLoop shortestExecutor = null;
            var invocation = index.getAndIncrement();
            for (int i = 0; i < executors.length; i++) {
                // to make sure we don't bias towards executors towards the end of the array we
                // always start from a different point of the array
                var executorIndex = (invocation + i) % executors.length;
                var possibleShortest = executors[executorIndex];
                if (shortestExecutor == null) {
                    shortestExecutor = possibleShortest;
                } else {
                    if (comparableValue.apply(shortestExecutor) > comparableValue.apply(possibleShortest)) {
                        shortestExecutor = possibleShortest;
                    }
                }
            }
            if (shortestExecutor == null) {
                throw new IllegalStateException("Unable to select a shortest executor. Shouldn't be possible");
            }
            return shortestExecutor;
        }
    }
}


unable to get fastlane supply init to work

New Issue Checklist

[X ] Updated fastlane to the latest version
[X] I have read the Contribution Guidelines

Issue Description
Complete output when running fastlane, including the stack trace and command used
[INSERT OUTPUT HERE]
%fastlane supply init --verbose -j /Users/vamsee/Development/OnKore/onkore-android/fastlane/Google-Play-Android-Developer-8b96c0a10848.json -p com.onkore.BachelorFantasy
[15:48:54]: Seems like launching fastlane takes a while
[15:48:54]: fastlane detected a Gemfile in this directory
[15:48:54]: however it seems like you don't use `bundle exec`
[15:48:54]: to launch fastlane faster, please use
[15:48:54]:
[15:48:54]: $ bundle exec fastlane supply init --verbose -j /Users/vamsee/Development/OnKore/onkore-android/fastlane/Google-Play-Android-Developer-8b96c0a10848.json -p com.onkore.BachelorFantasy
[15:48:54]: For more information, check out https://guides.cocoapods.org/using/a-gemfile.html
DEBUG [2017-05-03 15:48:56.30]: Fetching a new access token from Google...

Looking for related GitHub issues on fastlane/fastlane...
Search query: Unauthorized

Running with bundle gives the same failure but does not print the message about 'Fetching a new access token ...'.  Fastlane working well for our iOS apps. Trying to use it for our our upcoming Android apps.
Also --capture_output does not work  (says invalid_option). Neither does --verbose (no verbose output printed).
Setup the json key file using these instructions. https://github.com/fastlane/fastlane/tree/master/supply#setup
Environment
✅ fastlane environment ✅
Stack

Key
Value

OS
10.12.4

Ruby
2.3.1

Bundler?
false

Git
git version 2.10.0

Installation Source
~/Software/ruby/bin/fastlane

Host
Mac OS X 10.12.4 (16E195)

Ruby Lib Dir
/usr/local/Cellar/ruby/2.3.1/lib

OpenSSL Version
OpenSSL 1.0.2h  3 May 2016

Is contained
false

Is homebrew
false

Is installed via Fabric.app
false

Xcode Path
/Applications/Xcode.app/Contents/Developer/

Xcode Version
8.3.2

System Locale

Variable
Value

LANG
en_US.UTF-8
✅

LC_ALL

LANGUAGE

fastlane gems

Gem
Version
Update-Status

fastlane
2.28.8
✅ Up-To-Date

Loaded gems

Gem
Version

did_you_mean
1.0.2

slack-notifier
1.5.1

claide
1.0.1

colored2
3.1.2

nanaimo
0.2.3

xcodeproj
1.4.4

terminal-notifier
1.7.1

multipart-post
2.0.0

word_wrap
1.0.0

tty-screen
0.5.0

babosa
1.0.2

colored
1.2

highline
1.7.8

commander-fastlane
4.4.4

http-cookie
1.0.3

faraday-cookie_jar
0.0.6

mini_magick
4.5.1

security
0.1.3

xcpretty-travis-formatter
0.0.4

json
2.1.0

io-console
0.4.6

excon
0.55.0

rubyzip
1.2.1

plist
3.3.0

faraday
0.12.1

faraday_middleware
<IP_ADDRESS>

unf
0.1.4

domain_name
0.5.20170404

jwt
1.5.6

memoist
0.15.0

os
0.9.6

signet
0.7.3

googleauth
0.5.1

uber
0.0.15

representable
2.3.0

retriable
2.1.0

hurley
0.2

google-api-client
0.9.28

fastimage
2.1.0

bundler
1.14.6

terminal-table
1.7.3

unicode-display_width
1.1.3

fastlane-plugin-upload_symbols_to_new_relic
0.1.1

fastlane-plugin-appicon
0.6.0

generated on: 2017-05-03

The error message indicates that your access token doesn't have the permission to access your apps on Google play. Could you revoke this one, and try to create a new one to ensure everything's valid?

Hi, I missed steps 12-14 in the setup instructions. That was the problem. We can close this.


Prometheus support

Hello, it is great to see metrics in prometheus, is it possible to do this?
jaggr is used to plot realtime graph, so I think it should possible to convert it to prometheus format.
Any thoughts?

It would be possible to create a sub command that consumes vegeta attack results (i.e. like vegeta report or vegeta encode) that is a prometheus exporter.

Proposal
What do you think about creating a new command category called "monitor" aside report, encode, dump?
Monitor
So for monitoring with Prometheus one could do something like
GET http://www.google.com" | vegeta attack -duration=5m | vegeta monitor -type='prometheus[8880,<IP_ADDRESS>]'

"-type" may be omitted. defaults to 'prometheus'
"8880" is the Prometheus exporter http port (may be omitted and defaults to 8880)
"<IP_ADDRESS>" is the bind host for the listener (may be omitted and defaults to <IP_ADDRESS>)

After launching the tests, just point Prometheus scraper to http://host:8880/metrics or do something like
curl http://host:8880/metrics

Prometheus Metrics

request_seconds_count{method, path, status}
request_seconds_sum{method, path, status}

What do you think?

That’s a good idea.
Sent via Superhuman iOS<EMAIL_ADDRESS>)
On Tue, Jun 30 2020 at 1:46 AM, Flavio Stutz <<EMAIL_ADDRESS>> wrote:

Proposal
What do you think about creating a new command category called "monitor"
aside report, encode, dump?
Monitor
So for monitoring with Prometheus one could do something like
GET http://www.google.com" | vegeta attack -duration=5m | vegeta monitor
-type='prometheus[8880,<IP_ADDRESS>]'

"-type" may be omitted. defaults to 'prometheus'
"8880" is the Prometheus exporter http port (may be omitted and defaults
to 8880)
"<IP_ADDRESS>" is the bind host for the listener (may be omitted and defaults
to <IP_ADDRESS>)

After launching the tests, just point Prometheus scraper to http://host:8880/metrics
or do something like
curl http://host:8880/metrics
Prometheus Metrics

request_seconds_count{method, path, status}
request_seconds_sum{method, path, status}

What do you think?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
https://github.com/tsenart/vegeta/issues/477#issuecomment-651426528 ) , or
unsubscribe (
https://github.com/notifications/unsubscribe-auth/AAAQPDZZWGP2IH7P6UECLR3RZERU5ANCNFSM4KVEPIMA
).

Alternatively we’d instrument attack directly.
Sent via Superhuman iOS<EMAIL_ADDRESS>)
On Tue, Jun 30 2020 at 8:31 AM, <<EMAIL_ADDRESS>> wrote:

That’s a good idea.
Sent via Superhuman iOS<EMAIL_ADDRESS>)
On Tue, Jun 30 2020 at 1:46 AM, Flavio Stutz <<EMAIL_ADDRESS>>
wrote:

Proposal
What do you think about creating a new command category called "monitor"
aside report, encode, dump?
Monitor
So for monitoring with Prometheus one could do something like
GET http://www.google.com" | vegeta attack -duration=5m | vegeta monitor
-type='prometheus[8880,<IP_ADDRESS>]'

"-type" may be omitted. defaults to 'prometheus'
"8880" is the Prometheus exporter http port (may be omitted and defaults
to 8880)
"<IP_ADDRESS>" is the bind host for the listener (may be omitted and defaults
to <IP_ADDRESS>)

After launching the tests, just point Prometheus scraper to http://host:8880/metrics
or do something like
curl http://host:8880/metrics
Prometheus Metrics

request_seconds_count{method, path, status}
request_seconds_sum{method, path, status}

What do you think?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
https://github.com/tsenart/vegeta/issues/477#issuecomment-651426528 ) , or
unsubscribe (
https://github.com/notifications/unsubscribe-auth/AAAQPDZZWGP2IH7P6UECLR3RZERU5ANCNFSM4KVEPIMA
).

Much better!
Instrumenting “attack” is great because it avoids parsing stdin contents and performance will be better for large scale distributed deployments.
Sent from my iPhone

On 30 Jun 2020, at 03:32, Tomás Senart<EMAIL_ADDRESS>wrote:

Alternatively we’d instrument attack directly.
Sent via Superhuman iOS<EMAIL_ADDRESS>)
On Tue, Jun 30 2020 at 8:31 AM, <<EMAIL_ADDRESS>> wrote:

That’s a good idea.
Sent via Superhuman iOS<EMAIL_ADDRESS>)
On Tue, Jun 30 2020 at 1:46 AM, Flavio Stutz <<EMAIL_ADDRESS>>
wrote:

Proposal
What do you think about creating a new command category called "monitor"
aside report, encode, dump?
Monitor
So for monitoring with Prometheus one could do something like
GET http://www.google.com" | vegeta attack -duration=5m | vegeta monitor
-type='prometheus[8880,<IP_ADDRESS>]'

"-type" may be omitted. defaults to 'prometheus'
"8880" is the Prometheus exporter http port (may be omitted and defaults
to 8880)
"<IP_ADDRESS>" is the bind host for the listener (may be omitted and defaults
to <IP_ADDRESS>)

After launching the tests, just point Prometheus scraper to http://host:8880/metrics
or do something like
curl http://host:8880/metrics
Prometheus Metrics

request_seconds_count{method, path, status}
request_seconds_sum{method, path, status}

What do you think?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
https://github.com/tsenart/vegeta/issues/477#issuecomment-651426528 ) , or
unsubscribe (
https://github.com/notifications/unsubscribe-auth/AAAQPDZZWGP2IH7P6UECLR3RZERU5ANCNFSM4KVEPIMA
).

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

@flaviostutz: Contributions welcome! :)

Sure! :)
On Wed, Jul 1, 2020 at 6:12 AM Tomás Senart<EMAIL_ADDRESS>wrote:

@flaviostutz https://github.com/flaviostutz: Contributions welcome! :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tsenart/vegeta/issues/477#issuecomment-652297362, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AB3N4XFQJ6DQGRNBYCMXLD3RZL4WXANCNFSM4KVEPIMA
.

Do you have news about prom metrics? I am really looking forward!

I implemented it and a PR is being analyzed. Soon we will have it! ;)

Is there any update on the status of this PR? This feature would be really useful, thanks!

Is there any update on the status of this PR? This is a very useful feature in our DevOps process.

Hi!!
Can you please add a command example on the docs? I've been trying to make it work but simply cant.


Unit testing local_auth package fails.

Steps to Reproduce
Writing a unit test on the local_auth package causes a failure:
package:flutter/src/services/platform_channel.dart 157:7  MethodChannel._invokeMethod

MissingPluginException(No implementation found for method getAvailableBiometrics on channel plugins.flutter.io/local_auth)

Sample test:
  test('Check if user is authenticated via FaceId', () async {
    final bioMetricServices = MockLocalAuth();
    when(bioMetricServices.getAvailableBiometrics())
        .thenAnswer((_) async => Future.value([BiometricType.face]));

    when(bioMetricServices.authenticateWithBiometrics(localizedReason: "hh",stickyAuth: true,useErrorDialogs: true,sensitiveTransaction: true))
    .thenAnswer((realInvocation) => Future.value(true));

    var flag = await BiometricService.authenticate();
    expect(flag, true);
  });

class MockLocalAuth extends Mock implements LocalAuthentication {}

Is there any any additional steps that we need to perform?

@pkhivesara
your code sample doesn't seem reproducible

pubspec.yaml
name: thirty_jan
description: A new Flutter project.
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  local_auth: ^0.6.3+4

dev_dependencies:
  flutter_test:
    sdk: flutter
  mockito: ^4.1.4

flutter:
  uses-material-design: true

code sample
import 'package:flutter_test/flutter_test.dart';
import 'package:local_auth/local_auth.dart';
import 'package:mockito/mockito.dart';

class MockLocalAuth extends Mock implements LocalAuthentication {}

void main() {
  test('Check if user is authenticated via FaceId', () async {
    final bioMetricServices = MockLocalAuth();
    when(bioMetricServices.getAvailableBiometrics())
        .thenAnswer((_) async => Future.value([BiometricType.face]));

    when(bioMetricServices.authenticateWithBiometrics(
            localizedReason: "hh",
            stickyAuth: true,
            useErrorDialogs: true,
            sensitiveTransaction: true))
        .thenAnswer((realInvocation) => Future.value(true));

    var flag = await BiometricService.authenticate();
    // !! error: `Undefined name 'BiometricService'.
    // !! Try correcting the name to one that is defined, or defining the name.`
    // !! expect(flag, true);
  });
}

can you specify the import for BiometricService and provide you flutter doctor -v and pubspec.yaml

@pkhivesara
your code sample doesn't seem reproducible

pubspec.yaml
name: thirty_jan
description: A new Flutter project.
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  local_auth: ^0.6.3+4

dev_dependencies:
  flutter_test:
    sdk: flutter
  mockito: ^4.1.4

flutter:
  uses-material-design: true

code sample
import 'package:flutter_test/flutter_test.dart';
import 'package:local_auth/local_auth.dart';
import 'package:mockito/mockito.dart';

class MockLocalAuth extends Mock implements LocalAuthentication {}

void main() {
  test('Check if user is authenticated via FaceId', () async {
    final bioMetricServices = MockLocalAuth();
    when(bioMetricServices.getAvailableBiometrics())
        .thenAnswer((_) async => Future.value([BiometricType.face]));

    when(bioMetricServices.authenticateWithBiometrics(
            localizedReason: "hh",
            stickyAuth: true,
            useErrorDialogs: true,
            sensitiveTransaction: true))
        .thenAnswer((realInvocation) => Future.value(true));

    var flag = await BiometricService.authenticate();
    // !! error: `Undefined name 'BiometricService'.
    // !! Try correcting the name to one that is defined, or defining the name.`
    // !! expect(flag, true);
  });
}

can you specify the import for BiometricService and provide you flutter doctor -v and pubspec.yaml

@iapicca The Biometric class is a custom class which essentially authenticates the user.
 static Future<bool> authenticate() async {
    bool authenticated;
    String localizedReason = '';
    List<BiometricType> availableBiometrics = await _getAvailableBiometrics();
    if (availableBiometrics.contains(BiometricType.face)) {
      // Face ID.
      localizedReason = 'Scan your face to authenticate.';
    } else if (availableBiometrics.contains(BiometricType.fingerprint)) {
      // Touch ID.
      localizedReason = 'Scan your fingerprint to authenticate.';
    }

    try {
      authenticated = await LocalAuthentication().authenticateWithBiometrics(
        localizedReason: localizedReason,
        stickyAuth: true,
        //useErrorDialogs: true,
        //sensitiveTransaction: true,
      );
      print('Authentication Successful, Return: $authenticated');
    } on PlatformException catch (e) {
      authenticated = false;
      print(e);
    }
    return authenticated;
  }

pubspec.yaml
dependencies:
flutter:
  sdk: flutter
google_fonts:
shared_preferences: ^0.5.12+4
local_auth: ^0.6.3+4
flutter_switch: ^0.2.0
flutter_slidable:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0

dev_dependencies:
flutter_test:
  sdk: flutter
mockito: ^4.1.4
test:

[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.4 19E287 darwin-x64, locale en-US)
  • Flutter version 1.22.5 at /Users/xxx/flutter/flutter
  • Framework revision<PHONE_NUMBER> (7 weeks ago), 2020-12-10 11:54:40 -0800
  • Engine revision ae90085a84
  • Dart version 2.10.4

⣻Unable to find any JVMs matching version "1.8".                                                                                [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
  • Android SDK at /Users/xxx/Library/Android/sdk
  • Platform android-30, build-tools 29.0.3
  • Java binary at: /usr/bin/java
  • Java version OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
  ✗ Android license status unknown.
    Run `flutter doctor --android-licenses` to accept the SDK licenses.
    See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
  • Xcode at /Applications/Xcode.app/Contents/Developer
  • Xcode 12.0.1, Build version 12A7300
  • CocoaPods version 1.9.1

[!] Android Studio (version 4.1)
  • Android Studio at /Applications/Android Studio.app/Contents
  ✗ Flutter plugin not installed; this adds Flutter specific functionality.
  ✗ Dart plugin not installed; this adds Dart specific functionality.
  • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[!] Android Studio
  • Android Studio at /Users/xxx/Library/Android/Android/Contents
  ✗ Flutter plugin not installed; this adds Flutter specific functionality.
  ✗ Dart plugin not installed; this adds Dart specific functionality.
  ✗ Android Studio not found at /Users/xxx/Library/Android/Android/Contents
  • Try updating or re-installing Android Studio.

! Doctor found issues in 3 categories.

The doctor has been complaining every since upgrading Flutter but I am able to compile the app.

@iapicca The Biometric class is a custom class which essentially authenticates the user.
 static Future<bool> authenticate() async {
    bool authenticated;
    String localizedReason = '';
    List<BiometricType> availableBiometrics = await _getAvailableBiometrics();
    if (availableBiometrics.contains(BiometricType.face)) {
      // Face ID.
      localizedReason = 'Scan your face to authenticate.';
    } else if (availableBiometrics.contains(BiometricType.fingerprint)) {
      // Touch ID.
      localizedReason = 'Scan your fingerprint to authenticate.';
    }

    try {
      authenticated = await LocalAuthentication().authenticateWithBiometrics(
        localizedReason: localizedReason,
        stickyAuth: true,
        //useErrorDialogs: true,
        //sensitiveTransaction: true,
      );
      print('Authentication Successful, Return: $authenticated');
    } on PlatformException catch (e) {
      authenticated = false;
      print(e);
    }
    return authenticated;
  }

pubspec.yaml
dependencies:
flutter:
  sdk: flutter
google_fonts:
shared_preferences: ^0.5.12+4
local_auth: ^0.6.3+4
flutter_switch: ^0.2.0
flutter_slidable:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0

dev_dependencies:
flutter_test:
  sdk: flutter
mockito: ^4.1.4
test:

[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.4 19E287 darwin-x64, locale en-US)
  • Flutter version 1.22.5 at /Users/xxx/flutter/flutter
  • Framework revision<PHONE_NUMBER> (7 weeks ago), 2020-12-10 11:54:40 -0800
  • Engine revision ae90085a84
  • Dart version 2.10.4

⣻Unable to find any JVMs matching version "1.8".                                                                                [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
  • Android SDK at /Users/xxx/Library/Android/sdk
  • Platform android-30, build-tools 29.0.3
  • Java binary at: /usr/bin/java
  • Java version OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
  ✗ Android license status unknown.
    Run `flutter doctor --android-licenses` to accept the SDK licenses.
    See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
  • Xcode at /Applications/Xcode.app/Contents/Developer
  • Xcode 12.0.1, Build version 12A7300
  • CocoaPods version 1.9.1

[!] Android Studio (version 4.1)
  • Android Studio at /Applications/Android Studio.app/Contents
  ✗ Flutter plugin not installed; this adds Flutter specific functionality.
  ✗ Dart plugin not installed; this adds Dart specific functionality.
  • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[!] Android Studio
  • Android Studio at /Users/xxx/Library/Android/Android/Contents
  ✗ Flutter plugin not installed; this adds Flutter specific functionality.
  ✗ Dart plugin not installed; this adds Dart specific functionality.
  ✗ Android Studio not found at /Users/xxx/Library/Android/Android/Contents
  • Try updating or re-installing Android Studio.

! Doctor found issues in 3 categories.

The doctor has been complaining every since upgrading Flutter but I am able to compile the app.

Your class is using the actual plugin, not a mock; plugins aren't registered in unit tests, do that won't work. You should design your class to use a mock object in place of the plugin.

Your class is using the actual plugin, not a mock; plugins aren't registered in unit tests, do that won't work. You should design your class to use a mock object in place of the plugin.

@stuartmorgan I am mocking the plugin.
class MockLocalAuth extends Mock implements LocalAuthentication {}
Can you please clarify what is the issue?

@stuartmorgan I am mocking the plugin.
class MockLocalAuth extends Mock implements LocalAuthentication {}
Can you please clarify what is the issue?

Your class is using the actual plugin, not a mock; plugins aren't registered in unit tests, do that won't work. You should design your class to use a mock object in place of the plugin during tests.

Not sure why the issue is closed?

Your class is using the actual plugin, not a mock; plugins aren't registered in unit tests, do that won't work. You should design your class to use a mock object in place of the plugin during tests.

Not sure why the issue is closed?

Not sure why the issue is closed?

@pkhivesara
because you are not mocking the class BiometricService
the issue is with your code, not with flutter or the first party plugin
if you need assistance with your code please follow the link I want help writing my application in the new issue menu

Not sure why the issue is closed?

@pkhivesara
because you are not mocking the class BiometricService
the issue is with your code, not with flutter or the first party plugin
if you need assistance with your code please follow the link I want help writing my application in the new issue menu

@stuartmorgan I am mocking the plugin.
class MockLocalAuth extends Mock implements LocalAuthentication {}
Can you please clarify what is the issue?

You have declared a class that could be used as a mock. But you aren't using it in the code you posted:
authenticated = await LocalAuthentication().authenticateWithBiometrics

@stuartmorgan I am mocking the plugin.
class MockLocalAuth extends Mock implements LocalAuthentication {}
Can you please clarify what is the issue?

You have declared a class that could be used as a mock. But you aren't using it in the code you posted:
authenticated = await LocalAuthentication().authenticateWithBiometrics


Node densityn ignore iterations

Type of change

[X] Refactor
[ ] New feature
[ ] Bug fix
[ ] Optimization
[ ] Documentation Update

Description
This change will allow us to match uuids no matter there jobIterations. This is important for node-density because the number of iterations is calculated based on how many nodes are currently on the cluster and this number can fluctuate.
Related Tickets & Documents

Related Issue #
Closes #

Checklist before requesting a review

[X] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.

Testing
The old way of running produces less results than the new flag
orion cmd --config examples/trt-external-payload-node-density.yaml --lookback 5d  --hunter-analyze
,uuid,timestamp,podReadyLatency_P99,apiserverCPU_avg,ovnCPU_avg,etcdCPU_avg,kubelet_avg,buildUrl
0,0d472812-58c4-4d17-9241-595e54e789a1,2024-08-04T05:20:49.559886961Z,3000,8.346889860243925,2.4993164237465395,8.512982301910718,24.588333408037823,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1819941002970927104
1,73a5ddf9-1ad9-463a-866c-0bb7ee33fa2d,2024-08-06T09:53:53.960806551Z,2000,9.917386528040515,2.9165261534623683,8.232103824615479,23.14861095448335,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820732996609642496
2,aba6b499-1e6b-455b-94bf-f1f360387c25,2024-08-06T15:42:13.289451287Z,3000,8.68606343644766,2.8989181143536698,7.900732731377637,24.709259218639797,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820818543520780288
3,707cf66f-c7de-473d-9155-a35fb81b6b44,2024-08-06T19:51:56.020648472Z,3000,9.36453001043119,2.842460772863333,8.242996867332193,24.676388904452324,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820883258565464064
4,6d99bef0-c342-4ccb-9d04-2ef7a54c479f,2024-08-07T01:54:37.370508933Z,2000,8.907801432446286,2.562429538004141,7.662414407150613,23.09930546581745,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820972948597510144
5,e212ce7c-ddf2-4967-89d4-52a637f092ff,2024-08-07T14:43:08.617067442Z,3000,8.03217322994955,2.490557001078843,8.363801335295042,25.229444408416747,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1821167776920768512

orion cmd --config examples/trt-external-payload-node-density.yaml --lookback 5d  --hunter-analyze --node-count True
,uuid,timestamp,podReadyLatency_P99,apiserverCPU_avg,ovnCPU_avg,etcdCPU_avg,kubelet_avg,buildUrl
0,a65533b2-b96b-4975-a683-5c8c41317db9,2024-08-02T22:44:13.115031954Z,3000,9.05506926860005,2.6793121076059183,7.832702014181349,24.659876682140208,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1819476387262631936
1,3bf39005-d8b3-4167-a003-63c258582527,2024-08-03T03:40:00.061127136Z,2000,9.333829958437542,3.0431592265737812,8.905316504221114,25.346031677155267,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1819552804872654848
2,ca470b99-684f-4804-8040-245469d36a0a,2024-08-03T12:06:39.550167246Z,2000,10.04589718492103,2.938977014894182,8.667146306107009,22.56984125432514,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1819681099010281472
3,0d472812-58c4-4d17-9241-595e54e789a1,2024-08-04T05:20:49.559886961Z,3000,8.346889860243925,2.4993164237465395,8.512982301910718,24.588333408037823,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1819941002970927104
4,e9b93114-6cc1-412d-b628-c046e7a1d4ca,2024-08-05T08:31:46.013914888Z,3000,8.460509004894508,2.836086990957304,7.733555127349165,22.969444140791893,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820348477922611200
5,22d07632-578d-46ac-82a2-04b2ece66283,2024-08-05T22:20:36.740563901Z,2000,7.813337978324853,2.595532922870286,8.23953664302826,24.6055556624024,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820557122354548736
6,c2cf30e0-ab8c-4714-b78a-1645cdfa411e,2024-08-06T05:35:24.554795997Z,2000,9.24912150722273,2.582041348531111,8.039307292964724,24.625925969194483,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820667850361147392
7,73a5ddf9-1ad9-463a-866c-0bb7ee33fa2d,2024-08-06T09:53:53.960806551Z,2000,9.917386528040515,2.9165261534623683,8.232103824615479,23.14861095448335,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820732996609642496
8,aba6b499-1e6b-455b-94bf-f1f360387c25,2024-08-06T15:42:13.289451287Z,3000,8.68606343644766,2.8989181143536698,7.900732731377637,24.709259218639797,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820818543520780288
9,707cf66f-c7de-473d-9155-a35fb81b6b44,2024-08-06T19:51:56.020648472Z,3000,9.36453001043119,2.842460772863333,8.242996867332193,24.676388904452324,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820883258565464064
10,6d99bef0-c342-4ccb-9d04-2ef7a54c479f,2024-08-07T01:54:37.370508933Z,2000,8.907801432446286,2.562429538004141,7.662414407150613,23.09930546581745,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1820972948597510144
11,2cbbe23a-bfca-4b1c-831f-1402fa443eb5,2024-08-07T06:29:02.30197508Z,2000,8.41378196755131,2.6346652609732533,8.286598180915103,23.116049263212417,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1821044084718964736
12,e212ce7c-ddf2-4967-89d4-52a637f092ff,2024-08-07T14:43:08.617067442Z,3000,8.03217322994955,2.490557001078843,8.363801335295042,25.229444408416747,https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-payload-control-plane-6nodes/1821167776920768512

ah! Nice! yeah this is something at @shashank-boyapally and I have spoken about in the past given number of pods can change based on what is installed, so iterations might (very likely) drift a bit. As long as the node count is the same, we should be somewhere in the ballpark!

@vishnuchalla can you speak to the failures here? not familiar with what/why this is broken?

@vishnuchalla can you speak to the failures here? not familiar with what/why this is broken?

We will need to get the ES secret updated and re-trigger the tests. Will keep you posted on it.

ah! Nice! yeah this is something at @shashank-boyapally and I have spoken about in the past given number of pods can change based on what is installed, so iterations might (very likely) drift a bit. As long as the node count is the same, we should be somewhere in the ballpark!

This might take use somewhere close to the solution, but we will only get exact apples-to-apples runs once we start filtering based on iterations that are calculated in the runtime. In order to achieve that I remember we discussing to populate iterations count in the index.sh script previously.

ah! Nice! yeah this is something at @shashank-boyapally and I have spoken about in the past given number of pods can change based on what is installed, so iterations might (very likely) drift a bit. As long as the node count is the same, we should be somewhere in the ballpark!

This might take use somewhere close to the solution, but we will only get exact apples-to-apples runs once we start filtering based on iterations that are being calculated in the runtime. In order to achieve that I remember we discussing to populate iterations count in the index.sh script previously.

Well, even populating in the perf_scale_ci index won't address this problem.
For example, there could be situations where we are +/- 1 pod off (even with the same version,platform,etc), so the iteration calculation for node-density workloads would differ slightly.  This change would allow us to just say, match runs with the same node-count... Correct me if I am off here @paigerube14

ah! Nice! yeah this is something at @shashank-boyapally and I have spoken about in the past given number of pods can change based on what is installed, so iterations might (very likely) drift a bit. As long as the node count is the same, we should be somewhere in the ballpark!

This might take use somewhere close to the solution, but we will only get exact apples-to-apples runs once we start filtering based on iterations that are being calculated in the runtime. In order to achieve that I remember we discussing to populate iterations count in the index.sh script previously.

Well, even populating in the perf_scale_ci index won't address this problem.
For example, there could be situations where we are +/- 1 pod off (even with the same version,platform,etc), so the iteration calculation for node-density workloads would differ slightly. This change would allow us to just say, match runs with the same node-count... Correct me if I am off here @paigerube14

If our idea was to filter out runs based on number of nodes, then I am good with it. My only question was though we have same number of nodes, there can be difference in number of iterations being calculated in the runtime (.i.e especially for node-density runs). So can we consider runs with same number of nodes to be apples to apples comparison even if they are executed with different number of iterations? OR do we want to take code changes to match iteration in a follow up PR?
cc: @afcollins @dry923 @rsevilla87

@vishnuchalla can you speak to the failures here? not familiar with what/why this is broken?

We will need to get the ES secret updated and re-trigger the tests. Will keep you posted on it.

After conducting a set of experiments, noticed that secrets do not get propagated into forks and aren't available during pull requests. They only work against the main repo, for example. So I am going to change the CI tests workflow to on push. Still we will be able to detect failures in a PR but only after its merge into main, if that sounds good.

lgtm


safe local doesn't seem to work

I've installed safe 0.7.0 and it seems safe local doesn't seem to work:
$ safe local
!! Please specify either --memory or --file <path>
$ safe local --memory
!! Unable to generate a new root token: failed to generate new root token
shutting down the Vault...
$ safe local --file test
!! Unable to generate a new root token: failed to generate new root token
shutting down the Vault...
$

The .saferc does seem to be updated. My vault instance seems to be named hardened-donjon. Not sure what I'm doing wrong 😄

$ safe --version
safe v0.7.0
$ DEBUG=1 safe local --memory
Request:
POST /v1/sys/init HTTP/1.1
Host: <IP_ADDRESS>:8203
X-Vault-Token:

{"secret_shares":1,"secret_threshold":1}
----------------
Response:
HTTP/1.1 200 OK
Content-Length: 193
Cache-Control: no-store
Content-Type: application/json
Date: Thu, 26 Apr 2018 21:45:03 GMT

{"keys":["50d1f61c34cad06a3b38faa34d3e83cef462ef922d068e08d559add3f4ade7b1"],"keys_base64":["UNH2HDTK0Go7OPqjTT6DzvRi75ItBo4I1Vmt0/St57E="],"root_token":"8f260ef4-cf5d-42b3-f5fd-f29ddfcb55a5"}

----------------
Request:
PUT /v1/sys/unseal HTTP/1.1
Host: <IP_ADDRESS>:8203
X-Vault-Token:

{"reset":true}
----------------
Response:
HTTP/1.1 200 OK
Content-Length: 70
Cache-Control: no-store
Content-Type: application/json
Date: Thu, 26 Apr 2018 21:45:03 GMT

{"sealed":true,"t":1,"n":1,"progress":0,"nonce":"","version":"0.8.1"}

----------------
Request:
PUT /v1/sys/unseal HTTP/1.1
Host: <IP_ADDRESS>:8203
X-Vault-Token:

{"key":"UNH2HDTK0Go7OPqjTT6DzvRi75ItBo4I1Vmt0/St57E="}
----------------
Response:
HTTP/1.1 200 OK
Content-Length: 163
Cache-Control: no-store
Content-Type: application/json
Date: Thu, 26 Apr 2018 21:45:03 GMT

{"sealed":false,"t":1,"n":1,"progress":0,"nonce":"","version":"0.8.1","cluster_name":"vault-cluster-de6f21e4","cluster_id":"6bfb0f3c-cf3d-4793-3781-214c645096b0"}

----------------
Request:
DELETE /v1/sys/generate-root/attempt HTTP/1.1
Host: <IP_ADDRESS>:8203
X-Vault-Token:

----------------
Response:
HTTP/1.1 204 No Content
Cache-Control: no-store
Content-Type: application/json
Date: Thu, 26 Apr 2018 21:45:03 GMT

----------------
Request:
PUT /v1/sys/generate-root/attempt HTTP/1.1
Host: <IP_ADDRESS>:8203
X-Vault-Token:

{"otp":"djuV3iCacZ496NN9bg1PyA=="}
----------------
Response:
HTTP/1.1 200 OK
Content-Length: 152
Cache-Control: no-store
Content-Type: application/json
Date: Thu, 26 Apr 2018 21:45:03 GMT

{"nonce":"1501e428-dda0-4cea-70cd-03d479a2e4a7","started":true,"progress":0,"required":1,"complete":false,"encoded_root_token":"","pgp_fingerprint":""}

----------------
Request:
PUT /v1/sys/generate-root/update HTTP/1.1
Host: <IP_ADDRESS>:8203
X-Vault-Token:

{"key":"UNH2HDTK0Go7OPqjTT6DzvRi75ItBo4I1Vmt0/St57E=","nonce":"1501e428-dda0-4cea-70cd-03d479a2e4a7"}
----------------
Response:
HTTP/1.1 200 OK
Content-Length: 175
Cache-Control: no-store
Content-Type: application/json
Date: Thu, 26 Apr 2018 21:45:03 GMT

{"nonce":"1501e428-dda0-4cea-70cd-03d479a2e4a7","started":true,"progress":1,"required":1,"complete":true,"encoded_root_token":"2aYowrhtYRGFg2wgvZnBoQ==","pgp_fingerprint":""}

----------------
!! Unable to generate a new root token: failed to generate new root token
shutting down the Vault...
$

Interesting, what version of Vault is this?  The 200 OK response to the final PUT /v1/sys/generate-root/update conversation doesn't include encoded_token (which is what safe local is looking for), but it does include encoded_root_token.  Locally, I get both encoded_token and encoded_root_token.  I'm running Vault 0.9.0.

$ vault version
Vault v0.8.1 ('8d76a41854608c547a233f2e6292ae5355154695')
$

I guess it's time to upgrade my client? :)

I'll have to test safe local with an 0.8.x client.  To confirm though, it does work if you run Vault 0.9.6?

Yep, 0.9.6 is absolutely fine.


Polynomial arithmetic in DFT/FFT/NTT and coefficient representations

For discussion:
naive O(n^2) DFT, in-place O(n log n) FFT, and some changes to Mersenne31Complex to enable inversion without a type-specific implementation
TODO:

Implementation of cyclic polynomial quotient ring to test multiplication via fft vs naive
type system and abstractions for polynomials
parallelization of generic types
SIMD for ComplexMersenne31

Now includes a cyclic polynomial implementation to use for multiplication. Can use fft, dft, or coefficient multiplication.  As in this test:
    #[test]
    fn test_fft_mul_random_full(){
        let mut rng = rand::thread_rng();
        let mut aa:PC = rng.gen();
        let mut bb:PC = rng.gen();
        let cc = aa*bb;
        let dd = (aa.fft()*bb.fft()).ifft();
        assert_eq!(cc,dd);
    }

Feature is functionally complete and tested for use by other modules

+cargo fmt

Thanks for sending this!
There are some differences from what we were planning,

We'd like to support lengths defined at runtime, vs const generics
We'd like to have "batch" FFTs, where we transform each column of a matrix
We'd like a generic trait so users can easily swap in one of several implementations (DIT, Bowers, four-step, various parallelized versions, etc)

I figured it would be hard to make all the changes to this branch, but I adapted your in-place DIT code in my branch #47, I hope that's okay. I'll revisit later to look at adapting other parts of your code like the tests.


[SQL Exporter] Substitute invalid characters in column names with underscore (#1940)

Fixes #1940
Changes proposed in this pull request:

Substituting invalid characters in column names with an underscore for SQL Exporter
The invalid characters are detected through the following regex: [^a-zA-Z0-9_]

Updated. Please check @wetneb


Encrypt plugin fail

Is possible to no crypt cordova plugins? Only my code no 3rd parties plugins?
I'm getting some issues with that

I want to crypt only that files for example platforms/ios/www/js but not --> platforms/ios/www/plugins

3rd Parties plugins works fine in iOS but in android if one plugin have got html inside, it doesn't decrypt well.

You can specify encryption files in 1.3.0. Please refer to the following.
https://github.com/tkyaji/cordova-plugin-crypt-file#edit-subjects


Contact undefined

Describe the bug
Trying to alter the demo to talk to my Drachtio server which then proxies to a Cisco Meeting Server (a MCU that accepts SIP)
I get a Contact undefined error point to this file:
https://github.com/onsip/SIP.js/blob/master/src/core/dialogs/dialog.ts#L55
Logs
https://gist.github.com/philjones88/a8a865570de8f9f89679ace46261da02
<IP_ADDRESS> = drachtio server
<IP_ADDRESS> (philcms.vqlive.com) = cisco meeting server
The drachtio server is listening on 5060 + 5061 (tls) and for WS 5080 + 5081 (tls)
To Reproduce (if possible)
Steps to reproduce the behavior:
Pretty hard as you need a drachtio + cisco meeting server
Expected behavior
It to show remote video
Observed behavior
shows local video then errors with Contact undefined
Environment Information

Drachtio
Cisco Meeting Server
Firefox

Additional context
Add any other context about the problem here.

Getting this also when making an audi only call

Throwing an error is arguably a bug in response handling (as per the TODO in the code). So I addressed that and now we will simply log an error when the Contact is missing on a dialog forming response.
The 180 response with a to-tag from the Acano CallBridge MUST have a Contact header as it is a dialog forming response. And the response does not. That said, I'm not sure it is going to matter practically in your cases as the server seems to be answer the call immediately after the 180.
Anyway, from the RFC...
https://tools.ietf.org/html/rfc3261#section-12.1
12.1 Creation of a Dialog
Dialogs are created through the generation of non-failure responses
to requests with specific methods.  Within this specification, only
2xx and 101-199 responses with a To tag, where the request was
INVITE, will establish a dialog.
... and ...
https://tools.ietf.org/html/rfc3261#section-12.1.1
12.1.1 UAS behavior
When a UAS responds to a request with a response that establishes a
dialog (such as a 2xx to INVITE), the UAS MUST copy all Record-Route
header field values from the request into the response (including the
URIs, URI parameters, and any Record-Route header field parameters,
whether they are known or unknown to the UAS) and MUST maintain the
order of those values.  The UAS MUST add a Contact header field to
the response.