Added executeDelete

Added executeDelete() to WebRequestor, and implementations in ClasspathWebRequestor, DefaultWebRequestor, and FakeWebRequestor.

Thx for your pull request. But I don't understand why you need the change and what's the intention. Because restfb provides the FacebookClient.deleteObject method. It uses the "http method override" facebook provides. So is there an problem with the current implementation?
Have a look here: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#deleting

I've been working with custom audiences, and removing members uses an HTTP
DELETE. Method override would probably work, but since a Java library could
support HTTP DELETEs, I thought it would be more intuitive to have an
executeDelete rather than asking them to issue a post request with
method=delete in the parameter string.
On Sun, Jan 25, 2015 at 07:23 Norbert Bartels<EMAIL_ADDRESS>wrote:

Thx for your pull request. But I don't understand why you need the change
and what's the intention. Because restfb provides the
FacebookClient.deleteObject method. It uses the "http method override"
facebook provides. So is there an problem with the current implementation?
Have a look here:
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#deleting
—
Reply to this email directly or view it on GitHub
https://github.com/revetkn/restfb/pull/174#issuecomment-71370122.

Okay. I cherry-picked your commit and work a bit on it. Both ways are supported and you can activate the fallback mechanism with a simple flag.

Thanks!
Eric
On Mon Jan 26 2015 at 4:22:33 AM Norbert Bartels<EMAIL_ADDRESS>wrote:

Okay. I cherry-picked your commit and work a bit on it. Both ways are
supported and you can activate the fallback mechanism with a simple flag.
—
Reply to this email directly or view it on GitHub
https://github.com/revetkn/restfb/pull/174#issuecomment-71432804.

commit added to Issue #173  - close the pull request


Add the missing feature openapi-explorer in ui mod

It's not work now
poem-openapi = { version = "2.0.22", features = ["openapi-explorer"] }
and must add another feature
poem-openapi = { version = "2.0.22", features = ["openapi-explorer", "swagger-ui"] }

thanks


Remove rust dependency from Cosmos

To install Cosmos, users must install Rust as part of the recently introduced openlineage-integration-common package dependency, even if they don't opt to use openlineage.
The user ES reported this bug in the Slack channel:
https://apache-airflow.slack.com/archives/C059CC42E9W/p1694525966501819
"Hi
pip install astronomer-cosmos==1.1.0

gives me:
Collecting openlineage-sql==1.1.0 (from openlineage-integration-common->astronomer-cosmos==1.1.0->-r r.txt (line 2))
  Using cached openlineage_sql-1.1.0.tar.gz (31 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

      Checking for Rust toolchain....
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

We identified that the user was running Cosmos on Windows, and in these cases, the openlineage-sql library, which is a dependency of openlineage-integration-comon, didn't have a pre-compiled Rust for it.

For now, we removed openlineage-integration-comon as a requirement of Cosmos. We can review once/if https://github.com/OpenLineage/OpenLineage/issues/2110 is implemented.
As discussed in Slack, there is no Airflow Window support) yet, but things may change.
We know many dbt users develop on Windows, and from a Cosmos perspective, we can support this user-journey, where possible.


🐛 [Bug] Unable to export PyTorch transformer encoder using TensorRT

Bug Description
TensorRT fails to export PyTorch transformer encoder. Same is true for PyTorch transformer decoder, failing with the same error.
To Reproduce
Steps to reproduce the behavior:

Download  docker image nvcr.io/nvidia/pytorch:22.04-py3
Inside the container run the code snippet supplied below

Code
import torch_tensorrt
import torch
from torch.nn.modules import TransformerEncoder
from torch.nn.modules import TransformerEncoderLayer as TorchTransformerEncoderLayer

torch_tensorrt.logging.set_reportable_log_level(torch_tensorrt.logging.Level.Debug)

layer = TorchTransformerEncoderLayer(
    batch_first=False,
    activation="relu",
    d_model=256,
    dim_feedforward=2048,
    dropout=0.1,
    nhead=8,
    device="cuda"
)

encoder = TransformerEncoder(layer, 3)

scripted_module = torch.jit.script(encoder)

trt_ts_module = torch_tensorrt.compile(
    scripted_module,
    inputs=[
        torch_tensorrt.Input(
            shape=[256, 1, 256], dtype=torch.float
        )
    ],
)

torch.jit.save(trt_ts_module, "tensorrt_minimal.ts")

Error message
/opt/conda/lib/python3.8/site-packages/torch/jit/_recursive.py:240: UserWarning: 'batch_first' was found in ScriptModule constants, but was not actually set in __init__. Consider removing it.
  warnings.warn("'{}' was found in ScriptModule constants, "
INFO: [Torch-TensorRT] - ir was set to default, using TorchScript as ir
DEBUG: [Torch-TensorRT] - Settings requested for Lowering:
    torch_executed_modules: [
    ]
Traceback (most recent call last):
  File "tensorrt_minimal.py", line 22, in <module>
    trt_ts_module = torch_tensorrt.compile(
  File "/opt/conda/lib/python3.8/site-packages/torch_tensorrt/_compile.py", line 115, in compile
    return torch_tensorrt.ts.compile(ts_mod, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/torch_tensorrt/ts/_compiler.py", line 116, in compile
    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))
RuntimeError: Unknown type bool encountered in graph lowering. This type is not supported in ONNX export.

Expected behavior
TensorRT should be able to export Pytorch encoder without issues.
Environment

Build information about Torch-TensorRT can be found by turning on debug messages

Torch-TensorRT Version (e.g. 1.0.0): 1.1.0a0
PyTorch Version (e.g. 1.0): 1.12.0a0+bd13bc6
CPU Architecture: x86_64
OS (e.g., Linux): Ubuntu 20.04.4
How you installed PyTorch (conda, pip, libtorch, source): conda
Build command you used (if compiling from source): /
Are you using local sources or building from archives: /
Python version: 3.8.13
CUDA version: 11.6
GPU models and configuration: NVIDIA RTX A6000
Any other relevant information: using unmodified docker image nvcr.io/nvidia/pytorch:22.04-py3

Additional context

@peri044 did we root cause where the this ONNX export message comes from? Was it torch.jit.freeze?

I've tried setting the model in eval mode by scripted_module = torch.jit.script(encoder.eval()) and this issue no longer exists. However, I see a segfault after this log which is a different error and needs to be debugged
DEBUG: [Torch-TensorRT] - Pairing 0: src.1 : Input(shape: [256, 1, 256], dtype: Float32, format: NCHW\Contiguous\Linear)

Not seeing the segfault but seen an issue from the partitioning phase.
DEBUG: [Torch-TensorRT - Debug Build] - Registering input/output torch::jit::Value for segmented graphs
Traceback (most recent call last):
  File "1165.py", line 23, in <module>
    trt_ts_module = torch_tensorrt.compile(
  File "/home/narens/Developer/opensource/pytorch_org/TensorRT/py/torch_tensorrt/_compile.py", line 113, in compile
    return torch_tensorrt.ts.compile(ts_mod, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs)
  File "/home/narens/Developer/opensource/pytorch_org/TensorRT/py/torch_tensorrt/ts/_compiler.py", line 134, in compile
    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))
RuntimeError: [Error thrown at core/partitioning/shape_analysis.cpp:122] Expected to find type str for value why_not_fast_path.126 but get nothing.


Update dhall-generic to 0.3.26

Updates us.oyanglul:dhall-generic from 0.2.0 to 0.3.26.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "us.oyanglul", artifactId = "dhall-generic" } ]

labels: library-update, semver-minor

Codecov Report

Merging #68 (dba314e) into master (5a43cfa) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #68   +/-   ##
=======================================
  Coverage   98.27%   98.27%
=======================================
  Files           1        1
  Lines          58       58
  Branches        4        4
=======================================
  Hits           57       57
  Misses          1        1

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 5a43cfa...dba314e. Read the comment docs.


sf project deploy validate is not explaining why validation failed

Summary
When running a "sf project deploy validate" command, the validation fails, but the only message received is:
FailedValidationError: Failed to validate the deployment (XXXXXXXXXXXXX). Due To:\n1 component error(s)
Steps To Reproduce
The following command was executed:
project deploy validate --manifest \"${PACKAGE_XML_PATH}\" --test-level RunLocalTests --wait 120 --verbose --target-org Prod --json > output.txt
The package.xml contains:

6 custom fields
2 lightning record pages
3 flows
1 quick action

Expected result
The deployment should be validated or, if canceled, an explanation of the cancelation reason should be received.
Actual result
The validation is canceled after a couple of minutes with the following message:
FailedValidationError: Failed to validate the deployment (XXXXXXXXXXXXX). Due To:\n1 component error(s)
System Information
The command is executed through a Jenkins job, that can deploy without issues. Now, we are including the validation option.
The sf CLI was updated today with the latest version available
sf version --verbose --json
{
  "architecture": "win32-x64",
  "cliVersion"<EMAIL_ADDRESS>  "nodeVersion": "node-v20.11.1",
  "osVersion": "Windows_NT 10.0.17763",
  "rootPath": "D:\\Program Files\\sf\\client",
  "shell": "cmd.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.9 (core)",
    "@oclif/plugin-commands 3.1.4 (core)",
    "@oclif/plugin-help 6.0.13 (core)",
    "@oclif/plugin-not-found 3.0.11 (core)",
    "@oclif/plugin-plugins 4.2.5 (core)",
    "@oclif/plugin-search 1.0.16 (core)",
    "@oclif/plugin-update 4.1.13 (core)",
    "@oclif/plugin-version 2.0.12 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.12 (core)",
    "@oclif/plugin-which 3.1.0 (core)",
    "@salesforce/cli 2.30.8 (core)",
    "apex 3.0.25 (core)",
    "auth 3.3.13 (core)",
    "data 3.1.1 (core)",
    "deploy-retrieve 3.2.16 (core)",
    "info 3.0.27 (core)",
    "limits 3.1.10 (core)",
    "marketplace 1.0.25 (core)",
    "org 3.3.14 (core)",
    "packaging 2.1.10 (core)",
    "schema 3.1.3 (core)",
    "settings 2.0.27 (core)",
    "sobject 1.1.13 (core)",
    "source 3.1.15 (core)",
    "telemetry 3.1.13 (core)",
    "templates 56.0.16 (core)",
    "trust 3.3.10 (core)",
    "user 3.2.11 (core)"
  ]
}

I forgot to mention that the issue happens in a Production org.
With the same command and package in a sandbox, validation cancels after more than 20 minutes due to insufficient code coverage in a trigger due to the execution of all local tests in the sandbox.

Looks like you can get the detailed failure messages if you don't use the --json flag.  This happens when there are errors in the deployed metadata components.  We'll fix the bug.  Thanks for reporting.

This issue is fixed in Salesforce CLI release 2.33.3.


Getting 400

$ rails generate favicon
/Users/julien/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!': 400 Bad Request (RestClient::BadRequest)
	from /Users/julien/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rest-client-1.8.0/lib/restclient/request.rb:495:in `process_result'
	from /Users/julien/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
	from /Users/julien/.rbenv/versions/2.2.3/lib/ruby/2.2.0/net/http.rb:853:in `start'

Thank you for reporting.
Could you join:

Your favicon.json file
Your master picture

If you don't want to disclose this here, you can mail me these docs at<EMAIL_ADDRESS>

(I just got your stuff by email)
This is because the API wrongly assumes your picture is in PNG format, which is not. I'm not sure what's wrong here (the API does accept SVG pics), but at least I have everything I need to fix.

Alright, it works now. Re-open the issue if it's still wrong on your side but I could generate your favicon with your picture and JSON file.
Internally, RFG is using ImageMagick indentify command. identify is smart enough to sort out PNG and SVG, even if the extension is wrong:
identify svg_pic.svg
svg_pic.svg  SVG 800x800 800x800+0+0 8-bit sRGB 30.5KB 0.000u 0:00.000
mv svg_pic.svg svg_pic.png # Oops!
identify svg_pic.png
svg_pic.png SVG 800x800 800x800+0+0 8-bit sRGB 30.5KB 0.000u 0:00.000

Until now, RFG has relied on this feature to detect the actual picture encoding.
For some reasons, that doesn't work with your picture:
identify your_svg_pic_with_wrong_extension.png
identify: improper image header `your_svg_pic_with_wrong_extension.png' @ error/png.c/ReadPNGImage/3921.

So I've just added error cases to make the process more resilient.


DNS for this website version

@punkish what is the DNS to point the domain name to?

wait… I have forked the repo to plazi/blr, so this repo will no longer be developed under my account. All future work will be on https://github.com/plazi/blr

ok, what's the new DNS name?


Coupling matrix taking too long to compute

Hi,
I have set up a script following the guidelines of the pymaster public examples. I am working in flat space and my map is 2500 x 1500 roughly.
While computing the spin0-spin0 coupling matrix takes a few hours (~4h), computing the spin2-spin2 matrix is taking 100+ hours and is still not completed. Any suggestions on how to speed this up? Any estimates on how longer that spin0-spin0 should this take?
I want to add that I am using the conda version withouth openmp (because I can't install with openmp).

Hi @umilta
Yes, the flat-sky MCM is slow, and scales badly with the number of pixels. There are two ways of speeding it up:
1- Using openmp. Why are you not able to install namaster with openmp?
2- Reducing the L_max (the computation will go like Lmax^2). You can control this through the NmtBinFlat object.

Hi @damonge,
Unfortunately I can't compile with openmp because I am doing the computation on a cluster and I have limited permission.
I will reduce L_max. Thanks!


fix: some v-slot errors preventing upgrading

This PR:
addresses some deprecated slot vs v-slot changes that should be compatible with v 2.6 of vue (which we are using currently).

I broke the slots previously - I updated this to pass the props down in the algolia proxy and render them conditionally in the internalapp. TIL slot (vue) === children (react)

@JonathanMontane sorry i forgot to squash and merge 😞


Default override behavior is reverse of python-dotenv

The default behavior of this plugin is to override the existing env variables, unlike the default in python-dotenv.
As shown in the python-dotenv docs, default is to not override env variables, in other words in python-dotenv the .env variables can be overridden by exporting a variable into the current environment.
With python-dotenv you can do load_dotenv(override=True) when you want .env file to override. Unfortunately, the poetry-dotenv doesn't allow the user to manage this aspect, its always going to override.
I think this is unexpected behavior for people who use python-dotenv.
Is there a way to set the poetry dotenv plugin to stop overriding existing environment variables?

👋 Hello! The reason the default behavior of this plugin is what it is, is because it has origins during the time when there were a lot of users migrating away from Pipenv, many switching to Poetry. Pipenv had built-in .env loading which did override by default (and still does). In order to support the many people coming from pipenv the goal was to make the fewest changes from that toolset possible in regards to .env loading. That is also why there are other some analogous environment variables between this project and pipenv with a section about them in the README.
I agree that if you're coming from vanilla python-dotenv then this is unexpected. That needs to be reconciled with the expectations of anyone coming from pipenv. My proposal to resolve this is a system environment variable—POETRY_DOTENV_DONT_OVERRIDE—which is being added with #16. I think it should solve most cases. Most users who want it to behave like python-dotenv's defaults probably want that everywhere and the same for anyone who wants it to behave like pipenv.


updating GitHub version badge

updating GitHub version badge

Pull Request Test Coverage Report for Build 1278

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 97.85%

Totals

Change from base Build 1268:
0.0%

Covered Lines:
1353

Relevant Lines:
1367

💛  - Coveralls

Addressing #247


Refactor controller framework to reduce conflicts and controller retries

Right now, the norman controller framework follows the following algorithm for running controllers:
Pre-step: contstruct a list of controllers for an object type (ie Cluster or ProjectRoleTemplateBinding)
When norman receives an event for an instance of an object (like cluster A has been updated) do the following:

Get the instance of the object from the cache
Call the first handler in the list and pass it the object retrieved from the cache in step 1
When the first handler returns, call the second handler with the same object retrieved from step 1. If the first handler modified the object and the second one attempts to, the second handler very likely gets a conflict error
Whether or not the second handler failed, we continue through the list until its complete. We aggregate and log all the errors, but conflict errors are simply masked and the controller is reran using k8s's retry and backofflogic

This pattern is repeated until all handlers run successfully. This like results in n^2 handler executions and (n^2)/2 attempted writes to etcd.
To be (much) more efficient, we shoudl not reuse the same object that we got at the beginning. We should make the handlers return the object which would be the updated version if they updated it.

When we do this, we should unmask the conflict errors because it is a bit of a hack that we are masking them now.
Also, it would be awesome if we could involve @cloudnautique to do some before/after profiling to measure the impact of this change.


getter on single prop

Hi,
following scenario:
1)
let cfg = new CameraWidgets(camera);
...
cfg.get('/capturesettings/shutterspeed2').value = '1/1000';

camera was set on M (manual mode) and shutter is now at 1/1000
2)
cfg.get('/capturesettings/expprogram').value = 'A';
switching to mode A (shutter will be autom. set depending on light conditions)
3) cfg.get('/capturesettings/shutterspeed2').value > still on '1/1000', but camera shows diff. value :(
4) To see actual value I have to recall new CameraWidgets(camera) again!
Each call new CameraWidgets() costs with 334 properties on my camera around 3 seconds :(
I see that y have changed the code that new CameraWidgets() fills a Map and every get returns the entry from Map not from camera directly.
Imagine there are e.g. batterylevel or lightmeter values that are always changed by camera, is there any single getter call on certain prop to the camera?
Nic

"single getter call on certain prop"=widget

Ok can you give me an example code of what do you want :) ?

""single getter call on certain prop"=widget" means we are talking about the same :)
Or what do mean? I described a case in my 1st comment...

I thought widget.value = xyz persistents already in camera?
What do I have to call to get actual value from camera not from map?

So I have to revert my changes. But I don't understand why the value isn't up to date because, the Map isn't a cache, it call directly the Camera to know the new value. So that mean, libphoto2 didn't give correctly the new value when a change is applied via the Camera Configuration (physically). Let find a solution...

Ok I've create a new released on NPM with some optimization and fix toJSON method also.
Now you can do that:
const cameraList = new CameraList().load();
const camera =  cameraList.getCamera(0);

// to apply a list of settings
camera.widgets.apply({
   '/path/settings': 'value',
   ....
});
// Apply refresh all widget's pointer after have set all values.
// It's almost equivalent to new CameraWidget() (but optimized and transparent for you).

camera.widget.get('/path/settings').value => 'return the current Value'.

// For the battery level it preferable to trigger the refresh method before get the new value.
camera.widgets.refresh();
camera.widgets.get('/batteryvalue');

Also I've fixed the Widget.toJSON() method (readonly is here, and choices, range and info are cleaned).
Can you test the new release please ?
See you
Romain

Ok, I havent test this usecase with the previous version (before refactor toJSON), but I think the easiet test case would be when y endless loop e.g. on get lightmeter value, and cover partly the lens. Then the lightmeter value should given alsways different values.
In the evening I have access to the camera and can test the other fixes.

Maybe it helps, in earlier apps I used gphoto2 cl.
To verify the set value I called mostly setter and getter one after another
<gphoto2 --set-config shutterspeed2='1/1000' --get-config shutterspeed2>
The CLI isnt that top performer but the response of both cmds was fine, so I think there must be way to solve this.

Update latest version from npm
Run the following code:
const { CameraList, closeQuietly } = require('@typedproject/gphoto2-driver');
const cameraList = new CameraList().load();

if (cameraList.size) {
  const camera = cameraList.getCamera(0);
  camera.widgets.apply({
    '/capturesettings/expprogram': 'A',
    '/capturesettings/burstnumber': 3,
    '/imgsettings/iso': 1000
  });

  console.log('/capturesettings/expprogram', camera.widgets.get('/capturesettings/expprogram').value);
  console.log('/capturesettings/burstnumber', camera.widgets.get('/capturesettings/burstnumber').value);
  console.log('/imgsettings/iso', camera.widgets.get('/imgsettings/iso').value);

  closeQuietly(camera);
}
cameraList.close();

returns exceptions:
/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/CameraWidgets.ts:115
        this.get(key).applyValue(obj[key], false);
                      ^
TypeError: this.get(...).applyValue is not a function
    at Object.keys.forEach.key (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/CameraWidgets.ts:115:23)
    at Array.forEach (<anonymous>)
    at Map.apply (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/CameraWidgets.ts:114:24)
    at Object.<anonymous> (/home/pi/widgets.js:14:18)
    at Module._compile (module.js:632:14)

Changed the code a bit:
...
  const camera = cameraList.getCamera(0);

  camera.widgets.refresh();
  console.log('lightmeter', camera.widgets.get('/status/lightmeter').value);
...

returns at refresh() method
/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Widget.ts:18
  set pointer(pointer: PointerCameraWidget) {
             ^
RangeError: Maximum call stack size exceeded
    at Widget.set pointer [as pointer] (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Widget.ts:18:14)
    at Widget.set pointer [as pointer] (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Widget.ts:19:17)
    at Widget.set pointer [as pointer] (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Widget.ts:19:17)...

Is there any restrictions using the driver calls inside setTimeout/setInterval?
Because when I have e.g.
  console.log('lightmeter', camera.widgets.get('/status/lightmeter').value);

  let intervalHandle = setInterval( ()=>{
    console.log('lightmeter', camera.widgets.get('/status/lightmeter').value);
  }, 2000);

First get returns lightmeter fine, but inside the callback from the interval, it seems camera gets close and returns:
/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Camera.ts:93
      throw new Error("Invalid state: closed");
            ^
Error: Invalid state: closed
    at Camera.checkNotClosed (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Camera.ts:93:13)
    at Camera.get widgets [as widgets] (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Camera.ts:22:10)
    at Timeout.setInterval [as _onTimeout] (/home/pi/widgets.js:14:38)
    at ontimeout (timers.js:475:11)

toJSON() works fine: console.log('lightmeter', camera.widgets.get('/status/lightmeter').toJSON());
Returns:
lightmeter { path: '/status/lightmeter',
label: 'Light Meter',
type:
WidgetTypes {
_cval: 3,
_hasValue: true,
_hasChoices: false,
_acceptNullValue: false,
_valueType: [Function: Number] },
value: -20,
changed: false,
range: WidgetRange { min: -60, max: 60, step: 1 },
readonly: true }

@Romakita: This project is now mentioned and referenced by http://gphoto.org/proj/
Did y recognize my comment there are at least 2 Blocker in current driver version? Maybe y forgot some files to update on npm...

@Nic2012 Thanks for your effort.
Yes I saw your message. I haven't produce fix. The main problem to dev on this lib is, we need a camera XD.
I'll fix that ASAP ;)

First get returns lightmeter fine, but inside the callback from the interval, it seems camera gets close and returns:
/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Camera.ts:93
throw new Error("Invalid state: closed");
^
Error: Invalid state: closed
at Camera.checkNotClosed (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Camera.ts:93:13)
at Camera.get widgets [as widgets] (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Camera.ts:22:10)
at Timeout.setInterval [as _onTimeout] (/home/pi/widgets.js:14:38)
at ontimeout (timers.js:475:11)
Normal, you have closed the camera ;). Remember, in javascript setTimeout is asynchronous and all code written after setTimeout is executed just after the creation of your timer. To avoid that, comment closeQuietly() method in your code.

I released a new version. I've tested this example with:
const fs = require('fs');
const { CameraList, CameraWidgets, closeQuietly } = require('../src');
// If you launch this example not from library folder, change the previous line to:
// const { CameraList, closeQuietly } = require('@typedproject/gphoto2-driver');

const cameraList = new CameraList().load();

console.log('Nb camera', cameraList.size);

if (cameraList.size) {
  // Get current camera
  const camera = cameraList.getCamera(0);

  console.log(camera.toString());
  console.log(camera.widgets.toString());

  // change value
  camera.widgets.get('/actions/autofocusdrive').value = true;
  camera.widgets.get('/settings/autofocus').value = 'on';

  // OR apply
  camera.widgets.apply({
    '/actions/autofocusdrive': true,
    '/settings/autofocus': 'on'
  });

  console.log('/actions/autofocusdrive', camera.widgets.get('/actions/autofocusdrive').value);
  console.log('/settings/autofocus', camera.widgets.get('/settings/autofocus').value);

  const flashopen = camera.widgets.get('/status/flashopen');

  setInterval(() => {
    camera.widgets.refresh();
    console.log('/status/flashopen (1) =>', new CameraWidgets(camera).get('/status/flashopen').value);
    console.log('/status/flashopen (2) =>', flashopen.value);
  }, 1000);

  // camera.widgets => Widget which inherit from Map class
  const widgets = JSON.stringify(camera.widgets, null, 2);
  fs.writeFileSync('../.tmp/widgets.json', widgets, { encoding: 'utf8' });
}

For me all values are updated correctly. I found a value, I can change on physical device, the flashopen status. Can you confirm, it works for you also. The lightmeter status is always at 0% for me...
I think the support of certain settings depend on the driver from libphoto2.
See you,
Romain

v2.1.1 released

Normal, you have closed the camera ;). Remember, in javascript setTimeout is asynchronous and all code written after setTimeout is executed just after the creation of your timer.

Yeah that could be, didnt recognize that my script runs further on. I will check the code and give feedback.
Another question about calling a sequence of commands one after another: e.g.
1) cfg.get('/capturesettings/expprogram').value = 'A';
2) const newSpeed = cfg.get('/capturesettings/shutterspeed2').value;
3) cfg.get('/capturesettings/expprogram').value = 'M';
4) cfg.get('/capturesettings/shutterspeed2').value = newSpeed;

After setting 3) camera sometimes seems to be still busy and doesnt accept the 4) command.
Is there any possibility to find out if previous set of a command isnt fully finished?

I don't know... the libphoto2 doesn't provide the possibility to know when a command is fully finished.
And the problem persist, It should be better to use asynchronous API, with the possibility to catch this exception and apply the value correctly when it's possible.

Which asynchronous API do y mean? in my code?

Tested latest version 2.1.1:
Jeah, great work: set/apply on single value works fine also inside timer interval.
First fetch on full config tree cost with my Nikon D700 around 2 seconds, every next widgets.refresh() cost another 900 milliseconds.
With the following code
const { CameraList, CameraWidgets, closeQuietly } = require('@typedproject/gphoto2-driver');
const cameraList = new CameraList().load();
if (cameraList.size) {
  const camera = cameraList.getCamera(0);

  camera.widgets.apply({
    '/capturesettings/expprogram': 'A'
  });
  camera.widgets.refresh();
  const currentSpeed = camera.widgets.get('/capturesettings/shutterspeed2').value;

  camera.widgets.apply({
    '/capturesettings/expprogram': 'M',
    '/capturesettings/shutterspeed2': currentSpeed
  });
  console.log('shutterspeed2:', camera.widgets.get('/capturesettings/shutterspeed2').value);

  closeQuietly(camera);
}
cameraList.close();

returns with an exception:
/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Widget.ts:195
      throw new Error(`Parameter name: invalid value ${this.path} [read-only]`);
            ^
Error: Parameter name: invalid value /capturesettings/shutterspeed2 [read-only]
    at Widget.setValue (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/Widget.ts:195:13)
    at Object.keys.forEach.key (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/CameraWidgets.ts:115:23)
    at Array.forEach (<anonymous>)
    at Map.apply (/home/pi/node_modules/@typedproject/gphoto2-driver/src/components/CameraWidgets.ts:114:24)

Can y check if y have the same behaviour with y camera, my Nikon is a bit old stuff :)
Would it be possible to implement a bit more robust that setValue is waiting for a while as long the prop is still in read only and secured by timeout (after 1sec it returns an exception)?


Mono Unable to Find Input Class

Godot version:
d89dc5794
OS/device including version:
Linux Mint 19.3
Issue description:
Error Input class not found
For example:
Input.SetMouseMode(InputFilter.MouseMode.Captured);

It works in GDScript
Input.set_mouse_mode(InputFilter.MOUSE_MODE_CAPTURED)

Steps to reproduce:
Create a C# script then use the Input class. Like SetMouseMode.

Is this due to the Input -> InputFilter singleton rename?

If I use InputFilter it says An object reference is required for the non-static field, method, or property 'InputFilter.SetMouseMode(InputFilter.MouseMode)'

Other singletons (OS, Engine) would generate a static class in C#, but InputFilter won't.
https://github.com/godotengine/godot/blob/c9de04b628e225e74aededb3dc0fa7b772090660/core/register_core_types.cpp#L267 This is probably why using Input in GDScript would work.
I'm working on a fix, lets see how it goes


fix Set the flag of short circuit only when hash join sink finished (#30977)

Proposed changes
pick #30977

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


[release-1.3] mixer: update test certificates

This is an automated cherry-pick of #16206

@istio-testing: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-new-install-k8s-presubmit-tests-release-1.3
1e307cf29e063e2231f7682a40c97b68338ffb65
link
/test integ-new-install-k8s-presubmit-tests-release-1.3

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


Fix inference for batched inputs for llama

Fix inference for batched inputs for fp32 model coming from min_dtype = torch.finfo(torch.float16).min

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


Wind vector components at the poles for regular lat/lon grids

There have been several issues over the last years with users complaining of strange values of wind components at the poles. This usually comes from ERA5 data on CDS, which provides this data in regular_ll , including the points at the poles.
While it is impossible to exactly describe u,v wind components at latitudes 90/-90, because of singularities both at the coordinate system and the variables definitions, this case is covered by the WMO, specifically on:

Manual on Codes
International Codes
Volume I.2
Annex II to the WMO Technical Regulations
Part B – Binary Codes
Part C – Common Features to Binary and Alphanumeric Codes
2019 edition
Updated in 2022

[92.1.10] Vector components at the North and South Poles shall be coded according to the following conventions.[<IP_ADDRESS>] If the resolution and component flags in section 3 (Flag table 3.3) indicate that the vector components are relative to the defined grid, the vector components at the Pole shall be resolved relative to the grid.

[<IP_ADDRESS>] Otherwise, for projections where there are multiple points at a given pole, the vector components shall be resolved as if measured an infinitesimal distance from the Pole at the longitude corresponding to each grid point. At the North Pole, the West to East (x direction) component at a grid point with longitude L shall be resolved along the meridian 90 degrees East of L, and the South to North (y direction) component shall be resolved along the meridian 180 degrees from L. At the South Pole, the West to East component at a grid point with longitude L shall be resolved along the meridian 90 degrees East of L and the South to North component shall be resolved along L.

[<IP_ADDRESS>] Otherwise, if there is only one Pole point, either on a cylindrical projection with all but one Pole point deleted, or on any projection (such as polar stereographic) where the Pole maps to a unique point, the West to East and South to North components shall be resolved along longitudes 270° and 0°, respectively at the North Pole and along longitudes 270° and 180°, respectively at the South Pole.

This PR implements one solution for this; This fix requires knowledge of the interpolation method, so numerically:

mesh (of 3D triangles) is generated on the source regular Gaussian grid
mesh includes 2 additional (virtual) points at the pole(s), where 2 triangle fans patch from each additional (virtual) point to the Northern- and Southern-most latitudes of the Gaussian grid
on each output point, including a series of points at (lat/lon) 90/many, these specific points are corrected away from the poles by an epsilon (configurable, currently set to 1e-6)
that epsilon displacement is sufficient for intersecting with 1 or 2 3D triangle(s) that in lat/lon space is closest in longitude
this triangle(s) intersection weights are re-weighted by the removal of the (virtual) point at the poles (se above). Say all 3 weights: w1 (virtual) >> 0, w2 = small, w3 = small is corrected to w1=0, w2=w2/(w2+w3), w3=w3/(w2+w3)

The discussion for this issue is in here, including wind plot comparing before and after this proposed fix. Please head there to discuss this so it is properly recorded. There is also a discussion of assigning an average value at the poles, in addition to this fix. This is an extremely important point for the methodology and the solution is not trivial, please comment on this (you are involved to bring your opinions!).
It is important to note that, on the inexistance of an intermediate grid (between the source spetrcal fields and target grid), the magnitude of the wind vector at the pole is bigger, but is completely out of scope of this PR (it is highlighted in the linked issue).
This PR already includes changes to apropriate interpolation methods from a the previous Bitbucket PR, requesting changes to all appropriate interpolation methods -- so in addition to FiniteElement, the fix applies now to k-nn, grid-box and voronoi-based methods, and this change isn't trivial anymore.
This PR implies a cached matrix version change.

I would like your opinion, please

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

I would put a deadline on reviews. You can't keep waiting. And then merge it.

Can I ask the attention of all reviewers to review? Please.

@pmaciel you need to sign the CLA too :)


YamlCreate Settings for Linux

Description of the new feature/enhancement
Some users would like to work with Linux OS. Hence, YamlCreate settings should be supported on Linux too.

@Trenly

Description of the new feature/enhancement
Some users would like to work with Linux OS. Hence, YamlCreate settings should be supported on Linux too.

What needs to be changed for it to work with Linux? If it has anything to do with the filesystem, it may not be practical to do this because of how different the filesystems are

Have you tried running it with PowerShell on Linux? It should work, given you aren't doing anything with Windows-only libraries (PowerShell knows how to convert the paths).

So after a long search, I found a way... Will be creating PR in a few minutes...


Python trans

Most parts done, but left one cell that I don't know how to fix the error
(I tried python3.9 but it didn't work.)

ERROR: Execution Failed with traceback saved in /home/runner/work/machine-learning/machine-learning/open-machine-learning-jupyter-book/_build/html/reports/the-azure-ml-sdk-way.log
plz check the log in your local repository

You need to solve this problems first, check the contribution.md file in open-machine-learning-jupyter-book folder. If you cannot understand, then ask me in Wechat

Please clear this error output, and there are no other problem.


Convert null to 0 for temp and % sensors

Description:
The variable "completion" from the octoprint API appears to sometimes get returned as Null and not 0. This will check if the value is Null for all temp and % sensors and convert it to a 0.
Related issue (if applicable): fixes #2708
Checklist:
If code communicates with devices, web services, or a:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass

👍


Invalid argument at 1: cannot convert from Function.prototype to String.prototype

Have this code (node.js + chai)
 function(done) {
            User.create().exec(function(error, record) {
                expect(error).to.exist;
                done();
            });
        });

and get this error: Invalid argument at 1: cannot convert from Function.prototype to String.prototype

I think your error is because tern doesn't know which types is returned by User.create(). In this case it search an exec function which comes from String.
If you open completion after User.create().exe, is tern shows you exec function?

None answer. I close this issue.


Header: include sentence around "language selection" between BETA and "francais"

Users expect full list of available languages (not just "Francais")
Implication:
The first thing the user hears is "beta francais" and they don't know if they need to take an action to select the right language or if english is an option.
Visually the language selection will remain the same.
@zak should this read -> language selection Français ?

@zak any thoughts on translation
Viewing EN
language selection: Français
Viewing FR
language selection: English or should this be -> sélection de la langue: English


[local-volume] refactor format of local-volume-config

Currently configuration for local volumes for the provisioner is stored in the configmap in json format.  @ianchakeres has suggested to switch to a more user friendly format.
Including @msau42  for the discussion.

@ianchakeres suggested to make the storage class mapping its own field so that you can add other global parameters.  I suggested to make it more user friendly by not using encoded json.  So I think the format could look something like this:
kind: ConfigMap
metadata:
  name: local-volume-config
  namespace: kube-system
data:
  someOtherParam: |
    foo value
  storageClassMap: |
    local-fast:
       hostDir: "/mnt/ssds",
       mountDir: "/local-ssds"
    local-slow:
       hostDir: "/mnt/hdds",
       mountDir: "/local-hdds"
    local-storage:
      hostDir: "/mnt/disks"

What do you guys think?

@msau42 It looks more user friendly for sure but we need to evaluate how this structure will be represented in a mounted mode. Also before we were relaying on json decoding for syntax validation, with this approach we need to validate syntax of provided information in the code..

I believe each high level key is a file, and the value is the contents.
Yeah if the syntax validation and conversion is too complicated, then we can stick to encoded json.

how about yaml? I think it is easier for eyes of user and there are library to parse it?

Yeah I guess it shouldn't be too bad to go from yaml -> json -> struct?

We could do yaml to struct without intermediate json conversion.

Three comments:

I am fine with yaml or json.

How about making it look a little more like other kubernetes manifests for the list of directories that will be managed by the local provisioner. Here's what I'm thinking...

kind: ConfigMap
metadata:
  name: local-volume-config
  namespace: kube-system
data:
   top-level-key: value
   local-volumes:
      - name: local-ssd
         storageClassName: gold
         hostDir: "/mnt/ssds",
         mountDir: "/local-ssds"
      - name: local-hdd:
         storageClassName: slow
         hostDir: "/mnt/hdds",
         mountDir: "/local-hdds"

I'd also be fine with dropping everything into a single top level config.file so that we don't have to dive down into each directory for each of the different key/value pairs. Below I've translated an example from the configmap documentation link

data:
    config.file: |-
    property.1=value-1
    property.2=value-2
   #aka everything with data in my example higher in this comment

@ianchakeres I tried to create a configmap based on option 2 and it is failing, it does not like
"-name".
error: error converting YAML to JSON: yaml: line 9: mapping values are not allowed in this context
apiVersion: v1
kind: ConfigMap
metadata:
  name: local-volume-config
  namespace: kube-system
data:
   top-level-key: value
   local-volumes:
      - name: local-ssd
         storageClassName: gold
         hostDir: "/mnt/ssds"
         mountDir: "/local-ssds"
      - name: local-hdd:
         storageClassName: slow
         hostDir: "/mnt/hdds"
         mountDir: "/local-hdds"

"-" indicates an array rather than a map

@msau42 could you please paste the configmap here how you see it should be?

I prefer the original method of using a map with key = storage class name, and values = hostDir, mountDir.  It's easier to convert to our internal representation, which is also a map.

@msau42 I prefer original method too, as it keeps everything under the same key of StorageClassMap and it gives flexibility to add other configuration keys at the same level as StorageClassMap.

@msau42 - Can a map have the same key multiple times? For example, if I have two directories where I want local volumes mapped to the "gold" storageClass? If not, perhaps we should just add storageClassName: as an explicit key within each map entry.

A map cannot have the same key multiple times.  What is the use case for having multiple directories map to the same storage class?

/area local-volume


Hostname lookup from dnsmasq dhcp-hostsfile

I run other linux/nonopenwrt dnsmasq servers and to keep it consisten
and ease of managment on openwrt side i use addn-hosts and dhcp-hostsfile
files for dnsmasq (instead of openwrt /etc/config/dhcp file).
addn-hosts file seems to be pickued up by nlbwmon for static ip to hostname lookups.
But not dhcp-hostsfile for mac to hostname (unless there is a current lease).
I have duplicated dhcp-hostsfile to openwrts /etc/config/dhcp config in the past
to get nlbwmon to lookup up the host names from mac addresses.
But would be nice if nlbwmon had an option to include dhcp-hostsfile
as an additional custom lookup locations/format.
dhcp-hostfile(for dhcp assignments) uses single line "mac,ip,hostname" format
ethers file can be used but only allows use of ip or hostname not both.
Also i use them because they can be reloaded after adding new hosts
without restarting dnsmasq, by just sending a HUP or reload to dnsmasq.
Unlike the standard openwrt /etc/config/dhcp config file which need full dnsmasq restart.
thank you

nlbwmon does not track any hostnames at all. Maybe you mean the LuCI frontend

Yes , LuCi interface that shows the associated names to macs or ips.


Add a CHANGELOG

Description
This PR adds a CHANGELOG.md file and configures scriv to manage it.
After these changes, contributors have to use scriv create to create changelog fragments. The CI enforces this is the case. One can apply the skip-changelog label to pull requests which do not require a changelog fragment (see the latest changes in CONTRIBUTING.md for details).
At release time, the scripts/release script uses scriv to update the changelog and to fill the GitHub release notes.
scripts/release has changed a bit:

prepare-tag command becomes prepare: it no longer creates the tag (making it easier to rework history before tagging). It takes the version to release as argument. No need to define $VERSION anymore.
push-tag command becomes tag: it creates and pushes the tag.
publish-gh-release command now extracts the release notes for the release from CHANGELOG.md instead of reading it from a user-supplied file.

Fixes #312

Codecov Report

Merging #499 (849f69b) into main (c379922) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main     #499   +/-   ##
=======================================
  Coverage   93.84%   93.84%
=======================================
  Files          78       78
  Lines        3609     3609
=======================================
  Hits         3387     3387
  Misses        222      222

Flag
Coverage Δ

unittests
93.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Update katib example to use user profile

https://github.com/kubeflow/website/issues/1599

This change is

/assign @sarahmaddox

Preview: https://deploy-preview-1633--competent-brattain-de2d6d.netlify.com/docs/components/hyperparameter-tuning/hyperparameter/#example-using-random-algorithm

/lgtm
/approve

Thanks @richardsliu - just one suggestion in the kubectl describe experiment commands, please coud you replace the namespace kubeflow by the user profile namespace ?
The command kubectl -n kubeflow describe experiment random-example returns:
Error from server (NotFound): experiments.kubeflow.org "random-example" not found
Instead of kubectl -n kubeflow describe experiment random-example , I think that kubectl -n <user profile namespace> describe experiment random-example should be better.
This replacement must be done for the 3 examples

random-example
tfjob-example
pytorchjob-example


Angular 1.3

Is there an overview which directives work and which one has known issues when I would migrate to angular 1.3.*?

Not yet - I'm hoping to put that into the README.md after this week's triaging session

I actually did bite the bullet and i am able to use the bootstrap. I don't use too much fancy stuff. Only the bower update gives the issue on

"dependencies": {
"angular": ">=1 <1.3.0"
}

Would be nice it there is a branch that loosens this restrictions so we can report issues against the 1.3 branch. Or let others know of work arounds.

I have found an issue with angular 1.3 in the datepicker directive, here's the plunker: http://plnkr.co/edit/MYZjqhPSzHU6X4ZQkAlg?p=preview
Basically, the initial date for the popup example does not obey the format defined. I will dive into the code to see what I can find out about fixing this.


Read async input as IAsyncEnumerable<IAsyncEnumerable>

On CsvAsyncInputBase:
public IAsyncEnumerable<IAsyncEnumerable<string>> AsEnumerableFromUtf8()
{
    // ...
}

public virtual async IAsyncEnumerable<IAsyncEnumerable<string>> AsEnumerable(Encoding inputEncoding)
{
    // ...
}

Base implementation probably also needs to spin up a thread like the sync version, because I chose not to implement async visitors in favor of a cleaner API.
Subclasses can almost certainly do a lot better, as in the sync version.


Remove outputs when switching away from VT

When switching away from VT, remove the wlr_outputs (same as unplug). When switching back, re-add them (same as hotplug).
This would avoid connector/CRTC state inconsistencies (e.g. how to modeset when DRM FD is paused). This would be consistent with input devices.

This would require the compositor to keep track of which output each view is on and restore that. Wayfire currently doesn't do it :/
How would it work in Sway (if it works at all)?

Ah, yes, that is correct. I just assumed everybody does it.
Sway migrates workspaces from one output to the other, and keeps a list of "output priorities": https://github.com/swaywm/sway/blob/6991ac8c70869ca19a87cfc173e280cab7ff20d0/include/sway/tree/workspace.h#L42

just for the record: phoc doesn't (yet) keep a list either but that's on the todo list.

One naive question: Why can't the DRM backend just reinitialize the outputs without unplugging and replugging them?

The problem I'm trying to fix is that things are weird when switching VTs:

All operations on the output are invalid: can't page-flip, can't modeset, can't enable/disable, etc. IIRC right now the DRM backend fakes success (and defers till next VT switch) and that's not great (maybe the deferred operation will fail and put the output in a bad state).
I don't want the DRM backend to change output state behind the compositor's back
Outputs can be unplugged and hotplugged, but the compositor won't notice it
Other compositors might change the output state


SqlDataReader.DisposeAsync throw SqlException Execution: Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding

Describe the bug
I got an exception when trying to call DisposeAsync on a SqlDataReader
Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 ---> System.ComponentModel.Win32Exception (258): Unknown error 258
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning(Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
   at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
   at Microsoft.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
   at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadByteArray(Span`1 buff, Int32 len, Int32& totalRead)
   at Microsoft.Data.SqlClient.TdsParser.TrySkipValue(SqlMetaDataPriv md, Int32 columnOrdinal, TdsParserStateObject stateObj)
   at Microsoft.Data.SqlClient.TdsParser.TrySkipRow(_SqlMetaDataSet columns, Int32 startCol, TdsParserStateObject stateObj)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryCloseInternal(Boolean closeReader)
   at Microsoft.Data.SqlClient.SqlDataReader.Close()
   at Microsoft.Data.SqlClient.SqlDataReader.Dispose(Boolean disposing)
   at System.Data.Common.DbDataReader.DisposeAsync()
   at Lib.Sql.SqlListener.SubscribeAsync(Int32 attempts)
   at Lib.Sql.SqlListener.SqlDependencyOnChange(Object sender, SqlNotificationEventArgs args)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
ClientConnectionId:3a8049f8-7536-482c-828c-86b31b7e0b38
Error Number:-2,State:0,Class:11

To reproduce
Start Sql Server, start command execution when Sql Server is under heavy load.
My fuction:
private async Task SubscribeAsync(int attempts = 0)
{
    SqlConnection connection = null;
    SqlCommand command = null;
    SqlDataReader reader = null;
    try
    {
        connection = new SqlConnection(Options.ConnectionString);
        command = new SqlCommand(Options.Query, connection) { CommandTimeout = Options.CommandTimeout };
        await connection.OpenAsync().ConfigureAwait(false);
        var sqlDependency = new SqlDependency(command);
        sqlDependency.OnChange += SqlDependencyOnChange;
        CurrentSqlDependency = sqlDependency;
        reader = await command.ExecuteReaderAsync().ConfigureAwait(false);
    }
    catch (Exception ex)
    {
        if (attempts++ >= Options.MaxAttempts)
        {
            StopListen();
        }
        else
        {
            await Task.Delay(Options.RetryInterval).ConfigureAwait(false);
            await SubscribeAsync(attempts).ConfigureAwait(false);
        }
    }
    finally
    {
        if (reader is object)
            await reader.DisposeAsync().ConfigureAwait(false);
        if (command is object)
            await command.DisposeAsync().ConfigureAwait(false);
        if (connection is object)
            await connection.DisposeAsync().ConfigureAwait(false);
    }
}

Expected behavior
I expected the application to continue working, but not an exception being thrown.
Further technical details
Microsoft.Data.SqlClient version: 2.0.0 (Assembly Microsoft.Data.SqlClient, Version=2.0.20168.4)
.NET target: Сore 3.1.6
SQL Server version: SQL Server 2016
Operating system: Ubuntu 18.04

@LIFEfreedom Can you provide more information on your connection string options and the query or the issue happens with any kind of query?

@JRahnama
Connection string:
Data Source=SQLServer;Initial Catalog=DbName;User ID=USER;Password=MYPASS;TrustServerCertificate=Yes
Query:
SELECT Id FROM dbo.Events
This has happened for the first time and has not happened again, since the peak load on the database does not happen often.

@JRahnama are there any news

Same problem. Last release didn't fix the issue.

@LIFEfreedom on some other issues with similar error message we noticed that  wrapping your connection, command and readers in using blocks will reduces the problem significantly. By doing that we ensure that all resources are disposed when the related part is disposed. Can you try that please?

@JRahnama This solution didn't help. Main problem is that Dispose and DisposeAsync shouldn't throw exceptions. https://docs.microsoft.com/ru-ru/previous-versions/visualstudio/visual-studio-2015/code-quality/ca1065-do-not-raise-exceptions-in-unexpected-locations?view=vs-2015&redirectedfrom=MSDN#dispose-methods

@JRahnama Javad Rahnama (Simba Technologies Inc) Vendor This solution didn't help. Main problem is that Dispose and DisposeAsync shouldn't throw exceptions. https://docs.microsoft.com/ru-ru/previous-versions/visualstudio/visual-studio-2015/code-quality/ca1065-do-not-raise-exceptions-in-unexpected-locations?view=vs-2015&redirectedfrom=MSDN#dispose-methods

I agree. As per my understanding .NET5 runtime is enforcing that behavior. We will adjust the code based on this rules to be compatible with .NET5 runtimes in future when we add .NET5 support to our driver. I do not have a exact date for that change, but I will look into changing this particular one to see if we can get the exception out of the dispose method in a simple PR at the middle of next week.

@DenSmoke, @LIFEfreedom  can you try with the fix proposed in PR #901 as well to see if that solves this issue please? That PR solves some issue with leaked exceptions in the driver.

Looking at the history of SqlDataReader.cs, it looks like the Dispose() method was added in the initial commit of the NetCore code in 2015 but was never part of the NetFx code. I suspect it might have been added to ensure cleanup of server-side resources but the Close() call should have been wrapped in a try/catch to ensure Dispose() never throws. I don't know why it would have been added in NetCore but not NetFx. Makes me wonder whether the correct fix is to remove the method completely or add the try/catch around Close(). I lean towards adding the try/catch as there is a lot of important cleanup that happens in Close().

@David-Engel If I remember correctly, then DbDataReader is always disposable in .NET Framework because it inherits from Component, which is disposable. Initially Component was not included in .NET Core, and hence at that time DbDataReader was made explicitly disposable.
There is a general problem here in that since all Db... classes were inherited from Component, it means that they were all disposable. This means some things are not designed to be disposable at the ADO.NET level, and yet have always implemented the IDisposable interface anyway. So, for Core, we tried to look at the existing provider ecosystem and decide which objects really need to be disposed. DbDataReader is in that list since some providers associate native resources with the data reader. So even though some providers such as SqlClient traditionally don't need to dispose the DbDataReader, at the ADO.NET level the contract from the consuming side is that it must be disposed.
/cc @bricelam @roji

That's odd... I'm pretty sure that even back in .NET Framework with System.Data.SqlClient, disposing a reader on a non-MARS SqlConnection would allow executing another command on that same connection; not doing so would trigger a "reader is already open" exception.
As @ajcvickers says, some ADO.NET objects are indeed IDisposable even though disposing them generally isn't required (this is usually the case of DbCommand); one could that this is a good thing given that System.Data is an abstraction, and some provider out there may need their DbCommand to be disposed too for some reason. But in any case, I think DbDataReader generally must be disposed across database providers before another command can be executed on the connection.
And as is standard in .NET (long before .NET 5), Dispose should indeed never throw.

@roji, @David-Engel  while going through this issue, I noticed there are lots of IDisposable-type fields in the internal classes of SqlDataReader  such as AAsyncCallContext. According to Microsoft Documentations  this needs to be done inside the Dispose method of the very same class which is not done in our case. The other example could be at line 4254 of SqlDataReader and this happens in lots of other places which an IDisposable object is created, but never disposed. Am I missing something here?
The other question I had, inside the very same class there is method ClearCore(), this copies the IDisposable field to another field and disposes the copy and set the original to null! Is there a pattern or logic behind it that I cannot see or this is a mistake?

I noticed there are lots of IDisposable-type fields in the internal classes of SqlDataReader such as AAsyncCallContext

Those are part of async calls so the disposable objects outlive the stack frame they are instantiated in. In particular the cancellation registration is created and becomes part of the call context and is then disposed of when the call has completed in CompleteAsyncCall which calls Dispose, which calls Clear.

The other question I had, inside the very same class there is method ClearCore(), this copies the IDisposable field to another field and disposes the copy and set the original to null! Is there a pattern or logic behind it that I cannot see or this is a mistake?

The copy is taken so we can access the reference, the field is nulled so we have a safely cleared object for re-use (which is the major reason for the class existing), then dispose is called. At this point if dispose throws an error we can't end up with an invalid state on the call context. If dispose takes a long time it doesn't matter because the context was already ready to re-use. You could argue that dispose should never throw but the existence of this thread shows that it might be worth assuming that it could. So the logic there is thought through and deliberate and you need to be aware of the way that async calls are constructed and flow to follow the lifetimes.


Python 3 support

Issue this PR fixes (if applicable): #7
Description:
This adds py3 support for the code. Not the install yet and it doesn't make it default either (you can't choose it actually). This will be available in the next version. We need to test this through first.
~It doesn't work yet completely, but it it almost does.~
There's also an annoying urllib3 warning, which is safe to ignore: https://github.com/shazow/urllib3/issues/800
Checklist:

[x] PR Location (usually master for hotfixes, dev for general development)

Okay, this works now.
@alexa-pi/team Please have a look at this. This is the other of the two PRs that will be the last for the v1.4 release. Once this is merged, all new code will have to be python 2.7 and 3.3+ compliant.

There is a library, six, that handles differences between 2.7 and 3. I think that it is better to use that library instead of handling that manually

@lechat Well, we have a few ugly imports, but other than that the code is actually cleaner by this change - like not using deprecated syntax, not declaring variables textual, when they actually store objects, not using implicit relative imports, which might be confusing, ... and I don't see a need for the library then. It just seems that if we keep the code clean, it works under both python 2 & 3.
What do you think of this PR itself? Where exactly would you rather use the library?

Also, I think the code should be primarily thought as python 3 code and supporting python 2 as something extra. And using external libraries as wrappers so we can support py2 goes against it.
Even though py2 is said to be supported until 2020, py3 has been here for ages and if we should think about something, it should be dropping py2 support in order to use py3-only features. Python 3 has been in Debian and even OpenWRT/LEDE for some time so I can't think of a good reason to support py2. But since there is no special feature in py3 that we absolutely need, we should keep py2 support so people can use it if they want to for some weird reason. And if we decide to drop py2 support, we just delete those weird try import things and have clean code, instead rewriting stuff to drop the six library.

I disagree that 2.7 is optional and everybody shall jump to 3.x, but let's not start a flame war about it. :)

@lechat Haha, didn't mean to start one :smile: Anyways, I'm for keeping the 2.7 support as I've said. People just might have reasons now, even though I don't share them :)
Also, if you have some time, it would be awesome, if you could look if the two open PRs are okay, so we can release v1.4 asap. Thank you.

14-day PR review window rule ... merging.
@alexa-pi/team Okay, this is the last PR for v1.4! To keep the development going and align with the calendar :smile: I'm giving until the end of the month for testing and I'll release the v1.4 on the 1st of March 2017. Also, since it's just 5 days, I seriously doubt anyone will have a merge-ready PR in the meantime, so I'm not creating a branch for it. Therefore anyone who wants to test should test the dev branch.


Extra report info

I needed to add some extra info into the JSON report for my own purposes. If you feel this is useful for others too, then please consider merging.
There are two related changes here:

Add dependencies for which no licenses were found into the reports, with an empty licenses array in the JSON report. The HTML report adds dependencies with no licenses in a "no licenses found" section.

Add the original gradle dependency string (group:name:version string) into the JSON report - makes it easier to track down a dependency if the description is not enough.

I know the tests are not passing. Will try to find time to fix them soon.

Just to let you know, you notice your image does not match your commit user image.
See: https://help.github.com/articles/setting-your-username-in-git/ and https://stackoverflow.com/questions/750172/change-the-author-and-committer-name-and-e-mail-of-multiple-commits-in-git#1320317

Thanks for pointing out the mismatch in my commit user image. That's because I am using this plugin at work and committing from my work computer, which uses my company email address. But I am signed in to Github using my personal details - hence the discrepancy.

@markhoughton Sorry, can update the README.md to show the updated reports, the HTML and JSON?

@markhoughton bump

Thanks.


Multiple WHERE clause means I cannot filter on the same field twice.

[READ] Step 1: Are you in the right place?

For issues or feature requests related to the code in this repository
file a Github issue.

If this is a feature request make sure the issue title starts with "FR:".

For general technical questions, post a question on StackOverflow
with the firebase tag.
For general Firebase discussion, use the firebase-talk
google group.
For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
Firebase support channel.

[REQUIRED] Step 2: Describe your environment

Operating System version: macOS High Sierra Version 10.13.6
Firebase SDK version:  >= 6.0.0
Library version: >= 6.0.0
Firebase Product: Firestore database

[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
What happened? How can we make the problem occur?
I am trying to build a Firestore Query (https://firebase.google.com/docs/reference/js/firebase.firestore.Query#where). Through this I am unable to use multiple where clauses on the same field. This would be considered a logical OR, however the alternative is to build multiple queries.
Relevant Code:
// TODO(you): code here to reproduce the problem

Firestore doesn't support OR queries: https://firebase.google.com/docs/firestore/query-data/queries#query_limitations
You have to build multiple queries, and find the intersection.


How to get just column names & types from database

Hi,
We would like to get the column names from a database after introspecting. Currently we need to manually parse the schema.prisma file as a string and do some ugly manipulations.
Is there a way to get just the column names.
Thanks very much for the feedback.
Regards,
Ming

It is currently not possible and you need manually go throw the dmmf(which is the parsed schema exposed by photonjs) to do that.
But do you have a use case for this? Generally, the schema is known to the user and they write the queries according to the schema.
Marking this as a feature request.

Well we are wanting to introspect databases not under our control, that is to allow the end user to select columns from their own database through an easy to use interface.


accounts-db: unpack_archive: unpack accounts straight into their final destination

We used to unpack accounts into account_path/accounts/ then rename to account_path/. We now unpack them into their final destination directly and avoid the rename syscall. I've added a test and verified that it behaves the same with both old and new impl.
I also removed an extra parsing/iteration over entry paths which was unnecessary.
See discord conversation for context https://discord.com/channels/428295358100013066/838890116386521088/1217386980292427786

Codecov Report
Attention: Patch coverage is 94.28571% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 81.9%. Comparing base (cc3afa5) to head (c9ae0cd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #289   +/-   ##
=======================================
  Coverage    81.9%    81.9%
=======================================
  Files         837      837
  Lines      226823   226838   +15
=======================================
+ Hits       185828   185854   +26
+ Misses      40995    40984   -11

lgtm - left a few suggestions to avoid pattern of (manual check, unwrap/index). I think the suggestions should not add additional overhead, but can be left to a follow-up PR if you prefer.

Thanks for the review! Applied both suggestions.

Thanks for the review! Applied both suggestions.

Aghh, looks like clippy didn't like the match I provided and asked you to do a let else

Thanks for the review! Applied both suggestions.

Aghh, looks like clippy didn't like the match I provided and asked you to do a let else

Oops, fixed


Added generated seeds for FuzzRangeNodes

Reading and extrapolating from https://go.dev/doc/fuzz/, the Fuzz test will only be fully exercised when a single Fuzz test is run explicitly with the -fuzz parameter to go test. When running go test without this, the Fuzz test will be invoked, but only on the seed corpus. As FuzzRangeNodes did not have a seed corpus, then this test is effectively skipped in our presubmits and CI pipeline.
This change adds the generated corpus from running the fuzz test as the seed corpus. This shouldn't change how well the test is covered when the -fuzz parameter is provided, but does mean that the test will be exercised as part of CI. This seems like a win, but maybe it's bonkers to be submitting generated files?
The generated corpus was acquired with the following commands:
go test --fuzz=FuzzRangeNodes --fuzztime=20s ./compact
mkdir -p compact/testdata/fuzz
cp -R `go env GOCACHE`/fuzz/github.com/transparency-dev/merkle/compact/FuzzRangeNodes compact/testdata/fuzz

@hickford PTAL as the instigator of this fuzzing adventure.

It doesn't appear that this generated corpus ever becomes stable; after copying the generated corpus into the seed corpus and running the fuzz command again, new "interesting" entries are always found. I've tried repeating this 3 times and there's always something new.

Indeed go test only runs the seed corpus, currently empty.
Simplest solution is to add some explicit cases with F.add:
for begin := 0; begin <= 10; begin++ {
    for end := begin; end <= 20; end++ {
        f.Add(uint64(end), uint64(end))
    }
}

To achieve deeper fuzzing could add the project to https://google.github.io/oss-fuzz/ (continuous fuzzing on Google infrastructure) and https://google.github.io/clusterfuzzlite/ (fuzzes pull requests in GitHub Actions)

The middle ground could be more along the lines of the classic test cases pattern, with params taken from the generated files:
for s, e, p := range []struct{
  start int64
  end int64
  phaseOfMoon
  }{
    { 1, 3, 6 },
    ...
  } {
   // fuzziness(s, e, p)
  }

I do kinda like the idea of having the fuzz seed data near the fuzz test it's for (thinking of future me wondering what on earth these weird files checked in under testdata/... are) :)

There's no need to define the struct and iterate it; you can just repeatedly add things:
f.Add(1, 3, 6)
f.Add(6, 8, 2)
...

But even this approach I find a bit weird; these could just be normal unit tests at this point. I proposed this approach to just lean into the automated generation and tooling that fuzzing provides, but ensure it's being used. I think the world's not ready for this yet though.
For now, I think we just take the easy seeding approach @hickford suggests above: for loops over small numbers to add some seeding, and then see how the future tooling for these files develops. I think we'd want to have:

presubmit checks that all fuzz tests have these files
presubmit checks that no files exist for fuzz tests that don't exist (I'm thinking of renamed/deleted tests)
IDE support that easily links from a fuzz test to the corpus

We should also have a policy that any failures that are found through deeper fuzzing are moved to a standard unit test to prevent regressions.

Having the explicit f.Add lines in the test somewhat removes the need for all the bullets in your list, I think?
I also suspect this blurry line between fuzz and unit test is by design;
essentially you are adding specific regression tests against previously failed inputs that happened to be have been discovered by fuzzing (and/or tests whose parameters are known to have increased test coverage), it's just that you can turbo charge these unit tests to go off on an adventure to find new params.

https://github.com/transparency-dev/merkle/pull/37 adds deeper fuzzing in GitHub Actions using ClusterFuzzLite.


Error when use auth0-lock

I have an error when i integrating with auth0.
the error appear below:

WARNING in ./~/formidable/lib/incoming_form.js
Critical dependencies:
1:43-50 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/formidable/lib/incoming_form.js 1:43-50
WARNING in ./~/formidable/lib/file.js
Critical dependencies:
1:43-50 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/formidable/lib/file.js 1:43-50
WARNING in ./~/formidable/lib/json_parser.js
Critical dependencies:
1:43-50 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/formidable/lib/json_parser.js 1:43-50
WARNING in ./~/formidable/lib/querystring_parser.js
Critical dependencies:
1:43-50 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/formidable/lib/querystring_parser.js 1:43-50

What the solution for fixing this error?

Those are warnings, not errors.  This issue isnt with this project so i'm closing this but we should still continue the discussion


Instantiate _isolateSession when created fromAddress

Unbreaks release() for OrtSessions created fromAddress

OrtSessions.fromAddress should not be used externally.

In cases where we are creating the OrtSession from a different isolate (to prevent jank while reading the model file), and if we have to run an inference later, isn't fromAddress the best way to recreate the session?
If there's a better way, please let me know!
Thank you!

Try the 1.3.0


Vite compatibility: Error: Unexpected usage…EditorSimpleWorker.loadForeignModule

Hello!
I'm trying to make it work with Vite, but I'm stumbling upon this so far:
editorSimpleWorker.js:463 Uncaught (in promise) Error: Unexpected usage
    at EditorSimpleWorker.loadForeignModule (editorSimpleWorker.js:463:31)
    at webWorker.js:38:30
    at async Object.provideMarkerData (languageFeatures.js:13:28)
    at async doValidate (index.js:21:25)

I'll make a repro. ASAP.

This is the repro:
https://stackblitz.com/edit/vitejs-vite-p7mkqm
Monaco YAML is working here. I tried to kind of "port" the Vite tricks from it to Monaco unified, but not sure on how to achieve that, are they are structured differently regarding worker import.

What your screenshot shows is the generic Monaco editor error meaning it failed to load the worker. There’s an actual error too, saying something about document being undefined. This is because document doesn’t exist in web workers. I’m unable to screenshot this, because Stackblitz is being flaky.
Your options are to:

Alias decode-named-character-reference to the web worker compatible export, like in https://github.com/remcohaszing/monaco-unified/blob/main/examples/demo/webpack.config.js#L18-L20
Make vite use the worker condition. This means it will apply to all imports though. I haven’t really seen negative effects of this myself.import { defineConfig } from 'vite';

export default defineConfig({
  resolve: {
    conditions: ['worker']
  }
})

Upvote https://github.com/vitejs/vite/issues/7439

Perhaps this project should define an FAQ, like https://github.com/remcohaszing/monaco-yaml#faq. I think this issue you can would fit in there.

It worked immediately with the Option #2 three-liner, great!
Will keep what you said in mind though, and report if anything weird happens.


⚠ ClamAV has degraded performance

In d0a1c10, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 274 ms

Resolved: ClamAV performance has improved in 4cc8b67.


Improve notepad

🛠 Fixes Issue
Closes #210
👨💻 Changes proposed
Save to local storage
save to file
work with the txt file
✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers
📷 Screenshots

@iamrahulmahato The screenshot provided by you doesn't have the options in the working,
I have attached the screenshot of the working image at my end, check out and make the necessary changes.

@praniti111 I have rechecked all the code and its working
https://user-images.githubusercontent.com/49890655/166118725-6180caf2-70c3-4223-b95c-409f4cb49fcc.mp4


A Segmentation fault in asn1fix_enum.c:82:5

System info
Ubuntu x86_64, clang 6.0, asn1c (latest master 00fa516)
Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
Command line
./asn1c/asn1c -EF @@
Output
FATAL: Segmentation fault (core dumped)

AddressSanitizer output
FATAL: AddressSanitizer:DEADLYSIGNAL
=================================================================
==855==ERROR: AddressSanitizer: V on unknown address 0x000000000001 (pc 0x0000004f7132 bp 0x7ffd8d3958b0 sp 0x7ffd8d394fe8 T0)
==855==The signal is caused by a READ memory access.
==855==Hint: address points to the zero page.
    #0 0x4f7131 in __sanitizer::internal_strlen(char const*) (/home/seviezhou/asn1c/asn1c/asn1c+0x4f7131)
    #1 0x4468d5 in printf_common(void*, char const*, __va_list_tag*) (/home/seviezhou/asn1c/asn1c/asn1c+0x4468d5)
    #2 0x44721b in __interceptor_vfprintf (/home/seviezhou/asn1c/asn1c/asn1c+0x44721b)
    #3 0x58022f in _default_error_logger /home/seviezhou/asn1c/libasn1fix/asn1fix.c:580:2
    #4 0x5bd7c9 in asn1f_fix_enum /home/seviezhou/asn1c/libasn1fix/asn1fix_enum.c:82:5
    #5 0x582b7f in asn1f_fix_simple /home/seviezhou/asn1c/libasn1fix/asn1fix.c:377:8
    #6 0x5864d8 in asn1f_recurse_expr /home/seviezhou/asn1c/libasn1fix/asn1fix_misc.c:209:8
    #7 0x5866bf in asn1f_recurse_expr /home/seviezhou/asn1c/libasn1fix/asn1fix_misc.c:219:9
    #8 0x581c5f in phase_1_1 /home/seviezhou/asn1c/libasn1fix/asn1fix.c:326:8
    #9 0x5816cf in phase_1_1 /home/seviezhou/asn1c/libasn1fix/asn1fix.c:303:10
    #10 0x57df11 in asn1f_fix_module__phase_1 /home/seviezhou/asn1c/libasn1fix/asn1fix.c:198:9
    #11 0x57df11 in asn1f_process /home/seviezhou/asn1c/libasn1fix/asn1fix.c:84
    #12 0x5156f8 in main /home/seviezhou/asn1c/asn1c/asn1c.c:379:11
    #13 0x7fbd5f15eb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
    #14 0x41a969 in _start (/home/seviezhou/asn1c/asn1c/asn1c+0x41a969)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: V (/home/seviezhou/asn1c/asn1c/asn1c+0x4f7131) in __sanitizer::internal_strlen(char const*)
==855==ABORTING

POC
SEGV-asn1f_fix_enum-asn1fix_enum-82.zip

The crash is caused by this debug/error message:
https://github.com/vlm/asn1c/blob/v0.9.28/libasn1fix/asn1fix_enum.c#L82
FATAL("HERE HERE HERE", 1);

It looks like some temporary message added while debugging some issue, but that assumption is hard to confirm as it was included in the initial import to git.
The FATAL macro effectively expands to something like this:
printf("HERE HERE HERE" " in %s", 1, source_file_name);

leading to %s format applied to argument 1 (i.e. pointer 0x1) instead of the file name string.
The most trivial fix is to remove extraneous , 1 argument.  A better fix would be to remove the FATAL call completely if it's not needed, or user proper message if it is needed.


Integrations with template replacements are not processed.

If a Flex integration that is using a template replacement parameter such as ${something} is used in the config file.
The integration is not processed and no error is observed in the agent logs even with verbose: 1.
This effects functionality such as add_attribute of Flex, and perhaps others.
Confirmed issue with @haihongren .
cc/ @ardias @jfjoly
Context: https://newrelic.slack.com/archives/C5A2QGLKT/p1627981780005800

For example adding the below highlighted section will prevent the agent from running the config somehow.

However manually running the integration it completes without any issue.

Just to add: We should align Flex and Infra agent when it comes to environment variables.
current flex env var notation: $$MY_ENV_VAR
current infra env var notation: {{MY_ENV_VAR}}
could we add support for both $$MY_ENV_VAR and {{MY_ENV_VAR}} within Flex so that we don't break old configs but make sure future configs are aligned.

We'll move the discussion to https://github.com/newrelic/nri-flex/issues/332

@josemore this issue needs to remain with the agent, as it is not Flex related, it could be for any agent integration depending on what the user may supply in the command section of the config as well.
See: https://newrelic.slack.com/archives/CPVCA6Y86/p1642484666009900?thread_ts=1642187802.007300&cid=CPVCA6Y86

See also: https://newrelic.slack.com/archives/CPVCA6Y86/p1650879133626759

Reopening: https://discuss.newrelic.com/t/nri-flex-doesnt-work-with-discovery/184820/8

This issue was closed because it has been inactive for three weeks despite it can be reopened at any point if you think it still relevant.
Thank you for your contribution!


Implement SumObserver

https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/metrics/api.md#sumobserver

@dyladan Looking for something to jump in on, do you think this is a good first task? Feel free to assign this to me, or maybe redirect me if there's somewhere better to start.

I wouldn't say this is very beginner friendly, but it's not too bad either. Nothing in this is really all that difficult, but it may require some familiarity with the metrics api and sdk. Since I don't know your skill level, I can't really say for sure if it is a good task for you.
If you want some idea of how much work it is, you can look at #1117 which shows the renaming of an instrument to see how many places in the code will need to be modified at a minimum. I would also recommend you look at the general implementation of that instrument since it is itself an observer so it is a good match for this one.
If you want me to assign this to you, then let me know. If you're looking for something a little easier, I'd look at possibly #796, #867, #987, #979, #919,
or #920. #919 and #920 are probably the most beginner friendly.

Thanks for the suggestions! #1117 makes it look reasonable. I've been climbing around in the golang implementation of metrics, so I'm somewhat familiar with the concepts. I think I'll give it a stab, so go ahead and assign it to me.
Thanks again!

Closing as the issue is no longer applicable.


Register displays input based on the type value

change:
1.Register displays input based on the type value
@anvithks @wisererik Please check whether it can be merged.

Was this tested for create bucket and upload object in YIG from Dashboard?

@yuejuSDS @sfzeng @kumarashit The dashboard currently asks the user to generate an AK/SK on clicking the resources page. If YIG does not require AK/SK then this behavior will have to be conditional as well for the backend and all the other calls also need to be checked.

@yuejuSDS @sfzeng @kumarashit The dashboard currently asks the user to generate an AK/SK on clicking the resources page. If YIG does not require AK/SK then this behavior will have to be conditional as well for the backend and all the other calls also need to be checked.

The additional images created for each buckend and the buckets created based on each buckend were successful

Was this tested for create bucket and upload object in YIG from Dashboard?

No, I just changed the style, because yig only needs to enter the endpoint, and you can see my new images

@anvithks @yuejuSDS Can you please confirm if these changes won't affect other backends


[Logging v2] - username and password is not properly configured in the ClusterOutput of the rancher-logging app

What kind of request is this:
bug
Steps to reproduce:

Configure Elasticsearch/Kibana backend with basic password logging
Deploy the rancher-logging chart from the Dashboard setting using the username and password

Result:

The ClusterOutput generated by the install doesn't include anything about the username and password

  spec:
    elasticsearch:
      host: <host>
      index_name: test2
      port: 9200
      scheme: http

There's a secret rancher-logging-elasticsearch with the password key where the password gets stored but the ClusterOutput doesn't reference it.
The user key is also not in ClusterOutput
Other details that may be helpful:
If we navigate to the installed app in the Dashboard I see the username/password shown in the Chart Options form.

Updating the ClusterOutput with the expected information I get the logs in the Elasticsearch server:
spec:
  elasticsearch:
    host: <hostname>
    index_name: test2
    password:
      valueFrom:
        secretKeyRef:
          key: password
          name: rancher-logging-elasticsearch
    port: 9200
    scheme: http
    user: elastic

rancher/rancher#27935
Environment information

Rancher version: master-head (08/07/2020) 4fb56e2b7
Installation option: HA k8s local

Rancher version master-head (08/25/2020) 45e3e23cd
This is working after deploying and editing the YAML manually. There's a separate issue for the UI form throwing an error.
https://github.com/rancher/dashboard/issues/1092


Support Lua 5.4

Lua 5.4 had been published and have a few changes from 5.3. I can see the rockspec sets the library does not support Lua 5.4. Any idea of supporting for Lua 5.4?
I tried and lzmq (installed via rockspec/lzmq-scm-0.rockspec) can pass all the tests on Lua 5.4 (on a Fedora 33 machine).

https://github.com/thislight/lzmq/commit/76917027106e0fa10212231dad6aa77af204bcd2#diff-3a72d8917ca3c6c6a75d0a1f8f97b8a672566b7ba725f3d96ed5fc176410dd08
I made it run on Lua 5.4 by change the number in lzmq-scm-0.rockspec


Dummy pull request to test cla-assistant

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Add Guest Additions support

See IGuest, accessible from a machine's IConsole object.
Allow authenticating with guest OS, file system I/O, process information, etc.

Reading guest property values support added in b92d0f491ef3c6db7bb0d6e99f31d92296aa0d08 and 01ceba3c7f894f7e42e30469b74dd7db93d061f4.

Support to attach/detach guest additions CD image added via 91536c88683c7663aac107f89ac63b089483c7f1.


Second application instance does not automatically take over event processing when EventProcessorClient is used

We have a Java application that processes events from an Azure IoT Hub.  Since we would like to load balance event processing across multiple instances of this Java application, we are using EventProcessorClient.  However, in a two instance test environment, things are not working as we would expect.  Here is a description of the test we are doing as well as the behavior we are seeing:
-Instance 1 and 2 are both started at the same time.
-Instance 1 proceses events from partition 1.
-Instance 1 is shutdown
-Instance 2 does not automatically take over processing events from partition 1
-Instance 2 is shutdown and restarted
-Only at that point does instance 2 take over processing events from partition 1.  The first event that it processes is the one we expect, proving that the checkpoint saving mechanism works.
In the scenario described above, we are expecting not to have to restart Instance 2 in order for it to take over processing events from partition 1.  We have even tried letting instance 2 run for over
an hour after instance 1 is shutdown and it still did not take over processing events from partition 1.
Attached is a text file with the relevant source code from our Spring Boot application.
Any help/advice would be greatly appreciated!

Azure IoT Hub Pricing and scale tier:  S1 - Standard

Azure IoT Hub Number of IoT Hub units:  1

OS:  Windows 10 Enterprise

IDE: Eclipse

App server: Tomcat 9.0.16

Maven dependencies:
relevant_code.txt
  <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-messaging-eventhubs</artifactId>
      <version>5.1.0</version>
  </dependency>
  <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-messaging-eventhubs-checkpointstore-blob</artifactId>
      <version>1.1.0</version>
  </dependency>

@AlainBrazeau Thanks for reporting the issue. The 2nd instance is expected to take over the processing of partition 1 without requiring a restart. Could you please provide the logs for both instance 1 and instance 2?

As requested, here are the log files.
instance1.log
instance2.log
instance2_after_restart.log

@AlainBrazeau I checked the logs for both instance 1 and instance 2. Looks like instance 1 was shut down at around 27-05-2020 08:41:07.438 (that's the last log I see). At this point, only instance 2 is running and after a minute, all 6 partitions are owned by instance 2.
27-05-2020 08:42:17.202 INFO  c.a.m.e.PartitionBasedLoadBalancer.performLogging - Load is balanced with this event processor owning 6 partitions.
I also noticed that at 08:45 the connection was closed because the connection was idle for some time and then recovered after retries and instance 2 owning all 6 partitions again until 08:51 when it was stopped and restarted.
It would also be great if you could enable verbose level logging and share it to understand what is happening on the checkpointstore.

As requested, here are new log files with the logging level set to debug.
debug_instance1.log
debug_instance2.log
debug_instance2_after_restart.log

Do you have any idea what is going on based on the last set of log files?  Is there any other information I can provide?

@AlainBrazeau Thanks for providing the logs. I will take a look at the logs and have an update soon. I don't need any other information at this time!


Stale cached date in Fast-classpath-scanner

I am running into an issue where it seems that fast-classpath-scanner is caching some data that causes it to fail when used multiple times.  Here is the code using fast-classpath-scanner:
  private List<String> findFunctionsInThisJar(File jarFile) throws IOException {
    URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{jarFile.getCanonicalFile().toURL()});
    FastClasspathScanner fastClasspathScanner =
        new FastClasspathScanner().removeTemporaryFilesAfterScan(true).overrideClassLoaders(urlClassLoader);
    ScanResult scanResult = fastClasspathScanner.scan();
    return scanResult.getNamesOfClassesImplementing(Function.class);
  }

I thought that this ought to avoid caching issues, since I am creating a new FastClasspathScanner each time and am making sure to override the classloaders to only consider the one jar I'm interested in.  Here is the exception I am running into:
java.lang.RuntimeException: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /private/var/folders/v0/q5cmgqrj3ps1cm8g24nkbgbh0000gp/T/junit266545420653548100/server-2
	at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1115)
	at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1143)
	at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1166)
	at org.apache.geode.internal.DeployedJar.findFunctionsInThisJar(DeployedJar.java:341)
	at org.apache.geode.internal.DeployedJar.loadClassesAndRegisterFunctions(DeployedJar.java:189)
	at org.apache.geode.internal.JarDeployer.registerNewVersions(JarDeployer.java:449)
	at org.apache.geode.internal.JarDeployer.deploy(JarDeployer.java:489)
	at org.apache.geode.management.internal.cli.functions.DeployFunction.execute(DeployFunction.java:68)
	at org.apache.geode.internal.cache.MemberFunctionStreamingMessage.process(MemberFunctionStreamingMessage.java:191)
	at org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:376)
	at org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:442)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:621)
	at org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1067)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /private/var/folders/v0/q5cmgqrj3ps1cm8g24nkbgbh0000gp/T/junit266545420653548100/server-2
	at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:217)
	at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:61)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	... 1 more
Caused by: java.nio.file.NoSuchFileException: /private/var/folders/v0/q5cmgqrj3ps1cm8g24nkbgbh0000gp/T/junit266545420653548100/server-2
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixPath.toRealPath(UnixPath.java:876)
	at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:215)
	... 5 more

(Note that I have JUnit test with two test methods.  Both of them pass in isolation.  But I get this exception when running the whole test class.  The NoSuchFileException occurs in the second test method, and refers to a stale path that was used by and then deleted by the first test method.)  Do you see anything I am doing that stands out as incorrect?  Thank you!

@jaredjstewart interesting. Repeat scanning should not be an issue here per se, because the lifecycle of lists of internally-created temporary files is bound to the lifecycle of a scan, using AutoCloseable ([1], [2]). However, can you please confirm if in the version you are running, the line Scanner.java:217 refers to this?:
currentdirPath = FastPathResolver.resolve(Paths.get("").toAbsolutePath().normalize()
        .toRealPath(LinkOption.NOFOLLOW_LINKS).toString());

If so, something else is happening here: sometime after the creation of the temporary directory (/private/var/folders/v0/q5cmgqrj3ps1cm8g24nkbgbh0000gp/T/junit266545420653548100/server-2), something changes the current directory to that temporary directory. Then at the end of the first scan, the directory is removed -- but that doesn't change the current directory setting. So when FastClasspathScanner tries to resolve the path "" (a reference to the current directory), it fails.
FastClasspathScanner does not change the current directory anywhere, at least intentionally. Is your code potentially setting the current directory?
One way to test this is to set the current directory to your home directory right before you call fastClasspathScanner.scan(). Does that fix the problem?
A couple of things:

.removeTemporaryFilesAfterScan(true) is the default (i.e. this is not needed)
I appreciate that this is an isolated test (thanks for the minimal testcase), but note that providing your own classloader can introduce problems with having multiple instances of a class loaded by different classloaders, or the superclass loaded by one classloader and a subclass by another, preventing casting, etc.

Thank you for the excellent feedback.  The "user.dir" property was indeed being modified at runtime, and removing that code fixed the problem.

@jaredjstewart Great, thanks for testing, and for reporting back!