net/http/httputil: request may be killed by mistake by former cancel request in ReverseProxy.ServeHTTP

Hi:

What version of Go are you using (go version)?

go version go1.6.2 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOOS="darwin"

What did you do?

serving proxy requests by httputil.ReverseProxy
about 10% of request are canceled by clients

What did you expect to see?

no requests should occur any unexpected error.

What did you see instead?

some normal(non-canceled) requests are affected by their former requests which are canceled by clients.

Finally I find this:
There is a goroutine here(in ServeHTTP): goroutine
this goroutine is used for receiving clientGone or reqDone signal, however, we assume this scene:

ServeHTTP start handling Request A(using underlying net.Conn C)
Request A was canceled by its client (sending sig to clientGone)
RoundTrip return error(may be use of closed network connection in go1.6- or other error in go1.6+)
ServeHTTP start to return and defer close(reqDone)  is executed(close is non-block, so ServeHTTP may be return before the  goroutine A receive close signal, but goroutine A is still alive)
net/http put net.Conn C  to IdleConn
Request B arrived and net/http pick the same underlying net.Conn C
ServeHTTP start handling Request B (using the same underlying net.Conn C)
goroutine A got signal clientGone first, and then do CancelRequest which will close net.Conn C
Request B's RoundTrip return error cause its underlying conn is closed

CC @adg

Are you able to write a test that demonstrates the issue? I have a couple of ideas what might be wrong, but without a test I can't be sure.

If it helps at all I did spend some time looking at this and trying to reproduce with various means, such as adding delay between the clientGone close being noticed and CancelRequest being called. And I tried with both 1.6.2 and tip post-1.7beta2. Wasn't able to come up with anything but happy to test further if there are any hunches.
Any more info on requests (specifically ones like "Request A") would be useful, such as what HTTP method they used, whether they had a body, etc.

I don't think step 8 in your scenario (requestCanceler.CancelRequest(outreq)) should close the underlying TCP connection. If step 3 happens (the RoundTrip failed), the cancellation code to close the TCP connection should've already been unregistered.
In any case, more details as requested by @adg and @dpiddy would be nice. How can we reproduce this? What do the requests look like? How are the 10% of requests being canceled? I'd like to help if I can see it fail.
Thanks.
For now, kicking to Go 1.8, unless you can get back to us soon.

Closing due to timeout. Let us know and reopen if you have more details.


Fix #598 add async to v2 migration guide global error handler example

Summary
Fixes #598
Requirements (place an x in each [ ])

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.

 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.

Thanks! If you don't mind, could you make the same change to this file? https://github.com/slackapi/bolt-js/blob/%40slack/bolt%402.3.0/docs/_tutorials/ja_migration_v2.md

Alright, I can work on the Japanese doc. I will merge this within a few hours.

Thanks! If you don't mind, could you make the same change to this file? https://github.com/slackapi/bolt-js/blob/%40slack/bolt%402.3.0/docs/_tutorials/ja_migration_v2.md

Done

Alright, I can work on the Japanese doc. I will merge this within a few hours.

Oh, whoops :hand_over_mouth:

Thanks! I haven't started working on it 😄


Change back the WhiteSource unified agent version

Signed-off-by: Zelin Hao<EMAIL_ADDRESS>Description
There was an issue with our WhiteSource offline scan on OpenSearch Dashboards 1.3 branch after we changed the unified agent to the latest one and this is currently blocking the entire offline scan.
The error context:
[INFO] [2022-05-09 03:28:56,980 +0000] - Process finished with exit code SERVER_FAILURE (Failed to send request to WhiteSource server: Illegal arguments: Invalid NPM dependency info, DependencyInfo@73080e73[groupId= rxjs/fetch,artifactId= rxjs/fetch-.tgz,version= ,filename= rxjs/fetch-.tgz,dependencyType= NPM ]
Support token: 3d03f98a901074d0b9ba1ca96f2dbf1421652066936695)

This issue was reproduced locally with unified agent v22.3.3. However this haven't seen before with older version v<IP_ADDRESS>. Therefore this PR is to switch back to the older stable version of WhiteSource unified agent for our offline scan.
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #2106 (8b98d08) into main (e7a3ac0) will increase coverage by 5.76%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##               main     #2106      +/-   ##
=============================================
+ Coverage     94.23%   100.00%   +5.76%
=============================================
  Files           198         6     -192
  Lines          3902       105    -3797
  Branches         29        19      -10
=============================================
- Hits           3677       105    -3572
+ Misses          219         0     -219
+ Partials          6         0       -6

Impacted Files
Coverage Δ

src/jenkins/BundleManifest.groovy

src/assemble_workflow/bundle_url_location.py

...bwc_test_start_properties_opensearch_dashboards.py

src/ci_workflow/ci_check_manifest_component.py

src/assemble_workflow/bundles.py

tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile

src/test_workflow/integ_test/service.py

src/test_workflow/integ_test/local_test_cluster.py

src/ci_workflow/ci_check_list.py

tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile

... and 182 more

Continue to review full report at Codecov.

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


Failing to decode the SCALE encoded input in the state_call causes a runtime panic

Is there an existing issue?

[X] I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

[X] This is not a support question.

Description of bug
When trying upload an Ink contract via https://contracts-ui.substrate.io/add-contract
The node's runtime will panic.
====================

Version: 3.0.0-dev-49734dd1d72

   0: backtrace::capture::Backtrace::new
   1: sp_panic_handler::set::{{closure}}
   2: std::panicking::rust_panic_with_hook
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/panicking.rs:702:17
   3: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/panicking.rs:588:13
   4: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/sys_common/backtrace.rs:138:18
   5: rust_begin_unwind
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/panicking.rs:584:5
   6: core::panicking::panic_fmt
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/core/src/panicking.rs:142:14
   7: kitchensink_runtime::api::dispatch
   8: std::thread::local::LocalKey<T>::with
   9: sc_executor::native_executor::WasmExecutor<H>::with_instance::{{closure}}
  10: sc_executor::wasm_runtime::RuntimeCache::with_instance
  11: <sc_executor::native_executor::NativeElseWasmExecutor<D> as sp_core::traits::CodeExecutor>::call
  12: sp_state_machine::execution::StateMachine<B,H,Exec>::execute_aux
  13: sp_state_machine::execution::StateMachine<B,H,Exec>::execute_using_consensus_failure_handler
  14: <sc_service::client::call_executor::LocalCallExecutor<Block,B,E> as sc_client_api::call_executor::CallExecutor<Block>>::call
  15: <sc_rpc::state::state_full::FullState<BE,Block,Client> as sc_rpc::state::StateBackend<Block,Client>>::call
  16: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
  17: std::panicking::try
  18: tokio::runtime::task::harness::Harness<T,S>::poll
  19: tokio::runtime::blocking::pool::Inner::run
  20: std::sys_common::backtrace::__rust_begin_short_backtrace
  21: core::ops::function::FnOnce::call_once{{vtable.shim}}
  22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/alloc/src/boxed.rs:1934:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/alloc/src/boxed.rs:1934:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/sys/unix/thread.rs:108:17
  23: __pthread_deallocate

Thread 'tokio-runtime-worker' panicked at 'Bad input data provided to instantiate: unexpected first byte decoding Option', bin/node/runtime/src/lib.rs:1793

This is a bug. Please report it at:

	https://github.com/paritytech/substrate/issues/new

====================

Version: 3.0.0-dev-49734dd1d72

   0: backtrace::capture::Backtrace::new
   1: sp_panic_handler::set::{{closure}}
   2: std::panicking::rust_panic_with_hook
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/panicking.rs:702:17
   3: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/panicking.rs:588:13
   4: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/sys_common/backtrace.rs:138:18
   5: rust_begin_unwind
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/panicking.rs:584:5
   6: core::panicking::panic_fmt
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/core/src/panicking.rs:142:14
   7: kitchensink_runtime::api::dispatch
   8: std::thread::local::LocalKey<T>::with
   9: sc_executor::native_executor::WasmExecutor<H>::with_instance::{{closure}}
  10: sc_executor::wasm_runtime::RuntimeCache::with_instance
  11: <sc_executor::native_executor::NativeElseWasmExecutor<D> as sp_core::traits::CodeExecutor>::call
  12: sp_state_machine::execution::StateMachine<B,H,Exec>::execute_aux
  13: sp_state_machine::execution::StateMachine<B,H,Exec>::execute_using_consensus_failure_handler
  14: <sc_service::client::call_executor::LocalCallExecutor<Block,B,E> as sc_client_api::call_executor::CallExecutor<Block>>::call
  15: <sc_rpc::state::state_full::FullState<BE,Block,Client> as sc_rpc::state::StateBackend<Block,Client>>::call
  16: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
  17: std::panicking::try
  18: tokio::runtime::task::harness::Harness<T,S>::poll
  19: tokio::runtime::blocking::pool::Inner::run
  20: std::sys_common::backtrace::__rust_begin_short_backtrace
  21: core::ops::function::FnOnce::call_once{{vtable.shim}}
  22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/alloc/src/boxed.rs:1934:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/alloc/src/boxed.rs:1934:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/7b46aa594c4bdc507fbd904b6777ca30c37a9209/library/std/src/sys/unix/thread.rs:108:17
  23: __pthread_deallocate

Thread 'tokio-runtime-worker' panicked at 'Bad input data provided to instantiate: unexpected first byte decoding Option', bin/node/runtime/src/lib.rs:1793

This is a bug. Please report it at:

	https://github.com/paritytech/substrate/issues/new

2022-10-23 05:13:40 Evicting failed runtime instance error=Runtime panicked: Bad input data provided to instantiate: unexpected first byte decoding Option
2022-10-23 05:13:40 Evicting failed runtime instance error=Runtime panicked: Bad input data provided to instantiate: unexpected first byte decoding Option

Steps to reproduce
It can be reproduced since polkadot-v0.9.31 and later, may relates to this PR https://github.com/paritytech/substrate/pull/12429

cargo contract new flipper then cargo contract build for flipper.contract
cargo build --release -p node-cli then target/release/substrate --dev
Open https://contracts-ui.substrate.io/add-contract upload flipper.contract

IMO it looks like ContractsUI hasn't compatible with latest pallet-contracts Runtime API change, so it's pass bad RPC call, but this shouldn't made the Runtime crash

I don't think behavior is specific to contracts. It is what happens when the state_call RPC can't decode the arguments.  If this is desired behavior is another question.

I don't think behavior is specific to contracts. It is what happens when the state_call RPC can't decode the arguments. If this is desired behavior is another question.

I don't think this relates to recent contracts Runtime API change either.
The Runtime shouldn't panic when given a bad input, it should just reject it.

The title of a issue is a bit of a clickbait, though. Cause the runtime only panics when you have direct access to a node via RPC. And only this one node's runtimes panics. Purely offchain. In this case it might be a bit ugly but not at all dangerous.
Still, I think it shouldn't be a panic but an error.

clickbait

Do you think it's more clear to rename the title to "Bad Runtime RPC call lead the Runtime panic"?

I renamed in a way that I think describes the problem.

Panic is completely fine. This is done this way since always and otherwise we would need to wrap return type of a runtime function into an extra result. If you don't follow the Abi, there is no other way than panicking because the input is invalid.

Panic is completely fine.

Does it means the node need to recreate one when the Runtime panicked? I'm concerning that could be a DoS vector of node (not the network).

No. You need to reset the memory. However, we reset the memory anyway for every new call into the runtime. So, there is no difference to the normal behavior.

No. You need to reset the memory. However, we reset the memory anyway for every new call into the runtime. So, there is no difference to the normal behavior.

So the only issue here is this should be a error or just suppress it, or end-user will confuse this

or end-user will confuse this

Who is the end user here? The node operator?

or end-user will confuse this

Who is the end user here? The node operator?

Yes, the node operator, including me, when I saw "This is a bug. Please report it at:" my instant thinking is collecting info and submit to here, then you explain to me this is not bug, it's design, but the node said it's a bug, so I guess others would submit this too
Another old story is https://github.com/paritytech/substrate/issues/12354
3 years ago I first met this, I submit to Substrate, I remembered it's you told me that's because DB broken and close the issue, so I know what the problem is.
But our users (node operators) don't know that, 3 years I got maybe hundreds report (The DB growth faster than we thought) for that issue because the node says it's a bug, please submit to Phala team.
So I'd proposal it is worthy to suppress expected errors, not raise "Please report it"

"This is a bug. Please report it at:"

Yeah that is because it panicked in the native runtime. A panic in the wasm runtime doesn't print this.
For the wasm runtime we have the following feature: https://github.com/paritytech/substrate/blob/master/primitives/io/Cargo.toml#L91
When this feature is enabled, the panics will be returned as an error of the execution and not directly printed to the log.


chore(main): release 1.8.0

:robot: I have created a release beep boop
1.8.0 (2024-12-03)
Features

migrate to golang (#63) (7eed464)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v1.8.0
:sunflower:


Support TLS

It would be good to allow the TCP connection with fluent to support TLS. I guess it would be a configuration option to enable/disable.
If you are still maintaining this repo, then I am happy to put together a PR for the functionality.

It would be good to allow the TCP connection with fluent to support TLS. I guess it would be a configuration option to enable/disable.
If you are still maintaining this repo, then I am happy to put together a PR for the functionality.

Hello, I'm still maintaining repository. Of course you can add TLS support. I would be happy for your contribution.
Best


Support k8s 1.7.x

Relates to samsung-cnct/k2#607
This is partially working. For me it correctly brings up a 1.7.1 cluster, and I can deploy stateless Nginx to it. Known issues described below.
Feel free to suggests improvements if anything stands out.

This revision does not currently:

[ ] Deploy the "vanilla" Kubernetes dashboard
[ ] Install Helm chart for either GitLab or MongoDB w/ stateful sets

There appears to be some issue with the way storage classes (e.g. the default) are configured in the K2 cluster, so the Helm charts I've attempted will:

Deploy a PersistentVolumeClaim, which gets stuck in Pending state, because:
No persistent volumes can be provisioned/claimed/etc.

I've attempted all this even after deploying the below storage class, to no avail.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: standard
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
    volume.alpha.kubernetes.io/storage-class: "default"
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2

a.  thanks!
b. if you have the time, can you make the default version of the files be the common file?  ie:  if the common file is for 1.6 & 1.7, please make that the default.  this will require checking that 1.5 still works so it is some scope creep.  if you don't have time for this, please file an issue so someone else can perform this cleanup and link it here.
c. please set the default version of kubernetes to be 1.7.1 so that CI can test it.  this PR is using 1.6.7 in CI right now.  you may also need to push a temporary k2-tools image (and use it in the Jenkinsfile) while samsung-cnct/k2-tools#97 keeps moving

Yeah, I have to second what Patrick said.  I think we need to adopt a "default is current" for anyplace with template subdirs, and then have version subdirs for past versions.
/templates
    whatever.jinja  <should be the v1.7 version>
    /v1.6
       whateverA.jinja
    /v1.5
       whateverB.jinja

Also, from my initial look,  v1.7 should be created from v1.6 files.  (and for that matter, in almost all places it may be possible to make v1.6 files default, and remove the v1.6 directory.  In this way 1.6 and 1.7 will both use the same default file.  This would be perfectly ok, until some definite difference was found btwn 1.6 and 1.7).
anything with 1.4 should be removed.  templates, variables, etc.
In kraken.config/files/config.yaml and gke-config.yaml.   We should be able to initially create a <blah>17 config at the 16 block. e.g.
 - &kubeVersionedFabric
      name: kubeVersionedFabric
      kind: versionedFabric
      type: canal
      kubeVersion:
        default: *defaultCanalFabric
        versions:
          v1.6: *defaultCanalFabric16
          v1.7: *defaultCanalFabric16

instead of creating a whole new block.  The only changes would be a version change, and those should apply to 16 also anyway.  The only time you would need a new 17 block is if the setup/vars are much different.

Actually, baring any changes to the directory structure to make /template defaults be 1.7, just duplicating the v1.6 directory to a new v1.7 directory is a good first step.
You should not have to update DNS internal vars to _17. I think just running the 1.6 setup will work fine for now.

CI is failing because k2-tools doesn't have a 1.7 compatible version of helm installed.  I recommend updating build-scripts/update-generated-config.sh to set the config flag to use the latest version of helm that is installed.  Can probably tack it onto the name setting regex by doing a newline, spaces and setting  "helmOverride: true"  or something.
I may have made this same comment on the k2-tools PR.

@mikeln @coffeepac
Based on comments here & discussion in Slack, I've outlined the process in Documentation/UPGRADING_KUBERNETES.md, for:

Migrating (past) default templates to a version-specific template directory.
Updating main cluster configuration to suit.

I've also demonstrated it with the v1.5 configuration templates.
Please review the outline and let me know if it sounds sensible.
I'll follow up on the CI related tweaks to let this pass (e.g. helm version issues).

Also, for what it's worth:

Previous attempt failed because I was basically forking 1.5 configuration and trying to hack it into a viable 1.7 cluster, without the benefit of all the 1.6 work done previously. (my bad)
With @mikeln's rendition, I've got functional 1.7.1 and 1.5.7 clusters running currently.

(TO DO for @samba: verify that defaults match 1.7)


Configure for multiple source and translation files

I tried to set up a project with the new client, but when I run tx add it only lets me set one source file. I have a project with a few dozen source files, so ideally I can just point it to the directory instead of individual files. Is this possible?

Hello @rhiaro,
Unfortunately, no. We have talked about this but it is a bit difficult and the directory structure of each user may be too unpredictable for us to come up with a universal solution.
However, depending on how predictable your directory structure is, you could achieve what you want using a relatively simple shell script. For example, given this directory structure:
➜ tree

    # <<< .
    # <<< ├── project1
    # <<< │   └── source.po
    # <<< ├── project2
    # <<< │   └── source.po
    # <<< ├── project3
    # <<< │   └── source.po
    # <<< └── project4
    # <<<     └── source.po

You can run:
➜ for FOLDER in $(ls); do
      tx add \
          --file-filter="$FOLDER/<lang>.po" \
          --type=PO \
          --organization=myorg \
          --project=myproj \
          --resource=$FOLDER \
          $FOLDER/source.po
  done

    # <<< SUCCESS  Your configuration has been saved in '.tx/config'
    # <<<          You can now push and pull content with 'tx push' and 'tx pull'
    # <<<
    # <<< SUCCESS  Your configuration has been saved in '.tx/config'
    # <<<          You can now push and pull content with 'tx push' and 'tx pull'
    # <<<
    # <<< SUCCESS  Your configuration has been saved in '.tx/config'
    # <<<          You can now push and pull content with 'tx push' and 'tx pull'
    # <<<
    # <<< SUCCESS  Your configuration has been saved in '.tx/config'
    # <<<          You can now push and pull content with 'tx push' and 'tx pull'

and the resulting configuration will be:
# ➜  cat .tx/config

[main]
host = https://www.transifex.com

[o:myorg:p:myproj:r:project1]
file_filter  = project1/<lang>.po
source_file  = project1/source.po
type         = PO
minimum_perc = 0

[o:myorg:p:myproj:r:project2]
file_filter  = project2/<lang>.po
source_file  = project2/source.po
type         = PO
minimum_perc = 0

[o:myorg:p:myproj:r:project3]
file_filter  = project3/<lang>.po
source_file  = project3/source.po
type         = PO
minimum_perc = 0

[o:myorg:p:myproj:r:project4]
file_filter  = project4/<lang>.po
source_file  = project4/source.po
type         = PO
minimum_perc = 0

If you want, can you share some details about your directory structure with us? We can either help you come up with a solution and it would give us a better picture of what our users typically need so that we can have it in mind when coming up with a solution on our end.


RAG for phi 3 vision using  kernel memory

RAG for phi 3 vision using  kernel memory in place of semantic text memory.Any example for offline retrival in c#?
sorry to bother you.I am new is this arena

Hi @Barshan-Mandal
To implement Retrieval Augmented Generation (RAG) using the Phi-3 model with kernel memory instead of semantic text memory, you can follow a similar approach to the one used with semantic text memory but adapt it for offline retrieval. Here's a basic example in C# to get you started:
Step-by-Step Example

Set Up Your Environment:

Ensure you have the necessary libraries installed. You might need Microsoft.SemanticKernel and other dependencies.

Create the Kernel and Memory:

Initialize the kernel and set up the memory for offline retrieval.

Implement the Retrieval and Generation Logic:

Use the kernel to retrieve relevant information from your local memory and generate responses using the Phi-3 model.

Here's a simplified code snippet to illustrate this:
Explanation of the code:

Kernel Initialization: The kernel is set up with a local model for chat completion and a local memory service.
Memory Retrieval: The LocalMemoryService class is a simple implementation that retrieves information based on a key. You can expand this to use a local database or file system.
Response Generation: The CompleteChat method combines the question with the retrieved information to generate a response.

using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.SemanticKernel.Memory;

class Program
{
    static void Main(string[] args)
    {
        // Initialize the kernel
        var kernel = Kernel.CreateBuilder()
                           .AddChatCompletionService(new LocalModelChatCompletionService("path_to_phi3_model"))
                           .AddMemoryService(new LocalMemoryService())
                           .Build();

        // Define your question
        string question = "What is the capital of France?";

        // Retrieve relevant information from local memory
        var memoryService = kernel.GetService<IMemoryService>();
        var relevantInfo = memoryService.Retrieve("capital_of_france");

        // Generate a response using the Phi-3 model
        var chatCompletionService = kernel.GetService<IChatCompletionService>();
        var response = chatCompletionService.CompleteChat(question, relevantInfo);

        // Output the response
        Console.WriteLine(response);
    }
}

class LocalMemoryService : IMemoryService
{
    // Implement your local memory retrieval logic here
    public string Retrieve(string key)
    {
        // Example: Retrieve data from a local file or database
        if (key == "capital_of_france")
        {
            return "The capital of France is Paris.";
        }
        return string.Empty;
    }
}

This is a basic example to get you started.
Please see this blog for a More in depth walkthrough

why isnt this working
`
#pragma warning disable SKEXP0070
#pragma warning disable SKEXP0050
#pragma warning disable SKEXP0001
#pragma warning disable SKEXP0052
#pragma warning disable NU1605
using Build5Nines.SharpVector;
using Build5Nines.SharpVector.Data;
using Elastic.Clients.Elasticsearch.Core.Search;
using Microsoft.KernelMemory;
using Microsoft.ML.OnnxRuntimeGenAI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Microsoft.SemanticKernel.Embeddings;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Plugins.Memory;
using System.Collections;
private static async Task Phi3MemoryRAG()
{
var modelPath = @"F:\HuggingFace Models\Phi-3-Vision\cpu-int4-rtn-block-32-acc-level-4";
string modelId = "microsoft/Phi-3-vision-128k-instruct";
// Load the model and services
var builder = Kernel.CreateBuilder();
builder.AddOnnxRuntimeGenAIChatCompletion(modelId, modelPath);
builder.AddLocalTextEmbeddingGeneration();
// Build Kernel
var kernel = builder.Build();

// Create services such as chatCompletionService and embeddingGeneration
var chatCompletionService = kernel.GetRequiredService<IChatCompletionService>();
var embeddingGenerator = kernel.GetRequiredService<ITextEmbeddingGenerationService>();

// Setup a memory store and create a memory out of it
var memoryStore = new VolatileMemoryStore();
var memory = new SemanticTextMemory(memoryStore, embeddingGenerator);

const string MemoryCollectionName = "fanFacts";

await memory.SaveInformationAsync(MemoryCollectionName, id: "info1", text: "Gisela's favourite super hero is Batman");
await memory.SaveInformationAsync(MemoryCollectionName, id: "info2", text: "The last super hero movie watched by Gisela was Guardians of the Galaxy Vol 3");
await memory.SaveInformationAsync(MemoryCollectionName, id: "info3", text: "Bruno's favourite super hero is Invincible");
await memory.SaveInformationAsync(MemoryCollectionName, id: "info4", text: "The last super hero movie watched by Bruno was Aquaman II");
await memory.SaveInformationAsync(MemoryCollectionName, id: "info5", text: "Bruno don't like the super hero movie: Eternals");

// Loading it for Save, Recall and other methods
kernel.ImportPluginFromObject(new TextMemoryPlugin(memory));

while (true)
{
    // Get user input
    Console.ForegroundColor = ConsoleColor.White;
    Console.Write("User > ");
    var question = Console.ReadLine()!;

    // Settings for the Phi-3 execution
    OpenAIPromptExecutionSettings executionSettings = new()
    {
        ToolCallBehavior = ToolCallBehavior.EnableKernelFunctions,
        MaxTokens = 200
    };

    // Invoke the kernel with the user input
    var response = kernel.InvokePromptStreamingAsync(
        promptTemplate: @"Question: {{$input}}

Answer the question using the memory content: {{Recall}}",
arguments: new KernelArguments(executionSettings)
{
{ "input", question },
{ "collection", MemoryCollectionName }
}
);
    Console.ForegroundColor = ConsoleColor.Green;
    Console.Write("\nAssistant > ");

    string combinedResponse = string.Empty;
    await foreach (var message in response)
    {
        //Write the response to the console
        Console.Write(message);
        combinedResponse += message;
    }

    Console.WriteLine();
}

}`

It looks like you're trying to set up a memory retrieval system using the Semantic Kernel and ONNX Runtime for a chat application.
Here are a few things to check and some suggestions to help troubleshoot the issue:

Dependencies and Imports:

Ensure all the necessary NuGet packages are installed and up-to-date.
Verify that the namespaces and classes you're using are correctly referenced.

Model Path and ID:

Double-check the modelPath and modelId to ensure they are correct and accessible.

Kernel and Services Initialization:

Make sure the kernel and services are properly initialized. Check for any exceptions or errors during the initialization process.

Memory Store and Plugin:

Ensure the VolatileMemoryStore and TextMemoryPlugin are correctly set up and integrated with the kernel.

Prompt Execution Settings:

Verify the OpenAIPromptExecutionSettings and ensure they are correctly configured for your use case.

Async Method Execution:

Ensure that all asynchronous methods are awaited properly to avoid any runtime issues.

Here's a slightly revised version of your code with some minor adjustments if you want to try this:
#pragma warning disable SKEXP0070
#pragma warning disable SKEXP0050
#pragma warning disable SKEXP0001
#pragma warning disable SKEXP0052
#pragma warning disable NU1605

using Build5Nines.SharpVector;
using Build5Nines.SharpVector.Data;
using Elastic.Clients.Elasticsearch.Core.Search;
using Microsoft.KernelMemory;
using Microsoft.ML.OnnxRuntimeGenAI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Microsoft.SemanticKernel.Embeddings;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Plugins.Memory;
using System.Collections;
using System.Threading.Tasks;

private static async Task Phi3MemoryRAG()
{
    var modelPath = @"F:\HuggingFace Models\Phi-3-Vision\cpu-int4-rtn-block-32-acc-level-4";
    string modelId = "microsoft/Phi-3-vision-128k-instruct";

    // Load the model and services
    var builder = Kernel.CreateBuilder();
    builder.AddOnnxRuntimeGenAIChatCompletion(modelId, modelPath);
    builder.AddLocalTextEmbeddingGeneration();

    // Build Kernel
    var kernel = builder.Build();

    // Create services such as chatCompletionService and embeddingGeneration
    var chatCompletionService = kernel.GetRequiredService<IChatCompletionService>();
    var embeddingGenerator = kernel.GetRequiredService<ITextEmbeddingGenerationService>();

    // Setup a memory store and create a memory out of it
    var memoryStore = new VolatileMemoryStore();
    var memory = new SemanticTextMemory(memoryStore, embeddingGenerator);

    const string MemoryCollectionName = "fanFacts";

    await memory.SaveInformationAsync(MemoryCollectionName, id: "info1", text: "Gisela's favourite super hero is Batman");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info2", text: "The last super hero movie watched by Gisela was Guardians of the Galaxy Vol 3");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info3", text: "Bruno's favourite super hero is Invincible");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info4", text: "The last super hero movie watched by Bruno was Aquaman II");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info5", text: "Bruno doesn't like the super hero movie: Eternals");

    // Loading it for Save, Recall and other methods
    kernel.ImportPluginFromObject(new TextMemoryPlugin(memory));

    while (true)
    {
        // Get user input
        Console.ForegroundColor = ConsoleColor.White;
        Console.Write("User > ");
        var question = Console.ReadLine()!;

        // Settings for the Phi-3 execution
        OpenAIPromptExecutionSettings executionSettings = new()
        {
            ToolCallBehavior = ToolCallBehavior.EnableKernelFunctions,
            MaxTokens = 200
        };

        // Invoke the kernel with the user input
        var response = kernel.InvokePromptStreamingAsync(
            promptTemplate: @"Question: {{$input}}
Answer the question using the memory content: {{Recall}}",
            arguments: new KernelArguments(executionSettings)
            {
                { "input", question },
                { "collection", MemoryCollectionName }
            }
        );

        Console.ForegroundColor = ConsoleColor.Green;
        Console.Write("\nAssistant > ");

        string combinedResponse = string.Empty;
        await foreach (var message in response)
        {
            // Write the response to the console
            Console.Write(message);
            combinedResponse += message;
        }

        Console.WriteLine();
    }
}

It looks like you're trying to set up a memory retrieval system using the Semantic Kernel and ONNX Runtime for a chat application.
Here are a few things to check and some suggestions to help troubleshoot the issue:

Dependencies and Imports:

Ensure all the necessary NuGet packages are installed and up-to-date.
Verify that the namespaces and classes you're using are correctly referenced.

Model Path and ID:

Double-check the modelPath and modelId to ensure they are correct and accessible.

Kernel and Services Initialization:

Make sure the kernel and services are properly initialized. Check for any exceptions or errors during the initialization process.

Memory Store and Plugin:

Ensure the VolatileMemoryStore and TextMemoryPlugin are correctly set up and integrated with the kernel.

Prompt Execution Settings:

Verify the OpenAIPromptExecutionSettings and ensure they are correctly configured for your use case.

Async Method Execution:

Ensure that all asynchronous methods are awaited properly to avoid any runtime issues.

Here's a slightly revised version of your code with some minor adjustments if you want to try this:
#pragma warning disable SKEXP0070
#pragma warning disable SKEXP0050
#pragma warning disable SKEXP0001
#pragma warning disable SKEXP0052
#pragma warning disable NU1605

using Build5Nines.SharpVector;
using Build5Nines.SharpVector.Data;
using Elastic.Clients.Elasticsearch.Core.Search;
using Microsoft.KernelMemory;
using Microsoft.ML.OnnxRuntimeGenAI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Microsoft.SemanticKernel.Embeddings;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Plugins.Memory;
using System.Collections;
using System.Threading.Tasks;

private static async Task Phi3MemoryRAG()
{
    var modelPath = @"F:\HuggingFace Models\Phi-3-Vision\cpu-int4-rtn-block-32-acc-level-4";
    string modelId = "microsoft/Phi-3-vision-128k-instruct";

    // Load the model and services
    var builder = Kernel.CreateBuilder();
    builder.AddOnnxRuntimeGenAIChatCompletion(modelId, modelPath);
    builder.AddLocalTextEmbeddingGeneration();

    // Build Kernel
    var kernel = builder.Build();

    // Create services such as chatCompletionService and embeddingGeneration
    var chatCompletionService = kernel.GetRequiredService<IChatCompletionService>();
    var embeddingGenerator = kernel.GetRequiredService<ITextEmbeddingGenerationService>();

    // Setup a memory store and create a memory out of it
    var memoryStore = new VolatileMemoryStore();
    var memory = new SemanticTextMemory(memoryStore, embeddingGenerator);

    const string MemoryCollectionName = "fanFacts";

    await memory.SaveInformationAsync(MemoryCollectionName, id: "info1", text: "Gisela's favourite super hero is Batman");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info2", text: "The last super hero movie watched by Gisela was Guardians of the Galaxy Vol 3");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info3", text: "Bruno's favourite super hero is Invincible");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info4", text: "The last super hero movie watched by Bruno was Aquaman II");
    await memory.SaveInformationAsync(MemoryCollectionName, id: "info5", text: "Bruno doesn't like the super hero movie: Eternals");

    // Loading it for Save, Recall and other methods
    kernel.ImportPluginFromObject(new TextMemoryPlugin(memory));

    while (true)
    {
        // Get user input
        Console.ForegroundColor = ConsoleColor.White;
        Console.Write("User > ");
        var question = Console.ReadLine()!;

        // Settings for the Phi-3 execution
        OpenAIPromptExecutionSettings executionSettings = new()
        {
            ToolCallBehavior = ToolCallBehavior.EnableKernelFunctions,
            MaxTokens = 200
        };

        // Invoke the kernel with the user input
        var response = kernel.InvokePromptStreamingAsync(
            promptTemplate: @"Question: {{$input}}
Answer the question using the memory content: {{Recall}}",
            arguments: new KernelArguments(executionSettings)
            {
                { "input", question },
                { "collection", MemoryCollectionName }
            }
        );

        Console.ForegroundColor = ConsoleColor.Green;
        Console.Write("\nAssistant > ");

        string combinedResponse = string.Empty;
        await foreach (var message in response)
        {
            // Write the response to the console
            Console.Write(message);
            combinedResponse += message;
        }

        Console.WriteLine();
    }
}

System.MissingMethodException   HResult=0x80131513   Message=Method not found: 'System.ValueTuple3<System.ReadOnlyMemory1<Int64>,System.ReadOnlyMemory1,System.ReadOnlyMemory1<Int64>> FastBertTokenizer.BertTokenizer.Encode(System.String, Int32, System.Nullable1)'.
Source=SmartComponents.LocalEmbeddings
StackTrace:
at SmartComponents.LocalEmbeddings.LocalEmbedder.Embed[TEmbedding](String inputText, Nullable1 outputBuffer, Int32 maximumTokens)    at SmartComponents.LocalEmbeddings.LocalEmbedder.Embed(String inputText, Int32 maximumTokens)    at SmartComponents.LocalEmbeddings.SemanticKernel.LocalTextEmbeddingGenerationService.GenerateEmbeddingsAsync(IList1 data, Kernel kernel, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.Embeddings.EmbeddingGenerationExtensions.d__02.MoveNext()    at Microsoft.SemanticKernel.Memory.SemanticTextMemory.<SaveInformationAsync>d__3.MoveNext()    at phi3vision_aiconsole.Program.<Phi3MemoryRAG>d__2.MoveNext() in O:\Windows For Programming\Projects\Visual Studio\Console\Ai\phi3vision_aiconsole\Program.cs:line 88    at phi3vision_aiconsole.Program.<Main>d__0.MoveNext() in O:\Windows For Programming\Projects\Visual Studio\Console\Ai\phi3vision_aiconsole\Program.cs:line 25

How do i use RAG by kernel memory and Semantic kernel Handlebar Planner with phi3 vision

the above exception is thrown


Update Video and Index pages

Update Video docs to reflect addition ability to accept embed url.
Update Index to reflect latest release version.
Issue reference #210
Pull Request #211

:+1:


Tooltip of floating elements placed too low

If element, tooltip is assigned to, or any parent node of that element has float: left | right style, and tooltip text wraps to multiple lines, tooltip is placed vertically too low.

I will be fixing positioning within #1070
but thanks details
if you able to create plunker
It will be much appretiated


MQTT topic prefix isn't always SMART/HILD

Octopus Energy provide the Glowstick however the topic prefix is SMART/OCT/ instead of SMART/HILD/ . Could this be supported? Maybe instead of specifying just the Device ID, the full topic is requested, in case there are other energy customers using this product?

As a workaround, I used a bit of Node-RED to copy the contents of the payload from SMART/OCT/xxx to SMART/HILD/xxx and then the existing package works as expected.

@Adoruta I didn't realise Octopus Energy also offer such a product. Happy to add support for this. I will add a 'glow_provider' parameter which will allow overriding this part of the topic.
Thanks


fix: Prevent variable redeclaration in single param conflict for pgx

fixed: #1490
the same change #1298 for pgx template

Can confirm that this PR fixes the issue reported in #1490!

Can confirm that this PR fixes the issue reported in #1490! Respectful bump to @kyleconroy for review? :)


Style disabled form elements

Missing style/indicator for disabled elements.
<input type="text" disabled>
<!-- You can't tell the difference -->
<input type="text">

Suggestions

Lower the opacity a little bit for disabled elements

input, select, textarea {
  &[disabled]{
    opacity: 0.7;
  }
}

Disabled indicator: text, color, border?.

@nullrocks a commit that does this was merged but it has't been released yet (https://github.com/Esri/calcite-web/issues/675), but I wanted to tweak that style for the release anyways. I agree that lowered opacity is the way to do this. I'll be sure to put this in the next release.


Updates to project.xml within this repository's README.md

Within this repository's README.md, it looks like the project.xml example displayed has become dated.  For example, in my discussion regarding issues with html5 target, it was suggested to remove the 'dom' haxedef flag from the project.xml as Away3d primarily targets WebGL.
<project>
    <haxedef name="dom" if="html5" />
</project>

Can this be reviewed, potentially removing the 'dom' haxedef?

I've updated the README.md to reflect the current 'typical' project.xml. Thanks for pointing out the issue.


Keyboard Manager simply does not work

Microsoft PowerToys version
0.71.0
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
Keyboard Manager
Steps to reproduce
Turn it on. Setup a remap. Setup a shortcut. Either way, doesn't do a thing.
✔ Expected Behavior
Remaps a key. Remaps a shortcut.
❌ Actual Behavior
Nothing.
Other Software
No response

I have the exact same issue.

You really have to be more specific than this. What are the remappings you try to set?

This

Strangely it sometimes works and sometimes doesn't.

At least I find that after I reboot Windows, this function doesn't work, which is strange because usually reboot is the best way to fix bugs.

You really have to be more specific than this. What are the remappings you try to set?

It doesn't matter which remapping you set, the remapping function doesn't work at all.

/dup #24494


error in readme example

The readme example should have a needs: job1 line in the definition for job2, otherwise job2 can start executing before the job1 artifact has been uploaded and fail

Thanks, fixed it :)


Format README.md to respect tabs in output examples

I want the README.md updated
so that it respects the tabs that are generated as output of the script thus aligning output in two columns
Current format:
python roll.py d20+4 2d6+3 d4+1

d20+4:	8 +4 = 12
2d6+3:	1+2 +3 = 6
d4+1:	3 +1 = 4

Desired format:

README.md format fixed with pull request


Scaffolder encodes relative bitbucket URL twice

Expected Behavior
The scaffolder should be able to fetch cookiecutter templates from URLs containing special characters.
Example: https://github.com/backstage/foo/{{ nested }}

Actual Behavior
The scaffolder is able to fetch cookiecutter templates from absolute URLs containing special characters, but has problems when using Bitbucket + relative URLs.
The reason for that are the following two issues:

The scaffolder treats relative URLs differently than absolute URLs (see here)
The bitbucket integration encodes the given path (see here)

Both can easily be fixed separately, but in combination it's quite annoying.
Let me give you some more context to the issues ...
1. The scaffolder treats relative URLs differently than absolute URLs
When fetching cookiecutter templates, the scaffolder uses the fetchContents() method, which supports files, relative URLs and absolute URLs. Relative & absolute URLs are treated differently - absolute URLs are not encoded, but relative URLs are do to using the resolveUrl() method.
// relative URL
// will fetch from: https://github.com/backstage/foo/%7B%7B%20nested%20%7D%7D
await fetchContents({
  baseUrl: 'https://github.com/backstage/foo/',
  fetchUrl: '{{ nested }}',
});

// absolute URL
// will fetch from: https://github.com/backstage/foo/{{ nested }}
await fetchContents({
  fetchUrl: `https://github.com/backstage/foo/{{ nested }}`,
});

I created this example to highlight the issue: https://github.com/backstage/backstage/pull/11989/files#diff-e0d19aab8d950f00e19d66c0d4381e7474f6039fcf1744a2487a90aeb1d428f4
2. The bitbucket integration encodes the given path
In contrast to other integrations, the bitbucket integration will encode the custom path when using the getBitbucketServerDownloadUrl(). That's correct, but when having issue 1 in mind, that leads to some trouble. When using relative URLs it will lead to a URL which is encoded twice.
When we use the input from the example above, will we end up with the following path attributes:
Relative URL
Input: https://github.com/backstage/foo/%7B%7B%20nested%20%7D%7D
Path: %257B%257B%2520nested%2520%257D%257D
Absolute URL
Input: https://github.com/backstage/foo/{{ nested }}
Path: %7B%7B%20nested%20%7D%7D

Steps to Reproduce

Check the provided test case: https://github.com/SDA-SE/backstage/commit/a8fededf5c20215c561a2d1f831b33342cb49ea5
Use a cookiecutter template with a relative path to a bitbucket server

Example:
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  name: bitbucket-issue-example
  title: Bitbucket issue example
  description: Short bitbucket issue example
  tags:
    - techdocs
spec:
  type: documentation
  parameters:
    - title: Example
      required:
        - name
      properties:
        name:
          type: string
          title: Name
          description: Name
          ui:field: EntityNamePicker

  steps:
    - name: Render Docs Template
      action: fetch:cookiecutter
      input:
        url: "{{ cookiecutter.name }}"
        values:
          name: ${{ parameters.name }}

Context

We noticed the issue while using one of our default cookiecutter templates which works fine for GitHub, but doesn't work with Bitbucket. We tracked it down to the mentioned issue, but were not sure what the best solution is.
Possible solutions
1. Remove encodeURIComponent() from bitbucket integration
That would solve our issue for relative URLs, but will cause issues for absolute URLs. Furthermore the path needs to be encoded, so it's the right place to do it.
2. Avoid encoding in the fetchContents() method
Relative and absolute URLs should be treated the same way. So the fetchContents needs to be touched. Question is, if both should be encoded - or not.
To fix our problem, the best would be to decode the URL. See #11989

Fixed! Closing :)


can't build with bazel on linux

I run the command to build and found below errors:
bazel build facets:facets_jupyter
ERROR: /home/rum/.cache/bazel/_bazel_rum/145145386566f2ed261e1410aff2d253/external/io_bazel_rules_closure/closure/private/defs.bzl:27:16: The set constructor for depsets is deprecated and will be removed. Please use the depset constructor instead. You can temporarily enable the deprecated set constructor by passing the flag --incompatible_disallow_set_constructor=false
ERROR: error loading package '': Extension file 'closure/private/defs.bzl' has errors
ERROR: error loading package '': Extension file 'closure/private/defs.bzl' has errors
INFO: Elapsed time: 0.125s
FAILED: Build did NOT complete successfully (0 packages loaded)
Then I changed the command to below which is followed with other errors:
bazel build facets:facets_jupyter --incompatible_disallow_set_constructor=false
ERROR: /work/facets/facets/BUILD:8:1: every rule of type ts_web_library implicitly depends upon the target '@com_google_javascript_closure_compiler_externs//:com_google_javascript_closure_compiler_externs', but this target could not be found because of: no such package '@com_google_javascript_closure_compiler_externs//': The set constructor for depsets is deprecated and will be removed. Please use the depset constructor instead. You can temporarily enable the deprecated set constructor by passing the flag --incompatible_disallow_set_constructor=false
ERROR: Analysis of target '//facets:facets_jupyter' failed; build aborted
INFO: Elapsed time: 0.414s
FAILED: Build did NOT complete successfully (7 packages loaded)
Please help!

Same issue on OSX

Thanks for reporting -same thing as https://github.com/tensorflow/tensorboard/issues/585 (as we use tensorboard's build system).
I'll fix this just as they did.


Add Sentry

Add Sentry for error tracking

Fixed in https://github.com/Gravestorm/Gravebot/pull/47


up for requests?

I just completed a build of one half of a corne. I have thoughts :) Are you up for a couple requests that i lack the skill currently to do myself? Totally cool if not but I wanted to check first.

Depends a little bit on the request, but I am certainly open. Feel free to add them here.

Excellent. Thank you :) Two things came to mind.
First, I was considering a bottom plate that is the same size as the “thin” layers.
Second, a version of the top plate that protects the MCU that has holes big enough that it could serve as a middle layer. The use case there is I don’t install oleds on my personal builds. Two of those layers would seal up the MCU pretty nicely. And maintain the height of the case.
Thank you for considering my requests. This case is almost exactly what I was trying and failing to design myself.

For plate 0, I was thinking of having an additional option, not replacing the current. But understood.
When I say "top plate", I mean file 7. As designed, the upper levels of the sandwich look like files 4, 5, 5, 7. With how I build crkbd, it's possible I think to sandwich as 4, 7, 5, 5 or something similar. Layering file 7 after file 4 (the switch plate) I think will completely cover up the hole above the MCU with no other problems. There just needs to be a version of file 7 with screw holes big enough to hold standoffs.

I'll try to make these modifications on my own. Thanks for being willing to consider them :)


Fix Selenium tests which frequently fail to pass Travis build checks

Three Selenium tests listed below have failed to pass Travis build checks frequently since when we enabled tests working on the new UI. This PR aims to fix them so hopefully we no longer need to restart Travis jobs which run these three tests again and again.
They are :
com.tle.webtests.test.dashboard.PortalsTest
com.tle.webtests.test.contribute.controls.MaxAttachmentsTest
com.tle.webtests.test.workflow.rejection.DecisionPointScriptingByContributorRoleTest

As 2019.1.2 and 2019.2 are coming shortly, I may not work on this PR until these two releases are well done.

Due to this branch being too old, closing it and opening a new PR would avoid code conflicts and make it easier to review.


[WIP] Higher-Order Marble tests

I cherry picked the higher-order test code from v1 so we can start working on getting higher-order marble tests working.
Some tests are failing.
@martinsik if you get a chance, can you look at the failing tests?

@davidwdan Can you give me write permissions to you marbleTest branch?

@martinsik you have permission now.  I think the issue is that in some circumstances there are multiple test schedulers.  If I hack it and pass the test scheduler through the onNext helper function, it works.

Coverage decreased (-0.09%) to 99.908% when pulling 08b0e0af9fc35ee972cc78ce18da23e80fe4be73 on davidwdan:marbleTest into 23e32cafd8d90a4c6d0df5e67172eff2e464571c on ReactiveX:2.x.

Inner observables are now materialized when being converted to a string.  This simplifies things and gets rid of the need to check the instance of the observers.
The test automatic_mock_observer_doesnt_create_loggable_subscription is failing, but I not sure if it's still needed or when those inner subscriptions should start and stop.

Coverage decreased (-0.05%) to 99.953% when pulling ee4ec612fd087ed032361774db3ba3cffc650dcb on davidwdan:marbleTest into 23e32cafd8d90a4c6d0df5e67172eff2e464571c on ReactiveX:2.x.

@davidwdan That test is irrelevant because now the MockObserver automatically subscribes only when calling OnNextNotification:: __toString.
It was previously used in situations where we don't want to log subscriptions. For example in tests such as MergeAllTest.php#L14 where it's not a problem anymore because there are no __toString() calls on $xs or $ys.

I added a groupBy marble test that is currently failing.  We may have to change where the inner observable is materialized


fix: Improve Error Handling in Python Script Execution

Summary
This PR addresses issue #827 which involves suppressed grading results when an individual Python assertion raises an exception during test execution. The changes ensure that exceptions are properly captured and included in the componentResults of the JSON output, providing clearer feedback on test failures. In the future, we should consider treating Python exceptions separately from grading result failures as they are different classes of errors.
Test Instructions
To demonstrate the issue, an additional external assert file fails.py was created with the following contents:
def get_assert(output, context):
    raise Exception("This is a forced failure")

This file was used in the promptfooconfig.yaml for testing purposes:
prompts:
  - 'Tell me about {{topic}} in three words'
providers:
  - openai:gpt-4-1106-preview
tests:
  - vars:
      topic: yellow fruits
    assert:
      - type: python
        value: file://fails.py
      - type: python
        value: file://assert.py

Running the evaluation with npm i and then npx [path/to/promptfoo] eval --config ./promptfooconfig.yaml --output exception.json now correctly includes the exception details in the JSON output.
Thank you!

Thanks Michael!


NPE guard for null github property

clear log messages on misconfigured job

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests


Help with the example config

I know I'm just missing something big, but not sure where to find it. I am using the example config given, and I am getting 'org-modern.menu' not found. I haven't worked with lua before (haven't migrated from vimscript), so it's probably not understanding lua.
Also the lua is being called within a lua block in my init.vim, so it is interpreting it as lua.
Full error:
Error detected while processing /Users/rgmfn/.config/nvim/init.vim:
line  308:
E5108: Error executing lua [string ":lua"]:18: module 'org-modern.menu' not found:
no field package.preload['org-modern.menu']
no file './org-modern/menu.lua'
no file '/opt/homebrew/share/luajit-2.1.0-beta3/org-modern/menu.lua'
no file '/usr/local/share/lua/5.1/org-modern/menu.lua'
no file '/usr/local/share/lua/5.1/org-modern/menu/init.lua'
no file '/opt/homebrew/share/lua/5.1/org-modern/menu.lua'
no file '/opt/homebrew/share/lua/5.1/org-modern/menu/init.lua'
no file './org-modern/menu.so'
no file '/usr/local/lib/lua/5.1/org-modern/menu.so'
no file '/opt/homebrew/lib/lua/5.1/org-modern/menu.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './org-modern.so'
no file '/usr/local/lib/lua/5.1/org-modern.so'
no file '/opt/homebrew/lib/lua/5.1/org-modern.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
[string ":lua"]:18: in main chun

Hi! Have you installed org-modern.nvim? For example, using lazy.nvim it is done like this:
require("lazy").setup({
  -- ...
  "danilshvalov/org-modern.nvim",
})

Yeah... can't believe that was it, forgot to actually run the install command even though it was in my rc. Excited to have this! Looks super cool :)


Investigate puppeteer-firefox

https://github.com/GoogleChrome/puppeteer/tree/master/experimental/puppeteer-firefox/

This could be implemented as a wendigo plugin (some extra implementation on plugin systems required)
Current limitations found:

bypassCSP not implemented on puppeteer firefox
logs not working the same way
cookies not working as expected
Requests mocks and requests api in general is different

~88% of tests passing with puppeteer-firefox with minor changes in wendigo
Some of these limitations are documented and updated at https://aslushnikov.github.io/ispuppeteerfirefoxready/

https://www.npmjs.com/package/require-one-of may be useful for easy setup of firefox, if available

Is the level of effort on this pretty high? I have found myself needing to use puppeteer with firefox recently and was wondering if I should just drop down to puppeteer for the time being.

Hi @dgunay
Adding full support is quite hard, it seems the Puppeteer efforts in this area are not too great lately. It may even be worth moving to Playwright (#447) as it has out-of-the-box support for firefox.
Moving to Playwright would be a major disruption on how wendigo works, but may be worth it

Playwright looks really nice. Luckily it looks like puppeteer still is able to do what I need in Firefox (nothing complicated, just configure some settings, navigate to a page, wait on a selector, and spit out console logs).


Add Tgrade

This PR adds the Tgrade mainnet network and its native TGD token.
Maybe some of the features on the array can be removed:

We are not adding any IBC token for now, so maybe "ibc-transfer" and "ibc-go" are not needed.
We do use wasmd 0.27, so I guess "wasmd_0.24+" should be there.
We are not adding any CW20 token for now, so maybe "cosmwasm" is not needed even if our network is cosmwasm capable.

Hi I am just a community member, I see the preview of this PR still doesn't show tgrade, is something wrong ?
I see in previous PRs for example: https://github.com/osmosis-labs/osmosis-frontend/pull/259 the preview shows it all

Hi I am just a community member, I see the preview of this PR still doesn't show tgrade, is something wrong ?
I see in previous PRs for example: #259 the preview shows it all

Thanks, maybe the previous PRs I followed as example were not complete. I'll check out that one

Thanks !
Usually I see it require changes in src/config.ts where we add source/destination ibc channels and in src/stores/root.ts where poolId and stuff is mentioned. Here is a more recent example: https://github.com/osmosis-labs/osmosis-frontend/pull/376

Hi @abefernan , thanks for the submission. I'm excited for Tgrade joining Osmosis.
FYI, the other PRs you're looking at for reference was quite a while ago when we were using a different code base. By now the structure of files has changed. You could look at #665 if you want to follow an example.
There are few reasons that TGD won't appear on the generated link. Mainly, the config/ibc-assets.ts is missing the tgrade token listing.
Still, we will not list a token if it cannot be transferred to and from Osmosis, so an IBC connection between Osmosis and Tgrade with active relayers is required. We have guides on setting up a relayer, as well as a list of entities willing the support or offer service of running a relayer, if needed. Finally, we'd like to register to the Cosmos Chain Registry that IBC connection once it's made (under the /_IBC/ folder), with which I don't mind helping.
Once that is sorted out, we should be OK to list Tgrade.

Thank you @JeremyParish69 for your help! I have added the IBC data to config/ibc-assets.ts and you can see the connection registered on the chain registry here: https://github.com/cosmos/chain-registry/blob/master/_IBC/osmosis-tgrade.json

I think we are still missing a PR to https://github.com/osmosis-labs/assetlists (to make it appear in trade page) and creation of a liquidity pool as per docs here: https://docs.osmosis.zone/integrate/token-listings.html#token-listings

The relayer is up and running. A pool was successfully created. Is this ready to get merged?
By the way, what does isVerified: true, mean? Seems like it is not set for Tgrade.


Not working at all

for apple-bindgen not apple-sys
apple-bindgen --sdk /Users/user/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk CoreHaptics
/Users/user/ch2/CoreHaptics.h:1:9: fatal error: could not build module 'CoreHaptics'
thread 'main' panicked at 'binding generation failed: ClangDiagnostic("/Users/user/ch2/CoreHaptics.h:1:9: fatal error: could not build module 'CoreHaptics'\n")', /Users/user/.cargo/registry/src/github.com-x/apple-bindgen-0.2.0/src/main.rs:69:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@youknowone Thank you for the help 🙂
Yeah, those don't seem to work for me, but I'm also having an issue with bindgen that I'm going to go post on their GitHub right now. I wonder if it's related to that.
I was in a rush that day [hence why my issue didn't have much detail, sorry!] so I forgot to mention that, strangely, apple-sys worked just fine while apple-bindgen didn't.


Is it possible to configure a mouse while inside a virtual machine?

I have a windows 10 host and an Ubuntu 19.10 guest OS where I would like to use Piper to configure a Logitech G903 mouse (specifically the left/right scroll wheel buttons).
Is it possible or would this only work when using Linux as the host system? Currently Piper says it can't find any supported device which I understand since what the OS is seeing is probably an emulated mouse.
I am using VMWare player.

I guess it's only possible when you assign the device to the VM, but then you can't use it in Windows anymore.

Closing as unrelated.


Use rake bundle:update to update gem versions (Bump ndr_dev_support to 6.0.4)

brakeman / bundle-audit warnings will be fixed in separate branches.


Create a lambda to run migrations on AWS

Purpose
We need to run migrations on our AWS services. In a first we created a Django data migration but we face permissions issue and it is not possible to add more permissions to the AWS user used in the back application. So we decided to run the migration directly on AWS using a lambda dedicated to run migration. To use it again in the future we created a lambda able to run the migration listed in an environment variable. In a second time we should save already executed migration in a database to not run them twice.
Proposal

[x] create a lambda able to run migrations
[x] implement a migration a encode already uploaded timed text tracks
[x] configure terraform to deploy this new lambda
[x] remove the Django data migration previously added

Don't forget the CHANGELOG! :arrow_right: :door:

Don't forget the CHANGELOG! arrow_right door

Oups sorry daddy


DHCP admin failing with mysql connection errors

root issue
https://app.zenhub.com/workspaces/nvvs-devops-622a0b371800e400133bb924/issues/gh/ministryofjustice/nvvs-devops/417
error alarm on 09th october
You are receiving this email because your Amazon CloudWatch Alarm "Commands_Out_Of_Sync" in the EU (London) region has entered the ALARM state, because "Threshold Crossed: 1 out of the last 1 datapoints [4.0 (09/10/23 10:31:00)] was greater than the threshold (2.0) (minimum 1 datapoint for OK -> ALARM transition)." at "Monday 09 October, 2023 10:32:42 UTC".
View this alarm in the AWS Management Console:
https://eu-west-2.console.aws.amazon.com/cloudwatch/deeplink.js?region=eu-west-2#alarmsV2:alarm/Commands_Out_Of_Sync
Alarm Details:

Name: Commands_Out_Of_Sync
Description: Cloud watch alarm triggered for Commands_Out_Of_Sync
this is likely a database query error, previously resolved by redeploying DHCP server cluster.
State Change: OK -> ALARM
Reason for State Change: Threshold Crossed: 1 out of the last 1 datapoints [4.0 (09/10/23 10:31:00)] was greater than the threshold (2.0) (minimum 1 datapoint for OK -> ALARM transition).
Timestamp: Monday 09 October, 2023 10:32:42 UTC
AWS Account:<PHONE_NUMBER>52
Alarm Arn: arn:aws:cloudwatch:eu-west-2:037161842252:alarm:Commands_Out_Of_Sync

Threshold:

The alarm is in the ALARM state when the metric is GreaterThanThreshold 2.0 for at least 1 of the last 1 period(s) of 60 seconds.

Monitored Metric:

MetricNamespace: DHCP_Admin
MetricName: Commands_Out_Of_Sync
Dimensions:
Period: 60 seconds
Statistic: Sum
Unit: not specified
TreatMissingData: missing

State Change Actions:

OK:
ALARM: [arn:aws:sns:eu-west-2:037161842252:DHCP_Admin_Alarm]
INSUFFICIENT_DATA:

--
If you wish to stop receiving notifications from this topic, please click or visit the link below to unsubscribe:
<EMAIL_ADDRESS>Please do not reply directly to this email. If you have any questions or comments regarding this email, please contact us at https://aws.amazon.com/support

Satish to update with to do list

I have analysed the last 12 months metrics of the admin db so that we can identify if there is a pattern of spike in resource usage. But it all look healthy and there is no cause for alarm there.
With the error returned when this issue occurs, It relates to SQL concurrency and Query execution order issues.
Concurrency Issues:

This error could occur if multiple database queries are being executed simultaneously and are not properly synchronized.

We will need to review the code that interacts with the database and ensure that proper locking mechanisms or transactions are in place to manage concurrency.

Query Execution Order:

The sequence of database commands in our code needs to be examined. But this may not be possible if the code is coming directly from KEA.  The error suggests that commands are out of sync, so we need to make sure that we are not trying to execute a new query before completing the processing of the previous one. again, if its coming directly from KEA, it may not be within our control.

Potential solution

Configure the MySQL engine to handle locking. There are Common isolation levels which include READ COMMITTED, REPEATABLE READ, and SERIALIZABLE.

I will be reproducing the error next so that these database configuration changes can be tested.

Started simulating the failure using the scripts below
Dockerfile
`# Use an official MySQL runtime as a parent image
FROM mysql:latest
Environment variables for MySQL
ENV MYSQL_ROOT_PASSWORD=root_password
ENV MYSQL_DATABASE=my_database
ENV MYSQL_USER=my_user
ENV MYSQL_PASSWORD=my_password
Create a directory for scripts
WORKDIR /docker-entrypoint-initdb.d
Copy SQL script to initialize database schema and dummy data
COPY init.sql /docker-entrypoint-initdb.d/
Copy shell script to simulate concurrency issue
COPY run_script.sh /docker-entrypoint-initdb.d/
COPY max_conn.sh /docker-entrypoint-initdb.d/
Grant permissions to the scripts
RUN chmod +x /docker-entrypoint-initdb.d/init.sql /docker-entrypoint-initdb.d/run_script.sh
Expose MySQL default port
EXPOSE 3306
`
Build and run image
`#!/bin/bash
Stop all running containers
docker stop $(docker ps -q)
Generate a unique tag using timestamp
TAG="mysql-concurrency-test:$(date +%Y%m%d%H%M%S)"
Build the Docker image with a unique tag
docker build -t "$TAG" .
Run the Docker container in detached mode with a specific name
CONTAINER_NAME="my-container-$(date +%Y%m%d%H%M%S)"
docker run -d --name "$CONTAINER_NAME" "$TAG"
Execute bash inside the running container
docker exec -it "$CONTAINER_NAME" bash
`
SQL
`-- Create the database schema
CREATE TABLE IF NOT EXISTS lease4 (
id INT AUTO_INCREMENT PRIMARY KEY,
address VARCHAR(255),
hwaddr VARCHAR(255),
client_id VARCHAR(255),
valid_lifetime INT,
expire DATETIME,
subnet_id INT,
fqdn_fwd VARCHAR(255),
fqdn_rev VARCHAR(255),
hostname VARCHAR(255),
state VARCHAR(255),
user_context VARCHAR(255)
);
-- Insert dummy data
INSERT INTO lease4 (address, hwaddr, client_id, valid_lifetime, expire, subnet_id, fqdn_fwd, fqdn_rev, hostname, state, user_context)
VALUES
('<IP_ADDRESS>', '00:11:22:33:44:55', 'client1', 3600, NOW(), 1, 'example.com', 'com.example', 'host1', 'active', 'context1'),
('<IP_ADDRESS>', '00:11:22:33:44:66', 'client2', 7200, NOW(), 2, 'example.org', 'org.example', 'host2', 'inactive', 'context2');
`
Simulate SQL error max_conn.sh
`#!/bin/bash
Start the script in the background
for i in {1..5}; do
./run_script.sh &
done
Wait for all background processes to finish
wait
After the script completes, query and display the max connections
max_connections=$(mysql -u root -proot_password -e "SHOW STATUS LIKE 'Threads_connected';" | awk '{print $2}')
echo "Max Connections Used: $max_connections"`

Currently seeing maximum connections error based on the simulation. But we need to see an error specifically relating to "Commands out of sync; you can't run this command now (error code 2014))"

In our attempt to reproduce this error because we cannot conclude the spike without being able to reporduce the error, I and Stephen figured out that our script is giving too many connections error instead of the "command out of sync" error.
Upon further digging we came across this post https://stackoverflow.com/questions/614671/commands-out-of-sync-you-cant-run-this-command-now
The summary is, the way the mysqli library which the application is using to interact with mysql is different from the way our shell script is interacting. Hence, the best way to reproduce this is to write an app (Ruby or PHP) that uses the mysqli library and as such we can simulate the error directly from the application.

A ticket has been created to implement a simple application to use the mysqli library to simulate this failure.

Below is insights into the SQL error following the discoveries from spike.
Definition of the "Command out of sync" error as documented by MySQL can be found here - https://dev.mysql.com/doc/refman/8.0/en/commands-out-of-sync.html. It occurs when in the client code (In this case KEA Server), is calling functions in the wrong order.
Breaking down the flow leading to the error....

staff-device-dns-dhcp-admin interacts with staff-device-dhcp-server over http and calls the update_dhcp_config function which configures database connection and handles required changes to the DHCP infrastructure. reference --> https://github.com/ministryofjustice/staff-device-dns-dhcp-admin/blob/main/app/controllers/subnets_controller.rb#L39

Part of the DHCP Server configuration has "multi-threading" enabled.  The "Commands out of sync" error typically occurs in MySQL when commands are executed out of sequence. This is likely to happen when multithreading is enabled with a high thread pool size, and different threads are executing commands on the same connection, or when result sets from previous commands are not properly handled before new commands are executed. The specific setting that can cause this to happen is the "Thread Pool and Queue Size" parameters as configured here https://github.com/ministryofjustice/staff-device-dhcp-server/blob/main/dhcp-service/config_api.json#L65

The "thread-pool-size" and "packet-queue-size" parameters control the number of threads and the size of the packet queue, respectively. A larger number of threads can increase the likelihood of concurrent database access problems if not managed correctly.

Recommendations:

Ideally we would need to configure the client application (KEA Server) to handle the SQL querry more efficiently.  However, this may not be a feasible option for us as the particular querry causing this error as reported here

https://app.zenhub.com/workspaces/nvvs-devops-622a0b371800e400133bb924/issues/gh/ministryofjustice/nvvs-devops/485 [22a912f-0e4f-40fe-877e-b1196541d8a7] Gateways::KeaControlAgent::InternalError (unable to execute for <SELECT address, hwaddr, client_id, valid_lifetime, expire, subnet_id, fqdn_fwd, fqdn_rev, hostname, state, user_context FROM lease4 WHERE subnet_id = ?>, reason: Commands out of sync; you can't run this command now (error code 2014)):

is found in the KEA source code here https://github.com/isc-projects/kea/blob/c48734c20e47355cc4b81d9316a582566eaa608b/src/lib/dhcpsrv/mysql_lease_mgr.cc#L141

Adjusting Multi-Threading/thread pool Settings: As a diagnostic step, when the error occurs again, reducing the "thread-pool-size" and observing the experience if the issue persists. This can help determine if the issue is related to concurrent database access.

Before the error occurs again, we can Implement monitoring and setup a dashboard to track specific behaviours, like when different threads from the KEA Server execute commands on the same connection or when result sets from previous commands are not properly handled. This can be quite complex to do. However, it is feasible with a combination of MySQL's internal logging mechanisms, integration with Prometheus and Grafana and possibly some custom scripting. If we would engage in an activity like this, it would involve steps like...

Configuring MySQL's Performance Schema or other relevant logging to capture the desired data such as wait events and statement execution
Collecting prometheus metrics.
Configuring grafana dashboard to track the behaviour in relation to out of sync SQL commands

This has been documented in Confluence https://dsdmoj.atlassian.net/wiki/spaces/MOJO/pages/4651417673/SPIKE+DHCP+admin+failing+with+mysql+connection+errors


More logs with signal backend

Log a minimum in info level when not in console mode (e.g. signal will not print anything otherwise)

Fixed mainly with 7eb085ba3a93757a6262b26c578a80cc0f273255


Solve differential equations with chimera

Chimera can be used to represent power series or exponential power series. Also see https://iagoleal.com/posts/calculus-symbolic-ode/

I'm continuing with this idea at https://github.com/Bodigrim/power-series.


Reloadium 1.0.1 obsolete

We are using Reloadium 1.0.1 in our Python 3.7 project. We are not using the plugin and run it via the command line. This was fine up until this morning when we started receiving the 'obsolete' error. We would like to upgrade to a newer version of Reloadium, but the newer versions have dropped support for Python 3.7. We are not able to switch to a newer version of Python due to other implications. Therefore, we would like to continue using Reloadium 1.0.1.
Is there a way to bypass the 'obsolete' check?

@JelleWeigand unfortunatelly there is no way to bypass this check. I have limited resources to maintain this project at this moment so the older versions are made obsolete to not overload Sentry.

Hi @dkrystki and thanks a lot for this tool ! I have this 'obsolete error' and I can't easily update often to keep up with new releases...
I don't understand how this 'obsolete' error can magically appear when PyCharm, Reloadium Plugin, nor Python aren't upgraded.
Could you please enlighten me on this point? Thx

Hi @veylonni, the 'obsolete' error appears 4 months after a release, as the date is embedded in the Reloadium package.
This approach helps manage the limited Sentry quota, which may get exhausted if a buggy release sticks around for too long. Currently, our sponsorship funds aren't sufficient to cover higher quotas that's why I'm working on monetizing Reloadium to afford tools like Sentry and maintain high quality of the code.
Visit this page to learn more https://reloadium.io/pricing


Multicast on Mac is broken

Cannot bind the multicast socket to <IP_ADDRESS> on a Mac.

Fixed and verified on Windows, Mac, and Linux.


Image cannot be run with docker, only podman works

Describe the bug
The image created in this repository can only be run with podman. On docker, the artemis broker binary is missing.
To Reproduce
~ via  v18.5.0 via 🐍 v3.10.5 ☸ xxx-production (applications) took 18s
❯ docker run -it -e AMQ_USER=admin -e AMQ_PASSWORD=admin --rm quay.io/artemiscloud/activemq-artemis-broker:1.0.6
Creating Broker with args --user XXXXX --password XXXXX --role admin --name broker --allow-anonymous --http-host <IP_ADDRESS> --host <IP_ADDRESS>   --force
Unable to create the path 'broker'.

usage: artemis <command> [<args>]

The most commonly used artemis commands are:
    address    Address tools group (create|delete|update|show) (example ./artemis address create)
    browser    It will browse messages on an instance
    check      Check tools group (node|queue) (example ./artemis check node)
    consumer   It will consume messages from an instance
    create     creates a new broker instance
    data       data tools group (print|recover) (example ./artemis data print)
    help       Display help information
    mask       mask a password and print it out
    perf       Perf tools group (example ./artemis perf client)
    producer   It will send messages to an instance
    queue      Queue tools group (create|delete|update|stat|purge) (example ./artemis queue create)
    transfer   Moves Messages from one destination towards another destination
    version    print version information

See 'artemis help <command>' for more information on a specific command.

Running Broker
/opt/amq/bin/launch.sh: line 47: /home/jboss/broker/bin/artemis: No such file or directory

~ via  v18.5.0 via 🐍 v3.10.5 ☸ xxx-production (applications)
❯ podman run -it -e AMQ_USER=admin -e AMQ_PASSWORD=admin --rm quay.io/artemiscloud/activemq-artemis-broker:1.0.6
Creating Broker with args --user XXXXX --password XXXXX --role admin --name broker --allow-anonymous --http-host <IP_ADDRESS> --host <IP_ADDRESS>   --force
Creating ActiveMQ Artemis instance at: /home/jboss/broker

Auto tuning journal ...
done! Your system can make 62.5 writes per millisecond, your journal-buffer-timeout will be 16000

You can now start the broker by executing:

   "/home/jboss/broker/bin/artemis" run

Or you can run the broker in the background using:

   "/home/jboss/broker/bin/artemis-service" start

Running Broker
     _        _               _
    / \  ____| |_  ___ __  __(_) _____
   / _ \|  _ \ __|/ _ \  \/  | |/  __/
  / ___ \ | \/ |_/  __/ |\/| | |\___ \
 /_/   \_\|   \__\____|_|  |_|_|/___ /
 Apache ActiveMQ Artemis 2.23.0

Jul 08, 2022 11:41:26 AM java.lang.System$LoggerFinder lambda$accessProvider$0
WARNING: Failed to instantiate LoggerFinder provider; Using default.
2022-07-08 11:41:26,581 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server

Platform (please complete the following information):

OS: archlinix
Version rolling
CEKit version ?
Container build tool docker

Expected behavior
The image works in podman and docker
Additional context
Things work in docker when passing --user=root.

@languitar Hi I can run it successfully. Maybe it's your docker different?
What's your docker version? do you run docker as root or non-root?

Docker is run as root.
Here's my version info:
❯ docker --version
Docker version 20.10.17, build 100c70180f

No, there's nothing configured like that. Strangely, today everything works also in Docker. Maybe some Docker hiccups at the time I tried that. Doesn't seem to be a problem of the image here. Sorry for the noise then.


[FLINK-9142] Lower the minimum number of buffers for incoming channels to 1

What is the purpose of the change
This pull request lower the minimum number of buffers for incoming channels to 1.
Brief change log

Just update NetworkEnvironment#setupInputGate to achieve this.

Verifying this change

Update NetworkEnvironmentTest to test this change.
Update SingleInputGateTest to test this change.
Update StreamNetworkThroughputBenchmarkTest

Does this pull request potentially affect one of the following parts:

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

Documentation

Does this pull request introduce a new feature? (no)

@kisimple are you still available for adjusting this PR? If not, I would take over it because we are focusing on the improvement of buffer management which would touch this issue.

I'm closing this PR, as it seems abandoned and there is an ongoing similar effort tracked in https://issues.apache.org/jira/browse/FLINK-16012
Please @kisimple let us know if we are missing something or if you would like to be involved in the new efforts.


[REQUEST] Make it work on other renderers.

What it says on the tin.
it does NOT work on anything but DX11/12, which limits its uses to little to no applications, would be cool to clarify that OR make it work on other renderers.
The addon loads and all but refuses to detect the HDR support on windows, despite it being there and even enabled.

Well, mostly games that are either modern standalone ports or not emulators.
Biggest renderers which would profit from those are Vulkan and OpenGL, since major open-source ports of games or games which has fallbacks use those, it's a guarantee you will have 90% of an additional library. + would essentially affect DX9 aswell since DXVK is a thing.

Hi, I recently got a new monitor, so I've been playing around with this, and I gotta +1 this. Vulkan is slowly becoming one of the most popular apis so support for it would be really nice (Quake 2021 uses it, and Valve is slowly adopting it). Open GL and Older DX versions would also be a pretty nice add for those older games that only support them, which is one of the places I see something like this being really desirable.

+1
Support for more API's would be great, especially Vulkan and OpenGL.

Better interoperability with Kaldeian's Special K would allow the reshade addon to piggy back on the dxgi swapchain bridge capability for vulkan apps. dx8/9 can be made to work using dgVoodoo alongside reshade.

+1
BTW I LOVE the addon. I use it pretty much all the time.


Speed up django image build process, and reduce its size

Description
Improve Django image build process, and reduce its size.
Rationale
As @iMerica mentioned in https://github.com/pydanny/cookiecutter-django/issues/1157, this modification reduces hundreds of megabytes from the Docker image.
We also found the new build process a lot faster. The command RUN chown -R django /app takes too much time.

Indeed, this gives the build process a major speed boost! Thx for this pull request!

Thanks for this, gave it a go and it seems to work.


[blog] cold starting recommender systems

Tentative publish date: 11/04/2021
This post is about the cold start problem with recommender systems. It uses the multi-armed bandit approach to solve for the cold start problem and we look at 3 different MAB algorithms and compare how they perform.

Hey @flippedcoder any plans to keep working on this or should we close this?

We can close this one. We decided not to do this topic right now.


Use the hostname as a way to match a connection with a server

See https://github.com/neumino/rethinkdbdash/issues/133

Fixed in 2.1.6


Aren't there 4 levels of fan speed?

The controller for the old app split in to four speeds.  Low, medium, medium-high, and high.  That matches what is on the remote.

Fixed by pull request #9 into master

@ness282 , please verify close the issue

thanks


Convert exports to function style

Prevents an issue with overwriting publicly exposed methods. Most notably, iDOM.applyAttr could be overridden:
var applyAttributeTyped = function(el, name, value) {
  var type = typeof value;

  if (type === 'object' || type === 'function') {
    exports.applyProp(el, name, value);
  } else {
    exports.applyAttr(el, name, value);
  }
}

Now, they use the private references internally:
function applyAttributeTyped(el, name, value) {
  var type = typeof value;

  if (type === 'object' || type === 'function') {
    applyProp(el, name, value);
  } else {
    applyAttr(el, name, value);
  }
}

I like the current style since you don't need to look all over a file to figure out what it exports. It looks like this is really a bug in Rollup. I don't think we should change this just for that reason.


sh.vim: Add handling for ksh93 shared-state comsubs and mksh valsubs

This commit adds support for ksh93's shared-state command substitutions (syntax: ${ command; }) and mksh's value substitutions (syntax: ${|command;}).
Below is a test script you can use for bug testing these changes:
#!/bin/ksh
# The following syntax applies to both ksh93 and mksh
print ${ echo one }
print ${	echo two
}
print ${
echo three	}
print ${ echo 'four'; }
print ${ echo 'five' ;}
print ${ echo 'six'
}
print ${	echo 'seven'	}
echo ${ print 'eight'	}
typeset nine=${ pwd; }

# Value substitutions of the form ${|command} are only
# supported by mksh, not ksh93.
if ! command eval '((.sh.version >= 20070703))' 2>/dev/null; then
	valsubfunc() {
		REPLY=$1
	}
	echo ${|valsubfunc ten}
	print "${|valsubfunc eleven;}"
	printf '%s' "${|valsubfunc twelve	}"
	unlucky=${|valsubfunc thirteen
}
	typeset notafloat=${|valsubfunc notanumber	}
	print $unlucky $notanumber
	${|echo foo}
	${|echo bar
}
fi

# Shared-state command substitutions using the syntax ${<file;}
# are only supported by ksh93, not mksh.
echo ${
	printf %s str
} > /tmp/strfile
echo ${</tmp/strfile;}

exit 0

Fixes https://github.com/vim/vim/issues/9514

thanks. Can you make a syntax test out of this please? Check https://github.com/vim/vim/blob/master/runtime/syntax/testdir/README.txt and make a screendump test from your snippet please?

I have added the syntax test and screendumps to the pull request.

thanks!


[Bug]: Could not find a valid Docker environment - Docker Desktop for Linux

Module
Core
Testcontainers version
1.18.0
Using the latest Testcontainers version?

I was trying to run a project created by primarily Mac users, set up to use testcontainers 1.17.2 on my Ubuntu 22.04 using Docker Desktop for Linux and when running the testcontainer-based tests got multiple errors stating Could not find a valid Docker environment. Please see logs and check configuration.
After some googling I came upon #6045, and adapting the suggested approach for Mac for Linux Docker Desktop I found a work-around of running
sudo ln -s $HOME/.docker/desktop/docker.sock /var/run/docker.sock

Which fixes the issue. See also: my comment on the Mac bug.
I later upgraded our project to 1.18.0 and removed the symbolic link to see if this would result in the same issue, and it turns out that it does, where the above is still a workaround for it on this most recent version too.
At this point in time I think it might make sense to provide this solution in the offical docs (as it is provided for Mac). Or a different approach if a better solution might exist for Docker Desktop for Linux.
Relevant log output
java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
       org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$7(DockerClientProviderStrategy.java:256)
       java.base/java.util.Optional.orElseThrow(Optional.java:403)
       org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:247)
       org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:150)
       org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:186)
       org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:104)
       com.github.dockerjava.api.DockerClientDelegate.authConfig(DockerClientDelegate.java:109)
       org.testcontainers.containers.GenericContainer.start(GenericContainer.java:321)
       ...
       org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
       [...]

Additional Information
https://github.com/testcontainers/testcontainers-java/discussions/6045

@eddumelendez
I created this PR that adds a comment to the same table that was mentioned in bug report #6045 for Mac (https://www.testcontainers.org/supported_docker_environment/) as it seems to be an equivalent workaround for Docker Desktop for Linux.
Please do feel free to let me know if a better solution exists!

Closing as duplicated. See https://github.com/testcontainers/testcontainers-java/issues/6426

Hey, I was struggling with it for a while, then that solution worked for me
Thanks :laughing:


Not able to train the interactive file.

Rasa Core version: 0.14.0a1
Python version: python 3.6
Issue:  Exception: Passing policy configuration parameters to agent.train(...) is not supported anymore. Specify parameters directly in the policy configuration instead.
I tried passing directly in the policy configuration but it is throwing me an error.
The content of the file :

from future import absolute_import
from future import division
from future import unicode_literals
import logging
from rasa_core.agent import Agent
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy
if name =='main':
logging.basicConfig(level='INFO')
training_data_file = './data/stories.md'
model_path = './models/dialouge'

agent = Agent('weather_domain.yml', policies = [MemoizationPolicy(), KerasPolicy()])

agent.train(
        training_data_file,
		augmentation_factor = 50,
		max_history = 2,
		epochs = 500,
		batch_size = 10,
		validation_split = 0.2)

agent.persist(model_path)

Getting this error instead,
Exception: Passing policy configuration parameters to agent.train(...) is not supported anymore. Specify parameters directly in the policy configuration instead.
can you please help me to train the interactive file.
Thanks in advance.
Sai

Passing policy configuration parameters to agent.train(...) is not supported anymore -- this is your answer. So basically all those configs (apart from augmentation_factor), should go either in the individual policies, or you can specify them in the policy configuration yaml file


Issue with ReplaySubject and Take

I have a situation where I'm using a ReplaySubject and Take(int). Here's a minimal example of how to reproduce the problem:
ReplaySubject<string[]> rep = new ReplaySubject<string[]>(1);
rep.OnNext(new[] { "start" });
rep
  .Take(1)
  .Subscribe(strings => {
    var list = strings.ToList();
    list.Add("added");
    rep.OnNext(list.ToArray());
  });

And here are the relevant parts of the exception that is thrown:
InvalidOperationException: Collection was modified after the enumerator was instantiated.
System.ThrowHelper.ThrowInvalidOperationException (System.ExceptionResource resource) (at <3649452ae23840d49bd323a708498f78>:0)
System.Collections.Generic.Queue`1+Enumerator[T].MoveNext () (at <3649452ae23840d49bd323a708498f78>:0)
UniRx.ReplaySubject`1[T].Subscribe (System.IObserver`1[T] observer) (at Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs:170)
UniRx.Operators.TakeObservable`1[T].SubscribeCore (System.IObserver`1[T] observer, System.IDisposable cancel) (at Assets/Plugins/UniRx/Scripts/Operators/Take.cs:58)
UniRx.Operators.OperatorObservableBase`1[T].Subscribe (System.IObserver`1[T] observer) (at Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs:34)
UniRx.ObservableExtensions.Subscribe[T] (System.IObservable`1[T] source, System.Action`1[T] onNext) (at Assets/Plugins/UniRx/Scripts/Observer.cs:413)

If I remove the .Take(1) (and the inner OnNext to avoid an infinite loop), everything works as expected.
Luckily, since I'm basically using a ReplaySubject to act like a BehaviorSubject, I can just change to using one of those (no problem there, it seems), but this was still annoying.
System Info:
iMac (27-inch, Late 2013)
macOS 10.12.6
Unity version 2017.3.1f1 personal
Scripting Runtime version .NET 4.6 equivalent
API Level .NET 4.6

I have submitted a PR #462 to address this issue.