[WIP] On-the-fly log-abs-det-Jacobian and caching intermediate values

Currently, computing the log absolute determinant of the Jacobian (LADJ) is achieved via an explicit inversion of the flow result (say y) onto the input domain (say x). The gradient of the LADJ is used for the loss, hence every operation (forward and backward through the flow) must be differentiable.
WLOG If the LADJ is represented by the function h and the flow by the function f with inverse g, this amends to computing h(g(f(x))) whose gradient can trivially be shown to be equal to the gradient of h(x).
The advantage of this method is that we can avoid storing intermediate values. It also paves the way for backpropagation without storing intermediate values.
However, this approach relies on the following implicit assumptions:

computing the inverse can be achieved with an arbitrary precision tolerance
computing the inverse is cheap
the inverse operation g is differentiable

Several architectures violate these assumptions, at least from first principle:

Invertible residual networks have no analytical inverse and require a solver to compute g. Gradients can be passed through this inversion but not at no cost. During training, there may be points in time where the inverse is harder to gather, for instance because the spectral normalization has not been completed (too few steps).
In general, "rich" and meaningful transforms (i.e. with a high Lipschitz constant) will have poor inverses. See this for a theoretical approach.
Some types of flows are not "truly" invertible: see CIF and SurVAE.
In most cases, the inversion will be computationally equally or more involved than the forward transform.

To add to these limitations, computing the inverse transform on top of the forward transform occupies twice more space in the memory than just caching intermediate values unless backpropagation without storing intermediate values is used. For deep models (e.g. Glow) this will limit FlowTorch capacity to model complex distributions.
Proposals
The obvious solution is to compute the LADJ on-the-fly, during the forward transform.
However, the LADJ computation does not usually come for free unless in specific cases (e.g. coupling, householder and other flows).
The following solutions permit to compute the LADJ at a reduced cost and with greater precision.

Context manager:
This is not an independent solution per se but I write it here as a reminder that we could use this logic to turn on/off downstream features with this kind of tool.
In PyTorch, context managers can be used to activate/deactivate graph computation using torch.enable_grad() or torch.no_grad(). A similar context manager could be used to compute the LADJ, or to indicate that some intermediate operations should be executed at run time to allow for an efficient computation of the LADJ.

Caching intermediate results:
We could cache the input and output in a cache for future use:

class Bijector(metaclass=flowtorch.LazyMeta):
    def __init__(self, ..., cache_size=1):
        ...
        self._cache = self._make_cache(cache_size)

    def _make_cache(self, cache_size: int) -> List[dict]:
        caches = []
        for i in range(cache_size):
            caches.append({
                "x": None,
                "y": None,
            })
        return caches

During execution, we could store the input and output at each step of the flow with some kind of decorator:
    def forward(
        self,
        x: torch.Tensor,
        context: Optional[torch.Tensor] = None,
    ) -> torch.Tensor:
        # TODO: Allow that context can have a batch shape
        assert context is None  # or context.shape == (self._context_size,)
        for _cache in self._cache:
            if x is _cache['x']:
                return _cache['y']
        y = self._forward(x, context)
        if len(self._cache):
            _cache = self._erase_cache(self._cache[-1])
            _cache["x"] = x
            _cache["y"] = y
            _cache["mode"] = "forward"
            self._cache = [_cache, *self._cache[1:]]
        return y

When calling inverse, the output y is checked against the value stored in the cache. If the output id matches the previous output id, then the respective input is returned. This avoids a potentially burdensome operation. If it doesn't match, the cache is erased (or the first cache of the list is erased, if the cache can handle multiple calls) and filled with the new value. We must store the "mode", being either "forward" or "backward", to make sure that we don't compute the LADJ on the value resulting from a backward call on the flow.
    def inverse(
        self,
        y: torch.Tensor,
        x: Optional[torch.Tensor] = None,
        context: Optional[torch.Tensor] = None,
    ) -> torch.Tensor:
        # TODO: Allow that context can have a batch shape
        assert context is None  # or context.shape == (self._context_size,)
        for _cache in self._cache:
            if y is _cache['y']:
                return _cache['x']
        return self._inverse(y, x, context)

There are drawbacks to this method: for instance, we would need to choose what to do when the flow is copied, serialized, when the dtype or the device is changed (erase the cache?).

Tensor method
Another option could be for the class Bijector to return a torch.Tensor-like object that tracks the operations executed in the flow:

from __future__ import annotations
import torch
from typing import Union

class BijectiveTensor():
    def __init__(self, tensor: torch.Tensor, originating_tensor: Union[torch.Tensor, BijectiveTensor] , transform: Bijector):
        self._register_originating_tensor(originating_tensor)
        self.transform = transform
        self._tensor = tensor

    def _register_originating_tensor(self, other: Union[torch.Tensor, BijectiveTensor]):
        self.originating_tensor = other

    def _check_is_originating(self, other):
        if self.originating_tensor is other:
            return True
        if not isinstance(self.originating_tensor, BijectiveTensor):
            return self.originating_tensor is other
        else:
            return self.originating_tensor._check_is_originating(other)

    def log_abs_det_jacobian(self, other: torch.Tensor):
        if not self._check_is_originating(other):
            raise RuntimeError("Originating tensor has not been found to be part of the graph of the BijectiveTensor")
        ldj = self.transform.log_abs_det_jacobian(self.originating_tensor, self)
        if other is not self.originating_tensor:
            return self.originating_tensor.log_abs_det_jacobian(other) + ldj
        return ldj

    @classmethod
    def __torch_function__(cls, func, types, args=(), kwargs=None):
        if kwargs is None:
            kwargs = {}
        args = [a._tensor if hasattr(a, '_tensor') else a for a in args]
        ret = func(*args, **kwargs)
        return ret

    def __add__(self, other):
        return self._tensor+other

    def __mul__(self, other):
        return self._tensor*other

    def __truediv__(self, other):
        return self._tensor/other

    def __sub__(self, other):
        return self._tensor-other

A concrete toy example could be
class BijectorSum:
    def forward(self, x):
        y = x+2
        return BijectiveTensor(y, x, self)

    def log_abs_det_jacobian(self, x, y):
        return torch.zeros_like(x)
class BijectorMul:
    def forward(self, x):
        y = x*2
        return BijectiveTensor(y, x, self)

    def log_abs_det_jacobian(self, x, y):
        return (torch.ones_like(x)*2).log()

x = torch.randn(3)
b1 = BijectorSum()
b2 = BijectorMul()
x1 = b1.forward(x)
y = b2.forward(x1)

y.log_abs_det_jacobian(x) # LADJ of the whole chain
y.log_abs_det_jacobian(x1) # LADJ of the last operation

Coming back to the first point of this proposal, we could also have a context manager class that controls whether the flow output should be a BijectiveTensor or a regular torch.Tensor (to spare some memory for instance).

@vmoens thanks for the detailed proposal - this is fab!
Approach 2 is what we did in Pyro and what I was thinking we'd do for FlowTorch, although Approach 3 has piqued my curiosity.
Let's chat next week offline!

Closes as from #89


Support for SSL Context Options

Hi,
thank you for maintaining this project. It's very useful.
Would it be possible to provide additional Options for the SSL Context like verify_peer, ca_file and ca_path mentioned in http://php.net/manual/de/context.ssl.php.
Currently I have some problems to generate Code for WSDLs which are hosted under https with self-signed certificates or with CAs which are not in my trust-chain

Hi,
I must admit this is not documented so could you try using the Soap Options that can be customized using the GeneratorOptions beginning with this doc section then call such as (if I'm  not wrong):
// ensure I did not a mistake here ;)
$context = stream_context_create(
    array(
        'ssl' =>
            array(
                'verify_peer' => '',
                'ca_file' => '',
                'ca_path' => ''
            )
    )
);
// the options
$options = GeneratorOptions::instance(/* '/path/to/your/configuration/file.yml' */);
$options->.....
// then add
$options->setSoapOptions(
    array(
        \WsdlToPhp\PackageBase\SoapClientInterface::WSDL_STREAM_CONTEXT => $context
    )
);
// then ...
$generator = new Generator($options);
$generator->generatePackage();

Get back to me if this is not clear :wink:, in any case in fact in order to know if it works this way,
Then I'll see if this is something that can be added as options in the command line tool
Good luck,

Hi,
thanks for the quick response. I've tried to use setSoapOptions, but it looks like the Soap Options are not considered when the problem appears.
The error occurs when first accessing the origin url with file_get_contents() in this call stack:
#1 .../wsdltophp/packagegenerator/src/Generator/Utils.php(80): file_get_contents('<url>', false, NULL)
#2 .../wsdltophp/packagegenerator/src/Generator/Generator.php(789): WsdlToPhp\PackageGenerator\Generator\Utils::getContentFromUrl('<url>', '', '', '', '', '', '')
#3 .../wsdltophp/packagegenerator/src/Generator/Generator.php(135): WsdlToPhp\PackageGenerator\Generator\Generator->getUrlContent('<url>')

The function Utils:getContentFromUrlContextOptions() creates a context for this requests, considering options for proxy and http auth, but not ssl verifcation.
Regards.

Indeed, a whole new context is created to download the WSDL and its schemas (if there is any). I think it would only require to take into account the context passed as parameter to the SoapClient in order to be fully functionnal. I'll see what I can ASAP,
Jus to now, is the way I suggested to you easy and comprehensible enough? I think I'll have to add it to the readme or the FAQ, let me know thx

I think it would only require to take into account the context passed as parameter to the SoapClient in order to be fully functionnal.

I think that will be sufficient. This solution would be comprehensible enough for me. Thank you.

just to let you know that I don't forget your issue and that I'll be able to work on it from February 1st :wink:

@jzaeske Hi, could you try with the feature/issue-40 branch? Don't forget to do a composer update in order to get the last version of PackageBase.
Let me know then,
Thanks,

Hi @mikaelcom . Sorry for the late response.
I put a comment on the commit https://github.com/WsdlToPhp/PackageGenerator/commit/b26607a2fff4a9227cbac76cc42d899cd5cec076#commitcomment-15974412

fixed in release 1.3.0


Can't seem to get Foundation to work with this

This is my webpack.config.js:
var webpack = require('webpack');
var path    = require('path');

module.exports = {
    entry: [
        './public/javascripts/main.js',
        './public/javascripts/jsx/QueueSection.jsx',
        './public/stylesheets/style.scss'
    ],
    output: { path: __dirname + "/public/javascripts/", filename: 'bundle.js' },
    devtool: 'inline-source-map',
    resolve: {
        moduleDirectories: ['../stylesheets/']
    },
    module: {
        loaders: [
            {
                test: /.jsx?$/,
                loader: 'babel-loader',
                exclude: /node_modules/,
                query: {
                    presets: ['es2015', 'react']
                }
            },
            {
                test: /.js?$/,
                loader: 'babel-loader'
            },
            {
                test: /.scss$/,
                loaders: ['style-loader', 'css-loader?sourceMap', 'sass-loader?sourceMap']
            }
        ]
    }
};

in my style.scss is:
/**
 * Foundation for Sites by ZURB
 * Version 6.1.1
 * foundation.zurb.com
 * Licensed under MIT Open Source
 */

// Sass utilities
@import '~foundation-sites/scss/util/util';

// Global variables and styles
@import '~foundation-sites/scss/global';

// Components
@import '~foundation-sites/scss/grid/grid';
@import '~foundation-sites/scss/typography/typography';
@import '~foundation-sites/scss/forms/forms';
@import '~foundation-sites/scss/components/visibility';
@import '~foundation-sites/scss/components/float';
@import '~foundation-sites/scss/components/button';
@import '~foundation-sites/scss/components/button-group';
@import '~foundation-sites/scss/components/accordion-menu';
@import '~foundation-sites/scss/components/accordion';
@import '~foundation-sites/scss/components/badge';
@import '~foundation-sites/scss/components/breadcrumbs';
@import '~foundation-sites/scss/components/callout';
@import '~foundation-sites/scss/components/close-button';
@import '~foundation-sites/scss/components/drilldown';
@import '~foundation-sites/scss/components/dropdown-menu';
@import '~foundation-sites/scss/components/dropdown';
@import '~foundation-sites/scss/components/flex-video';
@import '~foundation-sites/scss/components/label';
@import '~foundation-sites/scss/components/media-object';
@import '~foundation-sites/scss/components/menu';
@import '~foundation-sites/scss/components/off-canvas';
@import '~foundation-sites/scss/components/orbit';
@import '~foundation-sites/scss/components/pagination';
@import '~foundation-sites/scss/components/progress-bar';
@import '~foundation-sites/scss/components/reveal';
@import '~foundation-sites/scss/components/slider';
@import '~foundation-sites/scss/components/sticky';
@import '~foundation-sites/scss/components/switch';
@import '~foundation-sites/scss/components/table';
@import '~foundation-sites/scss/components/tabs';
@import '~foundation-sites/scss/components/title-bar';
@import '~foundation-sites/scss/components/top-bar';
@import '~foundation-sites/scss/components/thumbnail';
@import '~foundation-sites/scss/components/tooltip';

@mixin foundation-everything($flex: false) {
  @include foundation-global-styles;
  @if not $flex {
    @include foundation-grid;
  }
  @else {
    @include foundation-flex-grid;
  }
  @include foundation-typography;
  @include foundation-button;
  @include foundation-forms;
  @include foundation-visibility-classes;
  @include foundation-float-classes;
  @include foundation-accordion;
  @include foundation-accordion-menu;
  @include foundation-badge;
  @include foundation-breadcrumbs;
  @include foundation-button-group;
  @include foundation-callout;
  @include foundation-close-button;
  @include foundation-drilldown-menu;
  @include foundation-dropdown;
  @include foundation-dropdown-menu;
  @include foundation-flex-video;
  @include foundation-label;
  @include foundation-media-object;
  @include foundation-menu;
  @include foundation-off-canvas;
  @include foundation-orbit;
  @include foundation-pagination;
  @include foundation-progress-bar;
  @include foundation-slider;
  @include foundation-sticky;
  @include foundation-reveal;
  @include foundation-switch;
  @include foundation-table;
  @include foundation-tabs;
  @include foundation-thumbnail;
  @include foundation-title-bar;
  @include foundation-tooltip;
  @include foundation-top-bar;
}

and in my main.js is:
require("../stylesheets/style.scss");
Any information would be fantastic thanks.
I installed foundation-sites with npm install foundation-sites and it is in my node_modules

I am having the same issue, but my sass file is simply doing:
// import foundation, see https://github.com/jtangelder/sass-loader for '~' details
@import "~foundation-sites/scss/foundation";

and in my webpack conf:
      {
            // handle sass when including scss files
            test: /\.scss$/,
            loaders: ['style', 'css', 'postcss-loader', 'sass']
        }

My output looks like this:
/***/ 50:
/***/ function(module, exports, __webpack_require__) {

	exports = module.exports = __webpack_require__(210)();
	// imports

	// module
	exports.push([module.id, "/**\n * Foundation for Sites by ZURB\n * Version 6.1.1\n * foundation.zurb.com\n * Licensed under MIT Open Source\n */\n", ""]);

	// exports

/***/ },

It's like it only gets the initial comments and doesn't follow all of foundation's imports.

If you override webpack's resolve directories, don't forget to add node_modules back.

I had node_modules are part of my resolve.
sassLoader: {
        includePaths: [path.resolve(__dirname), path.resolve(__dirname, '/public'), nodeModules, bowerComponents]
    },
    resolve: {
        root: path.resolve(__dirname),
        modulesDirectories: ['node_modules', 'bower_components'],
        extensions: ['', '.js', '.json', '.scss', '.html'],
        alias: {}
    }

I ended up downgrading to foundation 5.5.x and it seems to work fine.  Maybe it is some issue with foundation 6 + sass loader specifically?

...
resolve: {
			root: [root, modules],
			extensions: ['', '.jsx', '.js', '.json', '.css', '.scss', '.html']
},
...

I had to make node_modules a root.

Though from the looks of your snippet, you really aren't using "root", try not setting it first

Same issue here with Foundation 6's scss and WebPack.
Only initial comments are pushed.

Lol :scream_cat: , it took me also so much time to figure out that foundation 6 doesn't expose any modules by default anymore.
You need to include either @include foundation-everything; or all the modules like written here in the docs: http://foundation.zurb.com/sites/docs/sass.html#adjusting-css-output
So I just created this file and import it: https://github.com/timaschew/r3-foundation-boilerplate/blob/master/src/styles/foundation.scss
Sometimes RTFM is really helpful :D
I've created a boilerplate project, if you want to see the whole setup: https://github.com/timaschew/r3-foundation-boilerplate

Thx for sharing this @timaschew


If there is a container that doesn't expose any port, istio-proxy won't start

If there is a container that doesn't export any port, istio-proxy won't start,
2019-11-04T14:32:36.150148Z	error	Failed to generate bootstrap config: invalid character ',' looking for beginning of value
Expected behavior
Ignore the container with no network connectivity
Steps to reproduce the bug
Create a POD with two containers, one of them with no ports, istio-proxy won't start and will show an error:
2019-11-04T14:32:36.150148Z	error	Failed to generate bootstrap config: invalid character ',' looking for beginning of value
Version (include the output of istioctl version --remote and kubectl version)
istioctl version --remote
client version: 1.4.0-beta.0
control plane version: 1.4.0-beta.0
data plane version: 1.4.0-beta.0 (9 proxies)
kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.6-eks-5047ed", GitCommit:"5047edce664593832e9b889e447ac75ab104f527", GitTreeState:"clean", BuildDate:"2019-08-21T22:32:40Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
How was Istio installed?
helm
Environment where bug was observed (cloud vendor, OS, etc)
AWS EKS

Can you provide a reproduction? I applied this yaml:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: alpine
  name: alpine
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: alpine
  strategy:
  template:
    metadata:
      labels:
        app: alpine
    spec:
      containers:
      - args:
        - sleep
        - "100000"
        image: alpine
        imagePullPolicy: Always
        name: alpine2
      - args:
        - sleep
        - "10000000000000000"
        image: alpine
        name: alpine
        resources:
          limits:
            cpu: 100m
            memory: 128Mi
          requests:
            cpu: 10m
            memory: 16Mi

You need to add another container, one that do expose at least one port.

On Nov 4, 2019, at 2:20 PM, John Howard<EMAIL_ADDRESS>wrote:

Can you provide a reproduction? I applied this yaml:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: alpine
name: alpine
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: alpine
strategy:
template:
metadata:
labels:
app: alpine
spec:
containers:
- args:
- sleep
- "100000"
image: alpine
imagePullPolicy: Always
name: alpine2
- args:
- sleep
- "10000000000000000"
image: alpine
name: alpine
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 10m
memory: 16Mi
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Ahh thanks I think I know the issue

in case I get hit by a bus before I fix it - the POD_PORTS variable is doing some shoddy json serialization

Turns out this was not properly backported :confused: it will land in 1.4.3 and 1.3.7 I think, ill send the backports

this will be in 1.4.3


 It's the exact opposite though. This is the very best plugin I know, which is why I really want all these issues solved.
I have found that a lot of spells can not be aimed in naturally generated caves. The strange thing is that they CAN be aimed inside player-made structures. Some of the spells that can't be aimed are Blast and Magic Missile. I am guessing that all spells that work with fireworks don't work, as things like Arrow and Fireball DO work. I would appreciate it if you'd do something about this because then I don't have to take a load of weapons with me when I go mining. If I have to provide more information, I gladly will (though this issue should be really easily reproducable).
Thanks

Oooohhhh you know I bet I know why that is, 1.13 added a new block for “cave air” ... I bet that needs to go on the transparent block list.
Should be an easy fix, I’ll test it out and let you know! Thanks for the report.

Hm so actually it seems like I addressed this already- it should have been fixed way back in 7.6.7 - can I ask what version of Magic you're on?
I added void_air and cave_air to all places that use air, and I just tested by going to a newly generated cave (on 1.13) and cast some spells (like Magic Missile) and it seems fine.

Hm well for most spells anyway ... seems like some spells, like Torch, have hard-coded checks for air. I'll need to fix that.

Yeah it probably is because I'm using 7.6.6. This is the latest version available on Multicraft though... I'll try installing it manually, thanks.

And it works for me now! Pretty annoying that this version can't be installed through Multicraft but whatever. It works now. Thanks a lot.

Hm, I wonder where Multicraft gets its versions from?


chore(coverage) Fix Sonar config for coverage reporting

Fix Sonar config for coverage reporting
Fix code smells
Align jest config across modules

Thanks @devinea.


Panic initializing the logger from ruby gem

Describe the bug you encountered:
Trying to configure Pyroscope from Ruby, and I got a panic on the initialize_logger call.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SetLoggerError(())', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pretty_env_logger-0.4.0/src/lib.rs:74:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5

What did you expect to happen instead?
It should have initialized.
How did you install pyroscope-rs?
gem "pyroscope"

Then configured it with (just showing the code that ran before the crash):
require "bundler/setup"
require "pyroscope"

Pyroscope.configure do |config|
  config.application_name = "something"
end

Note that no other gems were loaded, aside from bundler itself, because I was wanting to profile startup times. I also tried loading it after all the other gems loaded, and got the same result.

pyroscope-rs version and environment
Ruby 3.1.2
macOS Ventura 13.6.5, Intel Core i9
pyroscope gem 0.5.10 (pyroscope-0.5.10-x86_64-darwin.gem)

I also ran it with RUST_BACKTRACE=1 as suggested:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SetLoggerError(())', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pretty_env_logger-0.4.0/src/lib.rs:74:22
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: _initialize_logging
   4: <unknown>
   5: <unknown>
   6: rbffi_CallFunction
             at /Users/t442172/.rvm/gems/ruby-3.1.2@deluxe/gems/ffi-1.16.3/ext/ffi_c/Call.c:400:9
   7: custom_trampoline
             at /Users/t442172/.rvm/gems/ruby-3.1.2@deluxe/gems/ffi-1.16.3/ext/ffi_c/MethodHandle.c:222:34
   8: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
   9: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  10: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:778:11
  11: rb_vm_exec
  12: load_iseq_eval
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:656:5
  13: rb_load_internal
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:717:9
  14: rb_f_load
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:792:5
  15: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  16: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  17: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:778:11
  18: rb_vm_exec
  19: invoke_iseq_block_from_c
  20: invoke_block_from_c_bh
             at /Users/t442172/.rvm/src/ruby-3.1.2/vm.c:1390:13
  21: rb_yield
  22: rb_ary_each
             at /Users/t442172/.rvm/src/ruby-3.1.2/array.c:2522:2
  23: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  24: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  25: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:759:11
  26: rb_vm_exec
  27: invoke_iseq_block_from_c
  28: invoke_block_from_c_bh
             at /Users/t442172/.rvm/src/ruby-3.1.2/vm.c:1390:13
  29: vm_yield_with_cref
             at /Users/t442172/.rvm/src/ruby-3.1.2/vm.c:1427:12
  30: yield_under
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:1969:12
  31: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  32: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  33: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:759:11
  34: rb_vm_exec
  35: invoke_iseq_block_from_c
  36: invoke_block_from_c_bh
             at /Users/t442172/.rvm/src/ruby-3.1.2/vm.c:1390:13
  37: rb_yield
  38: rb_ary_each
             at /Users/t442172/.rvm/src/ruby-3.1.2/array.c:2522:2
  39: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  40: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  41: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:759:11
  42: rb_vm_exec
  43: rb_vm_call0
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:57:12
  44: rb_vm_call_kw
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:302:12
  45: call_method_data
             at /Users/t442172/.rvm/src/ruby-3.1.2/proc.c:2422:12
  46: rb_method_call_with_block_kw
             at /Users/t442172/.rvm/src/ruby-3.1.2/proc.c:2436:12
  47: rb_method_call_pass_called_kw
             at /Users/t442172/.rvm/src/ruby-3.1.2/proc.c:2393:12
  48: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  49: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  50: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:759:11
  51: rb_vm_exec
  52: invoke_iseq_block_from_c
  53: invoke_block_from_c_bh
             at /Users/t442172/.rvm/src/ruby-3.1.2/vm.c:1390:13
  54: rb_yield
  55: rb_ary_each
             at /Users/t442172/.rvm/src/ruby-3.1.2/array.c:2522:2
  56: vm_call0_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:149:15
  57: vm_call0_cfunc
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:163:12
  58: vm_call0_body
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:209:15
  59: rb_vm_call0
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:57:12
  60: rb_vm_call_kw
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_eval.c:302:12
  61: call_method_data
             at /Users/t442172/.rvm/src/ruby-3.1.2/proc.c:2422:12
  62: rb_method_call_with_block_kw
             at /Users/t442172/.rvm/src/ruby-3.1.2/proc.c:2436:12
  63: rb_method_call_pass_called_kw
             at /Users/t442172/.rvm/src/ruby-3.1.2/proc.c:2393:12
  64: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  65: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  66: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:759:11
  67: rb_vm_exec
  68: load_iseq_eval
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:656:5
  69: require_internal
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:1132:21
  70: rb_require_string
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:1223:18
  71: rb_f_require
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:904:12
  72: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  73: vm_call_method_each_type
  74: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  75: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:778:11
  76: rb_vm_exec
  77: load_iseq_eval
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:656:5
  78: require_internal
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:1132:21
  79: rb_require_string
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:1223:18
  80: rb_f_require
             at /Users/t442172/.rvm/src/ruby-3.1.2/load.c:904:12
  81: vm_call_cfunc_with_frame
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3037:11
  82: vm_call_alias
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:3189:12
  83: vm_sendish
             at /Users/t442172/.rvm/src/ruby-3.1.2/./vm_insnhelper.c:4751:15
  84: vm_exec_core
             at /Users/t442172/.rvm/src/ruby-3.1.2/insns.def:778:11
  85: rb_vm_exec
  86: rb_ec_exec_node
             at /Users/t442172/.rvm/src/ruby-3.1.2/eval.c:280:2
  87: ruby_run_node
             at /Users/t442172/.rvm/src/ruby-3.1.2/eval.c:321:30
  88: main
             at /Users/t442172/.rvm/src/ruby-3.1.2/./main.c:47:9
  89: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
fatal runtime error: failed to initiate panic, error 5

With RUST_BACKTRACE=full I get this:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SetLoggerError(())', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pretty_env_logger-0.4.0/src/lib.rs:74:22
stack backtrace:
   0:        0x10d4621ba - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hae51cb91d407e2ef
   1:        0x10d219f6b - core::fmt::write::h746bc0969202388b
   2:        0x10d43feec - std::io::Write::write_fmt::h4098c2c7437a0bd7
   3:        0x10d465eda - std::sys_common::backtrace::print::h8360bf0158e89b36
   4:        0x10d465b01 - std::panicking::default_hook::{{closure}}::hedf04c568eb6e0bc
   5:        0x10d466b36 - std::panicking::rust_panic_with_hook::h22edd02828aff274
   6:        0x10d466635 - std::panicking::begin_panic_handler::{{closure}}::h6895f44a9b7e2caa
   7:        0x10d466599 - std::sys_common::backtrace::__rust_end_short_backtrace::h013519e9b77978c5
   8:        0x10d466582 - _rust_begin_unwind
   9:        0x10d4a9dc3 - core::panicking::panic_fmt::h2a51b60c12d11322
  10:        0x10d4aa0c5 - core::result::unwrap_failed::h52a6a55d409027df
  11:        0x10d1f2efd - _initialize_logging
  12:     0x7ff825e4d8c2 - <unknown>
  13:     0x7ff825e4d214 - <unknown>
...

The rest is the same backtrace as before, but with addresses added.

Looks like the code is calling:
pretty_env_logger::init_timed();

I checked the source of that, and internally it's calling the try_init_timed() function, which returns a Result<(), log::SetLoggerError>, then it's just calling unwrap() which panics unless the result was successful. Unfortunately, the call to try_init_timed() failed, and we threw away the failure result that said why it failed when we just called unwrap().
It might be better to call pretty_env_logger::try_init_timed() and then check for a successful or failed result, and report the failure somehow if the result failed.

I checked the new version that came out on April 15, and it still has the same issue.

This is probably caused by the multiple pyroscope initialization attempts.
We should fix this


data-turbo-method ignored when data-turbo-frame is set

Hi folks, thanks for Turbo! I'm feeling the joy of server-side webdev like its 2005 again.
However, I've hit a snag with using data-turbo-method and data-turbo-frame at the same time:

I can use  to POST within a turbo frame, as expected
I can use  to update the turbo frame from outside

I CANNOT use

Here is a JSFiddle demonstrating the issue:
https://jsfiddle.net/6kvyxLmf/
As you can see, when data-turbo-frame is set, all the fetch methods are made with GET, not the method specified in data-turbo-method. Shall I proceed with a PR?

cc @seanpdoyle

@botandrose was this resolved by https://github.com/hotwired/turbo/pull/631#issuecomment-1186256417? This test case in particular seems to reproduce your issue:
https://github.com/hotwired/turbo/blob/f8a94c5f761c4f080d68a87459d3916eb4fb6993/src/tests/fixtures/form.html#L302
https://github.com/hotwired/turbo/blob/f8a94c5f761c4f080d68a87459d3916eb4fb6993/src/tests/functional/form_submission_tests.ts#L901-L907

@seanpdoyle Confirmed! I just switched from my hacked fork to 7.2.0-beta.2, and everything works!
Thanks again for your efforts here, and on Turbo in general.Turbo and import maps reaffirm that my job doesn't have to be Node and Webpack and React, so that means I'll continue to enjoy it :)


Git Backup Repository by configuration parameter backup-uri use a backup git repository

Hi!
as already mentioned in the issue https://github.com/spring-cloud/spring-cloud-config/issues/617 we need a backup repository in worst case or if our bitbucket is not available and we do not already have a local copy of the remote repository.
We use the spring cloud Finchley SR2 release at the moment.
For that I created a new config param called backup-uri

That uri is used if the base uri is not working for the git checkout. After that a flag called backupRepoInUse is set. After a cool down timeout of 1 min the checkout will be retried by clone base dir.
the retry is implemented by
clone = this.gitFactory.getCloneCommandByCloneRepository()
                    .setURI(getBackupUri()).setDirectory(getBasedir());
            configureCommand(clone);

if an exception happened.
This is certainly not the best solution and you have to make sure that the data in the backup repository is up to date but it helps us a lot in our case of emergency
 private Git createGitClient() throws IOException, GitAPIException {
        File lock = new File(getWorkingDirectory(), ".git/index.lock");
        if (lock.exists()) {
            // The only way this can happen is if another JVM (e.g. one that
            // crashed earlier) created the lock. We can attempt to recover by
            // wiping the slate clean.
            logger.info("Deleting stale JGit lock file at " + lock);
            lock.delete();
        }

        if(backupRepoInUse){
            logger.info("We are running on the backup repo origin...");
        }

        // When we use the backup repo we try to check out the main repo after the cool down
        if (backupRepoInUse &&  (System.currentTimeMillis() - backupInUseTimestamp > mainRepoCheckCoolDown)) {
            logger.info("Retry to get the main repo running...");
            return copyRepository();
        } else if (new File(getWorkingDirectory(), ".git").exists()) {
            return openGitRepository();
        } else {
            return copyRepository();
        }
    }

    private Git cloneToBasedir() throws GitAPIException {
        CloneCommand clone = this.gitFactory.getCloneCommandByCloneRepository()
                .setURI(getUri()).setDirectory(getBasedir());
        configureCommand(clone);
        try {
            Git call = clone.call();
            backupRepoInUse = false;
            return call;
        } catch (GitAPIException e) {
            logger.warn("Error occured cloning to base directory.", e);
            // try with backup uri
            if (getBackupUri() == null || getBackupUri().isEmpty()) {
                deleteBaseDirIfExists();
                throw e;
            }
            clone = this.gitFactory.getCloneCommandByCloneRepository()
                    .setURI(getBackupUri()).setDirectory(getBasedir());
            configureCommand(clone);
            try {
                Git call = clone.call();
                backupRepoInUse = true;
                backupInUseTimestamp = System.currentTimeMillis();
                return call;
            } catch (GitAPIException e2) {
                logger.warn("Error occured cloning backup to base directory.", e2);
                deleteBaseDirIfExists();
                throw e2;
            }
        }
    }

Maybe we can see a similar feature in the future or this helps others.

@matzegebbe Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


[feature] add setting to show watched price / any other filter in overview..

Version and OS
Docker
Describe the solution you'd like
When a price element is watched, it would be helpfull to se the price in the overview page in the table in between website and last checked. That way it's easy to tell what webpage has the lowest price without having to go through them one by one.
Describe the use-case and give concrete real-world examples
Exampel showen in image below

solved in https://github.com/dgtlmoon/changedetection.io/pull/2041


Failed to decode progressive JPEG

I encountered spectral selection is not allowed in non-progressive scan Error.
convert command in Linux displayed Invalid SOS parameters for sequential JPEG warning but the image was generated successfully.
The images are generated by these hardwere in my case

samsung SCV36
samsung SC-02G
samsung SC-05G

may be relevant

https://github.com/image-rs/image/issues/738
https://stackoverflow.com/questions/48653584/cannot-load-jpeg-with-java-created-by-samsung-phone

Can you provide an image that triggers the error ? If possible, the image should not be copyrighted  so that it can be redistributed freely with the test data for this repository.

@lovasoa
Sorry, i can't do it because images that the problem occurs are owned by owner customer.
I looking for user of those hardware in my company but probably not present.

I had the same issue with one specific image from my collection. This picture has been taken with a Samsung Galaxy J3 (SM-J320FN).
Version: jpeg-decoder = "0.1", compiled with Rust 1.36.0
Code:
fn main() {
    let file = File::open("/home/enz/Images/bug_imgrust.jpg").expect("failed to open file");
    let mut decoder = jpeg::Decoder::new(BufReader::new(file));
    let pixels = decoder.decode().expect("failed to decode image");
    let metadata = decoder.info().unwrap();
}

Error:
thread 'main' panicked at 'failed to decode image: Format("spectral selection is not allowed in non-progressive scan")', src/libcore/result.rs:999:5

For this particular image of my collection, the identify -verbose command complains with the following message:
identify-im6.q16: Invalid SOS parameters for sequential JPEG `/home/enz/Images/bug_imgrust.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.

I don't know if that SOS stuff can have a relationship with the present problem. Maybe it's just a coincidence, but just in case, it can be worth mentioning.
I can send you the picture by email (I appear in this photo).

Finally I find image which cause this error - 20190821_154545.jpg.zip

Finally I find image which cause this error - 20190821_154545.jpg.zip

+1 -- we're seeing this in our app, too.


Determine how to extract HDFS Files for the Pilot Study

The HDFS files need to be extracted from the containerized HDFS Cluster (volumes).

see README c3b89b013e2558548890591de3031aaeb12ed069  dcompose-stack/radar-cp-hadoop-stack.

Solved with c3b89b013e2558548890591de3031aaeb12ed069


zfs: Fix systemd warning

The zfs-share service was trying to execute the rm binary, but it
was providing an invalid /bin path.
This should fix #8171.

cc @edolstra

Thanks!


ENH: Add UniFrac as a dependency

Thanks!
On (Sep-22-17|21:37), Evan Bolyen wrote:

Merged #144.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/qiime2/q2-diversity/pull/144#event-1262012736


fix: [#4470] Migrate off @azure/ms-rest-js

#minor
Description
This PR replaces the uses of @azure/ms-rest-js in the following botbuilder-js libraries.

[x] botbuilder
[ ] botbuilder-ai
[x] botframework-connector
[ ] tool

Specific Changes

Replaced the @azure/ms-rest-js imports with @azure/core-http.
Added @azure/core-http to libraries package.json.
Added @azure/core-util version 1.5.0 to resolutions.
Updated unit tests to work with core-http RestError.

Testing
The following image shows some samples working after the update.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

240 of 242 (99.17%)  changed or added relevant lines in 21 files are covered.
88 unchanged lines in 7 files lost coverage.
Overall coverage decreased (-0.4%) to 84.442%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

libraries/botframework-connector/src/auth/tokenCredentials.ts
11
12
91.67%

libraries/botframework-connector/src/tokenApi/tokenApiClientContext.ts
3
4
75.0%

Files with Coverage Reduction
New Missed Lines
%

libraries/botbuilder-lg/src/templateExtensions.ts
1
84.48%

libraries/botframework-streaming/src/utilities/createNodeServer.ts
1
78.57%

libraries/botframework-connector/src/tokenApi/operations/botSignIn.ts
2
80.0%

libraries/botframework-connector/src/connectorApi/operations/conversations.ts
4
87.88%

libraries/botframework-streaming/src/namedPipe/namedPipeServer.ts
12
50.68%

libraries/botframework-streaming/src/namedPipe/namedPipeClient.ts
17
34.09%

libraries/botframework-streaming/src/namedPipe/namedPipeTransport.ts
51
3.92%

Totals

Change from base Build<PHONE_NUMBER>:
-0.4%

Covered Lines:
20199

Relevant Lines:
22658

💛  - Coveralls

Promoted /4578


Possibility to access vm running Docker

Is your feature request related to a problem? Please describe.
It's a feature request. Currently, when a user wants to access the VM running Docker, a container with host PID, host IPC, host network must be started. An example is:
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: ubuntu
  labels:
    app: ubuntu
spec:
  # Uncomment and specify a specific node you want to debug
  # nodeName: <insert-node-name-here>
  containers:
  - image: ubuntu
    command:
      - "sleep"
      - "3600"
    imagePullPolicy: IfNotPresent
    name: ubuntu
    securityContext:
      capabilities:
        add: ["NET_ADMIN", "SYS_ADMIN"]
      runAsUser: 0
  restartPolicy: Never
  hostIPC: true
  hostNetwork: true
  hostPID: true
EOF

Describe the solution you'd like
It would be amazing to have a shorter way, something like ssh docker
Describe alternatives you've considered
Additional context

What's your use case? The vast majority I've seen are relying on undocumented implementation details of OrbStack that could change at any time, or are poor workarounds for something that should be done in OrbStack itself. For the few legitimate use cases I usually refer people to the long form.

We can close it. I found out that the config is not persisting around restarts of orbstack. Thus I reconfigured my setup to use docker on a separate VM, which is persistent around restarts. Now I wonder if there's a way to disable the VM that docker runs on to safe some resources.


Update auxlib, javalib, nativelib, ... to 0.4.1

Updates

org.scala-native:auxlib
org.scala-native:javalib
org.scala-native:nativelib
org.scala-native:sbt-scala-native
org.scala-native:scalalib
org.scala-native:test-interface

from 0.4.0 to 0.4.1.
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!

Files still referring to the old version number
The following files still refer to the old version number (0.4.0).
You might want to review and update them manually.
website/yarn.lock

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-native" } ]

labels: library-update, semver-patch, old-version-remains

Superseded by #100.


NonSpecific Search Holes

[ ] Inability to handle high RAM requirements
[ ] Expand to CalibrationTask
[ ] Expand to GPTMD Task
[ ] Terminal modifications  for the unknown terminus are not currently searchable
[ ] Hacky tolerance generation/failed generation if more than two search modes selected

I am also curious about finding out exactly how this new search compares with non-specific enzyme searches. Not just in terms of time but also in search result quality

Summary.xlsx

So classic non-specific searches are a tiny bit better in terms of PSMs within 1% FDR, as I would expect. But speed improvement is huge with the specialized search!


Suggestion: Try convert installation before upgrade-assistant installation

Hi,
Instead of manually installing try-convert prior to upgrade-assistant, is it possible to automatically install the required version of try-convert as well when a user installs upgrade-assistant?
Not sure how easy or hard it is to do.
Just a suggestion.

Sorry for creating an issue. Couldn't find the discussion forum

Thanks for the suggestion, @vvijayalakshmi21. This is something we've talked about but haven't found a good way to do in the past. I think @sunandabalu was looking into possibilities for chaining the installers. Ideally we would have the Upgrade Assistant install automatically install try-convert as a separate tool but we need to spend more time investigating the feasibility of that.

Yep I'm looking into adding try-convert as a dependency to be able to bundle together with upgrade-assistant, #178 is tracking that effort.

Closing as this is covered by #178


free-5000eth.com

Twitter phishing, claiming ether giveaway.

https://urlscan.io/result/92ceea90-3cc4-4afc-9d1e-ab0a2066fcaa/#summary
address: 0xb1FaCA3Ef83134815C3e28899Cb132e019EB6616


Fine-tuning and weights

Dear Wenyi, I recently came across your research and was very impressed with your work. However, I noticed that the code for fine-tuning the model on a real dataset and the model weights weren't included. Could you kindly share these resources with us who are interested in implementing your method? Thank you for considering my request.

Hi, sorry the late reply.  I can't provide the pretrained weights since I don't have the access to my master's school server. But  you can easily retrain the model to get the results.


fix: avoid feedback loop with shifted series

Closes: https://github.com/zakodium/react-plot/issues/357
For now, the bug is "fixed" by not applying the shift to the axis' min/max anymore.
I think we should discuss what is the expected behavior with a few simple cases and then implement the final min/max calculation inside the plot context, so the series cannot trigger infinite rerenders.

Here's a simple example where we can discuss expected behavior: https://deploy-preview-358--react-plot.netlify.app/?path=/story/examples-shift--single-series-example

First question: should the shift push min and max, or only extend one end?
For example with xShift:1:

push min and max -> min=0, max=5
extend one end -> min=-1 (unchanged), max=5

while calculating the new max/min after shift
if the shift is a number => theres not calculation using plot size => optimised
the problem is when shift is a percentage or in px

i tried spectrum using shift as a number
          xShift={i * 0.01}
          yShift={i * 10000000}

and it works

i think https://github.com/zakodium/react-plot/issues/362 is due to the same problem
adding this in convertToPx will help optimising plots without shifts
if (scale === undefined || value === '0' || value === 0) return 0;

i searched in old PR
i found that this story is crushing before adding shifts
release 0.16.0  https://github.com/zakodium/react-plot/pull/313
https://deploy-preview-313--react-plot.netlify.app/?path=/story/experimental-spectra-nmr--stack-spectra

but we  still can see the diffrence between
our version now :
https://zakodium.github.io/react-plot/?path=/story/experimental-spectra-nmr--stack-spectra
before shift : https://github.com/zakodium/react-plot/pull/311
https://deploy-preview-311--react-plot.netlify.app/


[aes, kmac, doc] Replace term aggravate in SCA/FI context, fix broken links

See individual commit messages for details, please.

Thanks for the doc fixes @vogelpi.


Question: How to use TypeScript to write the custom extractor?

This is the very simple and minimum extractor code:
module.exports = function extrator(code: string) {
  return {
    keys: [{ keyName: 'hi', line: 1 }],
    warnings: []
  }
}

And this is the .tolgeerc file
{
// ... etc
"extractor": "./src/config/tolgee/tolgee-extractor.ts"
}

When running any command on the CLI, I get this error:
┬─[~@~:~/D/p/s/~]─[10:18:18 PM]─[G:v1-dev>]
╰─>$ tolgee compare                                                                                22:18:18
🐭🔴     Analyzing code...
🔴 An unexpected error occurred while running the command.
🔴 Please report this to our issue tracker: https://github.com/tolgee/tolgee-cli/issues
🔴 Unknown file extension ".ts" for /~/src/config/tolgee/tolgee-extractor.ts
┬─[~@~:~/D/p/s/~]─[10:18:41 PM]─[G:v1-dev>]
╰─>$

I read the documentation here, it's only written that in order to use TypeScript, just add ts-node to your project, I did that already:
$ pnpm add -D ts-node

But I am still getting the same error 🙁

Hey, unfortunately it wasn't a reliable solution. I'll remove it from docs for now.

So for now we need to use .js, .mjs or .cjs files. And Typescript will not be supported.
Or we'll transpile the extractor file (build it) and then use it in the cli.

Yep, exactly. I'm sorry for confusion.


How ReportStream started content

User story
As a ReportStream prospective/current user, I want the website content to be up-to-date, accurate and timely so I can  trust the information to inform my decisions in my relationship with ReportStream.
Background & context
About page draft was reviewed and some ongoing work was needed to refine the story of how ReportStream started.
Open questions
N/A
Working links

About: Page draft

Acceptance criteria

[ ] Drafted finalized and reviewed with content owner and/or SME
[ ] Capture questions that come up during the content and design work in the Website redesign research plan

content approved: new doc


Unset ZDOTDIR before standard scripts run and add VSCODE_SHELL_INTEGRATION

Fixes #145587
Fixes https://github.com/microsoft/vscode/issues/145583
Fixes https://github.com/microsoft/vscode/issues/145582

Would it be possible to suppress the message? I don't think it's worth keeping it even with an option. In general, shells don't print things during initialization.

@romkatv I understand your perspective, but then shell integration silently fails and that would result in "bugs" getting reported to us forever. We could have the line be a link with a hover that includes some documentation explaining it?

My goal is for shell integration in vscode to work with powerlevel10k. If it worked out of the box, I would be more than happy. Unfortunately, it doesn't work and I don't think it's feasible to fix that from within vscode. Here are some of the features of powerlevel10k that pose a challenge when it comes to shell integration:

Instant prompt
Show on command
Transient prompt
Current directory that just works

Powerlevel10k support shell integration with terminals that respect OSC 133 and/or OSC 7. I can implement support for the protocol used by vscode, too (although I would very much prefer if vscode used OSC 133; FWIW, I don't see any feasibly extensions to that protocol that could give any additional functionality to zsh users). The logic I'm envisioning is as follows.
When powerlevel10k sees VSCODE_SHELL_INTEGRATION=1 during initialization, it unsets this variable and enables shell integration according to the protocol used by vscode.
This will work fine but unfortunately vscode will print a misleading message saying that shell integration is disabled. I see two ways how I can work around this issues. If instant prompt is enabled, stdout is already redirected to a file, so I can find this message and remove it. If intant prompt is not enabled, I can replace echo with a function that will special-case the message and do avoid printing it. Both of these are ugly hacks.
Would it be possible to not print the message?

When powerlevel10k sees VSCODE_SHELL_INTEGRATION=1 during initialization, it unsets this variable and enables shell integration according to the protocol used by vscode.

Oh I see, I thought you would be disabling it outright. That sounds great, in that case we'll exit the script without warning and instead warn to the devtools console which is only visible if the user is investigating a problem.
If you wanted to adopt the sequences as described below, the chances they will change is pretty low.
https://github.com/microsoft/vscode/blob/97d358236cd332ea6d2308c32dd44d39fc07a9b5/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts#L52-L116
Comments on some of them:

CommandLine = 'E' - This is currently only used for pwsh and the behavior when used on non-Windows is somewhat undefined right now. We'll support this on Linux/macOS if we need it for more reliable command extraction
Property = 'P' - Here are the current properties, you'll want to send OSC 633 ;Cwd=/path/in/this/format ST on each prompt. If you want sending it only when it changes should be sufficient. It's not necessary to send IsWindows as we assume non-Windows hosts by default.

https://github.com/microsoft/vscode/blob/97d358236cd332ea6d2308c32dd44d39fc07a9b5/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts#L52-L116

Comments on some of them:

CommandLine = 'E' - This is currently only used for pwsh and the behavior when used on non-Windows is somewhat undefined right now. We'll support this on Linux/macOS if we need it for more reliable command extraction

I'm positive that it's impossible to extract the command line from Zsh Line Editor (zle) in general. I hope you can support this on Linux.

Property = 'P' - Here are the current properties, you'll want to send OSC 633 ;Cwd=/path/in/this/format ST on each prompt. If you want sending it only when it changes should be sufficient.

How should I escape \007 in cwd? (I see that your code doesn't escape it; you probably want to fix that.)
What about SSH? If I send cwd from the remote host, will vscode mistakenly treat it as if this was cwd from the local host?
Other terminals solve this problem by requiring hostname to be supplied together with cwd.

I'm positive that it's impossible to extract the command line from Zsh Line Editor (zle) in general. I hope you can support this on Linux.

On pwsh we use Get-History to do this, history in zsh seems to give the full entry with \n replacing new lines. You can only get this once the command has finished running but that's a fine compromise if it's very accurate.

How should I escape \007 in cwd? (I see that your code doesn't escape it; you probably want to fix that.)

Good call, this is how we escape the command line sequence:
https://github.com/microsoft/vscode/blob/97d358236cd332ea6d2308c32dd44d39fc07a9b5/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts#L164-L166
Following this I guess we can do  for now to align with that. This was a temporary/good enough solution to get things up and running but if you have a more robust idea for escaping we can make those improvements soon.

What about SSH? If I send cwd from the remote host, will vscode mistakenly treat it as if this was cwd from the local host?

Well subshell support isn't there currently and how to handle that was going to get figured out there. We assume all terminals are "local" to the window currently (which may be remote depending on the type of window). For subshells my thinking was to add a unique shell id sequence to every prompt so we are able to detect when each shell starts and begins, including ones on the same hostname.
We also have a special way of defining URIs for remote connected windows which we may use to be able to identify files that are available in the workspace, eg. vscode-remote://wsl+ubuntu/home/daniel/
Currently the cwd feeds into the tab's title as well as resolving links relative to it, if you send cwd for an SSH the folder in a tab should show up like this as I don't think it's validated against the FS:

The only other side effect is that links clicked in the terminal will try resolve which shouldn't cause much harm.
So if you're able to hook into ssh sessions and integrate with them you can either do nothing until we get https://github.com/microsoft/vscode/issues/144358 done or send them as normal paths.

I understand that it makes your life easier in the short term. Users of your software have different incentives though.

How good of a solution it is depends on how successful we are in making our script the defacto script where all you need to do to get shell integration is to make sure the script runs. powerlevel10k certainly poses some special challenges because of its complexity though. As I mentioned before we're trying to get this enabled by default eventually so a huge amount of users who have not yet configured their shell get to experience the feature with zero config, even if their shell has zero customizations.
We also want more capabilities than the existing finalterm/iterm2 shell integration sequences allow, this is essential to get it working on Windows as we're in brand new territory there having rich pwsh integration on Windows and we want to keep our options open. I can imagine we will be adding more sequences over time to add more capabilities. If we accept existing shell integration used by other terminals that will inevitably lead to flaky and inconsistent results. For example one of the end goals of shell integration is to get native autocomplete and we may need special sequences to make that feature really shine.
We also have the option if it would help to add some special handling to our script for any shell or powerlevel10k if that's useful.

The user doesn't see or deal with the tree.

Yeah you might have convinced me, bit busy to think it through thoroughly atm. I'll make some notes on https://github.com/microsoft/vscode/issues/144358

How good of a solution it is depends on how successful we are

I'll buy that. If your new shell integration protocol allows you to implement new cool features, then it's justified. I don't know which features you could implement that cannot be implemented on top of OSC 133 (plus potentially an extension to send the command line) but I'll be happy to see them. The current version of zsh integration in vscode doesn't have anything that cannot be done with OSC 133 and OSC 7 though.

As I mentioned before we're trying to get this enabled by default eventually so a huge amount of users who have not yet configured their shell get to experience the feature with zero config

Zsh users on Windows don't run with empty zshrc. They all have user rc files. It's really easy for them to clone a git repo and source a file from it. They all know how to do it. Having the terminal injecting code into shell is something most users never expect to happen though. Given that shell injection from the terminal cannot be made to work reliably, you'll want to provide a git repo with a standalone file at some point. Once you do that, consider removing shell injection altogether. Instead, you can add a button that modifies ~/.zshrc. This would be in line with how zsh ecosystem works.

Once you do that, consider removing shell injection altogether. Instead, you can add a button that modifies ~/.zshrc. This would be in line with how zsh ecosystem works.

Our approach is somewhat atypical as most terminals are opt-in with an install step. If I remember right kitty auto installs it and some of the feedback they got was that it's intrusive, which I agree with, so we were trying to be as unintrusive as possible. As soon as you have a manual step the amount of users that would engage with the feature would drop significantly. This is an important part of why we too this approach, we want it to just work for the majority of users and fail unobtrusively for more advanced cases. Imagine connecting VS Code to a container or a new machine, opening a terminal and shell integration/autocomplete just works with zero config, that's the vision.
In the off chance that shell integration fails to inject before the shell starts, or the shell disables it, or something else goes wrong, we want to fail early and continue, then the user has the option to disable injection all together and go with the manual setup route we'll provide https://github.com/microsoft/vscode-docs/issues/5219

This discussion is all super valuable so thank you so much for that! It was probably obvious that I'm not that familiar with zsh, I'm mostly a bash and pwsh user these days. The more we chat, the more I think that it's probably not ready for you to try to integrate since things are still in flux. The best approach to make sure you don't waste time is to just force disable shell integration with our new environment variable and then revisit in a few months?

If I remember right kitty auto installs it and some of the feedback they got was that it's intrusive

Kitty is the only other terminal that does what vscode does -- shell injection via ZDOTDIR override. And yes, it's intrusive. As a member of zsh community I cannot stress enough how negatively this approach is perceived. It looks as abuse of power by the terminal and a violation of the established contract. It's not the job of the terminal to inject code into shell, especially when the same result can be accomplished via the existing means.

This is an important part of why we too this approach, we want it to just work for the majority of users

This is a noble goal but I doubt it's achievable. If integration works only until the user restarts shell with exec zsh, users won't be able to rely on it being there and won't establish habits that utilize shell integration. If I'm to start using a shortcut that copies the output of the last command into clipboard or opens it in $PAGER, I'll want that shortcut to actually work rather than be best effort.
I think I've made my opinion clear. It's your product, so your choice of course.

The best approach to make sure you don't waste time is to just force disable shell integration with our new environment variable and then revisit in a few months?

That sounds good to me. Feel free to @-mention me on anything related to integration with zsh.


Add React Toast for Not Logged in users in Projects

When clicking on /projects in navbar, when user is not logged in, it redirects to /login page where it should show a React Toast saying "You must be logged in to view the projects""

@abhinandanwadwa Have assigned you


Fix path to tests/unit/

There was 1 error:

1) OCA\ScienceMesh\Tests\Unit\Controller\PageControllerTest::testIndex
Method ReflectionParameter::isArray() is deprecated

/var/www/html/apps/sciencemesh/tests/unit/controller/PageControllerTest.php:17

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
make: *** [Makefile:154: test] Error 2

So that suggests that at least the tests are running! :)

CC @Triantafullenia-Doumani


[flexible-ipam] Use uplink interface name for host interface internal port

Use uplink interface name for host interface internal port, to support DHCP client.
Add a suffix to uplink when bridging to OVS bridge.
Signed-off-by: gran<EMAIL_ADDRESS>

Codecov Report

Merging #3938 (c42467c) into main (4cec650) will decrease coverage by 15.31%.
The diff coverage is 19.43%.

@@             Coverage Diff             @@
##             main    #3938       +/-   ##
===========================================
- Coverage   63.92%   48.60%   -15.32%
===========================================
  Files         293      413      +120
  Lines       43224    60347    +17123
===========================================
+ Hits        27630    29334     +1704
- Misses      13367    28596    +15229
- Partials     2227     2417      +190

Flag
Coverage Δ

integration-tests
35.18% <ø> (?)

kind-e2e-tests
32.33% <29.00%> (-17.94%)
:arrow_down:

unit-tests
44.50% <7.69%> (-0.08%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/agent/agent_linux.go
0.00% <0.00%> (-5.56%)
:arrow_down:

pkg/agent/cniserver/pod_configuration.go
50.97% <0.00%> (-3.63%)
:arrow_down:

pkg/agent/config/node_config.go
100.00% <ø> (ø)

pkg/agent/controller/traceflow/packetin.go
12.93% <0.00%> (-50.56%)
:arrow_down:

pkg/agent/controller/trafficcontrol/controller.go
71.55% <0.00%> (-10.67%)
:arrow_down:

pkg/agent/openflow/client.go
54.91% <0.00%> (-12.98%)
:arrow_down:

pkg/agent/openflow/multicast.go
0.00% <0.00%> (ø)

pkg/agent/openflow/pipeline_other.go
0.00% <0.00%> (-4.00%)
:arrow_down:

pkg/agent/util/net.go
25.75% <0.00%> (-26.20%)
:arrow_down:

pkg/agent/util/net_linux.go
29.16% <0.00%> (-5.03%)
:arrow_down:

... and 248 more

/test-all
/test-flexible-ipam-e2e

/test-all
/test-flexible-ipam-e2e

/test-all
/test-flexible-ipam-e2e

/test-all
/test-flexible-ipam-e2e

/test-e2e

/test-flexible-ipam-e2e

/test-flexible-ipam-e2e

/test-all
/test-flexible-ipam-e2e

/test-flexible-ipam-e2e

/test-all
/test-flexible-ipam-e2e

/test-e2e

/test-windows-all
/test-ipv6-all
/test-ipv6-only-all
/test-multicluster-e2e

/test-hw-offload

/test-hw-offload
/test-ipv6-all
/test-multicluster-e2e
/test-flexible-ipam-e2e

/test-all
/test-flexible-ipam-e2e

/test-all-features-conformance

/test-ipv6-all
/test-ipv6-only-all
/test-windows-all
/test-multicluster-e2e

@wenyingd @tnqn @jianjuns Any more comments?

Guess the problem is we may potentially have multiple uplinks. @wenyingd
But why we must allocate the port in advance, rather than let CreatePort() return a OFPort?

The workflow that allocating an OF port first then consuming it but not creating OVS port directlly is not about multiple uplink support, it is existing only in AntreaIPAM, because we need the expected uplink OF port number in the OpenFlow pipeline init stage to install many flows which is not per Pod perspective, but the uplink interface is attached to OVS after this stage, accurately, it should be performed when the flow-restored flag is set as true.
For VM support or Windows cases, we don't have this additional requirement.

/test-all
/test-flexible-ipam-e2e

/test-ipv6-all
/test-ipv6-only-all
/test-windows-all
/test-multicluster-e2e

The workflow that allocating an OF port first then consuming it but not creating OVS port directly is not about multiple uplink support

The original question from Quan is whether we can use pre-defined constant OFPort for the host interface. And I guess one reason we do not do that is because we may support multiple uplinks later?

it is existing only in AntreaIPAM, because we need the expected uplink OF port number in the OpenFlow pipeline init stage to install many flows which is not per Pod perspective, but the uplink interface is attached to OVS after this stage, accurately, it should be performed when the flow-restored flag is set as true.

I did not remember the code well, but can we change the order to create the host port first? @wenyingd @gran-vmv

The workflow that allocating an OF port first then consuming it but not creating OVS port directly is not about multiple uplink support

The original question from Quan is whether we can use pre-defined constant OFPort for the host interface. And I guess one reason we do not do that is because we may support multiple uplinks later?

it is existing only in AntreaIPAM, because we need the expected uplink OF port number in the OpenFlow pipeline init stage to install many flows which is not per Pod perspective, but the uplink interface is attached to OVS after this stage, accurately, it should be performed when the flow-restored flag is set as true.

I did not remember the code well, but can we change the order to create the host port first? @wenyingd @gran-vmv

We can use a pre-defined constant OFPort for the host interface, but this is not best practice since Wenying already added support for dynamic OFPort for HostInterface/Uplink port, and a constant may conflict with existing OFPort. (e.g. User created many regular Pods and then enable FlexibleIPAM)
Previously we create BridgePort (br-int) as HostInterfacePort and it works well. However, since we need to change the BridgePort to an InternalPort with same name as Uplink, we can only create this port after Uplink is renamed.
The process is:

Occupy OFPortID for Uplink/HostInterfacePort
[not-this-PR] Init OVS flows
[not-this-PR] Release flow-restore-wait flag (Important!)
Rename Uplink and create Uplink OVS port (eth0->eth0~, then create eth0~ port)
Create OVS port for HostInterface (create eth0 port on OVS with same MACAddress)
[not-this-PR] Run CNIServer

Occupy OFPortID for Uplink/HostInterfacePort
[not-this-PR] Init OVS flows
[not-this-PR] Release flow-restore-wait flag (Important!)
Rename Uplink and create Uplink OVS port (eth0->eth0~, then create eth0~ port)
Create OVS port for HostInterface (create eth0 port on OVS with same MACAddress)
[not-this-PR] Run CNIServer

I meant can we change to:

Rename Uplink and create Uplink OVS port (eth0->eth0~, then create eth0~ port)
Create OVS port for HostInterface (create eth0 port on OVS with same MACAddress)
[not-this-PR] Init OVS flows
[not-this-PR] Release flow-restore-wait flag (Important!)
[not-this-PR] Run CNIServer

If we have to reserve OFPorts, I suggest to move the func into OVSBridgeClient, and maintain allocated OFPorts there, to simplify the caller side.

I meant can we change to:

Rename Uplink and create Uplink OVS port (eth0->eth0~, then create eth0~ port)
Create OVS port for HostInterface (create eth0 port on OVS with same MACAddress)
[not-this-PR] Init OVS flows
[not-this-PR] Release flow-restore-wait flag (Important!)
[not-this-PR] Run CNIServer

If we have to reserve OFPorts, I suggest to move the func into OVSBridgeClient, and maintain allocated OFPorts there, to simplify the caller side.

We cannot change the sequence since antrea-agent is unable to access K8s apiserver after step 1, but this access is required by some other steps in initialization.
I'll move this func to OVSBridgeClient.

/test-all
/test-flexible-ipam-e2e

/test-all
/test-flexible-ipam-e2e

/test-all

/test-all
/test-flexible-ipam-e2e

/test-e2e
/test-networkpolicy

/test-all-features-conformance

/test-windows-all
/test-ipv6-all
/test-ipv6-only-all
/test-multicluster-e2e

/test-all
/test-flexible-ipam-e2e
/test-windows-all
/test-ipv6-all
/test-ipv6-only-all
/test-multicluster-e2e

/test-all
/test-flexible-ipam-e2e
/test-windows-all
/test-ipv6-all
/test-ipv6-only-all
/test-multicluster-e2e

/test-flexible-ipam-e2e
/test-networkpolicy

/test-networkpolicy


Color objects should be accepted wherever an API takes a color string

Phaser has a color object Phaser.Display.Color but many (most?) of the APIs that accept colors assume the color is formatted as a string and you cannot pass a color object instance to them. I first noticed this with TextStyle's fill and stroke color properties, but it appears to be a common pattern throughout the codebase. There's an easy workaround, of course, which is to use the rgba property of the color instance in this case, but that feels wrong to have to do all the time. I think the various color APIs should be audited and updated to accept either a string or a Color object.

Hi, I'm going to spend my time on this problem

Thank you for opening this feature request (all those months ago!). As the development of Phaser 4 has now started I am tidying-up the repo and closing off old issues that won't be directly fixed or implemented in Phaser 3 by me. I would still consider community PRs that address this issue, however, and have left the GitHub tags intact so others can track them if they wish to get involved. However, I'm afraid this is no longer a feature that will be added to v3.


How to use nested Menu

How to use nested menu? I see 'children' in the SidebarItem.vue but It doesn't work.

How to use nested menu? I see 'children' in the SidebarItem.vue but It doesn't work.

Have you found a solution to this problem?

Still waiting for an example on this one :s

Hi, guys! Thanks for using our products. The nested child is a feature that is present in the PRO version.
Regards,
Dragos


New user: failed to connect to bus

Bug description
I changed the username according to the documentation but the new user has some permission problems the old user didn't have.
To Reproduce

Import fresh NixOS WSL tarball from the newest release
Change the username according to the documentation
Run sudo nixos-rebuild switch

Logs
[rasmus@nixos:~]$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
activating the configuration...
setting up /run/booted-system...
setting up /etc...
setting up /bin...
setting up /bin/login...
setting up /sbin/init shim...
reloading user units for rasmus...
Failed to connect to bus: Permission denied
Failed to connect to bus: Permission denied
restarting sysinit-reactivation.target
the following new units were started: local-fs.target, sysinit-reactivation.target, systemd-timesyncd.service, systemd-tmpfiles-resetup.service, systemd-tmpfiles-setup.service, systemd-update-utmp.service

compared to
[nixos@nixos:~]$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
activating the configuration...
setting up /run/booted-system...
setting up /etc...
setting up /bin...
setting up /bin/login...
setting up /sbin/init shim...
reloading user units for nixos...
restarting sysinit-reactivation.target

WSL version

WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>-2
WSLg version: 1.0.64
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.4780

Does it work if you restart WSL?

Running wsl --shutdown seems to have no effect.
Changing to flake seemed to work, but I'll have to test it again.

Using the minimal flake I get the following error, I guess I should have run sudo nixos-rebuild boot --flake .#nixos
[rasmus@nixos:~/projects/NixOS]$ sudo nixos-rebuild switch --flake .#nixos
warning: creating lock file '/home/rasmus/projects/NixOS/flake.lock'
building the system configuration...
stopping the following units: logrotate-checkconf.service, nscd.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-resetup.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service
NOT restarting the following changed units: systemd-journal-flush.service, systemd-logind.service, systemd-update-utmp.service, systemd-user-sessions.service<EMAIL_ADDRESS>activating the configuration...
setting up /run/booted-system...
setting up /etc...
removing obsolete symlink ‘/etc/samba/smb.conf’...
setting up /bin...
setting up /bin/login...
setting up /sbin/init shim...
restarting systemd...
reloading user units for rasmus...
Error: Failed to open dbus connection

Caused by:
    Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
restarting sysinit-reactivation.target
reloading the following units: dbus.service
restarting the following units: nix-daemon.service, systemd-journald.service
starting the following units: logrotate-checkconf.service, nscd.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-resetup.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket
the following new units were started: run-credentials-systemd\x2djournald.service.mount, run-credentials-systemd\x2dsysctl.service.mount, run-credentials-systemd\x2dtmpfiles\x2dresetup.service.mount, systemd-bootctl.socket, systemd-creds.socket, systemd-hostnamed.socket

But after that the command seems to run normally.
[rasmus@nixos:~/projects/NixOS]$ sudo nixos-rebuild switch --flake .#nixos
building the system configuration...
activating the configuration...
setting up /run/booted-system...
setting up /etc...
setting up /bin...
setting up /bin/login...
setting up /sbin/init shim...
restarting sysinit-reactivation.target
the following new units were started: local-fs.target, run-credentials-systemd\x2dtmpfiles\x2dresetup.service.mount, sysinit-reactivation.target, systemd-bootctl.socket, systemd-tmpfiles-resetup.service

My minimal flake
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
  };

  outputs = { self, nixpkgs, nixos-wsl, ... }: {
    nixosConfigurations = {
      nixos = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          nixos-wsl.nixosModules.default
          {
            system.stateVersion = "24.05";
            wsl.enable = true;
            wsl.defaultUser = "rasmus";
          }
        ];
      };
    };
  };
}

Tried with flake again with sudo nixos-rebuild boot --flake .#nixos instead and following the steps from changing the username to ensure the new generation is applied and it seemed to work without any error messages. Feel free to close this if you want since I can continue with this workaround, I was going to switch to flakes anyway.
[rasmus@nixos:~/NixOS]$ sudo nixos-rebuild boot --flake .#nixos
warning: creating lock file '/home/rasmus/NixOS/flake.lock'
building the system configuration...

[rasmus@nixos:~/NixOS]$
logout
PS C:\Users\rasmus> wsl -t NixOS_test
The operation completed successfully.
PS C:\Users\rasmus> wsl -d NixOS_test --user root exit
PS C:\Users\rasmus> wsl -t NixOS_test
The operation completed successfully.
PS C:\Users\rasmus> wsl -d NixOS_test

[rasmus@nixos:~]$ cd NixOS/

[rasmus@nixos:~/NixOS]$ sudo nixos-rebuild switch --flake .#nixos
building the system configuration...
activating the configuration...
setting up /run/booted-system...
setting up /etc...
setting up /bin...
setting up /bin/login...
setting up /sbin/init shim...
restarting sysinit-reactivation.target
the following new units were started: local-fs.target, run-credentials-systemd\x2dtmpfiles\x2dresetup.service.mount, sysinit-reactivation.target, systemd-hostnamed.socket, systemd-tmpfiles-resetup.service

There are no functional differences between flakes and none flakes. You likely used an old version.


[FLINK-18864][python] Support key_by() operation for Python DataStrea…

What is the purpose of the change
Support key_by() operation for Python DataStream API.
Brief change log

Add a new class nemed KeyStream to represent a keyed DataStream.
Add key_by() interface for DataStream.

Verifying this change
This change has test cases covered in test_key_by() and test_key_by_map() in test_data_stream.py
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): ( no)
The public API, i.e., is any changed class annotated with @Public(Evolving): ( no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not documented)

Tests failed.


Remove Liquidity Nested - Single Token

Pending updated router contracts delivered by SC team.
Should use swaps under the hood, since it already supports paths with add/remove liquidity steps.

Doesn't need to be supported at launch. (Can be performed via a swap)


Lock on file when archiving causes severe performance degradation

NLog version: 4.6.7
Platform: .NET 4.5
Current NLog config
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
      autoReload="true"
      throwExceptions="false"
      internalLogLevel="Debug" internalLogFile=".\nlog-internal.log" >

  <variable name="brief" value="${longdate} | ${level} | ${callsite} | ${message}"/>
  <variable name="verbose" value="${longdate} | ${machinename} | ${processid} | ${processname} | ${level} | ${callsite} | ${message}"/>

  <targets>
    <target name="file" xsi:type="File"
            layout="${brief}"
            fileName=".\log.log"
            archiveAboveSize="500000"
            archiveFileName=".\log.{#}.log"
            openFileCacheTimeout="10"
            concurrentWrites="false"
            keepFileOpen="true"
            encoding="iso-8859-1" />
  </targets>

  <rules>
    <logger name="*" minlevel="Info" writeTo="file" />
  </rules>
</nlog>

What is the current result?
When performing heavy logging and archiving occurs while file is locked by other process, all threaded program performance is severely degraded.
What is the expected result?
Little or no loss of program performance when archiver is attempting to archive.
Did you checked the Internal log?
Yes
Please post full exception details (message, stacktrace, inner exceptions)
2019-10-18 12:02:01.3691 Debug FileTarget(Name=file): Do archive file: 'C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.\log.log' 2019-10-18 12:02:01.3691 Info FileTarget(Name=file): Archiving C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\log.log to C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.\log.2.log 2019-10-18 12:02:01.3691 Debug FileTarget(Name=file): Move file from 'C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\log.log' to 'C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.\log.2.log' 2019-10-18 12:02:01.4041 Warn FileTarget(Name=file): Failed to archive file 'C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.\log.log'. Exception: System.IO.IOException: The process cannot access the file because it is being used by another process.  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)  at System.IO.__Error.WinIOError()  at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)  at NLog.Targets.FileTarget.ArchiveFileMove(String fileName, String archiveFileName)  at NLog.Targets.FileTarget.ArchiveFile(String fileName, String archiveFileName)  at NLog.Targets.FileTarget.DoAutoArchive(String fileName, LogEventInfo eventInfo, DateTime previousLogEventTimestamp, Boolean initializedNewFile)  at NLog.Targets.FileTarget.TryArchiveFile(String fileName, LogEventInfo ev, Int32 upcomingWriteSize, DateTime previousLogEventTimestamp, Boolean initializedNewFile) 2019-10-18 12:02:01.4041 Debug Creating file appender: C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.\log.log 2019-10-18 12:02:01.4041 Debug Watching path 'C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.' filter 'log.log' for changes. 2019-10-18 12:02:01.4041 Debug FileAppender Closing Invalidate - C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.\log.log 2019-10-18 12:02:01.4041 Debug Stopping file watching for path 'C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.' filter 'log.log' 2019-10-18 12:02:01.4041 Info FileTarget(Name=file): Archive mutex not available: C:\Users\xxx\source\repos\NlogTest\NlogTest\bin\Release\.\log.log
Are there any workarounds? yes/no
No
Is there a version in which it did work?
4.2.3 showed much less of a performance hit because it was not catching exceptions. Regardless, it was enough to be very noticeable.
Can you help us by writing an unit test?
Not sure of root cause and therefore unable to write a unit test. Currently running some profiling to try and track the cause.

Testing with code for logging:
static void Main(string[] args)
{
    for (var i = 0; i < 20; i++)
    {
        new Thread(LogStuff).Start(i);
    }

    for (; ; )
    {
        Thread.Sleep(500);
    }
}

static void LogStuff(object param)
{
    var sw = new Stopwatch();
    var log = NLog.LogManager.GetCurrentClassLogger();

    log.Info("Initializing");

    var i = 0;

    sw.Start();
    for (; ; )
    {
        if (i % 25 == 0)
        {
            Console.WriteLine($"{i / 25} {param} {sw.Elapsed}");
            sw.Restart();
        }

        var outLine = $"Hello world {++i} {param}";
        log.Info(outLine);

        Thread.Sleep(5);
    }
}

Disregard, solving with a buffered async wrapper. Should have RTFMed. Sorry about that.

Was also my conclusion since NLog ver. 4.2.3 also attempted file-move-operation on every file-write.
When enabling the async-wrapper then it allows the FileTarget to perform batch-writing of multiple logevents in one file-operation. Reducing the number of file-move-operations.


Image expires header

Issue #, if available:
#345
Description of changes:

Allow overwriting Expires response header
Respond with 4xx error when requesting manually expired resource

By setting the { "headers": { "expires": "..." } } value to a UTCTimeString the link can be made time-limited. Useful when combined with signed urls. The set expires takes precedence over S3 Object expires and expired requests get served 403 Forbidden.
We placed the expiry date in the headers section because of semantics, moving it to the root of the request JSON, or renaming it would be simple.
Checklist

[x] :wave: I have run the unit tests, and all unit tests have passed.
[ ] :warning: This pull request might incur a breaking change.

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

@markuscolourbox thank you for your contribution. We will look into it and add it to our backlog.

Hi @markuscolourbox  Thanks for the excellent PR. It's entirely possible I'm wrong. I think it would be great if adding expire factor among signature generating and attach the expire field on query string. Someone maybe want to protect time-limited access by using HTTP redirection (eg: HTTP 302).

Does anyone have any opinions on what the header(s) should be called. If we followed the s3 style we could have paths like: /eyJid[...]?&Date=20130721T201207Z&Expires=86400&Signature=[...] where the file expires "Expires"-seconds after "Date". We could also just have /eyJid[...]?Expires=20130721T201207Z&Signature=[...] with expiry on the date in the url.

@markuscolourbox I prefer the S3 style, purely for ease of debugging as it makes the two values obvious. But either work for me - just looking forward to this feature getting included!

@fisenkodv what is the ETA of getting PR accepted. As noted by @markuscolourbox we are open to change the format to match AWS's preferences - just let us know.

@aws-solutions-github-bot Please leave open

Hi @markuscolourbox,
I'm evaluating this change now, and so far I think it makes sense as an addition in the Serverless Image Handler. My main concern here is that including the expires field will cause a notable decrease to the cache hit rate, requiring that we reprocess an image even if the previously generated version isn't expired yet (Since the signature/expires parameters would change and are used when caching). This isn't a deal breaker since it would only affect customers using this feature but is worth noting.
Let me know if you have any thoughts,
Simon

Hi @markuscolourbox,
We've decided to include this feature in the next minor/major release of SIH. Our internal policies have us merge the code manually, but you'll see your profile and a link to this PR included in the External Contributors section towards the bottom of the readme once the release is out.
Thanks for your contributions to SIH :)
Simon


Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. after install this plugin

Hello, after install this plugin i get this error on build command
FAILURE: Build failed with an exception.
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver

this is my gradle config
/* Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files

    classpath 'com.android.tools.build:gradle:3.3.0'
}

}
allprojects {
repositories {
google()
jcenter()
}
//This replaces project.properties w.r.t. build settings
project.ext {
  defaultBuildToolsVersion="28.0.3" //String
  defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
  defaultTargetSdkVersion=29 //Integer - We ALWAYS target the latest by default
  defaultCompileSdkVersion=29 //Integer - We ALWAYS compile with the latest by default,
}

}
task clean(type: Delete) {
delete rootProject.buildDir
}
IONIC 6.9
Angular CLI: 9.1.10
Node: 12.16.1
OS: win32 x64

Issue duplicated.
The solution is described at https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/issues/121


♻ REFACTOR: Increasing dependency versions as in sphinx-book-theme

I reckon we should increase the version as sphinx-book-theme has done it as well. https://github.com/executablebooks/sphinx-book-theme/blob/master/setup.py 😬
fixes https://github.com/QuantEcon/quantecon-book-theme/issues/33

Codecov Report

Merging #34 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #34   +/-   ##
=======================================
  Coverage   73.86%   73.86%
=======================================
  Files           2        2
  Lines         199      199
=======================================
  Hits          147      147
  Misses         52       52

Flag
Coverage Δ

#pytests
73.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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 75c532e...9e4a2ae. Read the comment docs.

thanks @AakashGfude


Add OpenLMClient

An alternative approach would be to skip the AutoConfig mechanism and just construct a OpenLMforCausalLM directly.

@ruixin31 Have you gotten a chance to try this out?

I'm still tweaking the API on my side. Will be trying it soon!

Thanks for testing it out!


Bug, SSL_read forever never ending

Deleted

SSL_read always returning >0 effectively means the peer is continuously sending some data through the SSL connection and it never stops.
So there would have to be other means how to stop forwarding the data.
If the above is not the case, you have some problem with your application.

Marking as inactive, to be closed at the end of the 3.4 dev cycle, barring further input


What about ListViewController with multiple sections？

It is there a way to use LBTAListController for multiple sections？Except customise the datasource.

Nope, ListController only supports a single section.  Supporting multiple sections with varying cell types requires a lot of custom code. Therefore I think writing your own UICollectionViewController subclass is better than using a library.

Got it! Thanks.