error: failed to compose Spin app, test, and virtualized Spin environment

Example app in spin-test repo works well.
However this is what I got from my app.
error: failed to compose Spin app, test, and virtualized Spin environment

Caused by:
   0: failed to encode composition
   1: encoding produced a component that failed validation
   2: instance 3 has no export named `incoming-response` (at offset 0x189b)

Test case itself is super simple: https://github.com/prefer-social/sparrow/blob/dev/seungjin/spin-test-apply/tests/src/lib.rs
Even it is not really touching any except testing spin_test macro.
Seems its generated sparrow.wasm is not friendly with wasm_test.wasm.
Can you think any possible reason it can complain the above message?

Double checked my spin.toml.
https://github.com/prefer-social/sparrow/blob/adf05c08963d72f0cdf66ba75774e716aad3298a/spin.toml#L21
Seems it is pointing the proper files/directories.

Got a similar issue:

The app I'm trying to test is the default http-rust template and this is my test:
use spin_test_sdk::{
    bindings::{
        wasi::http,
    },
    spin_test,
};

#[spin_test]
fn test() {
    println!("Test");

    let request = http::types::OutgoingRequest::new(http::types::Headers::new());
    request.set_path_with_query(Some("/?user_id=123")).unwrap();
    let response = spin_test_sdk::perform_request(request);
    assert_eq!(response.status(), 200);
}

Thanks for the report! I should have a fix for this coming very soon as part of a larger refactor. I'll make sure to tag this issue in the PR for that change.


BorderRadius.only or .symmetric for circularRadius

is there any way to apply circular border radius to one side?

 If you're not setting a constant, could you use a LayoutBuilder widget to get the height constraint, and then set the Radius.circulars to be half of the maxHeight constraint you get?

Closing since solved


Environment not properly detected

I have an already configured poetry environment and when I try to add it with this plugin using "Existing environment" the package list is empty.
PyCharm continually complains about missing packages, like mypy, pylint (I have plugins to managed them, and of course they are installed), but the code works without problems.
To Reproduce
Steps to reproduce the behavior:

Go to 'Python Interpreter'
Click on 'Add'
Select 'Poetry Environment' and then 'Existing environment'
Select the Python interpreter inside the existing environment (python.exe  file)

Expected behavior
A package list full of all my packages. PyCharm that recognize all my packages.
Screenshots

Environments (please complete the following information):

IDE: PyCharm Professional 2021.1.1 ]
OS: Windows 10 20H2
Poetry Version: 1.1.6
Plugin version: 1.1.3

NOTE: up to a week ago everything worked without problems, then a PyCharm update caused these problems.
Is it a know bug?
Thanks

@galen104
Thank you for creating this issue.
I don't know the plugin.
Is the plugin the following the link?
https://plugins.jetbrains.com/plugin/11086-mypy

Unfortunately, I can't reproduce the error on Ubuntu 20.04 :crying_cat_face:
IDE: PyCharm Professional 2021.1.1
OS: Ubuntu 20.04
Poetry Version: 1.1.6
Plugin version: 1.1.3

The plugin is this:
https://plugins.jetbrains.com/plugin/11086-mypy
but it's not a question of mypy plugin, pycharm can't see any of my installed packages.
With an old version of PyCharm Professional (2020.3) all works without problems.
.
NOTE:  to make it works with PyCharm Professional 2021.1.1 I had to uninstall the poetry plugin, restart the IDE, reinstall the plugin and restart it again. Now even with PyCharm 2021.1.1 I can see all installed packages.
It's weird, but if it has worked..I'm happy anyway :-)

What version of the plugin did you use with PyCharm Professional (2020.3)?
The supported version is different  2021.1 and 2020.3.
https://plugins.jetbrains.com/plugin/14307-poetry/versions
The problem may be caused by the version :thinking:

In the older PyCharm Professional (2020.3) I have installed the poetry plugin version 1.0.8.

Thank you for the information.
I checked the diff in the version. But, I can't find the reason for the problem. :cry:

It's weird, but if it has worked..I'm happy anyway :-)

If you don't other problems then We can close this issue.
Of course, I welcome comments from others users.

I don't want waste your time, for now the problem is solved, so you can close the issue.
Thanks.

FYI I also had this problem: I added an existing Poetry .venv directory and no packages were listed.  I uninstalled the Poetry plug-in, restarted, re-installed the Poetry plug-in, restarted, and now all installed packages are detected.
macOS 11.3.1, IntelliJ IDEA 2021.2 EAP (IU-212.4416.7), Python plug-in 212.4416.7, Poetry 1.1.4-212

I also encountered this problem. Whether I create a new poetry environment through the plugin or add an existing poetry  environment through the plugin, Pycharm cannot list the packages I installed, but when I add an existing poetry environment by "Virtualenv Environment", Pycharm can list the packages I installed. After I reinstalled the poetry plugin, the problem was resolved.

OS: Windows 11
Python: 3.10
Poetry: 1.1.11 (pipx)
Python plugin: 1.1.5-212
Pycharm: Build #PY-212.5457.59, built on October 19, 2021

@YogiLiu
Thank you for adding a comment.
This plugin is moving on PyCharm mainstream.
PyCharm 2021.3 EAP includes this poetry plugin code.
Could you please try the PyCharm 2021.3 EAP?
They changed some code when they merge this plugin into the PyCharm.
The problem may be resolved 🤔
Also, The feature should be supported by JetBrains.
https://youtrack.jetbrains.com/issue/PY-30702#focus=Comments-27-5323626.0-0
If you meet an error when you use the EAP, then would you please create the issue in youtrack?

@koxudaxi Thank you for your efforts to poetry.
I have not used PyCharm 2021.3 EAP, because I don't know if it is stable.
I will create the issue in youtrack if i meet other problems about poetry plugin.

@YogiLiu
Thank you for your understanding
I guess  PyCharm 2021.3  will be released soon 😄


Flatpacks and the Flatpacker 1001

About the PR

Formalizes the existence of flatpacks, small boxes that can be unpacked into machines via a multitool. These already existed for solar panels, station beacons, and AME parts, but now they can be created for any machine. This is done via the Flatpacker 1001, which, using the machine board inserted inside of it and some materials, can create a flatpack.
The cost of the flatpack is based on the material costs of the components it takes to assemble the machine + a small extra tax. Assembling single machines via flatpacks isn't cost efficient, but assembling a large number of them is, since you don't need to reprint machine boards.
Why / Balance

Explained at length in the machine upgrading rework doc.
Technical details

AMEPartSystem and its component have been fully scrapped in favor of the new flatpack system.
Media

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

:cl:

add: Added flatpacks, boxes that unpack into a full-sized machine when activated with a multitool.
add: Added the Flatpacker 1001 to industrial research. A machine capable of creating flatpacks from machine boards.

thanks god setting shop with this bad boy will be so fast and easy

this is rather good

This should have some sort of Emag interaction that lets you flatpack living and dead entities, would make stealing animals more easy as a thief.

This should have some sort of Emag interaction that lets you flatpack living and dead entities, would make stealing animals more easy as a thief.

would require fundamentally rewriting the system + it's literally not how the object works in the in-universe logic. The board is never consumed.

thanks god setting shop with this bad boy will be so fast and easy

Let's set up shop!
New construction options
To clarify, you insert a machine board into the flatpacker as a schematic of sorts, which lets you create a flatpacked version fits in your pocket and be deployed via multitool? And the board isn't used as mentioned prior?
I like this, a bit worried how this impacts gameplay if you have flatpacks to be deployed at a moment's notice

the more i imagine this idea, the more excited i become.

To clarify, you insert a machine board into the flatpacker as a schematic of sorts, which lets you create a flatpacked version fits in your pocket and be deployed via multitool? And the board isn't used as mentioned prior?

all flatpacks are size medium and can't fit in pockets, but otherwise yes.

I like this, a bit worried how this impacts gameplay if you have flatpacks to be deployed at a moment's notice

i mean i guess it could be an instant barrier, but it's a really expensive way of making one. it's significantly cheaper to just make iron foam or something.

i mean i guess it could be an instant barrier, but it's a really expensive way of making one. it's significantly cheaper to just make iron foam or something.

Substations explode on taking damage, I can see an engi trying to suicide bomb with them at least (me lol)


How to decode animated WebP only first frame

When creating animated WebP with image data, all image frames will be decoded. It may cost much memory. The WebP UIImage animation duration for each frame may be wrong. I need to use YYAnimatedImageView to display WebP, and image data is needed to create YYImage. I use SDWebImage to load image data. So, I should not decode all WebP image frames. This situation is like GIF and FLAnimatedImage. We load GIF data and decode only first frame. How can I get image data and decode animated WebP only first frame ?

There is some reason related to this questio, and I want spend some more time to talk about it.

The WebP UIImage animation duration for each frame may be wrong

SDWebImage from 4.1 fix the duration per frame bug in animated WebP. It use a calculation of GCD to each frame duration and repeat the UIImage several times and finally call [UIImage animatedImageWithImages:duration:]. See #1951 and #1952.
But to tell the truth, [UIImage animatedImageWithImages:duration:] method will keep all the instance into memory, this is suitable for small animted WebP images and have a really fast render performance. But when you decide to show many big animted WebP images, this may cause OOM.
YYImage, use another way to solve this issue. It create a UIImage subclass YYImage class, keep the image source into that instance. For Image/IO supported format, is CGImageSource. For WebP, is WebPDemuxer. And it also have one specify animted imageView YYAnimatedImageView. When you set a UIImage instance on it, it just show as normal UIImageView. But when you set a YYImage on it, it will use a CADisplay to render your image for each frame. It firstly decode, and then produce a CGImage through the inner image source when current frame's duration time reached.
This can keep that only single frame instance alive at the sametime. So can reduce large memory usage for animted images. But it also cost extra CPU usage, because of that implementation, it need to re-decoding each frame everytime even you just leave your App without doing anything. This is a time-space balance.

So, why SDWebImage currently use this implementation ? This may because of that SDWebImage historical design usage. It forcus on Simple and Category-friendly use case. So we do not need to including extra UIImageView subclass to showing the animated images.
But why we now have that FLAnimatedImageView ? This is because a huge refactory during 4.0 in #1575. We include FLAnimatedImage to support GIF rendering. Sadly, FLAnimatedImage does not do something like YYImage, it does not subclass from UIImage. And it just support GIF, but not general enough to support other animted image format such as APNG, WebP.
Maybe we can do another big refactor, to provide the same way like YYImage to support big animated images rendering. Such as create an new class SDAnimatedImageView and SDImage But this may cause a lot of time and we need contributer to support this feature. If someone need this, we can add a feature-request to future milestone. 👍

And also, for your last question:

How can I get image data and decode animated WebP only first frame ?

SDWebImage 4.2 introduece coder plugin. Which you can implement your own image decoder and encoder, see https://github.com/rs/SDWebImage/tree/4.2.0.
So for your case, you can just write a coder to produce a UIImage subclass instance like YYImage. Which just contains the first frame and keep that WebPDemuxer inside to decode other frames when you need.
In fact, since all our image decoding/encoding process exposed as custom coders. So you can even write a wrapper to use SDWebImage instead of YYWebImage to play with YYImage. (Sounds interesting ?). You just need to write a new category for YYAnimatedImageView, write a custom coder to directly call YYImageCoder methods, then combine them up :)

If you're still interested in this issue, try to see #2140. We introduce a YYAnimatedImageView like new image view SDAnimatedImgeView and SDAnimatedImage, which also take benefit from our custom coder plugins and integrate with all the lib(cache, manager, downloader, category). You can have choice to use normal UIImageView+UIAnimtedImage(small images, low CPU & high memory) or SDAnimatedImageView+SDAnimatedImage(big images, high CPU & low memory) by the same interface.

:) I'll create a YYImage+WebCache CococaPods with SDWebImage 5.x dependency. You can directlly use YYAnimatedImageView+WebCache to load anything with SDWebImage without YYWebCache. All the API looks the same as UIImageView+WebCache
This is done by mark YYImage to adopt SDAnimatedImage protocol and provide a custom class. This is how our SDAnimatedImageView works. And you can even feed YYImage to SDAnimatedImageView. Sounds good for you.

#2140 Merged. If who are interested in that New Animated Image Solution for iOS & macOS with custom coder support. You can try 5.x branch or wait for 5.0.0-beta release


Audit fixes

@Austin-Williams I have made all the suggested changes as discussed. Please cross-check them.
Please make sure that I haven't missed anything.
Also please cross-check the spelling and grammatical mistakes in the entire contract.
I am not so good with that :D

Pull Request Test Coverage Report for Build 49

25 of 25 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.1%) to 90.756%

Totals

Change from base Build 30:
-0.1%

Covered Lines:
141

Relevant Lines:
142

💛  - Coveralls


Fix issue where .env file is not loaded when quiet mode is used (#4027, #5006)

The issue
#4027 is incomplete because it stops the .env file from being loaded at all in quiet mode
The checklist

[x] Associated issue
[x] A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

Thanks @nomis but this is a duplicate PR of https://github.com/pypa/pipenv/pull/5010


fix(menu-surface): fix menu surface unit test typo

related https://github.com/material-components/material-components-web-react/pull/295/files/d4576483a5b86102622b69c18c3875de6394d1ec#diff-94120e1696cf7be2b63afd23e1514ac6

Codecov Report

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

@@           Coverage Diff           @@
##           master     #315   +/-   ##
=======================================
  Coverage   97.24%   97.24%
=======================================
  Files          36       36
  Lines        1489     1489
  Branches      163      163
=======================================
  Hits         1448     1448
  Misses         41       41

Continue to review full report at Codecov.

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


Hi boss, can you consider supporting the FTP protocol plz?

Please let PHP dominate the world😀

FTP is an old and inefficient protocol, and it almost will be eliminated soon.

FTP is an old and inefficient protocol, and it almost will be eliminated soon.

Sorry. At present, there is no plan to implement FTP protocol.
If you are interested, you can implement it by yourself. 😊

Sorry. At present, there is no plan to implement FTP protocol.
If you are interested, you can implement it by yourself. 😊


Execute plugin outside Obsidian / from command line

Hi,
I would like to publish my vault automatically.
Your plugin is great and the only one that really works for me and does not require a ton of third party tool installations.
Is there a way to launch your scripts from outside Obsidian ?
The way I would like to use it is:

Edit my vault on Windows ✔
Automatically push to github each x minutes ✔
On linux, automatically get the files from github ✔
Convert MDs to HTML with your scripts, from a command line ❌
From a script, Delete HTML files I listed as "Private" ✔
Copy the results in my webserver directory ✔

At this time, I manually launch the conversion in windows from your plugin, then copy the HTML to linux, but I'd rather launch the conversion on linux from a cron job.
Thanks for any hint on how to do that.

+1

Thanks for the suggestion.
I don't think I will be making a commandline tool as this realies heavily on obsidian's environment. There wouldn't be a viable way to make this work from the command line. I also cannot run the conversion in the background as, again, it relies on obsidian's renderer. I do think that there should be a solution for your use case, but I don't think command line features are the best solution, nor a viable one.
I will certainly keep this workflow in mind and look for ways to remedy this.
Thanks again.

I have gotten anumber of requests for something like this. I'd love to hear any ideas people have for ways to implement this. Here are the constraints I have:

Obsidian has to be open with the plugin installed and enabled.
The markdown files have to be part of the currently open vault (This maybe could change in the future, but not yet)
The export will open new files in the foreground and make it so obsidian can't be used until the export is done. (I hope to change this along with the previous one, however it is harder than it seems because of some weird behavior)

This means that if you want to export the vault while you are editing it needs to happen in a seperate instance of obsidian. It also means that I can't run the plugin independently of obsidian.
A commandline tool would be possible but it would have to be a completely seperate program that the user would have to install alongside the plugin, since javascript is not made for console applications and there is no way to directly interface with them through the commandline as they are not executable (let me know if this is wrong).
In the end it might have to wait until I can get something to work in the background (although it would still require obsidian). But if you have any suggestions please drop them here. Thanks!

For me specifically it would not be a problem to install a second obsidian on Linux (as the file that would be traited would be copies of my original vault anyway).
There would have to be a command like obsidian --export-html OUTPUT_DIR, that would

open obsidian
launch the export of the whole vault to the directory
close obsidian

The main issue there is the "launch the export of the whole vault to the directory" part. I am sure there is a way to do it, but I am not sure how to run a command in obsidian from an external program. I will definetly consider it though. Thanks for the input

I now have background exporting available, this should make it easier to automate the workflow. I am looking into implementing this now.

@ThomasLudwig Would a simple "Export the vault every x minutes" work for your use case? It would be simple and fast to implement and since you are already pushing every x minutes from one end it seems that would work.
On the other hand I could just write two script one batch and one bash (so nothing extra has to be downloaded) that would trigger an export in an open instance of obsidian and wait until it was complete.

Hi
Might be a solution. But a found a workaround for my "problem". My need was
to completely avoid human intervention and have cron jobs. Maybe a might
keep an obsidian open all the time on my Linux server ?
Le mar. 2 mai 2023, 10:03, Nathan George @.***> a
écrit :

@ThomasLudwig https://github.com/ThomasLudwig Would a simple "Export
the vault every x minutes" work for your use case? It would be simple and
fast to implement and since you are already pushing every x minutes from
one end it seems that would work.
On the other hand I could just write two script one batch and one bash (so
nothing extra has to be downloaded) that would trigger an export in an open
instance of obsidian and wait until it was complete.
—
Reply to this email directly, view it on GitHub
https://github.com/KosmosisDire/obsidian-webpage-export/issues/49#issuecomment-1531049081,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADNFWEBLMUE6GBD3VS26MPLXEC5VJANCNFSM6AAAAAAVY5DZC4
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi,
since you are at it, it would be also great to be able to choose the obsidian folder exported... 😄
instead of being able to export entire vault only.

Hi,
since you are at it, it would be also great to be able to choose the obsidian folder exported... 😄
instead of being able to export entire vault only.

You can already do this. Just right click any folder or file

Made an obsidian feature request, although in the related links I added there you can see similar things have been requested for quite some time now:
https://forum.obsidian.md/t/uri-scheme-execute-command/62567

How about copying the export-html-vault command to a export-html-vault-default one that uses sane defaults to export the vault (like multi file website + don't open after export)?
We could then use Obsidian Advanced URI to call this command from a CLI.

Made an obsidian feature request, although in the related links I added there you can see similar things have been requested for quite some time now: https://forum.obsidian.md/t/uri-scheme-execute-command/62567

Hey thanks, I took a look at this request and it looks like this is already built in to obsidian as well. I will look into implementing a commandline program to call the command using the URI actions.
(URI handler docs: registerObsidianProtocolHandler)

Note for future: Being able to automate this inside a docker container would be great because then the CLI would not rely on a seperate running version of obsidian, additionaly it should allow #140 to be implemented

@KosmosisDire I think this is very possible.
This can be achieved with the https://github.com/Vinzent03/obsidian-advanced-uri plugin with something as simple as curl to trigger and obtain a fresh copy of the vault. There is a POST /commands/<command_id> method to trigger commands. The only lacking piece of the puzzle is the command to export vault into predefined export path.
Then, we could run obsidian in docker using something like https://hub.docker.com/r/metal3d/xvfb to mock an X server, and only communicate with it via HTTP requests.  And in docker, user could mount a volume to the output path and use the output as web server's root.
It would be a bit cooler, if there was a way to expand the REST API somewhere around setupRouter routine here to install custom method and pass export directory and source directories (and possibly other options) on the URI. But a command that allows unattended export of the vault is enough to get started)

@Mikle-Bond
I think I may not even need the advanced uri plugin, because the obsidian API has a uri handler that can trigger commands. I would rather not require plugin dependencies because they are not automatic. Of course, more advanced things like passing information in the uri may not be supported with only that.
However everything that you have mentioned sounds amazing and summarizes very well the thoughts I was having surrounding this issue. Thank you for the resources and ideas!

@KosmosisDire Sorry, i linked the wrong plugin, I meant to link to https://github.com/coddingtonbear/obsidian-local-rest-api (probably 'cos the amount of tabs open in chrome)
I'm not sure how obsidian URI custom schemes would work over network and in docker. So the REST API would be a bit more in the spirit of docker environments.
Sorry again for the confusion

@Mikle-Bond Ah yes, I think I have looked at that plugin too. That's definitely another option. I wonder how difficult it would be to just make my own REST API built into the plugin rather than relying on a separate plugin? I have never really done anything like that before.

At this time, I manually launch the conversion in windows from your plugin, then copy the HTML to linux, but I'd rather launch the conversion on linux from a cron job.

I can imagine running this on a web server.  Locate the git repository there, and use a local hook, or use a webhook from something like guthub to call the server.  Obsidian could sit inside a docker container on the web server, and get activated for the publishing whenever the git repo gets a submission.

I'm a bit uncomfortable with the idea of turning obsidian into a server listening to requests on the public web.  Obsidian isn't written with this sort of thing in mind, and there's substantial security issues..  It could very easily turn into a way to run arbitrary code on the server, or even just to run arbitrary javascript in browsers.
From a security standpoint, I'd prefer to run a very simple web hook, that doesn't really take any input, just listens on a specified url, receives a request when the git repo has been updated, and runs a script in response.  That script would pull in the repo, and turn it into web pages via a command line interface.

@mc0e It kinda sounds like you are describing github actions with extra steps. However, I don't plan on creating anything where obsidian is open to the public internet. If you were to setup something like you described the security would be your responsibility. Anything I create to address this issue would be an offline cli compatible tool. Your usage of that tool would be up to you.

Additionally, any REST API I create (which would be local not public) will not allow the modification of any of obsidian's files. It would only allow you to set the plugin's settings and then export the files to a given directory.

@KosmosisDire Thanks for your work and effort.
I'm interested into this feature as well :)

Just as a small update on this, I played around with getting obsidian set up in docker. I was able to create a docker image which installs obsidian, opens it, automatically creates a new vault, and disables restricted mode to allow plugins to be installed or enabled. All this headless without user interaction. So I think I have a good path forward for getting this to work using docker.

Hello!
First of all I wanted to thank you for this project, I currently use it to share my university notes on gh pages and it works wonderfully.
About this feature, I'm willing to help finish this if you share your progress.
I would make a pr with my implementation but I'm stuck at disabling the restricted mode.

Awesome, I can definitely send you that. It's actually surprisingly simple. I'll post it here in a bit when I've got time

@spartacus04
Here is my docker setup, it has two scripts which are injected into obsidian on startup. One forces obsidian to create a new vault and open it, the other disables restricted mode. These scripts are injected using the electron-inject python library. Any other javascript can also be injected which can be pretty useful for automating any other tasks that need to happen to setup obsidian.
obsidian-docker.zip

Aight, I'll be working on it on my fork, I don't really have an ETA since I also have to study but I'll definitely put some work into it.

Hi @spartacus04, thanks for your work. I'm trying to run your scripts without success, it doesn't work even after simply forking this repository and creating a tag:

https://github.com/sykdan/obsidian-webpage-export/actions/runs/10975846065/job/30475944687
Looking into the actions history of this repo, it seems to be working over here; any clue as to what could the problem be on my side? I toyed around with apt install ... -f and similar options but to no avail.
Many thanks.

Hello, sorry for the late response, I don't really know why this happens, as theoretically the environment should be the same inside the docker container.
I'll try investigate the issue in the next few days


ConcurrentCache throws NullReferenceException

We are using the ConcurrentCache class from DotNext.Runtime.Caching in our project, with the LFU eviction policy.
We access values using the TryGetValue function, and assign values using the indexing operator.
// Initialize the cache
int capacity = 10000;
var cache = new ConcurrentCache<string, string>(capacity, CacheEvictionPolicy.LFU);

// Get value
bool success = cache.TryGetValue(key, out var value);
// Set value
cache[key] = newValue;

We used this in our project and ran it with multiple threads running simultaneously and after some time it crashed with a NullReferenceException. There is no specific instance that it crashes on, every time we run it it crashes at a different point.
Below is the full error:
Object reference not set to an instance of an object.
 at DotNext.Runtime.Caching.ConcurrentCache`2.DrainQueue()
 at DotNext.Runtime.Caching.ConcurrentCache`2.EnqueueAndDrain(Func`2 invoker, KeyValuePair target)
 at DotNext.Runtime.Caching.ConcurrentCache`2.TryGetValue(TKey key, IEqualityComparer`1 keyComparer, Int32 hashCode, TValue& value)

Any advice would be much appreciated!
Thank you

Could you turn on debugging symbols or launch the app in Debug mode? This will able to see line numbers within the code.

Here are the full details of the exception:
System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=DotNext
  StackTrace:
   at DotNext.Runtime.Caching.ConcurrentCache`2.DrainQueue() in /_/src/DotNext/Runtime/Caching/ConcurrentCache.Queue.cs:line 125

In addition, here is minimal code that causes the exception:
          var ds = new Bogus.DataSets.PhoneNumbers();
          var cache = new ConcurrentCache<string, string>(10000, CacheEvictionPolicy.LFU);

          Enumerable.Range(0, 14).AsParallel().ForAll(_ => {
              foreach (int i in Enumerable.Range(0, 100000)) {
                  string num = ds.PhoneNumber();
                  if (cache.TryGetValue(num, out var _))
                      continue;
                  cache[num] = num;
              }
          });

Good to have some code snippet, but I still can't use it because Bogus.DataSets.PhoneNumbers is unknown to me. Could you fix it in the way when I can just copy-paste the code and get the error?

Sure, here you go:
            var cache = new ConcurrentCache<string, string>(10000, CacheEvictionPolicy.LFU);

            Enumerable.Range(0, 14).AsParallel().ForAll(_ => {
                foreach (int i in Enumerable.Range(0, 100000)) {
                    string num = Guid.NewGuid().ToString();
                    if (cache.TryGetValue(num, out var _))
                        continue;
                    cache[num] = num;
                }
            });

Preliminary analysis: the issue with internal pooling. Replacing RentCommand with a trivial implementation that instantiates a fresh instance every time demonstrates stable execution w/o exception.

Related discussion on StackOverflow.

@shaltielshmid , could you check the latest patch from develop branch?

Absolutely, will test it by us tonight.

Works perfectly! Thank you!

A new version has been published.


Ensure skip_files are absolute paths

The filtering done on line 160 requires an exact path match. This change
ensures skip files are absolute paths when parsed.

Good catch!
Do you also need to use abspath during the filtering on line 160?


Feature: Total count for variable count values

For variable count values, eg "Stored ship n system" or "EDDI bounty awarded rewards n faction", is it possible to have EDDI iterate a count of the total for n and add it as a VA variable?  Eg, "Stored ship system totalcount".
I am using VA and EDDI to do a text log for my ship computer output and I am having problems using VA loops to iterate all of the n variables.  A total count to check the loop against would make things much easier.  Thanks!!!

Any arrays that come as part of events will have an 'entries' value providing the number of items in the array, for example '{INT:EDDI bounty awarded rewards entries}'.
Stored ships are a custom item, and this doesn't have an entries value at the moment.  I'll look to add this.

Odd, i didn't see that in the log.  I'll give it a try.  Thanks!

That worked for EDDI bounty awarded!  You may want to add that to the VA doc, if you ever get time to update it :)


Sending content dict with more keys than single 'text' causes channels to fail silently

Tried to send a content like this:
Group('chat-hi').send({'text': 'Nice!', 'a': 1})

and it made channels to stop responding at all.
I may be missing something obvious, but it looks like channels fail silently without any exception.

Daphne should be printing errors when that happens. Are you running runserver or daphne separately?

runserver at the moment

Hmm, it's possible that it's not logging correctly then. I'll investigate later.

thanks!
BTW, do you receive notifications about updates in closed issues?
I faced today some interesting issue and described it in: https://github.com/andrewgodwin/channels/issues/236

I did - I'll describe what that is over there.

Thank you!

Also getting this issue on my machine, I've updated all my requirements (except Twisted which I've kept frozen at 16.2 as recommended).
It only occurs when there are more keys than {'text': 'some text'}.  Channels work fine otherwise, it just seems to be happening when using Groups.  I thought Groups were broken entirely until I found this thread and tried deleting my other key:vals and only using text, at which point it started working immediately.

Part of my confusion is that Channel and Group take a dictionary expecting {'text': ''} or {'bytes': ''} instead of a keyword argument text=/bytes=, so I assumed when passed a dict it would dump the dictionary to JSON to send the resulting string over the wire.  Out of curiosity, why was the design chosen to take a dictionary instead of named arguments?

The Channel/Group system is generic, and not just for WebSockets - thus, it accepts any "message", which is a dictionary (there's a spec at http://channels.readthedocs.io/en/latest/asgi.html).
This means that the server which consumes the messages is responsible for erroring out when they don't meet the WebSocket specification. Daphne has code to do this but it's being swallowed - I'm in the middle of fixing it to print to the console during runserver right now.

Alright, I've fixed the error catching so it a) doesn't hang Twisted when it happens and b) prints to the console during runserver, like this:
[2016/08/06 05:16:58] WebSocket CONNECT /frontend/ [<IP_ADDRESS>:53739]
2016-08-06 05:16:58,831 - ERROR - server - HTTP/WS send decode error: Got invalid WebSocket reply message on websocket.send!mZXqOkrHeETS - contains unknown keys {'badkeyname'}

It'll be out in the next release pair of Daphne/Channels (I'll make Channels depend on the new Daphne version so you'll get both with an upgrade)

Thanks for the explanation and incredibly quick fix @andrewgodwin!


Documentation Typo

Greetings,
There is a typo on:
Page: http://rocketjob.github.io/semantic_logger/index.html
Section: Tagged Logging
Typo: "... all applicable threqds"
🙏

Thank you for letting me know.


[appconfig] Use core-http userAgentPolicy()

for browser telemetry after we changed the header key to x-ms-useragent.

This depends on #9490

Do we need to bump up our dependency for core-http to make sure we get the new behavior?

Do we need to bump up our dependency for core-http to make sure we get the new behavior?

Good point! I like bumping up the version.

I think I will do the version bump in a separate PR as it touches a lot of package when we want to depends on only one version of core-http.

Opened #9539 to bump the core-http version

Can we merge this now that #9490 is merged?

I wanted to merge #9539 too after storage release their previews.


[Question] Ability to only track one image?

Hi,
I was wonder, if I say 3 images that I want to track (like 3 different logos or something) but I only want to allow one to be tracked at a time (whichever is found first). Is there anyway for this kind of behavior?
Thanks in advance!

Hi @seanyusa,
You can simply add the 3 image markers and if/when the 1st one is found (onAnchorFound) you can either remove the other 2, or only add your content to the one that's found.
Thanks,

@achuvm great that makes sense, we've implemented and it's working. Thanks!
Do you know the performance of having many image tracking markers? Is it much difference comparing say 3 markers to 10?

Hi @seanyusa, we have not seen too much difference in performance from 3 - 10 markers. But performance can decrease based on what you are placing in the scene itself. For instance, increasing the number of complex 3D models in the same scene could result in performance slow down.


include offending line information for template encoding issues

Initial idea to handle #333 .
This caught me when we had to backport some new templates written for staging (Py3) to production (Py2).  It should catch similar encoding issues on PY3 as well.

New Gerrit review created for change 27cb5eee6795ec23b164ab1be41c1e8fe7ad632b: https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/2987

At @jvanasco 's suggestion, I'm closing this in favour of a Python 3-only approach.

Michael Bourke (bourke) wrote:
Abandoned in favor of #3406
View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/3142

Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/3142 has been abandoned.  That means that at least for the moment I need to close this pull request. Sorry it didn't work out :(


Image directory location

Minor question: I am adapting some previous .rst files with this very useful parser, but I am not having luck with the parser finding the images.
As usual, the directory for an image on the .rst file is from the base directory ./images/file.png for example, but no changes appear (alternative image only).
Any ideas? I could not find an example with an image.

Solved.


diffsync should be stateless

At the moment, diffsync stores all user documents that are necessary for the sync-cycle in memory. This has two implications:

Applications with a lot of peers consume a lot of memory and will eventually run out of memory at some point
Scaling diffsync to more than one node is pretty much impossible unless there is application logic in place that routes peers that work on the same document onto the same note. Depending on the applications architecture, this is quite hard to achieve. Also, holding this state in memory violates best-practices of many hosting platforms, such as e.g. Heroku.

In my opinion, the users' documents should be kept outside of the diffsync node e.g. in a redis instance.
Luckily, diffsync internally already reads data via an asynchronous interface so that the code changes should actually be pretty minimal. Regarding testing it should also not be too hard.
The main implication for the user would be an elevated sync time which depends on the type of data store and the distribution of the application's parts (node, intermediate data and permanent data). I guess it is okay to have this overhead in favour of getting rid of this extra state.
What do you think?

Is this about something other than https://github.com/janmonschke/diffsync#dataadapter?
My thoughts:

diffsync should always ship with a in-memory implementation by default so people can play with it
Could multiple diffsync servers let users work on the same document if there's a shared representation between servers? What then is the difference between clients and servers?

My thoughts about your thoughts: :thought_balloon: :cyclone: :thought_balloon:

Yes, it's about more than that. It is about how the internal sync documents are handled. But yeah, the API is basically the same with the addition of a removeData method that is used for scenarios when a client disconnects and the shadow documents are not needed anymore.
Yes, the in-memory implementation would still be in there for exactly the reason that you mentioned. Much like express is handling sessions.
Indeed, multiple diffsync servers could handle the clients for the same document and it is one step further into allowing clients behave exactly as servers.

Ouff, just saw that I did not implement the fetching of client shadow documents asynchronously :smile:
But I should have done it like that in the first place ;)

Oh no, running into a bigger problem here. Let's say that clients can reside on arbitrary nodes and those nodes take care of fetching the correct master document and the correct shadow documents for each client.
This leads to the problem that for each sync request, each node has to make up to four DB requests:

Get the master document
Get the shadow documents
Write the shadow documents
Write the new master document

These requests can be reduced to two requests if shadow documents were embedded inside their master documents (which would be easy for the case of schema-free databases).
But the biggest culprit would be that the database had to lock the document from step 1 to step 4 and could only release it afterwards. Other nodes could attempt to write to the same document in the meantime which would result in dirty reads and loss of data when writing.
Am I right with my assumptions? Or do I oversee a very simple solution on how to scale this to more than one node without having a load-balancer in place that gathers clients working on the same document on the same nodes.
@episodeyang How did you handle this problem?

It seems like Redis would be a good fit for storing the master and shadow, maybe paired with node-redlock.
Another alternative is to have the servers share the objects directly with each other. It seemed that Neil Fraser was more intrigued by this idea in his talk.
@janmonschke I'm interested in working on this problem so please let me know your thoughts on those two options.

@winton thx for you input :)
I definitely prefer option #2, which would still not make it stateless, but I also think this is the way Neil Fraser was advocating. Happy to follow your work on that!


Relax the sanity check in HttpClientUpgradeHandler

Motivation:
HttpClientUpgradeHandler currently throws an IllegalStateException when
the server sends a '101 Switching Protocols' response that has no
'Upgrade' header.
Some servers do not send the 'Upgrade' header on a successful protocol
upgrade and we could safely assume that the server accepted the
requested protocol upgrade in such a case, looking from the response
status code (101)
Modifications:

Do not throw an IllegalStateException when the server responded 101
without a 'Upgrade' header
Note that we still check the equality of the 'Upgrade' header when it
is present.

Result:

Fixes #4523
Better interoperability

@normanmaurer PTAL

LGTM

Cherry-picked into 4.1 (ef3a9b0acdc59d0d85de8f844499225ad225360c) and master (6d48a6ebd8ac45382991d2427886ee4e33d321ac)


[FEATURE] Storing commands in Atuin

It would be great to allow storing commands in Atuin on execution.

v0.6.0

Add support for storing commands in Atuin on execution
when using the --atuin flag (for #15)

This only works for single-line commands

v0.6.1

The --atuin flag now also add commands to Atuin for multi-line commands
(for #15)


Need terraform_tflint option to not find more paths to run in.

I need a way for terraform_tflint to not descend into subdirectories. I only want it to check the current directory.

Use case
I am using this with terraform module repositories. The module has a test/ directory that has a test invocation of the module that people can use to verify that their changes will plan out fine. This causes an error when running the pre-commit check.
Terraform validate with tflint...........................................Failed
- hook id: terraform_tflint
- exit code: 1

TFLint in test/:
Failed to load configurations. 1 error(s) occurred:

Error: `test` module is not found. Did you run `terraform init`?

  on test/test.tf line 27, in module "test":
  27: module "test" {

I ran a terraform init in both direcotories, but I think since tflint is being run from ./ it doesn't see that the module is loaded in ./test.
How could pre-commit-terraform help solve your problem?

Add an option to disable searching for paths to run the tflint check in. Just run it in ./

https://github.com/antonbabenko/pre-commit-terraform/pull/125 changed the functionality, causing the breakage. No mention of this change in the PR, only a minor version tick.

Add an option to disable searching for paths to run the tflint check in. Just run it in ./

You can achieve this by adjusting tflint hook configuration https://github.com/antonbabenko/pre-commit-terraform/blob/master/.pre-commit-hooks.yaml#L63-L70 like this: exclude: (\.terraform|test)\/.*$

@yermulnik Is there a way to do this in my .pre-commit-config.yaml or how can I modify the .pre-commit-hooks.yaml for myself?

NM, I firgured it out. I can just add an excludes setting in the .pre-commit-config.yaml

Great to hear you've managed this 👍🏻


Support key command

id command is already supported, but another useful one would be key.
key should be equivalent of what following command does on private key:
openssl rsa -in key.pem -pubout -outform DER | openssl base64 -A
If CRX/ZIP's manifest.json has a key field, then key command could be made to work also on such CRX/ZIP files and display their key then.
This key value is useful for developers to keep consistent ID:
https://developer.chrome.com/docs/extensions/reference/manifest/key

BTW thank you for creating the tool! This year I have to update my web browser extension, NavigUp, and migrate to Manifest V3 (known issues, checklist) to ensure its users won't be impacted by Manifest V2 support timeline, specifically:

June 2024: Chrome MV2 deprecation pre-stable rollout
June 2024 + 1-X months: Chrome MV2 deprecation stable rollout

At some point Chrome deprecated CRX2 format and introduced CRX3 - CRX₃ Design Doc. Beside relying on Chrome Web Store, I always self-hosted my extension too, so being able to create CRX3 easily will be super handy.

In the distant past I used crxmake, possibly https://github.com/Constellation/crxmake, but I have no notes to tell for sure. I refuse to accept need to use hundred megabyte browser binary to create crx file. If not for your tool, i.e. crx3, I would possibly had to write one for myself (most likely in C/C++). There are some JavaScript based solutions, but I'm not fan of JavaScript runtime environments like Node.js, and prefer more standalone solutions.

Thank you very much for the great ideas. I added the pubkey command in the new release.

Thank you for introducing pubkey command. Did you test it with CRX files out there?
I did a quick check on my extension (still not migrated to MV3, but in CRX3 format when obtained from webstore), confronting results with handy Chrome extension source viewer, openssl, and webstore. go-crx3 doesn't seem to provide proper results.
NavigUp
go-crx3
$ crx3 pubkey ~/Downloads/eigojmmlmgigbldiclbpibmjnlbdpiaa.crx
MIIBCgKCAQEAj/u/XDdjlDyw7gHEtaaasZ9GdG8WOKAyJzXd8HFrDtz2Jcuy7er7MtWvHgNDA0bwpznbI5YdZeV4UfCEsA4SrA5b3MnWTHwA1bgbiDM+L9rrqvcadcKuOlTeN48Q0ijmhHlNFbTzvT9W0zw/GKv8LgXAHggxtmHQ/Z9PP2QNF5O8rUHHSL4AJ6hNcEKSBVSmbbjeVm4gSXDuED5r0nwxvRtupDxGYp8IZpP5KlExqNu1nbkPc+igCTIB6XsqijagzxewUHCdovmkb2JNtskx/PMIEv+TvWIx2BzqGp71gSh/dV7SJ3rClvWd2xj8dtxG8FfAWDTIIi0qZXWn2QhizQIDAQAB

$ crx3 id ~/Downloads/eigojmmlmgigbldiclbpibmjnlbdpiaa.crx
eigojmmlmgigbldiclbpibmjnlbdpiaa

Extension page > Chrome extension source viewer > View source > Dev Console:
Public key (paste into manifest.json to preserve extension ID)
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDR8RyDbBAaZaEsh4VTye63j6QDOGP1YMSCJ+2KyJXH8IHneddHl2mUKD27FrNNUm7N6NnzRSFmVRolvgph4CByu3D7mHdDekNk8cj0ilsfF+GlUllGPMCPzalp+Zitufq81Cg4oModC3SvPUT1gQIQ9NGGkjlOrBu9J6gs/syPRQIDAQAB",
Calculated extension ID: eigojmmlmgigbldiclbpibmjnlbdpiaa

openssl
$ openssl rsa -in navigup.pem -inform PEM -pubout -outform DER | openssl base64 -A
writing RSA key
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDR8RyDbBAaZaEsh4VTye63j6QDOGP1YMSCJ+2KyJXH8IHneddHl2mUKD27FrNNUm7N6NnzRSFmVRolvgph4CByu3D7mHdDekNk8cj0ilsfF+GlUllGPMCPzalp+Zitufq81Cg4oModC3SvPUT1gQIQ9NGGkjlOrBu9J6gs/syPRQIDAQAB

Chrome Web Store > Developer Dashboard > Extension > Build > Package > View public key

Short analysis
I noticed that output coming from go-crx3 is longer, so I did another quick check, by decoding base64 public keys, showing their info, and calculating extension ID from them.
$ echo 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDR8RyDbBAaZaEsh4VTye63j6QDOGP1YMSCJ+2KyJXH8IHneddHl2mUKD27FrNNUm7N6NnzRSFmVRolvgph4CByu3D7mHdDekNk8cj0ilsfF+GlUllGPMCPzalp+Zitufq81Cg4oModC3SvPUT1gQIQ9NGGkjlOrBu9J6gs/syPRQIDAQAB' | openssl base64 -d >pubkey1.der
$ echo 'MIIBCgKCAQEAj/u/XDdjlDyw7gHEtaaasZ9GdG8WOKAyJzXd8HFrDtz2Jcuy7er7MtWvHgNDA0bwpznbI5YdZeV4UfCEsA4SrA5b3MnWTHwA1bgbiDM+L9rrqvcadcKuOlTeN48Q0ijmhHlNFbTzvT9W0zw/GKv8LgXAHggxtmHQ/Z9PP2QNF5O8rUHHSL4AJ6hNcEKSBVSmbbjeVm4gSXDuED5r0nwxvRtupDxGYp8IZpP5KlExqNu1nbkPc+igCTIB6XsqijagzxewUHCdovmkb2JNtskx/PMIEv+TvWIx2BzqGp71gSh/dV7SJ3rClvWd2xj8dtxG8FfAWDTIIi0qZXWn2QhizQIDAQAB' | openssl base64 -d >pubkey2.der

$ openssl rsa -in pubkey1.der -inform DER -pubin -text
Public-Key: (1024 bit)
Modulus:
    00:d1:f1:1c:83:6c:10:1a:65:a1:2c:87:85:53:c9:
    ee:b7:8f:a4:03:38:63:f5:60:c4:82:27:ed:8a:c8:
    95:c7:f0:81:e7:79:d7:47:97:69:94:28:3d:bb:16:
    b3:4d:52:6e:cd:e8:d9:f3:45:21:66:55:1a:25:be:
    0a:61:e0:20:72:bb:70:fb:98:77:43:7a:43:64:f1:
    c8:f4:8a:5b:1f:17:e1:a5:52:59:46:3c:c0:8f:cd:
    a9:69:f9:98:ad:b9:fa:bc:d4:28:38:a0:ca:1d:0b:
    74:af:3d:44:f5:81:02:10:f4:d1:86:92:39:4e:ac:
    1b:bd:27:a8:2c:fe:cc:8f:45
Exponent: 65537 (0x10001)
writing RSA key
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDR8RyDbBAaZaEsh4VTye63j6QD
OGP1YMSCJ+2KyJXH8IHneddHl2mUKD27FrNNUm7N6NnzRSFmVRolvgph4CByu3D7
mHdDekNk8cj0ilsfF+GlUllGPMCPzalp+Zitufq81Cg4oModC3SvPUT1gQIQ9NGG
kjlOrBu9J6gs/syPRQIDAQAB
-----END PUBLIC KEY-----

$ openssl rsa -in pubkey2.der -inform DER -pubin -text
Public-Key: (2048 bit)
Modulus:
    00:8f:fb:bf:5c:37:63:94:3c:b0:ee:01:c4:b5:a6:
    9a:b1:9f:46:74:6f:16:38:a0:32:27:35:dd:f0:71:
    6b:0e:dc:f6:25:cb:b2:ed:ea:fb:32:d5:af:1e:03:
    43:03:46:f0:a7:39:db:23:96:1d:65:e5:78:51:f0:
    84:b0:0e:12:ac:0e:5b:dc:c9:d6:4c:7c:00:d5:b8:
    1b:88:33:3e:2f:da:eb:aa:f7:1a:75:c2:ae:3a:54:
    de:37:8f:10:d2:28:e6:84:79:4d:15:b4:f3:bd:3f:
    56:d3:3c:3f:18:ab:fc:2e:05:c0:1e:08:31:b6:61:
    d0:fd:9f:4f:3f:64:0d:17:93:bc:ad:41:c7:48:be:
    00:27:a8:4d:70:42:92:05:54:a6:6d:b8:de:56:6e:
    20:49:70:ee:10:3e:6b:d2:7c:31:bd:1b:6e:a4:3c:
    46:62:9f:08:66:93:f9:2a:51:31:a8:db:b5:9d:b9:
    0f:73:e8:a0:09:32:01:e9:7b:2a:8a:36:a0:cf:17:
    b0:50:70:9d:a2:f9:a4:6f:62:4d:b6:c9:31:fc:f3:
    08:12:ff:93:bd:62:31:d8:1c:ea:1a:9e:f5:81:28:
    7f:75:5e:d2:27:7a:c2:96:f5:9d:db:18:fc:76:dc:
    46:f0:57:c0:58:34:c8:22:2d:2a:65:75:a7:d9:08:
    62:cd
Exponent: 65537 (0x10001)
writing RSA key
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAj/u/XDdjlDyw7gHEtaaa
sZ9GdG8WOKAyJzXd8HFrDtz2Jcuy7er7MtWvHgNDA0bwpznbI5YdZeV4UfCEsA4S
rA5b3MnWTHwA1bgbiDM+L9rrqvcadcKuOlTeN48Q0ijmhHlNFbTzvT9W0zw/GKv8
LgXAHggxtmHQ/Z9PP2QNF5O8rUHHSL4AJ6hNcEKSBVSmbbjeVm4gSXDuED5r0nwx
vRtupDxGYp8IZpP5KlExqNu1nbkPc+igCTIB6XsqijagzxewUHCdovmkb2JNtskx
/PMIEv+TvWIx2BzqGp71gSh/dV7SJ3rClvWd2xj8dtxG8FfAWDTIIi0qZXWn2Qhi
zQIDAQAB
-----END PUBLIC KEY-----

$ cat pubkey1.der | sha256sum | head -c32 | tr 0-9a-f a-p
eigojmmlmgigbldiclbpibmjnlbdpiaa
$ cat pubkey2.der | sha256sum | head -c32 | tr 0-9a-f a-p
ndbbbokdeocpkaiembjedmlfajdkoegn

I haven't analyzed your code, but above results at least show that go-crx3 assumes somewhere RSA >= 2K, which can not always be true for extensions added to webstore long time ago (e.g. my extension was created ~15y ago IIRC), i.e. before longer keys were strictly recommended / enforced.
CRX Viewer also uses RSA 1K, so you can test on it too if you want.

But it looks it's not only matter of key size.
I tried another extension, which uses RSA 2K, and for it pubkey also didn't return proper value.

Thank you for the detailed feedback! I will take it into account. I admit I skimmed through the specification and apparently misunderstood the task.

@przemoc If possible, please check the latest release v1.5.1, where I fixed the retrieval of the ID from the public key and corrected the pubkey command. I compared (tested) the public keys and ID generation with Chrome tools and OpenSSL. Once again, thank you for the detailed description of the problem.  If the issue is not resolved, please let me know.

@mmadfox Thanks for working on this. I cannot afford right now to do a more thorough check, but I just did two quick checks, firstly on my extension, secondly on another extension. We're not there yet. :)

$ ( crx3 pubkey ~/Downloads/eigojmmlmgigbldiclbpibmjnlbdpiaa.crx; echo ) | openssl base64 -d >pubkey3.der
$ openssl asn1parse -in pubkey3.der -inform DER -i
    0:d=0  hl=4 l= 290 cons: SEQUENCE
    4:d=1  hl=2 l=  13 cons:  SEQUENCE
    6:d=2  hl=2 l=   9 prim:   OBJECT            :rsaEncryption
   17:d=2  hl=2 l=   0 prim:   NULL
   19:d=1  hl=4 l= 271 prim:  BIT STRING

So it looks like it follows SubjectPublicKeyInfo format, but subjectPublicKey is still somehow becoming 2K.

pubkey3.der - unexpected key size provided by go-crx3 v1.5.1

Which means that the first problem I brought up in my previous comment remains true:

I haven't analyzed your code, but above results at least show that go-crx3 assumes somewhere RSA >= 2K, which can not always be true for extensions added to webstore long time ago (e.g. my extension was created ~15y ago IIRC), i.e. before longer keys were strictly recommended / enforced.

It seems there is yet another issue. Pubkey seemingly returns same (garbage?) stuff now.

$ ( crx3 pubkey ~/Downloads/beakmhbijpdhipnjhnclmhgjlddhidpe.crx; echo ) | openssl base64 -d >linkding3.der
$ cat linkding3.der | sha256sum | head -c32 | tr 0-9a-f a-p
lfoeajgcchlidpicbabpmckkejpckcfb
$ cat pubkey3.der | sha256sum | head -c32 | tr 0-9a-f a-p
lfoeajgcchlidpicbabpmckkejpckcfb

Thank you for the detailed report on the issue. I will fix the error soon. Yes, I missed something in the implementation…


chore(deps): upgrade dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 717

Questions ?
Please refer to the Backport tool documentation


How can I change Settings.maxPolygonVertices

How can I change Settings.maxPolygonVertices (in such a way that it works)  the only thing that worked for me is changing the planck-with-testbed.js file, which is a terrible solution...

Can you please try setting planck.internal.Settings.maxPolygonVertices?

That worked, thank you!


Visualize Synthesia Data on Displays

We should be able to show something - not sure how animated it can be.
Apparently the protocol for showing images on those displays has been reversed;
https://github.com/GoaSkin/qKontrol/blob/b478fd9818c1b01c695722762e6d55a9b2e0228e/source/qkontrol.cpp#L1042-L1097

Got it working perfectly fine - nice start....

Oh sweet - that transfer is really fast - no problem to do 24frames per second or even more.
https://user-images.githubusercontent.com/592445/216118874-f8023b78-920f-4ab9-b50a-265e43a93d28.mov

Next stop, diving into ScreenCaptureKit...

Not sure how I am introducing that redshift but I am pretty sure that is fixable.
https://user-images.githubusercontent.com/592445/216204236-beb97882-aa34-448e-b89f-c3d31be4de0a.mov

voila!
https://user-images.githubusercontent.com/592445/216206544-42717428-fb7d-4305-aa39-14659a86f271.MOV

v0.50 does it.


move AC mode config under the right configuration step

Hello @muchasuerte ,
Thank you for your contribution. Could you please explains what you are trying to achieve (in the first post) ? So that it will be more easier for me to understand the changes.
I will have a look this week.

Please add a unit test that show your changes are working as expected.

One point, how I can run It? Do you have a guide to run the unit test locale o in remote on GitHub?

I run all the unit tests in VSCode in container mode, directly from the sidebar:

Sometimes, the test are run but the results doesn't show in the bar (a VSCode bug which is in PR now). If you ran into this bug, just open a Terminal and type:
$ cd config/custom_components/versatile_thermostat
$ pytest ./tests
All the tests will be run and all should be green.

yes, I see it's a lot of time that I'm not develop anymore so I need the
study vscode and container (I was developing by using kdevelop or kate as
editor + chroot)
now at container init the script fail because it is trying to mount a
folder
source=/Users/jmcollin/SugarSync/Projets/home-assistant/core,target=/home/vscode/core,type=bind,consistency=cached
which of course does not exist on my end, what does it need on that folder
just the home-assistant sorce code or a virtualenv?
"source=${localWorkspaceFolder}/home-assistant/core,target=/home/vscode/core,type=bind,consistency=cached"
,

some instruction to set the folder home-assistant/core

Il giorno mar 26 set 2023 alle ore 20:24 Jean-Marc Collin <
@.***> ha scritto:

One point, how I can run It? Do you have a guide to run the unit test
locale o in remote on GitHub?
I run all the unit tests in VSCode in container mode, directly from the
sidebar:
[image: Capture d’écran 2023-09-26 à 20 21 43]
https://user-images.githubusercontent.com/1712374/270757245-4a6103ad-6e84-4004-b537-e77b951d8d0b.png
Sometimes, the test are run but the results doesn't show in the bar (a
VSCode bug which is in PR now). If you ran into this bug, just open a
Terminal and type:
$ cd config/custom_components/versatile_thermostat
$ pytest ./tests
All the tests will be run and all should be green.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1736061651,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWCGCZ5EQHXINLXXIIDX4MMV7ANCNFSM6AAAAAA5ERM25M
.
You are receiving this because you were mentioned.Message ID:
@.***>

source=/Users/jmcollin/SugarSync/Projets/home-assistant/core,target=/home/vscode/core,type=bind,consistency=cached

This is to import all the HA core code. It is then easier to debug or develop with all the HA core code.
You can safely comment out this line.
If it is too much complicate to implement a unit test I can do it myself on mext week. Please just resolve the code points and I will merge + implements unit test on next week.

I did a try on setup the environment but I'm blocked on this error
ImportError: Error importing plugin
"pytest_homeassistant_custom_component": No module named
'pytest_homeassistant_custom_component'
I did some progress via this script
git clone --branch "2023.9.2" --single-branch --depth 1
https://github.com/home-assistant/core.git /home/vscode/core/homeassistant
cp -a /home/vscode/core/homeassistant/tests
/home/vscode/core/pytest_homeassistant_custom_component
pip install homeassistant==2023.9.2
pip install pytest
sudo chown -R vscode: /home/vscode/core
but again I'm retrieving strange error from pytest
Moreover, it seems that pytest need @.***" before any test
function , it is a mess at least for me...
for now I give up! I'll try next week
Il giorno dom 1 ott 2023 alle ore 09:04 Jean-Marc Collin <
@.***> ha scritto:

source=/Users/jmcollin/SugarSync/Projets/home-assistant/core,target=/home/vscode/core,type=bind,consistency=cached
This is to import all the HA core code. It is then easier to debug or
develop with all the HA core code.
You can safely comment out this line.
If it is too much complicate to implement a unit test I can do it myself
on mext week. Please just resolve the code points and I will merge +
implements unit test on next week.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1741984374,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWFL6OQMKEFGRS3DSJ3X5EIZDANCNFSM6AAAAAA5ERM25M
.
You are receiving this because you were mentioned.Message ID:
@.***>

You have to do:
$ pip install -r requirements_dev.txt
$ pip install -r requirements_test.txt
This will install the pytest_homeassistant_custom_component

Thank you for your help, now I was able to run all tests :
command: pytest --asyncio-mode=auto --log-cli-level=ERROR
custom_components/versatile_thermostat/tests/
current result:
Results (12.57s):
35 passed
5 failed
-
custom_components/versatile_thermostat/tests/test_config_flow.py:30
test_user_config_flow_over_switch[True-True]
-
custom_components/versatile_thermostat/tests/test_config_flow.py:129
test_user_config_flow_over_climate[True-True]
-
custom_components/versatile_thermostat/tests/test_config_flow.py:216
test_user_config_flow_window_auto_ok[True-True]
-
custom_components/versatile_thermostat/tests/test_config_flow.py:385
test_user_config_flow_over_4_switches[True-True]
- custom_components/versatile_thermostat/tests/test_tpi.py:6
test_tpi_calculation[True-True]
I'll fix it in the upcoming days!
Il giorno mar 3 ott 2023 alle ore 07:58 Jean-Marc Collin <
@.***> ha scritto:

You have to do:
$ pip install -r requirements_dev.txt
$ pip install -r requirements_test.txt
This will install the pytest_homeassistant_custom_component
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1744260364,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWARWDTCVQVS6HTR563X5OSQ3AVCNFSM6AAAAAA5ERM25OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUGI3DAMZWGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

All tests executed without errors
$ pytest --asyncio-mode=auto --log-cli-level=ERROR custom_components/versatile_thermostat/tests
Test session starts (platform: linux, Python 3.11.4, pytest 7.3.1, pytest-sugar 0.9.7)
rootdir: /workspaces/versatile_thermostat
plugins: respx-0.20.2, syrupy-4.2.1, homeassistant-custom-component-0.13.54, cov-4.1.0, anyio-4.0.0, test-groups-1.0.3, requests-mock-1.11.0, picked-0.4.6, aiohttp-1.0.4, unordered-0.5.2, asyncio-0.21.0, sugar-0.9.7, pytest_freezer-0.4.8, xdist-3.3.1, socket-0.6.0, timeout-2.1.0
asyncio: mode=Mode.AUTO
collected 40 items
custom_components/versatile_thermostat/tests/test_binary_sensors.py::test_security_binary_sensors[True-True] ✓          2% ▍
custom_components/versatile_thermostat/tests/test_binary_sensors.py::test_overpowering_binary_sensors[True-True] ✓      5% ▌
custom_components/versatile_thermostat/tests/test_binary_sensors.py::test_window_binary_sensors[True-True] ✓            8% ▊
--------------------------------------------------------- live log teardown ----------------------------------------------------------
ERROR    custom_components.versatile_thermostat.underlyings:underlyings.py:124 Unable to find service homeassistant.turn_on
custom_components/versatile_thermostat/tests/test_binary_sensors.py::test_motion_binary_sensors[True-True] ✓           10% █
custom_components/versatile_thermostat/tests/test_binary_sensors.py::test_presence_binary_sensors[True-True] ✓         12% █▍
custom_components/versatile_thermostat/tests/test_binary_sensors.py::test_binary_sensors_over_climate_minimal[True-True] ✓15% █▌
----------------------------------------------------------- live log call ------------------------------------------------------------
ERROR    custom_components.versatile_thermostat.underlyings:underlyings.py:416 VersatileThermostat-TheOverClimateMockName-climate.mock_climate - Cannot find the underlying climate entity: climate.mock_climate. Thermostat will not be operational
ERROR    custom_components.versatile_thermostat.underlyings:underlyings.py:416 VersatileThermostat-TheOverClimateMockName-climate.mock_climate - Cannot find the underlying climate entity: climate.mock_climate. Thermostat will not be operational
custom_components/versatile_thermostat/tests/test_bugs.py::test_bug_56[True-True] ✓                                    18% █▊
custom_components/versatile_thermostat/tests/test_bugs.py::test_bug_63[True-True] ✓                                    20% ██
custom_components/versatile_thermostat/tests/test_bugs.py::test_bug_64[True-True] ✓                                    22% ██▍
custom_components/versatile_thermostat/tests/test_bugs.py::test_bug_66[True-True] ✓                                    25% ██▌
custom_components/versatile_thermostat/tests/test_config_flow.py::test_show_form[True-True] ✓                          28% ██▊
custom_components/versatile_thermostat/tests/test_config_flow.py::test_user_config_flow_over_switch[True-True] ✓       30% ███
----------------------------------------------------------- live log call ------------------------------------------------------------
ERROR    custom_components.versatile_thermostat.underlyings:underlyings.py:416 VersatileThermostat-TheOverClimateMockName-climate.mock_climate - Cannot find the underlying climate entity: climate.mock_climate. Thermostat will not be operational
custom_components/versatile_thermostat/tests/test_config_flow.py::test_user_config_flow_over_climate[True-True] ✓      32% ███▍
custom_components/versatile_thermostat/tests/test_config_flow.py::test_user_config_flow_window_auto_ok[True-True] ✓    35% ███▌
----------------------------------------------------------- live log call ------------------------------------------------------------
ERROR    custom_components.versatile_thermostat.config_flow:config_flow.py:399 Only one window detection method should be used. Use window_sensor or auto window open detection but not both
custom_components/versatile_thermostat/tests/test_config_flow.py::test_user_config_flow_window_auto_ko[True-True] ✓    38% ███▊
custom_components/versatile_thermostat/tests/test_config_flow.py::test_user_config_flow_over_4_switches[True-True] ✓   40% ████
custom_components/versatile_thermostat/tests/test_movement.py::test_movement_management_time_not_enough[True-True] ✓   42% ████▍
custom_components/versatile_thermostat/tests/test_movement.py::test_movement_management_time_enough_and_presence[True-True] ✓45% ████▌
custom_components/versatile_thermostat/tests/test_movement.py::test_movement_management_time_enoughand_not_presence[True-True] ✓48% ████▊
custom_components/versatile_thermostat/tests/test_multiple_switch.py::test_one_switch_cycle[True-True] ✓               50% █████
custom_components/versatile_thermostat/tests/test_multiple_switch.py::test_multiple_switchs[True-True] ✓               52% █████▍
custom_components/versatile_thermostat/tests/test_open_window_algo.py::test_open_window_algo ✓                         55% █████▌
custom_components/versatile_thermostat/tests/test_open_window_algo.py::test_open_window_algo_wrong ✓                   57% █████▊
custom_components/versatile_thermostat/tests/test_power.py::test_power_management_hvac_off[True-True] ✓                60% ██████
custom_components/versatile_thermostat/tests/test_power.py::test_power_management_hvac_on[True-True] ✓                 62% ██████▍
custom_components/versatile_thermostat/tests/test_power.py::test_power_management_energy_over_switch[True-True] ✓      65% ██████▌
custom_components/versatile_thermostat/tests/test_power.py::test_power_management_energy_over_climate[True-True] ✓     68% ██████▊
custom_components/versatile_thermostat/tests/test_security.py::test_security_feature[True-True] ✓                      70% ███████
custom_components/versatile_thermostat/tests/test_sensors.py::test_sensors_over_switch[True-True] ✓                    72% ███████▍
custom_components/versatile_thermostat/tests/test_sensors.py::test_sensors_over_climate[True-True] ✓                   75% ███████▌
custom_components/versatile_thermostat/tests/test_sensors.py::test_sensors_over_climate_minimal[True-True] ✓           78% ███████▊
custom_components/versatile_thermostat/tests/test_start.py::test_over_switch_full_start[True-True] ✓                   80% ████████
custom_components/versatile_thermostat/tests/test_start.py::test_over_climate_full_start[True-True] ✓                  82% ████████▍
custom_components/versatile_thermostat/tests/test_start.py::test_over_4switch_full_start[True-True] ✓                  85% ████████▌
custom_components/versatile_thermostat/tests/test_tpi.py::test_tpi_calculation[True-True] ✓                            88% ████████▊
custom_components/versatile_thermostat/tests/test_window.py::test_window_management_time_not_enough[True-True] ✓       90% █████████
custom_components/versatile_thermostat/tests/test_window.py::test_window_management_time_enough[True-True] ✓           92% █████████▍
custom_components/versatile_thermostat/tests/test_window.py::test_window_auto_fast[True-True] ✓                        95% █████████▌
custom_components/versatile_thermostat/tests/test_window.py::test_window_auto_auto_stop[True-True] ✓                   98% █████████▊
custom_components/versatile_thermostat/tests/test_window.py::test_window_auto_no_on_percent[True-True] ✓              100% ██████████
Results (12.45s):
40 passed

Fine ! Great work. There was 2 or 3 others remarks you don't fix (backward compatibility). Fix them and I will be able to merge this week-end.

hello Jean Marc,
can you tell me more, what is missing so I'll fix?
Il giorno ven 13 ott 2023 alle ore 15:50 Jean-Marc Collin <
@.***> ha scritto:

Fine ! Great work. There was 2 or 3 others remarks you don't fix (backward
compatibility). Fix them and I will be able to merge this week-end.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1761554959,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWFYUAONQM4G3MUW2ITX7FBKRAVCNFSM6AAAAAA5ERM25OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRRGU2TIOJVHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

See above:

Hello @muchasuerte ,
Do you think it will be possible to finish this MR ? I will have big changes to do, and then you will have a big merge/rebase to do after my changes.
You already have conflicts because next week i have implement many enhancements and fixes.

Give me 24h, I'll try to finalize the change by today.
Il Ven 20 Ott 2023, 08:10 Jean-Marc Collin @.***> ha
scritto:

Hello @muchasuerte https://github.com/muchasuerte ,
Do you think it will be possible to finish this MR ? I will have big
changes to do, and then you will have a big merge/rebase to do after my
changes.
You already have conflicts because next week i have implement many
enhancements and fixes.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1772140196,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWBIMBWPOGPTNPNMW53YAIITZAVCNFSM6AAAAAA5ERM25OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZSGE2DAMJZGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

I did a review and to me there is no need to have backward compatibility
because the PropAlgorithm.calculate(...) is invoked only by
when I did the pull I got some error
custom_components/versatile_thermostat/tests/test_config_flow.py:129
E       AssertionError: assert {'ac_mode': F...p': 17.0, ...} ==
{'boost_temp'..._min': 5, ...}
E         Omitting 20 identical items, use -vv to show
E         Left contains 1 more item:
E         {'ac_mode': False}
E         Full diff:
E           {
E         +  'ac_mode': False,
E         -  'boost_temp': 18,...
E
E         ...Full output truncated (32 lines hidden), use '-vv' to show
I have to resolve it
Il giorno ven 20 ott 2023 alle ore 09:30 Andrea Nicotra <
@.***> ha scritto:

Give me 24h, I'll try to finalize the change by today.
Il Ven 20 Ott 2023, 08:10 Jean-Marc Collin @.***> ha
scritto:

Hello @muchasuerte https://github.com/muchasuerte ,
Do you think it will be possible to finish this MR ? I will have big
changes to do, and then you will have a big merge/rebase to do after my
changes.
You already have conflicts because next week i have implement many
enhancements and fixes.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1772140196,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWBIMBWPOGPTNPNMW53YAIITZAVCNFSM6AAAAAA5ERM25OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZSGE2DAMJZGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

Nice job !
Their is still some conflict to resolve.

I'm doing the rebase of my changes on top you main repo, it seems easy to
reinstate.
I'll try by today
Il Ven 20 Ott 2023, 11:35 Jean-Marc Collin @.***> ha
scritto:

Nice job !
Their is still some conflict to resolve.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1772402546,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWALZ5OC6IRPCRPRQBDYAJAXRAVCNFSM6AAAAAA5ERM25OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZSGQYDENJUGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

hello I did the rebase of my changes on top of your code
test is 99% ok, I cannot understand what go wrong with this
FAILED custom_components/versatile_thermostat/tests/test_multiple_switch.py::test_multiple_climates_underlying_changes[True-True] - AssertionError: assert 0 == 4
custom_components/versatile_thermostat/tests/test_multiple_switch.py:446 test_multiple_climates_underlying_changes[True-True]
I have no idea how to resolve it

I will merge and have a look at it. Thanks for your work @muchasuerte !

FYI, you have lost all changes I made into climate.py at
@callback
    async def _async_climate_changed(self, event):

That is why the test was failed.

I'm sorry for that.
Does it make any sense that you revert my pull request? I can try on run
the rebase again on my end.
Il Sab 21 Ott 2023, 12:29 Jean-Marc Collin @.***> ha
scritto:

FYI, you have lost all changes I made into climate.py at
@callback
async def _async_climate_changed(self, event):
That is why the test was failed.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1773746079,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWAN7BF7PO7ODAW253DYAOPXNAVCNFSM6AAAAAA5ERM25OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTG42DMMBXHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

No I have made the fx. Do not worry I fix it rapidly.
I have published a pre-release with your PR: https://github.com/jmcollin78/versatile_thermostat/releases/tag/3.6.0.beta3
Can you please make some tests in your environment with it so that I will be sure all is correctly reported.
This can be done with HACS, you have to check the "See pre-release".
If is ok, I will publish a final release.

I'll do, just before I have to update HA from 2023.9.2 to 2023.10.3
Il giorno sab 21 ott 2023 alle ore 15:31 Jean-Marc Collin <
@.***> ha scritto:

No I have made the fx. Do not worry I fix it rapidly.
I have published a pre-release with your PR:
https://github.com/jmcollin78/versatile_thermostat/releases/tag/3.6.0.beta3
Can you please make some tests in your environment with it so that I will
be sure all is correctly reported.
This can be done with HACS, you have to check the "See pre-release".
If is ok, I will publish a final release.
—
Reply to this email directly, view it on GitHub
https://github.com/jmcollin78/versatile_thermostat/pull/108#issuecomment-1773793278,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTEWFBDOXTVYZPVLJSU3DYAPFCZAVCNFSM6AAAAAA5ERM25OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTG44TGMRXHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

I have added some unit tests for over switch ac mode and fixed many problems (not your fault).
So take the last one which fixes the problems: https://github.com/jmcollin78/versatile_thermostat/releases/tag/3.6.0.beta4


feature: Add session.regenerate()

To prevent session fixation attacks, it would be useful to have an API to regenerate session ID.
session.regenerate() API replaces the current session ID with a new generated one. Return Promise.
await session.regenerate();
await session.commit(); // if `autoCommit` is set to `false`.

This is similar to express-session's Session.regenerate(callback) and PHP's session_regenerate_id.

I needed regenerate function in express-session, so I used the forked version.
I hope this feature will be introduced for compatibility express-session and session fixation attacks.

I refactored the implementation based on @MaxMEllon 's code. Also, type definitions were missing and have been added.
thanks


dequeue set_member_subject ids after selection

closes #1176 - get set member subject ids out of the queue asap and let them replenish if they are needed when the queue's replenish.
This should hopefully avoid any race condition between classification processing and next subjects calls by increasing the time window between.

  Perfect timing.  Thanks!

@parrish - wow, that bisect feature is awesome!


Default value in Schema

So I have my_perfect_random function that returns value of string
schema "something_greate" do
  field :my_amazing_field, :string, default: my_perfect_random
  timestamps()
end

the error is
undefined my_perfect_random/0
The function is written in the same module. I've tried to use MyModule.my_perfect_random, but got the same error
Pls help me to fix it

Please use the elixir forum or StackOverflow for questions/help, where a wider community will be able to help you. We reserve the issues tracker for issues only. Thank you.

Defaults in schema can only be static variables similar to structs. You can use changesets to provide dynamic defaults.

@michalmuskala ok, sorry for it


Add more gateway_state and authority_aggregator tests

This PR adds more tests to gateway_state_tests and authority_aggregator_tests:

In gateway_state_tests, we added a case to see if a single gateway is resilient to concurrent equivocation.
In both tests, we added cases where we purposely introduce nodes that may behave incorrectly in specific cases, and check that the result is consistent with what we expect.

Last step towards https://github.com/MystenLabs/sui/issues/1279

Right, no issues so far.
Although there are a few APIs that heavily tested in authority_aggregator assuming that they will go away eventually (we have at least one that assumes single-authority honesty)


Playable regions not implemented

http://i.imgur.com/YjT8bJq.png

map is the problem , not the plugin.

Fix the xml

I can work on this when I get home


feat: extented RMQ features

Description
Close #1318, close #975
Type of change
Please delete options that are not relevant.

[ ] Documentation (typos, code examples, or any documentation updates)
[ ] Bug fix (a non-breaking change that resolves an issue)
[x] New feature (a non-breaking change that adds functionality)
[ ] Breaking change (a fix or feature that would disrupt existing functionality)
[x] This change requires a documentation update

Checklist

[ ] My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
[ ] I have conducted a self-review of my own code
[ ] I have made the necessary changes to the documentation
[ ] My changes do not generate any new warnings
[ ] I have added tests to validate the effectiveness of my fix or the functionality of my new feature
[ ] Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
[ ] I have ensured that static analysis tests are passing by running scripts/static-analysis.sh
[ ] I have included code examples to illustrate the modifications

@Lancetnik great to see there's an implementation for reusing RabbitMQ connections with aio_pika.Pool. Is there an idea when it will be merged? Thank for you amazing job.

Sorry, but I had to love priority
I'll continue to work on it after 0.6.0 in a few months

Thank you!


extension not work with typescript

demo repo:
https://github.com/clock157/bug-vscode-eslint-typescript
run command can found error but not report in vscode.
set setting.json not work too.
+"eslint.options": {
+        "extensions": [".ts", ".tsx"]
+},

The same. My config:
    "eslint.autoFixOnSave": true,
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        { "language": "typescript", "autoFix": true },
        { "language": "typescriptreact", "autoFix": true }
    ],
    "eslint.options": {
        "extensinons": [".ts", ".js"]
    },

Strange. This works for me using the repository from https://github.com/Microsoft/vscode-eslint/issues/642#issue-417763561 and adding the following setting.
{
	"eslint.validate": [
		"javascript",
		"javascriptreact",
		{ "language": "typescript", "autoFix": true }
	]
}

Any additional information how to reproduce what you are seeing.

Eslint extension info:
Name: ESLint
Id: dbaeumer.vscode-eslint
Description: Integrates ESLint JavaScript into VS Code.
Version: 1.8.1
Publisher: Dirk Baeumer
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

Work!!! After update to latest vscode

@Sujimoshi this was a problem on my end not treating versions correctly. I fixed this and releases 1.8.2 which now prereqs the right VS Code version. Sorry for that.
@clock157 any additional information. Are you still seeing this ?

hi @dbaeumer, thanks for your help, It works.
+"eslint.validate": [
+    { "language": "typescript" }
+]

can this option set to default that tslint will deprecated?

The problem here is that eslint (the npm module) out of the box only validates JS files. Everything else comes in as a configuration. What I can look into is whether I am able to infer this from the plugins section.

Any progress? I still need to config eslint.validate to make typescript eslint work. But in the doc
Improved TypeScript detection - As soon as TypeScript is correctly configured inside ESLint, you no longer need additional configuration through VS Code's eslint.validate setting. The same is true for HTML and Vue.js files.

Actually that got fix for 2.x version of ESLint. TypeScript should work out of the box without providing an eslint.validate setting.
@LeoEatle does the validation happen correctly when you use eslint in the terminal. If this is the case can you please provide me with a GitHub repository I can clone that demos what you are experiencing.


GUACAMOLE-1136: MySQL Client SSL Env Properties

This PR fixes the properties returned for MySQL Client Certificate configuration

@rsg98: One request for this before I merge it - could you edit the commit message and make sure it describes the changes made (instead of just restating the issue)?


ARROW-60: [C++] Struct type builder API

Implement the basic classes, StructArray and StructBuilder, meanwhile,
add the perspective test cases for them.
Other necessary methods will be added subsequently.

Hi it looks like this change failed CI.  Could you please make sure it passes?  If you need help diagnosing the failure please post a comment.

I'm still reviewing, I will finish later tonight or tomorrow. Oh, if only we had Gerrit!

Just wanted to check in to see how the suggested modification are progressing?  Do you need further assistance?

@emkornfield
Sorry for the latency. There were some things happened recently, but I just committed the new code and it passed CI testing.
Thanks for your reminder, and hope it's not too bad.:)

I haven't quite finished, hopefully I will have some more time tomorrow, but I think there are still some issues to be resolved, that I've pointed out.

OK, I'm done reviewing.  There are still some issues/bugs that need to be addressed but its starting to look close

@fengguangyuan the PR title will need to be changed to ARROW-60: [C++] Struct type builder API for the patch tool to accept it.
I'm going to push on the Gerrit migration right now since these code reviews / patch set updates are getting hard to track

@emkornfield
Could you help me to understand the spec well?
As illustrated in the spec, i see, it's OK for a null struct with the child fields containing values or nothing. There are no strong relationships between the struct bitmap and the child fields, in the struct's perspective.
So the case, struct length is zero and fields have positive lengths, should be ignored, even as well as if (fields().size() <= 0 && length_ > 0). Also, the validation of null bitmap slots is nonsense. Am I right?

@fengguangyuan I'm going to state some relationships that I think make sense.
The length for a struct array should be equal to all of its children arrays.  There is no relationship between the number of null values in struct array vs its children array.   There is no strong relationship between a slot in the struct array's nullability and the corresponding slot in one of its children.  So checking that the null slots like you were doing doesn't make sense.
That last part that is tricky is that if the Struct array has null elements, its Null bitmap needs to be combined with the child arrays' null bitmaps when determining equality.  The correct API to do this isn't quite exposed yet.  I was hoping to get this done, in the next few days but that is looking less likely.
Does this make sense?

@emkornfield Thanks.
I indeed get much more knowledge of the spec from you, and it lets me know what i should do about Validate method in the next step.
In doubt, if I should expect your solution to the tricky part in the next few days, or do some works on it in my way?
Thanks again. :)

@fengguangyuan I think I should be able to get it done in the next few days.  I will let you know if the time doesn't materialize for some reason though.

Delete some code as you recommended, and it looks like good as it was.
Plz let me know if there need more modifications.

Sorry. I'm merging the latest code, mainly focusing on RangeEquals. It will be done in few hours.

With these minor comments I think we are good -- thank you for your patience and work on this

My honor to make contributions to this project, and also with the patient reviews and comments, I have learned a lot.
Thank you very much. :)

Can you make the build pass? There is a cpplint error

@fengguangyuan can you rebase (due to ARROW-209) and let me know when the build is passing? Thank you

@wesm
Problem solved.

+1 thank you


Bumps palette

Updates snapshots for this Palette version

cherry-picked ced1115b2644817728e1de4c17a96c189acc2e15 onto https://github.com/artsy/force/pull/7136 — which should be fine once CircleCI comes back up


Simulated a node failed,  second replica lvr is failed to mount to the migrated po.

2 replicas of lvr

pod migrated from 24 to 22

volume mount failed

shutdown the 24 node

drbd status changed

pod running

In the high-availability scenario, the drbd primary and secondary are not switched

If kubelet stopped, there is no effect on drbd and pod, so the new pod will failed at MountVolume stage.
When node is offline, drbd change its connection status, so the new pod will run successfully.
Both of this 2 results meet our expectations.

The problem is when kubelet stopped, the pod failed over to another node, but the volume mount failed


Additional User Fields

Adding additional fields found in Zendesk REST API Documentation

I'm not a big fan of committing my own PRs, but it's been reviewed and approved for 30 days, so here it goes.
Thanks again @aheritier for the review!


YARN-10938. Support reservation scheduling enabled switch for capacity scheduler

Description of PR
Currently the CapacityScheduler uses reservations in order to handle requests for large containers and the fact there might not currently be enough space available on a single host. But this algorithm is not suitable for small cluster which only have very limited resources. So we can add a switch property in capacity scheduler's configuration to avoid reservation scheduling in these use cases.
CHANGES:
Add "yarn.scheduler.capacity.reservation.enabled" in capacity scheduler's configuration.
How was this patch tested?
Add a unit test for switch in resourcemanager.scheduler.capacity.TestReservations
For code changes:

[x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
[ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 43s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 2 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
31m 17s

trunk passed

+1 :green_heart:
compile
1m  2s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
compile
0m 56s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
checkstyle
0m 52s

trunk passed

+1 :green_heart:
mvnsite
1m  1s

trunk passed

+1 :green_heart:
javadoc
0m 49s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
0m 44s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
1m 52s

trunk passed

+1 :green_heart:
shadedclient
15m 12s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 50s

the patch passed

+1 :green_heart:
compile
0m 53s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javac
0m 53s

the patch passed

+1 :green_heart:
compile
0m 47s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
javac
0m 47s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
0m 43s
/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: The patch generated 13 new + 580 unchanged - 0 fixed = 593 total (was 580)

+1 :green_heart:
mvnsite
0m 50s

the patch passed

+1 :green_heart:
javadoc
0m 37s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
0m 33s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
1m 52s

the patch passed

+1 :green_heart:
shadedclient
14m 43s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
95m 43s

hadoop-yarn-server-resourcemanager in the patch passed.

+1 :green_heart:
asflicense
0m 33s

The patch does not generate ASF License warnings.

172m 10s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3414/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3414

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux 38b05c592fc1 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / f16865bcbb049dbe1cc42f989f9700bac638fe6f

Default Java
Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3414/1/testReport/

Max. process+thread count
974 (vs. ulimit of 5500)

modules
C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3414/1/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 42s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 2 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
32m 19s

trunk passed

+1 :green_heart:
compile
1m  2s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
compile
0m 54s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
checkstyle
0m 52s

trunk passed

+1 :green_heart:
mvnsite
1m  0s

trunk passed

+1 :green_heart:
javadoc
0m 58s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
0m 43s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
1m 54s

trunk passed

+1 :green_heart:
shadedclient
15m 10s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 51s

the patch passed

+1 :green_heart:
compile
0m 53s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javac
0m 53s

the patch passed

+1 :green_heart:
compile
0m 47s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
javac
0m 47s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
0m 42s
/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: The patch generated 1 new + 580 unchanged - 0 fixed = 581 total (was 580)

+1 :green_heart:
mvnsite
0m 50s

the patch passed

+1 :green_heart:
javadoc
0m 37s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
0m 34s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
1m 51s

the patch passed

+1 :green_heart:
shadedclient
14m 44s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
95m 46s

hadoop-yarn-server-resourcemanager in the patch passed.

+1 :green_heart:
asflicense
0m 34s

The patch does not generate ASF License warnings.

173m 21s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3414/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3414

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux 0d406cffdb3c 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / bd8ae06c7ea073ccf5a77e9c4e05ac130fce4178

Default Java
Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3414/2/testReport/

Max. process+thread count
1001 (vs. ulimit of 5500)

modules
C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3414/2/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.