Connection incredibly slow

For a <100MB db, with <100 tables and approx. 1000 stored procedures (procedures are mostly coming from postgis, geometry, and other default functions, only 7% of the procedures are custom):
loadTables: average 750ms
loadFunctions: average 15000ms
Connection string used: postgres://user:pass@host:port/database?ssl=true
massive.connect is being called before each request, passing that string as connection string.
Therefore, massive.loadTables (index.js) is being called every time as well as massive.loadFunctions
This is performed from localhost, measured with console.time and console.timeEnd, and using pg.connect is almost instantaneous.
Am I missing something?
Extensions being used:
postgis_topology, postgis, plv8, plpgsql, topology, fuzzystrmatch

Interesting. Possibly we should be checking to see if these items are already loaded during the call to connect. Seems like since tables, queries (stored in the local directory as .sql files), and functions all represent structural items unlikely to be modified during production use by an application, this should be safe.
Then just make sure that any actions which DO cause structural changes to any of these things (and I don't think there are any at the moment) refresh the Db namespace when complete.
Could probably use some additional investigation as to the primary cause of the lag though. seems awfully slow for executing a couple information_schema queries, and iterating the result (even with some of the processing we have going on). Maybe the recursive walk through the file structure in LoadQueries()?
That's a lot of functions to load, but again, all that's really happening there is reading the function name, they aren't being executed or anything.
Interesting to see what thinks, but I will do some investigating tomorrow too. Meantime, any additional info you find will be most helpful.
@robconery  - Time maybe to set up a larger-scale perf test/demo against a production-size dataset, with a meaningful number of tables/functions, and a healthy dose of query files in the project directory?

Additional info:
node massive.js -c postgres://user:pass@host:port/database?ssl=true
outputs:
runner
connect null
query null
loaded tables
runner
connect null
query null
loaded functions

Where, in runner.js I added

console.log("runner"); after DB.prototype.query = function () {
console.log("connect",err); after assert.ok(err === null, err);
console.log("query",err); after db.query(args.sql, args.params, function (err, result) {

Where, in index.js I added

console.log("loaded tables"); after massive.loadTables(function(err,db){
console.log("loaded functions"); after massive.loadFunctions(function(err,db){

I think the time you are seeing for loadFunctions() is also including the call to LoadQueries(). Are you loading any query (.sql) files from the project directory as well?

In Navicat:
tables.sql:
select tc.table_schema as schema, tc.table_name as name, kc.column_name as pk
from
    information_schema.table_constraints tc
    join information_schema.key_column_usage kc
        on kc.table_name = tc.table_name
where
    tc.constraint_type = 'PRIMARY KEY'
order by tc.table_schema,
         tc.table_name,
         kc.position_in_unique_constraint;

Outputs 47 records
Takes, by itself, 0.25-0.30 secs - which is already unacceptable.
and functions.sql:
SELECT routines.routine_schema as "schema",
routines.routine_name as "name", routines.data_type,
(
  select count(1) from information_schema.parameters
  where routines.specific_name=parameters.specific_name
    and parameter_mode = 'IN'
) as param_count
FROM information_schema.routines
WHERE routines."routine_schema" NOT IN('pg_catalog','information_schema')
AND routines.routine_name NOT LIKE 'pgp%'
order by routine_name

Outputs 1245 records
Takes 8-9 secs

@xivSolutions
node massive.js -c postgres://user:pass@host:port/database?ssl=true does not load anything, it just runs the connection only - I didn't modify anything there.

This is accelerating things quite a bit (but still a unusable 1/2 sec response):
functions.sql:
SELECT routines.routine_schema as "schema",
routines.routine_name as "name", routines.data_type
FROM information_schema.routines
WHERE routines."routine_schema" IN('public')

I suspect postgis to be the main problem, but still, this just raises a flag.
Why load all tables and all functions every time whereas functions and tables could be passed as a String for free?

That's a lot of tables, and a whole lot of functions. My first reaction is that we should probably test to see which functions are from PostGis. My second reaction is that we should enable some kind of filter for table reads - meaning "Only load these" or "this pattern".
@vintagexav when you run the function sql do you see anything that would mark the function as Postgis? Also, would killing the function read help you in this case?
Finally - a schema or two on your table would help as well - @xivsolutions we should have the ability to load only a particular schema.

@robconery - love that idea (filterable on schema). I am also wondering what you think of doing the table/query/function load the first time you fire up the application, and from there checking to see if that stuff is already loaded before calling three backend queries every time a connection is made?
As stated previously, this does not seem like the type of stuff that is likely to change often in a running production application.
I would still want to see some better load times on some of this, and check to see if this is specific to the db/machine/configuration/whatever @vintagexav is working with, or in general is there some perf issue we should address.

For some reason I didn't catch the nuance of the connection use here. That's a whole other issue:

massive.connect is being called before each request

That shouldn't be the case, and it's not how Massive was designed (at least not how I use it). The idea is that you "bring Massive online" when the app starts. You capture the instance somewhere (maybe in your own module which is cached) and use it from there.
@vintagexav would this help your situation? @xivSolutions maybe we should make this use case clear in the README?

Agreed on the connection usage, and example for the README.
However, I am concerned about the 300-500 ms query times he indicates when running the tables query in Navicat - I can't replicate those results here on my machine with other sample data (using pgAdmin, and granted his database/table/function structure sounds like a unique snowflake). I get a more traditional 20-30 ms execution time. And the super-long 'load_functions' time, 1000-ish rows or no, seems suspicious as well. May need to pull down postgis and mess with it.
I think we might want to set up a full-size/standard perf/demo db, and configure some samples. Maybe in a separate repo or something. Would be good, though, to be able to have some points of comparison when these things pop up.

@vintagexav RE: Conncetion usage aside, I am still concerned with your query execution times in Navicat:
In Navicat:

tables.sql:

select tc.table_schema as schema, tc.table_name as name, kc.column_name as pk
from
    information_schema.table_constraints tc
    join information_schema.key_column_usage kc
        on kc.table_name = tc.table_name
where
    tc.constraint_type = 'PRIMARY KEY'
order by tc.table_schema,
         tc.table_name,
         kc.position_in_unique_constraint;
Outputs 47 records

You say this is taking 250-300 ms?
If I run this very same query against the chinook database (30 records) I see execution time of ~30 ms using pgadmin. Not sure what could be different about the same query in your db, since it seems this should be unaffected (or marginally affected at best) by having postgis present (just a small handful of additional tables). Maybe a ton of key weird usage stuff to process in the join becuase of postgis? You are reporting an order of magnitude difference here, outside of the Massive context.
If you are in fact getting execution times of 250-300 ms for this query in Navicat, then something is different, either in Navicat (which I doubt) or about your db. ??

@vintagexav - Can you be bothereed to pull down this (slightly modified) implementation of the Chinook database, and running the tables query against it in Navicat and pgadmin? I am interested in comparing apples to apples here, and see if, in addition to the connection usage thing, there is something else going on?

I will try to look at it next week @xivSolutions.
I'd be interested seeing what's the best way to call massive.connect only once @robconery

@vintagexav I'm happy to offer ideas - if you want to share some code I can try to help out. One way I've seen people do this is app.set("db") with Express (if that's what you're using) or, as mentioned, having a dedicated module that creates an instance and keeps it alive (though Massive does this already).

I'm trying to come up with a very generalized example to add to the README. The challenge for me is, there are many different ways to approach the problem, depending on your needs and somewhat, how well you know Node - I'm still working on that second item ;-)
In the meantime @vintagexav, not knowing if you are using express, something else, or your own hoand-rolled routing, consider this brute-force/dumb-ish example to get started:
pretend you have a module you wrote that magically processed and routes requests:
var assert = require("assert");

var Route = function(req, res, db) {
  this.db = db;
  //...Magic happens....
  // ... and the request is properly routed to:
  this.get(req, res);
}

Route.prototype.get = function (req, res) {
  // return all the artist records:
  this.db.artist.find(function (err, artists) {
    assert(!err, err);
    res.writeHead(200, { 'Content-Type': 'application/json', "Access-Control-Allow-Origin":"*" });
    res.write(JSON.stringify(artists));
    res.end();
  });
};

module.exports = Route;

Then, consider an index.js file for your project like this:
var massive = require("massive");
var path = require("path");
var Route = require("./lib/route");

var connectionString = "postgres://massive:password@localhost/chinook";
var scriptsDir = path.join(__dirname, "..", "db");

// stash the db here:
var db = {};

var configure = function(next) {
  massive.connect({
  connectionString : connectionString,
  scripts : scriptsDir}, function(err, res) {
    db = res;
  });
  // other configuration crap...
  next();
};

var handleRequests = function() {
  var http = require('http');
  var port = 1337;
  http.createServer(function(req, res) {
    var route = new Route(req, res, db);
  }).listen(port);
};

// Start things up...
configure(handleRequests);

It's crude, and you wouldn't necessarily do things this way in a real application, but the concept is there anyway. @robconery if you see anything too dumb in the above, feel free to tune it up.
I will say, coming up with an example that is clear is challenging, given the many ways one could approach this. I'm going to add something to the README that hopefully clearly illustrates the idea, and is equally clear that there are many ways to skin the cat.

app.set('db',db_instance) and eq.app.get('db') seems the most straightforward - definitely worth to go in the README.
However:

10-20 seconds to init the db is a lot of downtime every time the app is rolled out.
Perfs are still just so bad. a SELECT FROM WHERE id = 1 on a table with approx. 1k rows is <100ms using node's pg.js connect and query functions whereas it sums up above 500ms for Massive (and I am rounding in favor of Massive)

FYI (@xivSolutions) all my tests here and above are performed over network, not localhost.

Ah.. Ok. Didn't want to assume you were using Express, and should have caught the network host in your previous comment.
that IS some odd perf though...when you consider that with run() all that's really happening is Massive plucks out the args needed, and passes things on to pg `query()' anyway, then returns the result. All that expensive initialization is already done, so hard to see where the extra 400 + ms is coming from...

Gonna try to break it down.

Looks like pg.js is optimizing use of the connection / leverages cache.
The first request with pg is pretty much as slow as massive select.
However the next ones are significantly faster with pg.
*local srvr->real_world db: *
1st pg select: 500ms
1st massive select: 500ms
2nd pg select: 100ms
2nd massive select: still 500ms
*real srvr->real_world db: *
1st pg select: 25ms
1st massive select: 25ms
2nd pg select: 1-2ms
2nd massive select: still 25ms
Then I broke down each request.
I realized pg-connect is 0ms after the first request (then sometimes reaches back to similar level than massive-connect) whereas massive-connect is always as bad as 90% of the time needed to perform the select and never reaches the close to null time that pg-connect reaches.

I wonder if this is related to pg client or connection pooling? Some where I think we're missing something silly here.

I wonder if because we are passing the db instance in the call to done() (making it a "truthy" value) we are destroying the client with each call (per this section of briancc's wiki entry), and failing to take advantage of the client pooling?

Let's keep this thread on track. @vintagexav the first thing that we need to establish is that you see this slow down (10-20s) for your situation (100+ tables, 1200+ functions). This is not our targeted Use Case.
That said, it's something I very much want to accomodate. The queries as you see them, on their own, are not necessarily slow. What makes this whole thing slow is that Massive is trying to wrap close to 2000 objects and callbacks which is utterly ridiculous.
To keep us on track: you need to get this spin up time to come down, I need to see if we can help you with the way you're instantiating Massive. Both of the these things are doable and simple. There are 3 things to consider:

can you use a schema to namespace the things you want Massive to work with
can we come up with a filter strategy so that you can decide, on your own, which tables/functions you want spun up (if any)
is Massive the right tool here

The latter is a question we haven't brought up yet, but I'll be honest in saying that I didn't design it for your scenario (as valid as it is) and I'm not particularly inclined to add a bunch of code to accomodate for this scenario as I don't find it to be typical.
Before you get mad at me :):):) I think there's a good chance we can get some good middle ground that helps us all.
So - action items here are 1) help us come up with a filter strategy for you. We need to load tables/functions - what would work for you? and 2) would using a schema mitigate some of your issues?
I really mean it when I say thank you for your time. Please don't take any comment above as dismissive.

I think that might have been it (or, part of the issue, anyway). Remove the db passed to the call to done() in runner.js and all the tests run over 2X faster (when using the List reporter, which gives individual test execution times). @robconery did I miss something here? I did a fix, and pushed before I saw your comment above, but the result was immediately apparent in test execution times.

As long as we're sure the connection is freed up - yay!

According to brianc's wiki, calling done() returns the client to the pool, ready for another connection, but calling done(db) (or passing any "truthy" value) actually causes the client to be removed from the pool and and destroyed.
@vintagexav - can you dig into node_modules (if you pulled massive down from npm - this fix isn't in there yet), do the same fix, and see if it at least corrects the consistency issues between pg and massive execution times for your project? there will likely still be long-ish load for your specific case, but interested to see the impact of the change here too. Then we can look at some of the things Rob suggests for filtering namespaces.
I like the filtering idea in general anyway...

Radical - great catch John :).

@robconery another suggestion would be to keep a cache of pools, and return the same pool for the same connectionstring/parameters...  That should reduce the chances of accidentally creating multiple pools that load in the same resources... I did this for mssq-ng which worked out pretty well.

Thanks @tracker1 - but the issue isn't connections (as far as I can tell) and pooling is handled by the driver, which apparently I had backwards (oops!).
Closing this issue for now; I think I'll open a few follow-ons to address large table/function DBs.


pystac demo

There are two blockers:

https://github.com/ResonantGeoData/ResonantGeoData/issues/654
https://github.com/ResonantGeoData/ResonantGeoData/issues/657

Also, we provide a "browsable API" courtesy of Django REST Framework. I suggest we demo this so that we can focus on our compliance of the STAC API spec as opposed to how well our API works with the beta PySTAC Client.

Closed with https://github.com/ResonantGeoData/ResonantGeoData/pull/682.


width scaled banner img test

Test-1 for review with Lydia and Cherri

Going with 2400 width for banners. Will close this PR now.


completed the assignment_3

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I aimed to implement K-Means clustering on the Iris dataset to identify distinct species based on their features. Following the clustering analysis, I introduced a bootstrapping method to assess the stability of the mean Petal Width. These changes included adding code for data standardization, clustering, bootstrapping, and generating visualizations to communicate the results effectively.
What did you learn from the changes you have made?
Implementing clustering and bootstrapping taught me how these methods can complement each other in data analysis. K-Means clustering helped identify patterns in the data, revealing the distinct groupings of Iris species. Bootstrapping provided insight into the variability and reliability of the mean Petal Width, demonstrating how resampling techniques can yield robust estimates even with limited original sample sizes.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I considered using hierarchical clustering as an alternative to K-Means, as it can provide a more nuanced view of the data relationships. Additionally, I thought about performing a different resampling technique, such as cross-validation, to assess model performance instead of bootstrapping. However, I opted for K-Means and bootstrapping because they are more straightforward for the current analysis and are well-suited for exploring the Iris dataset.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
One challenge was ensuring that the K-Means clustering results were interpretable and relevant to the original data. I addressed this by visualizing the clusters using a scatter plot of Petal Length vs. Petal Width, which allowed me to see how well the clusters separated the different species. Another challenge was calculating the bootstrapped means and ensuring the implementation correctly handled resampling and choosing the proper number of samples. I resolved this by carefully reviewing the bootstrapping logic and testing it with smaller sample sizes to confirm its accuracy before scaling up to 10,000 samples.
How were these changes tested?
The clustering analysis was tested by visually inspecting the scatter plot of the clusters to verify that they accurately represented the different Iris species. For the bootstrapping analysis, I compared the distribution of the bootstrapped means to ensure it was centered around the mean of the original data. I also checked the confidence intervals for consistency with the observed data. Testing involved running the code multiple times and validating that the results remained stable and meaningful.
A reference to a related issue in your repository (if applicable)
I used the notes from the materials in our repository, along with insights from 'Introduction to Statistical Learning with Python' and additional resources from https://python.datasciencebook.ca/clustering.html
Checklist

[ ] I can confirm that my changes are working as intended

A3 complete

Thank you for all your help and support.
On Thu, Oct 17, 2024 at 8:11 PM Vishnou Vinayagame @.***>
wrote:

A3 complete
—
Reply to this email directly, view it on GitHub
https://github.com/marjanrajabi437/applying_statistical_concepts/pull/3#issuecomment-2420900220,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BKSZRPYYREQJIDSETSCIR3TZ4BG4ZAVCNFSM6AAAAABP23755GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRQHEYDAMRSGA
.
You are receiving this because you authored the thread.Message ID:
@.***
com>

--
Marjan Rajabi
PhD in Statistics
Statistical Researcher & Data Scientist
Phone:<PHONE_NUMBER>


Document dynamic generation of Netlify _redirects file

I have URLs in my site which look like this:
/episode/15/the-boy-and-the-whale

I would like users who navigate to /episode/15/ to be redirected to the full URL with post slug. While this can be done with alias: in the front matter, it's cleaner to dynamically generate the Netlify _redirects file.
I have done this on another site with the TND Redirects Netlify module. But it looks like Doks may have its own way to do this already:
config.toml:
home = ["HTML", "RSS", "REDIRECTS", "HEADERS"]

# add output format for netlify _redirects
[outputFormats.REDIRECTS]
mediaType = "text/netlify"
baseName = "_redirects"
isPlainText = true
notAlternative = true

I don't see any information in the docs about how to use this output format, though. So I'd like to know if this is already possible, or if I should try to integrate TND Redirects Netlify instead.

Handled by Netlify's Redirects and rewrites in netlify.toml

Thanks, Henk. However, I still don't see anything in the docs about this. And it actually looks like /layouts/index.redirects is no longer there at HEAD on main. And outputFormat.REDIRECTS has been removed from config/_default/hugo.toml.
Using outputFormats.REDIRECTS and the index.redirects file is a dynamic solution, feasible for large numbers of redirects, in a way that just manually updating the netlify.toml isn't. Is a built-in, dynamic solution no longer supported?


#124 Bump sdk + market creation and pool deployment extrinsic changes

Work done:

[x] Use new SDK createMarket function passing market type as parameters.
[x] Ensure that amounts of assets are the same amount in accordance to pallet change.

I'm getting an error when creating a categorical market with a pool like this:

I'm getting an error when creating a categorical market with a pool like this:

I encountered same while testing changes on SDK, I believe they have changed the data type of error index from integer to hex value. I have been able to accommodate this by using following tweak:
https://github.com/zeitgeistpm/tools/blob/bdfe1654d17423fd4dbe2b3361c41a34c528092d/packages/sdk/src/models/index.ts#L310-L313

I'm getting an error when creating a categorical market with a pool like this:

I encountered same while testing changes on SDK, I believe they have changed the data type of error index from integer to hex value. I have been able to accommodate this by using following tweak:
https://github.com/zeitgeistpm/tools/blob/bdfe1654d17423fd4dbe2b3361c41a34c528092d/packages/sdk/src/models/index.ts#L310-L313

This should be fixed in the pr now by including your hex extraction fix 👍


QC report- Ignore blood accession ID discrepancy for Connect ID<PHONE_NUMBER>

After discussion with Michelle, we will not have UChicago fix the blood accession ID discrepancy identified in the QC report for Connect ID<PHONE_NUMBER>.
Please update the QC report to ignore this case.

@erincschwartz  For confirmation, this is just the urine accession ID that needs to be excluded, yes? It looks like it the urine accession ID by the request title and QC report, not the blood accession ID mentioned in the description.

@KELSEYDOWLING7 Sorry, it is BLOOD accession ID, I just updated the title. Sorry for the confusion.

@erincschwartz  That's ok. That's done and will be applied to Monday's report

@erincschwartz  Please let me know if this looked good on Monday's report and this issue is good to close

Looked good, please close this issue.


Upgrading EKS outside of rancher shows updated version in cluster view page but not edit

What kind of request is this (question/bug/enhancement/feature request):
bug
Steps to reproduce (least amount of steps as possible):

Create EKS cluster of an old version through Rancher (I created v1.13 through the API)
Upgrade the EKS cluster using AWS UI (I upgraded to v1.14)

Result:

The upgraded kubernetes version DOES show in the cluster view page
If editing the cluster, the upgraded kubernetes version DOES NOT show (still shows the version selected during creation)

Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): v2.4.0-rc8
Installation option (single install/HA): single

@wes how are we populating the k8s dropdown?
In general, we have an overall issue with the edit pages in EKS clusters cause it makes it look like you could select/change some other options, but per @rmweir the only option we can edit is the k8s version.

This is actually a duplicate of https://github.com/rancher/rancher/issues/24171, but I want to keep this open to track what's going on with the UI for the edit for EKS clusters.

Closing this in favor of #24171 and opened this issue instead for all the fields that are not actually updateable:
https://github.com/rancher/rancher/issues/26231


Searching with more than 2 tags

It would be great if you could figure out how to allow for more than 2 tag searches for the boorus that don't support it

A roundabout way is to use post filters in combination with the search tags.


Generated Google Drive URL does not work permanently

Quite weird the behavior or this URL which sometimes displays the tracks, few minutes after displays an empty map, then is able to come back few minutes after and so on... The behavior is the same on PC Chrome/Firefox/Edge and iOS Safari between people exchanging it thru Messenger. This behavior does not happen all the time and when there are multiple GPX sometimes, it loads part of them...

Google blocks Google Drive requests when the same user tries to fetch the same file a lot of times in a short period of time.
Unfortunately there is nothing I can do about it.

Ok many thanks for this obvious answer


Kernel::Integer show allow for exception keyword argument

app/controllers/refunds_controller.rb:180: {exception: FalseClass} does not match Integer for argument base https://srb.help/7002
     180 |      refunds.keys.any? { |k| Integer(k, exception: false).nil? } ||
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Relevant code:
https://github.com/sorbet/sorbet/blob/217956999733b1488340006103111f9bd2c83c0c/rbi/core/kernel.rbi#L490-L497
Relevant docs:
https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-Integer
If the user passes an exception keyword argument, the return type should be T.nilable(Integer), otherwise the return type should be Integer
This should apply to other numeric types in Kernel, like BigDecimal

It looks like this was introduced in 2.6.

This is resolved now isn’t it?


Fix panic when eliding invalid constant cases

+, >, <, <=, and >= require typechecking of both operands
simultaneously; constant-operand eliding did not perform this check,
causing a panic.
In the below examples, conditional.go is a test program I wrote when investigating this library; it is essentially a minimal REPL for govaluate.
Before:
$ go run conditional.go
> 1 > true
panic: interface conversion: interface is bool, not float64

goroutine 1 [running]:
panic(0x4e0180, 0xc42001a0c0)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/Knetic/govaluate.gtStage(0x4d5ac0, 0xc42000a188, 0x4d5900, 0xc42000a198, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/repos/go/src/github.com/Knetic/govaluate/evaluationStage.go:103 +0xb7
github.com/Knetic/govaluate.elideStage(0xc4200a00f0, 0xc4200a00a0)
	/repos/go/src/github.com/Knetic/govaluate/stagePlanner.go:662 +0x254
[...]
exit status 2

After:
$ go run conditional.go
> 1 > true
Evaluate: Value '1' cannot be used with the comparator '>', it is not a number
>

The error message is still incorrect, but it's better than a panic. Likely the error message should be something along the lines of "Values '1' and 'true' cannot be used with the comparator '>'".

Looks great to me!
Thanks for using the library, and taking the time to put together a PR!


Revert "Make CM_Usertext_Usertext extensible regarding custom filters in...

Reverts cargomedia/CM#1698
merge was premature
fyi @njam

good


Small grammatical mistake Line 18

Fixed a little grammatical error on line 18: Release->Released*

Thanks!


Unable to get OpenAI Extended Conversations to prompt the calendar for past events

After configuring OpenAI Extended Conversations to query past events, every time I try to use the assistant to do so, I get the following response :
"The calendar entity "LLM_Vision_Events" is currently in an "off" state, so it's not providing any information about recent or past events"
It has been driving me mad, as I can't find any info about this issue online...
The Event Calendar is configured in the LLM Vision integration (with 0 days to remember all).
The Event Calendar correctly shows past notifications.
What's the cause of this ?

I also added the spec as per the guide underneath the default spec in the OpenAI Extended Conversations configuration.

Calendar entities in Home Assistant are always in an off state when there is no active event. To get OpenAI Extended Conversation to actually search past events, youneed to add the 'spec' from the docs:
https://llm-vision.gitbook.io/getting-started/asking-about-events#asking-about-events

I already added the spec though.
I pasted it underneath the default one.
Isn't that what I'm supposed to do?

That should be correct. Maybe you need to specifically prompt the LLM to use that script when you ask about events.

I tried adding the specification, and this is what I get afterwards.
"Unfortunately, there are no events recorded in the calendar "LLM Vision Events" that I can retrieve using the get_events function."
That's weird. The events are clearly there...

Could be context threshold as well, so increasing that might help. I have set it to 10000.

What's the name of the field where the event description gets output in the calendar entries?
I will try telling it to specifically look at this field.

Do you use the blueprint? What action do you use?

Yes I use the blueprint.
I forked it in order to edit the trigger conditions ("entered_zones" value and time conditions), but the rest of the blueprint is unedited.

The generated response is in the response_text field. If your response variable is response then you can access it with {{response.response_text}}. This is true for all actions except data_analyzer (which doesn't return anything).

I just tried it with ChatGPT, and it works flawlessly.

Or maybe a vision model is unsuited for parsing text?
So I'll just use ChatGPT for the Assistant feature and I'll keep using my model to process the camera feed.
Thank you very much for your help !

The 90b model is probably better (don't know by how much though). It also requires significantly more VRAM so that is likely not a good alternative.
Unfortunately, the open source models I've tried that can be self hosted, have all been very disappointing.
Btw, here's a chart comparing the available models:

(Gemini has a free tier in some regions)


Attempt at making package builds seem like "setup.py develop"

@jonparrott Please weigh in here. I am mostly happy with this but unclear on a few sharp corners.
Things I wish were better:

Having to hard-code package deps in tox.ini (would be nice to install the deps from setup.py without installing the source
Having to fake the metadata for google-cloud-core (since we use pkg_resources.get_distribution('google-cloud-core') for the user agent)
Hack to make __path__ in Python 3 look like it does in Python 2 (unclear why the pep420 bool is in place in setuptools)

I kind of don't like the idea of this, but if you really feel like you need it then go ahead and merge.

@jonparrott Here is the problem I am trying to solve:

If local deps change, tox does not re-install them, which leads to inconsistent envs and forces tox -e ${ENV} --recreate any time core is touched

How big is the cost of tox --recreate? wheelcache should help significantly, unless for some reason some dependency can't be wheeled?

@jonparrott On my old-ish laptop with 16GB RAM the cost is prohibitive (it triples runtime):
$ cd ${GIT_ROOT}/datastore
$ rm -fr .tox
$ time tox -e py27
real    0m11.698s
user    0m9.456s
sys     0m0.804s
$ time tox -e py27
real    0m3.815s
user    0m3.412s
sys     0m0.344s
$ time tox -e py27
real    0m3.847s
user    0m3.448s
sys     0m0.308s
$ time tox -e py27 --recreate
real    0m9.772s
user    0m8.836s
sys     0m0.864s
$ time tox -e py27 --recreate
real    0m10.145s
user    0m9.184s
sys     0m0.796s

The whole point of unit tests is that they can be run during development, and 10s runs are not dev-user-friendly
TBH, 3.8s runs are also not dev-user-friendly, especially when the fresh sdist on every tox run eats most of that. Without tox:
$ source .tox/py27/bin/activate
(py27) $ time .tox/py27/bin/py.test unit_tests
real    0m0.685s
user    0m0.644s
sys     0m0.036s

For comparison, here are the times on this branch:
$ rm -fr .tox
$ time tox -e py27
real    0m6.930s
user    0m6.344s
sys     0m0.504s
$ time tox -e py27
real    0m2.079s
user    0m1.908s
sys     0m0.140s
$ time tox -e py27
real    0m2.196s
user    0m1.952s
sys     0m0.208s

Alrighty. I guess I can live with it until setuptools can get things fixed.
On Mon, Nov 7, 2016 at 10:18 AM Danny Hermes<EMAIL_ADDRESS>wrote:

@jonparrott https://github.com/jonparrott On my old-ish laptop with
16GB RAM the cost is prohibitive (it triples runtime):
$ cd ${GIT_ROOT}/datastore
$ rm -fr .tox
$ time tox -e py27
real    0m11.698s
user    0m9.456s
sys     0m0.804s
$ time tox -e py27
real    0m3.815s
user    0m3.412s
sys     0m0.344s
$ time tox -e py27
real    0m3.847s
user    0m3.448s
sys     0m0.308s
$ time tox -e py27 --recreate
real    0m9.772s
user    0m8.836s
sys     0m0.864s
$ time tox -e py27 --recreate
real    0m10.145s
user    0m9.184s
sys     0m0.796s
The whole point of unit tests is that they can be run during development,
and 10s runs are not dev-user-friendly
TBH, 3.8s runs are also not dev-user-friendly, especially when the fresh
sdist on every tox run eats most of that. Without tox:
$ source .tox/py27/bin/activate
(py27) $ time .tox/py27/bin/py.test unit_tests
real    0m0.685s
user    0m0.644s
sys     0m0.036s

For comparison, here are the times on this branch:
$ rm -fr .tox
$ time tox -e py27
real    0m6.930s
user    0m6.344s
sys     0m0.504s
$ time tox -e py27
real    0m2.079s
user    0m1.908s
sys     0m0.140s
$ time tox -e py27
real    0m2.196s
user    0m1.952s
sys     0m0.208s
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2698#issuecomment-258916896,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPUc-iXLslAbjGEy-YWO_wRwKGasKRnks5q72t-gaJpZM4Kqvvv
.

Thanks for weighing in. FWIW I'm not happy about this hack, but I'm even less happy about the Python ecosystem support for namespace packages.
@tseaver Would love to hear what you think

@dhermes please follow https://github.com/pypa/setuptools/issues/250 and chime in if their solution doesn't seem to fix the issues here.

OK this has now been rebased on top of the simple fix in #2705, but I'd still like to avoid the massive build-time penalty if possible.
@tseaver PTAL

@jonparrott @dhermes @tseaver  so it looks like this will never be fixed for Python 2.7 or possibly even 3.4.

Limiting support for this to 3.5+ only seems like a reasonable decision to me.

It seems like not having this PR, or something like it, could be a barrier to contributors.


FIX restrict TemporarySpan.contains() to same sentence

This PR prevents TemporarySpan.__contains__() from returning True for spans from different Sentence contexts.
This condition is already enforced elsewhere in this class, in particular in the related __eq__ and __ne__.

Good catch. Thank you!


Required GPU memory?

Hello,
Thank you so much for making this code available! Would you be able to share what type of GPU it was trained on? I seem to be running out of memory running it on a GPU with 24 GB memory (and train_batch_size is 1).
Please let me know, thank you!

Hello,
Thank you so much for making this code available! Would you be able to share what type of GPU it was trained on? I seem to be running out of memory running it on a GPU with 24 GB memory (and train_batch_size is 1).
Please let me know, thank you!

Thanks for your interest in our work. We use  a Tesla V100 with 32GB memory to train our parser.


Generated ts client files misses override modifier

The generated client file from json schema from cw_serde could not work properly since it misses the override modifier.
For instance, the generated Poap.client.ts shows:
export class PoapQueryClient implements PoapReadOnlyInterface {
  client: CosmWasmClient;
  contractAddress: string;

  methods...
}
export class PoapClient extends PoapQueryClient implements PoapInterface {
  client: SigningCosmWasmClient;
  sender: string;
  contractAddress: string;

  methods...
}

Then, thhe error shows:
../types/contracts/poap/Poap.client.ts:133:3 - error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'PoapQueryClient'.

133   client: SigningCosmWasmClient;
      ~~~~~~
../types/contracts/poap/Poap.client.ts:135:3 - error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'PoapQueryClient'.

135   contractAddress: string;

After adding override modifier to PoapClient property can solve the issue, like:
export class PoapClient extends PoapQueryClient implements PoapInterface {
  override client: SigningCosmWasmClient;
  sender: string;
  override contractAddress: string;

  methods...
}

hi @dadamu are do you happen to have a method of the same name in both your ExecuteMsg and QueryMsg?

@pyramation No, they don't have the same name, the example contract is here.
However PoapClient and PoapQueryClient has the same name properties, client and contractAddress. I added override manually then solved the issue.

I will look into making an option for this.
In the meantime, it looks like you can also set noImplicitOverride to false in your tsconfig.json

tracking here https://github.com/CosmWasm/ts-codegen/pull/79

@pyramation Thanks for the help!


Issue with /docs/admin/authorization/

This is a...

[ ] Feature Request
[*] Bug Report

Problem:
Core API Groups link is broken
Proposed Solution:
Link to the right page. Right now it gives 404
Page to Update:
http://kubernetes.io/...
http://kubernetes.io/docs/admin/authorization/

Put in a fix and pull request


fix: when the content of the path param contains the path separator

Fixes #576

this is a tricky use case, a test seems very important to avoid regression.

Test added.


[Fix #8] Add /newspapers API

@harenson we have an issue… gadget runs in 17.x were there is no such thing as optional callbacks.
To get this project reviewed by gadget we have to do one of 3 things:

Implement all callbacks (including from_json/2 in canillita_newspapers)
Help @ignaciom and @demian711 to get gadget to use 18.x
Stop treating warnings as errors in our Makefile.

@elbrujohalcon I would prefer to help @demian711 and @ignaciom to get gadget to use R18.x.


Getting an error when trying to edit and add posts in laravel voyager

Laravel version
^8.40
PHP version
7.4.3
Voyager version
1.4
Database
mysql  Ver 8.0.23-0ubuntu<IP_ADDRESS> for Linux on x86_64 ((Ubuntu))
Description
Am using
laravel 8.40
voyager 1.4
I created a BREAD with my posts table in mysql local database, I could browse the columns of the table, view and delete some posts from the voyager admin.
But when I try to edit or add a new post, I get the error as shown in screenshots below
Steps to reproduce
I follewed the guide from the laravel youtube tutorials
Expected behavior
I expeceted it show me a form for me to add edit posts at will
Screenshots

Additional context
the posts showing from the database

Voyager ships with a custom view for posts, that "requires" some fields to be present.
My guess is that it's looking for some fields (like body) but fails to do so.
In the meantime, create a view resources/views/vendor/voyager/posts/edit-add.blade.php which simply contains:
@include('voyager::bread.edit-add')


PR   -- added M3D modality demo notebook and renamed main conversion notebook.

Please update README to hyperlink the notebooks!


[Bug]The interval operation reported an error

Steps to reproduce the behavior (Required)
mysql> select interval '1' year + interval '1' month + date '2022-01-01';
ERROR 1064 (HY000): Getting analyzing error. Detail message: Cannot cast 'interval '1'com.starrocks.sql.ast.UnitIdentifier@22cb72dd' from INVALID_TYPE to DATETIME.
mysql> select date '2022-01-01' + interval '1' year + interval '1' month;
+-------------------------------------------------------+
| '2022-01-01' + INTERVAL '1' YEAR + INTERVAL '1' MONTH |
+-------------------------------------------------------+
| 2023-02-01 00:00:00                                   |
+-------------------------------------------------------+
1 row in set (0.01 sec)

Expected behavior (Required)
Real behavior (Required)
StarRocks version (Required)

You can get the StarRocks version by executing SQL select current_version()

The kernel problem is we cannot support the interval type. Like this:
select interval '1' year + interval '1' month;

select interval '1' year;

If we want to support this clearly, we may introduce the interval type (I will try to study it later) in FE.  How about this?
Some docs:

https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-INPUT
select interval '1' year


Apparmor denial in version 1.28 running nginx

We run this smoke microk8s test https://github.com/snapcore/snapd/blob/master/tests/main/microk8s-smoke/task.yaml as part out the snapd validation. When using the version 1.28 we see an apparmon denial which is not expected (not happening in version 1.25)
Reproduction Steps
snap install --channel=1.28-strict/edge microk8s
microk8s status --wait-ready
microk8s kubectl run nginx --image=nginx
microk8s kubectl expose pod/nginx --name nginx-np --type NodePort --target-port 80 --port 80
microk8s kubectl patch svc nginx-np --patch '{"spec":{"ports":rage:{"port":80,"nodePort":31313}]}}'
dmesg | grep DENIED
Then I see this apparmor denial
[  185.043591] audit: type=1400 audit(1698061446.955:204): apparmor="DENIED" operation="capable" profile="snap.microk8s.daemon-cluster-agent" pid=7284 comm="sed" capability=4  capname="fsetid"

Hi Sergio,
Thanks for reporting this. I was able to reproduce this issue locally and will investigate this.
Does this cause any issues for the workload that you are running?

Currently we are testing using 1.25 but the idea is to migrate to 1.28, until then the issue is not affecting out tests.


GTN - Instructor community - first meeting

Hi all,
We would like to start a group of instructors that would be interested into supporting other instructors.
One of the goal of such group could to be to discuss and collect best pedagogical and technical recommendations for Galaxy training workshops and start a handbook for training with Galaxy.
Another goal could be to start regular discussion meetings in which one or two experienced instructors could help and give advices to less experienced instructors (a bit on the same idea as the Instructor Discussion Sessions of the Carpentries).
If you are interested to participate to such group, feel free to join one of 2 planned meetings (to fit different time zones and constraints, but similar discussions):

September 27, 3pm (UTC+2)

Timing for your time zone
Hangout
Google event

October 5, 11am (UTC+2)

Timing for your time zone
Hangout
Google Event

We will also take notes during the meeting and send the notes afterwards.

The notes about the two meetings are available there: https://docs.google.com/document/d/14psj691fAlwpkFKKSzWRhkSTZdaiLYDEgxOD9jBpIgU/edit?usp=sharing
To summarize:

Creation of a new topic dedicated to the instructors with

Handbooks for instructors and workshop organizers, inspired by and extended from the Carpentries handbook, with pedagogical/technical recommendations/checklist, for different targets (instructors, workshop organizers, etc)

Develop the community of instructors

Organization of regular online discussion meetings, where instructors share experiences from teaching and obtain information while preparing to teach, on the model of the Carpentries Instructor Discussion Sessions

One per month
Different host (member of the community who facilitates a discussion session) every month to limit overload
Not mandatory to join, office hours for experienced trainers where new trainers can ask questions

Instructor meetings during the quaterly CoFest (not only about the training material)
Elixir for staff exchange so less experienced instructors can join more experienced instructors and learn from them in a live setting

Move the directory of instructors to the training website

Create a INSTRUCTORS.yaml file for people who want to register
Add a page (similar to Hall of Fame) for instructors by individual and/or organization and map?

Display training events from the hub on the training page
Add more notes in the tutorials: tips in the hands-ons and the instructor notes in slides
Add post-mortems/blog post framework for after training feedbacks


Get current position for a queue

I maintain the current positions of the queues in memory. After a crash and the log recovery, I have no easy way to know the current positions of the queues.

Closed via #45.


user docs for global rate limit

Signed-off-by: Arko Dasgupta<EMAIL_ADDRESS>

moved to draft until https://github.com/envoyproxy/gateway/pull/976 and https://github.com/envoyproxy/gateway/pull/983 are merged, which are needed for this feature to work end to end

Codecov Report

Merging #989 (baecd97) into main (1b26380) will increase coverage by 0.09%.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main     #989      +/-   ##
==========================================
+ Coverage   61.98%   62.07%   +0.09%
==========================================
  Files          55       55
  Lines        8804     8804
==========================================
+ Hits         5457     5465       +8
+ Misses       2972     2965       -7
+ Partials      375      374       -1

Impacted Files
Coverage Δ

internal/provider/kubernetes/controller.go
50.56% <0.00%> (+0.90%)
:arrow_up:

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


Remove metadata when the component unmounts in AnalyticsShell

This PR will remove the mbxMetadata object from the window when the AnalyticsShell component unmounts. This will prevent the data object from traveling to another page and writing the wrong data if the component does not load successfully.
How to test

QA checklist
Open the test cases app locally on:

[x] Chrome, no errors logged to console.
[x] Firefox, no errors logged to console.
[x] Safari, no errors logged to console.
[x] Edge, no errors logged to console.
[x] IE11, no errors logged to console.
[x] Mobile Safari, no errors logged to console.
[x] Android Chrome, no errors logged to console.

@colleenmcginnis per chat yesterday, I think the best way to test will be:

[ ] Create a beta release from this branch.
[ ] Update /help site and push to staging. (I think we should test /help since it's 2nd most popular in page views and should hopefully give us enough data in a 1-week period to assess if we fixed the data quality issue.)
[ ] Check Segment to confirm that data is passing through.
[ ] If data is passing through to Segment, merge /help to publisher-production.
[ ] After 1 week, check Mode to see if any incorrect data is logged.

[ ] If the data is clean, create a release and bump all sites.
[ ] If the data is not clean, we'll regroup and reexamine our options or continue debugging.

We did see some improvements to data quality, plus it's a good practice for cleaning up data.
@colleenmcginnis for review!


Clean up groupby to use the anchor.

Now that Series has a different anchor from the one it is originally derived from if it is modified, we don't need to check Spark column's equality in groupby.
Also fixing a bug when it needs compute.ops_on_diff_frames but the first group key is from the same DataFrame but modified.
E.g.,
>>> ks.options.compute.ops_on_diff_frames = True
>>> kdf1 = ks.DataFrame({"C": [0.362, 0.227, 1.267, -0.562], "B": [1, 2, 3, 4]})
>>> kdf2 = ks.DataFrame({"A": [1, 1, 2, 2]})
>>> kdf1.groupby([kdf1.C + 1, kdf2.A]).sum()
Traceback (most recent call last):
...
AttributeError: 'NoneType' object has no attribute '_internal'

Let me merge this now. Please feel free to comment on this.

Sorry for late review @ueshin. LGTM!


add "im thirsty"

case "im thirsty" added
I hope you like it. Thank you so much for letting me work in this issue!

Giving you co-author on #100. Thanks!


Running on browser

Hi @jaredp and co!
I was trying to get PageDraw to load on a browser locally, and subsequently, deploy it.
I went through the following:

cloned the repo
yarn and then yarn devserver

If I visit http://localhost:3000, I get the message described on #2:
This is a placeholder needed for our build system in dev mode. You should never see it.
If I just served desktop-app/index.html, I get the following error

Any tips on getting it to work on a local browser? :)
Thank you!

Hey @sarupbanskota,
The open source version is an electron app— if you want to get that running, follow the directions in the readme and run
yarn devserver
yarn run-electron

That being said, if you want to get it running in a browser, serving and loading desktop-app/index.html (with yarn devserver in the background) is a great place to start!
In https://github.com/Pagedraw/pagedraw/blob/master/desktop-app/index.html#L16, notice we set window.pd_params.route to electron_app.  That's picked up by src/editor/router.cjsx, the root of our code.  On https://github.com/Pagedraw/pagedraw/blob/master/src/editor/router.cjsx#L58, we route the electron app to load https://github.com/Pagedraw/pagedraw/blob/master/src/ide-integrations/electron-app.cjsx
It's pretty easy to see what src/ide-integrations/electron-app.cjsx is doing.  Basically just loading a docjson (or creating a new one) and handing it to an <Editor />.  It's using Electron APIs to do that, which I'd assume is why it's crashing in your browser.
I'd make a new route, cloning desktop-app/index.html and changing pd_params.route in the clone, adding the route to src/editor/router.cjsx, and cloning the route itself src/ide-integrations/electron-app.cjsx into src/ide-integrations/browser.cjsx.
In the new route, you'll have to figure out how to get a docjson (and how to save it).  To get started, I recommend just creating a fresh docjson ((new Doc()).serialize()) on load.
There's also a bunch of code that does livecollab, which is beautiful, but requires a bit more refactoring...

Hi there! what i assume from above conversation is that there is no such a way to run pagedraw with all feathures on a browser, right?

Not without a little elbow grease :)
Why does the Electron app not work for you!

first: big thanks for your kind answer and support.
second: the electron app works fine for me, the thing is that porting this project to browser, opens the door for a browser based sketch that can generate code, and believe me it is something big 👍

Yeah that’s what Pagedraw was before we open sourced it...

awesome! if i go with your proposed solution above for making a fresh browser.cjsx, this new file will be the clone of electron-app.cjsx with modifications made on lines 25 - 35 like below, am i right?
`//openResults = electron.dialog.showOpenDialog()
open_file = 'untitled.pagedraw.json'
initialDocjson = (new Doc()).serialize()
fs.writeFileSync(open_file, initialDocjson, 'utf-8')
//if openResults?
//    open_file = openResults[0]
//    initialDocjson = JSON.parse fs.readFileSync(open_file, 'utf-8')
//
//else
//    open_file = electron.dialog.showSaveDialog({
//        defaultPath: 'untitled.pagedraw.json',
//        buttonLabel: 'Create'
//    })
//    initialDocjson = (new Doc()).serialize()
//    fs.writeFileSync(open_file, initialDocjson, 'utf-8')`

You’ll want to comment out the first fs.writeFileSync(), and the electron requires.
Put up a pull request!

thanks for your kind answer, i definitely go for a PR 👍

Thanks @jaredp!
@pouyamiralayi - do you intend to send a PR to this repo?

@sarupbanskota yes i am currently figuring out a way to not break functionality for this PR, i will inform you the result in this thread.
cheers.

Good day!
Can i use something like "import {Editor} from ''pagedraw" to use this in own react component? I suspect that no, but I would like to. Do not plan to do this?
Thanks!

it's not quite that easy, but if you want to muck around in the code you certainly can get something like that working


How do i back to file explorer

Description
I removed the files app but when i open it in taskbar

this shows
when i try to open the file in file explorer this shows

Steps To Reproduce
No response
Expected behavior
I want to the explorer doesnt shows that again when i open it in taskbar
Files Version
<IP_ADDRESS>
Windows Version
Windows 11 21H2 220000.194
Relevant Assets/Logs
dont have log

i removed the files application (yes)

You can use this script to revert the changes (save it as ".reg") https://raw.githubusercontent.com/files-community/Files/main/src/Files.Launcher/Assets/FilesOpenDialog/UnsetFilesAsDefault.reg

You can use this script to revert the changes (save it as ".reg") https://raw.githubusercontent.com/files-community/Files/main/src/Files.Launcher/Assets/FilesOpenDialog/UnsetFilesAsDefault.reg

thanks

Closing this, please let us know if it works.

Closing this, please let us know if it works.

i deleted the files application if it stills works?

Closing this, please let us know if it works.

Dear Madam or Sir
The file you send to me its works
Thanks, from eyehkeyer


WIP: Topic/fddp - [closed]

In GitLab by @proyan on Sep 6, 2019, 13:23
Merges topic/fddp -> devel
unitttest not yet added.

In GitLab by @cmastalli on Sep 6, 2019, 13:26
It would be great if you can quickly add the Python bindings. It shouldn't take more than 30 mins of work, you just need to adapt the DDP bindings.

In GitLab by @proyan on Sep 6, 2019, 13:43
added 1 commit
fb74ecf8 - [solvers][fddp][bindings]
Compare with previous version

In GitLab by @cmastalli on Sep 7, 2019, 11:57
added 2 commits
ead4ee5b - [solver] Removed warmings in FDDP solver51191c1c - [cleanup] Formatted the FDDP code
Compare with previous version

In GitLab by @cmastalli on Sep 7, 2019, 12:59
added 4 commits
ab01a106 - [cleanup][solvers] Used unsigned int const& instead of const unsigned int&4b52e3a7 - [solver] Used noalias and avoided to create temporal Eigen variables91df5114 - [solvers] Tiny improvement in the DDP solver (noalias in forward pass)514b3993 - [cleanup] System headers need to be included first
Compare with previous version

In GitLab by @cmastalli on Sep 7, 2019, 13:29
For some reason the CI jobs in repository doesn't work properly.
I noticed that git describes doesn't find the version. @nim65s see this: https://gepgitlab.laas.fr/proyan/crocoddyl/-/jobs/30101.
@proyan I will close this PR and create another one in order to avoid problems.
I just did few changes, that you can see in the commits

Removed warming messages
Formatted the code.
Rewrote few lines for Eigen efficiency/algorithm.

In GitLab by @cmastalli on Sep 7, 2019, 13:29
closed

In GitLab by @cmastalli on Sep 7, 2019, 13:31
mentioned in merge request !215

In GitLab by @cmastalli on Sep 7, 2019, 13:32
The PR is !215. Thank you very much for the great work @proyan :)


filter: mutable predicate and value forwarding

This is similar to ce867895c4c2348e21f3dabfe5dca13c67fd990b for rx-map.hpp

@elelel,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft Open Technologies, Inc.. We will now review your pull request.
Thanks,
Microsoft Open Technologies, Inc. Pull Request Bot

AppVeyor tests apparently use non-existent after VS2017 release RC-version image

hmm.. made changes to the appveyor config file to allow windows builds. Hope that helps..

Isn't filter predicate by nature bool(const T& v) ? If not, we can keep both on_value versions with an overload, though it's not pretty.

Test is a user supplied lambda. It can take anything convertible from v. The forwarding is fine to on_next, but the v passed to test must not use forward. In fact it must be cast to const& instead.

Do you mean just this->test((Value&)v) ? I thought of:
      template <class Value>
      typename std::enable_if<false == std::is_rvalue_reference<Value>::value, void>::type
      on_next(Value&& v) const {
        auto passed = on_exception([&] () {
            return this->test(v);},
          dest);
        if (!passed.empty() && passed.get()) dest.on_next(v);
      }
      template <class Value>
      typename std::enable_if<true == std::is_rvalue_reference<Value>::value, void>::type
      on_next(Value&& v) const {
        auto passed = on_exception([&] () {
            return this->test(std::forward(v));},
          dest);
        if (!passed.empty() && passed.get()) dest.on_next(v);
      }

I believe that enable_if would have a bad impact on compile time. I really want to improve compile times. If overloads are the solution, concrete overloads would be better. I think that there would only be 3 (T&, T&& and const T&). However, taking by Value&& and then calling on_next(forward<Value>(v)) seems like an improvement over the existing code.

Do you mean just this->test((const Value&)v) ?

I would like a function like std::move or std::forward that would 'decay' v to a const& rather than a C cast to const T&. Perhaps such a function is defined in the GCL and an implementation could be added to rxcpp::util. Then the call would be something like test(rxu::in(v)). Or perhaps std::reference_wrapper and std::cref can be used to achieve this.

I think that there would only be 3 (T&, T&& and const T&).

Did I understand correctly that on_next(T&& v) and on_next(T& v) overloads were meant here? T&& reference collapsing rule in argument declaration may match an lvalue as T& does, so, if I'm not mistaken, it's potentially an ambiguity error. I'm not sure that all compilers can resolve that identically with a "choose more specific" rule. Or is such case resolution well-defined from standard's point of view?

However, taking by Value&& and then calling on_next(forward(v)) seems like an improvement over the existing code.

Initially I explored the code to make the filter usage faster, and noticed that map operator currently is written with forwarding like in this PR. I think map's and filter's implementations in this part should not be different, in fact they should share the same code like in #363.

I would like a function like std::move or std::forward that would 'decay' v to a const& rather than a C cast to const T&. Perhaps such a function is defined in the GCL and an implementation could be added to rxcpp::util. Then the call would be something like test(rxu::in(v)). Or perhaps std::reference_wrapper and std::cref can be used to achieve this

I will try to look into that, but my feeling is that I'm not familiar enough with RxCpp internals/decaying techniques to write such changes. There's a risk that I write something flawed and potentially not reusable.

I believe that enable_if would have a bad impact on compile time. I really want to improve compile times.

Not concerning this PR, I would suggest to consider refactoring the library structure to improve compile times. We can make the include dependency tree more narrow and change to a multiple-roots include style. It can be modelled more or less like STL: you don't #include <rx.hpp> there, only the explicit parts you really interface with, like #include . The included file in turn would not include convenience include packs, like rx-includes.hpp, but only the dependencies it really needs. That has some downsides, like having to manage dependencies for each single file, but leads to a leaner header-only library.

T&& reference collapsing rule in argument declaration may match an lvalue as T& does

I would expect that source_value_type&& would be more specific match than source_value_type& or const source_value_type& when an r-value is being matched.
I still prefer to take the universal reference and cast to a const Value& using a helper function for test and forward for on_next.

I think map's and filter's implementations in this part should not be different

I agree that both should use forwarding for on_next, but filter must prevent the value from being stolen by the test predicate.

There's a risk that I write something flawed and potentially not reusable.

I see this as a fixed constant in programming :) I prefer to manage this risk via the process of iterate-and-review. I am sure we can solve this. If we can find an existing solution great, otherwise we can do our best and fix bugs as they are discovered. I see review as more of a learning and sharing experience (for everyone, including spectators) rather than a mechanism to prevent bugs. When a review does find a bug, that is serendipitous!

Not concerning this PR, I would suggest to consider refactoring the library structure to improve compile times

Yes, I think it would be useful to have an open issue to discuss this.
Thanks!!

I would expect that source_value_type&& would be more specific match than source_value_type& or const source_value_type& when an r-value is being matched.

I usually followed the reasoning in the second answer here and avoided it: http://stackoverflow.com/questions/9882871/overloaded-function-templates-with-reference-parameters

I still prefer to take the universal reference and cast to a const Value& using a helper function for test and forward for on_next.
...
If we can find an existing solution great, otherwise we can do our best and fix bugs as they are discovered. I see review as more of a learning and sharing experience (for everyone, including spectators) rather than a mechanism to prevent bugs. When a review does find a bug, that is serendipitous!

Unfortunately I don't quite see what exactly is meant by it and what the merits are. If a function is meant, taking a universal ref and casting the argument to const& inside, I don't follow what would be achieved. In my opinion trying to stay non-restrictive in the interface (i.e., not forcing the predicate just to be const & in the public api) is a move in the trade off between the interests of "conscious" library users that are "clean" with their C++ practices and the interests of "relaxed" users who can stick a predicate with a non-const-specific function signature, towards the latter. If I understand the motives correctly, that is to make the usage of the library easier thus enlarging the potential user base. Still the price of it is the complication of development and probably opening ways of getting less compiler-optimizable and erroneous code. In STL filter equivalent, remove_if, they had to make a similar trade-off:
The signature of the predicate function should be equivalent to the following:

bool pred(const Type &a);
The signature does not need to have const &, but the function must not modify the objects passed to it.
Obviously, they had to get all those C-style programmers of the time to be comfortable with the library. The wording of it is somewhat funny itself: the function should behave like it takes const&, but we will not make the compiler fail if you supply it with a func taking something else. With RxCpp however we are in a different situation: it is built not only upon C++ foundations, but the whole functional/immutable/composability ideology. I don't think the choice for the less restrictive interface is so obvious, and frankly I don't think the choice made in STL back then is such a good decision today either. I think enforcing a const& on the predicate in such cases is an element of ensuring that the library is used with logical correctness, not just a way of making library's internals simpler. Because of this, for me it's not just a way to introduce a bug that can then be fixed, it's a step in a direction that is not quite clear to me, with a method I don't clearly understand. Since this PR appeared to touch so many complex things, I suggest we just close it.

I would like to take this improvement. I am willing to go the last mile with this change if you are done.
I found that the meta library in range-v3 has as_const which is close to what I was hoping for, just not sure about the r-value overload being deleted.
Thanks!

I am willing to go the last mile with this change if you are done.
Please do, I'm really lost here with the cast cases.

I found that the meta library in range-v3 has as_const which is close to what I was hoping for, just not sure about the r-value overload being deleted.
The delete is there to explicitly prevent rvalue arguments from passing. That is by N4582 proposal draft they quote in the commit. This discussion may be of interest: http://stackoverflow.com/questions/39051460/why-does-as-const-forbid-rvalue-arguments

merged in #371


Adaptive express prebuilt function empty returns false when passed with a null value

Adaptive expression SDK - prebuilt function "empty" returns false when passed with null value
Version
AdaptiveExpressions ~ 4.11.1
Describe the bug
The Adaptive expression documents says "empty function" will return "TRUE" in-case of object is empty or else FALSE. But if we try pass the value as null then the function returns FALSE instead of returning TRUE.
To Reproduce
var Dictionary<string, dynamic> flowData ;
new ExpressionProperty<dynamic>("${empty(null)}").GetValue(flowData) = returns FALSE

Expected behavior
Expression to return TRUE as null is equivalent to empty object.
Screenshots
As per MS-doc for adaptive expression prebuilt functions:

Reference Image for the reported Issue:

Additional context
Documentation as in here adaptive-expressions-prebuilt-functions-empty

@luhan2017 This looks like an issue in Adaptive Expressions. Can you help me find the right person on the team to take a look?

fixed by: https://github.com/microsoft/botbuilder-dotnet/pull/5338


Add option enclosure required

Requirements
Please take note of our contributing guidelines: https://docs.laravel-excel.com/3.1/getting-started/contributing.html
Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
Mark the following tasks as done:

[x] Checked the codebase to ensure that your feature doesn't already exist.
[x] Checked the pull requests to ensure that another person hasn't already submitted the feature or fix.
[ ] Adjusted the Documentation.
[ ] Added tests to ensure against regression.

Description of the Change
Add the newly created option to set requiring an enclosure for the CSV export to false, to prevent wrapping the cells with default value, since it's not nullable anymore.
Why Should This Be Added?
Since version PHPSpreadSheet 1.13 the default value for enclosure is set to " and not nullable anymore.
Benefits
Export to .csv can be done without enclosures again, so importing in older systems which are not adjustable are functioning as expected.
Possible Drawbacks
None
Verification Process
We do large exports for oldskool dos/windows applications, after this fix we can export without encloses again.
Applicable Issues

@atreitsma thanks for the PR, can you also bump the minimum PhpSpreadsheet version to 1.13?
If I understand your description correctly, this should work backwards compatible? Or if not, can we make it backwards compatible by default?

Thanks! No rush :) Can you add a test that validates that it's backwards compatible?

Due to GitHub outage I'm missing a (style) commit in this pull request ... will get this sorted out, and will look into the tests later on which is totally not my expertise, so forgive me if it takes a bit longer.

@patrickbrouwers just figured out you changed the test to pass only 3 days ago ;-) so if you revert that commit you should get a failing outcome in tests/Concerns/WithCustomCsvSettingsTest.php see your commit 6871c2b98176e3019a4a25376dbcfc0a088d1569 so if you add the code:
    /**
     * @test
     */
    public function can_store_csv_export_without_enclosure()
    {
        $export = new class implements FromCollection, WithCustomCsvSettings {
            /**
             * @return Collection
             */
            public function collection()
            {
                return collect([
                    ['A1', 'B1'],
                    ['A2', 'B2'],
                ]);
            }

            /**
             * @return array
             */
            public function getCsvSettings(): array
            {
                return [
                    'delimiter'              => ';',
                    'enclosure'              => '',
                    'line_ending'            => PHP_EOL,
                    'use_bom'                => true,
                    'include_separator_line' => true,
                    'excel_compatibility'    => false,
                ];
            }
        };

        $this->SUT->store($export, 'custom-csv.csv');

        $contents = file_get_contents(__DIR__ . '/../Data/Disks/Local/custom-csv.csv');

        $this->assertStringContains('sep=;', $contents);
        $this->assertStringContains('A1;B1', $contents);
        $this->assertStringContains('A2;B2', $contents);
    }

Could add this to the request later on if you want!

Aha! That actually does explain why that test started failing. If you could revert my changes to that test, that would be great!

Thanks for the PR! i'll revert the test myself


UN Trace Tool: Refactor TabRow

Related to issue: Kotlin #4773

Summary of changes:

Remove usages of TabRow within composables and factor it out
Display it only when there are results available

Pre-merge Checklist

a vTest Job for this PR has been run

[ ] link: https://runtime-kotlin.esri.com/view/all/job/vtest/job/toolkit/152/
[x] https://runtime-kotlin.esri.com/view/vTest/job/vtest/job/toolkit/158/

Unit and/or integration tests have been added to exercise this PR's logic, and the tests are passing:

[ ] Yes
[ ] No

@puneet-pdx This is now fixed


libsForQt515.audiotube: depend on kpurpose

Description of changes
AudioTube depends on the Purpose library, and fails to launch if Purpose is not in the environment. This PR fixes that by adding kpurpose as a build dependency.
Closes #228179.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

[X] 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/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

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

[X] Fits CONTRIBUTING.md.

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

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/3357

@ofborg build libsForQt5.audiotube plasma5Packages.audiotube


[WIP] Improve ID Auto-Incrementation

Resolves #415
TODO

[x] Resolve open questions on #415
[x] Add more tests for other edge cases
[x] Handle DbCollection#update

@samselikoff I think I'm at the point where this is ready for a review. I'm not entirely happy with the solution, but I think it's a decent first kick at the cat.

Awesome work! :heart:
I'm thinking, 0.2.x is the next release + it will have breaking changes, why don't we just go ahead and throw an error when inserting with multiple IDs?

why don't we just go ahead and throw an error when inserting with multiple IDs?

As in any noted deprecations should just throw, or the following use case throws?
db.vacuumCleaners.insert({ id: 1, ..}, { id: 2 ...});

I think the two use cases you added the deprecate messages to (inserting a duplicate id, updating the id of a record. I think inserting a record with a specific id` is still valid - e.g, if they're using clientside generated ids. Do you agree?

Yup! I'll whip up these changes.

So, hey, I'm wondering if we should take this PR one step further and enforce that the ID key always be unique, regardless of what's being used (e.g. UUID, integer counter, strings). If we do this, we could change the underlying data store for records from an Array into a hash-map. This would allow for the find-by-id use case performance to go from O(N) to O(1). Lodash's _.values could be used for other uses cases such as filtering, or returning a whole collection.

Hm, very interesting. I'm wondering, in the spirit of keeping things small, should we deal with that in a separate issue? Would it greatly affect the solution here to have it separate?

Hm, very interesting. I'm wondering, in the spirit of keeping things small, should we deal with that in a separate issue?

Yeah, I'm inclined to agree with you. I think we're good to go on this pull request! Apologies for the delay, pre-holiday work was crazy busy.

Ok great - no probs at all on the delay of your free work!
Could we get a quick rebase? then I'll merge

Good to go!

Ugh. Something happened in my rebase, I need a little itme.

No prob, I'm going to work on some smaller things so just make sure to rebase again when you have time.

@samselikoff apologies for the delay yet again. We're definitely good to go. Since you last looked I've implemented ID tracking regardless of the type. This clears the way to, if it's desirable, or even interesting, make the record store a hash map. I'll open an RFC for discussion sometime soon.

:+1: thank you for your excellent work on this!


The Shadow Didn't Inverted

I recently updated your visualizer and I found something messed up. Here.

Kinda disturbing... The shadow didn't inverted somehow...
and there's some error too...

Will be added in the next release, probably tomorrow or tuesday.

Great. Thanks! 😄

Fixed in 1.8.1.


Make Field serializable

As we discussed in #55 it is a waste of space to use u128 to send copies of Fp31 between helpers. This change makes it a requirement for all fields to implement serialization. It also provides an out-of-the-box implementation for Fp31 which is efficient enough (1 byte per instance) to be used in our test implementation.
Given that now Field elements may be sent across await points, there is a need for Field to be Send + 'static.
Note that there are some issues with this implementation that need to be addressed

The level of granularity for serializers (as well as buf writers) is byte (u8). Serde provides serialize_u8 method and similar crates (bytes, "std::io::Cursor", etc) also work with bytes. That means if Field implementation needs 42 bits of information, we'll be paying 6 bit per instance price. That would result in extra 750 Mb sent for 1B events.

I think we may be able to handle that case with this API

trait Field {
   /// Number of bits needed to represent an element of this field in memory, ignoring padding and alignment.
   /// Note that it may not be the same as `Int::BITS`
   const BITS: u32;
}

// serialize
struct PeerBuffer {
  internal_buffer: RwLock<Vec<u8>>,
}

impl PeerBuffer {
    fn serialize<F: Field>(items: Vec<F>) -> usize {
     // elements of the vector `items` can still be serialized using serde, but only F::BITS LSB will be taken from each representation and stored inside the resulting slice. It is likely that we will have a single buffer per helper peer, so we can just allocate that buffer once and use RWLock to send the data stored inside it to the TCP socket
    }
}

// deserialize
struct FieldCursor<'a, F> {
   elements: &'a [u8],
}

impl FieldCursor<F: Field> {
   // Reads next F::BITS bits from elements array and attempts to interpret them as element of the field F.
   fn read_next(&mut self) -> de::Result<F>
}

there is a need for Serde serializer that converts everything into raw bytes as efficiently as possible.

Lets see how far we get with a whole number of bits for each field.  Future versions of us can look at doing some sort of record coalescing and compaction along the lines you describe.  Let's say we go with an 81-bit field, then the 7 wasted bits will be less than 10%.  I'm guessing that that much savings on communication will justify the extra complexity, but we don't need to optimize to quite that degree just yet.
(I worry about your RwLock usage there - a low contention lock probably won't cost that much, and it is probably necessary as described - but we can probably do something better.)

(I worry about your RwLock usage there - a low contention lock probably won't cost that much, and it is probably necessary as described - but we can probably do something better.)

yep, agree. For a single writer (and likely single reader) publish-via-atomics can work really well, so there are certainly more performant ways to deal with it. The reason for RWLock there is just to explain the mechanics without digging deep into implementation details


PublishCommand write-recovery topologyRecovery maybe nil in AttemptRecoveryRegistration

https://github.com/github/orchestrator/blob/17485ac9d32a70c997be21077bfe6c1544e82880/go/logic/topology_recovery_dao.go#L246
the above line's topologyRecovery maybe be nil due to the following line。
https://github.com/github/orchestrator/blob/17485ac9d32a70c997be21077bfe6c1544e82880/go/logic/topology_recovery_dao.go#L196
so there is no need to raft sync when topologyRecovery is nil, pls check。
cc @yangeagle

@shlomi-noach It's a pleasure for give a pr to fix this


feat: add --wait flag to upgrade-service

Does this PR modify CLI v6, CLI v7, or CLI v8?

It's a feature (or fix) for v8

Description of the Change
Most of the service commands (e.g. "cf update-service") take a --wait flag to wait for completion. For some reason "cf upgrade-service" did not, and this commit resolves that inconsistency.
This is a redone version of #2285 which was reverted in #2317
Why Is This PR Valuable?

consistency of experience

Why Should This Be In Core?

consistency

Applicable Issues

#2285
#2317

How Urgent Is The Change?
Not very

Closing and re-opening to re-trigger CI


Fix Left Joystick Motion Not Registering on Android

Due to a change made in commit ab9e377fe68b1735f1d30a8cdd83f518c7091925, left joystick motion inputs don't get properly registered. I reordered the guards in the onGenericMotionEvent() function so that joystick inputs don't get sent to the GodotGestureHandler in the first place.
I believe the GodotGestureHandler should not have to make an exception for that one function and do an event source check. Every other function in it is able to assume only the events with the proper sources are sent to it. However, a maintainer with a better overview of the systems should give their opinion.
Fixes #92939

Wait, I realized one mistake where I don't keep parity with the previous structure.

Hopefully this keeps parity with the initial intent of the code. Any joystick motion event from a non-existent device should return false as it did previously, but expedited now.

Thanks!


ProgressBars and loading of screen in many places can be replaced by shimmer effect.

This would really give an amazing user experience.
For example:

I would be working on this if  @teolemon you'd provide your assurance.

For more information about its implementation:
https://github.com/sharish/ShimmerRecyclerView

Yup, why not ?

@Shubham2320 cool one

@Shubham2320  You can use http://facebook.github.io/shimmer-android/ which is more reliable .
@teolemon Would this be okay ?

@PrajwalM2212 that was cool 😮. thanks.

@Shubham2320 are you working on this?

Any news?


[5.2] .env file now requires quotes around strings

After updating from 5.2.5 to 5.2.6 dotenv defined strings now require quotes around them whereas they did not in the past. I'm not sure if this was the expected behavior to begin with or not though.
Under 5.2.5, the following was still working:
config/mail.php
<?php
return [
    'from' => ['address' => env('MAIL_FROM_ADDRESS', null), 'name'=> env('MAIL_FROM_NAME', null)],
];

.env
MAIL_FROM_NAME=System Administrator

Under 5.2.6, this same configuration results in the following error:
PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:736
Stack trace:
#0 /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php(736): ReflectionClass->__construct('log')
#1 /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php(845): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...')
#4 /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php(800): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php( in /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 736

Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 736

ReflectionException: Class log does not exist in /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 736

Call Stack:
    0.0003     228112   1. {main}() /var/www/trafficgate/artisan:0
    0.0607    2598944   2. Illuminate\Foundation\Console\Kernel->handle() /var/www/trafficgate/artisan:36
    0.0701    2815328   3. Illuminate\Foundation\Console\Kernel->reportException() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:109
    0.0701    2815376   4. Illuminate\Container\Container->offsetGet() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:250
    0.0701    2815376   5. Illuminate\Foundation\Application->make() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:1168
    0.0701    2815512   6. Illuminate\Container\Container->make() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:674
    0.0701    2815624   7. Illuminate\Container\Container->build() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:631
    0.0701    2815624   8. Illuminate\Container\Container->Illuminate\Container\{closure}() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:733
    0.0701    2815672   9. Illuminate\Foundation\Application->make() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:230
    0.0701    2815672  10. Illuminate\Container\Container->make() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:674
    0.0702    2815768  11. Illuminate\Container\Container->build() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:631
    0.0723    2872752  12. Illuminate\Container\Container->getDependencies() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:771
    0.0730    2886728  13. Illuminate\Container\Container->resolveClass() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:800
    0.0730    2886816  14. Illuminate\Foundation\Application->make() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:845
    0.0730    2886952  15. Illuminate\Container\Container->make() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:674
    0.0730    2887032  16. Illuminate\Container\Container->build() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:631
    0.0730    2887248  17. ReflectionClass->__construct() /var/www/trafficgate/vendor/laravel/framework/src/Illuminate/Container/Container.php:736

This took me far longer to track down than I had hoped as the error that was thrown gave no suggestion to me that the cause was due to the .env file.
The only difference in my testing was Laravel/Framework v5.2.5 and Laravel/Framework v5.2.6. All other packages, including vlucas/dotenv (v2.2.0) were already at their latest.
I couldn't seem to find anything in the diff between 5.2.5 and 5.2.6 that would suggest this would happen.

It's caused by the change of InvalidArgumentException to InvalidPathException in src/Illuminate/Foundation/Bootstrap/DetectEnvironment.php, but I'm not sure why this would cause it to fail unless it's been working by a bug until now.

This error happened with me sometimes and deleting /bootstrap/compiled.php manually solved the problem.

https://github.com/vlucas/phpdotenv/issues/133#issuecomment-152707290

Wow, thanks for that.
Considering I've never had to quote a string literal that appears on its own line before, I find this decision to be quite obnoxious.
Worse yet that is isn't mentioned in the documentation for Laravel anywhere since they transferred from dotenv v1 to v2. Definitely warrants an upgrade message I would think as it is BC.

It's caused by the change of InvalidArgumentException to InvalidPathException in src/Illuminate/Foundation/Bootstrap/DetectEnvironment.php, but I'm not sure why this would cause it to fail unless it's been working by a bug until now.

Not it wasn't. Before it was just failing silently and discarding half your .env file...

Under 5.2.5, the following was still working:

No it wasn't. It was failing silently.

That's even worse. This is handled extremely poorly for invalid files. You don't even know it's the .env file causing the failure based on the exception thrown by Laravel.

That's a different bug, yes.

It's because an exception is thrown trying to log the original exception.

 This error happened with me sometimes and deleting /bootstrap/compiled.php manually solved the problem.

thanks @lcdss !!

thanks @lcdss !!

That DOES NOT solve this problem, BUT it could solve other problems.

@GrahamCampbell well, I've posted the issue here https://laracasts.com/discuss/channels/general-discussion/class-log-does-not-exist-1?page=1#reply-138188
I have been unable to progress since yesterday. After deleting the bootstrap compiled file it works.
But you are correct, it is not related to the .env files. My bad

@GrahamCampbell I have just submitted a PR to the docs to warn about this.
Do you think within Bootstrap/DetectEnvironment.php we should be catching the InvalidFileException ?

we should be catching

No, we purposefully throw it in order to crash the app because the env file is invalid.

@GrahamCampbell Sure, but the current stack trace is useless. I had to use step debugging with xdebug to figure out what was going on. This isn't particularly accessible when a better error could be presented.
Even a die('Environment file is invalid') would be better.

Sure, but the current stack trace is useless.

Yes, we do need to fix the case where the logger is not bound, and crash without having a 2nd crash.

Dieing and leaking information to the user like that would be bad though.

Dieing and leaking information to the user like that would be bad though.

I agree, my point was just that we should present a more useful error message :+1:
Is there an existing issue for the exception thrown before logger bound issue?

yes: https://github.com/laravel/framework/issues/11756

@GrahamCampbell why does this still not have any documentation about it in the Laravel upgrade docs? Laravel 5.1 uses "vlucas/phpdotenv": "~1.0", which means .env files don't need quoted and nesting variables is done using {$VARIABLE} syntax instead of ${VARIABLE} syntax. It's a breaking change, but yet there is no documentation about it anywhere.

@ikari7789 I submitted PR #2223 but @taylorotwell closed it and isn't engaging with me how it can be accepted.

It's because your PR didn't explain the actual upgrading details. It just stated the new behaviour out of context.