Help/Advice with Electron Intergration

Hey All,
Im trying to intergrate electron to this project. Yes im aware that there exists the advance seed here that is based on this project, but it has too many integrations i do not need and has a structure im not comfortable with. I personally like the setup of this project better, thus attempting to intergrate electron directly here. My problem here is likely related to angular (or this project), so if you have a sec, i would appreciate any insight.
Setup
So, creating an electron app is fairly simple (just trying to make a proof of concept). First get an html/js project (lets use the build.dev output of this seed project), then add a simple package.json file to the /dist/dev (you can steal this one), then also add a js file that drives the electron app (you can steal a compiled version of this one, theres a bit of cleanup you need to do though). All set? Sort of.
make sure you install electron dependencies to your main project, then run "node_modules/.bin/electron" "./dist/dev". You might get some errors. Fix them up by removing / from the index.htmls <base href="">, link to files correctly etc. You may also want to put a copy of the required dependencies from node_modules to /dist/dev/node_modules. Heck, you could copy the entire node_modules folder there if you are lazy.
Problem
Once all the above are setup correctly, you run the app, and you see the following error (i added the console/debugtools to the js file): http://i.imgur.com/IAxGsd2.jpg
EXCEPTION: Uncaught (in promise): Error: Cannot match any routes: 'E%3A/projects/angular2-seed/dist/dev'
...
Unhandled Promise rejection: Cannot match any routes: 'E%3A/projects/angular2-seed/dist/dev' ; Zone: angular ; Task: Promise.then ; Value: Error: Cannot match any routes: 'E%3A/projects/angular2-seed/dist/dev'(…) Error: Cannot match any routes: 'E%3A/projects/angular2-seed/dist/dev'

As you can see, the project loads. If i click about tab, you see the content. If you click home tab again you see the content (data.json doesnt get loaded, but thats fine, that can be fixed in system-config.js). But on the first load, as shown on the screenshot, you get a blank page with the nav bar. Seems like angular gets confused about routing. It feels like this is some obvious little thing im missing (due to my lack of understanding of this seed). Does anyone see any obvious problems that might point me in the right direction?
Also, im curious. What is the purpose of system-config.js?
TY in advance,
Cheers.

I haven't tried to develop an electron application with the seed so my advices may not be very valuable to you. Given the philosophy of the project, I'm not sure you're taking the most maintainable direction here. I wouldn't recommend you to modify anything in dist since it contains assets which are produced by the build and are being removed during it's lifecycle.
I'd recommend you to create an electron-related tasks in tools/tasks/project similar to what @NathanWalker did here.
In general, I'm not sure where the problem may come from but if you can navigate through the pages and you have the issue only during the initial page load, you can try to set a default route.

@mgechev Thanks for the response.
 Im just copying files there as a proof of concept to get the app running (so i dont have to compile every little code change i make). Ofcorse in test setup i have them compiling through gulp tasks, but that would have taken too long to explain. I explained the bare minimum required to get upto speed on what the end result of where i was (so anyone else can sort of understand/recreate).
Sadly besides the code coming from within the /src/client, rest of my code (proof of concept) looks fairly similar to @NathanWalker's (sorry to ping you). My main problem is, i dont know enough about this projects setup (i dont have a good understanding of how core-js, systemjs, rxjs, zonejs works and the purpose of this system-config.js file, im ok with angular2, so i can follow the code but i dont understand the base setup just yet). So im suspecting that there is something related to one of those libraries that would be incharge of routing is causing some issue. Im slowly doing more and more comparisons with NathanWalkers project to see what tweaks he has done, so maybe i might come across the key difference. I will try mess with the default route in the meantime, thats a good suggestion.
If anyone can figure out what im missing from the error msg on the screenshot earlier, any help/suggestions are greatly appreciated. :D

system-config.js is the place where we place the SystemJS development configuration and parts of it are overridden for unit tests. You need core-js for polyfilling missing ES6 (ES2015) APIs, SystemJS is the module loader which we use in development. Basically we are using all the tools the way they are supposed to be used so you can take a look at their documentation in order to get better understanding.
Unfortunately with the current development ecosystem there are a lot of moving parts, which is exactly the purpose of the seed - to reduce the learning gap (at least initially) and provide a quick, reliable and flexible start. I'd recommend you to take what @NathanWalker has build in the advanced seed and start removing parts until you get a minimum working Electron setup. After that you can see what the difference is with angular-seed and you will be sure what you did wrong, it might not be trivial and it may take a bit :-).
Good luck! Let me know how it goes.

@mgechev thanks for the breakdown of the libraries. that helps a lot, specially knowing that they are being used the way they are supposed to. I will definitely spend some time looking them up and doing my own learning too.
As for your suggestion on stripping down NathanWalkers project, i have been doing the opposite (building this project up towards his project), but i suppose your suggestion makes sense (specially given the other path didnt work). That was on my todo list anyway, but i will bump it up in priority a bit. :D
Yup, i will try to post an update here if i manage to get it up and running.
Basically my plan is to make a seed that builds a web app and a desktop app (modular in a way that its easy to just do one and not the other, and not add any more functionality besides that). Also integration with phonegap if i feel like it (i prefer phonegap over nativescript). Any other features or libraries are really upto the end user, just give them clear instructions on how to integrate them. Also i liked separate /src/client code from /src/electron code. Ontop of that, an easy was to add npm libraries to use with electron (which is really confusing on the other project). Lets see how i go :D

@mgechev
After a bit of debugging i figured it out. it was a bit obvious really. Since electron apps run by calling the index.html by file not by domain/host like a web server, you cant do html5 routing (dah). so essentially (if your project was at E:/projects/angular2-seed/dist/dev/index.html) a route of /about would try look for a file file:///E:/about which would generate an error (although it would navigate within angular2, it will fail to fetch that file obviously, no big deal but i dont like errors). Default route wont work either unless you setup some fallback 404 route. Simply by setting angular2 to use hash routing you fix all that.
hash routing steup looks something like this: routerModule = RouterModule.forRoot(routes, {useHash: true});... do a search for some of that text within the NathanWalkers advance seed to figure out where it goes.
I do have couple of minor errors i need to get rid of, but those should be easy enough to debug. So, hopefully, anyone else wanting to setup electron with this project, this topic should give all the info required to do so.
If i come across any other dead ends, i will post here, and later chuck it in a github project and post the link here for you guys to share around. @mgechev great seed project btw 👍


[Bug]: Kaggle embeddings dont work at all

What happened?
Hey tried to pull some embeddings by using that:
!wget -O /kaggle/working/stable-diffusion-webui/embeddings/bad_prompt.pt -L https://huggingface.co/Nevo399/c1/blob/main/bad_prompt.pt
output was --2023-03-08 11:02:21--  https://huggingface.co/Nevo399/c1/blob/main/EasyNegative.safetensors Resolving huggingface.co (huggingface.co)... <IP_ADDRESS>, <IP_ADDRESS>, 2600:1f18:147f:e850:e203:c458:10cd:fc3c, ... Connecting to huggingface.co (huggingface.co)|<IP_ADDRESS>|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 37179 (36K) [text/html] Saving to: ‘/kaggle/working/stable-diffusion-webui/embeddings/EasyNegative.safetensors’  so all good.
Did it just after first code is done and recieved error like console log. After that i was digging a bit for solution and i found this post but didnt helped, that was helping people which was doing it on desktop pc, and not on kaggle... Also tried add embeddings on other versions which people made on kaggle and its still same error. Google colab works fine and there is no issue but on kaggle is.
If someone who knows whats wrong please help...
Console logs
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:53)
[GCC 9.4.0]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI

Launching Web UI with arguments: --share --xformers --enable-insecure-extension-access --theme dark --gradio-queue
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
Loading weights [a504b5b137] from /kaggle/working/stable-diffusion-webui/models/Stable-diffusion/anything-v4.5-vae-swapped.safetensors
Creating model from config: /kaggle/working/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying xformers cross attention optimization.
Error verifying pickled file from /kaggle/working/stable-diffusion-webui/embeddings/bad_prompt.pt:
Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/safe.py", line 81, in check_pt
    with zipfile.ZipFile(filename) as z:
  File "/opt/conda/lib/python3.7/zipfile.py", line 1258, in __init__
    self._RealGetContents()
  File "/opt/conda/lib/python3.7/zipfile.py", line 1325, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/safe.py", line 135, in load_with_extra
    check_pt(filename, extra_handler)
  File "/kaggle/working/stable-diffusion-webui/modules/safe.py", line 102, in check_pt
    unpickler.load()
_pickle.UnpicklingError: invalid load key, '<'.

-----> !!!! The file is most likely corrupted !!!! <-----
You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.

Error loading embedding bad_prompt.pt:
Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 206, in load_from_dir
    self.load_from_file(fullfn, fn)
  File "/kaggle/working/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 164, in load_from_file
    if 'string_to_param' in data:
TypeError: argument of type 'NoneType' is not iterable

Error verifying pickled file from /kaggle/working/stable-diffusion-webui/embeddings/EasyNegative.pt:
Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/safe.py", line 81, in check_pt
    with zipfile.ZipFile(filename) as z:
  File "/opt/conda/lib/python3.7/zipfile.py", line 1258, in __init__
    self._RealGetContents()
  File "/opt/conda/lib/python3.7/zipfile.py", line 1325, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/safe.py", line 135, in load_with_extra
    check_pt(filename, extra_handler)
  File "/kaggle/working/stable-diffusion-webui/modules/safe.py", line 102, in check_pt
    unpickler.load()
_pickle.UnpicklingError: invalid load key, '<'.

-----> !!!! The file is most likely corrupted !!!! <-----
You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.

Error loading embedding EasyNegative.pt:
Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 206, in load_from_dir
    self.load_from_file(fullfn, fn)
  File "/kaggle/working/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 164, in load_from_file
    if 'string_to_param' in data:
TypeError: argument of type 'NoneType' is not iterable

Error loading embedding EasyNegative.safetensors:
Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 206, in load_from_dir
    self.load_from_file(fullfn, fn)
  File "/kaggle/working/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 159, in load_from_file
    data = safetensors.torch.load_file(path, device="cpu")
  File "/opt/conda/lib/python3.7/site-packages/safetensors/torch.py", line 98, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
Exception: Error while deserializing header: HeaderTooLarge

Textual inversion embeddings loaded(0):
Model loaded in 6.7s (create model: 5.3s, apply weights to model: 1.3s).

Is there an existing issue for this?

[X] I have searched the existing issues and checked the recent builds/commits

Are you using the latest version of the colab notebook?

[X] Yes, i am using the latest version from the repo

Which colab notebook did you use?
https://www.kaggle.com/code/camenduru/stable-diffusion-webui-kaggle
Which repo branch did the colab you use comes from ?
v2.0
Which tunnel did you use ?
--share (Gradio Tunnel)
What browsers do you use to access the WebUI ?
Google Chrome

sorry fixed issue by downloading embeddings from original source, not from my copied files, dont know why but it worked.


when i used system dependencies (2.A) to build LuisaRender and its python binding it have some problem

when i use:cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D PYTHON_VERSIONS=3.9 -D LUISA_COMPUTE_DOWNLOAD_NVCOMP=ON -D LUISA_COMPUTE_ENABLE_GUI=OFF
it show:--```
Found pybind11: /home/han/mambaforge/envs/genesis/include (found version "2.13.6")
-- Configuring done (0.7s)
-- Generating done (0.3s)
-- Build files have been written to: /home/han/Genesis/genesis/ext/LuisaRender/build
then
i use:`cmake --build build -j $(nproc)`
it show:```
warning: `luisa_compute_backend_impl` (lib) generated 10 warnings
error: could not compile `luisa_compute_backend_impl` (lib) due to 4 previous errors; 10 warnings emitted
make[2]: *** [src/compute/src/rust/CMakeFiles/luisa_compute_rust_build_embree.dir/build.make:147: src/compute/src/rust/rust/release/libluisa_compute_ir_static.a] Error 101
make[2]: *** Deleting file 'src/compute/src/rust/rust/release/libluisa_compute_ir_static.a'
make[1]: *** [CMakeFiles/Makefile2:2186: src/compute/src/rust/CMakeFiles/luisa_compute_rust_build_embree.dir/all] Error 2
[ 46%] Building CXX object src/compute/src/osl/CMakeFiles/luisa-compute-osl.dir/oso_parser.cpp.o
/usr/bin/ld: CMakeFiles/luisa-cuda-nvrtc-standalone-compiler.dir/cuda_nvrtc_compiler.cpp.o: in function `main':
cuda_nvrtc_compiler.cpp:(.text.startup+0x173): undefined reference to `nvrtcGetOptiXIRSize'
/usr/bin/ld: cuda_nvrtc_compiler.cpp:(.text.startup+0x197): undefined reference to `nvrtcGetOptiXIR'
collect2: error: ld returned 1 exit status
make[2]: *** [src/compute/src/backends/cuda/CMakeFiles/luisa-cuda-nvrtc-standalone-compiler.dir/build.make:104: bin/luisa_nvrtc] Error 1
make[1]: *** [CMakeFiles/Makefile2:2576: src/compute/src/backends/cuda/CMakeFiles/luisa-cuda-nvrtc-standalone-compiler.dir/all] Error 2
[ 46%] Linking CXX shared library ../../../../bin/liblc-ir-v2.so
[ 46%] Built target luisa-compute-ir-v2
[ 46%] Linking CXX shared library ../../../../bin/liblc-tensor.so
[ 46%] Built target luisa-compute-tensor
[ 46%] Linking CXX shared library ../../../../bin/liblc-osl.so
[ 46%] Built target luisa-compute-osl
make: *** [Makefile:136: all] Error 2

how i solve this problem

It looks like you don't have or have the wrong cuda runtime compilation library
usr/bin/ld: CMakeFiles/luisa-cuda-nvrtc-standalone-compiler.dir/cuda_nvrtc_compiler.cpp.o: in function `main':
cuda_nvrtc_compiler.cpp:(.text.startup+0x173): undefined reference to `nvrtcGetOptiXIRSize'
/usr/bin/ld: cuda_nvrtc_compiler.cpp:(.text.startup+0x197): undefined reference to `nvrtcGetOptiXIR'

Please check the FAQ and see if that fixes the issue.

It looks like you don't have or have the wrong cuda runtime compilation library
usr/bin/ld: CMakeFiles/luisa-cuda-nvrtc-standalone-compiler.dir/cuda_nvrtc_compiler.cpp.o: in function `main':
cuda_nvrtc_compiler.cpp:(.text.startup+0x173): undefined reference to `nvrtcGetOptiXIRSize'
/usr/bin/ld: cuda_nvrtc_compiler.cpp:(.text.startup+0x197): undefined reference to `nvrtcGetOptiXIR'

Please check the FAQ and see if that fixes the issue.

it maybe i have not OptiX sdk?

To support functions like nvrtcGetOptiXIRSize, you should update your CUDA Toolkit to version 12.0 or higher. The link in the document will be updated soon to NVIDIA's CUDA 12.1.0 download archive.
Additionally, Issues #275 and #194 might be helpful to ensure your CUDA Toolkit is correctly installed.

To support functions like nvrtcGetOptiXIRSize, you should update your CUDA Toolkit to version 12.0 or higher. The link in the document will be updated soon to NVIDIA's CUDA 12.1.0 download archive.
Additionally, Issues #275 and #194 might be helpful to ensure your CUDA Toolkit is correctly installed.

OK, i got it！ Thanks a lot !  :)


Discrepancy between default tile overlap in code and documentation

The default overlap is 0px, but elsewhere it's documented as 2px. And again here.
I can make a pull request if you let me know which is desired, or it's a pretty trivial fix otherwise.

I would fix the documentation and  not change the default. Would love a PR, thanks!


BUG-Case sensitivity with mail adresses

e-mail addresses should not be case-sensitive when sending and receiving

Till will deoploy this

Duplicate of #224

Please fix again

<EMAIL_ADDRESS><EMAIL_ADDRESS>and<EMAIL_ADDRESS>should all be treated as<EMAIL_ADDRESS>

Yes, very URGENT. Who resolves it, @tillprochaska @mattwr18 @roschaefer @phoeinx ?

I’m pretty sure the issue you reported isn’t related to case-sensitive/insensitive addresses as contributors aren’t receiving our emails. Case-insensitive addresses are only important when we receive new emails, as we need to match the senders email address to the addresses in our database.
I’ll keep this open though until I’ve had a closer look at the problems. I guess it’s related to general deliverability/spam issues.

Short question - what is the exact issue Till is referring to with "contributors aren't receiving our emails" - as in not at all? Couldn't find a bug report / issue for that (at least none that is open) and no mention in Slack, where have I forgotten to look / overlooked ?

@phoeinx @mattwr18 I added you to our feedback channel in Slack. In this case, Isa posted there to let us know about this issue.


Adding files API

Adding files API to the frontend.

can you please assign this issue to me? @goliakshay357


Add support for multiple buffer selection on /buffer slash command

Description
This PR adds support for selecting multiple buffers when using the /buffer slash command with Telescope provider. Users can now select multiple buffers in Telescope and add their contents to the chat in a single operation.
Screenshots

Checklist

[x] I've read the CONTRIBUTING guidelines.

@olimorris
Let me know if it needs adjustments.

@andtankian this is awesome!! Thanks so much.

Could you tell me how to configure this feature in Telescope? Thanks. @andtankian

@amojury
This is my codecompanion setup with lazy:
{
  "olimorris/codecompanion.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-treesitter/nvim-treesitter",
    "hrsh7th/nvim-cmp", -- Optional: For using slash commands and variables in the chat buffer
    "nvim-telescope/telescope.nvim", -- Optional: For using slash commands
    { "stevearc/dressing.nvim", opts = {} }, -- Optional: Improves `vim.ui.select`
  },
  opts = {
    display = {
      chat = {
        show_header_separator = false,
      },
    },
    strategies = {
      chat = {
        adapter = "anthropic",
        slash_commands = {
          ["buffer"] = {
            opts = {
              provider = "telescope", //you need that part
            },
          },
        },
      },
      inline = {
        adapter = "anthropic",
      },
      agent = {
        adapter = "anthropic",
      },
    },
  },
}


OAK-10517 : Consistently clean membership when switch between default and dynamic sync

@nscendoni , @telegrapher i would appreciate if you could review the proposed fix.

@nscendoni , as discussed in private i corrected the misleading comment in testDefaultSyncClearsDynamicProperties... the usual copy-paste-and-forget-to-adjust


LGTM.com - false positive - dereferenced-value-may-be-null

Description of the false positive

orderBy.toStringOrderByElements(b);
Variable orderBy may be null here as suggested by this null guard.

But orderBy is initialized as a final instance variable using:
private final OrderByClause orderBy = new OrderByClause();
Therefore it definitely has a value.
URL to the alert on the project page on LGTM.com
https://lgtm.com/projects/g/JSQLParser/JSqlParser/snapshot/3804d2aedced2cf3b77931c83466402820cc0283/files/src/main/java/net/sf/jsqlparser/expression/AnalyticExpression.java?sort=name&dir=ASC&mode=heatmap#xda2d6e92c3feee7e:1

You are completely right that orderBy definitely is non-null, so this is indeed a FP.  But the subsequent null check that the alert points to is also clearly superfluous (and a false negative for the superfluous null check query).  I'll take a look at fixing this.

You are so right. Now we both have something to fix ;).


multi-layer (hierarchical) trigger support

Second attempt at fixing ClockCycles by adding support for layered triggers.
This is cleaner than the first attempt I made.  A simple testbench is included too.
Key changes proposed:

Triggers now have private list of callbacks, allowing multiple externals to use the trigger (ie, the scheduler plus any layered triggers).
One user of a trigger can unprime the trigger without impacting another user of the trigger.  This is accomplished by passing the callback with the unprime call.
A layered trigger may or may not require advancing the simulator, depending upon whether any sub-triggers are GPITriggers.  The scheduler now calls trigger.needs_advance() to determine if advancing is required. (GPITriggers always return True.  Others return False unless dependent upon GPITriggers.)  This was the primary flaw in the first attempt made - not advancing after a layered trigger.
The callback mechanism currently passes back the trigger that fired.  Since the callback is a member of said trigger, it should no longer be necessary to have the trigger passed up from the lower levels (simulator or C code?).  I made no attempt to alter this, though.  An assert is present to verify that the passed up trigger is in fact self.
The trigger which fires now self-clears before calling the callbacks.  This behavior is consistent with comments that were in the scheduler (now removed).
Minor tweak made to sample VHDL code to provide an output valid signal to fire triggers against.

Applies to issue #520, replaces pull request #535.

@putsplut This looks good, I need to have a more in depth look but seems promising.

i know this has been hanging out for a while, but the original issue #520 still seems to exist in the latest master.

I manually merged this branch (on top of the changes from PR #565, which were since merged into master), and have been running with it since last November. It seems to be working really well, I haven't noticed any issues.
It would be awesome if this could be merged.

Hi, sorry this has been around so long it think it looks good, I just want to do some testing on some of out regressions.

Sorry to nag, but any chance of this being merged soon?
Would it help if someone rebased and sorted out the merge conflicts?

I have tests that also require this update.

Well, if it helps, I have rebased this against current cocotb in #642. It seems to still work, as far as I can tell-- additional testing would be appreciated.

Closing in favor of  #642.


.\Subfolder  specification $(OutPath)

Dears,
is there a way, how to process whole folder structure using one XML configuration file (preserving the structure)?
For instance
<Obfuscator>
  <Var name="InPath" value=".\MyApp\bin\Release" />
  <Var name="OutPath" value="\Build" />

  <Module file="$(InPath)\MyApp.exe" />
  <Module file="$(InPath)\SubDir\plugin1.dll" />
  <Module file="$(InPath)\SubDir\Plugin2.dll" />
</Obfuscator>

with
 .\Build\MyApp.exe
 .\Build\SubDir\plugin1.dll
 .\Build\SubDir\plugin2.dll

as a result.
Thanks a lot!
Frunta.

You might keep multiple configuration files, while sharing common fragment file(s) among them,
http://docs.obfuscar.com/en/latest/getting-started/configuration.html#configuration-fragments-2-2-5


Please provide an option to change notification sound

Please provide an option so we can change the notification sound. I don't want to disable the annoying sound but I want to change it. Maybe something like we can select and locate the wav file in our desktop so we can provide a notification sound that we like. thanks!

That would be a great feature, but it requires some work (not a priority right now)
Meanwhile please see the beta: https://github.com/Aluxian/Facebook-Messenger-Desktop/issues/458


[in_app_purchase] iOS storekit_duplicate object issue

Since iOS 14 I can't seem to finishTransaction for failed purchases. This will happen if you buy a product then cancel it, this one will stay on SKPaymentTransactionQueue. However re-running the debugger will clear out the transactions.
Steps to reproduce:

Buy a product
Cancel the payment screen.
Buy the product again, nothing will happen (Payment Dialog will not pop out)

I tried this with in_app_purchase v0.3.4+8 and v.0.3.4+9 same thing.
Previously before iOS 14 this is not happening. Need help please.
Previously just by calling .completePurchase() for iOS its working properly.
I'm also clearing the SKTransactionQueue with this code
Future<void> clearIOSTransactions() async {
    // clear the transaction queue for failed completeTransaction or finishTransaction
    final transactions = await SKPaymentQueueWrapper().transactions();
    print("SkTransactionCount: ${transactions.length}");
    for (final transaction in transactions) {
      if (transaction.transactionState !=
          SKPaymentTransactionStateWrapper.purchasing) {
        await SKPaymentQueueWrapper().finishTransaction(transaction);
      }
    }
  }

@zodiark23
Please provide flutter doctor -v.
Thanks.

@darshankawar
✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Mac OS X 10.15.6 19G2021, locale en-PH)
    • Flutter version 1.22.0-12.1.pre at /Users/reyan/Documents/Development/flutter
    • Framework revision 8b3760638a (2 weeks ago), 2020-09-15 17:47:13 -0700
    • Engine revision 4654fc6cf6
    • Dart version 2.10.0 (build 2.10.0-110.3.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/reyan/Library/Android/sdk
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 46.0.3
    • Dart plugin version 201.7223.43

[✓] VS Code (version 1.45.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.12.2

[✓] Connected device (1 available)
    • Reyan’s iPhone (mobile) • 9XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1 • ios • iOS 14.0
    ! Error: Reyan’s iPhone is busy: Copying cache files from device. Xcode will continue when Reyan’s iPhone is finished. (code -10)

• No issues found!

If it helps i can see this error logs when i run the code via xcode ( since i can't  run it on debug just white screen)
2020-09-30 15:05:56.145736+0800 Runner[3063:993843] flutter: Purchase Status: PurchaseStatus.pending
2020-09-30 15:06:00.920292+0800 Runner[3063:995011] <SKPaymentQueue: 0x283611000>: Payment completed with error: Error Domain=ASDErrorDomain Code=907 "Unhandled exception" UserInfo={NSUnderlyingError=0x283b0fb70 {Error Domain=AMSErrorDomain Code=6 "Payment Sheet Failed" UserInfo={NSLocalizedDescription=Payment Sheet Failed, NSLocalizedFailureReason=Payment sheet cancelled}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}
2020-09-30 15:06:00.925677+0800 Runner[3063:993843] flutter: Purchase Status: PurchaseStatus.error
2020-09-30 15:06:00.935201+0800 Runner[3063:993843] [VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: PlatformException(storekit_invalid_argument, Argument type of finishTransaction is not a string., null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
<asynchronous suspension>
#2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
#3      SKPaymentQueueWrapper.finishTransaction (package:in_app_purchase/src/store_kit_wrappers/sk_payment_queue_wrapper.dart:106:19)
#4      AppStoreConnection.completePurchase (package:in_app_purchase/src/in_app_purchase/app_store_connection.dart:68:10)
#5      StoreBloc._listenToPurchaseUpdated.<anonymous closure> (package:volumeup/blocs/storeBloc.dart:169:18)
#6      List.forEach (dart:core-patch/growable_array.dart:313:8)
#7      StoreBloc._listenToPurchaseUpdated (package:volumeup/blocs/storeBloc.dart:155:25)
#8      StoreBloc.initialState.<anonymous closure>.<anonymous closure> (package:volumeup/blocs/storeBloc.dart:82:9)
#9      _rootRunUnary (dart:async/zone.dart:1198:47)
#10     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#11     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
#12     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
#13     _DelayedData.perform (dart:async/stream_impl.dart:611:14)
#14     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:730:11)
#15     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:687:7)
#16     _rootRun (dart:async/zone.dart:1182:47)
#17     _CustomZone.run (dart:async/zone.dart:1093:19)
#18     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#19     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#20     _rootRun (dart:async/zone.dart:1190:13)
#21     _CustomZone.run (dart:async/zone.dart:1093:19)
#22     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#23     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

@zodiark23 thanks for the logs.
Can you upgrade to latest beta and check again ? There were few issues resolved to iOS14 in latest version.
Thanks.

I'll try again. I'll give you an update

@darshankawar same thing with latest of beta version.
When I cancel the payment screen. (I'll mark it complete for iOS and this error is happening)
2020-10-01 11:38:15.656406+0800 Runner[4578:1269438] flutter: Purchase Status: PurchaseStatus.pending
2020-10-01 11:38:21.504451+0800 Runner[4578:1270955] <SKPaymentQueue: 0x2815dc010>: Payment completed with error: Error Domain=ASDErrorDomain Code=907 "Unhandled exception" UserInfo={NSUnderlyingError=0x2818ed140 {Error Domain=AMSErrorDomain Code=6 "Payment Sheet Failed" UserInfo={NSLocalizedDescription=Payment Sheet Failed, NSLocalizedFailureReason=Payment sheet cancelled}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}
2020-10-01 11:38:21.512931+0800 Runner[4578:1269438] flutter: Purchase Status: PurchaseStatus.error
2020-10-01 11:38:21.520484+0800 Runner[4578:1269438] [VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: PlatformException(storekit_invalid_argument, Argument type of finishTransaction is not a string., null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
<asynchronous suspension>
#2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
#3      SKPaymentQueueWrapper.finishTransaction (package:in_app_purchase/src/store_kit_wrappers/sk_payment_queue_wrapper.dart:106:19)
#4      AppStoreConnection.completePurchase (package:in_app_purchase/src/in_app_purchase/app_store_connection.dart:68:10)
#5      StoreBloc._listenToPurchaseUpdated.<anonymous closure> (package:volumeup/blocs/storeBloc.dart:169:18)
#6      List.forEach (dart:core-patch/growable_array.dart:313:8)
#7      StoreBloc._listenToPurchaseUpdated (package:volumeup/blocs/storeBloc.dart:155:25)
#8      StoreBloc.initialState.<anonymous closure>.<anonymous closure> (package:volumeup/blocs/storeBloc.dart:82:9)
#9      _rootRunUnary (dart:async/zone.dart:1198:47)
#10     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#11     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
#12     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
#13     _DelayedData.perform (dart:async/stream_impl.dart:611:14)
#14     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:730:11)
#15     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:687:7)
#16     _rootRun (dart:async/zone.dart:1182:47)
#17     _CustomZone.run (dart:async/zone.dart:1093:19)
#18     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#19     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#20     _rootRun (dart:async/zone.dart:1190:13)
#21     _CustomZone.run (dart:async/zone.dart:1093:19)
#22     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#23     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

May be related to https://github.com/flutter/flutter/issues/61047

Same thing @zodiark23 mentioned happened to me yesterday. Any workaround guys ?

@DangKhoi1997  I haven't found any workaround, and we're starting our testing haha. @darshankawar should we wait another release of in_app_purchase?

Haha it still works well in android . Yesterday i thought i did something wrong in my code but no :)) . Let wait for the next version of it .

I'm also seeing this. After a purchase has been cancelled, a new purchase cannot be started for the same product. After rebooting the app it works again, but the same thing happens when you cancel.

@darshankawar I manage to get another iphone with iOS 12.4.8 and this is not happening. I didn't change anything and same version and same flutter version. Looks like this is only on iOS 14 issue.

I can confirm. Only happens on iOS 14.

@darshankawar I don't know if this is relevant, but I've only tried this with testflight users for which the purchases are free. I can't test this with "real" users because the version of our app using the new version of this library is not yet in production. This doesn't happen with v0.3.4+3 that's currently in production for our app.

@zodiark23 Should the title of this issue be modified to say something like "cannot start a new purchase after cancelling on iOS" so that other people also find this easier? That's the problem people will encounter first. For example I found this issue by going through all issues in desperation :smile:

This is the same issue as #66253

@koskimas I was initially thinking of doing that, however when i try to buy the item again this error pops out

Just created a potential fix for this issue https://github.com/flutter/plugins/pull/3106

Thanks @dennis-tra hope it gets merged soon

@koskimas Thanks for identifying the similar issue.
@zodiark23 I am going ahead and closing this in favor of 66253 as duplicate. Please follow-up there for updates and any questions.
If you disagree or think this was closed by mistake and should have kept open, please write in comments and I'll reopen.


Update ionic.tdcards.js

Oops, didn't realize I was committing to the hacking branch. This pull request is to master.
"Found another typo. changed "getSwipebleCard" to "getSwipeableCard"
This may break demos/examples, so other changes may need to be made to compensate for this change."

Thanks!


Error happned from the conbination of railties-5.0.2 and minitest 5.10.2

Look at this Travis result of the spring-watcher-listen.
https://travis-ci.org/jonleighton/spring-watcher-listen/builds/231076403
Latest Travis CI
https://travis-ci.org/jonleighton/spring-watcher-listen/builds/231076403
/home/travis/build/jonleighton/spring-watcher-listen/test/apps/gems/2.4.1/gems/railties-5.0.2/lib/rails/test_unit/minitest_plugin.rb:9:in `aggregated_results': wrong number of arguments (given 1, expected 0) (ArgumentError)

The problem is
railties 5.0.2 (railties-5.0.2/lib/rails/test_unit/minitest_plugin.rb:9) is overwriting aggregated_results without argument.
module Minitest
  class SuppressedSummaryReporter < SummaryReporter
    # Disable extra failure output after a run if output is inline.
    def aggregated_results
      super unless options[:output_inline]
    end
  end
  ...

But latest version minitest 5.10.2 that has been released at May 09 2017 (2 days ago), changed aggregated_results to set 1 argument.
https://github.com/seattlerb/minitest/commit/c6ba2afd90473b76d289562edd24f7d7ca8484f9
So, right now we should not use minitest 5.10.2.

https://github.com/rails/rails/pull/29022

It is this commit: https://github.com/rails/rails/commit/a6dba93

It looks that tomorrow fixed version rails will be released.
https://github.com/rails/rails/issues/29038

The rails fixed version 5.0.3 or 5.1.1 were released.


Feature Request: Tracker output type: CSV or list per day

Great plug-in.
I checked roadmap and found a output type = list on that list. If what I am describing is similar to that, please close this and quick confirmation would be great.
Example file:
2023-01-01.md
#weight:74
#meditation: 1
2023-01-02.md
#weight:73.5
#meditation: 1
2023-01-03.md
#weight:74.2
#meditation: 0
Suggested use case
searchType: tag
searchTarget: weight, meditation
csv:

Suggested output:
Date,weight,meditation
2023-01-01,74,1
2023-01-02,73.5,1
2023-01-03,74.2,0
Please let me know if this is achievable today or if it is on roadmap? If not, Can I suggest to add this?
Right now, This will help with getting away from excel/google sheets tracking in a simple table format. Also this would be helpful to export the data outside of the notes as well.
Thanks.

This would be great.

This would be amazing. Commenting to hopefully revive!


Adds the 'JavaScript Testing Fundamentals' course

Hacktoberfest notes:

due to volume of submissions, we may not be able to review PRs that do not pass tests and do not have informative titles.
please read our contributing guidelines
be sure to check the output of Travis-CI for linter errors
if this is your first open source contribution, make sure it's not your last!

What does this PR do?
Add Resource(s)
For resources
Description
Adds the free 'JavaScript Testing Fundamentals' course on JavaScript testing from https://vueschool.io
Why is this valuable (or not)?
This is an excellent introductory course to JavaScript testing which covers why testing is important, should be tested and the testing jargon that one needs to understand. This includes the concepts of mocks, stubs and spies.
How do we know it's really free?
You can directly access the site and go through the entire course without even having to create an account. Though there is an option on the site to create an account and go for advanced paid features for people who might want it, it's not at any detriment to going through the course. I have personally gone through the entire course without creating any account or signing up to the site and the experience was quite good.
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[x] Not a duplicate
[ ] Included author(s) if appropriate
[x] Lists are in alphabetical order
[ ] Needed indications added (PDF, access notes, under construction)

It's not helpful to add a category for a single resource. Try to find another category.

@eshellman I have now moved the Javascript Testing course under the Vue.js section since the course uses Vue.js as a base for the course's base. Please review.

please resolve conflicts.

@eshellman I have resolved the conflicts now. Please check!

Thanks!


How worse is the performance of CornerNet if it is configured as only one stack of Houglass Net?

Thanks for your excellent contribution. In CornerNet, 2 stacks of Hourglass is employed for keypoint detection. I'm intereseted in how better or worse if CornerNet is configured as 1 stack or 3 stacks? Or, is '2 stacks Hourglass' configuration the minimum requirement for Key Point detection？Thanks.

@ZSQflower don't know if you've seen it, but the authors of the original Stacked Hourglass Networks paper do a bit of analysis on this, shown in figures 8 and 9.  Their results suggest that a network should still be able to converge and perform reasonably well with a single hourglass, but that there is a noticeable difference (albeit a diminishing one) in performance as more hourglass networks are added.

How to modify the network to only one stack of Houglass Net?Thanks.


Benchmark about PVSG

Hi，sorry for asking here.
Could you please tell me when will you release the datasets and baseline of OpenPVSG.

Please send an email to Jingkang. It's unlikely for him to answer questions about another project here.


assertThat(actual).usingRecursiveComparison().ignoringAllOverriddenEquals().isEqualTo(expected) does not verify fields in a parent class

Summary
I've come across an interesting behavior of recursive comparison in assertj library. If you compare objects of classes that are sub-classes, fields of super classes seem to be skipped during the comparison. Is that a known issue? Or am I doing something wrong? Here is a brief example:
Example
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;

public class ExampleTest {

  @Test
  public void test() {
    MyException expected =
            new MyException("Expected text message");
    MyException actual = new MyException("Actual text message"); //values for the field Throwable.detailMessage are different
    assertThat(actual).usingRecursiveComparison().ignoringAllOverriddenEquals().isEqualTo(expected);
  }
}

class MyException extends RuntimeException {

  MyException(String message) {
    super(message);
  }
}

This test will pass when actually it should not as actual.getMessage() and expected.getMessage() will return different values.

Thanks for reporting this, I'm going to have a look at it shortly.

Thanks for the prompt answer!
Seems I've found the reason.
Apparently, the lib skips comparison of the fields that are inherited from superclasses that reside in java.lang. As MyException is using a detailMessage field inherited from java.lang.Throwable, it is skipped. Here is the code from org.assertj.core.internal.Objects that seems to be responsible for such a behavior:

/**

Returns the declared fields of given class and its superclasses stopping at superclass in java.lang
package whose fields are not included.

@param clazz the class we want the declared fields.
@return the declared fields of given class and its superclasses.
*/
public static Set getDeclaredFieldsIncludingInherited(Class clazz) {
checkNotNull(clazz, "expecting Class parameter not to be null");
Set declaredFields = getDeclaredFieldsIgnoringSyntheticAndStatic(clazz);
// get fields declared in superclass
Class superclazz = clazz.getSuperclass();
while (superclazz != null && !superclazz.getName().startsWith("java.lang")) {
declaredFields.addAll(getDeclaredFieldsIgnoringSyntheticAndStatic(superclazz));
superclazz = superclazz.getSuperclass();
}
return declaredFields;
}

Awesome investigation @VasilyV, appreciated.
The reason was to avoid base types to be compared field by field, at some point you have to compare stuff normally.
In your case if we did not do that we would for example compare Throwable.backtrace fields which I think is not relevant (at least for most users).

@joel-costigliola Thank you for the nice explanation!

You can always use a specific comparator for a given type or field if you need to, see https://assertj.github.io/doc/#assertj-core-recursive-comparison-comparators

See also #1224 (seems to be a duplicate)

I faced similar behavior too and in my case it was custom exception class that extends RuntimeException also.
My propositions:

Add warning for such cases. If we have any type with parent from "java.lang" and does not have overriden or custom comparator then warning that comparing could be wrong.
Or add some property setting to allow counts such cases as failure.

It would be great if we could adjust AssertJ behaviour by some settings file and set custom comparator for all asserts and flag(s) to enable/disable raising warning/failure when we have type/class inherited from java.lang.* but don't have overrided equals or custom comparator.
Otherwise it's easy to forget and our test will be false green.

Closing since an explanation has been given.


Update Kerbulator compatibility

Closes KSP-CKAN/CKAN-meta#3166.

https://github.com/KSP-CKAN/CKAN-meta/commit/fe484b964d61c425907fb8dcce130e3f74002b49


server error<EMAIL_ADDRESS>

ENOSPC: no space left on device, mkdir '/tmp/0edbc77b4ac3f2d55a6f000a552635b686e5f1f0'

sorry about that, I fixed the backend

No worries, thanks!


Use openzipkin/jre-full as the base Docker image

As an implementation of https://github.com/openzipkin/docker-zipkin/issues/62
Comparing delitescere/jdk and openzipkin/jre-full: https://imagelayers.io/?images=delitescere%2Fjdk:1.8.0_60,openzipkin%2Fjre-full:1.8.0_60

fantastic. thanks!


Fix typos (in comments) and alignments

Current coverage is 73.92% (diff: 100%)

Merging #1105 into master will increase coverage by 1.07%

@@             master      #1105   diff @@
==========================================
  Files           127        125      -2
  Lines         18596      17017   -1579
  Methods        2604       2404    -200
  Messages          0          0
  Branches       2252       2051    -201
==========================================
- Hits          13547      12580    -967
+ Misses         4353       3826    -527
+ Partials        696        611     -85

Powered by Codecov. Last update a88bf4c...5235552


Pass width to image component

What is this PR trying to achieve?
Stops invalid srcset properties being generated, which was causing console errors

@jamesgorrie yeah, I'll do that in a separate PR


help: Add new "Writing messages" section, and improve message formatting intro and text emphasis documentation.

This is a slightly edited version of the first 3 commits in #24694. Should be ready for integration.

Sidebar sections

Message formatting (intro + first section)

Text emphasis page

This looks great, merged, thanks @alya!


having trouble in starting npm. Please help!

<EMAIL_ADDRESS>prestart C:\Users\Admin\Desktop\Angular2\Demo
npm run build

<EMAIL_ADDRESS>build C:\Users\Admin\Desktop\Angular2\Demo
tsc -p src/

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "b
uild"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>build: tsc -p src/
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>build script 'tsc -p src/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc -p src/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Admin\Desktop\Angular2\Demo\npm-debug.log
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>prestart: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>prestart script 'npm run build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Admin\Desktop\Angular2\Demo\npm-debug.log

This does not appear to be an issue with VS Code. Please try asking on stackoverflow


Error with Numpy after updating

Have just updated AppDaemon 4 to version 0.70 and this now longer works due to a problem with numpy...This is my error
`2021-08-22 13:47:39.252587 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/ad-spotify-mood-lights-sync/spotify_mood_lights_sync.py
2021-08-22 13:47:39.262484 WARNING Error: ------------------------------------------------------------
2021-08-22 13:47:39.263263 WARNING Error: Unexpected error loading module: /config/appdaemon/apps/ad-spotify-mood-lights-sync/spotify_mood_lights_sync.py:
2021-08-22 13:47:39.263943 WARNING Error: ------------------------------------------------------------
2021-08-22 13:47:39.274903 WARNING Error: Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/numpy/core/init.py", line 22, in
from . import multiarray
File "/usr/lib/python3.9/site-packages/numpy/core/multiarray.py", line 12, in
from . import overrides
File "/usr/lib/python3.9/site-packages/numpy/core/overrides.py", line 7, in
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 970, in check_app_updates
await utils.run_in_executor(self, self.read_app, mod["name"], mod["reload"])
File "/usr/lib/python3.9/site-packages/appdaemon/utils.py", line 308, in run_in_executor
response = future.result()
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 761, in read_app
self.modules[module_name] = importlib.import_module(module_name)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 855, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/appdaemon/apps/ad-spotify-mood-lights-sync/spotify_mood_lights_sync.py", line 5, in
import numpy as np
File "/usr/lib/python3.9/site-packages/numpy/init.py", line 150, in
from . import core
File "/usr/lib/python3.9/site-packages/numpy/core/init.py", line 48, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:

The Python version is: Python3.9 from "/usr/bin/python3"
The NumPy version is: "1.21.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'`

I'm not sure what exactly the problem is, but installing numpy as a system package instead of from the python packages seems to solve the issue for me:
system_packages:
  - py3-pillow
  - py3-numpy
python_packages:
  - spotipy
  - Pillow
init_commands: []


[BUG] DefaultAzureCredential failed to retrieve a token from the included credentials

Describe the bug
Currently we face an issue on our production, and we use DefaultAzureCredential to get access token by MSI, then use this token to access Azure Blob, but it may fail to get the token for sometimes, not all. Here is the callstack
Unhandled exception. Azure.Identity.CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token from the included credentials.

EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
ManagedIdentityCredential authentication unavailable. No Managed Identity endpoint found.
SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.
Visual Studio Token provider can't be accessed at C:\Users\ContainerAdministrator\AppData\Local.IdentityService\AzureServiceAuth\tokenprovider.json
Stored credentials not found. Need to authenticate user in VSCode Azure Account.
Please run 'az login' to set up account
---> System.AggregateException: Multiple exceptions were encountered while attempting to authenticate. (EnvironmentCredential authentication unavailable. Environment variables are not fully configured.) (ManagedIdentityCredential authentication unavailable. No Managed Identity endpoint found.) (SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.) (Visual Studio Token provider can't be accessed at C:\Users\ContainerAdministrator\AppData\Local.IdentityService\AzureServiceAuth\tokenprovider.json) (Stored credentials not found. Need to authenticate user in VSCode Azure Account.) (Please run 'az login' to set up account)
---> Azure.Identity.CredentialUnavailableException: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex)
at Azure.Identity.EnvironmentCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.EnvironmentCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.DefaultAzureCredential.GetTokenFromSourcesAsync(TokenCredential[] sources, TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
---> (Inner Exception #1) Azure.Identity.CredentialUnavailableException: ManagedIdentityCredential authentication unavailable. No Managed Identity endpoint found.
at Azure.Identity.ManagedIdentityClient.AuthenticateAsync(Boolean async, TokenRequestContext context, CancellationToken cancellationToken)
at Azure.Identity.ManagedIdentityCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex)
at Azure.Identity.ManagedIdentityCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.ManagedIdentityCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.DefaultAzureCredential.GetTokenFromSourcesAsync(TokenCredential[] sources, TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken)<---
....

Expected behavior
We expect the DefaultAzureCredential can always get token by MSI
Environment:
Our production run as a pod one AKS, and we use windows OS

AKS version:  1.19.7
Node windows version: aks-2019-datacenter-core-smalldisk-2102: 17763.1757.210220
Pod windows version: mcr.microsoft.com/windows/servercore:10.0.17763.1637

Actual behavior (include Exception or Stack Trace)
We also did some investigation to try to figure out the root cause, and we found it caused by TCPClient

Using the following code to repro

Environment.SetEnvironmentVariable("AzureServicesAuthConnectionString", "RunAs=App;AppId={test}");
Environment.SetEnvironmentVariable("AZURE_CLIENT_ID", "{test}");
var blobServiceClient = new BlobServiceClient(new Uri("https://{test}.blob.core.windows.net"), new DefaultAzureCredential());
var blobContainerClient = blobServiceClient.GetBlobContainerClient("test");
var blobClient = blobContainerClient.GetBlobClient("rawlog.txt");
var initialResponse = await blobClient.DownloadAsync();
var rawlogFile = $"rawlog-{Guid.NewGuid()}.txt";
using (var destination = File.Create(rawlogFile))
{
      await initialResponse.Value.Content.CopyToAsync(destination);
}
Console.WriteLine($"Download file to {rawlogFile}");

Using a powershell script to run the code on pod for 100 times
0..100 | ForEach-Object {.\MSITest.exe}

Result: It can repro this issue
PS C:\run> 0..100 | ForEach-Object {.\MSITest.exe}
Download file to rawlog-7040a57e-f4f5-451f-beed-07750e50b2fc.txt
Download file to rawlog-3fd3b9d0-d284-47d0-9318-695671232a2d.txt
....
Download file to rawlog-c17b7789-a03b-4dd8-9baa-ce7d47372859.txt
Download file to rawlog-3be4a0cc-952a-4aa7-9698-2ba8b8278035.txt
Unhandled exception. Azure.Identity.CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token from the included credentials.

EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
ManagedIdentityCredential authentication unavailable. No Managed Identity endpoint found.
SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.
Visual Studio Token provider can't be accessed at C:\Users\ContainerAdministrator\AppData\Local.IdentityService\AzureServiceAuth\tokenprovider.json
Stored credentials not found. Need to authenticate user in VSCode Azure Account.
Please run 'az login' to set up account

We contact Azure support, and get some information from MSI team. According to the logs of MSI service, the app only sends a request to connect, but doesn't send anything to acquire the access token. So we think this is caused by TCP connection, and we check the source code in DefaultAzureCredential

https://github.com/Azure/azure-sdk-for-net/blob/2a0a498df4b066bd836d1130e2c415632f1f5010/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs#L40
Since it uses TcpClient to try to connect MSI, then we use the following code to test again
using var client = new TcpClient();
var clock = new Stopwatch();
clock.Start();
client.ConnectAsync(IPAddress.Parse("<IP_ADDRESS>"), 80).GetAwaiter().GetResult();
clock.Stop();

if (client.Connected)
{
    Console.WriteLine($"Connect to <IP_ADDRESS>, elapsed time {clock.ElapsedMilliseconds}ms");
}
else
{
    Console.WriteLine($"Failed to connect to <IP_ADDRESS>, elapsed time {clock.ElapsedMilliseconds}ms");
}

Using powershell to run this code on pod for 100 times
0..100 | ForEach-Object {.\MSITest.exe}

Result:
PS C:\run> 0..100 | ForEach-Object {.\MSITest.exe}
Connect to <IP_ADDRESS>, elapsed time 29ms
Connect to <IP_ADDRESS>, elapsed time 23ms
Connect to <IP_ADDRESS>, elapsed time 24ms
Connect to <IP_ADDRESS>, elapsed time 23ms
Connect to <IP_ADDRESS>, elapsed time 23ms
...
Connect to <IP_ADDRESS>, elapsed time 3046ms
Connect to <IP_ADDRESS>, elapsed time 23ms
Connect to <IP_ADDRESS>, elapsed time 29ms
Connect to <IP_ADDRESS>, elapsed time 23ms
Connect to <IP_ADDRESS>, elapsed time 24ms
..
Connect to <IP_ADDRESS>, elapsed time 49ms
Connect to <IP_ADDRESS>, elapsed time 24ms
Connect to <IP_ADDRESS>, elapsed time 25ms
Connect to <IP_ADDRESS>, elapsed time 38ms
Connect to <IP_ADDRESS>, elapsed time 3025ms
Connect to <IP_ADDRESS>, elapsed time 24ms
Connect to <IP_ADDRESS>, elapsed time 25ms
Connect to <IP_ADDRESS>, elapsed time 25ms
...
Conclusion:
DefaultAzureCredential use 1s as timeout in souce code and according to the test, TCPClient may use about 3s to get response from MSI. In this case, the DefaultAzureCredential treats the MSI is unavaiable, then cannot get access token
https://github.com/Azure/azure-sdk-for-net/blob/2a0a498df4b066bd836d1130e2c415632f1f5010/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs#L20,

We want to use retry to workaround this issue, using following code

public class DefaultAzureCredentialWithRetry : TokenCredential
    {
        private const int IntervalSecondsBetweenRetry = 2;
        private DefaultAzureCredential defaultAzureCredential { get; set; }

        public DefaultAzureCredentialWithRetry()
        {
            defaultAzureCredential = new DefaultAzureCredential();
        }

        public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
        {
            return GetTokenAsync(requestContext, cancellationToken).GetAwaiter().GetResult();
        }

        public override async ValueTask<AccessToken> GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
        {
            return await Policy
                .Handle<CredentialUnavailableException>((ex) =>
                {
                    Console.WriteLine("Get CredentialUnavailableException and re-create a new DefaultAzureCredential");
                    defaultAzureCredential = new DefaultAzureCredential();
                    return true;
                })
                .WaitAndRetryAsync(4, retryAttempt => TimeSpan.FromSeconds(Math.Pow(IntervalSecondsBetweenRetry, retryAttempt)))
                .ExecuteAsync(async () =>
                {
                    return await defaultAzureCredential.GetTokenAsync(requestContext, cancellationToken);
                });
        }
    }

Result:
PS C:\run> 0..100 | ForEach-Object {.\MSITest.exe}
Download file to rawlog-461b232a-1363-46d3-861d-e4037044ae04.txt
Download file to rawlog-e9922d48-1866-4bba-a0b4-1ae6c64a9aae.txt
...
 Azure.Identity.CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token from the included credentials.

EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
ManagedIdentityCredential authentication unavailable. No Managed Identity endpoint found.
SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.
Visual Studio Token provider can't be accessed at C:\Users\ContainerAdministrator\AppData\Local.IdentityService\AzureServiceAuth\tokenprovider.json
Stored credentials not found. Need to authenticate user in VSCode Azure Account.
Please run 'az login' to set up account

But it doesn't work, because DefaultAzureCredential uses cache for the TCP connection result, always use the first connection result, it doesn't retry to connect MSI again
https://github.com/Azure/azure-sdk-for-net/blob/2a0a498df4b066bd836d1130e2c415632f1f5010/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs#L15, then it

This bug impacts the reliability of our production service. Unlike a classic web service, where the credentials are retrieved once on startup, we have a bunch of standalone executables that are constantly launching.
It seems like IMDS server does not throttle real HTTP requests, if we keep curling the IMDS endpoint, the response always succeed in about 130ms. As soon as there is a TCP probe made before the actual HTTP request, IMDS server consistently throttles the request once in a while.
The issue occured after switching from AzureServiceTokenProvider to DefaultAzureCredential, because AzureServiceTokenProvider does not do TCP probe. Is there any reason why DefaultAzureCredential must do a TCP probe before making the actual HTTP request?

Thank you for your feedback.  Tagging and routing to the team member best able to assist.

HI @wumingcp

We want to use retry to workaround this issue, using following code
But it doesn't work, because DefaultAzureCredential uses cache for the TCP connection result, always use the first connection result, it doesn't retry to connect MSI again
https://github.com/Azure/azure-sdk-for-net/blob/2a0a498df4b066bd836d1130e2c415632f1f5010/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs#L15

I'm not sure why your workaround fails, because the MSI result is only cached with the instance of a DefaultAzureCredential. If you are constructing a new one on each retry, it will try each time. To validate this, you could enable logging to see the result from each IMDS endpoint probe.
Alternatively, if you'd like to gate the initialization of your container on the availability of the endpoint, you could try this pod that waits for a 200 from the endpoint:


Add sign up banner at the end of blogs

Goal

Implement banner from frame 9 of the following design:
https://www.figma.com/file/Cy2eCZbmNZR3Debtl7wjo6/SuperTokens?node-id=63%3A190
Should be added at the end of each blog post

@mufassirkazi should this banner be added after the discord button at the end of a post?

should this banner be added after the discord button at the end of a post?

Tell nevil to make a secondary discord button inside the banner and remove the current discord button

What should be the analytics event for the button click?

Already there in the amplitude framework sheet at row 183

How should it appear on mobile view?

Please ask nevil. Give him the below image as reference

Any hover effects for the 'Sign Up' button?

The same colour change when you hover over the sign up button on homepage


Updating ACN vendor.

What this PR does / why we need it:
Vendoring ACN dependencies via godep.

I have approved. @sharmasushant please merge and close if you think it's good.


Bug in navbar

Hey, @codervivek5 There is a bug in navbar. Please assign me this issue. Thanks!

@codervivek5 Please assign me this issue so that I can start working on it.

@codervivek5 Please assign me this issue so that I can start working on it.


After inserts custom SQL

Problem:
To be able to write a custom SQL after the insert instructions
Possible configuration:
tables:
  transactional_users:
    applies_to: users, users_profiles
    after_inserts:
      - // Completed table $TABLE_NAME
      - COMMIT TRANSACTION;

The after-insert section could be: a single value or a list(or list of lists with any depth). The $TABLE_NAME placeholder should be replaced with the real table name.
The instructions order must not be changed, duplicates(if there are) must not be removed.

https://github.com/vkorobkov/jfixtures/pull/44


[enhancement] New category for sourceProvenance: machineGenerated

While building Dorion from sources #265771, a minified JS code is downloaded as an input source.
It is not a code written by a human being.
It is not meant to be readable by human beings (I had headaches trying to do it, believe me).
However it is not binary machine or bytecode either.
I suggest this new source type: machineGenerated.
Well, the name can be a bit misleading, given that bytecodes are machine-generated too. I am open to suggestions!

To introduce such a source type we need to clearly specify when it applies and when it does not and binaryBytecode is rather to be used.
Things i believe it should apply to:

Transpiled code that is a near or direct translation (YAML -> JSON)
Elaborated yet readable code (bison and flex output)
Human-readable text-format (web)assembly, generated by a templating language like m4, php or jinja

Things I believe it should not apply to:

Transpiled code that includes a lowering (Transcrypt)
Elaborated but lowered code (amaranth to yosys RTLIL or FIRRTL)
Obfuscated code (jsfuck)
Minified HTML, CSS and JS (simply unreadable, also usually includes much obfuscation)
Human-readable text-format (web)assembly, generated by a compiler

Well, I believe binaryBytecode is precisely applied for cases like JVM, in which the code is a soup of bytes to be read by a virtual machine not corresponding to a real world computer.
In this sense, strangely, binary files to be executed by MMIX from Knuth are binaryBytecode (since no one is crazy enough to implement it).
On the other hand, files from IOCCC are fromSource regardless their (lack of) readability.
Splitting this in two categories, {readable,unreadable}MachineGenerated is a good idea?
Further, there is at least one good reason to have the machineGenerated class: the Bootstrappable Project does not like machine-generated code like Haskell-to-C.

I don't think readable/unreadable is a good distinction. What i hoped to illustrate is that what we consider bytecode and not is kinda arbitrary.
consider cpython bytecode:
>>> def hello(a, b): return a + b
>>> hello.__code__.co_code
b'\x97\x00|\x00|\x01z\x00\x00\x00S\x00'
>>> import dis
>>> dis.dis(hello)
  1           0 RESUME                   0
              2 LOAD_FAST                0 (a)
              4 LOAD_FAST                1 (b)
              6 BINARY_OP                0 (+)
             10 RETURN_VALUE

In its binary form we consider it bytecode, but in its disassembled form one might very well consider it machine generated assembly. This bytecode is designed to run in the python runtime. Minified js, or maybe even jsfuck, is designed to run in the javascript runtime. Whether the parser is recursive or just a simple lookup table is really just an implementation detail of the runtime. binaryBytecode is machine generated code that requires a runtime or vm to run, as opposed to binaryNativeCode which is inherently platform dependent.

I don’t think there’s any real difference between binary native code and a machine-generated pile of C except that you can open one of them in a text editor. The difference with binary byte code is, I guess, that it is expected to run on a VM that may or may not have some kind of sandboxing? But I don’t really know why sourceProvenance is so elaborate, or what use the distinction would be to people; to me it’s just from source, or not from source.


Patch 2

Description
This pull request updates the CD path in the CI/CD workflow to [new path]. This change is necessary to ensure that the deployment process targets the correct environment.

Related Issue (Link to Github issue)

Motivation and Context
The current CD path is outdated and no longer points to the correct deployment target. This change is crucial for successful deployments and to prevent errors in the production environment.

How Has This Been Tested?

Screenshots (if appropriate - Postman, etc):

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

It’s not allowing for automatic merge, you’re need to update branch and create a new pr


QA from CI engine notification through API need write access

Description
Since gitea 1.16.9, it looks like the notification API for CI engines need write access to repositories code.
In my case, to secure our repositories, I would like the CI engine not having write access to repositories.
This configuration make the QA notification failing with invalid access.
In my configuration, I use the jenkins gitea plugin V1.4.3 with jenkins 2.356.
I wonder whether it is mandatory to make this API entry with write access mode ?
Sorry for not having anymore logs at the moment (I created dedicated groups for CI servers with write access since), I will try to reproduce the issue but I guess you know what I'm saying as it looks an expected feature.
Gitea Version
1.17.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
RHEL 8.6
How are you running Gitea?
from the binary provided on github official release
Database
MySQL

The behavior was changed by :

https://github.com/go-gitea/gitea/pull/20333
https://github.com/go-gitea/gitea/pull/20332

From my point of view:

Current approach also looks good to me. Requiring write permission is not wrong.
To relax the permission:

For a private Gitea repository, the read permission (all team members) is safe to update the commit status.
For a public Gitea repository, only team members could update the commit status, but not the non-team users.

I didn't look into details for this problem. These issues and PRs are by @leytilera  @KN4CK3R  @zeripath  @6543 , how do you think.

From my point of view:

Current approach also looks good to me. Requiring write permission is not wrong.
To relax the permission:

For a private Gitea repository, the read permission (all team members) is safe to update the commit status.
For a public Gitea repository, only team members could update the commit status, but not the non-team users.

I didn't look into details for this problem. These issues and PRs are by @leytilera @Gusted @KN4CK3R  @zeripath  @6543 , how do you think.

The previous mechanism allowed anyone to send commit statuses without any permissions check. I'm sure you can imagine the sort of problems that could cause.
Just create a token for the owner of the repo and pass it either as a header or as query param.
If we can get round to sorting out role permissions - I'd like to do this but don't have time at present - then we could make a nicer mechanism.

To relax the permission:

For a private Gitea repository, the read permission (all team members) is safe to update the commit status.
For a public Gitea repository, only team members could update the commit status, but not the non-team users.
Indeed you got the point and I forgot to mention that our organizations are private by default and this is not the expected standard behavior. What do you think about :
whatever organization is private or public, API access is only allowed to team-users, whatever their role is ?
In that case, I would update the title of the issue

I don't think we should not relax permissions, it will be a weird exemption that people wouldn't expect if they didn't read the source code or this issue. It was already a big oversight that anyone without any permission were able to write commit statuses.
As @leytilera mentioned a new permission for this action should be fine (and do-able).

Ok Fully understand your point, the best solution is to have dedicated permission for such operation and fix the root cause.
Let me know whether your prefer to close that issue and create a new one or keep it.
Thanks for your feedback, highly appreciated.

According to the discussions above, I think this issue could be closed.


Run slow tests for coverage only

#307 includes a slow test that also provides important code coverage. I suggest we run slow tests on coverage only. This will allow us to continue to test a higher proportion of our code without bogging down every workflow with slow tests.

I suggest we run slow tests on coverage only.

To clarify: this change makes it so coverage run the slow tests by default when invoked by tox; the other tox test environments don't run them.  But within CI, the workflows explicitly opt for the other environments to run slow tests as well (see --run-slow in the test_*_versions.yml files).  I think this is fine, just noting it.

Coverage takes a long time to run now, as there is a single test (test_asymmetric_bitstrings_CN) that takes 39 seconds on my machine.  I think it might be better to annotate the specific slow functions we actually want to count coverage for, and run only those slow tests during coverage.  It might be annoying to figure out the details of this, but I'll probably do it one day when I am feeling especially annoyed by the status quo :slightly_smiling_face:

Coverage takes a long time to run now, as there is a single test (test_asymmetric_bitstrings_CN) that takes 39 seconds on my machine. I think it might be better to annotate the specific slow functions we actually want to count coverage for, and run only those slow tests during coverage. It might be annoying to figure out the details of this, but I'll probably do it one day when I am feeling especially annoyed by the status quo 🙂

OK this had crossed my mind, but now that I see how bad the CN test is again, I'll look into it. Thanks


FIXING: minn, bva, ny, colo, coloctapp, ill, ca3_p, ca3_u /// REMOVING: minnctapp_p minnctapp_u

minnctapp_p and minnctapp_u are no longer needed because of the redesign of the minn portal website.  Now minn is capturing all of the pertinent cases.
The colorado opinions portal website was updated, which required updating colo and coloctapp.
Ny has a minor fix to prevent it from braking when clerks enter one of two (increasingly common) typos in the docket number string.
BVA is fixed to handle edge case, and to use more standard method of parsing data in _download() method.
New examples files added where necessary, and old ones removed where no longer applicable.  All code passing tests upon posting.

OK, got this bad boy merged. Some notes:

Part of what took me a while on this one was that it had some small fixes mixed in with big ones. If you can split these into separate PRs in the future, that makes things much easier to review, since I don't have to worry about this thing while doing that thing.

I did some surgery on the Minnesota scraper. The main two things I did were to clean up the case name so it didn't have so much junk (docket numbers, court, etc.), and split it off so that there's a minnctapp scraper and a minn scraper. This is needed so that upstream we can categorize the relevant cases into the courts. Otherwise, all the minnctapp stuff would get dumped in with the minn stuff -- not good!

For colo, I added a method to strip down the HTML of the opinion that we're getting. Since the link doesn't point to a PDF, we need to make sure we only get back the HTML we want from the next page.

For coloctapp, something was still broken and I didn't have a chance to figure it out.

All in all, great stuff, thanks for all this.

Sounds good, thanks for the notes
Sent from my iPhone

On Jun 3, 2016, at 5:13 PM, Mike Lissner<EMAIL_ADDRESS>wrote:
OK, got this bad boy merged. Some notes:
Part of what took me a while on this one was that it had some small fixes mixed in with big ones. If you can split these into separate PRs in the future, that makes things much easier to review, since I don't have to worry about this thing while doing that thing.
I did some surgery on the Minnesota scraper. The main two things I did were to clean up the case name so it didn't have so much junk (docket numbers, court, etc.), and split it off so that there's a minnctapp scraper and a minn scraper. This is needed so that upstream we can categorize the relevant cases into the courts. Otherwise, all the minnctapp stuff would get dumped in with the minn stuff -- not good!
For colo, I added a method to strip down the HTML of the opinion that we're getting. Since the link doesn't point to a PDF, we need to make sure we only get back the HTML we want from the next page.
For coloctapp, something was still broken and I didn't have a chance to figure it out.
All in all, great stuff, thanks for all this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Update documentation to reflect Webpack v4

Documentation Is:

[ ] Missing
[x] Needed
[ ] Confusing
[ ] Not Sure?

Please Explain in Detail...
The doc for file-loader has referred to the style recommended by Webpack 3 in multiple places where instead of using use, and specify loader and options inside the use object, loader and options have been used directly inside rules.

Your Proposal for Changes
Just an example of how the above could possibly be changed:
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: '[path][name].[ext]',
            },
          },
        ],
      },
    ],
  },
};

@alanyinjs both examples valid for webpack@3, webpack@4 and webpack@5,  you need use property when you want using multiple loaders, like:
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/,
        use: [
          {
            loader: 'other-loader',
            options: {
              // ...options
            },
          },
          {
            loader: 'file-loader',
            options: {
              name: '[path][name].[ext]',
            },
          },
        ],
      },
    ],
  },
};

@alanyinjs hm, let's update docs


Add per source EOL settings for Dogstatsd

What does this PR do?
Followup to this PR: https://github.com/DataDog/datadog-agent/pull/7090
This change allows per source (UDS, UDP, Named Pipe) settings for dogstatsd EOL termination for further internal testing.
Describe your test plan
UT's, manual testing

@truthbk

I am thinking about @ogaca-dd comment.... while his comment might help improve the performance of the feature a little bit, it would also likely produce a less maintainable code pattern. This code is in the hot-path so performance is definitely important to keep front and center.... 🤔

I have pushed a quick implementation of what I suggested. https://github.com/DataDog/datadog-agent/commit/8eb17f4a06bd687c0287aad4a82bbe4978e54ee4 (It is not tested and it must not be cherry-picked as if).
IMO, the code is simpler.
Note: Unit tests may require several changes because of a lack of DRY.

Having the source type in Packet helps us make decisions on behavior if we need to with helper functions, as opposed to the other approach where we add (ultimately an arbitrary number of) boolean fields to the struct to guide the logic.

I do not think handling the EOL is something fundamentally related to the source type. In the current code, it is related to the source type because the config option is defined by source type. That explain why in the previous implementation, there is no need of the source type. IMO, Packet should not have the source type to handle the EOL.
The current implementation is fine, I wanted to explain why I suggested to remove the source type from Packet.


parse package-info.class to collect package annotations

see https://github.com/jenkinsci/lib-annotation-indexer/pull/5

maybe it could cache the result for parsing package-info.class as this will be invoked for each and every class in a package. I tried to keep it simple. Performance penalty might not be a big deal as this is a build time tool.

For a small library like this I'm not too hang up on "revert unrelated refactoring" but just as a note to myself, this PR is still blocked on the upstream release.

inactive, feel free to take over


[FEATURE-REQUEST] man page for scopenports

man scopenports

@ThePrez okay for me to take this one?

@ThePrez okay for me to take this one?

Absolutely!! But please work off the v1.0.0 branch as I tweaked the Makefile and instructions for the man page build.
The short of it is that I write the man page in markdown and then use pandoc
Cheers!

Absolutely!! But please work off the v1.0.0 branch as I tweaked the Makefile and instructions for the man page build.
The short of it is that I write the man page in markdown and then use pandoc
Cheers!


ext_opt virtual text doesn't get removed

Problem
I have exp_opts set to show virtual text on choice nodes like following
  ext_opts = {
    [types.choiceNode] = {
      active = {
        virt_text = { { "ChoiceNode", "Comment" } },
      },
    },
  },

It shows ChoiceNode as virtual text when I'm on a choice node . It works as expected if I go fill out the snippet node by node and removes the virtural text when snippet has been completely filled out.
But if I <esc> out of the snippet without completely filling it out. The virtual text remains . Then if I delete the line/s of the partially filled snippet the vertual text just jumps previous line :/
How to reproduce

enable virtual text on choice node (most likely same issue on other nodes ext_opt too I'm not sure how to set other nodes yet :D)
Get a simple snippet with choice node . You can use the one I was using

ls.snippets = {
  lua = {
    s({trig='req'}, {c(1, {
        fmt("require('{}')", { r(1, 'module') }),
        fmt("local {} = require('{}')", { rep(1), r(1, 'module') })}
        )}, {stored={module = i(1, "module")}})
  }
}

trigger the snippet .
press <esc> to exit the snippet .
delete the snippet created line dd

Thanks
Thanks for luasnip .  I'm still exploring it's capabilities and it seems great . This virtual text issue just been a minor annoyance .

Could you check if the fix from #297 works for you as well? :D

And since after  luasnip.jump no longer works after <esc> I assume I'm out of the snippet ?

Actually one more thing on that note, I have history enabled . If I complete the snippet I can go back to it with luasnip.jump(-1) but if I <esc> while in middle of a snippet luasnip.jump(-1) no longer does anything . Is this expected behavior or a bug ?

Huh . It seems to not happen after a neovim restart . Sorry again . I think I'm fine as long as snippet clear also clears the virtual text . You should consider having TextChanged as default value of delete_check_events .

delete_check_events isn't set by default mainly because it's a bit of work each TextChanged, and I'd like to keep luasnip as light as possible by default.
I'll think about it :+1:


Create DbOptions::default() and Db::open_with_opts

Changes

Addresses #113
Created new method Db::open_with_opts to simplify Db::open.

Chosen default
{
    flush_ms: 100,
    manifest_poll_interval: Duration::from_secs(1),
    min_filter_keys: 1000,
    l0_sst_size_bytes: 128,
    compactor_options: Some(CompactorOptions::default()),
}

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

This looks great! Can you do 1 second on manifest poll interval, and use CompactorOptions::default()? The settings you grabbed from the test are a bit aggressive for default use.

LGTM! Gonna merge in the morning so I can remember to update the README and quick start examples. 🙂
Thanks!


Gromacs engine/example updates

Main improvements:

Major rewrite of the Gromacs example notebooks to provide a lot more explanation, and to use newer, more convenient approaches within OPS
The grompp and mdrun command strings are now class variables, making them more easily accessible from outside. The commands to create the fully formatted strings have not changed (that's the API).
The default values for filenames (before file number is set) are more informative, and include the directories where things end up.
Gromacs tests are better at cleaning up after themselves
Added logging conf file to facilitate engine debugging

I'll leave this up for comment/review for at least 48 hours, merging no earlier than evening of Sun 15 March (European time).


Update package.json

Old url no longer works and reachable.
If i say npm install, getting red scary error messages.

@aftab10662 Can we use a released version or do we still need master?

Better to use released version.

@aftab10662 Cool, would you mind commit that change?

@martingust Done, PR submitted.Thanks!

For some reason Github isn't showing it, but this is merged: 79b084236e3a959f5a5daad5f2ca51a4e24160c3


🚀 Internationalization (i18n) Translations [Meta Issue]

Description
Now that we have initial support for Internationalization (i18n) we need to start working on getting translations in place. This issue will act as a meta issue to help track the work on this
Links
Documentation: https://backstage.io/docs/plugins/internationalization/
Initial PR: https://github.com/backstage/backstage/pull/17436
Usage examples:

https://github.com/backstage/backstage/pull/19786

There is also this PR that is being worked on: https://github.com/backstage/backstage/pull/20130

One things that we haven't figured out yet is the message key design guidelines. We're using snake_case, but I think there's some discussion to be had around how we want to nest things and how specific we want to get vs avoiding duplication. Any suggestions for existing standards to adopt would be welcome! 🙏

I've been recently starting to follow this effort and would love to help out here as well.  I've used react-i18next on a couple projects and found their best practices and the overall principals section of their documentation really helpful.
For example, using the key as a fallback is something to consider, as otherwise if the i18n layer can't load it's translation, the user could be left with difficult to understand text in the UI.

Moving my comments to here:
1. Should a Plugin be full moved to I18N before first merge?
I started to move some strings from components and... OMG threre is a lot of words here 😅
So my first suggestion is to be clear about this: We want all or nothing?
Suggestion: I prefer not wait for the full translation, so we can wave small PRs
2. Flat keys vs Deep Keys
I started to translate looking using the User Settings as reference.
But this plugin, like many others have so many components I got a little confused about to stay flat.
Juts to get context, we have two options here:
{
    "component_name": "My Component",
    "component": {
        "name": "My Component"
    }
}

t('component_name')
t('component.name')

I stayed using flat keys, but after walk a little in the translation ref I got some doubts.
Flat keys will provide a simple way to reuse words and phrases, but can get a little messy.
Deep keys could provide a more organized approach, but we can got a big file because of that.
Suggestion: Stay flat and things got messy we can refactor and provide a migration path (maybe a tool too)
3. Semantic Keys vs Plain text keys
We have a lot of work to change those hard coded words. So I started to use this plugin to help me. It's really fast extract the word to a json and after that put in TS. But the fast way to do that is using a approach more "your key is your text", like here. We can use more semantic text like here too, it's just more slow because we need to get context and understand a little about the component.
Suggestion: Stay using plain text keys for most cases and when some is really specific change the approach (like here)
4. Provide a No-React way to access the I18N instance
We have some cases where text is outside a component (like here) so we need to put a way to grab the I18N instance so we can call the translate method.
Suggestion: Maybe I am missing how to do that, we can provide a doc or maybe put this in a singleton so we can grab that in a simple import
5. Be explicit about the Non Translate out-of-box
I was trying to find new languages in the project when I see we don't have a standard way to do that. I can translate may Backstage instance to Portuguese, but just in my code. Could be nice if we give some pointers about next steps about that so we don't get people frustated or expecting to contribuite for a thing and got another.
Suggestion: Create a issue with the next steps (and missing points) about the current i18n state in Backstage

Created #21267 as a separate issue to track the establishment of patterns and usages of i18n message keys. Also highlighting that we want to establish these patterns before merging any more PRs

Willing to help test and contribute to initial implementation of Catalog plugin i18n as we have a hard requirement at my department that all apps must be available in both official languages. @christopherparent

@awanlin we are ready to start work on this.  Is there any documentation or similar that we can use to get started?

@awanlin @Rugvip Sorry, I should have been more specific.  I see how some components in user-settings plugin (language and theme toggles) are plumbed for localizations.  I am more than happy to continue to plumb the rest of user-settings as well as other catalog components.
Does this work for you?

@mattemoore, that works for me, make sure you check for any open PRs. I know that @mario-mui has been actively working on this as well: https://github.com/backstage/backstage/pulls?q=is%3Apr+author%3Amario-mui+

@awanlin I've brought this up to legal to make sure they are ok with our department contributing under the Apache2.  License.  Looks like @mario-mui  has done a ton of work on the catalog already.  Perhaps it would be more expedient for us to help test those changes?

Sure, what ever you can do to help is appreciated @mattemoore! I'll note that other core features like Search, TechDocs, and Kubernetes haven't been touched yet. I think maybe Software Templates has but not 100% sure 🤔


Fixed migration stub parser issue

Thank you for contribution but this fix has already been introduced by @dcanaud.


Remove single view assumption in Canvas

Canvas.cc depends on the device pixel ratio of window 0 in Canvas::drawShadow:
  // Not using SafeNarrow because DPR will always be a relatively small number.
  SkScalar dpr = static_cast<float>(UIDartState::Current()
                                        ->platform_configuration()
                                        ->get_window(0)
                                        ->viewport_metrics()
                                        .device_pixel_ratio);

We need to get rid of the get_window(0) in order to support multi-view.
Analysis:
One trivial solution is to make Canvas provide a DPR or make it tied to a view. However, it's too much of a change that will only be used for this feature.
Deeper analysis shows that this DPR is just multiplied with the provided elevation:
https://github.com/flutter/engine/blob/main/impeller/display_list/dl_dispatcher.cc#L1113
Technically we could make this work today by multiplying elevation by DPR in the framework. But this breaks the API.
cc @jonahwilliams @goderbauer @loic-sharma

The way I would solve this is:

Keep the existing implementation in draw shadow that looks up from the primary window
Introduce a new drawShadowV2 that explicitly takes a device pixel ratio
Mark the old method as deprecated.

We would probably need to keep it around for quite a while ... but it seems like the only way to make this transition without surprising folks. Expecting the elevation to be multipled by dpr already wouldn't require a new API or any breaking changes, but its a surprising change in behavior and it would be difficult for folks to know if they're doing it wrong.

Yeah, I agree. What about some more meaningful (but lengthy) name such as drawShadowInLogicalPixel?

Imagine you have the following code:
canvas.drawShadow(path, 4);

You see a deprecation warning, so you quickly find and replace without reading the message
canvas.drawShadow2(path, 4);

Now your code is broken, but you don't actually notice - perhaps because you're on a 1.0 DPR device (or 1.25). If instead you introduced another named parameter, it might be more obvious it required another argument.
On the other hand, maybe this is something that dart fix can just handle?

Duplicate of https://github.com/flutter/flutter/issues/130165.