Generate C# bindings using CppSharp

As stated in the HedgeLib++ announcement video, I wish to have AppVeyor generate C# bindings for HedgeLib using Mono's CppSharp. I haven't looked into how to do this specifically yet, though I don't imagine it's too hard.

Well, actually, it turns out this is going to be a major nightmare.
(This reply is long, so I've written some bolded TL;DR versions at the end of each section)
Alright, so HedgeLib++ has been going really well so far; I'm really happy with the benefits C++ provides, such as direct loading, compiling to native binaries (so no requirement to install the .NET framework or .NET core and very optimized machine code), the ability to use any C/C++ library (Qt is super nice), etc.
However, I of course still want people to be able to use HedgeLib from a C# environment. C# has some major benefits, too, especially now with .NET core and such. While I believe the end result is way nicer in C++, the development experience is way nicer in C#. If I just want to quickly slap together a personal tool for a specific use-case I'd much rather do it in C# as I'll quite literally get the same task done, just way faster.
TL;DR: I still want to have a way to use HedgeLib from C# in addition to C++.
The Problem
I've been aiming to make HedgeLib++ a C++17 library, not a C library that's just being compiled from a C++ environment. Because of this HedgeLib++ frequently uses certain C++ features such as constant expressions, smart pointers/RAII objects, and ofc stuff like templates and vectors.
Templates
Turns out CppSharp doesn't really support templates despite its wiki saying otherwise.
Therefore I can't generate C# bindings using it - I just get tons of errors.
CppSharp is probably the best method of generating C# bindings out there, so this is quite a problem.
Though I don't say that to diss CppSharp - it's a very understandable limitation, actually! I didn't really think about it until I ran into errors, but honestly, you can't really make template bindings like that.
See, C++ generates templates at compile-time based on all the types used in the code. If a variant of a template isn't used in the code (let's say Foo) the compiler won't include it in the compilation.
CppSharp generates C# bindings from C++ headers + compiled C++ objects. How could it possibly generate a C# generic for Foo if Foo isn't used anywhere in the C++ source and therefore isn't available in the compiled C++ object? It can't just compile a new version of Foo and add it to the compiled object - it's already been compiled!
Even if it generated from C++ source code instead of C++ objects, it's impossible for it to know exactly what types the C# users are going to use ahead of time. Just think about it. Like legit, just stop and think about how CppSharp could even do this.
TL;DR: CppSharp doesn't really support generating C# bindings for C++ templates, because of course, how could it possibly even do that?
.NET Core
.NET Core is Microsoft's new cross-platform implementation of the CLR.
Note the "cross-platform" part.
 If you compile C++ bindings, however, you need to also include the DLL the C# library is going to call upon.
With the .NET Framework this is a minor inconvenience, but it's nbd. Just include a native Windows DLL and a C# binding. But with .NET Core, to work properly cross-platform, you'd need to have a separate set of bindings for each target platform as you need to call upon separate DLLs, each with their own name-mangling as well since they're going to be compiled by different compilers.
That's just bad lol. Like I don't even need to say anything else about it.
TL;DR: Can't do a cross-platform .NET Core version unless you have a separate set of C# bindings + native DLLs for each target platform. Ew.
Alternatives
So basically, we can't use CppSharp as it doesn't support what we need (mostly templates) and can't without jumping through major hoops.
What can we do instead? Here's a few alternatives I thought of:
Write a C wrapper for HedgeLib++
Pros:

Only need one C# DLL + 3 native DLLs (Windows, Mac, Linux) vs. 3 C# DLLs + 3 native DLLs as the names will be consistent in each of the native DLLs due to C disallowing name-mangling.

Cons:

Extremely manual/tedious. This essentially means manually maintaining 3 separate codebases: HedgeLib++, its C wrapper, and C# bindings that call on the C wrapper. Every time I make a change I have to update all 3. No no no
Can't support C++ stuff like templates without jumping through major hoops.
Unfriendly C# interface unless we jump through hoops.

By far the worst option, we sure as heck aren't doing this. Just listed it for completeness.
Write a C++/CLI binding
Pros:

Only need one DLL which contains both the native, unmanaged HedgeLib++ machine code and the managed CLI that can be called upon from C#. Very simple/convenient!
Can support just about anything with a very C#-friendly interface.

Cons:

Essentially requires manually maintaining 2 separate codebases: HedgeLib++ and its C++/CLI bindings.
Windows only. Even Mono can't run these, you'd have to use Wine.
No .NET Core support even on Windows - Microsoft doesn't seem to have any plans to add support for C++/CLI to .NET Core either.
C++/CLI seems to be kind of a dying technology as Microsoft doesn't seem to have any plans to do anything with it.
Can't make a NuGet package to my knowledge as NuGet doesn't support C++/CLI packages(?).

If we don't care about cross-platform support, .NET Core support, or future-proofing the bindings, this could work. Otherwise... no.
Just port it to C# lol
yes I know what you're thinking
inb4 the jokes
hear me out
Pros:

Only need one DLL.
Can fully support .NET Core and/or .NET Framework.
Fully cross-platform either through .NET Core or Mono.
Allows for a very C#-friendly interface as it literally is just C#.
No issues with templates, etc. what-so-ever.
We can create a NuGet package with no issues.

Cons:

Requires manually maintaining 2 separate codebases: HedgeLib++ and HedgeLib#.

kill me but I'm actually kinda leaning towards the third option...
I know that sounds insane lol but I don't think it would actually be that bad once it's caught up to the current HedgeLib++, since from there all we'd have to do is make the same changes to HedgeLib# that we just made to HedgeLib++ - which is bad, yes, but you have to do that no matter what approach you use, even CppSharp is technically just automating this.
Maybe we could create a tool to automatically generate a port rather than just bindings to get around the issues I listed previously with CppSharp/other types of bindings? In that case it really wouldn't be bad
Sorry for the massive reply here lol.
My question is: what are your thoughts? I'd really like to hear them before I go and do something like this.

Honestly i think going back to HedgeLib# is a pretty stupid(no offence) thing to do at this point because it literally means taking a big step backwards(that is if im getting this right on my sleep deprived hours™), i personally think the best option is the CLI binding, since it is not a big deal to download the library from appveyor and not having the posibility to use NuGet since you need internet connection anyways, and to be fair i can not imagine someone trying to mod HE games on a linux system, sincd to begin with, no unix-based OS can run HE games at all, probably not even with Wine from what i know(i have had a linux system years ago, i tried to run gens), and as for mac, kinda the same lol; Anyways this is just my personal opinion, this is your project so i believe you can go for whatever option you want to, have a good day, BlackMail Boi™.

Thanks for the feedback!
Just for clarification, I don't plan on going back to what I was doing before - the third option would mean basically having two libraries, HedgeLib++ and HedgeLib#, with the latter being pretty much a direct port of HedgeLib++ except without direct memory loading (it'd still be better than what I was doing before though as I'd use new C# features like Spans to kinda simulate direct memory loading).
You make a good point about cross-platform support, though.
If people don't mind the cons with the C++/CLI route I mentioned above then that route would work well

I kind of left my thoughts in the Twitter thread. But an explanation of my view is that I'm not quite sure why such a binding is necessary and that you might be accidentally introducing unnecessary complexity for the sake of solving a theoretical problem (one that hasn't been truly encountered in development) which may be slowing down progress and taking up development time where it could be better utilized. If you still think a C# binding is a necessary goal, I'd go with writing a thin public facing C-Style API of some of the most sensible things to expose (editor debug drawing, file serialization, etc) removing most of the behind the scenes stuff the end user wouldn't need to see or interact with.

Well it's certainly not a requirement, it's just something I wanted to do so people could continue to use HedgeLib from a C# environment like they were able to before this C++ rewrite, as not everyone's comfortable with shifting over to C++ and some can't due to their tools, etc. already being written in C#.
This would simply cover HedgeLib, not HedgeEdit or the HedgeTools (those will still be purely C++), so there'd be no need for callbacks for drawing and such, just file serialization.
You're probably right with me overthinking things, though - I just assumed people wanted a way to access the rewrite from C# like they were doing before with old HedgeLib, but if I'm wrong and no one actually cares if there's a way to use it from a C# environment or not than this whole issue is just completely unnecessary.
I realize when I say it out loud that this all probably sounds a little silly. Again, maybe I'm overthinking things.
I guess the question should first be:
Is this really a thing people want? Or am I over-engineering/misjudging things?
I'd really like to hear what people who used HedgeLib before I started this C++ rewrite think since those are the people mostly impacted by this decision.

I don't personally use the library but I've watched some of the development livestreams but I think if someone has a use for Hedgelib++ they will probably be fine interacting with it and extending it in the language it's written in (C# and C++ are in the same family of languages so it might not be too difficult for people to adapt). Although if you do create C wrappers for stuff whenever you have the opportunity that will open up the possibilities for users to more easily generate bindings using to their language of choice should they actually want/need to. (that's atleast what I've seen be the most successful approach from other C/C++ libraries). Just don't stress about it too much and weigh down the development schedule.

Have you considered or tried using SWIG for creating bindings yet? It seems promising.

I would like to look at this realistically. Who really is going to use HedgeLib##?
Plus, the API and all is still in development and bound to change. I would worry about making C# bindings when you finally get to make a stable release.

@astrand130 Thanks again for the input. I haven't tried SWIG actually, but it's my understanding that one of the reasons CppSharp was created was actually to get around limitations with SWIG. It does look good though!
@blueskythlikesclouds I was only concerned with C# bindings because I thought others actually wanted them/would rather use them than C++, especially given some comments I've received over time, but judging from the replies already it seems I was completely wrong.

Alright, so several people telling me an idea of mine is bad in the span of a day is a good sign that my idea is bad lol. Being honest, I was only concerned with C# bindings because I said I would make them in the HedgeLib++ announcement video as I genuinely thought people would be upset without them/wouldn't use this just because it wasn't available in C#, but judging from the replies (so far anyway), it seems I was wrong.
With that said, you all are right. I'm overthinking things. Sorry.
I'll close this here. If you're someone who really wants C# bindings feel free to reply.


Aerial installation and config docuentation

Hi John. Thanks for developing this awesome screen saver. I tried following the docs and don't seem to have a "screensaver options" choice. Any idea how I can get these to display as videos and not static images?
https://www.dropbox.com/s/a28l1astwup7bjq/Screenshot 2016-03-04 14.49.07.png?dl=0
I'm running El Capitan
Thanks!
Hal

That's not John's Aerial screensaver that you've got selected there. It's the "Classic" screensaver that comes with OS X.
Scroll down the list on the left hand side and if you've installed John's screensaver you should see "Aerial" further down the list. See below.

You're awesome. I didn't notice they were different. Thanks for the tip!

Did you get the Aerial screensaver working now? If so, please feel free to close this issue. :)

I did, thanks. And I tried to close the issue but didn't find the "Close and comment" button until your message prompted me to check again.
Thanks for your help and your followup!


Pool accuracy

New pool test after 41b268c0eab5b75ad530af700909fee1a1e1c2a5
Test code same as
sfackler/r2d2-postgres#12
Expected: After idle_timeout pool redused to 2 connections
Reality: Pool reduced after max_lifetime to 3 connections and not renew used connections
Test query
SELECT a.pid, a.backend_start, a.query_start FROM pg_stat_activity a WHERE a.datid IS NOT NULL ORDER BY a.pid;

At  begin
15490 / 2018-09-28 09:19:49.329870 / 2018-09-28 09:19:49.332444
15491 / 2018-09-28 09:19:49.330124 / 2018-09-28 09:19:52.336268
15492 / 2018-09-28 09:19:49.332135 / 2018-09-28 09:19:49.334726
15493 / 2018-09-28 09:19:49.333422 / 2018-09-28 09:19:49.334606

After around 1min (max_lifetime = Duration::from_secs(60))
15491 / 2018-09-28 09:19:49.330124 / 2018-09-28 09:20:19.360589
15620 / 2018-09-28 09:20:19.349820 /
15621 / 2018-09-28 09:20:19.333852 /

After 2min
15491 / 2018-09-28 09:19:49.330124 / 2018-09-28 09:21:21.400551
19526 / 2018-09-28 09:21:19.334243 /
19527 / 2018-09-28 09:21:19.341293 /

So, what happens if we use two connections instead of one?
    loop {
        println!("LOOP");
        let db1 = pool.get();
        println!("1/{} {:?}", db_max, db1.is_ok());

        let db2 = pool.get();
        println!("2/{} {:?}", db_max, db2.is_ok());

        std::thread::sleep(Duration::from_secs(1));
    }

After few minutes
435   / 2018-09-28 09:59:27.376183 /
436   / 2018-09-28 09:59:27.377418 /
32146 / 2018-09-28 09:53:57.376039 / 2018-09-28 09:59:26.856081
32147 / 2018-09-28 09:53:57.376298 / 2018-09-28 09:59:26.856594

After more time used connections renew, but pool size not reduced
1447  / 2018-09-28 10:12:57.381760
1448  / 2018-09-28 10:12:57.381966
32146 / 2018-09-28 09:53:57.376039 / 2018-09-28 10:13:07.963099
32147 / 2018-09-28 09:53:57.376298 / 2018-09-28 10:13:07.963322

Same behavior on v0.8.2

Sorry for missunderstanding "Sets the minimum idle connection count maintained by the pool." expected min_idle = min_size
But
min_size = active_connections + min_idle

Sorry, I'm not sure what you mean by that.

Nope, current behavior is very usefull


not support windows system with chinese language

not support windows system with chinese language.
PS C:\k> netsh interface ipv4 show addresses

接口 "vEthernet (以太网)" 的配置
    DHCP 已启用:                          是
    IP 地址:                           <IP_ADDRESS>
    子网前缀:                        <IP_ADDRESS>/20 (掩码 <IP_ADDRESS>)
    默认网关:                         <IP_ADDRESS>
    网关跃点数:                       0
    InterfaceMetric:                      15

接口 "Loopback Pseudo-Interface 1" 的配置
    DHCP 已启用:                          否
    IP 地址:                           <IP_ADDRESS>
    子网前缀:                        <IP_ADDRESS>/8 (掩码 <IP_ADDRESS>)
    InterfaceMetric:                      75

接口 "vEthernet (nat)" 的配置
    DHCP 已启用:                          否
    IP 地址:                           <IP_ADDRESS>
    子网前缀:                        <IP_ADDRESS>/20 (掩码 <IP_ADDRESS>)
    InterfaceMetric:                      5000

Not only with Chinese language, but this problem also occurs with other non-English languages. I think running chcp 65001 before executing netsh would be a easy way to fix this. I'd like to submit a PR to fix the issue @rakelkar .
Additionally, the project Calico also depends on this gonetsh. The change will be very useful for adapting it to Windows Server systems in various languages.


Authenticate against local pouchDB instance

I'm having difficulty following the API documentation for using superlogin against pouch instead of couch. The API documentation has the following line for the superlogin constructor:

userDB: This is the database that SuperLogin uses to keep track of users, distinct from CouchDB's _users database. You can pass in a PouchDB instance here or otherwise specify your database name in the config under dbServer.userDB

So I use the API like so (where app.localUsersDB is a node pouchDB instance).
app.superlogin = new SuperLogin(config, passport, app.localUsersDB);
This works no problem when connected to the internet but when offline users cannot login. My config object has the details for the remote server, and when the login fails I can see that superlogin is trying to contact that remote server instead of validating against the local pouch instance.
Is there any example code for using pouch instead?
Let me know if you need any more code snippets or config details.
Thanks!

I think the crux of the problem is not knowing what to set as the dbServer.host property in the config. I'm using a local instance of Pouch set up like so:
new PouchDB('./data/' + config.dbServer.userDB);
The documentation seems to suggest that passing this instance of Pouch into the Superlogin constructor is fine, let the login method doesn't work with having a host set. If I leave it blank it errors with a message of
Error: getaddrinfo ENOTFOUND undefined undefined:80.
If I change it to be a URL to my remote database I ultimately want to sync with. then it works - but only when I'm online. The whole purpose of using this local instance is to enable offline login (providing the databases have synced at least once previously).

Did you manage to get anywhere with this? I'm thinking of using superlogin but I need to be able to log in offline with pouchDb.

Something I noticed from the docs, the 4th param in the C'tor accepts the couchDb auth database. It also says you can pass the pouch instance as that param.
couchAuthDB: This should point to your CouchDB _users database or something else if you just want to test. Specify in config or pass in a PouchDB object here.
If you pass your pouchDB instance as the fourth param, does that sort it?
Note: I give this advice having never used superlogin but thought it worth looking in to.

Without talking about the fact it would be highly insecure you won't be able to do it.
How the session/login system works is a built in system in CouchDB.

I ended up swapping Pouch for a full blown local Couch installation and then handling the syncing between the two. I was attempting to get pouch working on the server with Node because the web app needs to be served from a Raspberry Pi, so I was trying to go as lightweight as possible; but in the end, I just had to put Couch on the Pi.
The 'local' Couch installation running on the Pi allows users to login (so long as they have previously been synced down from the central server) even if the Pi cannot connect to the outside world.

I've gone down a different route myself. I want to ensure my users come online every 24 hours so have set the timeout to 24hours on the token. This allows me to make sure they've paid etc and also means I don't need to auth against the pouch instance.
Just posting this here in case anyone finds the thread and needs some inspiration.


Support image and video capture with variable resolution

Both for collecting videos in reasonable aspect ratios (e.g. 720p) and for exporting images at high resolution (e.g. for printing).

cc @thowell


Method  with dose not work for laravel 5.3

Am I right understood, that method with has to work as origin method from laravel, if that so, then method dose not work for laravel 5.3 unfortunately

poorly documented


RuntimeError: NCCL Error 2: unhandled system error

when i use two gpus to run the main.py to train model on sthv2 dataset, got error as below:
Traceback (most recent call last):
File "main.py", line 378, in
main()
File "main.py", line 194, in main
train(train_loader, model, criterion, optimizer, epoch, log_training, tf_writer)
File "main.py", line 244, in train
output = model(input_var)
File "/home/simon/anaconda3/envs/tsm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/simon/anaconda3/envs/tsm/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 151, in forward
replicas = self.replicate(self.module, self.device_ids[:len(inputs)])
File "/home/simon/anaconda3/envs/tsm/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 156, in replicate
return replicate(module, device_ids, not torch.is_grad_enabled())
File "/home/simon/anaconda3/envs/tsm/lib/python3.8/site-packages/torch/nn/parallel/replicate.py", line 88, in replicate
param_copies = _broadcast_coalesced_reshape(params, devices, detach)
File "/home/simon/anaconda3/envs/tsm/lib/python3.8/site-packages/torch/nn/parallel/replicate.py", line 71, in _broadcast_coalesced_reshape
tensor_copies = Broadcast.apply(devices, *tensors)
File "/home/simon/anaconda3/envs/tsm/lib/python3.8/site-packages/torch/nn/parallel/_functions.py", line 21, in forward
outputs = comm.broadcast_coalesced(inputs, ctx.target_gpus)
File "/home/simon/anaconda3/envs/tsm/lib/python3.8/site-packages/torch/cuda/comm.py", line 39, in broadcast_coalesced
return torch._C._broadcast_coalesced(tensors, devices, buffer_size)
RuntimeError: NCCL Error 2: unhandled system error

how can i solve this problem? please.

Have you solved the problem? Would you please share your solution? thx


How to generate single-direction graph with SAM?

Hi~Thanks for your kind sharing. I run SAM algorithm with my own dataset.
First I use the API to generate a graph: skeleton = sam.create_graph_from_data(data)
Then I use another API to remove indirect edges: new_skeleton = cdt.utils.graph.remove_indirect_links(skeleton, alg='aracne')
Later I do causal discovery with the API: output = sam.predict(data, new_skeleton)
However, I find that every edge of the graph is still bidirectional. Is there a way to generate single-direction graph? After all, causal relationship must have certain direction. Thank you!

Hello,
There is no need for the input of SAM to be preprocessed with a algorithm such as ARACNE. The best is to give the full data to the model.
One execution of SAM provides a binary adjacency matrix representing the predicted causal graph. We noticed however that running SAM multiple times and averaging the results does provide better performance.
The output of the function is thus a matrix with confidence scores on each edge. From there on; it's up to the user to threshold between 0 and 1 according to the desired precision-recall. We noticed that one of the best values to threshold on is .7, as the resulting edges are a DAG and provides good performance.
Best regards,
Diviyan


Custom formula

Allow the ability to define a custom formula to be applied to an analog device's sensorOutput. Also allow a custom state name to be defined for the formula, and the ability to use that state as the display state.

Added UI support for custom formula (lambda) and custom state name for voltageRatio devices to Devices.xml.
The UI display for a custom formula is keyed to selecting the generic VR device.
Then, added code to voltageratioinput.py to look for the custom info if the device type is 0 (generic), and apply the formula.
Still need to create the new custom state so it can be updated.
(this is in the NEW-VINT-Devices branch)

Code added to add the custom display state name to the indigo device and also set it as the device displayState.  Should use of the custom state name be optional?

Question... is a custom formula of value for voltage devices?

Done for both voltage and voltageRation devices.

Added to master with https://github.com/perlman/phidgets-indigo/commit/241c1828f81642e9529301b55a715fb51e22e61d.


Improve list shrinking?

Is there a way to guide/force/improve the shrinking of lists, using the QuickTheories API?
In my test case, I execute a series of commands to an API. The test case usually finds a series of commands that make the API fail. However it is usually only one or two commands that is the root cause, but the list generator seem to have trouble shrinking the command list in a effective way. The shrinking get stuck on lists with a certain length while there still is a lot more of the list that can be shrunk. It might not be a problem on lists of length < 10 but on list lengths > 100 it is a problem.
I get output like this (relatively short list):
java.lang.AssertionError: Property falsified after 16 example(s)
Smallest found falsifying value(s) :-
[CmdA, CmdA, CmdA, CmdA, CmdA, CmdA, FailingCmdB]

while it would fail with a single [FailingCmdB].
Abbreviated test code:
  @Test
  public void probeApi()
  {
    qt()
      .withExamples(100)
      .withShrinkCycles(10000)
      .forAll(commandListGen()))
      .checkAssert(commands -> ... );
  }

  private Gen<List<ICommand>> commandListGen()
  {
    Gen<ICommand> cmdGen = arbitrary().pick(allPossibleCommandsList());
    return lists().of(cmdGen).ofSizeBetween(0, 200);
  }

It should be possible to improve the shrinking, the strategy at the moment is fairly simple.
https://github.com/ncredinburgh/QuickTheories/blob/master/core/src/main/java/org/quicktheories/impl/SimpleShrink.java
The input array (from which all types are generated) is shrunk by picking a random long and reducing it. If it is unable to do so then two bytes are reduced.
By convention the first generated long is used to pick the size of an array/collection/string etc, so a tweak to the strategy that increased the probability of the first long being reduced should result in shorter lists.
Experimentation would be required.

Pick will shrink towards the first element supplied. You can use the clumbsily named org.quicktheories.generators.Generate.pickWithNoShrinkPoint to pick without any assumed order.
Shrinking in quicktheories is fundamentally different than in scalacheck as it is not tied to (or aware of) types. This has the advantage that generators can be composed together and shrinking will magically work (we avoid this type of problem https://github.com/rickynils/scalacheck/issues/317), but it does mean it is difficult to optimise for specific cases.

There's currently no mechanism to inject an alternative ShrinkStrategy.

Thanks for all the answers. Since list shrinking by removing all unnecessary elements in list was essential for solving the problem at hand, I had to abandon QuickTheories and instead roll my own Java-based PBT-tool for those commands-against-API-testing scenarios. QuickTheories is still kept for all other PBT-testing ;-)
From my point of view, this is not a problem any more and I'll close this issue.
Side notes: The company I did this work on is unfortunately not big on sharing code and no, using ScalaCheck straight up in testing would have been too much of a leap for my co-workers (I think).

Thanks for all the answers. Since list shrinking by removing all unnecessary elements in list was essential for solving the problem at hand, I had to abandon QuickTheories and instead roll my own Java-based PBT-tool for those commands-against-API-testing scenarios. QuickTheories is still kept for all other PBT-testing ;-)

Did you look at the other existing Java-based PBT libs before rolling your own?
https://jqwik.net und junit-quickcheck are probably most relevant.

@jlink, I thought that I in 2018 had a good grasp on the PBT-library landscape in Java, and it would surprise me if I did not do some survey on it. However, I don't remember why I didn't go for any of the two. Maybe it was the integration with JUnit5 that sorted out Jqwik at the time. At a glance, both look like good alternatives today.


Difference to grinder

It would be great to get some information on how this package differs from grinder and what the advantage of derry is.
I think it would make sense to add a short note about that in the README since it covers similar functionality.

Grinder is more configurable as it has a dedicated config system that has to be written in Dart, bringing the advantages of being able to use Dart's libraries directly in the config. But it is definitely more work to do when you want is just to make a shortcut for a specific script.
If you're coming from a NodeJS background, derry behaves pretty much the same as NPM scripts except for the pre and post scripts, (which I will add to derry very soon). Derry helps you to write less redundant scripts. As written in this article about NPM scripts, it lets you avoid the need for tooling and configurations. It helps you use well-managed scripts, and it is something I wish pub would support natively. With the hope that if pub would support scripts natively someday,  I even named the derry config object scripts to make it easier to migrate.
scripts:
# ^ this should be named "derry" actually, which is common and as guided
# but I named it "scripts" in case pub would support scripts someday
# like `pub run build`
  build: pub run build_runner build --delete-conflicting-outputs

If what you need to do is to write a config for a very extensive task and to share it between CI/automation, and your development, grinder is very configurable and could be very useful. But if what you need is just to define shortcut scripts without hassling with configurations, Derry could be a hand. As written in this article even though NPM scripts are very handy and cover most of the use cases most of the time during development, it's not like you're obligated to use them.

if you are happy with your current build system and it accomplishes all that you need it to do, you can keep using it!
from https://css-tricks.com/why-npm-scripts

I believe both grinder and derry documentations are well written, a user could probably read both and decide what's the best for him/her.

a short note about that in the README

About that, I'll probably leave this issue open for people to see. Thank you for taking the time to open this issue, I appreciated ☺!

Perfect answer! Thanks.

Okay, grinder allows one to run other dart binary tools that you may have added to automate some item of your project workflow.  In fact, one can use Derry, build_runnner, and grinder together. I am switching to such a toolchain. Keep in mind that we no longer have Pub.build task however when using Grinder


Earn protocol WIP #18

18 of N pull requests.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (dev@572d46d). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #552   +/-   ##
======================================
  Coverage       ?   70.16%
======================================
  Files          ?      129
  Lines          ?     1354
  Branches       ?       78
======================================
  Hits           ?      950
  Misses         ?      404
  Partials       ?        0

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Output log message when no plugin can handle a message

This PR just adds a single warning log message when no plugin is registered to handle messages received on a channel. This log message helps with getting existing flutter apps working more easily.

Thank you for your PR.


Do you self-host or embed within your app?

Just ran into this project and it seems exactly what I need. However, just wondering how people use this.
I have a NextJS app and want email building capabilities. In this situation is the approach to startup a different self-hosted email-builder-js app and send the user their to edit emails, and then return to the main app.
OR
Can email-builder-js be seamlessly integrated into an existing app?
Just wondering how the community uses this library because based on the README.md, it seems like there isn't a way to integrate this into an existing app kind of like Unlayer.

@Arsenalist this is self host, you have example in packages->editor-example written with MUI, I think they have embedded option for their services 🤔


Improved "embed" block with poster image support

..for ability to specify custom poster via embed block config.
Maybe an approach similar to lite-youtube-embed can be adopted.This one is for Youtube. We'd need something similar but more generic. One option could be to take this as an optional block config to specify a poster image URL and show it on top of the iframe loaded by the embed block.

This is done via the video block.


Can you add a support for PHP documentation generator?

Reason/Context

There are a lot of websites based on PHP that wants to use it
Could help us develop the documentation on the fly and save us time

thanks

@albalakg do you mind giving us an example of what exactly you would like to have generated? 🙂

Closing down, cause of no further clarification.


add centroid object link

Related Issue(s): none
Proposed Changes:

add a link to Centroid Objects in proj extension

PR Checklist:

[x] This PR is made against the dev branch (all proposed changes except releases should be against dev, not master).
[x] This PR has no breaking changes.
[x] I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.
~This PR affects the STAC API spec, and I have opened issue/PR #XXX to track the change.~

LOL https://github.com/radiantearth/stac-spec/pull/1049

Thanks both!

woops sorry @philvarner 🤦🏻♂


Show more verbose message on import errors

Show more verbose message on import errors when using python -m aiohttp.web
User will see more details in case of problems with their code.
For example message:
aiohttp.web: error: unable to import defiler.server: No module named 'aiomysql'

is more useful then:
aiohttp.web: error: module 'defiler.server' not found

such messages can be even misleading

Please fix failed tests

Current coverage is 98.51% (diff: 100%)

Merging #1319 into master will not change coverage

@@             master      #1319   diff @@
==========================================
  Files            29         29
  Lines          6515       6515
  Methods           0          0
  Messages          0          0
  Branches       1094       1094
==========================================
  Hits           6418       6418
  Misses           47         47
  Partials         50         50

Powered by Codecov. Last update 2fd5b51...b784521

Thanks!


Change travis build to test stacks with the latest and minimum versions of Docker

Is your feature request related to a problem? Please describe.
We should test stacks with the latest and minimum (if specified by the stack) versions of Docker on travis
Describe the solution you'd like
The travis build will test the stack against the minimum version of Docker specified and the latest stable release of Docker, ideally in parallel

Taking myself off this issue as I am not actively working on it


Make gtests runnable from everywhere

Currently, the unit tests have to be run from project's main dir, because the fat32 tests use hard-coded relative paths to reach the build directory. It would be good instead to pass build directory's full path to the tests with a compile option.

Solved by commit f26622e1f996090794671960b5c54449d60fff78.


cloudshell_open won't: Incorrect Usage. flag provided but not defined: -page

When launching the Cloud Run Button from a readme, receiving the following error indicating an unknown flag, that stops the build/launch and disconnects the cloud shell.
Incorrect Usage. flag provided but not defined: -page

Thanks for reporting!  It looks like a recent change to Cloud Shell is passing the new param.  I'm investigating that.
Also, I sent a PR with a few fixes:
https://github.com/ghchinoy/eldamo-build/pull/7
The git url was invalid so I just removed it since it isn't needed in this case.

Thanks @jamesward !

We are working on rolling out a new release with the fix now.

BTW, I'll update this bug when the release is out.

The fix for this is out.  Let us know if you have any other problems.  BTW, there is another open issue you may run into: #118


Bug: deprecated assets should be end of search result list

Example:
https://bonsai.sensu.io/assets?utf8=✓&supported_platform_id=&q=sensu-plugins-cpu-checks&platforms[]=&owner_name=
This is returning deprecated asset at top of results, should be last.

:+1:

Just re-tested, search is broken in staging currently


clangd semantic-highlighting crash

clangd semantic highlighting triggers the assertion assert(Tok.R.start.line >= Last->R.start.line); when running on the following code:
int a\
b;

are we sure that's the assertion kicking in, and not the assertion around tokens starting and finishing on the same line ?


DCOS-10978 [1/2]: Introducing the JSONUtil

This PR introduces the JSONUtil class that contains a tokenizer capable of tracking useful information about a JSON string. With this utility:

We can resolve error paths to JSON line numbers
We can detect which variable was changed by the user
We can automatically focus on the UI field the user is editing in JSON

For example, running JSONUtil.getObjectInformation with the given input:
{
  "instances": 1,
  "ram": null,
  "env": [
    {"key": "name", "value": "test"}
  ]
}

Will return:
[
  {
    "path": [ "instances" ],
    "line": 2,
    "value": 1,
    "type": "literal"
  },
  {
    "path": [ "ram" ],
    "line": 3,
    "value": null,
    "type": "literal"
  },
  {
    "path": [ "env" ],
    "line": 4,
    "type": "array"
  },
  {
    "path": [ "env", 0 ],
    "line": 5,
    "type": "object"
  },
  {
    "path": [ "env", 0, "key" ],
    "line": 5,
    "value": "name",
    "type": "literal"
  },
  {
    "path": [ "env", 0, "value" ],
    "line": 5,
    "value": "test",
    "type": "literal"
  }
]

Fixed! :+1:

Restored a commit that I accidentally dropped 👼

THIS IS AWESOME! ✨  Great job. Feel free to merge once the test pass.


Add memcached meta and entity store urls for contentapi

Part of https://trello.com/c/BrKRdn4f/495-rebuild-gov-uk-app-deployment-pipeline
These are moving out of alphagov-deployment config files, so they need to be turned into env vars.

Interesting! I did https://github.com/alphagov/govuk_content_api/pull/272.


add possibility to configure wait_time_between_pulls through the endp…

Configure wait_time_between_pulls through the endpoint configuration file
Issue: #1276
Proposed changes:

remove parameter wait_time_between_pulls from rasa_core.run functions and rasa_core.agent.load_from_server
use value from model endpoint configuration (use 100 as default value as before)

Status (please check what you already did):

[x] made PR ready for code review
[x] added some tests for the functionality
[x] updated the documentation
[x] updated the changelog

My test cases are a bit weird with monkeypatch, but I don't want actually execute a request.


Update go-mysql-server dependency

Signed-off-by: Antonio Navarro Perez<EMAIL_ADDRESS>

[x] I updated the documentation explaining the new behavior if any.
[x] I updated CHANGELOG.md file adding the new feature or bug fix.
[x] I updated go-mysql-server using make upgrade command if applicable.
[x] I added or updated examples if applicable.
[x] I checked that changes on schema are reflected into the documentation, if applicable.

@agarciamontoro drop/create are not supported on gitbase.

@ajnavarro can you rebase?

@erizocosmico rebased


Newt issue

Hi,
I'm trying to do the first step to compile some projects with newt but I get the folowing error

I'm on windows, do you have any idea of what could be the reason ?
thx in advance,
Vilucas

Hi Vilucas,
It appears you do not have the  mynewt-dw1000-core repo installed. Did you do a newt install?
cd ./mynewt_dw1000_apps
newt install
cd ./apps

The mynewt-dw1000-core contains the BSP, and this is a dependent repo that is checkout with the newt install command. If successful you should have a directory ./mynewt-dw1000-apps/repos/mynewt-dw1000-core.

Thanks a lot for your quick answer.
It is now working, but I have a last (I hope) issue on flashing the device on my dw1001-dev board, indeed I'm stuck on the last cmd

I waited for an hour (i'm new to on-board dev)
I uninstalled and reinstalled newt and the gcc tool, tried to flash the hex file with nrfjprog cmd lines and read the output with PuTTY but it didn't work out.
I really don't see how to get away with this one.
regards
Vilucas

Hi Vilucas,
Did you erase the default flash that ships with the MDEK?
`
JLinkExe -device nRF52 -speed 4000 -if SWD
J-Link>erase
....
J-Link>exit
`

Hi again,
I was erasing only with nrfjprog, my bad.
It's now working, but when I load on the board and use the ' telnet localhost 19021'  I don't get the expected output

Hi Vilucas,
You need to run telnet localhost 19021 in a separate console while newt is still running. You should perhaps have a look at the Mynewt tutorials on same.

I did run the command on a fresh console just after running the target on the board. same issue, i don't have the expected output. My boards aren't on the same PC. I guess it's a dumb thing, but i can't find it.
Also, I tried the basic Blinky example with version 1.5.1 and 1.4.1 of newt on a  nRF840 and a dwm-1001 board. All work pretty well until I type the newt load  nrf52_blinky cmd. It doesn't print any error message, but the led doesn't blink.
I will try on a Linux ...

Hi Vilucas,
I see the problem it looks like the default configuration was changed from RTT to UART.
In ./twr_tag_tdma/syscfg.yml
Change:
CONSOLE_UART: 0
CONSOLE_RTT: 1

It's working well thanks. I'm looking to implement the measurement of the distance between nodes and tag on one of the apps.
I guess I should call the slot_complete_cb() fct with proper arguments in the main ?
thx again for ur patience.

Hi Vilucas,
Have a look at the twr_node_tdma/twr_tag_tdma pair; these provide the range measurement you seek. You do not call slot_comnplete_cb() this is a callback that is called by the MAC-Layer. You can use the slot_complete_cb() as a template for your application; currently, it just prints out a JSON string.

Hi again Paul,
I thought my issue was solved and I was wrong, I tried lots of things before coming back.
So I'm trying to have the range between the two devices and I thought I succeeded then I saw the output I got wasn't the output expected in the README
this output is the one when I flash the bootloader on the two boards

otherwise if I don't and follow exactly the steps in the README of the twr_node_tdma app I get this output after typing the telnet cmd on a fresh console

I don't have the ToF/range info.
If I put a printf in the while(1); loop, it prints my string 3 times then nothing.

this is my syscfg.yml file in the /d/mynewt-dw1000-apps/apps/twr_node_tdma/ directory

this is my syscfg.yml file in the  /d/mynewt-dw1000-apps/apps/twr_tag_tdma/ directory

I feel like the tag can't interact with the node.
Do you have any idea ?
regards
Vilucas

Hi Vilucas,
Are you trying to run both examples on the same physical machine? Newt does not support multiple targets as such only one board is getting port 19021.

I run them on two different machines, I connect the node to my main machine and run the tag on another PC, sometimes on an external batterie.
my newt and gcc :

I tried on two other boards, same situation. Also, I tried to connect the tag to the main machine and read his output  (can read the output only on the main machine so I have to choose which board i'm reading, I usually choose the node)


lock/unlock via numbers

I hate this pattern lock. Could you please add an option to use numbers for unlocking?  AppLock app on playstore does have this option. That's tge only reason i'm using it.

In addition to pin numbers, a few other options  are desirable for the AppLock lock screen:
Passwords
Knock Codes
and Fingerprints for devices that support it


feat(hooks): useEdgesData

Added useEdgesData() hook that works the same as useNodesData() but for Edges.

Thanks for your PR @jclumingkit ! We will have a look.


Add a component that allows to run recording rules on Grafana Agent

Background
In our K8s environments, one of the types of metrics we collect with Grafana Agent are the network flows between pods and outside IPs. Due to the clusters' size, as well as having explicit "source" and "destination" labels on the metrics, the cardinality is exploding, easily reaching above 10k metrics reported per node. We would like to conditionally reduce the cardinality of a couple of metrics, preserving specific labels and dropping others, prior to doing a remote write to Mimir.
Using prometheus.relabel to drop labels is not an option, because in our use case, it would generate duplicate metrics (i.e. there are metrics that are the same by all labels except those that we would like to drop), and so Prometheus would drop them (link to post explaining this). What we need instead is, paraphrasing the article
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 1
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 3
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 7

# Dropped label ip
my_metric_total{env=“dev”} 11

Assuming the multitude of labels that would be tedious to enumerate, an obvious solution to this would be the use of recording rules. Namely, rule like the following would work (followed by the relabel dropping the original metrics)
rules:
  - record: my_metric_total_noip
    expr: sum without (ip) (my_metric_total)

However, if we set up this rule in Mimir, this doesn't really help, as the metrics are already stored. If, instead, the rules ran on the Agent, only the Agent would have to deal with the metrics, while Mimir would only see the reduced-cardinality metrics
Proposal
We add a new component to the Flow mode of Grafana Agent along the lines of prometheus.recordrules that allows us to specify recording rules in a similar way to Prometheus. We could have a thin storage.Appendable and storage.Queryable implementation which is exported as a receiver and appended to; we would then convert our rule configuration into Prometheus-native RuleGroup, evaluate it, and register new metrics in the next component's receiver.

Hey, thanks for opening this proposal, I think that it makes a lot of sense :) We have a new proposal review process. I'd be happy to move your proposal to the active stage if you could add a little bit more details (could you rework it to use our template?) What do you think @mikemykhaylov?

A very similar idea is being implemented in prometheus. If it's accepted we could integrate it in the scrape component of Alloy

Sure, I'd be glad to rework it to the template! The Prometheus PR does look like something that could be used here; if that work wraps up I'll definitely take a crack at adding it to Alloy, in part as an excuse to get a refresher on Go 😅

I'm moving this proposal to "Active" state to discuss it more in-depth with the team and reach a consensus.

Just to follow up, do we have some updates on this? Adding a component that support it would be super helpful to reduce the cardinality.

Hey,
One concern about it was expressed in the Prometheus PR: How should counter resets be handled?
For example, if I aggregate two counters metrics A and B, if B resets but A doesn't, then my aggregated metric will be wrong.
If I understand correctly, this is only an edge case because counters should usually reset at the same time.
One solution to handle proper counter reset would be to do something similar to what VictorMetrics is doing: https://docs.victoriametrics.com/stream-aggregation/#total_prometheus.
For the first version, I would suggest documenting this issue and seeing whether a proper handling like this is worth it.
Unless there are blocking concerns to the proposal, I will move it to "Likely accepted" by the end of the week. Then we will wait one more week to wait in case a major concern arises. If not then we will move the proposal to "Accepted" and anyone will be free to implement it (please mention it in this issue before starting the work to avoid having several people doing it in parallel)

The proposal is accepted :) As stated above, anyone is free to pick it up, just mention it before starting the implementation to avoid duplication

How should this work with clustering? For example:
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 1      # ends up on instance A
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 3.  # ends up on instance B
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 7.   # ends up on instance A

The metrics required to aggregate would be on different Alloy instances, since we shard the targets. How would we want to handle this?
Or is this component meant to run only on single-instance deployments where scraping is not distributed?

Same as Prometheus handles it when sharding is activated.
From my perspective, all recording rules should be evaluated on all shards. You would not have any overlap, as the metric base does not overlap. Only the scrape jobs are sharded, not the recording rules.

Thinking on this more this  would not be a direct port/conversion of prometheus but something a bit different. Conceptually more akin to adaptive metrics. I think @sjentzsch is that it only applies to a single target scrape, the actual proposal might be closer to something like adapative metrics.

Same as Prometheus handles it when sharding is activated.

What are you referring to when you say Prometheus sharding? I'm not sure which Prometheus feature you're referring to.

From my perspective, all recording rules should be evaluated on all shards. You would not have any overlap, as the metric base does not overlap. Only the scrape jobs are sharded, not the recording rules.

If we did the above on my example, let's say, to calculate the avg without(ip) (...):
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 1      # ends up on instance A
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 3.  # ends up on instance B
my_metric_total{env=“dev”, ip=“<IP_ADDRESS>"} 7.   # ends up on instance A

We would get something like this:
my_metric_total{env=“dev”} 4      # calculated on instance A
my_metric_total{env=“dev”} 3     # calculated on instance B

without any further handling, one of these writes would fail with duplicate sample / out-of-order.


Upgrade Jinja2 to v3.1.3

This is for the main branch.
The version of Sphinx we were using is simply not compatible with Jinja2 > v3.0.3, so given that we had to upset the delicate balance of requirements anyway, the goal of this PR is now to bring all docs infrastructure for CI/CD as well as dependencies and indeed the docs themselves to the latest version.
Type of change

Documentation update

Description
Motivation is https://nvd.nist.gov/vuln/detail/CVE-2024-22195, quite simply. But the version of Sphinx that we were using was many years old and does not support a version of Jinja higher than v3.0.3.  So we need to update the entire set of dependencies for the documentation.
Additional details
I will make whatever changes are needed to the docs and/or to the CI/CD pipeline to make this compatible with Sphinx v7.2.6, which is the latest.  Please let me know if something isn't right or needs fixing, because this is the time to do it.
Related issues

https://github.com/hyperledger/fabric/issues/4607.

Release Note
This change does NOT impact users of Fabric, nor shall it impact the functionality of any release, past, future, present.   We are also unlikely to merge it until the docs look correct on RTD.  But be advised that they may indeed change.

Detailed review complete!

@Mergifyio backport release-2.5

@benjsmi The automated backport to release-2.5 failed due to merge conflicts. Do you want to create a release-2.5 PR manually?


Minimum IAM Policy Doc

What does this PR do?

Adds minimum IAM policy page to the docs.

Motivation

https://github.com/aws-ia/terraform-aws-eks-blueprints/issues/562
More

[ ] Yes, I have tested the PR using my local account setup  (Provide any test evidence report under Additional Notes)
[ ] Yes, I have added a new example under examples to support my PR
[ ] Yes, I have created another PR for add-ons under add-ons repo (if applicable)
[ ] Yes, I have updated the docs for this feature
[ ] Yes, I ran pre-commit run -a with this PR

Note: Not all the PRs required examples and docs except a new pattern or add-on added.
For Moderators

[ ] E2E Test successfully complete before merge?

Additional Notes

To validate ourself, we should also consider to apply the same policy to our current E2E AWS IAM Role used in the GH workflows.


Keeping compatibility with celery 4.x.x BaseTask subclass like PeriodicTask

fix #844
I'm using sentry_sdk 1.3.0 on python 2.7 with celery 4.4.6 and I'm having an issue with apply_async from PeriodicTask task instances. Following the @ahmedetefy leads I decided to open this PullRequest I'm not sure if it is the best way to fix that.
[2021-07-16 18:15:01,512: ERROR/Beat] Message Error: Couldn't apply scheduled task cron_jobs.periodic_jobs.schedule_report: unbound method apply_async() must be called with Task instance as first argument (got TaskType instance instead)
Traceback (most recent call last):
  File "/usr/local/pythonenv/myproject/local/lib/python2.7/site-packages/redbeat/schedulers.py", line 437, in maybe_due
    result = self.apply_async(entry, **kwargs)
  File "/usr/local/pythonenv/myproject/local/lib/python2.7/site-packages/celery/beat.py", line 400, in apply_async
    entry, exc=exc)), sys.exc_info()[2])
  File "/usr/local/pythonenv/myproject/local/lib/python2.7/site-packages/celery/beat.py", line 392, in apply_async
    **entry.options)
  File "/usr/local/pythonenv/myproject/local/lib/python2.7/site-packages/sentry_sdk/integrations/celery.py", line 117, in apply_async
    return f(*args, **kwargs)
SchedulingError: Couldn't apply scheduled task cron_jobs.periodic_jobs.schedule_report: unbound method apply_async() must be called with Task instance as first argument (got TaskType instance instead)```

Hi @ahmedetefy What are your thoughts about this change? I would like to know if I am on the right path.
Thanks

Hey @kalmik
Thanks for opening the PR.
My approach was similar.. but I decided not to pursue it because it doesn't capture spans properly (for performance).
Did you manage to see a span of your celery task?
This is probably because Celery was setting the functions on this legacy Class dynamically on runtime so I was not able to monkey patch it, if I remember correctly
Anyways, considering this again maybe its not a bad idea to add this to not break backwards compatibility if we document that performance might not work properly with this hack...
Can you please document that somewhere and add a test?

Sure thing, I can provide it shortly.

I didn't forget about it, I've created the test and I think I could get the way to get it patched correctly (I HOPE) I think by this week I came up with the final patch.

Or at lease add information in migration guid, that old celery is not supported (I have celery version 3.1.27 in project and it also broken by newest sentry-sdk)


chore: Pin reqwest to 0.11.20 to avoid issues with #686.

To pin, you need to use the = prefix. Otherwise, the default resolution for a version is: 1.2.3  :=  >=1.2.3, <2.0.0
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-cratesio

To pin, you need to use the = prefix. Otherwise, the default resolution for a version is: 1.2.3 := >=1.2.3, <2.0.0
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-cratesio

good catch!


usable with modded 1.15.2?

Hey, I have an arena server with mods on 1.15.2, and I don't want to build every arena in the same world. is there any way to use this with mods? like a mod version or data pack. I've researched and haven't found any way to do it but actual developers might have the secrets.

in the near future, no. mod work very differently as they use multi dimension and not worlds. You can try some Bukkit + forge hacks like catserver, but we don't offer much support of them.

Would kettle work? it seems to be in the right language for me, but I don't know if it goes to 1.15.2

I dont see MV supporting forge server in the near future, sorry.


Add HttpActionInterceptor to be able to debug HTTP requests

I would like to be able to intercept HTTP request in order to debug what I am going to send via HTTP. So I implemented ActionInterceptor. Let me know what do you think about this idea.
https://github.com/siman/gatling/commit/e503ab5a4fc1606ede53d2c187ac81e846d34640
P.S. I haven't written any tests yet.

@siman Sorry for the late answer (vacation).
I'm not very fond of this, that looks more like a hack than a feature.
Do you know that you can have HTTP requests and responses in the logs, when you lower the logging level?


[stable/postgresql] Volume permissions

@Bitnami @desaintmartin
What this PR does / why we need it:
Fixes an issue where the .user_scripts_initialized file can't be written due permission errors. This occurs on hostPath volumes (minikube) and leads to the entire initialisation to fail.
Checklist

[x] DCO signed
[x] Chart Version bumped
[x] Title of the PR starts with chart name (e.g. [stable/chart])

Hi @marcfrederick
I thinks this issue has been addressed on this PR https://github.com/helm/charts/pull/17154 which has been already merged.
Could you please confirm?

I thinks this issue has been addressed on this PR #17154 which has been already merged.
Could you please confirm?

Yeah seems to be fixed. Thanks for the quick response!


Top level Java package is wrong

Your top level Java package is wrong. It should be uk.gov.ons rather than com.github! From https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html

Companies use their reversed Internet domain name to begin their package names—for example, com.example.mypackage for a package named mypackage created by a programmer at example.com.

Closing since we no longer use Java 😸


http://www.codecur.io/us/sendaudio/widehall.wav is not found.

The default reverb audio file is missing.

I fixed the link, so it should work now. Thanks for raising this issue.


TypeError: 'bool' object is not callable request.user.is_authenticated()

Hi,
I stumbled upon a small issue.
In context_processors.py, request.user.is_authenticated() should be replaced by request.user.is_authenticated.
In older versions of Django, request.user.is_authenticated was a method. It is now an attribute  (source).
For reference, here is the complete correct code:
from django_messages.models import inbox_count_for

def inbox(request):
    if request.user.is_authenticated:
        return {'messages_inbox_count': inbox_count_for(request.user)}
    else:
        return {}

Regards,

This was already fixed in https://github.com/arneb/django-messages/commit/f391b119b74eebe34a8dfb089e7ced14d96cfcff 3 days ago.
A new release including this change will be made available shortly. Please use master branch instead, if it's urgent


C2D:  validation logic

We need to write the validation logic for c2d, which is going to be used by both initializeCompute and startCompute
Functions to implement:

[ ] checkEnvironmentExists (env)  - check if env exists, by getting envs from all cluster.  User cannot start a compute using an invalid environment
[ ] getAlgoChecksums  - given a algo did or algo ddo, get algo file checksum (by calling FileInfo) and compute container checksum (see https://github.com/oceanprotocol/provider/blob/main/ocean_provider/validation/algo.py#L325).   This will be used to match dataset requirments
[ ] validateAlgoForDataset  - given an algo DID + algoChecksums(from above), validate that dataset has no restrictions (see https://docs.oceanprotocol.com/developers/compute-to-data/compute-options#compute-options).  This way, we can ensure that only allowed algos can be run on top of a dataset
[ ] validateConsumerParameters  - given an input array of keys->values, validate that we have required fields or defaults are filled  (see https://docs.oceanprotocol.com/developers/compute-to-data/compute-options#consumer-parameters)

Hey team! Please add your planning poker estimate with Zenhub @an7e @bogdanfazakas @jamiehewitt15 @mariacarmina @paulo-ocean


How to add the WesBos vscode-theme-cobalt2

I'm trying to add the wesbos cobalt2 theme to vscode which is different from the vscode cobalt2 extension placed in the marketplace. can somebody map out some definitive steps to doing so?

Check out https://code.visualstudio.com/docs/customization/themes.
In general, for questions better use http://stackoverflow.com/questions/tagged/vscode.
That way more users can help and benefit from an answer.


Choppy playback, chunks 0 frequently. High latency,

My playback is pretty choppy. Seems to be network related. When connecting to a station directly on my computer or phone its fine. However on the esp32 I'm getting some 0 chunks listed from time to time. Im very new to this platform and application. Would i expect network wise the connections to be of similar quality?
This issue is on all of my 5 esp32 devices, All radio stations. Bitrate ranged from ~200kbps to ~50kbps, and the chunks ranged from 300+ to 0. Ill get smooth playback on occasion for 20-40 seconds then choppy. I do some see errors in the console. I setup a hotspot with my phone, and have the same issue - but its also not that great of a connection ~20mbps
Let me know if you have any suggestions on possible problems, or if there is some "poor internet tweaks".
[137869][I][helixfuncs.h:124] playChunk(): [helixfuncs] Sync found at 0x003F
[137876][I][helixfuncs.h:170] playChunk(): [helixfuncs] MP3Decode error -9
[137882][I][helixfuncs.h:63] helixInit(): [helixfuncs] helixInit called for audi                                                                                o/mpeg
[138146][I][helixfuncs.h:124] playChunk(): [helixfuncs] Sync found at 0x0047
[138159][I][helixfuncs.h:178] playChunk(): [helixfuncs] Bitrate     is 128000
[138160][I][helixfuncs.h:179] playChunk(): [helixfuncs] Samprate    is 44100
[138162][I][helixfuncs.h:180] playChunk(): [helixfuncs] Channels    is 2
[138169][I][helixfuncs.h:181] playChunk(): [helixfuncs] Bitpersamp  is 16
[138175][I][helixfuncs.h:182] playChunk(): [helixfuncs] Outputsamps is 2304
[138759][I][main.cpp:1277] showstreamtitle(): [main] Streamtitle found, 61 bytes
[138759][I][main.cpp:1278] showstreamtitle(): [main] StreamTitle='Elton John - S                                                                                tep Into Christmas';StreamNext='';

https://github.com/Edzelf/ESP32Radio-V2/issues/75#issuecomment-1755178480

Use local station.
Increase buffer size.

The decode error is normal at the start of a new station (when using software mp3 decoder).  I have no cure for the drop in the network input stream.


Ambiguous Notify Error

Answers checklist.

[X] I have read the documentation ESP-AT Programming Guide and the issue is not addressed there.
[X] I have used the latest released firmware or have updated my ESP-AT 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.

General issue report
I create a notify characteristic. My proprietary iOS application creates a connection and subscribes to the characteristic. My MCU tries to upload a large amount of data.
During a connection, probing the Rx trace shows:
at+blegattsntfy=0,2,2,537
<data_bytes>
at+blegattsntfy=0,2,2,513
<data_bytes>
at+blegattsntfy=0,2,2,513
<data_bytes>
The Tx line replies:

OK

ERROR

ERROR
The errors appear after around 200 successful transmissions of a similar size.
Can I find a more descriptive error code? How can the issue be resolved?

I have determined the error is not due to a disconnection. The response is different. A disconnection message appears and no prompt ,'>', is given:

OK

OK

+BLEDISCONN:0,"71:15:e3:e4:b0:5e"

ERROR
ERROR

@Peter-B4321 Please use the latest ESP-AT firmware to test and see if the problem persists.


ListBox does not select properly with repeated items

Only one of the top three lines will be selected wherever you click
<ListBox >
    <ListBox.Items xmlns:sys="clr-namespace:System;assembly=mscorlib">
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
    </ListBox.Items>

    <ListBox.ItemsPanel>
      <ItemsPanelTemplate>
        <StackPanel Spacing="2" />
      </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
    <ListBox.ItemTemplate >
      <DataTemplate >
        <StackPanel Orientation="Horizontal">
          <StackPanel Orientation="Horizontal" Height="24">
            <TextBlock Width="80" Text="{Binding}"></TextBlock>
          </StackPanel>
        </StackPanel>
      </DataTemplate>
    </ListBox.ItemTemplate>
  </ListBox>

ListBox.ScrollIntoView() is also affected by this. It'll only scroll the first instance into view.

@MarchingCube you mentioned you'd found some issues in SelectingItemsControl: was this one of them?

This is a different issue and I can already see it would cause issues in TreeView as well.

@grokys I checked the TreeView and it just crashes if there are duplicate items.

BTW, once we get compiler merged those duplicates would be literally the same instance. Because compiler uses ldstr for loading strings those would be interned by the runtime.

There may be perf benefits from changing how this works, the current solution calls IndexOf on the items collection which causes the bug but also is not very performant with big collections in virtualized lists.

One problem is that the SelectedItem there just discards the change to the selection as the item is the same. Interestingly if I double click the SelectedIndex will get updated.

I only found this as a side effect of creating a repro for another issue, it's not ever been a real world issue for me. but I can see uses for repeated items.

In my case, I had messages added to the list from events in my game and from players sending messages. It happens very often that the same message is displayed more than once, and scrolling to the first instance of that message automatically is very awkward.

any updates?
Workaround probably will be simple: just add Id property to the object.

I'll try and fix this tomorrow.


feat(webpack): add support for module-browser field

I don't think it is neccessary right now - because no one implements it: https://github.com/search?l=JSON&q="module-browser"&type=Code
Also the linked issue seems like just an idea that hasn't been implemented anywhere: https://github.com/webpack/webpack/issues/4674


shDerefSimple missing in bash keyword group

First, this site is great! It's helped me remake my theme I've been used to using for years in other editors.
I noticed there doesn't seem to be a shDerefSimple keyword in the bash keyword list. It's in the example script, but unless I missed it I didn't see it in the keyword list.

This can be worked around by manually editing the keyword group FWIW.

Thank you for your kind words and for finding the missing keyword!
It seems I'm using old syntax files, I've updated them now for bash and a bunch of other languages.

Thank you for the quick response!


Add custom category command

The command should show options to add, view and delete custom categories. These will be in their own issues, so you simply need to print the options, take the user selection and call the corresponding function.

With the command "/category" the bot is able to  manage categories now.


Added start and end time data to context['game']

start_time: start time of the game in second since the epoch time
end_time: end time of the game in second since the epoch time
start_offset_msec: value of context['game']['msec'] on stat_time
end_offset_msec: value of context['game']['msec'] on end_time

The following change is the next PR after this PR.
https://github.com/hasegaw/IkaLog/commit/76dd1272653ff6580afcee26eb48f73c6fb539e1

you're right

Ah, sorry and thank you for the fix!


Split changelog guidelines into separate tabs based on repo.

What does this PR do?

Before

After

Motivation

Feedback about changelog guidelines.
Additional Notes

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Changelog entries must be created for modifications to shipped code
[ ] Add the qa/skip-qa label if the PR doesn't need to be tested during QA.

Dear folks from documentation. I'm merging this because it's essentially a change in formatting, there's negligible change to content. Feel free to provide your feedback if you think it's needed.

@iliakur I'll open a Jira card so that our developer docs writer takes a look. If you merge this before they have done that, any changes can be PRed separately. Thanks!

DOCS-6797


[REQUEST] Add data view option in complete log debugger

please add an option for data view in complete log debugger and also if possible to add a search option because I know there is option ctrl + f but it selects all from the right data too?
add option that belowo

I think you're looking for this

as for the custom search box, as said a thousand times, I'm not going to do it sorry


Wasm decoding failed: table index X out of bounds

Hello,
I'm having an issue when trying to call a declared C extern (setInterval) with a closure and building the library in release (-C  lto) mode.
Cargo.toml:
[dependencies]
wasm-bindgen = "0.2.17"
wee_alloc = "0.4.2"

[lib]
crate-type = ["cdylib"]

[profile]

[profile.release]
lto = true
opt-level = "s"
panic = "abort"

lib.rs:
#![no_std]

#![feature(
    alloc_error_handler,
    alloc,
    core_intrinsics,
    custom_attribute,
    lang_items,
    panic_implementation,
)]

extern crate alloc;
extern crate wee_alloc;

#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

extern crate js_sys;
extern crate wasm_bindgen;
use wasm_bindgen::prelude::*;

#[wasm_bindgen]
extern "C" {
    #[wasm_bindgen]
    pub fn setInterval(cb: &Closure<FnMut()>, millis: i32) -> i32;
}

#[wasm_bindgen]
extern "C" {
    #[wasm_bindgen(js_namespace = console)]
    fn log(s: &str);
}

#[wasm_bindgen]
pub struct Julia {
    width: i32,
    height: i32
}

#[wasm_bindgen]
impl Julia {
    #[wasm_bindgen(constructor)]
    pub fn new (width: i32, height: i32) -> Julia {
        Julia {
            width,
            height
        }
    }

    pub fn print(&self) {
        fn handler () {
            log("test");
        }

        setInterval(&Closure::new(handler), 1_000);
    }
}

makefile:
all:
	cargo build --target=wasm32-unknown-unknown --release \
	&& wasm-bindgen target/wasm32-unknown-unknown/release/lib.wasm --out-dir out/ \
	&& wasm-opt -O3 out/lib_bg.wasm -o out/main.wasm

The build doesn't produce a corrupted wasm binary when the handler definition and setInterval invocation from print(self: &Julia) is removed.
Any idea why this can happen?
I didn't find any information on “table index” and wasm2wat (all binaryen tools, actually) refused to produce a wat output: 0000241: error: invalid export table index: 99.

Addendum: this happens independently of wasm-bindgen, which -- surprisingly -- does not complain about this error. I'm currently trying to somehow get a working AST of this binary.
Here is (1) the uncorrupted wasm binary without the invocation and (2) the corrupted one:
(1) uncorrupted.wasm.zip
(2) corrupted.wasm.zip

Addendum: I'm not exactly sure, but it seems to be related to the webpack build process (I expected the wasm file not to change).
File produced through cargo -> wasm-bindgen -> wasm-opt: ares_bg.wasm.zip
File produced through webpack from the wasm-opt artifact: db7d1aa3f3ce8a64a0a3.wasm.zip
What kind of aggressive optimization is the webpack build doing? I stripped all of the stdlib, use -C lto and wasm-opt, and the webpack build still cuts off 5KB from the 8KB file? 😕

Here's a binary diff of what the webpack build optimization strips from the original wasm-opt artifact:

Removing the preprocess invocation and updating all webassembly-dependencies of webpack to ^1.7.5 did not fix this issue. I will dig deeper and report.

Revising my previous statement: cleaning the workspace and the re-running the build with your tree does indeed fix the issue.

Ok great! Sounds like this was an upstream webpack issue? If that's the case I'm gonna close, but if it's still an issue here I can certainly reopen!


FIX: Make sure --cifti-output requires at least one of fsaverage{5,6}

Fixes poldracklab/niworkflows#309

Changes proposed in this pull request

Documentation that should be reviewed

Sorry for the history rewrite, I forgot that --no-fs-reconall and --cifti-output are mutually exclusive. After all that mess, the corresponding tests are here: https://circleci.com/workflow-run/c6b97b23-e35c-4d63-a9a7-eb7807299c7f


New Feature - Bulk Importer

Motivation and Context
Why is this change required? What problem does it solve?:
Bulk importer methods to ingest large quantities of data into Hangar.
The following module is designed to address challenges inherent to writing massive amounts of data to a hangar repository via the standard API. Since write-enabled checkouts are limited to processing in a single thread, the time required to import hundreds of Gigabytes (or Terabytes) of data into Hangar (from external sources) can become prohibitivly long. This module implements a multi-processed importer which reduces import time nearly linearly with the number of CPU cores allocated on a machine.
There are a number of challenges to overcome:

How to validate data against a column schema?

Does the column exist?
Are the key(s) valid?
Is the data a valid type/shape/precision valid for the the selected column schema?

How to handle duplicated data?

If an identical piece of data is recorded in the repository already, only record the sample reference (do not write the data to disk again).
If the bulk import method would write identical pieces of data to the repository multiple times, and the data does not already exist, then that piece of content should only be written to disk once. Only sample references should be saved after that.

How to handle transactionality?

What happens if some column, sample keys, or data piece is invalid and cannot be written as desired?
How to rollback partial changes if the process is inturupted in the middle of a bulk import operation?

How to limit memory usage if many processes are trying to load and write large tensors?

Rough outline of steps:
1. Validate UDF & Argument Signature
2. Read, Validate, and Hash UDF results --> Task Recipe
3. Prune Recipe
4. Read, Validate, Write Data to Isolated Backend Storage
5. Record Sample References in Isolated Environment
6. If all successful, make isolated data known to repository core, otherwise abort to starting state.

If it fixes an open issue, please link to the issue here:
Description
Describe your changes in detail:
Screenshots (if appropriate):
Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

[ ] Documentation update
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Is this PR ready for review, or a work in progress?

[x] Ready for review
[ ] Work in progress

How Has This Been Tested?
Put an x in the boxes that apply:

[ ] Current tests cover modifications made
[x] New tests have been added to the test suite
[ ] Modifications were made to existing tests to support these changes
[ ] Tests may be needed, but they are not included when the PR was proposed
[ ] I don't know. Help!

Checklist:

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have signed (or will sign when prompted) the tensorwork CLA.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

@elistevens you'll like this!


Fix up integration tests

wiby-test org uses the real package name (i.e. wiby) - not @pkgjs/wiby, which we use when unit testing.
cleans up some tests so that they don't break after https://github.com/wiby-test/pass/pull/1 / https://github.com/wiby-test/fail/pull/1 / https://github.com/wiby-test/partial/pull/1 are merged (can I get some 👍 there please?)
adds the GITHUB_TOKEN so that we can get integration tests during CI runs (although I'd like to retire most of them and replace with true integration tests, i.e. avoid exporting functions for the sake of testing)

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[Snyk] Upgrade react-router from 5.3.3 to 5.3.4

This PR was automatically created by Snyk using the credentials of a real user.![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to upgrade react-router from 5.3.3 to 5.3.4.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.

The recommended version was released on 2 years ago.

Release notes

Package name: react-router

5.3.4 - 2022-10-02

5.3.3 - 2022-05-18

    from react-router GitHub release notes

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:

🧐 View latest project report
📜 Customise PR templates
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.536%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
637

Relevant Lines:
640

💛  - Coveralls


Create new admin role for QF stuff

The role name can be qfManager.
This needs to have these permissions (based on what @laurenluz said in the Discord)

[x] add project to QF round
[x] remove project from QF round
[x] update QF round histories
[x] list project
[x] create/edit a new/active QF round
[x] update all QF round parameters (min USD, matching pool, start/end date)
[x] add/remove sybils
[x] add/remove disqualified projects(project fraud)
[x] export QF round data to spreadsheet

@maryjaf  It's on staging you can test it now, Please tag @Meriem-BM  and Me if there is any problem.
Permissions should work as it's written in the https://github.com/Giveth/impact-graph/blob/staging/docs/adminPermissions.md

@mohammadranjbarz I've created this new user and set "qf manager" role https://impact-graph.serve.giveth.io/admin/resources/User/records/733/show
but I couldn't login with this  setting email address and passwrod
<EMAIL_ADDRESS>Should sth else be set ?

@mohammadranjbarz I've created this new user and set "qf manager" role https://impact-graph.serve.giveth.io/admin/resources/User/records/733/show but I couldn't login with this setting email address and passwrod<EMAIL_ADDRESS>Should something else be set ?

I just added a qfManager user few minutes ago and it works well, I guess we have more than one user with that email address, in this case it might not work, please make sure of that with an admin user

[ ] 1- QF manager role han't access to create/ remove a  record on Sybil and Project Fraud page, it has only filter access on these 2 pages

@mohammadranjbarz @Meriem-BM

add project to QF round
[x]  remove project from QF round

[ ] 2- There is no access to these 2 actions for QF manager role

[ ] 3-
Project Status reason and Project status history are also shown for qf manager role, and these 2 menu aren't exist in above list,Is there a special reason for showing them or should be removed based on the list?

Project status history
QF manager role has still  view access on this page"Project status history"
This access isn't in the above list
I think it should be removed ?am I right? @Meriem-BM

I see, you are right @maryjaf, I will remove it.


Extract asynchronous test utility method into a reusable method

There's some asynchronous test code used throughout the framework, that each use manual implementations of await/expectation code. However, we already have a utility method for this in HUBViewControllerTests, called performAsynchronousTestWithDelay:block:. Extract this method into a helper category (for example) so that it can be reused in multiple places.

Would you suggest creating a base test class that contains the reusable methods that all other test classes inherit from?

The Hub Framework is being phased out at Spotify, and therefore we will not be maintaining it further.


Comment type #238

Fix #238

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


Out of sync selectionState within decorator strategy

It would be nice for developers to be able to get the selectionState within a decorator strategy. When trying to do this with this.state.editorState.getSelection() inside of the decorator, the data seems to be out of sync.
Try creating a decorator with this strategy
strategy: (contentBlock, callback) =>  {
     const editorStateText = this.state.editorState.getCurrentContent().getPlainText();
     const contentBlockText = contentBlock.getText();

     console.log(editorStateText);
     console.log(contentBlockText);

     //...
},

You will notice that contentBlockText will be one character(or keystroke) ahead of editorStateText when typing.
Does getting an up-to-date selectionState within the decorator strategy seem like a good idea?

This has come up a handful of times. I think it would be reasonable to provide SelectionState to decorator strategies, especially since people have requested being able to decorate selected ranges.

I'd love this as well.
I want to apply a decorator /only/ when the cursor is within the block of text.  Problem is I'm always a keystroke behind so it gets confused in certain corner cases of backspacing (index is 0 when its actually 1, 1 when its actually 0) when I attempt to use getSelection().
Is there a workaround?

I know its been 3 years. Did you find any decent work arounds? @butchmarshall or @hellendag.
I have a similar use case to @butchmarshall and ran into similar issues.

Alright I solved this with patch-package. Here is the relevant diff. (It is a little messy but its not on master yet 😅.
The general idea is anywhere we call decorator.getDecorations we want to pass in the new SelectionState as an extra parameter. I thought of setting the new SelectionState on the contentState as selectionAfter but I think that would potentially break things.
getDecorations is called in regenerateTreeForNewDecorator, regenerateTreeForNewBlocks, and generateNewTreeMap. I modified each of those functions to accept a new parameter newSelection.
Those functions are called in two places. EditorState.set and EditorState. create. In EditorState.create we don't have an existing selection so I just call generateNewTreeMap with SelectionState.createEmpty(). In EditorState.set we either have a new selection in put.selection or we can use the existing selection from EditorState.getSelection(). I get the new or existing selection using var newSelection = put.selection || editorState.getSelection(); then pass that to the three methods I mentioned.
Finally the CompositeDraftDecorator needs to be modified to pass the newSelection parameter to the getDecorations method. That is straightforward.
If you are using DraftJS-Plugins you also need to modify the MultiDecorator to pass the newSelection parameter to the composed decorators.
This change enables a lot of really cool decorators which really on the position of the selection. Unfortunately since decorators are only called when content changes these are mostly useless. I don't think this should be added to draft-js but wanted to document the solution just in case anyone else got stuck here.


[BugFix] Fix multiprocessing shutdown errors

Don't use daemon threads in the multiproc worker machinery
Ensure that the LLMEngine is garbage collected properly, so that the executor and its non-daemon threads are shut down and don't cause the process to hang
Keep worker processes as daemons but add a check for sys.is_finalizing() to avoid logging any error messages in case they are killed non-cleanly prior to the main process (though this should no longer happen with changes 1 and 2)

There are still two warnings that appear consistently but I think that these are benign and we can investigate as a follow-on to this:
[rank0]:[W CudaIPCTypes.cpp:16] Producer process has been terminated before all shared CUDA tensors released. See Note [Sharing CUDA tensors]
/usr/lib64/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

@youkaichao with some more experimentation I found that the try/finally block there wasn't really sufficient anyhow. I've changed it now to include an excepthook to run the multiproc shutdown if the main thread exits abnormally. And with the other fix, the GC seems to work when it exits normally.

Hi, any update on it? 👀

Superseded by https://github.com/vllm-project/vllm/pull/8492


why I used homeassistant-homeassistant for a minutes, the homeassistant would crash

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.50.2
Python release (python3 --version):
3.4
Component/platform:
climate
Description of problem:
I want to control AC via siri. So I used homeassistant-homebridge, but If I control the homeassistant on homekit for a minutes, the homeassistant would crash.
Expected:
How to resolve this problem ?
Problem-relevant configuration.yaml entries and steps to reproduce:

Traceback (if applicable):

Additional info:

Without any information (which components you are using, error logs), there is no way for anyone to offer any assistance. Many of us are using Homebridge with HA without any issues, so looks like some configuration issue.

This is the bug/issue tracker for Home Assistant. Please use the forum for questions about installation, setup, and configuration.
If it's a bug, please re-open the issue with the issue template filled.


added takeaways from papers on the issue

I did some research on the topic and added the main takeaways along with the links. Love the idea, Gayatri.

Thank you so much for this!


Ev3GyroSensor should reset previousValue in setMode?

Describe the bug
It seems that the Ev3GyroSensor should reset its previousValue to -1 inside its setMode function to match the behavior of the Ev3ColorSensor. As noted by Evan here:

The checker logic uses -1 to indicate that data has yet to be received. Given that changing the mode changes the value space of the data being received it really ought to reset the previous value to indicate no data has been received in the new value space. Otherwise, the comparisons occurring in that code are really apples to oranges (or angles to rates).

Affects

[ ] Designer
[ ] Blocks editor
[ ] Companion
[ ] Compiled apps
[ ] Buildserver
[ ] Debugging
[X] Components

Thanks @BeksOmega. I think this is a trivial fix based on our earlier back and forth. However, until we can get access to the Ev3 hardware in the lab we can't really test it. Do you want to prep a PR? If not, please go ahead and mark this as help wanted.


Now works in Singularity

All Docker and Singularity tests pass.
Currently running a complete job in Docker on a laptop since our Flywheel instance is a bit out of sorts right now.  Still need to run on platform.
Should go ahead and try on customer's instance in the meanwhile though.

Holding off on merging this pending real test runs on HPC cluster using Singularity.


Disable Chrome reflected XSS protection on debug page

Chrome was falsely detecting a potential XSS attack on the debug
console. This patch disables it on the debug page only with
X-XSS-Protection: 0

Anyone have objections?

Applied.


Things to do for next release

We shall have a new release after the unified API is implemented in databroker and clients/feeder support it (existing kuksa.val server userland without loosing support for server).
We will sync release version (i.e. not different versions for different releases, we'd rather make a new minor release if something important changes, and not which components didn't change)
As databroker is 0.1.7 currently and val-server at 0.2.1 , next release shall be 0.3
This is to list/track everything that needs to be done, before we can call it a release

[x] Unified API implemented in all relevant components

[x] databroker
[x] Python SDK
[x] Go SDK

[x] Feeder

[x] CAN Feeder
[x] GPS Feeder
[x] (if exists) SomeIP Feeder work with val-server and databroker

[x ] Python SDK renamed to kuksa-client #318

[x] Release 0.3 tagged/released

[x]  0.3.0 tag exists
[x] docker pull ghcr.io/eclipse/kuksa.val/databroker:0.3.0 image exists and works
[x] docker pull ghcr.io/eclipse/kuksa.val/kuksa-val:0.3.0 image exists and works
[x] docker pull ghcr.io/eclipse/kuksa.val/kuksa-client:0.3.0 image exists and works
[x] Kuksa client package with version 0.3.0 exists in PyPi
[x] Created a "release" in GH, summarizing changes and links to the above mentioned images

Release done https://github.com/eclipse/kuksa.val/releases/tag/0.3.0


Allow passing of mixed_instances_policy to make use of spot pools

I imagine you'll be updating this to tf12 soon so I thought i'd get this in for 0.11 (so I don't have to set fire to the EKS setup) 👍
Copied the example that was there to test this; as the versions were all set to master I've had to switch them to valid versions (lest I fight trying to test it for ever more)
I've not updated the doc; figured I'd check if it was likely first :)

test will fail as the "complete" example (which i left alone) target tf12 modules

@ChrisMcKee
thanks for the PR
now that the module has been converted to TF 0.12, working example added, tests and test CI/CD pipeline added,
https://github.com/cloudposse/terraform-aws-ec2-autoscale-group/releases/tag/0.2.0
maybe you can open a new PR against master branch and add your changes.
It could be done now much easily using dynamic blocks (see other examples of dynamic blocks in the code).
You can also improve the example and tests (to test your features)
thanks


Enable resolution of variables in config paths

I have a desire to sync my configuration between machines where my username is different on each. Currently, the config backup just uses the raw path provided in the configuration file and doesn't attempt to resolve any variables from within the path.
This PR updates the config backup process to resolve variables in the config path string, such as ~ and $HOME and thereby allow one config to be used across different machines.
The upshot of this change is it would be possible for someone to perform advanced backup and restore by setting environment variables to move files around between machines.

Hey! Thanks for the PR :)
This fix makes sense to me, and this is a good contribution. I think it makes sense to break os.path.expandvars(os.path.expanduser(config_path)) out into a utility function. There are likely more places in the codebase we'd like to use that function. Once that change is made, this seems good to go.


archive.Import: too many open files

Repro was on macOS with zar & zq commit b7023d5.
I happened to try importing the full 70 GB wrccdc set of Zeek logs. The failure message:
$ zq * | zar import -s 25MB -
archive.Import: run failed: open /var/folders/yn/jbkxxkpd4vg142pc3_bd_krc0000gn/T/zq-sort-293329507/248: too many open files

This class of problem has resurfaced multiple times in the iterations of software we've written in the past couple years. It's known that the default ulimit -n on macOS (or, at least, on whatever my Mac laptop happens to be running) is small compared to what we're accustomed to seeing on Linux systems:
$ ulimit -n
256

In these situations, the fallback plan has always been that we could just require users to up this setting before they can expect our software to work. However, in the past we've always successfully managed to make our software behave in a way that it doesn't require as many open files to function/perform, and hence has a higher chance of "just working" out-of-the-box on all of our target platforms. Therefore I've opened this issue to see if we can repeat the same yet again.

From the error string, this happens during the time sorting of data that archive.Import uses.

Verified in zq commit b2c8356.
Following the original repro steps, my zq * | zar import -s 25MB - of that 70 GB test data set did now run to completion without error. As the import was happening, I watched in another window as the temp space for the disk-based merge sort grew in size and eventually flushed out. During several repros of the failure case, the too many open files error would consistently show up right as the temp directory got to 31 GB in size.
$ while true; do du -sh zq-sort-607514208/ ; sleep 60; done
394M	zq-sort-607514208/
1.1G	zq-sort-607514208/
1.8G	zq-sort-607514208/
2.4G	zq-sort-607514208/
3.2G	zq-sort-607514208/
4.1G	zq-sort-607514208/
5.0G	zq-sort-607514208/
5.6G	zq-sort-607514208/
6.1G	zq-sort-607514208/
6.8G	zq-sort-607514208/
7.5G	zq-sort-607514208/
8.3G	zq-sort-607514208/
8.9G	zq-sort-607514208/
9.6G	zq-sort-607514208/
 10G	zq-sort-607514208/
 11G	zq-sort-607514208/
 12G	zq-sort-607514208/
 12G	zq-sort-607514208/
 13G	zq-sort-607514208/
 13G	zq-sort-607514208/
 14G	zq-sort-607514208/
 15G	zq-sort-607514208/
 16G	zq-sort-607514208/
 16G	zq-sort-607514208/
 17G	zq-sort-607514208/
 18G	zq-sort-607514208/
 19G	zq-sort-607514208/
 19G	zq-sort-607514208/
 20G	zq-sort-607514208/
 21G	zq-sort-607514208/
 21G	zq-sort-607514208/
 22G	zq-sort-607514208/
 22G	zq-sort-607514208/
 23G	zq-sort-607514208/
 24G	zq-sort-607514208/
 24G	zq-sort-607514208/
 25G	zq-sort-607514208/
 26G	zq-sort-607514208/
 26G	zq-sort-607514208/
 27G	zq-sort-607514208/
 28G	zq-sort-607514208/
 28G	zq-sort-607514208/
 29G	zq-sort-607514208/
 30G	zq-sort-607514208/
 30G	zq-sort-607514208/
 31G	zq-sort-607514208/
 32G	zq-sort-607514208/
 33G	zq-sort-607514208/
 34G	zq-sort-607514208/
 34G	zq-sort-607514208/
 35G	zq-sort-607514208/
 36G	zq-sort-607514208/
 36G	zq-sort-607514208/
 37G	zq-sort-607514208/
 38G	zq-sort-607514208/
 38G	zq-sort-607514208/
 39G	zq-sort-607514208/
 40G	zq-sort-607514208/
 41G	zq-sort-607514208/
 41G	zq-sort-607514208/
 42G	zq-sort-607514208/
 43G	zq-sort-607514208/
 44G	zq-sort-607514208/
 44G	zq-sort-607514208/
 46G	zq-sort-607514208/
 47G	zq-sort-607514208/
 47G	zq-sort-607514208/
 48G	zq-sort-607514208/
 48G	zq-sort-607514208/
 49G	zq-sort-607514208/
 50G	zq-sort-607514208/
 48G	zq-sort-607514208/
 38G	zq-sort-607514208/
 31G	zq-sort-607514208/
 24G	zq-sort-607514208/
 18G	zq-sort-607514208/
9.5G	zq-sort-607514208/
3.1G	zq-sort-607514208/
du: zq-sort-607514208/: No such file or directory

I also have to report that I burned some time at first thinking the fix had not been effective, and I can't explain precisely what I saw, but I'll describe it here in the interest of good science. It started from the fact that when I sat down to verify the issue, the number that came back from ulimit -n on my Mac was now 2560 where it had been 256 when I first opened up the issue. This was true even in newly-opened shells where I was attempting to do the verification. I am not aware of having done anything to my Mac's config that would have changed this setting. The one low-level thing that came to mind that happened in the time since I opened this issue was that I'd accepted an upgrade to a more recent version of xcode. 🤷
In any case, in that state, it seemed like the fix was not effective. If I left it at that higher setting of 2560, the zar import ran fine both at the original repro commit b7023d5 and the commit b2c8356 that has the fix. So, FWIW, if my Mac had flipped in this way in the past, I'd never have seen the symptom that led me to file this issue! But what's even more strange is that in that state, if I manually set ulimit -n 256 to try and make my system look like how it was back when I first filed the issue, even when testing with commit b2c8356 that has the fix, I could trigger the too many open files error.
I was super stumped at that point, so like any engineer, at this point I rebooted my laptop. At that point, ulimit -n was returning 256 like back in the day. And in that state I could consistently:

Repro the original too many open files symptom on commit b7023d5 where I first saw the problem
No longer saw the too many open files symptom on commit b2c8356 that has the fix

In conclusion, the fix appeared effective in the end, but I can't explain what I saw on that 2560 tangent. In the end after that reboot things seem sane, so... moving forward!
Thanks @nwt!