Add editorconf file to the project

The problem
Contributes should have ability to avoid code style issues in his changes before commit.
@rosolko proposes his own editorconf in https://github.com/codeborne/selenide/pull/656#issuecomment-354273921 to help IDE applies code formatting automatically.
Need to think how to add it with the smallest changes in project.

editorconfig added
so the next step will be code formatting/refactoring related to config

I guess Andre's idea was to not apply configuration to project and reformat
it in one commit but step by step accept changes with contributors PR.
On Sat, 24 Mar 2018, 11:06 Aliaksandr Rasolka<EMAIL_ADDRESS>wrote:

editorconfig added
so the next step will be code formatting/refactoring related to config
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/codeborne/selenide/issues/658#issuecomment-375854936,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGNmZKK47wOpBY4UaNm8HR1aVAd4P9MLks5thf5pgaJpZM4ROQGz
.

@BorisOsipov yes, I just summarize next step, but yes, it will be in scope of PR, new functional and refactoring.


Always disable containerd metrics when started by docker

Signed-off-by: Kenfe-Mickael Laventure<EMAIL_ADDRESS>
Since no-one will see them.

LGTM

LGTM

LGTM


Update max_age_num_blocks to reflect Osmosis bonding period

Osmosis has 14 days bonding period and so genesis should only force 14 days of data when validators/nodes enable pruning. When pruning is enabled, minimum height to retain is calculated based on multiple configurations but can never go above max_age_num_blocks defined in genesis.
In Osmosis genesis forces 30 days of blocks, as max_age_num_blocks is set to 403200. While max_age_duration is set to 14 days<PHONE_NUMBER>000000 nanoseconds). Due to configuration (max_age_num_blocks), our state.db and blockstore.db holds 30 days of data even when we are pruning.
Configuration should be updated to 186092.
@ValarDragon Can you please take care of this in next release?

I believe max_age_num_blocks is related to evidence and indeed it should generally line up with the unbonding period. However, this is an on-chain parameter so to change it, it'd have to go through governance, either by a param change proposal or via the next chain upgrade.

@alexanderbez Thanks for the response. Yes, max_age_num_blocks are part of evidence and we don't want people updating them without param change proposal.
As our bonding period is 14 days we should be able to change it via param change or as you said in next chain upgrade.
As TM will never prune anything within max_age_num_blocks we are carrying 16 days of extra data today (in pruned nodes).

Yup, makes sense. Idk when we plan on the next v8 upgrade (cc @ValarDragon), but if it's pretty far out, I say we just submit a ParamChangeProposal.

Thanks for finding this!
I'm supportive of doing this change, and doing it as one component in the v8 release. Its targetted to ideally get proposed on chain April 8th ish.


Text transform bug

Seems like in some cases the input is translated to base64 and in some it isn't.
Specifically: textual input is transformed to base64 when json output is used, not with plaintext.
Benthos version: v3.60.1
Visual example:

Reference:
Input: testTEST
---
root.a = content().string().uppercase()
Output:
{
  "a": "TESTTEST"
}
---
root.a = content().uppercase()
Output:
{
  "a": "VEVTVFRFU1Q="
}
---
root = content().uppercase()
Output:
TESTTEST

It's documented behaviour

Returns the full raw contents of the mapping target message as a byte array. When mapping to a JSON field the value should be encoded using the method encode, or cast to a string directly using the method string, otherwise it will be base64 encoded by default.

https://www.benthos.dev/docs/guides/bloblang/functions#content

Yeah this is unfortunate but expected behaviour, the return from content is arbitrary data so there's no guarantee that it can be safely represented as a raw JSON string.
When you assign it to the root you're fine because Benthos supports binary messages, and then when it's written to stdout or anywhere else you see the raw data. However, when you set a structured field to binary data it eventually gets JSON formatted, which encodes the field value as a base64 string.

Thank you both for the time.
I thought I spotted a bug, now I see what this is about.


How to do predictions?

Hi!
I've managed to run ptranking on the "MQ2008_List" dataset, and in the output folder (defined in EvalSetting), I have a "net_params_epoch_4.pkl" file, in each of the Fold folders.
However, I can't understand how to predict new data (that shouldn't be used for training), can someone help me?
Thank you very much in advance!
Pedro

@supercar1 hi, it is hard to understand your question. Currently, for letter datasets, this project supports 5-fold cross validation, training the model based on training data, and select parameters based on validation data, and report performance based on test data. Please double check it.


Update readme to reflect new changes

All the new changes in the demo2 should be reflected in the Readme section.
Acceptance

[ ] Document the training pipeline notebooks
[ ] Document how to setup a new experiment
[ ] Document how to setup the config files
[ ] Fix existing readme issues #160 #159

By my own observations, the notebook uses around 27GB of RAM to run, so a minimal notebook seems to be 1 GPU and 32GB RAM.

Also add contributors guide for creating PRs on this repo: https://github.com/os-climate/aicoe-osc-demo/pull/166#pullrequestreview-1020345192


Consider adding OrderBy, OrderByDescending, ThenBy, ThenByDescending

I realize the idea of "sorting" is tricky to interpret in the reactive world. However, I would argue that the same holds true for enumerable sequences. Enumerable.OrderBy also needs to buffer the whole sequence before emitting the first value rather than emit values as they are produced, so I don't see why Observable.OrderBy could not do exactly the same. Is there something I'm missing?
As long as you know what to expect, it would help a lot for consistency between both LINQ frameworks and avoid having to convert observables to enumerables back-and-forth for a simple ordering; not to mention having to buffer the entire sequence twice (once to go from observable to enumerable; and another time to run OrderBy).

And what is wrong with Observable.ToEnumerable().OrderBy?
I would argue that adding OrderBy to Observable directly would be completely pointless, because it gives the fake idea that there is anything reactive about it, while it is not. At least with ToEnumerable you are explicit about that.

And what is wrong with Observable.ToEnumerable().OrderBy?

A couple of things actually.
First, it breaks down the ability to write fluent LINQ-style query expressions over observable sequences. OrderBy is a first class citizen fully supported in the query language syntax. Given that one of the tenets of Rx was originally to provide equivalent operators to IEnumerable, it should strike anyone as weird when the compiler complains about orderby field descending. This becomes even worse if you want to stay within the IObservable monad as you then have to do Observable.ToEnumerable().OrderBy.ToObservable().
Second, converting from IObservable to IEnumerable involves buffering all elements in the observable sequence before sending them out. This is required because element production can be asynchronous to element consumption. This is true even if the observable is cold. OrderBy also requires buffering all elements in the sequence before sorting them and this will be done irrespective of the first conversion. If we could stay inside the Rx contract, we could dispense with the first buffer entirely.

I would argue that adding OrderBy to Observable directly would be completely pointless, because it gives the fake idea that there is anything reactive about it, while it is not.

I completely disagree.
First, OrderBy (sorting) is commonly understood to be an operator that requires knowledge about the whole sequence, the same as Max, Min, Aggregate, All or Any. It simply returns a sequence, rather than a single element. No one should be confused about the fact that elements can only be sent out after the original sequence has terminated.
Second, even if I grant the possibility of confusion, I would argue that the exact same criticism applies even in the Enumerable world. Even though Enumerable follows a pull-model, it is still essentially a streaming interface where you naively would expect the source sequence to move one element at a time as you iterate. By your reasoning, it should be equally surprising that you call MoveNext on an OrderBy and the whole source is unrolled. Should be especially fun if the sequence is infinite... again, this shows the idiosyncrasy belongs to the OrderBy operator, and not to any distinctions between pull and push.
Third, the result of the OrderBy would still most definitely be reactive w.r.t. the consumer of the sequence. The consumer doesn't know when OnCompleted will be called in the original sequence. He will get his ordered sequence when that event happens and that is completely asynchronous in the sense that he doesn't need to block waiting for it.

Do you have a real-world use case where you want to sort an event stream?

Yes, they show up all the time especially whenever you are slicing event streams into windows.
For example, in non-periodic time series analysis: for every 1-minute window of data, take the 5 largest points (if any).
Can be solved with Buffer and Enumerable.OrderBy, but apart from the fact I have to unnecessarily buffer the whole sequence for every single window (see above), I often want to keep inside the IObservable monad for compositionality reasons (i.e. I don't want to end up with an IEnumerable).
But I really just pulled that example up randomly, the real answer is: all the cases in which you would normally want to order a data sequence, whenever that sequence is generated asynchronously.
I thought the point was simple: sorting is a key operation in any data language. It's usually expensive and non-trivial to implement flexibly, so whenever you can find language-integrated extensions that support it, you feel happy.
But hey, we can always disagree; for some reason someone thought MaxBy and MinBy were important and they're now in the framework, so I thought I would make the case that OrderBy is at least equally deserving.
Feel free to go ahead and close this issue. I'll probably have to implement it for my own framework anyway based on Jon Skeet's amazing Edulinq blog. When that happens I will try and offer up a pull-request for this issue, if it's still up.

I don't want to make this a jab at your example, since I think it's very interesting - but I do want to point out you actually don't need to cache all events in the whole window - you only need to cache at most 5 values in total - which you do need to keep sorted of course - whereas OrderBy would always cache the whole window.
I did an ordering implementation here which has an interesting discussion within the Q&A as well.
I do think the point you make about OrderBy being equally evil in the IEnumerable world is thought-provoking - however, I suspect in practice in the IEnumerable world you are far more likely to find these usages optimised at the source (e.g. through IQueryable ala EF etc).
An OrderBy over an entire stream is much less likely to be something you would want to consume reactively I think - much more likely to turn up over short intervals such as the example you cite. In such cases, I am personally happy to treat these as Enumerables as I think the behaviour is more intention-revealing that way and moving between these monads is quite simple.
On the topic of using LINQ comprehensions - I've never liked those for Rx since every application I've ever written using Rx would only be able to express a small fraction of it's queries in that style I never used it since IMHO it's less readable to switch between the styles.
I can't articulate the theory as well as I am sure smarter people like Erik might be able to, but a few years of working with Rx has yet to provide any compelling real world cases for reactive OrderBy for me personally. I have seen (such as in the earlier cited SO question) far more cases where OrderBy is sought for the wrong reasons. I think excluding it probably helps more people fall into the pit of success than it hinders those with genuine use cases.

Thanks for the structured feedback. I agree with basically everything you said and would keep only a couple of extra points.

You're correct that it's possible to hand-engineer an N-element sorted cache for an observable sequence that keeps the last N largest (or smallest) elements sorted. It would be great if this kind of buffer operator was included in the framework (LargestBy/SmallestBy with a capacity overload?)

Interestingly, such a cache sounds very useful also for the Enumerable world, where many times I've seen people sort huge lists just to get the 3 largest elements. So while I agree with you, again I fail to see the distinction between pull and push; I've seen much suffering with OrderBy on both sides, would be nice to have more solutions, not less...

The transition from Observable to Enumerable may be simple from a syntactic perspective, but is definitely not so cheap. The fact that it is not known when the consumer will ask for the data forces us to have a synchronized queue in the middle which can become annoying if you start needing to transition between the two worlds a lot. This has definitely started happening for me and most of the issues could be mitigated if there was simply a full implementation of all of LINQ on the Rx side (another example is Reverse).

I have to admit I am a bit bemused that I was unable to convince you of the importance of having a more complete implementation, especially because for me this all started because I wanted to use Rx more, not less...
Maybe I will reconsider moving everything back to Enumerable, which will mean effectively splitting my growing code base of useful combinators into both worlds, which will be a pain to maintain. I had become convinced you could do pretty much everything with IObservable (and much faster by the way for truly streaming scenarios) and that has definitely turned out true except for these kinds of gaps...

LargestBy is easy enough to make:

    public static IObservable<TSource> LargestBy<TSource>(this IObservable<TSource> source, Func<TSource, int> keySelector, int size) {
        return source.Aggregate(new SortedList<int, TSource>(), (list, el) => {
            list.Add(keySelector(el), el);
            if (list.Count > size) {
                list.RemoveAt(0);
            }
            return list;
        })
        .Select(list => list.Values.ToObservable())
        .Merge();
    }

You might even want to replace ToObservable() with GetEnumerator(), or just return the List.
And this does make sense, other than OrderBy, this is just a variant of Aggregate. Notice this has a constant space requirement other than a naive .OrderBy().Take(size) implementation that grows with window size.
(This is probably still not very optimal, you could avoid adding elements when they are smaller then everything in the list, and who know, maybe removing from the end of the list is faster. And it reordered the elements).
And you can write exactly the same extension method for IEnumerable.

Nothing wrong with switching back to Enumerables when it suits, as soon as you have to pass on a complete list of values, you might as well do so with IEnumerable. While you should avoid gathering all values in a Observable, there is no reason to avoid Enumrables once you've done so.

It is unclear to me what kind of magic you expect from a native Reverse that it wont have to wait for OnComplete() and buffer all values until then.

I like the LargestBy idea, it would be a nice compromise. Probably you don't want to use SortedList though, because of its lack of support for duplicate entries. It feels like this combinator should be able to handle different values with the same key, similar to MaxBy. I'm not sure if there is a sorted collection built into .NET that would easily allow for this other than just doing Array.Sort all the time...

Reverse was just another example of a situation where you have to pay double the cost in space and time if you go from Observable to Enumerable rather than doing it directly in the reactive world. I don't expect any kind of magic, I just don't want to pay the cost of going from Observable to Enumerable in situations where I could clearly avoid it.

Anyway, I get the point that you guys are not convinced, it's fine. I've gone through all my arguments (consistency, performance, utility), and if they are not enough, I don't want to force it. As I said, for my own peace of mind I'll try and push for an implementation anyway, it's a good learning exercise and will help me to familiarize with the Rx code base. I'll follow all of the design guidelines of current framework operators and submit a pull request later along with unit tests. Then you can decide whether to reject it or not with some code in hand.
Should I consider opening a feature request issue for LargestBy/SmallestBy? Sounds like it would be an extremely useful set of operators to have and it doesn't look like a trivial thing to get right with the current building blocks.

Woops you are right, I'm not overly familiar with SortedList. I've fixed that.
And i want to say, you give good feedback, and by no means I'm here to accept/reject any ideas, just sharing my thoughts. I would certainly like a feature request issue for LargestBy/SmallestBy.

Interestingly, the OrderBy operator could be implement in a way that OrderBy(...).Take(5) would have a O(n) time complexity:

The opertor buffers all incoming elements (O(n))
The operator builds a binary heap (O(n))
The operator extract the minimum element and forward it to the observer (O(log n))

Step 3 is repeat as long as there are elements and the operator is not disposed.
It'd probably be fun to implement it and I kinda like the idea that you already observe the elements while it's sorting. On the other hand I'm not sure if the operator is useful enough to be added to the mainline Rx.NET.

If you have to repeat the removal operation n times, wouldn't that make the sorting operation O(n log(n))? That wouldn't be necessarily bad, mind you, since most in-memory sorting algorithms are O(n log(n)) anyway.
More fundamentally regarding this issue, I never understood why everyone seems to think that implementing OrderBy is not useful for Rx. The main argument seems to be that there is no way to implement sorting on a data stream. However, doesn't this reasoning apply exactly the same to IEnumerable? You can have infinite enumerable sequences, sorting blows up there exactly the same way. You can have sorted IQueryable sequences optimized at the source, and exactly the same could happen in the reactive world using IQbservable.
For example, I could legitimately submit a query to an online database and expect an IObservable instead of an IEnumerable. The sorting would be done at the source, and the reactive component here is simply that the database will stream the elements to me as soon as they are ready, such that I don't have to rely on polling an enumerable sequence.
Finally, for small subsets of reactive streams (e.g. windows), reactive sorting absolutely makes sense. If you are slicing the original stream reactively, then the sorted output of each sliced stream is emitted reactively, am I missing something?
OrderBy is built into LINQ for a reason, and it makes exactly the same sense in the reactive world as it does in the enumerable world.
In the end, my conclusion has been that there must be some kind of confusion in the way I have been explaining myself. I've been so many times through this argument and I cannot understand what I could be fundamentally missing that makes people think these two cases have nothing to do with each other.

Of course it'd become O(n log n ) if you consume all elements, that's the theoretical lower bound of general sorting. But if you only take 5 elements it'd be O(n).
I haven't said that I'm against that operator, just that I'm unsure if it is useful enough. I think there are some plausible arguments to include it, the parity to IEnumerable and IQueryable, to name one. I wonder why the initial Rx team didn't include it, although they stress in every talk, that I have seen so far, the parity between IObservable and IEnumerable.
Maybe we can collect a pros/cons list.
Pros:

Parity to IEnumerable
More support for LINQ, i.e. orderby, thenby, etc.
it's obvious what it does (it's not of the type OnXxxWithYyyLatestMapBy)
it can be very useful for IQbservable

Cons:

not needed very often
there are work arounds: .ToEnumerable().OrderBy().ToObservable()

Seeing that list I tend to support an addition. Sure it isn't needed very often, esspecially in pure event processing, on the other hand it does not feel to bloat the API since everybody knows what OrderBy does.

@quinmars i think listing the pros/cons more succinctly definitely helps, thanks.
Just one comment regarding your last con: .ToEnumerable().OrderBy().ToObservable() is not really a workaround, since as I mentioned you will be buffering the data twice.
ToEnumerable buffers all the elements of the observable sequence and then OrderBy buffers all the elements again for ordering. By adding a reactive OrderBy you actually remove one of the intermediate buffers entirely.

@glopesdev I wouldn't care much about that supposed extra buffering. The OrderBy buffers also all results of the selector. The fastest you can get is probably .ToList().SelectMany(l => { l.Sort(); return l;})
Anyway I implemented just for fun all for operators:
https://github.com/quinmars/reactive-extensions/commit/9ca5358217958c0bf5efc5bb3bc96601c2894ed6
I haven't done any benchmarking so far, but I guess it's slower than the Enumerable implementation if you sort the full sequence.

This sounds like an uncommon operator for Rx.NET proper and perhaps could live in a 3rd party library. Otherwise closing due to inactivity.

I disagree that this is an uncommon operator, but all clarifications, with examples, were presented above.
I understand most people in this discussion are not used to dealing with event-triggered time series analysis where it shows up all the time. However, that's why you just have to rely on the mathematics, which clearly shows this is an equivalence gap in Rx.NET and until its closed, its simply not possible to claim parity between IObservable and IEnumerable.
By closing this issue, we are sweeping it under the rug and it keeps people from thinking about it.

Just discover this discussion and stand on the support side as there is also GroupBy (which waits for the completion) and GroupByUntil  (which waits for another observable) now. So why don't we add OrderBy and OrderByUntil as well?

I just released version 0.2.0 of MoreRx which contains the OrderBy, LargestBy, and SmallestBy. All three operators return an IOrderedObservable and can be combined with the ThenBy operator.


dynamic_slice_in_dim in fori_loop

I'm having problems implementing the following fori_loop body.
def body_fun(i, val):
    batch_sizes, packed_input_data, input_offset = val

    batch_size = packed_input.batch_sizes[i]

    #batch = packed_input_data[input_offset:input_offset+batch_size]
    batch = dynamic_slice_in_dim(packed_input_data, input_offset, batch_size)
    input_offset += batch_size

    return batch_sizes, packed_input_data, input_offset

I'm trying to replace the commented out code with jax primitives - i.e. slicing packed_input_data (n x m) based on the input_offset[i] (int). The issue I'm running into is dynamic_slice_in_dim throws:

TypeError: Abstract value passed to int, which requires a concrete value. Try using value.astype(int) instead.

What seems to be happening is dynamic_slice_in_dim attempts to cast input_offset and/or batch_size as int() which throws since they're traced and don't support this cast? i.e. If I use literal ints for the start_index, slice_size it works. Also if I call body_fun(i, val) from a pure python for loop it also works no problems.
How should I approach this problem? I can paste full code if required, my full implementation also includes packed_output_data (same shape as packed_input_data) which I'm trying to update using dynamic_update_slice plus a state array which also slice by batch_size.
(I'm trying to implement variable length sequence RNN's using PyTorch as inspiration.)

I've read through https://github.com/google/jax/issues/2308 which seems similar but I'm still cannot get this to work.
No matter what primitive I use to translate the 2nd slice operation below it fails with an exception that seems to imply batch_size must be a concrete value but an abstract value was supplied.
input_offset = 0
for i in range(batch_sizes.shape[0]):
    batch_size = batch_sizes[i]
    batch = packed_input[input_offset:input_offset+batch_size,:]  # issue here
    input_offset = input_offset + batch_size

I've created a simple reproduction, can someone confirm if I'm trying to do something that's not supported by jax?
An error is raised from line #37 of abtract_arrays.py, it seems that using batch_size = batch_sizes[i]cannot be used as an array slice - can you confirm that?
import jax
from jax import ops
import jax.numpy as np
from jax.lax.lax import dynamic_slice

@jax.jit
def unpack(i, input_offset, batch_sizes, packed_input_data):
    batch_size = batch_sizes[i]
    batch = dynamic_slice(
        packed_input_data,
        np.array([input_offset, 0]),
        np.array([batch_size, packed_input_data.shape[1]]))

    return batch

# equivalent to packing padded sequences [11,12,13],[21,22,-1],[31,-1,-1]
packed_input_data = np.array([
    [11],
    [21],
    [31],

    [12],
    [22],

    [13]
], dtype=np.float32)
batch_sizes = np.array([3, 2, 1], dtype=np.int32)
unpack(0, 0, batch_sizes, packed_input_data)

I found this in the documentation "the size of slices can’t be functions of argument values but only functions of argument shapes – the slice start indices have no such restriction."
So it looks like what I'm trying to do isn't supported. I'll have to try and think of another way

A general rmark without understanding the overall purpose of your code:
If the output shape of your function depends on a value of an input argument (instead of just the input shapes), you must declare that argument as static via static_argnums:
@jax.partial(jax.jit, static_argnums=(0, 1, 2))  # shape depends on i, input_offset, batch_sizes
def unpack(i, input_offset, batch_sizes, packed_input_data):
    # [...]

unpack will be recompiled for every different value (combination) in those three input arguments, as opposed to different input shapes with normal jit.

Thanks @clemisch, that helps - I had tried static_argnums but I suspect I didn't understand that they need to be applied to all parameters which affect the output shape.
So in this case does that means it'll jit a different version of unpack for every (i, input_offset, batch_sizes)?

So in this case does that means it'll jit a different version of unpack for every (i, input_offset, batch_sizes)?

Yes, that is true.

Did this answer your question?

Yes thanks!


better error handling

fixes #12
Adds a custom exception for each error response described at
https://app.speechmatics.com/api-details#errorCodes
If an error response does not match a known error, it's raised as a
Speechmatics::Response::Error::Unknown
All custom exceptions, including Unknown, derive from the
Speechmatics::Response::Error class

bump?

@mziwisky thanks for this PR - looks great.


Update Mailer.php

add some php documentation

We don't add phpdocs when it does not add more information than what is already in the signature.


feat(connection): have a way to know what is the state of the connection

Linked to the issue #42, we should have a method to know if the system is connected or not.

@baczus I think, maybe, changing the reference of the promise during the connection error fallback could help you, you'll always a promise initialized, but the resolve / reject happen only after the next ngStomp.connect() method.
In this way, I just have to move the init of the promise, and if I forget nothing, you can check the state of the connection by accessing the promise itself. I'll expose the promise around a getter to have something more simple (in term of api), but I think this could be a good idea.
Do you see something wrong with this idea ? Don't hesitate 😄

How can I determine state of the connection based on promise?

By using the then function ? Like this :
ngStomp.getConnectionState()
    .then(callbackCalledIfConnected)
    .catch(callbackCalledIfNotConnected)

This way, instead of using a boolean, which reflect the $$state of the angular $q promise, we can use the promise itself.

That sounds reasonable. I can't wait to test this change :smile:

@baczus : Could you try to see if this modification feet your need.
I've updated the master but not yet released it, I'm waiting to see if it's all ok for you. To try this version, you just have to get the version available in the /dist/ folder.

All looks good,but I have two questions.

What about function which returns connection state (promise)?
Does function initConnectionState should not be set as private (with $ at the beginning)?

What about function which returns connection state (promise)?

The promise is accessible with ngStomp.connectionState. It's not a function, just a reference to the promise itsefl.

Does function initConnectionState should not be set as private (with $ at the beginning)?

The problem with this, and what I don't like in this solution, is if someone want to init a connection by itseft (for example, after an intentional disconnection), he should call initiConnectionState and `connectù after it... And, I don't think this is a good solution after all, but I don't find a better way to do that right now. Because of that, the two method should have the same visibility, both private or public. Right now, I've choose public, but I'm thinking about a better way to do that...
If you have idea about it, let me know :smile:

I don't think it's a good idea to force user to invoke two methods in situation when he wants to set new connection. Maybe a better solution is creating one public method connect, which internally will invoke private methods $initConnectionState and $connect?

I've published the 0.9.3, with this improvement, but I still think there is a better solution for this...
One promise is used for the connection, resolved in the success callback and reject in the error callback. But, both can be called by the lib, so I  begin to think it should be handle by two different promise.
And, to get the connectionState, something like the Promise.race or $q.all on both promise to have the general state of the connection...


Rework state management

See #322, also improved selectrum-repeat so it can be used for repeating recursive sessions, too.

Thank you for working on this! There are still a few defvar which are non-local. Maybe there is a reason, but I am sure more could be made local, e.g. selectrum-active-p. Just to make sure, it makes sense to go over each of the variables and check if it should be global and if yes document it. It is a bit of work but I hope that this resolves #322 once and for all :)

(defvar selectrum-should-sort-p t
(defvar selectrum--minibuffer-default-in-prompt-regexps
(defvar selectrum-minibuffer-map
(defvar selectrum--candidates-overlay nil
(defvar selectrum--dynamic-candidates nil
(defvar selectrum--crm-p nil
(defvar selectrum-active-p nil
(defvar selectrum--total-num-candidates nil
(defvar selectrum--candidates-buffer " *selectrum*"
(defvar display-line-numbers) ; Undefined in Emacs 25.
(defvar selectrum--crm-separator-alist
(defvar selectrum--old-completing-read-function nil
(defvar selectrum--old-completion-in-region-function nil
(defvar selectrum--old-read-buffer-function nil
(defvar selectrum--old-read-file-name-function nil

For now I have only converted those handled by the state macro, which is gone now. Some of those you listed are set locally but not declared locally which can be changed of course. I will have to look into those next time.

Yes, it is great that the state macro is gone! My personal style is to only use setq and defvar-local, but it is also perfectly valid what you do with the very explicit usage of setq-local everywhere. However one thing I would not do is to define a variable as defvar and then only set it via setq-local. This happens for selectrum-active-p afaik. But I guess you agree with that. I just took a superficial look at your PR! Thanks again!

Personally I don't like the implicit behaviour of setq and prefer to use setq-local to clearly indicate that something is set locally. I agree that it is better to use defvar-local for those variables which are meant to be set locally from the outset. Thank you for pushing for this, it will also make some things easier I plan to do with completions outside the minibuffer.

Personally I don't like the implicit behaviour of setq and prefer to use setq-local to clearly indicate that something is set locally.

I do not necessarily disagree with your statement. However given how variables are actually implemented, setq-local is the one doing the magic. setq is just accessing the dynamic context as defined by Emacs and by definition it can have these local variables. The same applies when reading variables. So by using my style I just accept how things are implemented and reflect that in the code :smile:


Model import fails with database integrity issues in web app

Expected behaviour

Model should import successfully, and clicking on toolbar buttons should show the correct objects for the new model

Actual behaviour

This error is shown in the cairisd logs
Database conflict: Cannot remove vulnerability_type due to dependent data (id:1451,message:Cannot delete or update a parent row: a foreign key constraint fails (`arm`.`vulnerability`, CONSTRAINT `vulnerability_ibfk_1` FOREIGN KEY (`vulnerability_type_id`) REFERENCES `vulnerability_type` (`id`)))
The CAIRIS database is left in an inconsistent state

Steps to reproduce the behaviour

Click on File/Import menu option
Select Menu from the combo box
Select a different XML model file to that currently open

Version of CAIRIS
1.2.1
Operating Systems / Hardware
Debian 8

Issue partially related to the [superfluous] UserConfig dialog having the wrong database settings.  The dialog is about to be removed with a proper AuthN control, so this won't be a problem very soon.


[hotfix/ZF-11830] Zend\View\Helper\Translate

allow loose arguments
fixed name of unittest class

Reviewed, merged, and pushed to master.


Update dependencies

Codecov Report

Merging #26 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #26   +/-   ##
=======================================
  Coverage   90.14%   90.14%
=======================================
  Files          12       12
  Lines         142      142
  Branches       14       14
=======================================
  Hits          128      128
  Misses         12       12
  Partials        2        2

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 7cd2a7b...b0567cf. Read the comment docs.


Add NHL Extension

Description
NHL for Raycast
Access real-time NHL scores, standings, and comprehensive player statistics directly from Raycast.
Adds the NHL extension which adds the following commands:

Command
Description

Search NHL Players
Find and explore stats for both current and former NHL players

NHL Standings
View up-to-date league standings by conference and division

NHL Scores
Track live scores, upcoming games, and recent results

Screencast
https://github.com/user-attachments/assets/6d5be327-6dc6-4990-8895-a8bf145879ca
Sorry for the long video; got carried away 😅. This extension doesn't require an API key, so it should be easy to test.
If you have any questions or anything please let me know!
Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast

[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

@pernielsentikaer got ya. I knew localization wasn't supported but wanted to take a stab at it.
Can I leave the translations file in and hardcode the existing strings in English? Trying to find the path of least resistance to getting this approved 😅
It's a holiday in the states today so I won't be able to get to it till tomorrow but I appreciate you and the rest of the raycast team! 🙏🦃

Sture, keep it in the code, but we can't change it at the moment 🙂

@pernielsentikaer I went ahead and removed the language preference and set the default language to default so it will only ever pull in the English values.
If you'd like for me to go back and hardcode everything instead of pulling from the src/utils/translations.ts file, I can do that, but that's obviously a bigger change that will take me some time.
Thanks again!

One of the commands is now crashing, could you fix that?

@pernielsentikaer ack sorry about that. I was pulling the language in one other spot that wasn't using that helper function. The latest commit resolves that issue. I've gone through and tested all the views and it looks good now.

Much better, do you have an idea why there is initial flicker first time you open the scores command?
https://github.com/user-attachments/assets/00931137-067d-4030-ab66-c69943436f3e

I do not... but I will look into it more in the morning for me. So you mean the initial Error view your see the first time trying to call the command?

👆 This 🙂

@pernielsentikaer ah I think this was an unintentional consequence of your "Update nhlScores.tsx" commit. When if (scoreboard.isLoading) return <List isLoading={true} />; was removed it jumps to the next line if (!scoreboard?.data) return <Unresponsive />; which is why the error flashed while the data was still being fetched.
I have remedied this by updating my if statement to include isLoading to fix it:
if (!scoreboard?.data && scoreboard.isLoading === false) return <Unresponsive />;

I believe it should be ready to go now!

I don't get that error anymore, but I'm stuck here now (tested with a clean installation)

Ooooups!

@pernielsentikaer thanks for sharing. i didn't know about the clean install (clear local storage and cache) thing so I will make sure to add that to my testing workflow moving forward.
I updated the helper function to return an empty response if the nhlScores request is still loading. I also added a small bugfix for an edge case for properly returning the  Swedish "🇸🇪" flag.
I tested all commands on a fresh install and all seems to be working now. Thanks for your help with this.

Let's release the first version live 🔥


XRay OnPrem - Test run final result is not evaluated properly

Reproduce
1 test, 2 iterations, iteration 1 pass, iteration 2 fail
Expected
test fail
Actual
test pass

Not reproduceable


Got Image hash failed error during OTA (IDFGH-10912)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v4.4.2
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
core-esp32-c3
Power Supply used.
USB
What is the expected behavior?
Pass the OTA progress
What is the actual behavior?
Image file downloaded ok with right size, but always get:
esp_image: Image hash failed - image is corrupt
Steps to reproduce.

build from a copy of hello-world example
get a whole image by running "esptool.py --chip esp32c3 merge_bin -o hello_all.bin @flash_args" in build folder
put the image on a https server
make a copy of native_ota_example
set wifi, https server address, skip server certification verification in menuconfig
build, flash and monitor the native_ota_example image.
got Image hash failed error.

Debug Logs.
I (8124) native_ota_example: esp_ota_begin succeeded
I (29884) native_ota_example: Connection closed
I (29884) native_ota_example: Total Write binary data length: 216960
I (29884) esp_image: segment 0: paddr=00110020 vaddr=3fcd6100 size=016bch (  5820)
I (29894) esp_image: segment 1: paddr=001116e4 vaddr=403ce000 size=00930h (  2352)
I (29904) esp_image: segment 2: paddr=0011201c vaddr=403d0000 size=02d28h ( 11560)
E (29914) esp_image: Image hash failed - image is corrupt
E (29914) native_ota_example: Image validation failed, image is corrupted
E (29924) native_ota_example: Exiting task due to fatal error...

More Information.
Did not try the latest version of esp-idf since I need version 4.4.2 to run my code, it would take long time to change them..

@zzzh

get a whole image by running "esptool.py --chip esp32c3 merge_bin -o hello_all.bin @flash_args" in build folder
put the image on a https server

Not sure why you are merging all artifacts together but you are supposed to host only the application binary on the OTA update server, for this case it would be native_ota.bin. Please try it once and it should fix the problem. You may read more in this technical post.

@mahavirj
You are right, sorry, my mistake.
Thanks for the help.


Serialize yaml data

There was an issue with serializing ListWrapper([1, 2]) as yaml parameters because using tf.keras.layers.Layer that converts it.

Serialize all data into params.yaml and zntrack.json

check if znjson serializer takes affect by trying _type
if this is true -> kwargs into params.yaml, the rest into zntrack.json
if falls, all into params.yaml

For loading do the opposite, check zntrack.json first, combine them and use json.loads or just use the params.yaml otherwise


Create a new AWS AMI with QAP 1.0.8 upon release

Best to wait until the regression test is done- then we can create the AMI, and test the AMI itself as the final thing to test out.

Waiting for some of the important changes in 1.0.9 for this one.


Behat version 3.1.0

When would it be ready for Behat version 3.1.0?
Problem 1
- Installation request for allure-framework/allure-behat 1.0.0 -> satisfiable by allure-framework/allure-behat[1.0.0].
- allure-framework/allure-behat 1.0.0 requires behat/behat ~2.4 -> satisfiable by behat/behat[2.5.x-dev, v2.4.0, v2.4.0beta1, v2.4.0beta2, v2.4.0beta3, v2.4.0beta4, v2.4.0beta5, v2.4.1, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.5.0, v2.5.1, v2.5.2, v2.5.3, v2.5.4, v2.5.5] but these conflict with your requirements or minimum-stability.

It probably won't. We don't use behat 3 yet, so we don't have the need for it.
You could add the required support yourself and make a pull request. I think it should be quite straightforward and might even coexist with behat2 implementation.

Hi Eduard. I understand. I thought the same about the PR. I need to find some time.
Thank you for the quick response.


fix(react): hide size changer

The antd pagination component by default adds a page size picker when there are 50 or more elements being paginated. We do not want to use this page size picker. This PR forces the pagination components to hide them:

Checklist

[ ] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[ ] Docs related to the changes have been added/updated (if applicable)

@shirshanka I think it makes sense to support page size options- should we merge this in and fully implement page size options as a follow up?


Update Finnish Museums to use base class

Fixes

Fixes #581
Description

Quick PR to update Finnish Museums to use the new ProviderDataIngester base class.
Testing Instructions

just test and confirm tests pass
Run the Finnish Museums provider script and watch the pull_data task. Make sure it at least pulls records for a few buildings before marking as success; alternatively you can set an ingestion_limit admin variable to cap the number of records pulled.
Checklist

[ ] My pull request has a descriptive title (not a vague title like Update index.md).
[ ] My pull request targets the default branch of the repository (main) or a parent feature branch.
[ ] My commit messages follow best practices.
[ ] My code follows the established code style of the repository.
[ ] I added or updated tests for the changes I made (if applicable).
[ ] I added or updated documentation (if applicable).
[ ] I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

I left a note inline about the foreign id duplication, I think we should fix it before merging this PR. And I removed sara from the reviewers list because I reviewed the PR. I hope it's OK.

We plan on addressing this in https://github.com/WordPress/openverse-catalog/issues/450 I believe! This is just a straight refactor of existing code, and I think we can work to solve that issue in another PR.


Bad UX for Liquid to Liquid payment

When I pay Misty to Misty I do not see that the payment is pending while I am waiting to be complete.
https://github.com/user-attachments/assets/ab740921-0d86-4d40-b49e-0e1ca26efd07

@Nackoo2000 can you check if the pending payment is in the bottom of the list? I have a feeling there is a sorting issue there. cc @erdemyerebasmaz

Yes it does appear on the bottom but there is still time before it does - about 20 to 30 seconds

Depends on

https://github.com/breez/breez-sdk-liquid/issues/540


"No such module 'SnapSDK'" even after cleaning project

With the following code:
import SnapSDK
and
SCSDKSnapKit.initSDK()
I get the error "No such module SnapSDK exists" at the import line.

I have 10+ other packages via SPM without any issues.
I've tried deleting derived data, cleaning my project, resetting package caches and updating to latest versions, no luck.
However, my app was actually crashing when I started it up without my ClientId in my Info.plist, because SnapKit was trying to auto init without the necessary client id. So it seems that the code can run, but I can't import the module...?

You need to import the relevant modules
import SCSDKCreativeKit
import SCSDKCoreKit
import SCSDKLoginKit


KDTrees instead of Hungarian algorithm for matching

@jeff-regier mention this idea where for matching objects it might be possible to use KDTrees rather than the Hungarian Algorithm given that locations have spatial structure. Not urgent to implementbut good to keep in mind if we ever want to make the matching faster.

Relevant line:
https://github.com/prob-ml/bliss/blob/bd740ea1843010579a81f55cb675f9c39a83cc3f/bliss/reporting.py#L180

Addressed by PR #591


Versionstring needs to updated

/* supports-version:15.7 /
should be changed to
/ supports-version:16.1 */

Hi @seraphyn, this is already fixed with PR #26.


Several mappings

Added to the loot table stuff. Serialization mappings.
Mapped debug renders
Mapped a few misc classes that have been hanging around.

Going to attempt to take care of this one and hopefully not screw up this time.


images/alt: Disable update_hostname cloud-init module

Disable update_hostname module in cloud-init to prevent errors on reboot.
Passing build: https://github.com/MusicDin/lxd-ci/actions/runs/11682041046

The change here probably makes sense to unblock image build, but it does leave cloud-init in an unexpected state. Do we know what version of cloud-init is installed in these images?
I've never seen anything like this before - I would assume from first glance that this is caused a broken downstream patch. Can someone please file a bug with ALT so that they know that this is happening?

@holmanb Thanks for checking this one. The version of cloud-init is 24.2-alt1: https://packages.altlinux.org/en/sisyphus/srpms/cloud-init/

@holmanb Thanks for checking this one. The version of cloud-init is 24.2-alt1: https://packages.altlinux.org/en/sisyphus/srpms/cloud-init/

I just did a little bit of digging, and it looks like this is definitely a downstream bug. ALT hasn't upstreamed their distro implementation. The source of the exception is from code that is in a file that doesn't exist in upstream cloud-init.
Traceback (most recent call last):
  File "/usr/lib/python3/site-packages/cloudinit/config/cc_update_hostname.py", line 62, in handle
    cloud.distro.update_hostname(hostname, fqdn, prev_fn)
  File "/usr/lib/python3/site-packages/cloudinit/distros/__init__.py", line 546, in update_hostname
    prev_hostname = self._read_hostname(prev_hostname_fn)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/site-packages/cloudinit/distros/altlinux.py", line 154, in _read_hostname
    return util.load_file(filename).strip()
           ^^^^^^^^^^^^^^

The fix for this is trivial, but I don't know where the repository is that implements altlinux.py. I just filed a bug downstream.

@holmanb thanks for the analysis and reporting it downstream!

@MusicDin @simondeziel fyi downstream just reported it was fixed:  https://bugzilla.altlinux.org/52029


Rate Limiting Middelware By IP

Count and Limit requests by IP-address(key) with atomic increments,
using process in-memory store.
Before Change

Requests were not rate-limited on critical or essential resource endpoints.
Github CodeQL was complaining about missing rate limiting.
Resources are prone to brute force attacks.

After Change

Requests are rate-limited on critical or essential resources endpoints, which limits

Fast brute force attack: 5 requests/30 seconds and on limit reach block for 10 minutes.
Slow brute force attack: 100 requests/1 day and on limit reach block for 1 day.
Key used for limit: IP-address
Storing info(store) : In Process Memory

Checks

[X] Is TDD Followed
[X] Is Commit Checks Resulted as Expected
[X] Is Functions Description Added If Required or Critical

Issue

Closes 905

Info

Package[used]: node-rate-limiter-flexible
Store: Rate Limiter Memory manages limits in current process memory.
- Can block a key for max 24 days
- Non-persistent storage, get's reset on application stop or failure.
- Alternative: use persistent storage such as Redis.
Approach: Block Source of requests by IP
- Simple easy to implement
- Easily scalable as per requirements and combinable with other limiters
TDD Coverage:

Amazing work 🥳🥳, I just had a query, can't we do rate limiting without this package (I'm not sure about it.) and if this gives some features or something that sort do let me know.

We can do rate limiting without the package, I'll get back to you on this.
Features:

This packages manage store for us such as in-process-memory-stote and also provide other options such as redis and few others.
Gives options to combine different rate limiters and use as single interface for limiting requests.
Other like insurance for persistent storage like redis, MongoDB and mysql.


OSD-9349: fix print of boolean

Codecov Report

Merging #126 (7e24876) into master (bc36ce8) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master     #126   +/-   ##
=======================================
  Coverage   42.72%   42.72%
=======================================
  Files          14       14
  Lines         838      838
=======================================
  Hits          358      358
  Misses        439      439
  Partials       41       41

Impacted Files
Coverage Δ

...ntegration/deadmanssnitchintegration_controller.go
59.88% <0.00%> (ø)

nvm

/lgtm


Green or Blue Frames During Playback

Occasionally I will get green or blue frames during playback or scrubbing. Playback performance is choppy as well in FCP, but the same clips perform well in Da Vinci Resolve 18.2 on same computer. Will test on M1 MacBook Pro.
Final Cut Pro 10.6.5
2013 Mac Po 3.5 GHz 6-Core Intel Xeon E5
macOS Monterey version 12.6.2

That's strange - I haven't seen any green or blue frames on my MacBook Pro (16-inch, 2021, Apple M1 Max, 64 GB RAM).
What GPU(s) do you have in the MacPro?
What resolution is the test BRAW files you're using and from what camera? Can you send me a test clip?
I've made quite a lot of changes in the next beta, so hopefully one of those tweaks fixes that. It should be ready for testing later this week hopefully.

Hi Chris. This footage is not my own so I'd have to get permission to post a clip.

You're using an M1 so that may be the difference.
The footage flickers blue and green in FCP when trying to play or scrub, then it will stabilize and try to play, but very choppy. Same braw gets smooth playback in Resolve.
The GPU is AMD FirePro D500 x 2
BRAW is 6144x345 @ 23.98 fps

I've been holding out to see what the Mac Pros (Apple Silicon) would be before buying a new desktop this is why I am still on my 2013 Mac Pro and RAID which has been working perfectly to date, and haven't jumped in with the Mac Studio. I have a 2016 MacBook Pro and M1 MacBook Pro, but don't use that as my main editor. Gave the M1 to my son but I can use it to test if need be, although I know you were curious about how this works on Intel Macs.

@tangierc - Let me know if you're still seeing issue with Public Beta 2?


Call method from query builder is not working well with string as procedure argument

The call method from the query builder is constructing the query with procedure argument as stated in its docstring:
Python: call('json_util.load_from_url', 'https://some-url.com').yield_('objects').return_(results='objects').execute()
Cypher: CALL json_util.load_from_url(https://some-url.com) YIELD objects RETURN objects;
(docstring is also not written well and it is not generating correctly in the reference guide)
But, this is not correct, since json_util.load_from_url has string argument. The correct query would be:
CALL json_util.load_from_url('https://some-url.com') YIELD objects RETURN objects;
Hence, if the procedure argument is a string, quotes should be around it. There is no test for this case currently.

Closing this, it works with:
call(
    "json_util.load_from_url",
    "'https://download.memgraph.com/asset/mage/data.json'",
)
.yield_("objects")
.return_(results="objects")
.execute()

but, the docstring should be fixed. (I can do that)


Screen shots on readme no longer match the actually panels of os-ftp

fix in one of the many "screen shot" fixes over the last few days


feat(eng-prod): Introduce DD Event Sending for CDK Apps/Libs [INFRA-53]

feat: Introduce feature flag for enabling the sending of datadog events anytime a release goes out for CDK applications and construct libs

Task: https://staging.clickup.com/t/333/INFRA-53

@Justinon this is something we should consider sending back to the projen project.


JSX preserve mode with @JSX attribute

It is found that the attribute @JSX makes the printer function preserve the JSX expression. https://github.com/rescript-lang/syntax/issues/539#issuecomment-1186403650
Changing the JSX PPX to keep the @JSX attribute after transformation, it prints as below. The checking of the call expression should be turned off by the way. It can be used in the compiler emitter to print the JSX in preserve mode.
// expected
let make = ({msg}) => ReactDOMRe.createDOMElementVariadic("div", [{msg->React.string}])

// generated
let make = ({msg}) => <ReactDOMRe.createDOMElementVariadic>  </ReactDOMRe.createDOMElementVariadic>

The related functions to print JSX need to be updated as per changes by JSX V4, such as printJsxExpression, printJsxName. They look working with only V3.
Plus, those functions can be used to preserve the JSX in the compiler.


Mastodon Helm Chart

This PR adds the first version of the Mastodon helm chart. It was tested on AMD64 architecture only, as we're using Bitnami dependencies.

Everyone approved of the Mastodon Helm Chart implementation. Merging.


New promise typing using unions is less flexible than it should be (and used to be)

For example, this code used to type-check fine (prior to: https://github.com/borisyankov/DefinitelyTyped/commit/c95561be3526f90f0e717734a659d1c01d0492d4 )
/// <reference path='es6-promise.d.ts' />

interface T1 {
  __t1: string;
}

interface T2 {
  __t2: string;
}

interface T3 {
  __t3: string;
}

function f1() : Promise<T1> {
  return Promise.resolve({ __t1: "foo_t1" });
}

function f2(x:T1) : T2 {
  return { __t2: x.__t1 + ":foo_21" };
}

var x3 = f1()
  .then(f2, (e:Error) => {
    console.log("error 1");
    throw e;
  })
  .then((x:T2) => {
    return { __t3: x.__t2 + "bar" };
  });

But now it gives these errors (in TypeScript 1.4.1):
/Users/ldixon/code/uproxy/uproxy-networking/build/third_party/typings/es6-promise/promise-oddity.ts(23,10): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
  Type argument candidate 'T2' is not a valid type argument because it is not a supertype of candidate 'void'.

@iislucas that definition were pull from official typescript repository. https://github.com/Microsoft/TypeScript/blob/master/src/lib/es6.d.ts#L3542
I do not want to modify. sorry.
workaround.
var x3 = f1()
  .then(f2, (e:Error) => {
    console.log("error 1");
    throw e;
    return null;
  })
  .then((x:T2) => {
    return { __t3: x.__t2 + "bar" };
  });

OK, I'll re-file my issue there, thanks!

https://github.com/Microsoft/TypeScript/issues/2010


Still Working?

gem install ruby_postal -v '1.0.0'
Building native extensions.  This could take a while...
ERROR:  Error installing ruby_postal:
ERROR: Failed to build gem native extension.
current directory: /Users/Sergio/.rvm/gems/ruby-2.3.0/gems/ruby_postal-1.0.0/ext/expand

/Users/Sergio/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20180607-4024-1yofs34.rb extconf.rb
creating Makefile
current directory: /Users/Sergio/.rvm/gems/ruby-2.3.0/gems/ruby_postal-1.0.0/ext/expand
make "DESTDIR=" clean
current directory: /Users/Sergio/.rvm/gems/ruby-2.3.0/gems/ruby_postal-1.0.0/ext/expand
make "DESTDIR="
compiling expand.c
expand.c:1:10: fatal error: 'libpostal/libpostal.h' file not found
#include <libpostal/libpostal.h>
^
1 error generated.
make: *** [expand.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/Sergio/.rvm/gems/ruby-2.3.0/gems/ruby_postal-1.0.0 for inspection.
Results logged to /Users/Sergio/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/ruby_postal-1.0.0/gem_make.out

Did you install the libpostal C library first?
https://github.com/openvenues/libpostal

I had this issue, I forgot to run make install after compiling libpostal. Hope this helps someone else.


Coverage html complains about parsing Aenum's _py2.py

I ran 'coverage html' after 'coverage run --source= <some pytest in src directory'.
'coverage run' succeeds, but when running 'coverage html', I see an error:
coverage html --ignore-errors
/usr/local/home/.virtualenvs/p/lib/python3.11/site-packages/coverage/report.py:81: CoverageWarning: Couldn't parse Python file '/usr/local/home/.virtualenvs/p/lib/python3.11/site-packages/aenum/_py2.py' (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
the file complained on is https://github.com/ethanfurman/aenum/blob/master/aenum/_py2.py, which seems like a working simple python script?
To Reproduce
How can we reproduce the problem?  Please be specific. Don't link to a failing CI job. Answer the questions below:

What version of Python are you using?
3.11.7

What version of coverage.py shows the problem? The output of coverage debug sys is helpful.
6.3.2 without C extension

What versions of what packages do you have installed? The output of pip freeze is helpful.
aenum version is 3.1.15

What code shows the problem?  Give us a specific commit of a specific repo that we can check out. If you've already worked around the problem, please provide a commit before that fix.
it seems agnostic of what my pytest does, simply set coverage run's source to the 3rd party directory that has the aenum will show the error.

What commands should we run to reproduce the problem? Be specific. Include everything, even git clone, pip install, and so on. Explain like we're five!
If aenum is deployed to a third party package directory like
/usr/local/home/.virtualenvs/p/lib/python3.11/site-packages
run:
coverage run --source=/usr/local/.virtualenvs/p/lib/python3.11/site-packages /usr/local/home/Workspace/p/xxj_test.py
coverage html

Expected behavior
coverage html to succeed without error?

from coverage debug sys:
-- sys -------------------------------------------------------
coverage_version: 6.3.2
coverage_module: /usr/local/home/.virtualenvs/p/lib/python3.11/site-packages/coverage/init.py
tracer: -none-
CTracer: unavailable
plugins.file_tracers: -none-
plugins.configurers: -none-
plugins.context_switchers: -none-
configs_attempted: .coveragerc
setup.cfg
tox.ini
pyproject.toml
configs_read: /usr/local/home/Workspace/p/pyproject.toml
config_file: None
config_contents: -none-
data_file: -none-
python: 3.11.7 (main, Jan 14 2024, 00:38:57) [GCC 10.2.1 20210110]
platform: Linux-6.6.13-1rodete3-amd64-x86_64-with-glibc2.37
implementation: CPython
executable: /usr/local/home/.virtualenvs/p/bin/python3
def_encoding: utf-8
fs_encoding: utf-8
pid: 1007324
cwd: /usr/local/home/Workspace/p
path: /usr/local/home/.virtualenvs/p/bin
/usr/local/home/Workspace/p/src
/usr/local/buildtools/current/sitecustomize
/opt/python3.11.7/lib/python311.zip
/opt/python3.11.7/lib/python3.11
/opt/python3.11.7/lib/python3.11/lib-dynload
/usr/local/home/.virtualenvs/p/lib/python3.11/site-packages
environment: HOME = /usr/local/home/
PYTHONPATH = /usr/local/buildtools/current/sitecustomize
PYTHON_KEYRING_BACKEND = keyrings.gauth.GooglePythonAuth
VIRTUALENVWRAPPER_PYTHON = /usr/bin/python3
command_line: /usr/local/home/.virtualenvs/p/bin/coverage debug sys
sqlite3_version: 2.6.0
sqlite3_sqlite_version: 3.45.0
sqlite3_temp_store: 0
sqlite3_compile_options: ATOMIC_INTRINSICS=1; COMPILER=gcc-13.2.0; DEFAULT_AUTOVACUUM
DEFAULT_CACHE_SIZE=-2000; DEFAULT_FILE_FORMAT=4; DEFAULT_JOURNAL_SIZE_LIMIT=-1
DEFAULT_MMAP_SIZE=0; DEFAULT_PAGE_SIZE=4096; DEFAULT_PCACHE_INITSZ=20
DEFAULT_RECURSIVE_TRIGGERS; DEFAULT_SECTOR_SIZE=4096; DEFAULT_SYNCHRONOUS=2
DEFAULT_WAL_AUTOCHECKPOINT=1000; DEFAULT_WAL_SYNCHRONOUS=2; DEFAULT_WORKER_THREADS=0
DIRECT_OVERFLOW_READ; ENABLE_COLUMN_METADATA; ENABLE_DBSTAT_VTAB
ENABLE_FTS3; ENABLE_FTS3_PARENTHESIS; ENABLE_FTS3_TOKENIZER
ENABLE_FTS4; ENABLE_FTS5; ENABLE_LOAD_EXTENSION
ENABLE_MATH_FUNCTIONS; ENABLE_PREUPDATE_HOOK; ENABLE_RTREE
ENABLE_SESSION; ENABLE_STMTVTAB; ENABLE_UNLOCK_NOTIFY
ENABLE_UPDATE_DELETE_LIMIT; HAVE_ISNAN; LIKE_DOESNT_MATCH_BLOBS
MALLOC_SOFT_LIMIT=1024; MAX_ATTACHED=10; MAX_COLUMN=2000
MAX_COMPOUND_SELECT=500; MAX_DEFAULT_PAGE_SIZE=32768; MAX_EXPR_DEPTH=1000
MAX_FUNCTION_ARG=127; MAX_LENGTH=1000000000; MAX_LIKE_PATTERN_LENGTH=50000
MAX_MMAP_SIZE=0x7fff0000; MAX_PAGE_COUNT=0xfffffffe; MAX_PAGE_SIZE=65536
MAX_SCHEMA_RETRY=25; MAX_SQL_LENGTH=1000000000; MAX_TRIGGER_DEPTH=1000
MAX_VARIABLE_NUMBER=250000; MAX_VDBE_OP=250000000; MAX_WORKER_THREADS=8
MUTEX_PTHREADS; SECURE_DELETE; SOUNDEX
SYSTEM_MALLOC; TEMP_STORE=1; THREADSAFE=1
USE_URI

Can you try with the latest coverage? 6.3.2 is two years old.  Also, if you could provide me with specific instructions of exactly what code is where, including the directory layout and how to install the packages you use, it will be easier for me to replicate the problem

Oh, hmm: you aren't getting an error, you are getting a warning.  The command succeeds and produces an HTML report, doesn't it?  If you want, you can suppress the warning: https://coverage.readthedocs.io/en/7.4.4/cmd.html#warnings

Yeah, I was able to bypass the html report failure with 'ignore error'.
I ran into some weird issues with updating the coverage version. Because my project is managed by Poetry, it seems like the coverage.py is brought in as a dependency of a dependency that's specified in my project's toml (coverage is not directly specified in the toml). I updated the pytest and pytest-cov to the latest release, but the updated poetry.lock still shows coverage on the old version. What do you suggest may be the issue (is coverage bundled with some standard python libraries) or ways to correct this?

The pytest related dependencies that are specified in the toml:
pytest = "^8.1.1"
pytest-asyncio = "0.19.*"
pytest-benchmark = "^3.4"
pytest-cov = "^5.0.0"
pytest-qt = "^4.0.2"
pytest-timeout = "^2.1.0"
pytest-xdist = "^2.5.0"

Thanks for confirming that this is not a failure of the html report.  I'll close this issue.
I don't know why you are locking to an old version of coverage.py.  I thought it could be because you run on an old version of Python, but 6.3.2 is not the last version to support 3.7 (7.2.7 was) or 3.6 (6.2 was), and you are running on 3.11 in any case.  I don't use poetry so I don't know what might affect its locking.


Issue

redacted

This was transferred here because it was identified as a documentation issue, right?
I would like to put forward an argument that this is actually incorrect behavior. I imagine there's a lot of existing code that assumes this value will be a string and never undefined; in fact even the typescript definitions (@types/express) say it's string and not string? or string | undefined. Now a malformed request (which is what I'm assuming triggers this) can invoke an unexpected exception on the server if simple String methods like split or startsWith are called.

Hello, sorry, I moved it because I looked into it and it is a doc issue. Sometimes it is not possible to get the hostname, and so the hostname is thus not defined foe that request. It has had this behavior since it was added to express 9 years ago, so not a regression in behavior, either.

Hello, and thank you for your feedback. If you are actually reporting a potential security issue, please do so via our security policy. I will delete all the above conversation to make sure it stays confidential while you contact us so we can understand more.

It looks like i cannot actually remove the title which unfortunately contains the summary of your potential security issue. I will have to delete the issue, but my replys should be in your email.


feat: Add memgpt quickstart command

Please describe the purpose of this pull request
Add memgpt quickstart to allow users to immediately start using the hosted endpoint (or openai/azure) w/o copy-paste.
I've set things up so that the quickstart configs (.json) files are actually pulled from the internet (the repo main), that way we can update eg the memgpt hosted endpoint details on-the-fly with commits to main.
How to test

memgpt quickstart

Simple, should just pull from remote url

memgpt quickstart --type openai

To make this a true "one-click", we should check for the existence of OPENAI_API_KEY and throw a nice error here

memgpt quickstart --type azure

Similarly, we should check for the existence of all the necessary Azure variables and throw a nice error

Have you tested this PR?
Yes, see examples below.

[x] memgpt quickstart
[x] memgpt quickstart --type openai
- [ ] memgpt quickstart azure

Note: Azure is a little complicated, should put in separate PR.
Outstanding questions

[ ] Should we pull configs from GitHub? Can also put the configs inside the gh-pages assets directory, so the wget goes to memgpt.ai/... instead of a GitHub link
[ ] Should we store configs in memgpt/configs? Naming? (memgpt/example_configs?)
[ ] Should we store JSON? YAML?
[ ] Change command convention? eg memgpt quickstart --type openai could just be memgpt openai

Examples:
% memgpt quickstart --debug
JSON config file downloaded successfully.
Replacing config model: gpt-4 -> ehartford/dolphin-2.5-mixtral-8x7b
Replacing config model_endpoint_type: openai -> vllm
Replacing config model_endpoint: https://api.openai.com/v1 -> http://api.memgpt.ai
Replacing config model_wrapper: None -> airoboros-l2-70b-2.1
Replacing config context_window: 8192 -> 32768
Replacing config embedding_endpoint_type: openai -> hugging-face
Replacing config embedding_endpoint: https://api.openai.com/v1 -> http://embeddings.memgpt.ai
Replacing config embedding_model: None -> BAAI/bge-large-en-v1.5
Skipping new config embedding_dim: 1536 == 1536
Skipping new config embedding_chunk_size: 300 == 300
Saving new config file.

% memgpt quickstart --debug --type openai
? Enter your OpenAI API key (starts with 'sk..'): dummy key
JSON config file downloaded successfully.
Replacing config model: ehartford/dolphin-2.5-mixtral-8x7b -> gpt-4
Replacing config model_endpoint_type: vllm -> openai
Replacing config model_endpoint: http://api.memgpt.ai -> https://api.openai.com/v1
Replacing config model_wrapper: airoboros-l2-70b-2.1 -> None
Replacing config context_window: 32768 -> 8192
Replacing config openai_key: sk-... -> dummy key
Replacing config embedding_endpoint_type: hugging-face -> openai
Replacing config embedding_endpoint: http://embeddings.memgpt.ai -> https://api.openai.com/v1
Replacing config embedding_model: BAAI/bge-large-en-v1.5 -> None
Skipping new config embedding_dim: 1536 == 1536
Skipping new config embedding_chunk_size: 300 == 300
Saving new config file.

What do you think of doing memgpt run --config openai ?


Update jq before using tojson command

https://github.com/Shippable/pm/issues/11786

this is done, closing


Error generating autocompletion:  Error: Failed to execute git

Before submitting your bug report

[X] I believe this is a bug. I'll try to join the Continue Discord for questions
[X] I'm not able to find an open issue that reports the same bug
[X] I've seen the troubleshooting guide on the Continue Docs

Relevant environment info
- OS: Archlinux
- Continue version: 0.8.59
- IDE version:
- Model:
- config.json:

{
  "models": [
    {
      "title": "OpenAI-compatible server / API",
      "provider": "openai",
      "model": "qwen2.5-7b-cpu",
      "apiKey": "EMPTY",
      "apiBase": "http://kubeai/openai/v1"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "tabAutocompleteModel": {
    "title": "qwen",
    "provider": "openai",
    "model": "qwen2.5-coder-1.5b-cpu",
    "apiKey": "EMPTS",
    "apiBase": "http://kubeai/openai/v1"
  },
  "contextProviders": [
    {
      "name": "code",
      "params": {}
    },
    {
      "name": "docs",
      "params": {}
    },
    {
      "name": "diff",
      "params": {}
    },
    {
      "name": "terminal",
      "params": {}
    },
    {
      "name": "problems",
      "params": {}
    },
    {
      "name": "folder",
      "params": {}
    },
    {
      "name": "codebase",
      "params": {}
    }
  ],
  "slashCommands": [
    {
      "name": "edit",
      "description": "Edit selected code"
    },
    {
      "name": "comment",
      "description": "Write comments for the selected code"
    },
    {
      "name": "share",
      "description": "Export the current chat session to markdown"
    },
    {
      "name": "cmd",
      "description": "Generate a shell command"
    },
    {
      "name": "commit",
      "description": "Generate a git commit message"
    }
  ],
  "embeddingsProvider": {
    "provider": "ollama",
    "model": "nomic-embed-text"
  }
}

Description
my model endpoint is not receiving any requests due to failed to execute git. It used to work before though. I also tried the developer release
Here is the full log from the developer console:
Error generating autocompletion:  Error: Failed to execute git
	at t.Git._exec (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:916728)
	at async t.Git.exec (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:915796)
	at async W.exec (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:921324)
	at async W.diff (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:925379)
	at async O.retryRun (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:1045456)
	at async O.run (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:1045060)
	at async _VsCodeIdeUtils.getDiff (/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:581035:30)
	at async _VsCodeIde.getDiff (/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:581304:16)
	at async getDiffSnippets (/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:90119:21)
	at async Promise.all (index 3)
	at async getAllSnippets (/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:90140:11)
	at async Promise.all (index 0)
	at async CompletionProvider.provideInlineCompletionItems (/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:92366:51)
	at async ContinueCompletionProvider.provideInlineCompletionItems (/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:542394:27)
	at async RH.provideInlineCompletions (file:///opt/visual-studio-code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:137:142456)

To reproduce
No response
Log output
No response

also seeing this in the console when editing my config.json:
RangeError: path should be a `path.relative()`d string, but got "../../.continue/config.json"
	at throwError (vscode-file://vscode-app/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:71825:13)
	at checkPath (vscode-file://vscode-app/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:71839:16)
	at Ignore2._test (vscode-file://vscode-app/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:71927:9)
	at Ignore2.ignores (vscode-file://vscode-app/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:71954:21)
	at vscode-file://vscode-app/home/samos/.vscode/extensions/continue.continue-0.8.60-linux-x64/out/extension.js:541456:31
	```

Thanks for bringing this to our attention! We recently updated our autocomplete to include the context of your git diff. Do you know if you have Git installed? My hunch is that you don't and this is what's causing the error.
cc @tomasz-stefaniak

Linking meta issue #2780
Since happening with vscode-file:// protocol

I do have git installed. VS Code version 1.95.3

I started a new workspace and only opened 1 folder and restarted VS Code and issue seems to have gone away for now. It's now sending requests to my local server. Not sure what's going on.


feat: added ethermint to all legacy proposals

Added ethermint to all legacy proposals where needed.

@BabyScope it seems like it's failing the tests, if you run the commands manually what does it fail with?

@omerlavanet  i don't understand why it is failing because when i tried to run a test for Lava i couldn't pas the legacy propsals
with error;
invalid spec ErrMsg: spec expand failed ErrMsg: imported spec unknown: ETHERMINT {imports:EVMOS->[COSMOSSDK,ETHERMINT(unknown)}: imported spec unknown: ETHERMINT {imports:COSMOSSDK,ETHERMINT,ETH1}: spec expand failed ErrMsg: imported spec unknown: ETHERMINT {imports:EVMOS->[COSMOSSDK,ETHERMINT(unknown)}: imported spec unknown: ETHERMINT: invalid proposal content: invalid proposal content [cosmos/cosmos-sdk@v0.47.10/x/gov/keeper/proposal.go:74] With gas wanted: '18446744073709551615' and gas used: '4324938' : unknown request
Next error is :
invalid spec ErrMsg: spec expand failed ErrMsg: imported spec unknown: COSMOSSDKFULL {imports:LAV1->[COSMOSSDKFULL(unknown)}: imported spec unknown: COSMOSSDKFULL {imports:COSMOSSDKFULL}: spec expand failed ErrMsg: imported spec unknown: COSMOSSDKFULL {imports:LAV1->[COSMOSSDKFULL(unknown)}: imported spec unknown: COSMOSSDKFULL: invalid proposal content: invalid proposal content [cosmos/cosmos-sdk@v0.47.10/x/gov/keeper/proposal.go:74] With gas wanted: '18446744073709551615' and gas used: '395994' : unknown request
When i run the test with added Ethermint added there ;
[+] letting providers start and running health check then running command with flags:  http://<IP_ADDRESS>:3001 LAV1 rest
Jun  5 13:07:39 INF RPCConsumer Test started args=http://<IP_ADDRESS>:3001;LAV1;rest
Jun  5 13:07:39 INF setting log level loglevel=info
Jun  5 13:07:39 INF lavad Binary Version:
Jun  5 13:07:47 INF Received a new Block Chain=LAV1 apiInterface=rest block=1343859 hash=CGou4aZKOLTadmMITMMQYVY1lUwauD2h29nQPN0nhz4=
Jun  5 13:08:03 INF Received a new Block Chain=LAV1 apiInterface=rest block=1343860 hash=1UHWnsqI68V55xRqDWfXknuEdEix1n+4fRmOC/sG3XM=
Jun  5 13:08:20 INF Received a new Block Chain=LAV1 apiInterface=rest block=1343861 hash=4FilXrv9pwFBMixlvjh+HTyv4OFRH0afpveE/7SjdWg=
Jun  5 13:08:36 INF Received a new Block Chain=LAV1 apiInterface=rest block=1343862 hash=qYFKbW0aeSr/0HFUFnMV9SEk/wXQF4Y+qg89PDnO0L0=
It is running fine no problems

looks like an inheritance order, for some reason the cosmossdkfull isn't accepted with the ethermint change (probably expand order), specs need to be added in the same order of inheritance

already merged in another PR, well done catching this @BabyScope


Issue in loading custom dataset

When I run this cell (loading custom data set):
`custom_fire_alarm_ds = tf.data.Dataset.list_files("datasets/custom/fire_alarm/*.wav", shuffle=False)
custom_fire_alarm_ds = custom_fire_alarm_ds.map(lambda x: (x, 1, -1))
custom_fire_alarm_ds = custom_fire_alarm_ds.map(load_wav_for_map)
custom_fire_alarm_ds = custom_fire_alarm_ds.flat_map(split_wav_for_flat_map)
custom_fire_alarm_ds = custom_fire_alarm_ds.map(create_arm_spectrogram_for_map)
custom_background_noise_ds = tf.data.Dataset.list_files("datasets/custom/background_noise/*.wav", shuffle=False)
custom_background_noise_ds = custom_background_noise_ds.map(lambda x: (x, 0, -1))
custom_background_noise_ds = custom_background_noise_ds.map(load_wav_for_map)
custom_background_noise_ds = custom_background_noise_ds.flat_map(split_wav_for_flat_map)
custom_background_noise_ds = custom_background_noise_ds.map(create_arm_spectrogram_for_map)
custom_ds = tf.data.Dataset.concatenate(custom_fire_alarm_ds, custom_background_noise_ds)
custom_ds = custom_ds.map(lambda x, y, z: (tf.expand_dims(x, axis=-1), y, z))
custom_ds_len = calculate_ds_len(custom_ds)
print(f'{custom_ds_len}')
custom_ds = custom_ds.map(lambda x, y,z: (x, y))
custom_ds = custom_ds.shuffle(custom_ds_len).cache()`
then I get the following error:
`---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
 in ()
13 custom_ds = tf.data.Dataset.concatenate(custom_fire_alarm_ds, custom_background_noise_ds)
14 custom_ds = custom_ds.map(lambda x, y, z: (tf.expand_dims(x, axis=-1), y, z))
---> 15 custom_ds_len = calculate_ds_len(custom_ds)
16
17 print(f'{custom_ds_len}')
4 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
7105 def raise_from_not_ok_status(e, name):
7106   e.message += (" name: " + name if name is not None else "")
-> 7107   raise core._status_to_exception(e) from None  # pylint: disable=protected-access
7108
7109
InvalidArgumentError: Requires start <= limit when delta > 0: 0/-1
[[{{function_node __inference_split_wav_211}}{{node range}}]] [Op:IteratorGetNext]`
I also recorded some audios using the built-in microphone from my mac and it also gets saved successfully in the directory.

Hi @rohanali1798,
Could you please share the captured audio files, in order for us to reproduce the issue. Thanks.

Closing due to lack of response, please re-open with requested info.


x/tools/gopls: panic after failed PosRange in xrefs.Index

gopls version: v0.15.3/go1.22.1
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Sun, 26 May 2024 22:40:43 GMT
restart history:
Sun, 26 May 2024 21:36:23 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.

panic: start: pos 1 is not in range [68046:88632] of file /Users/perrybenyella/Documents/GitHub/CS345/CS_345_Distributed_Systems/raft/test_test.go

goroutine 1514 [running]:
golang.org/x/tools/gopls/internal/cache/xrefs.Index.func2({0x101713c20, 0x14000e8d160})
	  xrefs.go:52  0x8c
golang.org/x/tools/gopls/internal/cache/xrefs.Index.func3({0x101713c20%3F, 0x14000e8d160})
	  xrefs.go:89  0x464
go/ast.inspector.Visit(0x140025b3400, {0x101713c20%3F, 0x14000e8d160%3F})
	  walk.go:386  0x38
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713c20, 0x14000e8d160})
	  walk.go:51  0x44
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713e50, 0x1400000f680})
	  walk.go:112  0x1d94
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713e28, 0x14000d2bac0})
	  walk.go:143  0x21e8
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713e00, 0x140004b3380})
	  walk.go:153  0x1948
go/ast.walkExprList(...)
	  walk.go:26
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713e28, 0x14000d2bb40})
	  walk.go:144  0x2208
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101714760, 0x14000d40a80})
	  walk.go:206  0x3254
go/ast.walkStmtList(...)
	  walk.go:32
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713f40, 0x14000574210})
	  walk.go:234  0x29f4
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713ea0, 0x14000574240})
	  walk.go:357  0xd90
go/ast.walkDeclList(...)
	  walk.go:38
go/ast.Walk({0x1017108c0%3F, 0x140025b3400%3F}, {0x101713ce8, 0x1400048ac80})
	  walk.go:366  0x2e14
go/ast.Inspect(...)
	  walk.go:397
golang.org/x/tools/gopls/internal/cache/xrefs.Index({0x140011712f0, 0x5, 0x140022bd600%3F}, 0x140010bf2c0, 0x140010bf320)
	  xrefs.go:57  0x130
golang.org/x/tools/gopls/internal/cache.(*syntaxPackage).xrefs.func1()
	  pkg.go:72  0x38
sync.(*Once).doSlow(0x14000582d08%3F, 0x14000583388%3F)
	  once.go:74  0x100
sync.(*Once).Do(...)
	  once.go:65
golang.org/x/tools/gopls/internal/cache.(*syntaxPackage).xrefs(0x140002bc2d0)
	  pkg.go:71  0x50
golang.org/x/tools/gopls/internal/cache.storePackageResults({0x1017189e8, 0x14001c460f0}, 0x14001164d80, 0x140011e2420)
	  check.go:582  0x80
created by golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage in goroutine 1420
	  check.go:570  0x5d0

gopls stats -anon
{
  "DirStats": {
    "Files": 440,
    "TestdataFiles": 0,
    "GoFiles": 44,
    "ModFiles": 2,
    "Dirs": 198
  },
  "GOARCH": "arm64",
  "GOOS": "darwin",
  "GOPACKAGESDRIVER": "",
  "GOPLSCACHE": "",
  "GoVersion": "go1.22.1",
  "GoplsVersion": "v0.15.3",
  "InitialWorkspaceLoadDuration": "88.230458ms",
  "MemStats": {
    "HeapAlloc": 2537088,
    "HeapInUse": 4964352,
    "TotalAlloc": 11719808
  },
  "WorkspaceStats": {
    "Files": {
      "Total": 0,
      "Largest": 0,
      "Errs": 0
    },
    "Views": [
      {
        "GoCommandVersion": "go1.22.1",
        "AllPackages": {
          "Packages": 0,
          "LargestPackage": 0,
          "CompiledGoFiles": 0,
          "Modules": 0
        },
        "WorkspacePackages": {
          "Packages": 0,
          "LargestPackage": 0,
          "CompiledGoFiles": 0,
          "Modules": 0
        },
        "Diagnostics": 0
      }
    ]
  }
}

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>

This is the offending line, complete with "can't fail" comment. ;-)
		nodeRange := func(n ast.Node) protocol.Range {
			rng, err := pgf.PosRange(n.Pos(), n.End())
			if err != nil {
				panic(err) // can't fail
			}
			return rng
		}

Interpreting the stack, the offending Node is the Sel identifier in a call expression x.Sel(...). I don't know how it got a bogus start pos of 1.

Hi @perrybenyella, do you remember how you triggered this crash while working in test_test.go? If you're able to reproduce it, that would be a great help for us trying to fix it. Thanks!

Bumping to the next milestone as this code has not changed recently, and this is our first report of this crash.
Hopefully we can get a reproducer.

I am not exactly sure, but I was working on a project on vscode using the live share extension with a couple of other collaborators. Then we made edits to the files (test_test.go was one of these files), and for some reason, we weren't able to save the changes we made to the files while working. Because of that, I had to restart my vs code each tim,\e it happened. This kind of happend a few times. It also seemed to be an issue that only my computer was affected by because the other collaborators did not experience it when they used their own live share links.

Absent a reproducer, I'm afraid we're unlikely to be able to fix this. Moving to the backlog.


Form Select z-index problem

Description
I have three materilaze select one by one align vertical. But they are all on top off each other.
Close

Open

Help me please.

Include some code or a codepen to help us reproduce the problem

@metalized Can you provide a code pen for this?


fix:userattr-unmount unexpected timeout

I am trying to run containerd in docker container environment with user-namespace.
I found that the Unmount logic of this code usually takes tens of seconds when the machine is under high disk load and running multiple containers.And this will cause the startup of docker to fail
I'm not particularly sure what's causing this, but the unmount error just outputs the log and doesn't affect the execution logic of the function. So I think it would be better to change this to asynchronous execution.
This is the log of docker
time="2022-05-31T18:13:34.490264526+08:00" level=info msg="Starting up"
time="2022-05-31T18:13:34.491918527+08:00" level=debug msg="Listener created for HTTP on unix (/var/run/docker.sock)"
time="2022-05-31T18:13:34.491948011+08:00" level=debug msg="Containerd not running, starting daemon managed containerd"
time="2022-05-31T18:13:34.492139165+08:00" level=info msg="libcontainerd: containerd is still running" pid=144
time="2022-05-31T18:13:34.492210488+08:00" level=info msg="parsed scheme: "unix"" module=grpc
time="2022-05-31T18:13:34.492302486+08:00" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
time="2022-05-31T18:13:34.492376002+08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  }] }" module=grpc
time="2022-05-31T18:13:34.492407392+08:00" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
failed to start containerd: timeout waiting for containerd to start
This is the log of containerd
time="2022-05-31T18:13:18+08:00" level=warning msg="deprecated version : 1, please switch to version 2"
time="2022-05-31T18:13:18.171464520+08:00" level=info msg="starting containerd" revision=3df54a852345ae127d1fa3092b95168e4a88e2f8 version=1.5.11
time="2022-05-31T18:13:18.203640835+08:00" level=info msg="loading plugin "io.containerd.content.v1.content"..." type=io.containerd.content.v1
time="2022-05-31T18:13:18.203784689+08:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.aufs"..." type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:18.203972923+08:00" level=info msg="skip loading plugin "io.containerd.snapshotter.v1.aufs"..." error="aufs is not supported (modprobe aufs failed: exec: "modprobe": executable file not found in $PATH ""): skip plugin" type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:18.204007046+08:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.btrfs"..." type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:18.204351797+08:00" level=info msg="skip loading plugin "io.containerd.snapshotter.v1.btrfs"..." error="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs (overlay) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:18.204377535+08:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.devmapper"..." type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:18.204407926+08:00" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"
time="2022-05-31T18:13:18.204420177+08:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.native"..." type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:18.204516354+08:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.overlayfs"..." type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:41.004910809+08:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.zfs"..." type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:41.005450480+08:00" level=info msg="skip loading plugin "io.containerd.snapshotter.v1.zfs"..." error="path /var/lib/containerd/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
time="2022-05-31T18:13:41.005487845+08:00" level=info msg="loading plugin "io.containerd.metadata.v1.bolt"..." type=io.containerd.metadata.v1
time="2022-05-31T18:13:41.005592205+08:00" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"
time="2022-05-31T18:13:41.005614328+08:00" level=info msg="metadata content store policy set" policy=shared
time="2022-05-31T18:13:41.025727901+08:00" level=info msg="loading plugin "io.containerd.differ.v1.walking"..." type=io.containerd.differ.v1
time="2022-05-31T18:13:41.025789547+08:00" level=info msg="loading plugin "io.containerd.gc.v1.scheduler"..." type=io.containerd.gc.v1
time="2022-05-31T18:13:41.025861278+08:00" level=info msg="loading plugin "io.containerd.service.v1.introspection-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.025936748+08:00" level=info msg="loading plugin "io.containerd.service.v1.containers-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.025965102+08:00" level=info msg="loading plugin "io.containerd.service.v1.content-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.025990351+08:00" level=info msg="loading plugin "io.containerd.service.v1.diff-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.026016690+08:00" level=info msg="loading plugin "io.containerd.service.v1.images-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.026041617+08:00" level=info msg="loading plugin "io.containerd.service.v1.leases-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.026068688+08:00" level=info msg="loading plugin "io.containerd.service.v1.namespaces-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.026107338+08:00" level=info msg="loading plugin "io.containerd.service.v1.snapshots-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.026133823+08:00" level=info msg="loading plugin "io.containerd.runtime.v1.linux"..." type=io.containerd.runtime.v1
time="2022-05-31T18:13:41.026410620+08:00" level=info msg="loading plugin "io.containerd.runtime.v2.task"..." type=io.containerd.runtime.v2
time="2022-05-31T18:13:41.026647883+08:00" level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." type=io.containerd.monitor.v1
time="2022-05-31T18:13:41.027386842+08:00" level=info msg="loading plugin "io.containerd.service.v1.tasks-service"..." type=io.containerd.service.v1
time="2022-05-31T18:13:41.027435146+08:00" level=info msg="loading plugin "io.containerd.internal.v1.restart"..." type=io.containerd.internal.v1
time="2022-05-31T18:13:41.027523152+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027551955+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.content"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027583857+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.diff"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027608009+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.events"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027631601+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.healthcheck"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027656475+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.images"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027690787+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.leases"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027715415+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.namespaces"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.027738980+08:00" level=info msg="loading plugin "io.containerd.internal.v1.opt"..." type=io.containerd.internal.v1
time="2022-05-31T18:13:41.028128713+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.snapshots"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.028186241+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.tasks"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.028227378+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.version"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.028251473+08:00" level=info msg="loading plugin "io.containerd.grpc.v1.introspection"..." type=io.containerd.grpc.v1
time="2022-05-31T18:13:41.029709381+08:00" level=info msg=serving... address=/run/containerd/containerd.sock.ttrpc
time="2022-05-31T18:13:41.029854566+08:00" level=info msg=serving... address=/run/containerd/containerd.sock
time="2022-05-31T18:13:41.029899526+08:00" level=debug msg="sd notification" error="" notified=false state="READY=1"
time="2022-05-31T18:13:41.029925993+08:00" level=info msg="containerd successfully booted in 22.860007s"
time="2022-05-31T18:13:41.127070200+08:00" level=debug msg="garbage collected" d="892.627s"

I suggest filing this as an issue first. There are likely alternative solutions to solve the issue. We tend not to rely on using asynchronous calls in this way to cleaning up system resources such as mounts.

Agreed. @mmmmmmmxl you can try to mount with readonly. It won't sync when umount

@fuweid Thank you for your suggestion. After I added readonly attribute to mount, in my case the problem was solved.

@mmmmmmmxl please squash your commits into one and sign-off with your real name like (git commit -s). Thanks
Signed-off-by: Wei Fu<EMAIL_ADDRESS>

@fuweid  ok, I had  squashed my commits into one and sign-off with my real name.

hi, I didn't see your sign-off 😂 could you please use git commit -s -amend and git show check sign off and then repush again? Thanks

@fuweid  ok, I had  squashed my commits into one and sign-off with my real name.

hi, I didn't see your sign-off 😂 could you please use git commit -s -amend and git show check sign off and then repush again? Thanks

I had pushed again.


Missing extensio.previewSwagger file

Whenever I download the previewSwagger file is missing :(

Hi,
I couldn't understand the issue properly. Can you please elaborate a little more. Some kind of screenshot would be helpful in understanding.
Thank you.

Hi,
I've tried to download your plugin several times, and every time the extension.previewSwagger file is missing, so I'm unable to view the swagger file.
Thanks

I just got the same issue when using a new untitled (not saved) window. After i saved the file as swagger.yml the preview worked.