Override default file in Yaml/Toml/Json ConfigSettingsSource at runtime.

I would like to override the defaulted config file path used in a file settings source. In the example below the default yaml file that is read in is /etc/config.yaml however, oftentimes I like to be able to pass the config file location in at application startup via a cli arg. Is there an ergonomic way to update this at runtime?
import os
from typing import Tuple, Type

from pydantic import BaseModel, Field

from pydantic_settings import (
    BaseSettings,
    PydanticBaseSettingsSource,
    YamlConfigSettingsSource,
    EnvSettingsSource,
)

class Nested(BaseModel):
    nested_field: str = Field(default=...)

class Settings(BaseSettings):
    foobar: str = Field(default=...)
    nested: Nested = Field(default=...)

    @classmethod
    def settings_customise_sources(
        cls, settings_cls: Type[BaseSettings], **kwargs
    ) -> Tuple[PydanticBaseSettingsSource, ...]:
        return (
            EnvSettingsSource(
                settings_cls,
                env_prefix="APP__",
                env_nested_delimiter="__",
                case_sensitive=False,
            ),
            YamlConfigSettingsSource(settings_cls, yaml_file="/etc/config.yaml"),
        )

print(Settings().model_dump())

Thanks @theelderbeever for reporting this.
Right now there is no clear way to pass the file. We have to make it possible to pass the file like Settings(_yaml_file='<file_name>') but it will be a breaking change. So, we have to postpone it until V3.
BTW, you can do it in a hacky way like:
import os
import sys
from typing import Tuple, Type

from pydantic import BaseModel, Field

from pydantic_settings import (
    BaseSettings,
    PydanticBaseSettingsSource,
    YamlConfigSettingsSource,
    EnvSettingsSource,
)

YAML_FILE_PATH = None

class Nested(BaseModel):
    nested_field: str = Field(default=...)

class Settings(BaseSettings):
    foobar: str = Field(default=...)
    nested: Nested = Field(default=...)

    @classmethod
    def settings_customise_sources(
        cls, settings_cls: Type[BaseSettings], **kwargs
    ) -> Tuple[PydanticBaseSettingsSource, ...]:
        global YAML_FILE_PATH

        return (
            EnvSettingsSource(
                settings_cls,
                env_prefix="APP__",
                env_nested_delimiter="__",
                case_sensitive=False,
            ),
            YamlConfigSettingsSource(settings_cls, yaml_file=YAML_FILE_PATH),
        )

YAML_FILE_PATH = sys.argv[1]
print(Settings().model_dump())

@hramezani thanks for the response and thanks for putting it on the roadmap. In my current application I am able to get away with YamlConfigSettingsSource(settings_cls, yaml_file=os.getenv("APPLICATION_CONFIG_PATH", "config.yaml")) so I am going to run with that.
Thanks!

For me I didn't want to use globals because I was planning to use it in a bunch of places. I just copied and pasted the BaseSettings code to add it in. To use it, it just becomes
from typing import Literal

from pydantic_settings import SettingsConfigDict

from .base_settings import BaseSettings # This is where I put the edited base settings

class Config(BaseSettings):
    version: Literal["0.0"] = "0.0"
    message: str

    model_config = SettingsConfigDict()

Config(_yaml_file="something.yaml")

Base Settings
from __future__ import annotations as _annotations

from pathlib import Path
from typing import Any, ClassVar

from pydantic._internal._utils import deep_update
from pydantic.main import BaseModel
from pydantic_settings import SettingsConfigDict
from pydantic_settings.sources import (ENV_FILE_SENTINEL, DotEnvSettingsSource,
                                       DotenvType, EnvSettingsSource,
                                       InitSettingsSource,
                                       JsonConfigSettingsSource, PathType,
                                       PydanticBaseSettingsSource,
                                       SecretsSettingsSource,
                                       YamlConfigSettingsSource)

class BaseSettings(BaseModel):
    """
    Base class for settings, allowing values to be overridden by environment variables.

    This is useful in production for secrets you do not wish to save in code, it plays nicely with docker(-compose),
    Heroku and any 12 factor app design.

    All the below attributes can be set via `model_config`.

    Args:
        _case_sensitive: Whether environment variables names should be read with case-sensitivity. Defaults to `None`.
        _env_prefix: Prefix for all environment variables. Defaults to `None`.
        _env_file: The env file(s) to load settings values from. Defaults to `Path('')`, which
            means that the value from `model_config['env_file']` should be used. You can also pass
            `None` to indicate that environment variables should not be loaded from an env file.
        _env_file_encoding: The env file encoding, e.g. `'latin-1'`. Defaults to `None`.
        _env_ignore_empty: Ignore environment variables where the value is an empty string. Default to `False`.
        _env_nested_delimiter: The nested env values delimiter. Defaults to `None`.
        _env_parse_none_str: The env string value that should be parsed (e.g. "null", "void", "None", etc.)
            into `None` type(None). Defaults to `None` type(None), which means no parsing should occur.
        _env_parse_enums: Parse enum field names to values. Defaults to `None.`, which means no parsing should occur.
        _secrets_dir: The secret files directory. Defaults to `None`.
    """

    def __init__(
        __pydantic_self__,
        _case_sensitive: bool | None = None,
        _env_prefix: str | None = None,
        _env_file: DotenvType | None = ENV_FILE_SENTINEL,
        _env_file_encoding: str | None = None,
        _env_ignore_empty: bool | None = None,
        _env_nested_delimiter: str | None = None,
        _env_parse_none_str: str | None = None,
        _env_parse_enums: bool | None = None,
        _secrets_dir: str | Path | None = None,
        _json_file: PathType | None = None,
        _json_file_encoding: str | None = None,
        _yaml_file: PathType | None = None,
        _yaml_file_encoding: str | None = None,
        **values: Any,
    ) -> None:
        # Uses something other than `self` the first arg to allow "self" as a settable attribute
        super().__init__(
            **__pydantic_self__._settings_build_values(
                values,
                _case_sensitive=_case_sensitive,
                _env_prefix=_env_prefix,
                _env_file=_env_file,
                _env_file_encoding=_env_file_encoding,
                _env_ignore_empty=_env_ignore_empty,
                _env_nested_delimiter=_env_nested_delimiter,
                _env_parse_none_str=_env_parse_none_str,
                _env_parse_enums=_env_parse_enums,
                _secrets_dir=_secrets_dir,
                _json_file=_json_file,
                _json_file_encoding=_json_file_encoding,
                _yaml_file=_yaml_file,
                _yaml_file_encoding=_yaml_file_encoding,
            )
        )

    @classmethod
    def settings_customise_sources(
        cls,
        settings_cls: type[BaseSettings],
        init_settings: PydanticBaseSettingsSource,
        env_settings: PydanticBaseSettingsSource,
        dotenv_settings: PydanticBaseSettingsSource,
        yaml_settings: PydanticBaseSettingsSource,
        json_settings: PydanticBaseSettingsSource,
        file_secret_settings: PydanticBaseSettingsSource,
    ) -> tuple[PydanticBaseSettingsSource, ...]:
        """
        Define the sources and their order for loading the settings values.

        Args:
            settings_cls: The Settings class.
            init_settings: The `InitSettingsSource` instance.
            env_settings: The `EnvSettingsSource` instance.
            dotenv_settings: The `DotEnvSettingsSource` instance.
            file_secret_settings: The `SecretsSettingsSource` instance.

        Returns:
            A tuple containing the sources and their order for loading the settings values.
        """
        return init_settings, env_settings, dotenv_settings, file_secret_settings, yaml_settings

    def _settings_build_values(
        self,
        init_kwargs: dict[str, Any],
        _case_sensitive: bool | None = None,
        _env_prefix: str | None = None,
        _env_file: DotenvType | None = None,
        _env_file_encoding: str | None = None,
        _env_ignore_empty: bool | None = None,
        _env_nested_delimiter: str | None = None,
        _env_parse_none_str: str | None = None,
        _env_parse_enums: bool | None = None,
        _secrets_dir: str | Path | None = None,
        _json_file: PathType | None = None,
        _json_file_encoding: str | None = None,
        _yaml_file: PathType | None = None,
        _yaml_file_encoding: str | None = None,
    ) -> dict[str, Any]:
        # Determine settings config values
        case_sensitive = _case_sensitive if _case_sensitive is not None else self.model_config.get('case_sensitive')
        env_prefix = _env_prefix if _env_prefix is not None else self.model_config.get('env_prefix')
        env_file = _env_file if _env_file != ENV_FILE_SENTINEL else self.model_config.get('env_file')
        env_file_encoding = (
            _env_file_encoding if _env_file_encoding is not None else self.model_config.get('env_file_encoding')
        )
        env_ignore_empty = (
            _env_ignore_empty if _env_ignore_empty is not None else self.model_config.get('env_ignore_empty')
        )
        env_nested_delimiter = (
            _env_nested_delimiter
            if _env_nested_delimiter is not None
            else self.model_config.get('env_nested_delimiter')
        )
        env_parse_none_str = (
            _env_parse_none_str if _env_parse_none_str is not None else self.model_config.get('env_parse_none_str')
        )
        env_parse_enums = _env_parse_enums if _env_parse_enums is not None else self.model_config.get('env_parse_enums')
        secrets_dir = _secrets_dir if _secrets_dir is not None else self.model_config.get('secrets_dir')

        # Configure built-in sources
        init_settings = InitSettingsSource(self.__class__, init_kwargs=init_kwargs)
        env_settings = EnvSettingsSource(
            self.__class__,
            case_sensitive=case_sensitive,
            env_prefix=env_prefix,
            env_nested_delimiter=env_nested_delimiter,
            env_ignore_empty=env_ignore_empty,
            # env_parse_none_str=env_parse_none_str,
            # env_parse_enums=env_parse_enums,
        )
        dotenv_settings = DotEnvSettingsSource(
            self.__class__,
            env_file=env_file,
            env_file_encoding=env_file_encoding,
            case_sensitive=case_sensitive,
            env_prefix=env_prefix,
            env_nested_delimiter=env_nested_delimiter,
            env_ignore_empty=env_ignore_empty,
            # env_parse_none_str=env_parse_none_str,
            # env_parse_enums=env_parse_enums,
        )
        json_settings = JsonConfigSettingsSource(
            self.__class__,
            json_file=_json_file,
            json_file_encoding=_json_file_encoding,
            # case_sensitive=case_sensitive,
            # env_prefix=env_prefix,
        )
        yaml_settings = YamlConfigSettingsSource(
            self.__class__,
            yaml_file=_yaml_file,
            yaml_file_encoding=_yaml_file_encoding,
            # case_sensitive=case_sensitive,
            # env_prefix=env_prefix,
        )

        file_secret_settings = SecretsSettingsSource(
            self.__class__, secrets_dir=secrets_dir, case_sensitive=case_sensitive, env_prefix=env_prefix
        )
        # Provide a hook to set built-in sources priority and add / remove sources
        sources = self.settings_customise_sources(
            self.__class__,
            init_settings=init_settings,
            env_settings=env_settings,
            dotenv_settings=dotenv_settings,
            yaml_settings=yaml_settings,
            json_settings=json_settings,
            file_secret_settings=file_secret_settings,
        )
        if sources:
            return deep_update(*reversed([source() for source in sources]))
        else:
            # no one should mean to do this, but I think returning an empty dict is marginally preferable
            # to an informative error and much better than a confusing error
            return {}

    model_config: ClassVar[SettingsConfigDict] = SettingsConfigDict(
        extra='forbid',
        arbitrary_types_allowed=True,
        validate_default=True,
        case_sensitive=False,
        env_prefix='',
        env_file=None,
        env_file_encoding=None,
        env_ignore_empty=False,
        env_nested_delimiter=None,
        env_parse_none_str=None,
        env_parse_enums=None,
        json_file=None,
        json_file_encoding=None,
        yaml_file=None,
        yaml_file_encoding=None,
        toml_file=None,
        secrets_dir=None,
        protected_namespaces=('model_', 'settings_'),
    )
    ```

@A-Telfer thank you for this workaround! Works well with JSON configs.

Is adding _yaml_file argument really a breaking change?
The issue could be fixed by adding _yaml_file (and possibly _yaml_file_encoding) into BaseSettings.__init__ arguments.
@hramezani you mentioned in your https://github.com/pydantic/pydantic-settings/issues/259#issuecomment-2015085791 that this would be a breaking change.
Currently, using these parameters for instantiating any BaseSettings subclass breaks the code so there shall be no production code which is using these.
Adding one or two new arguments with default values should not break any existing code thus could be included in v2 updates.
I am aware some other classes might need modifications, but I think, these changes could be done in backward compatible way too.
Did I miss something?

I figured out a simpler workaround.
parser = argparse.ArgumentParser()
parser.add_argument("--config_dir")

def get_config_dir(default=...):
    try:
        parsed = parser.parse_known_args()
    except SystemExit as exc:  # --help was passed
        parsed = None
    if parsed is not None and parsed[0].config_dir is not None:
        return parsed[0].config_dir
    return default

CONFIG_DIR = Path(get_config_dir())

class Settings(BaseSettings):
    ...
    model_config(yaml_file=CONFIG_DIR / "myconfig.yaml", ...)
    ...

config = Settings(_cli_settings_source=CliSettingsSource(Settings, root_parser=parser)(args=True), cli_parse_args=True)

You can use these CLI settings from any module where config is imported.

Your approach uses global variables (CONFIG_DIR = Path(get_config_dir())) which is closer to "initialisation-time" than "runtime". It won't work for
def main():
    config_path = os.environ["CONFIG_PATH"]
    config = Settings(_source_path=config_path)

since class Settings has to be defined without referencing config_path.

True. I suppose you can just move the global to the class definition scope:
    model_config = SettingsConfigDict(
        yaml_file=get_config_path() / “config.yaml”,
       …
    )

And move the cli settings into there as well
Then you can do
from project.config import Settings
cfg = Settings()

And you should have the —config-dir option.
I’ve also added env var loading to get_config_dir in my actual implementation .

It's still global (yaml_file=get_config_path()).

Yes, but it still answers the OP’s request. A cli flag is added to specify an alternative path for loading any config files.
It improves on other “global” approaches because it adds the flag into the CLI, documents it in the —help output.
It’s not ideal if you want to explicitly set the file at runtime through eg hard coded strings, as other commenters mentioned.

I will apply tomorrow morning when I’m not afk :)

I am just migrating from dynaconf to pydantic-settings and stumpled upon this, immediately. I am aiming for toml based settings. Maybe I have a total misconception here, but why are specific file paths needed in the scope of "the model", at all? What's the reason for not using an inversion of control concept in order to pass the files at run-time? Shouldn't the model be generic in terms of which files are applied on it?

That's not too bad, but you are literally setting the file path in the scope of the model definition - just doing so dynamically.
The proposed PR just adds the paths to the constructor, which is sort of the non-workaround version of your code.
The CLI workaround I mentioned lets you use the full CLI functionality of pydantic-settings, if that matters to you, while also supporting the --config-dir flag, which is fairly common for CLI tools to have.

Here's a few possible ways to work around this friction point.
If you're only using one source, then perhaps avoid using pydantic-settings and add a utility function or class method to your model. This also avoids having an allowed "empty" constructor generated by pydantic-settings.
class Settings(BaseModel):
    alpha: int
    beta: int

    @classmethod
    def from_yaml(cls, path: Path) -> Self:
        with open(path, 'r') as yaml_file:
            dx = yaml.safe_load(yaml_file) or {}
        return cls(**dx)

Second, use a similar idea, but reuse the Source loader(s) from pydantic-settings. It possible to combine different sources in this model (e.g., merging dicts).
class Settings2(BaseSettings):
    alpha: int
    beta: int

    @classmethod
    def from_yaml(cls, path: Path) -> Self:
        return cls(**YamlConfigSettingsSource(cls, path)())

Lastly, use a closure to return the class with the correct configuration file path.

def to_settings3(yaml_file: Path):
    class Settings3(BaseSettings):
        model_config = SettingsConfigDict(yaml_file=yaml_file)
        alpha: int
        beta: int

        @classmethod
        def settings_customise_sources(
            cls,
            settings_cls: Type[BaseSettings],
            init_settings: PydanticBaseSettingsSource,
            env_settings: PydanticBaseSettingsSource,
            dotenv_settings: PydanticBaseSettingsSource,
            file_secret_settings: PydanticBaseSettingsSource,
        ) -> Tuple[PydanticBaseSettingsSource, ...]:
            return (YamlConfigSettingsSource(settings_cls),)

    return Settings3

Complete working examples:
https://gist.github.com/mpkocher/eb11b6807ef5e119b3e1ef5d7b629529

I figured out a better work-around that the one above.   If I have a custom file settings source, rather than re-using the existing settings sources.  the issue with re-using, for instance, YamlConfigSettingsSource, is that the path to load is specified at init time.
If you simply make the yaml_file_path into a property and store at init time only the default, then this can be loaded from a settings provided to your base settings.
    @property
    def yaml_file_path(self) -> Path:
        path = self.current_state.get(self.yaml_file_path_field) or self._yaml_file_path
        if path is None:
            raise ValueError(f'{self.yaml_file_path_field} is required')
        return path

Since this depends on the current_state, the usual precedence loading mechanism works.

Note - the above is still quite a work-around.  By making it a property we can get the dynamic calculation to happen when we want, but since the value is dynamic, it should not be a property, really.  property's should depend on attributes you expect to be immutable, but which are lazily loaded.  This is actually dynamic.


Support For Angular 14.0

Support for Angular v14, please.

As a temporary workaround: You can make it run under Angular 14.0 by adding this to package.json
  "overrides": {

       "ngx-device-detector": {
      "@angular/cdk": "^14.0.0",
      "@angular/common": "^14.0.0",
      "@angular/core": "^14.0.0",
      "@angular/platform-browser": "^14.0.0"
    }
  },

However, be aware that this does not guarantee that it works under all circumstances. Hence, it is better that the maintainers of this package officially check if anything blocks under Angular 14

As a temporary workaround: You can make it run under Angular 14.0 by adding this to package.json
  "overrides": {

       "ngx-device-detector": {
      "@angular/cdk": "^14.0.0",
      "@angular/common": "^14.0.0",
      "@angular/core": "^14.0.0",
      "@angular/platform-browser": "^14.0.0"
    }
  },

However, be aware that this does not guarantee that it works under all circumstances. Hence, it is better that the maintainers of this package officially check if anything blocks under Angular 14

Thanks, works great. Just wanted to mention the "overrides" property is supported by NPM 8 and above, so make sure you have the latest version by running npm i -g npm.


Allow sending of short, personal messages with tips

I'm delighted that I have two whole people sending me tips. However I don't know why. It could be my efforts in maintaining Dwarf Fortress mods, or my writing about science, or my public speaking, or my software development, or photography, or just because they like me. If people are giving me tips then I'd like to continue working on things they like.
It'd be great to have a "why are you tipping this person" field, that gets copied over as a transaction note (ie, you both can see it). It doesn't mean you know who the tip came from (although I guess someone could stick their name there), but it means they can write "Love your photos", or "Great work on exobrain", or whatever it is they wish to share (which could be nothing).
One could potentially allow this to be pre-filled (eg, with a URL from the referring page). Flattr does this, so recipients know what people are flattring them for. One could even include GET parameters to provide a suggested message.  (eg: https://gittip.com/pjf?for=photography)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Closing in light of our decision to shut down Gratipay.
Thank you all for a great run, and I'm sorry it didn't work out! 😞  💃


HADOOP-14661. Added support for AWS S3 Requester Pays Buckets

Requester pays support was added in 9edfe30a60f4c43405301927a8f4014d1dd3842d.
Can we close this, @mandusm?


file-header fix for single-line comments

The file-header rule was not correctly parsing single-line comments. Therefore the regex was not working. That is now fixed.
PR checklist

[x] Addresses an existing issue: #2319
[ ] New feature, bugfix, or enhancement

[ ] Includes tests

[ ] Documentation update

Overview of change:
I fixed the commentRegexp so that it will correctly parse single-line comments. It was an easy fix. I simply removed a ?.
Is there anything you'd like reviewers to focus on?
Please make sure I made the correct decision with the tests inside the empty directory.
CHANGELOG.md entry:
Fixed the file-header rule so that it correctly handles single-line coments.

Thanks for your interest in palantir/tslint, @battmanz! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

thanks @battmanz!


feat: Add lua-language-server to pre-commit hooks

Implement lua-language-server linter in pre-commit
Install via Nix due to lack of Ubuntu package
Apply patch for --check CLI bug using Nix overlay
Centralize linting config for VSCode, pre-commit, and CI

Fixes #2576
Checklist

[ ] I have added tests
[ ] I have updated the docs and cheatsheet
[ ] I have not broken the cheatsheet

I wonder if we want to do this in pre-commit or as part of test. This feels like running tsc, which we do as part of our test CI step. I'm not in love with needing nix set up in order for pre-commit to work locally, so doing it as part of test makes it easier to just be CI-only / manually triggered locally

Ok. I moved it into test.yml. I went the route of having another combined action again so we don't have to litter multiple entries with 'if linux'. Didn't manually test these new changes yet, so will see how the CI goes.

Any idea why the 'ubuntu-latest, stable' CI test would've skipped here? That's the only one that will run the new lua test and was running before, so seems a bit weird... but details don't show anything. I don't seem to be able to force re-run it

Hmm strange. Maybe try pushing an empty commit?


Added Zoom 1.2x on Hover Effect on Board Members Images

Topic says it all, will add the Hover Effect for the Event Cards as well #162
https://user-images.githubusercontent.com/56167123/108960810-7ed81c00-769c-11eb-9a08-53e0d06756b7.mp4

#162

#161

@Bawanthathilan are we good to go?


Bugfixes

One bugfix for config parsing and one additional logging.

The bug is collision between config names. We have our own pattern for extra configs which wrongly matches some more general configs added by some Kafka platforms. There is more details inside commit message.


Move tests to master

.travis.yml file setup to run CI test automatically with each new PR/commit.

@emilyrose, rebased with master

why thank you kind sir! :smile_cat:

time to turn on Travis ;)


[140837783] - First question, no anchor

For each section in the supplier declaration, the first question's edit link should load without any anchors. This will ensure that the top of the page is visible, showing any section description/guidance/preamble for users who click the question-level edit rather than the section-level edit.

Sminky pinky :+1:


question about scale

I wonder why opacity_scale(0.001), xyz_scale(0.000001), scale_scale(0.001) of shapenet cars dataset is set to such value?

Another question, in the article, you mentioned using a camera transformation based on the relative pose of the first frame of the image, if I want to implement a predicted Gaussian parameter based on a single image and its camera pose, and render the resulting image under the same camera pose, i.e., train on a single image, would it be reasonable to use the corresponding camera pose information inside the dataset directly?

what's more, i also want to know how to determine the value of znear and zfar of other synthetic dataset.

Hi,

initialisation was tuned manually to have reasonable semi-transparent, camera-aligned shape at the start. It is possible other initialisation are better, this tuning wasn't a grid-search but instead a bit of trial and error. This initialisation is a good starting point but having bigger scales might work well too.
If you train on a single image per object instance, the network will converge to a trivial `billboard' solution because there won't be any incentive for it to produce plausible 3D shapes. You can try it yourself by setting opt.imgs_per_obj=1.
zfar and znear should be such that the full object is definitely within these bounds relative to the camera. A good rule of thumb is to use znear = distance to object - w and zfar = distance to object + w where w \approx 2.5 * max_object_size / 2 . Again, this is a good starting point and you might want to tweak them based on your experimental results.

Thank you for your answer!
When you mention distance to object do you mean the distance from the camera to the object in the world coordinate system? And how exactly are the dimensions of w and distance to object defined? As a rule of thumb, I set the znear and zfar to 0.01 and 10 respectively for the new dataset in the first experiment, do you think this is reasonable?


Using godeps dependency model.

Using
https://github.com/tools/godep
Constructed by
godep save

Note the difference
+1,562 −7,613

Still builds & runs
marianol at Marianos-MacBook-Pro-2 in ~/Code/go/src/github.com/MarianoGappa/kt on master*
$ go build .
marianol at Marianos-MacBook-Pro-2 in ~/Code/go/src/github.com/MarianoGappa/kt on master*
$ ls
Godeps		README.md	main.go
Makefile	kt		vendor
marianol at Marianos-MacBook-Pro-2 in ~/Code/go/src/github.com/MarianoGappa/kt on master*
$ ./kt
Topic name is required.
[...]

looks good! do you know if we can fix the sarama version to v1.8.0 (rather than the commit at the time when we run godep save?

@fgeller: there. Please re-test. I checked that consuming a queue still works.
To fix a version:

cd to the root of the repo of the dependency whose version you want to fix (on your $GOPATH; not your project!)
 Replace Rev. The comment is optional.

-                       "Comment": "v1.8.0-17-g8aadb47",
-                       "Rev": "8aadb476e66ca998f2f6bb3c993e9a2daa3666b9"
+                       "Comment": "v1.8.0",
+                       "Rev": "4ba9bba6adb6697bcec3841e1ecdfecf5227c3b9"

Update your project's dependency's code

godep update github.com/Shopify/sarama

Test; add; commit; push; profit.

Note that you can use godep restore to checkout your project's dependencies' versions on your $GOPATH. This would change NOT your project's repo, but your host's $GOPATH projects.

Cool, thanks for your time :)


ERROR for site owner: Invalid key type

hi i tested both v2 and v3 (using the right keys for each of them) but i keep on getting
"ERROR for site owner: Invalid key type" on v3 using your v3 example.
nuxt.config.js
[
  '@nuxtjs/recaptcha',
    {
      hideBadge: true,
      version: 3,
      siteKey: process.env.RECAPTCHA_SITE_KEY,
    },
  ],
]

component
async mounted() {
    try {
      await this.$recaptcha.init()
    } catch (e) {
      console.error(e)
    }
  },

the key is correctly inserted into the dom, also the script from recaptcha.net is available, am i missing something?

yes, a recaptcha tag

well, I've removed the tag, and the script is still downloaded with ?render=SITE_KEY&render=SITE_KEY with a 400 Bad Request


Raw diff between tags and branches

Currently, it is possible to get a raw diff between 2 commits, for instance:
https://try.gitea.io/Etzelia/review/commit/4be8c56ae08e83c486854d9221cbd16e84607ca8...2eaa86164eb4cca84e14be1c357398c7b2c4efa2.diff
The same doesn't work, however, if tags are used instead of commit IDs, and branch names does not seem to work either. For instance:
https://try.gitea.io/ikervagyok/reflex-platform/commit/v<IP_ADDRESS>...v<IP_ADDRESS>.diff
It would be nice to have some unified URL to get a plain diff between any tags, commits and branch HEADs mix.
An example of how this works with github:
https://github.com/pfactum/pf-kernel/compare/v5.9...pf-5.9.diff
This gives a raw diff between a tag and a branch HEAD.

Copy-pasting reasoning from Codeberg Matrix room.

to put it in a context, this is a nice feature to use with huge projects like linux kernel where there's some base (say, v5.18 tag), and a small amount of commits on top of that tag. you wanna build the whole kernel, and you already have that base downloaded as a tarball from the kernel.org site, and what you need to download is that small diff on top of the tag without having to clone the whole repo
and this becomes especially useful if cloud-based build system (like opensuse build service) is used. once you rebuild the kernel, you upload just a tiny diff between two small diffs, not a 150 MiB tarball each time

@FWDekker I don't think this is solved. Yes, one can compare between two refs, but there's no way to generate a plain diff between those, which is the point of this RFE. Appending .diff to the URL you've mentioned generates error 404.

Oops, you're right! I missed the "raw" part in your issue description.


feat: set repository policy if present

Hello there! ECR repositories have policies, we are using them to get read only access to root account registry from subaccounts. We are be glad to have this feature in your lambda function.

@anapsix, hello! Could you check PR, please?

Hello, @anapsix! What we are going to do next? I suppose we have two variants:

I able to cherry-pick your commits from anastas/5-suggestions to this branch
Or close my branch and open from yours to main

Hello, @anapsix! What we are going to do next? I suppose we have two variants:

I able to cherry-pick your commits from anastas/5-suggestions to this branch
Or close this PR and open PR from your branch to main

Please cherry-pick from that branch, and I'll merge, and follow-up with another PR which updates CHANGELOG, and tag it after merge of that.

thank you @a1k0u, this has been released as v0.3.0


Validate MockTracingTelemetry span state on shutdown.

Description
Mock telemetry show allow the option to do strict checking of all the spans' state at the cluster shutdown specifically for the Integration tests.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]

Check List

[x] New functionality includes testing.
[ ] All tests pass
[x] New functionality has been documented.

[x] New functionality has javadoc added

[x] Commits are signed per the DCO using --signoff
[ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Gaganjuneja so few things here:

the tracing verification is purely part of the test framework (should not require any changes outside of it)
the OpenSearchIntegTestCase has a hook called checkStaticState (which I mentioned here, this is the place post cluster shutdown checks are done, we should probably

@reta, I have updated the changes, please take a look. Now it seems pretty clean thanks!

@reta, I have updated the changes, please take a look. Now it look pretty clean thanks!

Thanks @Gaganjuneja , it looks much better indeed, thank you

Flaky tests -
org.opensearch.cluster.allocation.ClusterRerouteIT.testDelayWithALargeAmountOfShards
org.opensearch.remotestore.RemoteStoreStatsIT.testStatsResponseFromLocalNode
org.opensearch.remotestore.RemoteStoreStatsIT.testStatsResponseAllShards
org.opensearch.search.profile.query.QueryProfilerIT.testProfileMatchesRegular
org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing
org.opensearch.cluster.allocation.ClusterRerouteIT.testDelayWithALargeAmountOfShards

@reta, Request to merge this PR. Thanks!

Does this need to go in 2.10 as well? @reta @Gaganjuneja
Please add the backport 2.10 label in that case.

Please add the backport 2.10 label in that case.

Done, thanks a lot @kotwanikunal !


MAINT: Update ignore for pyzmq

Should fix a failure seen in PyVista
https://github.com/pyvista/pyvista/actions/runs/3903839795/jobs/6670305045
Closes #11415

Thanks, @larsoner!


Lattice dummy proxy

Dummy lattice parameter proxy that uses KDE fitted on a dataset of triclinic materials, with predicted scores clipped and rescaled to be negative numbers.
Histograms of the (original, not clipped/rescaled) scores for the train dataset and a grid of all possible environment states:

Current run: https://wandb.ai/michalkoziarski/GFlowNet/runs/t4ln9azm.
EDIT: correlation seems fine in the latest run! Marking it ready for review.

This was refitted on Matbench, histograms after refitting:


adds explicit react version

this is a follow-up to INS-1218 in https://github.com/Kong/insomnia/pull/4284
I noticed we can remove these warnings quite simply by just telling the plugin what version of react we're using.  There does not seem to be some other/better way to do this with eslint-plugin-react, unfortunately.
We don't want to add the plugin for just those packages that have react (since that would defeat the purpose of having a single global config for the whole monorepo), but we also don't want to hoist the react dependency to the root package.json (which, https://github.com/yannickcr/eslint-plugin-react/pull/2609 would solve if it were merged) (since, that would/could mean react in the dependency tree of things that don't use react).  Our best option is just to specify the react version in the root eslint config and try and remember to keep everything in sync when we update the react version.  Realistically, verrryyy little (if anything) can go wrong if we forget, anyhow.
The impact is the following change to the lint output:
$ npm run lint

\><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia
\> lerna run lint --stream --no-bail

lerna notice cli v3.22.1
lerna info Executing command in 13 packages: "npm run lint"
insomnia-common: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-common
insomnia-common: > eslint . --ext .js,.ts,.tsx
insomnia-cookies: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-cookies
insomnia-cookies: > eslint . --ext .js,.ts,.tsx
insomnia-testing: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-testing
insomnia-testing: > eslint . --ext .js,.ts,.tsx
insomnia-importers: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-importers
insomnia-importers: > eslint . --ext .js,.ts,.tsx
insomnia-prettify: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-prettify
insomnia-prettify: > eslint . --ext .js,.ts,.tsx
insomnia-smoke-test: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-smoke-test
insomnia-smoke-test: > eslint . --ext .js,.ts,.tsx
insomnia-components: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-components
insomnia-components: > eslint . --ext .js,.ts,.tsx
insomnia-url: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-url
insomnia-url: > eslint . --ext .js,.ts,.tsx
openapi-2-kong: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/openapi-2-kong
openapi-2-kong: > eslint . --ext .js,.ts,.tsx
- insomnia-common: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
insomnia-config: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-config
insomnia-config: > eslint . --ext .js,.ts,.tsx
- insomnia-cookies: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
- insomnia-importers: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
insomnia-xpath: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-xpath
insomnia-xpath: > eslint . --ext .js,.ts,.tsx
- insomnia-prettify: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
- insomnia-smoke-test: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
- insomnia-url: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
- insomnia-testing: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
- openapi-2-kong: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
insomnia-inso: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso
insomnia-inso: > eslint . --ext .js,.ts,.tsx
- insomnia-config: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
- insomnia-xpath: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
insomnia-app: ><EMAIL_ADDRESS>lint /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app
insomnia-app: > eslint . --ext .js,.ts,.tsx
- insomnia-inso: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/cookie-list.tsx
insomnia-app:   96:49  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/error-boundary.tsx
insomnia-app:   107:33  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/modals/cookie-modify-modal.tsx
insomnia-app:   244:35  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/settings/shortcuts.tsx
insomnia-app:   119:26  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/templating/tag-editor.tsx
insomnia-app:   435:24  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app:   781:30  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/templating/variable-editor.tsx
insomnia-app:   123:30  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/viewers/response-multipart-viewer.tsx
insomnia-app:   272:36  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-app/app/ui/components/wrapper-unit-test.tsx
insomnia-app:   387:44  warning  Do not use Array index in keys  react/no-array-index-key
insomnia-app: ✖ 9 problems (0 errors, 9 warnings)
lerna success run Ran npm script 'lint' in 13 packages in 60.6s:
lerna success - insomnia-app
lerna success - insomnia-common
lerna success - insomnia-components
lerna success - insomnia-config
lerna success - insomnia-cookies
lerna success - insomnia-importers
lerna success - insomnia-inso
lerna success - insomnia-prettify
lerna success - insomnia-smoke-test
lerna success - insomnia-testing
lerna success - insomnia-url
lerna success - insomnia-xpath
lerna success - openapi-2-kong

I like the sound of that.  There are SO few changes to the react API these past few years (let alone, jsx) that I don't think it's going to matter.  but that's a really good idea to keep in mind!


Refactor model and root handling

Fixes issues introduced by unpacking in layout unpacking in pn.panel

Codecov Report

Merging #259 into master will decrease coverage by 0.17%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #259      +/-   ##
==========================================
- Coverage   89.12%   88.95%   -0.18%
==========================================
  Files          34       34
  Lines        5436     5370      -66
==========================================
- Hits         4845     4777      -68
- Misses        591      593       +2

Impacted Files
Coverage Δ

panel/vega.py
82.85% <100%> (ø)
:arrow_up:

panel/tests/test_interact.py
100% <100%> (ø)
:arrow_up:

panel/tests/test_layout.py
99.16% <100%> (-0.84%)
:arrow_down:

panel/widgets.py
94.02% <100%> (-0.1%)
:arrow_down:

panel/plotly.py
100% <100%> (ø)
:arrow_up:

panel/tests/test_param.py
99.61% <100%> (ø)
:arrow_up:

panel/holoviews.py
82.67% <100%> (ø)
:arrow_up:

panel/pane.py
81.89% <100%> (-0.11%)
:arrow_down:

panel/param.py
90.82% <100%> (+0.08%)
:arrow_up:

panel/layout.py
94.75% <100%> (-0.07%)
:arrow_down:

... and 3 more

Continue to review full report at Codecov.

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


Double store credit refunds when a error is received before redirecting to the buckaroo checkout.

System requirements:
Adobe Commerce: 2.4.6-p4
php 8.1
module buckaroo/magento2: v1.46.1
Settings
Working buckaroo account
fill in the following settings:
buckaroo_magento2/account/secret_key
buckaroo_magento2/account/merchant_key
Certificate is not added (buckaroo_magento2/account/certificate_file) reason why is that buckaroo gives back an error before it redirects you as a customer to the buckaroo checkout.
ideal is enabled on test account
Steps to reproduce

First create a customer where you add store credit (magento_customerbalance).
Than add a product which you can pay of partially or full with store credit.
Than it will trigger the error "No Buckaroo certificate configured.". (this could be any error received from buckaroo which could cancel the payment)
In magento the order has been processed even though this error was given back.
I get twice as much store credit back.

Expected result

I get my store credit back, but not doubled.

Actual result

I get two times as much store credit back.

Additional info
If this function (\Magento\Quote\Model\QuoteManagement::submitQuote) receives an error after the order has been created Magento will rollbackAddresses using this function: \Magento\Quote\Model\QuoteManagement::rollbackAddresses.
This than triggers the dispatch the event sales_model_service_quote_submit_failure which in turn invokes this observer:
\Magento\CustomerBalance\Observer\RevertStoreCreditObserver::execute
Afterwards on the same event Buckaroo has this event:
    <event name="sales_model_service_quote_submit_failure">
        <observer name="buckaroo_failed_quote_order" instance="Buckaroo\Magento2\Observer\HandleFailedQuoteOrder"/>
    </event>

Which triggers a cancellation of the order which triggers this function (\Magento\Sales\Model\Order::cancel) Which adds the following event order_cancel_after which triggers the same observer again:
\Magento\CustomerBalance\Observer\RevertStoreCreditObserver::execute
I also added this bug to the magento issues since you could also say this is an issue of magento.
https://github.com/magento/magento2/issues/38815

Hi @leonhelmus,
First of al thanks for contacting us. However I noticed that the issue you raised on the Magento side has been closed, and it seems you've implemented your own fix.
If there's been an update or you have more information, please share it with us.
Otherwise, can we proceed to close this issue?
Thanks!


Could you please give the code of DeepTen

Hi, thanks for the great work about dataset condensation in SR, which inspires me a lot. When I run the file cluster_patches.py, I found the model file 'from network import DeepTen' is not given in this repositories. Besides, cloud you please release the weight file "model_best.pth.tar" of DeepTen.

DeepTen is retrained based on the released code at https://github.com/zhanghang1989/PyTorch-Encoding.


[bug]: I've raised this in the LangChain repo, but their bot suggests it's an issue with the BitsAndBytes library. ' AssertionError Traceback (most recent call last)'

System Info
bitsandbytes = 0.42.0
OS = Windows 11 x64
cuda = 12.1
pip = 24.0
transformers = 4.37.2
GPU = Tesla T4
Reproduction
import torch
from torch import cuda, bfloat16
import transformers
model_id = 'microsoft/phi-2'
device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu'

# begin initializing HF items, you need an access token
model_config = transformers.AutoConfig.from_pretrained(
    model_id,
    use_auth_token=hf_auth,
    trust_remote_code=True
)

# BnB Configuration
bnb_config = transformers.BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type='nf4',
    bnb_4bit_use_double_quant=True,
    bnb_4bit_compute_dtype=bfloat16
)

model = transformers.AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    config=model_config,
    device_map='auto',
    use_auth_token=hf_auth,
    quantization_config=bnb_config,
    low_cpu_mem_usage=True
)

# How model looks like:
model.eval()

from langchain.chains import GraphCypherQAChain
from langchain.graphs import Neo4jGraph

from langchain.chains.base import Chain
from langchain.chains.llm import LLMChain
from langchain.chat_models import ChatOpenAI
from langchain.chains.question_answering.stuff_prompt import CHAT_PROMPT
from langchain.callbacks.manager import CallbackManagerForChainRun
from typing import Any, Dict, List
from pydantic import Field

vector_search = """
WITH
k, e) yield node, score
RETURN node.text AS result
ORDER BY score DESC
LIMIT 3
"""

print(graph.schema)

class Neo4jVectorChain(Chain):
    graph: Neo4jGraph = Field(exclude=True)
    input_key: str = "query"
    output_key: str = "result"
    embeddings: HuggingFaceBgeEmbeddings = HuggingFaceBgeEmbeddings()
    qa_chain: LLMChain = LLMChain(llm=llm, prompt=CHAT_PROMPT)

    @property
    def input_keys(self) -> List[str]:
        return [self.input_key]

    @property
    def output_keys(self) -> List[str]:
        _output_keys = [self.output_key]
        return _output_keys

    def _call(self, inputs: Dict[str, str], run_manager, k=3) -> Dict[str, Any]:
        question = inputs[self.input_key]
        embedding = self.embeddings.embed_query(question)

        context = self.graph.query(vector_search, {'embedding': embedding, 'k': 3})
        context = [el['result'] for el in context]

        result = self.qa_chain({"question": question, "context": context})
        final_result = result[self.qa_chain.output_key]
        return {self.output_key: final_result}

chain = Neo4jVectorChain(graph=graph, embeddings=embeddings, verbose=True)

graph_result = chain.run("How can we enhance the specificity and efficiency of CRISPR/Cas9 gene-editing technology to minimize off-target effects and increase its potential for therapeutic applications?")

> Entering new Neo4jVectorChain chain...
/usr/local/lib/python3.10/dist-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The function `__call__` was deprecated in LangChain 0.1.0 and will be removed in 0.2.0. Use invoke instead.
  warn_deprecated(
/usr/local/lib/python3.10/dist-packages/transformers/generation/configuration_utils.py:392: UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `0.3` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`.
  warnings.warn(
Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.
FP4 quantization state not initialized. Please call .cuda() or .to(device) on the LinearFP4 layer first.
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
[<ipython-input-42-4ff3ab735a16>](https://localhost:8080/#) in <cell line: 1>()
----> 1 graph_result = chain.run("How can we enhance the specificity and efficiency of CRISPR/Cas9 gene-editing technology to minimize off-target effects and increase its potential for therapeutic applications?")

49 frames
[/usr/local/lib/python3.10/dist-packages/bitsandbytes/autograd/_functions.py](https://localhost:8080/#) in matmul_4bit(A, B, quant_state, out, bias)
    564
    565 def matmul_4bit(A: tensor, B: tensor, quant_state: F.QuantState, out: tensor = None, bias=None):
--> 566     assert quant_state is not None
    567     if A.numel() == A.shape[-1] and A.requires_grad == False:
    568         if A.shape[-1] % quant_state.blocksize != 0:

AssertionError:

Expected behavior
It will return the output without raising any exception

HI @KaifAhmad1 !
This issue is a duplicate of https://github.com/huggingface/transformers/issues/29100 I think https://github.com/huggingface/transformers/issues/29100#issuecomment-1953346412 should fix it 🙏 I am closing this issue and we can discuss over in the transformers repo !


Auto range?

Nice module! Is there any way to automatically set the range (e.g. A1:B6) to include all non-empty cells in the sheet? In case I want to show a sheet that varies in nr of rows for example.

@retroflex
You can't currently do this with the module directly, but you can accomplish this by creating a new sheet that does the filtering for you, and then you can import that sheet into the module.
What is the use case if you don't mind me asking? If it something that a lot of people will use I can add it in a future version.

My use case is I use a sheet for my kids' weekly recurring activities for the family to keep up with everyday life. My partner wants to add different stuff to this, like comments (more rows) or more activites (more columns) easily. Not a big deal, just would be a nice feature.

Would love this!
There is getDataRange() in Apps Script that could accomplish this. Let the user pass in 'auto' (or something like that) for the range and then in code.gs if range is 'auto' then call getDataRange() instead of getRange(). This would be a simple way to not break existing users that are calling a fixed range.
https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet#getdatarange

@retroflex @brandonfake69
This feature has been added! Check out the updated README for more details.
Note that in order to use it, you will need to update to the latest version of the library (currently 20). Check out the README for details on how to do that. You will also need to redeploy your apps script (this is mentioned in the instructions on updating the library).
Thanks for the great suggestion! Please send me screenshots of you using the module so I can add them as inspiration for others in the README!


TypeScript init

The PR contains a number of preparations to be able to work with TypeScript in the future:

Adjustment of the GitHub action on Pull Request: In addition, the frontend is now compiled TypeScript to JavaScript using different versions of Node.js to check for compatibility
Configuration of webpack. The production build of the frontend is carried out by webpack. webpack bundles all TypeScript files of a page into a single minified JavaScript file. This happens when building the Docker Image, because the JavaScript files belong to the application as a static resource.

Next Steps

Implement MyArtists page with TypeScript
UnitTests for frontend

Long-term roadmap

Completely decouple the frontend from the backend, e.g. by using Angular. The TypeScript files can be reused for the most part

 TypeScript Proof of Concept

@hedgehog1833 You can now review.


Running the shell script before project generation

What is the best solution to run a shell script before the project generation starts if any?
I'm using SwiftGen to have type-safe assets and localization usage in my app.
I want to remove generated files from the repository and run generation script before project generation and then after every build(the last part is easy). Files are needed to be generated before project generation, so they're added to the project.
One solution is to create setup.sh where I run the
Swiftgen and other needed scripts for the project and in the end xcodegen.
Is there any alternative way?
Sth like
preGenerationScripts:
  - swiftgen.sh
  - someAnotherCoolScript.sh

This works, but then I need to reconfigure all Jenkins jobs 😞  and force every teammate to use a new solution - which doable, but thought, maybe there is a better way to do it already or planned.

That would be some extension for the main purpose of XcodeGen.
XcodeGen is a command line tool written in Swift that generates your Xcode project using your folder structure and a project spec.

There's a preGenCommand option in the project spec that does what you're asking for.

There's a preGenCommand option in the project spec that does what you're asking for.

Thank you very much! That's what I need!


Remove invalid commas

There were three invalid trailing commas in each theme file that were causing graphical problems with the sidebar and file tabs.

Thanks man, good job 👍


Accept input from a schema with multiple versions

"id": "citizenship_input_1",
      "group": ["C"],
      "schema": {
        "uri": "https://eu.com/claims/DriversLicense.json",
        "name": "EU Driver's License"
      },

can be
      "id": "citizenship_input_1",
      "group": ["C"],
      "schemas": [
      {
        "uri": "https://eu.com/claims/DriversLicense-v1.json",
        "name": "EU Driver's License"
      },
        {
        "uri": "https://eu.com/claims/DriversLicense-v2.json",
        "name": "EU Driver's License"
      }
      ]

Discussed and agreed to make uri an array where you can pick oneOf

Done.


[stable/redis] persistence does not work

Describe the bug
A clear and concise description of what the bug is.
State is not persisted across reboots although .Values.persistence is enabled and a pvc is mounted.
Version of Helm and Kubernetes:
latest GKE and latest helm
Which chart:
redis 6.4.5 and beyond, have not confirmed behaviour with older versions of chart, i do remember it working as expected in the past however
cluster mode is disabled
persistence is enabled
What happened:
i enable persistence (pvc mounted on /data by chart)
i create a key
i restart the redis-master pod
and the key no longer exists
What you expected to happen:
i expect the key to persist across restarts
How to reproduce it (as minimally and precisely as possible):
install redis as a dependency in a chart with these options
redis:
  enabled: true
  cluster:
    enabled: false
  networkPolicy:
    enabled: true
    allowExternal: false
  serviceAccount:
    create: true
  rbac:
    create: true
  usePassword: true
  metrics:
    enabled: true

Anything else we need to know:
no dump.rdb present in /data
redis-master-0:/data$ ls
lost+found

Also logs do not indicate any bgsave actions

Hi,
Did you try executing the save command to confirm that it is note an issue with the pvc mounting?

Thanks @javsalgar .
Save command works:
redis-master-0:/data$ ls
lost+found

then
<IP_ADDRESS>:6379> save
OK

then
redis-master-0:/data$ ls
dump.rdb  lost+found

Why would it not be automatically saving periodically?

Here is the configmap (comes from the chart)
apiVersion: v1
data:
  master.conf: |-
    dir /data
    rename-command FLUSHDB ""
    rename-command FLUSHALL ""
  redis.conf: |-
    # User-supplied configuration:
    # maxmemory-policy volatile-lru
  replica.conf: |-
    dir /data
    rename-command FLUSHDB ""
    rename-command FLUSHALL ""

Hi!
I'm facing same issue. According to this doc https://redis.io/topics/persistence persistence can be done either via "snapshotting" or via "append-only file" (AOF). The snapshotting (creating dump.rdb file) is controlled by the save config option. And the AOF is controlled by appendonly yes config option.
When I deploy Redis using this chart, the save config option is set to "" which disables snapshotting and the appendonly is set to no, so effectively persistence is disabled:
<IP_ADDRESS>:6379> CONFIG GET save
1) "save"
2) ""

<IP_ADDRESS>:6379> CONFIG GET appendonly
1) "appendonly"
2) "no"

I tried enabling snapshotting in a running Redis instance using command like:
<IP_ADDRESS>:6379> CONFIG SET save "60 10"
OK

It worked and Redis started saving data to disk, but I didn't find any dedicated option in this chart to configure that. Probably need to put it into a redis.conf file.

After playing with it a bit more I was able to enable snapshotting by adding top level property to my values.yml file:
configmap: |-
  dir /data
  save 60 10

Thanks for your findings @chychkan
The root of the problem is that the default redis.conf is being completely overwritten by the configmap.
I installed an arbitrarily older version of the chart (4.2.8) where no configmap was deployed, and the bg saving works as desired with the default redis.conf file.

actually scratch that, im not sure

We should be enabling AOF by default. As you can see, we're already doing it on the default Docker image's setup.sh
https://github.com/bitnami/bitnami-docker-redis/blob/master/5.0/debian-9/rootfs/libredis.sh#L352
However, this script is not being execute in the chart since we're rewriting the Docker image's command:
https://github.com/helm/charts/blob/master/stable/redis/templates/redis-master-statefulset.yaml#L67
I just created a PR to enable AOF by default.

Thanks, is it true that vanilla redis comes with rdb enabled and aof disabled? I feel like mimicking vanilla redis defaults is better

Hi @naseemkullah
In the links below you can find the advantages/disadvantages of using RDB or AOF persistence:
https://redis.io/topics/persistence#rdb-advantages
https://redis.io/topics/persistence#rdb-disadvantages
https://redis.io/topics/persistence#aof-advantages
https://redis.io/topics/persistence#aof-disadvantages
To me the key to use AOF instead of RDB is the one below:

RDB is NOT good if you need to minimize the chance of data loss in case Redis stops working

As we know, in K8s pods are ephemeral. Therefore, whatever configuration is less prone to errors when Redis is suddenly stopped, must be the default configuration.

Good point, I was actually thinking of that after posting my last comment. Just a few follow-up questions if you don't mind:

Would a pre-stop hook to write perform a SAVE and thus writing a dump.rdb upon SIGTERM solve this issue?

Is it possible to have both RDB and AOF enabled by default? According to documentation links provided it seems feasible.

For those of us who use redis as a DB rather than just as a cache, is there anyways to backup data with only AOF enabled?

Would a pre-stop hook to write perform a SAVE and thus writing a dump.rdb upon SIGTERM solve this issue?

Do you refer to a container hook? Please note that Hem hooks won't be suitable for this situation.

Is it possible to have both RDB and AOF enabled by default? According to documentation links provided it seems feasible.

It's not possible. See https://redis.io/topics/persistence#interactions-between-aof-and-rdb-persistence

is there anyways to backup data with only AOF enabled?

You can always run the "redis save" command

Hi @juan131

Yes I meant a container lifecycle pre-stop hook.

Thanks but I am confused because according to https://redis.io/topics/persistence#ok-so-what-should-i-use you can use both.

The general indication is that you should use both persistence methods if you want a degree of data safety comparable to what PostgreSQL can provide you.

RDB will be ignored if Redis is restarted. I wouldn't enable a second persistence method by default since it can overload Redis.

In the case both AOF and RDB persistence are enabled and Redis restarts the AOF file will be used to reconstruct the original dataset since it is guaranteed to be the most complete

Regarding the pre-stop hook, I'm okay with implementing a way to enable the hook when an optional parameter is set. Please feel free to create a PR adding support for it.

Just to confirm. AOF will be the only form of persistence enabled by default in the chart, and to enable RDB one will have to adjust the chart values?
FWIW in older versions of the helm chart, RDB seemed enable by default.


Reference variable, which would otherwise only be referenced in an assert()

Fix small compile error triggered in VS2015, update 3, in non-debug flavors.

LGTM. I'll merge this after CI builds finish.
A more robust fix is to not use assert() for these sort of things. As currently written, the tests don't test much when assert() is disabled, so retail test runs do very little.

Yeah; seemed too easy not to submit :-)
-jeff

On Jan 4, 2017, at 7:00 PM, Christopher Warrington<EMAIL_ADDRESS>wrote:
LGTM. I'll merge this after CI builds finish.
A more robust fix is to not use assert() for these sort of things. As currently written, the tests don't test much when assert() is disabled, so retail test runs do very little.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Issue #284 is about the same root problem.

I just pushed a branch (https://github.com/Microsoft/bond/tree/chwarr/comm-unref) with this fix and one for the problems in #284. After those CI builds pass, I'll merge it in, which will close this PR.


KAFKA-17767 Store the test catalog in Git [2/n]

Second part of #17397. This patch will take the extracted test catalog generate on trunk and commit it to an orphaned Git branch in the Apache Kafka repository

This approach isn't going to work. ASF generally does not allow bots to commit to project repos. Infra team has suggested using nightlies for this.


Multiple POST agents to discord using a master RSS feed?

Hi, I'm new to Huginn, and only have a fleeting knowledge of JSON etc, so I don't really know what's possible.
I'm in a discord server with a number of channels for different interests, and a list of youtube channels I want notifications of in the relevant channel when there's a new video.
For each channel I want the same data: channel name, video title, and video URL only.
youtube.com/feed/channel/1  goes to discord channel 1
youtube.com/feed/channel/2  goes to discord channel 2
youtube.com/feed/channel/3  goes to discord channel 3
Can I have a single YouTube123 RSS agent, with discord1, discord2, and discord3 post agents linked up receiving only the relevant channel's information to send on? Or will I need separate agents handling the data for each YT channel?
Hope the question makes sense.

Turns out yes, but probably a bad idea for debugging, and inefficient use of cores.
Posted below anyway for posterity (replace channel with identifying field of choice).
{
"post_url": "{% if channel == 'YTer1'' %}webhook1{% elsif channel == 'YTer2' %}webhook2{% elsif channel == ''YTer3" %}webhook3{% endif %}",
"expected_receive_period_in_days": "28",
"content_type": "json",
"method": "post",
"payload": {
"content": "Stuff to send"
},
"headers": {
},
"emit_events": "true",
"no_merge": "false",
"output_mode": "clean"
}


Object.fromEntries unusable

Using Object.fromEntries([['a', 1]]); produces the error below:
    3: Object.fromEntries([['a', 1]]);
              ^ Cannot call method `fromEntries` because property `fromEntries` is missing in statics of `Object` [1].
        References:
        [LIB] ..//static/v0.86.0/flowlib/core.js:38: declare class Object {
                                                                   ^ [1]

Object.fromEntries is a nonstandard function in Firefox 63+ only (not
any other browsers and not Node). It has a TC39 proposal but has
not yet been accepted.
If you wanted to submit a pull request to add support for this function
to Flow, you should modify lib/core.js:
https://github.com/facebook/flow/blob/0490dee17f323ab13cfcfd7b717a8db874775e49/lib/core.js#L38
But I’m not sure whether the maintainers would want to accept this PR.

Thanks @wchargin! I'll admit I didn't realize this was FF only. I could understand why this might not be accepted, so I'll just close this for now.

Any news on if/when this might be added to node?

@bfreundOST You’ll want to ask on the Node repo for that:
https://github.com/nodejs/node/issues?utf8=✓&q=fromEntries

Fixed with https://github.com/facebook/flow/pull/7435

this issue can be closed as it has been added: https://github.com/facebook/flow/blob/master/lib/core.js#L56
released in v0.101.0


Build LDFLAGS overwrite issue

extra_ld_flags is overwritten in build.py
Appending the value should keep whatever value was passed at
configuration time.

Can we split this into two PRs please?

@parkera Oops, I based the branch on another branch that was already merged, assuming the commit ID was gonna be the same. Fixed.

@swift-ci please test and merge


Is it possible to add the option to send the emote link instead?

Would it be possible to add a option that sends the link of the emote itself?
Much like in its predecessor this option allowed to change the image size by just adding a extension to the image link, it also allowed a quick output in slow systems and slow connections.
Sorry to make this request I don't mean to put pressure in anyone, specially in these dates

You can change the emote size by using modifiers, for example: :emotename:.resize-128 which would resize it to 128px. See the readme for all available modifiers.
I won't be adding emotes sent as links because it would not work with modifiers, for that you can use https://betterdiscord.app/plugin/FreeEmojis


No longer open source?

Version 3 of this app was released on the iOS App Store on May 22, but this repository hasn't been updated past version 2.8.1. Is this app no longer open source?

Thank you, I really appreciate it!


composer.log is missing in agent

Hello,
Using v8.10.0 with EKS 1.23 with IRSA I was able to install the agent and get it running, but when viewing the /var/mnt/core-dump-handler the composer.log is missing. When triggering a core dump nothing happens within the agent (assuming thats due to the missing log file).
Agent running:
[2023-02-07T17:04:29Z INFO  core_dump_agent] no .env file found
     That's ok if running in kubernetes
[2023-02-07T17:04:29Z INFO  core_dump_agent] Setting host location to: /var/mnt/core-dump-handler
[2023-02-07T17:04:29Z INFO  core_dump_agent] Current Directory for setup is /app
[2023-02-07T17:04:29Z INFO  core_dump_agent] Copying the crictl from ./crictl to /var/mnt/core-dump-handler/crictl
[2023-02-07T17:04:29Z INFO  core_dump_agent] Copying the composer from ./vendor/default/cdc to /var/mnt/core-dump-handler/cdc
[2023-02-07T17:04:29Z INFO  core_dump_agent] Starting sysctl for kernel.core_pattern /var/mnt/core-dump-handler/core_pattern.bak with |/var/mnt/core-dump-handler/cdc -c=%c -e=%e -p=%p -s=%s -t=%t -d=/var/mnt/core-dump-handler/cores -h=%h -E=%E
[2023-02-07T17:04:29Z INFO  core_dump_agent] Getting sysctl for kernel.core_pattern
[2023-02-07T17:04:29Z INFO  core_dump_agent] Created Backup of /var/mnt/core-dump-handler/core_pattern.bak
[2023-02-07T17:04:29Z INFO  core_dump_agent] Starting sysctl for kernel.core_pipe_limit /var/mnt/core-dump-handler/core_pipe_limit.bak with 128
[2023-02-07T17:04:29Z INFO  core_dump_agent] Getting sysctl for kernel.core_pipe_limit
kernel.core_pattern = |/var/mnt/core-dump-handler/cdc -c=%c -e=%e -p=%p -s=%s -t=%t -d=/var/mnt/core-dump-handler/cores -h=%h -E=%E
[2023-02-07T17:04:29Z INFO  core_dump_agent] Created Backup of /var/mnt/core-dump-handler/core_pipe_limit.bak
kernel.core_pipe_limit = 128
[2023-02-07T17:04:29Z INFO  core_dump_agent] Starting sysctl for fs.suid_dumpable /var/mnt/core-dump-handler/suid_dumpable.bak with 2
[2023-02-07T17:04:29Z INFO  core_dump_agent] Getting sysctl for fs.suid_dumpable
[2023-02-07T17:04:29Z INFO  core_dump_agent] Created Backup of /var/mnt/core-dump-handler/suid_dumpable.bak
fs.suid_dumpable = 2
[2023-02-07T17:04:29Z INFO  core_dump_agent] Creating /var/mnt/core-dump-handler/.env file with LOG_LEVEL=Debug
[2023-02-07T17:04:29Z INFO  core_dump_agent] Writing composer .env
    LOG_LEVEL=Debug
    IGNORE_CRIO=false
    CRIO_IMAGE_CMD=img
    USE_CRIO_CONF=false
    FILENAME_TEMPLATE={uuid}-dump-{timestamp}-{hostname}-{exe_name}-{pid}-{signal}
    LOG_LENGTH=500
    POD_SELECTOR_LABEL=
    TIMEOUT=600
    COMPRESSION=true
    CORE_EVENTS=true
    EVENT_DIRECTORY=/var/mnt/core-dump-handler/events

[2023-02-07T17:04:29Z INFO  core_dump_agent] Executing Agent with location : /var/mnt/core-dump-handler/cores
[2023-02-07T17:04:29Z INFO  core_dump_agent] Dir Content []
[2023-02-07T17:04:29Z INFO  core_dump_agent] INotify Starting...
[2023-02-07T17:04:29Z INFO  core_dump_agent] INotify Initialised...
[2023-02-07T17:04:29Z INFO  core_dump_agent] INotify watching : /var/mnt/core-dump-handler/cores

Executing into pod:
/var/mnt/core-dump-handler # ls
cdc                  core_pattern.bak     core_pipe_limit.bak  cores                crictl               crictl.yaml          suid_dumpable.bak

I've tried to update the vendor to rhel7 according to other issues seen with EKS, but this throws an error:
[2023-02-07T17:20:12Z INFO  core_dump_agent] Copying the composer from ./vendor/rhel7/cdc to /var/mnt/core-dump-handler/cdc
Error: No such file or directory (os error 2)

Hi @bdbrink Thanks for taking the time to look at the project.
I think you are on the right track. A failing cdc with no composer.log is likely caused by the wrong cdc being deployed.
Unfortunately it is very hard to capture the libc incompatibility problem.
Can you confirm the --values flags used for the install?
As per the docs I would expect you used --values values.aws.yaml
I have looked at the v8.10.0 image and have confirmed the cdc is there
podman run -it quay.io/icdh/core-dump-handler:v8.10.0 /bin/bash
[root@67269174863d app]# ls ./vendor/rhel7/
cdc

So I can only assume that the copy failure on the second attempt is due to some issues mounting the volume after the reinstall.
Can you uninstall the helm chart again and confirm the volumes have also been deleted before reinstalling with the values flag.
If the cdc still doesn't copy over can you log into the agent and try the copy manually?
cp ./vendor/rhel7/cdc /var/mnt/core-dump-handler/cdc

It seem like we have two possible issues here so apologies for all the questions.

@No9 Thanks for quick response!
I specified values.aws.sts.yaml for the chart values, deleted the volumes and gave it a fresh redeploy but the error is still persisting, when specifying to default the agent begins to run, but still no composer.log. The pods are crashlooping so I can't get into the agent to copy over manually (unless there is another way to do that). I'm using the arm64 image and the k8s nodes are using Amazon Linux2 with containerd for the runtime if any of that helps.

Can I clarify exactly where we are as I've got a feeling I'm going to have to try and replicate this:
You are running EKS 1.23 on arm64 with Linux2 worker nodes.
You are using the arm images from quay.io/icdh/core-dump-handler-musl:v8.10.0 so you have updated the main values.yaml to be:
image:
  registry: quay.io
  repository: icdh/core-dump-handler-musl
  tag: v8.10.0

or you are supplying --set image.repository=icdh/core-dump-handler-musl as an cli option.

# AWS requires a crio client to be copied to the server
daemonset:
  includeCrioExe: true
  vendor: rhel7 # EKS EC2 images have an old libc=2.26

serviceAccount:
  annotations:
    # See https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
    eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here

When you run it with default it works but still no composer log.
# AWS requires a crio client to be copied to the server
daemonset:
  includeCrioExe: true
  vendor: default # <---------- This is the change

serviceAccount:
  annotations:
    # See https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
    eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here

Setting the composer log to info with --set composer.logLevel=Info still doesn't provide any additional information after a core dump has been generated. Or in values.aws.sts.yaml
composer:
  logLevel: "Info"

Please correct me if I have misunderstood something as I want to be sure I'm on the same config as you.

Yes thats the exact setup I'm using/running, doing this all in the helm charts (deploying with v3.9.4 of helm), not using the cli for any inputs.

OK so it looks like default should be used as that successfully runs the agent.
If so I will be trying to do is get onto a host node and run the cdc --help to see if there are any dependency weirdness that has been introduced. Won't be for a few days though


updated differential expresson

Need to create PR to trigger R CMD action

Going to merge this so package updates work.


error: import cv2

My file works when I run it by itself, but when I run the pipeline graph on it, I get an error:
Traceback (most recent call last):
  File "C:\Users\kimjs\PycharmProjects\OakD\depthai-python\examples\SpatialDetection\spatial_tiny_yolo.py", line 5, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

I'm confused about this error because I have cv2 installed, otherwise my file wouldn't open by itself. Thank you in advance!

If I understand correctly, you have no problem when you run directly the code, but you get the error when started via the pipeline_graph command. I wonder if the same python executable is used in both cases.
What are the exact command lines you used ?
Can you try with using the absolute path of the python exec ?
So something like: pipeline_graph run "absolute_path_python spatial_tiny_yolo.py"

Thank you! Finding and using the absolute path of my venv python resolved the issue.


any plans for a simple gradio web ui?

Thanks for your suggestion! We will release the gradio demo in three or four days!
Also, we will release more checkpoints soon!

Thanks for your suggestion! We will release the gradio demo in three or four days!
Also, we will release more checkpoints soon!

amazing! when will more checkpoints come! such an amazing job here guys

awesome work!! Look forward for it!!!

Hi, we have released a gradio web ui, you can try it now!
Also, we have released one more ckpt: orbit up. More models will be open soon!

Hi, we have released a gradio web ui, you can try it now!
Also, we have released one more ckpt: orbit up. More models will be open soon!


added the metrics-newrelic-reporter 3rd party

Hi, I've created a simple reporter that can report the metrics into a New Relic account. I'm not a New Relic employee, I just work with their product and thought others might find this reporter useful.

You may wish to look at https://github.com/palominolabs/metrics-new-relic (disclaimer: I'm the author), which looks like it already does pretty much the same thing, albeit with more configurability.

Hi,
You’re right it’s basically the same thing. Looks like I should’ve googled more before writing my own, would’ve saved me the trouble…
Thanks,
Amir
From: Marshall Pierce<EMAIL_ADDRESS>Sent: Monday, December 7, 2015 2:06 PM
To: dropwizard/metrics<EMAIL_ADDRESS>Cc: Kibbar, Amir<EMAIL_ADDRESS>Subject: Re: [metrics] added the metrics-newrelic-reporter 3rd party (#896)
You may wish to look at https://github.com/palominolabs/metrics-new-relic (disclaimer: I'm the author), which looks like it already does pretty much the same thing, albeit with more configurability.
—
Reply to this email directly or view it on GitHubhttps://github.com/dropwizard/metrics/pull/896#issuecomment-162680701.


Update FileDrop.vue

Changes the "Video Language" to "Translate Subtitles to" to better reflect what this is actually doing.

Suggestion linked to issue #27.


Improve plotting speed and overall simulation performance by only plotting incremental changes to data_store

Update Issue title to more accurately reflect what's being done. This will be done by appending the incremental and newly computed simulation results in the data_store.

Update Issue title to more accurately reflect what's being done. This will be done by appending the incremental and newly computed simulation results in the data_store.


feat(footer): introduction

Related Ticket(s)
Refs #2862.
Description
This change adds a Web Components version of footer.
Changelog
New

<dds-footer-composite>, for CSR the remainder of components from data.
<dds-footer>, the top-level element in footer.
<dds-footer-logo>, the logo in footer.
<dds-footer-nav>, the primary nav in footer.
<dds-footer-nav-group>, a group of links of <dds-footer-nav>.
<dds-footer-nav-item>, a link in <dds-footer-nav>.
<dds-legal-nav>, a secondary nav in footer.
<dds-legal-nav-item>, a link in <dds-legal-nav>.
<dds-locale-button>, a launcher for <dds-locale-modal>.

Changed

Footer styles so it can be reused for Web Components.

@asudoh looks good! though the default now seems to not be loading the footer links.

Great catch @jeffchew  - Fixed.

LGTM, thank you @asudoh !


fake-async-test is broken for setTimeout(f, stringDelay)

core-js uses the following signature for setTimeout:
function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
fake-async-test assumes that delay is always numeric:
scheduleFunction(cb: Function, delay: number, args: any[] = [], id: number = -1): number {
If, for example, you have a code like:
setTimeout(() => setTimeout(() => console.log("Hello world"), 0), "2000")
everything works ok in browsers. You get your "Hello world" in 2000ms. But it doesn't work in tests. This simple test fails:
    it(`blah`, fakeAsync(() => {
        let gotIt = false;
        setTimeout(() => setTimeout(() => gotIt = true, 0), "2000");
        tick(3000);
        expect(gotIt).toBe(true);
    }));

The reason for it is that (fake-async-test.ts)):
var endTime = this._currentTime + delay;
is "02000" (of type 'string') in the call to setTimeout(..., "2000"). endTime is stored then in scheduler's entry. Upon execution of the task, currentTime is assigned from endTime:
this._currentTime = current_1.endTime;
and there is a call to setTimeout(..., 0), but this time:
var endTime = this._currentTime + delay;
becomes "020000" and not 2000 as one would expect.
The fix is easy:
var endTime = this._currentTime + delay;
should be replaced with
var endTime = this._currentTime + +delay;
None should really use string for the delay argument, but it happens when you, for example, define your delay in an angular2 template file as a parameter of a component. Everything works fine in dev/prod build but fails with "Error: 1 timer(s) still in the queue." error message in unit tests and it's not that obvious what really happens.

Why do you pass string as a second parameter? You have to put number there.

close for not an issue.


Not an issue (New Permutation)

Hi @bp0lr Thank you for the tool as I am using this in my workflow. While viewing other tools I came to know this https://github.com/maliciousgroup/maldns
leave the numeric permutation from the process but it is doing some extra permutations like below:
like the wordlist
one

domain
test.example.com

result from maldns
one-one.test.example.com
one-one.test.example.com
one.test-one.example.com
one.one-test.example.com
test-one.one.example.com
one-test.one.example.com
test.one-one.example.com
test.one-one.example.com

It would be much more useful if you can also add this to dmut.
Thanks

Hi @bp0lr Agree with you but one-one appended / permuted with the the root subdomain which may reveal some other possible domains.

Maybe I can work on a template system and let people add their own permutations.
That would be the best.

@bp0lr great :+1:


Remove unused tools from the dev container

Benefit/Result/Outcome
So that the dev container is as small and targeted as possible, containing no extra tools or packages.
Description
The dev container Dockerfile installs python and possibly additional packages that are no longer needed. This issue covers removing python and any related packages that are no longer needed.
Acceptance Criteria

Python is no longer installed on the dev container image
Any additional packages related to the python installation (or other unnecessary packages) are removed.

Closing this as OBE because it was done as part of the Bicep branch


cilium-cli: the following sequences hangs, install, test, uninstall, install, test

Testing install/uninstall/install patterns I ran into a hang when doing the following,
$ cilium install
$ cilium connectivity test
$ cilium uninstall
$ kubectl delete -n cilium-test deployments client echo-other-node echo-same-node
$ cilium install
$ cilium connectivity test
⌛ [gke_ezpz-scale-test_us-west2-a_cilium-cli-jf] Waiting for deployments [client echo-same-node] to become ready...

omitted output from commands that worked only the last connectivity test hangs on waiting to become ready.  Looking at pods,
$ kubectl get pods --all-namespaces
NAMESPACE     NAME                                                       READY   STATUS    RESTARTS   AGE
kube-system   cilium-gke-node-init-cjr9v                                 1/1     Running   0          6m58s
kube-system   cilium-gke-node-init-rwtbt                                 1/1     Running   0          6m58s
kube-system   cilium-k7xsf                                               1/1     Running   0          6m56s
kube-system   cilium-mq2qs                                               1/1     Running   0          6m56s
kube-system   cilium-operator-74c66fdc5-qp2cv                            1/1     Running   0          6m56s
kube-system   event-exporter-gke-564fb97f9-lnzl6                         2/2     Running   0          11m
kube-system   fluentbit-gke-hwvrc                                        2/2     Running   0          93m
kube-system   fluentbit-gke-z2vqm                                        2/2     Running   0          93m
kube-system   gke-metrics-agent-fxnqq                                    1/1     Running   0          93m
kube-system   gke-metrics-agent-fz5tg                                    1/1     Running   0          93m
kube-system   kube-dns-6465f78586-j4m48                                  4/4     Running   0          12m
kube-system   kube-dns-6465f78586-mq748                                  4/4     Running   0          12m
kube-system   kube-dns-autoscaler-7f89fb6b79-5k46v                       1/1     Running   0          11m
kube-system   kube-proxy-gke-cilium-cli-jf-default-pool-792dc158-6nsz    1/1     Running   0          28m
kube-system   kube-proxy-gke-cilium-cli-jf-default-pool-792dc158-w2ls    1/1     Running   0          92m
kube-system   l7-default-backend-7fd66b8b88-mj9hg                        1/1     Running   0          11m
kube-system   metrics-server-v0.3.6-7b5cdbcbb8-dzbs4                     2/2     Running   0          11m
kube-system   pdcsi-node-4fkd4                                           2/2     Running   0          93m
kube-system   pdcsi-node-5jkgp                                           2/2     Running   0          93m
kube-system   stackdriver-metadata-agent-cluster-level-d5c84778d-wx8zj   2/2     Running   0          11m

This is GKE environment created with,
gcloud container clusters create cilium-cli-jf  --preemptible --image-type COS --num-nodes 2 --machine-type n1-standard-4 --zone us-west2-a

The hang is repeatable and happens every time for me. The rationale to delete the pods in the middle there was to ensure new pods were created on the next cilium connectivity test otherwise I'm not convinced they will be managed pods. The uninstall step does not remove the pods. And also in GKE at least the restart-pod option doesn't not restart cilium-test namespaced pods, only kube-system pods. [Not clear to me if this is intended or a bug on its own.]
This appears to be incorrect behavior, but let me know if its a user error or unsupported pattern. Thanks!

Even simpler to get to the hang
$ cilium install
$ cilium connectivity test
$ kubectl delete -n cilium-test deployments client echo-other-node echo-same-node
$ cilium connectivity test
⌛ [gke_ezpz-scale-test_us-west2-a_cilium-cli-jf] Waiting for deployments [client echo-same-node] to become ready...

So doesn't need uninstall/reinstall.

Related to #67.

cilium connectivity test --force-deploy on the 2nd round may help.

I had missed this, but yes I think --force-deploy actually solves the issue.

Considering this fixed given --force-deploy.


Support buildkit builds

FEATURE REQUEST:
Description
Support building with new buildkit: https://docs.docker.com/develop/develop-images/build_enhancements/
The reason why I need this is NOT only because the buildkit is faster and supports many new features. But mainly because the 'old' builder has a nasty bug described here:
https://github.com/moby/moby/issues/3639
where mapping VOLUMES from inherited Dockerfile does not work as expected. I am affraid they have no intention to fix it and the recommendation (as you can read in the thread) is to use the new buildkit.
How to reproduce
When /etc/docker/daemon.json has { "features": { "buildkit": true } } or if I set environment variable DOCKER_BUILDKIT=1, neither of them is respected by the plugin.
What do you expect
Either introduce a parameter in pom.xml for the plugin, or respect buildkit global options.
What happened instead
Old builder is used.
Software:

docker version: Docker version 18.09.6, build 481bc77
Spotify's dockerfile-maven version: 1.4.1

Full backtrace

This seems to be still an issue , can someone update ?

Still can't manage to get it work:

[ERROR] the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled


How to install on Ubuntu 16.04

I created instructions on how to setup Mattermost on an Ubuntu 16.04.
This was something it33 asked for nicely (on the forums).
Compared with the instructions for setting up Ubuntu 14.04 I changed the markup on some places to make things nicer to read.

Thanks @okin! This is great! Queuing for review.

@enahum thanks for your feedback! I adjusted the mentioned parts to use a different user and also adapted some things from the PR you mentioned.
I did some slight rewrite in the Let's encrypt section. I previously copied it from the existing Ubuntu 14.04 guide but do not have the time to fully verify this. As far as I understand the commands things should be working but it is untested and therefore a thorough check would be nice.

@okin please rebase when you have a chance?

@esethna did a rebase :)

Thanks @okin, much appreciated!!

HI @okin, question on this,
In our other install guides we've had issues with the ulimit configuration, I just want to verify that this is covered or not necessary in the 16.04 install guide?
See screenshot example from Ubunu 14.04 guide:

Hi Eric,
this is currently not covered. Seems to have escaped my view!
After a quick search I think adding the following to the service file in the [Service]-Section should do the trick:
LimitNOFILE=50K 50K
(It is slightly more but I think readability is nicer.)
Do you have any instance (my one just carries around 10 users) or an easy way to test this?
-Niko
Am 28. November 2016 20:59:04 MEZ, schrieb Eric Sethna<EMAIL_ADDRESS>
HI @okin, question on this,
In our other install guides we've had issues with the ulimit
configuration, I just want to verify that this is covered or not
necessary in the 16.04 install guide?
See screenshot example from Ubunu 14.04 guide:

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/mattermost/docs/pull/646#issuecomment-263377112


Can't flash ESP8266

Hey,
I'm working with a WeMos Lolin32 with an OLED display.
I've managed to get the LED example to run be made properly, and now I'm at the step of trying to flash the code to the ESP chip.
The command make -C examples/led testbrings out the following output:
Ferdinands-MacBook-Pro:esp-homekit-demo Ferdi$ make -C examples/led test
esptool.py -p /dev/cu.SLAB_USBtoUART --baud 115200 write_flash -fs 8m -fm qio -ff 40m \
		0x0 /Users/Ferdi/Desktop/RISE/Code/ESP/ESP_examples/esp-open-rtos/bootloader/firmware_prebuilt/rboot.bin 0x1000 /Users/Ferdi/Desktop/RISE/Code/ESP/ESP_examples/esp-open-rtos/bootloader/firmware_prebuilt/blank_config.bin 0x2000 ./firmware/led.bin
esptool.py v1.2
Connecting...

A fatal error occurred: Failed to connect to ESP8266
make: *** [flash] Error 2

The funny thing at this point is, that the chip is reset multiple times (3 to be precise) at the flashing process, so I can confirm that the connection works. Apparently the issue lies within the flashing. What am I doing wrong? Am I missing something here?
If you need any infos from me just ask, I don't know what could factor into this, so I don't know which exact informations to provide.

if you run
esptool.py flash_id
what do you get?

You need to put chip into flash mode by connecting gpio0 to ground when you power it on. NodeMCU boards do that automatically but apparently your board doesn’t. There are two features those dev boards support: auto reset and auto flash. Looks like yours still support auto reset, but not auto flash.

Ok, i checked lolin32 schematic, it does support both auto features. Before digging into details, can you try updating esptool to latest version (2.x) and see if that helps.

One thing that I noticed: you use /dev/cu.SLAB_USBtoUART while I always use /dev/tty.SLAB_USBtoUART.

@Arduingo, The Output of esptool.py flash_id is this:
Ferdinands-MacBook-Pro:esp-homekit-demo Ferdi$ esptool.py flash_id
esptool.py v1.2
Traceback (most recent call last):
  File "/Volumes/case-sensitive/esp-open-sdk/xtensa-lx106-elf/bin/esptool.py", line 1270, in <module>
    main()
  File "/Volumes/case-sensitive/esp-open-sdk/xtensa-lx106-elf/bin/esptool.py", line 1179, in main
    esp = ESPROM(args.port, initial_baud)
  File "/Volumes/case-sensitive/esp-open-sdk/xtensa-lx106-elf/bin/esptool.py", line 71, in __init__
    self._port = serial.serial_for_url(port)
  File "/Library/Python/2.7/site-packages/serial/__init__.py", line 88, in serial_for_url
    instance.open()
  File "/Library/Python/2.7/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'

Looks like he's trying on the wrong port to me, since my board is on /dev/cu.SLAB_USBtoUART.
The update to 2.3 did the trick! Thanks a lot! Seems like I have 2 different versions installed on my machine and the PATH always pointed to the old version which created the issue. Thanks for the help!