bon 3.0 wishlist (far, maybe never accepted breaking changes)

⚠ There is no particular plan for a new major release right now! This issue exists just to record some thoughts on the things that we may potentially break in the far future, or we maybe we won't. They aren't as critical, or maybe even arguable, thus we don't have any immediate plans for a new major release yet.
Here are some items that we may consider doing as part of the bon 3.0 major release. These are specifically breaking changes that we can't afford to do as part of a minor/patch release.

Reconsider making the generated Builder type private (unexposed) by default. E.g. the builder type should contain __ as a prefix and be #[doc(hidden)] to effectively make it an "anonymous type". The reason is to hide it from the rustdoc output by default because its type signature is rather complex and noisy, such that it's unlikely people may read its docs.
Restrict the relative ordering of positional members, regular named members, and skipped members

Allow for groups and conflicts like in clap.  Also saw something like that in compile time builder, cannot find it now, as I recall it needed some solver to be run  at build time.
These features allow to state:

if this field was set, than some other field(s) must be set
if this field was set, than some other field(s) cannot be set

I have my manually crafted builders and do:

start from most stable input (most stable inputs are to the left in function parameters, allows for partial application to be effective), doubt it can be automated - hence forever manual builder. interestingly, bon helps partially with this basically adding partial application and named parameters somewhat into Rust (like it is in F#)
do most limiting input first. so if one group field sets most limits to reduce source code of generated types, they must be set first (not all methods available in consumer of builder at once). this can be optimization problem of groups/conflicts - find group constraints which limit type states most.
not sure if that possible, if field is elementary enum, allow named method to set field value for that. enum has variants Bar and Foo, and stored in field type so add method to set type_foo and type_bar. Useful with group feature.

Allow for groups and conflicts like in clap. Also saw something like that in compile time builder, cannot find it now, as I recall it needed some solver to be run at build time.
These features allow to state:

if this field was set, than some other field(s) must be set
if this field was set, than some other field(s) cannot be set

I have my manually crafted builders and do:

start from most stable input (most stable inputs are to the left in function parameters, allows for partial application to be effective), doubt it can be automated - hence forever manual builder. interestingly, bon helps partially with this basically adding partial application and named parameters somewhat into Rust (like it is in F#)
do most limiting input first. so if one group field sets most limits to reduce source code of generated types, they must be set first (not all methods available in consumer of builder at once). this can be optimization problem of groups/conflicts - find group constraints which limit type states most.
not sure if that possible, if field is elementary enum, allow named method to set field value for that. enum has variants Bar and Foo, and stored in field type so add method to set type_foo and type_bar. Useful with group feature.

Hi @dzmitry-lahoda, this issue is specifically about breaking changes. What you proposed is not a breaking change, therefore I've extracted it into #110.

The function builder required finish_fn, which may not look good in method chaining use case.
Not sure can we have option generate only two variant, <fn>, <fn>_with without need to call finish_fn?
use bon::builder;

#[builder]
fn greet(name: &str, level: Option<u32>) -> String {
    let level = level.unwrap_or(0);

    format!("Hello {name}! Your level is {level}")
}

// required fields into positional arguments
let greeting = greet("Bon");
assert_eq!(greeting, "Hello Bon! Your level is 0");

// uss <fn>_with for provide optional fields
let greeting = greet_with("Bon", |b| { b.level(24); });
assert_eq!(greeting, "Hello Bon! Your level is 24");

struct Tensor {}

#[bon]
impl Tensor {
    pub fn new() -> Self {
        Tensor{}
    }

    #[builder]
    fn op1(&self, x: &str, level: Option<&str>) -> Tensor {
        Tensor{}
    }

    #[builder]
    fn op2(&self, y: &str, level: Option<&str>) -> Tensor {
        Tensor{}
    }
}

let tensor = Tensor::new();
tensor.op1("x").op2("y");
tensor.op1_with("x", |b| b.level(2)).op2("y");

verse existing
let tensor = Tensor::new();
tensor.op1("x").call().op2("y").call();
tensor.op1("x").level(2).call().op2("y").call();

Hey @cksac the requirement of the finish_fn call can not be easily alleviated because this method is the one that converts TensorBuilder into Tensor. Bon generates the builder that is designed with extensibility in mind. For example, if you add more optional fields to the Tensor in the future, then how will the builder know if you intend to set the optional fields or it's already time to convert into the Tensor object?
See an alternative feature that may solve this problem. I have a draft PR for it https://github.com/elastio/bon/pull/125 which you can test for yourself (the release target is somewhere by the end of this week). It allows you to pass arguments into the start_fn and finish_fn.
I can't see a practical application in the example with the Tensor that you shown, so I'll show my example with the Point struct. I hope it'll help you to apply this idea to your use case with a Tensor or whatever else use case you have.
use bon::builder;

#[builder]
fn greet(#[builder(pos = start_fn)] name: &str, level: Option<u32>) -> String {
    let level = level.unwrap_or(0);

    format!("Hello {name}! Your level is {level}")
}

let greeting = greet("Bon").call();
let greeting = greet("Bon").level(24).call();

#[derive(bon::Builder)]
#[builder(start_fn = x, finish_fn = y)]
struct Point {
    #[builder(pos = start_fn)]
    x: u32,

    #[builder(pos = finish_fn)]
    y: u32,
}

let _ = Point::x(1).y(2);

@cksac let me know if this solves (or at least helps with) your problem

One more trick. If you want to avoid calling the finishing method, just make the finishing method accept one of the required fields (which although forces the caller to pass the value for this member as the last one in the chain), and then add setters for optional fields.
In this example, after the .arg2(2) call the Example object was already built with all optional fields set to None:
use bon::Builder;

#[derive(Builder)]
#[builder(finish_fn = arg2)]
struct Example {
    arg1: i32,

    #[builder(pos = finish_fn)]
    arg2: i32,

    #[builder(skip)]
    optional_1: Option<i32>,

    #[builder(skip)]
    optional_2: Option<i32>,
}

impl Example {
    fn optional_1(mut self, value: i32) -> Self {
        self.optional_1 = Some(value);
        self
    }

    fn optional_2(mut self, value: i32) -> Self {
        self.optional_2 = Some(value);
        self
    }
}

let _ = Example::builder().arg1(1).arg2(2).optional_1(99);

I'll probably need to document all these patterns in the "Patterns" section of the docs

I think we can generate two function variants from original function which use the generate builder? like
use bon::builder;

#[builder]
fn greet(name: &str, level: Option<u32>) -> String {
    let level = level.unwrap_or(0);
    format!("Hello {name}! Your level is {level}")
}

// generated helper functions
fn _greet(name: &str) -> String {
    greet().name(name).call()
}

fn _greet_with<F>(name: &str, set: F) -> String
where F: FnOnce(GreetBuilder)
{
    let builder = greet().name(name);
    set(builder);
    builder.call()
}

with custom finish_fn, it seems even harder to read?
tensor
    .op1("x") // TensorOp1Builder
    .level(24) // Tensor, finish_fn of op1
    .op2("y") // TensorOp1Builder
    .call() // Tensor, finish_fn of op2

compare to
    tensor
    .op1("x") // Tensor
    .op2_with("y",  |b| b.level(2)) // Tensor

As for me the closure syntax is harder to read and compose because now your code is nested inside of anther function. You can no longer use the partial builder pattern and you can't do an early return from the function.
See the comment https://github.com/idanarye/rust-typed-builder/issues/66#issuecomment-1114353926 from the author of typed-builder which explains why closure syntax is bad.
Could elaborate on your real use case where you'd like the syntax proposed here? I'd like to understand the logic behind the builder in your case to better understand the problem domain.

I use a lot of method chaining in a ML lib, the purpose enhancement is for readability.
you can see below code, the builder type returned in between the method chain, I can't tell which call create a Tensor without IDE's help, right?
tensor
    .op1("x") // TensorOp1Builder
    .level(24) // Tensor, finish_fn of op1
    .op2("y") // TensorOp2Builder
    .call() // Tensor, finish_fn of op2

In the example shown here the existing API already looks nice. Every method returns a Tensor on every step of an operation. Every operation takes only a single parameter. So I don't see a need for using bon in this case. bon is useful if your method takes 3 or more parameters (or at least it can grow in the future to accept more parameters).
Basically, as I understand your Tensor API it's more of a "combinators" combination where you can also apply the same combinators several times (like there is max_pool2D applied several times. While bon constraints the caller to never call the same setter twice.

The example I show did't apply bon yet, and some ops will take more than 1 args.
btw, I am propose the enhance for function builder only not struct.

If you'd mix a builder in the middle of this combinators layering(especially, if you remove the explicit finish_fn call), then it indeed becomes hard to distinguish where one combinator statrs and ends:
tensor
    .operation_1(some_arg, some_arg2) // -> Builder
    .optional_param_to_operation("foo") // -> Builder
    .call() // -> Tensor (now that we've set all optional params, call the next combinator) ...
    .operation_2(some_arg, some_other_arg) // -> Builder

The problem that you can add optional parameters requires an explicit finish_fn call. I don't see a way around it.
The closure syntax looks unpretty, and I would like to avoid generating multiple variants of the same API and setters if possible to keep compile times lower and cognitive overhead lower as well (when there is just one way to do something, it makes your code structure more consistent)

Btw, in the example here:
impl Tensor {
    #[builder]
    fn op1(&self, x: &str, level: Option<&str>, op2: Option<&'static str>) -> Tensor {
        Tensor{}
    }

    #[builder]
    fn op2(&self, y: &str, level: Option<&str>) -> Tensor {
        Tensor{}
    }
}

let tensor = Tensor::new();
tensor.op1("x").op2("y");
tensor.op1_with("x", |b| b.level(2)).op2("y");

The tensor.op1("x").op2("y") can't possibly work because there is ambiguity: "are you trying to set the parameter named op2 in the op1 method, or are you already finished and want to call the op2 method on Tensor?"
Same thing with
tensor.op1_with("x", |b| b.level(2)).op2("y");

Is that op2 a parameter or a method on Tensor? The compiler has no way to know at which point it should convert the builder into a Tensor.

here is a working example showing what I want to achieve. And comparison of two style.
for implementation, I think we can allow a config to generate one of fn builder to avoid breaking change.
use bon::bon;

struct Tensor {}

#[bon]
impl Tensor {
    pub fn new() -> Self {
        Tensor {}
    }

    #[builder]
    fn _sum(
        &self,
        dims: &[i64],
        #[builder(default)] keep_dim: bool,
        #[builder(default)] mean: bool,
    ) -> Tensor {
        Tensor {}
    }

    // GENERATED, all required parameters are positional
    fn sum(&self, dims: &[i64]) -> Tensor {
        self._sum().dims(dims).call()
    }

    // GENERATED, all required parameters are positional, with clouser to set optional parameters
    fn sum_with<F, __KeepDim, __Mean>(&self, dims: &[i64], set: F) -> Tensor
    where
        for<'__f1, '__f2> F: FnOnce(
            TensorSumBuilder<
                '__f1,
                '__f2,
                (
                    ::bon::private::Set<&'__f1 [i64]>,
                    ::bon::private::Unset<::bon::private::Optional>,
                    ::bon::private::Unset<::bon::private::Optional>,
                ),
            >,
        ) -> TensorSumBuilder<
            '__f1,
            '__f2,
            (::bon::private::Set<&'__f1 [i64]>, __KeepDim, __Mean),
        >,
        __KeepDim: bon::private::IntoSet<Option<bool>, TensorSumBuilder__keep_dim>,
        __Mean: ::bon::private::IntoSet<Option<bool>, TensorSumBuilder__mean>,
    {
        let b = self._sum().dims(dims);
        set(b).call()
    }

    #[builder]
    fn _mean(&self, dims: &[i64], #[builder(default)] keep_dim: bool) -> Tensor {
        Tensor {}
    }

    fn mean(&self, dims: &[i64]) -> Tensor {
        self._mean().dims(dims).call()
    }

    fn mean_with<F, __KeepDim>(&self, dims: &[i64], set: F) -> Tensor
    where
        for<'__f1, '__f2> F: FnOnce(
            TensorMeanBuilder<
                '__f1,
                '__f2,
                (
                    ::bon::private::Set<&'__f1 [i64]>,
                    ::bon::private::Unset<::bon::private::Optional>,
                ),
            >,
        ) -> TensorMeanBuilder<
            '__f1,
            '__f2,
            (::bon::private::Set<&'__f1 [i64]>, __KeepDim),
        >,
        __KeepDim: ::bon::private::IntoSet<Option<bool>, TensorMeanBuilder__keep_dim>,
    {
        let b = self._mean().dims(dims);
        set(b).call()
    }
}

fn main() {
    let t = Tensor::new();

    // exiting
    let output = t
        ._sum()
        .dims(&[1, 2])
        .keep_dim(true)
        .mean(false)
        .call()
        ._mean()
        .dims(&[1])
        .keep_dim(true)
        .call()
        ._sum()
        .dims(&[1])
        .call()
        ._mean()
        .dims(&[1])
        .call();

    // proposed
    let output = t
        .sum_with(&[1, 2], |b| b.keep_dim(true).mean(false))
        .mean_with(&[2], |b| b.keep_dim(true))
        .sum(&[1])
        .mean(&[1]);
}

@cksac how about this? What if bon generates a From<TBuilder> for T for you, so you can then implement such API with the closure manually if you want. Right now such impl isn't generated, but it's possible to add, here is how it looks:
struct Tensor {}

// Define optional parameters in a struct
#[derive(bon::Builder)]
struct SumOptionalParams {
    #[builder(default)]
    keep_dim: bool,

    #[builder(default)]
    mean: bool,
}

// This impl will be generated by `bon::Builder` (maybe by default, or maybe opt-in via an attribute config)
impl<KeepDim, Mean> From<SumOptionalParamsBuilder<(KeepDim, Mean)>> for SumOptionalParams
where
    KeepDim: bon::private::IntoSet<Option<bool>, SumOptionalParamsBuilder__keep_dim>,
    Mean: bon::private::IntoSet<Option<bool>, SumOptionalParamsBuilder__mean>,
{
    fn from(builder: SumOptionalParamsBuilder<(KeepDim, Mean)>) -> Self {
        builder.build()
    }
}

impl Tensor {
    pub fn new() -> Self {
        Tensor {}
    }

    fn sum<T: Into<SumOptionalParams>>(
        &self,
        dims: &[i64],
        optional: impl FnOnce(SumOptionalParamsBuilder) -> T,
    ) -> Tensor {
        let params: SumOptionalParams = optional(SumOptionalParams::builder()).into();
        Tensor {}
    }
}

let t = Tensor::new()
    .sum(&[1, 2], |b| b.keep_dim(true).mean(false));

This code compiles with the current version of bon. The thing that's lacking is that From<TBuilder> for T impl.
Or maybe it's better to have a trait that could be used as a geneiruc bound for the return type of the closure smth like
trait Builder {
    type Output;

    fn build() -> Self::Output;
}

but I'm not sure about it yet.

@Veetaha , with From<TBuilder> for T, still a lot of work at user end, also the original function need to rewrite..
I am appreciate if bon can generate all from original function definition. That's why I post in this issue bon 3.0 wishlist :)

I don't think there is anything 3.0 to this feature, because it doesn't require a breaking change, I created a separate issue https://github.com/elastio/bon/issues/127 for this. I'm fine with having a From<TBuilder> for T syntax, but I'm currently not convinced that bon should generate the whole closure syntax because I don't have evidence of broad demand for this feature.

Closing this in favour of https://github.com/elastio/bon/issues/156


Add version command to cardano-node-chairman

This is to address https://github.com/input-output-hk/cardano-node/issues/1064
Example usage output:
cabal run cardano-node-chairman:cardano-node-chairman
Up to date
Chairman sits in a room full of Shelley nodes, and checks if they are all
behaving ...

Usage: cardano-node-chairman COMMAND
  Chairman checks Cardano clusters for progress and consensus.

Available options:
  -h,--help                Show this help text

Available commands:
  run
  version

bors merge


New website to host the private GitHub standards repository data

Background
A new website is needed to host the list of private repositories that will be generated by the GitHub standards repository.
Proposed user journey
Create a new website or a replica of the current website to host the list of private repositories generated by the GitHub standards repository. Modify the GitHub standards repository to send the private data to this website.

New python flask website prototype created, has authentication using auth0 https://github.com/ministryofjustice/operations-engineering-reports-flask
Basic at the moment.

ToDO: make templates for GitHub Collaborators and GitHub Repositories, add routes in views.py, implement the logic that creates the data and places the data on the two webpages

ToDO: make templates for GitHub Collaborators and GitHub Repositories, add routes in views.py, implement the logic that creates the data and places the data on the two webpages

WIP PR raised on https://github.com/ministryofjustice/operations-engineering-reports with the new site.
Moving onto the standards repo so that it collects the private data.
Once ready will merge both repo's at the same time and test out and troubleshoot the new versions together.

Site is live: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/
When press log in button will get user email from GH via Auth0, if that email is an MoJ approved email then the private repo screen will be displayed


accept: don't do unnecessary dodgy pointer things

Motivation:
We never look at the socket address that accept(4) returns so we
shouldn't ask for it. Additionally, it wasn't always the right size (in
IPv6 case) and also the pointer operations were dodgy.
Thanks to @milseman for the pointer.
Modifications:
Remove the whole socket address pointer stuff for accept.
Result:
Cleaner code.

Gotta fix that compile error.


Updating bower.json to reference non-minified file

The minified version of plotly.min.js results in grunt-contrib-uglify
hanging when it hits the file
(https://github.com/gruntjs/grunt-contrib-uglify/issues/233)
Best practices captured at https://github.com/bower/bower/issues/393e
specify that the main bower file should point to unminified files.

That makes sense. Would you mind making a PR to https://github.com/plotly/plotly.js?
Thanks in advance!


Support AMD64 Docker builds via BUILDPLATFORM

Thoughts welcome.
While we don't make it easy to build our templated Dockerfiles locally (at least until we can land #968), but we currently punish x86 holdouts by requiring them to emulate ARM. This should still default to ARM on the ARM64 build agents and deployment targets that we prescribe but allows for flexibility via the BUILDPLATFORM Docker built-in.
https://docs.docker.com/build/building/multi-platform/#building-multi-platform-images

Can you specify buildplatform via bk? I think last time I tried I wasn't having fun with the plugins.

@samchungy BUILDPLATFORM should be defaulted based on the instance type. Were you seeing something different?

Ah right, --platform defaults to --platform=${TARGETPLATFORM} and I think we need to use buildx to access that properly.


Internal Out-Default doesn't work and messages to host are buffered?

Steps to reproduce
PowerShell console messages are not displayed with correct order. This issue happens with a lot of cmdlets but some cmdlets(ex get-process/get-service) work well. For example, run the following script. You can see the messages shown with wrong order. I know 'Out-Default' is called internally from most of get-xxx cmdlets but it looks like it does't work in some cases. I think console messages should be displayed sequentially with correct order because 'Out-Default' is called internally. But actual behavior is not(Out-Default is called but the message is buffered and not displayed). So please check if this is a bug or by design with host message buffering.
Write-Output "Before get-acl"
get-acl
Write-Output "After get-acl"
Read-host "Enter something"

Expected behavior
The output messages are displayed in powershell console/ISE with the following order.
Before get-acl

    ディレクトリ: C:\WINDOWS

Path     Owner                       Access
----     -----                       ------
system32 NT SERVICE\TrustedInstaller CREATOR OWNER Allow  268435456...

After get-acl
Enter something:

Actual behavior
The powershell console/ISE shows the messages in wrong order like this. The output of get-acl is buffered and not displayed and message of Read-Host appears prior to output of get-acl.
Before get-acl

Enter something:   <---- Should be displayed after output of get-acl

    ディレクトリ: C:\WINDOWS

Path     Owner                       Access
----     -----                       ------
system32 NT SERVICE\TrustedInstaller CREATOR OWNER Allow  268435456...
After get-acl

Environment data

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.1532
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1532
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

Please see #4594.

Closed as dup #4594.


xSCSMA: Speed Enhancement for Test-Resource

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Task list

[X ] Added an entry under the Unreleased section of the change log in the README.md.
Entry should say what was changed, and how that affects users (if applicable).
[ ] Resource documentation added/updated in README.md.
[ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
[ ] Comment-based help added/updated.
[ ] Localization strings added/updated in all localization files as appropriate.
[ X] Examples appropriately added/updated.
[X ] Unit tests added/updated. See DSC Resource Testing Guidelines.
[ X] Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
[ X] New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

This change is

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

Codecov Report

Merging #31 into dev will decrease coverage by 1.99%.
The diff coverage is 25%.

@@          Coverage Diff           @@
##             dev      #31   +/-   ##
======================================
- Coverage   35.2%   33.21%   -2%
======================================
  Files          7        7
  Lines        551      551
======================================
- Hits         194      183   -11
- Misses       357      368   +11

Impacted Files
Coverage Δ

...rverSetup/MSFT_xSCSMARunbookWorkerServerSetup.psm1
0.9% <0%> (ø)
:arrow_up:

...SMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.psm1
2.08% <0%> (ø)
:arrow_up:

...eServerSetup/MSFT_xSCSMAWebServiceServerSetup.psm1
31.01% <50%> (-6.97%)
:arrow_down:

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 2211419...0da39be. Read the comment docs.


[stable/ambassador] Bump Ambassador to v0.84.1

Signed-off-by: Shubham<EMAIL_ADDRESS>Is this a new chart
No
What this PR does / why we need it:
Bump Ambassador to v0.84.1
Checklist

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/chart])

/assign @kflynn

/lgtm


Updates to work with 3.10 changes in "oc cluster up"

For instance --version flag will be gone.
Check out the write-up at the minishift repo:
https://github.com/minishift/minishift/issues/2248

Hi, is this going to be fixed? I would like to use version 3.11 but it is not working

OKD 3.10 was released on 13SEP, now we do have 3.11 as well.

After diggin...
oc-cluster-wrapper project is kind of deprecated.
oc command has bundled in persistence.
To start OKD 3.10+
oc cluster up --base-dir=$HOME/.oc --loglevel=7

BUT
See
https://github.com/openshift/origin/issues/21553
so oc cluster up  is also not a way to start locally OKD cluster.
and https://github.com/openshift/installer is now in favor ... but it requires virtualization (oc cluster up just needs docker)


flat: definition of the module has been added

https://github.com/hughsk/flat

flat/flat.d.ts
check list

[ ] is collect naming convention?

https://www.npmjs.com/package/flat
http://bower.io/search/?q=flat
others?

[X] has a test file? (flat/flat-tests.ts or others)
[ ] pass the Travis-CI test?

thanks mate!


Updating cards?

Do you know if there's anyway to support updating cards if one makes changes in the Obsidian file?
At the moment, it creates a new card.

I’m confused by your question. Right now, if a card is attempted to be added that has the same name in the same deck, the card is updated rather than created. Could you clarify what you mean by this with an example case?


cigien: Blacklist hack.truth77(?:@gmail.com)?

cigien requests the blacklist of the keyword hack\.truth77(?:@gmail\.com)?. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

hack\.truth77(?:@gmail\.com)? has been seen in 5 true positives, 0 false positives, and 0 NAAs.

hack\.truth77(?:@gmail\.com)? has been seen in 5 true positives, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ

Approved by Spevacus in Charcoal HQ


Edit the system prompt

Describe the feature
I would like a config setting to set a custom systemContext. I prefer a very concise agent and customizing the systemContext allows the user to tune the agent to their preferences.

Please try the new v4.5.0 version.


Go Upgrade

Notes for Reviewers

This PR fixes #12829

Signed commits

[ ] Yes, I signed my commits.

I updated the version of go in these files, the next step is testing?

After making these changes, I successfully ran make build-server and make ui-build.
For make docker build, I don't know if it is my computer lacks capacity, it got stuck at
➜  meshery git:(go-version-upgrade) ✗ make docker-build
# `make docker-build` builds Meshery inside of a multi-stage Do
# `make docker-build` builds Meshery inside of a multi-stage Docker container.
# This method does NOT require that you have Go, NPM, etc. inst
# This method does NOT require that you have Go, NPM, etc. installed locally.
DOCKER_BUILDKIT=1 docker build -f install/docker/Dockerfile -t
DOCKER_BUILDKIT=1 docker build -f install/docker/Dockerfile -t layer5/meshery --build-arg TOKEN= --build-arg GIT_COMMITSHA=576
DOCKER_BUILDKIT=1 docker build -f install/docker/Dockerfile -t layer5/meshery --build-arg TOKEN= --build-arg GIT_COMMITSHA=5763fd32c72569aa24ecfd43168857ebaf256c80 --build-arg GIT_VERSION=v
DOCKER_BUILDKIT=1 docker build -f install/docker/Dockerfile -t layer5/meshery --build-arg TOKEN= --build-arg GIT_COMMITSHA=5763fd32c72569aa24ecfd43168857ebaf256c80 --build-arg GIT_VERSION=v0.7.167 --build-arg RELEASE_CHANNEL="edge" .
[+] Building 608.7s (31/59)               docker:desktop-linux
 => [internal] load build definition from Dockerfile     30.7s
 => => transferring dockerfile: 5.73kB                    0.0s
 => [internal] load .dockerignore                        30.3s
 => => transferring context: 2B                           0.1s
 => [internal] load metadata for docker.io/library/alpin  2.7s
 => [internal] load metadata for docker.io/layer5/getnig  2.5s
 => [internal] load metadata for docker.io/library/ubunt  2.7s
 => [internal] load metadata for docker.io/library/golan  3.1s
 => [internal] load metadata for docker.io/library/node:  2.7s
 => CACHED FROM docker.io/layer5/getnighthawk:v1.0.1@sha  0.1s
 => [seed_content 1/5] FROM docker.io/library/alpine:3.1  0.0s
 => [internal] load build context                       174.7s
 => => transferring context: 31.73MB                    170.3s
 => [wrk2 1/6] FROM docker.io/library/ubuntu@sha256:80dd  0.0s
 => [base-node 1/1] FROM docker.io/library/node:18.13.0-  0.0s
 => [meshery-server 1/5] FROM docker.io/library/golang:1  0.0s
 => CACHED [meshery-ui-provider-builder 1/4] WORKDIR /ap  0.0s
 => CACHED [seed_content 2/5] RUN apk add --no-cache cur  0.0s
 => CACHED [seed_content 3/5] RUN lines=$(curl -s https:  0.0s
 => CACHED [seed_content 4/5] RUN curl -L -s https://git  0.1s
 => CACHED [wrk2 2/6] RUN apt-get -y update && apt-get -  0.0s
 => CACHED [wrk2 3/6] RUN apt-get -y update && apt-get -  0.0s
 => CACHED [wrk2 4/6] RUN git config --global user.email  0.0s
 => CACHED [wrk2 5/6] RUN git config --global user.name   0.1s
 => CACHED [meshery-server 2/5] RUN adduser --disabled-l  0.0s
 => CACHED [meshery-server 3/5] WORKDIR /github.com/mesh  0.1s
 => [wrk2 6/6] RUN git clone --depth=1 https://github.  574.4s
 => CACHED [meshery-ui-provider-deps 1/4] RUN apk add --  0.0s
 => CACHED [meshery-ui-provider-deps 2/4] WORKDIR /app    0.0s
 => CACHED [meshery-ui-provider-deps 3/4] COPY provider-  0.0s
 => CACHED [meshery-ui-provider-deps 4/4] RUN npm ci --o  0.0s
 => CACHED [meshery-ui-deps 3/4] COPY ui/package.json ui  0.0s
 => [meshery-ui-provider-builder 2/4] COPY --from=mesh  399.6s
 => [meshery-ui-deps 4/4] RUN npm ci --omit=dev --lega  399.6s
 => [meshery-server 4/5] ADD . .                        399.0s
 => CACHED [stage-8  2/22] RUN set -ex &&     apk --upda  0.0s
 => CACHED [stage-8  3/22] RUN update-ca-certificates     0.0s
 => CACHED [stage-8  4/22] COPY ./server/cmd/server-conf  0.0s
 => [stage-8  5/22] COPY ./server/meshmodel /app/serve  399.0s

Is this done yet?

@weilirs
Let's discuss this during the Meshery Development call today at 9:00 AM CT | 8:30 PM IST. Adding it as an agenda item to the meeting minutes || meeting link.


✨ Add retryDelay option

See React Query Docs

:tada: This issue has been resolved in version 1.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Save Support for RDF Format

As a User, I want to have the ability to save my data in RDF format, So that I can easily exchange data with other applications that use the same format.
Acceptance Criteria:

When I am using the Ketcher application, I should see an option to save my data in RDF V2000 and RDF V3000 format under File format
menu.

RDF V2000 and RDF V3000 should be displayed after "SDF" option.

When I choose to save my data in RDF format, the application should convert my data into RDF format and save it to the specified location.

I should be able to name the RDF file during the save process and the file extension should be .rdf.

If a user added multi-tailed arrow to Canvas, the default save option should be changed from MDL Molfile V2000 to MDL Rxnfile V2000 (also MDL Molfile V3000 should be changed to MDL Rxnfile V3000)

Saving/loading of reaction with Multi-Tailed Arrow should work as for .RXN with the single arrow:

Save a reaction with Multi-Tailed Arrow SDF V2000, SDF V3000, InChlm InChl AuxInfo, InchlKey - the "Convert error! core:  is not a base molecule" error is displayed:

Save a reaction with Multi-Tailed arrow to Daylight SMARTS, Daylight SMILES or Extended SMILES, CML should save the root reaction as it work for reaction with the single arrow in RXN

Errors and warnings will be covered in scope of #5338

It will be tested in the scope of https://github.com/epam/Indigo/issues/2237, please check this task for more details.


docker lvm and filesystem issues

The current implementation of mantl is not creating the docker filesystem correctly:
This is what I am seeing with overlay fs on a new system (with docker using /var/lib/docker instead of the mantl lv:
storage Driver: overlay
 Backing Filesystem: extfs

A docker lv should be in the mantll lv and mounted at /var/lib/docker, not mounted as part of root.
The docker lv filesystem should be xfs instead of extfs.

For reference, here seems to be the most active docker issue: https://github.com/docker/docker/issues/10294
And RHEL's guidelines for only using xfs with overlay are at: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.2_Release_Notes/technology-preview-file_systems.html

Just some things we need to do that docker-storage-setup doesn't:

create lv dockerlv: vcreate -n dockerlv  -L 40G mantl
create filesystem: mkfs -t xfs /dev/mantl/dockerlv
update /etc/fstab: /dev/mantl/dockerlv /var/lib/docker xfs defaults 0 0
mount /var/lib/docker
start docker

I like the way CoreOS does this via unit files (like docker-storage-setup).
Just thinking about the different code paths:
extra devices available (aws, gce, openstack):
device mapper: create vg/lv (docker-storage-setup)
overlay: create vg/lv (docker storage-setup), xfs fs, /etc/fstab
#cloud-config
coreos:
  units:
    - name: format-ephemeral.service
      command: start
      content: |
        [Unit]
        Description=Formats the ephemeral drive
        After=dev-xvdb.device
        Requires=dev-xvdb.device
        [Service]
        Type=oneshot
        RemainAfterExit=yes
        ExecStart=/usr/sbin/wipefs -f /dev/xvdb
        ExecStart=/usr/sbin/mkfs.ext4 -F /dev/xvdb
    - name: var-lib-docker.mount
      command: start
      content: |
        [Unit]
        Description=Mount ephemeral to /var/lib/docker
        Requires=format-ephemeral.service
        After=format-ephemeral.service
        Before=docker.service
        [Mount]
        What=/dev/xvdb
        Where=/var/lib/docker
        Type=ext4

fixed by #1032


Fix issue #9080 - NLocal docstrings update with examples

Summary
Fix issue #9080 - By updating the docstrings of the NLocal class in qiskit/circuit/library/n_local/n_local.py.
Details and comments
None.

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


⚠ Bofrost.be has degraded performance

In 9c91b3f, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2217 ms

Resolved: Bofrost.be performance has improved in 6aef7cd after 34 minutes.


net: lwm2m: Prevent notifications on non-readable resources

In case a non-readable resource gets updated (either by the server or
with an API), it makes no sense to send a notification in such case, as
no such resources are not included in notifications anyway.
Fixes #36927
Signed-off-by: Robert Lubos<EMAIL_ADDRESS>

CC @@huelsenfruchtzwerg


Add "*" hotkey to toggle starred flag on the selected message.

Automated message from Dropbox CLA bot
@dawran6, it looks like you've already signed the Dropbox CLA. Thanks!

@dawran6 one thing actually that you should change. flags is actually an array, so you should have flags = ["starred"];

Good catch @lonerz!  I fixed that and merged.


Provide flexible way to update TypeScript specification

TypeScript Version:  2.1.5
Problem
Current specification doesn't describe some features from latest stable version of compiler, e.g. null is not assignable to void https://github.com/Microsoft/TypeScript/issues/11758
Specification can't be easy changed, because is first authored as a Microsoft Word (docx) file  https://github.com/Microsoft/TypeScript/tree/master/doc#spec-contributions:

It's closed format and requires special editors.
It's binary format and doesn't allow see changes between versions.

Suggestion

Use markdown as source format for specification.
Pros:

Don't need special editors.
This is text format which allow to see changes between versions.
This format already used in handbook https://github.com/Microsoft/TypeScript-Handbook

Generate other formats from markdown.

There is already a markdown version: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md - is it not suitable as a source for some reason? Copy editors? Validation?
The source is mostly very clean and idiomatic markdown, the only real grossness I've seen in there is the grammar using  , which seems like it could use <pre> and regular spaces (  is ~ 2 spaces?)
It would be nice if it could get into a state good enough that PRs that would affect the spec must also update spec.md before merging - would maintaining this as multiple issues update be a burden? (twice the change conflicts)
Should it be broken up into spec_4_statements.md etc?
Would PRs against it as it currently is be accepted? I'm no spec writer, but I could definitely try to go through the release blogs and offer strawman updates.

The spec is now an "archived" artifact and we won't be tracking defects against it anymore.


let-bindings should be eliminated in astconv

While working on #294, I realized that we can completely eliminate let-bound parameters in astconv by inlining the expressions into their use locations. The benefit of this is that the IR remains small and doesn't need to handle let bindings and I couldn't figure out any downsides to this.
For example, we can turn:
let #Cur = #I + 1;
m := new Mult[#Cur];
k := new Add[#Cur];

into:
m := new Mult[#I+1];
k := new Add[#I+1];

This is also exactly how I was thinking of handling parameters bound in the with section of a component (by inlining).
Thoughts @UnsignedByte & @gabizon103?

I can't think of any issues here either, sounds good to me.


vTaskDelay multicore bug (forever loop in vTaskDelay) (IDFGH-2669)

Environment
Development Kit: ESP32-WROVER-B
Module or chip used: WINGONEER T-Koala ESP32
IDF version: v4.1-dev-2055-gf5b82c5b1
Build System: CMake
Compiler version: crosstool-NG esp-2019r2) 8.2.0
Operating System: Linux
Power Supply: USB
Problem Description
I have been working on finding a bug for the last two days and I now believe there is a bug in vTaskDelay. The code does not crash, but my task and possibly the network task get stuck in vTaskDelay. I can ping the board, but network is not working. Also my high priority debug thread is running.
Using debug printouts via a task with higher priority, I have found that my timer task does not return from vTaskDelay. I also get the following prinouts:
E (56667) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (56667) task_wdt:  - IDLE1 (CPU 1)
E (56667) task_wdt: Tasks currently running:
E (56667) task_wdt: CPU 0: IDLE0
E (56667) task_wdt: CPU 1: timer
I am porting another application to ESP, which already has a timer implementation and the timer internally uses vTaskDelay with variable timeouts.
The bug is only triggered if I activate another task, which initiates a client HTTP connection with a response timeout. I believe both my timer task and the lwIP network task goes into a foreverloop in vTaskDelay.
As a test, I have redesigned my timer to instead use xTimerCreate/xTimerStart and I can no longer reproduce the error.
I do not believe this is a stack issue and I have the following enabled:
$ grep ASSERT sdkconfig
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set
CONFIG_FREERTOS_ASSERT_DISABLE is not set
CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set
CONFIG_OPENSSL_ASSERT_EXIT=y
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set

I am porting another application to ESP, which already has a timer implementation and the timer internally uses vTaskDelay with variable timeouts.

Just to rule out the obvious. Check that the timer task isn't in a loop continuously calling vTaskDelay(0).

The bug is only triggered if I activate another task, which initiates a client HTTP connection with a response timeout. I believe both my timer task and the lwIP network task goes into a foreverloop in vTaskDelay.

What are the priorities and core affinities of the timer and HTTP task?
When the task WDT triggers, you can usually tell where a task is stuck from the backtrace. A backtrace will be printed if you configure the task WDT to panic on a timeout (via the CONFIG_ESP_TASK_WDT_PANIC option).

Yes, I triple checked that I do not run into the condition: vTaskDelay(0)
Thanks for the CONFIG_ESP_TASK_WDT_PANIC tip. I'll try that soon.
I had the code compiled with -02. Going back do -g seems to remove the problem. Are there any known bugs in the Tensilica GCC version?
I am still investigation. I believe my own code works with -02, but not ESP-IDF libs. However, I had to add the following to this very basic function:
#ifdef ESP_PLATFORM
#pragma GCC push_options
#pragma GCC optimize ("O0")
#endif
DoubleLink*
DoubleList_removeFirst(DoubleList* o)
{
if(o->next != (DoubleLink*)o)
{
DoubleLink* l = o->next;
DoubleLink_unlink(l);
return l;
}
return 0;
}
#ifdef ESP_PLATFORM
#pragma GCC pop_options
#endif
I found out by instrumenting the code that the C code line "if(o->next != (DoubleLink*)o)" produced assembler code with an infinite loop.

After more testing, no code can be compiled with -O2. I had a crash inside the included Lua VM. The build appears to work after compiling everything with -g. The compiler is without doubt broken.

Or you have a stack corruption somewhere and what you think your code is doing is not what the cpu is seeing.
You should enable stack canary in the config. I already had such strange errors in the past (and still do), and usually, they are all due to stack corruption.

I doubt it is a stack issues since I have been running the code extensively since last email. I have an ESP32 that has been running for 10 days now without a problem.

I never experienced compilation issue with the cross compiler from Espressif (I have even built my own to have  the -fstack-usage feature which wasn't included in Espressif's version). I had once a linking issue with the previous version (the linker produced invalid binary), but since 8.2, the compiler seems rock solid to me.

BTW, I forgot to mention that I have always had stack checked enabled (check using canary bytes).

The crashes with optimization appears random so I wonder if it could be related to pSRAM? -- the code is probably faster with optimization? I have my own allocator, which operates on a buffer declared as follows:
EXT_RAM_ATTR static char poolBuf[210241024];
I have attached my sdkconfig file.
sdkconfig.zip

@surfskidude

if it could be related to pSRAM?
Might be possible. We've had PSRAM bugs before and used some compiler workaround. Are you disabling the cache at any point in your application (e.g., some form of non-volatile storage doing a flash write).

I see in your configuration that you have CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY enabled. I'm wondering if it's possible that FreeRTOS static variables are being placed in PSRAM. Could you try turning off this option and see if the issue persists?

No I am not disabling the cache and all options are based on the defaults from the esp-idf examples, except for CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY. When I turn this option off, I get the following compile error: region `dram0_0_seg' overflowed by 1972040 bytes
This is due to the pool I allocate as explained in my comment above.
EXT_RAM_ATTR static char poolBuf[0x200000];

EXT_RAM_ATTR static char poolBuf[0x200000];

What is being allocated in this allocated in this buffer? Is this being used in tandem with the ESP-IDF's heap allocator or is it a replacement?

Is` the problem related to the following: #2892

It might be. But if it was a PSRAM issue, I would expect your application to crash in random places (i.e., lots of Load or Store prohibited). However, if your program appears to be stuck at random places, that suggests that the issue is either a FreeRTOS issue or a compiler issue (although your SDKCONFIG shows that CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y).
Could you enable the core dump feature (dumping to flash should be easiest), and collect a few crashes worth of core dumps. I want to see the backtraces of each task at the point where the Task WDT times out.

Just to let you know that I have not had a chance to run this and also to make sure you full understand that the problem only occurs with optimization enabled.  The code works just fine with: CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y. In fact, I have had an ESP32 running for 25 days now without any issues. The code is available here (compiled with debug): https://github.com/RealTimeLogic/LspAppMgr-ESP32

I just tested all of the above in the latest commit (625bd5e) and I am no longer able to reproduce the issues.


We do not EVER change ownership of sockets.

We do not EVER change ownership of sockets.
We are testing fragile socket zmq thread handover. Let's not test this

@john-gress called out that we actually do socket ownership handower so for now I'll just close this PR and we can revisit us if there is more pain with this test.


Unify sbt shell and build.sbt syntax

The sbt shell syntax
{<build-uri>}<project-id>/config:intask::key

and build.sbt (Scala) syntax discrepancy makes learning curve steep for casual users. There has been several proposal of unifying the two syntax.
consoleProject is a useful experiment on what it's like to be to integrate REPL and sbt shell. We will have to provide all the feature we currently provide via commands:

[ ] Multi-project support. project foo is a command.

[ ] Cross build support. ++2.11.5

[ ] Reload support.

[ ] Delegation of tasks compile should work, not compile in Compile.

[ ] .eval should be called automatically.

[ ] Continuous execution support. ~compile

[ ] last

[ ] ;foo;bar;

I really like this idea.   Does this mean the Command engine disappears?  cosnoleProject is very much not compatible with it.

i.e. I think you need to add notes of  working and  etc.

I don't know if we can get there in time. All I'm saying is that if people want to experiment with unified syntax, we already have consoleProject.

The other direction @lihaoyi suggested is implementing REPL friendly Scala notation. I just tried implementing : method:
scala> object Test { def `:`(task: Any): Unit = () }
defined object Test

scala> object compile
defined object compile

scala> Test:compile
<console>:13: error: not found: type compile
       Test:compile
            ^

so something other than :.

I don't think we can simultaneously change both syntaxes..

We can use slash everywhere:
scala> object Task { def value = ()  }
defined object Task

scala> class Configuration  { def /(task: Any) = Task }
defined class Configuration

scala> val Test = new Configuration
Test: Configuration = Configuration@10f54b9f

scala> val compile = Task
compile: Task.type = Task$@258382e8

scala> compile.value

scala> Test/compile
res1: Task.type = Task$@258382e8

scala> val x = (Test / compile).value
x: Unit = ()

This character is relatively easy to type, and the meaning is close enough.
We might need to introduce the notion of top-level / and current ./ to disambiguate between a configuration named IntegrationTest and a subproject that could be named IntegrationTest.
If we can implement this on top of the existing shell, we could even experiment during 0.13.x.


Implementation of ACTIVITY_SIGNALED event

Related to https://github.com/Activiti/Activiti/issues/2272
Depends on
https://github.com/Activiti/activiti-api/pull/84
https://github.com/Activiti/activiti-cloud-api/pull/65
https://github.com/Activiti/Activiti/pull/2511

It seems that we have a problem with MessageProducerCommandContextCloseListener.
In the test when two processes are listening for one signal a processInstanceId in the events related to second process is overwritten with processInstanceId  from the first process..
This bug should be fixed, maybe inside this PR? Details should be considered (discussed) additionally, because the header for the messages' bunch should be modified... And this may lead to failing of some other tests...

@CTI777 hmm that doesn't sounds like the right behaviour.. we will need to investigate.. Please sync with @erdemedeiros about this.

@Salaboy the close listener injects the execution attributes into events before sending it to the stream  under the assumption that there is always single process instance emitting events inside each transaction. This is apparently not the case, so it should be the responsibility of the event aggregator to resolve and apply correct values to each event when it is added to the list. Once the event is added to the list, it would be good practice to make it immutable. However, this is currently not possible because the setters are public. We could possibly wrap it into delegate to seal the event once we add it to the list.
I will help @cti777 to fix this issue.

@igdianov on the same subject: I noticed that currently ProcessDeployedEvents are not setting headers at all (as they are not using closeListener). I created a specific MessageBuilderChainFactory to set only routing key and runtime bundle info headers in this PR . However it's not implementing the interface MessageBuilderChainFactory as I wasn't sure which information I could use add more information there (if there is any). This new MessageBuilderChainFactory is invoked in the CloudProcessDeployedProducer.

@igdianov on the same subject: I noticed that currently ProcessDeployedEvents are not setting headers at all (as they are not using closeListener). I created a specific MessageBuilderChainFactory to set only routing key and runtime bundle info headers in this PR . However it's not implementing the interface MessageBuilderChainFactory as I wasn't sure which information I could use add more information there (if there is any). This new MessageBuilderChainFactory is invoked in the CloudProcessDeployedProducer.

@erdemedeiros I will take a look at it.

@CTI777 @erdemedeiros This PR needs to be rebased on top of develop branch. We also need to add some tests to make sure that execution context is injected in signal audit events.

@erdemedeiros I have fixed missing execution context attributes for CloudBPMNSignalEvent


[BUG]: annotating argument as list[some_type] raises CompileError

Trying to add pure-py annotation here
-def append(self, others) -> BlockPlacement:
+def append(self, others: list[BlockPlacement]) -> BlockPlacement:

raises
pandas/_libs/internals.pyx:166:57: Compiler crash in IterationTransform

I assume this is 0.29.x you're using (although the same bug probably exists on 3.0a)?
Ultimately https://github.com/cython/cython/pull/3910 should help with this sort of thing (although it currently only looks at the typing module and doesn't make the built-in types subscriptable; that's probably a fairly easy change for the future though).
For the moment Cython's unlikely to use the [BlockPlacement] information, so one solution would be to omit that. Obviously you may want it for your own documentation though.
I imagine the likely outcome is that 0.29.x will end up treating this as object (but not crashing) but at some point 3.0x will recognise it correctly as list.

I assume this is 0.29.x you're using (although the same bug probably exists on 3.0a)?

ive only tried this on 0.29.23

For the moment Cython's unlikely to use the [BlockPlacement] information, so one solution would be to omit that. Obviously you may want it for your own documentation though.

yah, this is basically cosmetic in this context

FWIW this was a duplicate of https://github.com/cython/cython/issues/2811. It looks like that didn't get backported. I've created a PR with a minimal bit backported, but it's possible that this isn't the cleanest way to fix it.


Fix auth-webhook crash due to gunicorn SIGCHLD madness

Fixes https://bugs.launchpad.net/charm-kubernetes-master/+bug/1938470. More details there.

Verified locally that with this fix, auth-webhook no longer crashes while kube-apiserver is down.


Copilot Chat: Sequential Planner Stablization - Handle missing functions error

Need to gracefully handle hallucinations from the planner. Options in order of preference:

Implement retry until we get a valid plan
Allow missing functions and filter them out (as we were doing before)
Let the error pass through with a message to user that LLM hallucinated plan

Example of error behavior we're seeing:
Error thrown because LLM keeps proposing functions that are not available
"Invalid plan: Failed to find function 'FilterList' in skill 'FilterList'."
Proposed plan:
<plan>\n
<!-- Get Hypermedia links to resources accessible in GitHub's REST API -->\n
<function.GitHubSkill.MetaRoot server_url=\"https://api.github.com/\" setContextVariable=\"META_ROOT\"/>\n    \n
<!-- List details of a pull request by providing its number -->\n
<function.GitHubSkill.PullsList owner=\"microsoft\" repo=\"semantic-kernel\" state=\"open\" setContextVariable=\"PULL_REQUESTS\"/>\n    \n
<!-- Filter the pull requests to only show open ones -->\n
<function.FilterList input=\"$PULL_REQUESTS\" property=\"state\" value=\"open\" setContextVariable=\"OPEN_PULL_REQUESTS\"/>\n    \n
<!-- Extract the pull request numbers from the open pull requests -->\n
<function.ExtractValues input=\"$OPEN_PULL_REQUESTS\" property=\"number\" setContextVariable=\"PULL_REQUEST_NUMBERS\"/>\n    \n
<!-- Loop through the pull request numbers and get the details for each one -->\n
    <loop>\n
    <foreach item=\"PULL_REQUEST_NUMBER\" input=\"$PULL_REQUEST_NUMBERS\">\n
        <!-- Get the details for a single pull request -->\n
        <function.GitHubSkill.PullsGet owner=\"microsoft\" repo=\"semantic-kernel\" pull_number=\"$PULL_REQUEST_NUMBER\" server_url=\"https://api.github.com/\" setContextVariable=\"PULL_REQUEST_DETAILS\"/>\n            \n
        <!-- Append the pull request details to the final result -->\n
        <function.AppendToResult input=\"$PULL_REQUEST_DETAILS\" appendToResult=\"RESULT__PULL_REQUESTS\"/>\n
        </foreach>\n
    </loop>\n
</plan>

Skills in context:

Done https://github.com/microsoft/chat-copilot/pull/87


Dashboard: If you have many charts and scroll down, the date information is not present or overlaps charts

hover over insights are hard to read because they overlap the charts
The dates are anchored to the first chart and do not anchor to the top

I suspect this is straightforward to fix. A sketch of a solution:

the time axis should be sticky
the mouseover date should be sticky

Tagging it for 0.14


Ensure local docs operators generate necessary files for datahub integration

Description
Two changes with this PR:

Add the DbtFreshnessLocalOperator & DbtFreshnessS3LocalOperator to properly generate the sources.json file
Add run_results.json to the list of required files for the DbtDocsLocalOperator.

These files are necessary to use the dbt integration with DataHub and will make it easier for cosmos users to emit their metadata to DataHub as needed.
Checklist

[x] I have made corresponding changes to the documentation (if required)
[x] I have added tests that prove my fix is effective or that my feature works

@chrishronek, we're starting to close stale PRs - please reopen or create a new one once you have a chance to contribute again!


[ibex/dv] add Questa support

my trial to add Mentor QuestaSim support for ibex_core regression
Signed-off-by: Bert Pieters<EMAIL_ADDRESS>

adding Questa support


Run bootstrap.sh on Ubuntu 16.04?

bootstrap.sh does not run on Ubuntu 16.04. Line 83 can be modified for python 3 to run it, however I get the error "Unsupported release: 16.04" and I can't work out what is throwing the error. Are there any modifications that can be made to get this script to run on 16.04?

@samuel-watson we haven't moved to support 16.04 yet. The amount of work to port it is large at this time and not on our current road map. Please continue to user Ubuntu 14.04.


popup opens twice in version 10.1.8

Popup opens twice but image is uploaded after first popup closes.
html:
<img ng-src="{{profileImage}}" class="profile-photo hand-mouseover"  style="margin: 10px"
                     ngf-select="vm.upload($file)"
                     accept="image/*" ng-multiple="false"
                     tooltips tooltip-title="Upload Profile Picture" tooltip-try="false" tooltip-side="right" tooltip-delay="1000" tooltip-lazy="false">

JS:
  function upload(file) {
        console.log("file to be uploaded ===== " + file)
        Upload.upload({
            url: '/api/profile/profile',
            data: {file: file}
        }).then(function (resp) {
            //console.log('Success ' + resp.config.data.file.name + 'uploaded. Response: ' + JSON.stringify(resp.data));
            //debugger;
        }, function (resp) {
            //console.log('Error status: ' + resp.status);
            //debugger;
        }, function (evt) {
            var progressPercentage = parseInt(100.0 * evt.loaded / evt.total);
            console.log('progress: ' + progressPercentage + '% ' + evt.config.data.file.name);
        });
    }

It seems to be
ng-src={{profileImage}}

That is causing the issue. Could the change of "profileImage" trigger another upload?

Could you create a jsfiddle? That's unlikely to cause this issue.


Spike: Determine which build tool to use for production

Fastlane looks like a good option. Timebox this to 2h.

@marvinmarnold @Andrewsopoku I agree Fastlane is the best tool as a production tool for this project. It supports well. When we are using Fastlane, additional consideration might be:

Determine which CI tool to run test(https://docs.fastlane.tools/getting-started/ios/running-tests/)
Add more test cases to the project to cover onboarding logic
Invite beta testers(QA) to the beta deployment(https://docs.fastlane.tools/getting-started/android/beta-deployment/)

@marvinmarnold @posterzh We can consider Codemagic too. Although the name sound fancy, it looks promising.
https://docs.codemagic.io/yaml-quick-start/building-a-react-native-app/

@Andrewsopoku @vpetersson, Zhang and I are leaning towards Fastlane. Andrews, I believe you have experience with Fastlane, not Codemagic. That's important. Codemagic looks cool, but it has more features than we need now and it feels too new and shiny, whereas Fastlane is more battle tested.
I think we are going to quickly regret doing the build process by hand, without any tooling. And Fastlane will give us some nice features like automated screenshot captures.
Viktor, we can break the process up into three steps: build, signing, and publish. My understanding is that you are OK with having automated builds on Github workflows as long as signing and publishing can be done locally. Is that right? Would you be comfortable also signing and publishing from a workflow as long as the key is a subkey or signing-only key?
Other reading:

Highway but its no longer maintained: https://www.netguru.com/blog/the-introduction-to-highway-our-new-build-system
https://www.thinslices.com/blog/automating-the-build-and-deployment-of-react-native-apps
Mac first
https://www.bitrise.io
https://appcircle.io/

Viktor, we can break the process up into three steps: build, signing, and publish. My understanding is that you are OK with having automated builds on Github workflows as long as signing and publishing can be done locally. Is that right? Would you be comfortable also signing and publishing from a workflow as long as the key is a subkey or signing-only key?

Yeah i'm OK with automated builds. However, I'm not sure if it is possible to break those things apart in the iOS world at least. However, I'm not exactly up to date with these things.

We have consensus that we'll do completely manual releases to start.


Excel Data Migration

Story points: 10
Priority: 1 (high)
Risk: Low
Child of:
Tasks:

Clean and process data from Excel sheets

Migrate data from the Excel sheets to our cloud database

Potentially create fake/mock data to populate our database

the PR for creating the tables was not supposed to close this issue, seeing as migrating test data into the tables is still necessary

Updated Version of the ERD after all the changes that have been made.


Fixing adding command problem

Carolina and Stephanie found an issue in the qiita-rc system: if you tried to add a command to an artifact that has not been generated and the job generating it has been already submitted (i.e. no longer in construction), the system failed with a really weird error. Adding a command to those types of artifacts is not easy, there are a lot of assumptions perform through the code that rely on this behavior not happening, and removing all them is complex. For the time being, I've disabled the ability to add commands to those type of artifacts (you can still add commands if the workflow is in construction). Instead it shows a little information about that (there is not too much to show, but at least it doesn't fail and you see something on the screen). GIF with the resulting changes:

Codecov Report

Merging #2437 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev    #2437   +/-   ##
=======================================
  Coverage   94.06%   94.06%
=======================================
  Files         163      163
  Lines       19347    19347
=======================================
  Hits        18199    18199
  Misses       1148     1148

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 f9866ca...d19405f. Read the comment docs.

@antgonza @ElDeveloper available for a review?


Request money - Logo of the money request sent offline disappears for a moment when connecting to Internet

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

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

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/93399543/226881410-11fb781c-3151-456e-a048-a70c061cee20.mp4

Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Bug0 Triage Checklist (Main S/O)

[ ] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
[ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)

If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead

[ ] This bug is reproducible using the reproduction steps in the OP. S/O

If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
If the reproduction steps aren't clear and you determine the correct steps, please update the OP.

[ ] This issue is filled out as thoroughly and clearly as possible

Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.

[ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Reassigning the bug label since I'll be OOO on Friday until April 3 and will not be able to keep this one moving while I'm offline.

@muttmuure Huh... This is 4 days overdue. Who can take care of this?

Focusing on higher priorities

Can't reproduce this one


Any support for Dell XPS 9570 ?

Hi,
I don't know if it is the right place to ask this question. Any support for Dell XPS 9570 fingerprint reader ?
Regards

not sure, it is probably a different sensor TBH
See https://github.com/hmaarrfk/Validity91/issues/5 for a similar discussion

~ -> lsusb
Bus 002 Device 002: ID 13b1:0041 Linksys
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 27c6:5395
Bus 001 Device 003: ID 0cf3:e300 Atheros Communications, Inc.
Bus 001 Device 005: ID 0c45:671d Microdia
Bus 001 Device 002: ID 25a7:fa23
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Dell XPS 9570 has another updated godfix reader: 27c6:5395
How to learn to reverse engineer this thing ?

you have to sniff packets from the USB. Wireshark is your friend.

sahlouls, thank you for reaching out, but reverse engineering the sensor on the 9570 seems to be out of scope for this project.
May I close this issue?

@hmaarrfk apart from sniffing the USB protocol on wireshark, what else is involved with making this work. Would be great to add support, but shouldn't this be more of a linux driver support issue than for Validity 91 specifically; excuse my ignorance.
I am using a 9570 also FWIW and thinking about the usefulness of the fingerprint scanner.

Hi, I'm a C developer with some experience with writing Linux drivers, reverse engineering and Wireshark. I also own a Dell XPS 9570 and I'd like to get the fingerprint sensor working. Maybe we could create a separate Gitter or Discord room specifically for 27c6:5395 Goodix Fingerprint sensor.

@leoheck Unfortunately I had to pause the reverse engineering because I've started to get busy with the University. I have a quite nice IDA database (.idb) of the Windows driver DLL and I wouldn't mind sharing it.

Oh, ok.
Your IDA database can be put on a google drive or similar?
Why not share online and add an issue here with the url https://github.com/IDerr/Goodix92/issues
Maybe the guy can use it.
I just finished my windows VM to test the reverse engineering process described here by @hmaarrfk
Everything looks good the fingerprint sensor was recognized by the windows but the setup is not working for some reason. I am currently stuck in this screen and notthing happens.

Hi everyone
@leoheck : It will be stuck at this part, because your VM can't emulate intel SGX :(
You have to create a VM with KVM patched for sgx : https://github.com/intel/kvm-sgx
I think that the best way to create the driver is to reverse engineer the windows driver :)
We can create a gitter or something to keep in touch if you want

Hi @IDerr thanks for pointing me this Intel SGX patch. I will give it a try.
I couldn't find your URL to the gitter chat. Where it should be? On your Readme.md file?

Yup.
I think you can close this issue @hmaarrfk :D Thanks for the work btw

Thanks, I liked to it on the front page. Enjoy the traffic!

Hello @xerpi is it possible to have your ida database for the driver ?

@IDerr Sure, send me a mail to<EMAIL_ADDRESS>and I'll send it back.


ResponseDataWrapper marked as internal, but used on routes config

https://github.com/yiisoft/yii-debug-api/blob/master/config/routes.php#L13

I see two way:

Remove @internal from middleware.
Move the wrapper to the controller.


Unable to compile on swift with iOS7

Have installed AFNetworking as a Pod in a swift project. Everything works fine if I set deployment target to 8.0 but however if I change deployment target to 7.1 I get the following error:
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/AFNetworking.framework/AFNetworking) for architecture arm64

As per the README, embedded frameworks are not supported on iOS 7.

iOS 7 does not support embedded frameworks. For additional support, you should look to CocoaPods resources.


Systemd: Issue while getting hostname with “%H” unit file parameter.

Description
systemd is not able to get the value of the %H in the unit file parameter and getting localhost instead.
         Like log forwarding service. If it's not able to get the correct hostname and push logs with "localhost" as hostname then it's very difficult to tell the exact machine in dynamic inventory like AWS ec2.
Environment and steps to reproduce

Set-up: AWS EC2
Task: Getting hostname value in systemd service with "%H".
Action(s): In a systemd service.
Error: Setting localhost as the hostname.

Expected behavior
It should get the hostname of the EC2 instance instead of the localhost.

I'll just quickly note what I responded in the mailing list:
I didn't have time to look into it in detail yet but you I think should set the hostname via Ignition by either writing directly to /etc/hostname or creating a service that runs this:
coreos-metadata --cmdline --hostname /etc/hostname
and then depend on that service with Requires=, After=.
That said, I didn't try it out but this is something which should be done by default.

I did it with a custom systemd unit service by fetching hostname from the AWS EC2 instance metadata service.


Permutation in JavaScript using Recursion

Assigned Issue Number ?
#1211
Language Opted ?
JavaScript
Number of files added or updated ?
1
Name of these files ?
Algorithm=>Recursion_Algorithm=>Permutation.js
Checklist

[x] I've read the contribution guidelines.
[x] I've referred the correct issue number.
[x] I've fill up this entire template correctly.

Demo

@ahampriyanshu Would really appreciate if you could label the PR as hacktoberfest-accepted. Since I am considering this for hacktoberfest.


Override xorm type mapping for U2F counter

Fix U2F authentication failure with token counter value >= 2^31 when using PostgreSQL.
Closes #6168

Codecov Report

Merging #6232 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6232      +/-   ##
==========================================
+ Coverage   38.85%   38.86%   +<.01%
==========================================
  Files         354      354
  Lines       50221    50221
==========================================
+ Hits        19515    19518       +3
+ Misses      27880    27875       -5
- Partials     2826     2828       +2

Impacted Files
Coverage Δ

models/u2f.go
63.15% <ø> (ø)
:arrow_up:

modules/process/manager.go
76.81% <0%> (-4.35%)
:arrow_down:

routers/repo/view.go
42.07% <0%> (+0.99%)
:arrow_up:

models/unit.go
14.28% <0%> (+14.28%)
:arrow_up:

Continue to review full report at Codecov.

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

Maybe you should consider to add a migration.

Yes, this would need to add migration to update exisiting database

Yesterday, I'm also investigate this bug. My yubikey could work with github but not gitea. I will try this PR to check if it fixed the bug.

But it seems this doesn't fix my issue.

@lafriks I believe updating the sqlite3 schema is not needed since it has a single integer type which is big enough to hold an uint32. Sorry for my poor xorm knowledge: haven't used it before. :)
@lunny have you checked if your logs look like https://gist.github.com/mporrato/251450f7786075a887ad21a1728a5407 ? If that's the case, can you connect to the gitea db and do a \d u2f_registration ?

No need to be sorry about, that's why there is review process to learn things :)

I don’t think we need tidb case because for tidb v2 the protocol would be MySQL. Also should sessions be used?

@techknowlogick no session is needed for single sql command

Is this problem still open? I am still getting "Could not read your security key." with  gitea 1.12.1 with sqlite3 on debian stable (buster). My solo key NFC works with github.


Any ways to support linux/OSX platforms?

Hi @veacks, thanks for suggestion. Haven't used Vagrant but sounds like a good complement for automating multiple concurrent instances of triflejs. Other project on my radar is Docker, which is bringing guest containers to Windows soon.


Can't load javascript library

Describe the bug
I'm trying to load a JS library (in javascript kernel) following documentation
https://github.com/dotnet/interactive/blob/main/docs/javascript-overview.md#loading-dependencies
but nothing works.
Here's what I tried:
MarkdownIt = await import('https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/+esm');
console.log(MarkdownIt);

(prints empty object: {})
configuredRequire = (require.config({
    paths: {
        markdownIt<EMAIL_ADDRESS>    },
}) || require);

configuredRequire(['markdownIt'], markdownIt => {
    console.log(markdownIt);
});

(nothing happens)
Both return an empty object.
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):
NET Interactive
© 2020 Microsoft Corporation
Version: 1.0.522904+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074
Library version: 1.0.0-beta.24229.4+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074
Build date: 2024-04-29T22:23:22.0000000Z

OS

[ ] Windows 11
[ ] Windows 10
[ ] macOS
[x] Linux (Please specify distro)
[ ] iOS
[ ] Android

Frontend

[ ] Jupyter Notebook
[ ] Jupyter Lab
[ ] nteract
[x] Visual Studio Code
[ ] Visual Studio Code Insiders
[ ] Visual Studio
[ ] Other (please specify)

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

Also it would be nice if the documentation explained how to load javascript files (or modules) from local disk.


js file highlight can't be seen

VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:32:36.026Z)
OS Version: Windows_NT ia32 10.0.16299
Extensions:

Extension
Author (truncated)
Version

bracket-pair-colorizer
Coe
0.10.14

githistory
don
0.2.3

vscode-great-icons
emm
2.1.21

output-colorizer
IBM
0.1.2

plantuml
jeb
2.3.3

prettify-json
moh
0.0.3

python
ms-
0.8.0

partial-diff
ryu
0.5.1

code-settings-sync
Sha
2.8.6

vscode-hexdump
sle
1.6.0

JavaScriptSnippets
xab
1.5.0

markdown-all-in-one
yzh
0.11.2

Steps to Reproduce:

Suddenly one day I open vscode, it comes to this situation

Reproduces without extensions: Yes

Please provide reproducable steps so we investigte his furhter.
Here are nice rules how to file good issues https://github.com/Microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions
Also can you reproduce if you disable all extensions?

It looks like the file is in plain text mode. Please try changing the mode back to JavaScript: https://code.visualstudio.com/docs/languages/overview#_changing-the-language-for-the-selected-file
This could be caused by your user or workspace settings, or perhaps by an extension

Thanks a lot.


Updated localized texts

A couple of changes to localized texts

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


DefaultFileRegion.transferTo with invalid count may cause busy-spin

Motivation:
DefaultFileRegion.transferTo will return 0 all the time when we request more data then the actual file size. This may result in a busy spin while processing the fileregion during writes.
Modifications:

If we wrote 0 bytes check if the underlying file size is smaller then the requested count and if so throw an IOException
Add DefaultFileRegionTest
Add a test to the testsuite

Result:
Fixes https://github.com/netty/netty/issues/8868.

/cc @georgeOsdDev

@netty-bot test this please


License

Pick an open source license that works for you.
MIT license is recommended.

With 956d9e2 I added a License.md including the MIT license


Special Character encoding not working

I can't get the special character encoding to work.
Although the other features are nice aswell, encoding while pasting is what I intended to use this plugin for.
"super_awesome_paste.escape_html": true
is in the preferences.sublime-settings file and I restarted sublime settings so far.
The plugin seems to work, as the pasted text has sweet indentation.
I'd appreciate some help!

Hey there. A while since I've done anything with this project, but I really intend to document these things better.
HTML character escaping is selective. Currently, it will only apply when a plain text string is pasted inside an HTML content tag matching the regular expression below (source).
p|h[1-6]|span|em|strong|a|small|td

This was intended to limit the functionality until it was needed, but even then sometimes, for instance, I've been pasting into Handlebars tags inside these contexts and not wanted quotes escaped. So recently I've been wondering if this kind of paste modification should be on by default, or made even less aggressive. Alternatively, the plugin could provide HTML character escaping as a separate bindable command for the user to choose. What do you think?

I didn't really get the reg exp part, but I'd love to have a command for: "Paste and encode html entities".
Off-topic:
how did you make it happen, that text is indented but is displayed as part of the same line as the one before?

Cool, I think a separate command makes sense. Should have time to work on it tomorrow.
The text wrapping in the line pictured is a feature of Sublime itself. When Word Wrap is enabled, it does smart text wrapping in some languages. This plugin only ensures that when you paste in any file, the result will be auto indented first ;)

Nice! Although I had some problems after pasting something outside of a pdf with backgrounds.
There is an additional whitespace at the beginning.
And how comes the first line has a line-break at the begining so a new line in sublime text begins?
This is almost always the case.

Pretty sure that much is to do with the PDF format I'm afraid. Sometimes I even get double newlines on Windows, and removing these is not a safe operation to attempt on every paste.
That does give me a new feature idea though: Configurable after-paste hooks

I'm looking forward to it and watch out for an update. Hopefully soon!

@katerlouis Changes are now in and the release should be live through Package Control soon.

'Paste and HTML encode' has been added as a new context menu option, and the regular paste command will no longer attempt to do this. Selecting the new option will now always encode any special characters into escaped HTML entities, without the checks that were there before.
All changes are non-breaking and the main command name remains the same. I'll be back soon for more active development on this project again, starting with clearer and more detailed documentation. :)

Nice! Thank you!
I'm looking forward to more documentation, because I'm confused :)
Quick pitch of what I am looking for:
Sometimes I wanna paste with encoded entities, sometimes not.
I'm a keyboard evangelist, so browsing dropdowns by mouse is not an option for me.
So access to both functions without changing a setting would be nice.
I imagine 2 separate commands, which the user can bind to whatever they want.
If you want to pre-bind with your plugin, how about that:
you prebind the unescaped command and make a setting called "use_escaped_instead" for those who are cool with your shortcut and just want to the plugin to work. They don't want to bother with binding a command in user-keymap bla; so they can set "use_escaped_instead", which simply internally binds the new command to your pre-bound key.
And maybe a third command: "super_awesome_paste_toggled"
If I want to have the same shortcut for awesome paste all the time but still wanna be able to switch between encoded and unencoded quickly. Switching through a context item or setting or better: a control panel item
I also suggest providing control panel items. I literally use it for everything. It's auto completion is insanely clever. Item suggestion:
– "Super Awesome Paste: paste HTML encoded"
– "Super Awesome Paste: paste plain"
– "Super Awesome Paste: Toggle encoding"

Oh :( – I see the new context item, but hitting it still pastes with "ü, ä, ö" etc.

Hey again. Sure, you can bind the command with the html_encode argument enabled to a key combination right now – add something like the below to your default keymap file:
{ "keys": ["super+alt+shift+v"], "command": "super_awesome_paste", "args": { "html_encode": true } },

Source reference for context menu bindings you can match. More documentation needed again!
Command palette support is absolutely coming up :)
As for the characters that get encoded, this currently uses Python's html.escape method, which only escapes a subset of characters that need to be escaped in UTF-8. I'll look into if this is sufficient though.

Oh. Too bad,
I need the complete opposite. I don't want to escape html code when pasting. I paste special characters like "ü, ä, ö, é, ß"
And how about – (ndash) etc.?
Idea: use sublime text build in command
"encode_html_entities"
Even further:
since I use a plugin for these jobs (SublimeStringEncode) I'd love to use their encoding. So how about an option in SAP
"sap_encoding_command": "encode_html_entities"
Where I can simply include my own:
"sap_encoding_command": "safe_html_entitize"

I'll investigate using Sublime's built-in command — now this is separate it ought to escape more things. The above snippet was suggested for a second key binding.
What you then suggest would be a general after_paste hook idea which I hinted at on Saturday — wouldn't that be awesome!

Yeah, args for the same command would be fine with me :D
I actually don't care how the pie is made, I just wanna eat it ;)
An option inside the args for the actual encoding function would still be nice.
When will the pie be ready? I have to paste and encode a lot the next days 8)

Oh, and how about optional "join_lines" as one of these famous after hooks, whatever they may be! :D


New Release: 2.x

Codecov Report
Base: 100.00% // Head: 97.40% // Decreases project coverage by -2.60% :warning:

Coverage data is based on head (aaea03b) compared to base (2983e4c).
Patch coverage: 85.71% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@             Coverage Diff             @@
##              main     #168      +/-   ##
===========================================
- Coverage   100.00%   97.40%   -2.60%
===========================================
  Files            2        2
  Lines           70       77       +7
  Branches         1        3       +2
===========================================
+ Hits            70       75       +5
- Misses           0        2       +2

Impacted Files
Coverage Δ

src/module.ts
96.72% <85.71%> (-3.28%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

:tada: This PR is included in version 2.0.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Remove .NET 5

Summary

.NET 5 goes out of support on May 08 2022.
Once it does, this change should be merged and released to remove .NET 5
support from the buildpack.
Related to https://github.com/paketo-buildpacks/dotnet-core-runtime/issues/281
Use Cases

Checklist

[ ] I have viewed, signed, and submitted the Contributor License Agreement.
[ ] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[ ] I have added an integration test, if necessary.
[ ] I have reviewed the styleguide for guidance on my code quality.
[ ] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

According to the Semantic Versioning RFC removing a major version constitutes a major version bump. Do we want to move to v1.0.0 of this buildpack now?


Cocoapods version bump

Please, bump the version of the release to 0.5.2 or 0.6.
There are changes in master that are not in the latest release.
Cocoapods is still using 0.5.1 with some old bugs fixed.

I'll try to do a release this weekend, but can't promise!
The thing is that master has quite a lot of changes and there are 1-2 things that need to be fixed + some examples still have to be updated.

Release as 1.0 with "break" changes. So who has the 0.5.1 knows that if they upgrade, changes can happen. I am pretty sure people prefer to have a less-buggy library with old examples and than an old and (with some bugs) versions.

I released 0.6.


Office 365

see also https://expel.com/wp-content/uploads/2022/01/Expel-Great-eXpeltations-2022-Report-012522.pdf

Closing as we'll be focusing on IaaS for now (AWS / Azure / K8s / GCP possibly)


[BUG]

Acknowledgement of preliminary instructions

[X] I have read the preliminary instructions, and I am certain that my problem has not already been addressed.

What problem did you encounter?

You're not using the latest version of Bloxstrap. https://github.com/pizzaboxer/bloxstrap/releases/latest


lzma.LZMAFile AttributeError in Python without LZMA

I sometimes get a module 'lzma' has no attribute 'LZMAFile'  error in a threaded environment (which I don't have any control over, unfortunately 😟 - it's an company internal "cloud" engine). It's not reproducible and I was unable so far to create a local example for this.
The stack trace is:
  File "/root/.local/lib/python3.6/site-packages/adlfs/__init__.py", line 1, in <module>
    from .core import AzureDatalakeFileSystem
  File "/root/.local/lib/python3.6/site-packages/adlfs/core.py", line 12, in <module>
    from fsspec import AbstractFileSystem
  File "/root/.local/lib/python3.6/site-packages/fsspec/__init__.py", line 5, in <module>
    from .mapping import FSMap, get_mapper
  File "/root/.local/lib/python3.6/site-packages/fsspec/mapping.py", line 3, in <module>
    from .core import split_protocol
  File "/root/.local/lib/python3.6/site-packages/fsspec/core.py", line 6, in <module>
    from .compression import compr
  File "/root/.local/lib/python3.6/site-packages/fsspec/compression.py", line 77, in <module>
    register_compression("lzma", lzma.LZMAFile, "xz")
AttributeError: module 'lzma' has no attribute 'LZMAFile'

After digging some time I found Python issue 39430: tarfile.open(mode="r") race condition when importing lzma which also suffered from the same AttributeError. It looks like there is a race condition when using import lzma compared to from lzma import xyz in a threaded environment.
Would it be ok to change the lzma import in fsspec/compression.py? What do you think? I did a local modification of those lines and so far the AttributeError does not longer occur.
Happy to get your feedback on this and opening a PR if we agree on this.

Yes please, go ahead


Breaks after setting static IP

Hi
Great script - wish I had tried before losing the will to live with Rancher.
It installed fine and I could log in and set my admin account details etc.
I then realised the container was using DHCP so I changed the IP of the container in Proxmox from DHCP to a static IP. To my surprise this did not change the IP of the container. After many reboots. It showed the static in the alpine network config but did not apply. The only way I could get the new IP address to stick was to rename the interface from eth0 to eth1
I now get the NPM login screen but get the dreaded "bad gateway" error when trying to sign in.
Is there a preferred way to switch from DHCP to a static without breaking NPM?
[Follow up]
I thought a solution around this issue would be to install a standard Alpine LXC with the correct networking first then run the setup script rather than the create script.
Networking was confirmed working fine with the static IP but when I ran setup it seems to have modified Eth0 to DHCP again, despite /etc/network/interfaces showing my original static IP.
thanks
Gordon

@nodrogneirbo Apologies, I pushed some changes without fulling testing last time.
This issue should be fixed now, thanks to the following commit https://github.com/ej52/proxmox-scripts/commit/70038bf74a9c1ecaf06ed25e9fe95359902f1af9

I noticed this issue a day or two ago where I tried to upgrade NPM and it failed on udhcpc when npm was starting. Thanks for the fix!

@nodrogneirbo Apologies, I pushed some changes without fully testing last time.
This issue should be fixed now, thanks to the following commit 70038bf

Thanks for the speedy fix Elton. I will try the update later.

I've just tried to use the create script to build a new NPM container to test and it seems that is broke now:
curl -sL https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/create.sh | bash -s -- --id 372 --storage SSD1-10GbE
[warn] Container will be created using the following settings.
[warn]
[warn] ctid:     372
[warn] hostname: nginx-proxy-manager
[warn] cores:    1
[warn] memory:   512
[warn] swap:     0
[warn] disksize: 2G
[warn] bridge:   vmbr0
[warn] storage:  SSD1-10GbE
[warn]
[warn] If you want to abort, hit ctrl+c within 10 seconds...

[info] Updating LXC template list...
[info] Downloading LXC template...
[info] Allocating storage for LXC container...
[info] Creating LXC container...
[info] Setting up LXC container...
wget: bad address 'raw.githubusercontent.com'
[info] Successfully created Nginx Proxy Manager LXC 372.

Nginx Proxy Manager is reachable by going to the following URL.

      http://:81

@nodrogneirbo wget: bad address 'raw.githubusercontent.com' indicates a DNS/connectivity issue within the container.
Do your other containers have internet?

They do have internet access. I have tried again just now and it worked perfectly so just a glitch I guess.
Thanks @ej52


Manual overwrite filenames when two file has the same name

Consider the following config:
{
  "source": "./",
  "destination": "./docs",
  "plugins": [{
    "name": "esdoc-standard-plugin",
    "option": {
      "manual": {
        "index": "./API.md",
        "files": [
          "./foo/README.md",
          "./bar/README.md"
        ]
      }
    }
  }]
}

The following config will generate the same file ./manual/README.md twice and therefore will overwrite each other.

Hi,
I just hit this myself... just curious, does anyone have a workaround for this? I'm trying to use this in a lerna monorepo and copy together CHANGELOG.md files from several packages. But they get overwritten. I'd rather not have to name my CHANGELOG files different for each package.
Regards, Pattrick


plugin won't compile correctly

Receive an error when I try to build my app with this plugin:
Development build, version 1.0.0
/Users/kstone/kylethinks/blog/build.js:60
	.use(googleAnalytics('UA-106228305-1'))
	     ^

TypeError: googleAnalytics is not a function

I triple-checked my build.js file and I've followed the example in your README exactly.  Does this plugin have a dependency on metalsmith-each?

yes, it has a dependency on metalsmith-each.
I unfortunately don't have any time to investigate this issue :(
But I will answer any related question.

No big deal @doodzik, I simply loaded the GA tag as a script in my footer.  No real reason for it to be in a plugin anyways! Cheers.