Using require('../../package') breaks in Polendina

Prerequisites

[x] Checked that your issue hasn't already been filed by cross-referencing issues with the faq label
[x] Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
[x] 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
[x] Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend that you not install Mocha globally.

Description

Steps to Reproduce

npm init -y
npm i -D mocha @types/mocha polendina ts-loader typescript
mkdir src && echo 'import "mocha";' > src/test.spec.ts
npx tsc --init
echo "module.exports={target:'web',resolve:{modules:['./node_modules'],extensions:['.tsx','.ts','.js']}}" > webpack.test.js
npx polendina --cleanup --timeout 60 src/**/*.spec.ts --webpack-config webpack.test.js

Expected behavior: test run results.
Actual behavior: "Module not found" error

(output from polendina doesn't paste well, this is lightly processed...)
./node_modules/mocha/lib/browser/growl.js
Module not found: Error: Can't resolve '../../package' in '/Users/joshua/code/mocha-growl-require-package/node_modules/mocha/lib/browser'
resolve '../../package' in '/Users/joshua/code/mocha-growl-require-package/node_modules/mocha/lib/browser'
  using description file: /Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.json (relative path: ./lib/browser)
    using description file: /Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.json (relative path: ./package)
      no extension
        /Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package doesn't exist
      .tsx
        /Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.tsx doesn't exist
      .ts
        /Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.ts doesn't exist
      .js
        /Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.js doesn't exist
      as directory
        /Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package doesn't exist
[/Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package]
[/Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.tsx]
[/Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.ts]
[/Users/joshua/code/mocha-growl-require-package/node_modules/mocha/package.js]
 @ ./node_modules/mocha/lib/browser/growl.js 127:13-37
 @ ./node_modules/mocha/lib/mocha.js
 @ ./node_modules/mocha/browser-entry.js
 @ ./node_modules/ts-loader!./src/test.spec.ts
 @ ./src/test.spec.ts
 @ multi ./src/test.spec.ts ./build/mocha-run.js /Users/joshua/code/mocha-growl-require-package/src/test.spec.ts

Reproduces how often: 100%
Versions

The output of mocha --version and node node_modules/.bin/mocha --version:

bash: mocha: command not found
7.1.2

The output of node --version:

v13.8.0

Your operating system

name and version: macOS Catalina 10.15.4 (19E287)
architecture (32 or 64-bit): 64-bit

Your shell (e.g., bash, zsh, PowerShell, cmd): bash
Your browser and version (if running browser tests): n/a
Any third-party Mocha-related modules (and their versions): n/a
Any code transpiler (e.g., TypeScript, CoffeeScript, Babel) being used (and its version): TypeScript v3.8.3 (with ts-loader v7.0.3)

Additional Information

I'm able to work around the problem temporarily with this diff to ./node_modules/mocha/lib/browser/growl.js:
-  var logo = require('../../package').notifyLogo;
+  var logo = require('../../package.json').notifyLogo;

Why are you bundling mocha when we've already made a browser bundle available?
It looks like Polendina can let you specify the test runner with --runner, where you can specify mocha. And you don't even have to because it's default

I didn't really know what you mean by "bundling mocha" in this context, but there wasn't a lot of information in my post from which you could conclude I was bundling mocha. I looked for something I had mentioned that I could remove and, when I removed import 'mocha'; from test.spec.ts everything worked. In fact, it worked better than before. I had no idea that mocha did not need to be imported. Thank you!


Bump frontend dependencies to latest versions

Seems to be working fine 🤷🏻

Seems to be working fine 🤷🏻
Seems to be some issues when building
https://github.com/sivertschou/dundring/actions/runs/6735368093/job/18308378738?pr=270

Solid! Since we don't have a robust testing rig, I'll do some manual testing before approving 🙌


Forgot to pass argument to function

error is subscriptions = Sub.none
solution is subscriptions model = Sub.none

It's as though Elm is starting at the top (with main), rather than at the bottom and seeing that subscriptions is just missing an argument.

Another example where the error message is much more complicated, but the problem the same.
-- TYPE MISMATCH ----------------------------------------------------- share.elm

The argument to function `program` is causing a mismatch.

16|     App.program
17|>        { init = init
18|>        , view = view
19|>        , update = update
20|>        , subscriptions = subscriptions
21|>        }

Function `program` is expecting the argument to be:

    { ...
    , update :
          Main.Msg -> (Int -> Main.Model) -> ( Int -> Main.Model, Cmd Main.Msg )
    , view : (Int -> Main.Model) -> Html Main.Msg
    }

But it is:

    { ...
    , update :
          Main.Msg
          -> { accountNumber : String
          , donation : Float
          , donees : List IndexedDonee
          , minimumSend : Float
          , name : String
          , percentage : Float
          , sortCode : String
          , uid : Int
          }
          -> ( { accountNumber : String
          , donation : Float
          , donees : List IndexedDonee
          , minimumSend : Float
          , name : String
          , percentage : Float
          , sortCode : String
          , uid : Int
          }
          , Cmd a
          )
    , view :
          { d
              | donees :
                    List
                        { c
                            | id : Int
                            , model :
                                  { b
                                      | accountNumber : String
                                      , details : Bool
                                      , donations : number
                                      , minimumSend : number
                                      , name : String
                                      , sortCode : String
                                  }
                        }
          }
          -> Html Main.Msg
    }

Hint: Does your program have flags? Maybe you want `programWithFlags` instead.

Detected errors in 1 module.

There was an argument missing.

I think it makes sense to centralize anything like this in #137

Nevermind, this is a different thing.

I made it so unification will try to pin down more fields, thereby making the error more specific. Here's the version I have now:

I think it's possible to "stack" hints, so if there are additional hints, they'd appear together. In this case, I think it could be something like "It looks like a problem with the subscriptions field. It looks like a function needs 1 more argument." Not sure how that interacts with all possible hints, but it seems doable.
Would stacking make this better?

Yes, for sure! Stacking sounds great here.
Also, this looks super awesome! 😻

The question is if it looks great in all the other possible situations ;)
I'll try to do something with stacking hints then. Should be fairly simple, as long as the hints combine to form reasonable sentences.

To be fair to type annotations, I raised this issue before I learned that type annotations tend to help narrow things down in this situation.

Alright, here's a version with stacked hints:

Here are some other examples of nested and stacked hints.
Nested Mismatch
point1 = { x = 3 // 1, y = 4 }
point2 = { x = "bird", y = 4 }

foo = point1 == point2

Mismatch with Hint
point1 = { x = 3 // 1, y = 4 }
point2 = { x = 3.0, y = 4 }

foo = point1 == point2

Nested Mismatch with Hint
point1 = { x = 3 // 1, y = 4 }
point2 = { x = 3.0, y = 4 }

foo = { point = point1 } == { point = point2 }

This is so awesome!!! 😻
This definitely would have helped me through some mismatches related to large Models. (I assume it still shows the diff like this, even if the problematic fields are each nested 3+ levels deep?)
For the binary operations hint, would it be feasible to include the operator as context? e.g. "With binary operations like `==` I always figure out the left side first." (I think beginners may not realize what "binary operation" refers to by itself.)
Also seems like https://github.com/elm-lang/error-message-catalog/issues/63 is related to this work, although maybe not.

I'd open a new issue about saying == explicitly in that hint. I think that's a good idea, but there's gotta be some localization that can make it kind of tricky.
The missing field thing is unrelated technically, though it is related in that it has to do with records.


Demo site not working

The demo site in documentation doesn’t seem to be working.

Encountered the same issue, but it looks like it has already been reported in https://github.com/twilio/stashboard/issues/81.


Servicemonitor.exe spews a bunch of output in EntryPoint

Latest version of `microsoft/iis' image produces following output to container logs. This was not the case on previous versions
pplied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
.
.
.
.
.
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

I can confirm this. Furthermore, it causes my .Net-App to fail compilation:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\test1\f3e1bcb4\e9160c86\App_global.asax.wcbcafmd.0.vb': System Error &Hc0000005& (Visual Basic internal compiler error)
Source Error: [No relevant source lines]
Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\test1\f3e1bcb4\e9160c86\App_global.asax.wcbcafmd.0.vb :    Line: 0
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1637.0

This does not occur when i use a different ENTRYPOINT in my dockerfile (which is build with FROM microsoft/iis). Currently trying to work around this issue by using SPINNER insead of servicemonitor.

@fkoellner The issue you ran into has been fixed in the July updates to the iis image.

@shirhatti Thanks for adressing this issue. But instead of using the official microsoft/iis images, i am now using my own custom made. The main reason for this decision is the lack of announcements and documentation regarding changes you guys implement. Since i´m using Docker in a productive environment, i cant afford to stumble across errors resulting from new, unannounced features.

@fkoellner What do you use as entry point in IIS image? I agree ServiceMonitor does not produce any value apart from monitoring state of w3wp.exe. HEALTHCHECK already performs this roles and provided better capabilities obviously.

@artisticcheese As I said, I no longer use the official microsoft/iis-image. Instead, I build an Image FROM microsoft/windowsservercore and use powershell to install IIS and some required subfeatures. Furthermore, i ADD Spinner.exe to the Image and use this:
`SHELL ["cmd", "/S", "/C"]
ENTRYPOINT spinner.exe service w3svc`

Well you still can use official IIS image and just replace ENTRYPOINT if that was the issue. What is "spinner.exe"? What does it to?

This is Spinner. And yes, since my issue resolved from the ENTRYPOINT in the IIS image (which supposedly has been fixed) I could still use it - but like I said, were using Docker in Production, and unannounced, undocumented changes which cause issue are just a No Go there. Furthermore, I no longer see any gain or advantage in using the official image over an image where I´m in full control. In our case, there is no need to pass environment variables to the IIS, so I don´t have any need for the advanced ServiceMonitor.

Wow, spinner is like ServiceMonitor on steroids. Have both capabilities for HTTP level monitoring as well as tail log (what I asked in other thread here for ServiceMonitor to accomplish.

I just gone and ahead and did the same thing as @fkoellner. Seems that all is being done for IIS image is installing Web-Server and adding this useless entrypoint.
https://artisticcheese.wordpress.com/2017/07/20/replacing-servicemonitor-exe-with-iis-error-log-events-in-windows-iis-container/

I was able to replace ServiceMonitor.exe w3svc, which was failing with
Service 'w3svc' has been stopped

APPCMD failed with error code 13

Failed to update IIS configuration

with what Elton Stoneman's script:
https://blog.sixeyed.com/windows-weekly-dockerfile-13-iis-logging/
My Dockerfile now (stripped of my app-specific commands):
```# escape=`
FROM microsoft/iis:windowsservercore
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ADD . /app
WORKDIR ./app
RUN powershell -Command     Set-WebConfigurationProperty -p 'MACHINE/WEBROOT/APPHOST' -fi 'system.applicationHost/log' -n 'centralLogFileMode' -v 'CentralW3C';
Set-WebConfigurationProperty -p 'MACHINE/WEBROOT/APPHOST' -fi 'system.applicationHost/log/centralW3CLogFile' -n 'truncateSize' -v<PHONE_NUMBER>;     Set-WebConfigurationProperty -p 'MACHINE/WEBROOT/APPHOST' -fi 'system.applicationHost/log/centralW3CLogFile' -n 'period' -v 'MaxSize';
Set-WebConfigurationProperty -p 'MACHINE/WEBROOT/APPHOST' -fi 'system.applicationHost/log/centralW3CLogFile' -n 'directory' -v 'c:\iislog'; `
Write-Host 'Done'
EXPOSE 80
ENTRYPOINT ["powershell"]
CMD Start-Service W3SVC;       Invoke-WebRequest http://localhost -UseBasicParsing | Out-Null;
netsh http flush logbuffer | Out-Null; `
Get-Content -path 'c:\iislog\W3SVC\u_extend1.log' -Tail 1 -Wait


Wrong link on README table of contents

The README table of contents has a link with the following text Awesome ClojureScript that points here, the way that it is written it comes after Resources so it should actually point here.

Fixed now. Thanks.


Detect iOS system settings for audio and haptics

KeyboardKit is not respecting the "Keyboard Clicks" settings under the Setting -> Sounds & Haptics
tapping sound continues to play even when the "Keyboard Clicks" is turned off by the user

Hi @ardavank
Reading and using these values would be a dream, but I haven't found a way to do so.

@ardavank Have you found any new information regarding this?

@danielsaidi nothing yet, I'll let you know if I find a solution


JsonDataException for null value of @Nullable AutoValue field

Hi,
After upgrading from 0.4.2 to 0.4.3 I'm getting
com.squareup.moshi.JsonDataException: Expected BEGIN_OBJECT but was NULL at path...
for null  value of @Nullable field in @AutoValue class.
I checked generated adapters for both versions and relevant code looks OK... in toJson() method there are checks for null so annotation seems fine...
Note: I am using @MoshiAdapterFactory
Am I missing something and this is desired behavior,

Make generated factory request null save adapters. (#71)

and if so how to get old behavior back? :) Thanks!

OK, my bad...
@MoshiAdapterFactory(nullSafe = true) solves it as properly stated in #71.
Maybe putting this in README would be a good idea.
Anyway, I leave this open if there're someone like me out there but be free to close it.
Cheers.


Shift Models to OSF

This PR aims to download models from OSF storage. Right now, the implemented script is able to download models from OSF storage via the procedure given below:-
STEPS TO DOWNLOAD MODEL FROM OSF STORAGE
pip install -e .- Run this command in CLI
TODO

[x] Fix the directory in which models are downloaded - Right now it's being downloaded in Parent directory, instead of AxonDeepSeg/models directory

[x] To figure out how to link GIT and OSF; naming conventions of the models, compatibility between these platforms for easy version control

Fixes #240

@mathieuboudreau, is there a way to enforce axondeepseg_models command when ADS is cloned? I meant like when ADS is downloaded, we could run this command in ADS script ( being first in priority, though I don't know how to do this), and by this way we could download models from OSF storage.

Yeah I was wondering the same thing. I don't know about running a command-line command, but I feel like there must be a way to run a python script/function during the setup stage (when pip install -e . is called), so somewhere in setup.py. I just took a quick look and this forum post suggests one method, but I haven't tried it myself : https://stackoverflow.com/questions/20288711/post-install-script-with-python-setuptools

Yeah I was wondering the same thing. I don't know about running a command-line command, but I feel like there must be a way to run a python script/function during the setup stage (when pip install -e . is called), so somewhere in setup.py. I just took a quick look and this forum post suggests one method, but I haven't tried it myself : https://stackoverflow.com/questions/20288711/post-install-script-with-python-setuptools

this solution from @mathieuboudreau's link seems very elegant

Yeah I was wondering the same thing. I don't know about running a command-line command, but I feel like there must be a way to run a python script/function during the setup stage (when pip install -e . is called), so somewhere in setup.py. I just took a quick look and this forum post suggests one method, but I haven't tried it myself : https://stackoverflow.com/questions/20288711/post-install-script-with-python-setuptools

this solution from @mathieuboudreau's link seems very elegant

I will try implementing the same.

I tried calling script, unfortunately it didn't work out. Till the time being I figure it out, I have a temporary fix to it which is given below:-
1. pip install  -e .
2. python3 setup.py bdist_wheel --universal

NOTE: The same thing can be deployed in Travis CI in place of pip install . and it will download models from OSF but right now the models are not being saved in the required directory which needs to be fixed.

I tried calling script, unfortunately it didn't work out. Till the time being I figure it out, I have a temporary fix to it which is given below:-
1. pip install  -e .
2. python3 setup.py bdist_wheel --universal

NOTE: The same thing can be deployed in Travis CI in place of pip install . and it will download models from OSF but right now the models are not being saved in the required directory which needs to be fixed.

@mathieuboudreau , Do let me know if this solution seems feasible or should be go with calling the script directly?

Why call the setup.py file twice (that'swhat pip install -e . does) instead of just omiting the second one and calling your commandline tool you created directly?
Regardless, I don't find this to be a good enough solution; I'll look into it more.

Done in 0ea5aeffc4 - now works with simply pip install -e .

might be relevant for debugging setup.py: https://stackoverflow.com/questions/55769962/how-to-debug-pip-install-package-name

Sorry Deleted this PR by mistake. @mathieuboudreau I have now replaced the download functionality using a function in Setup.py. However, it's not downloading the models in the required directory. Can you take a look at it (ideally the downloaded models should be present in the AxonDeepSeg/models directory instead of main directory) ? By the time being, I will focus on your issue related to training.

@mathieuboudreau, this branch is ready for review. However, the travis will fail as of now, to get it working pip install . needs to replaced with pip install -e .. The reason for the change is that if download model script from OSF storage which was earlier implemented in different file but if it is now implemented in setup.py, then it will require dependency ( like requests and other dependencies present in ads_utils.py script), but since the AxonDeepSeg package is not developed prior to importing AxonDeepSeg.ads_utils.download_model, pip install . does not work.

You could verify the downloading of models from OSF storage on your local machine by following the below steps:-

Create a virtual environment
Run command pip install -e .

Ok I will check it out.
We always instructed users to install using pip install -e . (see documentation here), so I don't quite understand why you were trying with pip install .. Nonetheless, if it works the old way, that should be great!

Ahh I understand now; for some reason, the Travis config file was running pip install . instead of pip install -e .. I just fixed that in this branch, lets see if Travis passes.

Coverage decreased (-1.1%) to 81.924% when pulling f6ba2086c623b1c0f2fff9b6fee792fc74ad828a on OSF_storage into aa49404b0bdc98fda82d799c945fe29f2783c418 on vs_data_aug_keras.

@vs74 @jcohenadad I rolledback the changes Vasudev recently made (removing the script and using only the setup.py file to download files), because to get the Travis tests to run correctly & user installs it would have gotten much messier than we'd want.

With that implementation, we had to do pip install -r requirements.txt to first download all the required packages, only to then run pip install -e . to install ADS, which would try and install the packages a second time.
There were a bunch of other hacks needed here and there too, so I just gave up and decided to roll it back.

@vs74 one additional note for you:

You had used a system() call inside a Python script to move the model folders after they were downloaded.

https://github.com/neuropoly/axondeepseg/blob/227ad80254d9bab9a509952b730cd6035215e7ba/setup.py#L35
I would recommend never doing this, because in almost all cases I can think of (besides running unit/integrity tests on CLI commands), there is an available Python tool to do the job you need inside that environment. For this case, I simply needed to called shutil.move().
Finally, to get the installation running correctly using the old way (with a CLI script that's run in the post-build), I needed to turn off Sentry bug tracking, since the way I had it setup the prompt for that would come up anytime ads_utils was imported, and download_data() was being imported from that module to download your models. For users this wouldn't have been an issue, but Travis was crashing (even if I tried yes | command). I can try to fix this in the future, but we weren't getting that many good reports from Sentry in the past anyways (nothing really usable; mostly bad argument/values errors).
Note that Travis is now running as expected, but failing. This is because your models appear to be out of date with the base of this branch (vs_data_aug_keras); you'll have to resolve these tests by doing the appropriate changes there.
I'm going to go ahead and merge this now into that branch.

That's odd, when I tried downloading models from new implementation, I had just to write pip install -e . and it internally downloads all the requirements in addition to the models.

Yeah, that worked for me on my computer, but didn't for Travis. Likely because I may already of had some of the required packages installed before calling that (e.g. requests).

thanks a lot for these investigations @mathieuboudreau and @vs74!


firefox webextensions port ?

any clues to whether you are planning something like this

@matijakovacevic clearly a duplicate of https://github.com/MiCottOn/DejaVue/issues/42.  Help the authors out...check closed issues first...

thanks @Stabzs and no worries @matijakovacevic - we are interested in doing a firefox version but it isn't in our short term roadmap as we want to lock down some of the chrome stuff first. That said, I could see it happening over the next few months, time-willing.

sorry, my bad :(
will adhere to your advice from @Stabzs from now on 👍 :)
@madebymtr great news! thx :)


Fixes to multi line goto and others

Couple of fixes to bugs I found while using.

Multi line function calls didn't work with the go to functionality.
If a property and a method is named the same the property would overwrite the method. Now both are suggested.
If your class or namespace declarations weren't all lowercase it wouldn't autocomplete.

I found that chained functions $this->index()->search() ..etc will go to as well, as long as the function has a @return.

Hello,
Thank you :+1:
Just one thing, the PHP written should be compatible with (at least) PHP 5.3, because, even if it's no longer supported, many people are using it in old projects (I learned it from a survey). So, could you please change Tools.php and use php methods instead of just [ ] ?
As a side note, If your class or namespace declarations weren't all lowercase it wouldn't autocomplete.. This issue was "volountary" because I decided to support only PHP code that follows PSR norm, and uppercase keywords is not PSR. Why this decision ? Because there is so many ways to write PHP code, to be able to parse every coding style is a hell, in term of performance and complexity. Anyway, thank you for that fix ;)
Regards,
Peekmo

Hi,
Done the changes you wanted. As the project will only parse PSR standards maybe we need to show a notification to why something didn't autocomplete/jump to. This way the user isn't getting confused about why the something didn't work and then debugging and raising an issue here.
CWDN

Perhaps notification could be nice, but it need to parse the file to search for coding style issues.
Or, just recommand to use php-cs-fixer package ? I don't know how to do it right. Anyway, it's not a problem if the package handle more than the PSR, but I don't try to handle all possible cases, if you need it, you can add it, as long as it doesn't add complexity.
Peekmo


Make generation of training data easier

Currently the generation of training data is realized by three different command-line methods, and it is unclear which resource for which model are going to be generated by each of these three commands.
Let's replace this by a single command line "generareTrainingData" that will generate the training data for all the models in one go. In parallel, improve the documentation to make clear which training resources are present in every generated files.

@kermitt2 this seems to be solved AFAIK


No licensing information

Just noticed by doing "stack list-dependencies --license" that your package does not supply licensing information. Could you add that?

https://github.com/singpolyma/wai-session-clientsession/blob/master/COPYING

Well. When running "stack list-dependencies --license --no-include-base" your packages do not include correctly the licensing information.
Example excerpt:
[...]
wai-extra MIT
wai-logger BSD3
wai-session OtherLicense
wai-session-clientsession OtherLicense
wai-session-postgresql BSD3
wai-websockets MIT
[...]

It's right there in the list: OtherLicense (namely ISC, but cabal doesn't know how to report ISC last I checked)

Well, "OtherLicense" is of little meaning to someone wishing to catalogue all the licenses of all their dependencies ;-)

Looks like ISC may have been added to newer versions of Cabal. I'll have to check that it works with all the versions I support, but it might be possible to list it in the metadata now (though if you are very worried about dependency licenses you should never trust the metadata and always check the real license at least).


Josh Miller History Project

Worked on these CVES:
CVE-2010-4035
CVE-2016-5142

Need the PR title to have the CVEs in them. Don't need your name - that's in the commit anyway.


Add support for image pull secrets

Context
To verify the signature of images which are part of a private registry, the corresponding image pull secret needs to exist in the same namespace (see: https://kyverno.io/docs/writing-policies/verify-images/#using-private-registries).
The necessary additional argument (--imagePullSecrets=name-of-the-secret) can already be configured through the extraArgs parameter.
Alternatives
Manually managing the image pull secrets would be the undesired alternative.

Consider using https://syn.tools/commodore/reference/commodore-libjsonnet.html#_generateresourcesresources_resourcefn to implement secret rendering in the component.

This is a feature we should potentially add to each and every component. @simu Any suggestions on how we could generalize this?

This is a feature we should potentially add to each and every component. @simu Any suggestions on how we could generalize this?

The only idea I've got off the top of my head is that we'd add some magic in Commodore which injects logic to render Secret resources in a component if parameters.<component_name>.secrets exists, but that doesn't feel right. Otherwise, it's pretty much a matter of adding
parameters:
  <component_name>:
    secrets: {}

in class/defaults.yml and
local com = import 'lib/commodore.libjsonnet';
local kap = import 'lib/kapitan.libjsonnet';
local kube = import 'lib/kube.libjsonnet';
local inv = kap.inventory();
local params = inv.parameters.<component_name>;
{
  '00_secrets': com.generateResources(params.secrets, kube.Secret);
}

somewhere in the component Jsonnet


WFL editor crashes if I click on some tasks

SUMMARY
The new WFL editor crashes if I click on some specific tasks. The affected actions are all part of self developed packs. It affects multiple actions belonging to multiple packs.
The same action is used two times in the workflow, one task can be edited the other one crashes the editor. -> I don't think it is related to my pack and action. But till now I have not identified what exactly makes the difference for the tasks working and the ones not working.
STACKSTORM VERSION
st2 3.4.0, on Python 3.6.8
OS, environment, install method
redhat:enterprise_linux:7.9
Steps to reproduce the problem
I can not share my current workflow and self developed packs, but I will check later if I can create an example workflow. Therefore I need to know what exactly the issue is, maybe someone can already give me a hint by looking at the error I get from Firefox or can tell me what I should check in advance. Otherwise I need more time to identify it on my own.
Expected Results
Move and edit tasks like others.
Actual Results
The editor crashes. (white page) used Browser: Firefox 86.0
Debug Output:

Possible duplication of: https://github.com/StackStorm/st2web/issues/855. In that case all the failing tasks, had an input parameter of array, and a variable being passed to them. Could this be same problem @wingiti ?

Yes I think it is the same kind of issue and can confirm the behaviour regarding the side panel. I also recognized now with the hint on having a look on the input parameter, that it is not only about actions with array input. It also occurs if I use ctx().get(), ctx().switch, ctx().replace() or ctx().substring() for normal string input parameters.


Telegram notification for smarthome outlet

With adjustable current power consumption

Added in v6.0.0-beta.18

Closing this issue since it was included in the beta (see last comment) and to keep track of which feature requests are still open.

https://github.com/SeydX/homebridge-fritz-platform/issues/191


Flutter style guide: Prefer naming the argument to a setter 'value'

According to Flutter style guide: Prefer naming the argument to a setter value.
I haven't change set value(double newValue) and the setters with argument newXxx and with a body using oldXxx variable ( eg https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/rendering/shifted_box.dart#L803-L815 ).

This looks great. LGTM.


feat: update empty state for alerts

Provide a more useful empty state design for the alerts section, guiding collectors towards creating their first alert.
Jira: FX-4826
Screenshots

Before
After

@nickskalkin Good catch! I just pushed an update to the icon rendering which should resolve the size/alignment issues. Updated the screenshots as well.


Memory leak when trying to load invalid data

If you try and decode a file that is not in the Draco format, a memory leak occurs. When working with SLPK files from Esri I was obtaining the geometry bin files. the issue was that not all of them are in the Draco compressed format and therefore when I attempted to decode the file it errored out and caused a memory leak.

Thanks for reporting!
Could you please provide steps how to reproduce the leak?

Steps to reproduce. try to load a non-draco compressed file. While passing the wrong file is a bug in my code, draco package creates internal error (since it's on another thread i couldn't get the exact message) and a memory leak occurs

Please transition to Draco for Unity, the successor of this repository/package. Version 5.0.0 fixed this issue.


Tensor indices are int

In the process of making clang compiling works, I notice that the Tensor indices are defined as int to allow for -1, but people regard the indices as unsigned int so declare accordingly. This is fine but when using in the  braced initializer list, C++ language doesn't allow narrowing implicit conversions within a braced initializer list so a static_cast is necessary. Therefore it might be best practice to suggest the users to use int indices. The only problem is Tensor.size() returns a cytnx_uint64 so it can not be directly used in the braced initializer list directly without casting it to cytnx_int64, which might make the code look ugly.

The fix to this is to make .size() return a signed int.  It is fairly widely (although not universally) recommended these days to avoid unsigned (unless you are doing some crypto bit flipping etc).
C++20 defines a function std::ssize(container) that returns the size of a container (i.e. container.size()) but converted to std::ssize_t, which is a signed integer.


Function: Get/List Repository

We should create a function that can list/get repositories in a specific Azure DevOps project.

Fixed in #49


"Remove File" button is hidden behind error message

Hi @andredarcie
I've just published version 3.5.9 which resolves this issue.
Cheers

I'm using version 3.6.0 For some reason this problem still persists


Error loading plugin

🐛 Describe the bug
I have the following error on opening Neovim:
Error detected while processing VimEnter Autocommands for "*":
packer.nvim: Error running config for obsidian.nvim: ...site/pack/packer/start/plenary.nvim/lua/plenary/path.lua:201: assertion failed!

Versions
NVIM v0.10.0-dev-1171+gf246cf029f
Build type: RelWithDebInfo
LuaJIT 2.1.1694285958
Run "nvim -V1 -v" for more info
fidget.nvim will soon be rewritten. Please checkout the 'legacy' tag to avoid breaking changes.
Obsidian v1.13.0
Error detected while processing command line:
packer.nvim: Error running config for obsidian.nvim: ...site/pack/packer/start/plenary.nvim/lua/plenary/path.lua:201: assertion failed!%

I've encountered the same bug as well. After investigating, I found this bug was introduced between commits 1c6a28b2936f87d6a1f8d7832f2af1b3b9bd26f3 and e7c374323aee9a04211ee70fe65e575baddcbf8e.
I believe this bug occurs when the templates configuration is being implemented, specifically when the subdir option is missing.
Here's the related configuration snippet:
-- Optional, for templates (see below).
templates = {
  subdir = "templates",
  date_format = "%Y-%m-%d",
  time_format = "%H:%M",
  -- A map for custom variables, the key should be the variable and the value a function
  substitutions = {}
},

To resolve this bug, one should create a folder corresponding to subdir and properly configure it !

In my config there is no template setting at all since I don't use that feature. Therefore, I also would like to avoid creating certain folders for functionality that is not set up.

Also facing this issue, here's my error:
2023-09-22T14:01:59 Messages  INFO 2023-09-22T14:00:11 lazy.nvim  ERROR Failed to run `config` for obsidian.nvim

....local/share/nvim/lazy/plenary.nvim/lua/plenary/path.lua:201: assertion failed!

# stacktrace:
  - /plenary.nvim/lua/plenary/path.lua:201 _in_ **__div**
  - /obsidian.nvim/lua/obsidian/init.lua:120 _in_ **setup**
  - ~/.config/nvim/lua/config/lazy.lua:9
  - config/.config/nvim/init.lua:2

And here is my setup:
return {
  {
    "epwalsh/obsidian.nvim",
    lazy = false,
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
    opts = {
      dir = "~/Documents/notes",
      daily_notes = {
        folder = "/dailies",
      },
      completion = {
        nvim_cmp = true,
        min_chars = 2,
        new_notes_location = "notes_subdir",
        prepend_note_id = true,
      },
      mappings = {},
      open_app_foreground = true,
      open_notes_in = "vsplit",
    },
  },
}

Ah darn! That's my bad. #202 should fix.


Update .toFixed on accounting.min.js

.toFixed has been fixed for a binary rounding issue on accounting.js but it has not been fixed on the minimized file. I'm sure there are other bugs also that have been fixed considering min.js has not been updated in years. Can we bring accounting.min.js up to speed with accounting.js?

Thank you

@brianbaso Any idea how I can use the accounting.js in Angular rather than accounting.min.js?
I am importing like so: import { accounting } from '../../../../../node_modules/accounting/accounting.js';
But I still get the rounding error.
e.g. I would expect 1.005 to be 1.01 not 1.00.


ci build failure again in FlowRunnerTest

see https://travis-ci.org/azkaban/azkaban/builds/242197329?utm_source=email&utm_medium=notification
azkaban.execapp.FlowRunnerTest > exec1Disabled FAILED
java.lang.AssertionError: Flow didn't reach expected status
at org.junit.Assert.fail(Assert.java:88)
at azkaban.execapp.FlowRunnerTestBase.waitFlowRunner(FlowRunnerTestBase.java:52)
at azkaban.execapp.FlowRunnerTestBase.assertThreadShutDown(FlowRunnerTestBase.java:29)
at azkaban.execapp.FlowRunnerTest.exec1Disabled(FlowRunnerTest.java:144)
74 tests completed, 1 failed, 22 skipped
:azkaban-exec-server:test FAILED

I'll try to figure out why this could happen.

Oh quite clear, that FlowRunnerTestBase.waitFlowRunner where it failed still only had 100 x 10ms max wait. Changing it to 1000 x 10 ms.

Fix: https://github.com/azkaban/azkaban/pull/1220


Conditional damage immunity/evasion

Modifiers that provide (chance) for damage being reduced to 0 (or maybe damage taken in general as well)

Chance to reduce damage taken to 0 while max HP (Yes, this is Elder Scroll's wardsave)
Only take damage by attacks above a certain damage threshold (e.g., taking damage as normal by attacks that deal over 300 damage, while anything less is completely negated)

It's important to highlight the difference between "Reducing damage taken to 0" and "Avoid getting hit", as the former would still be treated as being hit, including everything that comes with it (like being able to have effects applied).
There may also be a difference between "dodging" and outright immunity, though my guess would be that the former is just a chance-limited variant of the latter.
UPDATE: "Dodging" (and "Protection") are indeed chance/value based (character.rollToHit(target, attack)). And while onHit-effects are also only evaluated on hit (so dodge/protection failing), they still allow for preHitEffects, unlike immunity which nullifies even those. Also, as damage is only calculated on rolling for a hit, it can not be used for conditional immunity, only reducing damage received to zero, while the enemy is still treated as having been hit.

Implemented through #35. There are certainly more conditions that could be implemented (based on the generic issue title), but the ones in the ticket description have been implemented


How to give a code review

In this branch
-I have added linters.
-I will add reviews

hi @LoviMadaan, sorry the PR has been approved by mistake, you can continue on suggested changes and submit a new review 😒☺

Hello @LoviMadaan 👋,
This is an additional review as a result of the second opinion request.
As far as I can see you performed a new review after the second review. You can ask for another review on your dashboard once you have finished making all the required changes.
Note: You have done a great job using inline comments.
Keep rocking 🚀!

Hi @LoviMadaan 👋,
Status: Approved 🟢
Your project is complete! There is nothing else to say other than... it's time to merge it :shipit: Congratulations! 🎉
Highlights

Good use of Github's Review Changes Feature ✔
Good use of inline comments ✔
Suggestions were polite ✔
Reasons for recommended changes were given ✔

Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear. Please, remember to tag me in your question so I can receive the notification.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


symbolized hash schema not doing strict type checks anymore?

I realize there are lots of moving parts in this gem right now and the documentation here is somewhat outdated. But I wonder why the type checking behaviour of the symbolized hash schema changed completely and won't do any type-checking at all now.
Here is how it behaved in v0.7.2 (had to lock dry-logic to 0.2.3 because of some internal changes)
#!/usr/bin/env ruby
require "bundler/inline"

gemfile true do
  source "https://rubygems.org"
  gem "dry-logic", "~> 0.2.3"
  gem "dry-types", "~> 0.7.2"
end

require 'dry-types'
module Types
  include Dry::Types.module
end

hash = Types::Hash.symbolized(name: Types::Strict::String, age: Types::Coercible::Int)

p hash['name' => 'Jane', 'age' => '21']
p hash['name' => 123, 'age' => '21']

__END__
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Using concurrent-ruby 1.0.2
Using dry-equalizer 0.2.0
Using dry-monads 0.0.2
Using inflecto 0.0.2
Using bundler 1.12.5
Using dry-configurable 0.1.6
Using dry-container 0.3.4
Using dry-logic 0.2.3
Using dry-types 0.7.2
{:name=>"Jane", :age=>21}
/home/ane/.rbenv/versions/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/dry-types-0.7.2/lib/dry/types/constrained.rb:20:in `block in call': 123 violates constraints (type?(String) failed) (Dry::Types::ConstraintError)
        from /home/ane/.rbenv/versions/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/dry-types-0.7.2/lib/dry/types/constrained.rb:31:in `try'
        from /home/ane/.rbenv/versions/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/dry-types-0.7.2/lib/dry/types/constrained.rb:19:in `call'
        from /home/ane/.rbenv/versions/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/dry-types-0.7.2/lib/dry/types/hash/schema.rb:56:in `block in call'
        from /home/ane/.rbenv/versions/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/dry-types-0.7.2/lib/dry/types/hash/schema.rb:49:in `each'
        from /home/ane/.rbenv/versions/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/dry-types-0.7.2/lib/dry/types/hash/schema.rb:49:in `each_with_object'
        from /home/ane/.rbenv/versions/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/dry-types-0.7.2/lib/dry/types/hash/schema.rb:49:in `call'
        from dry-test.rb:18:in `<main>'

As expected the second hash fails because the name isn't a string
using dry-types v0.8.0 I see the following
#!/usr/bin/env ruby
require "bundler/inline"

gemfile true do
  source "https://rubygems.org"
  gem "dry-types", "~> 0.8"
end

require 'dry-types'
module Types
  include Dry::Types.module
end

hash = Types::Hash.symbolized(name: Types::Strict::String, age: Types::Coercible::Int)

p hash['name' => 'Jane', 'age' => '21']
p hash['name' => 123, 'age' => '21']

__END__
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Using concurrent-ruby 1.0.2
Using dry-equalizer 0.2.0
Using dry-monads 0.0.2
Using ice_nine 0.11.2
Using inflecto 0.0.2
Using bundler 1.12.5
Using dry-configurable 0.1.6
Using dry-container 0.3.4
Using dry-logic 0.3.0
Using dry-types 0.8.0
{:name=>"Jane", :age=>21}
{:name=>123, :age=>21}

What I see now is that the coersion was done but the strict type check was skipped or ignored.
Is this intended behaviour?

Yes this is the new behavior. We can introduce a symbolized-strict version too although I'm not sure if that's a good idea. If you need to coerce input it's better/safer to use dry-validation. Could you tell me what your use-case is?

so the schema and the symbolized hash schema only do coersion but no type checking? Personally can't see a use_case right now where I would want that but OK.
An example where we used this was for validating and coercion (and symbolizing) of a nested hash in a request body. But I guess we could migrate this to dry-validation although we liked that we wouldn't need to symbolize known keys and remove unknown keys in the input ourself. ( unknown set of string-keys in -> known set of symbolized keys out + everything is is the type we want it to be )

An example where we used this was for validating and coercion (and symbolizing) of a nested hash in a request body.

dry-types is not a validation library. type-checking raises exceptions and it should be used in places where you do not expect invalid data.

we liked that we wouldn't need to symbolize known keys and remove unknown keys in the input ourself.

dry-validation rejects unknown keys automatically for you, it only cares about defined keys in a validation schema

unknown set of string-keys in -> known set of symbolized keys out + everything is is the type we want it to be

That's how dry-v works:
# Dry::Validation.Form { required(:foo).filled(:str?) }.call("oops" => "dooh", "foo" => "hello", "such" => "unexpected")
=> #<Dry::Validation::Result output={:foo=>"hello"} messages={}>


Extend (and fix) automation of install script

Great idea by the way. I have another one that might be of interest to you at a later date. But, for now, there's a few things in this PR that might be helpful to this repo.

The title mentioned that I fixed the script. That's because on my machine at least, I ran into the following issue:

❯ ./install.sh
./install.sh: line 33: syntax error near unexpected token `FILE=Collins_Thesaurus.tar.gz'
./install.sh: line 33: `FILE=Collins_Thesaurus.tar.gz'

Now to my eyes the script seemed fine, but using shellcheck I had the following output:
❯ shellcheck install.sh

In install.sh line 29:
install()
^-- SC1073 (error): Couldn't parse this function. Fix to allow more checks.

In install.sh line 33:
FILE=Collins_Thesaurus.tar.gz
^-- SC1064 (error): Expected a { to open the function definition.
^-- SC1072 (error):  Fix any mentioned problems and try again.

To fix this, apparently, you can remove the () at a function call (I know, I don't like the look of it either). After removing the () and shellcheck-ing again. "$EXAMPLE" was recommended to prevent word splitting. The long and short of it is that the script now runs.

Extending the automation so it's just 1 line in the terminal. You can see in the change to the README.md that it just get's the raw file the install.sh script and executes it there. Which includes:

Downloading this repo to a hidden folder in the home directory (I like to keep my home directory clean)
Installing GoldenDict
Changing the download location and extraction of the downloaded dictionaries into this repo (Just felt appropriate)
Adding the config changes for GoldenDict to point at the dictionaries

This is brilliant! Thank you.
What do you think of using a ~/.local/share/pop-dictionary folder for this, if we're going to move it into a hidden home location?

I suppose there's no reason why not :+1:


Missing import suggestions (in *.tsx) for some components from node_modules (npm)

VSCode Version: 1.31.1 & 1.32.0-insider; extensions disabled
TypeScript version: 3.3.1 & 3.4.0-dev.20190307
OS Version: macOs 10.14.3

VSCode doesnt find (?) and suggest importing SOME components installed from npm.
Examples when there are no import suggestions:

npm install @material-ui/core (type defs included)

^ no suggestions.
If I import {} from this package suggestions are shown:

Another one:

npm install react-bootstrap (type defs included)

^ again, no suggestions, but if I import {}:

Exactly same with (for example) @fortawesome/react-fontawesome (FontAwesomeIcon component) (type defs included).
One example where import suggestion DOES show up:

npm install reactstrap (type defs not included)
npm install @types/reactstrap

^ suggestions are working as expected

Does this issue occur when all extensions are disabled?: Yes

This sounds like the limitation described in https://github.com/Microsoft/TypeScript/issues/29039#issuecomment-474628577
Package auto imports only start showing once there an existing reference to that package somewhere in the project


Any synopsis or more details to README

Hi,
I try to package nbio for Guix package index which requires llib (this
project), but I struggle to determine the purpose of the library from nearly 0
data provided in README or synopsis.
Is it possible to refresh it wit more details, please?
Thanks,
Oleg

Thank you for your attention to nbio and feed back!
I copied the TLS-related code of golang 1.6 and modified it here to support sync and async TLS IO interface.
nbio's HTTP and Websocket support blocking and non-blocking mod Conn based on this.

I will add some details in README.

I will add some details in README.

updated, please check it.


Logging (L1 & L2)

Seeking clarity on different logging levels, what is expected for submission, etc.

Is passing the mlp_compliance code checking mandatory?
Is the logging having all exact tags mandatory?

SWG:
L1 - basic checking including run_start and run_stop and evaluation.
L2 - L1 plus having at least one of every tag used by the reference. Values, number of tags, etc. not considered.
L3 - L2 plus extensive checking of values, formats such as learning rates being correct multiples of base step size.
For v0.5.0, we will create an automatic checker. The checker will be posted for review by Friday (Oct 26). Will be open for review and hopefully finalized by EOD Tuesday 30th (pending major objections). Once finalized, this will be the checker used for submissions, independent of the state of the reference implementations.
We will revisit this issue once finalized.

SWG:
L2 for submission per auto checker.
For this submission, you can hand patch logs with proper annotations.

Do you have a script for checking logs?

https://github.com/mlperf/training/tree/master/compliance/mlperf_compliance
On Thu, Nov 1, 2018 at 7:18 PM, Xin Qiu<EMAIL_ADDRESS>wrote:

Do you have a script for checking logs?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mlperf/policies/issues/126#issuecomment-435249748,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AhFaHaV5B-QosAAPT4jsU2usELr9Bpvdks5uq6uGgaJpZM4X6oco
.

Scripts exist.
https://github.com/mlperf/training/tree/master/compliance/verify_submission
https://github.com/bitfort/mlp_compliance/blob/760559248fc61823488c606a0c507289752b88ba/mlp_compliance.py
Repurposing issue to track L3 compliance for 5.1.

Obsolete.


Parallel package installs to multiple targets at same time

I adapted the code so we can define the installation of multiple packages to many computers by either manually typing them in, importing them with a text file, AD group, or OU.  This works great, for the most part, but I am seeing a problem with consistently installing all packages on every computer.
There is a simple function within my powershell script, called install:
$install = {
#import variables
param( $c1, $package, $cred, $rboot )
    foreach ($p in $package){
	    if($rboot -eq "y"){
		install-boxstarterpackage -computername $c1 -packagename $p -credential $cred -disablereboots
	    }
	    else{
		install-boxstarterpackage -computername $c1 -packagename $p -credential $cred
	    }
    }
}

...which is called by:
foreach ($c1 in $computer1){
    start-job -scriptblock $install -argumentlist $c1,$package,$cred,$rboot -name "$c1 -$package"
    #get-job | wait-job
}

If I do not comment out the get-job | wait-job, I am seeing the following error on at least one of the package installations for at least one of the computers I am installing to, which causes a package to not install:
The process cannot access the file 'C:\Users\thoule\AppData\Local\Boxstarter\boxstarter.log' because it is used by another process.

CategoryInfo               : OpenError: (:) [Out-File], IOException
FullyQualifiedErrorID  : FileOpenFailure,Microsoft.Powershell.Commands.OutFileCommand
PSComputerName      : localhost

If I uncomment the get-job | wait-job code so it processes each computer one at a time, everything works, but this would take forever if I were to try and install packages to say 100's or 1000's of computers.
Anyone have any ideas how I can get around this problem?

Yeah this is from your two parallel runs trying to write to the same file at the same time. When performing a remote install, all remote activity is written to the log on the remote machine which obviously will not cause contention. However, some logging is done locally regarding connection attempts and reboots.
You may be able to resolve this by staggering the runs by just a few seconds so that the initial connection logging will not occur at the same time.

Thank you, Matt.  I told it to pause for two seconds and that took care of it.


Cache

Pull Request Test Coverage Report for Build 693

23 of 23 (100.0%)  changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 690:
0.0%

Covered Lines:
667

Relevant Lines:
667

💛  - Coveralls


#204 do not shutdown the ThreadPoolExecutor when mails are sent

There are 3 changes:

The ThreadPoolExecutor is not shutdown anymore when mails are sent
Threads created in the ThreadPoolExecutor are set to daemon (so they don't "block" the JVM shutdown) ; and also they are named "Simple Java Mail async mail sender #N" so they can be easily identified in the application threads
If an error occurred in the async mail, the error is now logged with a logger in the MailSender class (instead of a e.printStackTrace() in the ThreadPoolExecutor): that is not directly related to the original issue, if necessary I can do a separate pull request for that

There are 2 unit tests I wanted to write (and eventually I did not):

To reproduce the original issue:

the MailSender needs to be created
a first mail needs to be sent
when we are sure the mail is sent, a second mail needs to be sent as fast as possible
=> but actually to make this work, I guess we would need a test SMTP server like https://github.com/davidmoten/subethasmtp ; it seems too complicated

To check that the JVM can stop and is not blocked by daemon threads: but actually in JUnit tests, the JVM is killed event if there are non-daemon threads alive. I tried to check directly if JVM threads are all daemon using Thread.getAllStackTraces().keySet(), but JUnit seems to create many threads that are actually non-daemon... So I also gave up to do this Unit test.

However, I did make manual "real-world" tests with our Java application.
Lastly, I am wondering if the default thread pool size for ThreadPoolExecutor, 10, is not a bit too high. I think that a default pool of 2 would be enough in the majority of use cases. Is there any reason for using a default thread pool that high?

Analyzing your changes right now. Can you help me understand why it is better to log the error rather than have it bubble up? I can argue the whole thing should fail when an email fails and also why it shouldn't. Depends on the use case. Maybe it should be configurable...

The original default thread factory consulted the SecurityManager to determine the thread group, shouldn't your version do this as well? I must admit I'm not familiar with this function:
SecurityManager s = System.getSecurityManager();
            group = (s != null) ? s.getThreadGroup() :
                                  Thread.currentThread().getThreadGroup();

Actually, I'm starting to have doubts on daemon threads altogether. They shouldn't block the JVM from shutting down, but only when they are not actually doing anything. Now what happens is if an application is running just to send emails async, or from junit test, or from CLI (coming in 6.0.0), then the JVM kills the threads before they send anything, correct?

Regarding my earlier question about .isTerminated(), that should have been .isShutdown(). It doesn't need to be made null.

I'm sorry @amanteaux, I really appreciate your effort, but thinking about it more I feel this is not the right path.

I agree that the daemon thread solution is not really that good. From a JUnit test, it won't make a difference if you are using daemon threads or not: the thread pool will get shutdown/killed anyway once the test method is executed. But I can see for sure a use case where an application that executes for a short amount of time and wants to send asynchronous mails.
Wouldn't the solution with the non-daemon threads and the time out (allowCoreThreadTimeOut) be a good alternative? If the timeout is configurable:

if by default this timeout is low, the behavior will be a lot like what exists already: threads will get killed once they have no more mails to send,
if some application do not want to waste time creating new threads each time it needs to send mails, it can be configured to have a long timeout.
This solution should not add complexity to Simple Java Mail no?

I'm willing to take another look if you are willing to take another stab at it (but branch off from "204-fix-race-condition-improve-threading" this time). Don't bother wiring the config into everything, I'll take care of that if I'm happy with the solution. I can see an advantage of a configurable timeout, although at the same time that adds complexity to Simple Java Mail as well!

About your two other questions:

About the thread group, to be honest I do not understand why the default thread factory is duplicating what is already done at the Thread level. See Thread.init() from line 374.
For the exception bubbling up, in the non-async context, it should of course bubble up, but in the async context, it just bubble up to the Thread, kill it at the same time and gets logged by the JVM using something like e.printStackTrace(). At least one issue I see with that behavior is that is prevent logging system like Logback to log the exception where the application wants. On my side the real issue is that exceptions do not get pushed to Elasticsearch/Kibana if they don't get logged by Logback.

And thank you for time reviewing my merge request!

Ok thank you! I will try to do something in the "204-fix-race-condition-improve-threading" branch!


Add support for geofences with individual actions and maximum altitude

Describe the problem solved by this pull request
This PR added a feature for storing individual fence actions and the maximum altitude for each fence.
Describe your solution
The Mavlink receiver parses MAV_CMD_NAV_FENCE_*  messages and additionally saves fence action from param3 and altitude from param7, and stores it into Dataman with a geofence structure.
This solution removes the parameter GF_MAX_VER_DIST. Now all maximum altitudes are controlled from QGC point where maximum altitude is sent from QGC and needs to be in AMSL.
Not every fence breach is equally significant. This PR emphasizes the importance of detecting breaches with the highest severity. For example, the highest severity is flight termination. This change aims to simplify the code and enhance security. When two fences are close, and the program can't quickly identify which one is breached and where it will prioritize the action with the highest severity.
Fence action with a higher number has the highest severity:
https://github.com/aviant-tech/PX4-Autopilot/pull/39/files#diff-9707810253d8c0a1028d7dad1b7d5186e1d9df4909b0b0bca80b51143dd1970cL2-R7
Param GF_ACTION  is also removed, action is expected to arrive from QGC.
All other logic, how the vehicle will behave when action is triggered, for certain fence breached, is preserved.
Test data/coverage
It is tested in SITL.
Additional context
It needs to be paired with QGC changes https://github.com/aviant-tech/qgroundcontrol/pull/22

Hi @Igor-Misic, sorry about the late feedback on this.
I have some overall conceptual requests before we start on any details.
I think there is a value in keeping GF_ACTION, GF_MAX_VER_DIST, GF_MAX_HOR_DIST with the same function as today, so it is possible to use a simple cylinder GF for local test flights if needed:

I would like the new geofence to have the possibility to use default action, that is, specify that a GF uses the general GF_ACTION. This should be the default/param3=0 action.
Also, setting a altitude (param7) of 0, should probably mean that altitude is not checked, to keep current functionality. This may theoretically be an issue if flying below mean sea level, but I do not think it is a bit issue. At least if we still check for negative altitudes.
If at all possible, we would like some backwards compatibility, in prioritised order:

Possible to use old mission, with no change in behaviour
Possible to use the new PX4 functionality with an older QGC
Possible to use the new QGC with an older PX4

I pushed new changes with integrated old functionality of GF_ACTION and GF_MAX_VER_DIST where param GF_ACTION is the Default action.

* Possible to use the old mission, with no change in behavior

I've added support for that through the new dataman version and version transition. Since fence_action data previously stored on dataman will be unknown, the transition is setting those values to zero.

* Possible to use the new PX4 functionality with an older QGC

Can you help me with more details about the new functionality used in older QGC?
If you meant compatibility with the old QGC, then this will not be an issue.  Old QGC is sending zero values for param3 (fence_action) and param7 (altitude) which means default behavior.

* Possible to use the new QGC with an older PX4

This will work. Old PX4 will not use any new value sent from the new QGC and the new QGC will receive a value set to default (0) when downloading geofence from old PX4.


Meerk40t 0.6.22: Vector time estimate in spooler way under

When performing a cut, estimate was 44s, actual was 53s.

That's not that far under. Some of those estimates are basically absolute voodoo and not remotely close.
I think to get them right would require some work timing the various ticks of the laserhead. Figuring out when it slows down. How long a raster scanline takes to reverse course. And the intro and outro acceleration timing. Had I properly accounted for the slower real-speed (for unknown reasons the Chinese software goes at 92% of the actual requested speed) it would have estimated 48.76. I'd think maybe the intro and outro waste about 1.5 seconds each assuming they did both.
It might be doable to get that timing a lot more dialed in. #342

Needs some better timed data to estimate this stuff better.

#1165 This stuff might still be wrong. I guess at some point I really need to fix up that code or whatever.


Add "bugprone-suspicious-memory-comparison" to the list of severity

Using the severity from
https://wiki.sei.cmu.edu/confluence/display/c/EXP42-C.+Do+not+compare+padding+data

Checker configuration is changed in #3233. Can you please move your changes to this file: https://github.com/Ericsson/codechecker/blob/master/config/labels/analyzers/clang-tidy.json.

I close this PR and replace its content to the new format.

Thanks!


Map is blank in Safari 8.0.8

@QuincyLarson any errors in browser's console? Is everything OK on Networks tab?

Thanks for posting. Closing this issue as a duplicate of https://github.com/FreeCodeCamp/FreeCodeCamp/issues/6256.


[Idea] Change name of conda environment to be GUIDE specific

Right now the conda environments are all named 'env-electron-' whereas our requirements are pretty specific to NWB at this point. Maybe 'nwb-guide-dev-' or something?

Implemented in #256


Add Documentation category to data/links/

Hi there Rolando, I found your plugin tool from an article that was posted in daily.dev. I really love your application, and I thought I would include a Documentation category, with links to some of the most common docs I use. I created the icon, so you have permission to use it, without attenuations.

Hi there @aaronKilpatrick . That was a nice job. Sorry for my late response. I think your contribution is excellent but Documentation category could be a bit tricky, because you could be using older versions of those technologies in your current project so you will have to navigate to the older documentation version, and I think it would be easier to google for that specific version. I hope to release a new version of Dev Links with the feature of adding your own categories and links, so you can bookmark these kind of documentation links without any misunderstanding with versioning. I expect you understand this. Feel free to do other pull request with improvements and bug fixes. Have a nice day.


Kernel Memory not searching using the registered Azure AI Plugin

Describe the bug
I uploaded and indexed "Northwind_Health_Plus_Benefits_Details.pdf" using  kernel memory
await kernelMemory.ImportDocumentAsync(filePath: path, documentId:"NASA001");
I verified that index was created successfully on Azure Search.
Now i am trying to search using the following code.
What is my Deductible?
Search
Assistant :
To assist you with finding information about your deductible, I'll need some context. Could you please specify which deductible you are referring to? For instance, are you asking about a health insurance, auto insurance, home insurance, or another type of insurance policy deductible? Additionally, I may need more details about your policy to provide accurate information. If you have a specific policy or document that details your coverage, sharing that would be helpful.
To Reproduce
             var AZURE_SEARCH_ENDPOINT = _configuration.GetSection("AzureSearchAI:EndPoint").Value!;
             var AZURE_SEARCH_API_KEY = _configuration.GetSection("AzureSearchAI:ApiKey").Value!;
             var AZURE_SEARCH_INDEX_NAME = _configuration.GetSection("AzureSearchAI:IndexName").Value!;

   #pragma warning disable SKEXP0001, SKEXP0010 // Type is for evaluation purposes only and is subject to change or removal in
   future updates. Suppress this diagnostic to proceed.
               var embeddingConfig = new AzureOpenAIConfig
               {
                   APIKey = _configuration.GetSection("AzureOpenAI:ApiKey").Value!,
                   Deployment = _configuration.GetSection("AzureOpenAI:EmbeddingModelName").Value!,
                   Endpoint = _configuration.GetSection("AzureOpenAI:EndPoint").Value!,
                   APIType = AzureOpenAIConfig.APITypes.EmbeddingGeneration,
                   Auth = AzureOpenAIConfig.AuthTypes.APIKey
               };

               var chatConfig = new AzureOpenAIConfig
               {
                   APIKey = _configuration.GetSection("AzureOpenAI:ApiKey").Value!,
                   Deployment = _configuration.GetSection("AzureOpenAI:DeploymentModelName").Value!,
                   Endpoint = _configuration.GetSection("AzureOpenAI:EndPoint").Value!,
                   APIType = AzureOpenAIConfig.APITypes.ChatCompletion,
                   Auth = AzureOpenAIConfig.AuthTypes.APIKey
               };

               var searchConfig = new AzureAISearchConfig
               {
                   APIKey = _configuration.GetSection("AzureSearchAI:ApiKey").Value!,
                   Endpoint = _configuration.GetSection("AzureSearchAI:EndPoint").Value!,
                   Auth = AzureAISearchConfig.AuthTypes.APIKey,
               };

               var memoryConfig = new KernelMemoryConfig
               {
                   DefaultIndexName = IndexName,

               };

               var kernelMemory = new KernelMemoryBuilder()
                   .With(memoryConfig)
                   .WithAzureOpenAITextGeneration(chatConfig)
                   .WithAzureOpenAITextEmbeddingGeneration(embeddingConfig)
                   .WithAzureAISearchMemoryDb(searchConfig)
                   .WithSearchClientConfig(new SearchClientConfig { MaxAskPromptSize = 5000, AnswerTokens = 4096 })
                   .Build<MemoryServerless>();

                 var plugin = new MemoryPlugin(kernelMemory, waitForIngestionToComplete: true);
		 kernel.ImportPluginFromObject(plugin,pluginName: "AzureAI_Search_MemoryPlugin");

---------------------------------------------------------------------------------------------------------------------------------------------
  chatCompletionService = kernel.GetRequiredService<IChatCompletionService>();

  chatMessages.AddUserMessage(inputText);

  // Enable auto function calling
  OpenAIPromptExecutionSettings openAIPromptExecutionSettings = new()
  {
      ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions
  };

// Get the response from the AI
ChatMessageContent result = await chatCompletionService.GetChatMessageContentAsync(
    chatMessages,
    executionSettings: openAIPromptExecutionSettings,
    kernel: kernel);

Expected behavior
It should have initiated a searching using the provided plugin. and returned the data from the PDF that use indexed.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform

OS: [e.g. Windows, Mac]
IDE: [e.g. Visual Studio, VS Code]
Language: [e.g. C#, Python]
Source: [e.g. NuGet package version 0.1.0, pip package version 0.1.0, main branch of repository]

Additional context
Add any other context about the problem here.

@nssidhu Which AI model you are using for this scenario? I noticed you are adding text generation model with this line: WithAzureOpenAITextGeneration(chatConfig). Here is a list of models that support function calling:

Also, could you share the code where you initialize kernel instance? It will definitely help to understand the issue by checking how kernel was registered. Chat completion model, that supports function calling, should be registered on semantic kernel level.
Another thing that I noticed that you are getting IChatCompletionService instance and using GetChatMessageContentAsync method directly. My recommendation would be to use kernel directly:
OpenAIPromptExecutionSettings openAIPromptExecutionSettings = new()
{
    ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions
};

var result = await kernel.InvokePromptAsync("What is my Deductible?");

You could also try to be more specific in your prompt, just to be sure that MemoryPlugin is called correctly: What is my Deductible? Use memory to answer this question.
In case if it still doesn't work, you could also create an issue in KernelMemory repository, because the issue can be related to kernel memory logic itself:
https://github.com/microsoft/kernel-memory/issues
Thank you!

Here is the code for kernel , the value for _userAzureOpenAI is hardcoded to true
var builder = Kernel.CreateBuilder();
if (_userAzureOpenAI)
{
    builder = Kernel.CreateBuilder()
           .AddAzureOpenAIChatCompletion(AzureOpenAIDeploymentName, AzureOpenAIEndPoint, AzureOpenAIKey);
}
else
{
    builder.AddOpenAIChatCompletion(OpenAIDeploymentName, OpenAIKey, OpenOrgId);
}

 var kernel = builder.Build();
 return kernel;

builder.Services.AddLogging(c => c.SetMinimumLevel(LogLevel.Debug).AddConsole().AddDebug());

Inerestigly i have tried that as well, like asking it to use specifc plugin, but that did not work either.

I also noticced very high usage of Token for simple one liner question.

Here are few more screen shots.
I am not sure if there is issue with the Index itself, how can i rule that out ?
I used the following code to upload the document.
                var kernelMemory = await GetKernelMemory("BlazorMemory");

                await kernelMemory.ImportDocumentAsync(filePath: path, documentId:"NASA001");

To further experiment, I tried some more thing, like directly accessing kernel memory
var kernel = await GetKernel(true);
var memory = await GetKernelMemory("blazormemory");
Microsoft.KernelMemory.SearchResult searchResults = await memory.SearchAsync(searchquery);
Console.WriteLine(searchResults);
if(!searchResults.NoResult)
{
foreach(var item in searchResults.Results)
{
Console.WriteLine(item.SourceName + " : " + item.SourceUrl + item.Link );
foreach(var partition in item.Partitions)
{
Console.WriteLine(partition.Text + " : " + partition.Relevance);
}
}
}
//The code above just pulls every partition which has reference to deductible. that is not much useful. but that just verifies that there should at be nothing wrong with the index.
Microsoft.KernelMemory.MemoryAnswer searchResults1 = await memory.AskAsync(searchquery);
Console.WriteLine(searchResults1);
if(!searchResults1.NoResult)
{
Console.WriteLine(searchResults1.Result + " : " + searchResults1.RelevantSources);
}
//The code above does not retrieve anything. this looks like to be the problem area. why nothing is being pulled out.

@nssidhu - please post this issue over on the Kernel Memory repo - https://github.com/microsoft/kernel-memory/issues
@dluc for a FYI


Bug in unused function.

I'm writing unit tests using the python driver and I've found this puzzler. First, my test was failing because the function always returns a value of 1.0. Second, in looking into this a bit deeper, I don't think this function is ever used in vic_run or any of the drivers.
So the question is, should we be using the function somewhere or should I remove it?
double
modify_Ksat(double Temp)
{
    extern option_struct options;

    double               Factor;

    /** formula generated by multiple regression against kinematic
        viscosity data from the Handbook of Chemistry and Physics **/
    if (options.FROZEN_SOIL) {
        Factor = 0.003557 / (0.006534 - 0.0002282 * Temp + 4.794e-6 * (Temp) *
                             (Temp) - 4.143e-8 * (Temp) * (Temp) * (Temp));
    }
    else {
        Factor = 1.;
    }

    if (Factor > 2.) {
        Factor = 2.;
    }

    return (1.0);
}

ref: https://github.com/UW-Hydro/VIC/blob/develop/vic/vic_run/src/modify_Ksat.c

Also, exp_interp in the same source file is not used anywhere in VIC right now.

Fine with me. @tbohn : Can you comment?

BTW - note that linear_interp() in that file is used in a number of places, so we would need to retain that one.


404 on "latest" tag with file path

In https://github.com/unpkg/unpkg/issues/86#issuecomment-393174468, @mbostock reported:

Still seeing issues which I believe are related. Currently, this is a 404 (Cannot find package "d3"):
<EMAIL_ADDRESS>However, these links both work:
https://unpkg.com/d3@latest/ (redirects to 5.4.0)
<EMAIL_ADDRESS>
I'm honestly not sure what the issue could be here, but wanted to open this ticket to track discussion + progress.

Thanks for tracking this issue. This appears to have been a transient error; I’m also no longer able to reproduce it. However, if I do see it again, I’ll try to capture the network logs and post them here.

Dunno if related, but getting a 503 on these:

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

Seems to be working now @mjackson 👍

I'm getting 404 for rxjs:
$ curl<EMAIL_ADDRESS>-I
HTTP/1.1 404 Not Found
Date: Thu, 28 Jun 2018 01:47:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 63
Connection: keep-alive
Access-Control-Allow-Origin: *
Etag: W/"3f-YB6RqyJtPLAbUs4oSsu1wP4Swzs"
Via: 1.1 vegur
CF-Cache-Status: HIT
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 431c7bcbfd1c557c-ORD

I did npm install<EMAIL_ADDRESS>and it looks like bundles/rxjs.umd.js should be a valid file.
Also I have a different computer on a different network (via VPN) and it can resolve the same url fine (CF-RAY: 431c505b99f69af0-DFW).
The url also fails for me on my phone connected to cell network. That one had CF-RAY: 431c6e7f4d1a9f66-IAD.
Also, on all 3 networks I'm getting 200 OK for<EMAIL_ADDRESS>

Now today it is working fine for me. 200 OK response only.

I'm fairly certain I've squashed this particular bug. Over the last 3 weeks I've been working on and refining a patch that avoids caching packages on the local (ephemeral) file system on our servers and instead streaming everything directly from the registry. I've had it deployed for a few days now and it seems to be working well, so I'm going to close. Please open a new issue if you see this behavior again.
Thanks for your patience :)


Add license

Someone inquired about a license for SIPNET. Indeed, I see we don't have a license file. Would it make sense to adopt the standard Pecan Project license if there is one? (I don't have any strong feelings on what the license should be myself.)

Thanks for bringing this up @billsacks.  So PEcAn is in the process of converting from NCSA to BSD-3, so I'd recommend going with the latter for SIPNET.


Error when trying to start test on Microsoft Edge browser

I'm getting error when I'm trying to run tests on Microsoft Edge.

I have a driver in this folder, but the name is different

How can I fix this error?
UPD: When I renamed the driver in a folder on MicrosoftWebDriver.exe, it's fix the problem, but is any other way how to do it from code?

What are the versions of Atata, Selenium.WebDriver and Atata.WebDriverSetup packages that you use? I see no problems with the latest versions.

Atata - 1.14.0
Selenium.WebDriver - 3.141.0
Atata.WebDriverSetup - 1.2.1
Microsoft Edge - 105.0.1343.27

Yes, there is such a problem with Selenium.WebDriver v3 and EdgeDriver. The best solution is just to use Selenium.WebDriver v4 together with Atata v2. That will solve the issue. But please consider Migrating to Atata v2 article, as there were breaking changes in Atata v2 and WebDriver v4.
If you want to stick with Atata v1.14.0, you can, as you mentioned, to rename or copy driver exe file. I don't know the better option here.
AtataContext.GlobalConfiguration.AutoSetUpDriverToUse();

string driverDirectoryPath = Environment.GetEnvironmentVariable("EdgeDriver");
File.Copy(
    Path.Combine(driverDirectoryPath, "msedgedriver.exe"),
    Path.Combine(driverDirectoryPath, "MicrosoftWebDriver.exe"),
    true);


[Gekidou MM-45552] Replace Recent Search Item From MenuItem To OptionItem

Summary
This PR converts the Recent Search item so it uses the OptionItem component
The OptionItem component has a new OptionType REMOVE which shows the close compass icon with attached onClose callback.
The design with MenuItem used a 40x40 area including the size 18 compassIcon. To implement this, I added the same size 18 icon with a surrounding hitslop of 11px on all sides.
The noticable difference will be when clicking a recent search item.  The UI response will be the same as the search modifiers.
Ticket Link
https://mattermost.atlassian.net/browse/MM-45552
Checklist

[ ] Added or updated unit tests (required for all new features)
[ ] Has UI changes
[ ] Includes text changes and localization file updates
[ ] Have tested against the 5 core themes to ensure consistency between them.

Device Information
This PR was tested on:
Screenshots

Release Note

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/23931
https://circleci.com/gh/mattermost/mattermost-mobile/23930

Artifact links:
https://output.circle-artifacts.com/output/job/9cc0d0d0-98fb-44b5-9db6-e6f3c5163db6/artifacts/0/tmp/artifacts/Mattermost_Beta.apk
https://output.circle-artifacts.com/output/job/64ff6393-b4df-43a8-acb8-1ed65f81f6a8/artifacts/0/tmp/artifacts/Mattermost_Beta.ipa

Looks good to me @jfrerich.
I noticed that the 'Recent searches in {Team}' still shows if I've deleted all the recent searches. Can you create another ticket to remove this section if there are no recent searches?

Ticket created -> https://mattermost.atlassian.net/browse/MM-45792

@jfrerich heads up that there are conflicts in this PR

@avinashlng1080 How much your work on https://github.com/mattermost/mattermost-mobile/pull/6522 overlaps with this?

@avinashlng1080 How much your work on #6522 overlaps with this?

Hmm, let's merge this one and then I'll rebase mine over it.

Hey @enahum , I see that this PR has got 3 approvals  but I can't merge it as it it still requires your review and the change you requested has been implemented.
Is this a branch security config?


Dead PDF links

Just a heads up that the PDF links in README.md and on github.io point to https://www.comp.nus.edu.sg/~mboehme/paper/FSE17.pdf

Fixed. Thanks Chris!


travis: use docker containers

The docker containers are far more abundant and
offer vastly reduced boot time and some increased
CPU power. As long as you don't require 'sudo',
this is the way to go.
http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/

Cool idea.

Goes. :shipit:

Unfortunately...this doesn't seem to be noticeably faster.

The boot time isn't recorded, but is much much shorter. Added CPU won't make a huge difference with already-fast tests.

Well, I'll take your word for it.


Create sanity check script for migration

This PR is a

[x] Feature Implementation
[ ] Bug Fix
[x] Documentation

What this PR does / why we need it:

Created sanity check script for migration
Updated documentation for the migration process

Please leave this checklist in the PR comment so that maintainers can ensure a good PR.
Merge Checklist:

[x] New feature

[ ] Tests
[x] Documentation

[ ] SVCat CLI flag
[ ] Server Flag for config

[ ] Chart changes
[ ] removing a flag by marking deprecated and hiding to avoid
breaking the chart release and existing clients who provide a
flag that will get an error when they try to update

/ok-to-test

/test pull-service-catalog-test-e2e

/test pull-service-catalog-test-e2e

/test pull-service-catalog-test-e2e

unfortunately this script is not working at all it spams me with such entries:
ServiceClass/bestmatch-api-2871d not exist in the cluster for the ServiceInstances:

ServiceClass/bestmatch-api-2f6cb not exist in the cluster for the ServiceInstances:

ServiceClass/bestmatch-api-43def not exist in the cluster for the ServiceInstances:

ServiceClass/bestmatch-api-4a5c3 not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-08c72 not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-4d6d4 not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-772e4 not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-d3821 not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-dec18 not exist in the cluster for the ServiceInstances:

ServiceClass/bestmatch-api-176b1 not exist in the cluster for the ServiceInstances:

ServiceClass/cc-events-v1-4adab not exist in the cluster for the ServiceInstances:

ServiceClass/cc-occ-commerce-webservices-v2-3da74 not exist in the cluster for the ServiceInstances:

ServiceClass/data-api-276ab not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-d3340 not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-d3340 not exist in the cluster for the ServiceInstances:

ServiceClass/query-api-f41b5 not exist in the cluster for the ServiceInstances:

ServiceClass/service-api-414d9 not exist in the cluster for the ServiceInstances:

ServiceClass/data-api-5d88b not exist in the cluster for the ServiceInstances:

ServiceClass/dispatch-api-b8b70 not exist in the cluster for the ServiceInstances:

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

There are ServicePlans removed from broker's catalog:
NAME   NAMESPACE   REMOVED

Please prepare your Service Catalog resources before migration. Check docs/migration-apiserver-to-crds.md#preparation

the script at the end points to Preparation section and this section points to running the sanity checks script.
As a client I'm expecting that there will be guideline what to do in case you have deletion in progress with error that reference not existing service class etc.
e.g. for service instance in with error that reference not existing service class user should use the svcat, svcat deprovision foobar-mysql --abandon
source: https://github.com/kubernetes-sigs/service-catalog/blob/master/docs/tasks/stuck_instance.md
test also that each described solution is working.

(Cluster)ServicePlans/ServiceClasses can be marked as removed from the broker and client does not have to clean them up before the upgrade.
We have only problems with outgoing operations and object that are marked as deleted, but they are either in error state or still in deprovisioning process

@mszostok I've aligned my PR to your comments

/approve

/lgtm