Can't build dlib, got error "use of undeclared identifier 'jpeg_mem_src'"

Expected Behavior

"pip3 install dlib" should install the dlib package...
Current Behavior

I got the error:
use of undeclared identifier 'jpeg_mem_src'
Here the CMake output:
ERROR: Command errored out with exit status 1:      command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-record-vdnc_yh2/install-record.txt --single-version-externally-managed --compile          cwd: /private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/     Complete output (176 lines):     running install     running build     running build_py     package init file 'dlib/__init__.py' not found (or not a regular file)     running build_ext     Building extension for Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52)     Invoking CMake setup: 'cmake /private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/build/lib.macosx-10.9-x86_64-3.7 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -DCMAKE_BUILD_TYPE=Release'     -- The C compiler identification is AppleClang <IP_ADDRESS>01145     -- The CXX compiler identification is AppleClang <IP_ADDRESS>01145     -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc     -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works     -- Detecting C compiler ABI info     -- Detecting C compiler ABI info - done     -- Detecting C compile features     -- Detecting C compile features - done     -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++     -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works     -- Detecting CXX compiler ABI info     -- Detecting CXX compiler ABI info - done     -- Detecting CXX compile features     -- Detecting CXX compile features - done     -- Found PythonInterp: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 (found version "3.7.4")     -- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib     -- Performing Test HAS_CPP14_FLAG     -- Performing Test HAS_CPP14_FLAG - Success     -- pybind11 v2.2.2     -- Using CMake version: 3.15.4     -- Compiling dlib version: 19.18.0     -- SSE4 instructions can be executed by the host processor.     -- AVX instructions can be executed by the host processor.     -- Enabling AVX instructions     -- Looking for pthread.h     -- Looking for pthread.h - found     -- Performing Test CMAKE_HAVE_LIBC_PTHREAD     -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success     -- Found Threads: TRUE     -- Found system copy of libpng: /usr/local/lib/libpng.dylib;/usr/lib/libz.dylib     -- Found system copy of libjpeg: /usr/local/lib/libjpeg.dylib     -- Searching for BLAS and LAPACK     -- Searching for BLAS and LAPACK     -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")     -- Checking for module 'cblas'     --   No package 'cblas' found     -- Checking for module 'lapack'     --   No package 'lapack' found     -- Looking for sys/types.h     -- Looking for sys/types.h - found     -- Looking for stdint.h     -- Looking for stdint.h - found     -- Looking for stddef.h     -- Looking for stddef.h - found     -- Check size of void*     -- Check size of void* - done     -- Found LAPACK library     -- Found CBLAS library     -- Looking for cblas_ddot     -- Looking for cblas_ddot - found     -- Looking for sgesv     -- Looking for sgesv - found     -- Looking for sgesv_     -- Looking for sgesv_ - found     CUDA_TOOLKIT_ROOT_DIR not found or specified     -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")     -- DID NOT FIND CUDA     -- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA     -- Building a C++11 test project to see if your compiler supports C++11     -- C++11 activated.     -- Configuring done     -- Generating done     -- Build files have been written to: /private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/build/temp.macosx-10.9-x86_64-3.7     Invoking CMake build: 'cmake --build . --config Release -- -j2'     Scanning dependencies of target dlib     [  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o     [  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o     [  3%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o     [  4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o     [  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o     [  6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o     [  8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o     [  9%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o     [ 10%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o     [ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o     [ 12%] Building CXX object dlib_build/CMakeFiles/dlib.dir/unicode/unicode.cpp.o     [ 13%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/image_dataset_metadata.cpp.o     [ 15%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/mnist.cpp.o     [ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/global_optimization/global_function_search.cpp.o     [ 17%] Building CXX object dlib_build/CMakeFiles/dlib.dir/filtering/kalman_filter.cpp.o     [ 18%] Building CXX object dlib_build/CMakeFiles/dlib.dir/test_for_odr_violations.cpp.o     [ 19%] Building CXX object dlib_build/CMakeFiles/dlib.dir/svm/auto.cpp.o     [ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_1.cpp.o     [ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bsp/bsp.cpp.o     [ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_1.cpp.o     [ 24%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_2.cpp.o     [ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_extensions.cpp.o     [ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/linker/linker_kernel_1.cpp.o     [ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/extra_logger_headers.cpp.o     [ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_kernel_1.cpp.o     [ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_config_file.cpp.o     [ 31%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_1.cpp.o     [ 32%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_2.cpp.o     [ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_extensions.cpp.o     [ 34%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_2.cpp.o     [ 36%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf.cpp.o     [ 37%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf_unbuffered.cpp.o     [ 38%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_kernel.cpp.o     [ 39%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_iostream.cpp.o     [ 40%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_http.cpp.o     [ 41%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/multithreaded_object_extension.cpp.o     [ 43%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threaded_object_extension.cpp.o     [ 44%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_1.cpp.o     [ 45%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_2.cpp.o     [ 46%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_shared.cpp.o     [ 47%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/thread_pool_extension.cpp.o     [ 48%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/async.cpp.o     [ 50%] Building CXX object dlib_build/CMakeFiles/dlib.dir/timer/timer.cpp.o     [ 51%] Building CXX object dlib_build/CMakeFiles/dlib.dir/stack_trace.cpp.o     [ 52%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/cpu_dlib.cpp.o     [ 53%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/tensor_tools.cpp.o     [ 54%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.cpp.o     [ 55%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/widgets.cpp.o     [ 56%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/drawable.cpp.o     [ 58%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/canvas_drawing.cpp.o     [ 59%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/style.cpp.o     [ 60%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/base_widgets.cpp.o     [ 61%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_1.cpp.o     [ 62%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_2.cpp.o     In file included from /private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/dlib/gui_core/gui_core_kernel_2.cpp:22:     /usr/X11R6/include/X11/XKBlib.h:399:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]         register KeySym *           /* sym_return */,         ^~~~~~~~~     1 warning generated.     [ 63%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/png_loader.cpp.o     [ 65%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_png.cpp.o     [ 66%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/jpeg_loader.cpp.o     [ 67%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_jpeg.cpp.o     /private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/dlib/image_loader/jpeg_loader.cpp:141:37: error: use of undeclared identifier 'jpeg_mem_src'             else if (imgbuffer != NULL) jpeg_mem_src(&cinfo, imgbuffer, imgbuffersize);                                         ^     1 error generated.     make[2]: *** [dlib_build/CMakeFiles/dlib.dir/image_loader/jpeg_loader.cpp.o] Error 1     make[2]: *** Waiting for unfinished jobs....     make[1]: *** [dlib_build/CMakeFiles/dlib.dir/all] Error 2     make: *** [all] Error 2     Traceback (most recent call last):       File "<string>", line 1, in <module>       File "/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/setup.py", line 261, in <module>         'Topic :: Software Development',       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup         return distutils.core.setup(**attrs)       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup         dist.run_commands()       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands         self.run_command(cmd)       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command         cmd_obj.run()       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run         return orig.install.run(self)       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run         self.run_command('build')       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command         self.distribution.run_command(command)       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command         cmd_obj.run()       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run         self.run_command(cmd_name)       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command         self.distribution.run_command(command)       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command         cmd_obj.run()       File "/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/setup.py", line 135, in run         self.build_extension(ext)       File "/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/setup.py", line 175, in build_extension         subprocess.check_call(cmake_build, cwd=build_folder)       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call         raise CalledProcessError(retcode, cmd)     subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.     ---------------------------------------- ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-install-y2hfr2ky/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/d1/_q__ty7n4nq36m6mcg12wmv40000gn/T/pip-record-vdnc_yh2/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Steps to Reproduce

Version:
Well... as I use the pip command, should be the last one...

Where did you get dlib:
I think this is an official source as I use the pip command...

Platform:
macOS (High Sierra - 10.13.6) 64-bit

Compiler:
xCode version 10.1 (10B61)

Seems like your system copy of libjpeg is too old.  Try using the latest version of dlib in github, I just pushed a change that should handle this.

Thank you, it works with the change you made !

sudo apt-get install libjpeg-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev

This solve the problem for me


Add linting stage to TypeScript build task

This PR adds a linting stage to the TypeScript build task.
It uses npm run lint to execute the linter and generates a lint report and stores it inside .ods/artifacts/lint-reports/report.txt.
Sadly eslint (the JS/TS linter most commonly used) does not output anything if the command was executed successfully, so I needed to store a text in the report (currently: "No linting issues inside workspace" but this is open for debate).
I also introduced a new test workspace plus test case (similar to what is done with go) that checks whether or not the build is stopped and a correct report is generated if there are linting issues in one of the TS files.
Happy to discuss any of the added changes.

P.S. I also updated the script so that npm ci is run outside of the "Building..." stage and gave it its own headline to give the user a better overview what is currently happening.
Closes #325
Tasks:

[x] Updated design documents in docs/design directory or not applicable
[x] Updated user-facing documentation in docs directory or not applicable
[x] Ran tests (e.g. make test) or not applicable
[x] Updated changelog or not applicable

I am also wondering now if we should enforce the usage of eslint in the build task by running npx eslint ... instead of npm run lint, the same way it is done with go and golangci-lint.
What are your opinions on this @michaelsauter & @kuebler?

I think it is definitely possible to enforce the usage of eslint as it commonly used and does not seem to be replaced by any other tool in the near future and even if that is the case we can change the linter in an upcoming release.
The rules that eslint applies need to be set in a config file (e.g. eslintrc.json or similar), which we could point the user to in our documentation of the build task, what do you think?

I think it is definitely possible to enforce the usage of eslint as it commonly used

ok then let's do that. I think this also has the benefit that one does not need to define lint target in the package.json, right? It should work out of the box then ...

What would be necessary then is that people are able to customize the eslint options (e.g. the amount of warnings that are allowed via --max-warnings=n) via parameters passed to the build task.

Is this also possible via eslintrc.json?

I think this also has the benefit that one does not need to define lint target in the package.json, right? It should work out of the box then ...
I would assume that one would still create a lint script inside package.json to not wait until the task fails due to linting issue, but yes it should also work without someone specifying it themself.

Is this also possible via eslintrc.json?

Not that I know of. I think it is only possible via the CLI, but I will check

Could we get some input from this from other frontend colleagues? E.g. @netzartist @m-apsolon @ManuelFeller?
What would you like to see here? Would this work as-is in your current projects?

The build task currently fails at the linting stage if no eslint config (eslintrc.json or similar) can be found. Where in the documentation would you see the need to specify the need to create one by possibly running eslint --init or following the official documentation, @michaelsauter?
Inside deploy/central/tasks-chart/templates/task-ods-build-typescript.yaml?

@henninggross we could mention it there, yes.
However, an alternative approach would be to just run eslint --init if no eslintrc.json is found. Similar to #296. What do you think?

However, an alternative approach would be to just run eslint --init if no eslintrc.json is found. Similar to #296. What do you think?

I thought about this, but eslint --init is interactive and won't work inside CI, would it?

What would you like to see here? Would this work as-is in your current projects?

In general enforcing TS linting and sticking to eslint is a good idea. Some improvement ideas:

Allow passing additional file extensions
Allow different output format
Eslint CLI offers a fix parameter to automatically fix "easy" errors automatically. I'm not sure about it currently: Add this as an option, too - if one would decide to use (and trust) this functionality? Or one should create a lint:fix script in the project's package.json?

Eslint CLI offers a fix parameter to automatically fix "easy" errors automatically. I'm not sure about it currently: Add this as an option, too - if one would decide to use (and trust) this functionality? Or one should create a lint:fix script in the project's package.json?

The fix option is not a good fit for a CI pipeline as the "fixed" code will not be committed to the repo which would lead to different code inside the repository compared to the delivered code, wouldn't it?
Therefore I'd vote for not having that option. Users can still create their own lint or lint:fix script inside their package.json as you mentioned to have that option if they like, but I would shy away from using it in the CI pipeline - what do you think?

Let's start with this and see how it works out in real projects. As we are pre-1.0 we still have time to adapt.


How about the performance?

Thanks for sharing the implementation. My question is similar question #2 . Could you update/show the performance of the implementation with/without GAN? I would like to know if my running is correct or not. Thanks

I have done an implementation of  GAN4Seg with tensorflow. But the results is not so good. The D can give different score on the real and fake samples. But the iou can not improved under the help of the D. Do you have the same difficulties?

Me too. I did not saw any improvement using GAN. As you saw in the paper, the author also mentioned that her method only has some gain in some dataset, while Pascal VOC is not. I think she based on the torch to implement. Could you try with another dataset?


Broken nav links from helpful-material.html

Nav links from the helpful-material.html do not working in local dev environment.
Links that are to be fixed.
Home
Contributors
Chesse
Tools
learn!

I will be taking this issue

Why did you reopen this?

It seems that all nav links are broken for local dev. I only fixed the home page and helpful-material.html. If it was a reopen it should not have been it should of been a new PR. Please view gif below to see what I am talking about with the broking links.

Ah okay, I assumed you fixed all of them in your last pull request.

@DCox2016 Can you or any one confirm that this is fixes or still an issue. Closing this until answered 👍


TypeScript - Property Atom does not exist on type TruncateMarkup

When trying to use TruncateMarkup.Atom with TypeScript I get the following error message:
Property 'Atom' does not exist on type 'typeof TruncateMarkup'.
Looking at index.d.ts, I see it is missing the export/definition of Atom .. Could you please help me to overcome that issue?

I found a hacky solution:

Declare the Atom component as const TruncateMarkupAtom = (TruncateMarkup as any).Atom; (notice casting to any)
Use it as a normal component

list.map((item, index) => (
  <TruncateMarkupAtom key={index}>
    {item}
    <br />
  </TruncateMarkupAtom>
));

Fixed in v5.1.0

Fixed in v5.1.0


Drop the GraphQL prefix

Pull Request Test Coverage Report for Build 1123

82 of 84 (97.62%) changed or added relevant lines in 13 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage remained the same at 89.073%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/Schema/DefinitionBuilder.php
9
10
90.0%

src/Type/ScalarTypesProvider.php
4
5
80.0%

Files with Coverage Reduction
New Missed Lines
%

src/Language/Reader/StringReader.php
1
23.94%

Totals

Change from base Build 1121:
0.0%

Covered Lines:
5152

Relevant Lines:
5784

💛  - Coveralls


Charges not behaving as expected

There is an issue when one tries to add charges. A single charge works fine, but when you try to add multiple you get issues.

Regex doesn't have a concept of valence electrons so you'll probably want to either format it manually or use brackets

How do you use brackets with it? Or do you mean bracket with #super[]
Having looked at it, your package knows what elements are. Would a regex expression that knew if you had a charge what it would be possible?
Like metals are all fairly simple because they aren't diatomic. If there is metal, a number, and then a charge, it would always be an ion.
For the nonmetal ions, they would need to be disambiguated from their polyatomic forms but if the pattern is single nonmetal, a number, then a charge then it would be a charge on an ion.
For polyatomic ions, I wonder if a mcchem style of using carets would do the trick. Beyond what they do, If there is any number between the caret and the charge, I would think to would only possibly be a charge and so that pattern could safely be lifted.
Here is a bit of code that explains what I mean about the carets:

#let ion-fm = regex("(\p{upper}\p{lower}?)(\d+)?(\^(\d*))?([-+])?")

#show ion-fm: it=> {

    let (sm, atom-n, _, ..chg) = it.text.match(ion-fm).captures

    sm

    sub(atom-n)

    super(chg.join())

}

CO2

CO3^2-

Cl3-

H2O

H3O+

2SO4^2- + H2O -

CO2

CO3^2-

Cl-

H2O

H3O+

Ca^2+

2SO4^2-

CO3^2-

NH4+

NO2^-

NO3^-

SO3^2-

SO4^2-

HSO4^-

S2O3^2-

C2O4^2-

OH-

PO3^3-

PO4^3-

HPO4^2-

H2PO4^-

ClO4-

ClO3-

ClO2-

ClO-

BrO3^-

IO3^-

CH3COO^-

S2O3^2-

CH3COO^-

That said wouldn't it be cool if it had like a list in your repository that people could add ions to with the correct formatting that is triggered by typing them in the laziest way possible as I did in my example from earlier.
Anyway, thanks for the response. I'm really satisfied with your package so far.
One final thing, I think
#show "<=>": sym.harpoons.rtlb

//to make possible

#"<=>"

would be a nice little perk in your package.


NEXT-6651 asset urls via CDN, publish commands

1. Why is this change necessary?
Because if you try to use a remote filesystem atm, the static assets are upload to the remote filesystem shopware.filesystem.public but the asset() function in twig is not aware of that.
2. What does this change do, exactly?
Just like the Symfony framework bundle \Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension::createPackageDefinition they either create a PathPackage or an UrlPackage depending on the presence of a base_url.
Until now the \Shopware\Core\Framework\Adapter\Asset\AssetPackageService always created PathPackage instances. We now respect the CDN configuration.
Notice: I use the shopware.cdn.url instead of the Symfony framework.assets.base_urls as Symfony has fallbacks and much more that Shopware isn't capable of and as the filesystem is codewise strictly the same, I think it's better to tie that to the shopware configuration. Maybe it would even be better to create a CompilerPass to set the framework base_url configuration automatically as this is hardly coupled to the Shopware application (feedback wanted).
I also document and introduce 2 new commands that help you migrate your currently local filesystem to a remote filesystem.
3. Describe each step to reproduce the issue or behaviour.
Add this to your docker-compose.yml:
  minio:
    image: minio/minio
    ports:
      - "9001:9000"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server /data

Add this to config/packages/shopware.yml:
shopware:
  filesystem:
    public:
      type: 'amazon-s3'
      config:
        bucket: "shopware"
        region: "us-east-1"
        endpoint: "http://minio:9000"
        use_path_style_endpoint: true
        protocol: "http"
        credentials:
          key: "minio"
          secret: "minio123"
        options:
          visibility: "public"
  cdn:
    url: 'http://localhost:9001/shopware/'
    strategy: 'id'

Patch notice: The option protocol is currently not supported by the S3 adapter, you have to modify \Shopware\Core\Framework\Adapter\Filesystem\Adapter\AwsS3v3Factory::resolveS3Options to allow that option.
And this to config/packages/symfony.yml:
framework:
  assets:
    base_urls:
      - "http://localhost:9001/shopware/"

Then run:
bin/console theme:compile
bin/console media:publish
bin/console assets:publish

You should now have a working admin and storefront that use all resources from the simulated CDN http://localhost:9001/shopware.
4. Please link to the relevant issues (if any).
#466
5. Checklist

[ ] I have written tests and verified that they fail without my change
[x] I have squashed any insignificant commits
[x] I have written or adjusted the documentation according to my changes
[x] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

Hi @hhoechtl,
first of all, thank you for your work.
Since we are planning to refactor our asses-system this is maybe something we should handle internally too.
Please look up our internal ticket and get back to us if this is something you would be fine with or give us some feedback :)
https://issues.shopware.com/issues/NEXT-6728
Sunny regards
Pantrtxp

@pantrtxp If you want to change it in general that's fine as long as it works. But atm. it's unusable. This small changes make it usable and should definitely go into 6.2

6.2 will be released in the next couple of days. We can only make for the 6.3 but this is our goal :)

I'm sorry, but I have to tell you that it's very frustrating that there
will be another major release of an enterprise software that is not cloud
ready despite being built with Symfony.
Von unterwegs gesendet
Thorben Pantring<EMAIL_ADDRESS>schrieb am Mo., 18. Mai 2020,
13:20:

6.2 will be released in the next couple of days. We can only make for the
6.3 but this is our goal :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/shopware/platform/pull/914#issuecomment-630116337,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGXLBEGZ4KFFCBGZ53Q7ADRSEKYZANCNFSM4NAWROUQ
.

I don not quite understand what you want to say with this. Updates are needed for on-premise hosted software.
But to answer your question of a SaaS solution:
Can we expect a SaaS product from Shopware in the future?
Yes! Of course, we recognize that the demand for "eCommerce in the cloud" is growing and many users are looking for solutions outside of today's on-premise world.
In 2020, we will be introducing other products and services that will be provided in the cloud, in addition to the existing product line.
Taken from our FAQ


Document message formats as-is

This is likely to later be replaced by mixins (https://github.com/matrix-org/matrix-doc/issues/1225), however this is being documented now so clients aren't left in the dark.
Fixes https://github.com/matrix-org/matrix-doc/issues/917
This PR documents existing behaviour and does not attempt to improve or change the situation.

This is blocked on https://github.com/matrix-org/matrix-doc/pull/1389

@mujx and/or @KitsuneRal - would be nice to get your approval on this one

Do we have some extra info on the format of formatted_body? Is it a subset of HTML?

It's what the format key specifies


Release 0.8

This issue tracks the work needed to be done before/while releasing 0.8.
The major news for the upcoming 0.8.0-release is the support for sync-tokens.
Here is the list:

look through all issues, possibly fix some of them prior to the 0.8.0-release, and decide what to postpone for the next release (I planned 1.0 to be the next release, but there may be a 0.9.0-release with support for RSVP/scheduling, I should look into RFC 6638).
Run tests towards as many different server implementations as I can manage
Make sure the ChangeLog is updated
Write some release notes
Verify that the documentation is up-to-date
Refresh my memories on how to do the pypi-release
Remember to update the version number in setup.py, and make a proper tag in the git repository
Push out a new release to pypi
Ensure the online documentation is up-to-date.

https://github.com/python-caldav/caldav/milestone/5 - the list of prioritized things that is considered to be fixed prior to a 0.8.0-release.  I'm expecting to release 0.8.0 in the early January, things not done until then will be postponed until a later release.

As always, things have been unexpectedly hectic recently (two migration projects at work coming in at the same time, I've gone to visit my family now, they have theoretically been two hours by plane away from me but due to covid the travel efficiently took me two days, including preparations with the visa application and covid test), so "early january" didn't quite pan out, but I plan to have something ready before next week.

As always, things have been unexpectedly hectic recently (two migration projects at work coming in at the same time, I've gone to visit my family now, they have theoretically been two hours by plane away from me but due to covid the travel efficiently took me two days, including preparations with the visa application and covid test), so "early january" didn't quite pan out, but I plan to have something ready before next week.

Scheduling is being pushed for the 0.8-release, due to pressing demands from a client.  Unfortunately this means I probably won't have time to do a 0.8-release during February.  It's a pity since the current master branch both contains some bugfixes as well as new features.
Releasing 0.8 should not necessarily depend on me.  If anyone else would like to dive into it, the development for scheduling will be done on a separate branch, and the master branch should be relatively ready for a release, and I'm ready to assist.  It's not a particularly big job.

The remaining issues tagged with 0.8 in the issue tracker can very well wait for 0.9.
Commit 552ff4728a191610d08f31a181573fb1f57e8692 has been tested towards quite a list of server implementations, and I'm ready to do the testing again towards the same servers if needed.  (though, it would be nice to include even more servers on that list, particularly nextcloud is missing).
The ChangeLog - that's a major time drain.  I suggest dropping the file at all - but still, it's needed to take a brief look through all commits since the 0.7-release due to the next two bullet points ...
... writing up some release notes that summarizes the differences between 0.7 and 0.8
... verifying that the documentation is up-to-date, and do a quick QA on it
if I'm to do a release I need to refresh my memories on how to do a pypi-release.  Others may probably know it by heart :-)
The last things to do before a release is to upgrade the version number in setup.py, do a commit and then make an annotated tag (preferably git tag --annotate --sign, but at least git --annotate).
Make sure to push the tag. I don't remember if a git push --all was sufficient, or if a git push --tags was needed.  Just keep pushing until everything looks good :-)  (Like many others, I'm just pretending that I know how to use git).
Push out the release to pypi
Check that the online documentation is up-to-date.

0.8 will be released tomorrow (already today actually).    Here is the draft of the release notes:
Release notes v0.8
Support for WebDAV sync-tokens
The most significant enhancement for v0.8 is support for syncing collections using a sync-token.  Some (untested) meta-code in the examples folder on how to use it.  It's also thoroughly tested in the functional tests, but the test code is not optimized for readability.
Work on support for RFC6635, scheduling/RVSP (partially done)
Convenience-methods for finding CalDAV inbox and outbox, for accepting calendar invites, for adding invitations to an icalendar object, doing freebusy-requests towards email addresses and misc.  Should be ready for use, but it's relatively untested.
Improved support for iCloud, Google
Apple seems to have more or less abandoned their position in the CalDAV ecosystem.  While they've never said officially that iCloud supports CalDAV, they do support some basic CalDAV operations.  There hasn't been done much dedicated work on supporting iCloud in this release, but a lot of testing has been done, some few tweaks, and some documentation.
Google has two APIs, one legacy API and one new API.  The new API is not supported yet.  As with iCloud, while very little dedicated work has been done to support Google, I've done a lot of testing, some few tweaks, and some documentation.  Unlike Apple, Google is very transparent on their (lack of proper) CalDAV support.
Calendar API improvements

Method for doing a multiget for fetching multiple events in one http request has been added, but more work is needed (multiget should be utilized by the library when applicable without the end-user having to be explicit on it, it's missing test code).
Possible to look up a calendar by name
Possible to access a calendar by url from the DAVClient object (instead of creating a Calendar object and pass the client)
New method calendar.get_supported_components()

Improvement of the documentation, examples and inline docstrings and comments
I'm not much good at this, but I'm always trying to improve on it, and I've received a bit of help this time.  I would appreciate more help on documentation work.
Test framework
Probably the bulk of the work for this release has been on the test suite; work that won't be visible for the end user, but which hopefully will reduce the number of regression problems.  It should also be a little bit easier to run the test suite towards private test servers now.
Refactoring
"Rewritten code" is hardly a selling point, it typically means more bugs and sometimes even less features - but I think the effort done here will pay back relatively soon.  I'd say it's a bit important that the maintainer of the library understands the code he's trying to maintain :-)
Credits
Thanks to Nylas, Mincheol Song (@mtorange), @olf42, @tfinke, Teymour Aldridge (@teymour-aldridge), @VanKurt, Ian Bottomley (@kyloe), Michael Wieland (@Programie), Herve Commowick (@vr), Jelmer Vernooĳ (@jelmer), Stephan (@kiffie), @pleasedonotwatch, @frank-pet.

Released


Deprecate the @serviceVersion decorator

At today's review (8/16) Ted pointed out the difference between a versioned spec and non-versioned spec could be confusing to newcomers and suggested unifying the experience or at least naming the decorators such that they appear next to eachother in intellisense.
Non-versioned Spec
@serviceTitle("Microsoft Cognitive Language Service - Analyze Text Authoring")
@serviceVersion("2022-05-15-preview")
@versionedDependency(Azure.Core.Versions.v1_0_Preview_1)
namespace Azure.Language.Authoring;

Versioned Spec
@serviceTitle("Microsoft Cognitive Language Text Analytics")
@versioned(Versions)
@versionedDependency([[Versions.v2022_05_15_preview, Azure.Core.Versions.v1_0_Preview_1]])
namespace Azure.Language.TextAnalytics;

The serviceVersion decorator needs to go away now that we have versioned.

We discussed replacing @serviceXxx(yyy) with service({Xxx: yyy})`.

But if this going away altogether we can do that independently.

Does it make sense to need to import the versioning library just to have a single version in your output?

I'm not convinced about this. Versioning is an advanced scenario, we shouldn't make that the default experience IMO. Version is a field that exists in openapi so I also think we need something to directly set that even if it lives in the openapi package rather than core.

That was my point and why we should have a design meeting about this.
It is definitely confusing right now that you have both. Maybe the solution is to disallow using @serviceVersion if you are using @versioned. And maybe the projection on the namespace would run @serviceVersion using the projected version

Nice, I like that proposal.

Will close this issue in favor of design https://github.com/microsoft/cadl/issues/982


[Sql] az sql elastic-pools database -h command throws

(env) vishrut@mac azure-cli (master) $ az sql elastic-pools -h

Group
    az sql elastic-pools: Commands to manage database elastic pools.

Subgroups:
    database   : Command to manage databases activities in database elastic pools.
    recommended

Commands:
    create     : Creates a new Azure SQL elastic pool or updates an existing Azure SQL elastic pool.
    delete     : Deletes the Azure SQL elastic pool.
    list       : Returns information about Azure SQL elastic pools.
    show       : Gets information about an Azure SQL elastic pool.
    update     : Update a database elastic pool.

(env) vishrut@mac azure-cli (master) $ az sql elastic-pools database -h

Command
    az sql elastic-pools database: Command to manage databases activities in database elastic pools.

Arguments
'GroupHelpFile' object has no attribute 'parameters'
Traceback (most recent call last):
  File "/Users/vishrut/repos/azure-cli/src/azure-cli/azure/cli/main.py", line 35, in main
    cmd_result = APPLICATION.execute(args)
  File "/Users/vishrut/repos/azure-cli/src/azure-cli-core/azure/cli/core/application.py", line 119, in execute
    args = self.parser.parse_args(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1726, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1758, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1946, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1923, in consume_positionals
    take_action(action, args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1832, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1129, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1758, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1946, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1923, in consume_positionals
    take_action(action, args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1832, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1129, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1758, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1946, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1923, in consume_positionals
    take_action(action, args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1832, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1129, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1758, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1964, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1904, in consume_optional
    take_action(action, args, option_string)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1832, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 1016, in __call__
    parser.print_help()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/argparse.py", line 2358, in print_help
    self._print_message(self.format_help(), file)
  File "/Users/vishrut/repos/azure-cli/src/azure-cli-core/azure/cli/core/parser.py", line 160, in format_help
    is_group)
  File "/Users/vishrut/repos/azure-cli/src/azure-cli-core/azure/cli/core/_help.py", line 30, in show_help
    print_detailed_help(help_file)
  File "/Users/vishrut/repos/azure-cli/src/azure-cli-core/azure/cli/core/_help.py", line 56, in print_detailed_help
    print_arguments(help_file)
  File "/Users/vishrut/repos/azure-cli/src/azure-cli-core/azure/cli/core/_help.py", line 79, in print_arguments
    if not help_file.parameters:
AttributeError: 'GroupHelpFile' object has no attribute 'parameters'

cc:
@troydai

Addressed this issue with @vishrutshah. He will send out fix soon. Assign to him.

Closing this as fix has been checked-in to master.


WebRTC stream suddenly stops working from time to time

Hello, I'm using go2rtc to get the stream of a Reolink Doorbell camera, and then I consume that from HomeAssistant. It works for about a week, and then it usually crashes and stops working, so I have to restart the server manually.
This is the config:
api:
  listen: "<IP_ADDRESS>:1984"    # default ":1984", HTTP API port ("" - disabled)
  username: ""  # default "", Basic auth for WebUI
  password: ""   # default "", Basic auth for WebUI
  origin: "*"        # default "", allow CORS requests (only * supported)

streams:
  doorbell-sub:
    - rtsp://user:pass@<IP_ADDRESS>:554/h264Preview_01_sub
    - ffmpeg:doorbell-sub#audio=opus#audio=volume

ffmpeg:
  bin: ffmpeg  # path to ffmpeg binary
  volume: "-af \"volume=10\""

And then this is what I'm seeing in the info page of that stream:
{
  "producers": [
    {
      "id": 307,
      "format_name": "rtsp",
      "protocol": "rtsp+tcp",
      "remote_addr": "<IP_ADDRESS>:554",
      "url": "rtsp://user:pass@<IP_ADDRESS>:554/h264Preview_01_sub",
      "sdp": "v=0\r\no=-<PHONE_NUMBER>266085 1 IN IP4 <IP_ADDRESS>\r\ns=Session streamed by \"preview\"\r\nt=0 0\r\na=tool:BC Streaming Media v202210012022.10.01\r\na=type:broadcast\r\na=control:*\r\na=range:npt=now-\r\na=x-qt-text-nam:Session streamed by \"preview\"\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 <IP_ADDRESS>\r\nb=AS:8192\r\na=rtpmap:96 H264/90000\r\na=range:npt=now-\r\na=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKCgPZA=,aO48sA==\r\na=recvonly\r\na=control:track1\r\nm=audio 0 RTP/AVP 97\r\nc=IN IP4 <IP_ADDRESS>\r\nb=AS:8192\r\na=rtpmap:97 MPEG4-GENERIC/16000\r\na=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;\r\na=recvonly\r\na=control:track2\r\nm=audio 0 RTP/AVP 8\r\na=control:track3\r\na=rtpmap:8 PCMA/8000\r\na=sendonly",
      "user_agent": "go2rtc/1.9.6",
      "medias": [
        "video, recvonly, H264",
        "audio, recvonly, MPEG4-GENERIC/16000",
        "audio, sendonly, PCMA/8000"
      ],
      "receivers": [
        {
          "id": 309,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video",
            "level": 51,
            "profile": "High"
          },
          "childs": [
            320,
            322,
            324,
            326,
            328,
            330,
            332,
            334,
            336,
            338,
            340,
            342,
            344,
            346,
            348,
            350,
            352,
            354,
            356,
            358,
            360,
            362,
            364,
            366,
            368,
            370,
            372,
            374,
            376,
            378,
            380,
            382,
            384,
            386,
            388,
            390,
            393,
            396
          ],
          "bytes":<PHONE_NUMBER>,
          "packets": 6559290
        },
        {
          "id": 313,
          "codec": {
            "codec_name": "aac",
            "codec_type": "audio",
            "sample_rate": 16000
          },
          "childs": [
            394
          ],
          "bytes":<PHONE_NUMBER>,
          "packets": 2365307
        }
      ],
      "bytes_recv":<PHONE_NUMBER>
    },
    {
      "id": 315,
      "format_name": "rtsp",
      "protocol": "rtsp+tcp",
      "remote_addr": "<IP_ADDRESS>:38130 forwarded <IP_ADDRESS>:8554",
      "source": "exec:ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://<IP_ADDRESS>:8554/doorbell-sub?audio -map 0:a:0? -c:a:0 libopus -application:a:0 lowdelay -min_comp 0 -af \"volume=10\" -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://<IP_ADDRESS>:8554/70acbc2b73c69b4881ece3dea1070b68",
      "url": "rtsp://<IP_ADDRESS>:8554/doorbell-sub?audio",
      "sdp": "v=0\r\no=- 0 0 IN IP4 <IP_ADDRESS>\r\ns=go2rtc/1.9.6\r\nc=IN IP4 <IP_ADDRESS>\r\nt=0 0\r\na=tool:libavformat 60.16.100\r\nm=audio 0 RTP/AVP 96\r\nb=AS:64\r\na=rtpmap:96 opus/48000/2\r\na=control:streamid=0\r\n",
      "user_agent": "ffmpeg/go2rtc",
      "medias": [
        "audio, recvonly, OPUS/48000/2"
      ],
      "receivers": [
        {
          "id": 316,
          "codec": {
            "channels": 2,
            "codec_name": "opus",
            "codec_type": "audio",
            "sample_rate": 48000
          },
          "bytes": 2287111,
          "packets": 13212
        }
      ],
      "bytes_recv": 2447139
    }
  ],
  "consumers": [
    {
      "id": 312,
      "format_name": "rtsp",
      "protocol": "rtsp+tcp",
      "remote_addr": "<IP_ADDRESS>:38120",
      "sdp": "v=0\r\no=- 1 1 IN IP4 <IP_ADDRESS>\r\ns=go2rtc/1.9.6\r\nc=IN IP4 <IP_ADDRESS>\r\nt=0 0\r\nm=audio 0 RTP/AVP 96\r\na=rtpmap:96 MPEG4-GENERIC/16000\r\na=fmtp:96 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;\r\na=control:trackID=0\r\n",
      "user_agent": "go2rtc/ffmpeg",
      "medias": [
        "audio, sendonly, ANY"
      ],
      "senders": [
        {
          "id": 314,
          "codec": {
            "codec_name": "aac",
            "codec_type": "audio",
            "sample_rate": 16000
          },
          "parent": 313,
          "bytes": 2131080,
          "packets": 4130
        }
      ],
      "bytes_send": 2197160
    }
  ]
}
}

We can probably remove HomeAssistant from the formula, because although that's what I'm using to consume the stream, if I go to the go2rtc panel, and click on stream it also fails to load, it keeps loading forever.

It looks like the websocket connection is not responding, maybe ?

So many childs is a big problem. Don't know yet why this can happen.

I can provide some more details:

I'm currently using version 1.9.6, before I was using version 1.8.2, and this issue was not present
Most consumers are mobile, using HomeAssistant app, specifically iOS devices
The common use pattern is: open HomeAssistant -> tap on a button to show the Camera dashboard -> then move to another iOS app. The HomeAssistant app is usually not explicitly closed

I can also send you the HomeAssistant card configuration in case it helps, but I believe it's pretty straightforward
type: custom:webrtc-camera
url: doorbell-sub
mode: webrtc
media: video,audio

So many childs is a big problem. Don't know yet why this can happen.

Its related to self referencing streams i think which should be fixed in v1.9.7. After closing the stream, the rtsp consumer from ffmpeg is still present. And if there is an issue with ffmpeg, the childs are not cleaned up

So many childs is a big problem. Don't know yet why this can happen.

Its related to self referencing streams i think which should be fixed in v1.9.7. After closing the stream, the rtsp consumer from ffmpeg is still present. And if there is an issue with ffmpeg, the childs are not cleaned up

I can try upgrading to v1.9.7 and check if it happens again. I'll let you know in a few days

@AlexxIT @seydx I've upgrade to v1.9.7 and the same thing happened again
{
   "producers":[
      {
         "id":2,
         "format_name":"rtsp",
         "protocol":"rtsp+tcp",
         "remote_addr":"<IP_ADDRESS>:554",
         "url":"rtsp://user:pass@<IP_ADDRESS>:554/h264Preview_01_sub",
         "sdp":"v=0\r\no=-<PHONE_NUMBER>403090 1 IN IP4 <IP_ADDRESS>\r\ns=Session streamed by \"preview\"\r\nt=0 0\r\na=tool:BC Streaming Media v202210012022.10.01\r\na=type:broadcast\r\na=control:*\r\na=range:npt=now-\r\na=x-qt-text-nam:Session streamed by \"preview\"\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 <IP_ADDRESS>\r\nb=AS:8192\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKCgPZA=,aO48sA==\r\na=recvonly\r\na=control:track1\r\nm=audio 0 RTP/AVP 97\r\nc=IN IP4 <IP_ADDRESS>\r\nb=AS:8192\r\na=rtpmap:97 MPEG4-GENERIC/16000\r\na=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;\r\na=recvonly\r\na=control:track2\r\nm=audio 0 RTP/AVP 8\r\na=control:track3\r\na=rtpmap:8 PCMA/8000\r\na=sendonly",
         "user_agent":"go2rtc/1.9.7",
         "medias":[
            "video, recvonly, H264",
            "audio, recvonly, MPEG4-GENERIC/16000",
            "audio, sendonly, PCMA/8000"
         ],
         "receivers":[
            {
               "id":3,
               "codec":{
                  "codec_name":"h264",
                  "codec_type":"video",
                  "level":51,
                  "profile":"High"
               },
               "childs":[
                  21,
                  23,
                  25,
                  27,
                  29,
                  31,
                  33,
                  37,
                  41,
                  45,
                  47,
                  49,
                  51,
                  53,
                  55,
                  57,
                  59,
                  61,
                  63,
                  65,
                  67,
                  71,
                  76,
                  77,
                  81,
                  83,
                  85,
                  88,
                  91
               ],
               "bytes":2206397467,
               "packets":1960259
            },
            {
               "id":6,
               "codec":{
                  "codec_name":"aac",
                  "codec_type":"audio",
                  "sample_rate":16000
               },
               "childs":[
                  89
               ],
               "bytes":361735092,
               "packets":701037
            }
         ],
         "senders":[
            {
               "id":14,
               "codec":{
                  "codec_name":"pcm_alaw",
                  "codec_type":"audio",
                  "sample_rate":8000
               },
               "parent":13,
               "bytes":100000,
               "packets":625
            },
            {
               "id":35,
               "codec":{
                  "codec_name":"pcm_alaw",
                  "codec_type":"audio",
                  "sample_rate":8000
               },
               "parent":34
            },
            {
               "id":40,
               "codec":{
                  "codec_name":"pcm_alaw",
                  "codec_type":"audio",
                  "sample_rate":8000
               },
               "parent":38
            },
            {
               "id":43,
               "codec":{
                  "codec_name":"pcm_alaw",
                  "codec_type":"audio",
                  "sample_rate":8000
               },
               "parent":42
            },
            {
               "id":69,
               "codec":{
                  "codec_name":"pcm_alaw",
                  "codec_type":"audio",
                  "sample_rate":8000
               },
               "parent":68
            },
            {
               "id":75,
               "codec":{
                  "codec_name":"pcm_alaw",
                  "codec_type":"audio",
                  "sample_rate":8000
               },
               "parent":72
            },
            {
               "id":79,
               "codec":{
                  "codec_name":"pcm_alaw",
                  "codec_type":"audio",
                  "sample_rate":8000
               },
               "parent":78
            }
         ],
         "bytes_recv":2601180131,
         "bytes_send":100880
      },
      {
         "id":8,
         "format_name":"rtsp",
         "protocol":"rtsp+tcp",
         "remote_addr":"<IP_ADDRESS>:48772 forwarded <IP_ADDRESS>:8554",
         "source":"exec:ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://<IP_ADDRESS>:8554/doorbell-sub?audio&source=ffmpeg:doorbell-sub%23audio%3Dopus%23audio%3Dvolume -map 0:a:0? -c:a:0 libopus -application:a:0 lowdelay -min_comp 0 -af \"volume=10\" -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://<IP_ADDRESS>:8554/08ad235e02668038fe4c37b715dfb357",
         "url":"rtsp://<IP_ADDRESS>:8554/doorbell-sub?audio&source=ffmpeg:doorbell-sub%23audio%3Dopus%23audio%3Dvolume",
         "sdp":"v=0\r\no=- 0 0 IN IP4 <IP_ADDRESS>\r\ns=go2rtc/1.9.7\r\nc=IN IP4 <IP_ADDRESS>\r\nt=0 0\r\na=tool:libavformat 60.16.100\r\nm=audio 0 RTP/AVP 96\r\nb=AS:64\r\na=rtpmap:96 opus/48000/2\r\na=control:streamid=0\r\n",
         "user_agent":"ffmpeg/go2rtc",
         "medias":[
            "audio, recvonly, OPUS/48000/2"
         ],
         "receivers":[
            {
               "id":9,
               "codec":{
                  "channels":2,
                  "codec_name":"opus",
                  "codec_type":"audio",
                  "sample_rate":48000
               },
               "bytes":69736,
               "packets":358
            }
         ],
         "bytes_recv":74088
      }
   ],
   "consumers":[
      {
         "id":16,
         "format_name":"rtsp",
         "protocol":"rtsp+tcp",
         "remote_addr":"<IP_ADDRESS>:55860",
         "source":"ffmpeg:doorbell-sub#audio=opus#audio=volume",
         "sdp":"v=0\r\no=- 1 1 IN IP4 <IP_ADDRESS>\r\ns=go2rtc/1.9.7\r\nc=IN IP4 <IP_ADDRESS>\r\nt=0 0\r\nm=audio 0 RTP/AVP 96\r\na=rtpmap:96 MPEG4-GENERIC/16000\r\na=fmtp:96 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;\r\na=control:trackID=0\r\n",
         "user_agent":"go2rtc/ffmpeg",
         "medias":[
            "audio, sendonly, ANY"
         ],
         "senders":[
            {
               "id":17,
               "codec":{
                  "codec_name":"aac",
                  "codec_type":"audio",
                  "sample_rate":16000
               },
               "parent":6,
               "bytes":1910748,
               "packets":3703
            }
         ],
         "bytes_send":1969996
      }
   ]
}

@nicoverali
can you try this one: https://github.com/seydx/go2rtc/actions/runs/11920040811

@nicoverali
can you try this one: https://github.com/seydx/go2rtc/actions/runs/11920040811

Sure. It took like 3 days to crash last time, so I'll let you know in a couple of days.

Hey,
I am having similar issues on 1.9.7.
I started using go2rtc today  and similiar issue happened multiple times for me.
I have multiple RTSP cameras, fed trough ffmpeg into HA webRTC panel. (It happens to the integrated viewer aswell)
e.g. of my config
camera1: ffmpeg:rtsp://ID:PW@{CameraIP}:554/unicast/c1/s1/live#backchannel=0#video=copy
Sending H264 stream from nvr to clients.
I have them streamed on all devices using the integrated API streaming website.
iOS, Android & PC.
I noticed that after while WebRTC ceases to work.
Mainly when I watch on mobile devices(Put them to sleep, keep it running) and on PC aswell. (It seems to happen more frequently)
And the browser switches to play from MSE
(It then tries to connect using RTC, only to refresh like a frame of video but in the meantime the ws closes?)
In log I see closed websockets:
undefined error=websocket: close 1000 (normal) caller=github.com/AlexxIT/go2rtc/internal/api/ws/ws.go:124
I noticed different (handshake?) messages in websocket no handshakes in the websocket when the WebRTC fails.
Situation 1 (Both WebRTC & MSE doesn't work):
So I tried MSE player, but even MSE wont get anything back from the websocket:
.
The amount of childs is 0 and the stream is dead. (The rtsp stream works, ffmpeg on different machine keeps streaming)

This is the last log entry of the stream( The ws connection is not closed)
15:26:49.163 TRC [api] ws msg type=mse
15:26:49.163 TRC [mp4] new WS/MSE consumer codecs=avc1.640029,avc1.64002A,avc1.640033,hvc1.1.6.L153.B0,mp4a.40.2,mp4a.40.5,flac,opus
15:26:49.164 TRC [streams] check cons=7 media=video, sendonly, H264, H265

api/streams for that camera:
{
  "producers": [
    {
      "id": 9,
      "format_name": "rtsp",
      "protocol": "rtsp+tcp",
      "remote_addr": "<IP_ADDRESS>:36538 forwarded <IP_ADDRESS>:554",
      "source": "exec:ffmpeg -hide_banner -v error -allowed_media_types video -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://username:password@<IP_ADDRESS>:554/unicast/c1/s1/live -c:v copy -an -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://<IP_ADDRESS>:8554/randomhash1",
      "url": "rtsp://username:password@<IP_ADDRESS>:554/unicast/c1/s1/live",
      "sdp": "v=0\r\no=- 0 0 IN IP4 <IP_ADDRESS>\r\ns=ONVIF RTSP Server\r\nc=IN IP4 <IP_ADDRESS>\r\nt=0 0\r\na=tool:libavformat 60.16.100\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z01AH524FAFumyAAAAMAIAAABRCA,aOpDyA==; profile-level-id=4D401F\r\na=control:streamid=0\r\n",
      "user_agent": "ffmpeg/go2rtc",
      "medias": [
        "video, recvonly, H264"
      ],
      "receivers": [
        {
          "id": 13,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video",
            "level": 31,
            "profile": "Main"
          },
          "bytes": 3355689,
          "packets": 2818
        }
      ],
      "bytes_recv": 3389841
    }
  ],
  "consumers": []
}

I noticed that data values are not increasing. So I assume some connection problem in the ffmpeg(Different issue than the WebRTC)
"bytes": 3355689,
"packets": 2818
}
],
"bytes_recv": 3389841
Situation 2 (Both WebRTC doesn't work but MSE is working):
I get this high amount of childs that dont correspond to the consumers?

Log from the api/streams:
{
  "producers": [
    {
      "id": 9,
      "format_name": "rtsp",
      "protocol": "rtsp+tcp",
      "remote_addr": "<IP_ADDRESS>:55930 forwarded <IP_ADDRESS>:554",
      "source": "exec:ffmpeg -hide_banner -v error -allowed_media_types video -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://user:password@<IP_ADDRESS>:554/unicast/c1/s1/live -c:v copy -an -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://<IP_ADDRESS>:8554/a55f8cfe4ce17f60881df3d6f9086af9",
      "url": "rtsp://user:password@<IP_ADDRESS>:554/unicast/c1/s1/live",
      "sdp": "v=0\r\no=- 0 0 IN IP4 <IP_ADDRESS>\r\ns=ONVIF RTSP Server\r\nc=IN IP4 <IP_ADDRESS>\r\nt=0 0\r\na=tool:libavformat 60.16.100\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z01AH524FAFumyAAAAMAIAAABRCA,aOpDyA==; profile-level-id=4D401F\r\na=control:streamid=0\r\n",
      "user_agent": "ffmpeg/go2rtc",
      "medias": [
        "video, recvonly, H264"
      ],
      "receivers": [
        {
          "id": 14,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video",
            "level": 31,
            "profile": "Main"
          },
          "childs": [
            49,
            138,
            142,
            144,
            148,
            150,
            152,
            154,
            156,
            158,
            160,
            162,
            164,
            166,
            168,
            170,
            172,
            174,
            176,
            178,
            181,
            182,
            184,
            186,
            188,
            190
          ],
          "bytes": 139619346,
          "packets": 112129
        }
      ],
      "bytes_recv": 140971726
    }
  ],
  "consumers": [
    {
      "id": 48,
      "format_name": "webrtc",
      "protocol": "ws+udp",
      "remote_addr": "<IP_ADDRESS>:58069 srflx <IP_ADDRESS>:0",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36",
      "medias": [
        "video, sendonly, VP8, VP9, H264, AV1"
      ],
      "senders": [
        {
          "id": 49,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video"
          },
          "parent": 14,
          "bytes": 57777308,
          "packets": 46515
        }
      ],
      "bytes_send": 58419959
    },
    {
      "id": 135,
      "format_name": "webrtc",
      "protocol": "ws+udp",
      "remote_addr": "<IP_ADDRESS>:51059 srflx <IP_ADDRESS>:0",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36",
      "medias": [
        "video, sendonly, VP8, VP9, H264, AV1"
      ],
      "senders": [
        {
          "id": 138,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video"
          },
          "parent": 14,
          "bytes": 12423483,
          "packets": 9617
        }
      ],
      "bytes_send": 12561755
    },
    {
      "id": 141,
      "format_name": "mse/fmp4",
      "protocol": "ws",
      "remote_addr": "<IP_ADDRESS>:51296 forwarded <IP_ADDRESS>",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36",
      "medias": [
        "video, sendonly, H264, H265"
      ],
      "senders": [
        {
          "id": 142,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video",
            "level": 31,
            "profile": "Main"
          },
          "parent": 14,
          "bytes": 4348755,
          "packets": 3274
        }
      ],
      "bytes_send": 4216493
    },
    {
      "id": 143,
      "format_name": "webrtc",
      "protocol": "ws+udp",
      "remote_addr": "<IP_ADDRESS>:54290 srflx <IP_ADDRESS>:0",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36",
      "medias": [
        "video, sendonly, VP8, VP9, H264, AV1"
      ],
      "senders": [
        {
          "id": 144,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video"
          },
          "parent": 14,
          "bytes": 4338516,
          "packets": 3266
        }
      ],
      "bytes_send": 4386863
    },
    {
      "id": 147,
      "format_name": "mse/fmp4",
      "protocol": "ws",
      "remote_addr": "<IP_ADDRESS>:41290 forwarded <IP_ADDRESS>",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36",
      "medias": [
        "video, sendonly, H264, H265"
      ],
      "senders": [
        {
          "id": 148,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video",
            "level": 31,
            "profile": "Main"
          },
          "parent": 14,
          "bytes": 2674411,
          "packets": 2030
        }
      ],
      "bytes_send": 1818288
    },
    {
      "id": 149,
      "format_name": "webrtc",
      "protocol": "ws+udp",
      "remote_addr": "<IP_ADDRESS>:63447 srflx <IP_ADDRESS>:0",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36",
      "medias": [
        "video, sendonly, VP8, VP9, H264, AV1"
      ],
      "senders": [
        {
          "id": 150,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video"
          },
          "parent": 14,
          "bytes": 2674411,
          "packets": 2030
        }
      ],
      "bytes_send": 2704436
    }
  ]
}

MSE continues to work but later stops due to more buffering (Pausing the playback, data keep flowing)
After while when trying to watch using WebRTC in the integrated html viewer It started working.
Seems that go2rtc has autofixing abilities.
Well from the logs it seems to crash & restart fixing the issue (without having me manually restart to fix it):
(From logs I have in docker it crashed 8 times so far)
(Stripped them from most of the trace logs)

panic: close of closed channel

goroutine 4972 [running]:
github.com/AlexxIT/go2rtc/pkg/core.(*Sender).Close(0x35d0a50)
        github.com/AlexxIT/go2rtc/pkg/core/track.go:174 +0xb4
github.com/AlexxIT/go2rtc/pkg/core.(*Connection).Stop(0x42d0188)
        github.com/AlexxIT/go2rtc/pkg/core/connection.go:75 +0x88
github.com/AlexxIT/go2rtc/internal/streams.(*Stream).RemoveConsumer(0x20a2120, {0x98b948, 0x42d0188})
        github.com/AlexxIT/go2rtc/internal/streams/stream.go:64 +0x24
github.com/AlexxIT/go2rtc/internal/webrtc.asyncHandler.func1({0x7de850, 0xd83cf0})
        github.com/AlexxIT/go2rtc/internal/webrtc/webrtc.go:157 +0x9c
github.com/AlexxIT/go2rtc/pkg/core.(*Listener).Fire(...)
        github.com/AlexxIT/go2rtc/pkg/core/listener.go:16
github.com/AlexxIT/go2rtc/pkg/webrtc.NewConn.func5(0x6)
        github.com/AlexxIT/go2rtc/pkg/webrtc/conn.go:129 +0x68
created by github.com/pion/webrtc/v3.(*PeerConnection).onConnectionStateChange in goroutine 5012
        github.com/pion/webrtc/v3@v3.3.4/peerconnection.go:496 +0x158
14:34:28.600 INF go2rtc platform=linux/arm revision=dbe9e4a version=1.9.7
14:34:28.600 DBG build vcs.time=2024-11-11T17:20:53Z version=go1.22.9
14:34:28.601 INF config path=/config/go2rtc.yaml
14:34:28.602 TRC [api] register path path=/
14:34:28.602 TRC [api] register path path=/api
14:34:28.602 TRC [api] register path path=/api/config
14:34:28.602 TRC [api] register path path=/api/exit
14:34:28.602 TRC [api] register path path=/api/restart
14:34:28.603 TRC [api] register path path=/api/log
14:34:28.604 INF [api] listen addr=:1984
14:34:28.605 TRC [api] register path path=/api/ws
14:34:28.606 TRC [api] register path path=/api/streams
14:34:28.606 TRC [api] register path path=/api/streams.dot
14:34:28.607 INF [rtsp] listen addr=:8554
14:34:28.610 INF [webrtc] listen addr=:8555
14:34:28.610 TRC [api] register path path=/api/webrtc

and
panic: runtime error: index out of range [8] with length 8

goroutine 3185 [running]:
github.com/AlexxIT/go2rtc/internal/app.(*circularBuffer).Write(0x2526420, {0x3ccf500, 0x6d, 0x1500})
        github.com/AlexxIT/go2rtc/internal/app/log.go:120 +0x2c4
github.com/rs/zerolog.LevelWriterAdapter.WriteLevel(...)
        github.com/rs/zerolog@v1.33.0/writer.go:27
github.com/rs/zerolog.multiLevelWriter.WriteLevel({{0x250e870, 0x2, 0x2}}, 0xff, {0x3ccf500, 0x6d, 0x1500})
        github.com/rs/zerolog@v1.33.0/writer.go:98 +0x98
github.com/rs/zerolog.(*Event).write(0x273c280)
        github.com/rs/zerolog@v1.33.0/event.go:80 +0x15c
github.com/rs/zerolog.(*Event).msg(0x273c280, {0x3e69480, 0x39})
        github.com/rs/zerolog@v1.33.0/event.go:151 +0x264
github.com/rs/zerolog.(*Event).Msgf(0x273c280, {0x89e020, 0x28}, {0x4f03e70, 0x3, 0x3})
        github.com/rs/zerolog@v1.33.0/event.go:131 +0x64
github.com/AlexxIT/go2rtc/internal/streams.(*Stream).AddConsumer(0x2400270, {0x98b948, 0x25a0608})
        github.com/AlexxIT/go2rtc/internal/streams/add_consumer.go:44 +0x900
github.com/AlexxIT/go2rtc/internal/webrtc.asyncHandler(0x3a0e5a0, 0x2e3c050)
        github.com/AlexxIT/go2rtc/internal/webrtc/webrtc.go:185 +0x7a8
github.com/AlexxIT/go2rtc/internal/api/ws.apiWS.func2()
        github.com/AlexxIT/go2rtc/internal/api/ws/ws.go:134 +0x40
created by github.com/AlexxIT/go2rtc/internal/api/ws.apiWS in goroutine 3162
        github.com/AlexxIT/go2rtc/internal/api/ws/ws.go:133 +0x3d0

Hope this helps and is related to the original issue :)

@seydx Hey, sorry I forgot to give you an update, this setup is at my mom's house so I'm not constantly aware of it. The version you send me seems to fix the issue, the stream didn't break anymore, but I'm having a new issue, the WebRTC stream doesn't have sound, MSE does. I've compared it with 1.9.7 and it does provide sound, any idea what could be happening ?


Where's the browser bundle?

I noticed only the src is available after install this package. There's not a browerify bundle

The common way of working with browserify is for users to create their own bundles:
Step 1) Install browser-cookies package using npm:
npm install browser-cookies

Step 2) Write some code that uses browser-cookies:
/* filename: yourcode.js */
var cookies = require('browser-cookies');
cookies.set('someCookie', 'someValue');

Step 3) Create your own bundle using browserify:
browserify yourcode.js -o bundle.js

Does this answer your question, or do you have a different case?

The common way of working with browserify is for users to create their own bundles:

most vendor do this already
https://github.com/pagekit/vue-resource/blob/develop/dist/vue-resource.js
https://github.com/mzabriskie/axios/blob/master/dist/axios.js
https://github.com/t4t5/sweetalert/blob/master/dist/sweetalert-dev.js

I'm OK with exporting a bundled (IIFE) version of browser-cookies to the npm package.
From the examples listed in your post above I prefer the approach taken by vue-resource to export multiple targets (CommonJS, es2015 and IIFE) while keeping the CommonJS target as the default script used by npm. I'd like to refrain from adding an IIFE to the CommonJS export as this would increase the file size for all CommonJS users, hence the preference for separate targets.
So far I've always developed using bundlers like Browserify and Rollup. For my understanding how do you typically use a package like Vue without a bundler, for example did you inspect the Vue distribution README to determine which exported file to use and do you include Vue as a separate script in your production environment?


Compiling issues

Hi,
I'm having trouble compiling your zfs exporter.
$ go test in the zfs-exporter directory yields

# github.com/bicomsystems/go-libzfs
could not determine kind of name for C.boolean_t
could not determine kind of name for C.clear_last_error
could not determine kind of name for C.libzfs_errno
could not determine kind of name for C.libzfs_error_description
could not determine kind of name for C.libzfs_handle_ptr
could not determine kind of name for C.libzfs_init
# github.com/ncabatoff/go-libzfs
could not determine kind of name for C.boolean_t
could not determine kind of name for C.clear_last_error
could not determine kind of name for C.libzfs_errno
could not determine kind of name for C.libzfs_error_description
could not determine kind of name for C.libzfs_init
FAIL    github.com/ncabatoff/go-libzfs [build failed]

I have a similar problem working with the bicomsystem's libzfs (which this repo is forked from)
Am I missing something big somewhere?
My system:
Fedora 24, kernel 4.10.11
go-1.6.4 (can't downgrade via package management system to 1.4, so probably not the way to go)
zfs-0.7.0-rc3 and libzfs2 installed and source dir linked to gopath
Thanks!
Michael

I assume you that you have libzfs2-devel installed, else I think you'd get a missing include file error.
I haven't tried zfs 0.7, if 0.6 is available on Fedora 24 I suggest you try that.
I'll try to make some time to spin up a Fedora VM and give it a try myself, but that's not likely to happen until this weekend.

I had a little bit more of a crack at it, and it turned out that both of:
-missing libzfs2-devel
-using 0.7.0-rc rather than 0.6.x
were problems. Once I had libzfs2-devel, the missing include / could not determine error names disappeared:

20:55 $ go test
# github.com/bicomsystems/go-libzfs
../../bicomsystems/go-libzfs/zpool.c: In function ‘read_zpool_property’:
../../bicomsystems/go-libzfs/zpool.c:199:6: error: too few arguments to function ‘zpool_get_prop’
r = zpool_get_prop(zh, prop,
^~~~~~~~~~~~~~
In file included from ../../bicomsystems/go-libzfs/zpool.c:5:0:
/usr/include/libzfs/libzfs.h:297:12: note: declared here
extern int zpool_get_prop(zpool_handle_t *, zpool_prop_t, char *,
^~~~~~~~~~~~~~
FAIL    github.com/ncabatoff/go-libzfs [build failed]

When I downgraded to <IP_ADDRESS>, however, I got this:

21:02 $ go test
TEST PoolCreate ...
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x4 pc=0x7f7d8482c0ed]
runtime stack:
runtime.throw(0x5e5740, 0x2a)
/usr/lib/golang/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
/usr/lib/golang/src/runtime/sigpanic_unix.go:12 +0x5a
goroutine 5 [syscall, locked to thread]:
runtime.cgocall(0x529170, 0xc42003b4f8, 0x10000c400000000)
/usr/lib/golang/src/runtime/cgocall.go:123 +0x11b fp=0xc42003b4c0 sp=0xc42003b490
github.com/bicomsystems/go-libzfs._Cfunc_zpool_list_open(0x0, 0x1330370, 0x0)
??:0 +0x42 fp=0xc42003b4f8 sp=0xc42003b4c0
github.com/bicomsystems/go-libzfs.PoolOpen(0x5b0910, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/woon/go/src/github.com/bicomsystems/go-libzfs/zpool.go:135 +0x168 fp=0xc42003b550 sp=0xc42003b4f8
github.com/ncabatoff/go-libzfs_test.zpoolTestPoolCreate(0xc42009c000)
/home/woon/go/src/github.com/ncabatoff/go-libzfs/zpool_test.go:71 +0x81 fp=0xc42003bf58 sp=0xc42003b550
github.com/ncabatoff/go-libzfs_test.Test(0xc42009c000)
/home/woon/go/src/github.com/ncabatoff/go-libzfs/a_test.go:11 +0x25 fp=0xc42003bf68 sp=0xc42003bf58
testing.tRunner(0xc42009c000, 0x878fb0)
/usr/lib/golang/src/testing/testing.go:473 +0x98 fp=0xc42003bfa0 sp=0xc42003bf68
runtime.goexit()
/usr/lib/golang/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc42003bfa8 sp=0xc42003bfa0
created by testing.RunTests
/usr/lib/golang/src/testing/testing.go:582 +0x892
goroutine 1 [chan receive]:
testing.RunTests(0x5f56e8, 0x878fb0, 0x1, 0x1, 0x7f7d84c1c001)
/usr/lib/golang/src/testing/testing.go:583 +0x8d2
testing.(*M).Run(0xc42004bef8, 0x15)
/usr/lib/golang/src/testing/testing.go:515 +0x81
main.main()
github.com/ncabatoff/go-libzfs/_test/_testmain.go:54 +0x117
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/golang/src/runtime/asm_amd64.s:1998 +0x1
exit status 2
FAIL    github.com/ncabatoff/go-libzfs  0.008s

(which is far beyond me unfortunately)
Are you also building on a Red Hat based distribution? Might my kernel be too new or too out of date?
Aside: do you have any plans to update this for 0.7.0 once it comes out? I think they're getting pretty close to the release.

I don't routinely build on RH based systems, but I do at times.  I'll try to have a look at that and the 0.7.0 release this weekend. Note that I'm not the author of go-libzfs, I just made a fork to fix some issues and haven't yet got around to updating zfs-exporter to use the upstream version.

Yes, I understand that this is a fork, I'm mostly interested in using your zfs-exporter, but unable to compile it because of problems with go-zfs.
Are you building on Debian then?

I'm building on Ubuntu 16.04.  By the way, I was working on issue #3 I happened to run the go-libzfs tests without root privs.  It produced the same error as you got, i.e.
TEST PoolCreate ...
fatal error: unexpected signal during runtime execution

Try running the tests again as root.

I've pushed a changeset that installs ZFS and zfs-exporter on a Fedora25 VM via Vagrant and Ansible.  I'm going to close this issue because I'm satisfied that at least with ZFS 0.6 it works fine.  I'll worry about 0.7 once it becomes stable.

ZFS 0.7.0 was released in July, and they're up to 0.7.4 now.

Bump. Was unable to compile this against the latest libzfs.


Update kubernetes-services.md

We no longer need to specify the feature flag GITHUB_PACKEGES as it is not enabled for all accounts by default per https://harness.atlassian.net/browse/CSE-889.
Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[ ] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

Issue(s)

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[ ] Tested Locally
[ ] Optional Screen Shoot.

Preview environment: https://ci.pr.harness.io/pr-617


feat(proto)!: remove optional fields in protos

The cosmos fork of gogoproto, used to generate golang code from BSR, doesn't support "optional" fields in proto3 syntax. Rather than sort that out, we're removing use of optional to unblock integration work on interchaintest.
For the most part, we can still represent optionality by special-casing zero (for blockheights) and empty (for encrypted memos). The exception is governance protos, which require use of a submessage type to represent the optional "withdrawn" state on proposal outcomes. H/t to @plaidfinch for describing the submessage pattern to me, and implementing it on the governance changes.
Closes #2933.
This PR re-implements and therefore supersedes #2940; only one of the two should be merged.

We plan to merge https://github.com/penumbra-zone/penumbra/pull/2943, then rebase this work on top, at which point it'll be ready for review.

Rebased. Turns out there weren't any conflicts with #2943 after all. Ready for review!


Creating database after check if database exists

I'm trying to do something very simple:
Check if database exist, if not create one..
If i just create one like in the following example it works:
db.createDatabase(database_name).then(
	()=> console.log("Database created successfully: "+database_name),
	error=> console.error("Error creating database: "+error)
);

If i first check if its available, the exact above code runs into the error function with the error "ArangoError: database not found"
Here the whole code:
db.useDatabase(database_name);
db.get().then(
	()=> console.log("Using database "+database_name),
	err=> {
		console.log(database_name+" doesn't exist, creating.. ");
		db.createDatabase(database_name).then(
			()=> console.log("Database created successfully: "+database_name),
			error=> console.error("Error creating database: "+error)
		);

	}
);

it is also very unfortunate that things like db.useDatabase() and the initial connect to the db server doesn't have a .then() to check if I'm actually connected or not. Maybe there is a nicer way to do this which I'm not aware of?

I found another - probably more elegant way to do it - by not using the error callback but by using listDatabases()
db.listDatabases()
.then((names) => {
	if (names.indexOf(database_name) > -1){
		db.useDatabase(database_name);
		db.get().then(
			()=> console.log("Using database "+database_name),
			error=> console.error("Error connecting to database: "+error)
		);
	} else {
		db.createDatabase(database_name).then(
			()=> console.log("Database created successfully: "+database_name),
			error=> console.error("Error creating database: "+error)
		);
	}
});

useDatabase does nothing to ArangoDB, it just changes the client's connection. It should be reversible (just pass the original database name in, e.g. _system).
But you're correct that you need to create the database BEFORE using it. useDatabase changes which database's API the client will talk to so trying to switch to the database and then creating it means you'll talk to the API of a database that isn't there yet and tell it to create itself.

I know this thread is years old but I'm a new comer.
Mirokk that solution works well but partly, because you still need to use the database after the creation - so I slightly altered your solution and it works for me.
db.listDatabases().then((names) => {
if (names.indexOf(database_name) > -1){
db.useDatabase(database_name);
} else {
db.createDatabase(database_name).then(
()=> console.log("Database created successfully: "+ database_name),
error=> console.error("Error creating database: " + error)
);
}
}).then (() => {
db.get().then(
()=> console.log("Using database " + database_name),
error=> console.error("Error connecting to database: " + error)
);
});


Asurascans 404 error

Source information
Asurascans 1.4.32
Source language
English
Steps to reproduce
I open the new manhwa that was added to Asurascans I get 404 error

Even when opening WebView I still get 404 error
Expected behavior
This is what is should show

It loads smoothly without problems
Actual behavior
This is what I get instead

When I open WebView it still show the 404 error
Mihon/Tachiyomi version
0.15.3
Android version
Android 10
Other details
This issue is the same as this one https://github.com/keiyoushi/extensions-source/issues/1972#issue-2193969467
Even with dynamic URLs enable it still show 404 error
I opened Asurascans in a web browser and it was working fined everything was loading
What I did fined is that is one

And the web browser one have 2 different URL's
Note: this only happened to new added manhwa on Asurascans
Acknowledgements

[X] I have written a short but informative title.
[X] I have updated the app to version 0.15.3.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.

@Maou20 this issue was automatically closed because:

You have not carefully read the acknowledgements. Read them again and edit the checkboxes before reopening the issue.

I edited the acknowledgement

@Maou20 it should fix itself in a day or two when asura changes the url

@Maou20 it should fix itself in a day or two when asura changes the url

Okay....I'll wait....I'll let you know if anything change

It fixed itself....you can close the issue
Thank you


Added options -td and --name for docker run

Added options -td and --name for docker run with the full explanation about them.

I don't why Travis failed the check, please could you take a look on it? Thanks

LGTM.  Build is failing because of the forwarded_ports.html page on vagrantup.


<EMAIL_ADDRESS>

@facebook-github-bot import

Thanks for importing. If you are an FB employee go to Phabricator to review.

@facebook-github-bot shipit

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review.

Thanks for importing. If you are an FB employee go to Phabricator to review.


Refactor the docs and examples folders

Reorganizes docs folder into api, data, and notebooks subfolders
Moves all API-related documentation into docs/api and reorganizes content in api folder
Reorganizes docs/notebooks into fundamentals, feature-guides, use-cases, and integrations subfolders to mirror organization of content on docs.pixeltable.com
Updates all path references in notebooks and README.md
Introduces a new lint-notebooks.sh script that validates the Colab, Kaggle, and Download Notebook links in each notebook
Reorganizes examples fold into applications and tutorials subfolders, of which the latter is a symlink to docs/notebooks/use-cases

This change is


Bug fix: JDBC driver throws null pointer exception when metric columns are not present in Schema

Currently, JDBC driver assumed metric columns are mandatory in schema which is not the case in pinot.
This PR implements a simple null check so that exceptions are not thrown when metric columns are not present.

Codecov Report

Merging #7175 (92b9296) into master (6d0ab91) will decrease coverage by 8.22%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #7175      +/-   ##
============================================
- Coverage     73.49%   65.26%   -8.23%
  Complexity       92       92
============================================
  Files          1500     1500
  Lines         73758    73758
  Branches      10637    10637
============================================
- Hits          54209    48141    -6068
- Misses        16005    22210    +6205
+ Partials       3544     3407     -137

Flag
Coverage Δ

integration
?

unittests
65.26% <ø> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

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


Password manager not restoring passwords for use later

Describe the bug
I enter a username/password in a website.  It asks me if I want to save.  I do so.  I then go to website and it doesn't recall the username/password.  I have to keep tying them.
To Reproduce
Steps to reproduce the behavior:

Go to a webiste
enter password
save
password not saved for use later (can't see it in settings in password area even)

Expected behavior
It should save them after I hit the save password prompt
Environment (please complete the following information):

OS/Platform and version:  POP!_OS 20.10
ungoogled-chromium version: Version 88.0.4324.182 (Official Build, ungoogled-chromium) (64-bit)

Additional context
I noted there was a ticket on this that was closed, but due to a windows specific issue.  I don't think this is the case here.
I hope that info helps.  Thanks for all the effort to everyone contributing.

Also encountering this on Ubuntu 20.04.1 LTS, 90.0.4430.93 (Developer Build, ungoogled-chromium) built on Ubuntu focal/20.04, running on Ubuntu focal/20.04 (64-bit).

Same here, Debian 11.

Same problem here still on macOS. Build 94.0.4606.81. Seems this has been an persistent issue for some since version 80.


LHN - When user enters multiline message, first and last line displayed in LHN

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.14
Reproducible in staging?: Y
**Reproducible in production?:**N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Go to https://staging.new.expensify.com/
Tap on a chat
Enter a multi line message (eg: select a emoji, tap few times enter key, then enter a text)
Note the chat message in LHN

Expected Result:
When user enters multiline message, only first line must be displayed in LHN
Actual Result:
When user enters multiline message, first and last line both displayed in LHN
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[x] Android: mWeb Chrome
[ ] iOS: Native
[x] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/7a17b5b5-f0ff-45b8-9b2f-70949a46d60c
View all open jobs on GitHub

@bernhardoj this is deploy blocker so you mean that regression came from staging backend?

Yep, thanks @bernhardoj!


[BUG] failure to restart after changing language

Please confirm these before moving forward

[X] I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
[X] I have tested that this issue has not been fixed in the latest (beta or stable) release.
[X] I have checked the FAQ section for solutions
[X] This issue is about a bug (if it is not, please use the correct template)

Describe your issue
after changing wingetui language, clicking restart just makes the app close
(tested on 2.1 beta 2)
Steps to reproduce the issue
No response
WingetUI Log
not available

Package Managers Logs
not available

Relevant information
No response
Screenshots and videos
No response

it indeed works, I guess that was the case

I am having this problem again now that 2.1 was released

What's your installation path?

C:\Program Files\WingetUI

it works for me now


Created pages leading from explore pages

Created all pages that lead from the explore page, but are not connected to database. Created new logged in nav bar.

fixed burger menu


⚠ File access (beta) has degraded performance

In e55d424, File access (beta) (https://beta.fyle.uk/file/fish) experienced degraded performance:

HTTP code: 200
Response time: 4072 ms

Resolved: File access (beta) performance has improved in 831671a.


Unnecessary failed cluster polling

If cluster is selected from the hotbar and connection is failing, it keeps trying to connect one even you moved to other cluster or some different page.
To reproduce:

Try to open cluster which connection is failed.
Open another connected cluster, work with it for some time (10 seconds)
Watch how repeated messages appear with some interval

error: Failed to connect cluster "foo": StatusCodeError: 502 - undefined

Are you sure it takes only 10s for this to occur? Because if it takes 30s then it could just be that a cluster tries to refresh its connection status every 30s

Closing as this is actually working as intended.


Error upon installation

need to make a new PyPI version of pyknos such that nflows=0.12.0 is used.


[bug] documentSelector does not support ts scripts

This is my configuration in settings.json:
"htmlhint.documentSelector": [
  "html",
  "ts"
]

but actually extension does not support linting in *.ts scripts.
desired behavior:

Hi - I've tested that this works as expected... you need this config though:
{
  "htmlhint.documentSelector": ["html", "typescript"]
}

basically you have to use the name of the language, not just the file extension... so it's markdown (and not md)

@coliff Thanks!

@coliff but may be it is possible to move error indicator (yellow line) close to tag


python310Packages.faraday-plugins: 1.6.7 -> 1.6.8

Description of changes
Update to latest upstream release 1.6.8

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 182934 run on x86_64-linux 1

4 packages built:

faraday-agent-dispatcher
faraday-cli
python310Packages.faraday-plugins
python39Packages.faraday-plugins


Do not submit hostname for hypervisor service checks and server stats

What does this PR do?

Don't submit hostname=... in any metrics and service checks for openstack_controller integration.
This PR:

Updates get_stats_for_single_hypervisor() to drop hostname=<hypervisor_hostname> for hypervisor service checks. This information is already submitted as a hypervisor_host tag anyway (and that's all it should be AFAICT).
Updates collect_server_diagnostic_metrics() to drop hostname=server_id, and instead submit it as a server_id tag.
Updates tests.

(It might be worth separating items 1) and 2) in their own PRs, because it seems item 2) is not directly affecting the customer right now.)
Motivation

This comes from a customer issue.
The customer has overridden the hostname in datadog.yaml, but they're still seeing the original hostname in the Infrastructure List page. This is because we use the hypervisor_hostname from OpenStackSDK as the hostname for hypervisor service checks.
The scenario is as follows:

Agent is running on a host that runs a hypervisor that will be discovered by this check.
Hypervisoris named host1, and the user has defined hostname: host1-abc in their datadog.yml.
Agent runs the check.
Check submits hostname:host1-abc for most metrics, as defined by datadog.yml.
For hypervisor service checks and/or server stats metrics, the check submits hostname=<hypervisor_host>, which causes these items to be submitted with hostname:host1 when the current host is processed.
As a result, both host1-abc and host1 show up in Infrastructure List.
But the user expected host1-abc only.

From my current understanding we shouldn't use hostname in this integration at all, because:

Hypervisors are not hosts (right? AFAIU they run on servers, and the servers are the hosts).
Marking discovered servers as physical hosts (to be shown in the Infrastructure List) is already covered by setting external host tags:

https://github.com/DataDog/integrations-core/blob/44e64b65a72a9fc1d43f6ef9abc104fe286f5e8b/openstack_controller/datadog_checks/openstack_controller/openstack_controller.py#L404
Additional Notes

I updated the (very long) test_metrics.py using this script:
import sys

if __name__ == "__main__":
    output = []

    for index, line in enumerate(sys.stdin):
        if line.strip() == "hostname=''":
            continue
        if line.lstrip().startswith("hostname='"):
            output.insert(index - 2, line.replace("hostname='", "'server_id:"))
        elif line.lstrip().startswith("hostname=u'"):
            output.insert(index - 2, line.replace("hostname=u'", "'server_id:"))
        else:
            output.append(line)

    print("".join(output))

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached

Closing, going to submit this in smaller PRs. Also we need to add tests for hypervisor service checks - they're not tested right now.