Speeding up package rebuild

Let's say I build meaty packages such as numpy, pyopengl... building these packages take ages, and well... that's fine, at the end of the day if you're doing a "cold build" there isn't nothing to complain about as nuitka has to do a lot of job to deliver.
BUT! if we rebuild the same packages again (without modifying not a single line of the python package) I would expect nuitka of course to parse again the whole python source (unless you cache compiler flags somehow) and then applying optimizations to get in shape to start writing c source files, isn't?
I see the process is not optimal though, you're removing the existing c/obj files no matter what... why? I mean, yeah... you keep the algorithm easy but... why? :D
Alright, please consider the next "trivial" improvement:

Let's say you've ended up to parse the whole python package and you're ready to generate the c source code, you haven't deleted any c/obj files in the build folder.
So, before deleting any c/obj source file, you should compute the checksum of each c file before dumping to disk, if the checksum is different to the existing file disk only in that case you can overwrite the existing c file, otherwise, skip it. Why? Important thing here is preserving file timestamps so the objs won't need to be generated if they aren't need to.
Once you've overwritten only the c files you'll have a list with all c files, so using that list you'll be able to remove the rest of unused files (c/obj files)

Thanks to this improvement, we should be able to skip the whole compilation if timestamps haven't changed at all, so basically the compiler would have to do nothing and we could link the whole thing again for free.
Does it make sense?

I wrote about caching the mailing list once, it's a multi tiered thing, where the object files are only part of the equation. Storing module level optimized XML of modules is also a part, yes. On Linux I kind of expect you to use ccache. On Windows and MSVC I would integrate dlcache, but nobody took this on despite repeated requests of mine.
I myself will probably focus on "libnuitka" as I think that for deployment of multiple programs that kind of a must have, and it also will save re-compilation and even re-consideration for re-compilation for a fair bit of code. On Windows most so, because the one measure I do have in place won't work.
On Windows the build folder contains a scons level cache, where files are remembered with checksum and everything. That scons cache seems non-transferable or possible to share. The real solutions would be ccache for MinGW64 and dlcache for MSVC, but when I tried to get at binaries for "ccache" I failed, and I think it's not trivial to build, needs "make" which again is hard to come by.
To me building on Windows is a pain, as many of my commits do not change the created source or not for all test cases, and the number of test suites that I can run has hit a limit. On the other hand I should try and do within the project only things that I feel currently only I can do. I am trying to get more involvement via Twitter and so far it seems to happen somewhat.

Couple of question:

What is this "libnuitka" you're talking about? The word itself sounds really interesting and like some sort of massive ammount of code shared across python projects that will speed up compilations...
Could you please point me out to some spots in the source code where you delete the c/obj files and you dump the c files? Eventually, I'd like to make some little experiments about it.

In any case, my whole point is, if a c file hasn't changed, don't overwrite it and don't delete the obj file, don't compile it again, for instance:
a.cpp  a.obj  (updated)
b.cpp  b.obj  (updated)
c.cpp  c.obj   (outdated)
d.cpp d.obj   (unused)

Let's say just c.cpp needs to be recompiled, you would just need to do:
1) Delete c.cpp/c.obj, dump to disk c.cpp and include c.cpp in the SCons files pending to compile
2) Link a.obj/b.obj/c.obj

Good thing about the way you're creating the source folder is inter-dependencies amongst c files and headers is minimal so you don't need fancy analizers such as showIncludes to figure out recursively what needs to be updated... So I think this little tweak would allow to boost up compilation in many cases. Cos let me ask you, if I've got a python composed by {a.py, b.py, c.py}, all of them independent each other and I just tweak c.py, both a.py/b.py would generate the same source file, is this assumption correct or...?
Anyway, please let me know, i'd like to give it a shot to some ideas here :)

The libnuitka is an issue here too, #102
The idea is that the compiled function type, etc. would only be compiled once, and be available for use, much like "libpython" to nuitka created programs and extension modules. That will save compilation time. Actually a lot more on Windows due to the lack of dlcache.
Having a compiled standard library or even Python distribution, would be a separate idea, that I would also welcome. I imagine working with something similar to AnaConda where the build process is then plugged to make the installation of "setup.py" go through "bist_nuitka". That is a very ambition thing, that I think will materialize once the C type work proves so valuable that people will want to have it effective as much as possible.
I want to make other changes before, that e.g. make Nuitka include the source in its output as well, and if changed, to override compiled code until the binary is updated.
As for your issue. On Linux ccache is working. On Windows, it would too, I just can't have it, and dlcache would work for MSVC, but nobody did the work yet despite repeated pleas in the past, but then it would work. For all I know, the location of the modules wouldn't matter with runtime "file" reference mode, and does not if you do not move sources. Virtualenvs in temp locations are killers for "original" "file" reference mode though.
Obviously I would gain a lot by having this dlcache integration, and users would too, although a lot less than I would. But I also got a compiler to write for it to make people care enough so they will eventually wind up doing that for me. And since developing on Linux is my normal thing, I am not going to do it for some time more myself.

As for your not deleting object files and re-using it. Yes, Nuitka deletes them, but it does NOT delete the Scons cache, or at least I am convinced of that. And Scons when it finds the source unchanged will take it out of the cache, much like ccache does.
So as long as you repeat commands, I would expect no C compilation to be invoked by scons. You can confirm that with --show-scons to be sure.
If that is not a true statement, it would be a Nuitka issue @brupelo which of course it may well be, since I didn't check all that recently.

@kayhayen Wow! --show-scons was a total breakthrough to me here. That option explains quite a lot about what's going on and everything makes a little bit more sense now. Thanks to suggest to use it!
So yeah, after knowing that the cache I was referring to (obj file caching) was working already ok already I feel pretty dumb I have opened this issue in the first place :/... Next time before opening any issue with ideas/suggestions I'll make sure I totally understand first how nuitka works so my suggestions will make sense and I won't make a fool of myself, my bad, sorry about it.
Also, grepping the --show-scons not only allows to inspect in a really nice way what's cached or not but also allow you to see the final obj files in a very tidy way, so as a casual user I realize (even if the code generator subsystem is still a black box to me) what the big picture is. For instance, now it makes sense how Nuitka\nuitka\build\static_src fits into the big picture and I guess those 505kb of static source code will be included somehow with the the future libnuitka (sort of... I'm speculating here :)).
I've got some questions though, consider this little dummy library:
a.py
def foo():
    print('foo')

b.py
def bar():
    print('bar')

c.py
from a import foo
from b import bar

If I generate an extension module of c.py without using --recurse-all I'll get a 228kb c.pyd whose .obj files are:
Retrieved `c.build\module.c.obj' from cache
Retrieved `c.build\__constants.obj' from cache
Retrieved `c.build\__constants_data.obj' from cache
Retrieved `c.build\__frozen.obj' from cache
Retrieved `c.build\__helpers.obj' from cache
Retrieved `c.build\CompiledCellType.obj' from cache
Retrieved `c.build\CompiledFunctionType.obj' from cache
Retrieved `c.build\CompiledMethodType.obj' from cache
Retrieved `c.build\CompiledGeneratorType.obj' from cache
Retrieved `c.build\CompiledCoroutineType.obj' from cache
Retrieved `c.build\CompiledAsyncgenType.obj' from cache
Retrieved `c.build\CompiledFrameType.obj' from cache
Retrieved `c.build\CompiledCodeHelpers.obj' from cache
Retrieved `c.build\InspectPatcher.obj' from cache
Retrieved `c.build\MetaPathBasedLoader.obj' from cache
Retrieved `c.pyd' from cache

while If I use --recurse-all I'll get a 240kb c.pyd with this content:
Retrieved `c.build\module.a.obj' from cache
Retrieved `c.build\module.b.obj' from cache
Retrieved `c.build\module.c.obj' from cache
Retrieved `c.build\__constants.obj' from cache
Retrieved `c.build\__constants_data.obj' from cache
Retrieved `c.build\__frozen.obj' from cache
Retrieved `c.build\__helpers.obj' from cache
Retrieved `c.build\CompiledCellType.obj' from cache
Retrieved `c.build\CompiledFunctionType.obj' from cache
Retrieved `c.build\CompiledMethodType.obj' from cache
Retrieved `c.build\CompiledGeneratorType.obj' from cache
Retrieved `c.build\CompiledCoroutineType.obj' from cache
Retrieved `c.build\CompiledAsyncgenType.obj' from cache
Retrieved `c.build\CompiledFrameType.obj' from cache
Retrieved `c.build\CompiledCodeHelpers.obj' from cache
Retrieved `c.build\InspectPatcher.obj' from cache
Retrieved `c.build\MetaPathBasedLoader.obj' from cache
Retrieved `c.pyd' from cache

We can see in the 2nd case both module.a.obj and module.b.obj have been included. Thing is, no matter if I use --recurse-all or not, in both cases the library is exposing correctly foo and bar functions with the right code...
Questions:

What's the real difference of using --recurse-all or not?
On which cases should I use --recurse-all?
Is --recurse-all adding a lot of code duplication? See above, 1st case c.pyd is 228kb and 2nd is 240kb, both of them working ok... so, what's going on?

Conclusion: I guess this issue could be already tagged like "Question" and be closed? Not sure I've brought anything new to the table here and it ended up to be just me asking stuff... Hopefully you will be able to use this material in blog posts, FAQs, tutorials, videos or similar so more devs will benefit from it... Anyway, your call.

I am OK with you opening issues without perfect research upfront @brupelo so don't worry.
The recursion options control if you want to include a module that is imported in code statically or not dynamic enough at least, or not. For programs to be as much accelerated as possible, --recurse-all is best use. For extension modules, you probably sometimes want to include a dependency into the module, or if you use two name or more spaces like e.g. pywin32 does.
I am looking at rename the --recurse optons to auto-follow or something, but I didn't yet find anything that conveys their use all that much. They kind of are like --include-if-used in case of --recurse-to and hard to grasp for new users with current naming.
The --include options are newer and forcing and are most useful for dynamic code.

@kayhayen Mmm, I think I understand now, thanks to clarify. In any case, I was asking because at least with personal projects where I've got perfect control about how I do all importing management I'll try to skip --recurse-all as much as possible. For instance, consider a pyqt program where I've got few hundreds of plugins. The idea is first to compile the exe only once (without --recurse-all) and then building my plugins independently.
One last question, I've already build many python extension modules and I've got them stored in a "3rdparty" folder, I've already checked that in case I want to compile a python script living in that folder that use those extension modules nuitka will check the extension modules are the "3rdparty" one and not the site-packages ones... So for instance, let's say I've built numpy in 1200s, I've already checked that if a program uses directly numpy.pyd, the compilation will take very few seconds, which makes total sense.
Anyway, my question is, what'd be the correct way so nuitka will look at the 3rdparty folder before anything else? I've tried to add "3rdparty" into a .pth file in my virtualenv but that won't do it... Another choice would be tweaking PYTHONPATH although... do you recommend any better choice :/? Asking cos I really dislike having/tweaking PYTHONPATH at all and I always discourage python newcomers to use it in the first place. Although I've run out of ideas what's the best way to go about it... Thing is, I don't want to copy/move my python stuff into the 3rdparty folder, so... I'm all ears :)

@brupelo Can I ask you to put questions for new topics into new issues? That will make it easier to use the result afterwards. :-)

I know i am quite new in here - this is the first time i am using nuitka. It is a great tool to have but when working on bigger projects - the compilation becomes a nightmare. On windows - 1 recompile if required - for me it takes 3-4 hrs of time. (No offenses - i know it aint your fault, the gcc compilation is the 1 that takes hell lot of time) That is a bit too much to wait. I understand it goes through a lot of conversions from .py to .cpp and then to obj / dll .. etc etc..
It might be possible you may have already looked in  but still i was wondering on 1 thing. When i go through the compilation process - looking at --show-scons, what i realized that it over and over kept building the obj files. Though what was noticed, all the cpp files were intact. I was wondering as why was it rebuilding the obj files for standard libraries again and again. Why can't those be left intact.
There are codes in the project that are used for imports - understood. This are technically the codes expected by the user to change and recompiling them makes sense. But the codes used as standard libraries that are found from site_packages folder are libraries that barely user goes and changes.
I was wondering if this libraries (code / obj files and other that may be built along) be left intact in the build folder so - very 1 thing .. the rebuilding stuff could speed up by this? Is there such possibilities?
I do see the obj / cpp files being there even after the build was made. But unfortunately - still next when i start recompiling second time - it still compiles the very same objects saying it dose not exists.

@blakdronzer The missing caching issue is indeed annoying and it can be done, but nobody is working on it, but I would clearly welcome it. I think I broke down necessary steps before. Using ccache and clcache ought to help with unchanged code, the User Manual describes how to use those I think.

@kayhayen I'm currently searching for ways to optimize my Nuitka compilation times, see https://github.com/Nuitka/NUITKA-Utilities/issues/9#issuecomment-571586198 where I could divide time by 2.
I've noticed that the C files Nuitka generates are regenerated on every run, so I thought of a caching mechanism I could create, which would store the sha256sum of all source files that generate c files, and reuses the generated c file if the source has the same sha256sum, with let's say a LRU eviction mechanism or so.
I've then checked two different c files that come from the same source file compiled for two different programs, and noticed they differ because of some constants, eg UNSTREAM_STRING_ASCII(&constant_bin[ XXXXXX ], YY, Z);, where XXXXXX varies for same sources:
/* Function to create module private constants. */
static void createModuleConstants(void) {
    const_str_digest_33c72c5b0e9ba79b972f105c5aaaa097 = UNSTREAM_STRING_ASCII(&constant_bin[ 169631 ], 12, 0);
    const_tuple_3ce17fc0476de00dbb83c4b65c00080e_tuple = PyTuple_New(2);
    const_str_plain_NUITKA_PACKAGE_api = UNSTREAM_STRING_ASCII(&constant_bin[ 169643 ], 18, 1);
    PyTuple_SET_ITEM(const_tuple_3ce17fc0476de00dbb83c4b65c00080e_tuple, 0, const_str_plain_NUITKA_PACKAGE_api); Py_INCREF(const_str_plain_NUITKA_PACKAGE_api);
    PyTuple_SET_ITEM(const_tuple_3ce17fc0476de00dbb83c4b65c00080e_tuple, 1, const_str_digest_5bfaf90dbd407b4fc29090c8f6415242); Py_INCREF(const_str_digest_5bfaf90dbd407b4fc29090c8f6415242);
    const_str_digest_6eb7a56cbca1279a1c81e4b3885ca177 = UNSTREAM_STRING_ASCII(&constant_bin[ 169661 ], 15, 0);

    constants_created = true;
}

vs
/* Function to create module private constants. */
static void createModuleConstants(void) {
    const_str_digest_33c72c5b0e9ba79b972f105c5aaaa097 = UNSTREAM_STRING_ASCII(&constant_bin[ 178450 ], 12, 0);
    const_tuple_3ce17fc0476de00dbb83c4b65c00080e_tuple = PyTuple_New(2);
    const_str_plain_NUITKA_PACKAGE_api = UNSTREAM_STRING_ASCII(&constant_bin[ 178462 ], 18, 1);
    PyTuple_SET_ITEM(const_tuple_3ce17fc0476de00dbb83c4b65c00080e_tuple, 0, const_str_plain_NUITKA_PACKAGE_api); Py_INCREF(const_str_plain_NUITKA_PACKAGE_api);
    PyTuple_SET_ITEM(const_tuple_3ce17fc0476de00dbb83c4b65c00080e_tuple, 1, const_str_digest_5bfaf90dbd407b4fc29090c8f6415242); Py_INCREF(const_str_digest_5bfaf90dbd407b4fc29090c8f6415242);
    const_str_digest_6eb7a56cbca1279a1c81e4b3885ca177 = UNSTREAM_STRING_ASCII(&constant_bin[ 178480 ], 15, 0);

    constants_created = true;
}

Is there any way two different program compilation runs of the same source might endup with the same constant ? This would help create a global C cache instead of a per program C cache.
If so, I'd be glad you to point me to the right direction in the nuitka sources to write a c code cache, which would obviously speed up Nuitka by orders of magnitude.
Also, as a side question, I noticed CFLAGS have '-O3' set in SingleExe.scons
Is there a way to override -O3 and set -Os/-O0 or anything else perhaps ?

Just to chime in, the caching of Nuitka source code is very spoiled because of the constants. They are using a global blob, and indexes in there. That is very unreliable to remain constant even with small changes in other parts, e.g. to include a module more or less, it's not going to remain re-usable.
I have plans for a marshal like replacement. The bad thing about marshal is that it doesn't do all types, and therefor was not usable. Also a single global stream is vulnerable. I want to introduce it, because it will not generate C code, but use a sort of bytecode approach like marshal does. Also it would be the case, that the constants resolution has a single pointer, which gets initialized during program load, and constants would be accessible with module local indexes from it.
An extra benefit that I see is that the initial constants stuff, might not have to necessarily cache the resulted object (release it again, saves memory at run time, costs at run time to create on the fly, but for single use ones, that is much better), and create all of them at the start.
With that change, and only then, I would expect same module node tree -> same C source. Until then I fear all caching attempts are futile. But recent caches at least allow for ccache to do its job. I suspect that clcache may also be more successful.
For options, CCFLAGS is inserted, however, the -O3 is appended, and may override. I guess, we would have to move it to the end in SingleScons.exe for you to be allowed to override it. Because -Os -O3 is not going to work, but -O3 -Os is.
In my experience however, there is not much result coming from these gcc options.
Yours,
Kay


Memory consumption in browser

I got the following warning from Google Chrome while running tests on the current PR:

The page rendered fine after I instructed Chrome to continue, but I checked on memory allocation and we're eating up nearly 4GB RAM, which may be problematic if users are trying to load the page on conventional hardware.

This may be a problem specific to massive lineages like BA.1 (as in the case above)


x/pkgsite: deprecation warning difficult to read in dark mode

Go version
go1.22
Output of go env in your module/workspace:
N/A

What did you do?
https://pkg.go.dev/math/rand#Read
What did you see happen?

What did you expect to see?

hyperlinks with higher contrast
preferably, a dark background instead of bright yellow

Duplicate of #


Option to build in parallel without METIS  [drop-metis-dev]

Option to build in parallel without metis, when MFEM_DROP_METIS=YES. In this case the user must define the mesh partitioning.

Changes Unknown when pulling e323078d866b844e62c12a164200781b258b2c50 on drop-metis-dev into ** on master**.

Changes Unknown when pulling e323078d866b844e62c12a164200781b258b2c50 on drop-metis-dev into ** on master**.

Changes Unknown when pulling 5e2ec6e9c2a549c2ff3dcf52f6d08c5f0f106581 on drop-metis-dev into ** on master**.


Could you add the demo of pixi-tilemap in pixi examples ?

add the demo of pixi-tilemap to  https://pixijs.io/examples/

Is there any news ?


Gradle download certificate broken

Expected Behavior
Gradle can be downloaded
Current Behavior
Certificate error when downloading gradle via Browser or via ./gradlew
Steps to Reproduce (for bugs)
Go to the browser and hit
https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip
This error then appears
downloads.gradle-dn.com uses an invalid security certificate. The certificate is not trusted because the issuer certificate is unknown. The server might not be sending the appropriate intermediate certificates. An additional root certificate may need to be imported. Error code: SEC_ERROR_UNKNOWN_ISSUER

@guenhter Thanks for reporting, we've noticed this issue and working on this.
Can you please tell us what's your location? And when do you observe this failure?

Sure. my Location is Austria (Europe). If you need it more precise, just say a word.
We noticed the problem since today (it's 9am here). Yesterday, everything worked fine.

OK, thank you. We thought this issue was fixed at 8am today European time, so if you still see it, can you please try to run wget https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip and paste the output here? That would help.

> date
Tue 26 Feb 09:22:26 CET 2019

> wget https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip
--2019-02-26 09:22:30--  https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip
Resolving downloads.gradle-dn.com (downloads.gradle-dn.com)... <IP_ADDRESS>, ::ffff:<IP_ADDRESS>
Connecting to downloads.gradle-dn.com (downloads.gradle-dn.com)|<IP_ADDRESS>|:443... connected.
ERROR: The certificate of ‘downloads.gradle-dn.com’ is not trusted.
ERROR: The certificate of ‘downloads.gradle-dn.com’ hasn't got a known issuer.

I meet the same issue, the output is
$ wget -v  https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip
--2019-02-26 17:52:22--  https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip
Resolving downloads.gradle-dn.com (downloads.gradle-dn.com)... <IP_ADDRESS>
Connecting to downloads.gradle-dn.com (downloads.gradle-dn.com)|<IP_ADDRESS>|:443... connected.
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Unable to establish SSL connection.

@sempr we rolled back some changes here. Are you working again?

> date && wget https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip

Tue 26 Feb 14:40:09 CET 2019
--2019-02-26 14:40:09--  https://downloads.gradle-dn.com/distributions/gradle-5.2.1-bin.zip
Resolving downloads.gradle-dn.com (downloads.gradle-dn.com)... ::ffff:<IP_ADDRESS>, <IP_ADDRESS>
Connecting to downloads.gradle-dn.com (downloads.gradle-dn.com)|::ffff:<IP_ADDRESS>|:443... connected.
ERROR: The certificate of ‘downloads.gradle-dn.com’ is not trusted.
ERROR: The certificate of ‘downloads.gradle-dn.com’ hasn't got a known issuer.

@guenhter Please don't try gradle-dn, this is the redirected domain. Can you please try the original domain http://services.gradle.org/distributions/gradle-5.2.1-bin.zip?

Can you try with gradlew again?  We switched back to not using gradle-dn.com at the moment.

Thx for the fast support.
Works again.

@guenhter We've switched to gradle-dn.com as CDN domain again, so please let us know if you see any issues. Thank you very much.

Still works. Thx.

It works now, thx.

@guenhter Thank you very much.
@sempr The downloading speed should be much improved in China now.

@guenhter Thank you very much.
@sempr Thank you very much. The downloading speed should be much improved in China now.

Gradle-dn.com is not used in China though :(, gradlew still downloads jar file from services.gradle.org


x/website:

What is the URL of the page with the issue?
https://go.dev/doc/tutorial/greetings-multiple-people
What is your user agent?
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36

Screenshot

What did you do?
I did tutorial and found my program doesn't work
Then i found that important part of code was not highlighted.

Please highlight the tutorial code as shown on screenshot
Thx

Duplicate of #46416


add: recipes, ingredients and tags filtering.

Now recipes can be filtered by a list of tags IDs and or ingredients IDs. Ingredients and tags can also be filtered by assigned_only parameter (only if there are recipes that contain those ingredients or tags)

Please! STAPH!!!


Set the deletion grace period to 1 on forced VM restarts

What this PR does / why we need it:
In order to allow a swift and safe restart, set the deletion grace period to 1 on the pod delete when a force restart is requested.
One is the shortest safe restart period where we don't risk a split-brain scenario for VMs, since Zero effectively deletes the pod right away.
This leads to the following outcome:

If a guest OS is stuck, people get a swift restart.
Users don't risk data corruption.
Reserving a force pod delete for situations where the cluster is unhealthy.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #9830
Special notes for your reviewer:
Release note:

Fix the possibility of data corruption when requestin a force-restart via "virtctl restart"

/cc @xpivarc
FYI that would be my suggestion.

/retest-required


Binance auto BNB fee transfer

Is your feature request related to a problem? Please describe.
At Binance BNB fees needs to transferred manually, and this would be done automatically.
This also prevent user stopping to bot before making fee transfers.
Describe the solution you'd like
After solving issue #283 we can implement a feature with transfers fee's to BNB automatically after every transaction.
This can be enabled or disabled by a config.
Describe alternatives you've considered
Additional context

could you please help to understand the issue?
as far as I know, if you have enough BNB in your account and enabled using BNB for fees, the fees are automatically deducted from the BNB amount you have in your account. what do you mean by "transferring fees manually" ?


chore add timers for performance tuning

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


Annaraya - write a contribution doc and collaborate with D Ther Htun

@narasago - D Ther Htun will help with this project and help finish it soon.


build(main): release 1.1.3

:robot: I have created a release beep boop
1.1.3 (2024-09-26)
Documentation

Add example for a simple Telegram bot using Telegraf library (1f0fa5d)

Code Refactoring

examples: Added a new example for a simple Telegram bot using the Telegraf library. (1f0fa5d)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v1.1.3
:sunflower:


feat(ai-proxy): add option to return model name in response header

Summary

Checklist

[x] The Pull Request has tests
[x] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
[ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

will do cherrypick as part of https://github.com/Kong/kong-ee/pull/9912


fix: dynamic isDraggable and isResizable remount

Fixes #240
Fixes #892
Issue:
Childrens are remounted when isDraggable or isResizable is changed.
Solution:
The Resizable and DraggableCore parents are always mounted to prevent remount of children.
Use disabled to prevent calling drag handlers and hide the resizable handle with css.

This PR will also fix #626

Made another way to do it #937
Not speaking for maintainer, but I am not sure switching to always wrapping with DragggableCore is good. In my version you can still remove DraggableCore by setting isDraggable off.

Any updates on this or #937 ?
The fix for the remounting issue is required for us to be able to use this library.

Another ping for this PR to get looked at. This is a pretty major blocker for many scenarios.

What performance impact will this have? I am also loathe to always wrap elements when not needed. I would prefer the user to manually hide the handles if they have the desire to make draggability/resizability dynamic.

I would prefer the user to manually hide the handles if they have the desire to make draggability/resizability dynamic

Currently entering/exiting editing triggers complete reload of all widgets - depending on scenario, this may not be a great experience. Specifically for us it is expensive as widgets have expensive rendering paths.
I am not sure there's a way to make draggability dynamic with current version - other than switching each widget to static?

What performance impact will this have? I am also loathe to always wrap elements when not needed. I would prefer the user to manually hide the handles if they have the desire to make draggability/resizability dynamic.

@STRML As far as performance impact, what are your concerns here? Otherwise, I actually tend to agree with you on the second part (in the sense that, we shouldn't clutter the code-base with various features that can be achieved with some code on the user's side). However in this case I think there is a good use case as others stated.

This can be done for resizability per item by hiding the handle via CSS, and for grid items by returning false from the grid's onDragStart(i: string, x: number, y: number, { e, node }: GridDragEvent) callback.

While that is good to know, I don't really consider those solutions to be much more than hacks. In general, I expect React components to dynamically respond to configuration updates with only minor rerendering; that is one of the core constructs of React. The fact that there are isDraggable and isResizable props that require such hacks if you want them to respond in the "expected" way indicates to me that something more should be done in this area.

Nudge...

Great to see progress... What is the "Labeler / label (pull_request)" check that's failing?

@STRML, are you strongly opposed to this change? As it stands, is there any likelihood that this gets approved, or should this PR be closed?

This can be done for resizability per item by hiding the handle via CSS, and for grid items by returning false from the grid's onDragStart(layout, oldItem, newItem, placeholder, e, ?node) callback.

The above worked almost perfectly, but since the GridItem.jsx onDragStart computes and sets the dragging state value before it invokes this.props.onDragStart && _this.props.onDragStart, this meant that if I clicked on any disabled dashboard widget when not in edit mode, then react-grid-layout would still append the react-draggable-dragging className to the widget.
This caused a particularly nasty issue where any widget that had been clicked before we entered edit mode would get "stuck" in its "dragging" position until you dragged it away and then back in. If you tried to drag a non-stuck widget over the stuck one, they would just overlap with each other.

To fix this, I took the aforementioned advice from STRML and also utilized some techniques outlined in all of the related issues to reach what I would consider to be the current "canonical" solution to the unmount/remount bug that occurs when you change isDraggable/isResizable
https://github.com/STRML/react-grid-layout/issues/89
https://github.com/STRML/react-grid-layout/issues/240
https://github.com/STRML/react-grid-layout/issues/362
https://github.com/STRML/react-grid-layout/issues/371
https://github.com/STRML/react-grid-layout/issues/379
https://github.com/STRML/react-grid-layout/issues/626
https://github.com/STRML/react-grid-layout/issues/721
https://github.com/STRML/react-grid-layout/issues/756
https://github.com/STRML/react-grid-layout/issues/1067
<StyledReactGridLayout
    ...
    // this completely disables the drag functionality for a GridItem
    draggableHandle={!this.props.editing ? ".not-draggable" : null}
    // this is our internal redux store value that tracks whether we have clicked the edit button
    editing={this.props.editing}
    // these should always be set to true to prevent remounts
    isDraggable
    isResizable
    // if we are editing, we want the default onDragStart functionality
    // if we are not editing, then we return false to disable the internal GridItem onDrag
    onDragStart={() => this.props.editing}
    ...
>
    {...}
</StyledReactGridLayout>

import styled, { css } from "styled-components"
import RGL, { WidthProvider as provideWidth } from "react-grid-layout"
const ReactGridLayout = provideWidth(RGL)

export const StyledReactGridLayout = styled(ReactGridLayout)`
    position: relative;
    transition: height 100ms ease;

    .react-grid-item {
        box-sizing: border-box;
        transition: all 100ms ease;
        transition-property: left, top;

        .react-resizable-handle {
            display: none;
        }

        ${props => (props.editing) && css`
            .react-resizable-handle {
                display: initial;
            }

            &:hover {
                cursor: pointer;
            }

            &:active {
                background: #dadada;
                cursor: move;
            }
        `}
    }
`

Alright. I think yall have convinced me that this is worth the rather small bit of overhead that is added in cases where you are not using draggability/resizability. I would rather that this component be easy to use. Merging. I'll cut a release in the next few days when I have time to prepare the changelog and do extra regression testing.

Will be released in a few minutes in 0.18.0.


[od] first implementation

oh, also:  od belongs in the file sub-directory category, since it works with binary files in addition to text files.


It does not manage groups, permissions or content presentation...

Hello Karoly,
"It does not manage groups, permissions or content presentation ..."
What will it cost you to complement the "ulogin" with the characteristics mentioned above?
I have interest and need to add this product to my project.
Regards.

Sorry, but I have no interest in adding such features.


match lowercase based extensions

Several changes to help match against extensions that happen to be uppercased.

Coverage remained the same at 71.338% when pulling 45098ed88d63e4633e40acb7af5a4ca3fd52f859 on sjlu:extmatch-patch into a4ca8538178641a9db55c663868784c2a1197b70 on clappr:master.

Thanks @sjlu! :beers:


v1.20.1 version bump

Backstage release v1.20.1 has been published, this Pull Request contains the changes to upgrade to this new release
Please review the changelog before approving, there may be manual changes needed to enable new features:

Changelog: v1.20.1
Upgrade Helper: From 1.20.0-next.2 to 1.20.1

Created by Version Bump<PHONE_NUMBER>

Closing in favor of v1.20.2


Pass min and max parameters for text as they are used in type=date

Creating a text type=date input ignores the min and max parameters making writing a ranged date input difficult see  Date Test Cases. and Forum Discussion

There is a pull request here https://github.com/observablehq/inputs/pulls which addresses this issue.

Enhancement added in Date min max #162 has been merged.


NameError: name '_seed' is not defined

Reproduce steps:

git clone https://github.com/FlagOpen/FlagGems.git
cd FlagGems
pip install .

cd tests
pytest test_xx_ops.py

error:

tests/test_binary_pointwise_ops.py:3: in <module>
    import flag_gems
/usr/local/lib/python3.10/dist-packages/flag_gems/__init__.py:4: in <module>
    from .ops import *  # noqa: F403
/usr/local/lib/python3.10/dist-packages/flag_gems/ops/__init__.py:21: in <module>
    from .dropout import native_dropout
/usr/local/lib/python3.10/dist-packages/flag_gems/ops/dropout.py:24: in <module>
    del _seed
E   NameError: name '_seed' is not defined

Solution:
I tried to workaround this problem by defining _seed and _offset, hacking FlagGems/src/flag_gems/ops/dropout.py from
try:
    tl_rand_dtype = tl.int64

    @triton.jit
    def _rand(seed, offset):
        offset = offset.to(tl_rand_dtype)

    _grid = (1,)
    _seed, _offset = philox_cuda_seed_offset(0)
    _rand[_grid](_seed, _offset)
except Exception:
    tl_rand_dtype = tl.int32

to
try:
    tl_rand_dtype = tl.int64

    @triton.jit
    def _rand(seed, offset):
        offset = offset.to(tl_rand_dtype)

    _seed = 0
    _offset = 0
    _grid = (1,)
    _seed, _offset = philox_cuda_seed_offset(0)
    _rand[_grid](_seed, _offset)
except Exception:
    tl_rand_dtype = tl.int32

, and it worked properly.
Is there any formal solution for it?

operator dropout has been updated. please take a try on the new commit.

It works. Thanks.


File not found in OlapicCurationStreamEntity.h

After installing the pod v2.0, I can't run the project because I get this error line 30
#import <OlapicSDK/OlapicSDK.h>

Olapic-SDK-iOS/OlapicCurationStreamEntity.h:30:9: 'OlapicSDK/OlapicSDK.h' file not found

Did I miss something in the installation?

This was already fixed.


Reporting bug on bug - handle indexer & query service

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Go to nft.kodadot.xyz
That's it

Maybe issue #767 #769

Opened pr #772


Support resizing of lines

:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages (more info).
[ ] Added or updated documentation.
[x] Tests for new functionality and regression tests for bug fixes.
[ ] Screenshots or videos attached (for UI changes).
[x] All your commits have a Signed-off-by line in the message (more info).

@weeman1337 @maheichyk The issues you mentioned above will be addressed in the next ticket (currently in progress).

@weeman1337 @maheichyk The issues you mentioned above will be addressed in the next ticket (currently in progress). That is already planned.

Can we add it then to the acceptance tests of this issue?

@weeman1337 @maheichyk The issues you mentioned above will be addressed in the next ticket (currently in progress). That is already planned.

Can we add it then to the acceptance tests of this issue?

That's already the case. However, I just fixed both issues here now.


BraveService should be public non final

Armeria version: 0.92.0
Problems:

There're times we want to exclude some path. Eg: /healthz, /metrics, etc...
I am new to Armeria so I don't know is there any thing like dynamic decorator (I guest not)

Work around:

Create com.linecorp.armeria.server.brave inside my code and rewrite BraveService

Solution:

Open BraveService to public
Has some kind of optional filter/predicate for each Service. (I want to exclude access log too) This is not what I really want, currently Decorator is doing good in this part

That's a good point. As a workaround, you could define a decorator that wraps a BraveService:
public class MyDecorator extends SimpleDecoratingHttpService {

    private final BraveService braveService;

    public MyDecorator(Service<HttpService, HttpService> delegate) {
        super(delegate);
        braveService = BraveService.newDecorator(...).apply(delegate);
    }

    @Override
    public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) {
        if (req.path().startsWith("/healthz")) {
            return delegate().serve(ctx, req);
        } else {
            return braveService.serve(ctx, req);
        }
    }
}

However, I'm not sure if it's a good idea to open BraveService, because we prefer composition over inheritance in many cases. What do you think about providing a way to exclude a certain path pattern from a route instead? i.e. It'd be nice if we have an API like the following:
ServerBuilder sb = Server.builder();
sb.routeDecorator()
  .pathUnder("/")
  .exceptUnder("/healthz")
  .exceptUnder("/metrics")
  .except("/foo/:bar")
  ...
  .build(myDecorator);

/cc @ikhoon

Being able to express negative path expressions seems useful (though a little concerned about performance). For this use case, though, I think it's better to use Brave's native functionality. You can customize the sampling policy of HttpTracing to ignore paths. Actually zipkin-server itself does just that
https://github.com/openzipkin/zipkin/blob/master/zipkin-server/src/main/java/zipkin2/server/internal/brave/ZipkinSelfTracingConfiguration.java#L120

What do you think about providing a way to exclude a certain path pattern from a route instead?

Excepting specific paths from decorating the path looks useful.👍 But in this case, I lean toward to the customizing HttpTracing suggested by @anuraaga 😀

I'm not sure if it's a good idea to open BraveService, because we prefer composition over inheritance in many cases.

I agree with your opinion. I prefer composition or configuration for extending or customizing a feature to inheritance.

Thank you for your quick relies.
So, for the Zipkin/Tracing I think I better custom HttpTracing. Thank @anuraaga.
And other use cases, I may use composition pattern like @trustin just mention above.
Thank you.


Make comment more descriptive

Minor change that explains the setting better.

@bboe The CI failing is a black issue. I re-ran the CI on the latest commit in master and that is failing as well.

Black got updated recently.

Sounds like we need to make a PR to fix black issues, and then have everyone rebase. Who can take that on?

I can do that later today or tomorrow.


M3-888 Adjust button styles for Add New linode empty page button

Coverage remained the same at 28.04% when pulling 7d6355170d67d403e9998c5d97b3d408d0e3e0de on alioso:M3-888 into 622a7e5d91b7f153a22ca7492f234fbdcebf29c9 on linode:develop.


Union of string and literal type results in error

tsc: 2.2.0-dev.20170119 and 2.1.5
interface B {
    p: string
    q: string
}
interface C {
    p: 's'
    r: number
}

type X = B | C

let x: X = {  // <-- error
    p: 's',
    r: 1
}

Error message:
Type '{ p: string; r: number; }' is not assignable to type 'X'.
  Type '{ p: string; r: number; }' is not assignable to type 'C'.
    Types of property 'p' are incompatible.
      Type 'string' is not assignable to type '"s"'.

Playground repro:
http://www.typescriptlang.org/play/index.html#src=interface B {
    p%3A string
    q%3A string
}
interface C {
    p%3A 's'
    r%3A number
}

type X %3D B | C

let x%3A X %3D {
    p%3A 's'%2C
    r%3A 1
}

In B|C property p has the type string | 's' which is essentially a string. the type of p in the object literal then is inferred as string because of the contextual type. but then the assignment compact fails, since it is not assignable to B, nor to C.
so we can either disable the optimization to remove literal types if its base type exists in a union, leaving (B|C).p stay string | 's', or infer a literal type if the contextual type is the base liteal type

Same issue reported in https://github.com/Microsoft/TypeScript/issues/13628

Proposed fix is to retain literal types when a primitive contextual type is present

Seems fixed in latest.


JSONB, is not being set to its default value

The potential issue is that after an increase in database size, the DataSource column, which is of type JSONB, is not being set to its default value. However, it allows for this if we perform a database cleanup. Therefore, the solution is to set the default value of the JSONB-type column to null.
created issue for same
https://github.com/kruize/autotune/issues/1065

@chandrams this issue not able to reproduce locally  as it requires DB size increase to existing DB without clean up command.

merged into MVP
https://github.com/kruize/autotune/pull/1085


fixed a mistake

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

Thanks for correcting this typo! - john

dear john, happy to help🌈


Doesn't correctly format CSS media queries

CSS media queries don't format. For example:
@media (max-width: 1200px)  {
    .classname {
        display: block;
    }
}

i don't know when it get fixed  but it is fixed now


Add deployment artifacts for RedStone smart contracts

What was the problem?
This PR resolves #LISK-1155.
How was it solved?
Transaction data which was generated during deployment is available inside deployment folder.

@matjazv Are we not adding the L2PriceFeedWithoutRounds contract addresses for LSK/USDT/ETH to mainnet/l2addresses.json? 🤔

We don’t intend to add these addresses to the mainnet/l2addresses.json file. These contracts are created using a factory contract and can be actually deployed without any additional scripts.


Log parser for PowerToys

(Not sure under which category/where to put this...)
Hi All,
I have created log parser for the logs created by PowerToys.
It may be relevant/usefull for troubleshooting issues and errors.
I have multi purpose log application at Analogy Log Viewer
A also created dedicated Parser at Analogy.LogViewer.PowerToys
for now, It targeted .net core 3.1 so just need to download Analogy Log Viewer latest, download PowerToy Parser dll, put it at the same folder of the application and run it.

Oh wow. Great work.

@ryanbodrug-microsoft and @enricogior this will be nice.
We should standardize the logs between all the .net stuff IMO.

I will add a file that links to this.

BTW in the latest version I added auto download so it is enough to just download version 4.3.1 and from within the application everyone can download PowerToys Parser form the update window.

@liorbanai, we are tweaking the formatting here pretty constantly.  How are is it to keep this up-to-date?

No problem. Do we want to keep support for old formats or just forward compatibility?  Another option is to have same version as Power Toys itself so the version itself will be to indecator of the format Or to have log format version in the file log itself...

Actually, I believe, it easy to support multi (old) formats. Just need notification when the format changes..

For what porpuse is this still open?


Fix issue of stopping periodic job

improve op command by using cache
return 404 if no job found to stop

Coverage decreased (-0.04%) to 63.513% when pulling 6c6dbbe7ff72746b6d2b72ba90c08f92db2ca030 on fix_stop_periodical_job_issue into e4952b7a6373d6845a21000afef3f3a5e160bd75 on job_service.


error in serialize

I have the following error when serializing
okhttp3.CookieJar$Companion$NoCookies
The code I wrote in Android is below :
IGClient client = IGClient.builder()
.username(username)
.password(password)
.client(httpClient)
.onChallenge(challengeHandler)
.login();
File path = getApplicationContext().getFilesDir();
File to = new File(path, "igclient.ser");
File cookFile = new File(path, "cookie.ser");
client.serialize(to, cookFile);

I suggest you to use [*EasyInsta](https://*github.com/ErrorxCode/EasyInsta
) library. It is too easy and also have fast developer support.
On Sun 13 Feb, 2022, 6:56 PM amirsheykhian, @.***>
wrote:

I have the following error when serializing
okhttp3.CookieJar$Companion$NoCookies
The code I wrote in Android is below :
IGClient client = IGClient.builder()
.username(username)
.password(password)
.client(httpClient)
.onChallenge(challengeHandler)
.login();
File path = getApplicationContext().getFilesDir();
File to = new File(path, "igclient.ser");
File cookFile = new File(path, "cookie.ser");
client.serialize(to, cookFile);
—
Reply to this email directly, view it on GitHub
https://github.com/instagram4j/instagram4j/issues/648, or unsubscribe
https://github.com/notifications/unsubscribe-auth/APWEVDSAM6SHV3FBFAVH4A3U26WO3ANCNFSM5OI7LNIQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

mee to


Bump quarkus

Checklist

[ ] You added tests to cover the change
[ ] mvn clean install build and test completes
[ ] You changed or added to the documentation

Looks like CI failed...


Comunity Speed Test

Dear Stylus Community,
I am a computer-science student in Holland and i am doing research on css-preprocessors. One of the aspects i am interested in is the community support. This is a test to discover the reaction speed of the community to issues. I will measure the time it takes to close this issue.
Would the first person who reads this please close this issue?
Thanks in advance!

:)

@kizu Thanks! You are the second to respond. Congratulations!

(I couldn't close it, so I didn't answer this :P)


Add option for whole-word search

This PR adds checkbox option to the search that supports only returning results for whole-word matches.

closes #31

cc @elliottslaughter @lightsighter

Searching for "64" with the whole-word option unchecked yields many results, including ones with 64 in the middle of words:

Checking the whole-word option updates to fewer results that only have "64" as an entire word:

@elliottslaughter friendly reminder I can't push the button


Change AttributeValue::Data from reference to value

The first commit improves performance for parse_attribute. Without this, the second commit results in a decrease in performance, but with it we have a net gain.
The second commit changes AttributeValue::Data from reference to value. I did this as a step towards changing gimli to use a Reader trait. This should be more efficient than either allocating memory, or  storing an offset/length for something that is only up to 8 bytes, and then needing to dereference it via the Reader trait later.
For future work, there's still other reference variants in AttributeValue that can't be changed to inline values (Block, ExprLoc and String). Not sure if we have decided what direction to take for things like these: do we want to change these to offsets, or allocate memory for them immediately (possibly using Cow)? My preference is to use offsets, so that we're not paying an allocation for cases where we don't actually need these values. For cases where we do need them, the value should still be in the buffer of the Reader.

Coverage decreased (-0.1%) to 92.888% when pulling cdaf7c79538cf0739f3cd833275445fda6615882 on philipc:data into a8f5b55528c6839f7254f83b7040e6be936a6409 on gimli-rs:master.


Locked pages view and options to hide remote management and show the commit author

I added a locked pages view and extra options to hide remote management and show the commit author.
Maybe the locked pages could be their own plugin, but I like having this within the same menu section.
In my scenario, I only have a local git repository and I would like to have a history of edits and the info who did it.
Also sometimes other editors forget to save their changes, so the locked pages view is very helpful.
And btw. thanks a lot for the great plugin!

Hi, thanks for your pull request! Would it be possible to split these changes into three separate commits? The author feature is already implemented (see #111), and from my point of view, hiding remote management and showing locked files are two different features.
I'm also not sure the locked files feature should be included in this plugin, as it has nothing to do with git. But I like the idea in general and I'm happy to think about including this feature.


Add new Language for Instructions

I would like to add a new language for routing instructions. I've seen that I need to implement this interface
ILanguageReference and this basically consists of a Dictionary.
My question is : where can I find the Dictionary  with all the keys need it in English so that I can translate?
Thanks,
Johnny

The keys depend on the implementation of the profiles. Currently it just returns the exact same string because the profiles are code in English. You can see this here for example:
https://github.com/itinero/routing/blob/develop/src/Itinero/Osm/Vehicles/car.lua#L293
The key in this line:
instruction.text = itinero.format(language_reference.get("Take the {0}th exit at the next roundabout."), "" .. exit)
is this string
"Take the {0}th exit at the next roundabout."
That's what needs translating. I suggest you make a translate dictionary but build a set of regression tests for each update of the profile to make sure everything is translated. If you need it translated and maintained, feel free to submit a pull request.
Also, I know this way of providing translations is far from perfect, any ideas you have for future versions, let us know.

@xivk thank you for your answer, much appreciated.

Closing this, it's on the roadmap to improve on this for Itinero 2.0, feel free to reopen if you have any more questions.


Minor glitches and additions for the app

So I've been testing the app and here's what I found while I was making my best finding ways to break it (hope it's not all stuff that could be fixed by just a button I didn't notice while testing it lol)
This is just focused on the little things, they're not really important alone, but together they would make for an overall better experience, anyways here's the list:
-The app crashes after you change the language or theme and exit the settings menu.
-While you are in the settings menu, everytime you minimize and open the app, all the text duplicates below the original thing.
-When you enter the first page in the page viewer, the number on it displays 999/999 instead of 1/insert number (it returns to normal if you scroll to the next page and then to the first one, but it will happen again if you exit the page viewer and enter in the first one again).
-When going through the page viewer, one page will eventually have an error loading and the only way to reload it is to either exit the page viewer and re-enter it or to scroll 2 or 3 pages after that image and go back so it reloads. An error message saying "An error happened while loading the image" along with a "Try again" button would be much appreciated.
-When you use the "Download all galleries in this page", while one gallery downloads normally, all the other ones shows as 100% done downloading while that is not actually true, to get around this, all other galleries waiting for download should display as "Waiting in queue"
-As a really tiny design thing, it would be great if the inferior text on the confirmation boxes (OK, CANCEL, etc) were white in the dark theme and black in the light one because it's normally kinda hard to read it.
-Also please add the option to directly input a number in the page viewer, just like with the app's main page, it would be much better than to scroll using the bar when the gallery is 50+ pages long.
Thank you for putting so much work on the app, it's already much better than the actual site interface, just know that I'm really thankful for it!

Thanks for all the suggestions, I will fix them soon. The only one I couldn't replicate is the first neither in Android JellyBean (API 16) neither in Android Pie (API 28), the behaviour should be of restarting the app, if this doesn't happen I'd like to know your Android version to be able to replicate it

I use the Android 5.1.1 lollipop version

Also, I just noticed that the "Sort by popular" button doesn't work in the main page, I think that could be worked around by using a search result like "-qoiahsbxnxnzkqpqojska" or some text that would never become a gallery as the main page, because in the site it enables you to navigate through popular without actually adding any search terms

They should all be fixed in 2.2.1

If you click on the page number it will now open the page chooser
Now the image shown when the download failed can be clicked and it will retry downloading that page
The download not started won't have a percentage and an indeterminate progress bar
Now the texts should all be visible

Wow you work really fast damn lol, like thank you really much

UPDATE: About the reload function, I found two bugs with the reader:
1- When going through a gallery normally with every image loading, when one of the pages has to be reloaded, it will load for a while and will fail again, this happens with the page you reloaded and all the ones that come after it, it only fixes itself by exiting the reader and opening it again.
2- The app tends to crash a lot while going through the reader, normally when you're browsing through lot of unloaded pages

Now it should be fixed

There should be a section for downloaded Chapter
But i see no option like that
All chapter downloaded just Vanishes from the app and cannot be Obtained thru App
Can i have a Hint of where do the downloaded files go?


(iOS) Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.

I've followed all the steps from https://github.com/meedan/react-native-share-menu/blob/master/SHARE_EXTENSION_VIEW.md and I cannot redirect my app to the component that I wish.
My index.share.js
import { AppRegistry } from 'react-native';
import Share from './Share';

AppRegistry.registerComponent('ShareMenuModuleComponent', () => Share);

My Share.tsx
import React from 'react';
import { Text, View } from 'react-native';

const Share = () => {

  return (
    <View>
      <Text>Hello</Text>
    </View>
  );
};

export default Share;

Here is the error
 ERROR  TypeError: null is not an object (evaluating 'RNI18n.languages')
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.

I am facing the same thing, @jorgemorazan did you manage to resolve this issue?

@matanrokach not at all.


memory_level parameter in docstring misleading

the title says all. This is a parameter of the masker used in first and second level models.

Sorry, I don't get it. Closing for the moment.
Note that this type of issue should be worked on in Nilearn and Nistats jointly.


override tuningsets qps for 25k and 30k nodes

What type of PR is this?

/kind feature

What this PR does / why we need it:
override tuningsets qps for 25k and 30k nodes cluster.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

/lgtm

/approve


Brainstorm on tag nesting

Is there tags nesting support planned?
Like:
Furniture
|- Table
|  |- Coffee table

And availability to work with tags like with categories. Step-by-step choosing tags: If you have chosen Furniture - you can only choose next tag only from Furniture children.
That way of tags suppose restricting creation of new tags by users automatically (or premoderate them).

Interesting feature. Will consider to implement.


Error Invalid client

Hi,
I'm receiving below exception when I'm trying to create a NaturaUser:
com.mangopay.core.ResponseException:  {"error":"invalid_client","error_description":"The authorization header was malformed or not recognized"}
create user call is done as the following:
...
try {
new createUserNatural().execute();
} catch (Exception e) {
e.printStackTrace();
}
}
private class createUserNatural extends AsyncTask<User,Void,User> {
    @Override
    protected User doInBackground(User... params) {
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            MangoPayApi api = new MangoPayApi();
            User user = new UserNatural();
            try {
                user = api.Users.create(user);
            } catch (Exception e) {
                e.printStackTrace();
            }
            return user;
        }
        return null;
    }

    @Override
    protected void onPostExecute(User user) {
        System.out.println(user);
    }
}

could you please help ?
thanks!

Good morning @niko227
Please have a look at our Readme page on GitHub, I guess it will be helpful.
It seems you don't have provided any clientId or password, which is absolutely mandatory to use our API:
import com.mangopay.MangoPayApi;

    // ...

    MangoPayApi api = new MangoPayApi();

    // configuration
    api.Config.ClientId = "your-client-id";
    api.Config.ClientPassword = "your-client-password";
    //api.Config.BaseUrl = "https://api.mangopay.com";

    // call some API methods...
    List<User> users = api.Users.getAll();

To ask for a sandbox account, nothing complicated: https://www.mangopay.com/en_UK/signup/create-sandbox/
For further informations, please contact our support team.
I hope it will be helpful!
Mickaël


Specifies the location of the docker-compose executable

My proposal for the issue #58

Thanks for contribution! Released as 0.3.20.

Thanks for the quick release.


Cloud Commerce Partner Procurement API

Is there a reason why this collection does not include the Google Cloud Commerce Partner Procurement API cloud client library?
Elsewhere on GitHub, I have requested the conversion and addition of the Google Cloud Commerce Partner Procurement OpenAPI spec in YAML. This could be used to generate a Java client library using something like OpenAPI Generator.

Issue#23@google-discovery-to-openapi
Issue#36@google-discovery-to-swagger

Note: We have a library here that you can use: https://github.com/googleapis/google-cloud-java/tree/main/java-cloudcommerceconsumerprocurement

This suggested library is for use by Cloud Marketplace customers. My request is related to 'Partner' version of the API leveraged during the provisioning of a marketplace offer.

I see. I'm not too familiar with the partner version. Let me reach out to the team to get more information about the library and the status.

Hi @sandeep-khanna, I have reached out to the service team for more information.
The Partner API is only used for companies selling through GCP Marketplace: https://cloud.google.com/marketplace/docs/partners/get-started. Users are onboarded when they become a reseller. The service team will enable the API on a dedicated "producer project" for that Marketplace Partner and you will be able to use API keys from that project to access the API.
Currently, only certain languages have the Partner API library released (for example: golang). There currently is not an ETA for releasing an equivalent library for Java.


🐸Split unit and integration test commands

Addresses #47

🐸

Hopefully this PR will be merged by Hacktoberfest 2023 🙏

@dhet thanks for PR. The PR will be counted by Hacktoberfest even if it's not merged by 2023 😉


ArangoDB Foxx Install via ZIP Frontend

Installation of a foxx application via zip-file is not possible when those steps are done:

Open Web-Interface
Go to tab "Applications"
Click Button "Add Application"
Click Zip
Drag&Drop or select zip-file
Now enter mountpoint
Then click install

Nothing happens. It works when mountpoint is entered first.

Fix confirmed (devel), closed.


Unable to import module

Hi,
the plugin does not work for me, from CloudWatch Logs:
Unable to import module '_warmup/index': Error at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19)
Unable to import module '_warmup/index': Error
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

Does it only work if you are using nodejs runtime?

@oleschaper provide more information such as:

sls version
sls plugins you are using in which order
plugin version
plugin options
which command did you run to deploy?
have you confirmed that the warmup lambda is created?

Thank you, sorry here are a few more information.
Serverless Version:
1.18
Plugins:

serverless-dynamodb-local, Version: ^0.2.22
serverless-plugin-aws-alerts, Version: ^1.1.0
serverless-plugin-warmup, Version: ^3.0.5-rc.1

I'm using the java8 runtime.
I upload a jar archive that is build using maven to AWS.
The warumup lambda is created, the error log I posted earlier is from the lambda log.
I guess the problem is that the serverless plugin is a runtime dependency and maven does not include any nodejs dependencies?

Warmup lambda execution only depends on the available lambda runtime aws-sdk, there is no external dependency as you can check here.
If it's a path issue and you have your warmup created. What is the path of the function handler in the console? Can you invoke your warmup manually?
Let us know your findings.

Hi,
thank you for your reply!
So the Lambda Function and Log Group is created.
If I try to invoke it manually in the aws lambda web interface, I get the following error message:
{   "errorMessage": "Cannot find module '/var/task/_warmup/index'",   "errorType": "Error",   "stackTrace": [     "Function.Module._load (module.js:417:25)",     "Module.require (module.js:497:17)",     "require (internal/module.js:20:19)"   ] }
Not sure what you mean by "path of the function handler in the console"?
Thank you for your help!

Hello
Same for me , i am running the project for aws-maven-java and i got same error above
I Received the below WARN when installing the plugin
localhost:spring-cloud-function-adapter-sample shahbour$ npm install serverless-plugin-warmup --save-dev
npm WARN saveError ENOENT: no such file or directory, open '/Users/shahbour/IdeaProjects/spring-cloud-function-adapter-sample/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/shahbour/IdeaProjects/spring-cloud-function-adapter-sample/package.json'
npm WARN spring-cloud-function-adapter-sample No description
npm WARN spring-cloud-function-adapter-sample No repository field.
npm WARN spring-cloud-function-adapter-sample No README data
npm WARN spring-cloud-function-adapter-sample No license field.

+<EMAIL_ADDRESS>added 6 packages in 3.791s

deploying was successful
localhost:spring-cloud-function-adapter-sample shahbour$ serverless deploy
Serverless: WarmUP: setting 1 lambdas to be warm
Serverless: WarmUP: aws-java-maven-prod-list-customer
Serverless: Packaging service...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
...............................
Serverless: Stack update finished...
Service Information
service: aws-java-maven
stage: prod
region: us-east-2
api keys:
  None
endpoints:
  GET - https://cby15kvb6f.execute-api.us-east-2.amazonaws.com/prod/customer
functions:
  list-customer: aws-java-maven-prod-list-customer
  warmUpPlugin: aws-java-maven-prod-warmUpPlugin

but then checking the cloudwatch logs it shows
REPORT RequestId: e3447039-83e2-11e7-9c77-3b68224375f9 Duration: 9.15 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB
START RequestId: e3447039-83e2-11e7-9c77-3b68224375f9 Version: $LATEST
Unable to import module '_warmup/index': Error
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
END RequestId: e3447039-83e2-11e7-9c77-3b68224375f9
REPORT RequestId: e3447039-83e2-11e7-9c77-3b68224375f9 Duration: 20.43 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB
START RequestId: e3447039-83e2-11e7-9c77-3b68224375f9 Version: $LATEST
Unable to import module '_warmup/index': Error
at require (internal/module.js:20:19)
END RequestId: e3447039-83e2-11e7-9c77-3b68224375f9
REPORT RequestId: e3447039-83e2-11e7-9c77-3b68224375f9 Duration: 9.79 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB

Cannot find module 'bluebird'

when serverless-webpack go to pack the js file and they need this
/***/ 0:
/***/ (function(module, exports) {

module.exports = require("babel-runtime/core-js/json/stringify");

/***/ }),

/***/ 2:
/***/ (function(module, exports) {

module.exports = require("bluebird");

There is the issue.
No idea with webpack thinking... anyone can help?

Hi All,
I find a solution. the issue is come from babel-loader.
They try to convert JSON.stringify and promise to Bluebird and babel-runtime.
So what did i do is add this config inside webpack.config.js
new CopyWebpackPlugin([
      { from: './node_modules/bluebird',
        to: '_warmup/node_modules/bluebird'
      },
      { from: './node_modules/babel-runtime',
        to: '_warmup/node_modules/babel-runtime'
      },
      { from: './node_modules/core-js',
        to: '_warmup/node_modules/core-js'
      }])

May be different project have different require. So please check _webpack/index.js

Hi @yoyeung
Thank you for your answer but I do not understand what you are talking about.
Could you please explain:

Where is "Cannot find module 'bluebird'" coming from?
Where does serverless-webpack put the js files?
Where did you put the module.exports?
Where do I find the webpack.config.js?

Thank you very much.

I was reading the serverless docs about packaging again (https://serverless.com/framework/docs/providers/aws/guide/packaging#artifact) and it says:

For complete control over the packaging process you can specify your own artifact zip file. Serverless won't zip your service if this is configured and therefore exclude and include will be ignored. Either you use artifact or include / exclude.
The artifact option is especially useful in case your development environment allows you to generate a deployable artifact like Maven does for Java.

So again, my guess would be that the warmup lambda js function/files are just not included in the artifact that is uploaded to aws because it is not in the jar file that maven generates (since it is not a java dependency) and serverless ONLY uploads that artifact file.
Solution would be to include the needed files into the artifact by adding them to the maven pom.xml but I don't know what to include (something called index I guess from the logs) and where to find it.
Any help/thoughts?
Thanks!

Ok, so I found that you are using individual packaging for the warmup function here:
https://github.com/FidelLimited/serverless-plugin-warmup/blob/master/src/index.js#L271-L275
Maybe this is also ignored by serverless if I use an artifact file?

It is working for me now but the solution is not optimal.
My guess was right, you have to include the warmup function in your jar manually since packaging: individually: is ignored if you are using packaging: artifact: in your service (which I guess everyone using java would do).
Would be great to fix this.
Thanks!

Hi @oleschaper.
Thanks for discovering the cause of your issue.
What comes to my mind as a solution is adding this logic within your artifact build logic:

run serverless package command
extract the warmup lambda from the .serverless folder
repackage the warmup lambda inside your artifact

Hi,
yes that is what I ended up with basically, although I had to modify the plugin in line https://github.com/FidelLimited/serverless-plugin-warmup/blob/master/src/index.js#L154
with this:
return fs.move(this.pathFolder, 'src/main/resources/_warmup', { overwrite: true })
otherwise it would delete the lambda function.
Would be great to include that if some option is set maybe.

Oh and the order of commands would be:

sls package
mvn package
sls deploy

Not a very nice solution but it works and I don't see any other way for now.
Would be great to introduce an option resourcePath in the plugin options to set the java resource folder and if it is set use
fs.move(this.pathFolder, this.warmup.resourcePath '/' + this.folderName, { overwrite: true })
instead of
return fs.removeAsync(this.pathFolder)

@oleschaper get the latest version and use cleanFolder: false.
I am closing this down. 👍

So how did you guys resolve the issue? Even with cleanFolder set false the issue still remains.

@gamaro7 i have tried with cleanFolder: false with latest version of this plugin. But this issue still persists. I am doing packaging: artifact. I have tried sls package, but i cannot find warmup lambda function code in .serverless dir.
i could find only some json files.

I got that issue ...
I copied from Readme.md of this project, which contains ',' after cleanFolder: false.

Same boat , ended up ditching this plugin and using https://www.npmjs.com/package/serverless-plugin-lambda-warmup?activeTab=readme . Just works and no PITA

The problem was that last release had an issue getting SLS options. I've forgot to merge and push the patch PR version out last month. Done it now @chaitanya11.
Previous versions were working fine.

Thanks @goncaloneves

Thank you @chaitanya11 👌

If anyone other (next to me) is struggling over this issue and has problems solving it with the above discussion:
Issue
When you install the plugin via npm and you run sls package, a directory called '_warmup' within your service root will be created. If you now run sls deploy, the (in serverless.yml) specified artifact (package: artifact: artifactpath) will be uploaded to the deploy bucket on aws. But the _warumup dir which consists of the warump function written in javascript is ignored. This causes the "module not found" error in CloudWatch
The solution
You have to move the _warmup dir into your resources folder (src.main.resources) of your service. This folder will be unpacked by maven and will be added to the root of the .jar. AWS will search within this jar for a dir '_warmup' which consists of a index.js.
In commands
All commands are from the root of your service
sls package
'_warmup' will be created
mv _warmup src/main/resources/
move the folder to your resources dir
mvn clean package
package the artifact
sls deploy
deploys the jar
custom:
  ...
  warmup:
    memorySize: 256
    schedule: 'cron(0/5 8-17 ? * MON-FRI *)' # Run WarmUP every 5 minutes Mon-Fri between 8:00am and 5:55pm (UTC)
    timeout: 20
    cleanFolder: false
    prewarm: true # Run WarmUp immediately after a deployment
    tags:
      Project: **
      Owner: **

@AndrinGautschi Thanks for the clear info of what is happening. Just to confirm you are using the latest version 3.6.1?
Ok, I guess it took me a "while" to understand the issue here. I don't do manual artifacts on my deploy pipelines. Basically when defining a custom Serverless artifact package path the _warmup folder is still under the main service folder, making it not being present in the zip file that get's deployed.
So solution for this is fetch the artifact path when is defined and have the _warmup folder in there instead.

@goncaloneves Thanks for the fast reaction.
Yes, I use the latest version.
Yes that would do it I suppose. Another solution would be to make another configuration parameter to specify where the "_warmup" folder should be placed. Then we could specify by ourself. With a little doc update, this would solve the issue (hacky, but efficient).

@AndrinGautschi Thanks for the reply. 👌 Having both options probably is the ideal solution, default sets root service path, artifact path if set, or plugin configurable path. That will tick all boxes. Hacking like pros hehe
I will push this forward when I work on the plugin.

@goncaloneves @AndrinGautschi I'm not using Maven (and my deployment happens via Jenkins), plus my directory structure seems to be a different to you guys':
.
├── resource
│   └── // database initialization, swagger documentation tooling, authentication...
├── src
│   ├── service
│   │   └── profile
│   │       ├── handler.js
│   │       ├── profile.fn.yml
       └── // All services have their own folders in here

When you say You have to move the _warmup dir into your resources folder (src.main.resources) of your service, is this a specific /resources folder called resource within each service's directory?
Like, should I make my structure like this:
├── src
│   ├── service
│   │   └── profile
│   │   │   └── resource
│   │   │   │   └── _warmup
│   │   │   │       ├── index.js

│   │   └── search
│   │   │   └── resource
│   │   │   │   └── _warmup
│   │   │   │       ├── index.js

And so on and so forth?

There seem to be multiple issues going on here.
It would be good to create separate issues.
When packaging using package: artifact (Maven) projects, _warmup is not included.
As already established, the solution is to add an option to customize the path where the warmup files are stored.
When using serverless-webpack, it can't find _warmup
Is the warmup plugin declared before the webback one? Otherwise, webpack is run before warmup has generated its files.
Anyway, why do you need to process the warmup handler using webpack?
You config says // Run babel on all .js files and skip those in node_modules
Probably excluding anything inside _warmup is the solution...

Thinking a bit more about this...
Would it be a solution to simply apply the package: artifact: at the function level instead of the service level?
So, instead of
package:
  artifacts: path/to/my-artifact.zip

functions:
  myFunction:
    ...

use
functions:
  myFunction:
    ...
  package:
    artifacts: path/to/my-artifact.zip

That way, serverless still packages the lambdas individually and correctly generates the package for the warmup plugin.

Actually, just created a PR in Serverless that fix the root cause of this issue (the individually config is not honored when there is a package: artifact: ... set up at service level).
Let's see if it can get merge and we won't need to workaround the issue 🙂

Alrighty! My PR is merged into Serverless.
So the next release of serverless you be able to solve the issues mentions in this issue.
Essentially, now you can do:
service: test

provider:
  name: aws
  runtime: nodejs8.10

package:
  artifact: my-app.zip # This can be an empty zip

functions:
  normalFunc:
    handler: func/handler.func
    events:
      - http:
          path: func
          method: post
  individualFunc:
    handler: func/handler.func
    events:
      - http:
          path: func2
          method: post
    package:
       individually: true

So running serverless package with the above config will use my-app.zip as artifact for all functions but will create a zip for the ones set as package: individually: true like func/handler.func (the func folder needs to exist of course).
Since serverless-plugin-warmup is set as package: individually: true, it will always get its own zip.

I'm also getting the same/similar error message.  I'm using serverless v1.32.0 and nodejs8.10 as the runtime.
My relevant serverless config is:

plugins:
  - serverless-plugin-warmup # I have tried this at the end of the list
  - serverless-webpack
  - serverless-plugin-tracing
  - serverless-mocha-plugin

custom:
  warmup:
    default: false # We enable this per function
    folderName: _warmup
    schedule: rate(5 minutes)
    cleanFolder: false
    prewarm: true

package:
  individually: true

functions:
  myFunc:
    handler: src/myFunc/handler.handler
    warmup: true
    events:
      ...

The error message is:
Unable to import module 'src/myFunc/handler': Error
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/task/node_modules/request/index.js:17:14)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function._load (/var/task/node_modules/@sentry/node/dist/integrations/console.js:36:47)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /var/task/node_modules/request-promise-any/lib/rp.js:9:12
at module.exports (/var/task/node_modules/stealthy-require/lib/index.js:62:23)

Perfect @juanjoDiaz. Once again, terrific work. 🙌


chore(master): release 1.1.40

:robot: I have created a release beep boop
1.1.40 (2023-05-01)
Miscellaneous

deps: lock file maintenance (0d8d29b)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/keywind/releases/tag/v1.1.40 :sunflower:


Finetuning nway parameter

Hello,
Is it possible to set nway parameter in the config to a value higher than 2? When I tried using more examples per query for fine-tuning from provided ColBERTv2 checkpoint I'm getting following assertion error:
File "../colbert/training/lazy_batcher.py", line 69, in collate
assert len(passages) == self.nway * self.bsize
AssertionError

Of course! But you need the json file to have enough negatives per line

Oh, sorry. I get it now. Thank you!


How to create a zip with the same MD5 Checksum every time?

Hello. I'm trying to create a zip with your library that has the same MD5 Checksum every time you zip the same files with the same content in the same order, but I'm getting different MD5 checksums with every zip. Is there any option to do this? I've made a bit of a research and I think it may have something to do with the time headers (timestamp of each zip entry) but I don't see at first glance any option to change that...
Thanks in advance

This depends on several factors:

Are you using encryption?
Which compression method are you using?
Does the last modified time of any of the files being added change in the meantime?
How are you creating the zip file? With ZipFile api or ZipOutputStream?

No encryption, compression method by default (I haven't changed that setting), and no I'm not changing the last modified time of the files. I'm using the ZipFile api.

I have used the code below to add the same file to zip and I compared the crc of the files, md5 generated with JDK and md5 generated with Apache Commons Codec, and in each try the test succeeds, i.e, I get the same values for the zip file that is generated.
@Test
public void testGenerateZipFile() throws IOException, DigestException, NoSuchAlgorithmException {
  File fileToAdd = new File(BASE_DIR + "sample.pdf");
  ZipFile zipFile = createZipAndAddFile(new File(BASE_DIR + "test/firstZipFile.zip"), fileToAdd);

  long firstFileCrc = CrcUtil.computeFileCrc(zipFile.getFile(), new ProgressMonitor());
  byte[] firstFileJdkMd5 = calculateJDKMd5(zipFile.getFile());
  String firstFileApacheCodecMd5 = calculateApacheCodecMd5(zipFile.getFile());

  zipFile = createZipAndAddFile(new File(BASE_DIR + "test/secondZipFile.zip"), fileToAdd);
  long secondFileCrc = CrcUtil.computeFileCrc(zipFile.getFile(), new ProgressMonitor());
  byte[] secondFileJdkMd5 = calculateJDKMd5(zipFile.getFile());
  String secondFileApacheCodecMd5 = calculateApacheCodecMd5(zipFile.getFile());

  Assertions.assertThat(firstFileCrc).isEqualTo(secondFileCrc);
  Assertions.assertThat(firstFileJdkMd5).isEqualTo(secondFileJdkMd5);
  Assertions.assertThat(firstFileApacheCodecMd5).isEqualTo(secondFileApacheCodecMd5);
}

private byte[] calculateJDKMd5(File file) throws IOException, NoSuchAlgorithmException, DigestException {
  MessageDigest md = MessageDigest.getInstance("MD5");
  try (InputStream is = Files.newInputStream(file.toPath());
       DigestInputStream dis = new DigestInputStream(is, md))
  {
    int readLen = -1;
    byte[] buff = new byte[4096];
    while ((readLen = dis.read(buff)) != -1) {
      md.digest(buff, 0, readLen);
    }
  }
  return md.digest();
}

private String calculateApacheCodecMd5(File file) throws IOException {
  try (InputStream is = Files.newInputStream(file.toPath())) {
    return DigestUtils.md5Hex(is);
  }
}

private ZipFile createZipAndAddFile(File outputZipFile, File fileToAdd) throws ZipException {
  ZipFile zipFile = new ZipFile(outputZipFile);
  zipFile.getFile().delete();
  zipFile.addFile(fileToAdd);
  return zipFile;
}

Hope the above solution helped. If you still have any question please feel free to open a new issue or reopen this issue if your question is related to this one.


Enhancement: Enable catastrophic stop loss

There should be a way to set a stop loss order every time the position changes. It would serve as a protection against events such as loss of power, ISP failures, etc.

(Original comment by RobertdeChartelier)
What's about something like :
int currentPosition = getPositionManager().getPosition();
double lastEntry = getPositionManager().getAvgFillPrice();

if(currentPosition <= 0 && ...) {
  cancelAllStops();
  setPosition(1);
  setStopSell(lastEntry - 5);
}
if(currentPosition >= 0 && ...) {
  cancelAllStops();
  setPosition(-1);
  setStopBuy(lastEntry + 5);
}

(Original comment by Eugene Kononov)
Yes, something like that, although it's probably better to handle it with the "One cancels others" type of order: http://individuals.interactivebrokers.com/en/trading/orders/oca.php


Small improvements to documentation

Changes

Remove usage of defunct --bundle flag for subo build
Mention that error codes must be valid HTTP response status codes. This was an issue I encountered which was causing atmo to panic when serving invalid codes. Happy to revert this particular change if you think it doesn't warrant mentioning.

@calebschoepp Thanks for adding this!
As for the codes being valid HTTP responses, you're absolutely right. In fact I have a note in my todo list to file an issue: RunErr.ToVKErr should limit response codes to HTTP-valid values. If you'd like to file that, feel free :)

@calebschoepp Thanks for adding this!
As for the codes being valid HTTP responses, you're absolutely right. In fact I have a note in my todo list to file an issue: RunErr.ToVKErr should limit response codes to HTTP-valid values. If you'd like to file that, feel free :)

Thanks for merging the PR. I'll let you file the ticket, seems like you have more context around it.


fix: delete button layout glitch

Description:
Fix layout glitch in the wallet launcher

Issue was introduced by #1526
Underlying of a primary container (MainContent) was changed to Flex but wallet launcher hierarchy was still using React.Fragment as a wrapper and as a result a glitch has occured
fix #1531

Motivation and Context:
Fix visual glitch

How Has This Been Tested?
Manually

Types of changes:
Bugfix

Checklist:

[x] My code follows the code style of this project.
[x] I have reviewed and updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes where needed.
[x] All new and existing tests passed.
[x] My commits have been squashed into a concise set of changes.

Coverage remained the same at 19.662% when pulling be7447c1fb3ed19f3f151d05c18074245bae155d on korhaliv:fix/delete-wallet-button into f03055271e853140c83b4f59e7522dd5894915f9 on LN-Zap:master.

Coverage remained the same at 19.662% when pulling be7447c1fb3ed19f3f151d05c18074245bae155d on korhaliv:fix/delete-wallet-button into f03055271e853140c83b4f59e7522dd5894915f9 on LN-Zap:master.


can't build android-build.sh

when i built android-build.sh with ndk-r17b
it display some error. but what's wrong with it??
i tried to like this
OS : ubuntu 16.04 64bit
command : ./android-build.sh x86 15 /home/lee/Downloads/android-ndk-r17b jp.co.soramitsu.iroha.android Release

Hi @Bo3o2S
Thanks for submitting the issue!
Most likely that the problem is caused by using the deprecated NDK GCC 4.9 toolchain. The fix is to switch to NDK clang toolchain. We will update our repo soon.
To build the library please apply the patch to your android-build.sh script:
diff --git a/shared_model/packages/android/android-build.sh b/shared_model/packages/android/android-build.sh
index 6a3b6783b..227cb26a5 100755
--- a/shared_model/packages/android/android-build.sh
+++ b/shared_model/packages/android/android-build.sh
@@ -55,7 +55,7 @@ else
     exit 1
 fi

-ANDROID_TOOLCHAIN_ARGS=(-DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION="$VERSION" -DCMAKE_ANDROID_ARCH_ABI="$PLATFORM" -DANDROID_NDK="$NDK_PATH" -DCMAKE_ANDROID_STL_TYPE=c++_static)
+ANDROID_TOOLCHAIN_ARGS=(-DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DANDROID_TOOLCHAIN=clang -DNDK_TOOLCHAIN_VERSION=clang -DCMAKE_SYSTEM_VERSION="$VERSION" -DCMAKE_ANDROID_ARCH_ABI="$PLATFORM" -DANDROID_NDK="$NDK_PATH" -DCMAKE_ANDROID_STL_TYPE=c++_static)
 DEPS_DIR="$PWD"/iroha/dependencies
 INSTALL_ARGS=(-DCMAKE_INSTALL_PREFIX="$DEPS_DIR")

The patch adds the following variables to ANDROID_TOOLCHAIN_ARGS:
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DANDROID_TOOLCHAIN=clang -DNDK_TOOLCHAIN_VERSION=clang

Please let me know if the issue is still present.

it's working now and copile and link successfully
but when i tried to run sample app with linked library, it cannot find "rand" function

@Bo3o2S please share here the output of
Linux:
ldd libirohajava.so

MAC:
otool -L libirohajava.jnilib

OS : ubuntu 16.04 64 bit
command : ldd libirohajava.so

@Bo3o2S something is wrong with your .so file. Try to rebuild it.

i tried to build 5times but it's not different.
i just change ANDROID_TOOLCAHIN_ARGS "igor-egorov" suggest in android-build.sh.
and i can build but when i entered the command "ldd libirohajava.so", it still appears "not a dynamic executable"
i change ANDROID_TOOLCHAIN_ARGS like this
ANDROID_TOOLCHAIN_ARGS=(-DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DANDROID_TOOLCHAIN=clang -DNDK_TOOLCHAIN_VERSION=clang -DCMAKE_SYSTEM_VERSION="$VERSION" -DCMAKE_ANDROID_ARCH_ABI="$PLATFORM" -DANDROID_NDK="$NDK_PATH" -DCMAKE_ANDROID_STL_TYPE=c++_static)
DEPS_DIR="$PWD"/iroha/dependencies
INSTALL_ARGS=(-DCMAKE_INSTALL_PREFIX="$DEPS_DIR")
what's wrong with it?


Fulcio client

Fixes https://github.com/sigstore/sigstore-rs/issues/131
Summary
Creates an async Fulcio client to make working with Fulcio more straightfoward.
Release Note

Fulcio client for exchanging public key for signed certificate added.

Documentation
Rust docs provided.

I want to rework this a bit I think.

This might be better suited for examples/ , it would be very valuable as a guide. In examples you can use unwrap as much as you like as well. Happy to see what other reviewers think though.

I do still think expanding it and including it in the mainline would be useful,  particularly in light of the protobuf-vs-json-vs-whatever discussions. By keeping it in the main tree, downstream users won't have to individually adapt to protocol changes.
I do want to make it all Much Better. Ignore this for now (I'll mark it as a draft) and continue to iterate.

btw, happy for a review now.

I agree but this due to borrow issues.
On Fri, Sep 30, 2022 at 8:25 AM Flavio Castelli @.***>
wrote:

@.**** commented on this pull request.
In src/oauth/openidflow.rs
https://github.com/sigstore/sigstore-rs/pull/132#discussion_r984535530:

   let Self {

       pkce_verifier,

       nonce,

       client,

       ..

   } = self;

   let token_response = client
       .exchange_code(code)

       .set_pkce_verifier(self.pkce_verifier)

       .set_pkce_verifier(pkce_verifier)

nit, this is a matter of personal taste. I prefer to use self.
instead of "unpacking" the contents of self. That makes easier to
understand where a certain value is coming from (like pkce_verifier).
—
Reply to this email directly, view it on GitHub
https://github.com/sigstore/sigstore-rs/pull/132#pullrequestreview-1126738419,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAD4T6MDH3DWAYHBWNV2Y3WA3L2ZANCNFSM6AAAAAAQRN5JOU
.
You are receiving this because you authored the thread.Message ID:
@.***>

@bobmcwhirter Please fix the rustfmt errors, then we can go ahead and merge it. I'm good with it too

Done!


feat(security): Enable Vault's Consul secrets engine

Add Secret Engine Enabler so that it can be re-used for both of Consul and KV secrets engines
Hookup the code in secretstore-setup so that both KV and Consul secret engines are enabled

Closes: #3154
Signed-off-by: Jim Wang<EMAIL_ADDRESS>PR Checklist
Please check if your PR fulfills the following requirements:

[x ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/master/.github/Contributing.md.
What is the current behavior?

No Consul secret engine for Vault yet
Issue Number: #3154
What is the new behavior?
Enable Vault's Consul secret engine
Does this PR introduce a breaking change?

[ ] Yes
[x ] No

New Imports

[ ] Yes
[x ] No

Specific Instructions
Are there any specific instructions or things that should be known prior to reviewing?
Other information
To verify the Consul secret engine is enabled locally, one can observe the log message of docker container edgex-secretstore-setup for the first time enabling:
docker logs edgex-secretstore-setup | grep Consul

jim@jim-NUC7i5DNHE:~/go/src/github.com/edgexfoundry/developer-scripts/compose-builder$ docker logs edgex-secretstore-setup | grep Consul
level=INFO ts=2021-02-18T20:46:21.475937091Z app=edgex-security-secretstore-setup source=common.go:97 msg="successfully made request to update mounts for Consul"
level=INFO ts=2021-02-18T20:46:21.475958918Z app=edgex-security-secretstore-setup source=enabler.go:84 msg="Consul secrets engine enabled"

Most of these changes are rendered obsolete by by PRs. The rebase will be nasty. ;-)

not too bad I think; just 20 files... :-)

@lenny-intel  Rebased to the lastest secretstore client from go-mod-secret. Please review. Thanks.

Codecov Report

Merging #3179 (17b3f08) into master (61638ca) will increase coverage by 0.09%.
The diff coverage is 67.74%.

@@            Coverage Diff             @@
##           master    #3179      +/-   ##
==========================================
+ Coverage   40.76%   40.86%   +0.09%
==========================================
  Files         170      171       +1
  Lines       14507    14523      +16
==========================================
+ Hits         5914     5935      +21
+ Misses       8264     8257       -7
- Partials      329      331       +2

Impacted Files
Coverage Δ

internal/security/secretstore/init.go
3.82% <0.00%> (+0.10%)
:arrow_up:

...rnal/security/secretstore/secretsengine/enabler.go
84.00% <84.00%> (ø)

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 61638ca...17b3f08. Read the comment docs.

@lenny-intel  I've addressed your comments, please re-review it.  Thanks!


Play behind a NAT using TURN server

Thank you for this plugin, My question is regarding an additional TURN server,
After I set the credentials of an external TURN server it's not playing.
Any advice or example would be greatly appreciated.

We have the same problem.
I have set up the TURN server in the config.json and in our web application. When i check chrome://webrtc-internals/ during the setup-process i see the local and remote candidates of the relay, howewer the state of the candidate-pair remains 'in progress'. It seems there are no requestsReceived and responsesReceived. This i can also see in Whireshark: the web-app sends requests but nothing is sent back from the TURN server. The same web-app also uses WebRTC for voice (sipjs and Asterisk in the backend) and there requestsReceived and responsesReceived are rising. In Whireshark i see Data Indications from the TURN server as well as Channel-Bind (which doesnt happen with RTSPtoWeb) and a connection is made (thats why i think, the problem is not in the web-app and not in the TURN server). I also see the remote candidates of RTSPtoWeb are slightly different than those of Asterisk, but i dont really know, if that is a problem. I'm suspecting, the problem could be in the underlying Pion WebRTC or in the part how it is used, but im currently missing the capabilities to debug that efficiently.
Maybe someone could help or point me in the right direction. I would be happy to do further tests or help with anything, if i can.

Thanks very mcuh for your reply. Indeed if I set up my own Coturn and uncomment 'server-relay' line, it works.
Now in the Cotrurn wiki (https://github.com/coturn/coturn/wiki/turnserver), is written with capital and bold letters, that this should not be uncommented, which alerts me a little. This also kind of explains abit, why it didn't work in all the TURN servers I tried before.
Could you explain to me, why this setting is needed or is there even a possibility to avoid it? I tested a slightly altered example from Pion (https://github.com/pion/webrtc/tree/master/examples/rtp-to-webrtc) which seems similar to what RTSPtoWeb is doing on the WebRTC side (I just had to add the TURN settings on both ends and the 'iceTransportPolicy': 'relay' in the jsfiddle) and interestingly, this also works without uncommenting 'server-relay'. However i couldnt find out yet, where the differences are.

Wondering the same here..

Thanks very much for your reply. Indeed if I set up my own Coturn and uncomment 'server-relay' line, it works. Now in the Cotrurn wiki (https://github.com/coturn/coturn/wiki/turnserver), is written with capital and bold letters, that this should not be uncommented, which alerts me a little. This also kind of explains abit, why it didn't work in all the TURN servers I tried before. Could you explain to me, why this setting is needed or is there even a possibility to avoid it? I tested a slightly altered example from Pion (https://github.com/pion/webrtc/tree/master/examples/rtp-to-webrtc) which seems similar to what RTSPtoWeb is doing on the WebRTC side (I just had to add the TURN settings on both ends and the 'iceTransportPolicy': 'relay' in the jsfiddle) and interestingly, this also works without uncommenting 'server-relay'. However i couldnt find out yet, where the differences are.

Wondering the same here, does anyone have an explanation?


Add windSpeed to CZWeatherForecastCondition

Just FYI... I copied over windspeed and wind direction from Current weather to weather forecast and it works fine. So, seems like an easy one :)