Enhancement - Local First Mirrorring

Pouch-mirror uses a remote-first strategy for any edit calls. This ensures that there's only a single source of truth in a multi-client-single-server scenario and also helps with conflict resolution.
But in cases where the client interactions are heavy, the server-first approach may lead to a slower turn-around, and may not work well in cases of flaky network connectivity.
Would you plan to revisit this project to bake-in a local-first strategy? If you are too busy now, I can fork this project and add one.
For a local-first approach, I think the following interactions should be acceptable -

On application setup, do a one-time two-way sync with Remote. During this time, redirect all read/writes to the server.
Once the sync is complete, switch to local DB. Now all r/w operations happen locally.
On every write (to local), schedule a (delayed, say 2-4 seconds) one-time 2-way sync with remote. On conflicts, raise events.
If another write occurs before the delayed sync happens, cancel the sync and reschedule it. This way if a lot of writes occur in succession, we don't end-up doing several sync's with the server. Basically we wait for things to cool down on the client before firing up the remote sync.
Before local destroy, offer a configurable replication to remote. This way scenarios like 'logout' which invoke destroy can rest in peace knowing the localDB will replicate to remote before being wiped.

Thoughts!?

I like the idea. We can have a configuration option sourceOfTruth which can be 'remote' or 'local'. The default is remote.
I also want to add an option to specify the adapter to use for the local database.
Go ahead and submit a PR. I am going to merge your first PR over the next couple days with some minor changes. You may want to wait until that is complete before forking so you don't have to resolve git conflicts later.

The delay should be configurable in the options with a default of no delay.

Your PR #3 is now merged on a local branch. But I am going to do a complete re-write of PouchMirror as a PouchDB plugin. This will make it practically maintenance free and will transparently pass through any functionality not handled by PouchMirror to the local db.
Wait until this is done before you start working on anything.

@SukantGujar check out the new release! I think you're going to like it. Every function, including plugins, will now pass through to localDB if PouchMirror hasn't overridden it. I also added browser support.


 I know the solution is to run VS Code using "code --disable-gpu". However, the problem, I have is that I do not actually know how to 'run VS Code using "code --disable-gpu". I know this is quite an ask but could anyone please explain to me the steps I need to take.
I have also tried to put VS Code into Zen Mode (Ctrl+K Z); however the only change is that VS Code changes from a maximised window that is blank to a full screen window that is blank.
Specifications:

VSCode Version: 1.24.0
OS Version: Windows 10

Steps to Reproduce:

Download VS Code
Open it
Get a black/blank screen
Don't know what to do next??

Reproduces with extensions: Don't know because I can't get extensions, however i reckon it will still be the same

I have pasted an image of what VS Code looks like when I open it

Here's how to 'run VS Code using "code --disable-gpu" :
Open a command prompt in Windows (Windows Key + r, and type cmd in the box that opens), then type the command you've talked about : code --disable-gpu.
Also, if this doesn't work, refer yourself to this comment for another way of fixing this issue (that comment talks about the shortcut of vscode, for your information).

@V-ed Thank you so much, it works perfectly for me now. Thanks again for helping out a fellow noob :)

No problems!
You might want to close this issue now that your problem is fixed! ;)


fixes 429 "Too Many Requests" retries that don't follow standard

Some HTTP servers return a non standard 'retry-after' header with incorrect values according to https://tools.ietf.org/html/rfc7231#section-7.1.3.
This PR provides:

standard compliant retry delay duration handling
error message provided to inform user in case of non standard server response (non breaking as it still returns the success code if the link is finally reached with a code 200)
provide tests for the 429 "Too Many Requests" retries case
merged with changes from #22 and fixed issues that it brought to my changes

Added a default value to 2 for retries in the http and not only on the CLI
removed a redundant test case
updated custom retry test to match others

The suggested error message in this PR is to deprecate non standard response starting from link-check 4.5.2 (next release) and totally remove it for 4.7.0.
fixes #24

@andreizet I would be happy to have your opinion on this PR please.

@cmgrote Given the 429 non standard feature was only introduced by your PR on April 6th this year and it seems related to Github given the original issue is odpi/egeria#2763, maybe the error message and keeping the compatibility part is not useful. It would simplify a lot to be honest. Did you notice failures on your project since Github updated the header to seconds?

@andreizet @cmgrote I would be happy to have your opinion on this PR please.

Awesome! This should save us a lot of headache. Since the support for non standard retry-after will be dropped in 4.7.0, there should be a viable default for this case.

@andreizet

Since the support for non standard retry-after will be dropped in 4.7.0, there should be a viable default for this case.

Do you mean for instance if we have a 429 but no header (it's optional in the RFC) or an invalid one we should have a default value, say 60s?

@andreizet

Since the support for non standard retry-after will be dropped in 4.7.0, there should be a viable default for this case.

Do you mean for instance if we have a 429 but no header (it's optional in the RFC) or an invalid one we should have a default value, say 60s?

Yep, something like that, but also, there may be cases when 60 seconds are not enough.

@andreizet, I agree for the default.
For the 60s not being enough, if servers have such requirements, they should probably send a retry-after header.
But implementing an exponential backoff retry may be the way.
See urllib3 or this interesting Google implementation of truncated exponential backoff.
However, I would prefer to handle that in another PR.

@andreizet I added a 60s default fallback delay that you can override with config, see 015cd8a


Problem inpute shape

Hello please help i get this message.
ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (512, 512)

Read the error and chech the dimensions of input image)

it is my input and model
define model
model = Unet(backbone_name=BACKBONE, encoder_weights=None, input_shape=(512, 512, 1), classes=1)
model.compile('Adam', loss=bce_jaccard_loss, metrics=[iou_score])
fit model
if you use data generator use model.fit_generator(...) instead of model.fit(...)
more about fit_generator here: https://keras.io/models/sequential/#fit_generator
model.fit(
x=x_train,
y=y_train,
batch_size=1,
epochs=100,
validation_data=(x_val, y_val),
)

Keras probably expect (512, 512, 1) instead of (512, 512). You can do y_train=y_train[:,:,np.newaxis] or use expand_dims().

Model expect to have 4d input: (batch_size, height, width, channels) -> e.g. (1, 512, 512, 1).
Use x = x[None, ..., None]  to convert (512, 512) -> (1, 512, 512, 1).

after convert i have new error
IndexError: index 512 is out of bounds for axis 0 with size 512


update contribute doc

Added a bunch to the contribute doc

Can one of the admins verify this patch?


SVG PAN ZOOM Print issue with images

Bug report
Expected behaviour
Print the web documents containing svg images loaded with  pan zoom lib into pdf docs with clear images.
Actual behaviour
The images are not fully shown that is some portion of the images are not visible .
Note: The svg images used in our documents are of various sizes from very large to small.
So,we limited their widths and heights of object tags dynamically using jquery.Now when a document is printed all the images are displayed correctly but in some documents the images are not  visible completely.
Steps to reproduce the behaviour
Open the demo object.html locally without directly using the url and add few svg images using object tags each of different sizes and limit their sizes to particular width and height using jquey and print the documents after webpage is loaded. Some of the images will get cropped.
Please check the attached screenshot of pdf document after printing the web page reference

original svg image for testing
width: 1252px;
height: 319px;
testprint.zip
Configuration
svg-pan-zoom version: 3.6.0

Browser(s): firefox/chrome

Operating system(s): linux

provided example URL in demo: attached the screenshot above and also svg file insde zip for      testing.

i second this, we have similiar problems. Even when we catch the event by window.matchMedia("print").addListener(function (el) the resizing is not shown.
Without attached zoom lib, all works fine - the svg is sized in the right way - which is done by the viewBox in our case.
It seems, how ever this lib is calculating zooming/resizing, that its even shown in the document, when catching the print event and doing a resizing, but not in the print preview.
It IS shown the next print try. Strange. When i add something like $('svg g').attr('fill','green') in the same event, the color change is shown.
This seems tricky, i was not able to force from outside the right effect to the zoom lib.


HTTP POST error when having Model number with nonsupported symbols

Environment

Python version:  3.6.9
NetBox version: 2.6.9
vCenter version: 5.5.0
vCenter NetBox Sync version: v1.0.0-rc

Steps to Reproduce

Have a node in cluster with model number with nonsupported symbols
Install this project, configure necessary files.
run "run.py"

Expected behaviour
I was expecting, that tool would transofrm unsupported mode Model into something readable.
In my case, node model - 'Flex System x240 Compute Node -[8737H2G]-' -> 'Flex System x240 Compute Node 8737H2G' for example.
Observed Behavior
2019-12-30 11:53:07,949 [DEBUG] Sending GET to http://localhost:32772/api/dcim/device-types/?model=Flex System x240 Compute Node -[8737H2G]-
2019-12-30 11:53:07,988 [DEBUG] NetBox GET request OK; returned 200 status.
2019-12-30 11:53:07,990 [INFO] Netbox device_types 'Flex System x240 Compute Node -[8737H2G]-' object not found. Requesting creation.
2019-12-30 11:53:07,992 [DEBUG] Sending POST to http://localhost:32772/api/dcim/device-types/
2019-12-30 11:53:08,025 [WARNING] NetBox failed to create device_types object. A duplicate record may exist or the data sent is not acceptable.

Thanks for the report @microsoftdealer. Within the NetBox Device Types model I see there is an acceptable pattern for the slug value. I will test this further and report back.

@synackray , thanks for the quick fix!


Pair identity column types with increments

This provides a set of aliases to pair with the increments column types. Since increments (now bigIncrements) is the default column type of identity columns, it would be nice to have an expressive, complimentary column type for related columns.
This would help avoid column type mismatches when defining foreign keys as well as allow flexibility in the framework definitions between drivers and versions.
Before:
Schema::create('comments', function (Blueprint $table) {
    $table->bigIncrements('id');
    $table->unsignedBigInteger('post_id');
});

After:
Schema::create('comments', function (Blueprint $table) {
    $table->bigIncrements('id');
    $table->bigIdentity('post_id');
});

Didn't see any existing tests. Glad to write some if needed. Will also update the Docs if merged. 👍

But isn't it weird to have a $this->bigIdentity(...); that creates a non-identity column? The naming seems off, and easily confused with bigIncrements. I believe that if someone wanted to create an identity column, and the autocomplete provided a method named bigIdentity, they would incorrectly pick that alternative to create their identity column.
Perhaps we can detect the type mismatches, or provide better error messages, when creating the foreign key?

Thanks for the PR, but I really don't think we need this. The original code there is way cleared what is going on.

Yeah, I think with the right naming it would be more clear the intention. I doubt all developers know, without looking, that bigIncrements is an unsigned big integer. Unfortunately the example doesn't relay that aspect.

Probably just hold off on this for now.


generator: Fix (some) test deficiencies

Fixes #628
The tests that were erroneously passing in #625 at https://github.com/exercism/xruby/commit/e0e6eb5054a815b16eff746001f63f57f20a16b8 and before would now fail until everything is made right in https://github.com/exercism/xruby/pull/625/commits/19987a218dd7392e8b385b669e8e42ca2f534bbb
Do not mock the system under test!
The pattern I was using for testing here would be appropriate for a class correctly using composition, but led to the test failures here when includes are being used to try and achieve a similar result.

NOT ready to merge yet, I need to fix a commit comment.

@hilary ready to merge now.
This will also help catch failures in #633, so I suggest merging this PR and rebasing that PR


Edit and delete option for classroom

Problem
There is no option to leave or edit the classroom
It requires an edit option so that the teacher who creates the particular classroom can modify it and a delete option so that the classroom can be deleted after completion of the test.
Screenshots

@aavishkarmishra : Can I work on this?
Requirement:
Edit - Can allow editing of all values? like subject, subject code and class code, anything unique should be there always to identify classroom (id must be same - not checked code yet).
Delete: Particular id should be deleted for classroom after test.

@aavishkarmishra : I will start working on it, In meantime Can you please assign me this issue.

@aavishkarmishra , @Vidisha-kayal : Both Required flow are done, Please review the changes


Command not configured for JavaScript (JSX)!

Noticed some people reporting this issue, but the descriptions seem different than what I'm trying to do. I get the error "Command not configured for JavaScript (JSX)!" whenever I run ANY JavaScript code - more often than not without JSX.
console.log("Hello World");
// Command not configured for JavaScript (JSX)!

return "Hello";
// Command not configured for JavaScript (JSX)!

This hasn't always been the case, atom-script had been working fine for little things like this in the past.

@matthewbryancurtis This is implemented here.


Add netlink process monitor

What does this PR do?
Add a netlink process montior
Aim to Subscribe() to process event Exec, Exit
and with or without metadata process Any, Name, MAPfile
Motivation
Netlink process subscription is allowed only by 1 PID
This monitor will read the netlink socket process events queue and run it on parallel worker (map to n cpu cores)
Describe how to test/QA your changes

Reviewer's Checklist

[ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
[ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
[ ] A release note has been added or the changelog/no-changelog label has been applied.
[ ] Changed code has automated tests for its functionality.
[ ] Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
[ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
[ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
[ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
[ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
[ ] If applicable, the config template has been updated.

left unanswered https://github.com/DataDog/datadog-agent/pull/14706#discussion_r1046707153


Documentation Out of Date

The config walkthrough at https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/docs/config-walkthrough.md
hasn't been updated for four years, and I haven't managed to get prometheus adapter running while trying to follow it. Some of the examples provided me errors that prevented the system from being deployed.
If there's better documentation please do let me know as I've been really fumbling through this.

/triage accepted
/help


⚠ Bofrost.at has degraded performance

In 63b1ecc, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 946 ms

Resolved: Bofrost.at performance has improved in 225cad2.


fix(posts-component)fixed the comments of posts and added color to star icon onclick

…n onclick
Functionality:
<-- Added color to star button onclick and fixed the comments(closes when clicked once) -->
Solution:
<-- added ngClass to add color to star button onclick -->
Risk level:

[ ] high
[X] medium
[ ] low

How to test:
<-- 1. ng serve & firebase emulators:start.
2.  go to social page.
3. click on create post.
4. click on star icon(you can see the added color).
5. double click on comments (comment box opens and closes). -->

Need review on this


Grinding wheel amethyst cluster recipe changed

seems to have reverted to dust+shard+charged at some point last night, don't know when

FYI as of right now the amethyst recipe is the shard-only variant. Honestly it doesn't bother me much which recipe is used, but who knows why it keeps switching.


2021-01-26 07:15:46,426 autosynth [INFO] > M TextToSpeech/synth.metadata
2021-01-26 07:15:46,426 autosynth [DEBUG] > Running: git log 656b253c1a4bcad06d77d903e1d873e75ef57328 -1 --no-decorate --pretty=%s
2021-01-26 07:15:46,430 autosynth [DEBUG] > Running: git log 656b253c1a4bcad06d77d903e1d873e75ef57328 -1 --no-decorate --pretty=%b%n%nSource-Author: %an <%ae>%nSource-Date: %ad
2021-01-26 07:15:46,435 autosynth [DEBUG] > Running: git add -A
2021-01-26 07:15:46,483 autosynth [DEBUG] > Running: git status --porcelain
2021-01-26 07:15:46,534 autosynth [DEBUG] > Running: git commit -m build(nodejs): add build rules for Node.js library

PiperOrigin-RevId: 352815661

Source-Author: Google APIs<EMAIL_ADDRESS>Source-Date: Wed Jan 20 10:01:58 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 656b253c1a4bcad06d77d903e1d873e75ef57328
Source-Link: https://github.com/googleapis/googleapis/commit/656b253c1a4bcad06d77d903e1d873e75ef57328
[autosynth-texttospeech-276 cd79aed9] build(nodejs): add build rules for Node.js library
 1 file changed, 4 insertions(+), 4 deletions(-)
2021-01-26 07:15:46,569 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at cd79aed9 build(nodejs): add build rules for Node.js library
2021-01-26 07:15:46,613 autosynth [DEBUG] > Running: git checkout autosynth-texttospeech
Switched to branch 'autosynth-texttospeech'
2021-01-26 07:15:46,641 autosynth [DEBUG] > Running: git diff HEAD..autosynth-texttospeech-276 -- . :(exclude)synth.metadata
2021-01-26 07:15:46,646 autosynth [DEBUG] > Running: git diff HEAD..autosynth-texttospeech-276 -- synth.metadata
2021-01-26 07:15:46,651 autosynth [DEBUG] > Running: git diff HEAD..autosynth-texttospeech-277 -- . :(exclude)synth.metadata
2021-01-26 07:15:46,655 autosynth [DEBUG] > Running: git diff HEAD autosynth-texttospeech-277
2021-01-26 07:15:46,660 autosynth [DEBUG] > Running: git apply /tmpfs/tmp/tmp_lfof1d7/autosynth-texttospeech-277.patch
error: cannot apply binary patch to 'TextToSpeech/metadata/V1/CloudTts.php' without full index line
error: TextToSpeech/metadata/V1/CloudTts.php: patch does not apply
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 104, in synthesize_loop
    return synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 126, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 152, in synthesize_inner_loop
    synthesize_range(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 170, in synthesize_range
    toolbox.patch_merge_version(young)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 182, in patch_merge_version
    git.patch_merge(sub_branch, patch_file_path)
  File "/tmpfs/src/github/synthtool/autosynth/git.py", line 151, in patch_merge
    executor.check_call(["git", "apply", patch_file_path], cwd=git_repo_dir)
  File "/tmpfs/src/github/synthtool/autosynth/executor.py", line 29, in check_call
    subprocess.check_call(command, **args)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'apply', '/tmpfs/tmp/tmp_lfof1d7/autosynth-texttospeech-277.patch']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating texttospeech. :sob:
Here's the output from running synth.py:
tool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
DEBUG:synthtool:Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
2021-01-27 07:00:37,046 synthtool [DEBUG] > Cloning googleapis.
DEBUG:synthtool:Cloning googleapis.
2021-01-27 07:00:37,047 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
DEBUG:synthtool:Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2021-01-27 07:00:37,050 synthtool [DEBUG] > Which version of bazel will I run?
DEBUG:synthtool:Which version of bazel will I run?
bazel 3.0.0
2021-01-27 07:00:37,053 synthtool [DEBUG] > Generating code for: //google/cloud/texttospeech/v1:google-cloud-texttospeech-v1-php.
DEBUG:synthtool:Generating code for: //google/cloud/texttospeech/v1:google-cloud-texttospeech-v1-php.
2021-01-27 07:00:37,196 synthtool [SUCCESS] > Generated code into /tmpfs/tmp/tmpfol0xh5p.
SUCCESS:synthtool:Generated code into /tmpfs/tmp/tmpfol0xh5p.
2021-01-27 07:00:37,203 synthtool [INFO] > Replaced "'serviceAddress' =>" in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced "'serviceAddress' =>" in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,204 synthtool [INFO] > Replaced '@type string \\$serviceAddress\\n\\s+\\*\\s+The address' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced '@type string \\$serviceAddress\\n\\s+\\*\\s+The address' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,205 synthtool [INFO] > Replaced '\\$transportConfig, and any \\$serviceAddress' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced '\\$transportConfig, and any \\$serviceAddress' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,207 synthtool [INFO] > Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/TextToSpeechClient.php.
INFO:synthtool:Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/TextToSpeechClient.php.
2021-01-27 07:00:37,207 synthtool [INFO] > Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,208 synthtool [INFO] > Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechClient.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechClient.php.
2021-01-27 07:00:37,208 synthtool [INFO] > Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechGrpcClient.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechGrpcClient.php.
2021-01-27 07:00:37,208 synthtool [INFO] > Replaced 'Copyright \\d{4}' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,209 synthtool [INFO] > Replaced 'Copyright \\d{4}' in tests/System/V1/TextToSpeechSmokeTest.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in tests/System/V1/TextToSpeechSmokeTest.php.
2021-01-27 07:00:37,209 synthtool [INFO] > Replaced 'Copyright \\d{4}' in tests/Unit/V1/TextToSpeechClientTest.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in tests/Unit/V1/TextToSpeechClientTest.php.
2021-01-27 07:00:37,210 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/AudioConfig.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/AudioConfig.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechRequest.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechRequest.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechResponse.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechResponse.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/ListVoicesRequest.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/ListVoicesRequest.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/Voice.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/Voice.php.
2021-01-27 07:00:37,212 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/VoiceSelectionParams.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/VoiceSelectionParams.php.
2021-01-27 07:00:37,214 synthtool [WARNING] > No replacements made in src/**/V*/**/*.php for pattern final class, maybe replacement is no longer needed?
WARNING:synthtool:No replacements made in src/**/V*/**/*.php for pattern final class, maybe replacement is no longer needed?
2021-01-27 07:00:37,216 synthtool [WARNING] > No replacements made in src/**/V*/**/*.php for pattern public function ([s|g]\w{3,})Unwrapped, maybe replacement is no longer needed?
WARNING:synthtool:No replacements made in src/**/V*/**/*.php for pattern public function ([s|g]\w{3,})Unwrapped, maybe replacement is no longer needed?
2021-01-27 07:00:37,254 synthtool [WARNING] > No replacements made in src/**/V*/**/*.php for pattern (.{0,})\]\((/.{0,})\), maybe replacement is no longer needed?
WARNING:synthtool:No replacements made in src/**/V*/**/*.php for pattern (.{0,})\]\((/.{0,})\), maybe replacement is no longer needed?
2021-01-27 07:00:37,255 synthtool [DEBUG] > Wrote metadata to synth.metadata.
DEBUG:synthtool:Wrote metadata to synth.metadata.
2021-01-27 07:00:37,335 autosynth [INFO] > Changed files:
2021-01-27 07:00:37,335 autosynth [INFO] > M TextToSpeech/metadata/V1/CloudTts.php
 M TextToSpeech/synth.metadata
2021-01-27 07:00:37,335 autosynth [DEBUG] > Running: git log ceaaf31b3d13badab7cf9d3b570f5639db5593d9 -1 --no-decorate --pretty=%s
2021-01-27 07:00:37,339 autosynth [DEBUG] > Running: git log ceaaf31b3d13badab7cf9d3b570f5639db5593d9 -1 --no-decorate --pretty=%b%n%nSource-Author: %an <%ae>%nSource-Date: %ad
2021-01-27 07:00:37,342 autosynth [DEBUG] > Running: git add -A
2021-01-27 07:00:37,383 autosynth [DEBUG] > Running: git status --porcelain
2021-01-27 07:00:37,426 autosynth [DEBUG] > Running: git commit -m chore: update Go generator, rules_go, and protobuf

PiperOrigin-RevId: 352816749

Source-Author: Google APIs<EMAIL_ADDRESS>Source-Date: Wed Jan 20 10:06:23 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: ceaaf31b3d13badab7cf9d3b570f5639db5593d9
Source-Link: https://github.com/googleapis/googleapis/commit/ceaaf31b3d13badab7cf9d3b570f5639db5593d9
[autosynth-texttospeech-277 50a67bda] chore: update Go generator, rules_go, and protobuf
 2 files changed, 4 insertions(+), 4 deletions(-)
 rewrite TextToSpeech/metadata/V1/CloudTts.php (86%)
2021-01-27 07:00:37,452 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 50a67bda chore: update Go generator, rules_go, and protobuf
2021-01-27 07:00:37,493 autosynth [DEBUG] > Running: git checkout autosynth-texttospeech
Switched to branch 'autosynth-texttospeech'
2021-01-27 07:00:37,520 autosynth [DEBUG] > Running: git diff HEAD..autosynth-texttospeech-277 -- . :(exclude)synth.metadata
2021-01-27 07:00:37,525 autosynth [DEBUG] > Running: git diff HEAD autosynth-texttospeech-277
2021-01-27 07:00:37,529 autosynth [DEBUG] > Running: git apply /tmpfs/tmp/tmpd8u3l5jf/autosynth-texttospeech-277.patch
error: cannot apply binary patch to 'TextToSpeech/metadata/V1/CloudTts.php' without full index line
error: TextToSpeech/metadata/V1/CloudTts.php: patch does not apply
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 104, in synthesize_loop
    return synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 126, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 152, in synthesize_inner_loop
    synthesize_range(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 170, in synthesize_range
    toolbox.patch_merge_version(young)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 182, in patch_merge_version
    git.patch_merge(sub_branch, patch_file_path)
  File "/tmpfs/src/github/synthtool/autosynth/git.py", line 151, in patch_merge
    executor.check_call(["git", "apply", patch_file_path], cwd=git_repo_dir)
  File "/tmpfs/src/github/synthtool/autosynth/executor.py", line 29, in check_call
    subprocess.check_call(command, **args)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'apply', '/tmpfs/tmp/tmpd8u3l5jf/autosynth-texttospeech-277.patch']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating texttospeech. :sob:
Here's the output from running synth.py:
tool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
DEBUG:synthtool:Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
2021-01-27 07:00:37,046 synthtool [DEBUG] > Cloning googleapis.
DEBUG:synthtool:Cloning googleapis.
2021-01-27 07:00:37,047 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
DEBUG:synthtool:Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2021-01-27 07:00:37,050 synthtool [DEBUG] > Which version of bazel will I run?
DEBUG:synthtool:Which version of bazel will I run?
bazel 3.0.0
2021-01-27 07:00:37,053 synthtool [DEBUG] > Generating code for: //google/cloud/texttospeech/v1:google-cloud-texttospeech-v1-php.
DEBUG:synthtool:Generating code for: //google/cloud/texttospeech/v1:google-cloud-texttospeech-v1-php.
2021-01-27 07:00:37,196 synthtool [SUCCESS] > Generated code into /tmpfs/tmp/tmpfol0xh5p.
SUCCESS:synthtool:Generated code into /tmpfs/tmp/tmpfol0xh5p.
2021-01-27 07:00:37,203 synthtool [INFO] > Replaced "'serviceAddress' =>" in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced "'serviceAddress' =>" in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,204 synthtool [INFO] > Replaced '@type string \\$serviceAddress\\n\\s+\\*\\s+The address' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced '@type string \\$serviceAddress\\n\\s+\\*\\s+The address' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,205 synthtool [INFO] > Replaced '\\$transportConfig, and any \\$serviceAddress' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced '\\$transportConfig, and any \\$serviceAddress' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,207 synthtool [INFO] > Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/TextToSpeechClient.php.
INFO:synthtool:Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/TextToSpeechClient.php.
2021-01-27 07:00:37,207 synthtool [INFO] > Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced '^(\\s+\\*\\n)?\\s+\\*\\s@experimental\\n' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,208 synthtool [INFO] > Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechClient.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechClient.php.
2021-01-27 07:00:37,208 synthtool [INFO] > Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechGrpcClient.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in src/V1/TextToSpeechGrpcClient.php.
2021-01-27 07:00:37,208 synthtool [INFO] > Replaced 'Copyright \\d{4}' in src/V1/Gapic/TextToSpeechGapicClient.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in src/V1/Gapic/TextToSpeechGapicClient.php.
2021-01-27 07:00:37,209 synthtool [INFO] > Replaced 'Copyright \\d{4}' in tests/System/V1/TextToSpeechSmokeTest.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in tests/System/V1/TextToSpeechSmokeTest.php.
2021-01-27 07:00:37,209 synthtool [INFO] > Replaced 'Copyright \\d{4}' in tests/Unit/V1/TextToSpeechClientTest.php.
INFO:synthtool:Replaced 'Copyright \\d{4}' in tests/Unit/V1/TextToSpeechClientTest.php.
2021-01-27 07:00:37,210 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/AudioConfig.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/AudioConfig.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechRequest.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechRequest.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechResponse.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/SynthesizeSpeechResponse.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/ListVoicesRequest.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/ListVoicesRequest.php.
2021-01-27 07:00:37,211 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/Voice.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/Voice.php.
2021-01-27 07:00:37,212 synthtool [INFO] > Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/VoiceSelectionParams.php.
INFO:synthtool:Replaced 'Generated from protobuf field ([^\\n]{0,})\\n\\s{5}\\*/\\n\\s{4}protected \\$' in src/V1/VoiceSelectionParams.php.
2021-01-27 07:00:37,214 synthtool [WARNING] > No replacements made in src/**/V*/**/*.php for pattern final class, maybe replacement is no longer needed?
WARNING:synthtool:No replacements made in src/**/V*/**/*.php for pattern final class, maybe replacement is no longer needed?
2021-01-27 07:00:37,216 synthtool [WARNING] > No replacements made in src/**/V*/**/*.php for pattern public function ([s|g]\w{3,})Unwrapped, maybe replacement is no longer needed?
WARNING:synthtool:No replacements made in src/**/V*/**/*.php for pattern public function ([s|g]\w{3,})Unwrapped, maybe replacement is no longer needed?
2021-01-27 07:00:37,254 synthtool [WARNING] > No replacements made in src/**/V*/**/*.php for pattern (.{0,})\]\((/.{0,})\), maybe replacement is no longer needed?
WARNING:synthtool:No replacements made in src/**/V*/**/*.php for pattern (.{0,})\]\((/.{0,})\), maybe replacement is no longer needed?
2021-01-27 07:00:37,255 synthtool [DEBUG] > Wrote metadata to synth.metadata.
DEBUG:synthtool:Wrote metadata to synth.metadata.
2021-01-27 07:00:37,335 autosynth [INFO] > Changed files:
2021-01-27 07:00:37,335 autosynth [INFO] > M TextToSpeech/metadata/V1/CloudTts.php
 M TextToSpeech/synth.metadata
2021-01-27 07:00:37,335 autosynth [DEBUG] > Running: git log ceaaf31b3d13badab7cf9d3b570f5639db5593d9 -1 --no-decorate --pretty=%s
2021-01-27 07:00:37,339 autosynth [DEBUG] > Running: git log ceaaf31b3d13badab7cf9d3b570f5639db5593d9 -1 --no-decorate --pretty=%b%n%nSource-Author: %an <%ae>%nSource-Date: %ad
2021-01-27 07:00:37,342 autosynth [DEBUG] > Running: git add -A
2021-01-27 07:00:37,383 autosynth [DEBUG] > Running: git status --porcelain
2021-01-27 07:00:37,426 autosynth [DEBUG] > Running: git commit -m chore: update Go generator, rules_go, and protobuf

PiperOrigin-RevId: 352816749

Source-Author: Google APIs<EMAIL_ADDRESS>Source-Date: Wed Jan 20 10:06:23 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: ceaaf31b3d13badab7cf9d3b570f5639db5593d9
Source-Link: https://github.com/googleapis/googleapis/commit/ceaaf31b3d13badab7cf9d3b570f5639db5593d9
[autosynth-texttospeech-277 50a67bda] chore: update Go generator, rules_go, and protobuf
 2 files changed, 4 insertions(+), 4 deletions(-)
 rewrite TextToSpeech/metadata/V1/CloudTts.php (86%)
2021-01-27 07:00:37,452 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 50a67bda chore: update Go generator, rules_go, and protobuf
2021-01-27 07:00:37,493 autosynth [DEBUG] > Running: git checkout autosynth-texttospeech
Switched to branch 'autosynth-texttospeech'
2021-01-27 07:00:37,520 autosynth [DEBUG] > Running: git diff HEAD..autosynth-texttospeech-277 -- . :(exclude)synth.metadata
2021-01-27 07:00:37,525 autosynth [DEBUG] > Running: git diff HEAD autosynth-texttospeech-277
2021-01-27 07:00:37,529 autosynth [DEBUG] > Running: git apply /tmpfs/tmp/tmpd8u3l5jf/autosynth-texttospeech-277.patch
error: cannot apply binary patch to 'TextToSpeech/metadata/V1/CloudTts.php' without full index line
error: TextToSpeech/metadata/V1/CloudTts.php: patch does not apply
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 104, in synthesize_loop
    return synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 126, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 152, in synthesize_inner_loop
    synthesize_range(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 170, in synthesize_range
    toolbox.patch_merge_version(young)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 182, in patch_merge_version
    git.patch_merge(sub_branch, patch_file_path)
  File "/tmpfs/src/github/synthtool/autosynth/git.py", line 151, in patch_merge
    executor.check_call(["git", "apply", patch_file_path], cwd=git_repo_dir)
  File "/tmpfs/src/github/synthtool/autosynth/executor.py", line 29, in check_call
    subprocess.check_call(command, **args)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'apply', '/tmpfs/tmp/tmpd8u3l5jf/autosynth-texttospeech-277.patch']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth passed, closing! :green_heart:

Autosynth passed, closing! :green_heart:


Same-height columns experiment has different default stacking behavior

For example, a row consisting of:

...

...

normally stacks into 2 visual rows on an XS screen, but a .row-eq-height consisting of this doesn't currently stack.
We should either fix/workaround this or document it.
I found that this makes it stack again, but then specificity bites so that it won't un-stack:
.row-eq-height {
  flex-wrap: wrap;
}
.row-eq-height > [class*="col-"] {
  width: 100%;
}

Hopefully @mdo can work some magic here. :bow:

I think flex-direction: column, on .row-eq-height-element, can be applied for column stacking.


Add Unified Logging Base Class for Python

What changes are proposed in this pull request?
Provide a python implementation of unified logging's base class.
How is this patch tested?

[x] I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

[x] No. You can skip this section.
[ ] Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

[x] No. You can skip this section.
[ ] Yes. Make sure you have added samples following below steps.

/azp run

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (cbc022c) 86.35% compared to head (da1dafd) 12.15%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2159       +/-   ##
===========================================
- Coverage   86.35%   12.15%   -74.21%
===========================================
  Files         325      325
  Lines       16959    16959
  Branches     1524     1524
===========================================
- Hits        14645     2061    -12584
- Misses       2314    14898    +12584

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

/azp run


Update Benchmarking infrastructure for net6.0

Added the ability to debug benchmarks in-proc.
Added the ability to run benchmarks in VS.
Updated README.md on how to run benchmarks in VS.
Needed to add a feed to the BenchmarkDotNet pre-release feed.

Fixes dotnet/aspnetcore#31941

Getting this in so I can use the benchmarking bits in other PRs


operate metrics scraping

I need a possibility to fix the prometheus scraping endpoint for operate. Operate provided metrics at /actuator/prometheus not /metrics.

Thanks for reporting @fvogl ! Are you willing to create a PR?

Thanks for reporting @fvogl ! Are you willing to create a PR?

Hi @Zelldon. Unfortunately I can't spend the time on this. Also I'm not sure how to best do this. The simplest would be to have operate serve the metrics on /metrics. Not sure if that's an option for you guys.

Thanks. I will take a look at it when I find the time


API approver has access to reviews across all languages

Currently all approvers can approve review in any language. We need to add language specific approvers who can approve reviews specific to a language only.

@praveenkuttappan Where is the list of approvers maintained?

@JonathanGiles I'll take this one


KAFKA-5876: IQ should throw different exceptions for different errors(KIP-216)

This pr would be discussed KIP-216 of the mailing list in parallel.
Any suggestion is welcome.
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

This PR is too old and hard to rebase onto the latest version of the trunk branch.
Will create another PR.


Exiting from cmd.exe within bash with Ctrl+C scrambles keyboard input inside any new cmd.exe instances launched from the same bash

I have build 15063.138.
Steps to reproduce:

Open bash.
Start cmd.exe.
Press Ctrl+C. [This is what triggers the issue.]
Start cmd.exe.
Try running commands.

All keyboard input is totally garbled from now on. It appears correctly when entering, but the shell seems to receive the characters I entered in some random order. This happens in any cmd.exe you launch from the current bash. Only closing bash fixes it.
This also happens from xterm.

At first I thought it is just omitting characters, but then I noticed that in subsequent tries, characters from previous commands may show up too:

Actually, I think it shouldn't even exit cmd.exe when I press Ctrl+C. I think Ctrl+C should be processed by cmd.exe as usually (just like it would when starting cmd.exe from cmd.exe in Windows, or bash from bash in Linux).

Okay, I have figured something out. It looks like when ^C is used to interrupt the cmd.exe process, it's not killed. It's still attached to the console handles. Then, when you launch another cmd.exe, both of them are sharing the input handle, and they each only get half of the input (at random).

In this screenshot, you can see that there are two different cmd's attached, one in c:\ and the other in C:\Windows\System32

In this screenshot, you can see that there are two Windows Command Processor (cmd.exe) processes in the Ubuntu instance.

I spoke with @benhillis offline about this. Turns out this is a dupe to #1614. I'm gonna close this issue as a dupe then.
Thanks!


Use ThingPersisted for asUrl argument type instead of IsNotThingLocal

This is a simple bugfix for an issue I was facing with the typescript types of asUrl. Felt it was easier to fix than submit an issue, but happy to submit the issue as well.
The following Typescript code wouldn't compile and gave very confusing errors, despite being correct according to the documentation and (I think) the spirit of this function:
export function getUUID(thing: Thing): UUIDString | null {
  if (!isThingLocal(thing)) {
    const thingPersisted: ThingPersisted = thing as ThingPersisted;
    const url = asUrl(thingPersisted);
    if (isUUID(url)) {
      return url;
    }
  }

  return getUrlAll(thing, OWL.sameAs).find(isUUID) || null;
}

I don't know why the original type was failing -- it seems to be the guard should not have reset it to never given my type assertion, but it was easier to change the signature to something simpler than debug precisely why it was failing.
I looked through the code, and asUrl is the only place the type guard IsNotThingLocal is being used. Since ThingLocal and ThingPersisted are the only two Thing subtypes right now, this logic is equivalent to the logic as currently implemented. This could potentially cause issues for any users of the library who have custom ThingPersisted extensions, but they should be able to use type assertions (as I do above) to pass the compile check even with a custom subtype.
In general, I also think it's a lot less confusing if the library is permissive (i.e. ThingPersisted | SomeOtherNotThingLocal), rather that using a guard (i.e. IsNotThingLocal<T>). It took me a long time to figure out where the never type was coming from in the error message, whereas now the error will clearly state that the passed in Thing does not match a ThingPersisted if I give it the wrong argument.

Hey @ianconsolata, thanks for the PR, I've raised it internal for review but it may take a few days at minimum to get this merged.

@ianconsolata if you rebase this with main then vercel will fix itself.

I noticed the tests weren't passing on my branch, and then noticed they weren't passing on main either. Is there a reasons you're not running npm run test in CI?

Yeah, third-party PRs do not have access to secrets, so we can't run them

It's currently choking on // @ts-expect-error though, but I'm not sure where that is

As @ThisIsMissEm pointed out, this fix would introduce a regression, caught by the following test:
  it("triggers a TypeScript error when passed a ThingLocal without a base IRI", () => {
    const localThing: ThingLocal = createThing();

    // @ts-expect-error
    expect(() => asUrl(localThing)).toThrow();
  });

That means that we'd expect Typescript to complain about asUrl(localThing), but it does not.
Note that a ThingLocal and a ThingPersisted are very similar from a type system standpoint, the only difference being the shape of the IRI of the thing. ThingLocal uses a well-known IRI which is erased when the dataset is saved at a given IRI, and the ThingPersisted uses any IRI. This is why the type guard was used: we can't just check that the Thing is a ThingPersisted, because a ThingLocal would pass that test, we actually have to test that the Thing is not a ThingLocal, because we know the shape of the IRI to be matched.

Huh, that does work. I was doing something similar before with a ternary, and I couldn't get it to work so I refactored it to an if and added the assertion. Weirdly enough, trying to build it with the type assertion fails with the following error, even though your version without the type assertion succeeds.
(typescript) Error: /Users/i/workspace/mysilio-co/garden-kit/src/utils.ts(52,23): semantic error TS2345: Argument of type 'ThingPersisted' is not assignable to parameter of type 'never'.

Gonna close for now, since I go things working, but here's a branch with the failing type assertion: https://github.com/mysilio-co/garden-kit/tree/failing-asurl-type. No clue why it breaks when I assert it's a ThingPersisted.

Thanks, I'll look into it to see if there is anything we need to change for things to be cleaner


Request Feature

So powerful download manager library bro. Thank for this library .Please add  Custom Field for download object and notification for download status bro.

@DeevD Thanks for using Fetch. The request and download object has a tag field that you can use to add custom data on a download. Example
        final Request newRequest = new Request(url, file);
        newRequest.setGroupId(newGroupId);
        newRequest.setTag("Custom Data. You can use custom json"); // set custom data here

        fetch.enqueue(newRequest, new Func<Download>() {
            @Override
            public void call(Download download) {
                //Enqueued Successfully

                download.getTag(); //Get the custom data here
            }
        }, new Func<Error>() {
            @Override
            public void call(Error error) {
                //Error occurred when trying to enqueue.
            }
        });

As for notifications, I do not believe that Fetch should handle this. Being that notifications has to be custom to each application, it would be best for the application developer to provide the notifications. The Fetch Listener provides all the callbacks needed to show the right notification.

thank bro can you provide sample for notification in next release version  bro ?

See my previous comment. Fetch will not be implementing notifications.


Logger metadata unavailable when using LoggerBackend

Currently the recommended way to attach Logger.metadata is via a presend hook that pulls out relevant metadata and attaches it to the event.  This works great under normal situations because the presend hook runs in the same process as where the exception occurred, making Logger.metadata accessible.
However when using the LoggerBackend the message is first sent to a gen event process before being turned into a Sentry exception.  The presend hook loses access to the original Logger.context.
This is fixable and there's a few ways to do but wanted to get it on the radar as I work on the issue

This option is probably too presumptuous but is an option:
https://github.com/ironbay/sentry-elixir/commit/2b7a35e6778823ae1901b07a2213475bcf076e93

@thdxr hey, thanks for opening an issue!
It looks like this became possible with Elixir 1.7/OTP 20 Logger changes, so we should be safe on that end.
I think a solution like the one linked is a good starting point 🙂

I started playing around a bit with this.  I think a solution along the lines of: https://github.com/getsentry/sentry-elixir/compare/logger-metadata?expand=1
is workable?
I think for now I'd rather avoid recursing through nested maps/lists, as it could be a can of worms if there happens to be an extremely nested or lengthy list/map.

That looks perfect, I agree about the recursion because even the default console logger expects you to pass in primitives and not nested objects

Cool!
I've opted to have it disabled by default due to potentially sensitive information being included in events, with it being enabled using Logger.configure_backend/2 in #338


Implement "Replica" for the explorer

In order to serve the authority batches to the explorer, we need a backend that follows an authority, downloads the batches, stores them locally, and serve them to the explorer through a REST API. We call this backend a Replica.
We don't have to reuse the gateway service to serve the explorer because the functionality is completely disjoint at this moment.
Due to this, writing a new "replica" service for the explorer won't generate much duplicate code, and is likely a lot easier to do than waiting for refactoring the current gateway service to support explorer.
The replica could reuse the existing AuthorityStore fully. We just need to add a flag to AuthorityStore that allows it to keep old objects. So no need to write a new store for now.
Then we can write a simple REST server attached to the replica for the explorer. It should be much simpler than the REST server for gateway because we only serve explorer with it.
Then we can figure out whether we want to eventually merge the gateway with the replica, and what do we do with the storage in the gateway.
The action items are:

[x] Augment AuthorityStore to support storing old objects, through a flag.
[ ] Add a new (minimum) replica component that uses AuthorityStore and connect to the authority to download batches and store locally.
[ ] Add a REST server for the replica component.
[ ] Explorer talk to the REST server.

This is out-of-dated and will be replaced by the latest fullnode plan.


Successful logging test (but it requires 2 requests)

This is a continuation from #175
It's a big diff but scan ahead to test/specs/java-function/function_spec.rb
I'm unable to get that original test to pass, but I'm able to get another example modified from the sfdx generate:function template to work, strangely you must call it twice before any logs show up. Stranger still is that calling the other test twice seems to not have any affect.
Weirder still, I'm able to see logs 100% of of the time when I manually run this (repro script https://heroku.slack.com/archives/C01R6FJ738U/p1633469006306500?thread_ts=1633376831.281000&cid=C01R6FJ738U)
I'm also able to see logs manually building a pack image and invoking it:
Build the buildpack and app with pack:
cd test/meta-buildpacks/java-function
bash build.sh
cd -

pack buildpack package jvm_debug_function_buildpack --config test/meta-buildpacks/java-function/target/package.toml --format=image

pack build jvm_debug_app --path test/fixtures/function_with_logs -B heroku/buildpacks:18 --buildpack docker://jvm_debug_function_buildpack -v

Then boot the app:
$ docker run --rm -p8080:8080 jvm_debug_app -v

And hit it with a request:
$ sfdx run:function -l http://localhost:8080 --payload "{}"
 ›   Warning: No -o connected org or defaultusername found, context will be partially initialized
Using defaultusername undefined login credential to initialize context
POST http://localhost:8080... 200
{
  "accounts": []
}

Works:
$ docker run --rm -p8080:8080 jvm_debug_app -v
Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
13:36:11.823 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Detecting project type at path /layers/heroku_jvm-function-invoker/bundle...
13:36:11.838 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Detected Function Bundle project at path /layers/heroku_jvm-function-invoker/bundle after 10ms!
13:36:11.838 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Scanning project for functions...
13:36:12.335 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Found 1 function(s) after 497ms.
13:36:12.336 INFO  [RUNTIME] c.s.f.j.r.commands.ServeCommandImpl - Found function: com.example.DebuglogsjavaFunction
13:36:12.363 INFO  [RUNTIME] io.undertow - starting server: Undertow - 2.2.11.Final
13:36:12.371 INFO  [RUNTIME] org.xnio - XNIO version 3.8.4.Final
13:36:12.382 INFO  [RUNTIME] org.xnio.nio - XNIO NIO Implementation Version 3.8.4.Final
13:36:12.460 INFO  [RUNTIME] org.jboss.threads - JBoss Threads version 3.1.0.Final
println works
dateTime=2021-10-06T13:36:14.997Z level=INFO loggerName=com.example.DebuglogsjavaFunction message="logging info 1" invocationId=d51d348d-435e-4e3a-87aa-22e258868e11dateTime=2021-10-06T13:36:15.006Z level=INFO loggerName=com.example.DebuglogsjavaFunction message="logging info 2" invocationId=d51d348d-435e-4e3a-87aa-22e258868e11dateTime=2021-10-06T13:36:15.007Z level=INFO loggerName=com.example.DebuglogsjavaFunction message="logging info 3" invocationId=d51d348d-435e-4e3a-87aa-22e258868e11

I'm still unable to see logs via the  sfdx run:function:start command:
$  sfdx run:function:start
Building debuglogsjava
20: Pulling from heroku/buildpacks
# ...

Hit it with a request (several times):
$ sfdx run:function -l http://localhost:8080 --payload "{}"
 ›   Warning: No -o connected org or defaultusername found, context will be partially initialized
Using defaultusername undefined login credential to initialize context
POST http://localhost:8080... 200
{
  "accounts": []
}

Still no log output:
Starting debuglogsjava
Running on port :8080
Debugger running on port :9229
Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
Listening for transport dt_socket at address: 9229
13:37:53.431 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Detecting project type at path /layers/heroku_jvm-function-invoker/bundle...
13:37:53.443 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Detected Function Bundle project at path /layers/heroku_jvm-function-invoker/bundle after 9ms!
13:37:53.443 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Scanning project for functions...
13:37:53.996 INFO  [RUNTIME] c.s.f.j.r.c.AbstractDetectorCommandImpl - Found 1 function(s) after 553ms.
13:37:53.996 INFO  [RUNTIME] c.s.f.j.r.commands.ServeCommandImpl - Found function: com.example.DebuglogsjavaFunction
13:37:54.017 INFO  [RUNTIME] io.undertow - starting server: Undertow - 2.2.11.Final
13:37:54.029 INFO  [RUNTIME] org.xnio - XNIO version 3.8.4.Final
13:37:54.040 INFO  [RUNTIME] org.xnio.nio - XNIO NIO Implementation Version 3.8.4.Final
13:37:54.122 INFO  [RUNTIME] org.jboss.threads - JBoss Threads version 3.1.0.Final

I'll close this for now, it's a draft from early October that hasn't been touched since. Feel free to reopen!


Lammps dump properties not found.

I am using chemfiles to read lammps dump files as a replacement for a reader that I have written as I would like to have a generic reader that can handle many formats. Lammps is however, the most important one at the moment. I find that chemfiles returns an empty list when I call frame.list_properties  and returns 0 when I call frame.properties_count. However, if I call frame.velocities or frame.positions it does return the velocities and positions. Even the frame.has_velocities returns true.
Perhaps I have misunderstood how the properties work but when looking through the cpp code I noticed that chemfiles does in fact read additional properties from the data and I believe the charges on the atoms were also stored correctly. I would like to be able to access any of the properties in the dump, including custom ones. The code appears to do this but I cannot get the api to access them.
the header of the file is:
ITEM: TIMESTEP
100
ITEM: NUMBER OF ATOMS
1600
ITEM: BOX BOUNDS pp pp pp
0.0000000000000000e+00 3.1134167999999999e+01
0.0000000000000000e+00 3.1134167999999999e+01
0.0000000000000000e+00 3.1134167999999999e+01
ITEM: ATOMS id mol type element q x y z ix iy iz

I also frequently will dump forces, energy, or stresses along with the data.
My input script is quite simple.
>>> from chemfiles import Trajectory

>>> data = Trajectory('test_data/dump.lammpstrj')
>>> frame = data.read()
>>> frame.nsteps
4
>>> frame.has_velocities()
True
>>> frame.list_properties()
[]
>>> frame.properties_count()
0

So the handling of properties is not fully consistent currently, and that's something I'd like to improve before releasing version 1.0. In particular, velocities, mass and charge have a special treatment in the code.
With the current version, frame properties are used for single scalar values associated with the frame, and atom property are used for scalar values associated with each atom. To access the velocities for example you should do
data = Trajectory('test_data/dump.lammpstrj')
frame = data.read()

frame.velocities  # give a numpy ndarray with the velocities

and for the mass/charges
data = Trajectory('test_data/dump.lammpstrj')
frame = data.read()

for atom in frame.atoms:
    atom.mass
    atom.charge
    # also not atomic "properties"
    atom.name
    atom.type

I also frequently will dump forces, energy, or stresses along with the data.

Energy should be accessible as frame.get("energy") in C++ or frame["energy"] in Python if defined as
ITEM: energy
-42.55

I don't think stress is supported right now since it is a matrix. Do you have an example file containing the stress?

I can certainly find one for you. Is this also applicable to a custom property defined by the lammps user to be dumped?

I'm not sure, maybe @ezavod knows more about this. If you can contribute a file with such user-defined property, we can add it to the test set and make sure this is supported

I will speak to some of my collaborators and get some descriptive example files. The package is very helpful by the way. We want to integrate it into some software we are writing.

Unfortunately chemfiles does not support any additional properties in LMAPPS dumps yet (neither per-frame nor per-atom). The only ones that are read are type, element name, mass, and charge (those have this special treatment which @Luthaf alluded to) in addition to positions and velocities.
But luckily we have already much of the underlying work for per-atom properties done, so that adding additional properties should be pretty straight forward. I'm actually using a simple hack to read per-atom flags for a while now:

diff --git a/src/formats/LAMMPSAtom.cpp b/src/formats/LAMMPSAtom.cpp
index c152c4b1..2159ebd9 100644
--- a/src/formats/LAMMPSAtom.cpp
+++ b/src/formats/LAMMPSAtom.cpp
@@ -354,6 +354,8 @@ void LAMMPSAtomFormat::read_next(Frame& frame) {
     }
     std::vector<lammps_atom_attr_t> fields;
     fields.reserve(atoms_item.size() - 1);
+    std::vector<std::string> field_names;
+    field_names.reserve(atoms_item.size() - 1);
     optional<size_t> atomid_column = nullopt;
     std::vector<bool> duplicate_check;
     optional<std::vector<std::array<int, 3>>> images = nullopt;
@@ -370,6 +372,7 @@ void LAMMPSAtomFormat::read_next(Frame& frame) {
             images = std::vector<std::array<int, 3>>(natoms, {0, 0, 0});
         }
         fields.push_back(attr);
+        field_names.emplace_back(atoms_item[i]);
     }
     lammps_position_representation_t use_pos_repr = detect_best_pos_representation(fields);

@@ -505,7 +508,9 @@ void LAMMPSAtomFormat::read_next(Frame& frame) {
                 atom.set_charge(charge);
             } break;
             case ATOMID:
+                break;
             case UNKNOWN:
+                atom.set(field_names[j], parse<double>(splitted[j]));
                 break;
             }
         }

I'll try to tidy this up and open a PR for this soonish.

I don't think stress is supported right now since it is a matrix.

My understanding is that LAMMPS dumps arrays element wise. This means that a 3x3 stress matrix results in 6 separate properties that can be retrieved by something like atom.get("c_stress[1]"); atom.get("c_stress[2]"); ....
While per-atom properties are rather easy, per-frame or global properties are not as simple. My understanding of the documentation is that LAMMPS dump does only allow for per-atom properties ("[...] the compute, fix, or variable must generate per-atom values [...]"). The usual 'atoms' or 'custom' styles have a fixed header and adding an extra ITEM: energy would break these. However the 'local' style seems to accommodate additional header data, which might be used by chemfiles to deal with per-frame properties but I have to look at this in more detail.
Any files that show use cases are very much appreciated.

Yeah we have a small python implementation of such a reader that can automatically read the typical LAMMPS dump parameters. In cases where a user has custom values we ask that they provide a dict argument to assign the columns to a property.
In per-frame properties we have the same thing but then this must be read from a different file completely. I will be working on implementing chemfiles into my project for a few days this week and so will update the test files I am using for this implementation in the coming days. I can also take a look at some changes as well. My cpp is not great but I would like to improve.

I can also take a look at some changes as well.

Awesome, feel free to test an scrutinize #413 and see if this fulfills you needs.

In per-frame properties we have the same thing but then this must be read from a different file completely.

My understanding is that those per-frame properties have to be dumped via the thermo command and cannot be part of the trajectory file itself. IMHO dealing with those extra files is not part of chemfiles. The files seem to be easily read by packages like pandas in python.

My understanding is that those per-frame properties have to be dumped via the thermo command and cannot be part of the trajectory file itself

This is true and I never read them together. Of course there can always be a python reader for this stuff as it is very customizable. We also have one of these already it just doesn't have the speed of c++.

Awesome, feel free to test an scrutinize #413 and see if this fulfills you needs.

I will check it out today! Thanks.

I see that in the cpp code you use the atom id for referencing. I have two questions there, is it possible to access this atomid? Secondly, if the atoms are not sorted, do you do anything in this case?

if the atoms are not sorted, do you do anything in this case?

Atoms are sorted according to their id, if ids are dumped. Else, the ordering of the trajectory file is used. This assumes consecutively numbered ids starting from 1. LAMMPS does not really enforce this, but I think this a de facto standard nonetheless.

is it possible to access this atomid?

Yes, this is indirectly possible because chemfiles uses the atom ids to sort the atoms accordingly. So the i-th atom in the frame has the corresponding ID = i+1.

I like the PR. I think I will have to wait for it to be merged. I actually also had some issues building the Python package locally as despite my -e flag it tried to save data in a protected file. Nonetheless, I can only add it to my project when the functionality is part of the main code branch so I will wait for the PR to go through.

I actually also had some issues building the Python package locally as despite my -e flag it tried to save data in a protected file.

Could you open a separate issue for this in https://github.com/chemfiles/chemfiles.py/?

Yes I will do that soon.

Does #413 cover all your use cases @SamTov?

yes I would say to. We can close this issue now.

Sorry, I am still struggling to use this PR through the python api. Does something else need to be done on this end?

Does something else need to be done on this end?

You need to update the version of libchemfiles.so used by python. This mean either waiting for the full release (tracked in #415); or building it yourself.
In the second case, since there were only backward compatible changes between the latest release and 0.10.1, you should be able to get it working by running:
git clone https://github.com/chemfiles/chemfiles.py/
cd chemfiles.py

# update the git submodule containing the C++ library
cd lib
git fetch
git checkout 0.10.1
cd ..

# re-build & re-install the library
pip install .
# alternative to the pip install above, with more verbose output
# python setup.py install

I got a
error: pathspec '0.10.1' did not match any file(s) known to git

error.

From the lib directory, what's the output of these commands?
git fetch
git remote -v
git tag

git fetch
>>>
git remote -v
>>> origin	https://github.com/chemfiles/chemfiles.py/ (fetch)
>>> origin	https://github.com/chemfiles/chemfiles.py/ (push)
git tag
>>> 0.10.0
>>> 0.4.0
>>> 0.5.0
>>> 0.6.0
>>> 0.7.1
>>> 0.7.2
>>> 0.7.3
>>> 0.7.4
>>> 0.8.0
>>> 0.9.1
>>> 0.9.2
>>> 0.9.3

My bad, does it work if you use git fetch --tags?

no that also did not work.
git fetch --tags
>>>
git checkout 0.10.1
>>> error: pathspec '0.10.1' did not match any file(s) known to git

You are running from inside the lib folder right? I missed that the output of git remote was wrong (should be https://github.com/chemfiles/chemfiles/), today have been a long day ...
My instructions above where missing a git submodule update --init, I changed them. Can you run git submodule update --init from chemfiles.py and then fetch/checkout from the lib folder?

Appears to have worked!
I also see what you were trying to explain now... It was just checkout out the correct branch on the chemfiles core library then installing the python package.
I ran a test on a system with forces and it returns them correctly.


Fixed build for 386 arch

Codecov Report

Merging #62 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master      #62   +/-   ##
=======================================
  Coverage   85.12%   85.12%
=======================================
  Files           5        5
  Lines         390      390
=======================================
  Hits          332      332
  Misses         47       47
  Partials       11       11

Flag
Coverage Δ

#unittests
85.12% <100%> (ø)
:arrow_up:

Impacted Files
Coverage Δ

protect/queue.go
89.47% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


The annotation masks disappear when clicked on Next button

I am able to export the annotated masks but as soon as I click on the "next" so that I can annotate the other images, the masks previously made are gone. We have to annotate the images again.
It seems as if as soon as we hit "next", the app is removing the overlaid mask that has just been made and I am left with nothing. I have just cloned the library and started working.

@nikhil-occipitaltech This is a UI widget only. You have to take care of how to store the annotation data.

I believe I have used an older version of this tool and it used to save the annotated masks on the fly. However I didn't set the tool that time and it is possible that some modification may have taken place that I am unaware of. Would be  helpful if I you could tell me how do I get an auto save functionality like the one label me has.

@nikhil-occipitaltech You can implement whatever operation in the callback functions. See the demo example.

@kyamagu I think it worth notifying if user didn't export annotations. Or if annotation was changed after last export

@arogozhnikov I did not export the annotation. I just annotated and moved to next image.


KeyProtection wont be enabled

Following the same procedures mentioned here keyprotection was not enabled until i setup encryption and signing certificates on the HGS server. Following this article i was able to start the hgs server perfectly https://argonsys.com/microsoft-cloud/library/step-by-step-configuring-the-host-guardian-service-in-windows-server-2016/

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

ID: f498ebf8-8cda-7e68-c70c-9ecd0e7bd7df
Version Independent ID: b710fea4-0d4e-5fdd-03e8-ce2679fa18c2
Content: Tutorial: Always Encrypted with secure enclaves using SSMS - SQL Server
Content Source: docs/relational-databases/security/tutorial-getting-started-with-always-encrypted-enclaves.md
Product: sql
Technology: security
GitHub Login: @jaszymas
Microsoft Alias: jaszymas

@ahmedifhaam -- Ahmed, thank you for your feedback and a solution.
@jaszymas -- please look into this issue #4171.
cc @MightyPen as a writer

Following up with Jakub

@WilliamAntonRohm (Y)

Hey @ahmedifhaam,
Thanks for sharing this feedback! Are you trying to set up HGS for shielded VMs or SQL Server Always Encrypted?
The steps in this doc are only intended for use with SQL Server, which does not require the key protection service. The steps for setting up HGS for shielded VMs are available at https://aka.ms/shieldedvms
Ryan

@ahmedifhaam - We'll close this for now, but please follow-up if you have any concerns. Thanks!


linkding: init at 1.36.0

Description of changes
From the project:

Self-hosted bookmark manager that is designed be to be minimal, fast, and easy to set up using Docker.

Closes #341665.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

I can take over the review for aarch64-darwin as soon as the PR is ready. 🙂

Some open issues at this point:

[ ] I copied all the dev dependencies into nativeCheckInputs. Trim down to only the ones needed for the build to pass.
[ ] I copied all the non-dev dependencies I could find in nixpkgs into nativeBuildInputs, but the build seems to pass even without some of them (commented out django-registration and uWSGI for now). Figure out whether they are actually needed, and remove any which are not needed.

The PR must contain 2 commits ad minima:

1 commit to add the package: linkding: init at 1.36.0
1 commit to add the NixOS service: nixos/linkding: init (please verify in the contributor guide documentation how to format commit log messages correctly, I may be wrong here)

Since you're adding a new NixOS service, a release note entry must be added too.

Thank you! All done.

Converted to draft since this is actually much harder than I originally thought. This is a Django application built with Docker-only deployments in mind, and will require at least twice as much code to actually work as intended.


New version: OCReract v1.0.1 - Fix: Added tesseract installation in automerge.yml

Since OCReract is a wrapper, the main dependency must be installed for proper testing

Try again


Update prefers-color-scheme.json

Can you provide documentation?

Aviable in the version 61.0.3298.3 the 2019-04-30
https://blogs.opera.com/desktop/changelog-for-61/

Thanks!

Confirmed, thanks!


Swagger authentication fails

https://nightly2.apinf.io/api/GAEtqKnGe6JvEWJ43
Go to API Ernit Thursday 2 in nightly2. Open documentation tab.
Click autheticate. input your API key and perss authentigate.
Documentation disappears, and the text "fetching resource list: https://nightly2.apinf.io/gridfs/DocumentationFiles/id/88762abedccd0f38b5b62759; Please wait." remains forever.

@preriasusi I take a look at this tomorrow

@preriasusi Got header added to request, small fix.
securityDefinitions:
  ApinfAuthorization:
    description: Please give your Apinf API key here
    type: apiKey
    in: header
    name: api_key

Name is the exact header variable name, and cannot have whitespace. Now it goes through, and header goes with request.

By default API Umbrella expects api_key in query params, it can be set there by changing "in: header" -> "in: query". After that I got query pass Umbrella, but then I need to authorize to Ernit API.

@jykae If you try the adult login API, it does not require login from Ernit. That API is "open".

@preriasusi: Tried with nightly.apinf.io that uses nightly.umbrella.apinf.io instance Created API and setup everything by myself. Got query through for real now.

Above is expected Ernit unauthorized response. Just need to figure out then how it would be nicest to pass Ernit Oauth Bearer token.

Thanks for chat. Here is properly configured version https://nightly.apinf.io/api/6qhxswc8yox9SGaXQ
Missing thing is to figure out how pass Ernit Bearer token.

@preriasusi Do you need further guidance for this? Or can this be closed?

Closed


Wrong expiration date

EXPIRES JANUARY 19, 2038.
But setted date is much closer.
Repro:

new paste

Set tommorow as exp. date

Reproducible on public demo

Confirmed reproducible, looking into this now.

Looks like this is caused client-side by https://github.com/LINKIWI/modern-paste/blob/dev/app/static/js/paste/PostController.js#L147. The client is supplying an expiry time in milliseconds (standard for JS) while the server expects all timestamps to be in seconds (standard for Python). Can't believe I never caught this bug.

699b6b42c96243387225e80f809c1619ed6da986 fixes this issue and is now deployed on dev.modernpaste.com and demo.modernpaste.com.


Engine tree is red because of failing/flaky tests in a11y.

The failing run is here. Sheriff thread ID is here. Regression was introduced in https://github.com/flutter/engine/pull/23110.

lower the priority since the test is skipped, I will keep this open to track un-skipping the test


[MacOS] Two-finger press triggers scroll event in some cases

Steps to Reproduce

I can reproduce this with a multi-line TextField on my Macbook Pro

Execute flutter run on the code sample
Scroll the content to a mid position, and press the touch board with two fingers. We will see the content scroll to another position unexpectedly.
Not 100% reproduce, please try several times.

Expected results: The content should not scroll.
Actual results: The content have a unexpected scroll.

Code sample

import 'dart:io';

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Container(
        margin: const EdgeInsets.all(20),
        decoration: BoxDecoration(
          border: Border.all(
            color: Colors.grey
          )
        ),
        child: TextField(
          maxLines: null,
          expands: true,
          controller: TextEditingController(
            text: File('.dart_tool/package_config.json').readAsStringSync()
          ),
        ),
      ),
    );
  }
}

Logs

flutter doctor -v
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.1 21C52 darwin-x64, locale
    zh-Hans-CN)
    • Flutter version 3.0.2 at /Users/megatronking/Github/flutter
    • Upstream repository https://gitee.com/mirrors/Flutter.git
    • Framework revision cd41fdd495 (12 days ago), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/megatronking/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/megatronking/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/megatronking/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.1 21C52 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 102.0.5005.115

HTTP Host availability check is taking a long time...[!] HTTP Host Availability
    ✗ HTTP host "https://maven.google.com/" is not reachable. Reason: An error
      occurred while checking the HTTP host: Operation timed out
    ✗ HTTP host "https://cloud.google.com/" is not reachable. Reason: An error
      occurred while checking the HTTP host: Operation timed out

! Doctor found issues in 1 category.

I can reproduce this issue on stable and master.

https://user-images.githubusercontent.com/50555895/174737271-3350d8ec-a3c6-478a-b586-8aaba60011af.mov

Code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Container(
        margin: const EdgeInsets.all(20),
        decoration: BoxDecoration(border: Border.all(color: Colors.grey)),
        child: TextField(
          maxLines: null,
          expands: true,
          controller: TextEditingController(
            text:
                'Pretium eu vel ante ipsum enim enim dapibus venenatis ultricies ante. ' *
                    200,
          ),
        ),
      ),
    );
  }
}

flutter doctor -v (Stable)
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-US)
    • Flutter version 3.0.2 at /Users/nabeelparkar/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cd41fdd495 (13 days ago), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/nabeelparkar/Library/Android/sdk/
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 68.1.4
    • Dart plugin version 221.5787.37

[✓] VS Code (version 1.68.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Brave Browser <IP_ADDRESS>

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

flutter doctor -v (Master)
[✓] Flutter (Channel master, 3.1.0-0.0.pre.1317, on macOS 12.4 21F79 darwin-arm, locale en-US)
    • Flutter version 3.1.0-0.0.pre.1317 on channel master at /Users/nabeelparkar/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d4929bc828 (6 hours ago), 2022-06-20 20:09:05 -0400
    • Engine revision ceac23d7a9
    • Dart version 2.18.0 (build 2.18.0-190.0.dev)
    • DevTools version 2.14.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/nabeelparkar/Library/Android/sdk/
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 68.1.4
    • Dart plugin version 221.5787.37

[✓] VS Code (version 1.68.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Brave Browser <IP_ADDRESS>

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

maybe this is a known issue?

Not that I am aware of.
Hazarding a guess here... it does not look like EditableText implements any Multi-* gesture detectors. It looks like in this case then, the scrollable is winning the gesture. Using more than one finger or pointer for a scroll gesture multiplies the scrolling effect (https://github.com/flutter/flutter/issues/11884), so here a tiny scroll movement would be doubled.
cc @dkwingsmt since this is also trackpad related and @justinmc in case you two have other thoughts.

Not sure what is meant by "two-finger press", are you touching the trackpad with two fingers, then quickly lifting them off, or  do you keep touching the trackpad? The scroll movement is not getting doubled here, that only comes into effect with two fingers on a touchscreen or trackpad + touchscreen.
It's expected that you should be able to scroll the textbox with the trackpad, maybe I don't understand the process but I can't reproduce the rapid scroll jump seen in the video above.

@moffatman Long press on the macbook's touchpad with two fingers, expect to show a toolbar on the TextField, but  at the same time trigger a scroll event.

@MegatronKing
Maybe the difference comes from the word "press", it's not clear if you mean just touching fingers to the trackpad, or pressing them down fully (causing the "click" sound).
When I touch two fingers (not "clicking"/pressing down the touchpad completely)...

In Flutter apps: Content is scrolled. No right-click menu.
In other Mac apps: Content is scrolled. No right-click menu.

When I long press with two fingers (fully pressing down / "clicking")...

In Flutter apps: Moving the two fingers causes movement of the mouse cursor. Toolbar/right click menu is shown after the long-press is released. No scrolling
In other Mac apps: Moving the two fingers causes movement of the mouse cursor. Right-click menu is shown for the duration of the long-press. No scrolling

Maybe a change is needed to the textfield toolbar logic to show during press, but I don't see any unexpected scroll in my testing.

@moffatman
When I long press with two fingers (fully pressing down / "clicking")...

In Flutter apps: Moving the two fingers causes movement of the mouse cursor. Toolbar/right click menu is shown after the long-press is released. No scrolling

This is my case, but I can see the content scrolls to cursor position at same time.

I found the cause. It's not related to trackpad scrolling at all. When you right-click to show the text editing menu, the text field will scroll to show your current text selection. If you never left-clicked in the text field, that will be at the beginning of the text field, which explains the video above.
The solution would be to have the Editable select the text under the mouse during a right-click, which seems to be standard practice on most desktop applications.


Async file sending cause an error

I'm trying to send a file by its URL. It works fine, but sometimes it causes an exception.
file_url = "https://osx.telegram.org/updates/Telegram-2.94-92789.app.zip"
await sender.sendDocument(document=file_url)

I'm using a telepot v 11.0 and this code cause an error:
telepot.exception.TelegramError: ('Bad Request: wrong file identifier/HTTP URL specified', 400, {'description': 'Bad Request: wrong file identifier/HTTP URL specified', 'ok': False, 'error_code': 400})
on_close() called due to TelegramError: ('Bad Request: wrong file identifier/HTTP URL specified', 400, {'description': 'Bad Request: wrong file identifier/HTTP URL specified', 'ok': False, 'error_code': 400})

But this URL is ok and you can download the file using a browser.
According to Telegram, file sent by URL must have the correct MIME type. MIME type of this file is application/zip so I guess it's ok too.
Also, the file size is 15 703 537 bytes or 15.7 MB.
Probably, I'm doing something wrong, hope that someone will help me with that problem. Thanks.

me too, but on C#.
can we try to do it just by http request on the browser like that
https://api.telegram.org/bot/sendaudio?chat_id=180504101&audio=http://panel.cafefars.com:8088/mp3/1.mp3
response: {"ok":false,"error_code":400,"description":"Bad Request: wrong file identifier/HTTP URL specified"}


Split the runtime release into an interpreter and a runtime build.

This makes it much faster to build runtime images.

cc @sharifelgamal @liyanhui1228

For now I'm thinking the interpreter build will be manual (or in a different job) so we don't need to rebuild the interpreters for every release. Does that make sense?


predict_generator doesn't exist

Given that evaluate_generator exists, it seems we should be able to get the model outputs when using a generator with a method like predict_generator. I'll tackle this tomorrow unless someone gets to it first. I don't think it will be too hard and would be extremely useful.

Yes, agreed, it seems logical to have it and it would be useful.
On 4 April 2016 at 18:28, Michael Oliver<EMAIL_ADDRESS>wrote:

Given that evaluate_generator exists, it seems we should be able to get
the model outputs when using a generator with a method like
predict_generator. I'll tackle this tomorrow unless someone gets to it
first. I don't think it will be too hard and would be extremely useful.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/2191

I have the feeling predict_generator gives an output out of order. If I understand correctly then both of the following branches should be equal.
if False:
    predictions = model.predict_generator(augment.testDataGenerator.flow(X_test, batch_size=batch_size), len(X_test))
else:
    predictions = []
    for i in xrange(len(X_test)):
        prediction = model.predict_generator(augment.testDataGenerator.flow(X_test[i:i+1], batch_size=1), 1)
        predictions.append(prediction)


error on run server: modules removed in Django 1.9

References to packages that have been removed or changed in Django 1.9 should be updated in code.
Specifically, django.utils.importlib
site-packages/filer/utils/loader.py:12:
RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
     from django.utils.importlib import import_module

Fixed by #598