Reading values from Row object

Hi,
I try to get some values from a Row object:
ObjectAdapter objectAd = openERPSession.getObjectAdapter("product.template");
filters.add("default_code","=", String.valueOf(default_code));
String[] tuple = new String[]{"id","name", "event_type_id"};
RowCollection products = objectAd.searchAndReadObject(filters, tuple);
if (products.isEmpty()){
logError("Errorr product not found");
setErrors(1);
return false;
}else{
Row product =  (Row) products.get(0);
Integer product_id = product.getID();
Integer event_type_id = product.get("event_type_id");  // Line 44
}
This code returns me the following error:
Line 44, Column 14: Assignment conversion not possible from type "java.lang.Object" to type "java.lang.Integer"
So I have tried:
Integer event_type_id = product.get("event_type_id").getValue();
No luck...
So I decided to refer to the wiki example with the following code:
for (Row  row : products){
Integer product_id = row.getID();
Integer event_type_id = row.get("event_type_id");
}
This code returns me the following error:
Line 46, Column 22: Operator ";" expected
Line 46 is the for (Row  row : products) statement. It seems that Java was expecting some iterator there.
Please help, I really need that working fast...

try something like this :
Object[] propertyIdName = (Object[])row.get(property);

/**
* Get id of a Many2One property of an object row. Static method.
*
* @param row object row
* @param property should be something like "xxx_id"
* @return propertyId the id of the property
*/
public static Integer getMany2OneId(final Row row, final String property) {
if (row != null && property != null) {
Object[] propertyIdName = (Object[])row.get(property);
// propertyIdName[0] = id of Many2One linked object
// propertyIdName[1] = name of Many2One linked object
return (propertyIdName == null ? null : (Integer)propertyIdName[0]);
}
return null;
}

Ok for a Many2One object.
I did modify my code to:
Object[] event_type_obj = (Object[])product.get("event_type_id");
Integer event_type_id = (Integer) event_type_obj[0];
and it works now.
But what about
String product_name = product.get("name");
Why is product.get("name") an object and how to get the product name from it?

Maybe the product name is an object because of translation but I have tried also that one:
default_code = product.get("default_code");
and product.get("default_code") is also an object.
I feel that something is missing in the wiki about the way we should read Odoo object attributes.


Add support of linkWithProvider and reauthenticateWithProvider

Replaced by https://github.com/firebase/firebase-ios-sdk/pull/3971


Segmentation fault, memory error? [There appear to be 1 leaked semaphore objects]

Hey there! First of all, thanks for your fantastic work here. Really love this project 😄
I'm trying to run the python library of argos, something like doing this in my code:
installed_languages = translate.get_installed_languages()
print([str(lang) for lang in installed_languages])

print("Installed argos languages:")
fr = [lang for lang in installed_languages if lang.name == "French"][-1]
en = [lang for lang in installed_languages if lang.name == "English"][-1]
es = [lang for lang in installed_languages if lang.name == "Spanish"][-1]
breakpoint()
translation_fr_en = fr.get_translation(en)
print(translation_fr_en.translate("Bonjour monde!"))

But I'm facing some issues.
To be more specific, I'm actually running with the Kedro framework inside of a pipeline module.
When running the above code, I got the following error:
23642 segmentation fault  kedro run --pipeline translate

Upon closer inspection, when setting up breakpoints, the following happens:
(Pdb) print(translation_fr_en.translate("Bonjour monde!"))
[1]    23698 segmentation fault  kedro run --pipeline translate_news
/Users/--/python/3.8.9/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Do you have any idea of what this could be?
In a notebook, I can run the following code no problem...

That's interesting, maybe some interaction between Kedro and CTranslate2? Argos Translate is in Python so no seg faults but CTranslate2 is the underlying C++ library. CTranslate2 makes use of multiple threads and processes so that may not work well with the framework.

Hi @PJ-Finlay - From the Kedro team here, also not sure why this is happening - Kedro is pure python too, the command above will be using the SequentialRunner which works in a single process/thread.
A question for @duarteocarmo are you using any node hooks?

Hey @datajoely! Actually not. This is in one of my modular pipelines. I’ve tried to independently run this part of my code with all available runners as well. (e.g., Sequential,Threaded, etc)
Does kedro use multithreading in any non expected way?
@PJ-Finlay is there a way to control the threading in Ctranslate via environment variables?

Not that I can find, @guillaumekln?

Hi @duarteocarmo! Can you share the Kedro files or procedure that I can directly execute to reproduce the issue? Thanks.

If it is a 3.8 issue perhaps downgrading to 3.7 may help? Unfortunately we can't release 3.9 support until our next 0.18.0 release (early 2022) as it's a breaking change.

Hey guys! @PJ-Finlay , @guillaumekln , and @datajoely, thanks for the amazing help!
I'm stripping out a minimum reproducible example from my code base, will post it here very soon :)

I'm getting the exact same error on Python 3.8.12 and Mac, but I'm running the code locally. I think there may be some library which is causing this, but I don't know how to locate it. Is upgrading to python 3.9 a must?
When I run a minimal example, it works. But when I try to use the translation feature around code of a bigger application (e.g. AzureML SDK, or a streamlit app), I'm getting a 'segmentation fault'


Support async object property methods

Just writing this here so that it's being tracked. I might attempt to take a stab at this if time allows one of these days....
Here's a small example of what's broken...
const foobar = {
    async foo() {
//  ^^^^^
        return Promise.resolve('foo');
    },
    bar: 'bar',
}

Should be pretty self-explanatory.

I think current highlighting is good enough. async is highlighted as keyword

In the case I present, async is highlighted as typescriptObjectLabel which is linked to keyword.
In the theme that I maintain, I remove that link because object labels are not highlighted the same way as keywords. So it would be nice to have a specific group targeting the async there, or, mark it as explicitly keyword.

Pull request is welcome.

I have updated it!


chore(avm): re-ordering routines by opcode order

Benchmark results
Metrics with a significant change:

proof_construction_time_sha256_100_ms (16): 5,427 (-18%)
proof_construction_time_sha256_30_ms (16): 1,408 (-21%)
avm_simulation_time_ms (Token:mint_public): 485 (+1031%)
avm_simulation_time_ms (Token:assert_minter_and_mint): 56.0 (-68%)
protocol_circuit_witness_generation_time_in_ms (private-kernel-reset-small): 1,326 (+23%)

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Proof generation
Each column represents the number of threads used in proof generation.

Metric
1 threads
4 threads
16 threads
32 threads
64 threads

proof_construction_time_sha256_ms
5,713
1,544
708
764 (+2%)
767 (-2%)

proof_construction_time_sha256_30_ms
11,696 (-3%)
3,146 (-2%)
:warning: 1,408 (-21%)
1,437 (-11%)
1,470 (-6%)

proof_construction_time_sha256_100_ms
43,642 (-1%)
11,741 (-1%)
:warning: 5,427 (-18%)
5,424 (-7%)
5,375 (-5%)

proof_construction_time_poseidon_hash_ms
79.0 (+1%)
34.0
35.0 (-20%)
59.0 (-9%)
88.0 (-3%)

proof_construction_time_poseidon_hash_30_ms
1,516
417
201
228 (-2%)
270 (+1%)

proof_construction_time_poseidon_hash_100_ms
5,748 (-1%)
1,565
718 (-1%)
777 (-1%)
794

L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
4 txs
8 txs
16 txs

l1_rollup_calldata_size_in_bytes
1,412
1,412
1,412

l1_rollup_calldata_gas
9,476
9,464
9,476

l1_rollup_execution_gas
611,215
611,354
611,517

l2_block_processing_time_in_ms
762 (-2%)
1,412
2,719

l2_block_building_time_in_ms
20,946
41,944
81,780

l2_block_rollup_simulation_time_in_ms
20,946
41,944
81,779

l2_block_public_tx_process_time_in_ms
17,936
38,727
78,516

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 8 txs.

Metric
3 blocks
5 blocks

node_history_sync_time_in_ms
7,004
9,831 (-1%)

node_database_size_in_bytes
12,251,216
16,224,336

pxe_database_size_in_bytes
16,254
26,813

Circuits stats
Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Function
time_ms
bytecode_size_in_bytes

GasToken:_increase_public_balance
69.4 (+1%)
13,790

GasToken:set_portal
17.6 (+1%)
3,339

Token:constructor
96.8 (+4%)
23,692

FPC:constructor
65.9 (+6%)
13,592

GasToken:mint_public
54.6 (+4%)
10,158

Token:mint_public
:warning: 485 (+1031%)
19,034

Token:assert_minter_and_mint
:warning: 56.0 (-68%)
12,925

AuthRegistry:set_authorized
30.7 (-8%)
7,812

FPC:prepare_fee
106 (-8%)
15,062

Token:transfer_public
40.7 (-22%)
31,218

FPC:pay_refund
125 (-10%)
25,260

Benchmarking:increment_balance
2,201
15,267

Token:_increase_public_balance
55.9 (+1%)
15,006

FPC:pay_refund_with_shielded_rebate
116
26,347

Public DB Access
Time to access various public DBs.

Function
time_ms

get-nullifier-index
0.151 (-5%)

Tree insertion stats
The duration to insert a fixed batch of leaves into each tree type.

Metric
1 leaves
16 leaves
64 leaves
128 leaves
256 leaves
512 leaves
1024 leaves

batch_insert_into_append_only_tree_16_depth_ms
10.4
16.7 (-1%)
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_count
16.8
31.7
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_ms
0.600
0.512 (-1%)
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_32_depth_ms
N/A
N/A
48.3
76.0
132
244
472 (-1%)

batch_insert_into_append_only_tree_32_depth_hash_count
N/A
N/A
95.9
159
287
543
1,055

batch_insert_into_append_only_tree_32_depth_hash_ms
N/A
N/A
0.492
0.466
0.455
0.442 (-1%)
0.440 (-1%)

batch_insert_into_indexed_tree_20_depth_ms
N/A
N/A
59.3 (-1%)
112
184
352
695 (-1%)

batch_insert_into_indexed_tree_20_depth_hash_count
N/A
N/A
109
207
355
691
1,363

batch_insert_into_indexed_tree_20_depth_hash_ms
N/A
N/A
0.501 (-1%)
0.501
0.486
0.476
0.476 (-1%)

batch_insert_into_indexed_tree_40_depth_ms
N/A
N/A
72.5
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_count
N/A
N/A
133
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_ms
N/A
N/A
0.516
N/A
N/A
N/A
N/A

Miscellaneous
Transaction sizes based on how many contract classes are registered in the tx.

Metric
0 registered classes
1 registered classes

tx_size_in_bytes
74,057
667,850

Transaction size based on fee payment method
| Metric |  |
| - |  |


Upgrade to good@7

The upgrade to good 7 needs changes to the way we use good, see changelogs: https://github.com/hapijs/good/issues/467
I looked into it but couldn’t figure it out myself, would be nice if someone with more experience good have a glance at it. We only use it in one file: plugins/logger.js

for reference: https://github.com/hapijs/good/issues/467

@christophwitzko can you maybe have a look at this? I tried to migrate it but too much stuff changed and we seemed to have used some internal APIs and I have no idea how to migrate it :/

see https://github.com/hapijs/good/issues/500#issuecomment-226604443

closing in favor of https://github.com/hoodiehq/camp/issues/35


Patch Posh

Is this[1] path currently required?
[1] https://github.com/StefanScherer/adfs2/blob/master/scripts/install-posh-git.ps1#L10

I think this is no longer required.


Added CostExport function

Added the "CostExport" function into the repository, which exports cost management data from an Azure subscription and exports it to Coralogix.
( ZIP of the function still needs to be uploaded and its link inserted into the ARM template)

Tom,
Thank you for contributing to the project. Please make sure your commits are signed. There are a number of ways to accomplish that depending on your OS. Let me know if you need assistance.

Should've signed it now.


Custom files not persisting after composer provisioning

Bug Report / Support Request

Your Environment
Vagrant 1.9.2
VirtualBox 5.1.14r112924
Your OS

macOS (version)

Full console output
NA - no reported errors
Summary
We have custom modules and themes, eg
web/drupal/sites/all/modules/custom/name
web/drupal/sites/all/themes/custom/name
On using drupal_build_composer: true the provisioning works fine but the above custom modules/themes directories are being removed from guest and host filesystem and git shows a bunch of deleted files.
Am I correct in assuming that I should be using .gitignore for all the files coming in from composer and only commit the custom code to the directory structure? If so, any idea where I can start looking as to why these files keep getting nuked?
Apologises I don't know what other detail I can add to report this issue. My files are all in place before provisioning then removed after provisioning. I was expecting that my custom files would persist and dovetail into the files brought in by composer

What are your config.yml settings how it handles a composer project?
Accroding to this: http://docs.drupalvm.com/en/latest/deployment/composer-package/  depenting on the settings it would use the command composer create-project .
That composer create-project requires the target to be empty so that phase could remove your files but did not exactly check it what are the safe quards against it in the provision files.
Id presume it would run that only for the first time if some specific files aren't present > after that it skips using the "create-project".
But probably you should use different composer variables like these to prevent it running it as a "create project":  http://docs.drupalvm.com/en/latest/deployment/composer/#using-composer-when-drupal-vm-is-a-composer-dependency-itself

Hi FinBoWa,
Yea I thought the same, you are certainly describing the behavior with the directory getting wiped on provision but config.yml has drupal_build_composer_project: false which looks like it should skip the create-project command. My custom variables for config.yml is below
vagrant_hostname: projectname.gla
destination: /home/drupalsites/projectname
drupal_build_composer: true
drupal_composer_path: "/home/drupalsites/projectname/composer.json"
drupal_composer_install_dir: "/home/drupalsites/projectname"
drupal_core_path: "/home/drupalsites/projectname/drupal"
post_provision_scripts:
- "../../scripts/server/vm-post.sh site-install compile-theme"
nodejs_npm_global_packages:

name: npm
name: eslint
name: bower
name: grunt-cli
name: forever-monitor

My post script just runs drush si and grunt.
I am going to take another look tomorrow and will report back - I must be missing something, I wanted to check I am encountering a problem and not completely missing the point on how this should work.

If you have drupal_build_composer set to true, this is the set of tasks that run on every provision:
https://github.com/geerlingguy/ansible-role-drupal/blob/master/tasks/build-composer.yml
It would only run composer install if it doesn't see an existing Drupal site (https://github.com/geerlingguy/ansible-role-drupal/blob/master/tasks/build-composer.yml#L28), and if you don't have any drupal_composer_dependencies listed, it wouldn't do any composer require commands...
Can you still provide the full console output? Maybe it's not detecting a Drupal codebase earlier in the process and then cleaning things out somehow?
One other thing—I notice you have destination: [something] in your list of variables above... do you actually define it as part of vagrant_synced_folders (see: https://github.com/geerlingguy/drupal-vm/blob/master/default.config.yml#L30), or is it just hanging out on its own line?
You have to define the entire vagrant_synced_folders variable if you want to override it. Otherwise Drupal VM will build everything inside the project's current working directory...

@mwestcti i'd also suggest on setting the drupalvm as a composer dependency per project: http://docs.drupalvm.com/en/latest/deployment/composer-dependency/#add-drupal-vm-as-a-composer-dependency
it makes life much simpler and you get your own dedicated box per project.


DOC-6339 correct introduced in bug vers rn

Addresses: DOC-6339

Corrected release notes for https://github.com/cockroachdb/cockroach/pull/92713 and it's backport PR https://github.com/cockroachdb/cockroach/pull/92881 to change "introduced in" from 22.1.0 to 20.2.0.
Also corrected upstream PR desc text to match x 2.

Staging

v23.1.md
v22.1.md

Thanks much!


Add go generate support for types_unix.go

We still need to generate the relevant files for Mac OS X and *BSDs.

@prashanthpai Could you review this?

Thanks @prashanthpai


Save button won't work when there is an item with the same path within your navigation

Save button won't work when there is an item with the same path within your menu, in my example I was some levels deep inside the menu, but I think it doesn't matter where you are.

Steps to reproduce

Add a menu item with an internal source with some path
Save
Add another menu item with the same path
Save

Expected: The form gives an error or a warning about that you can't use the same path
Actual: The form does nothing and no feedback is given
Version:

Hi @nicknijenhuis
A PR covering your issue is in review.

Fixed in v2.2.13


How is x.pt file generated with the extension  python test.py  --few_shot_dir

Thank you for doing a great job. I have a question here: First, I use my own  few-shot normal sample training to verify defect detection. I need x.pt format file for the parameter --few_shot_dir in Python test.py. I don't know how to convert a normal sample to. pt? Please give me help. thanks.

few_shot_path = os.path.join(cfg.few_shot_dir, cfg.category+".pt")
normal_list = torch.load(few_shot_path)

Hi, you can use torch.save() to generate .pt file for your own few-shot samples.


x/tools/gopls: formatting result breaks the code

What version of Go are you using (go version)?

$ go version
go version go1.15.6 darwin/amd64

$ gopls version
golang.org/x/tools/gopls v0.6.10
<EMAIL_ADDRESS>h1:8Ebz8PymS2umcuCFhoz67unyJfWsipjTIrkBUF9kypg=

$ code -v
1.55.2
3c4e3df9e89829dce27b7b5c24508306b151f30d
x64

VSCode settings.json
All of the go/gopls related parameters use default values, but
"go.languageServerFlags": ["-rpc.trace"] for the tracing.
What did you do?
The formatting result on saving broke the code.
IMPORTANCE to reproduce:

No empty line or  more than ONE empty line at the end of the file.
More than TWO places(code blocks) need to be indented. // (1) (2)
The last element of the second block is a data type with the "}" character, e.g. map, struct.

The comments just for explanation, please remote them before testing.
package main

type Issue struct{
	Dummy int
}

var (
	foo = "bar" // (1)
	someIssues = []interface{}{
			Issue{}, // (2)
			Issue{}, // (2)
			Issue{}, // (2)
	}
) // no empty line at EOF

What did you expect to see?
package main

type Issue struct {
	Dummy int
}

var (
	foo        = "bar"
	someIssues = []interface{}{
		Issue{},
		Issue{},
		Issue{},
	}
)
// an empty line here

What did you see instead?
package main

type Issue struct{
{
{
	Dummy int
{
}
{

{
var (
{
	foo = "bar"
{
	someIssues = []interface{}{
{
			Issue{},
{
			Issue{},
{
			Issue{},
{
	}
	Dummy int

gopls (server) trace output
[Trace - 17:27:10.895 PM] Sending request 'textDocument/codeAction - (52)'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go"},"range":{"start":{"line":0,"character":0},"end":{"line":13,"character":1}},"context":{"diagnostics":[],"only":["source.organizeImports"]}}
[Trace - 17:27:10.900 PM] Received response 'textDocument/codeAction - (52)' in 4ms.
Result: null
[Trace - 17:27:10.905 PM] Sending request 'textDocument/formatting - (53)'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go"},"options":{"tabSize":4,"insertSpaces":false}}
[Trace - 17:27:10.915 PM] Received response 'textDocument/formatting - (53)' in 9ms.
Result: [{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":""},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"{\n{\n"},{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":0}},"newText":"{\n"},{"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":0}},"newText":"{\n\n{"},{"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":0}},"newText":"{\n"},{"range":{"start":{"line":8,"character":0},"end":{"line":8,"character":0}},"newText":"{\n"},{"range":{"start":{"line":9,"character":0},"end":{"line":9,"character":0}},"newText":"{\n"},{"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":0}},"newText":"{\n"},{"range":{"start":{"line":11,"character":0},"end":{"line":11,"character":0}},"newText":"{\n"},{"range":{"start":{"line":12,"character":0},"end":{"line":12,"character":0}},"newText":"{\n"},{"range":{"start":{"line":13,"character":0},"end":{"line":14,"character":0}},"newText":""},{"range":{"start":{"line":14,"character":0},"end":{"line":14,"character":0}},"newText":"\tDummy int"}]
[Trace - 17:27:10.946 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go","version":7},"contentChanges":[{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":1}},"rangeLength":0,"text":"\tDummy int"},{"range":{"start":{"line":13,"character":0},"end":{"line":13,"character":1}},"rangeLength":1,"text":""},{"range":{"start":{"line":12,"character":0},"end":{"line":12,"character":0}},"rangeLength":0,"text":"{\n"},{"range":{"start":{"line":11,"character":0},"end":{"line":11,"character":0}},"rangeLength":0,"text":"{\n"},{"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":0}},"rangeLength":0,"text":"{\n"},{"range":{"start":{"line":9,"character":0},"end":{"line":9,"character":0}},"rangeLength":0,"text":"{\n"},{"range":{"start":{"line":8,"character":0},"end":{"line":8,"character":0}},"rangeLength":0,"text":"{\n"},{"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":0}},"rangeLength":0,"text":"{\n"},{"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":0}},"rangeLength":0,"text":"{\n\n{"},{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":0}},"rangeLength":0,"text":"{\n"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"rangeLength":0,"text":"{\n{\n"}]}
[Trace - 17:27:10.950 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///private/tmp/issue.go","version":7,"diagnostics":[{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"severity":1,"source":"syntax","message":"expected '}', found '{'"}]}
[Trace - 17:27:11.065 PM] Sending notification 'textDocument/didSave'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go"}}
[Trace - 17:27:11.195 PM] Sending request 'textDocument/foldingRange - (54)'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go"}}
[Trace - 17:27:11.198 PM] Sending request 'textDocument/codeLens - (55)'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go"}}
[Trace - 17:27:11.208 PM] Received response 'textDocument/foldingRange - (54)' in 13ms.
Result: []
[Trace - 17:27:11.209 PM] Received response 'textDocument/codeLens - (55)' in 10ms.
Result: null
[Trace - 17:27:11.278 PM] Sending request 'textDocument/documentSymbol - (56)'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go"}}
[Trace - 17:27:11.279 PM] Received response 'textDocument/documentSymbol - (56)' in 1ms.
Result: [{"name":"Issue","detail":"struct{...}","kind":23,"range":{"start":{"line":2,"character":5},"end":{"line":3,"character":1}},"selectionRange":{"start":{"line":2,"character":5},"end":{"line":2,"character":10}}}]
[Trace - 17:27:11.446 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///private/tmp/issue.go","type":2}]}
[Trace - 17:27:11.924 PM] Sending request 'textDocument/documentLink - (57)'.
Params: {"textDocument":{"uri":"file:///private/tmp/issue.go"}}
[Trace - 17:27:11.943 PM] Received response 'textDocument/documentLink - (57)' in 18ms.
Result: null

Thanks for the report. This looks very broken.
I am not able to reproduce. This is not surprising: if formatting were so easily broken, there would be many more reports. I suspect, instead, that there is either a conflicting formatting tool running in your editor, or perhaps some very strange edge case bug in the formatting logic, perhaps related to line endings.
If you are able to reproduce, we can try to narrow this down together. Questions for you:

Are you able to reliably reproduce this bug?
Do you have any other extensions installed that would auto-format?
Are you on windows?
To avoid any loss of fidelity in the repro at byte level, could you send me a base64-encoded copy of your repro? On linux, you can get this via base64 main.go.

@findleyr I am on windows and made the test file with windows line endings and I am not able to reproduce this on gopls v0.6.10

@AlexRouSg thanks for trying. I actually just noticed that GOOS/GOARCH is darwin/amd64, so this probably isn't related to line endings.

i'm able to reproduce this on linux
interesting enough, its only happen if i'm format the code using gopls format main.go but not with gopls imports main.go
also not happen with the old goimpors

Thanks so much for the careful repro steps! This is very helpful.
Surprisingly, I still cannot repro. We're brainstorming how this could be possible.
> echo -n 'cGFja2FnZSBtYWluCgp0eXBlIElzc3VlIHN0cnVjdHsKCUR1bW15IGludAp9Cgp2YXIgKAoJZm9vID0gImJhciIKCXNvbWVJc3N1ZXMgPSBbXWludGVyZmFjZXt9e
woJCQlJc3N1ZXt9LAoJCQlJc3N1ZXt9LAoJCQlJc3N1ZXt9LAoJfQop' | base64 -d > issue.go
> gopls format issue.go
package main

type Issue struct {
        Dummy int
}

var (
        foo        = "bar"
        someIssues = []interface{}{
                Issue{},
                Issue{},
                Issue{},
        }
)
> gopls version
golang.org/x/tools/gopls v0.6.10
    golang.org/x/tools/gopls@(devel)
> go version
go version go1.15.6 linux/amd64

i'm able to reproduce this on linux
interesting enough, its only happen if i format the code using gopls format main.go but not with gopls imports main.go
also not happen with the old goimpors

Yes, me too. Both on MacOS and Linux, gopls format meets the bad result, and gopls imports not.

Can someone who can reproduce this show us the output of locale?

Can someone who can reproduce this show us the output of locale?

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

OK. We're quite stumped, so, silly as it seems, can you attach your gopls binary to this issue?

gopls compiled with CGO_ENABLED=1
gopls.zip

Thanks, that was extremely helpful.
The problem is that the latest version of github.com/sergi/go-diff doesn't work well with gopls. I don't know where the bug is yet, but if you do GO111MODULE=on go get -u golang.org/x/tools/gopls@latest, the -u causes all dependencies to be upgraded and you get a broken gopls.
Reinstall without the -u and I believe the problem will go away.

Reinstall without the -u and I believe the problem will go away.

@heschi Thanks for your detailed analysis.
I can get the right formatting result after reinstall gopls without "-u".

@zaakn can you tell us how you installed gopls with -u before? I want to understand how to improve VSCode Go's tool installation process.


Cargo.toml - wrong repo link

Should be https://github.com/jeremychone/rust-httpc-test

fixed in v0.1.4


Database error when migrating from 1.4.2 to 1.5.1 under MySQL 8

A migration failed to apply on my MySQL database when migrating from superset 1.4.2 to 1.5.1
How to reproduce the bug

Setup a superset 1.4.2 that use a MySQL 8 database
Update superset to version 1.5.1
Run superset db upgrade

Expected results
MySQL database upgrade succeeded.
Actual results
rename_csv_to_file migration fails with the following log:
Running upgrade aea15018d53b -> b92d69a6643c, rename_csv_to_file
...
sqlalchemy.exc.DatabaseError: (mysql.connector.errors.DatabaseError) 3959 (HY000): Check constraint 'dbs_chk_9' uses column 'allow_csv_upload', hence column cannot be dropped or renamed.
[SQL: ALTER TABLE dbs CHANGE allow_csv_upload allow_file_upload BOOL NULL]

See below for full log with stack traces.
Screenshots
N/A
Environment
(please complete the following information):

browser type and version: n/a
superset version: 1.5.1
python version: 3.8.12
node.js version: n/a
any feature flags active: FEATURE_FLAGS = {"ALERT_REPORTS": True}

Checklist
Make sure to follow these steps before submitting your issue - thank you!

[X] I have checked the superset logs for python stacktraces and included it here as text if there are any.

Installing local overrides at /app/docker/requirements-local.txt
Collecting clickhouse-driver>=0.2.0
  Downloading clickhouse_driver-0.2.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (732 kB)
Collecting clickhouse-sqlalchemy<0.2.0,>=0.1.6
  Downloading clickhouse-sqlalchemy-0.1.10.tar.gz (34 kB)
Collecting mysql-connector-python
  Downloading mysql_connector_python-8.0.29-cp38-cp38-manylinux1_x86_64.whl (25.2 MB)
Collecting flask-oidc==1.3.0
  Downloading flask-oidc-1.3.0.tar.gz (29 kB)
Requirement already satisfied: Flask in /usr/local/lib/python3.8/site-packages (from flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (1.1.4)
Requirement already satisfied: itsdangerous in /usr/local/lib/python3.8/site-packages (from flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (1.1.0)
Collecting oauth2client
  Downloading oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Requirement already satisfied: six in /usr/local/lib/python3.8/site-packages (from flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (1.16.0)
Collecting tzlocal
  Downloading tzlocal-4.2-py3-none-any.whl (19 kB)
Requirement already satisfied: pytz in /usr/local/lib/python3.8/site-packages (from clickhouse-driver>=0.2.0->-r /app/docker/requirements-local.txt (line 1)) (2021.1)
Requirement already satisfied: sqlalchemy<1.4,>=1.3 in /usr/local/lib/python3.8/site-packages (from clickhouse-sqlalchemy<0.2.0,>=0.1.6->-r /app/docker/requirements-local.txt (line 2)) (1.3.24)
Requirement already satisfied: requests in /usr/local/lib/python3.8/site-packages (from clickhouse-sqlalchemy<0.2.0,>=0.1.6->-r /app/docker/requirements-local.txt (line 2)) (2.26.0)
Collecting protobuf>=3.0.0
  Downloading protobuf-4.21.2-cp37-abi3-manylinux2014_x86_64.whl (407 kB)
Requirement already satisfied: click<8.0,>=5.1 in /usr/local/lib/python3.8/site-packages (from Flask->flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (7.1.2)
Requirement already satisfied: Jinja2<3.0,>=2.10.1 in /usr/local/lib/python3.8/site-packages (from Flask->flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (2.11.3)
Requirement already satisfied: Werkzeug<2.0,>=0.15 in /usr/local/lib/python3.8/site-packages (from Flask->flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (1.0.1)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.8/site-packages (from Jinja2<3.0,>=2.10.1->Flask->flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (2.0.1)
Collecting httplib2>=0.9.1
  Downloading httplib2-0.20.4-py3-none-any.whl (96 kB)
Collecting pyasn1-modules>=0.0.5
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting rsa>=3.1.4
  Downloading rsa-4.8-py3-none-any.whl (39 kB)
Collecting pyasn1>=0.1.7
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Requirement already satisfied: pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2 in /usr/local/lib/python3.8/site-packages (from httplib2>=0.9.1->oauth2client->flask-oidc==1.3.0->-r /app/docker/requirements-local.txt (line 4)) (3.0.6)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/site-packages (from requests->clickhouse-sqlalchemy<0.2.0,>=0.1.6->-r /app/docker/requirements-local.txt (line 2)) (3.2)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.8/site-packages (from requests->clickhouse-sqlalchemy<0.2.0,>=0.1.6->-r /app/docker/requirements-local.txt (line 2)) (2.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/site-packages (from requests->clickhouse-sqlalchemy<0.2.0,>=0.1.6->-r /app/docker/requirements-local.txt (line 2)) (2021.5.30)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/site-packages (from requests->clickhouse-sqlalchemy<0.2.0,>=0.1.6->-r /app/docker/requirements-local.txt (line 2)) (1.26.6)
Collecting pytz-deprecation-shim
  Downloading pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
Collecting backports.zoneinfo
  Downloading backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl (74 kB)
Collecting tzdata
  Downloading tzdata-2022.1-py2.py3-none-any.whl (339 kB)
Building wheels for collected packages: flask-oidc, clickhouse-sqlalchemy
  Building wheel for flask-oidc (setup.py): started
  Building wheel for flask-oidc (setup.py): finished with status 'done'
  Created wheel for flask-oidc: filename=flask_oidc-1.3.0-py2.py3-none-any.whl size=17189 sha256=b44def1b75138b178af4550a01a287b4554ad286bd6927e52e1d6a6c16691293
  Stored in directory: /root/.cache/pip/wheels/db/b6/13/1a8597c4b0687cc46c2f48a81e5921b7d670bd1e9e69db9b14
  Building wheel for clickhouse-sqlalchemy (setup.py): started
  Building wheel for clickhouse-sqlalchemy (setup.py): finished with status 'done'
  Created wheel for clickhouse-sqlalchemy: filename=clickhouse_sqlalchemy-0.1.10-py3-none-any.whl size=44827 sha256=683ad54664be2f5c8c94ccad99a585981297be2b691abf393768816663e10943
  Stored in directory: /root/.cache/pip/wheels/02/e4/af/014e5992ebffb3dff64ebf16af5aed3fcf018305f5b0c04919
Successfully built flask-oidc clickhouse-sqlalchemy
Installing collected packages: tzdata, backports.zoneinfo, pytz-deprecation-shim, pyasn1, tzlocal, rsa, pyasn1-modules, httplib2, protobuf, oauth2client, clickhouse-driver, mysql-connector-python, flask-oidc, clickhouse-sqlalchemy
Successfully installed backports.zoneinfo-0.2.1 clickhouse-driver-0.2.4 clickhouse-sqlalchemy-0.1.10 flask-oidc-1.3.0 httplib2-0.20.4 mysql-connector-python-8.0.29 oauth2client-4.1.3 protobuf-4.21.2 pyasn1-0.4.8 pyasn1-modules-0.2.8 pytz-deprecation-shim-0.1.0.post0 rsa-4.8 tzdata-2022.1 tzlocal-4.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

######################################################################

Init Step 1/4 [Starting] -- Applying DB migrations

######################################################################

logging was configured successfully
2022-07-12 14:01:04,452:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-07-12 14:01:04,470:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2022-07-12 14:01:04,472:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2022-07-12 14:01:04,476:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade aea15018d53b -> b92d69a6643c, rename_csv_to_file
Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 535, in cmd_query
    self._cmysql.query(query,
_mysql_connector.MySQLInterfaceError: Check constraint 'dbs_chk_9' uses column 'allow_csv_upload', hence column cannot be dropped or renamed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.8/site-packages/mysql/connector/cursor_cext.py", line 269, in execute
    result = self._cnx.cmd_query(stmt, raw=self._raw,
  File "/usr/local/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 540, in cmd_query
    raise errors.get_mysql_exception(exc.errno, msg=exc.msg,
mysql.connector.errors.DatabaseError: 3959 (HY000): Check constraint 'dbs_chk_9' uses column 'allow_csv_upload', hence column cannot be dropped or renamed.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/superset", line 33, in <module>
    sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 426, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_migrate/cli.py", line 149, in upgrade
    _upgrade(directory, revision, sql, tag, x_arg)
  File "/usr/local/lib/python3.8/site-packages/flask_migrate/__init__.py", line 98, in wrapped
    f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_migrate/__init__.py", line 185, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "/usr/local/lib/python3.8/site-packages/alembic/command.py", line 294, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.8/site-packages/alembic/script/base.py", line 490, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 97, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/local/lib/python3.8/site-packages/alembic/util/compat.py", line 184, in load_module_py
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/app/superset/extensions/../migrations/env.py", line 126, in <module>
    run_migrations_online()
  File "/app/superset/extensions/../migrations/env.py", line 118, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/usr/local/lib/python3.8/site-packages/alembic/runtime/environment.py", line 813, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/local/lib/python3.8/site-packages/alembic/runtime/migration.py", line 561, in run_migrations
    step.migration_fn(**kw)
  File "/app/superset/migrations/versions/b92d69a6643c_rename_csv_to_file.py", line 37, in upgrade
    batch_op.alter_column(
  File "/usr/local/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.8/site-packages/alembic/operations/base.py", line 336, in batch_alter_table
    impl.flush()
  File "/usr/local/lib/python3.8/site-packages/alembic/operations/batch.py", line 86, in flush
    fn(*arg, **kw)
  File "/usr/local/lib/python3.8/site-packages/alembic/ddl/mysql.py", line 70, in alter_column
    self._exec(
  File "/usr/local/lib/python3.8/site-packages/alembic/ddl/impl.py", line 146, in _exec
    return conn.execute(construct, multiparams)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
    return connection._execute_ddl(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1068, in _execute_ddl
    ret = self._execute_context(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.8/site-packages/mysql/connector/cursor_cext.py", line 269, in execute
    result = self._cnx.cmd_query(stmt, raw=self._raw,
  File "/usr/local/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 540, in cmd_query
    raise errors.get_mysql_exception(exc.errno, msg=exc.msg,
sqlalchemy.exc.DatabaseError: (mysql.connector.errors.DatabaseError) 3959 (HY000): Check constraint 'dbs_chk_9' uses column 'allow_csv_upload', hence column cannot be dropped or renamed.
[SQL: ALTER TABLE dbs CHANGE allow_csv_upload allow_file_upload BOOL NULL]
(Background on this error at: http://sqlalche.me/e/13/4xp6)

[X] I have reproduced the issue with at least the latest released version of superset.
[X] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
I try also to update my superset 1.4.2 to 1.5.0 but I have the same error.

I've the same issue with a fresh install of SuperSet 2.0
Python 3.8.12
Flask 2.1.3
Werkzeug 2.0.3

This happens because the migration uses the exception "sa.exc.OperationalError" but in MySQL the exception should be "sa.exc.DatabaseError". The migration passes if you change line 42 to read "except sa.exc.DatabaseError:"


Wrapping Guild API

will do most of the guild api endpoints here

latest commit shows the motivation for adding another encoding option in the disccord::models::model class. makes things a bit cleaner in the request method. thoughts?

Okay, I'll merge this in now and then I'll mess around with it to see if I can't clean up the code.


[WIP] DLEQ proofs

Todo:

[ ] Bob produces DLEQ proof
[ ] DLEQ verification for Bob -> Alice
[ ] DLEQ verification Alice -> Carol
[ ] Write tests for mint
[ ] Write tests for wallet

Codecov Report
Patch coverage: 97.18% and project coverage change: +0.21 :tada:

Comparison is base (258de87) 51.51% compared to head (65be72b) 51.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   51.51%   51.72%   +0.21%
==========================================
  Files          36       36
  Lines        2780     2834      +54
==========================================
+ Hits         1432     1466      +34
- Misses       1348     1368      +20

Impacted Files
Coverage Δ

cashu/wallet/wallet.py
83.68% <95.65%> (+0.19%)
:arrow_up:

cashu/core/b_dhke.py
95.16% <97.22%> (+2.05%)
:arrow_up:

cashu/core/base.py
96.25% <100.00%> (-0.42%)
:arrow_down:

cashu/mint/ledger.py
31.40% <100.00%> (ø)

... and 2 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Question: Handling Websocket terminations

I am hoping this is a simple question(s), but takes a bit of explaining to arrive at the question.
We are looking at deploying a application built using this framework and deployed into our kubernetes environment running on top of GKE.  I work on the team that builds/manages the k8s / networking environments, not the ones building the actual chat application.  I did some work with a simple (hello world type) python chat room built using websockets and this is where we have discovered some potential challenges.

The Global Load Balances we use have a timeout that is basically a max session length (thus the ping_interval and ping_timout will not keep the session open past the timeout). Google also makes it clear that you can't assume that you will always reach the timeout before the connection could be terminated, due to say software upgrades or other uncontrollables.
We are also hearing from akamai (our traffic into our glb is from akamai) that you can't assume websockets will always work (upgrading the connection might fail or/and a http / websocket termination timeout like with google), thus you that you need to be able to fall back to using long lived http sessions.  https://techdocs.akamai.com/property-mgr/docs/websockets-support#limitations.  This is a recent discovery.

I did try to dig through the issues and documentation, but didn't find anything definitive, but hoping my assumptions are going to be true.  As I type this our application team is working to get the application up and running so we can test things out, but hoping to get some guidance or basic answers from this community to ensure we aren't  heading down a dead end path.
So the questions really get down to can we build a chat application using websockets and this framework to;

handle a websocket termination (i.e. something caused by network issues or a "session" timeout) so  in most cases the session can be reestablished without visual impact to the customer
and also give us the ability to manage a customer that is no longer active (i.e. prompt them they need to continue to be active and eventually disconnect them from chat room)

Thanks for any pointers or help as we seek to design and architect our chat system.
-Paul

The websocket functionality of Botkit is pretty simple.
The built in sample client does do reconnects if it loses the connection. Both the client and the server applications get events when the connections go up/down, so you can add custom handling.
There is nothing built into botkit to enable proactive prompting for inactivity. This would be something your developers would have to add by inspecting the internals of the websocket server for active connections.


Added gulp clean tasks

Fixes: https://github.com/olefredrik/FoundationPress/issues/680

@olefredrik any idea why the build is failing? It just stopped once it hit library/navigation.php when running the code sniff tests.

Closed and reopened the PR so the tests would run again, hoping that it was something wrong with Travis, but it's still not passing. I get nothing wrong with library/navigation.php when I run the code sniffs locally.

@colin-marshall : Seems to be an issue with Travis CI. Related: https://github.com/travis-ci/travis-ci/issues/3358
I'll check what's going on and see how this can be fixed.

Thanks @olefredrik! This can probably get merged in despite the build failing since none of this PR involves php.

@colin-marshall : I did some testing last night, hoping to get some answers for the Travis CI build failure. There is no way the build will pass unless I remove navigation.php. That does really make no sense to me, since the navigation.php has no errors and has previously passed the build without errors. I think it's good to have the WP Coding Standards check as part of the repository, but it's quite unfortunate if it should stop and err on files that are ok.

@olefredrik are there any differences between the CodeSniffing done locally and when it's done on Travis CI? To see if maybe a new WPCS rule was breaking the build, I removed the local CodeSniffing, cleared the composer cache, reinstalled, and tested locally. All CodeSniffs passed with a couple warnings, none of which had to do with navigation.php.

@olefredrik I have narrowed the problem down to the foundationpress_top_bar_r() function.

Finally resolved @olefredrik!!! This is what I came to conclude about the build issue:

There was a missing @link before the URL in the doc comments for foundationpress_top_bar_r() which was stalling the build
The comments inside of the array in that function were also stalling the build

While fixing this I noticed that the local wpcs was only checking php files in the root directory of the theme, so I fixed it so that it checks php files in all directories. When running the sniffs locally it didn't stall or give errors when it hit library/navigation.php. No clue what was going on with Travis but at least we found what was causing it.

Awesome, Colin!!! Thanks a lot! I'll sit down a few hours this evening and look through all recent issues. Just found a typo in the clean task I think. See comment above.


add support for installing react-scripts using npm link

When using npm link to depend on a forked version of react-scripts, the paths are set up incorrectly such that the source files in the react-scripts template get used instead of the actual source files from the app.
Repro steps:

Create a package using the public version of create-react-app.
Clone create-react-app from GitHub and convert packages/react-scripts to a scoped package. For example, change this:

  "name": "react-scripts",
  "version": "0.7.0",

to this:
  "name": "@tabrezm/react-scripts",
  "version": "0.0.0",

Run npm link from packages/react-scripts.
Run npm link @tabrezm/react-scripts from the folder for the package created in step 1. Also, change the following lines in package.json from this:

  "devDependencies": {
    "react-scripts": "0.7.0"
  },

to this
  "devDependencies": {
    "@tabrezm/react-scripts": "0.0.0"
  },

Change something in App.js and run npm start.

Expected: see new content
Actual: see content from  template in react-scripts instead
Full discussion: https://github.com/facebookincubator/create-react-app/issues/682#issuecomment-263500172

Hmm, ignore for now? I can't get this build failure to repro locally :(

with this change, are the scoped package steps still needed if you're not making a long running fork?
I want to be able to take my existing app, pull someone's branch for an open PR, run npm link, and see how those changes work in my app. And then npm unlink once I've gotten to test. This simple flow works with most other dependencies... can it work with react-scripts?

Yep, should work. Running npm link <react-script-module-name> from your app should change the path under node_modules to pick up the local dependency. The original issue (and my particular set up) were based on longer term forks.

Could you write up another explanation about why this works and solves that use case?
I read the comments but I still don’t get it. (Sorry!)

When you try to use npm link to reference a forked version of react-scripts, the original logic of paths.js uses the template from the react-scripts module (i.e. packages/react-scripts/template) instead of the app itself (e.g. src). You can see this by following the repro steps in the initial comment. After a ton of trial and error, I came up with a set of conditions for when to use the template, and when to use local source files of the app referencing react-scripts. There are effectively three cases to look for, so I'll walk through each one.

isRunningFromOwn: this is actually preserving the case noted by this comment.
isSmokeTest: this is a special case that I wasn't able to work around in a more elegant way. I'll talk about this one in the next case.
isRunningFromAppUsingLink: when using npm link, the current dir contains packages/react-scripts/template, which when using the current implementation, resolves the paths to point to the template in react-scripts instead of the source files in the app referencing react-scripts. When trying to separate this case out, I ran into two additional conditions I need to check for where it is valid to keep using the template:
a. process.env.npm_lifecycle_event === 'start': by checking for this, we ensure that we don't clobber the existing cases for build, publish, etc. where we don't want to look at an invalid path for the template. In other words, it's still correct to look for the template at packages/react-scripts/template.
b. !isSmokeTest: without checking for this case, the tests would break since they'd look at the wrong path for the template. I borrowed the special check for a smoke test from here.

With the special logic to track isRunningFromAppUsingLink, I refactored the existing usages of resolveApp and resolveOwn to handle this special case.

Tagging as 0.9.1 as I'd like us to understand what's the problem here, and maybe merge this in some form.

I believe that this is trying to accomplish what #1356 does, but in a much more convoluted way.
I appreciate all your hard work and explanations @tabrezm, but I'm going to close this in favor of #1356 since it is a more straightforward modification.
Please do not hesitate to reach out to us if this does not resolve your use case.
It will be available when 0.9.1 is released, or you can test it manually sooner. 😄


Support for the DB2 connector

Feature description
https://debezium.io/documentation/reference/2.6/connectors/db2.html

Done in https://github.com/kestra-io/plugin-debezium/pull/68


(#376) updated mapping predicate select/commenting

#376

@philbarker should we center the modal, or make it be "over" the sticky bar?

Some of those modals are so large that centering them will have no effect. How about increasing the top margit a notch for now?

@edgarf I'm happy with what @excelsior suggests, positioning them just below the "impersonating" banner would make sense


error with hxdiscord rpc while compiling the game (psych 1.0)

Describe your problem here.
sorry it's the second time i'm making an issue about a compiling error but i'm trying to compile the engine and it keeps giving me this error

i looked the versions it is confirmed to work and it says to use hxdiscord rpc 1.4.2 but that version don't seems to exist?? idk if i'm doing something wrong here so if someone can help me i would really appreciate!!!
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
nope

WIKI ERROR, use version 1.2.4

WIKI ERROR, use version 1.2.4

i checked and i already have that version and it still gives me that error

can u do haxelib list and send a screenshot

WIKI ERROR, use version 1.2.4

i checked and i already have that version and it still gives me that error

can u do haxelib list and send a screenshot

I'M SO SORRY FOR THE DELAY!!!!
here's the screenshot:


cmd/compile: make deadcode pass cheaper and do it after cse

[moved from discussion in CL 21981]
CSE can remove many values, so it'd be good to do a deadcode pass promptly after it, to speed up other passes. We used to, but it has slowly drifted away. However, deadcode allocates some potentially large slices: two work lists (small) and two bool slices (larger). We should make at least those bool slices reusable in f.Config and then add a deadcode after CSE.
cc @tzneal
Btw, @bradfitz, do you think it's worth having a label for compiler performance/speed (as opposed to compiled code performance)?

We used to have too many labels, so we're trying to make do with fewer these days. But build speed is a focus, so, sure. We can always delete it if unused.

I uploaded a CL, but I need some assistance in order to properly benchmark the change.

Please benchmark with godoc.org/rsc.io/compilebench and compare results with https://godoc.org/rsc.io/benchstat.

Seems unlikely to land in Go1.11, updated milestone accordingly.


Add implementation of list.pop()

This implements list.pop(). Does it look good?

Looks great! Thanks @stummjr!


Binary data ingestion plugin

Sorry for the double topic, but I think nobody was updated on my old issue, and I closed it -- I've created a new plugin for data ingestion. I'm able to load data, but for some reason the same network that is trained with the regular dataset (loaded from folders of images) produces strange results on the data I'm loading with the plugin. I'm guessing either the data or the labels are not in the correct format, but I can't actually see what is stored in the database.
My data is stored in a very simple format - a single binary file, first the label (from 0 to num_classes-1), stored as float32, then 1024 float32's of data (from 0 to 255, 32x32 image), then the next label and image and so on.
Some snippets of the data.py file, maybe you can spot the problem:
    @override
    def itemize_entries(self, stage):
        if not self.userdata['is_inference_db']:
            if stage == constants.TRAIN_DB:
                entries = self.read_bin(self.train_data_file)
            elif stage == constants.VAL_DB:
                if self.val_data_file:
                    entries = self.read_bin(self.val_data_file)
                else:
                    entries = []
            else:
                entries = []
        else:
            if stage == constants.TEST_DB:
                if not bool(self.test_data_file):
                    raise ValueError("You must provide a data file")
                else:
                    entries = self.read_bin(self.test_data_file, False)
            else:
                entries = []
        return entries

    def read_bin(self, filename, shuffle=True):
        entries = []
        with open(filename, "rb") as f:
            while True:
	        label = np.fromfile(f, dtype=np.float32, count=1)
	        if len(label) == 0:
	            break

	        image = np.fromfile(f, dtype=np.float32, count=1024)
	        entries = entries + [{'class': int(label), 'image': image}]
        return entries

and the encode_entry function
    @override
    def encode_entry(self, entry):
        label = np.array([entry['class']])
	image = entry['image']
        img = image.reshape(32, 32)
        sample = img[np.newaxis, ...]

        return sample, label

When I'm using the same network, with the last fully connected layer dimension set to the number of classes, the learning produces this:

I'm going to reply to myself as I solved this issue -- the label needs to be a 3D tensor for some reason. Adding
label = label[np.newaxis, np.newaxis, ...]
in the encode_entry function before returning solved the problem. I'm not sure why though, in the digitsDataPluginTextClassification example the label is just an array with a number...


Problem with case sensitivity when querying a view

I know Views are not fully supported, but I have a simple view that I am querying, and found to my suprise that it is case sensitive. When querying a table, it is not. I am using Azure DB, and looking at the debug output, I can see that in the table case, there is a WHERE clause with CHARINDEX, and since the Azure DB collation is case insensitive this works. However, when the entity is a view, that part of the WHERE clause is missing, so I am assuming it is happening in memory (and C# is case sensitive), so that explains the difference.
But why is the WHERE being done in memory for the view? What has EF core sneakily found out about the Entity that causes it to behave differently? In my OnModelCreating the setup is very simple:
	    modelBuilder.Entity<vwTenant>(b =>
	    {
	        b.ToTable("vwTenant");
	        b.HasKey(t => t.Id);
	    });

The views is in a context property like the rest of the tables
public DbSet vwTenants { get; set; }

@johnkwaters - EF doesn't do special processing just because EntityType is view and not a table. Client eval happens when EF cannot translate the Where clause to SQL. Please post your queries used against table & view.

I build the SQL dynamically, this is what I see output:
(QueryContext queryContext) => IEnumerable _ToSequence(
element: int Count(
source: IEnumerable _Select(
source: IEnumerable _Where(
source: IEnumerable _ShapedQuery(
queryContext: queryContext,
shaperCommandContext: SelectExpression:
SELECT [v].[NumKiosks], [v].[NumUsers], [v].[NumLocations], [v].[NumProducts], [v].[Id], [v].[Name], [v].[TenantTypeId], [v].[InvitationCode]
FROM [vwTenant] AS [v]
WHERE [v].[Active] = 1
,
shaper: ValueBufferShaper
)
,
predicate: (ValueBuffer _3) => False || bool new vwTenantDTO{
int TryReadValue(
valueBuffer: _3,
index: 0,
property: null
)
NumKiosks = TryReadValue(_3, 0, null),
int TryReadValue(
valueBuffer: _3,
index: 1,
property: null
)
NumUsers = TryReadValue(_3, 1, null),
int TryReadValue(
valueBuffer: _3,
index: 2,
property: null
)
NumLocations = TryReadValue(_3, 2, null),
int TryReadValue(
valueBuffer: _3,
index: 3,
property: null
)
NumProducts = TryReadValue(_3, 3, null),
int TryReadValue(
valueBuffer: _3,
index: 4,
property: null
)
Id = TryReadValue(_3, 4, null),
string TryReadValue(
valueBuffer: _3,
index: 5,
property: null
)
Name = TryReadValue(_3, 5, null),
int TryReadValue(
valueBuffer: _3,
index: 6,
property: null
)
TenantTypeId = TryReadValue(_3, 6, null),
string TryReadValue(
valueBuffer: _3,
index: 7,
property: null
)
InvitationCode = TryReadValue(_3, 7, null)
}
.Name.Contains(
value: "vilmate"
)
)
,
selector: (ValueBuffer _3) => new vwTenantDTO{
int TryReadValue(
valueBuffer: _3,
index: 0,
property: null
)
NumKiosks = TryReadValue(_3, 0, null),
int TryReadValue(
valueBuffer: _3,
index: 1,
property: null
)
NumUsers = TryReadValue(_3, 1, null),
int TryReadValue(
valueBuffer: _3,
index: 2,
property: null
)
NumLocations = TryReadValue(_3, 2, null),
int TryReadValue(
valueBuffer: _3,
index: 3,
property: null
)
NumProducts = TryReadValue(_3, 3, null),
int TryReadValue(
valueBuffer: _3,
index: 4,
property: null
)
Id = TryReadValue(_3, 4, null),
string TryReadValue(
valueBuffer: _3,
index: 5,
property: null
)
Name = TryReadValue(_3, 5, null),
int TryReadValue(
valueBuffer: _3,
index: 6,
property: null
)
TenantTypeId = TryReadValue(_3, 6, null),
string TryReadValue(
valueBuffer: _3,
index: 7,
property: null
)
InvitationCode = TryReadValue(_3, 7, null)
}
)
)
)
Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerConnection:Debug: Opening connection to database 'holojem-qa-sdb' on server 'holojem-qa-sql.database.windows.net'.
Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory:Information: Executed DbCommand (505ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT [v].[NumKiosks], [v].[NumUsers], [v].[NumLocations], [v].[NumProducts], [v].[Id], [v].[Name], [v].[TenantTypeId], [v].[InvitationCode]
FROM [vwTenant] AS [v]
WHERE [v].[Active] = 1

I am programatically building the expression analog to 'where name contains 'searchString''
Basically by using the string.Contains method.
THis translates to CHARINDEX for the tables
For the view it doesnt

The vwTenantDTO project to looks like:
    public class vwTenantDTO : TenantDTO     {         /// <summary>         /// The number of kiosks in this tenant         /// </summary>         public int NumKiosks { get; set; }         /// <summary>         /// The number of users in this tenant         /// </summary>         public int NumUsers { get; set; }         /// <summary>         /// The number of locations in this tenant         /// </summary>         public int NumLocations { get; set; }         /// <summary>         /// The number of products in this tenant         /// </summary>         public int NumProducts { get; set; }     }

With
    public class TenantDTO : IEntityId     {         /// <summary>         /// Unique ID         /// </summary>         public int Id { get; set; }         /// <summary>         /// The name of the Tenant         /// </summary>         public string Name { get; set; }         /// <summary>         /// The type of tenant         /// </summary>         public int TenantTypeId { get; set; } = (int) TenantTypes.Tenant;         /// <summary>         /// The code to use when signing up new users to the tenant         /// </summary>         public string InvitationCode { get; set; }     }

One difference is that the fluent table declaration specifies a unique index on that Name field, where as the view version doesnt

@johnkwaters - I am not able to reproduce this. With table and view both, I was getting contains translated to server. Unique index causes no effect on queries so that is not the reason. There may be something different in your model which is causing failed translation. Can you modifying following code so that it reproduces the issue you are seeing.
I used following code
public class Program
{
    public static void Main(string[] args)
    {
        using (var db = new MyContext())
        {
            var loggerFactory = db.GetService<ILoggerFactory>();
            loggerFactory.AddConsole(LogLevel.Information);
        }

        using (var db = new MyContext())
        {
            // Run queries
            var query = db.Blogs.Where(b => new BlogDTO
                                            {
                                                Id = b.Id,
                                                Title = b.Title
                                            }.Title.Contains("test"))
                .ToList();
        }

        Console.WriteLine("Program finished.");
    }
}

public class MyContext : DbContext
{
    // Declare DBSets
    public DbSet<Blog> Blogs { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        // Select 1 provider
        optionsBuilder
            .UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=_ModelApp;Trusted_Connection=True;")
        //     .UseSqlite("filename=_modelApp.db")
        //     .UseInMemoryDatabase(databaseName: "_modelApp")
            .EnableSensitiveDataLogging();
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        // Configure model
        modelBuilder.Entity<Blog>().ToTable("BlogView");
    }
}

public class Blog
{
    public int Id { get; set; }
    public string Title { get; set; }
}

public class BlogDTO
{
    public int Id { get; set; }
    public string Title { get; set; }
}

EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.


Publish v1.8.0

@garretwilson @amandabot @HookyQR @astronomersiva
@madman-bob @swan46 @LoganDark @MacKLess
@Mlocik97-issues @Hirse @jdavisclark
At this point the 1.8.0 release includes at least 80 fixed bugs and enhancements.  HTML and CSS/LESS/SCSS beautification have both seen massive improvements.  Not that performance is primary focus of this project, but the HTML beautifier in particular has seen 10x or more performance improvement.
I'd like to tie off this RC cycle and publish 1.8.0 (release). The latest 1.8.0-rc12 is up on http://jsbeautifier.org/  and npm and pypi.
If you can try out some of the inputs you use most or otherwise give this RC a sanity test drive, I'd be most grateful.
I plan to release soon.

Seems good.

I'm very excited about this. I hadn't been wanting to rush you, but I've been watching the release candidates with anticipation. You know that I'm anxious to get the fix for #1033 published.
I updated atom-beautify to the latest v0.33.0, and then I tried to follow my own directions at #1033 for testing that fix. According to my notes, I copied the entire contents of js/lib in the js-beautify distribution to ~/.atom/packages/atom-beautify/node_modules/js-beautify/js/lib, replacing the atom-beautify files there.
But now there doesn't seem to be a js/lib directory anymore, neither in the latest js-beautify-1.8.0-rc12.zip nor in the commit pull from master (3374af3).

@garretwilson
In the final release the atom plugin will get the  files from the npm package: https://registry.npmjs.org/js-beautify/-/js-beautify-1.8.0-rc12.tgz
There no change for any normal usage. We only stopped checking in the built files in the master branch as they are not interesting and they were was causing confusion for contributors trying to figure out what files they should edit.

For the Brackets extension I usually grab the files from that folder because I don't need the rest of the package.
Would it be possible to also add them to the release on GitHub?

Thanks a lot for your continuous efforts on this @bitwiseman!
I ran into a issue while trying out 1.8.0-rc12. I have submitted an issue for this.

@astronomersiva  - Thanks! It looks like @MacKLess  has submitted a PR with fix.
@Hirse  - I'd really rather not redo what is already available from npm.
I've submitted https://github.com/brackets-beautify/brackets-beautify/pull/266 that let's you easily update the files from the npm package (but also has js-beautify as devDependency so it won't get installed on user machines).

But here's a zip of the lib directory.

I tested this with the latest atom-beautify v0.33.0 (which is close to the same version I used to verify #1033), and it crashed:
ReferenceError: token is not defined
    at Beautifier.beautify (C:\Users\user\.atom\packages\atom-beautify\node_modules\js-beautify\js\lib\beautify-html.js:1530:29)
    at style_html (C:\Users\user\.atom\packages\atom-beautify\node_modules\js-beautify\js\lib\beautify-html.js:1150:21)
    at exports.html_beautify (C:\Users\user\.atom\packages\atom-beautify\node_modules\js-beautify\js\lib\beautify-html.js:2258:16)
    at file:///C:/Users/user/.atom/packages/atom-beautify/src/beautifiers/js-beautify.coffee:48:20
    at Promise._execute (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\debuggability.js:303:9)
    at Promise._resolveFromExecutor (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:483:18)
    at new Promise (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:79:10)
    at JSBeautify.module.exports.JSBeautify.beautify (file:///C:/Users/user/.atom/packages/atom-beautify/src/beautifiers/js-beautify.coffee:32:12)
    at file:///C:/Users/user/.atom/packages/atom-beautify/src/beautifiers/index.coffee:361:28
    at tryCatcher (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromiseCtx (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:606:10)
    at Async._drainQueue (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:138:12)
    at Async._drainQueues (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:143:10)
    at Async.drainQueues (C:\Users\user\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:17:14)
    at <anonymous>

Doesn't look good. Please don't release this.

@amandabot  The congrats include you. 😄
@garretwilson
No problem, thanks for trying.  There will be an rc13 tomorrow (see #1496 and the fix PR #1499).

@garretwilson
rc13 is released.
Download https://github.com/beautify-web/js-beautify/archive/gh-pages.zip  again to get the latest files.
@astronomersiva  - you're issue should be fixed now.

Regarding rc13, I have good news and bad news. The first good news is it doesn't crash anymore. Hooray!
More good news: remember in #1033 how I was overjoyed that inline elements finally were being formatted correctly, but I mentioned that
 inside a
 wasn't getting a line break, if it followed an inline element such as `:

Flyway schema_version table. (How Flyway works)

This wasn't a huge issue and I could live with it. Still I'm happy to say that this is now fixed in rc13 (and in rc12 as well, when it didn't crash)!

Flyway schema_version table. (How Flyway works)

It also improves other formatting inside
, such as

 having a line break before
 now like it should.
However there is a problem. There is a pretty big regression for indenting nested lists. The algorithm now seems to get confused about list levels, and list items in the nested lists get indented backwards! I've filed issue #1501.

@garretwilson  1.8.0-rc14 published - fixes #1501.

also I'm pleased to say there is basic support of optional html tags.

I was going to make a snide comment when I first saw this. I will never understand why people want to make non-well-formed content. Is it really so difficult to add an ending tag?
The problem is that when you have optional ending tags is that it suddenly makes the content really hard to parse (unless you have a well-designed parser rigorously following a clear grammar, which I'm not sure describes the case here). To resolve ambiguities you have to "guess" at what the person intended, and if guessing what people intend is hard for people, imagine for computers.
 Please be very careful to make sure it doesn't break the content of those of us who are trying our best to make well-formed content that aligns to the spec.
I hope you'll forgive the little soap-box speech; it's an issue I see across the industry.
I'll try to test the fix for #1501 today, but now I worry more about content across the board.

@garretwilson  Download  https://github.com/beautify-web/js-beautify/archive/gh-pages.zip again.

I'm afraid I wont' get to this today. I'm swamped with work and I have to take a few minutes' rest.
But thinking more about this, I'm still a little worried about this new feature of handling non-closed elements. Were a lot of in-depth test cases added to the code to make sure it works correctly in corner cases, and doesn't harm existing content? It worries me a little that bugs like this would be surfacing on the 14th release candidate. If my worry is needless and there are lots of unit tests, etc., then pardon my bringing it up. I haven't looked that the code; you guys would have a better handle on how safe and tested it is.

As I noted in #1507, it turns out I was tired and unzipped r13 when testing instead of r14. My mistake. I should have waited until tomorrow to test this as I originally intended. But I'm so anxious for it to be released!
Anyway, my overall concerns remain, but as I mentioned, you guys know better than I do how solid the new code is.

@garretwilson
This happens with any software release, you are just getting to see and be part of the process in this case. 😄
I understand how you feel but there have only been two bugs added since I opened this issue.  One was in the tricky area of unicode and whitespace handling, and the other was on the new feature of optional closing tags.  They were both easily understood and fixed.   The problems are specific, not systemic.
We're almost there.  Just a day or two more of banging on rc14 and it'll be out the door.

Okay, it's gone quiet here.  That's good.
I'm not going to ship a huge release like this on a Friday.
But unless something big comes in, 1.8.0 will go out early on Monday.

Great work!
Just reported: #1514 and https://github.com/beautify-web/js-beautify/issues/781#issuecomment-416342735
Thanks!

@gabrielmaldi  And you couldn't tell me about #1514 before release? 😄
Released 1.8.1.

Is there a Zip I can get of the 1.8.1 files? I'm waiting for @Glavin001 to integrate this into atom-beautify, so I have to keep manually updating my installation files. Thanks.

I'm waiting for @Glavin001 to integrate this into atom-beautify, so I have to keep manually updating my installation files.

@garretwilson : Atom-Beautify's version range for js-beautify is ^1.7.5: https://github.com/Glavin001/atom-beautify/blob/master/package.json#L194
Since the new release is 1.8.1 you can simply uninstall and reinstall Atom-Beautify to trigger an update of these dependencies, such as js-beautify. See https://semver.npmjs.com/ for the semver matching:

Even if the above was not possible, I do not see an open Pull Request for updating js-beautify dependency to 1.8.1: https://github.com/Glavin001/atom-beautify/pulls
I am not actively watching for changes to js-beautify or any other dependency. My current priority is the future of Atom-Beautify, which is https://unibeautify.com/ . If there is an update you want to see in Atom-Beautify, I recommend you submit a Pull Request and mention both @szeck87 and I (@szeck87 is much more involved with Atom-Beautify lately, as I've been prioritizing Unibeautify) to get it reviewed and merged. Thanks.

@Glavin001 ,

Atom-Beautify's version range for js-beautify is ^1.7.5: … Since the new release is 1.8.1 you can simply uninstall and reinstall Atom-Beautify to trigger an update of these dependencies, such as js-beautify.

Oh, that's nice! Great.
But the problem is that atom-beautify is hard-coding duplicate defaults (which I've cautioned against in the past), and because the fix for js-beautify #1033 requires changing the default value of unformatted, atom-beautify will have to change the defaults as well.
I requested this in https://github.com/Glavin001/atom-beautify/issues/2210 . (If you would simply remove the defaults we wouldn't have to keep doing this every time js-beautify tweaks its default values; that would be my preference.)

I commented at https://github.com/Glavin001/atom-beautify/issues/2210#issuecomment-417824930 . Please continue the Atom-Beautify related discussion there. Thanks!


Add script to upload dicom images

Hi there,
Since I needed to upload multiple dicom images to orthanc server I think this script would be useful. I propose to include this script in the original project to use mainly in development environment.
This script uses curl to upload a single dicom file or a directory recursively filtering by *.dcm and *.dicom extensions .
Usage:
DICOMWEB_HOST=<HOST> DICOMWEB_PORT=<PORT> scripts/dicom_upload.sh <DIRECTORY>|<FILE>

Hi Pedro,
Thanks for the contribution! We would rather not include utility functions in this repository. It's also probably just as easy for users to use DCMTK's storescu (http://support.dcmtk.org/docs/storescu.html).
If you put it in a Github gist we can link to it from the documentation, though!
Cheers,
Erik


feature(port): Adds advertisement port option

Adds the ability to select what port to start checking for availability
and then bind to the first port starting with the provided port.
If not provided then the existing default behavior provided by
portfinder is used.
Also updates portfinder to '1.0.x'.

Thanks a lot!


[Table] DataGrid Not Displaying Rows After Prop Change

I am running into a situation where data is not being displayed in the free datagrid after pagination change.

[X] The issue is present in the latest release.
[X] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
When I change the rows prop in the data grid after pagination, the new rows are not displayed

Expected Behavior 🤔
When I change the rows prop in the data grid after pagination, the new rows are displayed

Steps to Reproduce 🕹

github create-react-app example: https://github.com/AndrewOttavianoAbb/DataGridTest
CodeSandbox example: https://codesandbox.io/s/relaxed-frost-5kfqt?file=/src/Demo.tsx
Steps:

Render a datagrid with enough rows of data to cause pagination in the free datagrid
Paginate to a subsequent page (one advancement is sufficient)
Click the "change rows" button
Observe that the data for the second

Context 🔦
I am using the data grid (free version) to display search results. We have a button for viewing all results and it returns back lots of rows so we are paginating the results in the table. If the user clicks this "view all" button, paginates, and searches, the search rows are not displayed in the table. I have confirmed that we are getting data back from our service and the data is being passed in properly via props. The prop change causes a re-render and on re-render, the data is not displayed in the table. See screenshots and this create-react-app example.

Your Environment 🌎

`npx @material-ui/envinfo`
  System:
    OS: Windows 10 10.0.18363
  Binaries:
    Node: 12.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 90.0.4430.212 (<- used to test)
    Edge: Spartan (44.18362.449.0)

Another thing I noticed after some further testing. If you change the page size and add some data to the rows2 data set (the one that replaces the original data set), and page forward, it seems to start the second data set on a later page and not the first page as expected.
The weird thing is that when I try to reproduce this in my search project, it doesn't match the live example; it still won't show the data as described in the original issue.


[d3d11] Implement better filtering when blitting video content

@rbernon This is mostly intended to replace the NEAREST sampler so that we can still have proper interpolation when upscaling. Please let me know if there are issues with your test case.

Seems to be working as well, thanks!


[Carbon site] Series of issues

@jeanservaas

[ ]  The Accessibility color blindness chart is a strange size in desktop and mobile.

https://www.carbondesignsystem.com/guidelines/accessibility/color#designing-for-color-blindness

—————

[x]  Some spacing/padding issues here. The space above caption is tight and space after caption too tight

@aagonzales @jeanservaas

Transferred this issue to the correct repo, and removed comments that already had existing issues or belong in the GTC repo. Let's try to keep issues scoped to one specific thing going forward, it's easier for us to keep track of them that way.

I’ll do my best

This is what I'm seeing for desktop. What exactly is wrong about this? I have no idea what the image should look like. :eyes:

And should it just be full screen on mobile or something else entirely? Are we supposed to be using art direction with different images on this?

@jeanservaas do you know what the correct images should be?

The width needs to follow the body copy widths. And in mobile it should span margin to margin


Disable ModuleScopesPlugin

Hi StorybookJs,
I'm using the most recent version of your plugin. I just want to know if there's a way to disable ModuleScopesPlugin while using this preset?
I'm using CRA for my project and planning to add Storybook. My project structure is monorepo where in I have a package containing my design system. My design system has fonts folder on it and I'm using SASS.
monorepo
-> packages
   -> design-system
   -> my-react-project

.storybook/main.js
module.exports = {
  "stories": [
    "../src/**/*.stories.mdx",
    "../src/**/*.stories.@(js|jsx|ts|tsx)"
  ],
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/preset-create-react-app",
   ]
}

thanks,
Rem

Managed to resolve this using webpackFinal method. Here's is my main.js file.
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');

module.exports = {
  "stories": [
    "../src/**/*.stories.mdx",
    "../src/**/*.stories.@(js|jsx|ts|tsx)"
  ],
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/preset-create-react-app",
  ],
  webpackFinal: async (config, { configType }) => {
    config.resolve.plugins = config.resolve.plugins.filter(
      (plugin) => !(plugin instanceof ModuleScopePlugin)
    );
    return config;
  }
}


Latest update breaks on 10.6.8

I just updated to the latest version of youtube-dl, and it stopped working. Replaced it with an older version, it worked again, updated it, it stopped again.
$ yt NzuuU9PU9-c -F
[youtube] NzuuU9PU9-c: Downloading webpage
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 121, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 410, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 400, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1658, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 660, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 287, in extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 989, in _real_extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 438, in _download_webpage
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 345, in _download_webpage_handle
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 326, in _request_webpage
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1865, in urlopen
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
    response = self._open(req, data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
    '_open', req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
    result = func(*args)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 783, in https_open
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1098, in do_open
    h = http_class(host, timeout=req.timeout) # will parse host:port
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 623, in _create_http_connection
TypeError: __init__() keywords must be strings

For what it's worth, I also checked whether /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py was changed on my machine since a backup where everything worked fine, and this was not the case.
Thanks for any help.

Post the full output of youtube-dl when run with --verbose option.

Same error here.  i was just testing GTKplayYT my youtube-dl shell after updating youtube-dl and i get this error. actually had to load a older version of youtube-dl just to watch a video.

Update python to fix this currently.


disable not working as expected

calling FlPiP().disable(); has the same effect as calling FlPiP().enable(...);
When calling disable the app minimises and shows the PiP view.
I am not sure what I'm doing wrong, also there is no method calling disable() in the example app.
I would expect that calling disable() would disable the app from showing PiP when minimising.

Try updating to the latest version


cmder integrated terminal task issues

Issue Type: Bug

Download cmder from http://cmder.net/ and set as integrated terminal for windows using instructions here https://code.visualstudio.com/docs/editor/integrated-terminal#_common-questions
Create a simple.bat file with @echo this works.
Make a shell task that runs simple.bat as the command.
Run said task.

Actual results:
> Executing task in folder test_project: simple.bat

C:\sandbox\test_project
λ

Cursor sits there, echo does not happen and the task never completes.
Expected results:
> Executing task in folder test_project: simple.bat

this works

Thoughts:
If we must use the integrated terminal to run tasks, could we have an option to use a different shell for these tasks if they don't play nice with the task system?
VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:38:45.278Z)
OS version: Windows_NT x64 10.0.16299

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3392)

Memory (System)
15.95GB (7.93GB free)

Process Argv
C:\Program Files\Microsoft VS Code\Code.exe

Screen Reader
no

VM
0%

Extensions (16)

Extension
Author (truncated)
Version

language-x86-64-assembly
13x
2.2.11

better-comments
aar
1.2.2

vscode-color
ans
0.4.5

gitlens
eam
8.2.4

vscode-html-css
ecm
0.2.0

Go
luk
0.6.78

vscode-todo-parser
min
1.9.1

python
ms-
2018.3.1

cpptools
ms-
0.16.1

debugger-for-chrome
msj
4.3.0

material-icon-theme
PKi
3.3.0

stylelint
shi
0.36.0

vscode-hexdump
sle
1.6.0

vim
vsc
0.11.5

vscode-wakatime
Wak
1.2.1

html-css-class-completion
Zig
1.17.1

You can specify a shell to use in the tasks.json file:
{
	"version": "2.0.0",
	"options": {
		"shell": {
			"executable": "cmd.exe",
			"args": [
				"/d", "/c"
			]
		}
	},
	"tasks": [
		{
			"label": "echo",
			"type": "shell",
			"command": "dir"
		}
	]
}

The options can be specified per tasks as well.
Do you know which command line args cmder use to execute a command and then quite (like /d /c for cmd.exe). Then I can add them. As a work around for now you can have the options in the tasks.json point to cmder.exe and use the right options.

@nicholasjbbaldwin any information?

The problem is that the VS Code documentation recommends doing this to start cmder:
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/K", "C:\\cmder\\vscode.bat"]

and you can only have one /K or /C, so appending another one to do the task doesn't work. You'd need to to end up with an arguments array like:
["/K", "C:\\cmder\\vscode.bat", "&", "task_command", "task_arg"]

I am a little puzzled. Isn't cmder a standalone executable which supports something like /kor /Citself?

There is a cmder executable, but it's a full terminal emulator in its own right that can't be used as the integrated shell. See #12006


Add support for longs

someone can just copy and paste this into their own part. there's no real point in providing it.
from: https://github.com/MilkBowl/VaultAPI/pull/100

someone can just copy and paste this into their own part. there's no real point in providing it.
from: MilkBowl/VaultAPI#100

So, every built-in part could be easily removed? You can just get the next string from the ArgumentStack and then parse it as an int, long, byte, etc. however, they have their own method.


Admin notice link tweak

Remove link to Dependencies install page from admin notice when currently on the Dependencies install page.

Please update to escape output as late as possible.
In this case that would mean there's no need to escape with generating $message_html, only when print $message_html, you might try print wp_kses_post( $message_html ). I think that should work.

Thanks


Piping from tar packing to webhdfs error

http://stackoverflow.com/questions/39439759/nodejs-piping-from-tar-packing-to-webhdfs-error
Having this issue, caused by \lib\webhdfs.js:588:9
Any thoughts?

@metrotyranno as I understand your issue got sorted out?

Yes, Issue is sorted.
The TAR packing was failing, changing to tar-fs fixed it.

@metrotyranno good to hear


Use Open-source WPF for BAML reading?

https://github.com/dotnet/wpf/tree/master/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml

Source code of its BAML reader is not yet published. Not only this project, but others wait for Microsoft to release that code.

ILSpy has a BAML reader:
https://github.com/icsharpcode/ilspy/blob/47ac132f77224b0fc6f8478df81cd40c3a7d229d/ILSpy.BamlDecompiler/Baml/BamlReader.cs
And the official BAML reader is still internal (although we could fork the source if we wanted):
https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/BamlReader.cs


Feature request: one line rules

Makefiles also support this:
https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html
targets : attributes : prerequisites ; recipe

Ah I didn't know the Make syntax, but Knit supports this with the following syntax:
targets:attributes: prereqs > recipe

Indeed, just tested it and works, mostly.
i don't see that syntax documented, so, it is not expected that it is widely used.
Then, why not change it and make it like makefiles?
Also, it does not work together with the D attribute:
  $ $(builddir)/%.o : D[$(builddir)/%.d] : %.c > $(CC) $(CFLAGS) -MMD -c $(input) -o $(output)
syntax error: while reading a rule's prerequisites, expected filename or pattern but found ">"


When will support for gbase8s databases be added?

If I want to adapt GBase 8s to be added to DBeaver like OceanBase, do I need to apply for anything?
website:
https://www.gbase.cn/
Database download link.
https://www.gbase.cn/download/gbase-8s-1?category=INSTALL_PACKAGE

Currently it's not planned to any concrete day. However, we're open for contribution.

dbeaver is a great product.
We strongly hope to add our database product, GBase 8s, added to  dbeaver for showcase.
Like many China database vendors, GBase 8s has a relatively high market share.
Adding an excellent product can bring a better experience to users.
If we want to make this plan happen, do we want to do something first?

Here is our guide for contributors https://github.com/dbeaver/dbeaver/wiki/Contribute-your-code
And guides for setting up development environment in IDEA https://github.com/dbeaver/dbeaver/wiki/Develop-in-IDEA or Eclipse https://github.com/dbeaver/dbeaver/wiki/Develop-in-Eclipse

Thx, I went to learn these URL

Hi，@E1izabeth
We will contribute support for GBase 8s，
As mentioned in a previous article,“Before creating a pull request, you should create a ticket on our issue tracker. ”
Do we need to create another ticket, or just use this ticket #35087 ？

Please, use this issue. No need to create another one

This address is our website, and it is in Chinese. https://www.gbase.cn/
Do I need to provide an English version of the website?
Is this a mandatory prerequisite?

@marsapolo it's not a mandatory requirement. No need to provide English version right now.

Got it.
We plan to submit the contribution code in about two weeks.
Should we follow the steps provided on the website https://github.com/dbeaver/dbeaver/wiki/Contribute-your-code, or is there anything else we need to do before that?


[TiKV-BR]  Parameter Identification ERROR and Command Prompt  inaccurate when not set --dst-api-version

Bug Report
1. Describe the bug

2. Minimal reproduce step (Required)
As the screenshot.

3. What did you see instead (Required)
dst-api-version identifys  to dot ".".
4. What did you expect to see? (Required)
dst-api-version only supports: V1, V1TTL, V2
5. What is your migration tool and TiKV version? (Required)

TiKV BR: Release Version: d8c0fb1
Git Commit Hash: d8c0fb1ba6f5d96dd43d8806c3082e152ef77696
Git Branch: main
Go Version: go1.16.5
UTC Build Time: 2022-05-25 09:30:18
Race Enabled: false

The behaviour is changed, if user does not specify dst-api-version, tikv-br will regard use api-version in tikv cluster as dst-api-version. Please see https://github.com/tikv/migration/pull/103/commits/3c7d8ea6d6d8afa08c35a1df12e53457055a6e18.


Fix parameters decryption

Description
Changes proposed in this pull request:

Fixed parameters decryption

Related issue(s)

change processing operation flow in every place where toOperation() method is used: first, we need to unmarshall operation.Data field to get InstanceDetails, save it and then after calling toOperation which decrypts creds we need to overwrite InstanceDetails field in operation

change processing operation flow in every place where toOperation() method is used: first, we need to unmarshall operation.Data field to get InstanceDetails, save it and then after calling toOperation which decrypts creds we need to overwrite InstanceDetails field in operation

/retest

/retest


Typo "resouce"→"resource"

https://learn.microsoft.com/en-us/dynamics365/project-operations/environment/resource-sign-up-preview-subscription?source=recommendations
https://github.com/MicrosoftDocs/dynamics-365-project-operations/blob/main/articles/environment/resource-sign-up-preview-subscription.md
#PingMSFTDocs

@hyoshioka0128 Thank you for letting us know. I have merged the change.