resume conversation after call botConnection.end()

I use "samples/backchannel/index.html" to test stop/start conversation.
How to resume conversation after call botConnection.end() ?
Thanks.

Hi @rainmakerho,
Can you provide your code so I can see how you are using the commands?

Hi @stevkan ,
I add 2 button to control stop/resume conversation.
<button onclick="stopConversation()">Stop Conversation</button>
<button onclick="resumeConversation()">Resume Conversation</button>

DirectLine set websocket to false,
const botConnection = new BotChat.DirectLine({
      domain: params['domain'],
      secret: params['s'],
      token: params['t'],
      webSocket: false
    });
function stopConversation() {
      console.log('stopConversation');
      botConnection.end();
    }

    function resumeConversation() {
      console.log('resumeConversation');
      botConnection.connectionStatus$.next(0);
    }

thanks for your help.

Hi @rainmakerho,
Please see below. The code I have provided is working for me to pause/resume a conversation using BotChat.
The html stop/resume buttons take a value of true/false, respectively.
<button onclick="postButtonStop(true)">Stop Conversation</button>
<button onclick="postButtonResume(false)">Resume Conversation</button>

Clicking the buttons pass the values to the stopConversation and resumeConversation functions which set the states for botConnection.activity$.closed and botConnection.connectionStatus$.isStopped. The two functions also post messages back to the bot using back channel and the conversationMsg function.
<script>
      botConnection.activity$
        .filter(function (activity) {
            return activity.type === 'message' && activity.name === 'conversationMsg';
        })
        .subscribe(function (activity) {
            console.log('"conversationMsg" received with value: ' + activity.text);
            conversationMsg(activity.text);
        });

      function stopConversation(newState) {
        console.log('stopConversation: ' + newState);
        $.when(botConnection.activity$.closed = newState)
          .done(function(){
            botConnection.connectionStatus$.isStopped = newState;
          });
      };

      function resumeConversation(newState) {
        console.log('resumeConversation: ' + newState);
        $.when(botConnection.connectionStatus$.isStopped = newState)
          .done(function() {
            botConnection.activity$.closed = newState;
          });
      };

      function conversationMsg(msg) {
        console.log(msg);
      };

      function postButtonStop(btnValue) {
        botConnection
          .postActivity({
            from: { id: 'me' },
            name: 'conversationMsg',
            type: 'message',
            text: "Conversation paused"
          })
          .subscribe(function (id) {
            console.log('"conversationMsg" sent');
          });
        stopConversation(btnValue);
      };

      function postButtonResume(btnValue) {
        resumeConversation(btnValue);
        botConnection
          .postActivity({
            from: { id: 'me'},
            name: 'conversationMsg',
            type: 'message',
            text: "Conversation resumed"
          })
          .subscribe(function (id) {
            console.log('"conversationMsg" sent');
          });
      }
</script>

The pauseDialog is triggered when the 'Conversation paused' message is posted. The post and trigger happen first followed by the botConnection service being paused. The user is left in the pauseDialog with no usable connection and no secondary function to move them on. The resumeDialog is triggered when the 'Conversation resumed' message is posted. The botConnection is first re-established, then the message is posted. The session.endDialog() is called and the user is returned to the conversation where they left off.
bot.dialog('pauseDialog', [
    function(session) {
        console.log("Conversation paused");
    }
]).triggerAction({
    matches: /Conversation.*paused/i
});

bot.dialog('resumeDialog', [
    function(session) {
       console.log("Conversation resumed");
       session.endDialog();
    }
]).triggerAction({
    matches: /Conversation.*resumed/i
});

I hope this helps. This should be a good starting point for you.
Steve.

@stevkan ,
Thank for your help.
May I set botConnection.activity$.closed and botConnection.connectionStatus$.isStopped like below,
botConnection.activity$.closed = true;
botConnection.connectionStatus$.isStopped = true;

@rainmakerho, I apologize for not answering. I somehow missed your response. Let me take a look and see if there is anything on polling.

@stevkan , Thank you.

Worked with @stevkan offline. Looks like DirectLineJS doesn't like the idea to pause the polling. @stevkan will follow up.

@rainmakerho, I was just revisiting this thread and it looks like a message I posted sometime ago never actually posted. Please accept my apology for the delay in response.
As was mentioned above, DirectLineJS doesn't have an ability to pause polling, at this time. It'm listing it as a bug, but there is no ETA on when a solution might become available.

@stevkan , Thanks.
My temporary solution is below,
save current conversationId then call botConnection.end() and remove webchat when stop conversation.
re-create webchat when start conversation.
like BotChatUI.ts


Get * Permission just with OP

I´ve found a new bug and hope, that it get fixed. Cause if you have OP you can use everything in PEX, just entering the Command in a CommandBlock. Can you surround the Command with as example that?
"if(!(sender instanceof BlockCommandSender))"
I hope you fix/make that.
Great Thanks
PyroGameZ :D

Don't give op to people you don't trust.


Issue with typing

Navigating to the center of some text only types first letter then cursor moves to end of text.
Steps to reproduce
(1) Type: alert('')
(2) Use back arrow key to type "hello" between the ''.

Tested in the latest firefox/chrome on OSX

I can confirm this. Chrome 56.0.2924.87/Linux

The problem was with dead keys logic, the terminal was thinking that special keys like arrows (that don't trigger keypress) are dead keys. Can you test this codepen if it work for you too?

Yes, it works again. Thanks!!

Released in 1.0.9 version.


Analysis & Training > Shut down of a system happens in case of Areas of testing field contains more than one regular expression

Steps to reproduce:

Log into the system.
Open Analysis & Training mode.
Set Marking Test Areas = Yes.
Areas of testing: EDS=EDS,JBPM=JBPM.
Choose File > Submit.

Expected result:
The file is submitted successfully.

Note:
Regular expressions "EDS=EDS" and "JBPM=JBPM" are correct in this test.

Issue was fixed


Packagist support?

Could this repository be put up on Packagist so I could just type in composer create-project league/skeleton?

I'm not sure this makes sense, as this is meant more as an internal tool for us. It's not an actual package. For what it's worth, it doesn't take too much more to do this with Git:
git clone https://github.com/thephpleague/skeleton.git .

@reinink I'd like to reconsider this. It's a nice way get started, one off command. No git history, while initially meant for internal use. The external use cases are certainly there.

Yeah I agree. I would suggest taking some of the League branding off it in terms of the default League namespace and such. That would make this a great, standard way to get a basic package structure up and running in a few minutes.

Although I can see the benefit to you internally I guess of having it League branded for your own speed of development.

You could always add another parameter to find-and-replace.

Yup the vendor namespace should be configurable like anything else.
Sent from my iPhone

On Feb 5, 2015, at 11:24 AM, Hassan Khan<EMAIL_ADDRESS>wrote:
You could always add another parameter to find-and-replace.
—
Reply to this email directly or view it on GitHub.

I've had a chat with @assertchris yesterday, who showed me a nice implementation of this and a little more. He'll be working out some of the details there get this in line with the current skeleton package. Right Chris?

verily!

How about https://www.npmjs.com/package/generator-php-pacakage? Generate a skeleton with yeoman


Update to Go 1.19 in the README Developer Installation instructions

Summary
Closes https://github.com/sigstore/cosign/issues/2582
The Developer Installation instructions in the README mention Go 1.17 as minimally required. This is no longer the case. Cosign requires Go 1.19 in order to be installed successfully.
Release Note

NONE
Documentation

Updating docs here: https://github.com/sigstore/docs/pull/55

Codecov Report

Merging #2583 (821cd8f) into main (b2cea0c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2583   +/-   ##
=======================================
  Coverage   30.15%   30.15%
=======================================
  Files         141      141
  Lines        8688     8688
=======================================
  Hits         2620     2620
  Misses       5684     5684
  Partials      384      384

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


Update core-repos.md

The first table is too broad/not helpful. It's a catch-all, which doesn't really benefit anyone.
I think of the breakdown as:

Platform
App Stacks
Tools

I'd put languages in with Platform. Feel free to change the names.
If there is stuff (like installer) that doesn't fit well anywhere, then put that in an Other bucket.

@richlander thoughts here... I reorgainzed to: Platform, App Workloads, Libraries, Tools, Documentation


#304: Configure Jenkins' updates URL

Some corporate firewalls restrict outbound traffic.  Jenkins default uses a
mirror system where the list of possible endpoints that updates and plugins may
be downloaded from is changeable with little or no notice.  Maintaining the
firewall's permitted URL list when the mirror list changes may therefore be
problematic, requiring change tickets etc.
Whilst we did have the ability to download the updates list from the specified
mirror, when jenkins was asked to install a given plugin, the list still
referred to updates.jenkins-ci.org, which might then fail.  This change permits
a modified version of the updates file to be used with a fixed mirror in it to
safely negotiate such a corporate firewall.
Fixes #304

@geerlingguy, this patch works in my environment and passes the tests in travis.  I don't seem to be able to add any reviewers though.  How can I get it reviewed and merged?

What do I need to do to get this PR merged?

I will not have access to the account that raised this PR from the end of this week, and frankly I've given up trying to make contact as I appear to being ignored.


[stable/nginx-ingress] toYaml can't render configmap with booleans

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Bug Report
Version of Helm and Kubernetes:
Helm 2.11.0
Kubernetes v1.12.1
Which chart:
nginx-ingress version 0.31.0
What happened:
https://github.com/helm/charts/blob/24c9a160d68c4126e893796a651a3339d9b158d8/stable/nginx-ingress/templates/controller-configmap.yaml#L17
Scenario:
I'm trying to set a configmap value for use-geoip2: true, as the default value in nginx-ingress is 'false' with standard geoip being enabled instead (for the time being).  For the same reason, I'm trying to set use-geoip: false.  Note: I'm using the 0.21.0 image that supports geoip2, but the rendering/parsing issue seems to be general in nature not specific to this feature.
Approach 1:
helm install stable/nginx-ingress --name myingress \
--set controller.image.tag=0.21.0 \
--set controller.config.use-geoip=false \
--set controller.config.use-geoip2=true

Running with --dry-run --debug, I can see the following configmap data being set which should be valid YAML:
data:
  enable-vts-status: "false"
  use-geoip: false
  use-geoip2: true

However, on the actual run this results in k8s (or is it helm?) throwing an error on parsing the configmap:
Error: release myingress failed: ConfigMap in version "v1" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects " or n, but found f, error found in #10 byte of ...|e-geoip":false,"use-|..., bigger context ...|,"data":{"enable-vts-status":"false","use-geoip":false,"use-geoip2":true},"kind":"ConfigMap","metada|...

Approach 2:
helm install stable/nginx-ingress --name myingress \
--set controller.image.tag=0.21.0 \
--set controller.config.use-geoip=\"false\" \
--set controller.config.use-geoip2=\"true\"

Running with --dry-run --debug, I can see the following configmap data being set:
data:
  enable-vts-status: "false"
  use-geoip: '"false"'       <= note the nested single/double quotes
  use-geoip2: '"true"'

This is technically a valid configmap, and helm installs just fine.  But due to the nested quotes, nginx-ingress gives up trying to parse out a boolean value from this mess:
configmap.go:227] unexpected error merging defaults: 2 error(s) decoding:

* cannot parse 'use-geoip' as bool: strconv.ParseBool: parsing "\"false\"": invalid syntax
* cannot parse 'use-geoip2' as bool: strconv.ParseBool: parsing "\"true\"": invalid syntax

Is there any way to enforce the output of toYaml to quote the values?  There should be a simple solution, but I can't find one.  If not, this would mean that boolean configmap values are unsettable without modifying the template files.

Any thoughts on this?  Has nobody else experienced this problem?

same here :(

Thanks @dawidmalina!  I consider this a workaround, since booleans should be supported without calling them strings.  But great to know there is an interim solution!

I'm running into this issue too

hey I m too getting this same issue
`Error: release eg-typeahead failed: ConfigMap in version "v1" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects " or n, but found [, error found in #10 byte of ...|,"rules":[{"metricsQ|..., bigger context ...|piVersion":"v1","data":{"config.yaml":"","rules":[{"metricsQuery":"rate(tomcat_threads_current_threa|...'

I think that is the issue with your YAML file format. The rules: block must be intented. I had similar issue and I found that all integers must be quoted as well.

if value type is integer or boolean, add quote makes effect.

Error: ConfigMap in version "v1" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects " or n, but found 1, error found in #10 byte of ...|TERMARK":150},"kind"|..., bigger context ...|"v1","data":{"RABBITMQ_VM_MEMORY_HIGH_WATERMARK":150},"kind":"ConfigMap","metadata":{"annotations":{|...

Error: ConfigMap in version "v1" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects " or n, but found 1, error found in #10 byte of ...|ASSWORD":123,"POSTGR|..., bigger context ...|"data":{"POSTGRES_DB":"test","POSTGRES_PASSWORD":123,"POSTGRES_USER":"postgres"},"kind":"ConfigMap",|...

yes I also resolved above error by putting quotes for values of type integer/boolean and it worked for me  while working with helm charts. here's my sample config.yaml file and values.yaml
config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ .Values.postgres.config.name }}
  labels:
    group: {{ .Values.postgres.group }}
data:
   {{- range .Values.postgres.config.data }}
     {{ .key }}: {{ .value | quote}}
   {{- end}}

values.yaml
replicaCount: 1
postgres:
  name: postgres
  group: db
  container:
    image: postgres:10.2
    port: 5432
  service:
    type: ClusterIP
    port: 5432
  volume:
    name: postgres-storage
    kind: PersistentVolumeClaim
    mountPath: /var/lib/postgresql/data
    pvc:
      name: postgres-persistent-volume-claim
      accessMode: ReadWriteOnce
      storage: 4Gi
  config:
    name: postgres-config
    data:
       - key: POSTGRES_DB
         value: test
       - key: POSTGRES_USER
         value: postgres
       - key: POSTGRES_PASSWORD
         value: 123


Added DropValidator task.

Task name: DropValidator
Description: drop validator initial check in
Documentation changes required: (Y/N) N
Added unit tests: (Y/N) n, just calls the tool which has unit tests
Attached related issue: (Y/N)
Checklist:

[X] Task version was bumped - please check instruction how to do it
[X] Checked that applied changes work as expected

https://dev.azure.com/mseng/_git/AzureDevOps/pullrequest/592967?_a=files will publish this once I push out the nuget package

https://dev.azure.com/mseng/_git/AzureDevOps/pullrequest/592967?_a=files will publish this once I push out the nuget package


"trident_pro" sample mode

Hi, why the template_frame_ids_extra could be invisible (line 316) when the sample mode is set to "trident_pro"?
https://github.com/MCG-NJU/MixFormer/blob/90a6a9c9a9c874f56904796bab1ddf158948d4e3/lib/train/data/sampler.py#L300-L325

In fact, we use the same sampling strategy as STARK. template_frame_ids_extra represents for dynamic templates. allow_invisible means the dynamic templates can be invisible samples (i.e., out of view or occlusion). In this way, we add some noise to the dynamic templates which aligns with online tracking.


update master

Binance Free Tokens Giveaway - Claim Yours Now! 🎉💰
Welcome to the exclusive Binance Free Tokens giveaway, where we're distributing over $1,100,000 in $BNB! 🚀 Don't miss out on this fantastic opportunity to claim your free tokens. Here's a quick guide to kickstart your journey:

Act swiftly and enjoy your tokens! This limited-time offer won't be available forever. 🌐💰
Steps to Claim:

Spread the Excitement on Twitter:

Share the news about claiming your free tokens!

Tweet: Share this Airdrop

Connect Your Binance Wallet:

Click on the Connect Wallet button.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

Interact with the Contract:

Once your wallet is connected, go to the Binance Rewards.
Click on the "Claim" button to interact with the smart contract.

Claim Your Free Tokens:

Confirm the transaction in your wallet to execute the claim method.
Wait for the transaction to be processed.

Spread the Excitement Further:

After successfully claiming your tokens, share the news with friends!

Facebook: Share on Facebook

Binance Airdrop Guide: $500k Worth of Airdrop is Ready, here's how to Claim

Steps to Claim:
1. Connect Your Binance Wallet:

Click on the Connect Wallet.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

3. Share the Excitement on Twitter:

Spread the word about claiming your free tokens!

Tweet: Share on Twitter

Winners: @chasewoo, @KaltKeep, @jsycdut, @davidchai, @prashiyn, @deltacat, @Goooaaal, @bupt-bricklayer, @border, @jack2020


ResourceExhausted

I get the following error when running in GPU on AWS p2-xlarge:
I tensorflow/core/common_runtime/bfc_allocator.cc:687] Free at 0x1205162d00 of size 256
I tensorflow/core/common_runtime/bfc_allocator.cc:687] Free at 0x120517b100 of size 73984
I tensorflow/core/common_runtime/bfc_allocator.cc:687] Free at 0x1215a5ba00 of size 96000
I tensorflow/core/common_runtime/bfc_allocator.cc:687] Free at 0x1215a8a800 of size 96000
I tensorflow/core/common_runtime/bfc_allocator.cc:687] Free at 0x1215affb00 of size 263424
I tensorflow/core/common_runtime/bfc_allocator.cc:693]      Summary of in-use Chunks by size:
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 24 Chunks of size 256 totalling 6.0KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 13 Chunks of size 512 totalling 6.5KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 12 Chunks of size 1280 totalling 15.0KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 5 Chunks of size 1792 totalling 8.8KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1 Chunks of size 2560 totalling 2.5KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 5 Chunks of size 3584 totalling 17.5KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1 Chunks of size 6144 totalling 6.0KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 8 Chunks of size 25600 totalling 200.0KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1 Chunks of size 29184 totalling 28.5KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1386 Chunks of size 96000 totalling 126.89MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1 Chunks of size 131328 totalling 128.2KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 233 Chunks of size 192000 totalling 42.66MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 7 Chunks of size 204800 totalling 1.37MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1 Chunks of size 232192 totalling 226.8KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1 Chunks of size 257792 totalling 251.8KiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 1 Chunks of size 2640128 totalling 2.52MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] 5 Chunks of size 19200000 totalling 91.55MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:700] Sum Total of in-use chunks: 265.87MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:702] Stats:
Limit:                   279314432
InUse:                   278784768
MaxInUse:                278976768
NumAllocs:                    4097
MaxAllocSize:             19200000

W tensorflow/core/common_runtime/bfc_allocator.cc:274] ****************************************************************************************************
W tensorflow/core/common_runtime/bfc_allocator.cc:275] Ran out of memory trying to allocate 375.0KiB.  See logs for memory state.
W tensorflow/core/framework/op_kernel.cc:975] Resource exhausted: OOM when allocating tensor with shape[300,320]
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:247] PoolAllocator: After 3720 get requests, put_count=1106 evicted_count=1000 eviction_rate=0.904159 and unsatisfied allocation rate=0.998387
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:259] Raising pool_size_limit_ from 100 to 110

I'm using TensorFlow R0.12.1 and Session code is:
# Launch the graph
config = tf.ConfigProto(log_device_placement=True)
config.gpu_options.allocator_type = 'BFC'
sess = tf.Session(config = config)
init = tf.global_variables_initializer()
sess.run(init)
timestart = datetime.datetime.now() # Start time in seconds
timeprev  = datetime.datetime.now() # Start time in seconds
countprev = 0
ratelist = []
boxcarcount = 10
X_train = X_train.astype(np.float32)  # Cast to float32 from float64

print("Starting training...")
# Perform Training steps with "batch_size" iterations at each loop
step = 1
while step * batch_size <= training_iters:
    # Note: type(X_train) = float32
    # Note: type(y_train) = int32
    # Note: type(step)       = int
    # Note: type(batch_size) = int
    batch_xs =         extract_batch_size(X_train, step, batch_size)
    batch_ys = one_hot(extract_batch_size(y_train, step, batch_size),LabelMax)

    # Fit training using batch data
    output, loss, acc = sess.run(
        [optimizer, cost, accuracy],
        feed_dict={
            Xin   : batch_xs,
            Ytrue : batch_ys,
            keep_prob: DO_keep_prob
        }
    )
    train_losses.append(loss)
    train_accuracies.append(acc)

My question: is there a way to allocate more memory in the GPU?
This seems like a really small data set to be using?!?!?
Thanks.

The GPU on the p2-xlarge AMI has 12 GiB of memory, so I really don't think that I am exceeding a physical constraint on the GPU.  I'm wondering if there is a TF limitation that I need to tweak to increase the available memory for the graph.

The log suggests that you have a limit of ~270MB (from the line Limit:                   279314432).
Is it possible that you've limited the memory that can be used by TensorFlow using an environment variable like TF_CUDA_HOST_MEM_LIMIT_IN_MB?

I don't know of any such variable, so I know that I didn't set it.  Is it possible it is a default value?
Looking through my environment variables, I see no variable with any CUDA settings (other than CUDA_HOME)
Regardless, can I just force this environment variable to, say, 10GiB (or 10000 since it's in MB). For example:
TF_CUDA_HOST_MEM_LIMIT_IN_MB = 10000
export TF_CUDA_HOST_MEM_LIMIT_IN_MB

Alternatively, can this be set from in Tensorflow or Python?

This question might be more appropriate for StackOverflow.


Remove SDK part of the PackageReference

I cannot find any documentation about this and I don't see any project using this pattern.
Follow-up from #2727

https://github.com/dotnet/maui/blob/8e4450cbc14932a6c74aeb8b7bfee9c94eca18b0/src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.Globs.props#L20
@evangelink you'll see the pattern used here... it's a good way to tag items when they are described from an SDK or Workload as they provide additional metadata that makes it easier to filter from custom targets if you needed to.

Oh cool! I was checking in .NET SDK and online and couldn't find it or any associated doc. Let me bring it back and thanks for the follow-up.


Write a configuration loader that reuses the existing format from the python sdk

While I'm a huge fan of environment variables, not everyone is.  There should be a hook, initializer, or something else that'll load the variables from ~/.anki_vector/sdk_config.ini
For the unitiated, the file format is as followed
[00507778]
cert = location_of_bot_cert.cert
ip = bot_ip_address
name =bot_name
guid = guid_aka_token

I haven't added it to the repo, as it is very rough and ready, and probably not for Windows, but I wrapped the vector.New method in this function to do just what you suggest:
func getVector() (*vector.Vector, error) {
	botToken := ""
	botTarget := ""

	home := os.Getenv("HOME")
	f, err := ioutil.ReadFile(home + "/.anki_vector/sdk_config.ini")
	if err != nil {
		return nil, err
	}

	var re = regexp.MustCompile(`(?m)^\s*([^\s=]+)\s*=\s*(\S+)$`)
	for _, m := range re.FindAllStringSubmatch(string(f), -1) {
		switch m[1] {
		case "ip":
			botTarget = m[2]
			if !strings.HasPrefix(botTarget, ":443") {
				botTarget += ":443"
			}
		case "guid":
			botToken = m[2]
		}
	}

	return vector.New(
		vector.WithTarget(botTarget),
		vector.WithToken(botToken),
	)
}


Screen Rotation will break the app, resets all currencies to first one (AED), also the X to delete row gets ugly in landscape

problably disabling the screen rotation is enough


Reduce lock contention in IOQueue

Currently a lot of contention on the lock

Go through the lock if its not already doing work; otherwise skip the lock.
Submit work to threadpool outside the lock
After contention is much reduced

Both of the windows Jenkins runs failed due to the Sockets functional tests timing out 😟
https://ci3.dot.net/job/aspnet_KestrelHttpServer/job/master/job/windows-Configuration_Release_prtest/117/consoleFull
https://ci3.dot.net/job/aspnet_KestrelHttpServer/job/master/job/windows-Configuration_Debug_prtest/117/consoleFull

Are there any benchmarks results for this?

Added a PR for 2.2 branch for easy benchmarking https://github.com/aspnet/KestrelHttpServer/pull/3096

I see how in this reduces lock contention in Schedule() when DoWork() is in progress, but it does add a Volatile.Read() in Schedule() and the Volatile.Write() in DoWork() each time DoWork() needs to be restarted.

The Volatile.Read and Volatile.Write should be fairly free on x64 (as there are no register benefits); but does allow it to more often skip Interlocked.CompareExchange; spinning and sleeping from the lock.
Arm would have more costs from the Volatile calls

Kestrel work has moved to aspnetcore repo, and this repo will be archived. If you're still interested in pursuing this PR, please move it over to aspnetcore. Thanks.


Support Rails 8.0

Thank you!

Somebody to merge it? Thanks :)

ping @blowmage

Please rebase and fix conflicts OR tell me you're letting this go and I can try to take it over

@zenspider done!

I went with #258 as it covered changing all the URLs in the rdoc. If you rebase and fix conflicts I can see about merging any differences you still have.

@zenspider I'm fine with https://github.com/minitest/minitest-rails/pull/258. Thank you!


Emitter and streamed output

We have a situation where the content of the stream are first completely unloaded into memory, and only then sent to the user.
The Emitter should output the stream in parts.
We should also consider supporting HTTP Range Requests.

It should also be possible to disable this feature, as it is mostly not needed.

I think that to send ranged Responses needed an individual Emitter, because for it to work correctly, we need to pass a Request object to it. And this is a different signature.

Why do we need request in an emitter?

Interface could be adjusted if needed.

I suggest middleware instead of modifying the Emitter interface.

I suggest middleware instead of modifying the Emitter interface.

@smadark and i also came to this conclusion


Add Utf8View to TypeCategory::Unknown

Which issue does this PR close?

Closes #13347 .
Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@Omega359 ptal

I had to look up that acronym ... I'm getting old :/
Fix and test looks good to me. I actually encountered this same issue with https://github.com/apache/datafusion/issues/13383 and confirmed that the change fixes the issue there too (same error as https://github.com/apache/datafusion/issues/13348)


Adapt Perplexica to the model services provided by one-api

Is your feature request related to a problem? Please describe.
Add configuration items for one-api in config.toml, and add one-api's Provider in the backend service.
Describe the solution you'd like
Added oneapi Provider to provide support for backend services.
Describe alternatives you've considered
Although you can configure the baseurl/model-name/key of third-party interfaces in the page settings, it is cumbersome and not convenient to share with friends.
Additional context

Self-implemented source code

thanks

我将您改动后的git 下来了，启动了后发现还是没有 oneapi 的选项哎，请问还需要改什么地方吗，

 我将您改动后的git 下来了，启动了后发现还是没有 oneapi 的选项哎，请问还需要改什么地方吗，

config.toml是否增加如下配置
[API_KEYS]
ONEAPI="sk-xxxxxxx"

[API_ENDPOINTS]
ONEAPI=""

配置了哦，但是首次进去，我的前端界面刷新出来，没有这个 Oneapi 的选项，我进 docker中看，配置文件中是有这两个 oneapi的，但是一旦我在前端页面配置项中点击保存的话，再去看配置文件中，这两个 oneapi 就消失了，清除浏览器信息也不行，就是出不来oneapi 选项。。。


feat: adds container property to tokens

Description

Adds container property to Token types
Updates unit tests

Testing required outside of automated testing?

[x] Not Applicable

Screenshots (if appropriate):

[x] Not Applicable

Rollback / Rollforward Procedure

[x] Roll Forward
[ ] Roll Back

Reviewer Checklist

[ ] Description of Change
[ ] Description of outside testing if applicable.
[ ] Description of Roll Forward / Backward Procedure
[ ] Documentation updated for Change

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


No longer works as it used to: form-samples/wrapped-body

Sample (which sample are you having trouble with)
form-samples/wrapped-body
/wrapped-body.json
What Should Happen
Being able to determine the number of columns reliably.
What Actually Happens
Whilst section titels appear, all fields are listed in one single column.

Hi @gvSmartEnergy .
Am I correct that the problem is that when the body is set up, all the columns are stuck in one section, as shown in the following image?

If so, try dragging and dropping columns from [Edit Columns].

If my understanding/response is not correct, I would appreciate a little more detail about the problem. If possible, a picture would be helpful.

Since there seems to be no reply, I will close it. If you have any questions, sorry, but please create a new issue again.


windows adaptation issues

the command is located on the wrong port

I am not sure I understand. Are you saying that the gke deployment is listening on the same port as the multi deployment?

the port i open 是12345 and he seems to be listening in goland IDE

delete files on C:\Users\Administrator\.local\share\serviceweaver\single_registry

Fixed in #189 . Please reopen if it still doesn't work for you.


starlark: use syscall.Mmap to avoid golang.org/x/syscall dependency

you just need to run go mod tidy to update go.mod and go.sum. golang.org/x/sys is no longer a direct dependency.

Good point, thanks.


Direct download links on website UI

Hi guys, I need your help. I need downloader to my website. I do not want to download videos on my server. How I can provide on youtube-dl direct links to my site users? I have a web UI on my web, but system downloading videos to my server. I want every user to download videos directly to each PC. not on my server. thank you very much for help :-)

@ladislavczech  Hi,
Even I am also looking for some solution, But NOT ABLE TO FIND IT.
But as you can see http://en.savefrom.net/#url=http://youtube.com/watch?v=iWaFAIRWsA4&utm_source=youtube.com&utm_medium=short_domains&utm_campaign=ssyoutube.com is doing the same thing.
If anybody know how to implement this, It is really great help.

Call youtube-dl like this:

youtube-dl -j URL

It will output json string (it will NOT download). Look at this json string. It contains "formats" key which contains all the direct url's and further informations about the format (like resolution: 720p etc...).

Use -g option to extract final download URL. However this won't work in some cases.

@kidol  Thank for your reply.
As you suggest -j dump json, But when some once click on that link it will open in browser(Chrome).
But I need to force download video to client side as you can  http://en.savefrom.net/#url=http://youtube.com/watch?v=iWaFAIRWsA4&utm_source=youtube.com&utm_medium=short_domains&utm_campaign=ssyoutube.co (http://i.imgur.com/PyO1cTJ.jpg)
I can write code in php to force download, But Is there any way from where I can get direct url to download.

In case of YouTube, you can append "&title=something" to force the download.


Long-Term Support for CookiesAllowedForUrls Enterprise Policy

Hello,
Does Chrome plan to support the CookiesAllowedForUrls Enterprise Policy indefinitely? We are planning to tell our customers the the CookiesAllowedForUrls Enterprise Policy is one of the ways they can continue to use our application with third-party cookies. Just want to make sure that Chrome is planning to support this long-term.

@bretticus-mc We currently do not have a deprecation plan for CookiesAllowedForUrls in mind; so you are welcome to provide that guidance. However, we would highly recommend that you consider migrating your application to third-party cookie replacement APIs/solutions since they have better privacy and security properties, and will work outside of managed environments. Hope that helps!


Library appintro appears 3 times

About this issue
I'm using the library apl-devs/AppIntro, but it is listed 3 times in the about libraries list.

new LibsBuilder()
    .withVersionShown(true)
    .withExcludedLibraries(...)
    .withActivityTitle(...)
    .start(...);

 #withExcludedLibraries() is called passing an empty array in this case.
Details

AboutLibraries 6.1.1
Android Support Library 27.1.1
Gradle build tools 3.1.3
Android Studio
com.github.apl-devs:appintro:v4.2.3

I created an helper class that I use on some of my projects. Actually, it is open source: https://github.com/devgianlu/CommonUtils/blob/master/utils/src/main/java/com/gianlu/commonutils/Preferences/BasePreferenceActivity.java here around line 180

Oh wait. I just saw it. you use aboutlibraries 2.3.0?
Tried this with the latest version of the aboutLibraries and everything works perfectly.
Please update to the latest release to get all the newest bugfixes

Somehow, I've written it wrong, I'm using version 6.1.1.

Hmm I tried with the latest version including that lib and couldn't
reproduce it in the sample.
Not sure. Could you modify the sample to showcase the issue please?
On Sun, Aug 19, 2018, 10:40 AM Gianlu<EMAIL_ADDRESS>wrote:

Somehow, I've written it wrong, I'm using version 6.1.1.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/mikepenz/AboutLibraries/issues/409#issuecomment-414112914,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABaGiKEuVik58t2vakgRwGSXhfl7zcEVks5uSSRxgaJpZM4V5gLk
.

--
Mike Penz

Mike Penz
Android | Backend | Open Source
mikepenz.com

Hey @devgianlu, can you please write how you resolved the issue? I have exactly the same issue.

I've did nothing. It fixed itself after some time.


Fix render loop in TrackToggle onChange

This fixes an infinite render loop introduced by #732 by not using memoized callbacks for TrackToggle's onChange prop.

 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.

oh, thanks for the PR, yeah, we should fix this immediately.
Can you just sign the CLA so that I can merge this?

Thanks! Also included a changeset, hopefully it's correct. Cheers!

perfect, thank you!


UI glitch for Relation Widget in Firefox

- Do you want to request a feature or report a bug?
I am reporting a bug.
- What is the current behavior?
The Relation Widget's input field, inside the CMS, is strangely garbled. It works fine in Chrome, but in Firefox it's impossible to read the text inside the field (see screenshot)
- If the current behavior is a bug, please provide the steps to reproduce.
Add a relationship widget to a Field inside config.yml. Open up the Admin UI in Firefox.
- What is the expected behavior?
Should be able to read the text inside the relationship widget field.
- Please mention your CMS, node.js, and operating system version.
My Firefox version is 56.0 (64-bit)
My Desktop is Fedora 26. I'll try testing this on different OS and browser versions ASAP.
The CMS is deployed using Netlify, and the bug persists, so it's not a local-specific problem.
Netlify CMS version is 0.7.0
And here is the ruby and node version from the deploy log:
2:19:27 AM: Using version v6.12.0 of node
2:19:28 AM: Using /opt/buildhome/.rvm/gems/ruby-2.1.2
--
I couldn't find this issue reported anywhere else.
.. Maybe it's just my version of Firefox?
If so, accept my apologies and feel free to close this issue.
Other than that, I love this project and please, keep up the good work!
You're building the future of web development :+1:

Reproduced in Firefox 56.0.2 on Windows 10 Fall Creators Update.

I've also seen this show up in FF.

This will be addressed in the 1.0 RC.
Bug: https://cms-demo.netlify.com/#/collections/kitchenSink/entries/a-big-entry-with-all-the-things
Fixed: https://global-ui--cms-demo.netlify.com/#/collections/kitchenSink/entries/a-big-entry-with-all-the-things
Leaving open until fixed in a release.

Looks like the only reason is that the height is manually set to 30px instead of just leaving the default.

Thanks for the feedback.
I'll try to tweak height using CSS in the meantime.
Cheers

Fixed in 1.0.


Switch TransactionQueue from a std::queue to a std::forward_list.

Summary
This is a performance change and should reduce the time needed to move elements between TransactionQueues. I modified the large_garbage_collector__test to behave as a benchmark (not kept in this PR, but we should probably add a scenario like this as a dedicated benchmark in the future) by creating a large table, running a bunch of update transactions, and then seeing how long the GC takes to clean up all the garbage.
Test
#include <chrono>
#include <vector>
#include "gtest/gtest.h"
#include "storage/garbage_collector.h"
#include "util/transaction_test_util.h"

namespace terrier {
class LargeGCTests : public TerrierTest {
 public:

  storage::BlockStore block_store_{1000};
  common::ObjectPool<storage::BufferSegment> buffer_pool_{1000};
  std::default_random_engine generator_;
  storage::GarbageCollector *gc_ = nullptr;
};

// NOLINTNEXTLINE
TEST_F(LargeGCTests, MixedReadWriteWithGC) {
  const uint32_t num_iterations = 5;
  const uint16_t max_columns = 2;
  const uint32_t initial_table_size = 1000000;
  const uint32_t txn_length = 10;
  const uint32_t num_txns = 1000000;
  const std::vector<double> update_select_ratio = {0.4, 0.6};
  const uint32_t num_concurrent_txns = TestThreadPool::HardwareConcurrency();
  double unlink_time = 0.0;
  double deallocation_time = 0.0;
  for (uint32_t iteration = 0; iteration < num_iterations; iteration++) {
    LargeTransactionTestObject tested(max_columns, initial_table_size, txn_length, update_select_ratio, &block_store_,
                                      &buffer_pool_, &generator_, true, false);
    // run txns
    tested.SimulateOltp(num_txns, num_concurrent_txns);

    gc_ = new storage::GarbageCollector(tested.GetTxnManager());

    // first round of GC unlinks everything (and deallocates any read-only txns)
    auto start = std::chrono::high_resolution_clock::now();
    auto gc_result = gc_->PerformGarbageCollection();
    auto end = std::chrono::high_resolution_clock::now();
    auto elapsed_seconds = std::chrono::duration_cast<std::chrono::duration<double>>(end - start);
    std::cout << gc_result.second << " txns unlinked in " << elapsed_seconds.count() << " seconds" << std::endl;
    unlink_time += elapsed_seconds.count();

    // second round of GC deallocates the previously unlinked txns
    start = std::chrono::high_resolution_clock::now();
    gc_result = gc_->PerformGarbageCollection();
    end = std::chrono::high_resolution_clock::now();
    elapsed_seconds = std::chrono::duration_cast<std::chrono::duration<double>>(end - start);
    std::cout << gc_result.first << " txns deallocated in " << elapsed_seconds.count() << " seconds" << std::endl;
    deallocation_time += elapsed_seconds.count();
  }

  std::cout << "mean unlink time: " << unlink_time / num_iterations << " seconds" << std::endl;
  std::cout << "mean deallocation time: " << deallocation_time / num_iterations << " seconds" << std::endl;
}
}  // namespace terrier

Results
Master:
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from LargeGCTests
[ RUN      ] LargeGCTests.MixedReadWriteWithGC
1000001 txns unlinked in 3.14369 seconds
993881 txns deallocated in 0.481728 seconds
1000001 txns unlinked in 3.03849 seconds
993881 txns deallocated in 0.44668 seconds
1000001 txns unlinked in 3.05728 seconds
993881 txns deallocated in 0.450835 seconds
1000001 txns unlinked in 3.12717 seconds
993881 txns deallocated in 0.454488 seconds
1000001 txns unlinked in 3.00857 seconds
993881 txns deallocated in 0.44538 seconds
mean unlink time: 3.07504 seconds
mean deallocation time: 0.455822 seconds
[       OK ] LargeGCTests.MixedReadWriteWithGC (27636 ms)
[----------] 1 test from LargeGCTests (27636 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (27636 ms total)
[  PASSED  ] 1 test.

PR:
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from LargeGCTests
[ RUN      ] LargeGCTests.MixedReadWriteWithGC
1000001 txns unlinked in 0.749671 seconds
993881 txns deallocated in 0.472261 seconds
1000001 txns unlinked in 0.751856 seconds
993881 txns deallocated in 0.462672 seconds
1000001 txns unlinked in 0.738099 seconds
993881 txns deallocated in 0.462966 seconds
1000001 txns unlinked in 0.709454 seconds
993881 txns deallocated in 0.445883 seconds
1000001 txns unlinked in 0.707433 seconds
993881 txns deallocated in 0.445711 seconds
mean unlink time: 0.731303 seconds
mean deallocation time: 0.457899 seconds
[       OK ] LargeGCTests.MixedReadWriteWithGC (15588 ms)
[----------] 1 test from LargeGCTests (15588 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (15588 ms total)
[  PASSED  ] 1 test.

Results summary
Master unlink time: 3.075 seconds
PR unlink time: 0.731 seconds

Coverage decreased (-0.02%) to 98.14% when pulling 2ed10f87176a72a98ccac8ed1efc97a63587e302 on mbutrovich:gc_opt into fa4f30bab71a7b9396595ad30fd2861267d48ba0 on cmu-db:master.


#117 more tests

@stereobooster wanna rebase and land this?

@stereobooster Feel free to squash and merge.


[BUG] Error opening OpenPyxl workbooks that include tables

🐛 Bug Report
I have been encountering issues when loading spreadsheets that have been touched by OpenPyxl.  I tried digging in to find the root cause, but the best I can tell is the WorksheetModel.tables variable gets set to tables: [ undefined ], which causes the following error:

TypeError: Cannot read property 'name' of undefined
at /app/node_modules/exceljs/lib/doc/worksheet.js:836:20
at Array.reduce ()
at Worksheet.set model [as model] (/app/node_modules/exceljs/lib/doc/worksheet.js:830:32)
at /app/node_modules/exceljs/lib/doc/workbook.js:210:23
at Array.forEach ()
at Workbook.set model [as model] (/app/node_modules/exceljs/lib/doc/workbook.js:199:22)
at XLSX.load (/app/node_modules/exceljs/lib/xlsx/xlsx.js:395:25)
From previous event:
at processImmediate (internal/timers.js:458:21)
From previous event:

Lib version: 4.1.1
OpenPyxl version 3.0.4
Steps To Reproduce
Problem occurs when reading a workbook; in my case via stream.
return workbook.xlsx.read(read_stream, {'sheetName': 'Test'});

Attached are sample files.  Spreadsheet with table was modified by openpyxl and fails to load.  Spreadsheet without table was modified by openpyxl and loads properly.
test file with table.xlsx
test file 1.xlsx
The expected behaviour:
Spreadsheets should be properly parsed without error.
Possible solution (optional, but very helpful):
I got lost digging down into the parser layer of the code trying to figure out where the undefined was coming from, so the problem seems to be somewhere there.  I've not been able to figure out a meaningful difference between spreadsheets that parse properly and those that don't, put I'll keep poking at it.
As a hack, I added a conditional to the set model function in worksheet.js to verify the problem was the undefined table entry.
      this.tables = value.tables.reduce((tables, table) => {
        table = table ? table : '';
        const t = new Table();
        t.model = table;
        tables[table.name] = t;
        return tables;
      }, {});

I've managed to pinpoint the piece of the xml that causes the issue:
xl/worksheets/_rels/sheet1.xml.rels:
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="/x1/tables/table1.xml" Id="rId1" /></Relationships>
Changing the target to Target="../tables/table1.xml" enabled Exceljs to read the file.  Given that the "bad" file opens in Excel itself without issue, I'm inclined to conclude that the bug is in Exceljs rather than OpenPyxl.

I have now located the issue:
In lib/xlsx/xform/book/workbook-xform.js, it appears there has been some attempt to address the issue with the target attribute.  At some point the relationship gets converted to "../":
      // if rel.Target start with `[space]/xl/` or `/xl/` , then it will be replaced with `''` and spliced behind `xl/`,
      // otherwise it will be spliced directly behind `xl/`. i.g.
      worksheet = model.worksheetHash[`xl/${rel.Target.replace(/^(\s|\/xl\/)+/, '')}`];

Then in lib/xlsx/xform/sheet/worksheet-xform.js reconcile function, the rels array includes the original /x1/ target, so the lookup to options.tables (which has the "../" change) fails:
      model.tables = (model.tables || []).map(tablePart => {
        const rel = rels[tablePart.rId];
        return options.tables[rel.Target];
      });

Potential fix (I suspect I may be oversimplifying the problem/solution, so I'm reluctant to create a push request):
lib/xlsx/xform/sheet/worksheet-xform.js|506
return options.tables[rel.Target.replace(/^(\/x1)/, '..')];

Has there been any update on this?


Cannot start container ... fork/exec /var/lib/docker/init/dockerinit-1.3.2: invalid argument

I'm trying to install docker on a Joyent VPS. We have a ubuntu 12.04 (2.4.2) image from joyent that come with a custom 3.8.6  kernel (3.8.6-joyent-ubuntu-12-opt). No problem installing but, when i try to run:
sudo docker run -i -t ubuntu /bin/bash

i get this error:
2014/12/03 10:13:16 Error response from daemon: Cannot start container f640794402711820dcbb52a046714aff0e630dd6d709c2403faa687a61588644: fork/exec /var/lib/docker/init/dockerinit-1.3.2: invalid argument

but i don't know how to debug the problem.
Thanks in advance

@redirect11 That kernel has been deprecated and is no longer on https://www.kernel.org (and hasn't been there for a long time). Please use official kernels provided by the Linux distribution you're using.
The following kernels are used for these distributions:
Ubuntu 12.04 - please install and use linux-generic-lts-trusty
Ubuntu 14.04 - the default linux-image-generic package should be good
Debian 7 - please install a kernel from the backports
Debian 8 - please use the provided kernel or a newer packaged version
We don't support kernels provided by service providers. That's not because we're being mean to the service providers or to the clients of those service providers, it's because there are way too many providers to be able to support each and every configuration.


Osm controller init container

Description:
Create a initContainer named init-osm-controller to osm-controller pod.
The purpose of this initContainer is to create MeshConfig resource in k8s if it does not exist.
This PR is the first step of issue #3039. The next step would be remove configmap and use MeshConfig CRD to configure osm-controller.

Affected area:

New Functionality      [x]
Install                [x]
Control Plane          [x]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

No

Codecov Report

Merging #3222 (0d997c6) into main (6681538) will decrease coverage by 0.17%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3222      +/-   ##
==========================================
- Coverage   66.42%   66.24%   -0.18%
==========================================
  Files         163      163
  Lines        7490     7490
==========================================
- Hits         4975     4962      -13
- Misses       2488     2501      +13
  Partials       27       27

Flag
Coverage Δ

unittests
66.24% <ø> (-0.18%)
:arrow_down:

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

Impacted Files
Coverage Δ

pkg/configurator/validating_webhook.go
71.89% <0.00%> (-9.16%)
:arrow_down:

pkg/endpoint/providers/kube/client.go
79.20% <0.00%> (+0.99%)
:arrow_up:

Continue to review full report at Codecov.

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

@nojnhuh I can think of two reasons.

we have to ensure MeshConfig exists before osm-controller starts. A normal container does not guarantee containers start order.
It's not necessary to have a long running container for this task.

we have to ensure MeshConfig exists before osm-controller starts. A normal container does not guarantee containers start order.
It's not necessary to have a long running container for this task.

But does it need to be in a separate container at all? Is there any reason we couldn't add this same functionality to the osm-controller binary to create the MeshConfig before it enters its main loop? I'm wondering why this should be in a separate container but other short-lived tasks like creating the root CA or patching the webhooks can be built into osm-controller.

we have to ensure MeshConfig exists before osm-controller starts. A normal container does not guarantee containers start order.
It's not necessary to have a long running container for this task.

But does it need to be in a separate container at all? Is there any reason we couldn't add this same functionality to the osm-controller binary to create the MeshConfig before it enters its main loop? I'm wondering why this should be in a separate container but other short-lived tasks like creating the root CA or patching the webhooks can be built into osm-controller.

@nojnhuh That's a reasonable question. I think partly the rationale was to create a bootstrapping mechanism for osm-controller in a generic enough way that could be extendable to future needs of similar sorts. The CA bundle secret creation could move into an init-container as well, although that requires some additional effort since it gets created/read by both osm-controller and osm-injector. In general, I think for one-time tasks, it makes sense to rely on an init-container, so if the controller container crashes for some reason we don't have to worry about issues with re-initializing resources that were previously initialized.

@shashankram @nojnhuh  updated PR description to reflected the intention behind a initContainer approach.

I've created an issue for MCR : https://github.com/openservicemesh/osm/issues/3245


Make HystrixCommand.execute()/queue() and AbstractCommand.observe()/toObservable() nonfinal

Addresses #715

NetflixOSS » Hystrix » Hystrix-pull-requests #62 SUCCESS
This pull request looks good


Logarithmic Scale Tick Bug for values of 0

I have a similar scenario as issue #2966.
Expected Behavior
I wish to show the difference between values with large differences in values and some with a value of 0 too.
I want to show 0 as a value so the tooltip can still be seen for that data value because if I set the 0 values to 'null' the tooltip doesn't display and you can't see a little sliver of a bars border to indicate a data value is there. This is particularly an issue where several values are 0 beside each other, you cannot easily see how many are there when there are no labels under them. e.g.

https://codepen.io/crwh05/pen/xgeROm
Current Behavior
The scales are not displaying correctly. I know this is an issue with log(0) being undefined but I thought the fix #3016 solved this problem.
For some reason, the first tick is being displayed below 0 on the y scales. This only happens when a value is 0.

https://codepen.io/crwh05/pen/ggywQY
If the first scale tick could be displayed in the correct place above the 0 tick then the chart would be perfect for my use.
Environment

Chart.js version: 2.4.0

Thanks for your comment, I'll try to figure out with it.

Does anyone have a work around for this till the next version is released?

I'm almost ready with pr, but need a couple of days to test everything.


Use Eventually/Consistently in all integration tests

How to categorize this issue?

/area testing
/kind technical-debt
What would you like to be added:
Replace remaining usages of "wait until" or "retry until" functions in integration tests with gomega's native async assertions (Eventually, Consistently).
Examples:
https://github.com/gardener/gardener/blob/50f92c5dc35160fe05da9002a79e7ce4a9cf3509/test/integration/controllermanager/shoot/retry/retry_test.go#L126-L127
https://github.com/gardener/gardener/blob/50f92c5dc35160fe05da9002a79e7ce4a9cf3509/test/integration/extensions/controller/backupbucket/backupbucket_test.go#L418-L419
Why is this needed:
We added this as a guideline in https://github.com/gardener/gardener/blob/50f92c5dc35160fe05da9002a79e7ce4a9cf3509/docs/development/testing.md#writing-integration-tests.
However, we didn't clean up the technical debt in existing integration tests yet.

/assign


Zero padding an image based on position in "image space"

Hi!
I am trying to reshape a 3D image to the size of another 3D image by zeropadding to different extents in different directions. I started making a script to do this using numpy and DICOM tags but I feel like there would be a better way to do it using SimpleITK as I want to be sure that the position of the 3D image data is in the same position with respect to the other 3D image. Here is an illustration of the idea.

So my question is: What would be the best way to do this using SimpleITK?

I'd create a blank image the size of image1, and then use the Paste function to paste image2 into that blank image.

Hello @TereseH,
You are looking for ConstantPadImageFilter, as shown here:
import SimpleITK as sitk

# Image with constant value of 10
img = sitk.Image([8,8], sitk.sitkUInt16) + 10

# Pad it with constant value of 32
padded = sitk.ConstantPad(img, padLowerBound = [2,4], padUpperBound = [8,16], constant = 32)

# See that the original image is in the same physical location in the padded version.
print(img.GetOrigin())
print(img.GetSpacing())

print(padded.GetOrigin())
print(padded.GetSpacing())

I'd use the building sitk::Image indexing operator to paste:
zeroImage = sitk.Image([new_xsize, new_ysize], sitk.sitkUInt8) #initialized to zero
zeroImage[xpos:xpos+img_size, ypos:ypos+img_size] = img

Internally this will use the paste image filter, but with a more pythonic interface. I don't recall the constraints of the meta-data matching for the PasteImageFilter. the zeroImage may need to has additional metadata set.
If you want to preserve everything from the original Image ( the origin and size will of course change ), then @zivy approach would be best/easiest.

Okay, do you think there might be a way to do it without specifying how much I should padd with on each side, that there would be some way to match two images together?

@blowekamp's code snippet does what you want. If you do care about the physical location you just need to add one more line:
zeroImage = sitk.Image(image1.GetSize(), sitk.sitkUInt8) #initialized to zero
# ensure that zeroImage is in the same physical location as image1
zeroImage.CopyInformation(image1)
img_size = img.GetSize()
zeroImage[xpos:xpos+img_size, ypos:ypos+img_size] = img

@blowekamp's code snippet does what you want. If you do care about the physical location you just need to add one more line:

Hi thank you for the help. I tried the code you sent but I got an error saying the sizes were wrong. The size of image2 is (261, 112) but it seems to say it is [195, 12]. Did I use the code how you intended?
zeroImage = sitk.Image(image1.GetSize(), sitk.sitkUInt8)  # initialized to zero
# ensure that zeroImage is in the same physical location as image1
zeroImage.CopyInformation(image1)
img2_size = image2.GetSize()
xpos, ypos= np.around(image2.GetOrigin()).astype(int)
zeroImage[xpos:(xpos + img2_size[0]), ypos:(ypos + img2_size[1])] = image2

Error message: IndexError: cannot paste source with size [195, 12] into destination with size (261, 112)

Hello @TereseH,
Your xpos, ypos assignment is incorrect. The origin of an image is its spatial origin in the physical world and what you need to use for xpos, ypos are indexes. If you want to paste at location [0,0], then just set to that:
xpos = ypos = 0

@zivy
Okay I understand, so then I would need to find the offset in the origin of image 1 and 2 and use that for xpos and ypos?

Hello @TereseH,
To paste image2 in a specific location with respect to image1's coordinate system you need to have the indexes xpos,ypos. You either have these indexes directly or if you have the physical coordinates, you obtain the indexes from calling image1.TransformPhysicalPointToContinuousIndex((xpos_physical,ypos_physical)).

Thank you for all the help! I managed to do it now.


Remove chunks

What this PR does: Removes chunks support and creates deployment examples for azure, gcs and s3
Checklist

[X] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@friedrichg Do you just wanna go ahead and merge this?


serde: serialize dyn Error Values using collect_str

Currently, valuable-serde handles Value::Error variants incorrectly.
When valuable-serde encounters a Value::Error, it returns the error
immediately as a serialization error:
https://github.com/tokio-rs/valuable/blob/1fc2ad50fcae7fc0da81dc40a385c235636ba525/valuable-serde/src/lib.rs#L267
This is not correct. If a serde serializer returns an error, this
means something has gone wrong while serializing a value. Returning an
error makes the serialization fail. However, this is not what
valuable's Value::Error means. Value::Error represents that we are
recording a value which happens to be an Error, not that something
went wrong while recording the value. This means that valuable-serde
will currently return an Error (indicating that serialization failed)
any time it attempts to record an Error value, and serialization will
fail.
This commit changes valuable-serde to record the error using its
Display implementation, using serde's collect_str method. Now,
Errors will be serialized by recording their messages as a string,
rather than causing the serialization to fail.
Using collect_str allows the serializer to write the display
representation to its own internal buffer, rather than having to format
the error to a temporary String beforehand.
Fixes #88

lgtm.
As for the CI (codegen) failure, I implemented a way to automatically fix that (https://github.com/rust-lang/futures-rs/pull/2562), but forgot to port it to this repository. I will open a PR later.

@taiki-e great, happy to rebase this once CI is sorted out!

@hawkw: Filed #90 to fix CI issue.


Ignore parent keys in Pass dispose function

Reopened as new PR, since I force pushed and was unable to reopen the other one (#138)
version: 6.5.1
browser: Chrome 75.0.3770.100
operating system: MacOS
graphics card: MacBook Pro 2018?
I am using this package with the react-three-fiber package. Here is my Effect Component:
const Effects = React.memo(() => {
    const { gl, scene, camera, size } = useThree();
    const composer = useRef();

    useEffect(() => void composer.current.setSize(size.width, size.height), [size.width, size.height]);
    useRender(() => composer.current.render(), true);

    const effect = useMemo(() => new PixelationEffect(100.0));
    return (
        <effectComposer ref={composer} args={[gl]}>
            <renderPass attachArray="passes" args={[scene, camera]} />
            <effectPass attachArray="passes" args={[camera, effect]} renderToScreen={true} />
        </effectComposer>
    );
});

In order for this to work, I need to make the fix in Pass.js file as per this PR. I am not sure if this is correct, or if I am simply doing something wrong. But here goes, a suggestion, that might be useful.
When using the library with react-three-fiber, the parent key is undefined
and the script will then fail. Here we check if the key exists, then we explicitly
check if it is null, I am not sure that null check is stil necessary?
The screen  is rendered, but I am getting this error below, and once I resize and trigger the composer.current.setSize I get a WSOD.
Uncaught TypeError: Cannot read property 'dispose' of undefined
    at EffectPass.dispose (postprocessing.esm.js:1420)
    at EffectPass.dispose (postprocessing.esm.js:3199)
    at index.js:291
    at unstable_runWithPriority (scheduler.development.js:255)
    at removeChild (index.js:284)
    at switchInstance (index.js:302)
    at commitUpdate (index.js:359)
    at commitWork (react-reconciler.development.js:9944)
    at commitAllHostEffects (react-reconciler.development.js:10663)
    at HTMLUnknownElement.callCallback (react-reconciler.development.js:2234)
    at Object.invokeGuardedCallbackDev (react-reconciler.development.js:2284)
    at invokeGuardedCallback (react-reconciler.development.js:2337)
    at commitRoot (react-reconciler.development.js:10896)
    at react-reconciler.development.js:12401
    at Object.unstable_runWithPriority (scheduler.development.js:255)
    at completeRoot (react-reconciler.development.js:12400)
    at performWorkOnRoot (react-reconciler.development.js:12329)
    at performWork (react-reconciler.development.js:12237)
    at performSyncWork (react-reconciler.development.js:12211)
    at requestWork (react-reconciler.development.js:12080)
    at commitPassiveEffects (react-reconciler.development.js:10778)
    at wrapped (scheduler-tracing.development.js:207)
    at flushFirstCallback (scheduler.development.js:107)
    at flushWork (scheduler.development.js:219)
    at MessagePort.push../node_modules/react-three-fiber/node_modules/scheduler/cjs/scheduler.development.js.channel.port1.onmessage (scheduler.development.js:611)

Hi, thanks for contributing!
There's actually a reason why the dispose method doesn't check for undefined. The reason being that class members should never be set to undefined in the first place. They should either be deleted or set to null.
It's also not recommended to dynamically add new fields to existing classes. In your case, some code apparently adds a parent field to the Pass class or to one of its descendents and that is bad practice.
Having that said, I don't think it would be a good idea to expect undefined values in the dispose method because that would only endorse bad practices.
If your build setup is configured correctly, the following code should fix your problem:
import { Pass } from "postprocessing";

// Fix dispose for react-three-fiber.
Pass.prototype.dispose = function() {

	const material = this.getFullscreenMaterial();

	if(material !== null) {

		material.dispose();

	}

	for(const key of Object.keys(this)) {

		if(key !== "parent" && this[key] !== undefined &&
			this[key] !== null && typeof this[key].dispose === "function") {

			/** @ignore */
			this[key].dispose();

		}

	}

};

I opened an issue against react-three-fiber https://github.com/drcmda/react-three-fiber/issues/145


AO-11811: Trace decision sync-up

Negotiation is required to merge the remote settings with the local sampling config.
See https://swicloud.atlassian.net/browse/AO-11811 for more details.

Codecov Report

Merging #94 into master will decrease coverage by 0.78%.
The diff coverage is 52.94%.

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
- Coverage   81.11%   80.33%   -0.79%
==========================================
  Files          33       33
  Lines        3432     3478      +46
==========================================
+ Hits         2784     2794      +10
- Misses        566      599      +33
- Partials       82       85       +3

Impacted Files
Coverage Δ

v1/ao/internal/config/validators.go
92.64% <16.66%> (-7.36%)
:arrow_down:

v1/ao/internal/reporter/event.go
89.24% <33.33%> (-10.02%)
:arrow_down:

v1/ao/internal/config/config.go
87.93% <64.28%> (-12.07%)
:arrow_down:

v1/ao/internal/reporter/oboe.go
84.01% <66.66%> (-2.29%)
:arrow_down:

v1/ao/internal/reporter/reporter_grpc.go
66.49% <0%> (+0.69%)
:arrow_up:

Continue to review full report at Codecov.

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

I think we changed tracing mode ALWAYS to ENABLED and NEVER to DISABLED. Should this be reflected in the code change?

Thanks for catching that! Done.

Looks good :+1:

Fixed a problem found in integration testing.


[feature request]: add options for toggling push-to-talk and activating voice based on decibels

most likely extremely simple to implement and im probably gonna make a PR if it isn't done before i finish an impl

it is simple to implement, the problem is the consequences it will lead to

maybe make it a server based feature, for example, someone with a private server may want it enabled

hmm that sounds like a good idea


Fix run-3node-cluster.sh script.

Fix of run-3node-cluster.sh script, add missing space.

bors r+


Try

Codecov Report

Merging #7603 (d218de4) into dev (871db33) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev    #7603      +/-   ##
============================================
- Coverage     41.34%   41.33%   -0.01%
+ Complexity     3678     3676       -2
============================================
  Files           641      641
  Lines         26473    26469       -4
  Branches       2961     2961
============================================
- Hits          10944    10941       -3
- Misses        14502    14503       +1
+ Partials       1027     1025       -2

Impacted Files
Coverage Δ

...ava/org/apache/dolphinscheduler/dao/PluginDao.java
6.25% <ø> (+1.25%)
:arrow_up:

...org/apache/dolphinscheduler/remote/utils/Host.java
37.77% <0.00%> (-2.23%)
:arrow_down:

...e/dolphinscheduler/remote/NettyRemotingClient.java
52.11% <0.00%> (-1.41%)
:arrow_down:

Continue to review full report at Codecov.

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


[Cache] Add warning about JSD and ETags

Updating Cache Article based on CUSTESC-33810
Note:
May in the future add warnings about etags in the referenced articles (JSD,E-mail obfs...)

Also PCX-9183


[AutoPR batch/data-plane] New Batch data plane API version 2018-08-01.7.0

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/3657

(message created by the CI based on PR content)

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/2883


Add some ui color improvements

Here is some screenshots:
Suggestions wiget

Buttons and extensions counter badge

I would use the same background color like the original atom-theme for the suggestion widget (#29363d). And I don't know if we can seperate the colors from the suggestion and the explanation, but then they have different backgrounds (atom screenshot):

I think it's too much of the main color. But for now i'm okay with that.

@tobiasalthoff thank you for review. I will try to make it look like the original Atom Material theme.


Make new workspace inputbox editable in Create project from database dialog

Fixes #13799. This makes the new workspace inputbox editable for the create project from database dialog, like what was done in #13508 for the data workspace dialogs.
Default location for new workspace is in the new project folder

validates that the .code-workspace file extension is there

validates location exists

also added validation that there isn't already a folder with the same project name at the selected location

Pull Request Test Coverage Report for Build 428914232

17 of 60 (28.33%)  changed or added relevant lines in 3 files are covered.
7 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.04%) to 43.103%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

extensions/sql-database-projects/src/controllers/projectController.ts
0
1
0.0%

extensions/sql-database-projects/src/dialogs/createProjectFromDatabaseDialog.ts
11
53
20.75%

Files with Coverage Reduction
New Missed Lines
%

extensions/import/src/wizard/pages/fileConfigPage.ts
3
72.99%

extensions/notebook/src/jupyter/serverInstance.ts
4
73.81%

Totals

Change from base Build 428799928:
-0.04%

Covered Lines:
24150

Relevant Lines:
51340

💛  - Coveralls


⚠ Bofrost.at has degraded performance

In af52e69, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2255 ms

Resolved: Bofrost.at performance has improved in a24380a after 9 minutes.


Add Azure Functions Zappy as a pet

Zappy is the (unofficial) mascot for Azure Functions. I'd like to add them as pet.
See https://twitter.com/jeffhollan/status/1321876877485637633

Should this issue be closed? I see that Zappy is already in the extension :D


Linux: File watcher confuses symlink with actual directory

In Linux.
Create a repro folder:
mkdir repro
cd repro
mkdir client node_modules server
cd node_modules
ln -s ../client client
ln -s ../server server

Then:

Open repro in VS Code
Externally create a file in client, VS Code explorer reacts to changes
Externally create a file in server

🐛 VS Code fails to react to changes, the file watcher things the change came from the symlinked node_modules/server directory.
[2021-10-04 11:16:39.408] [remoteagent] [trace] [File Watcher (nsfw)]  >> ignored /home/joao/tmp/repro/node_modules/server/file

This is something parcel-watcher should actually be able to fix.

Confirmed 👍


Suggestion: SnackBar component

I see daisyUI doesn't have snackbar component, it would be great if it did.

@kaname-png Yes, this is in my to-do list but with "toast" name.
I believe a "toast" and a "snackbar" is the same thing. Right?

@saadeghi Yes, they are the same. I hope you can implement it!

hi, can I work on this????

@priyang12 sure. let me know if I can help

@saadeghi hi I have cloned the repo and installed the packages and went to src/docs and installed the packages and run the development by yarn run dev. it is giving some import error

do I need to change some imports in components postcss config file ???

@priyang12 make sure you build the daisyUI node package first:
https://github.com/saadeghi/daisyui/blob/master/.github/CONTRIBUTING.md#building-on-local

Recently switched to using DaisyUI with SvelteKit and was looking to replace a svelte toast library with a custom store/DaisyUI implementation of toast notifications. I've forked the repository and built a working component consistent with your vision of the toast component & accompanying wrapper by largely imitating the styles of the Alert component.
If you can assign this to me, I'll gladly submit a PR with the changes as I'd likely need help with the animations, to clean up styles.
https://user-images.githubusercontent.com/39316528/174497938-8669ee80-c9ca-4886-b9f5-dfd08ccc3e8f.mp4

We can close this issue now that we have toast component (added in daisyUI 2.19.0) thanks to @cryptodeal


Use TypeScript

I noticed that current API is already named export.
Probably, we can just convert js to ts without Breaking Changes.

We release it as major updates.


Use rfc2606 for example domains

Using actual domains in examples could be considered dangerous. For example, currently, domain.com is owned, and it's ssh port even answers.
This PR changes to use subdomains of reserved example.com:

https://tools.ietf.org/html/rfc2606

Q
A

Bug fix?
Yes or No

New feature?
Yes or No

BC breaks?
Yes or No

Deprecations?
Yes or No

Fixed tickets
N/A or xx

Do not forget to add notes about your changes to CHANGELOG.md. A command-line tool has been included to make this easy, see CONTRIBUTING.md for details.

@glensc do you have plans on finishing this PR?

wth is this?! please don't push merge commits to my branch!

if you want to help, rebase and then push, not create merge commit to my branch.
this creates noise and false sense that these commits belong to this PR:

rebased and force pushed over back my commit

Codecov Report

Merging #2037 into master will decrease coverage by 20.16%.
The diff coverage is 11.15%.

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

Sorry for inconvenience.


Fix project view

Add get project API
Massively refactor project list to be one component
Massively refactor project view into a regular component
Fix bad api calls

This is tech debt city lmao


NIFI-12755 - Upgrade Jetty to 12.0.6

Summary
NIFI-12755 - Upgrade Jetty to 12.0.6
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking

[ ] Apache NiFi Jira issue created

Pull Request Tracking

[ ] Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
[ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

[ ] Pull Request based on current revision of the main branch
[ ] Pull Request refers to a feature branch with one commit containing changes

Verification
Please indicate the verification steps performed prior to pull request creation.
Build

[ ] Build completed using mvn clean install -P contrib-check

[ ] JDK 21

Licensing

[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy
[ ] New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

[ ] Documentation formatting appears as expected in rendered files

https://github.com/jetty/jetty.project/releases/tag/jetty-12.0.6

@pvillard31 I tracked down the source of the problem to due visibility of an anonymous class instance used in a test method. The stack trace was related to the visibility of a method within the anonymous class, which makes sense since it was method-local. I moved the test listener out to a public class in the test class and that worked locally as expected. I will plan on merging pending successful automated builds.


Update one-click-ingestion-new-table.md

@TzviaGT : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@TzviaGT Closing due to migration. We will pick these up post Migration.


Sign-in and out experience to authenticate users of your app

Identity MVP Technical Specification
Following up on #11, we are working on allowing app developers to configure a sign-in and sign-out experience in the app.
App Center developers integrate the App Center Identity SDK and call appcenter.signIn() and is provided with a UI that allows their app users to login via third-party identity providers {Google, Facebook, or Microsoft} or email/password.
After signing in, the user is then directed to the URL that the app developer sets. The user’s details (name, username, provider) are logged in App Center’s Identity “User” tab.
App developers can also call appcenter.signOut() to sign out their users.
Here are the designs:

Closing this issue; App Center Auth was shipped in public preview on May 7, and you can learn more about Auth!


Unable to copy static assets

react-native-fetch-blob: 0.10.5
RN 0.44
currently testing on iOS.
in App.js I'm including a static image asset.
const imageToCopy = require('./assets/images/test.jpg');
Now I want to take that static asset and copy it to a local file
I've been unable to get fs.asset() to give me an image path I can work with. I'm not sure if there is a bug or I am not coding this properly. I've tried every variation including the following:
const sourcePath = fs.asset('/src/assets/images/test.jpg');
const sourcePath = fs.asset('test.jpg');
const sourcePath =fs.asset('./assets/image/test.jpg');

but in every case when I go to copy the file with fs.cp(sourcePath, newPath) I am getting an error that an asset does not exist at the supplied paths (I can confirm newPath is fine since it is working with non static assets)
A quick example of usage on ios (and android) would be much appreciated.

On iOS that function does not do much, see
https://github.com/wkh237/react-native-fetch-blob/blob/master/fs.js#L52
  if(Platform.OS === 'ios') {
    // path from camera roll
    if(/^assets-library\:\/\//.test(path))
      return path
  }


Running example fails

Trying to run this with CentOS 8 and got the following error
Any idea what causing this?
$ LD_LIBRARY_PATH=/usr/local/lib64 RUST_BACKTRACE=full ./chroot_vm rootfs/ /bin/sh
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: CreateVsockBackend(UnixBind(Os { code: 98, kind: AddrInUse, message: "Address already in use" }))', src/libkrun/src/lib.rs:156:55
stack backtrace:
   0:     0x7fcbd5ab1d8a - std::backtrace_rs::backtrace::libunwind::trace::h04d12fdcddff82aa
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:100:5
   1:     0x7fcbd5ab1d8a - std::backtrace_rs::backtrace::trace_unsynchronized::h1459b974b6fbe5e1
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fcbd5ab1d8a - std::sys_common::backtrace::_print_fmt::h9b8396a669123d95
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fcbd5ab1d8a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he009dcaaa75eed60
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7fcbd5a4dc3c - core::fmt::write::h77b4746b0dea1dd3
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/fmt/mod.rs:1078:17
   5:     0x7fcbd5ab1571 - std::io::Write::write_fmt::heb7e50902e98831c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/io/mod.rs:1518:15
   6:     0x7fcbd5ab0f25 - std::sys_common::backtrace::_print::h2d880c9e69a21be9
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7fcbd5ab0f25 - std::sys_common::backtrace::print::h5f02b1bb49f36879
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7fcbd5ab0f25 - std::panicking::default_hook::{{closure}}::h658e288a7a809b29
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:208:50
   9:     0x7fcbd5ab04e5 - std::panicking::default_hook::hb52d73f0da9a4bb8
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:227:9
  10:     0x7fcbd5ab04e5 - std::panicking::rust_panic_with_hook::hfe7e1c684e3e6462
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:593:17
  11:     0x7fcbd5acdb68 - std::panicking::begin_panic_handler::{{closure}}::h42939e004b32765c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:499:13
  12:     0x7fcbd5acdadc - std::sys_common::backtrace::__rust_end_short_backtrace::h9d2070f7bf9fd56c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x7fcbd5acda8d - rust_begin_unwind
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
  14:     0x7fcbd5a4c680 - core::panicking::panic_fmt::ha0bb065d9a260792
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
  15:     0x7fcbd5a4e302 - core::option::expect_none_failed::h7e1dd0a94971eb61
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
  16:     0x7fcbd5a9c3ea - krun_create_ctx
  17:           0x40088d - main
                               at /home/vagrant/libkrun/examples/chroot_vm.c:41:14
  18:     0x7fcbd569d7b3 - __libc_start_main
  19:           0x400a2e - _start
  20:                0x0 - <unknown>
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)

That's probably because it can't create a listening UNIX socket at /tmp/vsock0. Perhaps this file already exists and it's owned by a different user?
BTW, this reminds me this is a leftover from the original vsock functionality and should be dropped. Will do ASAP.

That's probably because it can't create a listening UNIX socket at /tmp/vsock0. Perhaps this file already exists and it's owned by a different user?
BTW, this reminds me this is a leftover from the original vsock functionality and should be dropped. Will do ASAP.

@slp this is running on root user on a DigicealOcean Droplet.

@slp this is running on root user on a DigicealOcean Droplet.

@inductor In 82940065ed04fd1bde7728e34f9e0b1a61fd3822, I dropped the legacy functionality that was creating this UNIX socket, so you shouldn't hit this problem anymore.

@inductor In 82940065ed04fd1bde7728e34f9e0b1a61fd3822, I dropped the legacy functionality that was creating this UNIX socket, so you shouldn't hit this problem anymore.

@inductor Were you able to test this again? Are you still hitting this issue?

still not resolved with the latest upstream
RUST_BACKTRACE=full LD_LIBRARY_PATH=/usr/local/lib64 ./chroot_vm rootfs/ /bin/sh
thread '<unnamed>' panicked at 'Error creating the Kvm object: Error(2)', src/vmm/src/linux/vstate.rs:340:30
stack backtrace:
   0:     0x7fdc1822fa8e - std::backtrace_rs::backtrace::libunwind::trace::h25e12e0d899beba0
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7fdc1822fa8e - std::backtrace_rs::backtrace::trace_unsynchronized::h70e61195d6ae3df6
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fdc1822fa8e - std::sys_common::backtrace::_print_fmt::hba93ab80d779695a
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fdc1822fa8e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf092b5883b4b2e50
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7fdc181cf32c - core::fmt::write::hf68bc350a8f2f0dc
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/fmt/mod.rs:1078:17
   5:     0x7fdc1822f191 - std::io::Write::write_fmt::hf66811b1bc767436
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/io/mod.rs:1517:15
   6:     0x7fdc1822eb35 - std::sys_common::backtrace::_print::hd425a11bfe1f20f8
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7fdc1822eb35 - std::sys_common::backtrace::print::h6d678795c1e61e13
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7fdc1822eb35 - std::panicking::default_hook::{{closure}}::h78a02a4a0dee5e7e
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:208:50
   9:     0x7fdc1822e1d6 - std::panicking::default_hook::h56eb7eda02f355a7
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:225:9
  10:     0x7fdc1822e1d6 - std::panicking::rust_panic_with_hook::hb27ea14285131c61
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:591:17
  11:     0x7fdc1824d438 - std::panicking::begin_panic_handler::{{closure}}::hc552fcee62aad17f
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:497:13
  12:     0x7fdc1824d3ac - std::sys_common::backtrace::__rust_end_short_backtrace::hb9f0aa9a78e885a0
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x7fdc1824d35d - rust_begin_unwind
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:493:5
  14:     0x7fdc181cdda0 - core::panicking::panic_fmt::h12ac4570ea43d06f
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:92:14
  15:     0x7fdc181cf9d2 - core::option::expect_none_failed::h096fa60f757b7204
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/option.rs:1268:5
  16:     0x7fdc18277797 - vmm::builder::build_microvm::ha0b1f005eaf04789
  17:     0x7fdc181cba0b - krun_start_enter
  18:           0x400c28 - main
                               at /root/libkrun/examples/chroot_vm.c:138:15
  19:     0x7fdc17e167b3 - __libc_start_main
  20:           0x400dee - _start
  21:                0x0 - <unknown>
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)

The error message looks like Kvm::new() failed, do you have /dev/kvm on your node?

Closing due to inactivity.


Sprockets 3+

On running
bundle exec rake assets:precompile RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/path

I get the error
rake aborted!
NoMethodError: undefined method `find_asset' for nil:NilClass
/usr/local/share/svdv/vendor/bundle/ruby/2.1.0/gems/sass_inline_svg-0.0.6/lib/sass_inline_svg.rb:18:in `inline_svg'
/usr/local/share/svdv/vendor/bundle/ruby/2.1.0/gems/sass-3.4.23/lib/sass/script/tree/funcall.rb:143:in `_perform'
  :
/usr/local/share/svdv/vendor/bundle/ruby/2.1.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
/usr/local/share/svdv/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/usr/local/share/svdv/vendor/bundle/ruby/2.1.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

A quick search on the error message leads me to this, and applying the same solution as suggested there, i.e., setting config.assets.compile = true in config/environments/production.rb fixes the issue for me; but I thought it worthwhile to mention it here.
My setup: Rails <IP_ADDRESS>, Sprockets 3.7.1, Sass-inline-svg 0.0.6
And thanks for the Gem, very useful!

Should be fixed by #10.


Error: "discordsdk.exception.not_running: result 27"

I am on Debian 12, running Python 3.11.2, with version 0.2.5 of discordsdk
I ran the first example program, the "Create a Discord instance" and replaced the APPLICATION_ID with the one I have.
Discord is open, and installed unsandboxed, and works with other game activities and applications which use Rich Presence.
When running the file, it output the following:
Traceback (most recent call last):
  File "/home/[user]/applications/testapp/testapp.py", line 10, in <module>
    app.run_callbacks()
  File "/home/[user]/.local/lib/python3.11/site-packages/discordsdk/discord.py", line 94, in run_callbacks
    raise get_exception(result)
discordsdk.exception.not_running: result 27

Hi there!
It's been a while since I've worked on this project, but I do remember randomly encountering this problem from time to time.
I believe restarting my computer would help usually, but let me know if you've tried that already and it didn't help!

It might also be worth trying a newer version of the SDK to see if it fixes the problem.

oh wow, i didnt realize the last commit was 3 years ago haha thats crazy, i'll restart my computer and try out a newer sdk and hope it works

Shocked it even still installs tbh haha, hope it works!

I'd also bear in mind that since early 2023, the SDK has been pretty much completely axed by Discord. I can't really guarantee any support for the SDK at all now, let alone for this module...


Missing macro expansion

Many ModSecurity operators do not do macro expansion. This means, variables such as %{TX.test} will not be expanded. Ideally all operators would support this (where it makes sense). But right now, there is especially a need for macro expansion on the @contains operator.
https://github.com/SpiderLabs/owasp-modsecurity-crs/issues/699 demands this AFAICS.

Thoughts on making such expansion configurable on a per-operator basis? The string manipulation required for expansions can get expensive, and when it's not necessary, I'd imagine the cost of doing such a lookup on for every single operator invocation would be nontrivial.

@p0pr0ck5 in v3 the macro expansion is sorted in the parser. The resolution happens in real time as a give nrule may change the value of a variable. There is no plan to perform any optimization in v2.

Agree on skipping optimizations in v2. @contains is rarely used though; I think we could live with the performance overhead.

Hey @dune73 I was looking at this issue and the docs and I'm wondering if I'm not entirely understanding what's missing. I've used the following rules to test:
SecRule ARGS "@unconditionalMatch" "phase:1,log,pass,setvar:TX.test=EXPANDMYMACRO,id:1,logdata:'TX.test:%{TX.test}'"
SecRule ARGS "@contains %{TX.test}" "phase:1,id:2,log,deny,logdata:'Matched Data: %{MATCHED_VAR_NAME}: %{MATCHED_VAR}. TX.test:%{TX.test}'"

For libModSecurity It looks like macro expansion for @contains is performed here: https://github.com/SpiderLabs/ModSecurity/blob/v3/master/src/operators/contains.cc#L27
And this is what I get in the logs when using the rules above:
---Q1k0Uoq7---H--
ModSecurity: Warning. Matched "Operator `UnconditionalMatch' with parameter `' against variable `ARGS:a' (Value: `EXPANDMYMACRO' ) [file "/usr/local/nginx/conf/modsecurity.conf"] [line "211"] [id "1"] [rev ""] [msg ""] [data "TX.test:EXPANDMYMACRO"] [severity "0"] [ver ""] [maturity "0"] [accuracy "0"] [ref "v13,15"]
ModSecurity: Warning. Matched "Operator `Contains' with parameter `%{TX.test}' against variable `ARGS:a' (Value: `EXPANDMYMACRO' ) [file "/usr/local/nginx/conf/modsecurity.conf"] [line "341"] [id "2"] [rev ""] [msg ""] [data "Matched Data: ARGS:a: EXPANDMYMACRO. TX.test:EXPANDMYMACRO"] [severity "0"] [ver ""] [maturity "0"] [accuracy "0"] [ref "o0,15v13,15"]

For 2.9.x it looks like the macro expansion is performed here: https://github.com/SpiderLabs/ModSecurity/blob/v2/master/apache2/re_operators.c#L2069
And this is what I get in the logs when using the rules above:
Message: Warning. Unconditional match in SecAction. [file "/etc/modsecurity/modsecurity.conf"] [line "426"] [id "1"] [data "TX.test:EXPANDMYMACRO"]
Message: Access denied with code 403 (phase 1). String match "EXPANDMYMACRO" at ARGS:a. [file "/etc/modsecurity/modsecurity.conf"] [line "427"] [id "2"] [data "Matched Data: ARGS:a: EXPANDMYMACRO. TX.test:EXPANDMYMACRO"]

Can you check on your side or tell me if I'm missing something?

Confirm. There is macro expansion on contains.
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][5] Rule 55ad95838b08: SecRule "ARGS:b" "@contains %{TX.a}" "phase:2,id:1008,pass,log,msg:'XXX6: %{MATCHED_VAR}'"
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][4] Transformation completed in 0 usec.
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][4] Executing operator "contains" with param "%{TX.a}" against ARGS:b.
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][9] Target value: "12345 abcdef 123"
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][9] Resolved macro %{TX.a} to: abcdef
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][4] Operator completed in 4 usec.
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][9] Resolved macro %{MATCHED_VAR} to: 12345 abcdef 123
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][2] Warning. String match "abcdef" at ARGS:b. [file "/apache/conf/httpd.conf_pod_2017-06-03_05:33"] [line "137"] [id "1008"] [msg "XXX6: 12345 abcdef 123"]
[03/Jun/2017:05:37:19 +0200] [localhost/sid#55ad9582e1f0][rid#7f4fbc04ac30][/][4] Rule returned 1.

Sorry for the bogus report. I thought I had checked this, but it was a month ago or so and I must have made a mistake.

I think I got the reason. I used to do macro expansion on ARGS:a when it should be ARGS.a.

We should add a supports macro expansion to the documentation.

No worries @dune73, thanks for checking. Looks like all of us thought this was a missing feature until digging it deeper. We're glad it's one less thing to worry about for the next release :)
Good idea @csanders-git. I'll add some that I double checked yesterday to the docs, please add the ones you know too.