[SPARK-33315][SQL] Simplify CaseWhen with EqualTo

What changes were proposed in this pull request?
This pr simplify CaseWhen with EqualTo, for exmaple:
create table t(a int, b int, c int) using parquet;
SELECT *
FROM   (SELECT CASE
                 WHEN a = 100 THEN 1
                 WHEN b > 1000 THEN 2
                 WHEN c IS NOT NULL THEN 3
               END AS x
        FROM   t) tmp
WHERE  x = 2

Before this PR:
== Physical Plan ==
*(1) Project [CASE WHEN (a#1 = 100) THEN 1 WHEN (b#2 > 1000) THEN 2 WHEN isnotnull(c#3) THEN 3 END AS x#5]
+- *(1) Filter (CASE WHEN (a#1 = 100) THEN 1 WHEN (b#2 > 1000) THEN 2 WHEN isnotnull(c#3) THEN 3 END = 2)
   +- *(1) ColumnarToRow
      +- FileScan parquet default.t[a#1,b#2,c#3] Batched: true, DataFilters: [(CASE WHEN (a#1 = 100) THEN 1 WHEN (b#2 > 1000) THEN 2 WHEN isnotnull(c#3) THEN 3 END = 2)], Format: Parquet, PartitionFilters: [], PushedFilters: [], ReadSchema: struct<a:int,b:int,c:int>

After this PR:
== Physical Plan ==
*(1) Project [CASE WHEN (a#1 = 100) THEN 1 WHEN (b#2 > 1000) THEN 2 WHEN isnotnull(c#3) THEN 3 END AS x#0]
+- *(1) Filter (b#2 > 1000)
   +- *(1) ColumnarToRow
      +- FileScan parquet default.t[a#1,b#2,c#3] Batched: true, DataFilters: [(b#2 > 1000)], Format: Parquet, PartitionFilters: [], PushedFilters: [GreaterThan(b,1000)], ReadSchema: struct<a:int,b:int,c:int>

Why are the changes needed?
Improve query performance.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit test.

Test build #130518 has started for PR 30222 at commit 3a1cd10.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35118/

Test build #130518 has finished for PR 30222 at commit 3a1cd10.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130518/
Test FAILed.

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35118/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35118/
Test PASSed.

retest this please.

Test build #130521 has started for PR 30222 at commit 3a1cd10.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35121/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35121/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35121/
Test PASSed.

Test build #130521 has finished for PR 30222 at commit 3a1cd10.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130521/
Test PASSed.

Also, cc @cloud-fan and @sunchao

Test build #130541 has started for PR 30222 at commit 593678c.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35141/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35141/

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35141/
Test FAILed.

Test build #130541 has finished for PR 30222 at commit 593678c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130541/
Test PASSed.

Hive optimized it to predicate: CASE WHEN ((a = 100)) THEN (false) WHEN ((b > 1000)) THEN (true) WHEN (c is not null) THEN (false) ELSE (null) END (type: boolean). But this condition can not push down. We can optimized it to b > 1000 and push down it.
hive> explain SELECT *
    > FROM   (SELECT CASE
    >                  WHEN a = 100 THEN 1
    >                  WHEN b > 1000 THEN 2
    >                  WHEN c IS NOT NULL THEN 3
    >                END AS x
    >         FROM   t) tmp
    > WHERE  x = 2;
OK
STAGE DEPENDENCIES:
  Stage-0 is a root stage

STAGE PLANS:
  Stage: Stage-0
    Fetch Operator
      limit: -1
      Processor Tree:
        TableScan
          alias: t
          Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
          Filter Operator
            predicate: CASE WHEN ((a = 100)) THEN (false) WHEN ((b > 1000)) THEN (true) WHEN (c is not null) THEN (false) ELSE (null) END (type: boolean)
            Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
            Select Operator
              expressions: CASE WHEN ((a = 100)) THEN (1) WHEN ((b > 1000)) THEN (2) WHEN (c is not null) THEN (3) ELSE (null) END (type: int)
              outputColumnNames: _col0
              Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
              ListSink

Test build #130629 has started for PR 30222 at commit ee5e6dd.

Test build #130630 has started for PR 30222 at commit b611659.

Test build #130629 has finished for PR 30222 at commit ee5e6dd.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130629/
Test FAILed.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35235/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35235/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35235/
Test PASSed.

Test build #130630 has finished for PR 30222 at commit b611659.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130630/
Test FAILed.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35237/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35237/

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35237/
Test FAILed.

Test build #130645 has started for PR 30222 at commit 7d7eca3.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35255/

Test build #130645 has finished for PR 30222 at commit 7d7eca3.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130645/
Test FAILed.

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35255/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35255/
Test PASSed.

Retest this please

Test build #130665 has started for PR 30222 at commit 7d7eca3.

Test build #130665 has finished for PR 30222 at commit 7d7eca3.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130665/
Test FAILed.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35276/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35276/

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35276/
Test FAILed.

It seems it is caused by deterministic. cc @viirya
== Analyzed Logical Plan ==
label: double, features: vector, fold: int
Filter (UDF(fold#14) AND NOT (fold#14 = 2))
+- Repartition 2, true
   +- Project [label#3, features#4, fold#14]
      +- Project [label#3, features#4, random#10, CASE WHEN (random#10 < 0.33) THEN 0 WHEN (random#10 < 0.66) THEN 1 ELSE 2 END AS fold#14]
         +- Project [label#3, features#4, rand(100) AS random#10]
            +- Repartition 1, true
               +- SerializeFromObject [knownnotnull(assertnotnull(input[0, org.apache.spark.ml.feature.LabeledPoint, true])).label AS label#3, newInstance(class org.apache.spark.ml.linalg.VectorUDT).serialize AS features#4]
                  +- ExternalRDD [obj#2]

== Optimized Logical Plan ==
LocalRelation <empty>, [label#3, features#4, fold#14]

@wangyum, it's https://github.com/apache/spark/pull/21852 right? Can you file a blocker JIRA?

@wangyum do you know how we optimize the plan wrongly step by step?

We can reproduce it by:
spark.sql("CREATE TABLE t(a int, b int, c int) using parquet")
spark.sql(
  """
    |SELECT *
    |  FROM   (SELECT CASE
    |    WHEN rd > 1 THEN 1
    |    WHEN b > 1000 THEN 2
    |    WHEN c < 100 THEN 3
    |    ELSE 4
    |END AS x
    |FROM (SELECT *, rand(100) as rd FROM t) t1) t2
    |WHERE  x = 2
    |""".stripMargin).explain

Alias.toAttribute construct AttributeReference with default deterministic, that is true:
https://github.com/apache/spark/blob/ca2cfd4185586993f981cfd2f1aff30ee6b2294e/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala#L181

Therefore, deterministic is true, andSimplifyConditionals can simplify it:

Test build #130694 has started for PR 30222 at commit 5a90bfc.

Test build #130694 has finished for PR 30222 at commit 5a90bfc.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130694/
Test FAILed.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35304/

This seems to fail still.

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35304/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35304/
Test PASSed.

Sorry. This change has logic issue, for example:
spark.sql("CREATE TABLE t using parquet AS SELECT if(id % 2 = 7, null, id) AS a FROM range(7)")
spark.sql(
  """
    |SELECT *
    |  FROM   (SELECT CASE
    |    WHEN a > 1 THEN 1
    |    WHEN a > 3 THEN 3
    |    WHEN a > 5 THEN 5
    |    ELSE 6
    |END AS x
    |FROM t ) t1
    |WHERE x = 3
    |""".stripMargin).show

Before this pr, the result is empty, after this pr, the result is not empty.

I see, the case when conditions are not orthogonal. We can't skip any of them.

Thank you for your decision, @wangyum and @cloud-fan .

Test build #132669 has started for PR 30222 at commit 312c613.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37273/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/37273/

Test build #132669 has finished for PR 30222 at commit 312c613.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/132669/

@cloud-fan @dongjoon-hyun We can improve the following case to reduce Union operator:
create table t1 using parquet as select * from range(100);
create table t2 using parquet as select * from range(200);

create temp view v1 as
select 'a' as event_type, * from t1
union all
select CASE WHEN id = 1 THEN 'b' WHEN id = 3 THEN 'c' end as event_type, * from t2;

explain select * from v1 where event_type = 'a';
== Physical Plan ==
Union
:- *(1) Project [a AS event_type#8, id#10L]
:  +- *(1) ColumnarToRow
:     +- FileScan parquet default.t1[id#10L] Batched: true, DataFilters: [], Format: Parquet,
+- *(2) Project [CASE WHEN (id#11L = 1) THEN b WHEN (id#11L = 3) THEN c END AS event_type#9, id#11L]
   +- *(2) Filter (CASE WHEN (id#11L = 1) THEN b WHEN (id#11L = 3) THEN c END = a)
      +- *(2) ColumnarToRow
         +- FileScan parquet default.t2[id#11L] Batched: true, DataFilters: [(CASE WHEN (id#11L = 1) THEN b WHEN (id#11L = 3) THEN c END = a)], Format: Parquet

explain select * from v1 where event_type = 'b';
== Physical Plan ==
*(1) Project [CASE WHEN (id#11L = 1) THEN b WHEN (id#11L = 3) THEN c END AS event_type#8, id#11L AS id#10L]
+- *(1) Filter (CASE WHEN (id#11L = 1) THEN b WHEN (id#11L = 3) THEN c END = b)
   +- *(1) ColumnarToRow
      +- FileScan parquet default.t2[id#11L] Batched: true, DataFilters: [(CASE WHEN (id#11L = 1) THEN b WHEN (id#11L = 3) THEN c END = b)], Format: Parquet


Try to handle deleted BaseDirs in filewatch

If one of our BaseDirs gets deleted, add it to a list which periodically gets checked. If a deleted dir gets recreated, start following it again.

i THINK this seems reasonable


Meta feature: Automatically fill in browser+extension information on issue reports

On

https://github.com/sindresorhus/refined-github/issues/new?assignees=&labels=bug&template=1_bug_report.md
https://github.com/sindresorhus/refined-github/issues/new?labels=bug&template=1_bug_report.md&title=%60clean-conversation-sidebar%60%3A+Cannot+re(...)%0A%09 (pre-filled URL)

We can automatically append this information to the text:
Refined GitHub: {version} {getAdditionalPermissions().hosts.length > 0 ? 'has GHE' : ''}
Browser: {navigator.userAgent}

Forget about the userAgent 😅
https://github.com/refined-github/refined-github/pull/5113#discussion_r761665067

Let the user enter the browser, which may be reported as "chrome" when in reality it's Vivaldi.

It would be astonishing if some part of RGH works in Chrome but not other Chromium-based browsers.
Let's split the difference: we still fill this info, but in the "Description" field instead.

We don't need to parse this information because it's so fickle

It's not parsing the entire userAgent, just the specific part regarding browser version. It also prefers the new API currently implemented in Chromium.
As fickle as it can get, the format has not changed and the version is still being updated even after userAgent is deprecated a long time.
I've tested it in Chrome/other Chromium-based browsers (Edge, Opera, Brave, Vivaldi), Firefox and Safari. Other non-matching browsers are still required to be specified.

It would be astonishing if some part of RGH works in Chrome but not other Chromium-based browsers.

You'd be surprised! I don't want to be surprised, especially because we don't want to waste time trying to replicate those non-Chrome issues.

Other non-matching browsers are still required to be specified.

The problem is that they wont, because the field is already filled in. You know they'll open that link and submit the issue as is without any comment 😅

It would be astonishing if some part of RGH works in Chrome but not other Chromium-based browsers.

You'd be surprised! I don't want to be surprised, especially because we don't want to waste time trying to replicate those non-Chrome issues.

That's why I proposed the alternative approach to append the info in the "Description" field.

because the field is already filled in

This is not true with my last commit: https://github.com/refined-github/refined-github/commit/d047eec7d6e331788065cc5d302961ab2bb1886f

Related: https://github.com/refined-github/refined-github/pull/5298#pullrequestreview-853544750

We can put userAgent in comments:
// Won't overwrite error messages (https://github.com/refined-github/refined-github/blob/6c6e2799cd1499f6e629cf9764e0e23b3fd19ce5/source/features/index.tsx#L74-L78)
text-field-edit.insert(description, `<!-- UserAgent: ${navigator.userAgent} -->`)

The info is retained while keeping the issue from looking too verbose.

@fregante I don't get why are you so opposed. All your worries are answered. Is any animal harmed during this?
If people don't like providing userAgent they can just delete it. The browser info doesn't even have to be filled in automatically, it can be a button, thus avoiding making "Description" field actually optional.

Resolved by https://github.com/refined-github/refined-github/pull/5364


12 add compound like voting to pallet assets

This introduces the HistoryHorizon constant which determines the minimum number of blocks that we keep history for, together with SupplyHistory and AccountHistory, which record historical supply and account balances.
Further work is needed to make the proposal voting outcome calculation use this.
BTW: An offchain workers may be another way to go about this, since it could query the historical data that is preserved in the blockchain. It may be possible to use that to determine the outcome of voting on proposals. Or maybe not, I don't know enough about it, but wanted to mention it anyway.

So should I merge this already?


Using the model for a new dataset.

Hello, can this model be used for the vocdevkit dataset?
How to convert PNG images and masks to NPZ format?

Hi @genggeng-123
please check the tutorial for 2D images
https://github.com/bowang-lab/MedSAM/blob/main/finetune_and_inference_tutorial_2D_dataset.ipynb


abandoning C++ build errors

Describe the bug
The build contains error polling C++
To Reproduce
Steps to reproduce the behavior:
1, Clone pxt-arcarde
2. Follow Local server setup
3. npm run serve
4. Errors in console after a few minutes
Expected behavior
No errors?  I don't know what it's actually trying to do, but it isn't happy about something
Error messages
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #1)
waiting 8s for C++ build...
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #2)
waiting 8s for C++ build...
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #3)
waiting 8s for C++ build...
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #4)
waiting 8s for C++ build...
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #5)
waiting 8s for C++ build...
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #6)
waiting 8s for C++ build...
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #7)
waiting 8s for C++ build...
polling C++ build https://makecode.com/compile/11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f.json (attempt #8)
waiting 8s for C++ build...
abandoning C++ build
TypeError: Cannot read property 'length' of null
at compressHex (C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:104993:37)
at C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:104922:36
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async fillExtInfoAsync (C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:112325:51)
at async MainPackage.getCompileOptionsAsync (C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:112371:33)
at async C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:158085:38
at async C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:99300:42
at async Promise.all (index 0)
at async promisePoolAsync (C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:99306:21)
at async buildTargetCoreAsync (C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:158009:5)
at async Object.staticpkgAsync [as _callback] (C:\Users\paul\Git\The Code Zone\pxt-arcade\node_modules\pxt-core\built\pxt.js:160317:5)
{
sha: '11e707ee0bca9a40828141a3991313449070b36a9182ba651e43c3c1104ab69f'
}
pxt_modules/base/pxt-core.d.ts(1,1): error TS9043: The hex file is not available, please connect to internet and try again.
Desktop (please complete the following information):

OS: Windows 11
Browser: chrome
Version 11

this should be fixed now.

@abchatra It is not fixed, seem like there is a timeout on the server side. This make our build process extremely long due to the 300s timeout * retry every time.

@curlyz can share the repro? Like what extension is failing to compile?


Added Documenter

Added documentation as it was lacking.

Codecov Report

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

:exclamation: Current head bb97b58 differs from pull request most recent head 457be4d. Consider uploading reports for the commit 457be4d to get more accurate results

@@            Coverage Diff            @@
##             master       #7   +/-   ##
=========================================
  Coverage          ?   96.29%
=========================================
  Files             ?        1
  Lines             ?       27
  Branches          ?        0
=========================================
  Hits              ?       26
  Misses            ?        1
  Partials          ?        0

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


chance.color() broken in 1.0.5

Hello, I am receiving the following error after getting the 1.0.5 update:

ReferenceError: chance is not defined
19:15:49       at Chance.hex (node_modules/chance/chance.js:272:24)
19:15:49       at Chance.hex (node_modules/chance/chance.js:1125:27)
19:15:49       at Chance.color (node_modules/chance/chance.js:1177:30)

It appears that the following line assumed a chance variable was globally accessible:
272: var integer = chance.natural({min: options.min, max: options.max});
The fix should be replacing chance.natural with this.integer.

Oof that's not good, will fix ASAP!

This is published on npm as 1.0.6!


Exec schema change and test script updates

This PR introduces a minor schema change for the config JSON for starting up plugins.  Specifically, the configuration and specification of which executor (how the plugin is started -- using os or some other mechanism like Docker) is now better associated with the properties required by the executor.  The JSON also follows the convention of using Properties for arbitrary block of JSON config.

Updated the code for parsing the new schema
Updated the end to end tester (scripts/tutorial-test2) and its config JSON (scripts/tutorial-start-plugins.json) to reflect the schema change.
Updated the tester script (scripts/tutorial-test2) to be the target in make ci and send kill signals to the process group (of plugins) started by the CLI utility infrakit plugin start.  This ensures proper cleanup of the test.  Note that we made this possible by setting the plugin processes to be in the same process group as the CLI utility (see the config JSON for entries with property SamePgID set to true).

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "exec-schema" git@github.com:chungers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353722064
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Current coverage is 65.02% (diff: 100%)

Merging #358 into master will increase coverage by 0.14%

@@             master       #358   diff @@
==========================================
  Files            44         44
  Lines          2110       2110
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1369       1372     +3
+ Misses          599        598     -1
+ Partials        142        140     -2

Powered by Codecov. Last update d13d069...fa4d8ca


fix lnk 200 error on windows when compile as lib

fix lnk 200 error on windows when compile as lib, can not link the source code such as TServerFramework.cpp

I'm phasing out the static visual studio project (that's checked in) for use of cmake generated project files.  That said, this seems to resolve THRIFT-3832 and for the short while the static project is still checked in, this should resolve some issues for folks.


integrateCFPWithThroughputControl

Issue:
When there are a backlogged changes in the monitored container, CFP will keep fetching the changes until getting a 304, then pollDelay will kick in. Due to this behavior, when CFP trying to catch up, it can cause RU increase/throttling to happen.
Solution:
Client side throughput control can be a good fit for the above use case.

Even though by tuning down maxItemCount can potentially slow down the processing speed, but one very common question from customer is that what is the value of the maxItemCount  should be to limit the RU usage etc. Instead of testing and decide the value which may not be the correct value to use later (due to latency change, item size change etc), client throughput control gives a more straightforward way to limit RU usage (Note: Please be aware of the client throughput control constraint)
In Java SDK, priority based throttling is integrated with client throughput control. If customers want the CFP flow to have the least impact to other product workflow on the same container, using lower priority for CFP requests can be good choice

Design
Essentially we want to decide between LocalThroughputControl vs GlobalThroughputControl, or both of them can be a good fit

Local throughput control

Idea
For CFP, usually each instance will only process a subset of the feedRanges. For most of the cases, they do not coordinate work for a certain partition/feedRange, which makes local throughput control a good starting point
Pros & Cons

Pros: Easy to start, no extra throughput control container required

Cons: There are cases that multiple instances will process the same lease for a short period due to load balancing(when the number of instances changes, split happens etc). When this happens, the RU limit for the specific lease feed range will be N * (RUlimit/PkRanges) (N is the number of instances).
Examples:
ThroughputControlGroup config: 100RU
2 Partitions for the container: PK1, PK2
2 CFP Instance to monitor the change
LocalThroughputControl internally will divide the RU equally across all pkRanges

CFP Instance 1 -> Lease 1 -> FeedRange 1(PK1) -> 50RU
CFP Instance 2 -> Lease 2 -> FeedRange 2 (PK2) -> 50RU
Total RU limit: 100RU = configured 100 RU

When multiple instances processing the same lease:
CFP Instance 1 -> Lease 1 -> FeedRange 1(PK1) -> 50RU
CFP Instance 1 -> Lease 2 -> FeedRange 2(PK2) -> 50RU
CFP Instance 2 -> Lease 2 -> FeedRange2 (PK2) -> 50RU
Total RU limit: 150RU > configured 100RU

Special case handling for merge
After Merge, multiple leases can all be mapped to the same pkRanges, without extra handling it, what would happen will be:
ThroughputControlGroup config: 100RU
2 Partitions for the container: PK1, PK2
2 CFP Instance to monitor the change
LocalThroughputControl internally will divide the RU equally across all pkRanges

CFP Instance 1 -> Lease 1 -> FeedRange 1(PK1) -> 50RU
CFP Instance 2 -> Lease 2 -> FeedRange 2 (PK2) -> 50RU
Total RU limit: 100RU = configured 100 RU

After merge:
PK1, PK2 -> PK3
CFP Instance 1 -> Lease 1 -> FeedRange 1(PK3) ->100RU
CFP Instance 2 -> Lease 2 -> FeedRange 2(PK3) ->100RU
Total RU limit: 200RU > configured 100RU

In order to solve the above issues, within the CFP, instead of using the same throughputControlGroup for all lease feed ranges, we are going to create one for each lease feedRange, and the RU limit calculation will be based on:
CFP Instance 1
    -> Lease 1
    -> FeedRange 1(PK3)
    -> `Based on the feedRange find the mapping pkRange`
    -> `based on the pkRange, find out all leases which feed range is included in the pkRange`
    -> `RULimit/TotalMatchingLeaseNumber` (in this case 2 leases)
    -> 50RU

CFP Instance 2
    -> Lease 2
    -> FeedRange 2(PK3)
    -> `Based on the feedRange find the mapping pkRange`
    -> `based on the pkRange, find out all leases which feed range is included in the pkRange`
    -> `RULimit/TotalMatchingLeaseNumber`(in this case 2 leases)
    -> 50RU

Total RU limit:100RU = configured 100RU

Global throughput control

Idea
As discussed above, when there are multiple instances handle the same lease at the same time, local throughput control will not work that well. We will need a way to coordinate the RU usage between the instances, global throughput is designed for this issue.
Pros & Cons

Pros: Will be better at handling cases multiple instances all process the same lease. It will also handle after-merge better.
Cons: Need customer to provision an extra container for global throughput control purpose. For customers this may not be an option.

Special case handling
Instead of use one single global throughput control group, we need to create one throughputControlGroup for each partition key range. Else, what happens will be:
```
ThroughputControlGroup config: 100RU
2 Partitions for the container: PK1, PK2
2 CFP Instance to monitor the change
Global throughput control will divide the RU across all instances, and then for the RU being allocated on each instance, it will be divide equally across all pkRanges

CFP Instance 1
    -> Lease 1
    -> FeedRange 1(PK1)
    -> Since there are 2 instances in the throughput control group, if the load is equal, then instance 1 will allocated 50RU
    -> 50RU/2 Partition
    -> 25RU

CFP Instance 2
    -> Lease 2
    -> FeedRange 2 (PK2)
    ->  Since there are 2 instances in the throughput control group, if the load is equal, then instance 2 will allocated 50RU
    -> 50RU/2 Partition
    -> 25RU
**Result**: Total RU limit:50RU < configured 100RU
```

Changes included:
Based on the above discussion, there are pros & cons for Local/GlobalThroughputControl, this PR starts with localThroughputControl as it provides an easy way for customers to start using throughput control without any extra resource provision.
API change
A new API setFeedPollThroughputControlConfig is being introduced on ChangeFeedProcessorOptions. When it is configured, client throughput control will be used.
Internal Implementation:
FeedRangeThroughputControlConfigManager is being added for both pkVersion lease and epkVersion lease.

PkVersion implementation will be much easier as pkVersion lease does not support for merge, so we do not need to support after-merge. And this is still what majority customers are using today, separate the logic out will make sense. The same throughputControlGroup will be used for all leases(or feedRanges)
EPkVersion implementation will have support for after-merge as well, major around the following part:

EndToEndTests:
Monitored collection config: 50K RU/s, single master multiple read regions, with 10M pre-ingested docs
Tested function: basic changeFeedProcessor with readFromBeginning + default config
Before enabling the throughput control (Avg throughput usage is around 646 RU)

After enabling the throughput control (Avg throughput usage is around 354 RU) - (handleChanges)
   ThroughputControlGroupConfig throughputControlGroupConfig =
            new ThroughputControlGroupConfigBuilder()
                .groupName("cfp")
                .targetThroughput(300)
                .priorityLevel(PriorityLevel.LOW)
                .build();

        ChangeFeedProcessor changeFeedProcessor =
            new ChangeFeedProcessorBuilder()
                .hostName("test")
                .feedContainer(feedContainer)
                .leaseContainer(leaseContainer)
                .handleChanges(docs -> {
                    System.out.println(docs.size());
                })
                .options(
                    new ChangeFeedProcessorOptions()
                        .setFeedPollThroughputControlConfig(throughputControlGroupConfig)
                        .setStartFromBeginning(true)
                )
                .buildChangeFeedProcessor();

After enabling the throughput control (Avg throughput usage is around 354 RU) (4 CFP Instances) - (handleChanges)

After enabling the throughput control(Avg throughput usage is around 389RU)(4 CFP Instances, increased the RU from 50K to 10K) - (handleChanges)

API change check
API changes are not detected in this pull request.

/azp run java - cosmos - tests

/azp run java - cosmos - tests

/azp run java - cosmos - tests


Seccomp path fixes

@thaJeztah @justincormack PTAL

Oh, can you squash some commits (especially the last two)?

last two are honestly unrelated, but there you go, I squashed 1st and 3rd..

LGTM

rebased and pushed again, built was green though so feel free to merge this :angel:


PowerRename needs sorting

Description of the new feature / enhancement
Currently you cannot change how files are sorted. I would like to be able to sort them by name, creation date, etc.
Scenario when this would be used?
I would like to be able to sort a set of files of TV show episodes by creation date so that I can prepend season and episode information, such as S01E01.
Prepending information is not currently possible, but I have another open issue for that (#18628).
Supporting information
No response

Duplicate of #12417

Ah, my bad. I searched for "sort" not "order"

Also, wow, that has got to be the most surprising an unintuitive sorting behavior I can imagine 😅

@crutkas not planned? AKA won't-do?

github has 2 closes "completed" and not planned.  End of day we're marking this as a duplicate of a different issue.  we can do it, just a matter of prioritization

if a community member wants to help, we are happy to accept PRs too


minor optimization in Services call in kube registry

[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[X] Does not have any changes that may affect Istio users.

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
f42699d152133ecfcc13786e4b721670d988396e
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
13a31774e804f203a2b61b2a3f5907d46636668f
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Still some tests are failing. I will take a look.

/retest

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
1f388b5e20a11b2b9ae34bc33cf4ad3777455b99
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-security-k8s-tests_istio
0d78897215c0d487cbf67edbfb5de21b6b530e34
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test integ-security-k8s-tests_istio


[Question] Order of Subscription callback execution

I just have a simple question about the use of subscription objects. Is the order of execution of the callback handlers for subscriptions in the pubsub object guaranteed to be in order?
ie: if I define subscriptions like
def myHandler1():
    ...

def myHandler2():
    ...

r = redis.StrictRedis()
p = r.pubsub()
p.subscribe(**{"myChannel": myHandler1, "myChannel": myHandler2})

When a publish to myChannel is made, are myHandler1 and myHandler2 guaranteed to be called in the order they appear in the dict literal?

Hi @AlexEshoo . This will probably call only one handler, because you assign them in the same dict key. A python dictionary have unique keys.

Woops, my mistake. Is there a way to register multiple call backs against a
single channel (without the use of a wrapper function that calls both)? If
so what would be the order of execution?
On Fri, Mar 15, 2019, 12:01 Konstantinos Tselepakis <
<EMAIL_ADDRESS>wrote:

Hi @AlexEshoo https://github.com/AlexEshoo . This will probably call
only one handler, because you assign them in the same dict key. A python
dictionary have unique keys.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/andymccurdy/redis-py/issues/1151#issuecomment-473343339,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH1fwXfRSeHdkKRLvyK8Ka3brVO-Oi16ks5vW8O-gaJpZM4b2iNo
.

One simple solution would be to define one handler and call handler1 and
handler2 in there.
On Fri, Mar 15, 2019, 6:04 PM Alex Eshoo<EMAIL_ADDRESS>wrote:

Woops, my mistake. Is there a way to register multiple call backs against a
single channel (without the use of a wrapper function that calls both)? If
so what would be the order of execution?
On Fri, Mar 15, 2019, 12:01 Konstantinos Tselepakis <
<EMAIL_ADDRESS>wrote:

Hi @AlexEshoo https://github.com/AlexEshoo . This will probably call
only one handler, because you assign them in the same dict key. A python
dictionary have unique keys.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/andymccurdy/redis-py/issues/1151#issuecomment-473343339
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AH1fwXfRSeHdkKRLvyK8Ka3brVO-Oi16ks5vW8O-gaJpZM4b2iNo
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/andymccurdy/redis-py/issues/1151#issuecomment-473344816,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARUp2vECHamY91H0B_LJRm9IbvvLTArJks5vW8SogaJpZM4b2iNo
.

The current design doesn't offer the ability to register more than one callback per channel. @tselepakis's solution is easy and I would suggest following that advice.

@andymccurdy Thanks, I will implement something similar to that then. You can close this now


Multiple connections?

what is i run the payload on several of my Vms, how to do i listen to them one after the other without loosing connection?

Hello,
At the moment the CHAOS doesn't support multiple connections.
I'll mark it to futures enhancements.

ok thanks

Hi @chithone,
After a long time, CHAOS now have support to multiple connections!! :tada::tada:
Could you try it?!


Scroll Snap Points enabled by default in Fx39+

In Firefox 39+, CSS Scroll Snap Points are enabled by default.

Cool, thanks!


Occasional extremely slow /_changes request

Every few minutes a GET on /_changes is taking in excess of 40,000ms, when typically it takes 2-10ms.
Description
We're running a 2-node couch (v2.3.1) cluster on CentOS-7. We have a daemon running which polls the changes feed once per second, specifying since as the most recent sequence number returned previously. Our write rate is extremely low so in practice this usually returns zero records, and no more than a handful at most. Overall read activity in the cluster is very low also, at sub-10rps for each node.
Typically the /_changes response time is 2-10ms, but every few minutes it rockets up to 10,000-40,000ms. There is no associated uptick in CPU/mem resources.
Behaviour seems very similar to https://github.com/apache/couchdb/issues/1319.
Steps to Reproduce
None besides running cluster in scenario described above.
Expected Behaviour
Fast and stable /_changes response times
Your Environment

CouchDB version used: 2.3.1
Browser name and version: N/A (python requests lib)
Operating system and version: CentOS-7.6.1810

Additional Context

Two databases, but reading changes feed on just one of those ('configs').
Two streaming replications are running on the 'configs' db (inbound and outbound to one other remote cluster).

The distribution of long response times looks a little odd. For example, I see a lot of response times of 10,003-10,005ms, almost as if there's been some sort of timeout at 10,000ms. One node will also tend to hit bad response times more often than the other.
The daemon that hits the /_changes endpoint randomly hits either of the two nodes, as they're behind a reverse proxy. However traffic is balanced, one node is hit as often as the other.
Sample log of long response time:
[notice] 2020-02-28T05:42:34.120799Z<EMAIL_ADDRESS><0.15451.0> 76934fa50d ******:5984 <IP_ADDRESS> admin GET /configs/_changes?feed=continuous&style=all_docs&since=%221065727-g1AAAABWeJzLYWBgYMxgTmEQTs4vTc5ISXIwNNAz1zMz1TM0MswBSjIlMuSxMPwHgqwM5iQGAaf_uUBRdvMkQ0vDRDPs-rIAuoQWpw%22&timeout=10000 200 ok 16978

I've just tried deleting the streaming replication jobs, and this appears to solve the problem. However, we need replication!
There is only a small amount of replication traffic though. Every few minutes there's a monitoring process that writes a test doc and checks to see if it successfully replicates to each remote cluster. We're only talking a handful of documents within a minute or two.

I've found further info digging into the logs more.
The problematic _changes requests all come from one of the cluster nodes, which is hitting the other node's _changes endpoint. The situation is as shown below:
 /----\
 |    |
 |    (bad-resp-times)
 |    |
 |    v
couch01-----(bad-resp-times)------>couch02
^                                    ^
|                                    |
|                                    |
(good-resp-times)                    (good-resp-times)
|                                    |
|                                    |
webservice---------------------------/

Note also that couch01 has bad _changes response times too, with requests from its own IP.
What I'm wondering is:

Why the bad response times only with requests from couch01?
Why does couch01 hit couch02 at all (is this an expected part of cluster operation? Is it related to replication?)
Why doesn't couch02 hit couch01?
Why is couch01 requesting changes feed from itself?

Thx
Allan

[notice] 2020-02-28T05:42:34.120799Z<EMAIL_ADDRESS><0.15451.0> 76934fa50d ******:5984 <IP_ADDRESS> admin GET /configs/_changes?feed=continuous&style=all_docs&since=%221065727-g1AAAABWeJzLYWBgYMxgTmEQTs4vTc5ISXIwNNAz1zMz1TM0MswBSjIlMuSxMPwHgqwM5iQGAaf_uUBRdvMkQ0vDRDPs-rIAuoQWpw%22&timeout=10000 200 ok 16978

The distribution of long response times looks a little odd. For example, I see a lot of response times of 10,003-10,005ms, almost as if there's been some sort of timeout at 10,000ms

Exactly. There is a timeout. What the timeout means is that as long there are changes on the source, it will stream them. There could be say 100M documents and they should all stream out. Then, after they are all done and the stream is all caught up, it will sleep / wait for 10 more seconds to see if there would be more changes coming. Then if there are no more changes, the feed will timeout and stop. The replicator will then start a new request from the last update sequence.
That timeout is part of the normal replication protocol.  When I measure requests latency for example I always exclude _changes feeds as they have these long running connections that skew the results.
That timeout parameter is also derived from a setting you can configure:
https://docs.couchdb.org/en/stable/config/replicator.html#replicator/connection_timeout
And it is connection_timeout / 3. If you know you only replicate locally, you can set that value to something lower. So example if it is set to 6000 (msec), then the timeout in the _changes requests will be 2000 msec which is 2 seconds. However that also means that idle replication will continuously restart their requests every 2 seconds which doesn't seem that great but if you want that it's something you can configure.

Ah ok, well all is good if this is to be expected.
However, is there any way I can remove the effect of _changes from the avg response times stats returned on _stats? This is throwing things off and it's why I noticed this in the first place; I'd really like to have response times stats for typical requests only.

However, is there any way I can remove the effect of _changes from the avg response times stats

I was just doing in when monitoring the external (3rd party proxy) logs not anything in the core CouchDB code. So when building latency histograms I would say something like "exclude _changes API calls" as an extra step.
I think the original question was answered. Should we close the, issue, what do to you think?


No module named 'staking_deposit' (python 3.10)

When using python 3.10 (default on ubuntu 22.04) it throws the ModuleNotFoundError: No module named 'staking_deposit'
Simply removing the staking_deposit. prefix from every import resolves the problem, expect a pr soon.

 Everything is ok!


Replaced env() with config() in a code sample for LiveReload doc

... because env() is not available when the config is cached.
Used the following command to cache the config:
php artisan config:cache

I'll resolve conflicts.


[unstable option] match_arm_blocks

Tracking issue for unstable option: match_arm_blocks

With the following configuration I can get rustfmt to produce errors:
control_brace_style = 'AlwaysNextLine'
match_arm_blocks = false

It says:

error[internal]: left behind trailing whitespace

The lines it refers to are these:
MatchWhen::HasAll(required_values) =>

	required_values.len() == 1 && required_values.contains(value),

It seems like it leaves a blank line in-between the arm and the expression that's causing the error. I believe it wants to do this:
MatchWhen::HasAll(required_values) =>
	required_values.len() == 1 && required_values.contains(value),

Changing either setting from the sampled TOML config will fix the issue.

Would it be possible to also support Preserve for match_arm_blocks? I think that would be very useful. :)

Would it be possible to also support Preserve for match_arm_blocks? I think that would be very useful. :)

Sounds quite reasonable to me. We added support for the same on closure bodies fairly recently and of course have opt-in support for preservation of leading pipes on arms so feels rational to support the same here.
At first blush it seems like it should be feasible as well, so I'll open a separate issue later with some implementation pointers and considerations for anyone interested in working on it

With the following configuration I can get rustfmt to produce errors:

@Iron-E - apologies I missed your post. Could you do me a favor whenever you get a chance and open a new issue with a complete and minimal snippet to reproduce?

Another possibly reasonable value for match_arm_blocks might be Force, which makes all arm always have a block. I am not sure if this is ever suited "globally", but there are some matches where I think this is better than deciding on a per-arm basis -- so together with https://github.com/rust-lang/rustfmt/issues/4843 this could be really useful for match formatting.
That said, Force can (hopefully) be emulated with Preserve by just manually putting each arm between braces.

With the following configuration I can get rustfmt to produce errors:

@Iron-E - apologies I missed your post. Could you do me a favor whenever you get a chance and open a new issue with a complete and minimal snippet to reproduce?

I opened #4844 with a minimal reproduction :+1:

In general I really like this option set to false but when the line above is already indented due to it being too long it's probably best to add the branckets (or not add the newline):
NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski))
    if node_key_type == NodeKeyType::Ed25519 && &sk[..] == ski.as_ref() =>
    Ok(()),

versus
NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski))
    if node_key_type == NodeKeyType::Ed25519 && &sk[..] == ski.as_ref() =>
{
    Ok(())
},

Can you see why I feel a little uncomfortable about match_arm_blocks=false in these situations?

Yeah I agree, having braces is strictly better in that case @gilescope.

I feel one more indent would look better, while taking up less space:
    if node_key_type == NodeKeyType::Ed25519 && &sk[..] == ski.as_ref() =>
      Ok(()),

It also adheres to match_arm_blocks being false.

In general I really like this option set to false but when the line above is already indented due to it being too long it's probably best to add the branckets (or not add the newline):

This is more a reflection of a bug in the option that didn't consider the scenario. The currently produced formatting is operating under the assumption of the extra line breaks from the brackets which is why the body isn't indented from the guard (as per the Style Guide prescriptions).
We do need to change something here but I don't want to get into a situation where the boolean match_arm_blocks needs a bunch of "well, unless" clauses.
Given the fairly narrow use case the option applies to (non-block required body whose first line can't fit on the same line as the operator) I'd be much more inclined to apply the same indent to the body as the line of the => operator to be consistent with how the rule works in all other scenarios, as @Iron-E suggested above
For cases where folks want more flexibility/control over the braces I think the upcoming Preserve variant for the new option that'll replace match_arm_blocks (refs #4896) would be a better approach

In general I really like this option set to false but when the line above is already indented due to it being too long it's probably best to add the branckets (or not add the newline):
NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski))
    if node_key_type == NodeKeyType::Ed25519 && &sk[..] == ski.as_ref() =>
    Ok(()),

versus
NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski))
    if node_key_type == NodeKeyType::Ed25519 && &sk[..] == ski.as_ref() =>
{
    Ok(())
},

Can you see why I feel a little uncomfortable about match_arm_blocks=false in these situations?

Agree too.


Add .mailmap to the root of the repository

So that:

git log and similar commands stop displaying "Jenkins user " for release commits from back when Jenkins was incorrectly configured, and just display "Hibernate-CI<EMAIL_ADDRESS>instead.
git shortlog correctly groups together commits of people who committed with multiple names (e.g. Sanne Grinovero vs. Sanne.Grinovero).

See https://git-scm.com/docs/gitmailmap

Note this won't work in IDEA though:

https://youtrack.jetbrains.com/issue/IDEA-160677
https://youtrack.jetbrains.com/issue/IDEA-121066


rewrite

you can add a function to rewrite the code. it help user to understand and improve there coding skills

Hello @mahmoonakhan ,
Thank you for your suggestion.
We will surely look at it when we will start to add more features to this website. It looks like a nice idea.
Best Regards,
Jon


Solve gigasecond

I see that you have two pull requests for gigasecond, and you closed both of them. Were they accidental? Can I help out with anything?

Hi Katrina
Thanks for your concern and offering to help. My friend was showing me how
to use github and we accidently made pull requests on the main branch. We
weren't trying to mess around wit the main branch. I forked the whole
exorcism so I can add him as a contributor and then make my own branches
and create pull requests on those so he can see my code and help me. I hope
that makes sense. I'm new so I don't know all the lingo yet.
Durrell
On Tue, Jan 13, 2015 at 6:18 AM, Katrina Owen<EMAIL_ADDRESS>wrote:

I see that you have two pull requests for gigasecond, and you closed both
of them. Were they accidental? Can I help out with anything?
—
Reply to this email directly or view it on GitHub
https://github.com/exercism/xruby/pull/73#issuecomment-69749912.

That's cool, just wanted to make sure you're OK. Welcome to git, github and open source :)


Incorrect documentation for updateUserPassword

The documentation states that to update a user's password you should call the method updateUserPassword.  However, the method is actually called updatePassword.
Happy to submit a PR.  Should I correct the documentation, or update the name of the method?
The other update methods seems to follow the updateUserXXX convention...

Yes, please submit a PR.

https://github.com/fullstackreact/react-native-firestack/issues/118

Tracking on #118


Infinite recursion when calendar-data is not present in the body, and the server responds with error code 500.

I have a server that sometimes responds with an error 500 when the user is not authenticated. When that occurs, caldav recurses indefinitely.
https://github.com/python-caldav/caldav/blob/e60f3fa3bb903b97add0737ecb1a4ddc35c1e29c/caldav/objects.py#L203-L211
In my case, replace does nothing because there is no calendar-data in the request.
A quick solution would be to check that the current fix for issue #309 is applicable to the content of the query (but there might be a better way to do it).
if ret.status == 500 and not b"getetag" in body and b"<C:calendar-data/>" in body:
    body = body.replace(
        b"<C:calendar-data/>", b"<D:getetag/><C:calendar-data/>"
    )
    return self._query(
        body, depth, query_method, url, expected_return_value
    )

Oh, good catch and I think this is a good proposal.  Would you care massaging it into a pull-request?

It should be done, please feel free to change the branch (or anything else) as you see fit.

Those compatibility-tweaks are always tricky, tweaks that may help some server implementations sometimes causes new issues with other server implementations.  In this case though I obviously managed to introduce a bug.


Load the image-to-text model when opening the pdf viewer in Firefox (bug 1908938)

/botio integrationtest


defineComponent mixins  merge data failed,  component data  is overwritten

Version
3.0.0-rc.5
Reproduction link
http://xxx
Steps to reproduce
// mixin
import { defineComponent } from "vue";
export default defineComponent(
{
data() {
return {
page: 0, // 页码
}
}
});
// component
import { defineComponent } from "vue";
export default defineComponent(
{
data() {
return {
page: 2, // 页码
}
}
});
What is expected?
page is 2  in component
What is actually happening?
page is 0 in component

Open a new issue with a valid repro. Thank you


[webview_flutter] Added Geolocation support

Description
Enables Webview Geolocation support on Android devices. Currently lacking documentation and Geolocation Database is not enabled (FlutterWebView.java, Line 124)
User has to set relevant permissions (on Android it's ACCESS_FINE_LOCATION. or ACCESS_COARSE_LOCATION)
Related Issues
Related: https://github.com/flutter/flutter/issues/30582#issuecomment-480517336
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] All existing and new tests are passing.
[x] I am willing to follow-up on review comments in a timely manner.
[x] I read and followed the Flutter Style Guide.
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I updated CHANGELOG.md to add a description of the change.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[ ] I updated/added relevant documentation (doc comments with ///).

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[x] No, this is not a breaking change.
[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).

I signed it!

Test drive with:
Scaffold(
        appBar: AppBar(
          // Here we take the value from the MyHomePage object that was created by
          // the App.build method, and use it to set our appbar title.
          title: Text(widget.title),
        ),
        body: Center(
            // Center is a layout widget. It takes a single child and positions it
            // in the middle of the parent.
            child: WebView(
          initialUrl: "https://leafletjs.com/examples/mobile/example.html",
          javascriptMode: JavascriptMode.unrestricted,
          geolocationMode: GeolocationMode.enabled,
        )),
        floatingActionButton: FloatingActionButton(
          onPressed: () {},
          tooltip: 'Get Current Location',
          child: Icon(Icons.location_on),
        ));

@amirh the permissions prompt does not really work right now. Geolocation works if location has already been enabled.

@amirh?

Any update on this?

Dunno, ask @amirh

i have done the changes in these both files but still webview is not getting location and yes i am handling the user location permission on startup of my app so not permission issuse.. can you help me out to achieve this.
(Note : i think _WebSettings is now WebSettings in another file so i made changes accordingly)
Thanks in advance

Are you sure you are using the edited copy of the library? Add a printline somewhere and see if you can see it in logs.

Thanks For Your Quick Reply : Yes, i am sure i am using the modified one because i can see the modified file in flutter debuging Tool..
Can You Please have look at my file and help me to achieve it Thanks again !
i am attaching my Files maybe i have done something wrong.
ModifiedWebviewFiles.zip

I don't think it is a good idea to use the webview geolocation api. You get these Browser alert dialogs with limited influence on what to show in there. And it just looks strange.
A better way is to make use of flutters geolocator plugin.
I've created a widget that takes care of all that.
And a demo project that works on Android and iOS
https://github.com/tlueder/flutter_example_webview_geolocator

This advance webview plugin - https://pub.dev/packages/flutter_inappwebview has the feature of the geo location in-built. You could use its' androidOnGeolocationPermissionsShowPrompt property to enable it. Implementation- https://github.com/pichillilorenzo/flutter_inappwebview/issues/491#issuecomment-675668165

I'm going to close the PR because the CLA is not signed. Feel free to ping me when the CLA is signed and I'll re-open the PR. Or you can open a new PR after signing the CLA.

I'm going to close the PR because the CLA is not signed. Feel free to ping me when the CLA is signed and I'll re-open the PR. Or you can open a new PR after signing the CLA.


file extensions fixed plus a minor gas optimisation.

@cy4n1d3-p1x3l  solve the merge conflicts. Do it without deleting this time.


Write cypress test for login flow

To get started, read through this document to get more information on how Cypress is used in Bloom.
Once you feel comfortable with Cypress and have created an example e2e test as outlined in the Cypress guides, please ping the team to get more information on how to write this ticket :)

As an update to this ticket.
The login flow is:

Hit the home page
Click on 'log in' in the nav bar.
Type in email address and password
Click log in
You should then arrive at the courses page
Note that the cypress tests works against staging so stubbing the request might not work (can't think off the top of my head whether it will). You might need to create a user in staging to get the login flow to work.
Let me know if you have any questions.


Hack fix to skip messages that have been locked/archived

This is a simple and temporary fix to skip the messages that are in a locked/archived channel or thread as currently the version on the main branch just gets stuck. I saw a PR with a fix but I decided to slap my own together quickly to get the benefits of 5.1.1 as the PR was on an outdated 5.0.3 build.

Does this fix still exist? Would be useful.


How to Register Plugin to use tags option to filter tests

Below are the separate plugin methods from docs, how to register it as use it .
Plugin file - browserify
`import * as browserify from "@cypress/browserify-preprocessor";
import { preprocessor } from "@badeball/cypress-cucumber-preprocessor/browserify";
export default (
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
): void => {
on(
"file:preprocessor",
preprocessor(config, {
...browserify.defaultOptions,
typescript: require.resolve("typescript"),
})
);
};`
Tag - Plugin
`import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
export default async (
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
): Promise<Cypress.PluginConfigOptions> => {
await addCucumberPreprocessorPlugin(on, config);
// Make sure to return the config object as it might have been modified by the plugin.
return config;
}`

I've updated all examples in d102a4b39d7944110ce8e1e2702814f74528fe91, check them out.


?????

Is this package maintaining?
@Kiarash-Z tel us if you don't have a plan to maintain this package

The repository owner hasn't had any activity in the past two years. So, I think he won't maintain the package anymore.


dioxus-desktop(Update-dep): tauri 0.19.x

Sorry - can you format this branch so checks pass?

@jkelleyrtp done

@jkelleyrtp oh my, sorry i'm online on github mobile right now so i can't cargo fmt directly. it's the last fixing, hopefully everything will be fixed thank you


LDAP Login fails when user has multiple mail attributes

Hi Team,
I'm doing some tests with Wekan on openshift, with LDAP Auth.
Login with a user with a single "mail" attribute works. Login with a user with multiple "mail" attributes doesn't.
Log :
[INFO] Init LDAP login "pcurie"
[WARN] Lookup for unset variable: INTERNAL_LOG_LEVEL
[INFO] Init setup
[INFO] Connecting "ldap://<IP_ADDRESS>:389"
[DEBUG] connectionOptions{ url: 'ldap://<IP_ADDRESS>:389',
  timeout: 10000,
  connectTimeout: 10000,
  idleTimeout: 10000,
  reconnect: true,
  log:
   Logger {
     domain: null,
     _events: {},
     _eventsCount: 0,
     _maxListeners: undefined,
     _level: 30,
     streams: [ [Object] ],
     serializers: null,
     src: false,
     fields:
      { name: 'ldapjs',
        component: 'client',
        hostname: 'wekan-14-b6slr',
        pid: 1 } } }
[INFO] LDAP connected
[INFO] Binding UserDN "uid=svc-wekan,cn=sysaccounts,cn=etc,dc=acme,dc=org"
[INFO] Searching user "pcurie"
[DEBUG] searchOptions {
  "filter": "(&(uid=pcurie))",
  "scope": "sub",
  "sizeLimit": 0
}
[DEBUG] BaseDN "cn=users,cn=accounts,dc=acme,dc=org"
[INFO] Search result count 1
[INFO] Authenticating "uid=pcurie,cn=users,cn=accounts,dc=acme,dc=org"
[INFO] Authenticated "uid=pcurie,cn=users,cn=accounts,dc=acme,dc=org"
[DEBUG] Identifying user with: uid
[INFO] Querying user
[DEBUG] userQuery {
  "services.ldap.id": "706175637572"
}
[DEBUG] userQuery {
  "username": "pcurie"
}
[INFO] User does not exist, creating "pcurie"
[DEBUG] Identifying user with: uid
[DEBUG] Mapping field cn -> name
[DEBUG] user.name changed to: Paul CURIE
[DEBUG] Mapping field mail -> email
[DEBUG] Identifying user with: uid
[DEBUG] New user data {
  "username": "pcurie",
  "email": {
    "type": "Buffer",
    "data": [
      112,
      97,
      117,
      99,
      117,
      114,
      64,
      119,
      111,
      114,
      116,
      101,
      107,
      115,
      46,
      99,
      111,
      109
    ]
  }
}
[ERROR] Error creating user {
  "message": "Match error: Expected string, got object in field email",
  "path": "email",
  "sanitizedError": {
    "isClientSafe": true,
    "error": 400,
    "reason": "Match failed",
    "message": "Match failed [400]",
    "errorType": "Meteor.Error"
  },
  "errorType": "Match.Error"
}
Exception while invoking method 'login' Error: Match error: Expected string, got object in field email
    at exports.check (packages/check.js:55:15)
    at createUser (packages/accounts-password/password_server.js:1028:3)
    at AccountsServer.Accounts.createUser (packages/accounts-password/password_server.js:1123:10)
    at addLdapUser (packages/wekan:wekan-ldap/server/sync.js:277:31)
    at DDPCommon.MethodInvocation.<anonymous> (packages/wekan:wekan-ldap/server/loginHandler.js:159:18)
    at packages/accounts-base/accounts_server.js:468:32
    at tryLoginMethod (packages/accounts-base/accounts_server.js:245:14)
    at AccountsServer.Ap._runLoginHandlers (packages/accounts-base/accounts_server.js:465:18)
    at DDPCommon.MethodInvocation.methods.login (packages/accounts-base/accounts_server.js:528:27)
    at packages/check.js:128:16
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Object._failIfArgumentsAreNotAllChecked (packages/check.js:127:41)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
    at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
Sanitized and reported to the client as: Match failed [400]

[INFO] Idle
[INFO] Disconecting
[INFO] Closed

Thank you

As a work-around, you can remove "LDAP_EMAIL_FIELD" variable from your env, and wekan let you login.

Interesting - is that the only change you made to get it working?
I can't see how removing the environment variable fixes the issue.

Indeed, sorry I wasn't careful enough in my tests.
What actually made it work was setting "LDAP_SYNC_USER_DATA_FIELDMAP" from {"displayName":"name","mail":"email"} to {"displayName":"name"}.
So it seems related to sync fonctions.

Yes, that makes sense considering it will no longer attempt to sync email address.
Out of interest, could you expand a bit on the multiple mail attributes? Do you have multiple attributes for the user with the same name (i.e. more than one "email" attribute) or is it a multi valued attribute?
Seeing an example LDAP user entry would be helpful.

It is multi-valued attribute, in ldif format it would look like :
mail<EMAIL_ADDRESS>mail<EMAIL_ADDRESS>


Remove jre redists

Upon discussion on chat, removing jre redists from the source tree as well as git history (for that reason too there are 880 commits in this PR). Major change. Proceed cautiously

Uh oh, something went wrong with the build. Need to check on that

I was wondering why Jenkins crashed trying to load the DS PR job - found clues in its log that this was the culprit, hehe.
While we should get this done it is probably the rare thing where we'd not want to use a PR at all, but instead do the necessary Git surgery locally then force push it to overwrite the target branch. Which is scary even on a good day.
This will naturally also break every outstanding PR so we should try to get as many of them merged or closed first :-)

Done. Thanks for the idea :)


InfluxDBClient has no close() function as the documentation suggests.

Trying to use the InfluxDBClient.close() function as referenced http://influxdb-python.readthedocs.io/en/latest/api-documentation.html#influxdb.InfluxDBClient.close.
I have printed the directory of InfluxDBClient which doesn't list close and you can see the error when trying to use this function.

The close class method was added in 5.0.0, see commit 87683f41.


unable to set breakpoint in spec.ts code for debugging

I'm using angular2 cli and am following the test debugging instructions in the official documentation. I'm able to search for the spec.ts source files which are in the app folder and set break points. However, I'm not able to do the same for the test files for components in other folder. The tests do run but I'm not able to find the source file in the chrome browser. Shall I edit some config file? I've tried to add the source files manually to the source in chrome but that doesn't help in setting the breakpoint. Any help is very much appreciated.

Looks like this should be resolved with PR #6862 but I will leave this open for @filipesilva to confirm.

@skk2142 Are you trying to set breakpoint in one of the libraries in your node_modules? If so it's probably not supported, because CLI currently ignores source maps for third-party libraries.

There are currently some bugs with app sourcemaps in ng test that https://github.com/angular/angular-cli/pull/6862 and https://github.com/angular/angular-cli/pull/6968 should address, but as @devoto13 mentioned we don't offer sourcemap support for files in node_modules. There is a feature request for that in https://github.com/angular/angular-cli/issues/5477.


Delete src/transit_equity/geospatial/hex_to_shapely.py

I guess this file was added by mistake while renaming the original file.

@hayesrebecca


Manage structure level as models

Manage the users structure level as a model. This includes:
List views, filter view, search vallue selection for user models, user <-> level relations.
This will imply changes to the backend.

Waiting for OpenSlides/openslides-backend#1126

done


Hide switch in homekit

Hi,
is there an option to hide a switch in homekit but still keep it in the config.json ?
I created a bunch of "test" switches and I want to keep them in the config.json for reference but I don't want to see them in the home app.
Any option like "visible: false"  for the switches ?
thanks a lot.
Homebridge rocks !

+1

What I usually do is create a different room and put them in there, just make sure you turn off the "include in favorites" on each one so they don't show up on the main page in the Home app.

I have 12 rooms in HomeKit and about 70pcs of accessories. Want rather "visible: false" :D

Here you go:
https://github.com/lprhodes/homebridge-broadlink-rm/releases/tag/3.5.11


[chart/redis-ha][BUG] redis_exporter does not trust the redis server in TLS mode

Describe the bug
When TLS is enabled on redis, the redis_exporter cannot connect to the redis server.
This is because the redis_exporter does not receive the redis server CA, so it cannot validate the server's certificate.
To Reproduce
We rolled out the helm chart with
redis:
  port: 0
  tlsPort: 6379
  tlsReplication: true
sentinel:
  port: 0
  tlsPort: 26379
  tlsReplication: true
exporter:
  enabled: true
  sslEnabled: true
tls:
  secretName: mysecret-tls
  certFile: tls.crt
  keyFile: tls.key
  caCertFile: ca.crt

and found the following redis_exporter debug logs (I manually set it to debug mode with REDIS_EXPORTER_DEBUG: "true")
level=debug msg="Trying DialURL(): rediss://localhost:6379"
level=debug msg="DialURL() failed, err: x509: certificate signed by unknown authority"
level=debug msg="Trying: Dial(): rediss localhost:6379"
level=error msg="Couldn't connect to redis instance"
level=debug msg="connectToRedis( rediss://localhost:6379 ) err: dial rediss: unknown network rediss"
level=debug msg="scrapeRedisHost() done"

Expected behavior
The redis_exporter can connect to a redis server in TLS mode.
Additional context
Adding
- name: REDIS_EXPORTER_TLS_CA_CERT_FILE
  value: /tls-certs/{{ .Values.tls.caCertFile }}```

to the redis HA statefulset node_exporter's environment fixed the issue for me.
As per the node_exporter documentation, this allows it to verify the server:
level=debug msg="Trying DialURL(): rediss://localhost:6379"
level=debug msg="connected to: rediss://localhost:6379"
level=debug msg="connecting took 0.123456 seconds"
[...]

Thank you for the PR! Merged and closing this as it is now fixed in the latest version of the chart.


Training your network on Hpatch Benchmark and eveluate on it?

Do I misunderstand the concept of over-fitting?

Adam optimizer with lr at 0.1 and 10

Why don't you write a Table Search then you could get a perfect matching score


testing doc-builder

testing https://github.com/huggingface/doc-builder/pull/498

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Extension Error

Hi Sir,
The extension with error "This page didn't load Google Maps correctly. See the JavaScript console for technical details". Any solution to solve this problem?
Thanks.
Best Regards.

Hello,
I think it is all about API key and MissingKeyMapError. To solve this error, somebody must add API key frm item.
https://churchthemes.com/2016/07/15/page-didnt-load-google-maps-correctly/#MissingKeyMapError
Have a nice day.

Check v1.2.1. I added a possibility to specify your Google Maps API Key. This is now a request even for the standard plan. Tutorial and help within the extension should be self explanatory to help you get back on track.


"Categories" Dropdown Missing

Describe your actions
Deleted all default categories, added my own in admin panel.
Expected behavior
My custom categories should appear on the homepage.

Chrome 80.0.3987.132
OC <IP_ADDRESS>

Forgot to check "Top" checkbox.


Autowiring for constructors with not required parameters

When service definition passes more arguments than required at constructor

Undefined offset: 3
/home/dev/projects/DefaultAutowire/src/DependencyInjection/Compiler/TurnOnAutowireCompilerPass.php:113

Thanks for reporting. Could you add service registration and the constructor, please?

 public function __construct(SomeService $someService, EventDispatcherInterface $eventDispatcher, $a = 1, $b = 2)
    {
        $this->someService = $someService;
        $this->eventDispatcher = $eventDispatcher;
        $this->a = $a;
        $this->b = $b;
    }

    some_autowired_service:
        class: Symplify\DefaultAutowire\Tests\Source\SomeAutowiredService
        arguments:
            - '@some_service'
            - '@event_dispatcher'
            - 1

Much better, thank you! Would you be able to add failing test with this service?
You could speed up the whole process and I would be able to fix this issue during the weekend then.

Fixed and released 1.0.1, thank you


Regeneration of clients using new paths

Regeneration of clients using new generated code location

Issue #, if available: 1888
Description of changes:
Run generation using the previous PR changes, now generated code goes to the generated directory.
Check all that applies:

[x] Did a review by yourself.
[ ] Added proper tests to cover this PR. (If tests are not applicable, explain.)
No test added, run it manually and validated it installed files in same place as before.
[x] Checked if this PR is a breaking (APIs have been changed) change.
[x] Checked if this PR will not introduce cross-platform inconsistent behavior.
[x] Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

[x] Linux
[ ] Windows
[ ] Android
[ ] MacOS
[ ] IOS
[ ] Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Approved. Looks good. (Unable to load review page).


standardize test project naming

all test project are named with lower-case with underscore
change TestExample to example
change OpenJDK_Playlist to openjdk_regression
update old directory references to new directory name

Signed-off-by: Tianyu Zuo<EMAIL_ADDRESS>

Reviewer: @ShelleyLambert
Reviewer: @sophia-guo
As discussed, change OpenJDK_Playlist to openjdk_regression and change TestExample to example. Also changed Utils to utils.
One doubt is that if we also need to chagne Build to build, which would suite our naming standard.

add to whitelist

Changed Build to buildenv to match the openj9 convention, also created issue https://github.com/AdoptOpenJDK/openjdk-tests/issues/106 to have a history to update the Jenkins test jobs' configurations.
PR is ready for another review.

What is here looks good, I added a comment on #106, to co-ordinate the changes of rename of buildenv with changes to Jenkinsfiles to avoid downtime of working builds.  (so 2 choices, include them in this PR, or wait and change buildenv in later PR with Jenkinfile changes)

Please make sure to update all related test build configuration.


Create Whack-A-Mole-Game

Issue No: #387

I have put all the files in One folder.Please look into this @swapnilsparsh

@codersmiti Thank you for your contribution. Looking forward to more such amazing contributions 🥂


import locales from wiki into gem

#833

Can you change es translation with content at top instead of your comment? I updated a new revision based on your comment, but removing references to encuesta (poll) because I think that isn't a generic translations, text in gem should refer to generic invitation, not specific use cas as polls. I don't know if other translations are generic, or specific like madale translation you picked, because I don't know those languages, but spanish should be fixed in this PR.

indeed. updated so that it is inline with the es.yml wiki top

💯


Add training/inference using OpenMeteo Open Dataset

OpenMeteo provides a newish public archive of multiple different NWP providers globally, see https://github.com/open-meteo/open-data for more on it. It is designed for more site-level access to the data, so seems like it would fit very well with Open Quartz Solar forecasting. The data is generally available from December 2023 to now.
Detailed Description
This would include adding a model training or inference script to pull from the OpenMeteo dataset.
Context
It could make it easier for more historical forecasts to be ran, as the archive gets larger. And easier to see how different providers might make a difference in the forecasting models here.

@jacobbieker, can I take this one?

Sure!

Thank you @jacobbieker, i am currently working on another issue, after completing that, I will start working on it soon.

Is the archive free?

Is the archive free?

Yep, its part of the AWS Open Data program, so completely free to access and use.

@jacobbieker, Could you provide guidance on whether our strategy with the OpenMeteo dataset leans towards training the model with the data or developing scripts for inference testing?

For the open quartz forecast, I think the first step would be for inference testing. In the future, it would be nice to be able to train on it though

@jacobbieker, could I please work on this if this is still open? Thank you so much!


MpiStep: Requirement not set

Package Name: azureml.pipeline
Package Version: 1.33.0
Operating System: Windows 10
Python Version: 3.7.4

Describe the bug
When I try to create a pipeline which includes an MpiStep, I get the following error, even though all these parameters are set:
ValueError: One of the requirement parameters (name, source_directory, script_name, arguments, compute_target, node_count, process_count_per_node) is not set
When I look through it with the debugger, it seems that the MpiStep __init__ is called a second time and is missing node_count and process_count_per_node, even though I pass these correctly the first time.
To Reproduce
Steps to reproduce the behavior:

Create an MpiStep
Add it to a Pipeline
Submit the Pipeline

Expected behavior
The Pipeline to be submitted successfully allowing me to train a network distributed across workers
Additional context
I am aware that there is a new ParallelRunStep, however this seems to be geared at parallel inference rather than distributed training (using Tensorflow's MultiWorkerMirroredStrategy, in my case).

@davystrong thanks for your feedback! Directing this to the right people.

Hello @davystrong Apologies for the delayed response. I see that this issue is opened a long time ago and no further activity had taken place. So wanted to check if you are still looking for assistance on this query? Please let us know.

Hello @SatishBoddu-MSFT. Since this didn't work, I have been working on other things. So, at the moment, I don't need this but I would like to get back to it again in future. It seems like an actual bug in the SDK as I don't think I was doing anything unusual.

Thanks for the update. I will close it. And please feel free to open a new one if you see it again.


Declared type is never respected using extensions in dart 3.

When declaring a type like:
AbstractType foo = ConcreteImplementation();
The AbstractType type is expected to be respected. This is a common feature in all existing languages, and the default behavior of dart before version 3.
Currently, this behavior is partially respected, within the classes where it is used, but it is definitely never respected using extensions.
We can verify this with the following example. What do we expect to be printed?
'Instance of Black'
What is printed? Nothing, because before executing this code we got an error:
 Exception has occurred.
_TypeError (type 'Black' is not a subtype of type 'White' of 'value')

Example:
void main() {
  final Wrapper<TestColor> theme = White().transform();
  theme.value = Black();

  print(theme.value);
}

sealed class TestColor {
  String get name => switch (this) {
        White() => 'white',
        Black() => 'black',
      };
}

class White extends TestColor {}

class Black extends TestColor {}

extension ThemeTransform<T> on T {
  Wrapper<T> transform() => Wrapper<T>(this);
}

class Wrapper<T> {
  T value;
  Wrapper(this.value);
}

Here is similar Flutter code, which shows the difference between using types within the class it will be used in, and in extensions. The second button works, the first triggers an error.
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

sealed class TestColor {
  String get name => switch (this) {
        White() => 'white',
        Black() => 'black',
      };
}

class White extends TestColor {}

class Black extends TestColor {}

extension ValueNotifierExt<T> on T {
  /// Returns a `ValueNotifier` instance with [this] `T` as initial value.
  ValueNotifier<T> notifier() => ValueNotifier<T>(this);
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  TestColor stateColor = White();
  final ValueNotifier<TestColor> value = White().notifier();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ValueListenableBuilder(
              valueListenable: value,
              builder: (context, value, child) => Text(
                value.name,
              ),
            ),
            FilledButton(
              // Error: type 'Black' is not a subtype of type 'White' of 'val'
              onPressed: () {
                switch (value.value) {
                  case White():
                    value.value = Black();
                  case Black():
                    value.value = White();
                }
              },
              child: const Text(
                'ValueNotifier Color',
              ),
            ),
            const SizedBox(height: 40),
            Text(stateColor.name),
            FilledButton(
              // Works well
              onPressed: () {
                switch (stateColor) {
                  case White():
                    setState(() {
                      stateColor = Black();
                    });
                  case Black():
                    setState(() {
                      stateColor = White();
                    });
                }
              },
              child: const Text(
                'StateChange Color',
              ),
            ),
          ],
        ),
      ),
    );
  }
}

This is working as intended, but there are a few steps in this process. Consider this variant:
void main() {
  final Wrapper<TestColor> theme = (White() as TestColor).transform();
  theme.value = Black();

  print(theme.value);
}

// Other declarations unchanged.

This variant compiles and runs without any errors. The underlying issue here is dynamically checked covariance: In the original program we have the following:

White().transform() is an extension method invocation where the value of the type parameter T is determined by inspecting the static type of the receiver. This receiver has type White and hence T is White. So we will create a Wrapper<White> and use that to initialize theme.
An important property of the previous step is that theme has static type Wrapper<TestColor> and dynamic type Wrapper<White>. In other words, the typing of theme relies on the fact that the type parameter of Wrapper is covariant. If it had had any other variance (e.g., if it had been invariant) then Wrapper<White> would not have been a subtype of Wrapper<TestColor>, and in that case we would have had a compile-time error at the declaration of theme.
Covariance in dart is subject to run-time checks in the situations where the compile-time checks are insufficient to ensure type safety. In particular, there's a run-time check when we execute theme.value = Black(). The check tries to confirm that the type argument of Wrapper in the type of theme is a supertype of Black (that's required in order to perform this assignment). This isn't true, so the test fails, and we get a dynamic error.

There are many situations where the covariant typing is avoided because type inference in Dart gives priority to the context type. For instance, if we declare List<num> xs = [1, 2]; then type inference will turn [1, 2] into <num>[1, 2] (rather than <int>[1, 2] which would have been OK for the given elements). This is very helpful in many situations, because we can then proceed to trust the declared type List<num>, and we can do things like xs.add(5.9). If the list had been a List<int> with static type List<num> then that would also have been a dynamic error.
However, in this particular case the covariant typing cannot be avoided based on the context type. The reason for this is that the typing of an extension method invocation is based on the receiver, and nothing else. So we inspect the receiver White(), detect that it has static type White, and proceed to use the value White as the actual type argument for the extension.

First and foremost, I genuinely appreciate your comprehensive explanation regarding the issue. It’s clear that a significant amount of thought has been invested in the design and implementation of the Dart type system. However, I'd like to address a few concerns further.

The code in question worked seamlessly in Dart 2. Given the smooth transition from Dart 2 to Dart 3, it was surprising to face this issue. I've scoured the changelog diligently, but couldn't pinpoint a clear mention of this particular change. While it's conceivable that this change might have gone unnoticed, it's crucial to remember that even seemingly minor shifts can profoundly impact our projects. Predictability is a essential part of the programming process.

Dart is renowned for its robust type system. When the static type checker remains silent, it typically instills confidence that our code will run without type errors. Hence, encountering a _TypeError at runtime, in the absence of any static checking, is quite disconcerting. This unpredictability introduces an element of doubt into development cycles, leading to concerns about possible unanticipated runtime errors, even in seemingly well-typed code.

While the foundational mechanisms and type theory are intricate, the experience for developers should ideally remain intuitive. The current situation makes it a tad challenging to predict code behavior based on static types, slightly diminishing the developer experience. That said, I acknowledge the ongoing discussion you mentioned, and I'm hopeful that it might offer a resolution (thanks for highlighting it).

To potentially mitigate this issue, it would be invaluable to have a lint warning for code segments that might lead to a runtime _TypeError. Lints and static analysis are pivotal tools that developers lean on to ensure consistent, error-free coding. Implementing such a lint would proactively alert developers to potential pitfalls.

The code in question worked seamlessly in Dart 2.

Could you provide the example which works differently in Dart 2 and Dart 3? The piece of code included in the issue  (White().transform()) works the same way in both versions: it produces an instance of Wrapper<White>.

When the static type checker remains silent, it typically instills confidence that our code will run without type errors.

Runtime checked covariance is always there (e.g. List<Animal> animals = <Dog>[]; animals.add(Cat());) and can be a source of runtime errors. Null checking (x!) or any sort of dynamic casts (x as Y). Any of these can cause type error in runtime.
That's not to say that you should not trust your code - but rather to highlight the fact that even well typed code can throw runtime errors.

@jonataslaw wrote, about unnecessary_cast:

If we don't manually disable this rule, the lint tool will automatically remove the casting upon saving

Oh, that's unfortunate. That diagnostic probably does not make any attempt to detect whether the cast is actually unnecessary, it just lints every upcast (based on the wrong assumption that they are always unnecessary).
You can use // ignore: unnecessary_cast to disable it, hopefully that will also cancel the automatic removal-upon-save.

While I understand your viewpoint, I would like to kindly express my difference in opinion regarding its classification as a compile-time error.

I did not intend to say that this is a compile-time error!
The situation where _TypeError is thrown is clearly a run-time error. I was just saying that this error does not happen at arbitrary locations in the code, it happens exactly in the location where the compiler has generated code to perform the run-time type check.
The point is that it is not particularly difficult to get rid of this kind of run-time error: We just need statically checked variance.
We do need to recognize that statically checked variance isn't going to happen everywhere in Dart anytime soon. It's too much of a breaking change, and there is a huge amount of code out there which is actually working, and which was probably simpler to write because of dynamically checked covariance. However, if we get something like statically checked declaration-site variance then each class author (who isn't tied on their hands and feet based on existing code) can choose to use statically safe variance, and hence turn this run-time error into a compile-time error.

@eernstg Thank you very much for the clarification. English isn't my first language, so this seems clearer to me now.
Using lint rule exclusion is a definitive way (along with casting) to solve the problem.
The solution proposed by @vsmenon also works as intended.
I will open an issue about the problem with the linter in the appropriate repository.
Thank you very much for your time!


Docs: fix arguments order for "throttledComputed" function

The actual API is throttledComputed(compute, delay), apparently it's a typo in docs.

Coverage remained the same at 96.685% when pulling 49453fefa2cb006d15bd587daa592ec0c1b245ba on oeeq:patch-1 into 2891d9ae8c3f562aa7402289c6ad3d2a0b22c3f7 on danielearwicker:master.


Successfully flashed Koogeek KLSP1 with Tasmota

I could not get Wifi Assist in the default image sonoff-classic to work after OTA upgrade, so I compiled a custom sonoff-knx with wifi pre-set and that one worked on a fresh KLSP1.

Great job - Have you shared your template with others here?
https://blakadder.github.io/templates/
Thank you!
-=Srz=-

Great job - Have you shared your template with others here?

Not yet, but I will. I am using 6.4.1 release which does not have template support. Need to compile from the development branch for this. On my list...

Thanks for your contribution, feel free to add your findings to the wiki

@sgrimee with that template the voltage is showing over 245v. thats way too high?

Would the GPIO settings really have an influence on this? I am not sure how it works, but I read this device may need power/voltage calibration: https://blakadder.github.io/templates/koogeek_KLSP1.html
See link at the bottom of the page. I did not do it because I am not using the measuring capabilities.

@sgrimee thank you for sharing.
Maybe you have an idea for my problem?
I have flashed the same device with Tasmota and used the template, but when I press the button on the webpage or the real button it doesn't turn on/off?
Is there anything I am missing?

@FaserF remember the above is with a now old firmware compiled custom... with a newer firmware, have you tried the 'Sonoff Basic' template instead? If not your best guess is to try one gpio after the other for the relay setting. Or open the plug but I do not remember if the pin numbers are visible at all on that one.