How do you handle code sharing between different services in the same monorepo?

It doesn't come up in this sample repo, but I'm assuming that in a large enough project you would have several top-level "common" directories, meant to be shared between two or more services.
With every service having its own Dockerfile under its sub-dir, it wouldn't be possible to include also the required common dirs straight from the repo, since Docker doesn't allow referencing the filesystem from outside the "build context" (e.g. ../common).
Do you have an elegant solution for this use-case?

@itamaro This is an amazing question!
Whenever I start a new project or altering infrastructure - I prefer to not share at all. Even if there are similar parts - they are just copied/manually merged between services. This allows you to easy experiment within any given service without breaking others. If changes worked well for one service, they are back copied to others manually.
Now let me go back to your question. There are few ways I've used for different projects:

Create common or shared folder within monorepo, which have his own Dockerfile. In this docker file you define build steps and copy that folder to folder within a container (/shared or /common). You can do a shared infrastructure versioning using Docker tags. Other services, which require that common code to run just based on this common docker. Whenever you do a change to the infrastructure - you update a docker tag to a new version and update base image for some or all services. The downside of that approach is whenever you update your base docker - all other services, which are based on that docker image needs to be rebuilt from scratch
Another approach is to just publish common code as a separate package. For example, in Node.JS you can use a private registry to achieve that. I like this approach much more, but the downside is that you have to maintain a private package repository, which might be too much for early products.

We personally use approach #1 at the moment. Our common piece is solid and changes just a few times per month.
Also if you do use Node.JS, you can easily connect shared piece of code on the local environments same way as you connect in in docker using NODE_PATH. Here is how we run our services using scripts in package.json: "start": "NODE_PATH=../shared node src/server.js". Node.JS will use NODE_PATH to search for modules in addition to the regular directories.
Hope this helps!

@anorsich thank you for sharing!
Couple of thoughts.
First, regarding the "not sharing at all" approach for the beginning - while the thought of duplication and maintenance overhead makes me shiver, I can see how it can work reasonably well in a single-contributor environment. At least from the collaborative monorepos I'm familiar with, I find it difficult to imagine how it could work without significant "forking" between the different copies.
The 2 solutions you present definitely make sense. As anything, I see pro's and con's, and I wonder if we can get to an ultimately better solution, when compared to a monolithic application, where it is trivial to have one shared directory (or many).
Some issues that bothered me when attempting the solutions you described (in no particular order):

So much extra "toil" to get things working...
With option 1 - managing base images can be a real hassle. You start with 1, but you end up with a bunch. You need to version them. When they change, you need to chase all the services that depend on them, update their Dockerfile to start from the new base image, and rebuild. Update deployments to use the updated images. Update compose files.
Also, with base images, there's the need to "manage their cache distribution". You either let every developer build the base images for themselves, or you need to make sure all developers pull base images from a central registry, every time they are updated. There are several tradeoffs just here.
Option 2 has its own overhead, as you described, with setting up and managing package repositories. This overhead is significantly magnified when you take advantage of the micro-services paradigm to actually have different technologies for different services, so you end up managing repositories for apt & pip & npm & ... (we actually do that, but not for purposes of implementing option 2)
Also, I think that packaging up a small utility function as a full-fledged package just to be able to reuse it all over your codebase just doesn't make sense... Call me crazy ;-)
In addition, for both options, I really like having my code in the image in the same layout as the code in the repo, so I can easily bind-mount the repo-dir for local development for dynamic languages. Using installed packages or base images with special paths can break this.
To compound all of that, there's also the problem of effectively managing dependencies. Once you have multiple small shared modules (micro-modules?), each can have a bunch a dependencies (internal or external), it can be a nightmare to make sure that every final image contains all the required internal & external dependencies - no more, and no less.
Not quite directly related to shared modules, but while I'm on a soapbox, don't get me started on the pains of build-images vs. run-images... Since we're trying to assume as little as possible about the host environment, but we do need build-environments that are broader than the runtime-environments (e.g. compiler and dev-libs in build-image, but only shared-objects and binaries in runtime-image), we end up with complex multi-tiered dependency management that controls what goes into build-images and what goes into runtime-images and which build-image is used to produce artifacts in temporary host-dirs to be copied to which runtime-image...

I think this is a real pain-point in the overly-simplistic approach that Dockerfiles force, and real deep solutions are needed...
We're actually building internal tooling to make it better for us. Maybe it can be relevant to others as well :-)

@itamaro you describe the exact problem I'm having -- I'm experimenting with changing the build context of a service to be the root of the monorepo so I can copy over the /shared directory but it results in a more complicated Dockerfile and slows down the time it takes to build the image -- I was wondering whether you managed to find a sane solution to this problem?

@richardscarrott I still use shared folder on some old projects, but for the new projects, I prefer to publish common code as a standalone package (npm in Node.JS). Packages take more time and likely require some CI process to publish them, but allow to keep docker images more lightweight. You also going to think twice before creating a new package, which results in less shared code.

I was wondering whether you managed to find a sane solution to this problem?

@richardscarrott not a perfect solution, but something that worked for us pretty well.
we wrote a build tool, YaBT, that is essentially a glorified Dockerfile generator that understands semantics of both internal (e.g. shared code) and external (e.g. apt / pip / npm packages) dependencies, and allows you to describe your artifacts in a DAG (you can see examples under the tests dir). it has good support for Python & C/C++ monorepos with external dependencies based on a bunch of package management frameworks, parallel building & target caching (of artifacts as well as test execution).
you're welcome to take it for a spin, and let me know how it works for you (or submit issues as to how it isn't :-) ).
worth mentioning also Bazel, which may work for your needs (it didn't for ours).
also worth mentioning Buck, which may also work for you, but probably doesn't (because there's no support for Docker images).
YaBT shares a similar DSL with both of these, and maybe they can even coexist under the same project.

@itamaro Have you found an elegant solution? xD

@itamaro Have you found an elegant solution for this?

Have you found an elegant solution for this?

@cerino-ligutom the build tool I mentioned in the previous comment is still being used successfully :-)

I recently found an elegant solution and thought I'd share!
In March of this year, Docker Compose released version 2.17.0 which supports specifying multiple build contexts.

Added support for additional_contexts in the build service configuration.

I can now have the primary build context be a service-specific folder, and add a common folder as a named context passed in to the Dockerfile. It's super neat.
The docker-compose.yml file in the root of my project looks like this:
...
services:
  ...
  server:
    ...
    build:
      context: server
        dockerfile: Dockerfile
        additional_contexts:
        - shared=common
    ...
  ...
...

And my server/Dockerfile looks like this:
...
COPY . .
COPY --from=shared . ../common
...

This copies all of my source files from my server folder (minus .dockerignore files) and all of my shared files from my common folder into my Docker image.
My folder structure:
server
├─ Dockerfile
└─ ...

...
├─ Dockerfile
└─ ...

common
└─ ...

docker-compose.yml

And that's it! I think it's pretty clean.


iOS App Store Rejection - Need to remove persistent geolocation and only use the significant changes API

I've been in a back and forth with the App Store Review team and they will not allow our application into the app store if it is using persistent geolocation tracking. I've explained to them the behavior of this plugin with no avail.
Apple said that they now only approve which use persistent tracking for directions and mapping applications and that the Significant Changes API will allow us to achieve the functionality we're looking for.
Our app needs to grab the users location sporadically to check the weather around them for use in a headache risk calculation. We would also like to have the accuracy high enough that we could infer establishments which they are visiting.
Is it possible to only use the Significant Changes API / significant-change location service with this plugin without having to declare support for location in the UIBackgroundModes key / persistent geolocation tracking?
Does anyone have any suggestions on how to achieve this?

If you want to use only sig.changes api, simply disable Location Updates
from Background Modes.
https://www.dropbox.com/s/pvvsrn9pb2gmih2/Screenshot 2015-01-20 16.14.44.png?dl=0
the plugin will continue to operate with sig.changes only.
On Tue, Jan 20, 2015 at 4:00 PM, cacardinal<EMAIL_ADDRESS>wrote:

I've been in a back and forth with the App Store Review team and they will
not allow our application into the app store if it is using persistent
geolocation tracking. I've explained to them the behavior of this plugin
with no avail.
Apple said that they now only approve which use persistent tracking for
directions and mapping applications and that the Significant Changes API
will allow us to achieve the functionality we're looking for.
Our app needs to grab the users location sporadically to check the weather
around them for use in a headache risk calculation. We would also like to
have the accuracy high enough that we could infer establishments which they
are visiting.
Is it possible to only use the Significant Changes API /
significant-change location service with this plugin without having to
declare support for location in the UIBackgroundModes key / persistent
geolocation tracking?
Does anyone have any suggestions on how to achieve this?
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132
.

--
Chris Scott
Transistor Software http://www.transistorsoft.com

Your app should def. be rejected for your use-case.  sig.changes only will
be adequate.
On Tue, Jan 20, 2015 at 4:00 PM, cacardinal<EMAIL_ADDRESS>wrote:

I've been in a back and forth with the App Store Review team and they will
not allow our application into the app store if it is using persistent
geolocation tracking. I've explained to them the behavior of this plugin
with no avail.
Apple said that they now only approve which use persistent tracking for
directions and mapping applications and that the Significant Changes API
will allow us to achieve the functionality we're looking for.
Our app needs to grab the users location sporadically to check the weather
around them for use in a headache risk calculation. We would also like to
have the accuracy high enough that we could infer establishments which they
are visiting.
Is it possible to only use the Significant Changes API /
significant-change location service with this plugin without having to
declare support for location in the UIBackgroundModes key / persistent
geolocation tracking?
Does anyone have any suggestions on how to achieve this?
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132
.

--
Chris Scott
Transistor Software http://www.transistorsoft.com

Thanks for the quick response @christocracy
We already had disabled Location Updates from Background Modes prior to our submission in order to attempt to resolve this issue. Looking back at the code we submitted, I now see that we didn't remove the declaration of support for location in the UIBackgroundModes key in our Info.plist
However, I've found that when I build cordova, the UIBackgroundModes key is reinserted into our Info.plist, which is likely triggering Apple's rejection. Is it ok to just delete this?

When you submit, ensure that UIBackgroundModes does not contain location.
Apple will be happy
On Tuesday, January 20, 2015, cacardinal<EMAIL_ADDRESS>wrote:

Thanks for the quick response @christocracy
https://github.com/christocracy
We already had disabled Location Updates from Background Modes prior to
our submission in order to attempt to resolve this issue. Looking back at
the code we submitted, I now see that we didn't remove the declaration of
support for location in the UIBackgroundModes key in our Info.plist
However, I've found that when I build cordova, the UIBackgroundModes key
is reinserted into our Info.plist, which is likely triggering Apple's
rejection. Is it ok to just delete this?
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-70739369
.

--
Snet from Gmail Mobile

Sounds good. We'll be resubmitting today. Thanks for the great plugin!

Hi @christocracy. Going to buy the premium version, but need to clarify on iOS part first. I had the same rejection last week related to having location in UIBackgroundModes. I understand that I can remove it manually but what will be the impact of that? Will it increase the battery usage?

If you remove location from bg-modes, it will prevent aggressive GPS
tracking, decreasing battery usage.
You will continue to receive bg geolocation updates from the low-power
"sig.chaanges" system (typically every few blocks).  This is what apps like
4-Square use.
I suggest you enable debug mode after removing "location" then do some
field-testing.
On Monday, March 23, 2015, Maksim Chemerisuk<EMAIL_ADDRESS>wrote:

Hi @christocracy https://github.com/christocracy. Going to buy the
premium version, but need to clarify on iOS part first. I had the same
rejection last week related to having location in UIBackgroundModes. I
understand that I can remove it manually but what will be the impact of
that? Will it increase the battery usage?
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-84938327
.

--
Snet from Gmail Mobile

@christocracy thanks for quick response Chris. I will do testing as you suggested, but afaiu without that permission location updates will be less granular, right? I read in the internet a bit about significant changes API, and people say different things. From your personal experience, what is typical granularity for that API? Is it enough for a transportation app (say Uber-like) to detect user/car position on a map in realtime, and potentially calculate a route price in real-time?
Ideally 10 meters is the target accuracy, but it might be acceptable a less accurate values I guess.

I explained the granularity of sig.changes in previous msg:
"You will continue to receive bg geolocation updates from the low-power
"sig.chaanges" system (typically every few blocks). "
No it is not enough to calculate route in realtime, like Uber.  If you're
making a transportation app like this, you have nothing to fear from
Apple by using "location" in bg- modes.
On Monday, March 23, 2015, Maksim Chemerisuk<EMAIL_ADDRESS>wrote:

@christocracy https://github.com/christocracy thanks for quick response
Chris. I will do testing as you suggested, but afaiu without that
permission location updates will be less granular, right? I read in the
internet a bit about significant changes API, and people say different
things. From your personal experience, what is typical granularity for that
API? Is it enough for a transportation app (say Uber-like) to detect
user/car position on a map in realtime, and potentially calculate a route
price in real-time?
Ideally 10 meters is the target accuracy, but it might be acceptable a
less accurate values I guess.
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-84962165
.

--
Snet from Gmail Mobile

@christocracy It looks like Apple is not satisfied still:

Your app declares support for location in the UIBackgroundModes key in your Info.plist file but does not declare any features that require persistent location. Apps that declare support for location in the UIBackgroundModes key in your Info.plist file must have features that require persistent location.

How can I pass this? Your plugin adds location mode, but it doesn't touch any API right? Or did I miss something?

What is the nature of your app?
On Monday, March 23, 2015, Maksim Chemerisuk<EMAIL_ADDRESS>wrote:

@christocracy https://github.com/christocracy It looks like Apple is
not satisfied still:
Your app declares support for location in the UIBackgroundModes key in
your Info.plist file but does not declare any features that require
persistent location. Apps that declare support for location in the
UIBackgroundModes key in your Info.plist file must have features that
require persistent location.
How can I pass this? Your plugin adds location mode, but it doesn't touch
any API right? Or did I miss something?
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-84969136
.

--
Snet from Gmail Mobile

@christocracy it's an Uber-like app for booking taxi online. I use cordova to enhance web application with a missing capabilities.

Hello @ christocracy
My app is rejected due to following reason.
"2.16 Details
Your app declares support for location in the UIBackgroundModes key in your Info.plist file but does not declare any features that require persistent location. Apps that declare support for location in the UIBackgroundModes key in your Info.plist file must have features that require persistent location.
Next Steps
Please revise your app to include features that require the persistent use of real-time location updates while the app is in the background. Please also add the following battery use disclaimer in your Application Description:
"Continued use of GPS running in the background can dramatically decrease battery life."
If your app does not require persistent real-time location updates, please remove the "location" setting from the UIBackgroundModes key. You may wish to use the significant-change location service or the region monitoring location service if persistent real-time location updates are not required for your app features."
But my application is require "location updates " and "Background fetch" in as background modes.("UIBackgroundModes")
So can you please help me to re-solve this issue and my app pass out from the apple review cycle with       these features.

Seems pretty clear to me what you have to do.
"Please revise your app to include features that require the persistent use
of real-time location updates while the app is in the background. Please
also add the following battery use disclaimer in your Application
Description:
"Continued use of GPS running in the background can dramatically decrease
battery life."
On Friday, July 10, 2015, DipakMakwana1<EMAIL_ADDRESS>wrote:

Hello @ christocracy
My app is rejected due to following reason.
"2.16 Details
Your app declares support for location in the UIBackgroundModes key in
your Info.plist file but does not declare any features that require
persistent location. Apps that declare support for location in the
UIBackgroundModes key in your Info.plist file must have features that
require persistent location.
Next Steps
Please revise your app to include features that require the persistent use
of real-time location updates while the app is in the background. Please
also add the following battery use disclaimer in your Application
Description:
"Continued use of GPS running in the background can dramatically decrease
battery life."
If your app does not require persistent real-time location updates, please
remove the "location" setting from the UIBackgroundModes key. You may wish
to use the significant-change location service or the region monitoring
location service if persistent real-time location updates are not required
for your app features."
But my application is require "location updates " and "Background fetch"
in as background modes.("UIBackgroundModes")
So can you please help me to re-solve this issue and my app pass out from
the apple review cycle with these features.
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-120238021
.

--
Snet from Gmail Mobile

I am also trying to use your plugin using only the significant changes API.   Everything works fine when background location permissions are on but when I then remove them from the plist file, I get an exception and the app crashes.  Changing that background permission is the only change, and this can be demonstrated to break the Sample App (try removing the plist background modes and emulating).  I'm using xCode7 and ios9, which could be the culprit?  Any help would be very appreciated!  Here's the console log when removing the permission from the SampleApp:
2015-10-20 15:07:44.912 BG Geo[57806:1757291] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/scottie/Library/Developer/CoreSimulator/Devices/7901ABC6-2ACC-4DFA-90EA-B1EA3DDE6C03/data/Containers/Data/Application/F4D00B91-FD91-4912-8202-DB854810BAFE/Library/Cookies/com.transistorsoft.backgroundgeolocation.ionic.binarycookies
2015-10-20 15:07:45.024 BG Geo[57806:1757291] Apache Cordova native platform version 3.9.1 is starting.
2015-10-20 15:07:45.026 BG Geo[57806:1757291] Multi-tasking -> Device: YES, App: YES
2015-10-20 15:07:45.032 BG Geo[57806:1757291] Unlimited access to network resources
2015-10-20 15:07:45.132 BG Geo[57806:1757291] [CDVTimer][keyboard] 0.142992ms
2015-10-20 15:07:45.378 BG Geo[57806:1757291] [CDVTimer][splashscreen] 245.315015ms
2015-10-20 15:07:45.378 BG Geo[57806:1757291] [CDVTimer][TotalPluginStartup] 245.988965ms
2015-10-20 15:07:45.527 BG Geo[57806:1757291] Resetting plugins due to page load.
2015-10-20 15:07:46.681 BG Geo[57806:1757291] [ts-locationmanager] CDVBackgroundGeoLocation configure {
    activityRecognitionInterval = 10000;
    activityType = Other;
    autoSync = true;
    batchSync = false;
    debug = true;
    desiredAccuracy = 0;
    disableElasticity = false;
    distanceFilter = 20;
    fastestLocationUpdateInterval = 1000;
    forceReloadOnGeofence = false;
    forceReloadOnLocationChange = false;
    forceReloadOnMotionChange = false;
    locationUpdateInterval = 5000;
    method = POST;
    params =     {
        device =         {
            available = 1;
            cordova = "3.9.1";
            manufacturer = Apple;
            model = "x86_64";
            platform = iOS;
            uuid = "5ACB9EFC-0019-407C-BD7D-FCFC36F944D0";
            version = "9.0";
        };
    };
    startOnBoot = false;
    stationaryRadius = 20;
    stopDetectionDelay = 0;
    stopOnTerminate = true;
    stopTimeout = 1;
    triggerActivities = "in_vehicle, on_bicycle, running, walking, on_foot";
    url = "http://posttestserver.com/post.php?dir=ionic-cordova-background-geolocation";
}
2015-10-20 15:07:46.682 BG Geo[57806:1757291] - TSLocationManager create database
2015-10-20 15:07:46.689 BG Geo[57806:1757291] [ts-locationmanager] - start location updates
2015-10-20 15:07:46.690 BG Geo[57806:1757291] *** Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreLocationFramework_Sim/CoreLocation-1861.0.9/Framework/CoreLocation/CLLocationManager.m:604
2015-10-20 15:07:46.692 BG Geo[57806:1757291] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010ae97f65 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x000000010d7dbdeb objc_exception_throw + 48
	2   CoreFoundation                      0x000000010ae97dca +[NSException raise:format:arguments:] + 106
	3   Foundation                          0x000000010d429ae2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
	4   CoreLocation                        0x000000010dc1cfe3 CLClientGetCapabilities + 8270
	5   BG Geo                              0x000000010ac72fe4 -[TSLocationManager startUpdatingLocation] + 135
	6   BG Geo                              0x000000010ac6e03a -[TSLocationManager updateCurrentPosition:] + 1041
	7   BG Geo                              0x000000010ac48187 -[CDVBackgroundGeolocation getCurrentPosition:] + 423
	8   BG Geo                              0x000000010ac62cea -[CDVCommandQueue execute:] + 874
	9   BG Geo                              0x000000010ac62559 -[CDVCommandQueue executePending] + 841
	10  Foundation                          0x000000010d3c6129 __NSFireDelayedPerform + 402
	11  CoreFoundation                      0x000000010adf8364 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
	12  CoreFoundation                      0x000000010adf7f11 __CFRunLoopDoTimer + 1089
	13  CoreFoundation                      0x000000010adb98b1 __CFRunLoopRun + 1937
	14  CoreFoundation                      0x000000010adb8e98 CFRunLoopRunSpecific + 488
	15  GraphicsServices                    0x000000010f3a2ad2 GSEventRunModal + 161
	16  UIKit                               0x000000010b244676 UIApplicationMain + 171
	17  BG Geo                              0x000000010ac3ee41 main + 65
	18  libdyld.dylib                       0x000000010e32b92d start + 1
	19  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Ill check it out
On Tuesday, October 20, 2015, ScottieR<EMAIL_ADDRESS>wrote:

I am also trying to use your plugin using only the significant changes
API. Everything works fine when background location permissions are on but
when I then remove them from the plist file, I get an exception and the app
crashes. Changing that background permission is the only change, and this
can be demonstrated to break the Sample App (try removing the plist
background modes and emulating). I'm using xCode7 and ios9, which could be
the culprit? Any help would be very appreciated! Here's the console log
when removing the permission from the SampleApp:
2015-10-20 15:07:44.912 BG Geo[57806:1757291] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/scottie/Library/Developer/CoreSimulator/Devices/7901ABC6-2ACC-4DFA-90EA-B1EA3DDE6C03/data/Containers/Data/Application/F4D00B91-FD91-4912-8202-DB854810BAFE/Library/Cookies/com.transistorsoft.backgroundgeolocation.ionic.binarycookies
2015-10-20 15:07:45.024 BG Geo[57806:1757291] Apache Cordova native platform version 3.9.1 is starting.
2015-10-20 15:07:45.026 BG Geo[57806:1757291] Multi-tasking -> Device: YES, App: YES
2015-10-20 15:07:45.032 BG Geo[57806:1757291] Unlimited access to network resources
2015-10-20 15:07:45.132 BG Geo[57806:1757291] [CDVTimer][keyboard] 0.142992ms
2015-10-20 15:07:45.378 BG Geo[57806:1757291] [CDVTimer][splashscreen] 245.315015ms
2015-10-20 15:07:45.378 BG Geo[57806:1757291] [CDVTimer][TotalPluginStartup] 245.988965ms
2015-10-20 15:07:45.527 BG Geo[57806:1757291] Resetting plugins due to page load.
2015-10-20 15:07:46.681 BG Geo[57806:1757291] [ts-locationmanager] CDVBackgroundGeoLocation configure {
activityRecognitionInterval = 10000;
activityType = Other;
autoSync = true;
batchSync = false;
debug = true;
desiredAccuracy = 0;
disableElasticity = false;
distanceFilter = 20;
fastestLocationUpdateInterval = 1000;
forceReloadOnGeofence = false;
forceReloadOnLocationChange = false;
forceReloadOnMotionChange = false;
locationUpdateInterval = 5000;
method = POST;
params =     {
device =         {
available = 1;
cordova = "3.9.1";
manufacturer = Apple;
model = "x86_64";
platform = iOS;
uuid = "5ACB9EFC-0019-407C-BD7D-FCFC36F944D0";
version = "9.0";
};
};
startOnBoot = false;
stationaryRadius = 20;
stopDetectionDelay = 0;
stopOnTerminate = true;
stopTimeout = 1;
triggerActivities = "in_vehicle, on_bicycle, running, walking, on_foot";
url = "http://posttestserver.com/post.php?dir=ionic-cordova-background-geolocation";
}
2015-10-20 15:07:46.682 BG Geo[57806:1757291] - TSLocationManager create database
2015-10-20 15:07:46.689 BG Geo[57806:1757291] [ts-locationmanager] - start location updates
2015-10-20 15:07:46.690 BG Geo[57806:1757291] *** Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreLocationFramework_Sim/CoreLocation-1861.0.9/Framework/CoreLocation/CLLocationManager.m:604
2015-10-20 15:07:46.692 BG Geo[57806:1757291] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)'
*** First throw call stack:
(
0   CoreFoundation                      0x000000010ae97f65 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x000000010d7dbdeb objc_exception_throw + 48
2   CoreFoundation                      0x000000010ae97dca +[NSException raise:format:arguments:] + 106
3   Foundation                          0x000000010d429ae2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4   CoreLocation                        0x000000010dc1cfe3 CLClientGetCapabilities + 8270
5   BG Geo                              0x000000010ac72fe4 -[TSLocationManager startUpdatingLocation] + 135
6   BG Geo                              0x000000010ac6e03a -[TSLocationManager updateCurrentPosition:] + 1041
7   BG Geo                              0x000000010ac48187 -[CDVBackgroundGeolocation getCurrentPosition:] + 423
8   BG Geo                              0x000000010ac62cea -[CDVCommandQueue execute:] + 874
9   BG Geo                              0x000000010ac62559 -[CDVCommandQueue executePending] + 841
10  Foundation                          0x000000010d3c6129 __NSFireDelayedPerform + 402
11  CoreFoundation                      0x000000010adf8364 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
12  CoreFoundation                      0x000000010adf7f11 __CFRunLoopDoTimer + 1089
13  CoreFoundation                      0x000000010adb98b1 __CFRunLoopRun + 1937
14  CoreFoundation                      0x000000010adb8e98 CFRunLoopRunSpecific + 488
15  GraphicsServices                    0x000000010f3a2ad2 GSEventRunModal + 161
16  UIKit                               0x000000010b244676 UIApplicationMain + 171
17  BG Geo                              0x000000010ac3ee41 main + 65
18  libdyld.dylib                       0x000000010e32b92d start + 1
19  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-149724270
.

--
Snet form Gmail Mobile

You’re not setting the config param useSignificantChangesOnly: true
Set that and it’ll work.
On Tue, Oct 20, 2015 at 6:48 PM, ScottieR<EMAIL_ADDRESS>wrote:

I am also trying to use your plugin using only the significant changes
API. Everything works fine when background location permissions are on but
when I then remove them from the plist file, I get an exception and the app
crashes. Changing that background permission is the only change, and this
can be demonstrated to break the Sample App (try removing the plist
background modes and emulating). I'm using xCode7 and ios9, which could be
the culprit? Any help would be very appreciated! Here's the console log
when removing the permission from the SampleApp:
2015-10-20 15:07:44.912 BG Geo[57806:1757291] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/scottie/Library/Developer/CoreSimulator/Devices/7901ABC6-2ACC-4DFA-90EA-B1EA3DDE6C03/data/Containers/Data/Application/F4D00B91-FD91-4912-8202-DB854810BAFE/Library/Cookies/com.transistorsoft.backgroundgeolocation.ionic.binarycookies
2015-10-20 15:07:45.024 BG Geo[57806:1757291] Apache Cordova native platform version 3.9.1 is starting.
2015-10-20 15:07:45.026 BG Geo[57806:1757291] Multi-tasking -> Device: YES, App: YES
2015-10-20 15:07:45.032 BG Geo[57806:1757291] Unlimited access to network resources
2015-10-20 15:07:45.132 BG Geo[57806:1757291] [CDVTimer][keyboard] 0.142992ms
2015-10-20 15:07:45.378 BG Geo[57806:1757291] [CDVTimer][splashscreen] 245.315015ms
2015-10-20 15:07:45.378 BG Geo[57806:1757291] [CDVTimer][TotalPluginStartup] 245.988965ms
2015-10-20 15:07:45.527 BG Geo[57806:1757291] Resetting plugins due to page load.
2015-10-20 15:07:46.681 BG Geo[57806:1757291] [ts-locationmanager] CDVBackgroundGeoLocation configure {
activityRecognitionInterval = 10000;
activityType = Other;
autoSync = true;
batchSync = false;
debug = true;
desiredAccuracy = 0;
disableElasticity = false;
distanceFilter = 20;
fastestLocationUpdateInterval = 1000;
forceReloadOnGeofence = false;
forceReloadOnLocationChange = false;
forceReloadOnMotionChange = false;
locationUpdateInterval = 5000;
method = POST;
params =     {
device =         {
available = 1;
cordova = "3.9.1";
manufacturer = Apple;
model = "x86_64";
platform = iOS;
uuid = "5ACB9EFC-0019-407C-BD7D-FCFC36F944D0";
version = "9.0";
};
};
startOnBoot = false;
stationaryRadius = 20;
stopDetectionDelay = 0;
stopOnTerminate = true;
stopTimeout = 1;
triggerActivities = "in_vehicle, on_bicycle, running, walking, on_foot";
url = "http://posttestserver.com/post.php?dir=ionic-cordova-background-geolocation";
}
2015-10-20 15:07:46.682 BG Geo[57806:1757291] - TSLocationManager create database
2015-10-20 15:07:46.689 BG Geo[57806:1757291] [ts-locationmanager] - start location updates
2015-10-20 15:07:46.690 BG Geo[57806:1757291] *** Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreLocationFramework_Sim/CoreLocation-1861.0.9/Framework/CoreLocation/CLLocationManager.m:604
2015-10-20 15:07:46.692 BG Geo[57806:1757291] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)'
*** First throw call stack:
(
0   CoreFoundation                      0x000000010ae97f65 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x000000010d7dbdeb objc_exception_throw + 48
2   CoreFoundation                      0x000000010ae97dca +[NSException raise:format:arguments:] + 106
3   Foundation                          0x000000010d429ae2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4   CoreLocation                        0x000000010dc1cfe3 CLClientGetCapabilities + 8270
5   BG Geo                              0x000000010ac72fe4 -[TSLocationManager startUpdatingLocation] + 135
6   BG Geo                              0x000000010ac6e03a -[TSLocationManager updateCurrentPosition:] + 1041
7   BG Geo                              0x000000010ac48187 -[CDVBackgroundGeolocation getCurrentPosition:] + 423
8   BG Geo                              0x000000010ac62cea -[CDVCommandQueue execute:] + 874
9   BG Geo                              0x000000010ac62559 -[CDVCommandQueue executePending] + 841
10  Foundation                          0x000000010d3c6129 __NSFireDelayedPerform + 402
11  CoreFoundation                      0x000000010adf8364 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
12  CoreFoundation                      0x000000010adf7f11 __CFRunLoopDoTimer + 1089
13  CoreFoundation                      0x000000010adb98b1 __CFRunLoopRun + 1937
14  CoreFoundation                      0x000000010adb8e98 CFRunLoopRunSpecific + 488
15  GraphicsServices                    0x000000010f3a2ad2 GSEventRunModal + 161
16  UIKit                               0x000000010b244676 UIApplicationMain + 171
17  BG Geo                              0x000000010ac3ee41 main + 65
18  libdyld.dylib                       0x000000010e32b92d start + 1
19  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-149724270
.

--
Chris Scott
Transistor Software http://www.transistorsoft.com

@christocracy where do you set this param? Been looking around where this config is located but can't seem to find it..

Sorry, I didn't realize I was commenting on my old & deprecated repo.
This project has moved here.

And to answer your question specifically, at the new repo:  useSignificantChangeOnly

To prevent the key+value UIBackgroundModes + location being reinserted into the app is it appropriate to remove the following from plugin.xml (near line 80, or line 39 in the new -it repo)?
        <config-file target="*-Info.plist" parent="UIBackgroundModes">
            <array>
                <string>location</string>
            </array>
        </config-file>

This version of the plugin is no longer supported.  It has moved here

@christocracy, My App too was rejected due to location tracking in background Mode. I used Significant location change and removed background location capability. However, after field testing, i found that there were no location updates received on server, which I used to get when background location was on. Kindly help me understand what I am missing here?

This plugin is no longer supported.  See README for redirection
On Monday, May 23, 2016, supriya-mobantica<EMAIL_ADDRESS>wrote:

@christocracy https://github.com/christocracy, My App too was rejected
due to location tracking in background Mode. I used Significant location
change and removed background location capability. However, after field
testing, i found that there were no location updates received on server,
which I used to get when background location was on. Kindly help me
understand what I am missing here?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/132#issuecomment-220892862

--
Snet form Gmail Mobile

@christocracy  , I am working on iOS plugin.There i need to get location in case of app is terminated.I know how to do this in iOS app.But when i use the same concept for ios plugin in phonegap,it doesn't work.The concept that i am using is to start location tracking again on getting notification via UIApplicationDidFinishLaunchingNotification when app launches in background on location update by method startSignificantLocationChangesMonitering().But notification method is not calling, where i have restarted location tracking. Do you have any idea, how things work when we use iOS plugin in phoneGap?

This version is no longer supported.  See readme for link to new version.


Process message edits to poll messages properly

Currently, when we remove all the content from a /poll Poll Title message, the message text correctly changed to (deleted message) but the poll stays visible and interactive. We should accordingly delete (or hide) the poll widget as well.
Similarly, if the message is edited to say /poll New Title, we should maybe recompute the poll title accordingly.
This was reported here. We should make this fix generic so as to make at least the delete functionality work for other uses of widgets (the tic tac toe bot?).

I agree that this should apply to all widgets (so tictactoe, todo, poll, etc.).  It should be roughly a one-line change, but figuring out where that one line is will be easier for somebody who knows the widget system a little.

@zulipbot claim

@zulipbot claim

If we ever implement editing poll messages, we should be careful to ensure that existing votes from other users don’t get deleted or their meaning altered by edits, and that extra options that were added from the widget side don’t get deleted.
This is probably more complexity than it’s worth, and disabling edits seems like a fine solution (#17156).

If we ever implement editing poll messages, we should be careful to ensure that existing votes from other users don’t get deleted or their meaning altered by edits, and that extra options that were added from the widget side don’t get deleted.
This is probably more complexity than it’s worth, and disabling edits seems like a fine solution (#17156).

This is probably more complexity than it’s worth, and disabling edits seems like a fine solution (#17156).

But this also prevents adding another options in android clients, The web client renders an "Add Option input field".


Network/TLS Failure when connecting to localhost

What the title says, I also tested with Kristall and Amfora and they connected succesfully

When operating system are you using, and which server?
Maybe related to #43 ?

I'm using Arch Linux and the Jetforce server

Could be fixed now in the dev branch, with the updated the_Foundation submodule.

Yes! It works now!

Fixed in v1.1.2.


Blank lines exceptions

With the upgrade to 0.11.1 some styles don't work anymore according to #65. But I find them really useful, e.g.
if (something) {
    doSomething1()
    doSomething1()
    doSomething1()
    doSomething1()

} else if (something1) {
    doSomething1()
    doSomething1()
    doSomething1()
    doSomething1()

} else {
    doSomething1()
    doSomething1()
}

I find the empty line useful for a better separation especially in longer chained if-else statements. Is there something I could do to allow this?

How about
when {
    something -> {
        doSomething1()
        doSomething1()
        doSomething1()
        doSomething1()
    }
    something1 -> {
        doSomething1()
        doSomething1()
        doSomething1()
        doSomething1()
    }
    else -> {
        doSomething1()
        doSomething1()
    }
}

or better yet
when {
    something -> handleSomething()
    something1 -> handleSomething1()
    else -> handleSomethingElse()
}

?
Generally, if I find myself in a situation where a blank line is required to make code readable it usually means that it's too long and should be split.
P.S. https://github.com/shyiko/ktlint#how-do-i-suppress-an-error might be of interest but I strongly advise against it.
(I'm closing this issue as nothing is really broken but feel free to continue the discussion)

Another example is a try-catch with multiple catch statements.


Double arrow does not remember the last command run

The double run arrow does not remember the last type of run that was done.  It always seems to “Run Deephaven File”, which is the first in the list.  If I select and run via a different mode, it isn’t sticky, so I have to keep hand selecting it each time, which is not a good UX.

@chipkent This is a vscode bug that I plan to file an issue with them. Workaround is to close (or hide) dh output panels and then change the selection. It should be sticky in that scenario. It won't change if any dh panels are visible.

Included in #1


Why is read_origins Vec in ReadSet?

I think MemoryLocation just can be read once in a Tx.
So
ReadSet = HashMap<MemoryLocationHash, ReadOrigin, BuildIdentityHasher>;

is enough.
I also run test mainnet, read_origins len always is 1.
Is there something I didn't consider? @hai-rise

Thank you! I get it.


physic: flag.Value interface for various units.

Continuation of #303 adding more units that implement the flag.Value interface.
Add ElectricCurrent
Add Pressure
Add Power
Add Energy
Add ElectricalCapacitance
Add LuminousIntensity
Add LuminousFlux

Codecov Report

Merging #331 into master will increase coverage by 0.51%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #331      +/-   ##
==========================================
+ Coverage   71.31%   71.82%   +0.51%
==========================================
  Files         100      100
  Lines        8866     9034     +168
==========================================
+ Hits         6323     6489     +166
- Misses       2375     2377       +2
  Partials      168      168

Impacted Files
Coverage Δ

conn/physic/units.go
100% <100%> (ø)
:arrow_up:

devices/lepton/lepton.go
87.19% <0%> (-1.22%)
:arrow_down:

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 16931f2...98c902a. Read the comment docs.

I got stuck with speed.Set(s),  the rest needed to make sense.... ¯_(ツ)_/¯ seemed like an not horrible idea to use base units at the time.

gohci


[SPARK-23997][SQL][Followup] Update exception message

What changes were proposed in this pull request?
This PR is an follow-up PR of #21087 based on [a discussion thread](https://github.com/apache/spark/pull/21087#discussion_r211080067]. Since #21087 changed a condition of if statement, the message in an exception is not consistent of the current behavior.
This PR updates the exception message.
How was this patch tested?
Existing UTs

cc @gatorsmile

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2675/
Test PASSed.

Test build #95425 has started for PR 22269 at commit f789450.

Test build #95425 has finished for PR 22269 at commit f789450.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/95425/
Test FAILed.

Retest this please.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2679/
Test PASSed.

Test build #95429 has started for PR 22269 at commit f789450.

Test build #95429 has finished for PR 22269 at commit f789450.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/95429/
Test PASSed.


Faster rendering and simplified collision detection

Moved text rendering on nodes to node texture for faster rendering. Changed line rendering from graphics to line texture for faster rendering.
Simplified the collision detecting code to replace the trigonometry with simpler calculations.
Replaced interactive=true with eventMode = 'dynamic' for pixi.js version 7 compliance.
Commented out some code that is made redundant by the the main evaluation loop.
Changed the sleep time from 10ms to 16ms for power saving.

Lgtm


Add a simple example that select static data from a pg db

A minimalist example that creates a new pool, runs SELECT 1
and prints the result.
Context: I'm currently having some issues integrating this lib into Gotham and so I wanted to write a minimalist bb8 program to verify this library actually works. I'm submitting this here because this might be useful for others exploring this lib.

Ok, great. Let me know if you need help figuring anything out.

I moved this to the postgres folder to make it easier to build in 100af9fac8c25aa0e5c96715a29419d3e3203721


update to use default branch from ecosystem

ecosystem are renaming its branch on May 3rd. Please merge this before this date.
Details at https://github.com/quarkusio/quarkus/issues/16601
cc @gastaldi

@gastaldi build still fails with issues for sonarqube. Maybe a permanent fix this time 😀

@SlyngDK it seems that the secrets are only available if the source branch for the PR comes from the same repo (not from a fork). We'll have to rethink this approach

@gastaldi It is the same issue for branches created by dependabot, in this repo.
It will be nice to get this issue fixed.

@gastaldi That fail original, i have just done a rerun, but same with https://github.com/quarkiverse/quarkus-logging-json/pull/98, which I not  have done a rerun on.

That's really weird. I followed the instructions in https://sonarcloud.io/project/configuration?analysisMode=GitHubActions&id=quarkiverse_quarkus-logging-json and I see that it passes on the Dependabot PRs in https://sonarcloud.io/project/branches?id=quarkiverse_quarkus-logging-json

BTW better merge this PR today, we're changing the default branch to main in https://github.com/quarkusio/quarkus-ecosystem-ci today


responseTimeout property at the command method

It looks like, the Azure IoT Central uses a hardcoded value (such as 30 seconds) for a responseTimeout property of the command method.
The documentation  is missing info about this property, that it is a hardcoded value and there is no way to change it.
It will be nice to have some way, for instance via the DTDL optional parameter, like we have for offline command, either to change this property or increase its value to 60 seconds.
Thanks
Roman

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

ID: 655f6e68-4cc4-af5f-8bbb-ce26b41cf082
Version Independent ID: 34f57ba4-d744-774e-1d6f-0599dbf84a37
Content: How to use device commands in an Azure IoT Central solution - Azure IoT Central
Content Source: articles/iot-central/core/howto-use-commands.md
Service: iot-central
GitHub Login: @dominicbetts
Microsoft Alias: dobett

@romankiss
Thanks for your feedback! We will investigate and update as appropriate.

Hi @romankiss we have escalated this issue to our Content SMEs for further evaluation on this request. Please stay tuned for additional feedback on this.

Hi @romankiss - I'm working with the product team to confirm that the timeout is set to 30 seconds. As soon as I get confirmation I'll update the docs accordingly. I've also passed on your request to make this value configurable and I'll let you know when I get a response. Thanks for getting in touch.

Hi @dominicbetts  - thank you for your help, some of my devices connected via the NB-IoT network sometimes require a longer response time (35-45 seconds) for command method.

Hi @romankiss - I'm still waiting to hear back from the product team about this. I'll let you know as soon as I hear anything.

Hi @dominicbetts - Thanks for update.

Hi @romankiss,
I heard back from the product team and:

They confirmed that the timeout value is 30 seconds.
They have no plans to make this configurable.
I've added a note in the docs as suggested making this clear.

Regards,
Dominic

Hi @dominicbetts, thanks for update.
Roman


RFC git branch reogranisation after the release of v1.2.0 and v2.0.0

After this week's two new feature releases, v1.2.0 (stable) and v2.0.0 (development), the time has come to forward our git branches again.
Here is the recall of our branch policy:

Understanding official repo branches

The branch forwarding requires some extra conventions now that we have important technology differences between Invenio v1 and Invenio v2 code bases. Here is a plan we have been roughly thinking about:
1. There are two new release maintenance branches:

maint-1.2
maint-2.0

As usual, they accept only bug fixes, without any API changes or DB schema changes, etc.  This is not surprising, it works exactly like the usual maint-X.Y branches.
2. It is recommended to start any new developments on top of Invenio v2 code base only.  This means doing the following branch renaming:

current next will be renamed to new master

All new developments will go here, and eventually this branch will give birth to a later release named v2.1, with its own future maint-2.1 branch.  Again, nothing surprising here, this is exactly like the past master branches.
3. Some new features may still be developed for the old Invenio v1 code base.  (This is the novelty point, as in the past the master branch was simply forwarded.)  It means to perform the following branch renaming:

current master  will be renamed to old or legacy

If an installation needs some new feature on top of their Invenio v1 instance, it may be developed there.  Eventually this might give birth to v1.3, v1.4, and even later v1.x code base releases.
However, and this is significant difference, if a new feature branch is prepared only for the "old" v1 codebase, without any counterpart for the "new" v2 codebase, then this feature won't get automatically merged upstream anymore, and might "die" inside some of the v1.x release series -- unless somebody takes it and adapts it for the new v2 code base.
This is dictated by the significant code infrastructure differences between Invenio v1 and v2, where it does not make much sense to develop new feature for v1 and try to "port it" to v2 later.
In summary, it is strongly recommended to use v2 code base for all new feature developments from now on, but if someone running an Invenio v1.2 instance needs a new feature, it is recommended to prepare two branches, one for v1.x and one for v2.x codebase, otherwise the feature may die inside some of the v1.x releases.
4. What about past feature requests or pull requests?
The triage team will reclassify past issues, feature requests, and pull requests as either for the "old" v1 code base (when important to a service), or the "new" v2 code base (preferred), or for the "old and new" code bases (rare).  Such a triage effort has been running in the past few months and it will intensify now that v2.0.0 is out.
5. What about unstable features that needs side maturing?
Again, we can use next and pu branches, as until now, which means that:

current pu will be dropped
we can start new next out of master when a need arises
we can start new pu out of next when a need arises

As in the past, it is recommended to use master for all new feature developments whenever possible, with a commit-early-commit-often policy, all the while carefully isolating potentially dangerous or immature features by making them easily "unpluggable" or otherwise "configurable away" from the setup, in order not to hurt other existing Invenio v2 installations.  See items 4 and 5 of our contributing guidelines.
WDYT? Especially those teams that may need have new non-trivial feature developments for the old v1.x code base in the pipeline?

So, indeed, for INSPIRE we still have a maximum (today) of 336 commits that could possibly go into Invenio legacy. Most of them are related to the the mega author module (#2395) (which is actually already outdated) and which is going to be reimplemented from scratch for Invenio 2. Some of them are related to refextract, many are simple bug fixes which could go into maint-1.2. So I guess that if we contribute all the work that is currently just sitting in the INSPIRE, ahem, fork, we could contribute to causing the birth of Invenio 1.3 :smile: Also CDS has many branches still to be integrated.
So I can very well see the need for having a legacy branch, at least to allow CDS/INSPIRE to contribute back upstream what has been developed in the last years, and which could be still useful for Invenio users who are not yet able to jump on the v2 wagon...

+1

+1

+1
Indeed, as @kaplun mentioned, for CDS there is also the need for a 'legacy' branch for contributing all the already deployed features that have not yet been integrated into Invenio. Some of these features might not need a v.2.1 branch as they will be (or have been) fully re-implemented. These developments are for webnews, webcomment, webalerts, bibdocfile, videos, images.

Thanks, closing as agreed.


Data addition: Long and medium distance aviation

Title is self-explanatory

Calculation worksheet if ever needed:
POSTED data calculation aviation.xlsx


API Suspended

Hi @dwisiswant0,
I would love to use this package but the hosting account appears to be suspended. Is there any plan to bring this back online or would you be open to handing this off to another maintainer?
Thanks!

Oh, yeah. My hosting suspended and now I want to backup but the DNS is same
as old newserver, won't to pointing to the new IP.
Regards.
Pada tanggal Sab, 15 Des 2018 1.45 PM Karl Monson<EMAIL_ADDRESS>menulis:

Hi @dwisiswant0 https://github.com/dwisiswant0,
I would love to use this package but the hosting account appears to be
suspended. Is there any plan to bring this back online or would you be open
to handing this off to another maintainer?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dwisiswant0/cekBin/issues/1, or mute the thread
https://github.com/notifications/unsubscribe-auth/AYo_5E1sUUm12FVG79O3F-BsQ5BvEWOkks5u5JqRgaJpZM4ZUmfg
.


Social Identity Provider integration

Feature Overview
Enable social identity providers in your Ory Project configuration to allow user authentication federation in your application.
Google, Facebook, Github + in general OIDC compliant providers will be supported.
This feature will allow your users to sign in/sign up either by using a standard username&password or by using well-known providers: "Sign in with ... " Google for example.
Additional context

Self-Service with UI in Ory Cloud Console
Facebook, Github, Google + other OIDC compliant providers will be supported

Done


Run clippy (on CI)

Clippy is great at finding all kinds of issues. Would be nice to run it on CI. If wanted, I can add this.

@lucacasonato, PR is welcome.

Merged, thanks!


Pass the checkboxState back to the caller

When using a library like react-native-form you need to have the onClick action return the current state for it to register as a form value.

This is great! There's also an update of the docs needed for this.


Update documentation link and text

Update documentation link and text:

Before the link was not working, now it points to where the enterprise and open documentation will appear

Reviewer: @philipnrmn

retest this please

Can we have the link round security documentation instead of just documentation please?

This is by request from @joel-hamill, but I am happy to change it

@joel-hamill's comment on this was that it is how we link to documentation elsewhere in the UI, so I think we should keep it and maybe later discus if we want to change this globally.


pipenv 2020.4.1b1: Invalid fragment string

I installed pipenv 2020.4.1b1 on my local machine by running:
pip install --upgrade --pre pipenv

Then I updated my dependencies on my local machine by running:
pipenv update

The Pipfile.lock got updated of course. Here is the relevant diff in Pipfile.lock:
         "robohash": {
             "git": "https://github.com/e1ven/Robohash.git",
-            "ref": "03ade66998c15735740ec4111b5da8d4383a7577"
+            "ref": "03ade66998c15735740ec4111b5da8d4383a7577",
+            "version": "==1.0"
         },

As you can see, this dependency is installed from GitHub, not from PyPI. Using the newer pipenv caused a new key-value to be added, which is "version": "==1.0".
I committed these changes and launched them to a server. The server has Pipenv 2018.5.18 installed. When the server tried to install the dependencies from this Pipfile.lock, I got this error:
remote:        WARNING: Invalid fragment string egg=robohash==1.0
remote:        ABORTING INSTALL... You will have to reinstall any packages that failed to install.
remote:        You may have to manually run pipenv lock when you are finished.

It looks like the new key-value pair version is incompatible with pipenv 2018.5.18, when it applies to packages installed from a Git repo. Is that correct? Is it meant to be that way? If it is, it would be useful to include this compatibility notice in the change log. If not, then maybe the version key-value shouldn't be included in packages that are installed from a Git repo.

Thanks for filing this and for testing out the prerelease, and sorry for the issue :| It definitely is not the intention to cause a backwards compatibility problem here so we will definitely need to get a fix committed for this ASAP

Of course. No need to apologise, I installed a pre-release version fully expecting that there might be bugs :)


Bookmark sorting UI follow-up

A follow-up for https://github.com/GoogleChrome/webstatus.dev/pull/952#pullrequestreview-2485099513. The changes include:

Disable sorting on the headers when it is already sorted based on bookmark queries
Indicate the query sorting from the name header, with an arrow icon and a description
Add override_num_param to override the num parameter. It helps accommodate the front-end sorting in bookmark queries, which should be <25

I tried this PR out and I saw a timing bug.
How to replicate:

Locally change apiUrl in frontend/src/static/index.html to "https://api.webstatus.dev" (as mentioned here)
Open your browser to http://localhost:5555/
Let the page load up completely
Click the ordered bookmark Top CSS Interop Issues.
I see the Unable to apply custom sorting to bookmark "Top CSS Interop issues". Defaulting to normal sorting. message come up quickly. But I see the right results eventually.

I suspect that we attempt custom sorting on the old results loaded in step 2. Custom sorting fails because that list of results does not have the list of results. But then he results from step 4 finally load in and show the right results.

Spent some time digging into it after chatting offline. I think the root of the issue is caused by this.taskTracker not resetting properly when reload a new query. It is supposed to happen in webstatus-overview-page.ts.  I narrowed down the problem to this line,  this.loadingTask = new Task(. It does some funky stuff and reassigns an old value to this.taskTracker  before this._fetchFeatures(apiClient, routerLocation); callback is complete. You can verify it by setting a breakpoint at the line 64 and 65 and examine the value of this.loadingTask . I will look more into it tomorrow.

@KyleJu @jrobbins I feel like the disabling of the sort here is similar to https://github.com/GoogleChrome/webstatus.dev/pull/995/files
We should only have one way to disable the sort. This approach allows us to provide a specific message. In 995, we could just toggle it by setting the specific CELL_DEF to unsortable. I wonder if there's a way to join the two.

Will address the comments after #995 is merged

@KyleJu @jrobbins I feel like the disabling of the sort here is similar to https://github.com/GoogleChrome/webstatus.dev/pull/995/files
We should only have one way to disable the sort. This approach allows us to provide a specific message. In 995, we could just toggle it by setting the specific CELL_DEF to unsortable. I wonder if there's a way to join the two.

I couldn't find a great way to join two, but any suggestions are welcome!

You could modify renderHeaderCell like this:
export function renderHeaderCell(
  routerLocation: {search: string},
  column: ColumnKey,
  sortSpec: string,
+  overrideColumnOpitons?: Map<
+    ColumnKey,
+    {header?: string; unsortable?: boolean}
+  >,
): TemplateResult {

Then back in render in webstatus-overview-table, you could do something like this:
+    let options:
+      | Map<ColumnKey, {header?: string; unsortable?: boolean}>
+      | undefined = undefined;

    if (this.bookmark !== undefined && this.bookmark?.is_ordered) {
      const bookmarkName = this.bookmark.name;
+      options = new Map<ColumnKey, {header?: string; unsortable?: boolean}>();
+      Object.values(ColumnKey).forEach(column => {
+        const value: {header?: string; unsortable?: boolean} = {
+          unsortable: true,
+        };
+        if (column == ColumnKey.Name) value.header = bookmarkName;
+        options?.set(column, value);
+      });
    }
...
...
...
    return html`

        ${renderColgroups(columns)}

          ${renderGroupsRow(columns)}

            ${columns.map(
              col =>
-                html`${renderHeaderCell(this.location, col, sortSpec)}`,
+                html`${renderHeaderCell(this.location, col, sortSpec, options)}`,
            )}

          ${this.renderTableBody(columns)}

    `;


Adding my Memory Cards Project

Adding my Memory Cards project to my Beginner Projects Folder

Thanks for the PR @joypatel9 .


Add Quad9 support

Quad9 now has DNS over HTTPS support.

@loganaden: hey there! this all looks reasonable; please run gofmt against the changed file, looks like some formatting is out of whack.
once that's set, i'll merge. thanks for the contribution!

Thanks!


Kansas - UP Migration - Validate Test Data

User Story:
As a developer, I want the Kansas to validate test messages in staging, so that they can receive data in the format they expect.
Description/Use Case
Kansas is already receiving data from the covid pipeline they will be onboarded to the UP where they will be receiving data from SimpleReport including Covid, Flu and RSV. We need to make sure the message we generate from the UP passes the STLTs validation. We can use SimpleReport to submit test messages to the STLT.
Risks/Impacts/Considerations
Dev Notes:

[ ] Upload the newly created receiver settings to Staging
[ ] Copy the receiver's secret key with the new receiver name in Azure's staging environment
[ ] Verify we can connect to the newly created receiver
[ ] Send a test message through Simple Report and make sure it gets routed to the STLT
[ ] Send test messages according to the STLT needs

Acceptance Criteria

[ ] Created and sent data using Simple Report
[ ] Confirmed with STLT that data passes validation

Done


BDD Algorithm: bdd_satcount function given a variable cube or BDD

Currently, we only provide a bdd_satcount function, where the variables counted are in an interval [min_label, max_label] specified in one way or the other. From other libraries, such as Sylvan and BuDDy one may also want to provide a bdd_satcount function given a variable cube encoded in another BDD.

One should probably start with making the bdd_satcount function with a var_count work, even if the number of levels spanned are larger than var_count. To this end, the priority queue probably should be extended with the total number of levels visited and the label of the parent.


How do I Initialise MutableObservableDictionary?

I'm new to bond, and end up creating  myDictionary like below.

You need to pass the initial value, can be empty:
MutableObservableDictionary<String, String>([:])

That being said, we should probably add an empty initializer.


ImportError: No module named packaging.version

I'm getting an ImportError while installing the newest version of Shapely (1.5.10).
Running pip install packaging will resolve the issue.

I'm hitting this too on Travis build for a project. Worked fine a few days ago with 1.5.9.
An install log is here: https://travis-ci.org/njwilson23/karta/builds/76849651

1.5.11 coming up in a couple minutes...

Sorry for the nasty surprise in 1.5.10. I've uploaded 1.5.11.

Thanks - it's all working again for me!

I face same error and resolved it with following.
ImportError: No module named packaging.version


Local push notifications for problems with the system settings etc.

Current Implementation
In the current version of the app for Android (1.3.1) the user didn't get any push notifications for necessary system settings, if e.g. the risk calculation isn't active because in some cases bluetooth was autom. deactivated. If the user deactivates bluetooth directly he gets a notification (no push). The user recognize this only by opening the app and is really upset about this.
Suggested Enhancement
It would makes sense, that the user autom. gets a local push notification, when something is not working regarding the system settings.
Expected Benefits
The user gets local push notifications to avoid that the app is running correctly and the user would be informed via push notification, if something is wrong. So he doesn't need to open the app to get such information.

@jpbrandt are you not getting push notifications from Android when something is wrong (e.g. location disabled)?

This is now mitigated with the dead man notification system.
As @daimpi said, there should be system notifications from Google/Apple when Bluetooth or Location settings are deactivated. I wonder if this is still an issue in CWA 1.10?

Corona-Warn-App Open Source Team

This is now mitigated with the dead man notification system.
As @daimpi said, there should be system notifications from Google/Apple when Bluetooth or Location settings are deactivated. I wonder if this is still an issue in CWA 1.10?

Corona-Warn-App Open Source Team

Under iOS yes, CWA will stop working silently if the device runs out of space: https://github.com/corona-warn-app/cwa-app-ios/issues/1521

Under iOS yes, CWA will stop working silently if the device runs out of space: https://github.com/corona-warn-app/cwa-app-ios/issues/1521

This is now mitigated with the dead man notification system.
As @daimpi said, there should be system notifications from Google/Apple when Bluetooth or Location settings are deactivated. I wonder if this is still an issue in CWA 1.10?

In Android there is an immediate notification if Bluetooth is disabled, which the user is able to dismiss. The app displays the status "BLUETOOTH TURNED OFF" and by tapping on that, the detailed Exposure Logging status "Restricted" is displayed.
AFAIK the dead man notification will only trigger if no exposure checks were done for 36 hours. I don't believe it gets activated due to disabled Bluetooth. I will try it out and see what happens in Android 1.10.1.

This is now mitigated with the dead man notification system.
As @daimpi said, there should be system notifications from Google/Apple when Bluetooth or Location settings are deactivated. I wonder if this is still an issue in CWA 1.10?

In Android there is an immediate notification if Bluetooth is disabled, which the user is able to dismiss. The app displays the status "BLUETOOTH TURNED OFF" and by tapping on that, the detailed Exposure Logging status "Restricted" is displayed.
AFAIK the dead man notification will only trigger if no exposure checks were done for 36 hours. I don't believe it gets activated due to disabled Bluetooth. I will try it out and see what happens in Android 1.10.1.

AFAIK the dead man notification will only trigger if no exposure checks were done for 36 hours. I don't believe it gets activated due to disabled Bluetooth. I will try it out and see what happens in Android 1.10.1.

Under iOS there are no exposure checks when Bluetooth is disabled so deactivated Bluetooth for longer than 36h will lead to a Dead Man Notification.

AFAIK the dead man notification will only trigger if no exposure checks were done for 36 hours. I don't believe it gets activated due to disabled Bluetooth. I will try it out and see what happens in Android 1.10.1.

Under iOS there are no exposure checks when Bluetooth is disabled so deactivated Bluetooth for longer than 36h will lead to a Dead Man Notification.

@MikeMcC399, @Ein-Tim
On deactivating BT I get on

Android: immediately an OS push notification, but even after several days CWA says that 'Risiko-Ermittlung' is active permanently. We have a ticket for the latter issue here on GitHub and JIRA.
iOS: no OS push notification, but CWA quite immediately indicates that    'Risiko-Ermittlung'  is stopped.

Altogether it is at least an inconsistent behavior between both systems and should be aligned. It is beeing discussed internally.

@MikeMcC399, @Ein-Tim
On deactivating BT I get on

Android: immediately an OS push notification, but even after several days CWA says that 'Risiko-Ermittlung' is active permanently. We have a ticket for the latter issue here on GitHub and JIRA.
iOS: no OS push notification, but CWA quite immediately indicates that    'Risiko-Ermittlung'  is stopped.

Altogether it is at least an inconsistent behavior between both systems and should be aligned. It is beeing discussed internally.

Okay thanks @dsarkar.
It is inconsistent since it is possible to do exposure checks even without Bluetooth under Android, but under iOS this is not possible.
Will you still go on and close this Issue?

Okay thanks @dsarkar.
It is inconsistent since it is possible to do exposure checks even without Bluetooth under Android, but under iOS this is not possible.
Will you still go on and close this Issue?

Actually, the recent EN-Google issue proved that notifications are triggered when necessary. This resulted in notification spam, which is being addressed by developers.

Actually, the recent EN-Google issue proved that notifications are triggered when necessary. This resulted in notification spam, which is being addressed by developers.

@jpbrandt any objections to closing this issue?

@jpbrandt any objections to closing this issue?

@dsarkar
The original wishlist item was about Android, and this posting is also about Android.
Bluetooth disabled
As promised, I ran a test on an Android device with exposure logging activated and Bluetooth disabled for more than 36 hours. The device was connected to a charger all the time. The configuration was Android 8.0.0, Exposure Notification System (ENS)<PHONE_NUMBER>0, CWA 1.10.1.
Immediately after disabling Bluetooth the following notification appears, which is triggered by Google ENS:

There is no repeat of this warning and the user can dismiss it (see CLEAR for instance in the screen shot).
During the time that Bluetooth was disabled CWA continued to execute exposure checks every 4 to 5 hours.
No Internet
It is not necessarily an error condition if there is temporarily no internet available, however if this continues for a longer time, then the exposure checks are based on old Diagnosis Key data. To mitigate this situation the deadman notification is triggered by CWA which appears if no exposure checks have been carried out for more than 36 hours. Here is a screen shot from a previous test:

Note that a fix is in the pipeline (see v1.11.0-RC1) to display the full text of the notification correctly.
Summary
The two conditions related to system settings:

Bluetooth disabled
No internet for more than 36 hours
are notified to the user without the CWA having to be opened.

I think that this issue could be closed unless @jpbrandt tell us there are other system settings he thinks should be considered.
Battery optimisation issues should also be covered because ENS wakes up COVID-19 apps. I will also check this out, but that will take another 2 days of waiting for deadman notification.

@dsarkar
The original wishlist item was about Android, and this posting is also about Android.
Bluetooth disabled
As promised, I ran a test on an Android device with exposure logging activated and Bluetooth disabled for more than 36 hours. The device was connected to a charger all the time. The configuration was Android 8.0.0, Exposure Notification System (ENS)<PHONE_NUMBER>0, CWA 1.10.1.
Immediately after disabling Bluetooth the following notification appears, which is triggered by Google ENS:

There is no repeat of this warning and the user can dismiss it (see CLEAR for instance in the screen shot).
During the time that Bluetooth was disabled CWA continued to execute exposure checks every 4 to 5 hours.
No Internet
It is not necessarily an error condition if there is temporarily no internet available, however if this continues for a longer time, then the exposure checks are based on old Diagnosis Key data. To mitigate this situation the deadman notification is triggered by CWA which appears if no exposure checks have been carried out for more than 36 hours. Here is a screen shot from a previous test:

Note that a fix is in the pipeline (see v1.11.0-RC1) to display the full text of the notification correctly.
Summary
The two conditions related to system settings:

Bluetooth disabled
No internet for more than 36 hours
are notified to the user without the CWA having to be opened.

I think that this issue could be closed unless @jpbrandt tell us there are other system settings he thinks should be considered.
Battery optimisation issues should also be covered because ENS wakes up COVID-19 apps. I will also check this out, but that will take another 2 days of waiting for deadman notification.

@Ein-Tim

The question what happens if the device runs out of space is still there, but this can be answered in #189.

Available space is another topic which I didn't consider because it is not a setting which can be switched on and off by the user like Bluetooth, Wi-Fi, Mobile data or battery optimisation. Behaviour when space is lacking is very operating system specific, like the other user controlled options, so it probably makes more sense to cover them in the respective app issue repos.
I will come back to this topic in a couple of days. There were several issues in the Android repo in the early days about the app incorrectly reporting lack of space, and I assume that it has become more robust in the meantime, however I have never checked this out.

@Ein-Tim

The question what happens if the device runs out of space is still there, but this can be answered in #189.

Available space is another topic which I didn't consider because it is not a setting which can be switched on and off by the user like Bluetooth, Wi-Fi, Mobile data or battery optimisation. Behaviour when space is lacking is very operating system specific, like the other user controlled options, so it probably makes more sense to cover them in the respective app issue repos.
I will come back to this topic in a couple of days. There were several issues in the Android repo in the early days about the app incorrectly reporting lack of space, and I assume that it has become more robust in the meantime, however I have never checked this out.

There were several issues in the Android repo in the early days about the app incorrectly reporting lack of space, and I assume that it has become more robust in the meantime, however I have never checked this out.

I also remember some cases where the ENF pushed a notification to the user which said that there was not enough space for ENF to run, but this were bugs. So I also assume that this got better

There were several issues in the Android repo in the early days about the app incorrectly reporting lack of space, and I assume that it has become more robust in the meantime, however I have never checked this out.

I also remember some cases where the ENF pushed a notification to the user which said that there was not enough space for ENF to run, but this were bugs. So I also assume that this got better

I filled up available space on an Android 11 emulator and got the following notification:

I also tried to add new entries to the Contact Journal at this time and CWA gave me an error CAUSE: 9002 Something went wrong. database or disk is full (code 13 SQLITE_FULL)

This is by no means an exhaustive test, but it does show that Android may give notification (without opening the app) and if the disk is full when a function is carried out it can give an appropriate error message. What happens with a full device probably depends on the Android version and the device vendor.

I filled up available space on an Android 11 emulator and got the following notification:

I also tried to add new entries to the Contact Journal at this time and CWA gave me an error CAUSE: 9002 Something went wrong. database or disk is full (code 13 SQLITE_FULL)

This is by no means an exhaustive test, but it does show that Android may give notification (without opening the app) and if the disk is full when a function is carried out it can give an appropriate error message. What happens with a full device probably depends on the Android version and the device vendor.

Thank you @MikeMcC399!
@heinezen maybe this could be checked for iOS too?
Thank you!

Thank you @MikeMcC399!
@heinezen maybe this could be checked for iOS too?
Thank you!

I've creates a more general ticket for these issues. Feel free to add more suggestions were push notifications are useful.

Corona-Warn-App Open Source Team

I've creates a more general ticket for these issues. Feel free to add more suggestions were push notifications are useful.

Corona-Warn-App Open Source Team

On a Samsung Galaxy A5 (2017) SM-A520F, Android 8.0.0, Exposure Notification System (ENS)<PHONE_NUMBER>0, CWA 1.10.1. I activated the MID Power saving mode with Background network usage disabled. I then left the device unattached to a charger for 36 hours without touching it, as a test.
When I activated the screen it showed the Corona-Warn deadman notification reminder to open the app, which I did. A successful exposure check was immediately carried out. The previous successful exposure check was 36 hours earlier.
So with MID Power saving I can say that the user would be warned and can take successful corrective action.
It is not necessary to open the app to get the notification. It is only necessary to open the app to get it to carry out an up-to-date exposure check.
(There is a higher level of Power saving mode called MAX on this device. I didn't test this because the Corona-Warn-App cannot be opened at all with this extreme power-saving mode. Only a small number of specially designated apps can be opened when MAX Power saving mode is activated, and CWA is not one of these apps.)

On a Samsung Galaxy A5 (2017) SM-A520F, Android 8.0.0, Exposure Notification System (ENS)<PHONE_NUMBER>0, CWA 1.10.1. I activated the MID Power saving mode with Background network usage disabled. I then left the device unattached to a charger for 36 hours without touching it, as a test.
When I activated the screen it showed the Corona-Warn deadman notification reminder to open the app, which I did. A successful exposure check was immediately carried out. The previous successful exposure check was 36 hours earlier.
So with MID Power saving I can say that the user would be warned and can take successful corrective action.
It is not necessary to open the app to get the notification. It is only necessary to open the app to get it to carry out an up-to-date exposure check.
(There is a higher level of Power saving mode called MAX on this device. I didn't test this because the Corona-Warn-App cannot be opened at all with this extreme power-saving mode. Only a small number of specially designated apps can be opened when MAX Power saving mode is activated, and CWA is not one of these apps.)


[feature] Json link shortener

This adds a link shortener functionality to neuroglancer by implementing two things.  First, if the query_parameter json_url is passed to the neuroglancer page, it will go attempt to get a json from the specified URL, and use that to set the state, and remove that query parameter from the url.
Second, a button is added to the upper right that when pressed, posts the present viewer state to a url specified by a configurable jsonStateServer parameter in the json state.  The resulting response from that url should contain a URL where the json can be later retrieved.  For now there is a dialog that prompts the user to fill in the name of such a service, of which https://api.myjson.com/ is a free and available prototype, but others could be implemented.

Confirmed!

One way this could be simplified is to have it work more like a normal URL shortener --- you would simply post the full URL to the shortener, which would generate a short URL that would be returned and automatically copied to the clipboard.  The short URL would then simply redirect, like a normal URL shortener, back to neuroglancer.  This would eliminate the need for any logic within neuroglancer itself for unshortening.  The main downside is that it would necessarily redirect to a specific neuroglancer client, rather than being usable with any neuroglancer client.  You would have to manually change the host afterwards.  Is that likely to be an issue for your use case?
This same logic would actually work perfectly well as a URL shortener browser extension that wouldn't depend on neuroglancer at all.  However, I'm not sure if there are any that can handle extremely long URLs, and I suppose many people may have no need for a URL shortener outside of their use of neuroglancer.
Another way this could be simplified is to specify the URL shortener service as a build-time parameter, rather than allowing it to be specified as part of the state.  That would simplify the code quite a bit, and might also make it simpler to integrate with a URL shortener that requires user authentication for creating new links.  I'm also a bit concerned that allowing it to be specified as part of the state may be confusing, since it would be hard to know which URL shortener service will be used.
I'm also not sure how feasible it is to rely on an anonymous URL shortener service for this purpose.  The length of the URLs can be quite long, such that the total amount of data that the service has to store could be substantial.  Additionally, as a user, you would like to have confidence that the links will remain valid essentially forever.

I think I agree with you regarding not relying on an external URL shortener, or even URLs at all.
One thing I've been looking into is using the Google Drive API as the storage mechanism.  That has the advantage of being able to make use of the free 15GB of storage provided to every Google account, while still having the storage "owned" by a particular account and therefore avoids the problem of storing an arbitrarily large amount of neuroglancer state data for anonymous users forever.  It also provides some nice functionality like thumbnail images (which can contain screenshots captured at the same time as the view state).  I've been experimenting with a prototype of this, that mostly works, but there are some issues regarding sharing, in that there doesn't seem to be a way to provide a way to share the drive file with another user and provide them with a URL that directly opens neuroglancer, especially if they haven't already "installed" neuroglancer as a Google Drive app.

@jbms hey, any update on this, we are writing a manuscript on our cloud stuff now, and currently mentioning this functionality as existing in our fork (which is semi-up-to-date).  So, if you are still planning on merging it in, and waiting on something from us, maybe now is a good time to finalize this?

Part of this (the easy part) is already merged in, in that you can just put a URL to the JSON state directly in the Neuroglancer URL, for example:  https://hemibrain-dot-neuroglancer-demo.appspot.com/#!gs://neuroglancer-janelia-flyem-hemibrain/v1.0/neuroglancer_demo_states/base.json
I didn't continue work on the Google Drive integration because of the limitations I ran into.
As far as this pull request, I do agree that the basic approach, a server for storing the JSON state with specific integration into Neuroglancer, rather than relying on a generic URL shortener, makes sense.
I'm still a bit concerned about relying on a JSON "POST" API where there is no authentication, presumably allows fairly large data sizes (e.g. tens of MB), and intends to retain the data indefinitely.  However, I can also imagine the chance of abuse may be low and there would likely be no problems.

I would be pretty surprised if people abused it, but maybe I am naive.  @fcollman @falkben what do you guys think?

I'll just preface by just saying that since I'm no longer working on this I probably shouldn't be a point person for this anymore and my opinion shouldn't carry any weight.
I wasn't aware that neuroglancer had the ability to load from a url now, so that's very nice. I do think that having an interface for users to store state is still valuable. Is that present or something that could be added outside of this PR?
I do share a concern about security here. I cannot vouch for the free service we defaulted to https://api.myjson.com/. Neurodata has their own json store service I set up which is open to outside use. So perhaps could switch to that for a default. But I'm not sure that solves the problem.
There's a minor issue of people abusing it but I think a bigger issue is possibly just trusting any url shortener since this does get executed by the browser and we didn't add any protections around that. We also store things no encryption which should be something to tell users about as well.
Perhaps removing a default and letting the user pick would be adequate? Or a warning?


Health: add support for token

When using Consul configured with strict acl access, all health paths require token

Suspect your test failure in the last build is due to a timing issue with starting / stopping consul on Travis - I managed to work around it in PR #93 (all tests were passing locally) by bumping the sleeps while the test framework waits for consul to start up and gain leadership.

Tests are passing at https://travis-ci.org/cablehead/python-consul/builds/111186900
@morpheu can you remove the fix in conftest and squash d10ce4eea2b32170b82f11959fa5ff0180b055e3 and cee54bf7a2f0ebb95fb104ebcc809d2051b19569? That will be handled with #100

Done!

Merged with f5fc28a..6219f6f
Thanks @morpheu


(FIX FOR ERROR TypeError: this.x.toFixed) Saving and Reloading without edit Doubles the length of the updates array

A problem occurs when the drawing gets saved to Sessionstorage, or in our case to a string variable. After an initial save, when the drawing is loaded it can't be saved again. update.stringify() throws an TypeError "this.x.toFixed()". I noticed that the length of the updates arrays doubles. What causes this? Did you forget to reset the array after an initial update.stringify()? Or does this.canvasWhiteboardService.drawCanvas(updates) add the drawing twice which causes problems?
savetoDB() {
    const updates: Array<CanvasWhiteboardUpdate> = this.canvasWhiteboardComponent.getDrawingHistory();
    console.log(updates.length); // 415 first time, 830 second time without editing

    const stringifiedUpdatesArray: Array<string> = updates.map((update) =>
      update.stringify()
    );
    console.log(stringifiedUpdatesArray.length);
    const stringifiedStorageUpdates: string = JSON.stringify(
      stringifiedUpdatesArray
    );
    // Save the item in storage of choice
    this.formService.currentProject.drawingBase64 = stringifiedStorageUpdates;
  }

  loadFromDB() {
    console.log(this.formService.currentProject.drawingBase64);
    const canvasDrawingsJson: string = this.formService.currentProject
      .drawingBase64;

    if (canvasDrawingsJson != null && canvasDrawingsJson !== '') {
      console.log('null');
      const parsedStorageUpdates: Array<string> = JSON.parse(
        canvasDrawingsJson
      );

      const updates: Array<CanvasWhiteboardUpdate> = parsedStorageUpdates.map(
        (updateJSON) => CanvasWhiteboardUpdate.deserializeJson(updateJSON)
      );

      this.canvasWhiteboardService.drawCanvas(updates);
    }
  }

I fixed it by adding this to the load() method. This prevents the code from pushing the saved array to the original array twice.
      if (
        this.canvasWhiteboardComponent.getDrawingHistory().length !=
        updates.length
      ) {
        this.canvasWhiteboardService.drawCanvas(updates);
      }

I'll do a pull request later this day.


Typhoon Option Matcher is not documented

The documentation is great, thanks, Jasper! Maybe it's worth to add an additional section about the -withOption:yes:no: method?

OK @igrekde I will add this. Also #390 has been suggested.

@jasperblues Added the section about withOption:yes:no: method.

:+1:


Load should return objects from unit of work

Scenario:

session.Store(student.id = 1)
session.Load(1) returns null
(SaveChanges not called yet)

I expect that the second call returns the object stored by the first call from a cache. What do you think?

@tim-cools That probably needs to be part of a larger Identity Map feature. I've gone back and forth on whether or not we should do that underneath DocumentSession.
I can be convinced either way. I can think of a scenario or two within the system at work we're building Marten for that could use it.

I agree that it normally doesn't happen. But I'm creating an implementation of http://www.asp.net/identity backed-up by PG and I face this situation when I plug in the library for storage.
I also think you need an Identity map to detect dirty objects when doing a SaveChanges to the store if you want to support automatically updates like ravendb and the orm's does.

Done, but there's a separate issue for Select()


Changing ItemsView Layout.Orientation removes the item from ItemsRepeater

Describe the bug

<SelectorBar local:SelectorAttach.Orientation="Horizontal"/>
WinUI 3 SelectorBar Source Code:
<Style TargetType="SelectorBar">
    <Setter Property="Padding" Value="{ThemeResource SegmentedPadding}" />
    <Setter Property="Background" Value="{ThemeResource SegmentedBackground}" />
    <Setter Property="BorderBrush" Value="{ThemeResource SegmentedBorderBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
    <Setter Property="HorizontalAlignment" Value="Left" />
    <Setter Property="VerticalAlignment" Value="Top" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="TabNavigation" Value="Once" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="SelectorBar">
                <Grid
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    ColumnDefinitions="Auto"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    RowDefinitions="Auto">
                    <Grid.ChildrenTransitions>
                        <TransitionCollection>
                            <RepositionThemeTransition />
                        </TransitionCollection>
                    </Grid.ChildrenTransitions>

                    <ItemsView
                        x:Name="PART_ItemsView"
                        MaxWidth="{TemplateBinding MaxWidth}"
                        MaxHeight="{TemplateBinding MaxHeight}"
                        Padding="{TemplateBinding Padding}"
                        ItemsSource="{TemplateBinding Items}"
                        TabNavigation="{TemplateBinding TabNavigation}">
                        <ItemsView.Layout>
                            <StackLayout Orientation="Horizontal" />
                        </ItemsView.Layout>
                    </ItemsView>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Steps to reproduce the bug
1.Create a ItemsView with a StackLayout
2.Try to Change StackLayout Orientation in Runtime
3.Select Different Items
4.Change Orientation again
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.0: 1.5.240227000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response

@ghost1372 can you please share your repro project?

Hi @ranjeshj
Please Download sample
1.Run App
2.Select item
3.Change Orientation in runtime

4.Select another item
5.Change Orientation Again
6.you can see crash
App5.zip

Fixed in internal repo: Pull Request 10572937: Changing ItemsView Layout.Orientation removes the item from ItemsRepeater Fix

Description of fix:
Repro has created a custom attached property to SelectorBar, where it toggles ItemsView's Layout.Orientation:
ItemsView itemsView = FindChild<ItemsView>(selectorBar, "PART_ItemsView");
itemsView.Layout = new StackLayout { Orientation = Orientation.Horizontal };

This implementation manually sets a new StackLayout with different orientations compared to simply toggling ItemsView.Layout.Orientation = Horizontal. As such, ItemsRepeater treats it as changing its layout completely, and goes through the whole virtualization process in recycling and re-realizing the elements.
There are multiple layers to this issue:

ItemsRepeater::OnLayoutChanged goes through and clears each element in the collection. If pinned, it goes to m_pinnedPool when cleared.
In this situation, the pinned element is added to m_pinnedPool twice. Once at line 694, and again when manually cleared at 706:

When ViewManager goes through m_pinnedPool after layout changed at ViewManager::GetElementFromPinnedElements, the first is cleared properly, but the extra element in m_pinnedPool remains and is never cleared.
If one swaps the layout more times, the size in m_pinnedPool actually slowly creeps up.
When user goes to select another element, it falsely starts checking in pinnedPool at ViewManager::PrunePinnedElements() since there is an element that shouldn't be there.
The previously selected element is no longer pinned, thus the element is mistakenly removed from the Collection.

Fix: adds a check for uniqueness when adding to m_pinnedPool so there will be no duplicates. After layoutChanged, size of m_pinnedPool is reset to 0 as designed.

Thank you
Can we expect it in v1.5.x?
Or we should wait for 1.6?


Automatically hide all popovers on scroll.

Automated message from Dropbox CLA bot
@tommyip, it looks like you've already signed the Dropbox CLA. Thanks!

Merged, thanks @tommyip!


Update WDLs for upcoming pVACtools 4.0.0 release

This all seems to be working as expected in my test with real datasets.