Windows immediate session expired

Hi!
I can successfully build and run this project, but I can't log in. Even if I create a new user, or use the test user hardcoded, immediately after I login I'm returned to the login screen with ?expired=1.

info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 POST http://<IP_ADDRESS>:5000/api/auth/login application/x-www-form-urlencoded 62
info: aspnetCoreReactTemplate.SpaFallbackMiddleware[0]
Handling request: /api/auth/login
info: AspNet.Security.OAuth.Validation.OAuthValidationMiddleware[7]
Bearer was not authenticated. Failure message: Authentication failed because the access token was invalid.
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware[7]
Bearer was not authenticated. Failure message: No SecurityTokenValidator available for token: null
info: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[0]
The token request was successfully extracted from the HTTP request: {
"username"<EMAIL_ADDRESS>"password": "[removed for security reasons]",
"grant_type": "password"
}.
dbug: OpenIddict.OpenIddictProvider[0]
The token request validation process was partially skipped because the 'client_id' parameter was missing or empty.
info: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[0]
The token request was successfully validated.
dbug: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[0]
The default token request handling was skipped from user code.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method aspnetCoreReactTemplate.aspnetCoreReactTemplate.Controllers.AuthController.Login (api) with arguments ({
"username"<EMAIL_ADDRESS>"password": "[removed for security reasons]",
"grant_type": "password"
}) - ModelState is Valid
dbug: Npgsql.NpgsqlConnection[3]
Opening connection to database 'dotnetcore' on server 'tcp://localhost:5433'.
info: Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory[1]
Executed DbCommand (2ms) [Parameters=[@__normalizedUserName_0='?'], CommandType='Text', CommandTimeout='30']
SELECT "u"."Id", "u"."AccessFailedCount", "u"."ConcurrencyStamp", "u"."Email", "u"."EmailConfirmed", "u"."GivenName", "u"."LockoutEnabled", "u"."LockoutEnd", "u"."NormalizedEmail", "u"."NormalizedUserName", "u"."PasswordHash", "u"."PhoneNumber", "u"."PhoneNumberConfirmed", "u"."SecurityStamp", "u"."TwoFactorEnabled", "u"."UserName"
FROM "AspNetUsers" AS "u"
WHERE "u"."NormalizedUserName" = @__normalizedUserName_0
LIMIT 1
dbug: Npgsql.NpgsqlConnection[4]
Closing connection to database 'dotnetcore' on server 'tcp://localhost:5433'.
dbug: Npgsql.NpgsqlConnection[3]
Opening connection to database 'dotnetcore' on server 'tcp://localhost:5433'.
info: Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory[1]
Executed DbCommand (1ms) [Parameters=[@__userId_0='?'], CommandType='Text', CommandTimeout='30']
SELECT "role"."Name"
FROM "AspNetUserRoles" AS "userRole"
INNER JOIN "AspNetRoles" AS "role" ON "userRole"."RoleId" = "role"."Id"
WHERE "userRole"."UserId" = @__userId_0
dbug: Npgsql.NpgsqlConnection[4]
Closing connection to database 'dotnetcore' on server 'tcp://localhost:5433'.
dbug: Npgsql.NpgsqlConnection[3]
Opening connection to database 'dotnetcore' on server 'tcp://localhost:5433'.
info: Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory[1]
Executed DbCommand (1ms) [Parameters=[@__user_Id_0='?'], CommandType='Text', CommandTimeout='30']
SELECT "uc"."Id", "uc"."ClaimType", "uc"."ClaimValue", "uc"."UserId"
FROM "AspNetUserClaims" AS "uc"
WHERE "uc"."UserId" = @__user_Id_0
dbug: Npgsql.NpgsqlConnection[4]
Closing connection to database 'dotnetcore' on server 'tcp://localhost:5433'.
info: aspnetCoreReactTemplate.aspnetCoreReactTemplate.Controllers.AuthController[0]
User logged in (id: 246fa7f2-a0f8-422f-b806-f71749bc60e1)
info: Microsoft.AspNetCore.Mvc.SignInResult[1]
Executing SignInResult with authentication scheme (ASOS) and the following principal: System.Security.Claims.ClaimsPrincipal.
dbug: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[0]
'AspNet.Identity.SecurityStamp' was excluded from the access token claims.
dbug: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[0]
'name' was excluded from the identity token claims.
dbug: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[0]
'AspNet.Identity.SecurityStamp' was excluded from the identity token claims.
info: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[0]
The token response was successfully returned: {
"resource": "resource-server",
"scope": "openid email profile roles",
"token_type": "Bearer",
"access_token": "[removed for security reasons]",
"expires_in": 86400,
"id_token": "[removed for security reasons]"
}.
info: AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware[10]
AuthenticationScheme: ASOS signed in.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action aspnetCoreReactTemplate.aspnetCoreReactTemplate.Controllers.AuthController.Login (api) in 31.0254ms
info: aspnetCoreReactTemplate.SpaFallbackMiddleware[0]
Finished handling request.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 40.3848ms 200 application/json;charset=UTF-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://<IP_ADDRESS>:5000/api/contacts
info: aspnetCoreReactTemplate.SpaFallbackMiddleware[0]
Handling request: /api/contacts
info: AspNet.Security.OAuth.Validation.OAuthValidationMiddleware[7]
Bearer was not authenticated. Failure message: Authentication failed because the access token was invalid.
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware[1]
Failed to validate the token eyJhbGciOiJSUzI1NiIsImtpZCI6IlFCU0g0M1NSUE1NTDRLQ1NaV1pBTEtLWlBTTFhLS0tJRU5ZSFQ4RUciLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiIyNDZmYTdmMi1hMGY4LTQyMmYtYjgwNi1mNzE3NDliYzYwZTEiLCJuYW1lIjoiYXNkZkBhc2RmLmFzZGYiLCJ0b2tlbl91c2FnZSI6ImFjY2Vzc190b2tlbiIsImp0aSI6IjQ0ZGU1NmVkLWZmYzgtNGU5My1iOTlmLTMwNDRhN2Q3ZjRmYSIsInNjb3BlIjpbIm9wZW5pZCIsImVtYWlsIiwicHJvZmlsZSIsInJvbGVzIl0sImF1ZCI6InJlc291cmNlLXNlcnZlciIsIm5iZiI6MTUwNDg1MTE0MiwiZXhwIjoxNTA0OTM3NTQyLCJpYXQiOjE1MDQ4NTExNDIsImlzcyI6Imh0dHA6Ly8xMjcuMC4wLjE6NTAwMC8ifQ.L6D94xztoO1W_dlxahFbRtJV3qMhe87nxKpgJOyWCJhg2Vq8-mJiDOm1bc4UtrrN_ZGaVOSxpgKV3akwzrxiLJ0aRZHtDJVLWBjff5KqwEhzn_mJpqXjgyZ3QHIaMD1B1VublNTa9HwciXguazZQOvUQ8ctgvKxp8eN3k3iFEb4r3yfr_9VLfYTpymqbAKHDOH0gT-kE601CtwUdJQBnwdZNL23dODLUUVJCNaXq8qfl2nwqXlO5GLFsW0zt_omASb8VxXwmrl8wqSexjYGGK1GSGH-cyGeOhYh4eTuFPSTQy4g15h4H_AMID4ex2XIe_1O6zU8Ul0ieVD-9U8QyFQ.
Microsoft.IdentityModel.Tokens.SecurityTokenInvalidIssuerException: IDX10205: Issuer validation failed. Issuer: 'http://<IP_ADDRESS>:5000/'. Did not match: validationParameters.ValidIssuer: 'http://localhost:5000/' or validationParameters.ValidIssuers: 'null'.
at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuer(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters)
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateTokenPayload(JwtSecurityToken jwt, TokenValidationParameters validationParameters)
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken)
at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.d__1.MoveNext()
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware[7]
Bearer was not authenticated. Failure message: IDX10205: Issuer validation failed. Issuer: 'http://<IP_ADDRESS>:5000/'. Did not match: validationParameters.ValidIssuer: 'http://localhost:5000/' or validationParameters.ValidIssuers: 'null'.
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed for user: (null).
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter'.
info: Microsoft.AspNetCore.Mvc.ChallengeResult[1]
Executing ChallengeResult with authentication schemes ().
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware[12]
AuthenticationScheme: Bearer was challenged.
info: AspNet.Security.OAuth.Validation.OAuthValidationMiddleware[12]
AuthenticationScheme: Bearer was challenged.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action aspnetCoreReactTemplate.Controllers.ContactsController.Get (api) in 11.5629ms
info: aspnetCoreReactTemplate.SpaFallbackMiddleware[0]
Finished handling request.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 48.4213ms 401
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://<IP_ADDRESS>:5000/?expired=1
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 3.1883ms 200 text/html; charset=UTF-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://<IP_ADDRESS>:5000/main.js
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 147.1206ms 200 application/javascript; charset=UTF-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://<IP_ADDRESS>:5000/__webpack_hmr
info: Microsoft.AspNetCore.Server.Kestrel[14]
Connection id "0HL7MFODCE6JA" communication error.
Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4081 ECANCELED operation canceled
info: Microsoft.AspNetCore.Server.Kestrel[14]
Connection id "0HL7MFODCE6JA" communication error.
Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4081 ECANCELED operation canceled

You are certain you've tried the seeded user<EMAIL_ADDRESS>/ P2ssw0rd!  ?


lock xadd is not properly decoded

The xadd instruction appears to not be properly decoded with the lock prefix.

fixed in dev


When validating Tokens, check prototype chain for required properties

Chevrotain uses hasOwnProperty to ensure that each Token has a valid static PATTERN property.  However, this means I can't declare the PATTERN higher up the prototype chain, for example as a getter that computes the pattern based on other static properties.
Here's the relevant code:
https://github.com/SAP/chevrotain/blob/master/src/scan/lexer.ts#L288
Is it possible to modify the property checking to scan up the prototype chain as well?  The logic of findMissingPatterns and findInvalidPatterns can be combined into a single function that grabs the value of currClass.PATTERN and generates a "missing" error if it's undefined and an "invalid" error if it's anything else.

This sounds like a bit of an edge case but it makes sense.
The createToken API already mixes in the static properties:
https://github.com/SAP/chevrotain/blob/master/src/scan/tokens_public.ts#L149
So I am guessing you are using class syntax to define the tokens.
Perhaps implementing such mix-ins would provide you with an immediate (if ugly) workaround.
Possible problems

Misleading error message: if a user extends a Token and forgets to overwrite the PATTERN property will this result in duplicate pattern error message instead of missing pattern?

I'd like to modify the Tokens to use multiple inheritance to implement multiple classifications.  For example "true" may be both a literal and a keyword. This is a fairly common use case. Does this conflict in any manner with the usage of the class syntax?
Would the class syntax become deprecated.

I think these problems are resolvable by removing JavaScript inheritance completely
from the chevrotain tokens:

No more parent property for the createToken API.
No more mixins of static properties.
Add a "classification" property which accepts an array of TokenTypes/

if an end user such as yourself uses inheritance that is fine.
But Chevrotain should only do "**.PATTERN" / ".GROUP" / ".**POP_MODE"
And not care how the property got there...

It will be a while before I get around to this
I suggest a PR if you want to expedite it 😄
Note:

There are three usage of has on tokenClass static properties.
To avoid misleading error messages:

Maybe If it is both undefined and !hasOwnProp it is "missing"?
Maybe If it is undefined and hasOwnProp it is invalid
if is not undefined it is not missing.

Thanks for the quick response.

if an end user such as yourself uses inheritance that is fine.
But Chevrotain should only do ".PATTERN" / ".GROUP" / ".POP_MODE"
And not care how the property got there...

Yeah, I definitely agree.  I'll put together a PR and you can see if you like it.
What if I use 'PATTERN' in currClass instead of has(currClass, 'PATTERN')?  This will check if the property is declared without caring where it's declared.
Other ideas to avoid misleading error messages:

If it's !('PATTERN' in currClass) it's considered missing.  Otherwise it's either valid or invalid.
Treat undefined as "missing", everything else as either valid or invalid.  Change the error message to "required static property PATTERN is undefined."  I think any JavaScript programmer that's writing a parser understands that missing properties are undefined.

For what it's worth, here's what my code looks like:
const allTokens: TokenConstructor[] = [];

class Punctuation extends Token {
    private static _puncPattern: RegExp | string;
    static set PATTERN(v) {
        this._puncPattern = v;
    }
    static get PATTERN() {
        if(this._puncPattern) return this._puncPattern;
        if(this.SIMPLIFIED) {
            return new RegExp(this.SIMPLIFIED.split('  ').map(v => escapeRegExp(v)).join('|'));
        }
        return Lexer.NA;
    }
    static SIMPLIFIED: string;
    static get LABEL() {
        if(this.SIMPLIFIED) return this.SIMPLIFIED.split('  ').map(v => `'${ v }'`).join(' | ');
        return `'${ this.PATTERN instanceof RegExp ? this.PATTERN.source : this.PATTERN }'`;
    }
}

// This decorator is applied to all tokens
function Tok(target: any) {
    allTokens.push(target);
    // Workaround to ensure `has` checks pass
    if(!has(target, 'PATTERN')) Object.defineProperty(target, 'PATTERN', {
        value: target.PATTERN
    });
}

// Example of a token
@Tok class OpEqual extends Punctuation {
    static SIMPLIFIED = '+=  -=  *=  /=  %=  &=  ^=  |=  <<=  >>=  >>>=';
}

I never refer to Punctuation in the grammar or even tell the lexer about it (it is not included in the allTokens array) so I'm not relying on Chevrotain's inheritance feature.  My workaround is in the Tok function, so this issue is not a huge blocker for me, but the error felt misleading since I declared PATTERN and Chevrotain didn't see it.

You suggestions are good.
As long as there is a useful error message the exact semantics of missing vs undefined do not really matter 😄
I will positively look into a PR implementing this fix.
Let me know if any help or better docs are needed for the development env  / npm scripts.
And remember to check 100% code coverage (including branch coverage as I had to disable branch coverage checks due to issue with typescript code generation).

I am closing this for now as Tokens as classes are no longer officially supported (as of 2.0)
I would still positively consider a related PR but right now this seems out of scope for "native" chevrotain.


Custom queries very slow

This is probably a design issue to be discussed, hope filing this as an issue here is okay.
When I have a handful of custom queries I want to run one after the other, bean-query is almost instantaneous for each query I run, after the initial startup time (long in my case, since I have thousands of transactions and many plugins). With fava, however, each query takes on the order of half a minute to run. This makes custom queries almost unusable for me.
Is this because it's calling bean-query in the backend for each query separately, so the startup time (presumably for the backend to read the pickle file) is paid each time?

Is this because it's calling bean-query in the backend for each query separately, so the startup time (presumably for the backend to read the pickle file) is paid each time?

Nope, fava only loads the file once on startup (or when it's changed) and calls into beancount directly to run the query. The only thing we then to is to render it in the template and I would be surprised if that takes more than 1 or 2 seconds for very large tables.
Can you run fava with profiling enabled?

You're right, most of the time is spent in beancount:
GET.query.023268ms.1458588906.prof

         17546308 function calls (17124616 primitive calls) in 23.268 seconds

   Ordered by: internal time
   List reduced from 692 to 25 due to restriction <25>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
629306/217906   10.412    0.000   21.732    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/compare.py:18(stable_hash_namedtuple)
  4172311    2.728    0.000    2.730    0.000 {built-in method isinstance}
  3681951    1.668    0.000    1.668    0.000 {method 'update' of '_hashlib.HASH' objects}
   879351    1.565    0.000    1.565    0.000 {method 'format' of 'str' objects}
  3682835    1.416    0.000    1.416    0.000 {method 'encode' of 'str' objects}
   637534    1.122    0.000    1.122    0.000 {method 'hexdigest' of '_hashlib.HASH' objects}
   439314    0.873    0.000    1.993    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/display_context.py:362(format)
   439314    0.654    0.000    3.090    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/amount.py:72(to_string)
   637535    0.424    0.000    0.424    0.000 {built-in method openssl_md5}
       17    0.395    0.023    0.643    0.038 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/interpolate.py:510(compute_entry_context)
   186831    0.347    0.000    0.347    0.000 {built-in method sorted}
   439314    0.326    0.000    3.416    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/amount.py:83(__str__)
   217906    0.241    0.000   21.973    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/compare.py:52(hash_entry)

GET.query.stored_queries.7d44eac70d1c15ea6d29099f5f383d60.001301ms.1458588883.prof

         952188 function calls (927988 primitive calls) in 1.301 seconds

   Ordered by: internal time
   List reduced from 191 to 25 due to restriction <25>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
37014/12814    0.594    0.000    1.273    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/compare.py:18(stable_hash_namedtuple)
   227260    0.159    0.000    0.159    0.000 {built-in method isinstance}
   216570    0.092    0.000    0.092    0.000 {method 'update' of '_hashlib.HASH' objects}
    51684    0.092    0.000    0.092    0.000 {method 'format' of 'str' objects}
   216579    0.089    0.000    0.089    0.000 {method 'encode' of 'str' objects}
    37498    0.072    0.000    0.072    0.000 {method 'hexdigest' of '_hashlib.HASH' objects}
    25842    0.042    0.000    0.108    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/display_context.py:362(format)

A couple of questions:

(perhaps for @blais) Is that function (compare.py:18(stable_hash_namedtuple)) really important for a query/display? Can it be skipped?
It seems like GET.query is called for each time a new custom query is picked from the list (GET.query.stored_queries, I think?), which is what is taking most of the time (23+ seconds). Is this necessary?

From the profile it seems like this is something on our end after all. Still busy now, I will elaborate and probably fix this later. I assume the long page load also happens for the empty "/query/" page?

I assume the long page load also happens for the empty "/query/" page?

Yes, correct.

The slow page load should be fixed. Can you confirm?
(Note: the dropdown select for the stored queries is currently broken, will probably fix that tomorrow)

(Note: the dropdown select for the stored queries is currently broken, will probably fix that tomorrow)

Done. Easier than I thought.

Much better! Both the empty query page (< 1s) and the custom queries now load fast enough (not perceptible) that it's not even worth profiling (I can't profile easily on the machine that I build). Thank you!

On Mon, Mar 21, 2016 at 3:48 PM, Red S<EMAIL_ADDRESS>wrote:

You're right, most of the time is spent in beancount:
GET.query.023268ms.1458588906.prof
     17546308 function calls (17124616 primitive calls) in 23.268 seconds

Ordered by: internal time
List reduced from 692 to 25 due to restriction <25>
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
629306/217906   10.412    0.000   21.732    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/compare.py:18(stable_hash_namedtuple)
4172311    2.728    0.000    2.730    0.000 {built-in method isinstance}
3681951    1.668    0.000    1.668    0.000 {method 'update' of '_hashlib.HASH' objects}
879351    1.565    0.000    1.565    0.000 {method 'format' of 'str' objects}
3682835    1.416    0.000    1.416    0.000 {method 'encode' of 'str' objects}
637534    1.122    0.000    1.122    0.000 {method 'hexdigest' of '_hashlib.HASH' objects}
439314    0.873    0.000    1.993    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/display_context.py:362(format)
439314    0.654    0.000    3.090    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/amount.py:72(to_string)
637535    0.424    0.000    0.424    0.000 {built-in method openssl_md5}
17    0.395    0.023    0.643    0.038 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/interpolate.py:510(compute_entry_context)
186831    0.347    0.000    0.347    0.000 {built-in method sorted}
439314    0.326    0.000    3.416    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/amount.py:83(str)
217906    0.241    0.000   21.973    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/compare.py:52(hash_entry)
GET.query.stored_queries.7d44eac70d1c15ea6d29099f5f383d60.001301ms.1458588883.prof
     952188 function calls (927988 primitive calls) in 1.301 seconds

Ordered by: internal time
List reduced from 191 to 25 due to restriction <25>
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
37014/12814    0.594    0.000    1.273    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/compare.py:18(stable_hash_namedtuple)
227260    0.159    0.000    0.159    0.000 {built-in method isinstance}
216570    0.092    0.000    0.092    0.000 {method 'update' of '_hashlib.HASH' objects}
51684    0.092    0.000    0.092    0.000 {method 'format' of 'str' objects}
216579    0.089    0.000    0.089    0.000 {method 'encode' of 'str' objects}
37498    0.072    0.000    0.072    0.000 {method 'hexdigest' of '_hashlib.HASH' objects}
25842    0.042    0.000    0.108    0.000 /usr/lib/python3.4/site-packages/beancount-2.0b8-py3.4-cygwin-2.4.1-x86_64.egg/beancount/core/display_context.py:362(format)
A couple of questions:

(perhaps for @blais https://github.com/blais) Is that function
(compare.py:18(stable_hash_namedtuple)) really important for a
query/display? Can it be skipped?

I've noticed this function can be slow at times. I've considered rewriting
it in C at some point:
https://bitbucket.org/blais/beancount/src/cce57fdfca192f3f7bb443a02b25ebb356abe788/TODO?fileviewer=file-view-default#TODO-1261

AFAIK your query should only be calling it on demand if your query pulls
the "id" column:
https://bitbucket.org/blais/beancount/src/cce57fdfca192f3f7bb443a02b25ebb356abe788/src/python/beancount/query/query_env.py?at=default&fileviewer=file-view-default#query_env.py-865
It's a bit odd that it occupies so much of the running time:

It seems like GET.query is called for each time a new custom query
is picked from the list (GET.query.stored_queries, I think?), which is what
is taking most of the time (23+ seconds). Is this necessary?

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/aumayr/fava/issues/226#issuecomment-199446339

@blais No fault on your part! We had some horribly inefficient code in the query template. For all the stored queries, it would use the hash to determine the filename and lineno (I know it's in the meta attribute, no idea why that wasn't used). This meant linear time (in entries) for every query...

We had some horribly inefficient code in the query template.

👼🏼


fix: setting syscc to zero to prevent error state in response.

Closes #50

:tada: This PR is included in version 2.35.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Added Various Features

Add

Stop

Fast-Forward

Counter

@SadieLane implement some features

The module you used has only one function that is playsound(). Hence it is not easy to manipulate the sound file in the ways ur describing using this module(except maybe stopping the song).


Fix for issue #2922

I have extended the unit test of class zcl_abapgit_gui_html_processor
and used Christians fix  in it.
Still, two unittest-methods in class zcl_abapgit_gui_html_processor are failing on my BW 7.40 SP05 system (but not because of my fix ^^).

With this fix it is possible to update to newest abapGit version on BW 7.40 SP05

closes #2922


JS: Declassify sensitive exprs with special characters

Fixes this FP

@erik-krogh can I get an approval from you since Esben is away?


Add new linter checks

Description
This PRs hardens the amount of linting checks performed on Liqo Code.
It adds:

gosec
goimports
prealloc
godot

/rebase

/rebase


Add Prometheus Pushgateway to the docker-compose infrastructure.

This adds the Prometheus Pushgateway (https://github.com/prometheus/pushgateway) to the example, so that you can publish metrics to the prometheus DB by simply running
echo "some_metric 3.14" | curl --data-binary @- http://user:password@localhost:9091/metrics/job/some_job in your host machine.

Thanks


Add reliable timeouts to fastcgi upstream

1. What version of Caddy are you using (caddy -version)?
caddy -version
Caddy 0.10.12 (non-commercial use only)

2. What are you trying to do?
serve php backend via fastcgi module
3. What is your entire Caddyfile?
(netlify-ips) {

  realip {
    from <IP_ADDRESS>/32
    from <IP_ADDRESS>/32
    from <IP_ADDRESS>/32
    from <IP_ADDRESS>/32
  }
}

static.MYDOMAIN.com {
  root /home/data/webroot
  gzip
  log / stdout "{remote} - {user} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\""
}

app-dev56.MYDOMAIN.com:80 {
  tls off
  redir / https://{hostonly}/
  redir /registry https://MYDOMAIN.com/index.php?func=register
}

app-dev56.MYDOMAIN.com {

  import netlify-ips

  redir /registry https://{hostonly}/index.php?func=register

  root /home/phpapp/app/web-app-dev56

  log / stdout "{remote} - {user} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\""

  fastcgi / <IP_ADDRESS>:7056 php {
    except /config.php
    read_timeout 30s
  }
}

4. How did you run Caddy (give the full command and describe the execution environment)?
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

/usr/local/bin/caddy -log stdout -agree=true -email MY-EMAIL -conf=/etc/caddyserver/caddyfile -root=/var/tmp

5. No timeouts
As far as I have seen in the code are no default timeouts for connect_timeout, read_timeout and send_timeout.
I suggest to set some default values for these timeouts, similar to the proxy module http.proxy.
Proposal: 60s

Hi @git001
Thank you for the feature request.  We have had issues before when we set default timeouts, but 60s seems like a reasonable timeout to me.

I don't understand; why is setting a default timeout for fastcgi preferable?

maybe @git001 could elaborate some use cases

maybe @git001 could elaborate some use cases

I think that in general a infinite timeout isn't reliable.
You don't know which time out will interfere the communitation chain client <-> proxy (=caddy) <-> appserver.
I prefer to know, at least from proxy point of view, which timeout are set.
I assume that this was also the reason for the defaults in the http proxy module.
Maybe the net plugin could also have some reliable defaults.

But why should there be default timeouts? I also seem to remember problems when there were hidden/default timeouts set.

Usually you need timeout to prevent system from leaking any resources, because sessions without timeout can consume your resources for very long.
In case of php there are already hidden/default timeouts in php itself(like max_execution_time).
In general i agree that timeouts are more reliable and you need them to mitigate issues with leaking resources which you are unaware of.

I agree with @SmilingNavern to have some good default values.
I prefer that the proxies inside caddy should have the same default values, e.g. http-proxy, fcgi-proxy, ....

I agree with @SmilingNavern to have some good default values.
I prefer that the proxies inside caddy should have the same default values, e.g. http-proxy, fcgi-proxy, ....

I agree with @SmilingNavern to have some good default values.
I prefer that the proxies inside caddy should have the same default values, e.g. http-proxy, fcgi-proxy, ....

Alright -- go ahead and propose timeouts and we'll just make sure to document them, along with a way to turn them off if need-be.

I think 60s are good values to start.

I believe we can close this issue. @mholt


Missing files

Some files are missing like the scripts to launch poybar for example (launch.sh, dunst.sh, bspswallow.sh, launchlistener.sh, colors.sh), the config of some packages too, it seems to me.

My bad. I forgot to include the scripts directory in the repo. I just pushed a commit and the scripts directory should be there now. Can you copy everything to a folder (preferably to ~/.config/scripts) and see if it successfully locates the missing scripts?

Any update?

Any update?

I switched to another environment under Awesome, but otherwise overall everything was working pretty well :smile:

That's great! Keen to try out AwesomeWM soon :) Closing this issue now


No final output report and no obvious crash/warning/error

Hi,
when running fmriprep in a singularity container on a SGE-cluster the final output html report sub-<subject_label>.html in <out_dir>/fmriprep/ is missing.  There is no log folder in outdir/fmriprep/sub-{subject}  and the log folder in <out_dir>/ is empty too.
Cluster-output doesn't show anything obviously funny in terms of errors or warning.
Same data (subject) created an report html on a bare metal installation of fmriprep on a mac os x. Only obvious difference was that it created acomp and tcomp outputs, which are missing for the problematic case described above.
Checked a bunch of files and reports in the work directory but couldn't find something hinting towards a crash/error (but new to fmriprep so possibly not looking in the right places).
Any ideas or suggestions for pointers where to look for hidden/silent error messages?
Let me know if I miss some crucial information here that would be helpful to understand/solve the issue.
Thanks!
singularity container used:
poldracklab_fmriprep_latest-2017-08-28-12cf5348d2f5.img
command used to run fmriprep:
singularity exec ${fmriprep_img} fmriprep --participant_label  ${sid} --debug --no-freesurfer --ignore-aroma-denoising-errors ${src_dir} ${out_dir} --ignore slicetiming --output-space T1w -w ${work_dir} participant"

OK - found the issue. Not at all fmriprep related.
It produced the report just fine when running same subject with --ignore fieldmaps. However when calling fmriprep without ignoring fieldmaps it produced some of the fieldmap files (and respective sub-reports).
Turns out the SGE-cluster needed more threads to finish the job. Et voila, final output report produced :)

Glad to hear all ended well. Thanks for reporting the solution.

sure thing!


Quick fix: exception bug

Coverage remained the same at 83.394% when pulling c9ea415103454ddf13cc4bae5e76fdfb85bbc7ea on shsr04-patch-1 into eeda074d722fab53f3c7b26c329a199150d77edf on master.


PR-437-Fixed bug to allow system instructions after first turn

What does this PR do?
In short, provide a summary of what this PR does and why. Usually, the relevant context should be present in a linked issue.

[This PR solves the issue where agents cannot keep track of instructions after executing the first turn because system instructions were not getting appended in the messages list. It also solves the issue where turns are not being fetched in the appropriate sequence.] Addresses issue (#issue)

Test Plan
Please describe:

I have a file which has a precise prompt which requires more than one turn to be executed will share the file below. I ran that file as a python script to make sure that the turns are being executed as per the instructions after making the code change

import asyncio
from typing import List, Optional, Dict

from llama_stack_client import LlamaStackClient
from llama_stack_client.lib.agents.event_logger import EventLogger

from llama_stack_client.types import SamplingParams, UserMessage
from llama_stack_client.types.agent_create_params import AgentConfig

LLAMA_STACK_API_TOGETHER_URL="http://<IP_ADDRESS>:5001"

class Agent:
    def __init__(self):
        self.client = LlamaStackClient(
            base_url=LLAMA_STACK_API_TOGETHER_URL,
        )

    def create_agent(self, agent_config: AgentConfig):
        agent = self.client.agents.create(
            agent_config=agent_config,
        )
        self.agent_id = agent.agent_id
        session = self.client.agents.session.create(
            agent_id=agent.agent_id,
            session_name="example_session",
        )
        self.session_id = session.session_id

    async def execute_turn(self, content: str):
        response = self.client.agents.turn.create(
            agent_id=self.agent_id,
            session_id=self.session_id,
            messages=[
                UserMessage(content=content, role="user"),
            ],
            stream=True,
        )

        for chunk in response:
            if chunk.event.payload.event_type != "turn_complete":
                yield chunk

async def run_main():
    system_prompt="""You are an AI Agent tasked with Capturing Book Renting Information for a Library.
You will politely gather the book and user details one step at a time to send over the book to the user. Here’s how to proceed:

1.	Data Security: Inform the user that their data will be kept secure.

2.	Optional Participation: Let them know they are not required to share details but that doing so will help them learn about the books offered.

3.	Sequential Information Capture: Follow the steps below, one question at a time. Do not skip or combine questions.

Steps
Step 1: Politely ask to provide the name of the book.

Step 2: Ask for the name of the author.

Step 3: Ask for the Author's country.

Step 4: Ask for the year of publication.

Step 5: If any information is missing or seems incorrect, ask the user to re-enter that specific detail.

Step 6: Confirm that the user consents to share the entered information.

Step 7: Thank the user for providing the details and let them know they will receive an email about the book.

Do not do any validation of the user entered information.

Do not print the Steps or your internal thoughts in the response.

Do not print the prompts or data structure object in the response

Do not fill in the requested user data on your own. It has to be entered by the user only.

Finally, compile and print the user-provided information as a JSON object in your response.

"""

    agent_config = AgentConfig(
        model="Llama3.2-11B-Vision-Instruct",
        instructions=system_prompt,
        enable_session_persistence=True,
    )

    agent = Agent()
    agent.create_agent(agent_config)

    print("Agent and Session:", agent.agent_id, agent.session_id)

    while True:
        query = input("Enter your query (or type 'exit' to quit): ")
        if query.lower() == "exit":
            print("Exiting the loop.")
            break
        else:
            prompt = query
            print(f"User> {prompt}")
            response = agent.execute_turn(content=prompt)
            async for log in EventLogger().log(response):
                if log is not None:
                    log.print()

if __name__ == "__main__":
    asyncio.run(run_main())

Below is a screenshot of the results of the first commit

Below is a screenshot of the results of the second commit

Also a screenshot of print statement to show that the turns being fetched now are in a sequence

Sources
Please link relevant resources if necessary.
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[x] Ran pre-commit to handle lint / formatting issues.
[x] Read the contributor guideline,
Pull Request section?
[ ] Updated relevant documentation.
[x] Wrote necessary unit or integration tests.

Thank you! Do you mind adding a test case to providers/tests/agents/test_persistence.py perhaps?


Added support for bivariate functions and in Fun and \

This adds (yet another version of) bivariate functions as a subtype of Fun.

Coverage decreased (-1.61%) to 45.29% when pulling cf1da5eed6d6dc92756b6260723fad462ca4ab02 on feature-bivar into a75477c7a19da4b0dfd6184b0591013983a0ebfa on master.


Making contributing guidelines specific to this list

Submitting this as a pull request to get the feedback before merging.

Looks good to me @aleksandar-todorovic :+1:


fix: Change to reverse ordering of Overdraft instances

Codecov Report

Merging #82 (26b6a40) into main (7e4cfaa) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #82   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           10        10
  Lines         2576      2576
  Branches       475       475
=========================================
  Hits          2576      2576

Files
Coverage Δ

src/immoney/_base.py
100.00% <100.00%> (ø)

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!


Invalid operation: The response.text quick accessor requires the response to contain a valid Part, but none were returned. Please check the candidate.safety_ratings to determine if the response was blocked.

Description of the bug:
My code is as following:
def model_generate(query, model):
response = model.generate_content(query,
generation_config=genai.types.GenerationConfig(
max_output_tokens=3000,
temperature=0.7),
safety_settings={
HarmCategory.HARM_CATEGORY_HATE_SPEECH: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
})
return response
response = model_generate(input, model)
Then I got error: Invalid operation: The response.text quick accessor requires the response to contain a valid Part, but none were returned. Please check the candidate.safety_ratings to determine if the response was blocked.

How can I deal with that?
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response

@YiLuo59, Thank you reporting this issue. Similar issue is already filed in python SDK repo (#python/373)
This repository is for issues related to website(https://ai.google.dev/) like documentation bugs or improvements. Requesting you to close this issue, follow and +1 similar thread for updates. Thank you!

@YiLuo59
set the safety settings
https://ai.google.dev/gemini-api/docs/safety-settings?hl=en


When Multistage Build on Docker file " No Elastic Node Aviable "

Using ElasticSearch Version
[ ] elastic.v6 (for Elasticsearch 6.1.2)
Please describe the expected behavior
Expect move binary file to small images && Can run normally
I'm wanna use Docker multistage build images with Olivere / elastic
but when I'm trying to move an executed  go binary file from builder stage has to error
 time=09-09-26068 09:09:00 level=error msg=no active connection found: no Elasticsearch node available host=045b4f45f939 layer=STORAGE model=NewElastic
But !! if i don't move execute file from builder stage just leave it in to builder container and delete seconds build stage this error is not happen i'm currious what i'm missing
Is this library require some lib. Below is my Dockerfile
FROM 3dsinteractive/go-librdkafka:v1 as builder
ADD ./api-consumer/ /go/

WORKDIR /go/src/pushandmotion.com/pushconsumer

RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh && \
    dep ensure && \
    go build -o /app/pushconsumer -tags static_all

#This can run normally
ENTRYPOINT ["/app/pushconsumer"]

EXPOSE 8000

#Promblem is happen when copy binary file from builder
FROM alpine:3.6

WORKDIR /root/
COPY --from=builder /app/pushconsumer .
ENTRYPOINT ["/root/pushconsumer"]

Please describe the actual behavior
When move execute file to small image has promble " No Elastic Node Aviable "
I'm already open elasticsearch in browser and ping inside the container it's work fine

This doesn't have to do anything with Docker and/or multi-stage builds. It has to do something with the way sniffing works (see details in the Wiki). The node IPs are probably not accessible from your application.

actually,  my app can access the node I'm trying by exec in the container and curl to elastic directly

but when logging this error still happen

What i'm doing wrong cause it's work normal when i'm put build file on top image not second images

Any news here?

Oh, my bad sorry for no response. After your suggestion, I'm disabled health checks its work fine

@Navapon I have been trying to reproduce this with https://github.com/olivere/elastic-with-docker (now updated to work with ES 6.x), but I couldn't. Maybe you can try it with that repo, and I'll re-open here if you can get the bug there. Thank you.


Add default address in profil edition

Maybe it would be cool to choose in a select field between the ones we have in setting.

i would like to work  on this issue

@sumitshinde-84 That would be great ! Do you know React-Admin already ?
To get you started, you only need to look for the ReferenceInput.
If you have questions, feel free to join our chatroom, I'm available there most of the time.

Done and deployed

To get you started,

I am proficient in React and Next.js, and I am familiar with backend development.

@sumitshinde-84 Great !
This issue is done, but if you want you can do https://github.com/assemblee-virtuelle/activitypods/issues/60 which is quite similar.
I'm still available on our chatroom if you have questions or want to make a call.


[FEATURE] Upgrading to new UI dashboard

Overview
The pull request primarily has changes to upgrade UI of STNO management dashboard. The new dashboard not only improves look and feel but adds new features to improve user experience. There are minor changes to the AppSync schema and resolvers to support new UI.
Features
Look and Feel

Login page

Side bar

Dark mode

Filtering by status

Federated local search (search for any field)

Pagination

Action Confirmation window

Actions for attachment requests

Viewing history of attachment or request

Implementation
The new dashboard uses material-ui for look and feel. There has been major refactoring of the react app implementation to use react hooks. The dependencies are cleaned up to remove unused packages. The AppSync schema is changed to add new query to get attachments by status. New DDB resolver request and mapping templates are added for searching by status. Existing query request mapping template is updated to support optional nextToken and limit arguments. Please note that there are no changes to the way STNO backend operates.
Testing
The changes are tested in multiple local environments. Please use the same deployment steps to deploy the solution in custom S3 bucket for testing purpose.
Issues (if any)
No issues observed so far.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sukenshah This is great work. Thanks for taking the time to improve the UI. We will review and consider this PR for merge in our next release planned for this year.

Hi there! any update on the status of this PR? this is a really nice feature that we would really like to see

Thanks but we plan to update the UI using CloudScape components in the next release.


Verify Ably as publisher

Both author and authors in pubspec.yaml have been deprecated so should not be present.
Instead we need to follow these instructions.

With help from @paddybyers we're validated as a publisher:
https://pub.dev/publishers/ably.com/packages


Systemd Unit

Any chance someone might be able to get a systemd unit to work? I tried, but was failing. I ended up creating a basic bash script then calling that via systemd. Not the greatest, but works. I'd love to get that script out of the picture.

PM2 did a great job for this, it is recommended.
# Install PM2
npm install pm2 -g

# Start Uptime Kuma Server
pm2 start npm --name uptime-kuma -- run start-server

# add PM2 to systemd
pm2 save
pm2 startup

More info: https://pm2.keymetrics.io/docs/usage/startup/

[Unit]
Description=Uptime-Kuma - A free and open source uptime monitoring solution
Documentation=https://github.com/louislam/uptime-kuma
After=network.target

[Service]
Type=simple
User=uptime
WorkingDirectory=/home/uptime/uptime-kuma
ExecStart=/usr/bin/npm run start-server
Restart=on-failure

[Install]
WantedBy=multi-user.target

Tested by putting it into /etc/systemd/system/uptime-kama.service, running systemctl daemon-reload, systemctl enable uptime-kama.service and restarting. Works a charm.


fixed postalcode issue for Google Sheets

I discovered that the Google Sheets JSON feed removes underscores from column names when creating the key names and thus a column named "postal_code" ends up as meeting.postalcode, thus this commit checks for meeting.postalcode if meeting.postal_code is empty/null when creating the formatted address.

Wondering why the css and js files were changed, and what the difference is?

I too was curious about the css file.
From my understanding the public/app.js should have changed because there’s now new code that’s being wrapped up into it from altered src/helpers/load-data.jsx; however, the public/style.css file shouldn’t have changed since I didn’t edit the src/style.scss. In GitHub I clicked on the most recent commit and then clicked on “Load diff” for the public/style.css and it showed that only change to the file was the deletion of a blank line and then addition of a blank line. I have no idea why that would have happened (though I have seen it happen in other commits I’ve done so I’m not shocked that it happened), but there should be no effect on the react app at all from it so I’m thinking it’s not something to worry about.

On Jul 24, 2019, at 4:24 AM, Josh Reisner<EMAIL_ADDRESS>wrote:
Wondering why the css and js files were changed, and what the difference is?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/meeting-guide/react/pull/23?email_source=notifications&email_token=ABBTPREVDFXEFLSUE5JVW63QBA3V5A5CNFSM4IGMB43KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2WA6JY#issuecomment-514592551, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBTPRE3LURZOEPINHSSXRTQBA3V5ANCNFSM4IGMB43A.

I setup PSAA's implementation of this react app at https://apps.pugetsoundaa.org/meetings/ (repository: https://github.com/pugetsoundaa/meetings) and am running into some issues I don't know how to troubleshoot (the first is related to the above pull request).
1.) The postal code is not getting added to the formatted address in the PSAA implementation. It reaches it when I am running the react app locally, so I believe the issue might be that the app.js file at https://react.meetingguide.org/app.js did not get updated when you merged the above pull request?
2.) The PSAA meetings are being displayed in alphabetical order instead of being sorted by time. I am clueless why this is and it happens in both the implementation at https://apps.pugetsoundaa.org/meetings/ and when running the react app locally. Do you have any idea what would be making it do this?
3.) I noticed in my testing that there is a difference in how the time is displayed in Safari vs Chrome. In Safari https://react.meetingguide.org will show "6:00 AM" while in Chrome it will show "06:00 AM". I am pretty sure we don't want the leading zero, so is that a Chrome specific bug?
Let me know if you'd prefer I actually go ahead and create issues in GitHub for any of the above.

I recently had to move react.meetingguide.org and I've just now re-enabled auto deploy, so hopefully the JS file is updated now.
On the ordering, perhaps this lib isn't doing any sorting right now? You might make a ticket for that.
Recently I thought to change the time formatting to use toLocaleDateString() -- odd that different browsers on the same computer would format differently.

I can confirm the JS file is now updated.

2.) That actually makes a ton of sense and I’m pretty sure that is the case that there is no sorting going on. I’ll make a ticket.
3.) I recall that change now that you mention it, and that is odd.
Thanks for shedding some light on all three of those mysteries!

On Jul 25, 2019, at 3:58 AM, Josh Reisner<EMAIL_ADDRESS>wrote:
I recently had to move react.meetingguide.org and I've just now re-enabled auto deploy, so hopefully the JS file is updated now.
On the ordering, perhaps this lib isn't doing any sorting right now? You might make a ticket for that.
Recently I thought to change the time formatting to use toLocaleDateString() -- odd that different browsers on the same computer would format differently.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/meeting-guide/react/pull/23?email_source=notifications&email_token=ABBTPREXXUNZUBQCDABGR63QBGBN7A5CNFSM4IGMB43KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ZEHBY#issuecomment-514999175, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBTPRGSQY6TUUDPK34VNATQBGBN7ANCNFSM4IGMB43A.


Customize an Individual field with camelCase name

I followed the documentation here : http://symfony.com/doc/2.0/cookbook/form/form_customization.html#how-to-customize-an-individual-field , it's working for all the fields I wanted to modify the display, except for one field that is named with camelCase.
The field :

        Image :

        <input type="file" id="adtype_imageFile" name="adtype[imageFile]" />

The overrided block for this field :
{% block _adtype_imageFile_row %}

            * {{ form_label(form, label|default(null)) }}

            {{ form_widget(form) }}
            {% if errors|length > 0 %}

                    {{ form_errors(form) }}

            {% endif %}

{% endblock %}

In the same view, I defined individual blocks and it's working fine, except for this one. Working fields are the ones named in lowercase.
Exemple of a working field :
{% block _adtype_translation_html_row %}

            * {{ form_label(form, label|default(null)) }}

            {{ form_widget(form) }}
            {% if errors|length > 0 %}

                    {{ form_errors(form) }}

            {% endif %}

{% endblock %}

Am I doing something wrong?
Thanks!

the Symfony2 form theming is implemented by Symfony, not by Twig. So this is not the right issue tracker

Ok thanks.


Output is abnormal when using my own data set (Japanese Instruction) for calibration data

I am trying to change calib_data.py, but as the title suggests, when I use a Japanese dataset, the output is abnormal.
example
[INST] <>
System prompt in Japanese.
<>
Instruction prompt in Japanese.
[/INST]
An example is shown below, but the output is neither Japanese nor English and is unreadable.
onnées begonnées beginningsROR packaginglan昌 Pin prob Gonchorpon Jahanimal pelottenhamm
The original model works fine with llama2 instructions + fine-tuning in Japanese.
It would be helpful if you could tell me if you have any hints.
Thanks.

maybe It's my misstake.

@webbigdata-jp How did you fix it?
And how do you decide what to include in your calibration data?


Update for swift-4

@leojkwan Thank you for the PR. this change is now implemented in our 2.0.0 release just published today. I will be closing this as resolved.


Auth lost on redirect to same host in node 6.3.1

I had some issues with redirects with axios that I'm now pretty sure are due to something in follow-redirects. Axios is currently using 0.0.7, but I upgraded my local copy to use 0.2.0 and still seeing the issue. This does not occur with node 5.12.0, but it does happen with node 6.3.1.
The crux of it seems to be that I'm hitting an endpoint in my node app that is responding with a 301, but then I get a 401 from the resulting Location.
I set DEBUG=follow-redirects but did not get any more useful info. I then added this line:
debug('making request with', options);

right here to log every outgoing request, and then I get the following output:
6:02:30 PM web.1  |  Thu, 18 Aug 2016 01:02:30 GMT follow-redirects making request with { maxRedirects: 5,
6:02:30 PM web.1  |    protocol: 'https:',
6:02:30 PM web.1  |    hostname: 'postgres-api.heroku.com',
6:02:30 PM web.1  |    port: null,
6:02:30 PM web.1  |    path: '/client/v11/databases/dozing-patiently-6054/transfers',
6:02:30 PM web.1  |    method: 'get',
6:02:30 PM web.1  |    headers:
6:02:30 PM web.1  |     { Accept: 'application/json, text/plain, */*',
6:02:30 PM web.1  |       'User-Agent': 'herokudata' },
6:02:30 PM web.1  |    agent: undefined,
6:02:30 PM web.1  |    auth: 'maciek@heroku.com:<redacted>' }
6:02:31 PM web.1  |  Thu, 18 Aug 2016 01:02:31 GMT follow-redirects redirecting to https://postgres-api.heroku.com/client/v11/apps/ac07e31a-710c-470e-831e-e97bfc88bcd3/transfers
6:02:31 PM web.1  |  Thu, 18 Aug 2016 01:02:31 GMT follow-redirects making request with { maxRedirects: 5,
6:02:31 PM web.1  |    protocol: 'https:',
6:02:31 PM web.1  |    hostname: 'postgres-api.heroku.com',
6:02:31 PM web.1  |    port: null,
6:02:31 PM web.1  |    path: '/client/v11/apps/ac07e31a-710c-470e-831e-e97bfc88bcd3/transfers',
6:02:31 PM web.1  |    method: 'get',
6:02:31 PM web.1  |    headers:
6:02:31 PM web.1  |     { Accept: 'application/json, text/plain, */*',
6:02:31 PM web.1  |       'User-Agent': 'herokudata' },
6:02:31 PM web.1  |    agent: undefined,
6:02:31 PM web.1  |    auth: null,
6:02:31 PM web.1  |    nativeProtocol:
6:02:31 PM web.1  |     { Server: { [Function: Server] super_: [Object] },
6:02:31 PM web.1  |       createServer: [Function],
6:02:31 PM web.1  |       globalAgent:
6:02:31 PM web.1  |        Agent {
6:02:31 PM web.1  |          domain: null,
6:02:31 PM web.1  |          _events: [Object],
6:02:31 PM web.1  |          _eventsCount: 1,
6:02:31 PM web.1  |          _maxListeners: undefined,
6:02:31 PM web.1  |          defaultPort: 443,
6:02:31 PM web.1  |          protocol: 'https:',
6:02:31 PM web.1  |          options: [Object],
6:02:31 PM web.1  |          requests: {},
6:02:31 PM web.1  |          sockets: [Object],
6:02:31 PM web.1  |          freeSockets: {},
6:02:31 PM web.1  |          keepAliveMsecs: 1000,
6:02:31 PM web.1  |          keepAlive: false,
6:02:31 PM web.1  |          maxSockets: Infinity,
6:02:31 PM web.1  |          maxFreeSockets: 256,
6:02:31 PM web.1  |          maxCachedSessions: 100,
6:02:31 PM web.1  |          _sessionCache: [Object] },
6:02:31 PM web.1  |       Agent: { [Function: Agent] super_: [Object] },
6:02:31 PM web.1  |       request: [Function],
6:02:31 PM web.1  |       get: [Function] },
6:02:31 PM web.1  |    defaultRequest: [Function: defaultMakeRequest],
6:02:31 PM web.1  |    slashes: true,
6:02:31 PM web.1  |    host: 'postgres-api.heroku.com',
6:02:31 PM web.1  |    hash: null,
6:02:31 PM web.1  |    search: null,
6:02:31 PM web.1  |    query: null,
6:02:31 PM web.1  |    pathname: '/client/v11/apps/ac07e31a-710c-470e-831e-e97bfc88bcd3/transfers',
6:02:31 PM web.1  |    href: 'https://postgres-api.heroku.com/client/v11/apps/ac07e31a-710c-470e-831e-e97bfc88bcd3/transfers' }

Note that the first request has the correct auth field, but the subsequent request has auth: null. Is this a node 6 breaking change? A bug in follow-redirects? It looks like this change could be related, but as per the logs above, the host is not changing.

As far as I can tell, this is an issue in node so I've opened a ticket there, for clarification of the intended behavior if nothing else.

This is not a follow-redirects issue. Node 6.0 broke auth in same-host redirects with https://github.com/nodejs/node/pull/1480 -- it has been fixed withhttps://github.com/nodejs/node/pull/8215 .


Can't render attributes

此错误来自自定义集成。
Logger: custom_components.xiaomi_gateway3.core.helpers
Source: custom_components/xiaomi_gateway3/core/utils.py:215
Integration: Xiaomi Gateway 3 (documentation, issues)
First occurred: 18:21:27 (144 occurrences)
Last logged: 18:21:28
Can't render attributes
Traceback (most recent call last):
File "/config/custom_components/xiaomi_gateway3/core/helpers.py", line 210, in render_attributes_template
attrs = attributes_template(self.hass).async_render({
File "/config/custom_components/xiaomi_gateway3/core/utils.py", line 215, in attributes_template
template.hass = hass
AttributeError: 'NoneType' object has no attribute 'hass'

Fixed in latest master


Json parser implementation.

This PR implements a parser for the Json ADT.
The main changes are:
JsonSeparators in Json - I have collected all the common characters used in the JsonParser and the prettyPrinter. This just reduces duplication of the same separator characters like commas, braces, etc.
Parser for JSON ADT - Including the more complex structures like Object and Array.
Tests - I have added tests for:

nested objects
round trip from pretty printed string <-> Json

Nice job Monica!


Turn real world test for #1446 to a dependency api test

We should see if we can turn this test into a normal dependency api test. Hitting rubygems is bad if we can avoid it.

What do you mean by this?


Add Trigger Service

Adding the trigger service to slbeta5 branch
Related https://github.com/ballerina-platform/ballerina-lang/pull/34052

@kaviththiranga / @LahiruRajapaksha Do we need this PR? Looks like it got automatically closed without any attention. If you really don't need this PR anymore, please remove the stale label from the PR. Then it won't get added to the [Stale PR] Ballerina Stale PR Details mail in the future.


ShowTitleBar can not fill all screen

Describe the bug
This issue comes from https://github.com/ControlzEx/ControlzEx/issues/78 by @snowiceyeah
Before run I set titlebar invisible and all buttons invisible.
public MainWindow()
        {
            InitializeComponent();
            IgnoreTaskbarOnMaximize = false;
            ShowMaxRestoreButton = false;
            ShowMinButton = false;
            ShowTitleBar = false;
            ShowCloseButton = false;
        }

Then I set them back, the window can not fill the screen
private void Button_Click(object sender, RoutedEventArgs e)
       {
           ShowMaxRestoreButton = true;
           ShowMinButton = false;
           ShowMinButton = true;
           ShowTitleBar = true;
           ShowCloseButton = true;
       }

This will be fixed in ControlzEx https://github.com/ControlzEx/ControlzEx/issues/78


Unable to submit form

Unable to submit proseminar application form on connect.commons.mla.org
Priority because site linked to in today's MLA Newsletter

Workaround is in place in production. The purpose of this ticket investigate the ninja forms problem with setting up a "submit after date” condition.

tracked in trello


Rope that pulls on staticbody2ds

Hello,
I've been working on a game where there are two players that are connected by a rope. The players are made up of StaticBodies and can move independantly of each other. What I need help with is making the rope pull on each player, or at least limit the movement, instead of just creating a gap (video attached as zip, as it is too big).
RopeBound (DEBUG) 2024-06-25 12-09-41.zip

First thing you should do is change the StaticBodies to CharacterBodies (or KinematicBodies in 3.x). This has nothing to do with this plugin but is a general rule of thumb. StaticBodies are used for static geometry. If they move, they usually shouldn't be static.
Now to the problem:
What you are planning won't work at the moment. There is no way to fixate the rope at the start AND end point. That means the player at the end of the rope will always be pulled towards the other player, but not the other way round.
Getting a grabbing and pulling logic to work in the first place is a little complicated to explain without example.
I will try to get back to in the next few days, maybe end of the week, depending on whether I find some time.
It's been on my list for a while to finally upload a rope grabbing example project.
Also, #9 is slightly related regarding how RopeHandles work and why the gap appears.
If you just want to limit movement, you could also just add a restriction to your player movement code that doesn't allow the player to move further than a certain maximum distance from the other player.

Thanks for the info, I probably won't be able to get back to you soon, as I have become ill. Thanks againa though.

Small status update: I'm currently working on making rope endpoint behavior more configurable. That means an option whether the beginning and/or ending should be fixed or loose.
This should make your use-case possible to achieve. I will also try to include an example project.

@mphe , Sorry for not replying, I've been completely caught up in school tests. I think I'll take the advice on using CharacterBodies and wait for the update. Thanks for the work you do!

So did you already solve it or did you gave up?

@mphe Im just going to wait for the update you mentioned, the game I’m making is just to learn more about the engine, so I’m doing other projects in the meantime.

I'll reopen then until it is solved.
I've been working on an efficient way to completely fixate points and also an option to detach the rope's beginning from the node's position.
You can try out on the endpoint_fixation branch or download a build from the latest build workflow.
The new version also includes much more example scenes.
I'll also try to get a rope pulling example working this week and add it to the project.
The overall setup will be:

fixate_begin = false on the Rope
Two RopeHandles at the beginning and end of the rope with strength = 1.0
Two RopeAnchors at the beginning and end of the rope.
A script that connects to the RopeHandles on_before_update signal and sets the position to the respective CharacterBody position
Connect to the RopeAnchors on_after_update signal and set the position of the CharacterBodys to the anchors position, preferabily with a move_and_slide to prevent the objects from getting pulled into terrain.

I added another node RopeInteraction that handles mutual interaction between a target node and a rope.
There are two examples included: rope_swinging.tscn and rope_pulling.tscn that demonstrate how it can be used.
The rope_pulling example demonstrates your use-case.
You can get the current preview version from the latest build workflow.
Let me know if you have any questions or if you find any issues.
I'm planning to merge the branch into master and create a new Asset Store release by the end of the week if everything works fine.

@mphe I’m on holiday rn, and I forgot to sync tthe latest version of my project to git before I left, so I can’t test now.

Closed by #12.
If you find any issues, feel free to use the issue tracker.


Modbus RTU - 6 Digit Holding Register

Hi,
I deployed mbusd application in Tinker board R2.0 ,Tested with Normal Modbus Devices , It is communicating with well,
Now we are going to integrate Danfoss VFD using mbusd application, We got Modbus addressing as below. Whether mbusd will support on this.
Model: Danfoss Fc102
(Six Digit Holding Register)
415010- Running Hours
415020- Kwh Counter
etc.,
DanfossFC102 (1).xls
Herewith I attached Danfoss VFD Modbus Addressing Details.
Thanks & Regards,
K. L. Narayanan
India

Hello,
Since "six-digit" is just a form of representation for Modbus entities, mbusd should work OK with it if your Modbus TCP software is doing its part of the translation from 6-digit to standard function/register form.

Hi,
It is communicating, thanks for your reply, It is delayed due to site commissioning, We completed Integration successfully, Thanks
Regards,
K.L.Narayanan


Using the via parameter with random stops fails in about 50% of the time

When generating Via and from and to randomly, in too many examples there were no trips in OJP2020 and TRIAS2020. How could this be?
# Parameter File for configuring parameters of a test run.
# 'parameters.txt' is the default file.
# Another file in 'input' directory may be used instead. Provide the file name as command line argument.

# BASE TEST SETUP
# number of requests (tests) to perform on each environment
number_of_requests = 20

# environments to test; comma-separated list. e.g. TRIAS2020, PROD
environments = TRIAS2020, PROD

# Type of OJP request: TR, LIR, SER, TIR, TRIAS2020TR ; comma-separated list.
request_types = TR, LIR, SER, TIR, TRIAS2020TR

# For TR and SER only: use "Geo position" (coordinates) rather than "Stop Place Ref" (didok stops)?
use_geopos = False

# If yes, add a random offset with a given max_dist_from_stop (in kilometers)
max_dist_from_stop = 0.5

# for TR: use additional via location:
use_via = True

# PARAMETERS INFLUENCING PERFORMANCE:
# use a session for http requests?
use_session = True

# save all details, including requests/responses, to file
save_details = True

# settings for the random number generator; if a "seed" is used, the test run will have same stations in repetition:
use_random_seed = True
random_seed = 42

# time in seconds to wait before sending the next request
sleep_time = 0.2

# DEPARTURE DATE/TIME SETTINGS:
# define ranges for the depature date (days ahead of today) and time of the day:
days_ahead_min = 0
days_ahead_max = 1
hours_min = 7
hours_max = 10
minutes_min = 0
minutes_max = 59

# OJP PARAMETERS / RESTRICTIONS SECTION:
# "MAIN SWITCH": Use some extra parameters at all?
use_params = True

# do not use location names in TR and SER, use "ORIGIN" or "DESTINATION" instead:
mask_location_name = False

# OJP TR parameters:
tr_include_track_sections = True
tr_include_leg_projection = True
tr_include_turn_description = True
tr_include_intermediate_stops = True
tr_number_of_results = 5

# OJP SER parameters:
ser_number_of_results = 10
ser_stop_event_type_reference = departure
ser_operator_exclude = True
ser_operator_ref = unknown
ser_include_previous_calls = True
ser_include_onward_calls = True
ser_include_realtime_data = True

# OJP LIR RESTRICTIONS
# one of these: stop, address, poi, coord, topographicPlace:
lir_geo_restriction_type = stop
lir_number_of_results = 10
lir_include_pt_modes = True

# OJP TIR PARAMETERS:
tir_include_calls = True
tir_include_track_sections = True
tir_include_service = True

# TRIAS 2020 PARAMETERS:
trias2020tr_number_of_results = 4
trias2020tr_include_track_sections = True
trias2020tr_include_leg_projection = True
trias2020tr_include_intermediate_stops = True

# Run test based on a file with given connections, a CSV with fields "Check,From,To,Via" (station names) rather than random:
use_connections_file = False
connections_file = connections-example.csv
connections_delimiter = ;

# MISCELLANEOUS
# download DIDOK stations/stops from opentransportdata.swiss
download_didok_data = False

# delete directories of previous tests first
remove_old_test_directories = False

According to Andreas, this is the normal or "expected" behavior of the services (PROD and TRIAS 2020).
Otherwise, it will require more analysis by the provider.
For our test app, we could add, if desired, a handling and better logging/statistics for those cases.
We could consider them as "not ok" cases and exclude them from the calc_time statistics.


I can't use see comments

when i can't click ''See comments" button on "https://ku-hub.onrender.com/kuhub/post/4/'

You can use it now, the problem occurred because the program filters out PostDownloads instead of normal Posts, so it does not connect to the comments


Drive end time was recorded as the start time of a new drive

Describe the bug
Two consecutive trips are listed on the Drives board, but don't list any data. I can click the timestamp and the Drive Details board opens with a correct starting timestamp and an end timestamp set to "a few seconds ago". I can see, based on vehicle activity, that the end time of the first drive should be the start time of the second drive. I can manually change the time range and all data looks to have been properly recorded. It just looks like the drive end time was recorded as the start of a new drive and then both drives (the second of which shouldn't even exist) never receive a proper end time.
Is there anything I can do to recalculate the drive info? I'm perfectly happy to pull out a calculator and enter sql commands if necessary.
Thanks for your help.
Expected behavior
The end time should have been detected and recorded for the drive. If this is missed somehow, a new drive should at least be forced to be recorded as the end time of the previous drive. Maybe a clean up task to detect when the end time should have been based on vehicle activity? Maybe that's how it is already supposed to work?
How to reproduce it (as minimally and precisely as possible):
Not really sure how to reproduce as this has only happened this one time.

Go on a drive
Check Drives dashboard
Does each drive have data recorded and correct end times on the Drives and Drive Details boards?

Relevant entries from the logs
It's been almost a month since the drive in question, so I unfortunately don't think I have the logs. The Grafana log starts well after the drive in question. I'm running this in a FreeBSD jail and I don't see a log file for tesla-mate, but I'm happy to dig around with a hint as to where to look. If it's just printed to stdout I think I'm out of luck as I'm not currently redirecting that anywhere.
Screenshots

Data
# psql teslamate teslamate -c "COPY (select * from drives where start_date > '2020-09-23' and start_date < '2020-09-24') TO STDOUT WITH CSV HEADER" | column -ts,
id   start_date                  end_date                 outside_temp_avg  speed_max  power_max  power_min  start_ideal_range_km  end_ideal_range_km  start_km     end_km       distance           duration_min  car_id  inside_temp_avg  start_address_id  end_address_id  start_rated_range_km  end_rated_range_km  start_position_id  end_position_id  start_geofence_id  end_geofence_id
226  2020-09-23 10:01:22.49      2020-09-23 10:33:12.211  13.0              105        114        -54        342.40                314.50              3525.428966  3557.920169  32.49120300000004  32            1       19.3             2                 7               342.40                314.50              335572             340364           1                  2
228  2020-09-23 20:38:49.530643  1
227  2020-09-23 20:15:05.997     2020-09-23 20:28:25.381  25.8              76         80         -22        283.39                278.50              3557.951169  3564.33217   6.381001000000197  13            1       37.2             7                 54              283.39                278.50              340471             340521           2                  25
229  2020-09-23 21:11:44.980112  1

# psql teslamate teslamate -c "COPY (select id, car_id, drive_id, date from positions where date > '2020-09-23 20:35' and date < '2020-09-24') TO STDOUT WITH CSV HEADER" | sed 's/,/, /g' | column -ts,
id       car_id   drive_id   date
340524   1                   2020-09-23 20:38:17.27
340525   1        228        2020-09-23 20:38:49.288
340526   1        228        2020-09-23 20:38:53.131
340527   1        228        2020-09-23 20:39:09.113
340528   1        228        2020-09-23 20:39:25.05
340529   1        228        2020-09-23 20:39:41.301
340530   1        228        2020-09-23 20:39:57.392
…
340630   1        228        2020-09-23 21:07:27.179
340631   1        228        2020-09-23 21:07:44.548
340632   1        228        2020-09-23 21:08:20.809
340633   1        228        2020-09-23 21:08:36.96
340634   1        228        2020-09-23 21:08:53.083
340635   1        228        2020-09-23 21:09:09.202
340636   1        228        2020-09-23 21:09:25.615
340637   1        228        2020-09-23 21:09:43.767
340638   1        228        2020-09-23 21:10:00.919
340639   1        228        2020-09-23 21:10:23.644
340641   1        229        2020-09-23 21:11:43.049
340640   1                   2020-09-23 21:11:43.049
340642   1        229        2020-09-23 21:11:58.777
340643   1                   2020-09-23 21:12:13.427
340644   1                   2020-09-23 21:14:42.494
340645   1                   2020-09-23 21:17:19.238
340646   1                   2020-09-23 21:17:55.458
340647   1                   2020-09-23 21:19:33.696
340648   1                   2020-09-23 21:22:39.001

Environment

TeslaMate version: 1.19.3
Type of installation: Manual
OS TeslaMate is installed on: FreeBSD jail 11.3-RELEASE running inside FreeNAS 11.2-U7
User OS & Browser: macOS 10.15.6 Safari

Check for files tmp/log/erlang.log.* in the app's directory to see the TeslaMate logs (though it has probably rotated them by now).

Thanks for the tip, though I couldn't find any 'erlang.log*' files in the entire jail. I guess I have those turned off?

I think the logging depends on how you start TeslaMate.  I run bin/teslamate daemon which passes various command line args to enable the erlang.log.* files.

Ah, looks like I'm currently using the FreeBSD daemon and teslamate start. I'll have to look in to changing that.
For now, I'm starting to put together a script to generate what the drives table should have and I'll update the relevant rows.


[RFC] Data Prepper Expression Syntax

Is your feature request related to a problem? Please describe.
As part of a larger feature (#522) to support complex condition statements in data prepper there is a need to define a syntax for conditional statements. A conditional statement is a String that is evaluated at runtime and may reference fields within a record.
Describe the solution you'd like
Terms used throught this document are defined in the Definitions section
Supported Operators in order of evaluation priority

List Initialiser []
Priority Expression ()
List Operators in, not in
Relational Operators <, <=, >, >=
Regex Equality Operators =~, !~
Equality Operators ==, !=
Conditional Expression and, or, not

List Initialiser
Defines a list or term and/or expressions.
Examples
[1, 2, 3]
["a", "b", "c"]
[/people/0/name, /status==500]

Priority Expression
Identifies an expression that will be evaluated at the highest priority level
Examples
/is_cool == (true or false)

List Operators
Tests if a value is in/not in a list. Note, the right hand side operand must be a list.
Syntax
<Expression> in <List>
<Expression> not in <List>

Examples
/status_code in [200, 202]

Relational Operators
Tests the relationship of two numeric values. Note, the operands must be a number or Json Pointer that will resolve to a number.
Syntax
<Number | Json Pointer> < <Number | Json Pointer>
<Number | Json Pointer> <= <Number | Json Pointer>
<Number | Json Pointer> > <Number | Json Pointer>
<Number | Json Pointer> >= <Number | Json Pointer>

Examples
3 < 4

Regex Equality Operators
Used to test if a String value matches/does not match a Regular Expression. Note, the left hand side operand must be a string or Json Pointer that resolves to a String. The right hand side operand must be a String that contains a regular expression or a Json Pointer that resolves to a String that contains a regular expression.
Syntax
<String | Json Pointer> =~ <Regex String | Json Pointer>
<String | Json Pointer> !~ <Regex String | Json Pointer>

Examples
"Hello World" =~ "^[A-Za-z\s]*$"
"Hello!" !~ "\s"

Equality Operators
Used to test if two value are/are not equivalent.
Syntax
<Any> == <Any>
<Any> != <Any>

Examples
true == true
3.14 != /status_code
[1, 2] == /some/collection

Conditional Expression
Used to chain together multiple expressions and/or values.
Syntax
<Any> and <Any>
<Any> or <Any>
not <Any>

Examples
/status_code == 200 and /message == "Hello world"
/status_code == 200 or /status_code == 202
not /status_code in [200, 202]

Describe alternatives you've considered (Optional)
n/a
Additional context
Definitions
Literal A fundamental value that has no children.

Float
Integer
Boolean
Json Pointer
String

Expression String
The String that will be parsed for evaluation. Note, an Expression String is not the same as an Expression
Statement
The highest level component of the Expression String.
Expression
A generic component that contains a Primary or an Operator. Expressions may contain expressions. An expressions imminent children can contains 0-1 Operators.
Primary
A List, Priority Expression, or Literal.
Operator
Hard coded token that identifies the operation use in an Expression.
Json Pointer
A Literal used to reference a value within the Event provided as context for the Expression String. Json Pointers are identified by a leading / containing alpha numeric character or underscores, delimited by /. Json Pointers can use an extended character set if wrapped in double quotes (") using the escape character \. Note, Json Pointer require ~ and / that should be used as part of the path and not a delimiter to be escaped.

~0 representing ~
~1 representing /

White Space
White space is insignificant and will be removed at the start of parsing unless the whitespace is part of a Literal surrounded by double quotes (").

Thanks for putting this together! It looks great.
One change I'd like to make is to use the term "set" instead of "list." For example, the section "List Operators" should be "Set Operators." I think that we are viewing them as sets, so it would be better to be explicit in that.
Along those lines, I also wonder if it would make sense to change the syntax for set initialization. Perhaps a set could be initialized with curly braces like {"a", "b", "c"}. This is a more common convention for sets whereas brackets are lists.
I'm not sure if Data Prepper will ever need to evaluate against true lists or not. Perhaps /myList == ["a", "b"] will matter to somebody. Using curly braces will help keep these concepts distinct.
There may be some value in supporting variables in the future too. I'd probably say Data Prepper would use the standard ${} syntax. I don't think this would be a problem with {} sets, but do want to point it out.

Great feedback!
I'd like to add that variable names should be supported within string "Hello ${name}". To support embedded variables $ will need to be escaped within Strings.

5 + 5
true == true
How would customer use these examples?

Do we need assignment operators? How will they be used?

Do we need Increment (++) and Decrement Arithmetic Operators?
What are min and max values for Integer literal ?
Do we set set concatenation ?

Thanks @sbayer55 ,
You added set initializer to 1.3.0, but set operations to 1.4.0. Is there value in having the initializers without the operations? If not, I'd say we add set initialization in 1.4.0 as well.
Also, Data Prepper may want to support a limited set of functions in the future. For example length(/list). I'm not sure that is what we'd do or not. But, it may be valuable to disallow whitespace before parenthesis. So /a and(/b or /c) could be confused with a function. Should Data Prepper tighten restrictions regarding whitespace?

Issues regarding white space and potential future function support raised.

Perhaps it is too late to comment on this RFC, but I would like a little clarity on expressions for matching against string values with . characters (as this seems to be quite common for OTEL data). In the JSON Pointer definition it says

Json Pointers can use an extended character set if wrapped in double quotes (") using the escape character \. Note, Json Pointer require ~ and / that should be used as part of the path and not a delimiter to be escaped.

And I also see the "Escaped Example" above; however, when trying to write my own expression I am not able to get it to work for conditional routing with something like this (trying to escape my . characters):
  route:
    - super-tenant: '/"span\.attributes\.tenant" == "super"'
    - other-tenant: '/"span\.attributes\.tenant" != "super"'

Do you have any recommendations for this scenario? Thanks!
I also commented on https://github.com/opensearch-project/data-prepper/issues/2259


[VS Code] Starting collaboration session: connect ECONNREFUSED /tmp/CoreFxPipe_vscode.84c34a10a178aacc94a92fa9d2917388

Error:
Starting collaboration session: connect ECONNREFUSED /tmp/CoreFxPipe_vscode.84c34a10a178aacc94a92fa9d2917388
Steps to Reproduce:

Version Data

extensionName
VSLS

extensionVersion
0.4.0-dev

protocolVersion
2.2

applicationName
VSCode

applicationVersion
1.32.1

platformName
Linux

platformVersion
4.18.0-16-generic

Hi, thank you for reporting this. What are the steps to reproduce the issue ? Also, it would be great if you can send your logs to investigate  the issue. You can attach your logs by running Live Share: export logs command from command line.

Closing due to inactivity. Please re-Open if you’re still encountering this issue. Thanks!


Update how-to-use-a-transactional-template-with-smtp.md

I have changed the word "transactional" to "legacy" as transactional templates means something different now. I have also created a warning, but not linked it to anything as of yet since the new dynamic templates have not been fully integrated into the documentation. Not sure if we have a way to change the URL from transactional templates to legacy templates.

superseded by https://github.com/sendgrid/docs/pull/3934


Added code coverage reporting to GitHub actions

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@2de2d4b). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #5   +/-   ##
=======================================
  Coverage        ?   66.53%
=======================================
  Files           ?       18
  Lines           ?     1031
  Branches        ?      120
=======================================
  Hits            ?      686
  Misses          ?      225
  Partials        ?      120

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 2de2d4b...cad925a. Read the comment docs.


Add a collaboration.md file

Add a collaboration.md file to outline some good practices for collaboration on this effort.

Closing


log.Logger does not return errors from underlying writer

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.8.1 darwin/amd64
What operating system and processor architecture are you using (go env)?
GOARCH="amd64" GOBIN="/Users/andy/work/bin" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/andy/work" GORACE="" GOROOT="/usr/local/Cellar/go/1.8.1/libexec" GOTOOLDIR="/usr/local/Cellar/go/1.8.1/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mr/6sjcksy91jj40ksm0h_6fzhm0000gn/T/go-build558308436=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2"
What did you do?
The struct log.Logger methods Print, Printf do not return errors from underlying writer to the caller.  The Output method returns the error but Print and Printf have no return arguments.
In my case I'm writing an io.Writer that sends data to a Splunk HTTP Event Collector so that I can use it with log.Logger to do logging inside of an application.  Because of the use of a network and authorization an entry could be rejected or error, but the caller of log.Printf("info") would never know that their log data was lost.
What did you expect to see?
log.Printf and log.Print return errors from log.Output
What did you see instead?
log.Printf and log.Print return no errors to the caller.

It is intentional that log.Logger.Print methods don't return errors.
In addition to the ugliness of all logging call sites checking for errors, what would you do if it returned an error? Log?
If you want to encode the policy for what to do on log failures, do so in your Logger.SetOutput io.Writer and log to stdout or panic or buffer to memory or log elsewhere, etc.
Even if we wanted to change the behavior here, https://golang.org/doc/go1compat precludes doing so.


investigate deployment error  VM[User|i-7154-229505-VM]

looks like a random and sporadic Exoscale connector issue from the logs. Unless this is reproducible and happens again, this can be dropped

dropped


fix(deps): update icr.io/cpopen/ibm-operator-catalog:v4.16 docker digest to 93b3a5f

This PR contains the following updates:

Package
Update
Change

icr.io/cpopen/ibm-operator-catalog
digest
ae98942 -> 93b3a5f

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

:tada: This PR is included in version 1.4.38 :tada:
The release is available on:

GitHub release
v1.4.38

Your semantic-release bot :package::rocket:


Inconsistent VpiListener callbacks

vpi_listener logic seems to be dependent on the 'type' of the any object when invoking callbacks. Shouldn't the callbacks always be for concrete implementation of the any object?
For instance, cont_assign holds a pointer to the rhs as an expr instance. This rhs can be a logic_net, an operation or something else. As it stand today, the callbacks received are enterExpr and leaveExpr. I expected a enterLogic_net/leaveLogic_net or enterOperation/leaveOperation  callbacks based on the concrete implementation of the object. Without this, I am forced to handle every concrete implementation type in each of its base class handler. The current implementation forces handling of say an operation in multiple different callbacks and the listener has to keep track of what the parent context is and have to deal with it accordingly, which isn't always trivial.
Here's a very simple program to demonstrate the issue. Two statements, one cont_assign and other always. Both have exactly the same expression on the rhs but the callbacks invoked are very different.
In short, all non-concrete class implementation should basically just call listen_any which in turn based on the UHDM type of the object, calls appropriate concrete listen_xxx function to invoke the corresponding callbacks.
P.S. Only the relevant callback events are reported here. The numbers in the brackets are the [line-start,column-start:line-end,column-end]
module Test (a, b, c, sum1, sum2);
input a, b, c;      // Input declaration
output sum1, sum2;  // Ouput declaration
wire a, b, c;       // Port Data types
wire sum1, sum2;

assign sum1 = a + b + c;
always sum2 = a + b + c;

endmodule // End of Module Test

  enterDesign[0,0:0,0]
    enterModule[1,1:10,10]
      enterProcess_stmt[8,1:8,25]
        enterAssignment[8,8:8,24]
          enterExpr[8,8:8,12]
          leaveExpr[8,8:8,12]
          enterOperation[8,15:8,20]
            enterOperation[8,15:8,16]
              enterRef_obj[8,15:8,16]
                enterLogic_net[4,6:4,7]
                leaveLogic_net[4,6:4,7]
              leaveRef_obj[8,15:8,16]
              enterRef_obj[8,19:8,20]
                enterLogic_net[4,9:4,10]
                leaveLogic_net[4,9:4,10]
              leaveRef_obj[8,19:8,20]
            leaveOperation[8,15:8,16]
            enterRef_obj[8,23:8,24]
              enterLogic_net[4,12:4,13]
              leaveLogic_net[4,12:4,13]
            leaveRef_obj[8,23:8,24]
          leaveOperation[8,15:8,20]
        leaveAssignment[8,8:8,24]
      leaveProcess_stmt[8,1:8,25]
      enterCont_assign[7,8:7,24]
        enterExpr[7,15:7,20]
        leaveExpr[7,15:7,20]
        enterExpr[7,8:7,12]
        leaveExpr[7,8:7,12]
      leaveCont_assign[7,8:7,24]
    leaveModule[1,1:10,10]
  leaveDesign[0,0:0,0]

@alaindargelas Could you pen some thoughts/insight on this issue. Are we on to something or are we looking at it the wrong way. If this is an issue, do you think this can be resolved easily or this something that likely to put on back-burner. A change in this implementation is likely going to ripple through quite a few test cases.

@hs-apotell, I can change the call to be listen_any,  I think that will address your issue, but I need to add an argument like in vpi_visitor :  VisitedContainer* visited to prevent infinite loops.
Is that going to be a problem? You will probably have to change some code.

You can try to replace the attached version of model_gen.tcl under Surelog/thirdparty/UHDM/model_gen/
model_gen.tcl.gz
This version does not prevent infinite loops, but I first want to make sure that address your concern about concrete class callbacks

@alaindargelas Will revert back soon. Appreciate the prompt response.

Here's the output from the edited model_gen version you shared.
    enterModule[1,1:10,10]
      enterAlways[8,1:8,25]
        enterAssignment[8,8:8,24]
          enterRef_obj[8,8:8,12]
            enterLogic_net[5,12:5,16]
            leaveLogic_net[5,12:5,16]
          leaveRef_obj[8,8:8,12]
          enterOperation[8,15:8,20]
            enterOperation[8,15:8,16]
              enterRef_obj[8,15:8,16]
                enterLogic_net[4,6:4,7]
                leaveLogic_net[4,6:4,7]
              leaveRef_obj[8,15:8,16]
              enterRef_obj[8,19:8,20]
                enterLogic_net[4,9:4,10]
                leaveLogic_net[4,9:4,10]
              leaveRef_obj[8,19:8,20]
            leaveOperation[8,15:8,16]
            enterRef_obj[8,23:8,24]
              enterLogic_net[4,12:4,13]
              leaveLogic_net[4,12:4,13]
            leaveRef_obj[8,23:8,24]
          leaveOperation[8,15:8,20]
        leaveAssignment[8,8:8,24]
      leaveAlways[8,1:8,25]
      enterCont_assign[7,8:7,24]
        enterOperation[7,15:7,20]
          enterOperation[7,15:7,16]
            enterRef_obj[7,15:7,16]
              enterLogic_net[4,6:4,7]
              leaveLogic_net[4,6:4,7]
            leaveRef_obj[7,15:7,16]
            enterRef_obj[7,19:7,20]
              enterLogic_net[4,9:4,10]
              leaveLogic_net[4,9:4,10]
            leaveRef_obj[7,19:7,20]
          leaveOperation[7,15:7,16]
          enterRef_obj[7,23:7,24]
            enterLogic_net[4,12:4,13]
            leaveLogic_net[4,12:4,13]
          leaveRef_obj[7,23:7,24]
        leaveOperation[7,15:7,20]
        enterRef_obj[7,8:7,12]
          enterLogic_net[5,6:5,10]
          leaveLogic_net[5,6:5,10]
        leaveRef_obj[7,8:7,12]
      leaveCont_assign[7,8:7,24]
    leaveModule[1,1:10,10]

Few things to note with this output.

The order of callbacks for LHS & RHS are swapped between assignment & cont_assign. The order matters and it has to be consistent.
Order of callbacks should be more like C++ i.e. base class get iterated ahead of the current class. So, atomic_stmt class members should be iterated before iterating assignment class members. Within among the class members itself, the callback should be in the order of their declaration i.e. if a is declared ahead of b then a should get its enter/leave callbacks before b's.
vpi_listener.cpp has a lot of duplicate code. Here's an easy way to reduce the duplication.

void enumerate_atomic_stmt(....) {
  enumerate_baseclass_p(...);
  // Iterate relevant members without calling any enter/leave callbacks
}
void listen_atomic_stmt(..., listener, ....) {
  listener->enter();
  enumerate_atomic_stmt();
  listener->leave();
}
void enumerate_assignment(...) {
  enumerate_atomic_stmt();
  // Iterate relevant members without calling enter/leave callbacks
}
void listen_assignment(...., listener, ....) {
  listener->enter();
  enumerate_assignment(....);
  listener->leave();
}

Basically, split the callbacks from the enumeration of the members. The enumeration logic doesn't have to be duplicated and can be shared across all sub-classes (added advantage is that the call-order will automatically be consistent as per the previous bullet point). In this approach, non-concrete classes will have an enumeration_xxx function but no listen_xx function implementation.

As part of solution to avoid infinite recursion, callbacks should still be invoked but the members shouldn't be enumerated.

class A {
  B *b;
  C *c;
}
class B {
  A *a;
}
class C {
  B *b
}

listen_A would generate the following callbacks -
enter A
  enter B
    enter A
    // Don't enumerate the members of A again here but enter/leave callbacks are still required.
    leave A
  leave B
  enter C
    enter B
    // Don't enumerate the member of B because B is already visited once but still invoke the callbacks.
    leave B
  leave C
leave A

Food for thought - Rather than tracking visited, would it be enough to track the calls/objects on the stack. With this strategy, objects could be called multiple times (which ideally they should be because the code says so) but will not cause an infinite loop.

@alaindargelas Confirming that the change does simplify the listener logic quite a lot. Some of the things that required unnecessary book-keeping on the listener side, aren't needed anymore and reduces a lot of branching based on UhdmType. We will have to modify/remove some of the workarounds that had been implemented but overall this would be a welcome change (of course, with the necessary work to avoid infinite loops).

#1683 fixes the lhs rhs ordering issue, the concrete class callback and the loop detection (Same as vpi_visitor).
Duplicated code is automatically generated, what you suggest requires too much intelligence in the code generator.
Verilog declaration order cannot be respected, its not save anywhere in the model.


Albums with various artist

If you have compilation albums with various artists, where each track is tagged with the correct artist, and the Album artist being e.g. Various, then musikcube will split them up in the album filter.
Currently the album view is quite unusable unless you only have albums by single artists.

I think I understand what's going on. Right now, albums listed in the browse view are grouped by a combination of Album+Artist. It's done like this so, for example, all "Greatest Hits" albums by different artists don't get treated as a single album.
A straight forward fix may be to group by Album+AlbumArtist instead. I'm going to have to think about this for a bit, but it seems like this should work. Unfortunately it will require a minor database migration, but not the end of the world.

In the mean time i have found out that using the track view works quite well since that does not use Album+Artist, and lists everything under an album.
A question to think about is if it is a big problem with albums being named the same? How often does it happen? And should it justify splitting by album+artist? Why are albums different than artists in that regard (probaby because there are N albums and M artists, but still).

Unfortunately It does not allow you to add the full album, instead only adding the first artist/track to the play queue when adding the album.

How are you adding an album to the queue? The only way I can think of to add anything to the queue is to open the context menu and add it that way, but the context menu doesn't open if you have an album selected in track view (or artist/album artist view).
I could definitely use a way to add select albums to the queue from artist/album artist view. A hotkey for "add to queue" would be perfect; maybe it exists already and I'm missing it.

I just took a look at the code, I see we're already using Album+AlbumArtist to identify an album. Album artist behavior seems fine on my end, I'm starting to get the feeling that there are certain cases where musikcube isn't parsing (or using) the album artist tags correctly in some cases. See: https://github.com/clangen/musikcube/issues/136
@mkrogh in your case does it look like AlbumArtist is not being parsed/used at all, in any views? In other words, is the list of AlbumArtists (Library > Browse > 4) the same list as Artists (Library > Browse > 1)?
Also, what format audio files are you using in this case?

@clangen Hmm, interesting. The two lists seem to be very much alike, which I would not expect given that the AlbumArtists should be a shorter list.
The audio files are flac files, and tags were added in foobar2000 on windows.

@mkrogh yeah, I just confirmed we're only properly reading AlbumArtist from ID3V2 tags. I think I have a fix. What platform are you currently running on?

Running musikcube on MacOS Sierra

This should be fixed in build 0.23.0.
https://github.com/clangen/musikcube/releases/tag/0.23.0

Still got a fragmented list in albums filter view in v0.23.0. Do I need to reindex? If so how do one do that?

@mkilgore sorry, didn't notice your question. Glad it's working, and apologies the migration was janky. :)

I'm having this same issue with musikcube 0.60.1 on Ubuntu 18.04. mp3 files with ID3 v2.3 tags.


Add support for www.be-at.tv

example url (shortened): http://www.be-at.tv/i3wCAA
example url (full): http://www.be-at.tv/brands/shelborne-hotel/dj-mag-recession-sessions/solomun

Sites now redirect to YouTube. Issue should be closed.