Flow doesn't error altought the types are incompatible(type-at-pos sees them correctly)

Using Flow 0.35 .
The definitions for connect are the ones from FlowTyped ( react-redux_v4.x.x ).
Given a standard Redux container and component:
TestContainer.js
// @flow
import { connect } from 'react-redux';
import { TestComp } from './TestComp.jsx';
const notificationsLoaded = (a: {x: number }) => 1;
const mapStateToProps = () => ({
    userInfo: 1
});
const mapDispatchToProps = () => ({
    onClick: (arg) => notificationsLoaded(arg)
});

export default connect(mapStateToProps, mapDispatchToProps)(TestComp);

And a test comp like:
TestComp.js
// @flow
import React from 'react';
type TestCompPropsType = {
   onClick: (a: boolean) => void
}
export const TestComp = (props: TestCompPropsType) => (

);

Notice how Testcomp has onClick typed as boolean while notificationsLoaded accepts an object.
Flow doesn't complain altought the types are different and altought Flow correctly sees using type-at-pos that arg is a boolean and that the type of the notificationsLoaded function is a function that accepts objects(verified also that the types are seen correctly also in vscode-flow-ide proving that type-at-pos reports the types of arg and notificationsLoaded correctly.
For further insight the types as reported by type-at-pos in TestContainer.js file are:
notificationsLoaded :  (a: {x: number}) => number
arg: boolean
@jeffmo

Added 2 pictures that show very clearly that the arguments are properly inferred by flow, but it still doesn't error( look only at the Flow-IDE section in the tooltips.The other hints with (parameter) arg: any is from VSCode Typescript server which tries to be helpfull ).

@gcazaciuc It's related to how the libdef for react-redux works, you should explicitly add typings for the connector
TestComp.js
// @flow
import React from 'react'

export type TestCompPropsType = {
   onClick: (a: boolean) => void
};

export const TestComp = (props: TestCompPropsType) => (

)

TestContainer.js
// @flow
import { connect } from 'react-redux'
import type { Connector } from 'react-redux'
import { TestComp } from './TestComp.js'
import type { TestCompPropsType } from './TestComp.js'

const notificationsLoaded = (a: {x: number }) => 1
const mapStateToProps = () => ({
    userInfo: 1
})
const mapDispatchToProps = () => ({
    onClick: (arg) => notificationsLoaded(arg)
})

const connector: Connector<{}, TestCompPropsType> = connect(
  mapStateToProps,
  mapDispatchToProps
)

export default connector(TestComp)

Then you get the error: "property onClick. Property not found in object type" (because types don't match)

I have the following error when using react-redux connect
src/components/banner/Banner.js:169
169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function call. Function cannot be called on any member of intersection type
169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                            ^^^^^^^ intersection
  Member 1:
                                 v-------
   66:   declare function connect(
   67:     ...rest: Array<void> // <= workaround for https://github.com/facebook/flow/issues/2360
   68:   ): Connector<OP, $Supertype<{ dispatch: Dispatch } & OP>>;
         -----------------------------------------------------------^ polymorphic type: function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:66
  Error:
  169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                      ^^^^ null. This type is incompatible with
   67:     ...rest: Array<void> // <= workaround for https://github.com/facebook/flow/issues/2360
                          ^^^^ undefined. See lib: flow-typed/npm/react-redux_v5.x.x.js:67
  Member 2:
                                 v-------
   70:   declare function connect(
   71:     mapStateToProps: Null,
   72:     mapDispatchToProps: Null,
  ...:
   75:   ): Connector<OP, $Supertype<{ dispatch: Dispatch } & OP>>;
         -----------------------------------------------------------^ polymorphic type: function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:70
  Error:
  169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                            ^^^^^^^^^^^^^^^^^^ function. This type is incompatible with
   72:     mapDispatchToProps: Null,
                               ^^^^ union: null | undefined. See lib: flow-typed/npm/react-redux_v5.x.x.js:72
    Member 1:
     64:   declare type Null = null | void;
                               ^^^^ null. See lib: flow-typed/npm/react-redux_v5.x.x.js:64
    Error:
    169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                              ^^^^^^^^^^^^^^^^^^ function. This type is incompatible with
     64:   declare type Null = null | void;
                               ^^^^ null. See lib: flow-typed/npm/react-redux_v5.x.x.js:64
    Member 2:
     64:   declare type Null = null | void;
                                      ^^^^ undefined. See lib: flow-typed/npm/react-redux_v5.x.x.js:64
    Error:
    169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                              ^^^^^^^^^^^^^^^^^^ function. This type is incompatible with
     64:   declare type Null = null | void;
                                      ^^^^ undefined. See lib: flow-typed/npm/react-redux_v5.x.x.js:64
  Member 3:
                                 v--------------
   77:   declare function connect<S, A, OP, SP>(
   78:     mapStateToProps: MapStateToProps<S, OP, SP>,
   79:     mapDispatchToProps: Null,
  ...:
   82:   ): Connector<OP, $Supertype<SP & { dispatch: Dispatch } & OP>>;
         ----------------------------------------------------------------^ polymorphic type: function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:77
  Error:
  169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                      ^^^^ null. This type is incompatible with the expected param type of
   78:     mapStateToProps: MapStateToProps<S, OP, SP>,
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:78
  Member 4:
                                 v-----------
   84:   declare function connect(
   85:     mapStateToProps: Null,
   86:     mapDispatchToProps: MapDispatchToProps,
  ...:
   89:   ): Connector<OP, $Supertype<DP & OP>>;
         ------------------------------------^ polymorphic type: function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:84
  Error:
  169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                            ^^^^^^^^^^^^^^^^^^ function. Could not decide which case to select
   86:     mapDispatchToProps: MapDispatchToProps,
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ union type. See lib: flow-typed/npm/react-redux_v5.x.x.js:86
    Case 1 may work:
     23:     | ((dispatch: Dispatch, ownProps: OP) => DP)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:23
    But if it doesn't, case 2 looks promising too:
    169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `DP` of function call
    Please provide additional annotation(s) to determine whether case 1 works (or consider merging it with case 2):
    163: const mapDispatchToProps = dispatch => ({
                                    ^^^^^^^^ parameter `dispatch`
  Member 5:
                                 v------------------
   91:   declare function connect<S, A, OP, SP, DP>(
   92:     mapStateToProps: MapStateToProps<S, OP, SP>,
   93:     mapDispatchToProps: MapDispatchToProps,
  ...:
   96:   ): Connector<OP, $Supertype<SP & DP & OP>>;
         -----------------------------------------^ polymorphic type: function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:91
  Error:
  169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                      ^^^^ null. This type is incompatible with the expected param type of
   92:     mapStateToProps: MapStateToProps<S, OP, SP>,
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:92
  Member 6:
                                 v---------------------
   98:   declare function connect<S, A, OP, SP, DP, P>(
   99:     mapStateToProps: MapStateToProps<S, OP, SP>,
  100:     mapDispatchToProps: Null,
  ...:
  103:   ): Connector<OP, P>;
         ------------------^ polymorphic type: function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:98
  Error:
  169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                      ^^^^ null. This type is incompatible with the expected param type of
   99:     mapStateToProps: MapStateToProps<S, OP, SP>,
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:99
  Member 7:
                                 v---------------------
  105:   declare function connect<S, A, OP, SP, DP, P>(
  106:     mapStateToProps: MapStateToProps<S, OP, SP>,
  107:     mapDispatchToProps: MapDispatchToProps,
  ...:
  110:   ): Connector<OP, P>;
         ------------------^ polymorphic type: function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:105
  Error:
  169: const connector: Connector<{},Props> = connect(null, mapDispatchToProps);
                                                      ^^^^ null. This type is incompatible with the expected param type of
  106:     mapStateToProps: MapStateToProps<S, OP, SP>,
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: flow-typed/npm/react-redux_v5.x.x.js:106

type Actions = {
  hideBanner: () => void,
}

type Props = {
  actions: Actions,
};

class Banner extends Component<void, Props, void> {
   render() {}
}

const mapDispatchToProps = dispatch => ({
  actions: {
    hideBanner: () => dispatch(hideBanner()),
  },
});

export default connect(null, mapDispatchToProps)(Banner)

How can I fix this?
@gcanti I've tried your solution but it did not worked well either
can I use your syntax with export default ?

@gcanti it seems not to work anymore. (see https://github.com/cssinjs/react-jss/issues/65#issuecomment-290207646)
I also have the same errors as @sibelius.
Do you know of a way to fix it ?
I'm a bit stuck here :/

related https://github.com/flowtype/flow-typed/issues/778 ?

React-redux libdefs have been rewritten at least twice since opening the issue so I assume it's not valid anymore.


"python main.py --dataset spade_celebA --segmap_ch 3 --phase" random saved image is dark

I run python main.py --dataset spade_celebA --segmap_ch 3 --phase, but the sved image is dark. something is wrong.

I changed related codes as following:from PIL import Image
def inverse_transform(images):
var = (images+1.) / 2
var[var < 0] = 0
var[var > 1] = 1
var = var * 255
return var
def imsave(images, size, path):
img = merge(images, size)
return img.save(path)
def merge(images, size):
h, w = images.shape[1], images.shape[2]
c = images.shape[3]
img = np.zeros((h * size[0], w * size[1], c))
for idx, image in enumerate(images):
i = idx % size[1]
j = idx // size[1]
img[hj:h(j+1), wi:w(i+1), :] = image
return Image.fromarray(img.astype('uint8'))

generated images are as following:

the result is not very good. is this the best SPADE can achieve on human face?


Edit event schema

Description
Editing the event schema in the model to hold an array of recurring events.
This is a breaking change as it alters the database schema.
Type of change
Please select everything applicable. Please, do not delete any lines.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Issue

[x] Is this related to a specific issue? If so please specify:
closes #126

Checklist:

[x] I have executed npm run lint and resolved any outstanding errors. Most issues can be solved by executing npm run format
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings

Requesting @MatthewBozin and @JoeDravarol to review before merging

Requested a resubmit to remove irrelevant commits.


Hotfix/my next class SOA Extraction

This change is

Reviewed 6 of 6 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

byuSuite/Apps/MyNextClass/controller/MyNextClassViewController.m, line 6 at r1 (raw file):

//
//  Created by Josh Gubler on 8/16/13.
//  Last modified by Erik Brady 1/17.

Wrong date

Comments from Reviewable

Review status: all files reviewed at latest revision, 1 unresolved discussion.

byuSuite/Apps/MyNextClass/controller/MyNextClassViewController.m, line 6 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Wrong date

Done.

Comments from Reviewable

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Fix depreaction CUSTOM_DIR vue runtime warning (Update click-outside.ts)

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


can you share a prompt to test llama with mmlu data ?

I tried this prompt but didn't work well :
The following are multiple choice questions (with answers) about  abstract algebra.
========example======
In order to make the title of this discourse generally intelligible, I have translated the term "Protoplasm," which is the scientific name of the substance of which I am about to speak, by the words "the physical basis of life." I suppose that, to many, the idea that there is such a thing as a physical basis, or matter, of life may be novel—so widely spread is the conception of life as something which works through matter. … Thus the matter of life, so far as we know it (and we have no right to speculate on any other), breaks up, in consequence of that continual death which is the condition of its manifesting vitality, into carbonic acid, water, and nitrogenous compounds, which certainly possess no properties but those of ordinary matter.
Thomas Henry Huxley, "The Physical Basis of Life," 1868
From the passage, one may infer that Huxley argued that "life" was
----here are the choices,you need to select one answer,return the order number----:
['a force that works through matter', 'essentially a philosophical notion', 'merely a property of a certain kind of matter', 'a supernatural phenomenon']
Answer:2
========example======
Read the the following quotation to answer questions.
The various modes of worship which prevailed in the Roman world were all considered by the people as equally true; by the philosopher as equally false; and by the magistrate as equally useful.
Edward Gibbon, The Decline and Fall of the Roman Empire, 1776–1788
Gibbon's interpretation of the state of religious worship in ancient Rome could be summarized as
----here are the choices,you need to select one answer,return the order number----:
["In ancient Rome, religious worship was decentralized and tended to vary with one's social position.", 'In ancient Rome, religious worship was the source of much social tension and turmoil.', 'In ancient Rome, religious worship was homogeneous and highly centralized.', 'In ancient Rome, religious worship was revolutionized by the introduction of Christianity.']
Answer:0
========example======
The following quote is from Voltaire in response to the 1755 Lisbon earthquake.
My dear sir, nature is very cruel. One would find it hard to imagine how the laws of movement cause such frightful disasters in the best of possible worlds. A hundred thousand ants, our fellows, crushed all at once in our ant-hill, and half of them perishing, no doubt in unspeakable agony, beneath the wreckage from which they cannot be drawn. Families ruined all over Europe, the fortune of a hundred businessmen, your compatriots, swallowed up in the ruins of Lisbon.  What will the preachers say, especially if the palace of the Inquisition is still standing? I flatter myself that at least the reverend father inquisitors have been crushed like others. That ought to teach men not to persecute each other, for while a few holy scoundrels burn a few fanatics, the earth swallows up one and all.
—Voltaire, in a letter, 1755
The ideas expressed by Voltaire, above, best illustrate which of the following characteristics of Enlightenment intellectuals?
----here are the choices,you need to select one answer,return the order number----:
['Many were accomplished scientists, who added important pieces to human understanding of the universe.', 'They utilized new methods of communicating their ideas, such as salons and inexpensive printed pamphlets.', 'Most rejected religion altogether and adopted atheism as the only credo of a rational man.', 'Many believed that the new scientific discoveries justified a more tolerant and objective approach to social and cultural issues.']
Answer:3
==========answer this question below===========
{question}
----here are the choices,you need to select one answer,return the order number----:
{choices}
Answer:

then  , flowed the demo code @jindongwang @madhavMathur :
dataset = pb.DatasetLoader.load_dataset("mmlu")
...

for prompt in prompts:
    preds = []
    labels = []
    for data in tqdm(dataset[5:]):
        # process input
        input_text = pb.InputProcess.basic_format(prompt, data)
        label = data['answer']
        raw_pred = model(input_text)
        print(raw_pred)
        break

Hi, here is an example prompt:
"Answer the following multiple-choice question about {task} by selecting the correct option: 'A', 'B', 'C', or 'D'. \nQuestion:{content}\nAnswer:",
You could find more example prompts for mmlu in promptbench/prompts/task_oriented.py or promptbench/prompts/role_oriented.py.


 I also have this problem with the redis plugin

I'm also running into this issue. Is there any news of a workaround?

Please follow work-around suggested in - https://github.com/abiosoft/caddy-docker/pull/223.
I ran into the same issue and able to fix it as per the suggested work-around.

Seems to be working again.


CLI native rendering fails

When runnning a python script with the CLI, the native rendering on Linux fails.
How to reproduce
From diambra arena repo root
diambra run -g python example/diambra_arena_gist.py
Log
Environment initialization ...
🏟 (1e3a) SHA256 check ok. Correct rom file found.
🏟 (1e3a) Fontconfig error: Cannot load default config file
🏟 (1e3a) 1 Completed console init
🏟 (1e3a) ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default
🏟 (1e3a) 78081g503.ic655 NOT FOUND (NO GOOD DUMP KNOWN) (tried in doapp coh1002m)
WARNING: the machine might not run correctly.
🏟 (1e3a) X Error:  BadShmSeg
  Request Major code 130 (MIT-SHM)
  Request Minor code 3 ()
🏟 (1e3a)   Error Serial #278
  Current Serial #279
🖥  Received signal, terminating

Confirmed it works with https://github.com/diambra/cli/actions/runs/4125750986


DBZ-5210 Support constraint_clauses in add_modify_drop_column_clauses

https://issues.redhat.com/browse/DBZ-5210

Upstream PR - https://github.com/antlr/grammars-v4/pull/2647

@ani-sha Applied, thanks


Replace structopt by clap

What is the problem your feature solves, or the need it fulfills?
structopt crate is unmaintained and superseded by clap v3 (Maintenance note). It has bugs that clap fixed three years ago before even releasing them (https://github.com/TeXitoi/structopt/issues/539, https://github.com/clap-rs/clap/issues/2527). This creates issues when expanding Pingora’s Opt structure.
Describe the solution you'd like
Pingora should use a current clap version.
Describe alternatives you've considered
I implemented the following hack – adding a dummy field to the app’s options only to overwrite application description that has been overwritten by Opt above:
/// My description
#[derive(Debug, StructOpt)]
struct MyOpt {
    …

    #[structopt(flatten)]
    server: Opt,

    #[allow(dead_code)]
    #[structopt(flatten)]
    dummy: StructOptDummy,
}

#[derive(Debug, StructOpt)]
#[structopt(about = "My description", long_about = "My description")]
struct StructOptDummy {}

No promises, but I'll try to make this happen

No promises, but I'll try to make this happen

It isn’t complicated, structopt to clap is almost search&replace – I could do it if I knew that the pull request will be accepted rather than stuck because nobody has time to review it.

Yeah, the only hurdle is to get buy in from the team since it's a change a pretty central place. If you're willing to put in the work/pr. That will make it easier for me to champion 💪

@johnhurt Ok, then there is #239 now.


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_b6319b50-6aa1-42be-8f2e-6b362906561b/pull/1 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-target_b6319b50-6aa1-42be-8f2e-6b362906561b.git

Docs Build status updates of commit 048e55a:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-UserAccountBuildPermissionInsufficientError] Owner v-alji no longer has Read permission of the repository https://github.com/opstest2/docs-archive-test-source. It might be due to recent GitHub changes on SSO. Please ask the owner v-alji to logon to Docs Portal https://ops.microsoft.com once again. If it is not the case, please ask anyone of Admin permission of the repo to assign a new owner via Docs Portal https://ops.microsoft.com

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Fixed a crash in Storage Local Resource ProviderProcess.

StorageLocalResourceProviderProcess::connected can crash on a check
that the current state is DISCONNECTED if the current state is
READY, which can happen if the periodic reconciliation runs after
disconnection.
It can be reproduced by running
ContentType/AgentResourceProviderConfigApiTest.Add/0 in a loop,
preferably with some CPU-intensive workload in the background to affect
the timing.
Update the check to allow READY as well.
3: I0408 09:31:11.591161 19179 http_connection.hpp:338] Ignoring disconnection attempt from stale connection
3: I0408 09:31:11.591224 19179 http_connection.hpp:338] Ignoring disconnection attempt from stale connection
3: I0408 09:31:11.591305 19179 http_connection.hpp:227] New endpoint detected at http://<IP_ADDRESS>:45793/slave(1162)/api/v1/resource_provider
3: I0408 09:31:11.593901 19174 http_connection.hpp:283] Connected with the remote endpoint at http://<IP_ADDRESS>:45793/slave(1162)/api/v1/resource_provider
3: I0408 09:31:11.593940 19190 provider.cpp:488] Disconnected from resource provider manager
3: I0408 09:31:11.594046 19190 provider.cpp:749] Resource provider 5a147f6c-6be9-4c43-9a88-31528644efb9 is in READY state
3: I0408 09:31:11.594060 19189 status_update_manager_process.hpp:379] Pausing operation status update manager
3: I0408 09:31:11.594211 19189 status_update_manager_process.hpp:385] Resuming operation status update manager
3: F0408 09:31:11.594637 19190 provider.cpp:474] Check failed: DISCONNECTED == state (1 vs. 4)
3: *** Check failure stack trace: ***
3: I0408 09:31:11.636463 19191 hierarchical.cpp:1953] Performed allocation for 1 agents in 208808ns
3:     @     0x7fb58f06191d  google::LogMessage::Fail()
3:     @     0x7fb58f060ca7  google::LogMessage::SendToLog()
3:     @     0x7fb58f0615e2  google::LogMessage::Flush()
3:     @     0x7fb58f0650a8  google::LogMessageFatal::~LogMessageFatal()
3: I0408 09:31:11.727972 19184 containerizer.cpp:3252] Container org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE has exited
3: I0408 09:31:11.729707 19186 provisioner.cpp:652] Ignoring destroy request for unknown container org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE
3: I0408 09:31:11.732404 19188 container_daemon.cpp:189] Invoking post-stop hook for container 'org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE'
3: I0408 09:31:11.732600 19177 service_manager.cpp:815] Disconnected from endpoint 'unix:///tmp/mesos-csi-NLwX0Z/endpoint.sock' of CSI plugin container org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE
3: I0408 09:31:11.732837 19176 container_daemon.cpp:121] Launching container 'org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE'
3: I0408 09:31:11.735456 19197 process.cpp:2781] Returning '404 Not Found' for '/slave(1162)/api/v1'
3: E0408 09:31:11.736846 19194 container_daemon.cpp:150] Failed to launch container 'org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE': Failed to launch container 'org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE': Unexpected response '404 Not Found' (404 Not Found.)
3: E0408 09:31:11.737042 19186 service_manager.cpp:843] Container daemon for 'org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE' failed: Failed to launch container 'org-apache-mesos-rp-local-storage-test--org-apache-mesos-csi-test-local_17120eece4184cbe8473563ff2fdafa6--CONTROLLER_SERVICE-NODE_SERVICE': Unexpected response '404 Not Found' (404 Not Found.)
3:     @     0x7fb599d7c896  mesos::internal::StorageLocalResourceProviderProcess::connected()
3:     @     0x7fb599df16de  _ZZN7process8dispatchIN5mesos8internal35StorageLocalResourceProviderProcessEEEvRKNS_3PIDIT_EEMS5_FvvEENKUlPNS_11ProcessBaseEE_clESC_
3:     @     0x7fb599df15a2  _ZN5cpp176invokeIZN7process8dispatchIN5mesos8internal35StorageLocalResourceProviderProcessEEEvRKNS1_3PIDIT_EEMS7_FvvEEUlPNS1_11ProcessBaseEE_JSE_EEEDTclclsr3stdE7forwardIS7_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOS7_DpOSG_
3:     @     0x7fb599df1566  _ZN6lambda8internal6InvokeIvEclIZN7process8dispatchIN5mesos8internal35StorageLocalResourceProviderProcessEEEvRKNS4_3PIDIT_EEMSA_FvvEEUlPNS4_11ProcessBaseEE_JSH_EEEvOSA_DpOT0_
3:     @     0x7fb599df150a  _ZNO6lambda12CallableOnceIFvPN7process11ProcessBaseEEE10CallableFnIZNS1_8dispatchIN5mesos8internal35StorageLocalResourceProviderProcessEEEvRKNS1_3PIDIT_EEMSC_FvvEEUlS3_E_EclEOS3_
3:     @     0x7fb590239b3b  _ZNO6lambda12CallableOnceIFvPN7process11ProcessBaseEEEclES3_
3:     @     0x7fb5901fb119  process::ProcessBase::consume()
3:     @     0x7fb5902997f9  _ZNO7process13DispatchEvent7consumeEPNS_13EventConsumerE
3:     @          0x120b9e4  process::ProcessBase::serve()
3:     @     0x7fb5901f7c5f  process::ProcessManager::resume()
3:     @     0x7fb59021fcdb  process::ProcessManager::init_threads()::$_15::operator()()
3:     @     0x7fb59021fb85  _ZNSt12_Bind_simpleIFZN7process14ProcessManager12init_threadsEvE4$_15vEE9_M_invokeIJEEEvSt12_Index_tupleIJXspT_EEE
3:     @     0x7fb59021fb55  std::_Bind_simple<>::operator()()
3:     @     0x7fb59021fa49  std::thread::_Impl<>::_M_run()
3:     @     0x7fb58965fc80  (unknown)
3:     @     0x7fb58ebc86ba  start_thread
3:     @     0x7fb588dc541d  clone
3:     @              (nil)  (unknown)

Originally seen in Jenkins: https://builds.apache.org/job/Mesos/job/Mesos-Buildbot/BUILDTOOL=cmake,COMPILER=clang,CONFIGURATION=--verbose --disable-libtool-wrappers --disable-parallel-test-execution,ENVIRONMENT=GLOG_v=1 MESOS_VERBOSE=1 MESOS_TEST_AWAIT_TIMEOUT=60secs,OS=ubuntu%3A16.04,label_exp=ubuntu/140/console

@cf-natali Thanks for the contribution! I assume you have already verified the fix  by running
ContentType/AgentResourceProviderConfigApiTest.Add/0 in a loop.


Fast start

...ExamplesTest - Run example 'printtiledwms' (simpleReport.jrxml)
...ExamplesTest - Run example 'printtiledwms' (requestData-bbox-tiled-wms1_1_1.json)

=> I think that the message should be move here:
https://github.com/mapfish/mapfish-print/pull/539/commits/117e9588e2114e43ee67c73039607bf992f287bd#diff-007ba379756e0f55b7eaf88cb70d2cf4L192

I think that the message should be move here

OK, done


Fix typo in org.apache.beam.sdk.transforms.Top

Hope I understand the method comments correctly:)

Coverage decreased (-0.007%) to 70.181% when pulling a0377c9e8264ffffff58bafa6438d19a533f8a17 on xumingming:fix-typo-in-Top into 15bd3a394e5c724216453a2098af117cac13778e on apache:master.

Looks good to me, thanks @xumingming !


SMS Alert Signup

As a user I want to sign up for SMS alerts to find out about opportunities to get involved with King's Closet. I should be able to submit my phone number via a form on the site to be added to the list. Upon recipient of an SMS alert I should have the ability to unsubscribe my phone number from alerts. My phone number should not be shared with anyone else.

https://www.twilio.com/sms


Medium severity vulnerability found in mem

When building catalog, our snyk instance detected a mem vulnerability within the Catalog v3.6.0 dependency tree. Here's the error:
✗ Medium severity vulnerability found in mem
  Description: Denial of Service (DoS)
  Info: https://snyk.io/vuln/npm:mem:20180117
  Introduced through<EMAIL_ADDRESS>  From<EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>  From<EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>  From<EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>><EMAIL_ADDRESS>  and 3 more...
  Remediation:
    Your dependencies are out of date, otherwise you would be using a newer version of mem.
    Try deleting node_modules, reinstalling and running `snyk test` again. If the problem persists, one of your dependencies may be bundling outdated modules.

Adding this here so it's on your radar. Thanks!

It looks like updating to webpack v4 would resolve this one.


Feature/robot  bge automation

Critical Changes
Changes
Issues Closed
New Metadata
Deleted Metadata

@skristem Is this PR still a work-in-progress? Looks like the main body of Robot tests aren't passing yet. Do you need any RelEng support?


Collection of small low priority fixes to bfp-market

Removes unnecessary token approvals on collateral configuratoin
Additional comments in natspec
Additional comments throughout codebase
Typos
Removal of unused functions
Minor optimisations on .toInt()
Fix of flaky test in MarginModule.test.ts

All bfp-market tests are passing. Only test failures are in unrelated tests that already exist on main branch.

Loogs good, just resolve merge conflicts

We may have both solved the same flaky test


Reducing logging output

Please check if the PR fulfills these requirements

[ ] The commit message follows our guidelines
[ ] Tests for the changes have been added (for bug fixes/features)
[ ] Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

Info output, client_batch_size=50, server_batch_size=10:

client_batch_size=50, server_batch_size=10, processes=2
INFO output:

client_batch_size=50, processes=2, No server_batch_size
INFO output:

client_batch_size=50, No server MP, No server_batch_size
INFO output:

NO client_batch_size, No server MP, No server_batch_size
INFO output:
n/a (None)

Search output
INFO output:
n/a (None)

Unit tests pass


Revert "Update db-active-record.md"

Reverts yiisoft/yii2#10335
@SilverFire https://github.com/yiisoft/yii2/pull/10335#issuecomment-162374320 merge if you agree.

Yeah, it's generated automatically.

Sorry, it's my fault :(


Split Transactions

Hey there,
I was looking for a little guidance with how best to handle split transactions. I am attempting to build a gauge for the total spent on groceries, however it is ONLY show transactions whose only category is groceries.
Any transaction where I had to split the categories don't get reported in the total. I have attached a few screenshots for clarification. If you look at the picture from my budget I have selected all transactions where the only category is Groceries and the total at the top is correct and shown in the gauge. However there are additional transaction amounts that SHOULD be counted, but are not.
Thanks!

Thanks for highlighting this! Can I ask how you'd expect it to work? My first instinct would be to "flatten" the Split transactions and treat them as their own transactions. If the splits don't have their own Payee, then they could default to the Payee for the "parent" transaction.
If you're counting the number of transactions however, that would be misleading.

I think for my use case, I am more concerned with totals than I am for a count of transactions. My end goal is to have gauges for specific categories so that I can visually track our spending progress.

Hi! Thank you @marcusolsson for creating this projects! Do you have any plans to improve it? I think the transaction count can be resolved adding/searching a unique id per transaction (except split transactions) so you don't count double but still those flattened transaction can be added to the total. Does it make sense?

Hi @bitzge, I no longer work for Grafana and I don't use it personally anymore. If anyone would like to work on this however, I'd be happy to review and publish a new version.


Blog template styling

This builds off of #94 and adds styling to the optional blog templates

Updating menu item content in all the CMSs in conjunction with merging this so that the "Blog" nav link works

I think if these themes remain optional, we might not want to change the nav link in the demo content, but the docs should definitely mention that this link should be updated to work.

I assume we'll go ahead and convert these few new components over to TS. I could see us getting this in before merging the TS conversion PR or after. I'll defer to your decision on the order of operations, but just wanted to call out some remaining work on these new components

Yeah, I'm open to whatever you think makes more sense, but since the TS refactor is a little more all-encompassing and since these weren't in there when you started that, I think it'd make more sense to get the TS changes in main then resolve conflicts and update this branch


README edited

All Submissions:

[x] Have you followed the guidelines in our Contributing document?

New Feature Submissions:

[x] Does your submission pass build tests locally?
[x] Have you indented your code locally prior to submission?

Changes to Core Features:

[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you successfully ran tests with your changes locally?

Hope that you have followed the contribution guidelines. Please don't make a request anywhere to get a review. One of the maintainers will get back to it within a day or so. 😃
(Powered by GitMate.io)

Congrats!....Finally squashed xD

ack 8a02b59


Add azure openai

Pull Request Checklist

[ ] Description: Briefly describe the changes in this pull request.
[ ] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
[ ] Documentation: Have you updated relevant documentation?
[ ] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?

Description
[Insert a brief description of the changes made in this pull request]

Changelog Entry
Added

[List any new features or additions]

Fixed

[List any fixes or corrections]

Changed

[List any changes or updates]

Removed

[List any removed features or files]

@algorithmlover2016
have you tested this changes to add Azure Open AI? Have they worked for you?

Yeah, I test it by myself, But  now I think it's  better to use litlellm to support azure openai, not by my way.

Hi @algorithmlover2016, I was following your solution and was also thinking about opening a new PR given that yours was still in draft. Could you please elaborate further on why do you think it's complex to add Azure OpenAI support?


Tiny doc bug in Core.hs

If I'm understanding correctly, the right-hand output of f />/ g should be c, not c'.

Oops!  Yes, that is correct.  Thanks for fixing that ☺

NP!


Missing important transaction parameters

When testing various "select" statements, the test programme suddenly stopped and did not return. The problem was an open transaction in another database connection.
Immediately after committing the open transaction, the test programme returned the corresponding values.
When I looked for the problem in rsfbclient, I noticed that it only knows one parameter for the configuration of the transactions.
pub enum TrIsolationLevel {
/// Transactions can't see alterations committed after they started
Concurrency = ibase::isc_tpb_concurrency as u8,
/// Table locking
Concistency = ibase::isc_tpb_consistency as u8,
/// Transactions can see alterations committed after they started
ReadCommitted = ibase::isc_tpb_read_committed as u8,}
Here all other important transaction parameters are missing to solve exactly this problem.
https://firebirdsql.org/file/documentation/html/en/refdocs/fblangref30/firebird-30-language-reference.html#fblangref30-transacs-settransac
Transaction Parameters
The main parameters of a transaction are:
data access mode (READ WRITE, READ ONLY)
lock resolution mode (WAIT, NO WAIT) with an optional LOCK TIMEOUT specification
isolation level (READ COMMITTED, SNAPSHOT, SNAPSHOT TABLE STABILITY).
My standard in GUI applications for Firebird is:
nowait
read_committed
rec_version

I will check this tonight. Anyway, do you can provide a code example of your program?

The problem was an open transaction in another database connection.

Was this second connection made by your process? Or by another program like flamerobin?

I will check this tonight. Anyway, do you can provide a code example of your program?
I use the supplied "select.rs" example.
Only read a few values from the DB with select.

The problem was an open transaction in another database connection.

Was this second connection made by your process? Or by another program like flamerobin?
flamerobin yes!
I forgot to confirm the change in the table used by "select" and then the "select.rs" got stuck, which then pointed me to the problem.

I would like to be able to specify the transaction parameters that are to be used by default when connecting to the database.
And in self-started transactions, the parameters can then also be passed again.

I will check this tonight.

The problem is real.

I would like to be able to specify the transaction parameters that are to be used by default when connecting to the database.
And in self-started transactions, the parameters can then also be passed again when needed.

I will start the study to implement this feature. Maybe in a faw days it will be ready for testing.

Version 0.21.0 released with transaction parameters support.


Error when same variable name but different type in the same file

In a graphql file, I have two mutations with $input as a variable, like:
mutation CreateProject($input: CreateProjectInput!) {
  createProject(input: $input) {
    ...
  }
}
mutation CreateScope($input: CreateScopeInput!) {
  createScope(input: $input) {
    ...
  }
}

When trying to execute the mutation CreateProject, I get the following error:
Response { data: None, errors: Some([Error { message: "Invalid value for argument \"input\", field \"allowlist\" of type \"CreateScopeInput\" is required but not provided", locations: Some([Location { line: 62, column: 15 }]), path: None, extensions: None }]) }

So basically you can't have two variable with the same name but different type in the same graphql file

I did some digging and I dont think this is a simple fix. This is due to the fact that graphql-client includes the whole query file in each request. I think this should probably closed as "worked as expected".


love.errhand

I see this features is not implemented, isnt this as simple as xpcall(main,love.errhand)?

Fixed in c7b95fde1

The default callback is dummied out after the debug traceback, but it's there now.


Holding down ctrl+n/ctrl+p for too long will trigger completion

FAQ

[X] I have checked the FAQ and it didn't resolve my problem.

Issues

[X] I have checked existing issues and there are no open or closed issues with the same problem.

Neovim Version
0.8.0
Minimal reproducible full config
should be reproducible with the provided config. Just open up a css file (since the lsp is setup for it) and hold down ctrl+n
Description
Holding down the ctrt+n/p keys in order scroll quickly through the popup will trigger an unwanted completion.
Steps to reproduce
hold ctrl+n/p while in the popup menu
Expected behavior
it just scrolls without unwanted completion
Actual behavior
Holding down the ctrt+n/p keys in order scroll quickly through the popup will trigger an unwanted completion.
Additional context
I also have xset r rate 210 40 set to speed up my keys, I think this is what is causing the issue, but I would still like to scroll this fast without an unwanted completion.

@ChristianChiarulli Please upload your mapping config.  I will test it.

should be reproducible with the provided config. Just open up a css file (since the lsp is setup for it) and hold down ctrl+n

Please upload the reproduce-able example.  I cannot test it.

I have tested it with pylsp, but I cannot reproduce it.

I have the same problem.
I used config from this repo https://github.com/bkegley/dotfiles


Added better explanation how use --runtimeOptions

Thanks for your contribution!
you're right it was not clear !


As a Kperf developer, I want to refine service deployment metrics to use milliseconds instead of seconds

For service creation measurment, the data is collected from Knative Serving CRDs and they're seconds, we need to find a way to use milliseconds to get a more accurate result.

assign /zhanggbj

/assign @zhanggbj


Move to primary/replica terminology

I've used this gem quite a bit over the last couple of years - really works well!
Here's a suggestion to move over to primary/replica terminology for the documentation and specs.

@urkle just wondering if you have feedback on the PR.


New configuration management: Redis + templates

This is a draft pull-request redesigning the configuration management and restructuring how external files are included in the build process.

all configuration is managed by Redis, using key/value pairs
configuration files are created using bbbconfgen using templates and Redis values
static configuration files are no longer contained inline within the customization script, but are stored externally. The /armbian/base/rootfs/ directory acts as the root, all files are stored below including the real Linux directories.

The Armbian image builds successfully, but needs further testing and optimization.

Since this is not yet marked as 'Ready for review' (because it's a draft):

Is there anything to review already?
Any tips on how to review / test?

I think it's more about the overall structure, which we can go over together. I'm still testing myself, just have a look and see if you agree with the overall design choices.

Will restructure commits and open a new pull-request once done.


Not able to handle when server ends the connection

I'm seeing this problem because there is a connection timeout for 600 seconds from the MySQL server. Then a connection is closed from the server instead of the client.
When Knex then tried to execute a query, the following error comes:
Unhandled rejection Error: BEGIN; - This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:297:12)
    at Connection.write (/node_modules/mysql2/lib/connection.js:136:15)
    at Connection.writePacket (/node_modules/mysql2/lib/connection.js:150:10)
    at Query.start (/node_modules/mysql2/lib/commands/query.js:39:14)
    at Query.Command.execute (/node_modules/mysql2/lib/commands/command.js:34:20)
    at Connection.handlePacket (/node_modules/mysql2/lib/connection.js:310:28)
    at Connection.addCommand (/node_modules/mysql2/lib/connection.js:326:10)
    at Connection.query (/node_modules/mysql2/lib/connection.js:397:15)
    at /node_modules/knex/lib/dialects/mysql/index.js:92:18
    at tryCatcher (/node_modules/knex/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._resolveFromResolver (/node_modules/knex/node_modules/bluebird/js/main/promise.js:480:31)
    at new Promise (/node_modules/knex/node_modules/bluebird/js/main/promise.js:70:37)
    at Client._query (/node_modules/knex/lib/dialects/mysql/index.js:88:12)
    at Client.query (/node_modules/knex/lib/client.js:127:24)
    at /node_modules/knex/lib/transaction.js:219:21
    at tryCatcher (/node_modules/knex/node_modules/bluebird/js/main/util.js:26:23)

Vague interpretation of what you mean by "Not able to handle" I'm guessing you say that because the error was thrown rather than handled? (Missing .catch block?)
Or are you saying knex should attempt to open up a new connection when this occurs?

I believe Knex should attempt to open a connection when this occours. If a pool object exists, but the sql server has closed the connection and you're trying to send a query. In stead of failing, it should first attempt to reconnect and if not able to do so, then fail?

@woopstar I agree knex should be able to handle that case and just throw away the connection and try to get new one if DB side had closed it. Then if reconnection doesn't work pool can throw connection timeout exception...

@elhigu I agree. The use of pools is pointless in my opinion if knex does not use a reconnect/new pool logic when executing a query. The only reason to throw an exception would simply be if knex is not possible to reach the sql server. There is tons of cases where the pool connection can be closed in between queries.
We often end connections after 600 seconds to prevent transaction deadlocking etc.

With the new acquireConnectionTimeout option as elhigu mentioned this makes a lot of sense. I'll see if I can look into this, unless someone beats me to it.

@wubzz I was talking about this issue with a friend in work and sounds like this feature actually cannot work at all by just retrying failed request. Retry would work only for single request, e.g. for transactions it would be pretty much impossible to implement, since after getting new connection all the requests in the transaction should be retried.
However Pool2 should be setup to use it's ping feature to make sure that connections, which are inside the pool are actually alive.
I'm closing the #1200 pull request, but still we could make pull request, which makes knex to use pool2's ping method configuration to make sure that connections in pool are alive.

@elhigu That makes sense, didn't think about transactions at all.. Will have a look at pool2 later.

@elhigu Playing around with pool2, the ping function was by far a better way of doing what I tried to achieve in that PR:
pool: {
		ping: function(connection, callback) {
			connection.query({text: 'SELECT 1 = 1'}, [], callback);
		},
		min: 1,
		max: 2
	}

Creates a new connection when needed, as expected.
However, the issue of transactions remains. Given the following example:
knex.transaction(function(tr) {
	tr.raw('SELECT version()')
	.then(function() {
			tr.raw('SELECT version()')
			.then(tr.commit)
			.catch(tr.rollback);
	})

}).then(function() {
	console.log('Transaction Comitted');
}).catch(function(error) {
	console.log('Transaction Rollback', error);
});

In this code, the ping function isn't called (this is correct), instead an error is thrown ECONNRESET, and the rollback function is called. In turn, this will attempt to run a ROLLBACK; query using the same connection that was just severed, which obviously won't work. Instead, it just hangs with what seems to be without a timeout.
One wonky solution is to just throw the error down the chain to the transaction's reject handler when the ECONNRESET error is thrown rather than trying to issue ROLLBACK; query, but perhaps there is a better way of handling this? I'm not sure..

Uh... so if connection is closed running trx.rollbackdoes not fail, but just hang... Does commit / other queries work the same way (just hang) that they just hang on if they are ran on closed connection? I don't understand why rollback would do anything different. I haven't looked into transaction code for a while so I cannot ay what is going on with that.
To me it would sound ok if knex just ignores any error on rollback and keeps on running since if rollback fails, there is not much what one can do. Then pool2 can just dispose broken connection with its ping functionality. @rhys-vdw @tgriesser any insight on this one?

Related issues: #1072 #892

Thanks @wubzz for the info on #1072.
I'm trying to see how the pinging approach could bring the stack (from knex down to the mysql client) to a level of reliability that is practical. Conceptually, I see that pinging will accomplish two things:

keep alive connections
discovery of dead connections

Most of the time, pinging will achieve the first goal: keeping the connections alive. This change alone will help prevent a lot of the issues I'm sure we are all running into.
However, connections could be dropped for other reasons and using pinging to find dead connections is a lot like using polling to do a health check. We are basically hoping for a favorable outcome from a race condition. We are depending on chance that the ping will expose the bad connection before the core application tries to use it.

We've implemented the ping process in our environment. The above example is a bit bogus, but the following works:
pool: {
        ping: function(connection, callback) {
            connection.query({sql: 'SELECT 1 = 1'}, [], callback);
        },
        pingTimeout: 3*1000,
        min: 1,
        max: 10
    }

It seems to have solved our problems for now.

@tmeinders Unless the connection is dropped right after the ping function has verified that the connection is still valid, then what you described should not be a problem. The ping function, as I understand, is not in any way "polling" the database server, but is instead called before a query is run using the connection. This means dead connections should always be discovered before the connection is used to run a query, or as you described it, before the core application tries to use it.
Currently I believe this is the closest to a good solution we have, disregarding the issue of transactions, which quite frankly, one can't really do anything about to recover the state anyway.
@elhigu @rhys-vdw There's around 5 issues in this repository that are relevant to this. My proposal is this:

Add default ping method for all dialects as to avoid these issues as much as possible. It's a part of Pool2 for a reason. (See #922 )
Add a reasonable timeout to transactions rollback; query in case its being called on a dead connection, and if the timeout exceeds, simply ignore the error in order to release the connection to the pool. (Connection broken, and transaction not commited so there's no harm, and can't recover the state)

If a user does not want knex to issue a ping query such as SELECT 1 to verify the connection, then they can supply their own ping function in the config following Pool2's documentation.
Does this sound good to you?

@wubzz sounds good!
About rollback timeout, if timeout triggers could we make sure that the connection will be discarded from the pool?

@elhigu Yes, that should not be an issue. I'm thinking something like
.rollback()
.timeout(some ms)
.catch(Promise.TimeoutError, (err) => {
//Release connection to pool
//Resolve rollback promise as if nothing happened.
})
.catch((err) => {
//Still throws error as usual when the explicit Timeout isn't triggered.
});

So. I guess it does not work yet. I've implemented the following code:
var knex = require('knex')({
    client: 'mysql2',
    connection: {
        host: mysqlConfig.master.host,
        user: mysqlConfig.master.username,
        password: mysqlConfig.master.password,
        database: mysqlConfig.master.database
    },
    pool: {
        ping: function(connection, callback) {
            connection.query({sql: 'SELECT 1 = 1'}, [], callback);
        },
        pingTimeout: 3*1000,
        min: 1,
        max: 10
    }
});

But it does still not work. The timeout on our database server is 600 sec. And when the connection is timed out, the following still occur:
Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:268:12)
    at Connection.write (/data/nodejs/145ac91/node_modules/mysql2/lib/connection.js:136:15)
    at Connection.writePacket (/data/nodejs/145ac91/node_modules/mysql2/lib/connection.js:150:10)
    at Query.start (/data/nodejs/145ac91/node_modules/mysql2/lib/commands/query.js:39:14)
    at Query.Command.execute (/data/nodejs/145ac91/node_modules/mysql2/lib/commands/command.js:34:20)
    at Connection.handlePacket (/data/nodejs/145ac91/node_modules/mysql2/lib/connection.js:310:28)
    at Connection.addCommand (/data/nodejs/145ac91/node_modules/mysql2/lib/connection.js:326:10)
    at Connection.query (/data/nodejs/145ac91/node_modules/mysql2/lib/connection.js:397:15)
    at Pool.require.pool.ping [as _ping] (/data/nodejs/145ac91/lib/db.js:22:24)
    at Pool._maybeAllocateResource (/data/nodejs/145ac91/node_modules/pool2/lib/pool.js:389:18)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

From the following code:
knex
        .select('id', 'number', 'country', 'full_number', 'closed')
        .from('dids')
        .where('tenants_id', req.tenant.id)
        .then(function (rows) {
            if (rows.length > 0) {
                res.sendData(rows);
            } else {
                res.send(404);
            }
            next();
        })
        .catch(function (error) {
            res.send(500, error);
            next();
        });

Tried this, but didn't work either. Though if I did a dirty hack and pack the connection query into a try catch and the call the callback on errors. As ping disposes the object on error. But it seems it doesn't create a new one to send the query through.
pool: {
        ping: function(connection, callback) {
            try
            {
                connection.query({sql: 'SELECT 1 = 1'}, [], callback);
            }
            catch (e)
            {
                callback(e);
            }
        },
        pingTimeout: 3*1000,
        min: 1,
        max: 10
    }

Also tried this, and not working:
pool: {
        ping: function ping(connection, callback) {
            try {
                connection.ping(callback);
            } catch (err) {
                process.nextTick(callback.bind(null, err));
            }
        },
        min: 1,
        max: 2
    }

@woopstar I was finally able to reproduce this error setting connect_timeout, wait_timeout and interactive_timeout to 1 on my mysql server.
COMMIT; - This socket has been ended by the other party
I can confirm the ping solution works when not using transactions.
Transactions are bound to their single connection and therefor ping is not being called on these. Because of this, it eventually throws that error. I don't see how knex can possibly recover from this and "rerun" the entire transaction using a new connection.
From your original post, the error was
Unhandled rejection Error: BEGIN; - This socket has been ended by the other party
indicating that you are using a transaction (BEGIN;), however in your code example above I do not see a transaction being used. Can you post your code that causes this issue while inside a transaction?
If you have a timeout of 600 seconds (10 minutes) on your mysql server, there should from my understanding be no way for a transaction to throw this error so long as the transaction is either commited or rolled back within those 10 minutes.

Sorry for late reply.
We use transactions for all queries that alter data on the server - so yes, we are using transactions and this is causing the problem.
The problem does not rely on that the transaction takes 600 seconds, but that the connection from the server is closed after 600 seconds. When the transaction is starting, it tries to use a pool object that is actually closed and this causes the issue.
The only solution we found yet, is to query ever 500 second to keep the connection open and used.
When a transaction or a query starts / is fired, the pool object must be validated and checked if it's actually still connected. It thinks it is, because it dosen't see that the server closed the connection.
Makes sense?

@woopstar Gotcha. The only thing that does not make sense is how the Pooling fix above does not fix your issue.
The SELECT 1 check should occur before the connection calls for BEGIN; and with that it should realize the connection is closed since the query fails, and instead return a fresh connection..
I'm not able to reproduce what you described even with a 1 second timeout so I'm a bit stumped..

We tried with all of the above, and all of them gave us the error about the connection to the server was closed. I agree with you, that the ping method should verify the connection before the query is actually run against it, but it seems not to be the case. Or maybe it does, but does not open up a new connection and try that one.

This is our currently code, which seems to work the most. Though we got the following error today:
Mar 29 06:37:02 odn1-voip-api-v2-01 API: {"name":"api","hostname":"odn1-voip-api-v2-01","pid":26137,"level":50,"msg":"Knex heartbeat error { [Error: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?]\n  timeoutStack: 'TimeoutError: operation timed out\\n    at afterTimeout (/data/nodejs/4568574/node_modules/bluebird/js/main/timers.js:16:15)\\n    at timeoutTimeout (/data/nodejs/4568574/node_modules/bluebird/js/main/timers.js:59:9)\\n    at Timer.listOnTimeout (timers.js:92:15)',\n  sql: 'SELECT 1=1',\n  bindings: undefined }","time":"2016-03-29T04:37:02.089Z","v":0}

'use strict';

var config = require('config');
var log = require('./logger');
var domain = require('domain').create();

var mysqlConfig = config.mysql;

if (!mysqlConfig) {
    console.error('No MySQL config found, exiting');
    process.exit(1);
}

var heartBeatInterval = null;

function createKnex() {
    var rVal = require('knex')({
        client: 'mysql2',
        connection: {
            host: mysqlConfig.master.host,
            user: mysqlConfig.master.username,
            password: mysqlConfig.master.password,
            database: mysqlConfig.master.database
        },
        pool: {
            ping: function ping(connection, callback) {
                try {
                    connection.ping(callback);
                } catch (err) {
                    log.error('In catch', err);
                    process.nextTick(callback.bind(null, err));
                }
            },
            min: 1,
            max: 2
        }
    });

    if (heartBeatInterval) {
        clearInterval(heartBeatInterval)
        heartBeatInterval = null;
    }

    heartBeatInterval = setInterval(function () {
        rVal.raw('SELECT 1=1')
        .then(function () {
          //  log.info('heartbeat sent');
        })
        .catch(function (err) {
            log.error('Knex heartbeat error', err);
        })
    }, 10000);

    return rVal;
}

domain.on('error', function (err) {
    log.error('knex error', err);
})

domain.run(function () {
    var knex = createKnex();
    module.exports = knex;
});

Why the SELECT 1=1 would give this error seems very strange to me.

Ok so transaction much like anything else calls for client.acquireConnection which in turn calls for client.pool.acquire which finally calls the dialect-specific acquireRawConnection.
Now I don't know much about mysql but this diff between mysql and mysql2 strikes me as pretty odd.. Could this have anything to do with the errors you are seeing?
https://github.com/tgriesser/knex/blob/master/src/dialects/mysql/index.js#L52
https://github.com/tgriesser/knex/blob/master/src/dialects/mysql2/index.js#L64
mysql has listeners for error and end to dispose of the connection. mysql2 does not have this.
connection.on('error', connectionErrorHandler.bind(null, client, connection))
connection.on('end', connectionErrorHandler.bind(null, client, connection))

According to mysql2 the connection does in fact support the end event.
@elhigu Any idea about this?

You think i should try the mysql lib instead of the mysql2 lib?

@woopstar It's worth a shot to see if it solves your issue. I'll look into the diff between these two later today.

@woopstar Both PRs are now merged in prepration for 0.11. Did you find any success in moving to mysql instead of mysql2?

Closing in favor of #1833 (+ pool has changed after this issue)


Feature/lexeme labels

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

174 of 256 (67.97%)  changed or added relevant lines in 35 files are covered.
7 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.5%) to 75.333%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

csly-cli-model/Model.cs
0
1
0.0%

csly-cli-model/lexer/CharacterTransition.cs
0
1
0.0%

csly-cli-model/lexer/ExceptTransition.cs
0
1
0.0%

csly-cli-model/lexer/ITransition.cs
0
1
0.0%

csly-cli-model/lexer/LexerOptions.cs
0
1
0.0%

csly-cli-model/lexer/Range.cs
0
1
0.0%

csly-cli-model/lexer/RangeTransition.cs
0
1
0.0%

csly-cli-model/lexer/TransitionChain.cs
0
1
0.0%

csly-cli-model/parser/ChoiceClause.cs
0
1
0.0%

csly-cli-model/parser/GroupClause.cs
0
1
0.0%

Files with Coverage Reduction
New Missed Lines
%

csly-cli-extractor/LexerSpecificationExtractor.cs
1
82.93%

csly-cli-builder/ParserGenerator.cs
3
73.07%

csly-cli-model/AbstractModelVisitor.cs
3
27.27%

Totals

Change from base Build<PHONE_NUMBER>:
-0.5%

Covered Lines:
2666

Relevant Lines:
3507

💛  - Coveralls


Langkilde Female Ornamentation

Sent email to PI and received response that grad student will work on it.

Sent email to check progress and offer assistance if needed.

Got files from Assis Braulio
Still needed a readme so sent a request for that as well as a Description of the data.
Also I need to get a DOI, waiting to finalize the submission for that.


net: lwm2m: Observation refactor and composite operation support

Observation pmin and pmax refactor

Removed to store pmin and pmax at observation node structure and use attribute list store for calculate time for next Notification.
Observation class use timestamp for triggering notification based on resource update which use pmin and default pmax behavior.
Refactor function parameter naming from lwm_ to lwm2m

Composite Observation support

Added support for Composite observation for LwM2M v1.1.
Updated current Observation node to support linked path list.

@SeppoTakalo @rlubos @VeijoPesonen @jarlamsa Please review

I fixed code style issues.

@rlubos Thanks for feedback I fix your raised items.

@SeppoTakalo @rlubos @VeijoPesonen I rebase and fix conflict which came from Utility update.


parsing with narrowing

In a meeting with Ben yesterday, it came out that we can use narrowing for parsing.  This morning I did some experiments using Maude's narrowing support to flush out the idea, and it seems to work:
in full-maude .

mod TOKENS is
  sorts Token TokenList .
  op nil : -> TokenList .
  op __ : Token TokenList -> TokenList .
  ops a b c d e f g h i j k l m n o p q r s t u v x y z w  0 1 2 3 4 5 6 7 8 9 : -> Token .
  op append : TokenList TokenList -> TokenList .
  var T : Token .  vars Ts Ts' : TokenList .
  rl append(nil,Ts') => Ts' .
  rl append(T Ts, Ts') => T append(Ts,Ts') .
endm

mod KAST is
  sorts KItem K KLabel KList .
  subsorts KItem < K < KList .
  op .KList : -> KList .
  op _,_ : KItem KList -> KList .
  op _`(_`) : KLabel KList -> KItem .
endm

mod GRAMMAR is
  including TOKENS .
  including KAST .

  op [_,_] : K KItem -> TokenList .

***(
  syntax S ::= S A | epsilon
  syntax A ::= a | b
***)

  sorts S A .
  subsorts S A < K .

  ops 'a:->A' 'b:->A' '__:S*A->S' 'epsilon:->S' : -> KLabel .

  vars S1 S2 : S .  vars A1 A2 : A .  vars K1 K2 : KItem .
  rl [S1, '__:S*A->S'(K1,K2)] => append([S2, K1], [A1, K2]) .
  rl [S1, 'epsilon:->S'(.KList)] => nil .

  rl [A1, 'a:->A'(.KList)] => a nil .
  rl [A1, 'b:->A'(.KList)] => b nil .

endm

select FULL-MAUDE .
loop init .

(search [1,5] in TOKENS :  append(Ts:TokenList, c d nil) ~>* a b c d nil .)

(search [1,7] in GRAMMAR :  [S1:S, AST:K] ~>* nil .)

(search [1,7] in GRAMMAR :  [S1:S, AST:K] ~>* a nil .)

(search [1,8] in GRAMMAR :  [S1:S, AST:K] ~>* a b nil .)

The above outputs:
search [1,5] in TOKENS : append(Ts:TokenList,c d nil) ~>* a b c d nil .

Solution 1
Ts:TokenList --> a b nil

No more solutions.

search [1,7] in GRAMMAR :[S1:S,AST:K] ~>* nil .

Solution 1
AST:K --> 'epsilon:->S'(.KList)

No more solutions.

search [1,7] in GRAMMAR :[S1:S,AST:K] ~>* a nil .

Solution 1
AST:K --> '__:S*A->S'(('epsilon:->S'(.KList)),'a:->A'(.KList))

No more solutions.

search [1,8] in GRAMMAR :[S1:S,AST:K] ~>* a b nil .

Solution 1
AST:K --> '__:S*A->S'(('__:S*A->S'(('epsilon:->S'(.KList)),'a:->A'(.KList))),'b:->A'(.KList))

No more solutions.

Bye.

Unfortunately, it looks like narrowing in Maude only works with full maude, and does not have support for associativity, so I had to cripple the definition to use append instead of associative lists.  And in the end it is still slow.  It takes about 1min for the above to terminate.
So here is my question.  We want a powerful narrowing engine for test-case generation and many other reasons anyway in the K framework, which should interact well with strategies and associative lists.  Then why not use that for parsing as well?  Of course, you will say "performance", but can't we improve the performance to an extent that it will not be a bottleneck?  We want narrowing to be fast anyway.

Looks nice! If we have a mechanism to produce AST from narrowing path (maude can already show the path), mod GRAMMAR can be further simplified to have rules look like rl [A1] => a nil ., but this module will be automatically generated by parsing mechanism anyway.
But this reminds me of how we used spoofax to create Java parser from SDF syntax, what is the technique there and how is narrowing approach going to beat them?

can be further simplified to have rules look like rl [A1] => a nil .

That's how it was initially, but I wanted to also see the AST.  And the difference in performance is not that big.  They are both equally slow.

But this reminds me of how we used spoofax to create Java parser from SDF syntax,

Why do you think there is any relationship here?  SDF is specialized for parsing and that's what it does, it generates parsers from grammars, no narrowing, just a very specialized parser generator.

what is the technique there

Go ahead and read :)  Both the SDF approach and our code to generate SDF from K and then parsers from SDF.

and how is narrowing approach going to beat them

Elegance and ease of implementation, provided to can bring the performance within bounds asymptotically similar.


Investigate how to use the interrupts of Snitch

Gianna told us that Snitch has interrupt mechanisms. The code seems to have so but we need to identify how to handle those. Investigate how to use the interrupts of Snitch and modify tests to use those.

Happy to help out here

This was investigated internally. For documentation purposes, we can find it on a Notion page here.
The concept is simple, basically when snitch_hw_barrier() function is called, it does a load operation but that load operation stalls until all cores have reached that "load" operation.


Home page: Button improvement, font size and styling improvement

Fixes Issue: #200
Changes proposed

Decreased the size of font in home section
Added gradient hover effect in navbar options
Improved button styling
Added content for " What is DevsInTech Community "

Screenshots
Before:

After:

sorry but we are not planning to change button design in home page.

sorry but we are not planning to change button design in home page.

@AbhiPatel10 Okay, so shall I revert that to previous buttons only and make pr for other changes?


How to extend types in Protocol.elm ?

I'm messing around with https://package.elm-lang.org/packages/choonkeat/elm-webapp/latest and I'm trying to expand the types in Protocol.elm, But im unsure how to edit the Protocol/Auto.elm or if I should since it has been generated automatically (but by what?)
hello-app
├── Makefile
├── index.js
└── src
    ├── Client.elm
    ├── Server.elm
    ├── Protocol.elm <---- Here
    └── Protocol
        └── Auto.elm <---- and Here

When i edit for instance this :
type MsgFromClient
    = ManyMsgFromClient (List MsgFromClient)
    | SetGreeting String

To this  :
type MsgFromClient
    = ManyMsgFromClient (List MsgFromClient)
    | SetGreeting String
    | Another

running make fails (expectedly) but it runs in a loop and if i correct back the code it still wont compile ! (I started from start again but i think supressing elm-stuff might do the trick.what's the right way to re-autogenerate the code so you can safely mess with the types?
Thank you !

Oops sorry, the issue was closed by commit without comment
There were several issues causing the problems

There was a problem with elm-auto-encoder-decoder on Linux fixed
There was also a problem with the missing PATH to elm-auto-encoder-decoder (fixed in 7439456)
There was the problem of "infinite loop" after we make a change to the code. This was because a crucial file scripts/wait-for-changes.js missing from the packaged npm bundle (fixed in 8703775)

There was the problem of "infinite loop" after we make a change to the code. This was because a crucial file scripts/wait-for-changes.js missing from the packaged npm bundle

Then again scripts/wait-for-changes.js has the same recursive problem on Linux 😮💨
https://github.com/choonkeat/elm-webapp/blob/8703775296bbd1908dc16b5309d39d83adb0c2b3/templates/crud/scripts/wait-for-changes.js#L5

Thanks so much, it works better now!
Although the problem of "infinite loop" is still present on linux! If your elm code wont compile (you can check with elm make src/Server.elm and elm make src/Client.elm then running make will indeed go into infinite loop again.

Yes it's happening because scripts/wait-for-changes.js is probably spouting errors due to https://github.com/choonkeat/elm-webapp/issues/8#issuecomment-979954826
But the fix won't be as easy as https://github.com/choonkeat/elm-auto-encoder-decoder/commit/a94f289123373c7c14be9a6f5d9502728ade23fa since we do need a recursive file watcher here ...
Switching from fs.watch to something like chokidar or gaze is an option, but means burdening apps with more js dependencies...

Another option might be to warn linux users and have them ensure their  files compiles (check by running elm make src/*.elm) and then maybe tweak the make file so it stops when encountering an error? (if that is possible)

actually if this only affects Linux, we could try using inotifywait (from apt-get install inotify-tools, apk add inotify-tools, or ...)
you can try editing your Makefile to replace
node scripts/wait-for-changes.js .

with
inotifywait -r -e close_write -e move -e create -e delete .

(take note of the trailing .)
if it works, I'll try to work this instructions / cli swap into the installation process


[cluster-test] [ci] Remove run_suite_in_loop

Historically cluster test used to be independent tool, it was polling ECR for new nightly images and tagging them with nightly_tested after cluster test passed
We now have more comprehensive integration with Circle CI, that allows to run cluster test directly from CI
This is more preferred method as it provides more visibility and allows later to integrate cluster test into more complex scenarios, such as run pre-commit.
Since we are switching to Circle orchestrated runs, we no longer need polling loop inside cluster test.
This diff removes polling loop, and also re-purpose --run as a shorter version for --run-experiment
It also removes slack integration with #cluster_test_log channel - failure signal now moves to #push channel where all CI pipeline messages are collected
Please use delegate+, will merge after confirming that CI way works

Fantastic!
@bors-libra delegate+

:v: @andll can now approve this pull request

@bors-libra r=ankushagarwal

:pushpin: Commit 04e8006 has been approved by ankushagarwal

:hourglass: Testing commit 04e8006729d79ca42be3bcb416f951ac393db7dc with merge f20ece6f55ca8168bf62cd4e3b23eae98705633c...

@bors-libra r-

@bors-libra r+

:pushpin: Commit 04e8006 has been approved by andll

@bors-libra r=ankushagarwal

:bulb: This pull request was already approved, no need to approve it again.

This pull request is currently being tested. If there's no response from the continuous integration service, you may use retry to trigger a build again.

:hourglass: Testing commit 04e8006729d79ca42be3bcb416f951ac393db7dc with merge 3582d1841b03ea6e22177f05ebe5f4e88a31e387...

:pushpin: Commit 04e8006 has been approved by ankushagarwal

:hourglass: Testing commit 04e8006729d79ca42be3bcb416f951ac393db7dc with merge 602d22deb259768fe7b867d5fbe99c2b3f359a4d...

:sunny: Test successful - checks-circle_commit_workflow
Approved by: ankushagarwal
Pushing 602d22deb259768fe7b867d5fbe99c2b3f359a4d to master...


Add an optional warning to type inferred variables and parameters

Relies on #59943
Closes godotengine/godot-proposals#173 and godotengine/godot-proposals#3531

Warnings are now enum values (Ignore, Warn, Error) to allow setting whether you want a warning to be treated as either an error, a warning, or ignored.
The way warnings are initialized in gdscript.cpp has been improved to offer more flexibility. (Support for property info per warning and different default values.)
Type Inferencing
Added new warnings that will let the user know if a variable or parameter they defined is not statically typed (Set to 'Ignore' by default)

Variables that are assigned to null when declared are ignored so that if you absolutely need to, you can still have a dynamically typed variable.

The checks are failing because the documentation hasn't been updated yet, I'll get them up to date tomorrow.

The checks are failing because the documentation hasn't been updated yet, I'll get them up to date tomorrow.

Fixed 👍

Changed the property info for 'Enforce Static Types' warnings to use 'Disabled' instead of 'Ignore' for the enum strings.

Docs need to be updated, I'll get to it soon

Looks good!
In addition to the review comment above, I suggest also renaming "Enforce Static Parameter Types" to "Enforce Method Static Parameter Types" to be more explicit.

Variables that are assigned to null when declared are ignored so that if you absolutely need to, you can still have a dynamically typed variable.

Correct me if I'm wrong, but I think you could also specify the type as Variant

Correct me if I'm wrong, but I think you could also specify the type as Variant

Yep that works too, but I think labeling all your dynamically typed variables with :Variant would make your code less readable because it takes up a lot of space in your variable declaration, it's much simpler to just initialize it to null.

Documentation builds are failing because this PR relies on changes that would update the docs included in #59943. (The automatically compiled docs have the variable types set to bool when they should be an int to represent the enum.)

Correct me if I'm wrong, but I think you could also specify the type as Variant

Yep that works too, but I think labeling all your dynamically typed variables with :Variant would make your code less readable because it takes up a lot of space in your variable declaration, it's much simpler to just initialize it to null.

= null is 6 chars, : Variant is 9, I'm not convinced the 3 characters matter. Also if https://github.com/godotengine/godot-proposals/issues/162 then the difference between = null and : Variant would be significant. I don't feel that strongly about it, but in my opinion the : Variant syntax is the most natural and intuitive way to specify that a variable is dynamically typed, and I'd prefer if there was only one right way to do things. I'd be happy to listen to other opinions though.

I agree that the warning should be emitted variables initialized to null. This warning is disabled by default already, and it's intended for people wanting to use a stricter code style over the default. Therefore, I don't think it'll be too intrusive.

You two are right, I will update this PR to also enforce users not to initialize variables to null and prefer using Variant for dynamic typing.

You two are right, I will update this PR to also enforce users not to initialize variables to null and prefer using Variant for dynamic typing.

Done, I added the enum warnings commit back so that this PR can be tested without having to first merge another branch or cherrypick, etc

We discussed this in a GDScript meeting with @vnen and @Calinou, here are some suggestions:

The first commit implementing enum values for warnings seems fine, and would be best moved to its own dedicated PR so that it can be merged independently of the static typing option.
For the static typing options, some more discussion might be warranted regarding:

Name of the category (it's reusing the warning system but special cased as a different category, that's a bit weird)
Whether two options should be added or just one for all cases

I also see that this is doing a bit different from the proposal, as it's forbidding type inference when it should be forbidding non-static types (unless I misread the code). Those are different things. If you use var x := 0 you are using type inference and static typing, it's important that this case is allowed when the user wants to enforce static types.
In fact, I don't think this needs mention type inference inference at all (unless it's to clarify that it is allowed).

See also https://github.com/godotengine/godot-proposals/issues/3284

We discussed this in a GDScript meeting with @vnen and @Calinou, here are some suggestions:

The first commit implementing enum values for warnings seems fine, and would be best moved to its own dedicated PR so that it can be merged independently of the static typing option.

For the static typing options, some more discussion might be warranted regarding:

Name of the category (it's reusing the warning system but special cased as a different category, that's a bit weird)
Whether two options should be added or just one for all cases

I separated the enum warnings commit to #59943.

I also see that this is doing a bit different from the proposal, as it's forbidding type inference when it should be forbidding non-static types (unless I misread the code). Those are different things. If you use var x := 0 you are using type inference and static typing, it's important that this case is allowed when the user wants to enforce static types.
In fact, I don't think this needs mention type inference inference at all (unless it's to clarify that it is allowed).

Gotcha, In the recent push I made, I allowed annotated type inferencing.

I also see that this is doing a bit different from the proposal, as it's forbidding type inference when it should be forbidding non-static types (unless I misread the code). Those are different things. If you use var x := 0 you are using type inference and static typing, it's important that this case is allowed when the user wants to enforce static types.
In fact, I don't think this needs mention type inference inference at all (unless it's to clarify that it is allowed).

Gotcha, annotated type inferencing is allowed now.

The checks are failing because the documentation uses int instead of bool. The int comes from #59943

Rebased to be up to date with master.

The other warnings are named after what triggers them, for example "shadowed member variable" or "int assigned to enum".
For these to be consistent they should be called "dynamically typed member variable" and "dynamically typed parameter", or something similar.

Sounds like a good idea. I'll change it along with any other needed changes.

Waiting for this to get merged 👀

I'm not sure if this would be merged right now because of the feature freeze. I believe the changes from the PR review have been implemented, so I think this is just waiting to be reviewed again.

What about polymorphic types? Will this PR produce a warning in the last line of the following code:
extends Node

func _ready():
	var _q :Node2D = $'.'	# runtime error if the value doesn't inherit Node2D

Static typing would result in compile time error here but what GDScript does is a runtime type check (which may or may not result in an error).
I'm asking because this PR is allegedly adressing https://github.com/godotengine/godot-proposals/issues/173.

Superseded by:

#81355
#82139

Thanks for the contribution nonetheless!


Replace std::round with round

Hi, cool example, works fine 👍
By following the guide for the TTGO T-Display example I came across one compilation error, removing "std::" just solved the issue.
C:\Users\xxx\Desktop\Example3_SCD30_BLE_TTGO_Gadget\Example3_SCD30_BLE_TTGO_Gadget.ino: In function 'void loop()':

Example3_SCD30_BLE_TTGO_Gadget:148:29: error: 'round' is not a member of 'std'

       displayCo2((uint16_t) std::round(result[0]));

                             ^
xxx\Example3_SCD30_BLE_TTGO_Gadget\Example3_SCD30_BLE_TTGO_Gadget.ino:148:29: note: suggested alternative:

In file included from C:\Users\xxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\cores\esp32/esp32-hal.h:34:0,

                 from C:\Users\xxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\cores\esp32/Arduino.h:35,

                 from sketch\Example3_SCD30_BLE_TTGO_Gadget.ino.cpp:1:

C:\Users\xxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3/tools/sdk/include/newlib/math.h:278:15: note:   'round'

 extern double round _PARAMS((double));

               ^

exit status 1
'round' is not a member of 'std'

It looks like you are using an outdated version (1.0.3) of the esp32 board package. Can you try with 1.0.4? The thing is we had troubles on other Arduino's when leaving off the std:: prefix.

I just updated the board to 1.0.4 and the error is the same:
C:\Users\xxx\Documents\Arduino\libraries\arduino-ble-gadget-0.7.1\examples\Example3_SCD30_BLE_TTGO_Gadget\Example3_SCD30_BLE_TTGO_Gadget.ino: In function 'void loop()':

Example3_SCD30_BLE_TTGO_Gadget:148:29: error: 'round' is not a member of 'std'

       displayCo2((uint16_t) std::round(result[0]));

                             ^

C:\Users\xxx\Documents\Arduino\libraries\arduino-ble-gadget-0.7.1\examples\Example3_SCD30_BLE_TTGO_Gadget\Example3_SCD30_BLE_TTGO_Gadget.ino:148:29: note: suggested alternative:

In file included from C:\Users\xxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/esp32-hal.h:34:0,

                 from C:\Users\xxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:35,

                 from sketch\Example3_SCD30_BLE_TTGO_Gadget.ino.cpp:1:

C:\Users\xxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/newlib/math.h:278:15: note:   'round'

 extern double round _PARAMS((double));

               ^

exit status 1
'round' is not a member of 'std'

Hi Benjamin
This is a Windows vs Linux issue. On linux and macOS, there is no problem when using the round of the std library. This is different most Windows installations though. Hence, we decided to skip the round function entirely within the library. Could well be that we've forgotton to adjust this in this example code...
See this line as an example.
We'll fix it in the future. Thank you for reporting this.


Error after update

Hi, I just update this morning and all service got error with
CHROME DRIVER INITIALISED: Try not to exit the script before it detaches.
Step 101 - Attempting to check for the start button (should not be present)... [//button[contains(., 'START')]]
Step 102 - Attempting to open a link for the app: //a[@href='https://t.me/herewalletbot/app']...
Step 103 - Attempting to click the 'Launch' button (probably not present)... [//button[contains(@class, 'popup-button') and contains(., 'Launch')]]
Step 104 - Attempting to switch to the app's iFrame...
Step 105 - Attempting to click the 'storage' link... [//h4[text()='Storage']]
Step 105 - An error occurred while trying to click the 'storage' link: unsupported operand type(s) for +: 'float' and 'str'
Step 107 - Attempting to get the pre-claim wait timer... [//div[contains(., 'Storage')]//p[contains(., 'Filled') or contains(., 'to fill')]]
Step 107 - Attempting to click the 'storage' link... [//h4[text()='Storage']]
Step 107 - An error occurred while trying to click the 'storage' link: unsupported operand type(s) for +: 'float' and 'str'
tep 107 - Attempting to get the pre-claim wait timer... [//div[contains(., 'Storage')]//p[contains(., 'Filled') or contains(., 'to fill')]]
Other game has the same this error

Thanks, please update and restart.


Update validation sample to include Name and ShortName

Update the model:
public class Contact
{
    public int Id { get; set; }

    public string Name { get; set; } = String.Empty;
    public string ShortName { get; set; } = String.Empty;
    public string Email { get; set; } = String.Empty;
    public string PhoneNumber { get; set; } = String.Empty;
}

Then have a validation check like:
        if (Contact.Name == Contact.ShortName) {
            ModelState.AddModelError(nameof(Contact.ShortName),
                                               "Short name can't be the same as Name.");
        }

Code at https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/mvc/models/ModelStateError
It's easier to delete the existing code and create a new project and scaffold it.
Bonus points if you move from MVC to Razor Pages.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 0156ffc3-47ac-d5da-fbc2-9ff5018b071b
Version Independent ID: 615db388-a244-41f7-21b5-a4085d9ed479
Content: Model validation in ASP.NET Core MVC
Content Source: aspnetcore/mvc/models/validation.md
Product: aspnet-core
Technology: aspnetcore-mvc
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Associated WorkItem - 66362

@sammychinedu2ky  Let me know if you're interest in this.
I think the Contact.Name == Contact.ShortName is a more natural first example to show. The others would be better done by remote validation, but we won't do remote validation in this sample. It's good to show what you have, but after name/shortname check.

I should use this as the only sample validation in the code ? @Rick-Anderson

I should use this as the only sample validation in the code ? @Rick-Anderson

No, add this check to the code you have.

I should use this as the only sample validation in the code ? @Rick-Anderson

No, add this check to the code you have. I'll show the DB check. This check won't require a call to the DB.

alright

@Rick-Anderson you stated Bonus points if you move from MVC to Razor Pages. but then the following folder is under the MVC directory

@sammychinedu2ky  actually keep your MVC sample and add the code to check the short name is not the same. For bonus points create a RP version in the https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/RazorPages folder of the same thing.

@sammychinedu2ky actually keep your MVC sample and add the code to check the short name is not the same. For bonus points create a RP version in the https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/RazorPages folder of the same thing.

Alright chief

Fixed in 28445


thepiratebay: search language, EXTRA fixes

Again, tested with en and it. Works fine.

By default, if 'title' is used without language - then it's taking title with 'language' setting for this provider.


RDAP for Nameservers doesn't understand 404 Not Found

When looking up a nameserver that doesn't exist and the server returns a 404 the RDAP client responds with:
cameron$ ~/go/bin/rdap --server=rdap.local -t nameserver ns1.nonexistantnameserver.net
# Error: No RDAP servers responded successfully (tried 1 server(s))

Could you provide the verbose output? ~/go/bin/rdap -v --server=rdap.local -t nameserver ns1.nonexistantnameserver.net
Trying this on rdap.net (which returns a 404 as it doesn't support nameserver queries), I get "# Error: RDAP server returned 404, object does not exist."
Example of this is below:
[tfh@localhost rdap]$ ~/go/bin/rdap -v --server=rdap.net -t nameserver ns1.nonexistantnameserver.net
# OpenRDAP v0.0.1
#
# rdap: Configuring query...
# rdap: Using server 'http://rdap.net'
# rdap: Using disk cache (/home/tfh/.openrdap)
# rdap: Bootstrap URL is default 'https://data.iana.org/rdap/'
# rdap: Bootstrap cache TTL set to 3600 seconds
# rdap: Timeout is 30 seconds
#
# client: Running...
# client: Request type  : nameserver
# client: Request query : ns1.nonexistantnameserver.net
# client: Request URL   : http://rdap.net/nameserver/ns1.nonexistantnameserver.net
# client: RDAP URL #0 is http://rdap.net/nameserver/ns1.nonexistantnameserver.net
# client: GET http://rdap.net/nameserver/ns1.nonexistantnameserver.net
# client: status-code=404, content-type=text/html; charset=utf-8, length=4961 bytes, duration=350.140947ms
#
# rdap: Finished in 350.488512ms
# Error: RDAP server returned 404, object does not exist.
[tfh@localhost rdap]$

I appear to be getting the same @skip2. Not sure why I was getting a different output then vs. now but I'll close this issue and reopen it should I manage to reproduce it again. In which case I'll attach the verbose response.


[BUG] Cases Mispelling

Describe the bug
The word cases is misspelled as casis on page 2 of the dashboard
To Reproduce
Steps to reproduce the behavior:

Go to 'page #2' on the Daily Positive Casis graph

Expected behavior
Casis should be spelled as Cases
Screenshots

Desktop (please complete the following information):

OS: [e.g. iOS]: MacOS
Browser [e.g. chrome, safari] : Firefox
Version [e.g. 22]: 74

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Thanks, fixed.


Update README.md for validation

Details
This is a draft PR to trigger a build for validation purposes.
Motivation

Context

Pull request checklist

[ ] Addresses an existing issue: Fixes #0000
[ ] Added relevant unit test for your changes. (yarn test)
[ ] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
[ ] Ran precheckin (yarn precheckin)

Codecov Report

Merging #1797 (059b271) into main (74a96d8) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 059b271 differs from pull request most recent head 19f0027. Consider uploading reports for the commit 19f0027 to get more accurate results

@@           Coverage Diff           @@
##             main    #1797   +/-   ##
=======================================
  Coverage   94.52%   94.52%
=======================================
  Files          38       38
  Lines        1059     1059
  Branches      144      144
=======================================
  Hits         1001     1001
  Misses         58       58


Graphical bug in Skia version on text fields when updating the value.

Is your issue REALLY a bug?

[X] My issue is indeed a bug!
[X] I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

[X] I have searched the existing issues.

Is this issue related to iced?

[X] My hardware is compatible and my graphics drivers are up-to-date.

What happened?
Using the skia crate, text gets clipped oddly.
https://imgur.com/a/jRQpO3S
I am building a kiosk. When clicking a button on the simulated keyboard (these are all Iced buttons) to update the search field, the text is cropped. The graphical bug goes away if you move your mouse over the text field.
I've determined the issue is the clip_mask, as when I set it to "None" in the iced codebase, this issue no longer happens. I'll try to figure out exactly what's happening and why.
What is the expected behavior?
The full text should appear.
Version
master
Operating System
Windows
Do you have any log output?
No response

Debugging a bit, I found the height of the text is getting clipped where it should be 39.0 height, instead it's getting clipped to 19.5. I'll have to dive a lot deeper to figure out why.
Position: Point { x: 40.0, y: 59.5 }
Original paragraph bounds: Size { width: 17.666016, height: 39.0 }
Clip bounds: Rectangle { x: 40.0, y: 40.0, width: 1200.0, height: 39.0 }
new_rectangle: Some(Rectangle { x: 40.0, y: 59.5, width: 17.666016, height: 19.5 })


Reduce coupling between Tokenizer and TokenizerEngine

TokenizerEngine now no more has knowledge of individual token types, eliminating the need to update both Tokenizer and TokenizerEngine each time we need a new token type.
TokenizerEngine now takes and array of TokenRule objects as input configuration, the order of which also defines the order of tokenization. (Instead of taking a map of TokenType-TokenRule pairs and looking up rules by type.)
To make this change possible, I also eliminated all token-type specific logic from the engine:

The key field transform can now be applied to any token type, not only to *_PARAMETER tokens (though we still use it only for the latter).
The no-keyword-can-come-after-dot logic has been moved into disambiguateTokens() function, which already deals with several similar sorts of transformations of the tokens list.

Merging this in to build other things on top of it.


Implemented fixer for member-ordering and added corresponding tests.

PR checklist

[X] Addresses an existing issue: fixes #2023
[ ] New feature, bugfix, or enhancement
[X] Includes tests
[ ] Documentation update

Overview of change:
New fixer. See checkMembers JSDoc for implementation details.
Is there anything you'd like reviewers to focus on?
test/rules/member-ordering/alphabetize/ is failing, but the diff isn't showing anything. The .fix doesn't exactly mirror the error message in some cases, as many configurations have multiple correct orders; that shouldn't be an issue.
I'm currently using node.getFullStart() and node getEnd() to find the node source, however this doesn't match the typescript trivia ownership rules (see failing test test/rules/member-ordering/fix-trivia). I've seen ts.getLeadingCommentRanges, but that starts at the beginning of the comment and whitespace before the leading comments would get lost. It seems like the best way would be to split at the first line break after a node, but I haven't seen any corresponding utility functions. Anyone have any advice on the matter or a reference to another rule which does something similar?

CHANGELOG.md entry: [new-fixer] member-ordering

Thanks for your interest in palantir/tslint, @NaridaL! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

Anyone available to review this PR?

@ajafff ?

@giladgray Thanks for the review, do you have anything to add re: the two points I mentioned in the first post?

test/rules/member-ordering/alphabetize/ had a switched empty line and non-empty line, which wasn't showing up in the diff.
I went ahead and implemented a function to figure out the next newline after a node.
This should be mergeable now.

@NaridaL merge latest master to fix failing test.

I rebased and fixed the comments.

@giladgray Are you sure this fixeds #3965 ?

@NaridaL you wrote this... are you sure that it fixes it?

This doesn't actually do anything for #3965 . https://github.com/palantir/tslint/pull/3984 does, however.

Wow, I'm look forward to the member-ordering feature long time, Could publish an new npm beta version? I want to using it now.

@Justinidlerz  same for our team. Member ordering is hard to fix manually in a big project. @NaridaL, thank you for great feature! looking forward to see next release soon