Did some cleanup in the devfile code

What type of PR is this?
/kind cleanup
What does does this PR do / why we need it:
Cleans up some devfile code
How to test changes / Special notes to the reviewer:
All tests should pass

@girishramnani Thanks for the cleanup PR, overall looks good, I leave some comments regarding logic issue for supporting both interactive mode and direct mode. Actually I feel like we may do many similar cleanup/improvements for create.go file, my PR is here: https://github.com/openshift/odo/pull/3118/files 😄

@GeekArthur @johnmcollier please take a look

Another suggestion is please do some smoke tests for the interactive mode as currently odo doesn't have interactive auto tests enabled, it's a test gap until we done this issue https://github.com/openshift/odo/issues/2194

Another suggestion is please do some smoke tests for the interactive mode as currently odo doesn't have interactive auto tests enabled for both s2i and devfile components, it's a test gap until we done this issue #2194

can we do that as part of a different issue?

/retest

Another suggestion is please do some smoke tests for the interactive mode as currently odo doesn't have interactive auto tests enabled for both s2i and devfile components, it's a test gap until we done this issue #2194

can we do that as part of a different issue?

For the interactive mode test automation we definitely need another PR to cover that, but we still need to do smoke tests manually only against this PR for interactive mode to avoid regression, so just do some manual smokes to see if interactive mode still works would be fine. 😄

/retest

same test failing on both
should successfully create the devfile component [It]  /home/travis/gopath/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_create_test.go:76

https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gcs/origin-ci-test/pr-logs/pull/openshift_odo/3157/pull-ci-openshift-odo-master-v4.2-integration-e2e/637#1:build-log.txt%3A558
https://travis-ci.com/github/openshift/odo/jobs/333571414#L531
@amitkrout is this something we are aware of? or do you feel it was introduced in this PR?

same test failing on both
should successfully create the devfile component [It]  /home/travis/gopath/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_create_test.go:76

https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gcs/origin-ci-test/pr-logs/pull/openshift_odo/3157/pull-ci-openshift-odo-master-v4.2-integration-e2e/637#1:build-log.txt%3A558
https://travis-ci.com/github/openshift/odo/jobs/333571414#L531
@amitkrout is this something we are aware of? or do you feel it was introduced in this PR?

@girishramnani i tried the same test locally on master by increasing test node by 4 just to see the namespace collision but none of the time it occurred.  Even before none of odo open prs hit this failure. This is freshly introduce may be due to some issue with the code cleanup itself.

will open a fresh one


Add timescaledb plugin

The docker-composer yml has been updated to install timescaledb as well
PostgreSQL has been upgraded to 12.4 which might cause some incompatibilities
Resolve compatibility issues

Data might not get imported properly by postgres 12.4 so we will need to export them and import them in the new database
On your old database run the following for each table (except the 'migrations' table):

COPY table_name TO '/tmp/table_name.csv' DELIMITER ',' CSV HEADER;

Move exported csv to the shared folder

mv /tmp/*.csv /var/lib/postgresql

Grab the csv from the shared volume and save them somewhere in your computer
Delete the db_data folder and re-run the docker-compose.yml file
Move csv files in the db_data folder and from there to the tmp directory of the container so that the database can read them
Import data into database

COPY table_name FROM  '/tmp/table_name.csv'  DELIMITER ','  CSV HEADER;

How did we deploy the postgis plugin on production? Through docker?
So are the above instructions enough for production as well?


Mousemove event doesn't work on debian

Hey there!
First of all, I really appreciate your work :)
For my project, I want to catch the mousemove event, I haven't any log when I use it from my Debian 9.
I use Electron 1.6.2 & prebuilt for Electron 53 (all platform & x64)
When I activate debug mode, I have this :
hook_event_proc [782]: Mouse dragged to 310, 729. (0X2000)
dispatch_event [117]: Dispatching event type 10.
hook_event_proc [782]: Mouse dragged to 310, 728. (0X2000)
dispatch_event [117]: Dispatching event type 10.
hook_event_proc [782]: Mouse dragged to 310, 729. (0X2000)
dispatch_event [117]: Dispatching event type 10.
hook_event_proc [782]: Mouse dragged to 311, 730. (0X2000)
dispatch_event [117]: Dispatching event type 10.

I don't understand why I have this logs but not from the JS hook :/
ioHook.on("mousemove", event => {
    console.log(event)
  })

but others events works

So I look up more in the code, and I found the event type 10 is "mousedrag", so I've tested mousedrag and it's work finally :)

Should we close this issue ?

mousedrag should be called when you click to mouse button and move the mouse.
mousemove called when you move mouse without touching buttons

Yes, when I wrote that issue, it didn't work. But the mousedrag was a workaround.
I haven't tried again since.

FWIW I can reproduce it with Electron 1.7.10 (ABI 54) and iohook 0.1.13).

Is this resolved after updating libuiohook to 1.1?

@Toinane any news on this ? Should we close this ticket ? Thanks !

I will check this afterwork on Debian @Djiit :)
Otherwise I've tested on macOS and it's work.

Yep It work on my debian :) Thank's!
We can close this ticket!

Thanks for your feedback, awesome !


fix redundant type conversion

remove redundant type conversion for string

I just try to sign, but failed ,SAD


meltano elt doesn't respect dbt exit code

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/831
Originally created by @mbergeron on 2019-07-25 14:35:48

As per a Slack discussion:

Running into an issue with dbt I was hoping to get some help with. I have a dbt process that I'm running with meltano elt. When I run into an error during the transformation I'm still getting back a success exit status from Meltano.

We need to make sure meltano elt returns a successful exit code if and only if all the components were successful.

View 5 previous comments from the original issue on GitLab


Browser ID, no ldap, and better puppets.

@pmclanahan, @tofumatt, @talloween
one of you try this.  see if it works.

Works for me.


Constant string layout with ABI 2.0

So, I assume that the compiler always lays out a constant string directly as two instance variables - a pointer to a null terminated C string and a length. Its been this way as long as I can remember, still seems to be this way using the 1.9 ABI as well. When I switch to the 2.0 ABI something goes wrong though, which I haven't got to the bottom of - I get the length fine, but I get a corrupt pointer for the string itself. Very small piece of code below shows this. It's based on your 'a.m' from the other issue actually ;-) It has an Obt root class, a Str class with the pointer and length, and an NSConstantString subclass of Str. One method 'puts' which outputs the string, and then I call it with a constant "hello world".
This works under ABI 1.9, but coredumps on 2.0. I suspect I have misunderstood something that has changed here (and possibly I have been doing it wrong for two decades and have only got away with it by luck until now maybe?). So this may well not be a bug, not sure.
I compile this with
"clang70 -I . -fobjc-runtime=gnustep-2.0  a.m libobjc.a" in the build directory
#include <objc/runtime.h>
#include <stdio.h>

@interface Obj
@end
@implementation Obj {
        Class isa;
} @end

@interface Str : Obj
- (void)puts;
@end

@implementation Str {
        char *ptr;
        int len;
}
- (void)puts {
        puts(ptr);
} @end

@interface NSConstantString : Str
@end

@implementation NSConstantString
@end

int main()
{
        [@"hello world" puts];
}

Yup, one of the breaking changes in the 2.0 ABI is to change the string representation.  See this comment in Issue #82 for the change.  Constant strings are now either tiny strings that are embedded in the pointer or they are a richer structure with space for a hash (very important for performance if you're using them in a dictionary).  They can be either ASCII or UTF-16, for better alignment with the OpenStep / Cocoa APIs (which deal with UTF-16 code units, so -characterAtIndex: can now always be a constant-time operation with the new layout).
Note that on macOS, the constant string layout is also different and matches the CFConstantString C type.

I forgot to say, the compiler will set __OBJC_GNUSTEP_RUNTIME_ABI__ >= 20 if it's using the new strings ABI, so you can test at compile time which layout you should be using.  GNUstep does this already, but I guess you're using a different NSConstantString implementation?

Yes, I have my own set of foundation objects, which is why I always get tripped up by this stuff :-) OK, that makes sense. Will have to go and investigate how to support this though - basically I have everything in a subclass which assumes it can get hold of a C pointer to the string in UTF-8 to work with. I assume what you do is provide separate implementations for the different formats ?
Given an objects how can I identify if its a tiny string or a normal one, and if so then whether its in UTF-16 or not (indeed, what makes the compiler output UTF-16 strings? I have a lot of literal UTF-8 strings in my code with things like japanese text i  them, will this break?)

BTW, you say "one of the breaking changes" - which kind of implies there are others :-) Is there a list anywhere ?

That's probably the only one that matters to Foundation authors, the rest are mostly compiler-runtime contracts.
If it's a tiny string, the low bit of the pointer will be 4.  You can use the objc_registerSmallObjectClass_np function to set a class for these, for the purpose of message passing.  Note that this object does not have an isa pointer and all of its data is contained within the self pointer (which is not actually a pointer).  The compiler will generate these for any string that is 8 or fewer characters and is (7-bit) ASCII.
Anything that is longer than 8 characters will be represented as a proper object, with [this layout)(https://github.com/gnustep/libobjc2/blob/2edfe64739f6348c2545d2eeb365a6994b972eef/loader.c#L113).  The ABI defines ASCII, UTF-8, UTF-16, and UTF-32 representations, but currently the compiler uses only the ASCII and UTF-16 versions.
If you have a string literal in UTF-8 source, clang will transform it to UTF-16 when it generates the constant string object.  Your NSConstantString implementation will need to handle the case that it's UTF-16 internally.  Hopefully that's not too much effort, because the public NSString APIs are all in terms of UTF-16 code units.  If you've got a lot of Japanese text, hopefully this will end up being better for you because now your average number of bytes per character goes from 3 (UTF-8) to 2 (UTF-16) and you no longer have to deal with a variable length mapping from indexes into a UTF-8 string to indexes into a UTF-16 string.
By the way, is your Foundation implementation open source?

Ah, brilliant, thanks for the explanation. One question  when you say '8 or fewer' for the tiny string, does that include the terminating zero ? i.e. can I just use the address of the pointer as if it was the address of the C-string. That would help a lot!
As for the UTF-16, that is probably going to be a killer for me unfortunately. I don't implement the NeXT style APi's really, I have my own, and I based them around all strings being UTF-8 and being easily able to access the C-string. So all my methods work with strings by using the base of the UTF-8 string and the C library. Its good enough for what I need it for. To handle mixed encodings would involve implementing lots of different combinations of methods, or having methods which convert anything in UTF-16 back to UTF-8, which would be slow. What are the chances of me getting a flag to clang to tell it to make all strings UTF-8 instead of Utf-16 I wonder ? :-) [actually, may look at doing that!]
I handled the variable index thing with UTF-8 by making all my offsets in bytes BTW - so I very rarely need to grab a character in a string index as a code point number, and I have a special method for when I need to.
yes, its ope source - I once emailed a copy round the obj-c mailing lost when I first wrote it in fact, though that was back in 1999 or so! You can grab it by git here if you like...
git://toybox4.twisted.org.uk/pfkit
Though I actually keep it under svn. But my young colleagues (< 25) get confused by things which aren't git it seems ;-) Not sure you are going to be very impressed by it - it was originally hacked together to enable me to write and deploy on Windows NT4 when I had absolutely nothing but gcc and the ability to build and run .EXE files as CGI scripts. Which is why I still use static linking for everything. But it does the job, and theres 300,000 lines of code written on top of it which has kept us in business for 20 years, so hey ;)

One question when you say '8 or fewer' for the tiny string, does that include the terminating zero ? i.e. can I just use the address of the pointer as if it was the address of the C-string. That would help a lot!

No, in the tiny string representation we use 7 bits per character and we don't store a 0.  This lets us encode 8 characters plus length in the 61 bits that we have available in the pointer.

What are the chances of me getting a flag to clang to tell it to make all strings UTF-8 instead of Utf-16 I wonder ? :-) [actually, may look at doing that!]

If you feel like adding it, the place you'd need to change is here:
https://github.com/llvm/llvm-project/blob/acb628b2afb4b43dd0224c393f1ff47abd3b9045/clang/lib/CodeGen/CGObjCGNU.cpp#L1020
Add a flag like 'fgnustep-objc-utf8-strings' and then in that block use the UTF-8 to UTF-16 conversion to get the number of characters (the new ABI stores the number of bytes and the number of characters separately.  These are the same for ASCII and UTF-16, but for UTF-16 knowing both is useful - you can use one for memcpy and one for -length), but use the original string instead of the UTF-16 version for the data.

I once emailed a copy round the obj-c mailing lost when I first wrote it in fact, though that was back in 1999 or so!

That's a few years before I learned Objective-C!
Any plans to move to ARC?

I forgot to say, the compiler will set __OBJC_GNUSTEP_RUNTIME_ABI__ >= 20 ...

Which compiler does this under which circumstances? Using the below code, I get the following results:
FreeBSD 12.0-RELEASE-p3 (x86-64)
clang 7.0.1 (port version) - __OBJC_GNUSTEP_RUNTIME_ABI__ = 16
clang 6.0.1 (base version) -  __OBJC_GNUSTEP_RUNTIME_ABI__ = undefined
FreeBSD 13.0-CURRENT (ARMv7 - BBB, snapshot from 2019-02-14):
clang 7.0.1 (base version) - __OBJC_GNUSTEP_RUNTIME_ABI__ = 16
The Test code:
#import <stdio.h>
#import <objc/Object.h>

id hello = @"Hello";

__attribute__((objc_root_class))
@interface A
{
   Class isa;
   int   cnt;
}
@end

@implementation A
@end

#define ENQUOTING(cvar) #cvar
#define STRINGIFY(cvar) ENQUOTING(cvar)

int main(int argc, const char *argv[])
{
   printf("ObjC-ABI %s\n", STRINGIFY(__OBJC_GNUSTEP_RUNTIME_ABI__));
   return 0;
}

If you feel like adding it, the place you'd need to change is here:
https://github.com/llvm/llvmproject/blob/acb628b2afb4b43dd0224c393f1ff47abd3b9045/clang/lib/CodeGen/CGObjCGNU.cpp#L1020

Ah, thanks for the pinter! Mmm, looks like I need to upgrade my C++ knowledge, but thats very very useful. I may well do that, or at least give it a try. If I am going to do that I suspect it wouldn't be too hard to make it also never output the small object version of the strings, and then I am back to the state of only having a single representation of a string (which is the real issue thinking about it). OK, when I get some spare time I will go for it.

That's a few years before I learned Objective-C!

Heh, really? Wow! Actually, I remember you arriving into the GNUstep world very well - like a breath of fresh air into a project that was becoming a bit stuck in it's ways. Have to say, all the work you have put in to Objective-C over the years is very appreciated!

Any plans to move to ARC?

Mmmm, I had a bit of a fiddle about with it, but I think going through all the code and finding any laces where it might break would be very time consuming and I couldn't guarantee finding them all. I would love to be able to do it, but not sure I will ever get around to it. Training people in the use of retain/release is not that big a deal, and nobody other than me writes significant amounts of Obj-C at our place anymore. Which is awkward as I have ended up as the only developer of our most critical system.
One thing I would like to do inside the runtime though is to see if I can do something to make it start up faster. We discovered that there is a significant overhead at startup depending on the number of classes included in the binary, even if they are not used. I suspect that the runtime bulls a cache of all methods in all classes before 'main' gets called maybe ? Was thinking of lazy evaluating that if possible, as we have lot of unused classes in the binary (sort of - its one binary with many executions paths, each of which only uses a few classes, but they are all compiled into the binary, so every time it runs they all get added to the runtime. Its a CGI script though, so its started from scratch for every request, and the overhead seems significant).

Pre-7 versions of the compiler don't define this macro.  In >=7, it will be set to the minimum of the highest ABI target supported by clang and the version requested in the -fobjc-runtime= flag.  For example, if you say -fobjc-runtime=gnustep-2.1 then clang will still currently set it to 20 because it doesn't know about anything after 2.0.
Clang's ARC migration tool is pretty good.  I've found that it's fairly conservative - it either does the right thing, or it gives you a warning that it can't reason about your code.  In the stuff I ran it on, many of those cases were actually retain/release bugs.
The runtime doesn't build a cache of the methods, but it does have to walk all of the method lists to see if there's a +load method.  I might add a flag to say that there isn't one so that the runtime can skip it.  Unfortunately, I didn't think to add a flags field to the category structure, so the runtime will still have to scan all of the methods in a category.  It also has to register all of the selectors.
A lot of this overhead goes down in the 2.0 ABI.  For example, the linker is now able to unique selectors so you have to register one instance of each selector per library in which it's used, not one per compilation unit in which it's used (this was particualrly bad in pre-ARC code, where every compilation unit uses -retain, -release and -autorelease).  This also improves cache usage and gives smaller binaries...
For your particular use case, you might have better luck adding a fastcgi wrapper.  I've done this for an ObjC WebApp project a few years ago and it dramatically improved performance.  Even if the program re-execs itself every 100 requests to kill any memory leaks, you'll probably see the startup time overhead disappear into the noise.

In case you wondered why I went silent, I've spent three months refactoring my code to properly layout the string classes so that the constant one is independent of the others, and am now ready to start on this. Along the way though I've been wondering if, instead of altering clang, I should simply make the code produce a utf-8 representation of the string the first time it is accessed and return that. it would be slower I realise, but a lot more portable as I would not need to have a modified version of the compiler for it to work. Could also make the modifications anyway, as ultimately its just changing what the compiler produces for the constant strings to one of th accepted representation anyway. Thats probably the best approach in fact.
Will let you know how I get on....


Docs: Mention transformIgnorePatterns whitelist use case

Summary
I often end up redirecting people to this React Native Guide just so they can better understand what's going on with transformIgnorePatterns. I think it's good to point them there directly from this config option description.
Test plan
Please check the grammar

Thanks for keeping the docs in a good shape.


Reload events if pending.data changed

This needs the Python watchdog library.
As discussed in #69, alternative to #189.

Nice work! On a quick read, one comment I have is that the patch only watches the file pending.data. I think this makes sense for the large majority of use cases, but I wonder if we might as well watch more. For example, the user on computer1 could be viewing the "completed" report in VIT, which I imagine reads from the file completed.data. Suppose that on computer2 you created and completed a task and then synced it. Then on computer1 you sync. In that case, I'm not sure but I would guess that the pending.data file would not change and the completed.data file would change.
The above is just a minor comment, but I figure we might as well discuss it now. Please don't put in the time to make the actual change. I'm not sure my comment is valid so we should discuss first. I can't think of a related comment regarding the undo.data or the backlog.data files (that is, I don't think we would want to reread in these cases).
As for merging the patch into 2.x, we would have to wait until either I felt comfortable with the new code base or if Chad had the time to take a look. I also don't know how big the disadvantage is to relying on a new dependency.
I do hope that we can eventually merge this because the feature has been requested by several different users and there are a few related bug/feature reports. Thanks a lot for your time and patience on this, Jochen!

Nice work! On a quick read, one comment I have is that the patch only watches the file pending.data. I think this makes sense for the large majority of use cases, but I wonder if we might as well watch more. For example, the user on computer1 could be viewing the "completed" report in VIT, which I imagine reads from the file completed.data. Suppose that on computer2 you created and completed a task and then synced it. Then on computer1 you sync. In that case, I'm not sure but I would guess that the pending.data file would not change and the completed.data file would change.

I don't have a taskd running, could you (or someone else) maybe test
this scenario?
We can watch both files, but would get an event for every changed file.
This results in two events and update cycles, if you complete a task
from the command line. I don't see an easy way to combine both events
again, but maybe we can change the watched file depending on the viewed
report (haven't looked into the code)?

Thanks for taking the time to put this together. While I can imagine the use cases for this feature, I can also imagine that it might be a nightmare to support, and I'm not inclined to commit this to VIT core.
My long-term plan for VIT is to include support for plugins, but I haven't put in the time to work through the plugin architecture. This kind of feature seems ideally suited as a plugin.
I hadn't planned to implement the plugin stuff until VIT 3.x, but perhaps a simple initial implementation would be a reasonable first step. The downside is that plugins written for VIT 2.x would most likely not be compatible with VIT 3.x.

This PR isn't going to make it into the 2.0.0 release, but I definitely want to get back to it in the future -- I think the VIT plugin architecture needs to make it further along first...

Do you have any proposal how to move this forward? I'm using (and rebasing ;) ) this for years without problems.
Would it be an option to make this optional and disabled by default?

All that said, I do understand it serves a useful purpose for some users, so here's my proposal, and if you are amenable to the terms, we can look at moving forward with this PR:

This will not go in until after a 2.2.0 release is cut, which I can hopefully make happen soon.
I do not want to maintain this particular piece of code, and so will expect others to provide fixes if/when it needs any
If number two above doesn't happen, I will most likely remove the feature instead of fix it myself
If/when VIT gets a proper plugin architecture, I would want this feature moved to a plugin.

That would be fine with me.

Splendid. Please ping me again on this PR after 2.2.0 gets released.

2.2.0 has been released. Before I commit this PR as promised, I'd like to explore one other dynamic: should this feature be disabled by default, and enabled via a config option?
I'm not sold on the idea of it being configurable, but I am wondering if this creates some overhead for a feature that most users won't need or care about.

2.2.0 has been released. Before I commit this PR as promised, I'd like to explore one other dynamic: should this feature be disabled by default, and enabled via a config option?
I'm not sold on the idea of it being configurable, but I am wondering if this creates some overhead for a feature that most users won't need or care about.

That would be easy to do but let's discuss this first. Do you have any
reasoning why users won't need or care about this?
I had a look through the bug reports and found a number of related
issues:
https://github.com/vit-project/vit/issues/45
https://github.com/vit-project/vit/issues/69
https://github.com/vit-project/vit/issues/112
https://github.com/vit-project/vit/issues/115
https://github.com/vit-project/vit/issues/127
https://github.com/vit-project/vit/issues/151
https://github.com/vit-project/vit/issues/169
https://github.com/vit-project/vit/pull/158
https://github.com/vit-project/vit/pull/162
And taskwarrior-tui has this feature as well:
https://github.com/kdheepak/taskwarrior-tui
Also note that this does not interfere with user input, so for example
when adding or viewing a task, the user input will stay.
And the python-watchdog library has support for all major operating
systems with fallback options:
https://pythonhosted.org/watchdog/installation.html#supported-platforms-and-caveats
Finally, let me describe how I use vit and why the features is useful to
me (and hopefully others):
I have vit constantly running in a terminal multiplexer (tmux) on my
server so I can ssh in at any time to see the next tasks. At the same
time I have a number of tools running to sync the task DB with other
systems. I use bugwarrior to sync it to a number of issue tracks,
icstask to sync it to my smartphone, some tasks are modified from the
console or other scripts.. So for me it is important that vit is always
up to date with what is in the task DB.
I think for casual users it could even be confusing that vit could show
outdated information and modifying tasked based on that could lead to
problems.

That would be easy to do but let's discuss this first. Do you have any reasoning why users won't need or care about this?

The most basic reason is that this would be a fundamental change in behavior, and not everybody may like it. There are absolutely scenarios where a user would not want to be surprised to find what was on the screen a minute ago is not on the screen now.
I'm also not clear on the performance cost of running the watchdog all the time. I'm guessing it's minor, but then there are users that complain that the report load times are too slow, and some people don't want any unnecessary processes running, no matter how light.
All that being said, I'm guessing the performance hit is almost zero, and most people don't care if a new watchdog process is running, and they probably would prefer to see the most recent state of the task database on their screen, even if it means it being refreshed automatically.
So, my proposal is: add a configuration option to disable it, make the configuration ON by default, note the configuration option clearly in config.sample.ini, and the implications of it being both enabled and disabled.

I'm also not clear on the performance cost of running the watchdog all the time. I'm guessing it's minor, but then there are users that complain that the report load times are too slow, and some people don't want any unnecessary processes running, no matter how light.

For most operating systems the watchdog is provided by the kernel, so no extra costs.

So, my proposal is: add a configuration option to disable it, make the configuration ON by default, note the configuration option clearly in config.sample.ini, and the implications of it being both enabled and disabled.

I've added a disable_watchdog option.

The most basic reason is that this would be a fundamental change in behavior, and not everybody may like it. There are absolutely scenarios where a user would not want to be surprised to find what was on the screen a minute ago is not on the screen now.

+1. I'm not sure if I will want it enabled for my personal use. Part of the reason for me is that my Taskwarrior database is big enough, and my non-SSD HD slow enough, that it takes a few seconds to refresh my tasks (i.e., to reload VIT). It's really poor practice on my part, but I haven't had made time to clean things up in my Taskwarrior data base.

So, my proposal is: add a configuration option to disable it, make the configuration ON by default, note the configuration option clearly in config.sample.ini, and the implications of it being both enabled and disabled.

Makes sense. I'm not sure if I understood correctly, but just in case: Instead of having something like disable-auto-reload=no (i.e., a double-negative) I think it's generally easier to understand enable-auto-reload=yes and enable-auto-reload=no.
Another point in favor of the proposal by @thehunmonkgroup to disable the feature by default is that we can always flip that switch (i.e., change the default to enable it) in the future based on feedback. I imagine it will work smoothly, but it's often good practice to only flip that switch after considerable testing has been done, and I think only a couple of people have tested this feature so far.
By the way, I'm not a fan of the config name having "watchdog". I think we should separate interface from implementation. I proposed "enable-auto-reload" above. If both of you like "watchdog" in the config though, that's fine with me.
Thank you @jspricke and @thehunmonkgroup. This has been a request by many for many years. I think a lot of VIT users will appreciate this.

I can't believe I neglected to ask this before, but how does this not end up loading a report twice?

Person edits task in VIT
task database is modified
VIT reloads report
watcher notices, reloads report.

Good point, I've adopted update_report() to only reload once the data changed on disk.

I can't believe I neglected to ask this before, but how does this not end up loading a report twice?

Nice catch. I didn't think of that either :)

What's with the pipe variable in update_report, and how it's used in build_main_widget?
I've read that a couple times and still don't get it.

I'm actually not crazy about the way the update_report() signature is altered. Isn't there a way we can do this and preserve report as the first arg? My preference would be to not change that function at all, but if that's not possible, then at least let's preserve existing argument order.

Another concern: your fix to the double update_report() call assumes that update_report() will only be called if pending.data changes. That seems like a dangerous assumption.

I'm actually not crazy about the way the update_report() signature is altered. Isn't there a way we can do this and preserve report as the first arg? My preference would be to not change that function at all, but if that's not possible, then at least let's preserve existing argument order.

Fixed in the new version.

I'm going to upgrade my last comment, it's not a dangerous assumption, it's a wrong assumption ;)
Easy case in point: simply switching from one report to another does not update pending.data.
So your current solution to that problem will not work. Passing pipe=True as you are in the initial call to update_report is really a hack as well, and one I'm not will to have sprinkled throughout the code, as it would be highly likely to introduce further bugs because it's a non-obvious thing to consider.
Given the performance implications of calling update_report() twice for every write to pending.data, this PR will be on hold until that issue is addressed.

Fixed in the new version.

And in on_modified you're just writing garbage to the pipe, because it's not needed?

yes, that's the interface urwid provides.

With a little more thought, signals might be the way to go.
It seems completely appropriate to hook SIGHUP or SIGUSR1 to the refresh() method, based on other uses I've seen of signals.
The signal interface is super simple, and I see no security concerns.
Check out the below patch which gets the SIGUSR1 properly caught in the application code. However, there's an unfortunate issue at this point: calling self.refresh() there is not refreshing the interface. That makes zero sense to me, as the debug code will clearly illustrate, I've got access to a valid Application object. I think if we can solve that mystery, this would be the way to go.
diff --git a/vit/application.py b/vit/application.py
index 898eb86..dd5eb05 100644
--- a/vit/application.py
+++ b/vit/application.py
@@ -8,6 +8,7 @@ import subprocess
 import re
 import time
 import copy
+import signal
 from inspect import isfunction
 from functools import reduce

@@ -69,6 +70,7 @@ class MainFrame(urwid.Frame):

 class Application():
     def __init__(self, option, filters):
+        self.setup_signal_listeners()
         self.extra_filters = filters
         self.loader = Loader()
         self.load_early_config()
@@ -77,6 +79,15 @@ class Application():
         self.refresh(False)
         self.loop.run()

+    def setup_signal_listeners(self):
+        def sigusr1_handler(signum, frame):
+            import debug
+            debug.file("BEFORE UPDATE")
+            debug.file(self)
+            self.refresh()
+            debug.file("AFTER UPDATE")
+        signal.signal(signal.SIGUSR1, sigusr1_handler)
+
     def load_early_config(self):
         self.config = ConfigParser(self.loader)
         self.task_config = TaskParser(self.config)
@@ -917,6 +928,8 @@ class Application():
             raise RuntimeError("Error retrieving completed tasks: %s" % stderr)

     def refresh(self, load_early_config=True):
+        import debug
+        debug.file("BEGIN REFRESH")
         self.bootstrap(load_early_config)
         self.build_main_widget()
         # NOTE: Don't see any other way to clear the old palette.
@@ -924,6 +937,7 @@ class Application():
         self.loop.screen.register_palette(self.theme)
         self.loop.screen.clear()
         self.loop.widget = self.widget
+        debug.file("END REFRESH")

     def update_report(self, report=None):
         start = time.time()

I've added basic signal handling to VIT, see https://github.com/vit-project/vit/commit/10c67be4be35d9251528ce944c5120403adba2b0 for details.
I believe this provides the basic mechanism to allow outside processes to update VIT's interface.
I'll address some of your other concerns in another post.

https://github.com/vit-project/vit/commit/ecfa35c3778a5c61e46ce37f1db055eb72790fd0 adds a pid_dir option to VIT, which activates basic pid file management for VIT. It also includes a --list-pids command line argument, which returns all the pids in current pid files in pid_dir.
https://github.com/vit-project/vit/blob/2.x/scripts/vit-external-refresh.sh is an example script that illustrates the new feature in action, leveraging the new signal handling to auto refresh all running VIT instances.
I really don't believe anything else is needed here. Yes, if you want to use TaskWarrior hooks to trigger refresh you'll have to figure out a solution for the double update problem, or just deal with it, but as I mentioned before I believe this is a problem for the external program to solve.

VIT now injects IS_VIT_INSTANCE=1 into the environment during startup, and this is available to all hooks invoked by task via VIT.
Check out https://github.com/vit-project/vit/blob/2.x/scripts/hooks/on-exit-refresh-vit.sh for a TaskWarrior hook that intelligently refreshes all VIT interfaces, except when the hook is invoked during a task execution via VIT.

I thought of another clear case where watching the pending.data file and refreshing would work poorly: imagine a script that modifies 100's of tasks automatically over the course of 5 minutes or so -- that would be maddening to try and work with VIT during that script.
But with the script in charge of when it refreshes VIT, it can do it at the end, once.
At this point I'm fully convinced that I've added all the necessary elements for a user to easily string together an auto refreshing VIT interface if they so desire, without adding any non-intuitive layers to the code, and it's flexible enough to handle all the use cases I've been exposed to.
Therefore, I'm closing this PR.
It would be great if somebody could open another PR to provide some user doc for the tools and features I've written in the last few days, and maybe provide a basic example setup so any user can configure their VIT install to have auto refreshing capability.

Thanks for working on this! As commented before your proposal does not work for me.
I will continue to maintain my patch, if someone is interested.

Documentation for the auto refresh features has been added here: https://github.com/vit-project/vit/blob/2.x/CUSTOMIZE.md#auto-refreshing-vits-interface


Which backend api to use for suggestion and how to use it?

As suggested in the documentation, I have to implement my own backend api call for text suggestion. As shown in the image in the readme, I would like to implement similar sentence completing feature. Which provider should i implement and how to implement?
Is there any documentation for implementing this using any one of the provider. I could take this as reference and implement same?

@anisharya16 This is just a input component, It doesn't matter where and how you grab your suggestions either with a API call or with predefined text


Lack of a docker image

Is your feature request related to a problem? Please describe.
We have the OpenTelemetry operator deployed to k8s. Part of this is the ability to auto instrument Java applications by injecting a sidecar containing the compiled agent. As we're using X-Ray we need to use this SDK as it defaults to using the X-Ray ID generator & propagator; however to use this SDK with the OTEL Auto instrumentation we had to build our own docker image.
FROM alpine:latest
ARG AWS_OTEL_JAVA_INSTRUMENTATION_VERSION=v1.20.0
ADD https://github.com/aws-observability/aws-otel-java-instrumentation/releases/download/$AWS_OTEL_JAVA_INSTRUMENTATION_VERSION/aws-opentelemetry-agent.jar /javaagent.jar

Describe the solution you'd like
It would be nice if AWS published a docker image for us and have it maintained as part of this repo rather than letting us do it. The docker file is very trivial so should be a straight forward to implement. NOTE the operator expects the Java agent to be available at /javaagent.jar

Hi @RyanW8 .
We are evaluating publishing a docker image containing the ADOT Java Agent. We don't have  a precise ETA to share at this time, but this should be available soon.

Hi @RyanW8 we just released a Docker image that is compatible with the image used by the Operator: https://gallery.ecr.aws/aws-observability/adot-autoinstrumentation-java
Please let me know if you have any questions.

Closing as we will start providing this image with every release moving forward.


[Feature Request] Hungarian algorithm

I would like to add another array function. This issue is just to make sure the PR will be added later.
I have a specific problem with an ebedding based recommendation system I want to build with arangodb. I use embeddings with cosine similarity to find matches. In my specific model I found the best way to find matches is to use blocks of embeddings:
[embedding1,embedding2,embedding3,...] -> cosine similarity to -> [embedding4, embedding5, embedding6,...]

To be able to compare these embeddings with each other I need to use the Hungarian algorithm to not end up with a complexity of n^n but rather n⁴ or n³.
At the moment I use a UDF to compute the Hungarian algorithm, but I would like to see it in arango since arango is kind of doing a lot of ML stuff and this is obviously a part of it. I also want to compute a lot of embeddings in the database and would like to reduce the additional mem usage for the V8 and I heared that UDF is something that will not last forever in arangodb

would you prefere a self written implementation of the algorithm or is an existing lib preferred?
how would you like to name it? I would just call it HUNGARIAN()?
any further requirements? I already signed the contract to contribute and have contributed to arangoDB

I would also like to add the ability to generate a matrix like out put to the CONSINE_SIMILARITY(). If you add 2 vectors, a matrix it the output:
CONSINE_SIMILARITY([embedding1,embedding2,embedding3],[embedding4,embedding5,embedding6])

will result in
[
 [cosine_sim_1x4],[cosine_sim_1x5],[cosine_sim_1x6],
 [cosine_sim_2x4],[cosine_sim_2x5],[cosine_sim_2x6],
 [cosine_sim_3x4],[cosine_sim_3x5],[cosine_sim_3x6]
]

and
HUNGARIAN([
 [cosine_sim_1x4],[cosine_sim_1x5],[cosine_sim_1x6],
 [cosine_sim_2x4],[cosine_sim_2x5],[cosine_sim_2x6],
 [cosine_sim_3x4],[cosine_sim_3x5],[cosine_sim_3x6]
])

could result in something like:
[{row:1,column:0},{row:0,column:1},{row:2,column:2}]

The function structure should look like this:
// a matrix n x m, that is padded with the pad_value internally to a n x x matrix
// if the matrix contains non_numerical, those values will be set to the pad value and a warning is thrown
// The hungarian algorithm will usually calculate the minimum, but sometimes the maximum is wanted. To solve that issue set minimum to false.
HUNGARIAN(matrix,pad_value = 0) → array
HUNGARIAN(matrix,minimum = true) → array
HUNGARIAN(matrix,minimum = true,pad_value = 0) → array

Hi,
yes. UDFs are pretty suboptimal in comparison of the rest of the AQL stack - the documentation also states this.
The native C++ functions are implemented in:
https://github.com/arangodb/arangodb/tree/devel/arangod/Aql/Function
Probably StatisticsFunctions.cpp would be a good place to peek for your purpose.
When creating a new function, arangod/Aql/AqlFunctionFeature.cpp needs to register them, arangod/Aql/Functions.h contains the header declarations for distributing them.
You can follow the traces of i.e. VarianceSample.
Integration tests that will test functions for correctness can be found in tests/js/client/aql/aql-functions.js.
Regarding the usage of libraries, their license needs to be compatible. LICENSES-OTHER-COMPONENTS.md caries the bundled js libraries as well as the C++ libraries added in 3rdParty/ and their respective licenses.
The 3rdParty/CMakeLists.txt contains the inclusion of the sub-builds. Best suitet are libraries that offer cmake themselves, however i.e. jemalloc only provides make, hence thats possible as well.
the https://github.com/arangodb/arangodb/blob/devel/CONTRIBUTING.md contains hints on how to compile and run the tests etc.

tbh, I don't have the final say in this.
But unless the library to be used would increase the compile time significantly I don't see much hinderance why not to accept it and would propose it.

But unless the library to be used would increase the compile time significantly (it needs to match our toolchain) I don't see much hinderance why not to accept it and would propose it.

ok, I will write the code myself then. The algorithm is quite trivial.

Hi @konsultaner, I have a few questions.
Mainly, I don't fully understand your use case: maybe you can elaborate a little.
Second, I know the hungarian method as a way to solve a minimum weight perfect matching (or maximum weight matching) in arbitrary bipartite graphs. It looks like your proposing a less general implementation, where both partitions have to be of the same size, and the graph has to be a full bipartite graph. Did I understand that correctly? If so, is that restriction necessary for the implementation you have in mind, or can it be lifted?
Best,
Tobias

Hi @goedderz!

Mainly, I don't fully understand your use case: maybe you can elaborate a little.

I did implement a recommendation algorithm in python. But as usual I would like to put most of it into an AQL request, to prevent serialization time.
My recommendation system is based on an embedding comparison. Not just one, but i.e. 3 vs. 3. So prety much like this:

It looks like your proposing a less general implementation, where both partitions have to be of the same size, and the graph has to be a full bipartite graph.

No, actually I want to implement support for n x m cost-matrix, Thats why I added the pad_value which defaults to 0

Third, how large do you expect your instances you get - and others with similar use cases might have?

Thats a very good question and is mainly limited by the memory. A very memory optimized version of this could hold a vertex buffer precalculated somehow and share it with parallelized excutions, but I guess this needs to be done by someone who has a deeper understanding of arangos internal AQL computation process.
I would like to allocate memory on the fly, which would be the bipartite graph (aka cost matrix) plus twice the nodes.
In my recommendation system we use up to a 10x10 matrix, but usually 3x3. I guess recommendation systems that use larger sizes would probably start to implement custom embeddings for their usecase.

full bipartite graph

Since you keep calling it a graph computation, I guess you might want to have it as a graph operation as well? I'm not sure how to implement this in a arango graph manner. Something like this? (I'm not sure if this is possible or a good way):
FOR a IN 0..3 EdgeNodes1
FOR b IN 0..3 EdgeNodes2
FILTER/COLLECT HUNGARIEN(a,b,COSINE_SIMILARITY(a.embedding,b.embedding))
RETURN {a,b}
// {a:<a1>,b:<b3>}
// {a:<a2>,b:<b1>}
// {a:<a3>,b:<b2>}

I would need some help to do this, but I could do it as well.
A similar approach to my recommendation system was used here:
https://openreview.net/forum?id=rJgBd2NYPH

I dislike the idea to have the second argument doing something completely different

In other languages, I would prefer an option map, but no other function has that. Should we start with that?


 It started all fine, but after 10 days, my toilet suddenly caught fire. I googled it and according to some random stackoverflow post, it's my kernel's problem, though I'm pretty sure there is nothing wrong with my kernel, since yesterday a zombie ate a piece of it and it's still alive. It's also possible someone took off their shoes during the final exam, which caused your app to burn my toilet. So, could you help?

Help, now it's trying to burn my Taux controller


"Query interval lock state" not taken into account - Battery drain issue

Since I started using nuki_hub, I noticed a significantly higher battery usage on my Nuki Lock 3.
A battery health check on the official Android app pointed out high bluetooth traffic as the culprit.
I noticed the publish frequency on nuki/lock/json and nuki/lock/query/lockStateCommandResult was always about one message every 4 or 5 seconds, and that the value of the "Query interval lock state" parameter did not have any effect on it.
This obviously generated unnecessary bluetooth traffic that drains the battery.
Some other details about my config :
I'm using an ethernet connection with Wiznet W5500
I enabled Smartlock management but not Opener.
I checked "Nuki Bridge is running alongside Nuki Hub"

Are you actually using a Nuki Bridge together with Nuki Hub. If you enable "Nuki Bridge is running alongside Nuki Hub" without using a Bridge, this is expected bahavior. In that case you should disable the option, unpair and re-pair Nuki Hub.

I initially checked that option because I was using Nubli, another bridge replacement option written on nodejs I ran on a raspberry pi.
And it sure makes sense that in the case where many bridge likes are paired with a single lock, that they all have to maintain its state in real time by continuously polling it.
But now I followed your advice, unchecked the option and re-paired the lock, but there are still MQTT state publishes on the topics I mentioned earlier every ~4s.

I can indeed not, because the relevant code is in the NUKI firmware which is closed source. If you enable this option, Nuki Hub will register as an app, as opposed to registering as a bridge. When a bridge queries the lock state, the lock will stop notifiying in beacons that the state has changed. When registered as an app, the lock will continue notifying that the state has changed, triggering Nuki Hub to continuously querying the state.

I see, I understand now how NukiWrapper::notify(eventType) gets called.
Thanks again.


SpotX-Bash not working on Monterey

🧐 Have you fully read the README and viewed similar issues?

[X] I have read the README
[X] I have read the FAQ
[X] I have checked previous issues, open and closed
[X] I have re-installed Spotify and the issue is not present on stock but returns after re-applying SpotX-Bash

Сountry of your account
United States
What is your Spotify Plan?
Free
Do you have Spicetify installed?
No
ℹ Computer information
- Spotify version: Spotify for macOS (Apple Silicon)
<IP_ADDRESS>3.g85d9593d
- OS: macOS Monterey v12.5
- Shell: zsh

📝 Description

Closed old spotify version
Reopened and got crash report every time
Tried to re-paste the startup command in Terminal
Re-installed Spotify and SpotxBash to newest version
More Repeated crash reports

🖥 Terminal Input/Output
bash <(curl -sSL https://gist.github.com/jetfir3/e8830cf8deba6a4f15eec094d344f7b1/raw/spotx.sh)
Everything loaded into Terminal like normal
📸 Screenshots
No response

Closed old spotify version
Reopened and got crash report every time

I'm a bit unsure of your description points #1 and #2...

Does <IP_ADDRESS>3.g85d9593d crash even without patching w/SpotX-Bash?
Did Spotify update itself to <IP_ADDRESS>3.g85d9593d and then crash?
Or did you update to <IP_ADDRESS>3.g85d9593d, repatch with SpotX-Bash and then the crashing started?

I've received a few reports from Apple Silicon users about this issue and I'm trying to narrow down if this is Spotify related or SpotX-Bash related. Some of the same users who reported crashing on Apple Silicon said the same version worked without issue on their Intel machines.

I didn't update anything until I re-installed and I could tell it was crashing because of spotx-bash since when I re-installed the same thing happened-

I didn't update anything until I re-installed and I could tell it was crashing because of spotx-bash since when I re-installed the same thing happened-

I forgot to mention I deleted spotx-bash after updating and it worked perfectly fine so that's why I knew lol

Ok, so..
Spotify <IP_ADDRESS>3 opens fine before applying SpotX-Bash. And after running the Spot-Bash command, Spotify then crashes?
Can you try running the SpotX-Bash command again and letting me know if it still crashes for you?

Yes I'll see if it crashes again give me a few

Ok this time it gave me an error

Ok this time it gave me an error

((I have not modified my spotify btw))

Reinstall spotify with SpotX-Bash.. it should download, install and patch it if all goes as planned.
bash <(curl -sSL https://gist.github.com/jetfir3/e8830cf8deba6a4f15eec094d344f7b1/raw/spotx.sh) --installclient

It reopened and its no longer crashing or giving any errors but when spotify opens it doesn't disable the ads or load in any modifications it just shows the normal spotify

I don't know what's going on at this point then.
bash <(curl -sSL https://gist.github.com/jetfir3/e8830cf8deba6a4f15eec094d344f7b1/raw/spotx.sh) -f

the above command forces re-patching Spotify with SpotX-Bash... what happpens? post terminal output too please.

I wish I could say it worked but still nothing happens other than spotx closing spotify after pasting that into terminal

I wish I could say it worked but still nothing happens other than spotx closing spotify after pasting that into terminal

Is it possible that spotify added any new things that could potentially block the program? I used to use better discord alot and that always happened to them

It seems as if nothing is being patched at all for some reason.
I will try to sort this out in our telegram group with the users there and update this issue if/when things get fixed.

It seems as if nothing is being patched at all for some reason.
I will try to sort this out in our telegram group with the users there and update this issue if/when things get fixed.

Alright thank you for your help!

This issue should now be resolved.
Running the SpotX-Bash command on a fresh Spotify install should now work without issue.
Anyone who has not run into this issue yet should be able to continue their usual SpotX-Bash usage without any interruption.

This issue should now be resolved.
Running the SpotX-Bash command on a fresh Spotify install should now work without issue.
Anyone who has not run into this issue yet should be able to continue their usual SpotX-Bash usage without any interruption.

Yes its working now for me thanks again


Enable parallel testing on py36, py37 & py38 using Tox / Travis

We expect PUDL to work on both Python 3.7 and testing in parallel for the upcoming release of Python 3.8 is prudent. With Tox & Travis it is easy to test these versions (and more) in parallel.

This is currently working on Travis by means of specifying more than one python version in the .travis.yml file (3.7 and 3.8-dev).
However, if we want to specify more detailed combinations of environments (e.g. versions of other major dependencies) we can do that within the Tox test matrix and/or list of environments. (defined in tox.ini)
Similarly, if we want to be able to test on Python 3.7 and 3.8-dev locally (e.g. to run the full tests against both versions) then we will need to a local environment using Tox that can refer to different Python interpreters, and install a development version of Python 3.8 locally as well.
However, neither of these is a high priority right now, especially with having nixed Python 3.6 (see #334), so for now this can go on the back burner for a later release (maybe when Python 3.8.0 is nearing release, or if we find that we do need to work with several versions of some other major dependency)


minor fix to support weave address on service node

In lwip service tunnel test 02, we do weave-ping test between thread node and service(cloud) node, which will require both thread node and service node to have weave address.
This PR is to fix 2 minor issues that:

weave test infra does not add weave address if it is a service node.
node interface type for service node should be "wan", without correct interface type, service node is not getting correct weave address subnet.

Codecov Report

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

@@           Coverage Diff           @@
##           master     #359   +/-   ##
=======================================
  Coverage   54.38%   54.38%
=======================================
  Files         341      341
  Lines       58188    58188
=======================================
  Hits        31643    31643
  Misses      26545    26545

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 4fad7a1...9fa0da1. Read the comment docs.


Simplify flag and configfile parsing & add tests

Pull Request Motivation
The current approach requires a lot of workarounds. This PR introduces an alternative shorter workaround.
For context: the problem we want to fix is that in order to load the configfile, we have to parse the "--config" flag. Also, the flags should overwrite the configfile options.
The solution: 1. we parse all flags; 2. we load the configfile; 3. we re-parse the flags
The PR also includes some beautiful tests that validate this behavior.
Kind
/kind cleanup
Release Note
Simplified the flag and configfile parsing.

I see that you removed the tests for the flag precedence in this PR. Should we still have a unit test to verify that the behavior we want with this change is preserved?

I see that you removed the tests for the flag precedence in this PR. Should we still have a unit test to verify that the behavior we want with this change is preserved?

I added some tests that helped me build confidence in this approach.

Looks good to me! Great improvement!

/unhold


[Dust Apps] Create a public vault for dust-apps

The vault: https://dust.tt/w/78bda07b39/data-sources/vaults/vlt_rICtlrSEpWqX


refactor(upload): use file extensions for valid file types instead of MIME types (DEV-1203)

resolves DEV-1203

@EricSommerhalder @domsteinbach I changed how we check if a file type is allowed. It now checks the file extension instead of the MIME type. I would be grateful if you could also test this on your end and make sure all the file uploads work. You don't actually need to create a resource instance for each file, just check if the upload work within the upload component when you create a new resource instance.
Here are the test files:
dsp-tools-test-data.zip


Problem finding template for renderWith() w/custom class

The following code is my class I am trying to develop, yet experience problems coupling it with a template. The code is basically a copy of the original DropdownField, yet skimmed down to the Field method alone, with the last line changed. The problem is None of these templates can be found in theme 'simple': DropdownFieldData.ss

I flushed the cache repeatedly.
I deleted the cache folder on my localhost (XAMPP)
I moved the template around to various locations of my 'simple' theme: /simple/templates, /simple/templates/forms, /simple/templates/Includes
As you can see, the template name does not have an underscore character which has once been reported to cause problems.

I suspect a bug. Version 3.1.3
class DropdownFieldData extends DropdownField {

    public function Field($properties = array()) {
        $source = $this->getSource();
        $options = array();
        if($source) {
            // SQLMap needs this to add an empty value to the options
            if(is_object($source) && $this->emptyString) {
                $options[] = new ArrayData(array(
                    'Value' => '',
                    'Title' => $this->emptyString,
                ));
            }

            foreach($source as $value => $title) {
                $selected = false;
                if($value === '' && ($this->value === '' || $this->value === null)) {
                    $selected = true;
                } else {
                    // check against value, fallback to a type check comparison when !value
                    if($value) {
                        $selected = ($value == $this->value);
                    } else {
                        $selected = ($value === $this->value) || (((string) $value) === ((string) $this->value));
                    }

                    $this->isSelected = $selected;
                }

                $disabled = false;
                if(in_array($value, $this->disabledItems) && $title != $this->emptyString ){
                    $disabled = 'disabled';
                }

                $options[] = new ArrayData(array(
                    'Title' => $title,
                    'Value' => $value,
                    'Selected' => $selected,
                    'Disabled' => $disabled,
                ));
            }
        }

        $properties = array_merge($properties, array('Options' => new ArrayList($options)));
        return $this->customise($properties)->renderWith('DropdownFieldData');

//      return parent::Field($properties);

    }
}

This happens also when having theme specific form templates. The form templates are only picked up when they are stored in themes/mytheme/templates/.
CheckboxSetField::create('Specialisations', '', $myList)->setTemplate('ThemeSpecificCheckboxSetField');

My first idea would be to put this template in themes/mytheme/templates/forms, that won't work.
Second guess would be Includes, that won't work either..
Only themes/mytheme/templates/ThemeSpecificCheckboxSetField.ss will overload the core CheckboxSetField.ss, which lives in framework/templates/forms ....
I think its very legit to have theme specific form templates, and I also think that those should/could be stored in a separate forms folder, like we can do in modules and the framework does by default...
The theme/templates folder should only have a master Page.ss, if you ask me and not also MyFormTemplate.ss :).
Yes, mysite is a place to put custom frontend templates, since that is a project specific folder, but that wont work when you have 2 themes with a different markup structure and when you need one form field to have a one time different markup for a theme specific use case..

I think I looked into this some time ago and it turns out case is important. To override a core template it must replicate the folder structure exactly. It doesn't help that the casing is inconsistent.
Have you made sure your casing is the same? Also, I presume this is not in the cms as per above answer?

Yes, I'm very picky when it comes to Casing and it is happing in frontend.
But I spoke some people on the IRC, I will investigate this further, since i'm setting the theme in Page_Controller::init() with :
Config::inst()->update('SSViewer', 'theme', $theme);

setting the theme in init shouldn't be a problem...

I must say that I have just deployed a site in 3.1.x and have templates in the themes folder: themes/default/templates/forms/ChecboxSetField.ss and these work for me.
Granted, I'm just overriding the default template and not reassigning a new one...
If you move the template to Includes and it still didn't work, that is quite peculiar. What version of SS are you using?


Ensure we have correct rights on gathered content

It may happen artifacts or logs have strict access rights, prventing
proper access in later steps.
This patch ensures we set proper rights to files and directories.
As a pull request owner and reviewers, I checked that:

[X] Appropriate testing is done and actually running

/approve
/lgtm

/approve
/lgtm


loading slow-Extension issue

Issue Type: Bug
Extension Name: vscode-kubernetes-tools
Extension Version: 1.2.1
OS Version: Windows_NT x64 10.0.18363
VSCode version: 1.46.1

:warning: We have written the needed data into your clipboard. Please paste! :warning:

I guess this should be fixed once we merge https://github.com/Azure/vscode-kubernetes-tools/pull/586

Should now be fixed

Should now be fixed


Custom breakpoints are not deep merged in createTheme() with a base theme

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
createTheme(baseTheme, newThemeSettings) ignores the breakpoint settings of newThemeSettings. The breakpoints of baseTheme are applied.
Expected Behavior 🤔
The breakpoint settings of newThemeSettings should override the ones of baseTheme.
Steps to Reproduce 🕹
Link: https://codesandbox.io/s/clever-sun-lkpow
Context 🔦
I'm trying to structure my project's styling as follows.

Have a base theme with the base settings (palette, etc.)
Create specific themes for components that feed from the base theme and change some settings. The most important settings to change in the component level are the breakpoints.

I tried implementing this as follows (simplified):
const baseTheme = createTheme({});

const newThemeSettings = {
  breakpoints: {
    keys: ["small", "medium"],
    values: {
      small: 0,
      medium: 750
    }
  }
};

const newTheme = createTheme(baseTheme, newThemeSettings)

export default function Footer() {
    return (
        <ThemeProvider theme={newTheme}>
        ...children
        </ThemeProvider>

But this way, the breakpoint settings from baseTheme are not overwritten by the breakpoints defined in newTheSettings.
I also tried doing the following, which works, but doesn't work as well if I want to overwrite other settings from the baseTheme. For example, the palette.
const baseTheme= createTheme({
    palette: {
        primary: {
            main: '#e2c997',
        },
        secondary: {
            main: '#bbbca1',
        }
});

const newThemeSettings = {
  breakpoints: {
    keys: ["small", "medium"],
    values: {
      small: 0,
      medium: 750
    }
  },
  palette: {
    text: {
      primary: '#757575'
    }
  },
};

const newTheme = createTheme({...baseTheme, ...newThemeSettings})

export default function Footer() {
    return (
        <ThemeProvider theme={newTheme}>
        ...children
        </ThemeProvider>

In this case, all palette settings from baseTheme will be overwritten, which I don't want.
Your Environment 🌎

`npx @material-ui/envinfo`
@emotion/react: latest => 11.4.1
@emotion/styled: latest => 11.3.0
@material-ui/core: next => 5.0.0-beta.3
@material-ui/icons: ^4.11.2 => 4.11.2
@material-ui/private-theming:  5.0.0-beta.2
@material-ui/styled-engine:  5.0.0-beta.1
@material-ui/system:  5.0.0-beta.3
@material-ui/types:  6.0.2
@material-ui/unstyled:  5.0.0-alpha.42
@material-ui/utils:  5.0.0-beta.1
@types/react: latest => 17.0.17
react: latest => 17.0.2
react-dom: latest => 17.0.2
typescript: latest => 4.3.5

Thanks for the report. The result theme seems to be correct, it may be a problem with how the sx prop resolves the breakpoints. Taking a look now.

Thank you very much for the proposed solution and explanation :+1::+1:


Implement integer division for BigInteger

I propose implementing the integer division operator (/) for BigInteger. This issue can be quickly closed once the PR https://github.com/arkworks-rs/algebra/pull/761 is merged because we can directly leverage div_with_rem() to compute the quotient.

Duplicate of https://github.com/arkworks-rs/algebra/issues/645 no?


LNC logo update request

Awesome  job!
Please update Learn NEAR Club logo
https://learnnear.club/brand-logos/
Thank you!

Hi @almal,
All app data, including logos are handled through the NEAR Ecosystem Repo. Please open and issue, or if possible, a PR with the update for the logo. Thanks!

Oh, cool, makes sense!
thank you

It seems there is an issue:
stat uses https://github.com/near/ecosystem/raw/main/img/learn-near.png
logo link at repo  https://github.com/near/ecosystem/blob/main/img/learn-near-logo.png

This will likely be due to the caching. The data is updated every 24 hours and the ecosystem data was only updated 2 hours ago.


Update Skywalking APM logo

Skywalking is already in the CNCF landscape 0.9.9 . And we require to update the logo.
Here is the logo:

And you can find it in here: https://camo.githubusercontent.com/4ac940361b7345156ff71aa21efdb42a449e67d7/68747470733a2f2f736b7977616c6b696e67746573742e6769746875622e696f2f706167652d7265736f75726365732f332e302f736b7977616c6b696e672e706e67

Hi @wu-sheng thanks for the heads up, we will make the change for the upcoming version.

Closing as this update was included in the most recent version https://github.com/cncf/landscape#current-version


Add toggle to keep clones separated

Add flag file to maintain old behavior of keeping cloned plugins and themes in a separate directory tree.
This keeps the zgenom source directory clean and makes it easier to do a full reset of all clones by deleting ~/.zgenom

Thank you for your contribution.
I haven't found any signs of a similar feature in zgen.
What is the benefit of using this instead of:
ZGEN_DIR=$HOME/.zgenom
source path/to/zgenom.zsh

On a side note, I plan to add a zgen clean to remove all unused plugins.

Good point. I was thinking that a flag file makes it easier to tweak settings without having to maintain a fork, but you're right, they can set ZGEN_DIR before sourcing out of their zgenom clone.
Why did you decide to not keep a .zgen/.zgenom directory to put the plugin clones in? It's tidier than having them all in the same directory as the source.

The default value was ZGEN_DIR=$HOME/.zgen (if unset).
The README suggested: git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
So following the defaults it would have been in the same place: ~/.zgen.
Reading through some issues it was also suggested to use $ZDOTDIR but this may also be wrong for some users (when it is set directly in the dotfiles instead of linking files).
Others didn't like an "unclean" ~ and wanted to move it to some $XDG folder.
So I saw three viable options: ~/.zgen, ~/.zgenom or place it where the user clones zgenom.
Since you're bringing this up, maybe I should change it to zgen_repo/sources. This would make starting over make easier but still all files are in one place.

Agreed, ZGEN_DIR="$ZGEN_SOURCE/sources" would keep things tidy. Updated PR accordingly and got rid of the flag file.

Looks good 👍


Export doesn't work

vendor/ongr/translations-bundle/Storage/ElasticsearchStorage.php:53
vendor/ongr/translations-bundle/Storage/ElasticsearchStorage.php:57
new TermsFilter('locale'... key is invalid. Should be 'messages.locale', same with domains.

You quite obviously have an outdated bundle, here is the code from the current version:
https://github.com/ongr-io/TranslationsBundle/blob/5190dc91b838e4028a5e3141c28020179a91898f/Storage/ElasticsearchStorage.php#L52

i've just required it with composer, i see that it is different in master

Yes, I looked at the master as well, sorry about that

Np :)

Changes will need to be included with a patch


antidupl.net: Add version 2.3.10

Closes #4579

AntiDupl.NET (homepage) (Github repo) is a utility for finding duplicate images.
Notes:

naming of the package: I named the package as antidupl.net. (following the pattern of paint.net and database.net)

/verify


Missing Kidney reference from Zenodo record (KeyError: 'Kidney')

Report
Hi,
Thanks for producing this package. In the listed tissue options there is a 'Kidney' reference but this is not in the Zenodo reference record https://zenodo.org/api/records/7587774. I therefore get a KeyError when the tissue type is set to 'Kidney'. Is the kidney reference available and if so could the reference be updated or could you provide a link? I tried https://zenodo.org/api/records/7580707/files/pretrained_models_Kidney_ts.tar.gz/content
Thanks
Oliver
Version information
No response

Thanks for the pointer. IMO we don't have a high quality kidney dataset in Tabula sapiens (it's difficult to obtain kidney tissue from organ donations).
I would recommend using https://www.kidneycellatlas.org and retrain the classifiers.
I still need to fix the notebook in that regard.

Tabula sapiens v2 will also contain a kidney reference. Publication is around the corner and we will update all models once ready.


DSA : Longest Arithmetic Subarray

Description
A has an array of N non-negative integers. A wants to calculate maximum length of contiguous arithmetic subarray.
Arithmetic Subarray is an array that contains at least two integers and the difference between consecutive integers are equal. For example  [9,10] , [3,3,3] and [9,7,5,3] arithmetic arrays.
Input: No. of test cases T
integer no N
array A[]
Domain
DSA
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign

I would like to work on this issue.
BATCH - 2 DSA
Dhruti Gandhi

/assign

/assign


fixed one capitalization

Coverage remained the same at 85.505% when pulling 2bf94a6c33fc8bde626825d4d9a535887b09a996 on hengyu95:master into fee5ef28f4768f57bc5138f35c351fd3c67756e0 on CS2103AUG2017-W14-B2:master.


Remove the release note which should be reverted.

This release note should be reverted in the PR: https://github.com/Azure/azure-powershell/pull/13250. But be added back in another PR.

Docs Build status updates of commit b542a7e:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-conceptual/azps-5.0.0/release-notes-azureps.md
:bulb:Suggestion
View (azps-5.0.0)
Details

docs-conceptual/azps-5.0.0/release-notes-azureps.md

Line 2468, Column 1: [Suggestion-code-block-indented] Indented code blocks aren't allowed. Use a Markdown code block surrounded by triple backticks (```). NOTE: This Suggestion will become a Warning on 1/29/21.
Line 3708, Column 0: [Suggestion-sensitive-language] Term 'whitelist' is sensitive and should not be used in content or code. Usage: '* Added new sizes to the whitelist of VM sizes for which accelerated networking will be turned on when using the simple param set for '

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Initial commit for seshat service scripts.

Will re-submit for merging after testing code review feedback.


trace: add a span for the client side of RPC

I have been using the grpc-google-cloud-trace library for the past couple of days and switched to the trace package's gRPC support today. One thing I noticed is that the client-side span does not exist. The /{ServiceName}/{RpcName} span is logged by the server side of RPC.
https://github.com/harlow/grpc-google-cloud-trace/blob/50cddeb62ce6e510266986eb28297a136782babd/intercept/intercept.go#L21 in this package the client side span is denoted by a /grpc.Client/ prefix, making it clear which one is the client vs which one is the server span.
To illustrate the difference (rpc.Sent span is added by me ignore that):
client-side span present

cannot distinguish RPC server vs client span

There was some brief discussion at the end of the #548 about this (the issue was automatically closed when the CL was merged).

I haven't investigated the issue in detail. But, we already start an RPC_CLIENT span on the client-side and a RPC_SERVER span at the server. I am not sure why the Stackdriver Trace UI doesn't visualize the RPC_SERVER half of the span.
If grpc-google-cloud-trace achieves this visualization by creating two RPC_CLIENTs on both hands, they are misusing the API.
Also related to https://github.com/GoogleCloudPlatform/google-cloud-go/issues/549.

This package has been obsoleted by  go.opencensus.io/trace.


Updated .gitignore to include *.nuget.targets" files.

I found that Git is recently finding the following changes when building the solution:

modified:   ../MediaManager.Forms/MediaManager.Forms.UWP/Plugin.MediaManager.Forms.UWP.nuget.targets
modified:   ../Samples/Forms/MediaForms.UWP/MediaForms.UWP.nuget.targets

I'm not sure if it's because I upgraded to VS 2017, or some other reason. These appear to be user-specific files, so I added these types of files to .gitignore.

Thanks!


added support for changing alpha value and changing corner radius of the popup

Added support to change the transparency of popup background color
Added support to change the corner radius of popup

* Added support to change the transparency of popup background color

* Added support to change the corner radius of popup

Thank you for your update code. I am trying to set the popupAlphaValue = 255 but the reaction view background still Color.WHITE. How to make it transparent?

@sopharasum,
Alpha value's range is from 0 to 255 where
0 - 100% Transparency
255 - 0%  Transparency
As you had assigned 255, it won't be transparent, try changing the values below 255 and above 0 and you would get the idea.

@sopharasum,
Alpha value's range is from 0 to 255 where
0 - 100% Transparency
255 - 0% Transparency
As you had assigned 255, it won't be transparent, try changing the values below 255 and above 0 and you would get the idea.

Thank you so much.
However, are you planning to add on the reaction item showing up animation similar to this repository https://github.com/ngohado/Facebook-Reaction ?

@sopharasum,
Alpha value's range is from 0 to 255 where
0 - 100% Transparency
255 - 0% Transparency
As you had assigned 255, it won't be transparent, try changing the values below 255 and above 0 and you would get the idea.

Thank you so much.
However, are you planning to add on the reaction item showing up animation similar to this repository https://github.com/ngohado/Facebook-Reaction ?

Not as of now.

@h4rz @sopharasum feel free to use those 2 attributes with the version 1.3 that I just published: https://github.com/pgreze/android-reactions/releases/tag/v1.3

@pgreze, Thank you for open-sourcing this useful library and also for improving the code, I got to learn something new😄.


Update device-requirements.md

The Site is available only in the US so the URL needs to be https://www.microsoft.com/en-us/windowsforbusiness/view-all-devices
If we remove the locale it results in  404.

@JohanFreelancer9 Please copy review

Issue#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/5734

@jaimeo Please merge this PR. Thanks

@jaimeo Gentle reminder

Looking into why that page isn't following our corporate guidelines re: locales in URLs.

@msbemba to clarify, it does NOT 404 if your locale is en-us. But it does not appear to be a localized page, so if the locale is other than en-us, it does indeed fail as you report.


Add social logins

https://www.linkedin.com/posts/flutter-app-development_animations-android-ios-activity-7172073083913007104-gFWY?utm_source=share&utm_medium=member_ios

Moving to Trello board.


Backport "Add support for JEP-409 (sealed classes) + Add javacOpt directive" to LTS

Backports #19080 to the LTS branch.
PR submitted by the release tooling.

Finally:)

No regressions detected in the community build up to lts-19080.
Reference


Could not find module talib when run.

Hi
Could not find module talib when run.
How do you install talib module?

pip install TA_Lib‑0.4.24‑cp310‑cp310‑win_amd64.whl

It's a third-party package, you need to download and install it separately.
For Windows, try this (unofficial):  https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib
For Linux, try this: http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz


multiple definition of `main'

When I follow the instruction the command shows the error below:
[ 79%] Built target LIPM_MPC_Test
[ 80%] Linking CXX executable MuJoCoSim
/usr/bin/ld: CMakeFiles/MuJoCoSim.dir/main.cpp.o: in function main': main.cpp:(.text.startup+0x0): multiple definition of main'; CMakeFiles/MuJoCoSim.dir/build/CMakeFiles/3.27.4/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:CMakeCXXCompilerId.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Simulation/CMakeFiles/MuJoCoSim.dir/build.make:129: Simulation/MuJoCoSim] Error 1
make[1]: *** [CMakeFiles/Makefile2:429: Simulation/CMakeFiles/MuJoCoSim.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
How can I fix it. Thank you!

Sorry, I found the reason and it works now.


Properly align local secrets file XML

Remove tabs from XML and properly intent file

Merging this PR. @sebgod, Thank you so much for your contribution!


DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.

I am attempting to use a UI5Lab for the first time. Apologize if there's an obvious solution.
How am I supposed to format my base64 pdf string before passing it to the pdfSource property? In practice i have many base64 PDF strings in the HANA DB Container I'd like to preview using your UI5Lab.
As an example below, I am attempting to pass a small hello world base64 PDF string to the controller. When mapped to a EntitySet, the PDF viewer renders the magnifier properly so I below the initial set-up is correct.

You have to add "data:application/pdf;base64," in front of the base64 string. This is needed to understand the base64 string. Hope this helps.


Move CullFace out of RasterMethod

It's currently only affecting the triangle rendering. It should affect lines and points as well. Currently the state is leaked when rendering lines, which hurts @Binero project.

Seems like this issue stretches over multiple crates.

@Binero yes, but since they are on crates.io one doesn't have to update all at once - instead one can just start with the bottom (draw_state) and go up (gfx_core, gfx, etc).

I will have a look at draw_state.

Fixed by #945


revert mkcloud: workaround vlan/virtio checksum offloading bug

revert 2029b683
https://bugzilla.novell.com/show_bug.cgi?id=884706

Is this bug you reference fixed now?

We dont know. The point of this PR is to find out. Triggered by discussion in
https://bugzilla.suse.com/show_bug.cgi?id=1015266

@bmwiedemann I guess you have to explicitely enable it then to really find out?

@dirkmueller no, the bridge is newly created by libvirt with offloading default on
# ethtool -k vl3br | grep tx-check
tx-checksumming: on

I would add the bsc# in the title and write more background...

ideally we'd have a clear version check for the kernel here (>= 4.4 and let it disabled for older incarnations)

bug was for SLE-12 and I had found SP1 to be fixed a year ago... but they share the 3.12 kernel version and SLE-12-GA is EOL anyway and we dont run it anywhere anymore... so should be good.

@bmwiedemann I remember you said its still an issue on SLE11 kernels. are you saying it was fixed there as well?

The bug only appeared when we started to use SLES12 hosts with new 'vhost' code path in libvirt+kvm so probably is not in SLE11*


QUESTION - How do I edit the settings

I can't seem to find the settings file.
If I go to the plugin page for the extension the settings cannot be edited.

Had to restart after installing. Spent far too long on this 😂


closing out syntax changes

While there are some implementation issues (which I will open up soon so I can keep track of them) left to be done, I think all syntax changes have been made.
@codalogic unless you have some other proposals, I think we are finished with changes to the syntax if you want to start on the ABNF.

OK, I'll get on it.  (I'm on a train much of today so the timing is good!)  If I come across any issues I'll let you know.


KeyError in ELB checks when using custom policies

When you use a custom policy on your ELB, it causes the elb watcher to throw a KeyError, see below for stacktrace
2015-07-06 23:01:02,013 ERROR: Job "run_change_reporter (trigger: interval[0:15:00], next run at: 2015-07-06 23:09:25.276738)" raised an exception [in build/bdist.linux-x86_64/egg/apscheduler/scheduler.py:520]
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/apscheduler/scheduler.py", line 512, in _run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/opt/security_monkey/security_monkey/scheduler.py", line 46, in run_change_reporter
    reporter.run(account, interval)
  File "/opt/security_monkey/security_monkey/reporter.py", line 56, in run
    (items, exception_map) = watcher.slurp()
  File "/opt/security_monkey/security_monkey/watchers/elb.py", line 191, in slurp
    'policies': [elb_policies[policy_name] for policy_name in li.policy_names]
KeyError: u'AWSConsole-SSLNegotiationPolicy-custom-policy-name'

Looking at the ELB the policy section contains the following:
"Policies": {
    "LBCookieStickinessPolicies": [],
    "AppCookieStickinessPolicies": [],
    "OtherPolicies": [
        "AWSConsole-SSLNegotiationPolicy-custom-policy-name",
        "ELBSecurityPolicy-2015-05"
    ]
},

If i describe the policies for the ELB I see the policy fine, so I'm not sure why its causing a KeyError

I've seen these occasionally in the logs, but they seemed intermittent, so I had written it off as AWS API oddness.  Are you seeing this repeatedly?
If nothing else, we should verify that the exception is tracked in the exception map so it doesn't ruin the entire run of the ELB map.  After taking a quick peek, it looks like an exception here would prevent security_monkey from seeing any ELB changes and should be better handled.

I do think it might be intermittent, but I do see these at a pretty regular cadence. And as you mentioned it does seem to kill the entire run which is what had me concerned the most, so I agree that if this is just API oddness, better exception handling would be a good compromise.

In 0.3.7 this is also an issue for a now-supported policy as well:
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/apscheduler/scheduler.py", line 512, in _run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/usr/local/src/security_monkey/security_monkey/scheduler.py", line 46, in run_change_reporter
    reporter.run(account, interval)
  File "/usr/local/src/security_monkey/security_monkey/reporter.py", line 56, in run
    (items, exception_map) = watcher.slurp()
  File "/usr/local/src/security_monkey/security_monkey/watchers/elb.py", line 191, in slurp
    'policies': [elb_policies[policy_name] for policy_name in li.policy_names]
KeyError: u'ELBSecurityPolicy-2015-05'```

A pull request is certainly welcome.
I haven't had time to track this one down.


Readme

Coverage remained the same at 89.474% when pulling 36d829d0b09824240c7826978132db70226e549d on readme into 845e48ad5f2e91246bdf5b9b11caf66dba899ddf on master.


"How can I check the certificate that is sent by the server?" instructions don't output certificate chain

Please correct the command, and provide an interpretation of a sample output.
The command provided in the section "How can I check the certificate that is sent by the server?" https://learn.microsoft.com/en-us/azure/postgresql/single-server/concepts-certificate-rotation#13-how-can-i-check-the-certificate-that-is-sent-by-the-server does not provide the certificate chain the output. Verified with OpenSSL 1.1.1f  31 Mar 2020 and OpenSSL 3.0.2 15 Mar 2022, with the latter giving
openssl s_client -showcerts -connect <your-postgresql-server-name>:5432

CONNECTED(00000003)
4027D5BA4C7F0000:error:0A000126:SSL routines:ssl3_read_n:unexpected eof while reading:../ssl/record/rec_layer_s3.c:308:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 365 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 71dff16a-2df0-0b16-ce8b-5816de789eaa
Version Independent ID: 8149f5e2-1465-c3ba-37a4-81e075ebe4f3
Content: Certificate rotation for Azure Database for PostgreSQL Single server
Content Source: articles/postgresql/single-server/concepts-certificate-rotation.md
Service: postgresql
Sub-service: single-server
GitHub Login: @GennadNY
Microsoft Alias: gennadyk

@marcindulak Thanks for reaching out, We will look into this and update you as appropriate.

3 months have passed @GeethaThatipatri-MSFT

Command updated in the article

Has the change been tested?
I don't think it's a question of changing the port, at least my database connection is on port 5432 not 443.
In the original issue I asked "Please correct the command, and provide an interpretation of a sample output.". After verifying the functionality, please provide an example of the expected output.

@GeethaThatipatri-MSFT - I don't think the issue is resolved yet.

The partial answer is here https://github.com/MicrosoftDocs/azure-docs/issues/108946

After careful consideration, we have decided to discontinue further updates to single-server content.
This decision was not made lightly. Our team is committed to delivering the best possible experience, and focusing our efforts on Flexible Server will benefit you more in the long run.
#please-close


[IOTDB-6062] Pipe: Modify the de/ser method of PipeRuntimeMeta to support multi-version evolution

coverage: 47.935% (-0.006%) from 47.941% when pulling 622053bc751ba071bc85b2c4f18e41001737342a on pipe-comp-1.2.0-master into cb3eca69b1f272fc01f771251ddb9680e28120a0 on master.


PyPI MT103 13C

The author asking for help
"it’s unclear as to whether this section is permitted to repeat (meaning it should be parsed as a list) or if it’s one value only."
Yes, 13C is a repetitive Optional field , expect zero , one or more occurrence.
13C Time Indication
One or several time indication(s) related to the processing of the payment instruction.
Format
Option C	/8c/4!n1!x4!n	(Code)(Time indication)(Sign)(Time offset)
By the way MT103 will die soon and will be replaced with ISO 20022 pacs008

Hi, this issue tracker is for issues with the codebase behind https://pypi.org itself, not the projects hosted on PyPI.
You should report this issue to the tracker for the project in question instead.


Camera Access issue

I'm now getting an EXC_BAD_ACCESS (SIGABRT), indicates a crash caused by a memory access violation in Sparrow when trying to read the camera for a Seed Signer import. This type of error often occurs when an application tries to read or write to memory that hasn't been allocated, or that has been deallocated. The specific address causing the problem is at 0x00000000000000b4, which suggests an attempt to access memory near the beginning of the address space, often indicative of a null pointer dereference or a similar issue.
The crash occurs in a thread named Java: atomic-processor-1.

Notes:  This is now occurring in Sparrow-1.8.2-x86_64 and Sparrow-1.8.4-x86_64 when trying to read from the camera during XPUB key import.

Thanks for the bug report. It looks similar to #1215. Are you able to find the same problematic stack in https://github.com/sparrowwallet/sparrow/issues/1215#issuecomment-1882480531 in the Java hs_err_pid<pid>.log crash dump? I've put some guidance to find it in that issue.
Unfortunately I haven't been able to reproduce this somewhat rare issue myself, but I'm starting to get enough information to report the bug on the OpenIMAJ driver. Any help narrowing this down would be much appreciated.

I also have an idea this bug might be avoidable by changing the value of SCAN_LOOP_WAIT_MILLIS in WebcamScanDevice. If you run from source (instructions in the project README) changing this value to a higher number might reduce the scan interval sufficiently that a thread race problem does not occur.

Great idea! I'll rebuild from source and let you know.
Thank you so much! I love my SparrowWallet!
On Sun, Mar 17, 2024, 4:06 AM craigraw @.***> wrote:

I also have an idea this bug might be avoidable by changing the value of
SCAN_LOOP_WAIT_MILLIS in WebcamScanDevice
https://github.com/sparrowwallet/sparrow/blob/master/src/main/java/com/sparrowwallet/sparrow/control/WebcamScanDevice.java.
If you run from source (instructions in the project README) changing this
value to a higher number might reduce the scan interval sufficiently that a
thread race problem does not occur.
—
Reply to this email directly, view it on GitHub
https://github.com/sparrowwallet/sparrow/issues/1323#issuecomment-2002372170,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF5MIDWX3BC2CKPLUALYYGLYYVMKJAVCNFSM6AAAAABEZQDJXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGM3TEMJXGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I built and ran Sparrow using temurin-18 jdk and jre.
Wallets load great.
Import wallet using camera breaks.
hs_err_pid10958.log attached here.
On Sun, Mar 17, 2024 at 12:33 PM Brian Jeffreys @.***>
wrote:

Great idea! I'll rebuild from source and let you know.
Thank you so much! I love my SparrowWallet!
On Sun, Mar 17, 2024, 4:06 AM craigraw @.***> wrote:

I also have an idea this bug might be avoidable by changing the value of
SCAN_LOOP_WAIT_MILLIS in WebcamScanDevice
https://github.com/sparrowwallet/sparrow/blob/master/src/main/java/com/sparrowwallet/sparrow/control/WebcamScanDevice.java.
If you run from source (instructions in the project README) changing this
value to a higher number might reduce the scan interval sufficiently that a
thread race problem does not occur.
—
Reply to this email directly, view it on GitHub
https://github.com/sparrowwallet/sparrow/issues/1323#issuecomment-2002372170,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF5MIDWX3BC2CKPLUALYYGLYYVMKJAVCNFSM6AAAAABEZQDJXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGM3TEMJXGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I tried bumping up SCAN_LOOP_WAIT_MILLIS to 500 and then 2500, but same
result.
I can tell you that I've been using Sparrow Wallet for a long time now on
this machine, so I am suspecting that my camera is dying or the driver has
changed.
But thank you for trying to help!
(I love open source software!)
public static final int SCAN_LOOP_WAIT_MILLIS = 2500;
On Sun, Mar 17, 2024 at 4:06 AM craigraw @.***> wrote:

I also have an idea this bug might be avoidable by changing the value of
SCAN_LOOP_WAIT_MILLIS in WebcamScanDevice
https://github.com/sparrowwallet/sparrow/blob/master/src/main/java/com/sparrowwallet/sparrow/control/WebcamScanDevice.java.
If you run from source (instructions in the project README) changing this
value to a higher number might reduce the scan interval sufficiently that a
thread race problem does not occur.
—
Reply to this email directly, view it on GitHub
https://github.com/sparrowwallet/sparrow/issues/1323#issuecomment-2002372170,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF5MIDWX3BC2CKPLUALYYGLYYVMKJAVCNFSM6AAAAABEZQDJXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGM3TEMJXGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I turned on the Use HD Camera Resolutuon setting under the View menu and it's working now!

Great - that's the other thing to try :)


Make registry component configurable in snc script.

Right now we are directly using the quay.io/openshift-release-dev/ocp-release as hard coded for getting the release information instead of that we should be making it configurable since nightly bits comes from quay.io/openshift-release-dev/ocp-release-nightly registry.

fixed by #103


Motion Detect for individual cameras set/get not working

I am trying to control the motion detect record setting for individual cameras and am finding that camera.armed seems to always return true and camera.setMotionDetect(false/true) returns an error that reads: Error: Can't set motion detect for camera [camerid:name]

I see the problem. Each camera has an armed value which is actually displaying the armed value of the system. I am looking for the enabled/disabled value which you don't yet pull into a property. I'll try to submit a pull request when I get the chance to add it.

The value I'm looking for is the enabled:true/false value, I believe, because that value seems consistent with if the motion sensor is set or not.

Makes sense. I merged that guy in. Thank you!

If you could get a version with this pushed out to npm soon, I'd appreciate. Have a downstream project I'm working on dependent on it.

v1.3.0 is out

I still not able to turn motion detection enable or disabled using this method setMotionDetect(true)
Can someone confirm if it is working ?
If I use a valid auth token and fire a POST API call for same using a postman client, I get
{
"message": "Unauthorized Access",
"code": 101
}
Has Blink changed it underlying APIs ?

I've just tested it and it works. Here's my code:
blink.setupSystem()
  .then(() => {
    Object.values(blink.cameras).forEach(camera => {
      camera.setMotionDetect(false);
    });
  }, (error) => {
    console.log(error);
  });

It works ! Thank you.
I needed to control specific cameras, so used...
        Object.values(blink.cameras).forEach(camera => {
          if(camera.name == 'cam 1' || 'cam 2' || 'cam 3') {
            camera.setMotionDetect(true);
          }
        });


Hyper server, parse request json body

Hello, sorry for stupid question, but I can't find an example how to parse json body from POST request in hyper server.
request example:
curl -X POST "<IP_ADDRESS>:3000/user/319/update" -d '{"name": "Name1", "age": 20...}'

Hey there! There's a guide showing how to do this on the hyper website. Also, you may find the reqwest crate even easier to user, such as this Response.json example.

I use something like this :
struct TestSt;

impl Service for TestSt {
    type Request = Request;
    type Response = Response;
    type Error = hyper::Error;
    type Future = FutureResult<Response, hyper::Error>;
    fn call(&self, req: Request) -> Self::Future {
        futures::future::ok(match req.method() {
            &Post => {
                req.body().concat2().and_then(move |body: Chunk| {
                                                let v: Value = serde_json::from_slice(&body).unwrap();
                                                println!("{:?}", v);
                                                Ok(())
                });
                Response::new().with_status(StatusCode::Ok)
            },
            _ => {
                Response::new().with_status(StatusCode::NotFound)
            }
       })
    }
}

fn main() {
    let addr = "<IP_ADDRESS>:3000".parse().unwrap();
    let server = Http::new().keep_alive(true).bind(&addr, || Ok(TestSt)).unwrap();
    server.run().unwrap();
}

when I run the server and make some requests
curl -X POST -H "Content-Type: application/json" "<IP_ADDRESS>:3000/u" -d '{"name": "Name1", "age": 20}'
I expect to see println with this data but got nothing.
Could you pls explain what I'm doing wrong ?

Sorry, I'm newbie in rust, mb I can't understand some thing, but if I rewrite me code to:
&Post => {

        req.body()
           .concat2()
           .and_then(move |body: Chunk| {
                let v: Value = serde_json::from_slice(&body).unwrap();
                println!("{:?}", v);
                Ok(())
            })
            .and_then(|_| {
                Ok(Response::new().with_status(StatusCode::Ok))
            });
},

I got error :
note: expected type `hyper::Response`
 found type `()`

How can I unwrap hyper::Response from futures::AndThen ?

Thank you so much, explains everything for me.