Windows build: zlib.h cannot be copied

I can't understand why the following happens:
C:\Users\abreucb\Downloads\or-tools>tools\make third_party
ERROR: Invalid pattern is specified in "path:pattern".
which: fsc: unknown command
tools\mkdir.exe -p dependencies\install\bin
tools\mkdir.exe -p dependencies\install\lib
tools\mkdir.exe -p dependencies\install\include\coin
copy dependencies\sources\zlib-1.2.11\zlib.h dependencies\install\include
process_begin: CreateProcess((null), copy dependencies\sources\zlib-1.2.11\zlib.
h dependencies\install\include, ...) failed.
make (e=2): The system cannot find the file specified.
tools\make: *** [dependencies\install\include\zlib.h] Error 2

when I can manually execute the copy command without errors:
C:\Users\abreucb\Downloads\or-tools>copy dependencies\sources\zlib-1.2.11\zlib.h
 dependencies\install\include
        1 file(s) copied.

Does not having admin rights have something to do with this?

I temporarily obtained admin rights, and the error continues.

I still haven't been able to build ortools on Windows. :(

Hi,
I'm on it,
Otherwise you could try the CMake install https://github.com/google/or-tools/tree/master/cmake
there is also an appveyor.yml script which test the cmake stuff on windows...
https://github.com/google/or-tools/blob/master/appveyor.yml
log here: https://ci.appveyor.com/project/Mizux/cmake-ortools/build/3/job/6a0ucut27c285q9o

I think patch for #593 should fix the ERROR: Invalid pattern
Now i'll continue to check that zlib is correctly downloaded and extracted on windows...

Thanks a lot for looking into this! I'm trying the CMake way now, but I'm getting an error saying it could not find an instance of Visual Studio. So annoying. Working on it.

I'm closing this issue, feel free to open a new one for CMake related bugs !
I will also soon merge mizux/dev which contains few Makefile fixes...

Hi,
Be able to reproduce the issue on appveyor CI
https://ci.appveyor.com/project/Mizux/or-tools/build/6/job/et8jara0cpe6mo8s#L140
As far as I know, it seems the appveyor prompt (i.e and yours ?) and the one use on my windows VM doesn't escape special character the same way.
Thus I add to patch Makefile(s) to first deal with quotes space etc. (cf mizux/dev branch)

Find a way to reproduce !
This is due to the shell version used...
On AppVeyor they use C:\Program Files\Git\bin\sh.exe
i.e.
$ set "PATH=C:\Program Files\Git\bin;%PATH%"
$ where sh.exe
C:\Program Files\Git\bin\sh.exe
$ make detect
...
SHELL = C:\Program Files\Git\bin\sh.exe

and you'll get lots of errors...
Expected behaviour:
$ where sh.exe
INFO: Could not find files for the given pattern(s).
$ make detect
...
SHELL = sh.exe
...

and everything is fine, which is odd since SHELL is technically "not found"...
Investigating....

Thanks for looking into this. Let me know when I can test on my end.

Hi,
After many tests I would say the only way to have something working is to NOT have sh.exe in your PATH (i.e. where sh must fail)
I tried to set SHELL=cmd / cmd.exe / C:\Windows\System32\cmd.exe (FYI everything have the same behaviour) inside Makefile, makefile\Makefile.port.mk, makefile\Makefile.win.mkor usingset SHELL=cmd` in the prompt... without any success (-_-;)
Note: make detect will change according to where SHELL is placed
BUT only if Make doesn't found sh.exe otherwise it seems Make simply ignore the variable (wherever you place it) and still use sh.exe -> copy not working, sed wrong pattern etc...
SO the only solution I see:
OR-Tools: use $(error if sh.exe is in the path and stop...
For you: try to hack your path to "remove" sh.exe or (rm/rename the file)
-> I'll test this hack on appveyor to see if doable
Sorry for the inconvenience, any solution/PR is welcome...
src: https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html#Choosing-the-Shell
ps: I'll close this issue once I have a workaround on appveyor...

OK, I'll see if I try it tomorrow. Unfortunately, building software on Windows can be a tremendous pain, while on UNIX it's a breeze 99% of the time.

Quick update. I was able to get past that copy error following your suggestions! The culprit was sh.exe in C:\msys\1.0\bin. I had to temporarily remove it from %PATH% by running the following command (because I currently don't have admin rights):
set PATH=%PATH:C:\msys\1.0\bin;=%
Then many steps later I had an issue with downloading swigwin, but it seems it's because SourceForge is currently down (the link http://prdownloads.sourceforge.net/swig/swigwin-3.0.12.zip doesn't work). Will retry later.

Yup all my jobs are down:
https://ci.appveyor.com/project/Mizux/or-tools/build/job/wkdybybeugg3aouy
Please also notice some issue with python include path on my branch currently trying to fix them...

The download link works now and I was finally able to run tools\make third_party to completion for the first time! I'm currently running tools\make cc python pypi_archive with a CPLEX variable defined in Makefile.local. We'll see what happens.

It seemed to work, but it didn't read the Makefile.local file from the root directory. How do I ensure external solvers are considered when building ortools doing tools\make?
Also, the last part of the log is the following:
del temp-python36\ortools\setup.py-e
Could Not Find C:\Users\abreucb\Downloads\or-tools\temp-python36\ortools\setup.py-e

That file doesn't really exist.

I'm getting linking errors (unresolved symbol). This is the last call before the errors appear:
cl /EHsc /MD /nologo /D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -nologo  /O2 -D
NDEBUG /I. /Iortools\\gen /IC:\\Users\\abreucb\\Downloads\\or-tools\\dependencie
s\\install\\include /DGFLAGS_DLL_DECL= /DGFLAGS_DLL_DECLARE_FLAG= /DGFLAGS_DLL_D
EFINE_FLAG= /IC:\\Users\\abreucb\\Downloads\\or-tools\\dependencies\\install\\in
clude  /IC:\\Users\\abreucb\\Downloads\\or-tools\\dependencies\\install\\include
 /I\\include /DGOOGLE_GLOG_DLL_DECL= /IC:\\Users\\abreucb\\Downloads\\or-tools\\
dependencies\\install\\include /IC:\\Users\\abreucb\\Downloads\\or-tools\\depend
encies\\install\\include\\coin /DUSE_CBC /IC:\\Users\\abreucb\\Downloads\\or-too
ls\\dependencies\\install\\include /IC:\\Users\\abreucb\\Downloads\\or-tools\\de
pendencies\\install\\include\\coin /DUSE_CLP   /I'C:\Program Files\IBM\ILOG\CPLE
X_Studio1271\cplex'\\include /DUSE_CPLEX  /DUSE_GLOP /DUSE_BOP /D__WIN32__ /DPSA
PI_VERSION=1 objs/cvrp_disjoint_tw.obj lib\\ortools.lib lib\\cvrptw_lib.lib lib\
\ortools.lib C:\\Users\\abreucb\\Downloads\\or-tools\\dependencies\\install\\lib
\\zlib.lib psapi.lib ws2_32.lib shlwapi.lib /Febin\\cvrp_disjoint_tw.exe

I believe the CPLEX .lib file (in my case, cplex1271.lib) is missing from the command above. That .lib file doesn't appear in the call if I include $(STATIC_CPLEX_LNK) in the definition of DEPENDENCIES_LNK, but it does appear if I include it in the definition of OR_TOOLS_LD_FLAGS. This doesn't seem intuitive to me, because the .lib file for all other solvers like Gurobi, SCIP, etc. are defined in the former variable. In other words, I have the following on my Makefile.win.mk:
OR_TOOLS_LD_FLAGS = $(ZLIB_LNK) $(SYS_LNK) $(STATIC_CPLEX_LNK)
OK, so the C++ build finished. Now I'm having issues with the Python build. First, it didn't like the include of CPLEX's include folder:
cl : Command line warning D9024 : unrecognized source file type 'Files\IBM\ILOG\
CPLEX_Studio1271\cplex'\\include', object file assumed
cl : Command line warning D9027 : source file 'Files\IBM\ILOG\CPLEX_Studio1271\c
plex'\\include' ignored

Then, I got a bunch of unresolved symbol errors. Probably due to not listing the CPLEX .lib file. Will investigate it tomorrow.

Hi,
Thanks for your time, and sorry that windows support is still a little bit a mess.
To be honest, I still not play with the optional third parties, I'll test it tomorrow too !
I'll try to upgrade the make detect to get info on C++ flags use during compilation (add a detect_cc target)...
For Python since we have SWIG wrapper library, I would say it doesn't take into account optional third parties, I'll check tomorrow...

Thanks! Now I only have the unresolved symbol error when building Python.
C:\Users\abreucb\Downloads\or-tools>tools\make cc python pypi_archive
process_begin: CreateProcess((null), which fsc, ...) failed.
tools\make: Nothing to be done for `cc'.
copy dependencies\\install\\bin\\protoc.exe dependencies\\sources\\protobuf-3.5.
1\\src
        1 file(s) copied.
cd dependencies\\sources\\protobuf-3.5.1\\python && "C:/Users/abreucb/AppData/Lo
cal/Continuum/anaconda3\\python.exe" setup.py build
running build
running build_py
link /DLL /LTCG /debug /OUT:lib\\_pywrapcp.dll objs\\swig\\constraint_solver_pyt
hon_wrap.obj lib\\ortools.lib psapi.lib ws2_32.lib shlwapi.lib "C:/Users/abreucb
/AppData/Local/Continuum/anaconda3\\libs\\python36.lib"
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library lib\\_pywrapcp.lib and object lib\\_pywrapcp.exp
ortools.lib(cplex_interface.obj) : error LNK2001: unresolved external symbol __i
mp_CPXLaddcols
...
lib\\_pywrapcp.dll : fatal error LNK1120: 40 unresolved externals
tools\make: *** [lib/_pywrapcp.dll] Error 1120

Sorry in the train on smartphone
My guess: python Wrapper are linked to ORTOOLS_LNK -> could you try to print its value in detect python at bottom of the file and verify that cplex is present or maybe in python_lnk
https://github.com/google/or-tools/blob/master/makefiles/Makefile.python.mk#L228 hope it will help you

I changed the bottom of file makefiles\Makefile.python.mk as follows:
detect_python:
	@echo PYTHON_VERSION = $(PYTHON_VERSION)
	@echo PYTHON3 = $(PYTHON3)
	@echo PYTHON_EXECUTABLE = $(PYTHON_EXECUTABLE)
	@echo PYTHON_INC = $(PYTHON_INC)
	@echo PYTHON_LNK = $(PYTHON_LNK)
	@echo SWIG_PYTHON3_FLAG = $(SWIG_PYTHON3_FLAG)
    @echo ORTOOLS_LNK = $(ORTOOLS_LNK)
ifeq ($(SYSTEM),unix)
	@echo SET_PYTHONPATH = $(SET_PYTHONPATH)
endif

But when I run tools\make detect_python I only get:
C:\Users\abreucb\Downloads\or-tools>tools\make detect_python
process_begin: CreateProcess((null), which fsc, ...) failed.
PYTHON_VERSION = 36
PYTHON3 = true
PYTHON_EXECUTABLE = "C:/Users/abreucb/AppData/Local/Continuum/anaconda3\\python.
exe"
PYTHON_INC = /I"C:/Users/abreucb/AppData/Local/Continuum/anaconda3\\include"
PYTHON_LNK = "C:/Users/abreucb/AppData/Local/Continuum/anaconda3\\libs\\python36
.lib"
SWIG_PYTHON3_FLAG = -py3 -DPY3

???

I modified the bottom of makefiles\Makefile.python.mk as you suggested, and that variable is empty:
C:\Users\abreucb\Downloads\or-tools>tools\make detect_python
process_begin: CreateProcess((null), which fsc, ...) failed.
PYTHON_VERSION = 36
PYTHON3 = true
PYTHON_EXECUTABLE = "C:/Users/abreucb/AppData/Local/Continuum/anaconda3\\python.
exe"
PYTHON_INC = /I"C:/Users/abreucb/AppData/Local/Continuum/anaconda3\\include"
PYTHON_LNK = "C:/Users/abreucb/AppData/Local/Continuum/anaconda3\\libs\\python36
.lib"
SWIG_PYTHON3_FLAG = -py3 -DPY3
ORTOOLS_LNK =

the link command is missing the path to the cplex dll.

Yes, but what do I have to do? Should I set any other variable?


[WIP] Mark docker app plugin as experimental

⚠ Do not merge until https://github.com/docker/cli/pull/1898 has been merged and re-vendored in this PR ⚠
- What I did

Update vendoring to use the docker/cli branch with experimental plugins
Update vendoring docker/docker master
Fix last changes on context stores made on docker/cli (the main store interface has been split to multiple smaller interfaces).
Mark the app plugin as an experimental plugin.

- How to verify it

Use this docker/cli
Build the docker app plugin
Move it to your ~/.docker/cli-plugins directory
$ docker --help -> app does not appear in the manage commands
$ DOCKER_CLI_EXPERIMENTAL=enabled docker --help -> app appears in the manage commands

- Description for the changelog

app plugin is now experimental and only shown if the docker/cli has its experimental flag enabled.

- A picture of a cute animal (not mandatory but encouraged)

@simonferquel can you review the docker desktop context store part, not really sure that what I did is right 🤔


Add option to run disambiguate or separate reads from two organisms (i.e. host vs. virus or host vs. parasite)

Given two reference genome, it would be awesome if we could examine the % composition of each organism, split the reads for each respective organism. This would allow a user to take those split reads and run them in any of our other pipelines depending on the project goal.
Options:

[x] Add disambiguate to pipeline

Notes: takes aligned reads as input, would need to add different aligners for different inputs (DNA vs. RNA)

[ ] Run fastq_screen on both genomes, create bowtie2 indices and fastq_screen config file on the fly, split reads on tag

Notes: running bowtie2 on RNA is not ideal

Let's add the disambiguate option. This means we will need to add an alignment step, use bwa-mem if DNA or use STAR if RNA. We will need to add a new option to get the non-host genomic fasta file, --disambiguate-genome, and a second conditionally required option to specify whether the source is DNA or RNA (type: enum), --disambiguate-source. If the --disambiguate-genome is provided then the  --disambiguate-source option will need to be provided. This needs to be enforced.

Lastly, add an option to capture the host/primary references genome via:  --disambiguate-host-genome. This option should take an alias, enum of pre-built genomes + indices (i.e. human (hg38), mouse (mm10), rhesus (rheMac8), bat, tick, etc.), OR a genomic fasta file (infer by checking if it is a file and ends with the following extensions: '.fa' or '.fasta'). If a genomic fasta file is provided, an index will be built on the fly.
Please note:
STAR also needs an annotation to accurately align against the transcriptome. With that being said, if the --disambiguate-source is set to RNA; then we will need a way to capture the annotation for the host/primary and secondary genomes. As so, we will need two more options to capture this information:

--disambiguate-host-gtf: Annotation in GTF format of the host organism, can be used to ovverided an aliases default
--disambiguate-secondary-gtf: Annotation in GTF format of the secondery/other organism


Callback url improvement

In VCS endpoint allow clients to define an unique id, and then use that id to generate the callback url logic

API support was added to handle a custom callback, UI support is missing


Bug on 404 page

Discussed in https://github.com/hugo-sid/hugo-blog-awesome/discussions/27

Originally posted by @RuiAAPeres
On small screens, the 404 page looks like this:

Any suggestions on how to fix it? Thank you!

Fixed in https://github.com/hugo-sid/hugo-blog-awesome/commit/a9c1130e46fe111ab8292c0eefcf45c83f4c890e .


Fail to auto-detect read2 adapter?

I know insert fragments of my library is too short, and check that my Reads2 fastq contains many adapter sequence AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT but fastp seems fail to auto-detect this sequence?
Detecting adapter sequence for read1...
>Illumina TruSeq Adapter Read 1
AGATCGGAAGAGCACACGTCTGAACTCCAGTCA

Detecting adapter sequence for read2...
No adapter detected for read2

...

Read2 before filtering:
total reads: 59690021
total bases:<PHONE_NUMBER>
Q20 bases:<PHONE_NUMBER>(93.5872%)
Q30 bases:<PHONE_NUMBER>(88.1399%)

...

Read2 aftering filtering:
total reads: 57917482
total bases:<PHONE_NUMBER>
Q20 bases:<PHONE_NUMBER>(97.9759%)
Q30 bases:<PHONE_NUMBER>(94.1445%)

Here fastp trim (59690021 - 57917482) / 59690021 = ~ 0.0296957342333654
And I use grep to count reads with adapter sequence
$zcat WT1_R2.fq.gz | grep AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT | wc -l
4433330

$zcat WT1_R2.fq.gz | wc -l
238760084

So reads with adapter sequence 4433330 / 59690021 = ~ 0.07427254884028  > 0.0296957342333654
Even after I add
--adapter_sequence_r2 AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT

to fastp command still trimming too little reads.
Read2 before filtering:
total reads: 59690021
total bases:<PHONE_NUMBER>
Q20 bases:<PHONE_NUMBER>(93.5872%)
Q30 bases:<PHONE_NUMBER>(88.1399%)

...

Read2 aftering filtering:
total reads: 57928915
total bases:<PHONE_NUMBER>
Q20 bases:<PHONE_NUMBER>(98.0077%)
Q30 bases:<PHONE_NUMBER>(94.1912%)

Sorry I mixed trimming and filtering, so filtering rate has no problem.


[XML] Update Identify Cluster XML to match updated spec

The data types names has been updated in Identify Cluster and must be updated in the XML as well.
Added:
IdentifyTypeEnum
EffectIdentifierEnum
EffectVariantEnum
Spec PR: https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/6470 (already merged)

Hi ReneJosefsen,
The Link is can't to use , please see the below :
Spec PR: https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/6470 (already merged)
and we have one question to ask, what can i do using zap tool to generate the below identifial clusters types , please see the below :
IdentifyTypeEnum
EffectIdentifierEnum
EffectVariantEnum

Not sure I completely understand but, as far as I know these should be automatically generated when you run the gode gen step in the build process?

Hi ReneJosefsen,
Thanks for your quick reply,
May I ask one more question?
could you let me know what do you mean the "gode gen"?
it is "code generate"?

No problem 😄
Yes, one of the steps in the build process is to generate code from the .zap and .matter file.


API changes based on AzConfig API review from board

ClientCredential already takes connectionString. CredentialPolicy should also not explored to user. So move those two classes to implementation folder.
fixes #6007, #6019

@alzimmermsft @conniey @JonathanGiles  Could you take another look at this PR. Needed to be merged in order to release the new preview.


No method suggestions in yarn workspaces

I have a project which uses yarn workspaces.
It's a kind of client-server thing that shares devTools.
If I run ts-node-dev --respawn --transpileOnly ./src/index.ts from packages/server everything works.
But if I open VSCode from project's root and navigate to packages/server/src/index.ts, I do not have any autocompletion or method suggestions.
like..
const express = require("express"); // jump-to-definition does not work
const app = express();
app.   // -> have no Idea about methods

I searched through https://code.visualstudio.com — there are no docs regarding this setup.
Does VSCode support yarn workspaces at all?
Where can I find any documentation regarding setup?
What extra info do you need from my side?

Can you please share a small example project so that we can investigate this
Also, what VS Code version are you using and what extensions do you have installed?
/needsMoreInfo

Closing as more info is needed to investigate


[BUG] Progressbar and % are 0 when progress too big

Describe the bug
if progress goes over 21474307 the progress bar and % are 0
To Reproduce
Load a huge wordlist in runner.
Set starting pont to 21474307 -> Progressbar and % are ok.
Raise starting pont to 21474308 or more -> Progressbar and % are 0.
Expected behavior
A working progressbar and %
Screenshots

Version
1.1.2 Commit 202
Additional context
Think big when choosing datatypes for variables :D

fixed on https://github.com/openbullet/openbullet/commit/5cd60ed125d8fbf18442a3304b0ccc18b37e6da9


ERR_REQUIRE_ESM Add commonjs support

If you try to use this library in a project that does not use ESM, it will give an error.
A solution would be to provide a commonjs version which can just be generated during CI.

Duplicate of #171

Okay, I see that it might be a duplicate, but the other issue was not solved either. Could you elaborate on why the other issue was marked as not planned? The library is not usable in projects that don't use ESM and providing a commonjs bundle would make this work.
I can help you set it up if you need it?

There are no plans to add support for CommonJS to this library, as that would increase the burden of maintenance. Specifically, it would mean that a build system needs to be introduced to compile the existing code to CommonJS.
It also means that we'd be shipping more code in the package, further increasing the total size of the package. Aside from that, dual packing is a minefield and comes with a lot of strange interoperability bugs and gotchas, you can read all about it in this blog post (see also the links at the bottom).
The real problem here is how Node.js handles interoperability between CommonJS and ESM modules. Importing a CommonJS module from ESM works pretty well for the happy path, but importing ESM from CommonJS is messy, requiring you to make all your code async.
This is a problem unique to Node.js, other tools like bundlers (e.g. WebPack, Vite) do not suffer from this issue as they have taken an ESM-first approach. Even other run-times such as Bun allow you to mix import statements and require() calls freely.
My recommendation for anyone using Node.js right now would be to move to ESM for all your code as soon as possible, as this simply makes most of these problems go away. There are of course caveats such as Jest mocking working differently, and needing to load the entire module graph. But the fact is that standardized JavaScript modules are here, and they are the future of the ecosystem as a whole.


Does anyone have experience with integrating New Relic's APM into FastAPI?

Hello everyone.
I'm attempting to integrate a NewRelic APM into our FastAPI web service that sits behind a Uvicorn gateway.  I was wondering if anyone has any examples as to how they've done that.
In my attempts to follow New Relic's documentation, I've managed to get New Relic to see our service, but no metrics are being pushed.  Maybe it's something very simple that I'm missing, but I've been trying for a while to no avail.  If anyone has any experience with this, please let me know!

Here:

install newrelic pypi package
Download newrelic.ini and put it in your src files
Add to your running command NEW_RELIC_CONFIG_FILE=/src/newrelic.ini newrelic-admin run-program gunicorn [ARGS]
initialize it in code with newrelic.agent.initialize()
for all endpoint , add the decorator @newrelic.agent.web_transaction()

I haven't used NewRelic myself, but it seems they have docs for FastAPI (maybe those docs didn't existed when this question was originally posted): https://docs.newrelic.com/docs/apm/agents/python-agent/web-frameworks-servers/python-agent-fastapi-web-framework/

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


externalSortTest passed

@JavierJia

LGTM. :+1:
If all the hyracks tests are passed, I encourage you to run the asterix-app system test cases to verify the Aql level also works fine.
Then after that, you can do some experiment to show the overhead of having this SVector compare to using the original Java int Array[].


segfault after sourcing zshrc again

> zsh
>> source ~/.zshrc
>> [press any key]
>> zsh: segmentation fault  zsh
>

This happens when loading zsh-autosuggestions after zsh-syntax-highlighting plugin.


nixos/cfdyndns: add apikeyFile option

Motivation for this change
Making it possible to specify cfdyndns api key by referencing a file.
See #24288.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Maybe you should remove the insecure option while at it. What do you think?

Seeing that it would break backwards compatibility I don't think we should do that yet.
Most of the other services where an option like this has been added also haven't removed or deprecated the non-file option yet as there's still some discussion about how this should be handled: #24288

Seeing that it would break backwards compatibility

That was my point... :smile: We should inform users that they are leaking sensitive data on their systems and push them as hard as we can to stop. The user who for some reason wishes to continue to push secrets into the nix store is still able to do so with something like:
services.cfdyndns.apikey = pkgs.writeText "insecure-file-this-is-a-bad-idea.txt" "i-cant-stress-enough-this-is-a-really-bad-idea";

Deprecated options can use mkRemovedOptionModule to let the user know that the insecure option was removed and they should migrate to the secure option.

This is merely my personal opinion, though. This PR as is is a great addition and I would merge it as is if you are absolutely convinced we must continue to provide the apikey option for now. Let me know and I can hit merge :+1:

I guess I was just a little cautious because I haven't introduced any breaking changes before.
You're absolutely right, though. It's way too simple to accidentally add secrets into the nix store at the moment.
I've added a new commit to remove the option now. If I should combine the commits or there's anything else let me know.

Sorry for the delay @felschr. Squash these commits and you have yourself a merge. Thank you for contributing this PR! :tada:

@aanderse and done :)


card footers are broken

This happened as bootstrap was updated from 4.0.0.alpha6 to 4.0.0.beta
a185e7496de1cea6a725b342f5bf024e04aaf4f6

Fixed by @vigliag


Accessibility issue -- skipnav  includes role='button' (but shouldn't?)

Describe the bug
This item was reported by a long-standing uPortal community institution that performed an accessibility audit:

Skip link includes role="button" but shouldn't (semantically not a button);  https://github.com/Jasig/uPortal/blob/master/uPortal-webapp/src/main/resources/layout/theme/respondr/navigation.xsl#L375

Thoughts @ChristianMurphy, @cousquer, @asgrant, @jgribonvald?

A link widget provides an interactive reference to a resource. The target resource can be either external or local, i.e., either outside or within the current page or application.

https://www.w3.org/TR/wai-aria-practices/#link

A button is a widget that enables users to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation. A common convention for informing users that a button launches a dialog is to append "…" (ellipsis) to the button label, e.g., "Save as…".

https://www.w3.org/TR/wai-aria-practices/#button

Skip to content jumps to a location within the page.
Seems like link may be a better fit.

If it goes somewhere, use a link <a>, if it does something, use a <button>.

resolved in #1509


Fix for Comment Invitation

thanks for the quick fix, before I merge this. Could you add this code after the comment invitation is updated?
replies = client.get_notes(forum=forum.id, invitation=SUPPORT_GROUP + '/-/Request' + str(forum.number) + '/Comment')
for reply in replies:
     reply.readers = readers
     client.post_note(reply)

Please check in one of the tests the existing comments are updated with the new list of readers.

thanks for the quick fix, before I merge this. Could you add this code after the comment invitation is updated?
replies = client.get_notes(forum=forum.id, invitation=SUPPORT_GROUP + '/-/Request' + str(forum.number) + '/Comment')
for reply in replies:
     reply.readers = readers
     client.post_note(reply)

Please check in one of the tests the existing comments are updated with the new list of readers.

Isn't deployProcess.py run only once at the start? or did you mean to add this somewhere else?

Isn't deployProcess.py run only once at the start? or did you mean to add this somewhere else?

Deploy process runs when we deploy it but the comment invitation exists since the request is posted. Some PCs may post a comment asking questions before the deployment.

I tried posting a comment before deployment but it's giving me this error: "ForbiddenError: User Support is not writer of the group<EMAIL_ADDRESS>@melisabok is this correct?
        client.post_note(openreview.Note(
            content={
                'title': 'Urgent',
                'comment': 'Please deploy ASAP.'
            },
            forum=request_form_note.forum,
            invitation='{}/-/Request{}/Comment'.format(venue.support_group_id, request_form_note.number),
            readers=[
                support_group_id,
<EMAIL_ADDRESS><EMAIL_ADDRESS>            ],
            replyto=None,
            signatures=['~NewFirstName_User1'],
            writers=['~NewFirstName_User1']
        ))
        helpers.await_queue()

I tried posting a comment before deployment but it's giving me this error: "ForbiddenError: User Support is not writer of the group<EMAIL_ADDRESS>
I think this error is happening when it tries to send a mail to all the readers of the comment. The process function runs with the permissions of the signature of the invitation, in this case is openreview.net/Support and it seems that doesn't have permissions to send the message.
This is currently working in the live site. Is<EMAIL_ADDRESS>listed as a PC in the request form?
Can you try to post a comment using the UI and check if the error happens too?

This is currently working in the live site. Is<EMAIL_ADDRESS>listed as a PC in the request form?
Yes<EMAIL_ADDRESS>is listed as a PC.

Can you try to post a comment using the UI and check if the error happens too?
There was no error.

There was no error.

The process function didn't fail?

can you compare how the browser is doing the POST /notes? then your test should be doing the same.

Please push your changes and I can take a look.

can you compare how the browser is doing the POST /notes? then your test should be doing the same.

process function not executed I get this in the logs when I post a comment from UI.

Not sure why but all tests are passing on circleci, even with the new change of posting a comment before deployment.

I found an issue in the API with the recipient validation.
I realized this test should always fail because the support group doesn't have any permission on the PC emails to send them a message. The rules to be able to message them is:

Being writer of at least one group where the PC email is a member.
Being writer of at least one note where the PC emails is an authorid.

I think the fix here is to use "openreview.net" or "~Super_User1" as signature of the Comment invitation so the process function can send emails to any email address.
cc @carlosmondra

There is another issue here: https://github.com/openreview/openreview-py/pull/1167/files#diff-e3ae2f10352929825bba9040318c444e8bf4b97395b036eec532aacae837bf72R144
Could you see the writers as "Support, PC emails and contact Emails"?
That's the reason the test is failing when you run it individually.

I tried the suggested changes @melisabok, but it's still failing.

Can you push your changes?


Fix overflowing text content in footer link

💫 Changelog
:star: Fixes issue: #6460
:star: Added text-overflow: ellipsis to show ellipsis on lengthy strings, with the addition of title attribute on the span element that shows the complete string on a tooltip on hovering the truncated string.
:star: block property is now removed from the span element as spans are inherently inline and I feel making them behave as a block level element is semantically wrong. Instead, now we render the elements in a column-oriented flex container.
:star: The parent container of the link string and the "Next/Previous" string is now housed by a div instead of a span
Existing UI

Updated UI

@Huxpro could you kindly review this fix and let me know if there are any further changes to be made?
cc @gaearon @sophiebits

Looks great, thanks a ton for working on this!


"Run Python File in Terminal" doesn't work with (Git Bash/cmd)

Hello,
when trying to run a python file using Git Bash I get this error: "bash: syntax error near unexpected token `&'"

also the same with cmd :

while only PowerShell is working
I test the same setting in VScode insider and there is no problem,
this is my setting.json:

VScode last version and python too

Closing as dup of https://github.com/microsoft/vscode-python/issues/16175. Please try the workaround mentioned here https://github.com/microsoft/vscode-python/issues/16175#issuecomment-834630912.


Update to 7.1+

I'm going to take your word for it that this works on 7.1+, but I've confirmed that it works on 7.0.


Is this library still supported?

The examples on the examplepage are not working anymore and there has been no activity for the last three years.
Due to the reorganisation of the people behind joind.in we would like to see who still needs access to which repos and as this is not been worked on for some time now we'd like to know what's going on here ;-)
Please respond either here or on the joind.in-discord if this is still supported. Thanks!

Hi. I haven't done any major work on this project because the last news I read about the project was that it was going to be archived completely. However, I'm happy to update it if that's not the case anymore.


Question regarding the AdditiveGaussianNoise

First and foremost, thank you for the awesome library. It is really fun to play with it.
I have questions regarding the AdditiveGaussianNoise. It is said that

Adds white/gaussian noise pixelwise to an image. The noise comes from the normal distribution N(L,S). If PCH is true, then the sampled values may be different per channel (and pixel).

Here, the N(L, S) is the standard L = mean and S = variance and not S = standard deviation? I just want to confirm this since I believe sometimes some people used standard deviation instead of variance to represent a normal distribution.
One other thing, this noise is sampled from normal univariate normal distribution and not the multivariate one right? Because since an image is 2 dimensional, it makes me somehow wondering about this.
Thank you in advance!

AdditiveGaussianNoise indirectly wraps around numpy.random.normal. In this context L=loc and S=scale, which means that S is the standard deviation.
The augmenter uses a single normal distribution and draws H*W or H*W*C (if per_channel=True) samples from that distribution.


[#1480] Add github_username and profile_image field to EditUserModal

Fixes #1480
Made DefaultUserAvatar as the fallback Avatar, updated tests based on that too.
Modal:

Profile after setting github_username and profile_image:

could you add a couple tests for the form?

test that display_name is required
test that the POST request is called with proper body

Let me know if you need help with that

Hmmm, I've looked up online and not too sure on how to test this in jest, since there's redux involved as well as post requests. Running into quite a few errors.
I might not have the time to go deep into learning and adding tests for this component. Perhaps u can decrease the # of coins for the issue and merge this first, then create another issue to add tests?

I'm doing a couple experiments on this branch


[GHSA-3hjh-jh2h-vrg6] Denial of service in langchain

Updates

Affected products
Description
Summary

Comments
The package should be langchain-community. No patch is available yet.

Hey @eyurtsev, thanks for the PR, but any chance you have some reference to support the package change? Eg. Is the SitemapLoader class only in the langchain-community package and is that something that can be referenced?

@eyurtsev let's do #4540 instead!
@darakian I added some references in this comment. Let me know if any other information would be helpful!


Add IsTruncated to Route53.list_resource_record_sets

We should return IsTruncated: False  on list_resource_record_sets.
I've tested this, and code relying on this flag works as expected with this PR.
Fixes #2660

Coverage decreased (-0.01%) to 94.085% when pulling 877f3b056aebf619ccb2fafa91ef334dc43bfaae on deanrock:route53-rrs-istruncated into 1db617a5309d2ac2fa3e6adc9fb3b90ed43c810a on spulec:master.

Typically AWS doesn't include this flag unless it's True. Is this one of those odd AWS inconsistencies? :)

I guess it depends on the specific service.
According to service JSON, it's a required field for every route53 Response object that supports it.


Enable/disable submit button and flashes

Hi,
I am trying to enable/disable the submit button based on the form validation. I have this simple program:
import 'package:flutter/material.dart';
import 'package:reactive_forms/reactive_forms.dart';
import 'package:reactive_forms_example/sample_screen.dart';

class SubmitButtonTest extends StatefulWidget {
  @override
  State<SubmitButtonTest> createState() => _SubmitButtonTestState();
}

class _SubmitButtonTestState extends State<SubmitButtonTest> {
  FormGroup buildForm() {
    return fb.group(<String, Object>{
      'age': FormControl<double>(
        value: 50,
        asyncValidators: [MyAsyncValidator()],
      ),
    });
  }

  void submit(form) {}

  @override
  Widget build(BuildContext context) {
    return SampleScreen(
      title: const Text('Simple sample'),
      body: ReactiveFormBuilder(
        form: buildForm,
        builder: (context, form, child) {
          return Column(
            children: [
              ReactiveFormConsumer(builder: (context, form, child) {
                return FilledButton(
                  onPressed: form.valid ? () => submit(form) : null,
                  child: Text('submit'),
                );
              }),
              SizedBox(
                height: 15,
              ),
              ReactiveTextField<double>(
                formControlName: 'age',
                decoration: const InputDecoration(
                  labelText: 'Age',
                ),
              ),
            ],
          );
        },
      ),
    );
  }
}

class MyAsyncValidator extends AsyncValidator<dynamic> {
  @override
  Future<Map<String, dynamic>?> validate(AbstractControl control) async {
    return await Future.delayed(Duration(milliseconds: 250), () => null);
  }
}

The problem with this is that the submit button flashes as soon as you just type something in the input field and it's quite annoying. The expect behaviour I was looking for is not disabling the submit button while the AsyncValidator is taking place, but waiting until it ends (after 250 ms in this example) and just at that point update the state of the button. It looks like this:

What am I doing wrong?
Thanks

Ok thanks, I'll tweak it accordingly.


running slow on Mac using google lab

I used google lab but still running very slow after using the picture its keeps lagging and face not in order, how can you please help me

If it's lagging it could be that your internet connection is too slow. If the face isn't detected properly, make sure that it fills most of the camera frame and that you have good lighting in your room.

what about the face getting scattered/squeezed anytime I turned my face, how can I do it so my face would be static, thanks very much for the reply I really appreciate

Wait a minute, this is the avatarify-desktop repo.. I thought I was replying to someone posting in the avatarify-python repo.. Avatarify-desktop only supports Windows, and does not work with remote GPU as far as I know. Did you create this issue in the wrong repo, or have you somehow managed to run the Windows app on a Mac?

No sir,not avatarify desktop, i use google lab then then open it on my terminal on mac

Ok, just checking. Previous comment about camera noise and framing is my best guess still

Surely will check to that sir

Thank you very much it worked perfectly fine but could not use it on telegram only on zoom, could not load the camera on telegram

@Chosenbrain   hello brother, did you install the app on a MacBook?. If yes can you please share the link to the download page

@Fvrgo2800one they did not. Maybe they didn't answer clear enough, but they're using avatarify-python and opened the issue in the wrong github project.
I'm closing this issue to avoid further confusion.


Database reopening regression on Windows

Somewhere between 0.4.9 and 0.4.11 (can't test 0.4.10 because it is broken on Windows) there was a regression introduced that prevents database from being reopened on restart when used with Substrate, the error looks like this:

Error: SubstrateService(Other("Failed to build a full node: Client(Backend("IO Error: Access is denied. (os error 5)"))"))

Downgrading 0.4.11 to 0.4.9 fixes the issue. Not happening on Windows or macOS, first start on Windows succeeds as well.
Frontier already requires at least 0.4.10, so would be nice to fix upstream in parity-db so we don't have to use fork of parity-db with fake version bump.

Do you mean that the error occurs after the node process is restarted?

Yes

Does reboot help?

Didn't check, should I? That seems overkill anyway.

IIRC substrate does not oficially support windows. What toolchain do you compile with? msvc or gnu? Is there a build script or instructions?

It is not officially supported, but also when there are issues they are getting fixed. I understand that there is no upstream CI, but we do run things in our CI and we have a few hunder users on Windows with expectation of thousands more, so it is important to us even if upstream doesn't care.
We build with MSVC, here are exact commands in CI (build can be triggered manually even in a fork): https://github.com/subspace/subspace/blob/14b552d9b1dd499b7bf78c2636db469a726b873e/.github/workflows/snapshot-build.yml#L168-L172
In latest revision we have downgraded to 0.4.9, but if you check out this, it should be reproducible (there are also prebuilt executables attached there): https://github.com/subspace/subspace/releases/tag/snapshot-2023-oct-06

Fixed in 0.4.12


State counts don't update if their toggle button is unchecked.

I don't think this is true any longer.


[8.x] Add support for countables to the pluralizer

This PR adds support for countable values to the Str::plural method.
In doing so, you will be able to pass anything that passes PHP's is_countable check i.e. arrays, objects that implement Countable as the second parameter of the plural method.
This is useful when you want to pluralize a string based on a collection returned directly from an Eloquent query or otherwise filtered collection.

I'm happy to see this make it's way into the framework, it's been needed for a while. I tried adding the same thing but it was declined for some reason: https://github.com/laravel/framework/pull/34758


problem to install openni2

D:\vcpkg\vcpkg\buildtrees\openni2\src\2.2-beta2-bffbc37bdc.clean\Source\Drivers\Kinect\KinectDriver.cpp(5,10): fatal error C1083: 无法打开包括文件: “atlstr.h”: No such file or directory [D:\vcpkg\vcpkg\buildtrees\openni2\src\2.2-beta2-bffbc37bdc.clean\Source\Drivers\Kinect\Kinect.vcxproj]
error: building openni2:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+openni2
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[openni2]+Build+error
Include '[openni2] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2022-06-17-9268e366206712e38102b28dbd1617697a99ff2e
vcpkg-scripts version: b0ea874c7 2022-06-22 (7 days ago)
You can also use the prefilled template from D:\vcpkg\vcpkg\installed\vcpkg\issue_body.md.

It should be a wtl issue and should be fixed by https://github.com/microsoft/vcpkg/pull/25229, can you please ensure your vcpkg is latest?

Which Visual Studio version did you install?

VS 2019

Sorry, atlstr.h should belong to Visual Studio component ATLMFC:

Can you please install it then try again?
Thanks.

ok thanks i will try it right now

ok thanks i will try it right now

successfully solve it , thanks


Add a coordinator task that posts requests to notify users to our FCM app server

As I found a much more expedient solution (coordinator sending notifications directly using a REST API), this task in not needed.


Node.js V4.x无法安装 0.12.x可以

以上

在node 4.1.2上安装失败的日志。
><EMAIL_ADDRESS>install /Users/lanxingcan/node_modules/opencc
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/node/binding.o
In file included from ../node/binding.cc:4:
../node_modules/nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^
../node_modules/nan/nan.h:319:17: note: previous definition is here
  v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                ^
../node_modules/nan/nan.h:344:27: error: redefinition of 'NanEnsureLocal'
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                          ^
../node_modules/nan/nan.h:334:27: note: previous definition is here
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                          ^
../node_modules/nan/nan.h:757:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../node_modules/nan/nan.h:768:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~
/Users/lanxingcan/.node-gyp/4.1.2/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/lanxingcan/.node-gyp/4.1.2/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/lanxingcan/.node-gyp/4.1.2/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/lanxingcan/.node-gyp/4.1.2/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../node/binding.cc:4:
../node_modules/nan/nan.h:772:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
    return node::Buffer::New(v8::Isolate::GetCurrent(), size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
      ^
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
  V8_INLINE Local(S* that)
            ^
In file included from ../node/binding.cc:4:
../node_modules/nan/nan.h:779:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
           ~~~~~~~~~~~~~~^
In file included from ../node/binding.cc:2:
In file included from /Users/lanxingcan/.node-gyp/4.1.2/include/node/node.h:42:
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:501:12: note: in instantiation of function template specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../node/binding.cc:2:
In file included from /Users/lanxingcan/.node-gyp/4.1.2/include/node/node.h:42:
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:511:12: note: in instantiation of function template specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../node/binding.cc:2:
In file included from /Users/lanxingcan/.node-gyp/4.1.2/include/node/node.h:42:
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:221:5: error: assigning to 'v8::Function *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1645:12: note: in instantiation of function template specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../node/binding.cc:2:
In file included from /Users/lanxingcan/.node-gyp/4.1.2/include/node/node.h:42:
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/lanxingcan/.node-gyp/4.1.2/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1776:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
    return NanEscapeScope(
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^

我使用 node v5.0.0 一樣安裝失敗 ...

附上錯誤日誌
><EMAIL_ADDRESS>install /Users/mxtsai/Cloudeep/StartUps500/service_web/node_modules/opencc
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/node/binding.o
In file included from ../node/binding.cc:4:
../../nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^
../../nan/nan.h:319:17: note: previous definition is here
  v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                ^
../../nan/nan.h:344:27: error: redefinition of 'NanEnsureLocal'
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                          ^
../../nan/nan.h:334:27: note: previous definition is here
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                          ^
../../nan/nan.h:757:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../../nan/nan.h:768:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~
/Users/mxtsai/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no
      known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/mxtsai/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: candidate function not viable:
      2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/mxtsai/.node-gyp/5.0.0/include/node/node_buffer.h:28:40: note: candidate function not viable:
      requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/mxtsai/.node-gyp/5.0.0/include/node/node_buffer.h:36:40: note: candidate function not viable:
      requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../node/binding.cc:4:
../../nan/nan.h:772:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to
      'v8::Local<v8::Object>'
    return node::Buffer::New(v8::Isolate::GetCurrent(), size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:210:7: note: candidate constructor
      (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>'
      to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:210:7: note: candidate constructor
      (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>'
      to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
      ^
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:214:13: note: candidate template ignored: could not
      match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:326:13: note: candidate template ignored: could not
      match 'S *' against 'v8::MaybeLocal<v8::Object>'
  V8_INLINE Local(S* that)
            ^
In file included from ../node/binding.cc:4:
../../nan/nan.h:779:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
           ~~~~~~~~~~~~~~^
In file included from ../node/binding.cc:2:
In file included from /Users/mxtsai/.node-gyp/5.0.0/include/node/node.h:42:
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile'
      from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:501:12: note: in instantiation of function template specialization
      'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../node/binding.cc:2:
In file included from /Users/mxtsai/.node-gyp/5.0.0/include/node/node.h:42:
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from
      incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:511:12: note: in instantiation of function template specialization
      'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../node/binding.cc:2:
In file included from /Users/mxtsai/.node-gyp/5.0.0/include/node/node.h:42:
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Function *volatile'
      from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1645:12: note: in instantiation of function template specialization
      'v8::Local<v8::Function>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../node/binding.cc:2:
In file included from /Users/mxtsai/.node-gyp/5.0.0/include/node/node.h:42:
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from
      incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/mxtsai/.node-gyp/5.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1776:12: note: in instantiation of function template specialization
      'v8::Local<v8::Object>::Local<v8::Value>' requested here
    return NanEscapeScope(
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
10 errors generated.
make: *** [Release/obj.target/binding/node/binding.o] Error 1

@mxgit1090 最好另開 issue 詳細討論你自己得到的錯誤信息。

NAN issue already fix via #147. Could we bump another version for node > 0.12? @BYVoid

已經修復了編譯錯誤，發佈了新版本1.0.3-1，請再次嘗試。謝謝。


Cannot shutdown socket on Windows

I'm trying to use socket2 to shutdown a socket in an accept loop from another thread:
use std::net::{TcpListener, Shutdown};
use socket2::Socket;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let listener = TcpListener::bind("localhost:0")?;
    println!("listening on {}", listener.local_addr()?);
    let socket: Socket = listener.try_clone()?.into();

    let handle = std::thread::spawn(move || {
        for conn in listener.incoming() {
            if conn.is_err() {
                break;
            }

            println!("got connection");
        }

        println!("socket shut down");
    });

    socket.shutdown(Shutdown::Read)?;
    drop(socket);

    handle.join().unwrap();

    Ok(())
}

The code works as expected on Linux (playground). On Windows, I get the following error message from the call to shutdown.:
Error: Os { code: 10057, kind: NotConnected, message: "A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied." }
socket shut down

Thanks for the report! I suspect this is likely Windows-specific behavior and not necessarily a bug with this crate.
I think that shutdown is intended for TCP streams, not necessarily for TCP listeners though.


Bad index file - timing issue

Hi, love this tool and use it every day!
After adding a Vault KV2 store, I've started to sporadically seeing the following error:
$ switch
Error: could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'
could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'

It usually will occur after aborting a switch.
Below is an example - the Error: abort is caused by a <C-c> or <esc> key press.
After which I will just remove /home/me/.kube/switch-state/switch.filesystem.default.index and it will work again for some time.
$ cat ~/.kube/switch-state/switch.filesystem.default.index
kind: filesystem
contextToPathMapping:
  output/default: /home/me/Repositories/GitHub/org/helm-charts/charts/project/.debug/output/kubeconfig.yaml
$ switch
Error: abort
abort
$ switch
Error: could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'
could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'
$ cat ~/.kube/switch-state/switch.filesystem.default.index
kind: filesystem
contextToPathMapping:
  .kube/minikube: /home/me/.kube/config_minikube
rg/helm-charts/charts/project/.debug/output/kubeconfig.yaml

Hi, thanks for reporting. I think that requires either some fallback logic to repair the index file or a signal handler for SIGTERM in the switcher binary that makes sure that the process only terminates after existing filesystem write operations are completed.

Workaround for me was rm -rf ~/.kube/switch-state/, s clean did not help.


Renew SSL certificate

Our SSL cert is going to expire in 60 days (Oct 16, 2016). We can either pay $100 to renew or use Let's Encrypt fo' free. Thoughts? @simonv3

let's encrypt!

Bump

Oh thanks for reminding me.

So, I just did some quick research on how to do this:
There's some back and forth here, but eventually they get to some working solution:
https://community.letsencrypt.org/t/lets-encrypt-and-heroku-solved/4272
Luckily for us there's this: https://github.com/lgromanowski/letsencrypt-plugin
Which looks like it's pretty plug-and-play.

Update: I spent some time messing with the gem for this and came across some issues - mainly I don't think it works with MongoDB.

The gem doesn't work with Mongo or Let's Encrypt doesn't work?

The gem. I'm waiting for some responses on the gem to clarify that. If that's the case I don't know what's next.

Tracking: https://github.com/lgromanowski/letsencrypt-plugin/issues/51#issuecomment-249583345

11 days till expiration. Can we SSH into the server and install a cert using the standard lets encrypt commands?

Heroku file systems are write only as far as I'm aware. @RickCarlino might know more though?

Heroku instances don't have SSH, so that won't be an option. You're correct that you can't store files on the file system, either.
The Right Way :tm: in the 12 Factor Methodology would be to store it as an ENV variable.
Is that an option? Been a while since I've had to set SSL stuff up.

This looks promising: https://github.com/pixielabs/letsencrypt-rails-heroku
It sounds like we'd have to switch over to SNI, and I assume we have DNS set up properly?

So an update: that gem says it completed properly, but I think we need to switch the app to Heroku's SNI SSL (rather than the SSL Endpoint), and @roryaronson needs to do that (as app owner).
Right now the certificates still point to Comodo.

Alright, SSL endpoint removed, SNI enabled (by default by Heroku), and the DNS is updated. Loaded up the site and its using the certificate from Let's Encrypt! Thanks @simonv3 :)

Thanks for checking and doing all that Rory!
Going to re-open this because the Let's Encrypt certificate is only valid 90 days. There is a little scheduler task we can run to automatically renew it. But we still have to set that up.

This is done!


add javadoc stuff

lmk if there's a better way for now

lol, gotta put the code ticks inside the square brackets

Why is this a draft?

because its probably not everything?

These look like a good improvement, can I get this ready for review


Add request history for last minute to RequestCounter class

For debugging and tracking of requests that have been running recently, it will be usefully to track and query the Api requests that have been done in the last minute along with the counter.

Also add file reads for testfolder usage


Repeating bootup and shutdown errors in journald

Everytime I bootup a Nixos VM and shut it down, I'm seeing these 4 errors in my journald.
sudo journalctl -b -1 -p err
Jul 14 04:04:17 matrix-node kernel: tsc: Fast TSC calibration failed
Jul 14 04:04:18 matrix-node kernel: piix4_smbus 0000:00:07.0: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr
Jul 14 08:27:57 matrix-node systemd-logind[1339]: Failed to abandon session scope: Connection reset by peer
Jul 14 08:27:57 matrix-node systemd[1]: Failed unmounting /nix/store.

The first 2 are during bootup, the last 2 are during shutdown.
Now apparently TSC failing at the startup is not a problem, but I would like to know how this error can be removed from the messages.
smbus doesn't exist on virtual machines, so perhaps one could disable loading this kernel module if it detects its inside a virtual machine
systemd-logind error - I have no idea why this keeps happening
unmounting -  I don't know why it cannot unmount /nix/store, when it can easily unmount all the other directories.
Here's the context for unmounting (reversed - top most recent):
Jul 14 08:27:57 matrix-node systemd[1]: Reached target Shutdown.
Jul 14 08:27:57 matrix-node systemd[1]: Starting Shutdown.
Jul 14 08:27:57 matrix-node systemd[1]: Stopped Remount Root and Kernel File Systems.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Remount Root and Kernel File Systems...
Jul 14 08:27:57 matrix-node systemd[1]: Stopped target Local File Systems (Pre).
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Local File Systems (Pre).
Jul 14 08:27:57 matrix-node systemd[1]: Reached target Unmount All Filesystems.
Jul 14 08:27:57 matrix-node systemd[1]: Starting Unmount All Filesystems.
Jul 14 08:27:57 matrix-node systemd[1]: Stopped Update UTMP about System Boot/Shutdown.
Jul 14 08:27:57 matrix-node systemd[1]: Stopped Load/Save Random Seed.
Jul 14 08:27:57 matrix-node systemd[1]: Failed unmounting /nix/store.
Jul 14 08:27:57 matrix-node systemd[1]: nix-store.mount mount process exited, code=exited status=32
Jul 14 08:27:57 matrix-node systemd[1]: Stopped Setup Virtual Console.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Setup Virtual Console...
Jul 14 08:27:57 matrix-node systemd[1]: Stopped Load Kernel Modules.
Jul 14 08:27:57 matrix-node umount[8921]: use the device is found by lsof(8) or fuser(1).)
Jul 14 08:27:57 matrix-node umount[8921]: (In some cases useful info about processes that
Jul 14 08:27:57 matrix-node umount[8921]: umount: /nix/store: target is busy
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Load Kernel Modules...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Update UTMP about System Boot/Shutdown...
Jul 14 08:27:57 matrix-node systemd[1]: Stopped Apply Kernel Variables.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Apply Kernel Variables...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Load/Save Random Seed...
Jul 14 08:27:57 matrix-node systemd[1]: Stopped target System Initialization.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping System Initialization.
Jul 14 08:27:57 matrix-node systemd[1]: Unmounting /nix/store...

Here's the context for the logind (reversed - top most recent):
Jul 14 08:27:57 matrix-node dhcpcd[1684]: received signal TERM from PID 1, stopping
Jul 14 08:27:57 matrix-node systemd[8371]: pam_unix(systemd-user:session): session closed for user operator
Jul 14 08:27:57 matrix-node systemd[8370]: Received SIGRTMIN+24 from PID 8814 (kill).
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Firewall...
Jul 14 08:27:57 matrix-node systemd[1]: Stopped target Network.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Network.
Jul 14 08:27:57 matrix-node systemd[1]: Stopped target Multi-User System.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Multi-User System.
Jul 14 08:27:57 matrix-node systemd-logind[1339]: Failed to abandon session scope: Connection reset by peer
Jul 14 08:27:57 matrix-node systemd[1]: Stopping D-Bus System Message Bus...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Mount ZFS Volumes...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping NTP Daemon...
Jul 14 08:27:57 matrix-node ntpd[1746]: ntpd exiting on signal 15
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Virtual Machine and Container Registration Service...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping SSH Daemon (<IP_ADDRESS>:61847)...
Jul 14 08:27:57 matrix-node systemd[8370]: Stopped target Sockets.
Jul 14 08:27:57 matrix-node systemd[8370]: Stopping Sockets.
Jul 14 08:27:57 matrix-node systemd[8370]: Stopped target Timers.
Jul 14 08:27:57 matrix-node systemd[8370]: Stopping Timers.
Jul 14 08:27:57 matrix-node systemd[8370]: Stopping Timers.
Jul 14 08:27:57 matrix-node dhcpcd[1684]: received signal TERM from PID 1, stopping
Jul 14 08:27:57 matrix-node systemd[8371]: pam_unix(systemd-user:session): session closed for user operator
Jul 14 08:27:57 matrix-node systemd[8370]: Received SIGRTMIN+24 from PID 8814 (kill).
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Firewall...
Jul 14 08:27:57 matrix-node systemd[1]: Stopped target Network.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Network.
Jul 14 08:27:57 matrix-node systemd[1]: Stopped target Multi-User System.
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Multi-User System.
Jul 14 08:27:57 matrix-node systemd-logind[1339]: Failed to abandon session scope: Connection reset by peer
Jul 14 08:27:57 matrix-node systemd[1]: Stopping D-Bus System Message Bus...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Mount ZFS Volumes...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping NTP Daemon...
Jul 14 08:27:57 matrix-node ntpd[1746]: ntpd exiting on signal 15
Jul 14 08:27:57 matrix-node systemd[1]: Stopping Virtual Machine and Container Registration Service...
Jul 14 08:27:57 matrix-node systemd[1]: Stopping SSH Daemon (<IP_ADDRESS>:61847)...

Context for TSC:
Jul 15 02:20:04 matrix-node kernel: tsc: Fast TSC calibration failed
Jul 15 02:20:04 matrix-node kernel: tsc: PIT calibration matches PMTIMER. 2 loops
Jul 15 02:20:04 matrix-node kernel: tsc: Detected 1671.219 MHz processor
Jul 15 02:20:04 matrix-node kernel: Calibrating delay loop (skipped), value calculated using timer frequency.. 3342.43 BogoMIPS (lpj=1671219)

Same problem. Is there an easy way to shutdown cleanly a nixos virtualbox appliance ?

(triage) still a problem?

Could be would need to check the logs.

@CMCDragonkai can you do that checking?

@CMCDragonkai Still an issue?


src: introduce http_parser_url_init

The struct must be zero-initialized, but this wasn't explicitly stated
anywhere in headers. Introduce http_parser_url_init API method that
will do it.
Fix #209
cc @bnoordhuis

My pr at #222 is more comprehensive, I'm not sure why you closed it as unnecessary. I added the parameter checking and zeroed the structure. In http_parse_host there's no point continuing without the host field and in http_parser_parse_url there's no point calling the former without the host field. Also something should be done to make sure that the buflen isn't greater than max uint16_t, which I covered in both.
Also it occurs to me now an overflow check is also due for size_t buflen assignment in http_parse_host since there's no guarantee size_t is greater than uint16_t (although it's extremely likely), which would probably look something like this, placed immediately after the assignment:
if(u->field_data[UF_HOST].off < buflen) { // overflow
    return 1;
}

It won't call it without host field, because UF_HOST won't be set. In case of test string it is doing a right thing and treating test as a schema, and then awaits for the hostname.

In the case a schema field was found but a host field was not then http_parser_parse_url will still call http_parse_host. I changed that by failing if a schema field is found without a host field and calling http_parse_host only if a host field was found as seen here.

Right and http_parse_host is called because it is what is expected after the scheme. It is intentionally invoked for this thing to fail. Practically, is there any difference in behavior your PR and current implementation (in master branch)?

Yes it's different. The current implementation is calling http_parse_host when UF_HOST is not set which contradicts what you said earlier. Whether that's correct or not you would know having more familiarity with the code base, however I did not think that was correct.

Right, I was wrong about it. Sorry. However, except this I don't see any behavior difference.

@mscdex may I ask you to review it? ;)

@indutny @mscdex ... any further thoughts on this one?

LGTM

Landed in 777ba4e


Fix xss in tooltip, collapse and scrollspy plugins

Fixes: #26627, fixes #26625, fixes #26628
/CC @XhmikosR and @1Jesper1

Hmm, it seems we are having some test failures @Johann-S :/

BTW, do we have any other places like these? Would be ideal if we tackled all similar issues now and release a new patch release soon-ish.

yep I'm on it 😉 just a few minutes

@Johann-S: let's get this merged and hopefully people will report if there are any other cases.


Black renderbuffer and inconsistent 'Backface culled' under OpenGL

Description
I'm running the same application as in https://github.com/baldurk/renderdoc/issues/2971, but targeting OpenGL (using the OpenGL backend of https://github.com/gfx-rs/wgpu). Every glDrawElementsInstanced call shows a completely black renderbuffer. However, the application runs properly under Renderdoc, and later events in the capture show a correctly-filled in renderbuffer.
Steps to reproduce

Download this OpenGL capture file and open it in Renderdoc
Navigate to EID 134: glDrawElementsInstanced(36, 1). You'll need to expand two 'Context3D render pass tabs'
In the 'Texture Viewer tab', select the 'FB0' renderbuffer. Note that 'Highlight Drawcall' shows the entire texture highlighted, and 'Depth Test', 'Stencil Test', and 'Backface Cull' all highlight the entire texture in green. Also, 'Pipeline State' shows that both the depth and stencil states are set to 'Always'.
Right click on any pixel in the renderbuffer, and click 'History'. Note that the 'EID 134' event shows 'Backface culled', despite the entire texture passing the backface test (in fact, I disabled backface culling entirely from OpenGL).

Environment

RenderDoc version: Local build, commit https://github.com/baldurk/renderdoc/commit/c328c3fdf7fb3706e48a66572a6f926ba8bdae92
Operating System: Linux
Graphics API: OpenGL (NVIDIA GeForce RTX 3080 Ti)

Quick note to say so far have not been able to reproduce the pixel history issue. EID 134 is not included in the history. Continuing to debug the issue.

Hi there,
This is looking to be a GLES limitation and not a RenderDoc bug.
From the information in the capture the API being used is GLES (not proper GL) and it was made on an Intel GPU.
The black RenderBuffer in the Texture viewer is because it is an MSAA RenderBuffer and GLES does not support reading the unresolved pixel data. GLES limitations are also affecting the Pixel History.
Replaying the capture on nVidia GPU (Windows or Linux) shows the RenderBuffer data as expected (because the nVidia driver goes beyond the GLES specification).
Windows on nVidia

Linux on nVidia

This is the Linux command used to force GL to run on the nVidia GPU
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <PATH_TO_QRENDERDOC>
Potential solutions to explore in your application to overcome the GLES limitation are:

switch your application to use proper GL and not GLES API
switch your application to use non-MSAA RenderBuffer
switch your application to use Texture's instead of RenderBuffer's
replay the RenderDoc captures on an nVidia GPU

I have recreated the pixel history bug (on Linux only, on Windows it is working as expected) and will be investigating that, however it might turn out to be a GLES limitation
Pixel History : Windows + nVidia

Pixel History : Linux + nVidia


Waiting flag plumbed through provision + some extras

[x] adding waiting flag for provision flow and hooking up buttons.
[x] adding more delay options to engine and a waiting handler so we can avoid making explicit calls to waiting on/off
[x] cleaning up some unused provision stuff from < login3, moving helpers to where they're used
[x] plumbed through passphrase error
[x] made login/provision available to admins, we need design feedback now
[x] simplified the main window resizing logic in the desktop nav

@keybase/react-hackers

@keybase/react-hackers bump

@MarcoPolo updated

:+1: % Q


Fix the Ahmadabad spell

Due to mismatch of spelling Ahmadabad in data and Ahmedabad in map.  Gujarat map is not showing Ahmadabad data.
I have set the same spelling as data for map, it should fix the issue. https://github.com/covid19india/covid19india-react/issues/346

Fixed via #521


Run Selection/Line in Terminal opens a duplicate terminal

Type: Bug
Behaviour
Expected vs. Actual
Expected: Running Shift+Enter on some python code from a file saved in a folder from your workspace opens a python terminal and runs the code. Trying to run more code from another editor either outside the workspace or an untitled file should run the code in the same python terminal
Actual: Running Shift+Enter on some python code from a file saved in a folder from your workspace opens a python terminal and runs the code. Trying to run more code from another editor either outside the workspace or an untitled file opens a new terminal named Python but trys to run aganist the shell.
This issue occurs on v2023.14.0 but works as expected on v2023.12.0
Steps to reproduce:

Add a folder to your workspace
Save a test.py file to the folder
Run the code in the test.py file
Create a new untitled python file
Run the code in this untitled file
Code runs in the wrong terminal

Diagnostic data

Python version (& distribution if applicable, e.g. Anaconda): 3.9.17
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
Value of the python.languageServer setting: Default

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

2023-08-07 14:47:31.313 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-08-07 14:47:31.313 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-08-07 14:47:31.313 [info] Experiment 'pythonTestAdaptercf' is active
2023-08-07 14:47:31.327 [info] Test server listening.
2023-08-07 14:47:31.328 [info] Python interpreter path: ~/python/jamfapi/bin/python
2023-08-07 14:47:32.912 [info] Starting Pylance language server.
2023-08-07 14:47:36.892 [info] > ~/python/jamfapi/bin/python ~/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/normalizeSelection.py
2023-08-07 14:47:37.015 [info] Send text to terminal: /Users/sculliga/python/jamfapi/bin/python
2023-08-07 14:47:37.918 [info] Send text to terminal: print('test')

2023-08-07 14:47:39.425 [info] > ~/python/jamfapi/bin/python ~/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/normalizeSelection.py
2023-08-07 14:47:39.549 [info] Send text to terminal: print('test 2')

User Settings

venvPath: "<placeholder>"

languageServer: "Pylance"

terminal
• activateEnvironment: false

Extension version: 2023.14.0
VS Code version: Code 1.81.0 (Universal) (6445d93c81ebe42c4cbd7a60712e0b17d9463e97, 2023-08-02T12:40:02.782Z)
OS version: Darwin arm64 22.6.0
Modes:

System Info

Item
Value

CPUs
Apple M2 Pro (10 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
5, 4, 3

Memory (System)
16.00GB (0.06GB free)

Process Argv
--crash-reporter-id 13bd231d-b64a-44e6-b12b-e94ca59a421c

Screen Reader
no

VM
0%

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30792227
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
282f8724:30602487
89544117:30613380
2i9eh265:30646982
showlangstatbar:30737416
vsctsb:30748421
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofa:30804715
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
e537b577:30795824
dsvsc013:30795093
dsvsc014:30804076

Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority. Thanks for understanding and the patience!

I'm able to reproduce the issue, thanks. Running code again from an untitled file or a file outside workspace does not use the existing REPL and fails.


typescript-graphql-request plugin doesn't include the errors key

After upgrading from version 4.4.3 to version 4.4.5 of the plugin, the errrors key is no longer available in the response object, even when using the rawRequest: true option.

Looks like @P4sca1 intentionally removed that in https://github.com/dotansimha/graphql-code-generator/pull/7676

Is that a bug? How can I get the .errors now then? Definitely need that.

It's a bug in graphql-request (it never really worked - you always had to try/catch to get it to function) - here's an Open PR that fixes that in graphql-request.
https://github.com/prisma-labs/graphql-request/pull/230

Yes, it has been removed intentionally. The typings used to be wrong. Code that uses the errors property for error handling is not working as intended, because the property is always undefined and an error is thrown instead.

graphql-request 5.0 has an errorPolicy option which returns errors when using rawRequest. Perhaps the errors field can be added back as a plugin option?


Handle insufficient permissions

Implements handling of permission errors returned from model-storage

Codecov Report

Merging #112 into caffeine will decrease coverage by 0.44%.
The diff coverage is 55.55%.

@@             Coverage Diff              @@
##           caffeine     #112      +/-   ##
============================================
- Coverage     77.06%   76.61%   -0.45%
============================================
  Files            19       19
  Lines           606      620      +14
============================================
+ Hits            467      475       +8
- Misses          139      145       +6

Impacted Files
Coverage Δ

src/model/storage.py
82.85% <100%> (+1.6%)
:arrow_up:

src/model/exceptions.py
90.9% <100%> (+5.19%)
:arrow_up:

src/model/resources.py
66.03% <20%> (-3.66%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55e382f...bf3eec2. Read the comment docs.


Sending unhandled iq results in infinite loop

If in Gajim I accidentally click "execute command" from the menu, sending an unhandled iq, I see in the terminal infinite output as the bot keeps dumping the help message over and over or something.

Not sure what you mean here, possibly fixed with the new commits?

Yeah, this seems fixed now.


feat(waf): add basic WAF monitoring

Related #76

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

We can extend this later, this is just a start.

The changes looks good to me!
Do you think it is worth adding aspect monitoring for it similar to what we do for glue jobs here via the CfnWebACL L1 construct?

I was thinking about it... I think in our case, the CfnWebACL probably makes sense, but to be honest, I am not very familiar with the WAF data model. I can add it, although I expect we might have different additions for WAF, e.g. rule-specific monitoring, and so on.

Tentatively added do-not-merge label in case @ayush987goyal had any pending thoughts.


Model associations completely broken

[ ] Pagination
[ ] Destroy should redirect to previous page
[ ] Edit and show should show proper content on modal.

I think the popup code could use a rewrite, especially as the current implementation relies on Bootstrap's modal remote option which is deprecated (https://github.com/twbs/bootstrap/issues/14843).


deviceorientation event is deprecated on insecure origins [Chromium v50]

Hi
While running on Chromium (opensource Chrome version) over HTTP the console say:

The deviceorientation event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

Cheers.

It's been deprecated for a while for HTTP, but Google doesn't seem to have timeline for when it will be blocked. When it does get blocked, the device orientation button just won't show up on HTTP connections but will continue to work fine when load over HTTPS.


Image rendering is slow

@muukii For large images cgContext.draw(cgImage, in: CGRect(origin: .zero, size: canvasSize)) in public func render(resolution: Resolution = .full) -> UIImage takes too long, about a minute.
Can you please suggest how this can be fixed?

Are you using the simulator ? The simulator is very slow, but real device should do it in seconds at most.

@ntnmrndn I use a real device. iPhone XS, 14.0.1.
I try with this photo: https://unsplash.com/photos/ETeQcrvs0No

@muukii It appears that this function runs on the main thread sometimes, causing the UI to appear blocked. Additionally, the logs show that (for some reason) a CGImage is unavailable from the supplied UIImage. According to Apple's documentation, this can happen when converting between a UIImage and a CIImage... are you addressing this in v2?

@Sam-Spencer
Thanks.
Firstly, the above function can be run in background-thread.
public func render(resolution: Resolution = .full) -> UIImage

Lager image takes a long time, it's unavoidable.
So would you try to run in backgorund-thread?
In order to render large(full-size) image, we need to use CPU rendering in my opinion.
And some more image manipulations need to use CoreGraphics.
That's why we use CGImage.

And I thought we could get something optimizations.
If the image only needs cropping, we can get the final image without using CoreGraphics manipulations.

This PR might faster this.
https://github.com/muukii/Brightroom/pull/76


Teams Author App Error while launching

We have deployed the Autor app and user app .  when we add the Autor app we get the below error
Oops! An unexpected error seems to have occurred. Why not try refreshing your page? Or you can contact your administrator if the problem persists.  Intially it load screen partially after a second this error appear.
All the graph permission is created and multi tenant is created for user app and auher app as per the deployment guide
Please advice how to see detail erorr and also other places to check if all configuration is correct

Graph App - Registration

Graph Permission

Author App Registration

Function App deployment status

Azure solution are deployed in Tenant A and Teams app and App registration are done in Tenant B.  During the setup tennant id given is Tenant B (tems app installed and app registration)
application insight does not show any error , refer to the image below

From dev tool i can see some error on azure functions not sure if this is related

Checked the CROS setting for app services frontdoor url is added in the allowed list

I have the same error, but I see I have a few things different then yours, if you fix it can we please have a call or any sort of help, I am really struggling on making this work :(

Hi @sponlinedev ,
Thanks for raising the query.

From your screenshots, within the graph api permissions there is one delegated permission missing. Please check and update.
Hope you have updated manifest section within graph app registration.

Please cross verify the secrets. Here is the procedure for comparison.

Go to app registration-->open author app registration-->click certificate and secrets-->Grab secret value(not id)

Go to azure portal-->Go to resource group(Where the deployment has been done)-->Select keyvault  from list of resources

Go to Access Policy--> Click on Create

Select Key, secret and certificate management

Give the Id through which one can view the secrets

3rd step is optional

Go for Review+Create

Then go to Secrets. You will be able to view the secrets. Compare each app secret from keyvault with app registration secret.

i have verified the client id , secret and teannt id its correct.
which permission is missing in grap app registration ?

Hi @sponlinedev ,
Could you please share the zipped manifest files used for uploading to the teams

Communicator_Author.zip

Please can you tell me what I can do?
ABDUL HALIM
IT Support Administrator
@.***
+44 20 7665 5009 direct
12 Gough Square
London EC4A 3DW
+44 20 7665 5000
hausfeld.com
This email is confidential and may be legally privileged. If you have received it in error, please contact me immediately. Hausfeld & Co. LLP is a limited liability partnership registered in the State of New York and is authorised and regulated by the Solicitors Regulation Authority ('SRA') in England & Wales with number 513826.
From: sponlinedev @.>
Sent: Wednesday, November 15, 2023 12:57 PM
To: OfficeDev/microsoft-teams-apps-company-communicator @.>
Cc: Abdul Halim @.>; Comment @.>
Subject: Re: [OfficeDev/microsoft-teams-apps-company-communicator] Teams Author App Error while launching (Issue #1217)
Communicator_Author.ziphttps://github.com/OfficeDev/microsoft-teams-apps-company-communicator/files/13364894/Communicator_Author.zip
—
Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/microsoft-teams-apps-company-communicator/issues/1217#issuecomment-1812490883, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDZ4XH4ALVTX26NDNBHLMGTYES32TAVCNFSM6AAAAAA7KZFGNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJSGQ4TAOBYGM.
You are receiving this because you commented.Message ID: @.***>

attaching mainefest file zip
Communicator_Author.zip
Can we have a teams call ? short one?

If you have a fix, please can we have a call?

wait till we find the root casue and fix,.  i will update the thread if we find the solution / fix

@gsv022
Also check the CORS error mentioned in the issue description and previous response for mainfest files for author app

should I check the same? If so can you please tell me how to do that

company-communicator-users.zip.zip
communicator-hasfeld.zip
Attached both of my zip files

We have our company communicator running and working but just now, we are receiving the below exception when we try to access it in Teams
Microsoft.Azure.Cosmos.Table.StorageException:
GET SentNotifications/GetSentNotifications
GET /NotificationData

@sponlinedev , Issue is being followed internally

@gsv022  The issue we faced on CROC issue is due to URL whitelisting , after whitelisting we are able to launch the application .
However message are not delivering
Failed to install application for user: 153c3008-0de3-4d3b-9c6f-c47af6193e43. Exception: Code: BadRequest Message: Unable to create 1on1 conversation between user and BotFailed to execute Skype backend request CreateThreadS2SRequest. Inner error: Code: InvalidRequest Message: Unable to create 1on1 conversation between user and BotFailed to execute Skype backend request CreateThreadS2SRequest. Inner error: AdditionalData: date: 2023-11-24T07:07:22 request-id: 3a70e9e9-b7cf-4613-a034-3d43fdb034d1 client-request-id: 3a70e9e9-b7cf-4613-a034-3d43fdb034d1 ClientRequestId: 3a70e9e9-b7cf-4613-a034-3d43fdb034d1

We are following the issue internally

Hi @sponlinedev ,
Please let us know the status of the issue.


Fix for TestIndexReaderClose.TestCloseUnderException

The IndexReader.NotifyReaderClosedListeners() did not properly suppress the exceptions thrown from the call to listener.OnClose(). Unfortunately there is no place to track the suppressed exception so it is just dropped.
Changing to return AggregateException will change the type and cause problems later for flow control.

Rebased and removed the attempt to use AggregateException. This caused problems.

Merged. We should probably add a LUCENE TODO to tackle this later since we are swallowing the original exception


Doesn't connect any more.

Hi, as I suspect you may know, lgogdownloader no longer works. On my version (3.7 64 bit Arch) you get a "URL using bad/illegal format or missing URL" after entering the password.
I notice the (removed forty curse words seven of which are illegal) stupid pictorial captcha is back again and I suspect this is something to do with it, though I did try building it with QT installed and it didn't seem to help. I did try it on Ubuntu from a USB key and that didn't work either (the Ubuntu one has it built in).

Are you entering the correct password? I've just tried lgogdownloader and it's still fully functional for me.

Yep.  It used to work fine up until yesterday (which was the same time the captchas started appearing)

I have the same error on FreeBSD 12.1.
I compiled v3.7.
I sometimes also get "couldn't resolve host name" even though I can resolve gog.com just fine on that machine.


Clicking namespace on dashboard results in broken namespace filter

While filtering on the projects page works, if you navigate there by way of clicking a namespace link on the dashboard, the filtering does not work.

Will be addressed in 0.9.0


Incorrect wrapping on PR comments with long paths

Gitea version (or commit ref): 1.14.3
Git version: 2.25.1
Operating system: Ubuntu Linux 20.04.2
Built Gitea myself, running from systemd (my own service script) on an AWS x86_64 box
Database (use [x]):

[x] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[x] Yes: https://try.gitea.io/parnic-sks/long-paths-test-2/pulls/1
[ ] No

Description
Comments on files with long paths will not wrap the file name header on a PR if there's no easily-available word boundary to wrap on. This causes the "Outdated" badge and/or "Show Resolved"/"Hide Resolved" links to either overlap other UI elements or be completely obscured, rendering them un-clickable. Note: this is not a contrived example, we ran into this on our project.
Example of a long path with available word boundaries: https://try.gitea.io/parnic-sks/long-paths-test/pulls/1
Example of a long path that doesn't currently wrap: https://try.gitea.io/parnic-sks/long-paths-test-2/pulls/1
Screenshots
Working (valid word boundaries):

Not working (no valid word boundaries):

Potential fix
Setting word-break: break-word; CSS on one of the segment bits used for PR comment filename headers is one possible way to fix the issue:

This fix doesn't seem to have taken. The class is now applied at https://try.gitea.io/parnic-sks/long-paths-test-2/pulls/1, but the text still doesn't break.

Also it looks like the Outdated badge will need word-break: normal applied if the parent div has its word-break set to break-word.

#16272 did only fix firefox but in chrome it's still here :X