FileMessage fails with empty content

I think this message was edited/deleted.
SkypeImageMsg(id='14829808000', type='RichText/UriObject', time=datetime.datetime, clientId='900182', userId='blarp', chatId='8:blurp', content='')
The raw dict for it is:
{'version': '1482980188000', 'type': 'Message', 'originalarrivaltime': '2016-12-29T02:56:28.003Z', 'from': 'https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/contacts/', 'content': '', 'skypeeditedid': '9002182', 'composetime': '2016-12-29T02:56:28.003Z', 'messagetype': 'RichText/UriObject', 'id': '1482980188000', 'conversationLink': 'https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/'}

calling html on it results in
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/SkPy-0.0.0-py3.5.egg/skpy/msg.py", line 502, in html
AttributeError: 'NoneType' object has no attribute 'urlFull'

Indeed, empty content means the message was deleted, so there is no image to parse out of it.
I think there's a few places now where it would be nice to throw some derivative of SkypeException instead of things like AttributeError.

I think actually it makes sense to return an empty string for html here -- the message is effectively deleted, and the upstream API returns an empty string too.

What about also adding a deleted flag? Or is this something best done by the consumer of the lib?

If you need that, you can just use msg.html == "".  I guess it wouldn't hurt to add a isDeleted property, though that's all it would do...

That's a bit more intuitive for a consumer, I think. Plus, if anything changes protocol-wise in the future, it'll help to encapsulate the change.

Ok, a92d209 adds SkypeMsg.deleted.  🙂


Not allow to change severity to Not Classified

In the Zabbix Problems wigdet cannot change the severity of the problem to Not Classified. The error that comes up is the following:

Grafana
Zabbix
Grafana-Zabbix Plugin

7.3.3
5.0.5
4.0.2

Same here.

Grafana
Zabbix
Plugin

7.2.0
5.0.4
4.0.2


Successive per_downstream_connection http local_ratelimit filters seem to reduce effective tokens, rate limit too early

Title: Successive per_downstream_connection http local_ratelimit filters seem to reduce effective tokens, rate limit too early
Description:
On Envoy 1.22.x and 1.21.x, when adding multiple local_ratelimit filters to either the listener or vhost config, or both, with per_downstream_connection=true set, the effective rate is lower than any of the defined token buckets alone.
The expected behavior is that each token bucket be distinct and honored. For example, if a client sends 1000 rps and each request encounters two per_downstream_connection=true local_ratelimit filters, one with 500 tokens per second (max 500) and one with 600 tokens per second (max 600), the expected number of ok requests should be around 500, with 500 receiving 429. However, in practice, the number of successful requests is closer to 200-300, which is unexpected.
Repro steps:
Envoy 1.22.x and 1.21.x

Configure a listener, or route/vhost or combination thereof such that a request passes through multiple local_ratelimit filters with per_downstream_connection=true set.
Send increasing rates of requests.
Notice that rate limiting occurs at a much earlier and lower level than expected.

Example load test tool:
echo 'GET https://envoy/200' | vegeta attack -insecure -header 'Host: envoy200ok.com' -connections 1 -http2 -keepalive -max-body -1 -rate 1000/1s -duration 10s -max-workers 1 -workers 1

Config:
The following config should permit around 660-662 requests per second.
filters:
-
    name: envoy.filters.http.local_ratelimit.per_conn_a
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: per_conn_a
        token_bucket:
            max_tokens: 600
            tokens_per_fill: 60
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_per_conn_a
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_per_conn_a
        local_rate_limit_per_downstream_connection: true
-
    name: envoy.filters.http.local_ratelimit.per_conn_b
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: per_conn_b
        token_bucket:
            max_tokens: 601
            tokens_per_fill: 61
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_per_conn_b
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_per_conn_b
        local_rate_limit_per_downstream_connection: true

Demonstation:
With the two local rate limits given above, and sending 1000 requests per second for 10 seconds on a single connection:
Note how only 3272 requests are able to complete successfully, not the expected 6600.
If one of either rate limits is commented out, rate limiting behaves as expected.
If local_rate_limit_per_downstream_connection is removed, rate limiting behaves as expected.
Vegeta output
"status_codes":{"200":3270,"429":6716},"errors":["429 Too Many Requests"]

Envoy stats
per_conn_a.http_local_rate_limit.enabled: 9988
per_conn_a.http_local_rate_limit.enforced: 6716
per_conn_a.http_local_rate_limit.ok: 3272
per_conn_a.http_local_rate_limit.rate_limited: 6716
per_conn_b.http_local_rate_limit.enabled: 3272
per_conn_b.http_local_rate_limit.enforced: 0
per_conn_b.http_local_rate_limit.ok: 3272
per_conn_b.http_local_rate_limit.rate_limited: 0

If envoy.filters.http.local_ratelimit.per_conn_b is commented out and the loadtest re-performed, the rate limiting behaves as expected:
vegeta
"status_codes":{"200":6538,"429":3462},"errors":["429 Too Many Requests"]

envoy stats
main_thread.watchdog_miss: 0
per_conn_a.http_local_rate_limit.enabled: 10002
per_conn_a.http_local_rate_limit.enforced: 3462
per_conn_a.http_local_rate_limit.ok: 6540
per_conn_a.http_local_rate_limit.rate_limited: 3462
runtime.admin_overrides_active: 0

If you add another copy of the per_downstream_connection local rate limit (C with rate 603 per second) the effective rate drops further:
"status_codes":{"200":2180,"429":7820},"errors":["429 Too Many Requests"]

What I have tried:

Using distinct names, runtime_keys, max token/per fill token values, fill intervals, runtime key names
Tried with much smaller and larger values for max_tokens, tokens_per_fill, fill_interval. Seems to happen no matter what these are set to.

What I think is going on:
It looks like, for each http_local_rate_limit token bucket configured, each request is taking that many tokens from the first bucket encountered.
Then when requests reach the next bucket, they take a number of tokens, equal to the number of filters/buckets, from the first bucket encountered again.
So if we have 3 rate limits with local_rate_limit_per_downstream_connection set, 3 tokens per request are being taken from the first bucket encountered.
And so on.

I have also observed that the stats will attribute a rate limit decision to multiple distinct rate limit filters/stat prefixes.
In this image 1173 429's would have been returned t clients, but the statistic is incremented for every single token bucket/filter.

There is a blurb about matching on overfill here: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/local_rate_limit_filter#using-rate-limit-descriptors-for-local-rate-limiting. Is that consistent with what you're seeing?

If the following config is used (no local_rate_limit_per_downstream_connection: true):
-
    name: envoy.filters.http.local_ratelimit.a
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: a
        token_bucket:
            max_tokens: 600
            tokens_per_fill: 60
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_a
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_a
-
    name: envoy.filters.http.local_ratelimit.b
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: b
        token_bucket:
            max_tokens: 601
            tokens_per_fill: 61
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_b
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_b
-
    name: envoy.filters.http.local_ratelimit.c
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: c
        token_bucket:
            max_tokens: 602
            tokens_per_fill: 62
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_c
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_c

The effective rate applied to a single client connection sending ~1000/s for 10s is:
"status_codes":{"200":6465,"429":3037},"errors":["429 Too Many Requests"]

a.http_local_rate_limit.enabled: 9504
a.http_local_rate_limit.enforced: 3037
a.http_local_rate_limit.ok: 6467
a.http_local_rate_limit.rate_limited: 3037
b.http_local_rate_limit.enabled: 6467
b.http_local_rate_limit.enforced: 0
b.http_local_rate_limit.ok: 6467
b.http_local_rate_limit.rate_limited: 0
c.http_local_rate_limit.enabled: 6467
c.http_local_rate_limit.enforced: 0
c.http_local_rate_limit.ok: 6467
c.http_local_rate_limit.rate_limited: 0

Which is expected.
If local_rate_limit_per_downstream_connection: true is added, the expectation is that (in this 1 client, 1 connection situation) the allowed requests should be roughly similar to above test, around ~6400-6600. However, we see ~3x as many tokens are taken by each request from bucket a than expected.
"status_codes":{"200":2160,"429":7791},"errors":["429 Too Many Requests"]

a.http_local_rate_limit.enabled: 9953
a.http_local_rate_limit.enforced: 7791
a.http_local_rate_limit.ok: 2162
a.http_local_rate_limit.rate_limited: 7791
b.http_local_rate_limit.enabled: 2162
b.http_local_rate_limit.enforced: 0
b.http_local_rate_limit.ok: 2162
b.http_local_rate_limit.rate_limited: 0
c.http_local_rate_limit.enabled: 2162
c.http_local_rate_limit.enforced: 0
c.http_local_rate_limit.ok: 2162
c.http_local_rate_limit.rate_limited: 0

-
    name: envoy.filters.http.local_ratelimit.per_conn_a
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: per_conn_a
        token_bucket:
            max_tokens: 600
            tokens_per_fill: 60
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_per_conn_a
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_per_conn_a
        local_rate_limit_per_downstream_connection: true
-
    name: envoy.filters.http.local_ratelimit.per_conn_b
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: per_conn_b
        token_bucket:
            max_tokens: 601
            tokens_per_fill: 61
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_per_conn_b
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_per_conn_b
        local_rate_limit_per_downstream_connection: true
-
    name: envoy.filters.http.local_ratelimit.per_conn_c
    typed_config:
        '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
        stat_prefix: per_conn_c
        token_bucket:
            max_tokens: 602
            tokens_per_fill: 62
            fill_interval: 0.100s
        filter_enabled:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enabled_per_conn_c
        filter_enforced:
            default_value:
                numerator: 100
            runtime_key: local_rate_limit_enforced_per_conn_c
        local_rate_limit_per_downstream_connection: true

not stale
bug still exists.

Could this be a dupe of the issue in https://github.com/envoyproxy/envoy/pull/21327?

@kyessenov I don't think it is a dupe of https://github.com/envoyproxy/envoy/pull/21327 as that relates to an issue in refill logic, whereas this bug seems to be a simple case of multiple successive local-rate-limits all taking their tokens from the first bucket encountered, instead of their own buckets.

I agree that it appears Envoy creates a single local rate limit token bucket that is shared across all requests on a connection when local_rate_limit_per_downstream_connection is enabled and applies that to all local rate limit decisions - instead of having a token bucket per config. This doesn't seem related to #21327.
I am running into the same issue with per-route local rate limit configurations. e.g. I setup 2 routes like this via RDS. I find that if the first request on the connection matches route A the route A token bucket will be used for requests to both A and B for the lifetime of the connection (limited to 5 RPS total across both), and conversely if the first request matches B the route B token bucket is used for requests to both A and B on that connection (limited to 1000 RPS total across both).
My expectation would be that each local rate limit config has a unique token bucket for the connection.
{
  "match": {
   "prefix": "/A/",
   "case_sensitive": false
  },
  "route": {
   "cluster": "A",
   "max_stream_duration": {
    "grpc_timeout_header_max": "0s"
   }
  },
  "typed_per_filter_config": {
   "envoy.filters.http.local_ratelimit": {
    "@type": "type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit",
    "stat_prefix": "A",
    "token_bucket": {
     "max_tokens": 5,
     "tokens_per_fill": 5,
     "fill_interval": "1s"
    },
    "filter_enabled": {
     "default_value": {
      "numerator": 100
     },
     "runtime_key": "A.local_rate_limit_enabled"
    },
    "filter_enforced": {
     "default_value": {
      "numerator": 100
     },
     "runtime_key": "A.local_rate_limit_enforced"
    },
    "local_rate_limit_per_downstream_connection": true
   }
  }
 },
 {
  "match": {
   "prefix": "/B/",
   "case_sensitive": false
  },
  "route": {
   "cluster": "B",
   "max_stream_duration": {
    "grpc_timeout_header_max": "0s"
   }
  },
  "typed_per_filter_config": {
   "envoy.filters.http.local_ratelimit": {
    "@type": "type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit",
    "stat_prefix": "B",
    "token_bucket": {
     "max_tokens": 1000,
     "tokens_per_fill": 1000,
     "fill_interval": "1s"
    },
    "filter_enabled": {
     "default_value": {
      "numerator": 100
     },
     "runtime_key": "B.local_rate_limit_enabled"
    },
    "filter_enforced": {
     "default_value": {
      "numerator": 100
     },
     "runtime_key": "B.local_rate_limit_enforced"
    },
    "local_rate_limit_per_downstream_connection": true
   }
  }
 }

I've also found that if you have a local rate limit defined at the http_connection_manager level as one of the first (or the first) http_filters and the request, and the request will match a separate http_local_rate_limit at the vhost/route level, then the http_connection_manager level local_rate_limit is not hit, no matter whether the request rate is exceeding it's token bucket or not.
Should show enabled or ok hits here, or even rate_limited but shows all zeros:
mylistener.http_local_rate_limit.enabled: 0
mylistener.http_local_rate_limit.enforced: 0
mylistener.http_local_rate_limit.ok: 0
mylistener.http_local_rate_limit.rate_limited: 0

Each request shows as using two tokens from the vhost/route level http_local_rate_limit bucket.
localratelimit_vhost.http_local_rate_limit.enabled: 52
localratelimit_vhost.http_local_rate_limit.enforced: 22
localratelimit_vhost.http_local_rate_limit.ok: 30
localratelimit_vhost.http_local_rate_limit.rate_limited: 22

As soon as you remove the vhost/route level http_local_rate_limit, then all of a sudden the http_connection_manager.http_filters one starts getting action:
mylistener.http_local_rate_limit.enabled: 20
mylistener.http_local_rate_limit.enforced: 0
mylistener.http_local_rate_limit.ok: 20
mylistener.http_local_rate_limit.rate_limited: 0

This is particularly perplexing because I would expect that the http_connection_manager.http_filters local_rate_limit would be executed on before envoy.filters.http.router (further down in the filters) and (if sufficiently restrictive) end processing before reaching the vhost/routes evaluation. Currently even if the http_connection_manager.http_filters local_rate_limit is set to a very low value, one which would be exhausted immediately, as long as another local_rate_limit exists at the vhost/route level, it seems to take the token decrements upon itself anyways. Envoy seems to look ahead? Or maybe my mental model of Envoys http_filters as a series of sequential steps is misguided.


Unnest now works on MSQ

This entails:

Removing the enableUnnest flag and additional machinery
Updating the datasource plan and frame processors to support unnest
Adding support in MSQ for UnnestDataSource and FilteredDataSource
CalciteArrayTest now has a MSQ test component
Additional tests for Unnest on MSQ
Removing engine feature of unnest alongside (1)

This PR has:

[ ] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[ ] added documentation for new or modified features or behaviors.
[ ] a release note entry in the PR description.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[x] been tested in a test Druid cluster.

@LakshSingla @cryptoe I have addressed the comments, added the refactoring, and also removed the context level feature to push it into individual engines. Please re-review

From a convo with @somu-imply, it seems like queries with a time filter SELECT * FROM foo, unnest(col) WHERE __time >= t1 and __time < t2 doesn't prune over the segments it has to iterate. It will iterate over all of the segments, and then apply the filter on top of it.
If this is correct, we should change the query segment spec to break down the where clause in the filter and the segment spec. However, I am confused if it's the same behavior in native queries as well.

Seems like the above is a problem in the native query as well. https://github.com/apache/druid/pull/15020

Addressed the comments and added the test case


Prepared statement - keyword as parameter name - parse failure

OrientDB Version: 2.2.18
While performing this query i receive parsing exception:
val query = "SELECT FROM X WHERE date > :from AND date < :to"
On the other hand this one is perfectly fine
val query = "SELECT FROM X WHERE date > :frm AND date < :to"
That means I cannot use keywords as parameter names in prepared statements, though ":" in front of parameter name should remove ambiguity from grammar.
Don't know if you consider this a bug or not. Feel free to close.
Parsing code looks pretty low-level, so I gave up investigating further.

Hi @karolmie1
It's a known limitation, but I think I can patch it.
I'll give you a feedback soon
Thanks
Luigi

No need to make it top priority :) If it is known then it's good for me.
Sorry if I've created a duplicate, I try my best to find existing issue first.

Hi @karolmie1
I pushed a little fix to support specifically :from. To support other keywords they have to be mapped one by one. I'll do it in next releases, in the meantime I'm closing this
Thanks for reporting!
Luigi


Remove mime4j dependency from ballerina-lang

Purpose
$subject
Fixes #43098
Approach
There is a vulnerability in the mime4j package https://github.com/advisories/GHSA-jw7r-rxff-gv24 which comes as a transitive dependency from the ballerina-profiler and ballerina-shell-service modules. This PR removes them by packing the jar without transitive dependencies.
Samples
https://github.com/ballerina-platform/ballerina-lang/actions/runs/10030529600/job/27719941501
Remarks
Check List

[ ] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

The trivy scanner passes after the changes.
https://github.com/ballerina-platform/ballerina-lang/actions/runs/10038669265/job/27741077940

Shall we create a issue to track removing uber jar creation for profiler and shell.

Shall we create a issue to track removing uber jar creation for profiler and shell.

created https://github.com/ballerina-platform/ballerina-lang/issues/43158 to address this separately.


pip/easy_install fails

adam@titus /tmp/test
$ easy_install d
Searching for d
Reading http://pypi.python.org/simple/d/
Couldn't find index page for 'd' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for d
error: Could not find suitable distribution for Requirement.parse('d')
$ pip install d
Downloading/unpacking d
  Could not find any downloads that satisfy the requirement d
No distributions at all found for d
Storing complete log in /Users/adam/.pip/pip.log

It's not in pip anywhere yet. Try:
pip install -e hg+http://bitbucket.org/sjl/d/#egg=d

Yeah I figured, docs say otherwise though ;)

Fixed -- it's on PyPi now.


scramble questions in 10 datasets

Make sure to put one attention question per page

@hckum Please confirm if satisfactory and if yes, please close the issue.

I reviewed the scrambled questions, and realized we need a more structured scrambling, like one easy quesiton per page, but for other question types too.
So I looked at the exactly question types, so we can random sample at most one question from the same question type per page. I will email you on this separately.


Is it possible to integrate this library with pyspark ?? If so how it can be done ??

I've never used PySpark so I can't say for sure. The only requirement in order to use creme is to represent observations with a dictionary of features, that's it.


Not working in web

════════ Exception caught by scheduler library ═════════════════════════════════
UnimplementedError
═════════════════════════════════

Could you please post the complete error or the screenshot of the complete error here.
I would look into it soon!

Could you please confirm if you are facing the same issue with this patch?
@gouravd

Thanks for the update @maddyb99 .
I tried this on web and found that it works only once.. basically the shimmer effect works only once..here's the log.. hope its helpful
════════ Exception caught by scheduler library ═════════════════════════════════
The following DomException object was thrown during a scheduler callback:
IndexSizeError: Failed to execute 'addColorStop' on 'CanvasGradient': The provided value (1.00478) is outside the range (0.0, 1.0).
When the exception was thrown, this was the stack
dart:sdk_internal 149477:18                                    createPaintStyle
dart:sdk_internal 135726:39                                    setUpPaint
dart:sdk_internal 134205:40                                    [_setUpPaint]
dart:sdk_internal 134296:24                                    drawPath
dart:sdk_internal 155037:14                                    apply
...
════════════════════════════════════════════════════════════════════════════════

I have fixed this error in 3429ab6 and I will push it to Pub soon.
Please try cloning this and verify that your issue has been resolved so that we are good to go 🚀
Thanks for bringing up this issue 🙏

Something's odd.. the cloned code is working but 0.0.6 is showing same error

Try using ^0.0.7
This will work!


[KOGITO-5811] - no kind is registered for the type v1beta1.KogitoInfra

Many thanks for submitting your Pull Request :heart:!
https://issues.redhat.com/browse/KOGITO-5811
Please make sure your PR meets the following requirements:

[ ] You have read the contributors' guide
[ ] Pull Request title is properly formatted: [KOGITO-XYZ] Subject
[ ] Pull Request contains a link to the JIRA issue
[ ] Pull Request contains a description of the issue
[ ] Pull Request does not include fixes for issues other than the main ticket
[ ] Your feature/bug fix has a unit test that verifies it
[ ] You've ran make before-pr and everything is working accordingly
[ ] You've tested the new feature/bug fix in an actual OpenShift cluster
[ ] You've added a RELEASE_NOTES.md entry regarding this change

/jenkins test

/jenkins test


Roll Packages from 0167d834e937 to 6328cfbd2a46 (2 revisions)

https://github.com/flutter/packages/compare/0167d834e937...6328cfbd2a46
2023-05-10<EMAIL_ADDRESS>[go_router_builder] Adds name parameter to TypedGoRoute and supports its generation. (flutter/packages#3665)
2023-05-10<EMAIL_ADDRESS>[various] Remove iOS 9 references (flutter/packages#3948)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Windows tool_integration_tests_1_6 is hanging, but has succeeded: https://ci.chromium.org/ui/p/flutter/builders/try/Windows tool_integration_tests_1_6/15492/overview. Landing manually


octoprint: 1.9.2 -> 1.9.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for octoprint is: The snappy web interface for your 3D printer
meta.homepage for octoprint is: https://octoprint.org/
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.9.3 with grep in /nix/store/ivlizyw5nychl4h9170mhk2rbsdl8ixn-python3.10-OctoPrint-1.9.3
found 1.9.3 in filename of file in /nix/store/ivlizyw5nychl4h9170mhk2rbsdl8ixn-python3.10-OctoPrint-1.9.3

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
octoprint

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/ivlizyw5nychl4h9170mhk2rbsdl8ixn-python3.10-OctoPrint-1.9.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A octoprint https://github.com/r-ryantm/nixpkgs/archive/e20c1dc1b4b71094e53198e156be013ab030714e.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/e20c1dc1b4b71094e53198e156be013ab030714e#octoprint

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/ivlizyw5nychl4h9170mhk2rbsdl8ixn-python3.10-OctoPrint-1.9.3
ls -la /nix/store/ivlizyw5nychl4h9170mhk2rbsdl8ixn-python3.10-OctoPrint-1.9.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

octoprint

Maintainer pings
cc @abbradar @gebner @WhittlesJr @gador for testing.

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

2 packages built:

octoprint
octoprint.dist

Result of nixpkgs-review pr 260583 run on aarch64-linux 1

2 packages built:

octoprint
octoprint.dist


Refactored xml parser + tests

Reopened as the topic arised in Gitter.im.
Old PR: #954
Ticket: https://issues.shopware.com/issues/SW-17837
Description

Why is it necessary?
Refactored xml readers because every programmer does his own thing.
There were some redundant functions which i moved to a abstract base class.
All readers are now unified and 100% tested.

What does it improve?
It does improve code, tests and xsd files.

BC breaks?
-> config.xsd
storeType has changed. PHP got removed due to when inserting an php array as CDATA you have to eval it to get the data and that is IMO a security issue.
There is now an explicit way to declare which type of store it is.
-> plugin.xsd
pluginName-attribute in "requiredPlugin" is now required.
complexType "scope" got removed because its not used.
Tests pass?
No, but only non related tests fail.

Code-Style check fails

Hey @nlubisch,
can you please try to separate your functional and your misc changes into different PRs?

Sure, i can. Give me some time :)

Removed the misc stuff and opening a new PR with them in a minute.

The test succeeds locally. Don't see the problem here :(

Same problem also local https://dpaste.de/i0yR

This PR was closed due to inactivity. If this change is still important to you, feel free to create a new pull request.
For more information about our contribution guidelines, see https://developers.shopware.com/contributing/contribution-guideline/.


Fixed unnecessary invocation of TagHelper target

https://github.com/aspnet/Razor/issues/2075
MsBuild was still deleting the SimpleMvc.TagHelpers.input.cache file when we add it to FileWrites with ItemName=FileWrites.
cc' @pranavkm who has more context.
Also added a test.

🆙 📅

🆙 📅


HV-1609 Change the way of filtering which beans to process in CDI extension

https://hibernate.atlassian.net/browse/HV-1609

I've got the answer on our question about @WithAnnotations and it turns out that such behavior is dictated by the CDI spec:

The annotation @WithAnnotations may be applied to the event parameter. If the annotation is applied, the container must only deliver ProcessAnnotatedType events for types which contain at least one of the annotations specified.

Hence there's not much can be done in this direction. So I've removed the annotation and added a custom filter to determine if we should try to wrap a bean with validation proxy.
I tried to run the same tests for tck 2.0.3 that were failing and with these changes all seems good.
If such approach is OK I'll create a JIRA ticket and update the commit message with it.
Link to mailing list - http://lists.jboss.org/pipermail/weld-dev/2018-May/003670.html

Jenkins retest this please

BTW, if it wasn't clear, it's a big +1 for creating a JIRA and pursue this path :).

Updated the description and the code.
So it was my bad :) I understood that the exact behavior for interface/superclass was not specified  and that we might get it fixed.

@gsmet I've deliberately added a new commit so it'll be more visible what I've changed. But I'd say we should squash them together.
I've added a couple more test cases as our felix osgi test started to fail. And it turned out that somehow this https://github.com/hibernate/hibernate-validator/pull/953/commits/06c769d7f29c3965378b18da2d0acc3639deb2ae#diff-66e9ba3cc4d09f83eb2ae799daeacab5R116 would pick an annotation from something like:
private Min(10) int num;

but would fail to do so in case of a custom constraint:
private @Custom SomeBean bean;

and the same applies for executable parameters...

@marko-bekhta so as I understand it, what you did does not work correctly with custom constraint and Felix?
What error do you have? I don't see anything risky that would fail with OSGi.

I've explained it badly... So everything works fine with the first commit but we ignore the type argument annotations with it. When I've added support for type arguments I was assuming that having for example for fields only this check would be enough:
// 2. Or on a field level
for ( Field field : clazz.getDeclaredFields() ) {
    if ( isAnnotationPresent( field.getAnnotatedType(), processedAnnotations ) ) {
        return true;
    }
}

i.e. getting the annotated type and checking both declared annotations and type arguments if any are available.
And such check passed the initial ValidateableBeanFilterTest where we had a case:
private static class AnnotatedField {
    @Min(10)
    private int num;
}

and I had same kind of checks for executable parameters. Just checking the executable.getAnnotatedParameterTypes(). Which also worked fine in initial ValidateableBeanFilterTest. So I run a full mvn clean install to discover that felix tests start to fail. It turned out that the reason for that was that the bean from those tests was not wrapped with validation proxy. That's when I've tried to add similar case to ValidateableBeanFilterTest and it turned out that if there's a custom annotation like @ValidNumber on field, parameter or method an annotated type doesn't contain that annotation, while it contains the @Min. So that's why I've added those additional checks for something.getDeclaredAnnotations() and all went back to normal after that.
I've left the inline comment about such behavior near parameter checks code, didn't want to copy/paste the same in the other places. If you'd like to see this behavior just try to comment out:
if ( isAnnotationPresentIn( field.getDeclaredAnnotations(), processedAnnotations ) ) {
    return true;
}

and run the test for the filter. With this peace of code commented out, it's failing for me on:
assertTrue( predicate.test( BeanWithCustomConstraintOnField.class ) );

while works perfectly fine on:
assertTrue( predicate.test( AnnotatedField.class ) );

Hope this explains things better :)

OK, cool, I'll do a final review to tidy up some comment and merge.

Fixed a few typos here and there and changed a few method names, hopefully for the better :), and merged.
Thanks for taking care of this.

@gsmet @marko-bekhta this PR seems to cause a significant performance regression. Removing @WithAnnotations from the CDI extension is going to cause the method to be called far more often, additionally the VALIDATEABLE_BEAN_FILTER.test() call now done on every invocation of processAnnotatedType() is doing costly reflection on each call.
My performance team took a sampling of CDI application startup time going from Hibernate Validator 6.0.9.Final to 6.0.10.Final and measured a 6% regression with IBM JDK 8 sr6 and a 19% regression with Oracle JDK 8u171.
It seems the BeanValidation spec overstepped its bounds a bit by promising this behavior to work when CDI had no reasonable capability to do so.  I propose that we either:

revise the Bean Validation spec to remove this behavior claim or
open a spec enhancement request on CDI to provide this functionality in a future version, and at that time provide this capability from Bean Validation

@aguibert interesting. I'm a bit torn about it as it's a really surprising behavior and might lead to constraints being totally ignored.
One way to improve the situation might be to ignore classes from the java. package (that would exclude analyzing Object methods which might help). Don't know if it would make a real difference in practice, and, for sure, it wouldn't solve the entire scanning issue.
I would have added an option (or a parallel implementation of the extension) if it was possible but unfortunately I don't think it is...

@aguibert could your team test with https://github.com/gsmet/hibernate-validator/tree/cdi-performance-issue-6.0 ?
It won't entirely mitigate the issue but maybe it will help.

@aguibert any chance you could take a look at this before next week? I might cut a release soon to fix a JDK 11 issue so I could include this commit in the release.
Thanks!


Question about the Cosine distance strategy

@eyurtsev hello. I'd like to ask a follow up question. the COSINE distance strategy is resulting in scores >1.. from this code, it looks like scores returned are calculated from 1-distance, meaning they are similarity scores, and cosine sim scores should be in [-1, 1] range. but I get scores >1.
is there a reason for that?  am I missing something in my implementation? thanks.
this is my code snippet
embedder = NVIDIAEmbeddings(model="nvolveqa_40k")
store = FAISS.from_documents(docs_split, embedder, distance_strategy=DistanceStrategy.COSINE)
query = "Who is the director of the Oppenheimer movie?"
docs_and_scores = store.similarity_search_with_score(query)

Originally posted by @rnyak in https://github.com/langchain-ai/langchain/discussions/16224#discussioncomment-8413281

@dosubot thank you for your response. you are referring a different piece of code, where as I am referring this code:
    @staticmethod
    def _cosine_relevance_score_fn(distance: float) -> float:
        """Normalize the distance to a score on a scale [0, 1]."""

        return 1.0 - distance

This tells me what is returned as relevance score is similarity score already. How come a similarity score can be >1?

I just stumbled upon this and indeed, the LangChain implementation of _cosine_relevance_score_fn is mathematically wrong.
@staticmethod
def _cosine_relevance_score_fn(distance: float) -> float:
    """Normalize the distance to a score on a scale [0, 1]."""
    return 1.0 - distance

Cosine similarity is defined as the dot product of two vectors divided by the product of their lengths.
Therefore the cosine similarity of two vectors can range from -1 (vectors point in exactly opposite directions, i.e. (-1, 0) and (2, 0)) over 0 (vectors are orthogonal to each other, i.e. (1, 0) and (0, 2)) to 1 (vectors point in exactly the same direction, i.e. (1, 0) and (2, 0)).
Thus, the correct normalisation to the interval [0, 1] where 0 means most similar and 1 means least similar should be 1.0 - (distance + 1.0) / 2.0.
In practice, this bug does probably not occur very often, as current embedding models often only use a small part of the available vectorspace for all embeddings where all used vectors have positive cosine similarity https://community.openai.com/t/some-questions-about-text-embedding-ada-002-s-embedding/35299/3.
If future models use more of the available vectorspace, this bug will start to occur more frequently.

I just stumbled upon this and indeed, the LangChain implementation of _cosine_relevance_score_fn is mathematically wrong.
@staticmethod
def _cosine_relevance_score_fn(distance: float) -> float:
    """Normalize the distance to a score on a scale [0, 1]."""
    return 1.0 - distance

Cosine similarity is defined as the dot product of two vectors divided by the product of their lengths.
Therefore the cosine similarity of two vectors can range from -1 (vectors point in exactly opposite directions, i.e. (-1, 0) and (2, 0)) over 0 (vectors are orthogonal to each other, i.e. (1, 0) and (0, 2)) to 1 (vectors point in exactly the same direction, i.e. (1, 0) and (2, 0)).
Thus, the correct normalisation to the interval [0, 1] where 0 means most similar and 1 means least similar should be 1.0 - (distance + 1.0) / 2.0.
In practice, this bug does probably not occur very often, as current embedding models often only use a small part of the available vectorspace for all embeddings where all used vectors have positive cosine similarity https://community.openai.com/t/some-questions-about-text-embedding-ada-002-s-embedding/35299/3.
If future models use more of the available vectorspace, this bug will start to occur more frequently.


Enhance: URL correctness check

I need to verify url that given by user is right url form.
How can I do?

First, Check HTTP reply code 200.
I think that if the website is normal, that website reply HTTP code 200.

In tinyURL, just check original url has keyword https:// or http://.
So, i do that too.


nagios_plugins: Fix false OKs on help text

This patch fixes getting false OK from scripts when it is actually not run
correctly but printing help text to help the user.  Now it returns UNKNOWN
which is more appropriate when this happens.

@ecklm , lgtm.
Thanks!


Deselecting the 'Extra Comps' radio option does not disable the external comps check

Whether intentional or not, deselecting the 'Extra Comps' radio option within the export options for a composition, does not disable the check if expressions point to external comps. It appears that any selected comps within the 'Extra Comps' drop down will still get checked.

I'll look into it. Thanks!

fixed


WIP Larger callouts to work at and with Shopify

@cshold what do you think about adding larger callouts to work at Shopify and add a new one to work with Shopify (developer program)? Would you be able to help in the design as I'm obviously lacking any/all skills in that dept :smile:

cc @atleeclark

Great addition. Let's loop in @tranhelen - are you able to lend a bit of design help?

This looks alright with me for now but I would change the titles. They're too similar to each other and they can easily get glossed over.

Ha yeah maybe Work at Shopify and Develop with Shopify? @atleeclark or @fditrapani thoughts?

"Work at Shopify" is good. How about this for app developers:
Join our developer community
Our app developers have earned millions of dollars developing apps for the Shopify App Store. Starting building apps and reach over 175,000 merchants.
Learn more

Updated copy - but could still use some CSS love I think...
Mobile:

Desktop:

All you need is some space after the banner on the desktop so that the copy right info and links aren't butting up against it like this:

And on mobile, just add some space after the "work at Shopify" paragraph, like so:

OK...can you please do that simple thing @fditrapani? Me no css.

Thanks to @fditrapani 's mad CSS skills I think this is ready to go. @carsonb good to ship?

Looks good :+1:


Fanzy zones leaving a small gap

Microsoft PowerToys version
0.70.0
Installation method
GitHub
Running as admin
None
Area(s) with issue?
FancyZones
Steps to reproduce
Just create two zones next to each other with zone spacing (idk if that's the exact name) at 0px
✔ Expected Behavior
The zones to be exactly side to side
❌ Actual Behavior
Small gap

Other Software
No response

Rather than setting it to 0px can you try it by disabling the space around zones toggle?

@redfer13 What version are you on? I'm on 0.72.0 and I dont see the option to disable it. I'm looking in Layout Editor.

Ah I see its for the Grid one and Im using Canvas

/reportbug


Discord invite is invalid on GitHub page?

Hi, on the GitHub page, it says:
Want to chat?
Join us on Discord with questions, concerns...
But that invite is invalid?

I generated a new invite link and updated the wiki page. Does this work? https://discord.gg/CNmfPmddDR

Thx!


Update anndata formatting

Closes #99
Here I am adding in a modified version of the anndata reformatting script from scpca-nf to bring the formatting of the simulated data up to date with the published data.
The main code of the script is the same, but wrapped into a function so that I can apply it to all files in a directory.
I also updated the initial export script so it includes the PCA metadata output that goes into the h5ad files.
I have tested this with local data, and things seemed to go well, but a full test still needs to be done. (Starting it after filing this PR)

Can confirm that the workflow completed without errors: output from the simulation step (SCE & AnnData) can be found at s3://openscpca-test-data-release-staging/test/


requestPermission crashing on Pixel 6 with Android 13

Okay so everything is working for me however today i observed that on a pixel 6 with android 13 the requestPermission method is crashing.
const authStatus = await firebase()
                    .messaging()
                    .requestPermission({
                        ios: {
                            alert: true
                        }
                    });

"stackTrace": "launch(file:///data/data/my.app.test/files/app/vendor.js:47294:64)\n\tat (file:///data/d
  ata/my.app.test/files/app/vendor.js:47307:21)\n\tat requestPermission(file:///data/data/my.app.test/file
  s/app/vendor.js:47292:20)\n\tat requestPermission(file:///data/data/my.app.test/files/app/vendor.js:47449:71)\n
  \tat (file:///data/data/my.app.test/files/app/bundle.js:9903:114)\n\tat run(file:///data/data/at.notific.androi
  d/files/app/vendor.js:80682:12)\n\tat (file:///data/data/my.app.test/files/app/vendor.js:82495:45)\n\tat flush(
  file:///data/data/my.app.test/files/app/vendor.js:81739:17)\n\tat init(file:///data/data/my.app.test/fil
  es/app/vendor.js:82587:9)\n\tat Main(file:///data/data/my.app.test/files/app/bundle.js:10112:56)\n\tat createPr
  oxiedComponent(file:///data/data/my.app.test/files/app/vendor.js:71272:9)\n\tat ProxyComponent(file:///data/dat
  a/my.app.test...
  JS: {"nativeException":{},"stackTrace":"launch(file:///data/data/my.app.test/files/app/vendor.js:47294:64)\n\ta
  t (file:///data/data/my.app.test/files/app/vendor.js:47307:21)\n\tat requestPermission(file:///data/data/at.not
  ific.android/files/app/vendor.js:47292:20)\n\tat requestPermission(file:///data/data/my.app.test/files/app/vend
  or.js:47449:71)\n\tat (file:///data/data/my.app.test/files/app/bundle.js:9903:114)\n\tat run(file:///data/data/
  my.app.test/files/app/vendor.js:80682:12)\n\tat (file:///data/data/my.app.test/files/app/vendor.js:82495
  :45)\n\tat flush(file:///data/data/my.app.test/files/app/vendor.js:81739:17)\n\tat init(file:///data/data/at.no
  tific.android/files/app/vendor.js:82587:9)\n\tat Main(file:///data/data/my.app.test/files/app/bundle.js:10112:5
  6)\n\tat createProxiedComponent(file:///data/data/my.app.test/files/app/vendor.js:71272:9)\n\tat ProxyComponent
  (file: app\webpack:\notificat\node_modules\svelte-hmr\runtime\proxy.js:242:28)\n\tat Proxy<Main...

On other phones it works. I am now only executing this code on ios (as it has no purpose on android anyway). I suspect it has to do with Android 13 however i am not totally sure.
i am on firebase 2.3.0

likely this, unfortunately just skipping requestPermission does not help as push notifications will not show up (as stated in the following documentation: https://developer.android.com/develop/ui/views/notifications/notification-permission)

okay i got it working by "manually" requesting the correct permission for now:
let enabled = false;
            if (isIOS) {
                const authStatus = await firebase()
                    .messaging()
                    .requestPermission({
                        ios: {
                            alert: true
                        }
                    });
                enabled = authStatus === AuthorizationStatus.AUTHORIZED || authStatus === AuthorizationStatus.PROVISIONAL;
            }else{
                try {
                    await permissions.requestPermission(android.Manifest.permission.POST_NOTIFICATIONS)
                    enabled = true;
                }catch(error) {
                    console.log("no permission");
                }
            }
            if (enabled) {
                await firebase().messaging().registerDeviceForRemoteMessages().catch((e)=> {
                    console.error(e);
                });

still need to clean up the code but you get the idea

strangely enough i now see that actually the android.Manifest.permission.POST_NOTIFICATIONS IS requested by the plugin. that is very strange that it is crashing anyway

Did you increase the targetSdk ?

yes, this is my app.gradle file
android {
  compileSdkVersion 33
  defaultConfig {
    minSdkVersion 21
    targetSdkVersion 33
    multiDexEnabled true
    generatedDensities = []
    applicationId = "my.app.name"
  }
  aaptOptions {
    additionalParameters "--no-version-vectors"
  }
}

this is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	package="__PACKAGE__"
	android:versionCode="85"
	android:versionName="0.8.5">

	<supports-screens
		android:smallScreens="true"
		android:normalScreens="true"
		android:largeScreens="true"
		android:xlargeScreens="true"/>

	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
	<uses-permission android:name="android.permission.INTERNET"/>
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
	<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
....

i am using svelte-native, initializing firebase in app.ts

import { firebase } from '@nativescript/firebase-core';
import '@nativescript/firebase-messaging'; // only needs to be imported 1x
import '@nativescript/firebase-crashlytics' // only needs to be imported 1x
firebase().initializeApp();

then having a main.svelte file with

    import { firebase } from '@nativescript/firebase-core';
    import { AuthorizationStatus } from '@nativescript/firebase-messaging';
...
onMount(async ()=>{
if (isIOS || android.os.Build.VERSION.SDK_INT >= 33) {
                const authStatus = await firebase()
                    .messaging()
                    .requestPermission({
                        ios: {
                            alert: true
                        }
                    });
                enabled = authStatus === AuthorizationStatus.AUTHORIZED || authStatus === AuthorizationStatus.PROVISIONAL;
            }else{
                    enabled = true;
            }
            if (enabled) {
                await firebase().messaging().registerDeviceForRemoteMessages().catch((e)=> {
                    console.error(e);
                });
....

this code is not working and results in the crash as mentioned above. however if i use the external permissions plugin and request the permission as shown above it works. i know it sounds strange :) i can confirm this also in the emulator. will also try to provide a simple repo.

i finally was able to print out the exact native exception:
nativeException: java.lang.IllegalStateException: LifecycleOwner com.tns.NativeScriptActivity@e734328 is attempting to register while
  current state is RESUMED. LifecycleOwners must call register before they are STARTED.
  JS: stackTrace: "launch(file: app\webpack:\notificat\node_modules\@nativescript\firebase-messaging-core\index.android.js:216:0)
  JS:   at (file: app\webpack:\notificat\node_modules\@nativescript\firebase-messaging-core\index.android.js:231:0)
  JS:   at requestPermission(file: app\webpack:\notificat\node_modules\@nativescript\firebase-messaging-core\index.android.js:212:0)
  JS:   at requestPermission(file: app\webpack:\notificat\node_modules\@nativescript\firebase-messaging\index.android.js:91:0)
  JS:   at (file:///data/data/at.notific.android/files/app/bundle.js:9909:90)
  JS:   at run(file: app\webpack:\notificat\node_modules\svelte\internal\index.mjs:18:0)
  JS:   at (file: app\webpack:\notificat\node_modules\svelte\internal\index.mjs:1831:0)
  JS:   at flush(file: app\webpack:\notificat\node_modules\svelte\internal\index.mjs:1075:0)
  JS:   at init(file: app\webpack:\notificat\node_modules\svelte\internal\index.mjs:1923:0)
  JS:   at Main(file:///data/data/at.notific.android/files/app/bundle.js:101...

Strange... I do not see any crash like that on my side.

I also increased targetSdkVersion to 33
I am also using @nativescript/firebase-messaging (and core) 2.3.0
I also added POST_NOTIFICATIONS permission to the AndroidManifest
I installed latest @nativescript/core 8.3.4

I am running the app on a Pixel 3a with Android 12 and Pixel 6a with Android 13. No crash on both devices and on the Pixel 6a, I get the permission request dialog as expected. Both devices receive and show push notifications as expected.
All I am doing is:
//app.js
applicationModule.on(applicationModule.launchEvent, function(args) {
    firebase().initializeApp();

    firebase().messaging().requestPermission({ios: { alert: true }}).then(function(authStatus) {
        if(platformModule.isIOS) {
            firebase().messaging().registerDeviceForRemoteMessages().then(() => {
                console.log("Firebase iOS registerDeviceForRemoteMessages done");
            }, (e) => {
                console.log("error in registerDeviceForRemoteMessages:");
                console.log(e);
            });
        }
    }, function(e) {
        console.log(e);
    });
}

@felixkrautschuk thank you for reporting. i suspect it is because i am using svelte-native and doing the request in the onMount method, which is basically the place to put it. Your method also seems interesting however.
i rather not request the permission on starting the app but after login. will see if that works out

I have something to fix this, will release soon.

fixed in https://github.com/NativeScript/firebase/commit/39b3b89fdbc29941a598b64338e7a1d6a9ec4d80

I'm getting the following error on an API 33 emulator:
TypeError: Cannot read property 'launch' of undefined
Doing some debugging shows that requestPermissionLauncher is never set. Manually calling register() before gives the error "... is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED."

@bozzanova-ab to ensure this always work please import the messaging module in the app.(ts | js)/main.ts

Something like this should get you running

@triniwiz: It is imported. The problem appears if you try to request the permission after the app has started. In our app the request is done as a part of the onboarding process. This works for iOS, but not on Android.
I was able to solve it by copying the register()-function and triggering it on startup and doing my own request function.

i also am currently facing this problem. i am doing the requestPermission after login. That does not work, the request is crashing.
if i do firebase().messaging() in app.ts then it is not crashing anymore however then after requesting the permission (and clicking allow) it seems the code afterwards is not executed anymore. somehow it is stuck then and the ui in a stale state.
i know this is not the best error description so let me allow to add this screenshot

I released another fix around this last night, once you import the messaging module in the main entry file requesting the permission should be a breeze

@eikaramba: I addad this to my app.ts.

I'm using Vue so I stuck the reference to requestPermissionLauncher and the callback in Vue.prototype for easy access in my component.

@triniwiz  i am already on firebase 2.3.1 or do you mean another version?
Wherever i import the messaging module, it does not work
this is my app.ts
import { firebase } from '@nativescript/firebase-core';
import '@nativescript/firebase-messaging'; // only needs to be imported 1x
import '@nativescript/firebase-crashlytics' // only needs to be imported 1x
firebase().initializeApp();
firebase().messaging();

and my main.svelte file (navigated to after login)
    import { firebase } from '@nativescript/firebase-core';
...

    onMount(async ()=>{
           let enabled = false;
            if (isIOS || android.os.Build.VERSION.SDK_INT >= 33) {
                const authStatus = await firebase()
                    .messaging()
                    .requestPermission({
                        ios: {
                            alert: true
                        }
                    }).catch((reason) => {
                        console.log("firebase messaging request permission failed");
                        const toast = new Toasty({ text: `Restart App to be asked again` }).setToastDuration(ToastDuration.LONG);
                        toast.show();
                    });
                console.log("test2");
                enabled = authStatus === AuthorizationStatus.AUTHORIZED || authStatus === AuthorizationStatus.PROVISIONAL;
            }else{
                enabled = true;
            }

            if (enabled) {
....

it does not make a difference whether i import the message module in app.ts or main.svelte file. i tried every combination.

I don't have a svelte demo set up but this works for vue

@triniwiz as you see also in bozzanova-ab example this will also not work for vue as well if you need to request the permission later in time and not at the very start of the app (which you should not btw as you should only request the permission at the time it is needed first).
Should i reopen a new ticket? I know it is frustrating and if you don't have time for this okay, but i believe in the current state the requestPermission logic only works if you directly access it, not later in time, which is not really good for real world applications.
Would a svelte-native repo with a simple login&main view help you?

@eikaramba please give the latest version a try, it should fix the later call usage 😄

@triniwiz i wish i had better news but although i am now able to successfuly request the permission the method never resolves on the first start of the app. neither by using .then or await keyword. it seems the promise is never resolved. if i change something and do a reload it resolves (however i think this is only because the requestPermission is called again this time directly resolves because permission was already granted)
see the following video:
https://user-images.githubusercontent.com/1320525/188331446-43b469dc-2909-49eb-97e6-87b83a06e978.mp4

@eikaramba Thanks for the update, I've also updated our side so can you update and try again 😁

Running into the same issue as @eikaramba with the latest version (2.3.4). Doing some debugging shows that onActivityResult is never called.
Running registerForActivityResult twice however solves the issue somehow. It doesn't matter where you add the code, as long as registerForActivityResult in run twice it works (ie, duplicating the call to register(), running registerForActivityResult twice in register(), or doing it app.ts).
I added this to my app.ts and onActivityResult is called:
if (global.isAndroid) {     if (parseInt(Device.sdkVersion) >= 33) {         Application.android.once('activityCreated', (args : any) => {             args.activity.registerForActivityResult(new androidx.activity.result.contract.ActivityResultContracts.RequestPermission(), new androidx.activity.result.ActivityResultCallback({                 onActivityResult(isGranted: boolean) { }             }))         })     } }

yes no improvement on 2.3.4 unfortunately. promise is still not resolved. i copied the code from @bozzanova-ab into my app.ts but it also did not change anything.

I use @nativescript/firebase-core and messaging 2.3.4 along with NativeScript Vanilla JS (no Angular, Vue, Svelte, ...) and I also see some issues.
1.) firebase().messaging().requestPermission Promise is not resolved (no matter if I call that already in app launch event or later on after the login process)
2.) when calling firebase().messaging().requestPermission later on after login, I see the same exception as @bozzanova-ab : java.lang.IllegalStateException: LifecycleOwner com.tns.NativeScriptActivity@b1ddc6c is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED.
3.) when doing therequestPermission call in launch event and when I deny the dialog, close the app and start it again, the dialog appears for a second time... not sure if that is the native behaviour though

Making some more changes I was able to get it working 100% of the time:
First by installing @master.technology/permissions
npm install @master.technology/permissions

That plugin uses a different way to ask for permissions that works.
To be able to use that in the existing code I made an additional ts file with an exported function:
messaging.d.ts:
import { Permissions, AuthorizationStatus } from '@nativescript/firebase-messaging-core'

export declare function requestNotificationPermission(permissions?: Permissions): Promise<AuthorizationStatus>

messaging.android.ts:
import { Device } from '@nativescript/core'
import { AuthorizationStatus, Permissions } from '@nativescript/firebase-messaging-core'
import { requestPermission } from<EMAIL_ADDRESS>
export function requestNotificationPermission(permissions: Permissions) : Promise<AuthorizationStatus> {
	if (parseInt(Device.sdkVersion) >= 33) {
		return new Promise((resolve, reject) => {
			// @ts-ignore
			requestPermission(android.Manifest.permission.POST_NOTIFICATIONS).then(result => {
				resolve(result['android.Manifest.permission.POST_NOTIFICATIONS'] ? 0 : 1)
			}, reject)
		})
	}
	const context = Utils.android.getApplicationContext()
	return Promise.resolve(org.nativescript.firebase.messaging.FirebaseMessaging.hasPermission(context) ? 0 : 1)
}

@ts-ignore present as typings for API 33 are not available yet
messaging.ios.ts:
import { AuthorizationStatus, Permissions, MessagingCore } from '@nativescript/firebase-messaging-core'
export function requestNotificationPermission(permissions: Permissions) : Promise<AuthorizationStatus> {
	return MessagingCore.getInstance().requestPermission(permissions)
}

Jepp i am using the other plugin as well for now to request Permissions. You can also do this in code directly and check for android&ios and then use firebase-core or resp. @master.technology/permissions
Would be great however if this bug is resolved in the future. i would advise to reopen the ticket as for now until it is resolved.

@triniwiz unfortunately even in latest 2.4.0-alpha.0 this is not resolving
console.log("test0");
const authStatus = await firebase().messaging().requestPermission({ios: {alert: true}});
console.log("test1");

i am never getting the "test1" output.

I can confirm @eikaramba's report. I did some tests with the 2.4.0-alpha.0 and figured out the following:
Scenario:
The permission is requested on user login.

If I request the permission the first time after installing the app, the promise does not resolve, no matter if declined or approved.
If I request the permission a second time (logout, login):

in case of previous approval: the permission dialog won't show again and the promise resolves. The interesting thing is it seems now the first promise is resolved as well (acc. to my console outputs).
in case of denial: dialog shows again, promise does not resolve.

In short: The promise does not resolve when the permission dialog is shown.
Maybe this helps narrowing down the issue?

As it seems<EMAIL_ADDRESS>is installing the wrong messaging-core. If I explicitely add the alpha messaging core via
npm install<EMAIL_ADDRESS>all is working as expected.
1000 thanks to @jcassidyav who pointed me in the right direction in Discord.

and now you are my hero of the day ;) that is actually finally working!


net::ERR_QUIC_PROTOCOL_ERROR 200 (OK)

Hi there
I have just implemented realtime api on my app and I am getting the error as indicated in the title of this message.
Can you please advise.
Thanks in advance.

Hello, please use https://pockethost.io/support.


Upvoting / downvoting makes all the names of those who answered disappear.

Refreshing the page brings them back.

Fixed in commit #7c8e0f98cfbf16382f435a80895046bfefca5a50


Visualizations/charts about requests and volunteers

Issue Reference
This PR addresses the Issue : Fixes #240
Summarize
Please, describe what the PR does, the changes you have made.

2 separate new links - one with chart about requests and the other with charts about volunteers.
Data is from an sqldump generated at 18th august morning. This data is pushed to my own DB and pushed to Tableau as extract
With this approach there is a need to create a new sqldump every day(or at whatever frequency). This can be solved, but will take time. There are also Tableau license related dependencies. I can look into those if this PR is merged and people these visualizations useful
The advantage of this approach is that this is an easy and fast way to generate visualizations of whatever kind. In other words this is enterprise level tooling.

Can we merge this @vigneshhari and @biswaz

I am not sure why there are many other commits that are supposed to be already merged. There are only 4-5 commits related to the change I made


New Issue after #35

cryptobot/_sync/client.py:42: CryptoBotError
=========================== short test summary info ============================
FAILED tests/test_sync_client.py::TestCryptoBotSyncClient::test_create_invoice
FAILED tests/test_sync_client.py::TestCryptoBotSyncClient::test_create_invoice_with_params
FAILED tests/test_sync_client.py::TestCryptoBotSyncClient::test_exchange_rates
FAILED tests/test_sync_client.py::TestCryptoBotSyncClient::test_get_balances
FAILED tests/test_sync_client.py::TestCryptoBotSyncClient::test_get_currencies
FAILED tests/test_sync_client.py::TestCryptoBotSyncClient::test_get_invoices
FAILED tests/test_sync_client.py::TestCryptoBotSyncClient::test_get_me - cryp...
========================= 7 failed, 2 passed in 2.94s ==========================
Error: Process completed with exit code 1.

Python tests / build (3.10) (pull_request): Failing after 24.

Fixed: update exchanges rates. Thanks!


build: Fix deb, rpm & snap tasks failing

Closes #2065

@max-sixty pre-commit.ci is being mean.

One quick way of testing this is to add a pull_request trigger for this workflow. We must remember to delete it before we merge though!
As long as it's on a fork (like this PR), it can't do any actual releasing, so it's "safe"

No, I don't have it locally. Please feel free to fix it.

OK, do you want to try adding the pull_request trigger so we can test this?
Then I can run pre-commit before merging (but also try and get it locally, it should be very tractable to install and will let you be more independent!)

OK great, so that version approach works — worth also copying that to the others. And then we're back to the error around the description https://github.com/PRQL/prql/actions/runs/4410531443/jobs/7728094837#step:6:39

rpm works! Can we get deb to pass too?

The multi-line descriptions now works since I reported the issue upstreams and they've since been fixed.
Both the .deb and .rpm now also builds on PR with the version fallback you provided.
I had some problems with the Snap so now I copy it out from packages/ to the project root in the GitHub pipeline and run it from the project root and then it works. The job fails fails but this is because secrets are not available in PR so this is not a real problem.

@vanillajonathan super! Merging, thank you


moved coverage to count_overlaps

the two functions are redundant. in fact coverage was calling count_overlaps internally (with some inconsistencies).
I moved coverage as option of count_overlaps. And added some examples

added: trying to fix pip minimal installation https://github.com/pyranges/pyranges_1.x/issues/16


Unable to login after clearing cache

Checklist:

[x] I have checked that there are no issues with similar or the same content
YOU SHOULD CHECK CLOSED ISSUES ASWELL

[x] I have checked the FAQ (https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/wiki/FAQ) and the answer I am looking for is not there

[x] I have double checked and can reproduce the issue

OS: MacOSX Mojave 10.14.6(18G1012)
GPMDP Version: 4.6.1 (4.6.1)
**Issue Descriptions: **
I had the same issue that described in #3660 (can't load library).
After error  i reinstalled the app, and cleared cache manually.
And when i tried to log in, google returned the message:
'You are trying to sign in from a browser or app that doesn't allow us to keep your account secure.'
P.S: I also tried to login with "Application password" created in the google account, no luck.
Steps to Reproduce:
Clear cache:
rm -Rv ./Library/ApplicationSupport/Google\ Play\ Music\ Desktop\ Player/*

GPMDP version(Ticket #3660):
https://3727-40008106-gh.circle-artifacts.com/0/home/circleci/project/dist/installers/darwin/Google Play Music Desktop Player.zip
Open app.
Enter login/passwd
Response:
You are trying to sign in from a browser or app that doesn't allow us to keep your account secure.

This is the other pinned issue, #3545


Project Revision Request form

User Story
As a Data Manager, I need a simple form to request changes to a project I manage, so that I can apply my decisions quickly and easily.
Notes
In this preliminary phase, the "Project Revision Request" form should be formatted identically to the "New Project Request" form. The difference for revision requests is that the fields will all be populated with their current values for that project, and that Data Managers have some privileges to make revisions (whereas only those eligible to be Data Sponsors could submit new project requests).
We will cover a user journey for a Data Sponsor making privileged changes to a project in a later issue. But for now, we'll just say that everything a Data Manager can do in this form, a Data Sponsor can also do.
Data Managers have permission to edit any field in this form except "Data Sponsor" and "Data Manager". To edit a given field, the user may use the same conventions for data entry established under #113.

Completion Criteria

[ ] If a project is still pending, revision requests are not available and the Edit button should not be displayed from the project detail page
[ ]  If a project is still pending the edit form should redirect you to the project detail for with a message indicating "Pending projects can not be edited"
[ ] Data Sponsors and Data Managers are the only roles allowed to navigate to the "Project Revision Request" form, if other users navigate to the form they should be redirected to the project details page and get and appropriate message
[ ] If the user is a Data Manager, then the "Data Sponsor" and "Data Manager" fields are uneditable
[ ] All fields available to the user have the same data entry mechanisms as in the New Project Request form
[ ] All fields have the same data validation requirements as in the New Project Request form
[ ] The bottom of the form shows two buttons: "Submit" and "Cancel"
[ ] If no values have been changed, then the "Submit" button is inactive
[ ] If any entered values are invalid, then the "Submit" button is inactive
[ ] The "Cancel" button is active in any case
[ ] If valid changes have been made, then clicking the "Submit" button advances the user to a confirmation message (separate issue)

Hey team! Please add your planning poker estimate with Zenhub @bess @JaymeeH @jrgriffiniii @leefaisonr

@matthewjchandler Can either data sponsors or data managers make revision requests, or only data managers?


Fix Issue 14418

Fix of issue 14418 ( https://issues.dlang.org/show_bug.cgi?id=14418 ) and an undefined identifier bug in the "C-style variadic function in D" example I found while testing the fix of 14418. I did not fill a bug report for the later.
This is my first pull request. I read http://wiki.dlang.org/Pull_Requests, but I perhaps something important. So any comments are welcomed.
I updated the extern(C) example only for consistency, so 'foo' is void in all examples - the extern(C) example does compile with
extern (C) int foo(int x, int y, ...);
too, so that change is not important.
An alternative fix would be:

foo returns int
add something like "return 42;"
I think that would be rather confusing than helpful.

thx


Add matplotlib to the requirements of the MOOC

At least say that it is not strictly required useful to know the basics.
For example a good tutorial I bumped into numpy + matplotlib:
https://sebastianraschka.com/blog/2020/numpy-intro.html#410-matplotlib

Done in #266.


Project Appears to Rely on Now-Defunct and Unsupported Libraries

In particular, I have just tried to do a manual installation of DjangoCMS and DjangoCMS-Blog. The first part succeeded. However, the second part seems to run into some issues with 'cmsplugin_filer_image'

TypeError: init() missing 1 required positional argument: 'on_delete'

The plugins are no longer supported.
https://github.com/divio/cmsplugin-filer
My dependencies are as follows:
aldryn-apphooks-config     0.5.3
certifi                    2019.9.11
cmsplugin-filer            1.1.3
Django                     2.1.14
django-appconf             1.0.3
django-appdata             0.2.2
django-classy-tags         0.9.0
django-cms                 3.7.0
django-filer               1.5.0
django-formtools           2.1
django-js-asset            1.2.2
django-meta                1.5.2
django-meta-mixin          0.3.0
django-mptt                0.10.0
django-parler              1.9.2
django-polymorphic         2.0.3
django-sekizai             1.0.0
django-sortedm2m           2.0.0
django-taggit              0.23.0
django-taggit-autosuggest  0.3.8
django-taggit-templatetags 0.2.5
django-templatetag-sugar   1.0
django-treebeard           4.3
djangocms-admin-style      1.4.0
djangocms-apphook-setup    0.3.0
djangocms-attributes-field 1.1.0
djangocms-blog             0.9.11
djangocms-column           1.9.0
djangocms-file             2.3.0
djangocms-googlemap        1.3.0
djangocms-link             2.5.0
djangocms-picture          2.3.0
djangocms-snippet          2.2.0
djangocms-style            2.2.0
djangocms-text-ckeditor    3.8.0
djangocms-video            2.1.1
easy-thumbnails            2.6
html5lib                   1.0.1
Pillow                     6.2.1
pip                        19.3.1
pytz                       2019.3
setuptools                 41.6.0.post20191030
six                        1.12.0
sqlparse                   0.3.0
Unidecode                  1.0.23
webencodings               0.5.1
wheel                      0.33.6

When installed via djangocms-installer, the project seems to work. However, in that case it installs with Django==1.11, which is unacceptable and a separate issue (https://github.com/nephila/djangocms-installer/issues/353) of its own.

@artforlife djangocms-blog 0.9 install cmsplugin-filer only to allow upgrading from previous versions  (0.8.x) which used it, and it does not use anymore at runtime
djangocms-blog 1.0 is anyway in release which will drop the dependency entirely

@artforlife 1.0.0 has been released (https://pypi.org/project/djangocms-blog/1.0.0/) :tada:

@yakky Thanks for your prompt response! I shall check it out again, based on your input.
Could you tell me if there is a place where I can see how djangocms-blog compares to the Aldryn NewsBlog? Perhaps there is a tutorial that builds out a blog or something similar to that.
I am currently using Aldryn NewsBlog for a project. However, since they have stopped the support, I need to make a decision of either trying to keep ANB up-to-date myself or switch to something like DjangoCMS-Blog altogether.

Actually I was not aware of the discontinued support for aldryn-newsblog
I will look into an upgrade path. It shouldn't be too hard as they both share the same foundation logic.
Django CMS blog has been more focused on SEO flexibility, while aldryn-newsblog was more integrated with aldryn application family and its way to handle templates packages

@yakky Sounds good. Please let me know what you find out. In the meantime, is there a live demo or tutorial for DjangoCMS-Blog?

I did not have time to prepare a demo, but I think I should :)

That would be quite useful. Perhaps a tutorial illustrating how to build out a basic blog, similar to the one here:
http://support.divio.com/en/collections/2008550-archive#legacy-guide-how-to-build-a-website-and-blog-with-django-cms

I'll open a separate issue.
IDK when I will have some bandwidth for it, but I agree it would definitely help
I opened #521 to track this, thanks for the suggestion
Closing this issue as fixed by 1.0 release

You did close this issue but in your current install document you have cmsplugin_filer_image in the INSTALLED_APPS list.

@KnotaiG I opened #523 to fix this

Also, I think it is safe to assume that aldryn_search is going away as well. I have been trying to get it working with Django==2.1.7, CMS==3.7 to no avail. It currently does not support Django==2.x from my understanding.

I will check with the divio people what's their plan with aldryn_search. As there is no replacement for it, it would be a bummer if they plan to sunset it

(for people like me that still get to this issue: aldryn_search 1.1.0 has been released, and is compatible with django 2 :))


@kanaabe deploy!

@kanaabe i'm trying out the new master/release deploy that i set up, let's see if this works as expected!
the changes here are...

removing the EOY from artists listing and artist pages
fix incorrect copy on auction results
update the artwork brick component to include bid info for works in an auction
updated the readme to describe the new deploy method and to add my name

Huh cool, this will be nice to have! All looks good.


Print a message pointing to the online playground if compiled without it

Hi,
For the Debian packaging, we remove the support for the playgroud due to the lack of octicons fonts in the archive. We will use the flag -Dwithout_playground, to deactivate it.
This change simply add a message pointing the user to the online version.

Maybe, the next if out of context for this pull request, but for what we know, the -Dwithout_playground flag was added only for the use case of compiling crystal in windows (that lacks sockets support) [0].
Is posible to maintain this flag for the entire lifecycle of crystal ? (we expect that at some point, when windows get's socket funcionality, the flag will be removed).
[0] https://github.com/crystal-lang/crystal/pull/9031

@deiv Thank you!
Just note that the online version is not the same thing. So I wouldn't mention play.crystal-lang.org in the message.

Oh, actually, I don't think we should merge this exactly because the online version is not the same thing, and there's nothing equivalent online (maybe there should?).

@asterite yes, I wonder why are not the same ...
Maybe, adjusting the text, letting know the user that the online version is not the same (the online seems that has less features) ? Example:
Crystal was compiled without playground support
You can play with the online version (that doesn't have all the features) here: https://play.crystal-lang.org

It's not that the online version has different features: it's a completely different thing.
The embedded playground will show the type and value of each expression, and you can edit the code and it runs immediately. The online play page just let's you submit code which runs once, and you can share that code.
The fact that the both include "play" in their name is misleading.
I suggested many times that it would be great if crystal play would actually be a hosted site. The reason it's not is that in the local version you can use shards. In any case, we would need to do a survey to know how many people use the offline play feature, and how they use it.

I think that the current message is enough.
We can keep the flag beyond windows socket support. Thanks for raising the need. It will go away if the playground is splitted in from the compiler, but not before.
To clarify @deiv , the lack of octicons in the archive is not a decision on our side. They are vendored to allow offline usage of the playground.
Thanks for the official Debian package 🙇

How about:

Crystal was compiled without playground support. Try the online code evaluation and sharing tool at https://play.crystal-lang.org

Hi,
@bcardiff; about the flag, good to know that could be keeped. On the other side, about the octicons, for "archive", I mean debian archive, so if our fault :)
@jhass: better, that clarifies the "thing" !
Thanks all !

Is there a meaningful incentive to point people to use the online playground, when they already have the compiler installed..?
crystal eval 'code' and crystal foo.cr seem more sensible to me at that point than to say "if you're trying to test some code, maybe open your browser and use this site", as the playground currently does little more than either of those commands, with none of the possible options (--release, etc.)
The playground evaluations are shareable, but that also doesn't seem like something someone who wanted to use crystal play originally would be interested in.

HI @z64,

Is there a meaningful incentive to point people to use the online playground, when they already have the compiler installed..?

Yes, point to something similar.
Maybe the other option is to remove the commandline parameter. From a user view (that didn't compile crystal), sounds wrong to see "hey, crystal have a playground, but for you there's not (Crystal was compiled without playground support)".

crystal eval 'code' and crystal foo.cr seem more sensible to me at that point than to say "if you're trying to test some code, maybe open your browser and use this site", as the playground currently does little more than either of those commands, with none of the possible options (--release, etc.)

The playground is for testing code or to play with the language in some agile manner ?. I see more agile, using the browser interface, instead of open a text editor, edit the file, save, and run the crystal compiler to run the file.

Yes, point to something similar.

Something similar is a file in your machine, and running it with crystal program.cr. That will have exactly the same result as play.crystal-lang.org except that for the latter you need an internet connection, it's slower, and it's harder to type in (instead of in your favorite editor).

Maybe the other option is to remove the command line parameter

I think the current situation is fine. Instead of saying "Unknown command" and having users say "I swear this was a thing", they get an explanation of why it's not working in their current version.

The playground is for testing code or to play with the language in some agile manner ?. I see more agile, using the browser interface, instead of open a text editor, edit the file, save, and run the crystal compiler to run the file.

Try hitting play.crystal-lang.org . For me it takes like 20 seconds to load. Probably because it's in heroku and it needs to spin up an instance. I don't see that as agile at all. The editor in the browser is not as convenient as your editor. You can't undo code once you submitted it. To edit the code you need to click a button, etc. That's the opposite of agile in my mind.
The solution here is for us or someone to host an exact equivalent of crystal play somewhere. Then people can play with the language without having to submit or reload pages. But of course someone has to pay for that so there's that issue...

To go into more detail, the playground is very limited in what you can do; (some of these could be improvied, but this is how it is today)

It is a stripped down, sandbox environment. Some things may not work correctly, if at all. The playground often gives poor diagnostics as well when errors occur.
You cannot pass compiler options. If you are testing something for performance, this means you can't use the standard benchmarking module.
You cannot use shards or other native libraries or tools you have installed on your host.
The embedded text editor is limited, and has several bugs that can make it very frustrating to use.
It requires an internet connection, and the service to be available.

These make the playground a very poor replacement for someone who was about to use crystal play, as crystal play has almost none of these limitations. The next best thing is the compiler itself, which the user already has installed. The online playground is most helpful for when you don't have a compiler on hand, or want to share proof of simple code.
You can write multiline eval in any decent terminal with ease:
~ $ cr eval '
    def fib(n)
      if n <= 1
        1
      else
        fib(n - 1) + fib(n - 2)
      end
    end
    puts fib(42)
    '
433494437

with none of the drawbacks above.

open a text editor, edit the file, save, and run the crystal compiler to run the file.

Considering all of the above, that is a very small thing to have to do for a predictable environment without unexpected limitations (your own).

The next best thing

The compiler is actually better than crystal play because crystal play changes the actual code you run, and because of that there are several bugs in it which cannot be reproduced with the plain compiler.

Yes, point to something similar.

Something similar is a file in your machine, and running it with crystal program.cr. That will have exactly the same result as play.crystal-lang.org except that for the latter you need an internet connection, it's slower, and it's harder to type in (instead of in your favorite editor).

Not, it's not similar. See steps below...

Maybe the other option is to remove the command line parameter

I think the current situation is fine. Instead of saying "Unknown command" and having users say "I swear this was a thing", they get an explanation of why it's not working in their current version.

The point is that is not "not working", is that can't be compiled. I dunno what is worst:

pointing the user that crystal has the command (and later realize that has not support)
crystal don't pointing to play command

Maybe the two ...

The playground is for testing code or to play with the language in some agile manner ?. I see more agile, using the browser interface, instead of open a text editor, edit the file, save, and run the crystal compiler to run the file.

Try hitting play.crystal-lang.org . For me it takes like 20 seconds to load. Probably because it's in heroku and it needs to spin up an instance. I don't see that as agile at all. The editor in the browser is not as convenient as your editor. You can't undo code once you submitted it. To edit the code you need to click a button, etc. That's the opposite of agile in my mind.

For agile, I don't mean speed, I mean the easy to run some lines of code to test the language.
For a user that never used crystal, is better to have a html interface with the editor and the compiler in it, and pushing only a button to get the code executed.
Instead of:

open an editor (5 seconds to get to the taskmenu)
save the file (5 seconds to choose path and filename: yes we all hate to give a file a name)
(maybe another 5 seconds or more to think what extension is the correct for the crystal file; Probably not needed to put one...)
open a terminal (5 seconds to get to the taskmenu)
navigate to the path where the edited file is (5 seconds)
execute the file (5 seconds or more, because the user maybe doenst known how to execute a file with the compiler:  at some point he has to take the decision to read the help/manual or ignore it, because he doesn't know if the language is cool)
once the user decided that he likes or don't likes the language, remove the file (5 seconds ?)

The solution here is for us or someone to host an exact equivalent of crystal play somewhere. Then people can play with the language without having to submit or reload pages. But of course someone has to pay for that so there's that issue...

Don't look at me :D

To go into more detail, the playground is very limited in what you can do; (some of these could be improved, but this is how it is today)

It is a stripped down, sandbox environment. Some things may not work correctly, if at all. The playground often gives poor diagnostics as well when errors occur.
You cannot pass compiler options. If you are testing something for performance, this means you can't use the standard benchmarking module.
You cannot use shards or other native libraries or tools you have installed on your host.
The embedded text editor is limited, and has several bugs that can make it very frustrating to use.
It requires an internet connection, and the service to be available.

These make the playground a very poor replacement for someone who was about to use crystal play, as crystal play has almost none of these limitations. The next best thing is the compiler itself, which the user already has installed. The online playground is most helpful for when you don't have a compiler on hand, or want to share proof of simple code.
You can write multiline eval in any decent terminal with ease:
~ $ cr eval '
    def fib(n)
      if n <= 1
        1
      else
        fib(n - 1) + fib(n - 2)
      end
    end
    puts fib(42)
    '
433494437

with none of the drawbacks above.

open a text editor, edit the file, save, and run the crystal compiler to run the file.

Considering all of the above, that is a very small thing to have to do for a predictable environment without unexpected limitations (your own).

There's not point here.
We are talking about an interface where some new user can test and "play" with the language without knowing nothing about it.
Or maybe without an experience in a shell doing "multiline eval i".
And to point the user to a replacement that could use to test crystal. Not about and IDE o enviroment for programing in crystal...

The next best thing

The compiler is actually better than crystal play because crystal play changes the actual code you run, and because of that there are several bugs in it which cannot be reproduced with the plain compiler.

Same as above.
Correct me if I'm wrong, but one use case for 'crystal play' or playground is not to give a try to crystal? (without the hassle to execute the binary, etc ...)

For someone new to the language, before they even spent the time to install the package they would have seen this:

which directs them to the playground to try things.
Anyway, thats all the toughts I have; I overall disagree with this as stated.

@deiv you make a lot of good points

For someone new to the language, before they even spent the time to install the package they would have seen this:

Yes, or someone tell's him about a new cool language named crystal, do an 'apt|yum search crystal' and later install it.

which directs them to the playground to try things.

That's the point, playground for play or try it...

Anyway, thats all the toughts I have; I overall disagree with this as stated.

That's life, if all people were equals, ¿ wheres the party ?


Logitech C270 takes 2+ minutes to start

Does not appear to happen with other devices.
VideoKit version 0.0.17
Unity Version: 2022.3.9
Windows 11

Getting this error when updating to alpha 18.
Library\PackageCache\ai.fxn.fxn3d@0.0.20\Runtime\API\FunctionClient.cs(51,25): error CS0433: The type 'IAsyncEnumerable<T>' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'

@nickhudson4 what version of Unity are you using? And can you share a screenshot of Player Settings > Other Settings in Unity?

Unity Version: 2022.3.9
Windows 11

@nickhudson4 what happens when you set the Api Compatibility Level to .NET Standard 2.1?

Okay it seems that this issue exists because your project has a Microsoft.Bcl.AsyncInterfaces assembly. Can you reproduce this compiler error in a clean project?

I have spent quite a bit of time trying to figure this one out with not much luck. Basically it can be reproduced by adding the Microsoft.bcl.asyncInterfaces package to the project with VideoKit.
Removing the AsyncInterfaces does fix the issue, however, I have numerous other packages that depend on it.
The weird part is that this was not an issue with 0.0.17 of VideoKit. Even though it still uses IAsyncEnumerable. So I wondering if there was anything specific that was changed between these two VideoKit versions?

@nickhudson4 VideoKit depends on Function which uses IAsyncEnumerable<T> from the .NET BCL. If you have other dependencies that also include this interface, then that's technically not an issue with either Function or VideoKit.
Can you confirm that the Logitech camera preview starts instantly on the VideoKit 0.0.18 alpha?

The functions library does not rely on BCL IAsyncEnumerable<T>. It relies on mscorelib. The issue is that for whatever reason, both mscorelib and BCL both have the same System.Collection.Generic.IAsyncEnumerable<T> namespace. So if BCL is anywhere in the project, it creates the conflict. And there are a lot of packages that rely on BCL (Azure.core, System.Text.Json, Xsolla, etc.). So there is a good chance there will be others with this issue. But yes you are right it is not a direct issue with videokit.
The fix for me was to pull the source of videokit and functions and add them to the project directly with scoped registries. And then check the Override references box for both Functions.Unity.asmdef and Functions.Runtime.asmdef. That way functions is self contained and isn't affected by outside references.
And yes the alpha 18 fixed the device issue.

@nickhudson4 thanks for confirming.
Regarding IAsyncEnumerable<T>, I've enabled Override references on both Function.Runtime and Function.Unity assemblies. This fix will land in the full VideoKit 0.0.18 update.

@olokobayusuf Sounds good. Thanks.


Distance matrix

We need a python script that will take the reduced data matrix and generate a "distances matrix" where cells are both at rows and columns, and each value is the distance between the related pair of cells.

Done.


[ Automation ] Randomize test suites / test case / both

Place holder for creating a robust test bucket ahead...
Either address this in tox or via command line README
--randomize all|suites|tests|none  Randomizes the test execution order.
                      all:    randomizes both suites and tests
                      suites: randomizes suites
                      tests:  randomizes tests
                      none:   no randomization (default)
                      Use syntax `VALUE:SEED` to give a custom random seed.
                      The seed must be an integer.
                      Examples: --randomize all
                                --randomize tests:1234

Since this can be part of the CI/CT runs directly as part of the command option.. This can be close.


Sanitize newprefix

We really need to store only in the sanitized form, for both cidr  and parentcidr.

Codecov Report

Merging #52 (42036b9) into master (82681fd) will decrease coverage by 0.05%.
The diff coverage is 78.57%.

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
- Coverage   76.27%   76.22%   -0.06%
==========================================
  Files           6        6
  Lines         548      572      +24
==========================================
+ Hits          418      436      +18
- Misses         68       71       +3
- Partials       62       65       +3

Impacted Files
Coverage Δ

sql.go
65.97% <60.00%> (-0.33%)
:arrow_down:

prefix.go
77.70% <77.77%> (-0.32%)
:arrow_down:

memory.go
95.00% <100.00%> (+0.71%)
:arrow_up:

Continue to review full report at Codecov.

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

Update benchmark accordingly, nothing shocking.


Javascript widget, timezone problem

Hi...
I definitely don't solve my timezones problems, maybe i can got here some advice about this, or soon ill have no hair in my head :p
Settings.py :
TIME_ZONE = 'UTC'
USE_TZ = True

This isnt my local timezone ("Europe, Paris") but i have read that is better to work with UTC and just convert the output datetime if needed.
Explications :
No problem with rules, they seems work correctly, i can get all of them with my event app.
But when i enter a random date (in the admin widget), for exemple i create an occurrences for "2015-10-06", this is save at "2015-10-05 22:00" or "2015-10-05 23:00" that's depend...  i have try to debug it at some place :

in recurrence-widget.js at line:1610 i put a console.log(this.date); Thats show me the date selected when i choose it in js calendar, so in my case if i select 2015-10-06 thats return me
"Date {Tue Oct 06 2015 00:00:00 GMT+0200}"

Im in french timezone on my computer, the javascript take the client timezone, normal.

When i save my model i have set a clean method like this :
def clean(self):
  arrayocc = []
  for i in self.recurrences.occurrences():

      arrayocc.append(i)

  raise ValidationError(arrayocc)

At this step thats raise me this date : 2015-10-05 22:00:00

And a simple last test, i set the timzone of my computer at UTC, saved a date, this is saved at :  2015-10-06 23:00:00 , the good day but at 23:00:00...why?

That's look like a javascript date problem,no?
I got no problem when i use basic django dateTimeField in my models
At changelog for 1.2.0 in the docs :
Added a French translation (#32) - this may be backwards incompatible if have overriden the widget JavaScript such that there is no language_code member of your recurrence object;
For the moment i don't use the translation but i don't really understand what are you tell us here^^
i can perform more test if you want.
Hope im clear.
Thanks

I solve my problems with some modification in recurrence-widget.js :

Remove lined 1757 to 1759

Add this after line 410 :
var mydate = new Date();
this.date.setHours(mydate.getHours());
this.date.setMinutes(mydate.getMinutes());
this.date.setSeconds(mydate.getSeconds());

Result, when i save a date via js calendar hour is setted at current time, permit me to don't get the previous day, and now until date is matched, thats i wanted.