🎨(test) implement simple html content tests

Purpose
Testing the render of html for the reliability of the project
is essential. Writing these tests in the most simpliest way
is a key point on expanding and maintaining them. We use an
helper dependencie django-with-asserts to help us on redacting
them.
Proposal
Adding the dependencie django-with-asserts and rewrite the test that target specific element in html

ah ah I love your video
django-with-asserts is not of much used in reality it only do a basic use of lxml
If we keep on using this for our html test, maybe we were saying with Sam we could use something of our own that does the same job and gets extended if we need to

I'm scared by the version number of django-with-asserts and the last commit date (2013).
BUT,


[REFACTOR] Use secrets for sensitive data handled in connector integration

          Noticed that this file didn't include changes related to masking of API keys.

Should we take up marking this field (and wherever it's being passed) Secret as part of this PR, or a separate one?
https://github.com/juspay/hyperswitch/blob/61bacd8c9590a78a6d5067e378bfed6301d64d07/crates/router/src/connector/nmi/transformers.rs#L27
Originally posted by @SanchithHegde in https://github.com/juspay/hyperswitch/pull/1320#discussion_r1214888879

If #1320 fixed the issue, I believe we can close this.

If #1320 fixed the issue, I believe we can close this.

Nope, these two comments from #1320 involve sensitive data not being wrapped within Secret in cases where authentication data is not sent within headers:
https://github.com/juspay/hyperswitch/pull/1320#discussion_r1214888879
https://github.com/juspay/hyperswitch/pull/1320#discussion_r1214897154


tortoise: use rlock for read-only methods and meter store

should enable parallel ballot decoding

curious what profiling data you had that trigger this change.

i didn't profile. this is just a right thing to do. this is on critical code path, and there is some amount of computation (hashing, decoding votes) so holding mutex is a mistake

bors merge

https://github.com/spacemeshos/go-spacemesh/issues/4367

bors merge


do not panic when contract order has invalid encoding

Codecov Report
Base: 99.31% // Head: 99.30% // Decreases project coverage by -0.01% :warning:

Coverage data is based on head (6364bc2) compared to base (0c7b213).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.2     #769      +/-   ##
==========================================
- Coverage   99.31%   99.30%   -0.02%
==========================================
  Files          46       20      -26
  Lines        2345     1151    -1194
  Branches      350      208     -142
==========================================
- Hits         2329     1143    -1186
+ Misses          9        1       -8
  Partials        7        7

Flag
Coverage Δ

production
?

reference
99.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

contracts/lib/ConsiderationDecoder.sol

contracts/lib/OrderValidator.sol

contracts/helpers/TransferHelper.sol

contracts/lib/OrderFulfiller.sol

contracts/lib/Assertions.sol

contracts/lib/LowLevelHelpers.sol

contracts/lib/BasicOrderFulfiller.sol

contracts/conduit/ConduitController.sol

contracts/lib/ConsiderationEncoder.sol

contracts/lib/TokenTransferrer.sol

... and 16 more

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

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


[RFC] LineEndingFixer - handle "\r\r\n"

The added test is converting the input to expected, but it fails because:

Code build on input code must match expected code.

We have two ways to fix it:

Update the RegEx #\r\n|\n# to #\r+\n|\n#
Update the RegEx #\r\n|\n# to #\r\n|\r|\n# and test case to:

        $cases[] = [
            "<?php echo 'foo',\n\n'bar';",
            "<?php echo 'foo',\r\r\n'bar';",
        ];

Option 2 seems more right as the original \r\r\n is treated (at least in PHPStorm) as 2 line endings.
Ping @fabpot, @SpacePossum and @keradus as authors for opinion.

What about #\R#?

Even better :)

I'm not against changes proposed here but, if I remember correcly, the current behavior (not supporting \r) is on purpose because the syntax is only used on old systems.

The problem is that the current behavior is wrong - fixer cannot leave the code that requires fixing by itself.

Not sure if we left \r support in/out by design, or didn't bother trying to fix it because it is only used on older setups as we are talking about before macOS X which was released in 2002.
With the proposed changes in this PR, which users might be effected in a way that we might not want?

@SpacePossum not sure, some that have really old piece of code I guess, I doubt anyone is using \r in new code.

Can you propose the fix in the PR in a new commit? I think it will be fine TBH

Thank you @kubawerlos.


[FEATURE] Add curated kube-apiserver related Grafana dashboard

Is your feature request related to a problem? Please describe
kube-prometheus-stack comes by default with "kube-apiserver" Grafana dashboard. In our AWS Observability Best Practices and in other guides as well we recommend to monitor control plane metrics. But our AWS Observability Accelerator is missing a related Grafana dashboard
Describe the solution you'd like
I believe curated dashboard(s) containing available kube-apiserver and etcd metrics as described in Control plane metrics with Prometheus from EKS docs should be added to AWS Observability Accelerator.
OTEL configuration already scrapes relevant metrics and importing a simple example kube-apiserver dashboard using those just worked.
Describe alternatives you've considered
Use kube-prometheus-stack instead of AWS Observability Accelerator. It already contains a kube-apiserver Grafana dashboard and all relevant scrape configs, recording rules etc.
Additional context
Add any other context or screenshots about the feature request here.

@youwalther65 We've recently added the EKS best practices recommended metrics and we'll add dashboards soon. kube-prometheus-stack dashboards have some additional data we are not able to scrape, so we'll need to curate a bit

@bonclay7 Sounds promising. I just saw the "kube-admin" scrape job which contains the kube-apiserver metrics to keep. This will need a slight adjustment if we are going to support EKS v1.26+ because metric etcd_db_total_size_in_bytes got renamed to to apiserver_storage_db_total_size_in_bytes starting with EKS 1.26, see source code here , these metrics are still Aplha. I already created an issue (and probably a PR soon) for that

Implemented via PR  Add Kubernetes admin dashboards #18  and  Add Kubernetes admin dashboards for api-server #208  in both related repos.

Merged and implement


Seekbar issue for online streaming

Hi,
For online streaming, if i drag seekbar further, player stops, while it works well for Offline videos.

@ketkipawar
Yes and no :)
In fact, the problem is that MediaPlayer only supports seekbar if the server supports it as well.
Can you test the same video using native VIdeoView player with controls?

Closing due to lack of response.


behavior of example content_assist

hi! my goal is implementing auto-completion for existing language.
i'm tring it with simplified sample (fake) grammar,
using chevrotain/examples/parser/content_assist as reference.
but it seems that example can't handle my scenario well :(
my sample grammar is,
// NL token is NewLine.
// _  token is WhiteSpace.

startRule ->
  NL? stmt (NL stmt)* NL?

stmt ->
    functionStmt
  | enumStmt
  | declareStmt

functionStmt ->
  (visibility _)? (STATIC _)? FUNCTION _ IDENTIFIER

enumStmt ->
  (visibility _)? (STATIC _)? ENUM _ IDENTIFIER

declareStmt ->
  (visibility _)? DECLARE _ IDENTIFIER

visibility ->
  PRIVATE | PUBLIC

my expected behavior is,

input
candidates(next possible tokens)

Private, Public, Static, Function, Enum, Declare

Private
Static, Function, Enum, Declare

Private Static
Function, Enum

please see my code on gist.
https://gist.github.com/ayapi/e29c9982aacd0ca3f03b3b83e6c642e4
i cant get expected candidates because,
maybe, before consume token, before settle rule, at these position, in parser internally.
is it possible?? i want to realize it somehow or other.
actually, i've never seen parsing library that can handles well it easily.
nearley stores all next probable tokens to table row,
so i just have to collect them,
but nearley has other issues(slow, hard to get rulestack/tree on error, etc...)).
if it can be solved by chevrotain, chevrotain will be best-solution.

Alright, the content assist example makes some assumption about the grammar
which is why it is an "example" and not a first class "feature" (yet).
Basically it computes the content assist on consumeInternal
Which is only called when CONSUME has actually been called.
This means:

It won't work for empty input.
It won't work in some situations where K > 1 (multiple tokens look head required).

I have refactored your grammar:

To be LL(1) so now: your two last sample input work.
To skip newlines and whitespace (assuming they can be safely skipped in your case).

Next Steps:

Is the Grammar your are implementing LL(1)? is this sufficient for your needs?
If not, I need to consider how to expand the content assist example to LL(K) grammars.

Generally everything is possible because the whole grammar information is known at runtime. its just a question of complexity.

For support of "empty input" suggestions I need to expose some internal APIs.

whoa! thank you very much for your explanation and refactoring! i understand why it didnt work.

Is the Grammar your are implementing LL(1)? is this sufficient for your needs?

unfortunately my current target grammar is not LL(1).:cry:
thanks to your refactoring, i understand how to convert LL(k) to LL(1).:pencil2:
but, ummmmm, on complex grammar that has many rules, i'm uneasy about i can accomplish or not...:scream:
it would be so amazing if you expand example to LL(K)!
it will be a revolution, i think, not a few author/users of LL(k) grammar have difficulty in auto-completion feature, not only me.:raised_hands:

You are welcome and thanks for the feedback on Chevrotain.
Note that many(most?) programing languages are LL(1) or mostly LL(1). Meaning hat LL(k) decisions are only required in a few specific places. So if a grammar is 95% LL(1) than the auto complete example will be able to provide suggestions for ~%95 of the grammar.
It is not all or nothing.
What this means for you is that depending on the complexity of your grammar you may be able to selectively refactor parts of the grammar instead of everything and still enjoy 90%+ auto complete capabilities.
I will attempt to expand the auto complete example using your sample.
Naive desired flow + analysis below.
Current Example flow:

Input "private static ".
Parser reaches The decision:

           functionStmt
         | enumStmt
         | declareStmt

None of the three alternatives matches because a "Function" or "Enum" is needed to distinguish between the two alternatives (K = 3).
The parser will raise a noAltException.
consumeInternal was never called on the two input tokens.
Therefore the logic to compute the next possible Token after "Private" was never called as well.
No Suggestions.

Upgraded Example flow:

as above.
as above.
as above.
as above.
A custom overriding orInternal will catch the noAltException
The distance between the decision point Token position (0) and the content assist Token position (3) is smaller than equal (<=) to the required lookahead (3).
Therefore we know that the noAltException can be ignored.
Compute all token sequences of length 3 starting from the decision point.
Filter away all sequences that do not start with ["Private" "Static"]
Return all the third items of the remaining sequences. These are the final suggestions.

Pros

**Low implementation cost as the complex logic building blocks already(mostly?) exist in Chevrotain.
Consistent behavior  same logic to compute lookahead functions and auto complete.

**Cons **

Need to be reimplemented for all internal DSL methods (orInternal/manyInternal/atLeastOneInternal/...)

Different logic used to compute the nextTokens in consumeInternal. Perhaps use the same mechanisms.

Could be slow to compute all paths of a large length in a complex grammar.

still enjoy 90%+ auto complete capabilities.

ohh! i get it! thank you, i've got motivated. :fire:
i'll start to convert real grammar to chevrotain class!
i'm so pumped to see your upgrading :satisfied:

I'm working on a different approach which will (hopefully) be built into Chevrotain as a first class feature.
You can keep track on my progress here:
https://github.com/SAP/chevrotain/issues/291

@ayapi. A new syntactic content assist feature (first class citizen) is in version 0.18.0.
https://github.com/SAP/chevrotain/issues/291
I've used an example based on the one your provided in this gist.
Please have a look and see if this resolves the issues you had with the previous example.

@bd82
i've tried v0.18.0 just now, it works,THIS IS AMAZING!!!! :sob:
Thank you very much!!!!!! i'll continue implementing real grammar with it!!!

Great 😄.
And if you can share the grammar you are working on (link/access/...)
I will review it, as it is useful both ways:

Feedback to Chevrotain --> How do people actually use the library.
Feedback to Grammar authors --> access to tips/tricks/best practices that are not always documented.

I will close this issue as the original problem was resolved.
Additional feedback is always appreciated 👍 so new issues are very welcome.


setup.py register overwrites author with maintainer

This behavior has been reverted by hand using PyPI's web interface. It was anticipated from testpypi.python.org. After installation, pip show pydot still shows the maintainer as author, because PKG-INFO remains as uploaded.
Nonetheless, this appears to be known and intended behavior, though somewhat misimplemented.

I am not seeing this issue anymore with packages for 1.4.2 uploaded to test.pypi.org and pypi.org. The page for pydot 1.4.2 on PyPI.org shows Author as Ero Carrera and Maintainer as myself, as intended and without the need for manual editing.
If I understand correctly, various packaging tools lacked support for the Maintainer-field and this issue was not solved in all of them. Bug reports for various packaging tools:

distutils: https://bugs.python.org/issue33069, https://github.com/python/cpython/pull/6106, https://bugs.python.org/issue12840. All indicate that this won't be solved there because distutils was being phased out in favor of setuptools. See also: Differences between distribute, distutils, setuptools and distutils2.
distutils2: https://bugs.python.org/issue962772. Seems that it was solved there, but I am not using distutils2, so I did not investigate further.
setuptools: https://github.com/pypa/setuptools/pull/1294/ Seems solved there. The commits there were first part of setuptools v38.7.0, which was released 2018-03-17.

pip show pydot only shows Author: Ero Carrera, so that field is filled in correctly as well. Maintainer is not shown, but it is present in the metadata. This is just the way pip presents it, also for other packages that have both an Author and a Maintainer, such as NetworkX (pip show networkx).
METADATA in the wheel package and PKG-INFO in the source package both have Author and Maintainer correctly filled in now.
So, assuming the issue was with setuptools and solved there in 2018, I am closing this issue. Feel free to reopen or mention me if I misunderstood.
Versions used:

For python setup.py sdist bdist_wheel: Python 3.7.3+pip 21.0.1+setuptools 53.0.0.
For pip install: Python 3.7.3+pip 21.0.1+setuptools 53.0.0 and Python 2.7.16+pip 20.3.4+setuptools 44.1.1.


[wip] use xslt to transform phpdoc2 to phpdoc3

Instead of supporting multiple strategies, we should only support the latest, and upcast the previous version to the last strategy. XSL can do this for us.
The idea is that if it doesn't match the phpdoc3 strategy, it tries to upcast it to phpdoc3 and retry that strategy.
I finished the first version of the style.xsl (possibly needs renaming) which upcasts phpdoc2 to phpdoc3 config.
Aside from the ConfigurationFactory flow, this can be used to let users convert their old configuration to the new one, e.g. by typing phpdoc --convert phpdoc2.xml phpdoc3.xml
What I don't know yet is how to put this in the ConfigurationFactory flow.

Sorry for the delayed response.
I would create a chain of converters. So you have a 2to3 converter which can be wrapped in a 3to4 converter. Your convert method could be something like this.
  public function convert($config)
  {
      if (!$this->matchesVersion($config) {
          $config = $this->wrappedConverter->convert($config);
      }

      return $this->innerConvert($config);
  }

results in:
config => 2to3 => 3to4 => config
This way you only need to modify the factory and add an extra step when needed. Existing classes can be left as is. It even allows people to add there own steps to convert config from a different format.

At this point in time we do not need this functionality due to our re-alignment. I am going to close the PR but if we need a solution like this again we can refer to this closed PR


graphw00f: init at 1.1.2

Description of changes
GraphQL Server Engine Fingerprinting utility
https://github.com/dolevf/graphw00f
Related to #81418

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
22.11 Release Notes (or backporting 22.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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 177944 run on x86_64-linux 1

1 package built:

graphw00f


whitespace cleanup

This PR updates the repository to the current .editorconfig specifications.
Additionally, I've created a BAT/CMD script to test for files which don't meet repository criteria (see https://gist.github.com/rivy/363672794368da2e810f). The script tests using pcregrep which can be obtained from http://pcre.org (Windows binary @ http://www.rexegg.com/pcregrep-pcretest.html).
I think it would be a good idea to incorporate these five tests into the Appveyor tests. Unfortunately, I don't know "pester" at all, so, I haven't had the time to learn it and generate the appropriate tests.

The whitespace cleanup commit avoids fully "fixing" all of the test files. I wasn't sure if all of the testing text files could be changed without bollixing up the tests. And, unfortunately, my Appveyor testing queue is stuck, so I couldn't test it.
Once I get it "unstuck", I'll try to fix all of the test files and submit another commit if it passes tests.

Great work on this. Thanks

Appveyor is finally back in operation for me.
So, I've now successfully changed and tested all the test fixture files. The entire repo is compliant now without any test errors.
I've also updated the repo test script (https://gist.github.com/rivy/363672794368da2e810f) to test all source files. And it's reporting no issues over the whole repo.

Perhaps we should get pcregrep into the main bucket.
How do you propose enforcing this for new manifests?

Sorry I missed the part where you mentioned incorporating this into the Pester tests.

I'd be happy to incorporate tests... The gist mentioned above does have the regular expressions needed to test all the files. But I don't know the mechanics of testing with "pester". If someone could give me a few pointers, I'd be happy to incorporate them into the tests.
As for pcregrep, I've mirrored the PCRE SVN repo on github (@rivy/PCRE2). I've got it compiling, but there are several compilation options that I don't understand yet. So I'm not sure how to produce the best windows version. When I get it compiling in best form, I'll produce a release and PR to incorporate it.
There is a pcregrep binary available (as noted previously), but it's on a private site and the producer isn't saying how it's compiled.

I created a repo for PCRE (https://github.com/rivy/PCRE) that contains instructions and source for building PCRE under Windows.
Using it, I’ve got the most recent release compiled and repackaged for Windows (https://github.com/rivy/PCRE/releases/latest).
I also added the package to my scoop-bucket (https://github.com/rivy/scoop-bucket/blob/master/pcregrep.json). And, I’d be happy to make a PR for it, but I’m unsure whether you’d prefer adding it to the main scoop bucket or the extras.

Roy

From: Simon Hartcher
Sent: Wednesday, August 19, 2015 7:30 PM
To: lukesampson/scoop
Cc: Roy Ivy III
Perhaps we should get pcregrep into the main bucket.
How do you propose enforcing this for new manifests?
—
Reply to this email directly or view it on GitHub.

@deevus , I wanted to check in on this...
I've got a more substantial set of patches that adds improved functionality from the CMD shell. It updates the CMD shell environmental after scoop commands, avoiding the onerous requirement of restarting the shell to finish the install process (feature parity with PowerShell). It also fixes a couple of more subtle problems with the update process.
I've been using it successfully for the last couple of weeks.
Point being that it's difficult to base the patches on the current master without clouding the important code changes with swaths of lines having only whitespace changes.

I think what needs to happen is:

Get PCRE in scoop
Integrate PCRE into testing via this PR
Merge it in

I see that you have been creating some new tests using Pester, so do you think you're more confident to integrate the tests for this now?

In regards to https://github.com/rivy/scoop/commit/57f0571
Can you explain in a bit more detail what is going on? This can just be a part of the PR when you get to it.

If you think it meets the criteria in #451 lets get it in the main bucket
On Thu, Aug 27, 2015 at 6:42 AM, Roy Ivy III<EMAIL_ADDRESS>wrote:

I created a repo for PCRE (https://github.com/rivy/PCRE) that contains
instructions and source for building PCRE under Windows.
Using it, I’ve got the most recent release compiled and repackaged for
Windows (https://github.com/rivy/PCRE/releases/latest).
I also added the package to my scoop-bucket (
https://github.com/rivy/scoop-bucket/blob/master/pcregrep.json). And, I’d
be happy to make a PR for it, but I’m unsure whether you’d prefer adding it
to the main scoop bucket or the extras.

Roy

From: Simon Hartcher
Sent: Wednesday, August 19, 2015 7:30 PM
To: lukesampson/scoop
Cc: Roy Ivy III
Perhaps we should get pcregrep into the main bucket.
How do you propose enforcing this for new manifests?
—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub
https://github.com/lukesampson/scoop/pull/462#issuecomment-135164935.

PCRE isn't needed for testing. The last set of commits (starting with 6545f2e) added all of the same tests into the pester testing set. All of the whitespace style rules run automatically upon checkin with the PR in this current shape. So, if you're comfortable with this as a PR, the current version is complete.
I'll look into the PCRE issue separately in a bit, but, again, it's unnecessary for this PR.
As an aside, the commit  rivy@57f0571 is just a working preview. I'm going to be posting (and solving) three issues over the next day or so, in order to explain each step in the process. Unfortunately, anytime you try to get anything significant done with BAT/CMD scripts, it always involves a lot more code effort and complexity to get it correct.

@rivy Great work. If you can just resolve the conflicts I'll merge it in

Done.

:+1:


Disabled to prevent crash.

Disabled functionality, since it causes Will to crash. (Commented out line 34.)

I'm not merging this one. I've commented out the whole plugin in config.py so it doesn't even load those commands. You can also comment out specific sommands in the config.py This way if someone tries to turn it back on it works. I didn't see a crash on mine for this one either.


Required "pg_trgm" extension on all catalogs

New catalogs require the gp_trgm extension on the back end postgresql database. Without it, clients will get an 'internal server error' and in the /var/log/httpd/ssl_error_log will see the following message within the stack trace logged by ERMrest.
'got exception "operator class "gin_trgm_ops" does not exist for access method "gin"\n" during model introspection'
The complete stack trace is:
[Wed Jul 01 15:22:05 2015] [error] [client ::1] Traceback (most recent call last):
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     return self.handle()
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     return self._delegate(fn, self.fvars, args)
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/web/application.py", line 405, in _delegate
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     return handle_class(f)
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     return tocall(*args)
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/ermrest/ermrest_apis.py", line 283, in GET
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     return self.METHOD('GET')
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/ermrest/ermrest_apis.py", line 250, in METHOD
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     first = result.next()
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/ermrest/sanepg2.py", line 146, in pooled_perform
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     result = bodyfunc(conn, cur)
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/ermrest/url/ast/data/path.py", line 191, in wrapbody
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     return body(conn, cur)
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/ermrest/url/ast/model.py", line 69, in body
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     return self.catalog.manager.get_model(cur)
[Wed Jul 01 15:22:05 2015] [error] [client ::1]   File "/usr/lib/python2.6/site-packages/ermrest/catalog.py", line 251, in get_model
[Wed Jul 01 15:22:05 2015] [error] [client ::1]     raise ValueError('Introspection on existing catalog failed (likely a policy mismatch): %s' % str(te))
[Wed Jul 01 15:22:05 2015] [error] [client ::1] ValueError: Introspection on existing catalog failed (likely a policy mismatch): operator class "gin_trgm_ops" does not exist for access method "gin"
So it appears that we now require this extension by default but we do not create new catalogs (databases) with the extension enabled.

The workaround for now is to add this extension manually after you have created a new catalog.

switch to the postgres superuser

$ sudo su - postgres

connect to the ermrest master database which contains the ERMrest registry

-bash-4.1$ psql ermrest
psql (9.4.4)
Type "help" for help.

query the simple_registry to discover the random database names of your catalogs

ermrest=# select * from ermrest.simple_registry;
 id |                            descriptor
----+-------------------------------------------------------------------
  1 | {"type": "postgres", "dbname": "_ermrest_RANDOM"}
(1 row)

connect to the catalog database

ermrest=# \connect _ermrest_RANDOM
You are now connected to database "_ermrest_RANDOM" as user "postgres".

enable the pg_tgm extension

_ermrest_RANDOM=# create extension pg_trgm with schema pg_catalog;
CREATE EXTENSION

verify that it is installed

_ermrest_RANDOM=#  \dx
                                    List of installed extensions
  Name   | Version |   Schema   |                            Description
---------+---------+------------+-------------------------------------------------------------------
 pg_trgm | 1.1     | pg_catalog | text similarity measurement and index searching based on trigrams
 plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
(2 rows)

you are done

_ermrest_RANDOM=#  \q

You should be able to use the ERMrest catalog now.

We need to install this extension by default for all new catalogs assuming this is a feature we want on by default.
We should be able to do this by changing the create catalog operation to create the backend database based on a template database, and the template database to have the pg_trgm extension installed already.


[WIP] Add support for Plasma Mobile

:warning: This is not ready for a final review. Though it's not that far.
There's still work to be done. Questions unanswered, wayland+plasma bugs to be fixed outside of this PR too.
Though this is a starting point to look at.
This includes work form #58370. Thank you @Slabity.
This branch also includes commits from #100057. I haven't tested (I think) to see if they were strictly required, but I assume they were.
What this is
This includes the "basic" set of released applications from the Plasma Mobile project. In addition to the shell configuration, and the NixOS configuration to use Plasma Mobile.
Known issues
Probably not specific to Plasma Mobile

Notifications are "full-screen", probably is the same issue as #118650
Night colors not working #117036

Probably specific to Plasma Mobile

Long clicking the wi-fi icon goes to the main settings menu (I assume it should go to some sort of network configuration utility)
Forced numeric passwords!!!!! Yiiiiikes!

Things done

Testing with https://github.com/NixOS/mobile-nixos/pull/351, which works with the UEFI VM, and on hardware on a Pine64 Pinephone.
A standard NixOS VM

To be done later

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

cc @NixOS/qt-kde

#125156, which only package apps is :heavy_check_mark: ready for reviewing.

With this last force-push:

Rebased on top of current #125156 (plasma mobile gear 21.05).
Removed plasma-phone-settings as it was largely cruft and unneeded. Instead we get an (internal) malleable option set for kdeglobals/kwinrc.

(Not pushed) Tried rebasing on #127389, but the upgrade to 5.22.3 does not seem to fix the notifications issue. Night color untested.
Side-note: the issue might be different than the one for plasma5 on wayland, in the end, as when reworking the kwinrc changes, I saw that by having the Placement=Maximizing value removed the notifications were not maximized (duh?). So it looks like part of the issue is that the notifications are being maximized by that config, and that something that would normally make them not maximized doesn't work with the current packaging.

Rebased,  #139459 and #139537 fixes the issues with the notification sizes.
The other two known issues noted are not breaking. The "wifi long press" issue is a supposition that the action is wrong, without actually verifying on another Plarma Mobile distro. The night light issues are untested on real hardware. Given that #117036 is closed, I figure it's more likely to be fixed. I'm still assuming if it's broken that it would be broken on "full" Plasma with Wayland.
Current status is:

blocked on #100057, #139459 and #139537
"blocked" on #125156 (which is pretty much ready already)

I'm currently testing this. Some notes:

For some reason the brightness starts at 5%, which is too low to actually enable the display (in my case). When connected to a charger it coincidentally barely shows something. For now I workaround this by doing brightnessctl set 30% in an ssh connection, but it's far from ideal. Dunno if there's a way to set this by default (or it could be a systemd script that runs after graphics are setup)
I had an empty password and it couldn't handle that, after changing it to a numeric password it appears to accept it though (guess that's an upstream bug though).
The 'normal' plasma desktop seems to work fine
The 'mobile' plasma desktop crashed the first time I tried to use it (lots of KDE services crashed), but the second time it worked! (it might've been an issue that I started a normal desktop and then the mobile desktop again, who knows!)
When the screen is dimmed it's unclear how it's turned back on (I set the brightness to 30% again and that worked...)
Megapixels works (although the back camera crashes the app, but that's the same on phosh)
It doesn't seem super stable (sometimes things take exceedingly long or stuff crashes)

This seems to look better 'out of the box' than phosh, which (without the GTK patches) doesn't go fullscreen
I just discovered that I was suffering from a lack of disk space, which may have influenced some of these tests. I'll probably run this for a while and report anything special I find.
Some pictures (low quality)

In general, I think this is mostly ready for a first cut. The main concern I have is with the brightness, since that's really quite annoying.

This latest push includes changes from #130151, in addition to the Plasma Mobile shell additions.

The most recent push is a rebase on top of current nixos-unstable.

Last update made the Plasma Mobile independent from Plasma Desktop. Before it required needlessly enabling all of Plasma Desktop.
I am gearing up to test on Mobile devices more in depth, since everything "generic" seems to just work at this point.

I tested with this configuration: https://github.com/Mindavi/pinephone-nixos-config/commit/122413a5246ae6673f5f50a57ad0ba6367034067
In general, seems to work ok. I can now properly login, sddm seems to work fine. It builds on the pinephone (everything that was not substituted from the cache, that is).
I did see the keyboard crash, but I don't expect this is related to packaging. In general it seems to work ok, so not sure why it crashed sometimes.

Using kasts, I verified that audio is working (after changing audio settings).
Flashlight does not seem to be working (not sure if related to packaging here).
For some reason, the green notification led does not go out after booting
Looks a lot more 'mobile' than gnome that I was running on it before
Bootup time ~2 mins or so
King's Cross (terminal emulator) looks slightly weird (letters far apart), may be an issue with King's Cross itself
Brightness settings work
Battery indicator works
Wifi indicator works
Settings app works
In general, icons in apps are working

Have not looked at the code otherwise.

For some reason, the green notification led does not go out after booting

I don't know if there's a service that handles LEDs in Plasma Mobile. The green LED is simply the default state from Linux's initialization.

For some reason, the green notification led does not go out after booting

Could be missing fonts.
With all the hardware working (except for flashlight / notification LEDs), it's looking good I guess.
A thing to do would be checking if upstream manages LEDs, and how, and why it doesn't work if so.

I cannot find any documentation on notification LEDs in plasma mobile, and the UI also doesn't seem to expose anything about it. So I think nothing is done with it.
I've been using this a little bit since I reviewed this, and haven't found any major issues otherwise. I think this is good to go in.

rebased, fix build issue with update to 5.23.3.
@Mindavi do you want to / can you test again?
I'll build and test again for pine64-pinephone too, but it worked with the UEFI VM.

I'd like to, but I gave my pinephone to a friend to try it out, they are still waiting for their librem 5. Hope they can get some experience before they get it (if ever....). I'll probably get it back somewhere in the following weeks, but didn't really plan a date or anything.
So I'll not be able to test soon, unfortunately.

I can try this out on my pinephone this weekend if you'd like anything specific checking or just another person to test it. It's updating now...

@Mindavi @Thra11: I didn't need anything specific to be tested. I tried it on my own unit since this is now totally ready for merging. Another pair of eyes, one last time, would have been nice, but not required.
Thank you @ttuegel for looking!

[x] Verified the nixos tests for plasma5 still pass as expected

Seems to be basically functional, much better than last time I tested it. Lots of weird and wonderful bugs and quirks, but nothing that's obviously related to plasma mobile packaging rather than upstream bugs. Good to see this merged at last!


Implement NetworkAPI for high level application logic

What was wrong?
fixes #35
How was it fixed?
Implements the high level API container for v5.1, aka NetworkAPI along with long running processes for responding to PING and FIND_NODES requests.
Cute Animal Picture

@lithp assigned to you as more of a formality.  I don't need you to deep dive this any further than you want for your own benefit.  Happy to address anything you happen to find along the way.  I'm find with anything from simply "rubber stamping" this to a real review.  This PR seems like an appropriate starting point for you starting to grok the architecture.


The imported target "dlib::dlib" references the file       "/usr/lib/libdlib.a"    but this file does not exist

When including dlib in a custom project using CMake
find_package(dlib REQUIRED)
include_directories(${dlib_INCLUDE_DIRS})
cmakelist file :
cmake_minimum_required(VERSION 2.8.3)
project(gazr)

add_definitions(-std=c++11)

find_package(dlib REQUIRED)
include_directories(${dlib_INCLUDE_DIRS})

option(DEBUG "Enable debug visualizations" ON)
option(WITH_TOOLS "Compile sample tools" ON)
option(WITH_ROS "Build ROS nodes" OFF)

if(WITH_ROS)

find_package(catkin REQUIRED COMPONENTS
    roscpp
    tf
    std_msgs
    visualization_msgs
    sensor_msgs
    cv_bridge
    image_transport
    image_geometry
    )

    include_directories(${catkin_INCLUDE_DIRS})

   catkin_package(
   CATKIN_DEPENDS
      tf
    DEPENDS OpenCV
   LIBRARIES
   )
   endif()

   if(DEBUG)
   find_package(OpenCV COMPONENTS core imgproc calib3d highgui REQUIRED)
   else()
   find_package(OpenCV COMPONENTS core imgproc calib3d REQUIRED)
   endif()

    message(STATUS "OpenCV version: ${OpenCV_VERSION}")
  if(${OpenCV_VERSION} VERSION_GREATER 2.9.0)
  set(OPENCV3 TRUE)
  add_definitions(-DOPENCV3)
  endif()

 if(DEBUG)
add_definitions(-DHEAD_POSE_ESTIMATION_DEBUG)
 endif()

 include_directories(${OpenCV_INCLUDE_DIRS})

 add_library(gazr SHARED src/head_pose_estimation.cpp)
 target_link_libraries(gazr ${dlib_LIBRARIES} ${OpenCV_LIBRARIES})

if(WITH_ROS)

add_executable(estimate_focus src/estimate_focus.cpp)
target_link_libraries(estimate_focus ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})

add_executable(estimate src/head_pose_estimation_ros.cpp src/ros_head_pose_estimator.cpp)
target_link_libraries(estimate gazr ${catkin_LIBRARIES})

install(TARGETS estimate_focus gazr estimate
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(FILES
    launch/gazr.launch
    launch/gazr_gscam.launch
    calib/logitech-c920_640x360.ini
    share/shape_predictor_68_face_landmarks.dat
    DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
 )
 endif()

 if(WITH_TOOLS)

if(OPENCV3)
    find_package(OpenCV COMPONENTS core imgproc calib3d highgui imgcodecs videoio     REQUIRED)
  else()
    find_package(OpenCV COMPONENTS core imgproc calib3d highgui REQUIRED)
    endif()

 find_package(Boost COMPONENTS program_options REQUIRED)

  add_executable(gazr_benchmark_head_pose_single_frame       tools/benchmark_head_pose_estimation_single_frame.cpp)
target_link_libraries(gazr_benchmark_head_pose_single_frame gazr ${OpenCV_LIBRARIES})

add_executable(gazr_estimate_head_direction tools/estimate_head_direction.cpp)
target_link_libraries(gazr_estimate_head_direction gazr ${OpenCV_LIBRARIES} ${Boost_LIBRARIES})

add_executable(gazr_show_head_pose tools/show_head_pose.cpp)
target_link_libraries(gazr_show_head_pose gazr ${OpenCV_LIBRARIES} ${Boost_LIBRARIES})

endif()
I get the following error:
  CMake Error at /usr/lib/cmake/dlib/dlib.cmake:76 (message):
  The imported target "dlib::dlib" references the file

  "/usr/lib/libdlib.a"

  but this file does not exist.  Possible reasons include:

* The file was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

   "/usr/lib/cmake/dlib/dlib.cmake"

   but not all the files it references.

 Call Stack (most recent call first):
/usr/lib/cmake/dlib/dlibConfig.cmake:35 (include)
CMakeLists.txt:7 (find_package)

Where does /usr/lib/cmake/dlib/dlibConfig.cmake come from?  Some package manager or something?

I changed cmakelists these two lines :
find_package(dlib REQUIRED)
include_directories(${dlib_INCLUDE_DIRS})
into
set(DLIB_PATH "" CACHE PATH "Path to DLIB")
include(/home/ubuntu/dlib-19.0/dlib/cmake)
the cmake .. done without errors , but make shows this :
ubuntu@ubuntu:~/gazr/build$ make
[ 3%] Built target gazr
[ 4%] Linking CXX executable gazr_benchmark_head_pose_single_frame
CMakeFiles/gazr_benchmark_head_pose_single_frame.dir/tools/benchmark_head_pose_estimation_single_frame.cpp.o: In function GLOBAL__sub_I_main': benchmark_head_pose_estimation_single_frame.cpp:(.text.startup+0x895): undefined reference toUSER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives'
libgazr.so: undefined reference to dlib::base64::~base64()' libgazr.so: undefined reference todlib::entropy_decoder_kernel_2::get_target(unsigned int)'
libgazr.so: undefined reference to dlib::entropy_decoder_kernel_2::decode(unsigned int, unsigned int)' libgazr.so: undefined reference todlib::entropy_decoder_kernel_2::~entropy_decoder_kernel_2()'
libgazr.so: undefined reference to cblas_dgemm' libgazr.so: undefined reference todlib::base64::decode(std::istream&, std::ostream&) const'
libgazr.so: undefined reference to dgesvd_' libgazr.so: undefined reference todlib::entropy_decoder_kernel_2::entropy_decoder_kernel_2()'
libgazr.so: undefined reference to dlib::entropy_decoder_kernel_2::set_stream(std::istream&)' libgazr.so: undefined reference todlib::base64::base64()'
collect2: error: ld returned 1 exit status
CMakeFiles/gazr_benchmark_head_pose_single_frame.dir/build.make:104: recipe for target 'gazr_benchmark_head_pose_single_frame' failed
make[2]: *** [gazr_benchmark_head_pose_single_frame] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/gazr_benchmark_head_pose_single_frame.dir/all' failed
make[1]: *** [CMakeFiles/gazr_benchmark_head_pose_single_frame.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Link to dlib.  The examples/CMakeList.txt is an example of a working
CMakeLists.txt file.

now  cmake ..    is successful but    ( make  )is showing  this error
ubuntu@ubuntu:~/gazr/build$ make
Scanning dependencies of target gazr
[ 12%] Building CXX object CMakeFiles/gazr.dir/src/head_pose_estimation.cpp.o
In file included from /home/tofi/gazr/src/head_pose_estimation.cpp:11:0:
/home/tofi/gazr/src/head_pose_estimation.hpp:5:25: fatal error: dlib/opencv.h: No such file or directory
#include <dlib/opencv.h>
^
compilation terminated.

I changed cmakelists these two lines :
find_package(dlib REQUIRED)
include_directories(${dlib_INCLUDE_DIRS})
into
set(DLIB_PATH "" CACHE PATH "Path to DLIB")
include(/home/ubuntu/dlib-19.0/dlib/cmake)

No need to make such changes. I have working projects that uses this lines and all fine
find_package(dlib REQUIRED)
include_directories(${dlib_INCLUDE_DIRS})
link_directories(${DLIB_LIBRARY_DIRS})

Looks like you dont have correctly installed Dlib in your system. Follow this steps and it should help
git clone https://github.com/davisking/dlib
cd dlib
mkdir build
cmake ..
sudo cmake --build . --target install

After this you should be able to use Dlib from CMakeLists.txt with no including cmake file from dlib

Thanks for help. I'm confused now because dlib instructions says that :
`Go into the examples folder and type:
mkdir build; cd build; cmake .. ; cmake --build .`
I done the instructions in your comment , how can I run dlib c++ examples ?
when I type ubuntu@ubuntu :~/dlib/build/build$ ./webcam_face_pose_ex
bash: ./webcam_face_pose_ex: No such file or directory

There are a lot of ways to compile C++ code.  Dlib tries to be convenient and let you do it any way you want.  The recommendations are only a small set of the possible ways you could do it.
But if you aren't familiar with different C++ build methods you should just type exactly what the instructions say to do to run the examples.

The error @sarmadm  reports here is still an issue in Ubuntu-16.04 universe repositories (and maybe other distros too). The problem arises from the fact that the dlib.cmake file checks for a static library ( add_library(dlib::dlib STATIC IMPORTED)) which cannot be found because it is not installed, as a quick dpkg-query -L libdlib-dev | grep grep ".*\.a" can reveal.


EventSubscription validation troubleshooting section

Added Azure Application Gateway/Web Application Firewall related troubleshooting steps.

@batrived : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#signoff

#sign-off

@ktoliver: I'm sorry - only the author of this article, @banisadr, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.


License

@mrluin Thank you for your hard work,
Can you add a LICENSE for this repo.
I'd recommend  The Unlicense

Thanks for your comment. I have added the LICENSE.


WebhookClient.handleRequest() doesn't accept Map()

Our team has been trying to pass a map of name and handler for our intents / actions to WebhookClient().handleRequest:
    const agent = new WebhookClient({ request, response });

      // Array of all actions.
    const actions: = [
     DemoAction,
    // Add actions here.
    ];

    // Actions are added to intentMap, thereafter to handleRequest for routing.
    let intentMap = new Map();
    actions.forEach(action => intentMap.set(action.name, action.handler));

    // Run the proper function handler based on the matched Dialogflow intent name
    agent.handleRequest(intentMap);

Actions look like this:
    export const name = 'demo_action';
    export function handler(app) {
        const paramNumber = parseInt(app.parameters['number'].toString());
        app.add(`I incremented your number. Here you go: ${paramNumber + 1}`);
    }

This however results in the error handleRequest must contain a map of Dialogflow intent names to function handlers. Now the map of intent names to function handlers is exactly what we've included in intentMap. For testing purposes we changed the lines  lines 244-248 /dialogflow-lambda-fulfillment/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js to:
    if ((handler instanceof Map)) {
          return Promise.reject( new Error(
            'handleRequest must contain a map of Dialogflow intent names to function handlers'
          ));
        }

This defeats, of course, the whole purpose of this type check since the original line was if (!(handler instanceof Map)). On the other hand, the Map which we pass to WebhookClient().handleRequest works perfectly well with our modification. It's also strange that (intentMap instanceof Map) is true if we check it in our project, but apparently turns into false once it's passed to handleRequest().
Are there any ideas, where this error might be coming from and how to solve it?

function welcome (agent) {
    agent.add(`Welcome to Express.JS webhook!`);
}

function fallback (agent) {
    // console.info(`unknown -- ${agent.originalRequest}`);
    agent.add(`I didn't understand`);
    agent.add(`I'm sorry, can you try again?`);
}

function WebhookProcessing(req, res) {
    const agent = new WebhookClient({request: req, response: res});
    console.info(`agent set`);

    let intentMap = new Map();
    intentMap.set('Default Welcome Intent', welcome);
    intentMap.set('Default Fallback Intent', fallback);
// intentMap.set('<INTENT_NAME_HERE>', yourFunctionHandler);
    agent.handleRequest(intentMap);
}

This is how I did.  You can check the complete code in the current Pull Request #81.

@abhi007tyagi We're basically doing the same thing in a different way. We use an Array, the forEach-function iterates through the elements and 'sets' them to the intentMap.

Check the intent name that is getting saved in the MAP.

Are you trying to fulfill all intents with the same function?  If so you can pass a function to the agent.handleRequest method that will be called no matter what intent is match in Dialogflow.  Here is an example:
const agent = new WebhookClient({ request, response });
function handler(agent) {
    const paramNumber = parseInt(agent.parameters['number'].toString());
    agent.add(`I incremented your number. Here you go: ${paramNumber + 1}`);
}

agent.handleRequest(handler);

Keep in mind that if the above is what you want to do, every intent that uses fulfillment in you Dialogflow agent has to have a required number parameter, otherwise the number might not be sent to the webhook and could result in a error in your fulfillment.


Fix missing IAP violations

The group field in backend services seems to have changed to resourceGroup.
I checked the documentation and it doesn't seem to be consistent with the actual data from CAI.
https://cloud.google.com/compute/docs/reference/rest/v1/backendServices
Is there some other translation needed?
@red2k18 @hshin-g

Does this work with CAI turned off?

Right, this change needs to be made here: https://github.com/GoogleCloudPlatform/forseti-security/blob/dev/google/cloud/forseti/services/inventory/base/cai_gcp_client.py#L303. If the key we get from CAI is different than the key defined in the public documentation and returned by calling the API directly.


package.json has extra comma which leads to an error.

Line 15.

https://github.com/hora-search/hora-wasm/commit/9bf81aff71d9431c600ff68178bd4195754f971b
fix it.


Searchable: self-joined relations

Hello,
First I’d like to thank you for your Searchable extension for Laravel. It’s really great and it saved me a lot of time! Despite that, I still have some issue using it for “complex” research: I want to make research through multiple self-joined relations, here is an example:
In my model, companies can have multiple addresses. Addresses are each linked to one location (city). Finally, a location can have multiple parent locations (city->region->country). I want to be able to search companies by their location name (“addresses.location.name”) but also by their parent location name doing something like “addresses.location.parent.name”, but this returns me an error:
SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'location'
I think it’s because the query tries to join location table multiple times without using aliases… Do you think there’s any possibility to do something similar with this model?
Thank you in advance

I second this, self joins or multiple joins to the same table are not working due to an alias conflict. I hope this could be fixed.
Also, thank you for a great plugin.

I'm unable to go for it now, so maybe a PR ?


Add upload file button

Adds a button to upload a file.
Tackles the same issue as #121, but adds a component to upload the file instead. The issue with #121 is that triggering file uploads outside some click handlers can be rejected by some browsers.

Thanks @jkulhanek! This works for me for smaller files, but the websocket disconnects for me when I try to upload a larger file. (eg ~10MB)
I ran some experiments and chunking the file like this seems to send successfully, though, so we could maybe do that and then concatenate the file once all of the parts are received:
diff --git a/src/viser/client/src/ControlPanel/Generated.tsx b/src/viser/client/src/ControlPanel/Generated.tsx
index 450e1e30..3dd42f72 100644
--- a/src/viser/client/src/ControlPanel/Generated.tsx
+++ b/src/viser/client/src/ControlPanel/Generated.tsx
@@ -3,7 +3,10 @@ import {
   GuiAddTabGroupMessage,
 } from "../WebsocketMessages";
 import { ViewerContext, ViewerContextContents } from "../App";
-import { makeThrottledMessageSender } from "../WebsocketFunctions";
+import {
+  makeThrottledMessageSender,
+  sendWebsocketMessage,
+} from "../WebsocketFunctions";
 import { computeRelativeLuminance } from "./GuiState";
 import {
   Collapse,
@@ -232,15 +235,23 @@ function GeneratedInput({
               reader.onload = () => {
                 const arrayBuffer = reader.result as ArrayBuffer;
                 const payload = new Uint8Array(arrayBuffer);
-                messageSender({
-                  type: "GuiUpdateMessage",
-                  id: conf.id,
-                  value: {
-                    name: file.name,
-                    content: payload,
-                    mime_type: file.type,
-                  },
-                });
+                let start = 0;
+                while (start < payload.length) {
+                  sendWebsocketMessage(viewer!.websocketRef, {
+                    type: "GuiUpdateMessage",
+                    id: conf.id,
+                    value: {
+                      name: file.name,
+                      content: payload.slice(
+                        start,
+                        Math.min(payload.length, start + 32768),
+                      ),
+                      mime_type: file.type,
+                    },
+                  });
+                  start += 32768;
+                }
+                console.log("send");
               };
               reader.readAsArrayBuffer(file);
             }}

Another thing that would be cool is a progress bar like what's implemented for downloads:
https://github.com/nerfstudio-project/viser/blob/517d3543ae641896342a5a2c3d6f738c00a24d36/src/viser/client/src/WebsocketInterface.tsx#L894-L914
Not sure how much work that is, though.
Also curious if Rohan @THE-COB has any thoughts! Since you've spent more time thinking about this feature.

Thanks @jkulhanek! This works for me for smaller files, but the websocket disconnects for me when I try to upload a larger file. (eg ~10MB)
I ran some experiments and chunking the file like this seems to send successfully, though, so we could maybe do that and then concatenate the file once all of the parts are received:
diff --git a/src/viser/client/src/ControlPanel/Generated.tsx b/src/viser/client/src/ControlPanel/Generated.tsx
index 450e1e30..3dd42f72 100644
--- a/src/viser/client/src/ControlPanel/Generated.tsx
+++ b/src/viser/client/src/ControlPanel/Generated.tsx
@@ -3,7 +3,10 @@ import {
   GuiAddTabGroupMessage,
 } from "../WebsocketMessages";
 import { ViewerContext, ViewerContextContents } from "../App";
-import { makeThrottledMessageSender } from "../WebsocketFunctions";
+import {
+  makeThrottledMessageSender,
+  sendWebsocketMessage,
+} from "../WebsocketFunctions";
 import { computeRelativeLuminance } from "./GuiState";
 import {
   Collapse,
@@ -232,15 +235,23 @@ function GeneratedInput({
               reader.onload = () => {
                 const arrayBuffer = reader.result as ArrayBuffer;
                 const payload = new Uint8Array(arrayBuffer);
-                messageSender({
-                  type: "GuiUpdateMessage",
-                  id: conf.id,
-                  value: {
-                    name: file.name,
-                    content: payload,
-                    mime_type: file.type,
-                  },
-                });
+                let start = 0;
+                while (start < payload.length) {
+                  sendWebsocketMessage(viewer!.websocketRef, {
+                    type: "GuiUpdateMessage",
+                    id: conf.id,
+                    value: {
+                      name: file.name,
+                      content: payload.slice(
+                        start,
+                        Math.min(payload.length, start + 32768),
+                      ),
+                      mime_type: file.type,
+                    },
+                  });
+                  start += 32768;
+                }
+                console.log("send");
               };
               reader.readAsArrayBuffer(file);
             }}

Another thing that would be cool is a progress bar like what's implemented for downloads:
https://github.com/nerfstudio-project/viser/blob/517d3543ae641896342a5a2c3d6f738c00a24d36/src/viser/client/src/WebsocketInterface.tsx#L894-L914
Not sure how much work that is, though.
Also curious if Rohan @THE-COB has any thoughts! Since you've spent more time thinking about this feature.

I think what you're saying about chunking makes sense. I also think this is a better way of doing the upload. I feel like progress bar might be difficult unless we do it based on these chunks.

What is the limit? 1MB seems to be too much already.

I've added the upload progress, but the code is not pretty :/

Ok, 0.5MB seems to work fine.

Also, since the client cannot track the status of the message queue, it marks the file as downloaded earlier then the message queue is emptied. Perhaps throttling slows it down a bit. I'm not sure what would be the best solution here. Should we add ack messages?
Also, the messages seem to get duplicated/the handler is called twice. Why is this happening?

Please take a look and let me know if ack is necessary. I recommend enabling the print line in _gui_api.py on line 258.

I added the ack message and now it behaves quite nicely. The upload could be faster I guess, but the limitation is the websocket?
Please take a look.
@brentyi, is the code ok? Please feel free to move it around and do whatever you like with it.


Streamlit Issue Docker Image not found

On it - moved to pipeline v3, currently testing

Running on odroid-n2 at this moment. arm64arch. Can create an agent with gpt4free. Agent answers against request hi


Attemped it dereference unique_ptr that is null

hi guys:
I meet this problem in my practice and confused a little, I use java call it ( java version is jdk 11 and duck db version is 1.0.0),   the detail log is below:

Caused by: java.sql.SQLException: FATAL Error: Failed: database has been invalidated because of a previous fatal error. the database must be restarted prior to being used again.
Original error: "Failed: database has been  invalidated because of a previous fatal error. the database must be restarted prior to being used again.
Original error: "Failed: database has been  invalidated because of a previous fatal error. the database must be restarted prior to being used again.
Original error: "Failed: database has been  invalidated because of a previous fatal error. the database must be restarted prior to being used again.
Original error: "Attemped it dereference unique_ptr that is NULL!""""
at org.duckdb.DuckDBNative.duckdb_jdbc_execute(Native Method)
at org.duckdb.DuckDBPrepareStatement.execute(DuckDBPrepareStatement.java:143)
at org.duckdb.DuckDBPrepareStatement.execute(DuckDBPrepareStatement.java:197)

Can you please provide steps to reproduce this issue?


LayerZero V2 Adapter

Adds a LayerZero V2 adapter. Fixes LayerZero dependency clashing with our own forks of the project.

NPM installation error occurs occasionally due to the way that the forks are represented. :/

Line coverage fails because of LZV1 still being there + LZV2OApp 😢


How to log model?

Hi,
It would be great if there was an example showing how to log model architecture
Is that possible currently ?

^ I was just looking for the same. Is the only way to log the models via saving them as artifacts? If so, what would it take to set up model logging? I'd be happy to take a crack at it!

I dont know how much ehlp this is but this is what I have crafted to be able to do this kind of...
using AWSS3
using AWS: global_aws_config, AWSConfig
using Minio

function logImgArtifact(mlf,exprun,img;
  artifactName="$(Dates.datetime2unix(now())).png",
  s3cfg=MinioConfig("https://s3-api.lan.example.com", s3creds; region="us-east-1")
)
  save(artifactName, img)
  bucket = logartifact(mlf,exprun,artifactName)
  object_name = basename(bucket)
  open(artifactName, "r") do file
      file_data = read(file)
      Minio.s3_put(s3cfg, dirname(bucket)[6:end], object_name, file_data)
  end
  rm(artifactName)
  bucket
end

function logModelArtifact(mlf,exprun,model_state;
  artifactName="$(Dates.datetime2unix(now())).jld2",
  s3cfg=MinioConfig("https://s3-api.lan.example.com", s3creds; region="us-east-1")
)
  model_state = model_state |> cpu
  jldsave(artifactName, model_state=model_state)
  bucket = logartifact(mlf,exprun,artifactName)
  object_name = basename(bucket)
  open(artifactName, "r") do file
      file_data = read(file)
      Minio.s3_put(s3cfg, dirname(bucket)[6:end], object_name, file_data)
  end
  rm(artifactName)
  bucket
end

It just saves the model as an artifact that is in an s3 bucket. I'm currently exploring what needs to be done to make show up as an actual model in MLFlow.

Tieing to one commercial solution such as AWS might not be very generic. Artifacts can already be logged.

when I used the log function it just returns me a path, it doesn't save the files to the artifact location defined in the experiment (S3 bucket in my mlflow case). I wrote those two functions to make my life a little easier for pushing the artifacts to S3.


Add new graph status in prep for migration

Description
Fault allows us to remove the error tracking from
the graph support statuses.  This PR is a first step
in a small refactor to slim down the status.  Following
PRs will replace the existing status with the new one.
Does this PR need a docs update or release note?

[x] :no_entry: No

Type of change

[x] :broom: Tech Debt/Cleanup

Issue(s)

#1970

Test Plan

[x] :zap: Unit test

nevermind; unnecessary work


Event handlers in tags still get run after unmounting tag

Hi there, it seems that when unmounting a tag in Riot (and after the unmount event has been triggered by Riot), RiotControl still executes event handlers for stores events within that tag:
This means, if you have something like this in a tag
RiotControl.on("some_event", function(data) {
    //do something here
}

… the function will still get triggered even after unmounting the tag.

This problem seems to be a bit old, and so since there is no response, I'm leaving this comment for anyone else that may run into something similar. I ran into a related issue today, although I don't believe that this particular issue, or my specific issue, is a problem with RiotControl per se, but rather an understanding issue with Riot.
Firstly, the issue raised here: when unmounting a tag in Riot, the event handlers for triggered RiotControl events are still executed. This seems to be due to the fact that the event handler is passed as an argument to RiotControl, and with functions being what they are in JS, the function exists outside of the scope of the Riot tag that the function is defined in. Or in case I'm flying a little off course with that explanation, this in the context of the event handler function actually refers to the data store object and not the Riot tag.
So when unmounting your Riot tag, provide an unmount Riot handler and use it to do a RiotControl.off(...). Works exactly the same as for Riot observables (in fact, thats probably where you should be looking for assistance :) ). And while we're on the subject, I personally tend to find it more appropriate to introduce the RiotControl listeners in the 'mount' event on a Riot tag. So something like the following:
<script>
  var self = this
  this.on('mount', function(){
    RiotControl.on('my-datastore-event', function(){
      //do something
    })
  })

  this.on('unmount', function(){
    RiotControl.off('my-datastore-event')
  })
<script>

This actually results in another subtle problem: using RiotControl.off() seems to turn the listener off completely. So for example, assuming you have 2 Riot tags mounted, both doing something when some RiotControl store event is triggered. After un-mounting the one tag using the above code snippet, the event is no longer emitted by the RiotControl store. Since the second tag has already been mounted, there is no way to 'turn the event emission from the RiotControl store on again'. There are hacky, horrible ways around it, but those can actually be avoided by understanding the way Riot implements its observables. and so again, this stems from Riot I believe and not RiotControl. So to ensure that all tags work correctly, responding when they need to and removing the handlers correctly when the tag is unmounted, the above snippet can be updated as follows:
<script>
  var self = this

  my_handler_function() {
    //do something here
  }

  this.on('mount', function(){
    RiotControl.on('my-datastore-event', self.my_handler_function)
  })

  this.on('unmount', function(){
    RiotControl.off('my-datastore-event', self.my_handler_function)
  })
<script>

Notably, the function define is no longer 'inline' as the second arg to RiotControl.on(), primarly because its needed as the second arg to RiotControl.off(). This removes only my_handler_function from the RiotControl store event handlers when 'my-datastore-event' is emitted.
Hope that makes some sense, and helps someone else.

Thanks for this very usefull explanation, step by step !

@wetwiper This should be in the readme or something :)

I know this is trivial, but is there some way to remove this replication?


Bug fixes, zip HTML into output, Latest fMRIPrep 20.2.1

ENH: zip html report into output
FIX: when unspecified, don't pass 0 for dummy-scans
ENH: removes fsaverage from results
ENH: Update to nipreps/fmriprep:20.2.1
ENH: More tests
FIX: for --ignore and --participant-label, allow space separated lists

Tests pass, many people waiting for this.  Can do extra reviewing later.


tag vs long named codes (mainly on mobile)

How to reproduce this bug:

write a long word in a  tag
place it in a container with less width than the word
the  element will overflow the width of the container

What should happen:
The word should break and add another line - not overflow the container
This could be fixed with:
.fix {
ms-word-wrap: break-word;
word-wrap: break-word;
}

What happened instead:
The  block will overflow the container width. This should not happen, on mobile will break the viewport width and add a vertical scrollbar
Test case:

-http://codepen.io/wecodeart/pen/GrJyQY

This looks a lot like the change from https://github.com/zurb/foundation-sites/pull/9566/files
However, I'm not sure that fix is right here. Given that code can be whitespace sensitive, it seems like it should not autowrap... my sense is instead it should be something like max-width: 100%; overflow: auto;.
However, playing around in the codepen, that does not appear to work.  @ncoden any thoughts/ideas?

https://stackoverflow.com/questions/4611591/code-vs-pre-vs-samp-for-inline-and-block-code-snippets

Use  for inline code that can wrap and  for block code that must not wrap.  is for sample output, so I would avoid using it to represent sample code (which the reader is to input). This is what Stack Overflow does.

If it is inline, it should be able to wrap. We can not expect a scrollbar on an inline element. -> this PR.
It is in a block, it can have a scrollbar. We can expect the content of a block element to not wrap. -> #9566.

I'm not sure what the current status is on this. @IamManchanda do you want to look into it?

@kball I tend to concur with nicolas here

 should be used to not wrapping content
=> http://codepen.io/IamManchanda/pen/mmPRyK
But yes there's a way to get this fixed as suggested by nicolas codepen
https://codepen.io/ncoden/pen/WRQLOL
But i think same like stack overflow .... i feel people should be encouraged to use

 for non-wrapping content (aka docs)!

Poke @kball @BicanMarianValeriu awaiting reply ??

 does not make any sense. Let's try to not use HTML tags to "get this or that result".
I told above what are the meaning behind pre and code. code is inline so it should be able to wrap, pre is a block so it should be able to have a horizontal scrollbar.
So basically, we have something like:
code {
    max-width: 100%;
    word-wrap: break-word;
}
pre {
    display: block; /* normalize probably already do it */
    overflow: auto;
}

This is the default behavior we could expect from these tags. However, you know I don't like to apply default properties on tags because we cannot be certain about the behavior we expect from code and pre we will be the same for everyone. So we should create .code and .pre also (or .code and .code-block ?)

@IamManchanda You can create a PR for that and poke me. 😉

@ncoden so basically you are saying this below ?? is it so

Here is an example of inline code. I will break.

    Here is an example of code block. I will x-scroll.

Here is an example of inline code. I will break.

    Here is an example of code block. I will x-scroll.

wathever

@ncoden @IamManchanda what's the status here? Thanks!

@colin-marshall I take care of it.


Demo page in playground

Need UX and product input to define what's attractive demo page
Example
https://reinvent.playground.opensearch.org/app/dashboards#/view/084aed50-6f48-11ed-a3d5-1ddbf0afc873?_g=(filters:!(),refreshInterval:(pause:!f,value:900000),time:(from:'2022-11-22T05:28:45.013Z',to:'2022-11-29T05:28:54.583Z'))&_a=(description:'Analyze%20mock%20global%20orders%20and%20revenue%20from%20Multiple%20Data%20Sources',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'%5BMultiple%20Data%20Sources%5D%20Global%20Revenue%20Dashboard',viewMode:view)

The work happening for the ML playground would be a great way to satisfy this issue.


Hears for file attachments

This add the ability to the BotMan to hears file attachments for facebook, telegram, slackrtm and botframework.

@SergiX44 thank you! Please rebase your base branch.
And could you add a test to your driver to make sure that it gets matched from the driver manager?
See: https://github.com/mpociot/botman/blob/master/tests/Drivers/FacebookAudioDriverTest.php#L127-L133

@mpociot Mmh there's already those checks:
https://github.com/SergiX44/botman/blob/master/tests/Drivers/TelegramFileDriverTest.php#L80-100
https://github.com/SergiX44/botman/blob/master/tests/Drivers/FacebookFileDriverTest.php#L127-L133

Yes, but this just tests that the driver itself matches the request.
The other test makes sure that the DriverManager returns the correct driver and that no other drivers are matching the same payload.

Sorry but I don't understand the check that you want, the link that you have give to me it's the same check that i do in the facebookfiledriver.

Oh sorry, I somehow misread your links. Your tests are correct 👍


Provide command to create an integration with Kaoto

as first iteration, the command should take a name as input and create the file on the current selected folder in the tree if any, otherwise at root of the workspace. To be available there must be an opened folder/workspace. The command should automatically open the Kaoto UI with the file.

This is now covered through other extensions


Skipping irrelevant test methods

Description
Not handled exception or a failed assertion inside a method tagged with @BeforeMethod annotation results in all subsequent test methods within the same class being skipped. That is expected and reasonable behaviour. However, when such a class extends a base class with at least one method annotated with @BeforeClass then no other test class extending base class will run.
Note: replacing @BeforeClass with @BeforeTest fixes the problem but cannot be applied under all circumstances since it alters the execution flow.

Rearrange tests in testng.xml so that the one with @BeforeMethod runs last. Even if it's skipped all other tests already had a chance to run.

Environment setup

Windows 7
JDK 1.7.0_07
Maven 3.0.4
TestNG 6.8

I'd like to know whether it's intentional or not. Please find a sample Maven project attached to reproduce the issue.
https://gist.github.com/3839822

Should be fixed with #471


Client reconnect fix

Closes #1076
--
I separated it in several commits to make the review easier.

8969a2d5ff04d4dd9710b6b3e32df149a60791b1 Add test to ensure we can access tasks on restart
3001f383ddea3ab875bcc2e0d8a834a7e93a936a Fix failure to connect to shim on daemon restart
294f79613e27809e04b79b890b1cf1d56d07fb95 Share Dialer and DialAddress between client and shim
7e7c0eaac14ae25f68cb061fad69b35eae7a3c65 Check credentials when connecting to shim
3bda8e724faa59150706b13914ceda5d369a3f74 Update unix dialer to keep retrying if socket is gone

@ijc could you give this version a run and see if it reconnects correctly when used with swarmd?

Oups, yes it was while I was debugging, will put back buf in there
On Fri, Aug 11, 2017, 7:34 AM Michael Crosby<EMAIL_ADDRESS>wrote:

@crosbymichael commented on this pull request.
In client_test.go
https://github.com/containerd/containerd/pull/1338#discussion_r132700399
:

  	"--log-level", "debug",

)

cmd.Stdout = buf

cmd.Stderr = buf

if err := cmd.Start(); err != nil {

	cmd.Wait()

}, os.Stdout, os.Stderr)

We are getting all the daemon output in the test logs with this
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/containerd/containerd/pull/1338#pullrequestreview-55813024,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APUifpIa50Tvco6TD2d2NbQjG9JEjD3Iks5sXGZ0gaJpZM4O0HMk
.

--
Sent from my phone.

Codecov Report

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

@@           Coverage Diff           @@
##           master    #1338   +/-   ##
=======================================
  Coverage   35.56%   35.56%
=======================================
  Files          23       23
  Lines        2874     2874
=======================================
  Hits         1022     1022
  Misses       1627     1627
  Partials      225      225

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 f27f8dd...8969a2d. Read the comment docs.

LGTM

@ijc could you give this version a run and see if it reconnects correctly when used with swarmd?

@mlaventure I had to hack things up a bit on the swarmd side to take advantage (and to rebase onto this newer version of containerd), but yes, it appeared to work nicely, thanks.


nerdctl: init at 0.2.0

Motivation for this change
Package nerdctl
There is nerdctl-unwrapped which is as-is, and nerdctl which is wrapped with cni-plugins and buildkit to allow for networking and building containers.
Since there is nerdctl and nerdctl-unwrapped let me know if I need to change my commit message to fit contributing
https://github.com/AkihiroSuda/nerdctl#install
I'm not sure why podman and cri-o can get away with cni-plugins just being arguments & not even in the PATH.
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/podman/wrapper.nix#L13
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/cri-o/wrapper.nix#L11
@adisbladis @zowoq
nerdctl will explicitly look for several cni-plugins binaries in /opt/cni/bin which is overridden with the env var CNI_PATH in the wrapped version.
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS (x86_64)
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[X] Ensured that relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 106546 run on x86_64-linux 1

2 packages built:

nerdctl
nerdctl-unwrapped

I'm not sure why podman and cri-o can get away with cni-plugins just being arguments & not even in the PATH.

Both get cni-plugins from their module, the wrappers are only used for things they can find in $PATH without needing to set any config. We could set the path to cni-plugins in the wrapper but neither of them will work without enabling the module (or doing some manual setup on non-NixOS) anyway.

So if I understand correctly the binary itself during normal use doesn't require it but it's the module which starts the daemon that then points to the cni-plugins dir?
In this case with nerdctl I belive it needs the cni-plugins itself regardless of whether containerd is using them so adding it via the wrapper looks like the right choice

Result of nixpkgs-review pr 106546 run on x86_64-linux 1

2 packages built:

nerdctl
nerdctl-unwrapped

So if I understand correctly the binary itself during normal use doesn't require it but it's the module which starts the daemon that then points to the cni-plugins dir?

Neither will work at all without the module or the user doing manual setup. Besides cni-plugins they require config files hardcoded to etc/containers.


How to cache imported modules from remote sites

I´m using a common module across different engine instances by adding it using:
engine.DocumentSettings.AddSystemDocument()
Into the common system document lines, I have some imports from https://unpkg.com/
Like:
import myPkg from<EMAIL_ADDRESS>Everything works fine, but I did notice that the engine dumps the package every time an engine is used, with a significant performance penalty.
Is it possible to keep these files in cache?
Thanks in advance.

Hi @faramos!
ClearScript's default document loader maintains a cache – essentially a Uri-to-Document dictionary – that holds raw document content across engine instances.
Therefore, unless we're missing something, you probably don't need to use AddSystemDocument. Simply enable document downloads via DocumentAccessFlags.EnableWebLoading.
However, ClearScript has no persistent document cache; that is, it doesn't have one that holds document content across process lifetimes. Is that what you're looking for?
Thanks!

Please reopen this issue if you have additional questions or thoughts on this topic. Thank you!


Get dependency information from idea libs?

Presumably this would a large amount of work but, It'd be nice if we could automatically detect conflicts on libraries included with the idea SDK.
For instance someone including 'org.apache.httcomponents:httpclient:4.01' has a conflict with idea-xx-123.123.23/lib/httpclient-4.4.1.jar. It would be nice if configurations.resolutionStrategy.failOnVersionConflict() has more info about these dependencies to have an explicit build failure and potentially prevent a runtime conflict.
Right now we're doing something kind of like this :
configuration {
  resolutionStrategy {
        failOnVersionConflict()

        def provided = [["org.apache.httpcomponents", "httpclient"],
                        ["com.google.guava", "guava"]]
        eachDependency { DependencyResolveDetails dependency ->
            if (provided.contains([dependency.requested.group, dependency.requested.name])) {
                throw new GradleException("build failure")
            }
        }
    }
}

But it seems like a lot of work to really cover everything in idea/lib?

Yes, first of all it's quite a lot of work to cover everything in idea/lib and I don't think that it should be done in this plugin, at least in its current state. When IntelliJ will be migrated to the maven/gradle model (and I hope it will happen eventually) we'll get conflicts resolving automatically.
In the second, have you ever got runtime conflicts in such cases?

I can trigger the build failure if I include those libraries. I would have to do something insane to verify all the libraries.  The only thing I can think of is parsing filenames in the idea/lib folder and trying to correctly guess the dependency information (that's for another day)

I see.
At the moment it's not even possible to automatically retrieve group-id for every jar in idea/lib/. So if someone ready to make some mapping like filename.jar -> group:artifact:version I'd be happy to merge it.

It might be safer to apply something like https://maven.apache.org/plugins/maven-shade-plugin/
Anyway, I was thinking that version conflicts should not happen as all plugins are loaded using separate classloaders:

plugins are loaded in separate class loaders in a special manner to prevent conflicts between plugin and core versions of same libraries

Doesn't it work anymore?

related https://youtrack.jetbrains.com/issue/MP-2427

FTR the list of bundled 3rd party libraries is available from https://www.jetbrains.com/legal/third-party-software/


Rider plugin text and landing

Parent - #1488

[x] Texts for Rider plugin
[x] Gifs for Rider plugin
[x] Articles about VSharp
[x] Plugin.xml description
[x] Change notes
[x] Icon

Closed as released in 2022.12


ref(TrafficTarget): update requirements for TrafficTarget

Resolves #188
Slack thread: https://cloud-native.slack.com/archives/C0105GB1BJQ/p1600760173001900

@michelleN can you please fix:
**Compatible With:** specs.smi-spec.io/v1alpha4-WD

Looks like this clarifies it - thanks, @michelleN!

This must makes much sense. This statement reinforces that there are three required elements of what comprises a TrafficTarget. ✔


Question: Canceling sagas from "upstream"

This is almost the inverse of this issue.
In summary, I have a project where the user can generate an entity called an audience. It can take several seconds for the audience to be created through a series of asynchronous steps, only one audience can be in view at a time, and they may create several audiences in series.
More concretely: the user has a large set of controls that they can interact with to generate a new audience. Any time they manipulate the controls, a new audience is requested from the server, but the controls remain "unlocked" for the user to further refine their input and generate subsequent audiences. I need to ensure that the last audience they requested is the one being shown, but I need to be able to generate the entities in parallel. Here's what I've come up with (somewhat simplified):
function* createAudienceSaga (getState) {
  let action, cancelLastAudienceBuild = () => {};

  // When a new audience create action comes along, cancel the previous one
  // by resolving the currently-active promise. We're using a promise here
  // so that `race(...)` calls can be our mechanism for determining cancelation
  /*eslint no-cond-assign:0 */
  while (action = yield take(CREATE_AUDIENCE)) {
    cancelLastAudienceBuild();

    let transaction = new Promise(r => cancelLastAudienceBuild = r);

    yield fork(buildAudience, transaction, action.payload);
  }
}

// Create a new audience
function* buildAudienceFromPlaceId(tx, params) {

  // Step 1: retrieve the place that the user wants to build the audience in
  const { place, canceled_0 } = yield race({
    place: call(api.places.get, params.placeId),
    canceled_0: tx
  });

  // If the user has fiddled with the UI, we are generating a new audience
  // in parallel and we can bail out of this one before doing any more work
  if(canceled_0) { return; }

  // Update the place information in the app state ASAP to show the user:
  yield put(showPlace(place));

  // Step 2: Create a new audience with the provided definition
  // This does not create the audience, but rather returns the audience ID,
  // which we have to request separately. The creation process is usually
  // very fast, but the step 3 can take several seconds.
  const { audienceId, canceled_1 } = yield race({
    audienceId: call(createAudienceWithDefinition, {
      definition: params.definition,
      geography: [makePlaceGeography(place)],
      product_id: params.product
    }),
    canceled_1: tx
  });

  // Again, check if a new transaction has begun before continuing:
  if(canceled_1) { return; }

  // Step 3: Retrieve the new audience data for display
  // As mentioned, this step can take several seconds for certain parameters.
  const { audience, canceled_2 } = yield race({
    audience: call(api.audience.get, audienceId),
    canceled_2: tx
  });

  // Last time, check to see if the user has changed the controls before
  // dispatching the new audience to the app state:
  if(canceled_2) { return; }

  yield put(showAudience(audience));
}

Yes, I know this is a pathological use case. I can't fix it, but I'm looking for a straightforward way to box this complexity up and not have to think about it.
It would be nice to have a feature on tasks that lets you cancel them from the outside. I don't know how that would work in practice without altering the API for tasks pretty significantly, or altering the internals of the saga state machine (which I haven't looked at closely and don't fully understand).
My other thought is that there's a simple and obvious way to do this that I'm not seeing.

It occurs to me that I should be using the built-in exception system:
function* createAudienceSaga (getState) {
  let action, cancelLastAudienceBuild = () => {};

  // When a new audience create action comes along, cancel the previous one
  // by resolving the currently-active promise. We're using a promise here
  // so that `race(...)` calls can be our mechanism for determining cancelation
  /*eslint no-cond-assign:0 */
  while (action = yield take(CREATE_AUDIENCE)) {
    cancelLastAudienceBuild();

    let transaction = new Promise(r => cancelLastAudienceBuild = r);

    yield fork(buildAudience, transaction, action.payload);
  }
}

// Create a new audience
function* buildAudienceFromPlaceId(tx, params) {
  try {
    let [place] = yield [call(api.places.get, id), tx];
    yield put(showPlace(place));

    const [ audienceId ] = [
      call(createAudienceWithDefinition, {
        definition: params.definition,
        geography: [makePlaceGeography(place)],
        product_id: params.product
      }), tx ];

    const [ audience ] = yield [call(api.audience.get, audienceId), tx ];

    yield put(showAudience(audience));
  } catch (e) {
    if (e instanceof TransactionCancelledError) {
      console.info("Transaction cancelled", id, product);
      return;
    } else {
      throw e;
    }
  }
}

This resolves the issue to my satisfaction.

In your 2nd solution, this code
let [place] = yield [call(api.places.get, id), tx];

If call(api.places.get, id) resolves first, it'll have to wait also for tx to complete (which always rejects in your code)
The task cancellation would handle this case in a more concise way, until #26 is merged, I'd also use the builtin exception system, but would opt instead for a more declarative way
// a higher order function
function buildTx(cancelEffect) {
  // returns a reusable guarded call subroutine
  // will throw if cancelEffect completes before call(fn, ...args)
  return function* guardedCall(fn, ...args) {
    const {result} = yield race({
      result: call(fn, ...args),
      cancelEffect
    })

    if(result)
       return result
    throw new TransactionCancelledError()
  }
}

function* createAudienceSaga (getState) {
  let action
  const nextCreateAudience = take(CREATE_AUDIENCE)

  /*eslint no-cond-assign:0 */
  while (action = yield nextCreateAudience ) {
    yield fork(
        buildAudience,
        nextCreateAudience,
        action.payload);
  }
}

// Create a new audience
function* buildAudienceFromPlaceId(cancelEffect, params) {
  const tx = buildTx(cancelEffect)
  try {
    let place = yield call(tx, api.places.get, id);
    yield put(showPlace(place));

    const audienceId = yield
      call(tx, createAudienceWithDefinition, {
        definition: params.definition,
        geography: [makePlaceGeography(place)],
        product_id: params.product
      });

    const audience = yield call(tx, api.audience.get, audienceId);

    yield put(showAudience(audience));
  } catch (e) {
    if (e instanceof TransactionCancelledError) {
      console.info("Transaction cancelled", id, product);
      return;
    } else {
      throw e;
    }
  }
}

Thanks! I'll give this a look over and attempt to grok it.

I ended up taking your higher-order function and making it lower-order. This makes it easier to test:
export function* guard(tx, ...args) {
  const { result } = yield race({
    result: call(...args),
    tx
  });

  if(result) {
    return result;
  } else {
    throw new TransactionCancelledError();
  }
}

// Create a new audience from a place and product id
export function* buildAudienceFromPlaceId(tx, id, product) {
  try {
    // Step 1: retrieve the place that the user wants to build the audience in
    let place = yield call(guard, tx, api.places.get, id);
    // ...

It obscures intent somewhat because the actual function being called is deep in the arguments list, but it makes the test very straightforward:
import { guard } from 'wherever';

let tx = new Promise(() => {}),
    iterator = buildAudienceFromPlaceId(tx);

assert.deepEqual(
    iterator.next().value,
    call(guard, tx, api.places.get, placeId));

I see, you can also define a higher order effect creator
export function* guard(tx, ...args) {...}

const guardedCall = (guard, tx) => call(guard, tx, api.places.get, id);

// Create a new audience from a place and product id
export function* buildAudienceFromPlaceId(tx, id, product) {
  const callWithTx= guardedCall(guard, tx)
  try {
    // Step 1: retrieve the place that the user wants to build the audience in
    let place = yield callWithTx(api.places.get, id);
    // ...

I had also considered (but have not tested) the following because it uses private values that might break:
// A saga that waits for CREATE_AUDIENCE actions and uses the data to construct and load a new audience:
export default function* (getState) {
  let action, lastAction;

  while (action = yield take(CREATE_AUDIENCE)) {
    if(lastAction && lastAction.isRunning()) {
      lastAction._generator.throw(new TransactionCancelledError());
    }
    lastAction = yield fork(buildAudience, action.payload);
  }
}

Not sure what the implications of that are.

I see, you can also define a higher order effect creator

Yeah. Again, it means peeling the function instance out of the iterator.next().value, which I'd rather avoid if possible. If I use a lower-order function, I can share the function more overtly between the application code and tests, at the cost of somewhat obscured intent. Either way has tradeoffs, and I might change my mind later.

I had also considered (but have not tested) the following because it uses private values that might break

I wouldn't recommend this. As internal representation may change (actually already changed in the current master branch).

Yeah. Again, it means peeling the function instance out of the iterator.next().value

Maybe I missed something, but is there any issue with the following
code
export function* guard(tx, ...args) {...}

export const guardedCall = (guard, tx) => call(guard, tx, api.places.get, id);

// Create a new audience from a place and product id
export function* buildAudienceFromPlaceId(tx, id, product) {
  const callWithTx= guardedCall(guard, tx)
  try {
    // Step 1: retrieve the place that the user wants to build the audience in
    let place = yield callWithTx(api.places.get, id);
    // ...

test
import { guard, guardedCall } from 'wherever';

let tx = new Promise(() => {}),
     callWithTx = guardedCall(guard, tx),
     iterator = buildAudienceFromPlaceId(tx);

assert.deepEqual(
    iterator.next().value,
    callWithTx(api.places.get, placeId));

The result of a higher-order function is always unique:
function add(a) { return function(b) { return a + b; } }
assert(add(5) === add(5)); // untrue, fails

This means that the call to guardedCall in the generator won't equal the equivalent call in the test.

The result of a higher-order function is always unique:

yes, but in our current case we're not comparing the resulting functions but the final value
function add(a) { return function(b) { return a + b; } }
assert(add(5)(3) === add(5)(3));

assert.deepEqual(
  guardedCall(guard, tx)((api.places.get, placeId),
  guardedCall(guard, tx)((api.places.get, placeId)
)

It's not explicit in the docs, but all effect creators like call are pure functions. for example a call returns an object {fn, args}, so as long you're providing the same inputs, which is the case above for all the 4 arguments, you can expect the same output (in the deepEqual sens)

Oh yeah. I knew that but wasn't really understanding what was going on. Concern retracted.
Thanks for all your help, by the way!


fix: Make rightInverse_inv use RightInverse.

fix: Make rightInverse_inv use RightInverse.

Is this ready for review? If yes, please add the awaiting-review label.
I see that you have other PRs open without any labels: if you don't mark them as ready for review, it's likely nobody will look at them (or even see they exist, as they wont appear on the reviewing queue).

Note: I have pushed an update to the lean toolchain because this PR was on a buggy version of the toolchain. WARNING: checking out old commits of this PR using v4.2.0-rc2 or v4.2.0-rc3 can cause lake clean to delete your mathlib folder! If you need to do so, make sure to delete lakefile.olean manually before running any lake commands.

Is this ready for review? If yes, please add the awaiting-review label. I see that you have other PRs open without any labels: if you don't mark them as ready for review, it's likely nobody will look at them (or even see they exist, as they wont appear on the reviewing queue).
(this PR looks good, and I will merge it, but I want to be sure you saw that message first)

@RemyDegenne Yes, I should have added that label before and have done so now.  Thanks!

Thanks!
bors r+


[Code analysis] Reduce compilation messages count

When working on the Github action, I saw that there was quite a lot of message from the code analysis. I Wanted to try to reduce the number of message given by the code analyser. I don't adhere to everyone of them but some are quite handy at improving the code readability / security / performances.
From 487 we are down to 262.
Those modifications are on the "Safe side" and should not impact the way the program work. I tested with the A10 and everything works fine.
Every "Fix" is in it's own Commit
With all this I already spotted some part of the code that I want to modify to simplify some things.
Current master:

This PR:

That's a good start :-)

Top notch!


Remove sites.google.com

Thanks Jaco!

No issues, entirely my fault - you were crystal clear as to why it was added, but when looking/reading/merging the penny as to the impact didn't drop for me. So the process failed slightly on the review side - it happens when you are on a phone...
There are a number of these hosting domains that gets used by scammers the whole time - sadly we cannot block them outright since they do host other valid content.