No speedup from OpenCL

I recently successfully compiled Elastix 5.0.0 with GPU support, but it doesn't appear to speed up anything relative to the CPU version.  I can use the (Resampler "OpenCLResampler") option but there is no improvement in speed. The GPU maxes out at 2% utilization.
Also, the (FixedImagePyramid "OpenCLFixedGenericImagePyramid") and (MovingImagePyramid "OpenCLMovingGenericImagePyramid") options give me CL_OUT_OF_RESOURCES errors if I try to use them. They also cause the OpenCLResampler to fail with the same error if they are used.
My setup:
OS: CentOS Linux release 7.7.1908 (Core)
GPU: Nvidia GeForce GTX 1080 Ti
Cuda version: 10.2
Relevant compile settings from CMakeCache.txt:
ELASTIX_USE_OPENCL:BOOL=ON
USE_OpenCLFixedGenericPyramid:BOOL=ON
USE_OpenCLMovingGenericPyramid:BOOL=ON
USE_OpenCLResampler:BOOL=ON

I would expect GPU support to significantly reduce execution time.  What can I do to speed up Elastix? Also, why are the pyramids failing to run on GPU?

The pyramids likely fail because you need more VRAM on the GPU. You may be able to get them to fit in memory if you change the FixedInternalImagePixelType and ShortInternalImagePixelType which may default to float in the elastix parameter file. The pyramids requires a lot of bytes for large images, many registration resolutions and gets magnified by high bit depth like float.
As for the speed issues, I have no insight.

I have the same problem. I have compiled Elastix 5.0.0 with GPU support but registration does not appear to be faster compared to the CPU version.
Since I have read somewhere that some people are experiencing performance gains, I wonder if it has to do with specifics of the parameter files, i.e. specific combinations of ImageSampler and ResampleInterpolater etc.
One thing that I notice is that for both cases (1) (Resampler "DefaultResampler") and (2) (Resampler "OpenCLResampler") (OpenCLResamplerUseOpenCL "true") only 137 MB are allocated on the GPU. This seems odd to me because for (1) I would expect no memory to be allocated at all and for (2) it certainly is not enough and thus indicating that the computation is not actually happening on the GPU (which might explain the lack of performance-gain.)
Setup info:
GPU: Nvidia GeForce GTX 1080 Ti
OS: Linux 4.4.0-116-generic (x64) with 128828 MB memory, and 16 cores @ 1200 MHz.
Cuda version: 10.1
Image sizes of fixed and moving are 640 640 225
The following is the config I am using for an affine transformation, but I also don't observe any gains for more expensive calculations. (Also ignoring the OpenCL pyramid implementations for now, since they cause the CL_OUT_OF_RESOURCES errors):
// Input images.
(FixedInternalImagePixelType "short")
(FixedImageDimension 3)

(MovingInternalImagePixelType "short")
(MovingImageDimension 3)

(OpenCLDeviceID "3")
(OpenCLDeviceType "GPU")

// Image sampler.
//(ImageSampler "RandomSparseMask")
(ImageSampler "Random")

(ErodeMask "false")
(WriteResultImage "false")
(AutomaticTransformInitialization "true")
(DefaultPixelValue 0)

(HowToCombineTransforms "Compose")

// Components.
(Registration "MultiResolutionRegistration")

(FixedImagePyramid "FixedRecursiveImagePyramid")
//(FixedImagePyramid "OpenCLFixedGenericImagePyramid")
//(OpenCLFixedGenericImagePyramidUseOpenCL "true")

(MovingImagePyramid "MovingRecursiveImagePyramid")
//(MovingImagePyramid "OpenCLMovingGenericImagePyramid")
//(OpenCLMovingGenericImagePyramidUseOpenCL "true")

(Interpolator "BSplineInterpolator")
(Metric "AdvancedMattesMutualInformation")
(Optimizer "StandardGradientDescent")
(ResampleInterpolator "FinalBSplineInterpolator")

//(Resampler "DefaultResampler")
(Resampler "OpenCLResampler")
(OpenCLResamplerUseOpenCL "true")

// Metric parameters.
(NumberOfSpatialSamples 4096)
(NumberOfHistogramBins 32)

// Kind of transform.
(Transform "AffineTransform")

(NumberOfResolutions 4)
(MaximumNumberOfIterations 256)
(MaximumNumberOfSamplingAttempts 10)
(NewSamplesEveryIteration "true")
(UseAllPixels "false")

(BSplineInterpolationOrder 1)
(FinalBSplineInterpolationOrder 1)

(SP_a 500.0)
(SP_A 50.0)
(SP_alpha 0.602)

(AutomaticScalesEstimation "true")

(ImagePyramidSchedule   8 8 8   4 4 4   2 2 2   1 1 1)  // XYZ per resolution.

Any pointers would be much appreciated!

I have the same problem. I have compiled Elastix 5.0.0 with GPU support but registration does not appear to be faster compared to the CPU version.
Since I have read somewhere that some people are experiencing performance gains, I wonder if it has to do with specifics of the parameter files, i.e. specific combinations of ImageSampler and ResampleInterpolater etc.
One thing that I notice is that for both cases (1) (Resampler "DefaultResampler") and (2) (Resampler "OpenCLResampler") (OpenCLResamplerUseOpenCL "true") only 137 MB are allocated on the GPU. This seems odd to me because for (1) I would expect no memory to be allocated at all and for (2) it certainly is not enough and thus indicating that the computation is not actually happening on the GPU (which might explain the lack of performance-gain.)
Setup info:
GPU: Nvidia GeForce GTX 1080 Ti
OS: Linux 4.4.0-116-generic (x64) with 128828 MB memory, and 16 cores @ 1200 MHz.
Cuda version: 10.1
Image sizes of fixed and moving are 640 640 225
The following is the config I am using for an affine transformation, but I also don't observe any gains for more expensive calculations. (Also ignoring the OpenCL pyramid implementations for now, since they cause the CL_OUT_OF_RESOURCES errors):
// Input images.
(FixedInternalImagePixelType "short")
(FixedImageDimension 3)

(MovingInternalImagePixelType "short")
(MovingImageDimension 3)

(OpenCLDeviceID "3")
(OpenCLDeviceType "GPU")

// Image sampler.
//(ImageSampler "RandomSparseMask")
(ImageSampler "Random")

(ErodeMask "false")
(WriteResultImage "false")
(AutomaticTransformInitialization "true")
(DefaultPixelValue 0)

(HowToCombineTransforms "Compose")

// Components.
(Registration "MultiResolutionRegistration")

(FixedImagePyramid "FixedRecursiveImagePyramid")
//(FixedImagePyramid "OpenCLFixedGenericImagePyramid")
//(OpenCLFixedGenericImagePyramidUseOpenCL "true")

(MovingImagePyramid "MovingRecursiveImagePyramid")
//(MovingImagePyramid "OpenCLMovingGenericImagePyramid")
//(OpenCLMovingGenericImagePyramidUseOpenCL "true")

(Interpolator "BSplineInterpolator")
(Metric "AdvancedMattesMutualInformation")
(Optimizer "StandardGradientDescent")
(ResampleInterpolator "FinalBSplineInterpolator")

//(Resampler "DefaultResampler")
(Resampler "OpenCLResampler")
(OpenCLResamplerUseOpenCL "true")

// Metric parameters.
(NumberOfSpatialSamples 4096)
(NumberOfHistogramBins 32)

// Kind of transform.
(Transform "AffineTransform")

(NumberOfResolutions 4)
(MaximumNumberOfIterations 256)
(MaximumNumberOfSamplingAttempts 10)
(NewSamplesEveryIteration "true")
(UseAllPixels "false")

(BSplineInterpolationOrder 1)
(FinalBSplineInterpolationOrder 1)

(SP_a 500.0)
(SP_A 50.0)
(SP_alpha 0.602)

(AutomaticScalesEstimation "true")

(ImagePyramidSchedule   8 8 8   4 4 4   2 2 2   1 1 1)  // XYZ per resolution.

Any pointers would be much appreciated!

Hi,
Do you know how to release gpu memory during debugging？

Hi @hbraunDSP, @MiHess, @dyliu2016, thanks for the discussion here! The CL_OUT_OF_RESOURCES error (issue #70) was fixed by PR #734, and a bug related to OpenCL Resampler was fixed by PR #741. @dpshamonin run some extensive benchmarks for the Resampler, and we noticed quite some speed improvement i.e. it was orders of magnitude faster, especially for larger images! Is it possible for you to re-run your code using the latest main branch and let us know if you still observe the same behavior?

Hi @ntatsisk and @dpshamonin: thanks for all the bug fixes/updates. I just built the latest main and no longer get the CL_OUT_OF_RESOURCES error. However, I see no speed up when using the GPU compared to the CPU version.
It seems like it's correctly using the GPU since I get the following lines in the log: e.g.
  Fixed pyramid was computed by NVIDIA RTX A4000 from NVIDIA Corporation.  Moving pyramid was computed by NVIDIA RTX A4000 from NVIDIA Corporation.Preparation of the image pyramids took: 6 ms.

I see that the GPU memory allocation goes up to about 200 MB, but the GPU utilization stays 0% throughout the registration. The total time it takes is about the same as the CPU, and there's no error inn the log file.
These are the modifications I made to the parameter file to use the GPU:
(OpenCLDeviceID "1")
(OpenCLDeviceType "GPU")
(Resampler "OpenCLResampler")
(OpenCLResamplerUseOpenCL "true")
(FixedImagePyramid "OpenCLFixedGenericImagePyramid")
(OpenCLFixedGenericImagePyramidUseOpenCL "true")
(MovingImagePyramid "OpenCLMovingGenericImagePyramid")
(OpenCLMovingGenericImagePyramidUseOpenCL "true")

Did I miss anything?
Also @ntatsisk or @dpshamonin: you mentioned getting multiple orders of magnitude speed improvement. Would you be able to share a test case (e.g. fixed img, moving img, parameter file) so that we could test and benchmark the GPU/OpenCL functionalities of elastix?

First of all thanks for all the work on this @ntatsisk and @dpshamonin.
I have built the latest version and did some experimenting, but unfortunately I am still getting the CL_OUT_OF_RESOURCES errors. Just like @urlicht described, also for me the GPU memory allocation goes up to about 3GB (of 12GB total).
I also tried with images and a modified parameter file from the ITKElastix examples to facilitate reproducing/tracking down the error. Source: https://github.com/InsightSoftwareConsortium/ITKElastix/tree/main/examples/data
From the elastix.log file:
which elastix:   elastix
  elastix version: 5.0.1
  Git revision SHA: b581b9242157cabc3e029bd9eeeef987479ed195
  Git revision date: Thu Dec 22 21:27:19 2022 +0100
  Build date: Dec 29 2022 18:49:16
  Compiler: GCC version 11.3.0
  Memory address size: 64-bit
  CMake version: 3.25.0-rc1
  ITK version: 5.3.0

ELASTIX version: 5.0.1
Command line options from ElastixBase:
-f        data/CT_3D_lung_fixed.mha
-m        data/CT_3D_lung_moving.mha
-fMask    data/CT_3D_lung_fixed_mask.mha
-mMask    data/CT_3D_lung_moving_mask.mha
-out      itkelastix_example/
-p        data/registration/parameters.3D.NC.affine.ASGD.001.txt
-threads  unspecified, so all available threads are used
Command line options from TransformBase:
-t0       unspecified, so no initial transform used

The only changes made to parameters.3D.NC.affine.ASGD.001.txt are the following:
(OpenCLDeviceID "0")
(OpenCLDeviceType "GPU")

(FixedImagePyramid "OpenCLFixedGenericImagePyramid")
(OpenCLFixedGenericImagePyramidUseOpenCL "true")

(MovingImagePyramid "OpenCLMovingGenericImagePyramid")
(OpenCLMovingGenericImagePyramidUseOpenCL "true")

(Resampler "OpenCLResampler")
(OpenCLResamplerUseOpenCL "true")

//(FixedImagePyramid "FixedRecursiveImagePyramid")
//(MovingImagePyramid "MovingRecursiveImagePyramid")
//(Resampler "DefaultResampler")

And this results in the following errors:
ERROR: Exception during updating GPU fixed pyramid calculation:
itk::ExceptionObject (0x557312702d00)
Location: "unknown"
File: /home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkGPUDataManager.cxx
Line: 240
Description: CL_OUT_OF_RESOURCES

WARNING: The fixed pyramid computation with OpenCL failed due to the error.
  The OpenCLFixedGenericImagePyramid is switching back to CPU mode.

ERROR: Exception during creating GPU input image for moving generic pyramid:
itk::ExceptionObject (0x557312a87b40)
Location: "unknown"
File: /home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkGPUImageDataManager.hxx
Line: 167
Description: CL_OUT_OF_RESOURCES

WARNING: Unable to configure the GPU.
  The OpenCLMovingGenericImagePyramid is switching back to CPU mode.

I noticed that there are additional errors shown in the console output:
/home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkOpenCLContext.cxx(165): itkOpenCL generic error.
Error: in function: opencl_context_notify
Details: OpenCL error during context creation or runtime:
CL_OUT_OF_RESOURCES error executing CL_COMMAND_WRITE_BUFFER on NVIDIA GeForce GTX 1080 Ti (Device 0).

/home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkOpenCLContext.cxx(165): itkOpenCL generic error.
Error: in function: opencl_context_notify
Details: OpenCL error during context creation or runtime:
Unknown error executing clFlush on NVIDIA GeForce GTX 1080 Ti (Device 0).

ERROR: Exception during updating GPU fixed pyramid calculation:
itk::ExceptionObject (0x557312702d00)
Location: "unknown"
File: /home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkGPUDataManager.cxx
Line: 240
Description: CL_OUT_OF_RESOURCES

WARNING: The fixed pyramid computation with OpenCL failed due to the error.
  The OpenCLFixedGenericImagePyramid is switching back to CPU mode.
/home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkOpenCLContext.cxx(165): itkOpenCL generic error.
Error: in function: opencl_context_notify
Details: OpenCL error during context creation or runtime:
CL_OUT_OF_RESOURCES error executing CL_COMMAND_WRITE_BUFFER on NVIDIA GeForce GTX 1080 Ti (Device 0).

ERROR: Exception during creating GPU input image for moving generic pyramid:
itk::ExceptionObject (0x557312a87b40)
Location: "unknown"
File: /home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkGPUImageDataManager.hxx
/home/mirco/elastix/elastix/Common/OpenCL/ITKimprovements/itkOpenCLContext.cxx(165): itkOpenCL generic error.
Error: in function: opencl_context_notify
Details: OpenCL error during context creation or runtime:
Unknown error executing clFlush on NVIDIA GeForce GTX 1080 Ti (Device 0).

Line: 167
Description: CL_OUT_OF_RESOURCES

WARNING: Unable to configure the GPU.
  The OpenCLMovingGenericImagePyramid is switching back to CPU mode.
Preparation of the image pyramids took: 128 ms.

@ntatsisk and @dpshamonin, do you see where it might go wrong? Are you not getting those errors anymore on the example above? Or could you please share a set of images and parameter file for further testing?
Thanks in advance!

Apologies for the late reply. I tried to reproduce the error but I couldn't. I used the setup that @MiHess shared, where the data come from https://github.com/InsightSoftwareConsortium/ITKElastix/tree/main/examples/data ("CT_3D_lung") and I attach the exact parameter file. Again same as @MiHess's but I only changed to (WriteResultImage "true") so that the resampler is also triggered. I gave it a go both in a windows and an ubuntu machines and I attach the corresponding logs. The logs are from the executables but I also tested the library versions and again no error.
Here are the files:
parameters.3D.NC.affine.ASGD.001_OpenCL.txt
log_executable_windows.log
log_executable_ubuntu.log

Fixed pyramid was computed by NVIDIA GeForce RTX 3090  from NVIDIA Corporation .  Moving pyramid was computed by NVIDIA GeForce RTX 3090  from NVIDIA Corporation .Preparation of the image pyramids took: 334 ms.

As you can see the GPU was used normally.
The (windows) setup:
which elastix:   C:\Users\kntatsis\work\opencl-error-test\elastix.exe
  elastix version: 5.1.0
  Git revision SHA: d652938573e5f193955908eba225a854b31ce36a
  Git revision date: Thu Jan 12 14:20:18 2023 +0100
  Build date: Feb 14 2023 14:34:23
  Compiler: Visual C++ version 193331630.0
  Memory address size: 64-bit
  CMake version: 3.25.0-rc1
  ITK version: 5.3.0

Note that I am using Elastix version 5.1.0 that was released recently. It shouldn't be different that the commit that you used but it is easier to reference.
@urlicht Can you share the exact pyramid setup that triggered the error in your case?
Looking forward to your replies. I will try to be more responsive so that we get to solve this issue after all this time ;)

@MiHess  I also got the same error if I set the (OpenCLDeviceID "0") , but it works when it set to 1. But the speed is still not obvious.


xboxdrv compatibility

I can't seem to get this working using the userland xboxdrv controller driver.

I'm no longer supporting this library as I don't use it any longer so I'm going to close this issue.


Delete MachineConfigs for deleted NodeGroups

Delete the corresponding MachineConfig for any already deleted NodeGroup
in NRO

/retest

/retest-required


pine64-pinephoneA64: battery is not charging

Affected version release 2021.10-004
It is not possible to boot into mobian-installer-pinephone-phosh-20220717.img no matter if it is on SD card or internal storage if the battery is discharged.
Steps to reproduce:

Phone battery is completely discharged. (Voltage measured about 2.5V.) There is mobian-installer-pinephone-phosh-20220717.img burned to e-mmc or SD card.
Connect USB-C 3A 5V charger to phone.
Phone is turned on by the charger.

Expected:
Tow-boot starts charging the battery during boot process.
Actual:
There is endless boot loop switching between tow-boot and mobian splash screen. There is no way to charge phone battery from tow-boot and mobian installer resets the device immediately after displaying splash screen. Phone battery is not charging during this process, so this boot-loop is endless.
Pressing volume-up to start jump-drive also doesn't charge the battery. Phone is not rebooting, its storage can be accessed from computer but the battery is also not charging.
Possible workaround:
Removing battery from the phone, charging it little bit with laboratory power supply and returning it back to the phone solved the problem. If the battery is at least partially charged Mobian installer can start successfully.

The Pinephone not being able to boot when the battery is completely depleted is not a u-boot issue as far as I know.
Charging in this case can take hours before it gets to a point where it can actually boot fully.

The Pinephone not being able to boot when the battery is completely depleted is not a u-boot issue as far as I know.

I can agree with that.

Charging in this case can take hours before it gets to a point where it can actually boot fully.

I don't agree with that.

If there is no firmware interaction with charging circuitry there is no charging at all. (I am basing this claim on the fact, that PINE64 is distributing firmware image pine64-pinephone-charging.img.xz for the sole purpose of charging the battery. If there would be some charging without any firmware interaction mere existence of that firmware would make no sense.)
I suspect that there is no firmware interaction with charging circuitry in Tow-Boot. (I am basing this claim on the fact, that after about 30 minutes in jump-drive mode, battery was still at its cut-off voltage of 2.5V.)
So in case 2. is true "charging" would take infinite time to get to a point where it can actually boot fully.
On the other hand charging battery at 1000mA for 5 minutes was sufficient to get to a point where it can actually boot fully.
In hypothetical case Tow-Boot would detect 3A power supply and charge phone battery at its maximum of 1500mA 3.5 minutes would be sufficient to get to a point where it can actually boot fully.

How Tow-Boot can be improved:

Start charging the battery as part of the boot process.
This would be ideal but I don't expect this to be implemented. I expect that there is no USB handshake in the basic part of the boot process. So power supply limit is unknown. So adding this would be too much effort for benefiting only a couple of users.

Charge the battery in jump-drive mode.
In this mode some USB handshake is for sure done. So power delivery capability of USB port is already known or adding it would be small effort. Even if not all cases would be handled (e.g. not detecting dedicated charging port) and charging the battery with some small conservative current in order of hundreds of mA would be very beneficial because of long time spent in this mode. (Flashing OS image takes tens of minutes. User can leave the device in jump-drive mode intentionally much longer.)

Do not let the battery fully discharge if there is no OS to start. Power off the device in case of any boot process error.
It is my mere speculation that my battery discharged because I installed Tow-Boot and then flashed OS image one day later. PinePhone is powered on by connecting power supply. So I speculate, that at some point I connected the charger to fully charge the phone and disconnected it later. If Tow-Boot doesn't power off on error battery was discharged while Tow-Boot was trying to boot non-existent OS. This feature is implemented in p-boot

Yeah, bootloader must not let the system boot or do any power hungry tasks until there's some small charge in the battery. This is normal feature on iOS and I guess on android phones, too. If you have battery completely diuscharged on iOS, iOS will not allow you to boot to actual OS, it will just show the low battery screen, and wait for several minutes of charging and then continue with the boot.
This should be done by Tow-Boot, too.

i believe this may now be working as described.
i started with a completely unbootable phone due to dead battery
i powered on while holding volume up, left for a few minutes, then powered off
when i powered back on, it booted successfully.
maybe this issue can be closed and the behavior documented?

Android phones don't boot strait into OS as well, when the battery is discharged. Usually there are couple precharge loops:

with minimal enabled consumers (no display, no backlight, no user feedback)
with display support to get user feedback, that device is alive, but completely discharged.
After device is charged enough, full OS is loaded in charging mode usually (MTK, QCOM).

It would be nice to have charger enabled in bootloader, like it was done for Librem 5:
https://github.com/u-boot/u-boot/blob/master/board/purism/librem5/librem5.c#L354
Currently AXP803 isn't supported by u-boot. I've seen several attempts to get it merged, but nothing was merged.

https://patchwork.ozlabs.org/project/uboot/list/?series=&submitter=&state=*&q=AXP803&archive=both&delegate=
https://build.opensuse.org/package/view_file/home:duwe:Teres-I/u-boot/0103-Add-AXP803-PMIC-support.patch?expand=1

There is some basic support for AXP803 in TF-A and in crust. I'm not sure, whether crust and TF-A will make adding charger support in AXP803 in u-boot more complicated? @samueldr should all accesses to AXP803 go through crust?

As a workaround for that I'm using Tow-Boot's feature to boot from SD-card. My main system is installed to eMMC and SD-card contains content of pine64-pinephone-charging.img.
When PinePhone is discharged

Plug PP into charger
Phone turns on
Press Volume Down to boot from SD card
Wait until Phone is charged a bit and reboot into main system

wget https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.8/pine64-pinephone.img.xz
aunpack pine64-pinephone.img.xz
truncate -s 60M pine64-pinephone-charging.img
sudo kpartx -v -a pine64-pinephone-charging.img
mkdir charging
sudo mount /dev/mapper/loop0p1 charging
SRC=$PWD/charging

mkdir /tmp/sd_charging
sudo mount /dev/mmcblk0p1 /tmp/sd_charging
cd /tmp/sd_charging
mkdir -p dtb-jumpdrive-charging/allwinner
cp -v $SRC/sun50i-a64-pinephone-1.* dtb-jumpdrive-charging/allwinner/
cp $SRC/initramfs.gz initrd.img-jumpdrive-charging
cp $SRC/Image.gz vmlinuz-jumpdrive-charging
mkdir extlinux
vi extlinux/extlinux.conf

cd $SRC/..
sudo umount $SRC
sudo umount /tmp/sd_charging
sudo kpartx -d pine64-pinephone-charging.img

extlinux.conf content
default l0
menu title U-Boot menu
prompt 0
timeout 10

label l0
	menu label Jumpdrive PinePhone charging
	linux /vmlinuz-jumpdrive-charging
	initrd /initrd.img-jumpdrive-charging
	fdtdir /dtb-jumpdrive-charging/
	append console=ttyS0,115200 loglevel=8


Unit testing failure with Jest?

My test suite will fail to run if I'm trying to test a component which uses vuepdf. This is with Jest on a project set up with vue-cli:
` ● Test suite failed to run
C:\frontend\uc-front\node_modules\vue-pdf\src\vuePdfNoSss.vue:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){<style src="./annotationLayer.css"></style>

SyntaxError: Unexpected token <`

I don't get this error if I don't import vue-pdf in the component.

...,global,jest){<style src... suggest that vuePdfNoSss.vue has not be properly processed by vue loader.
Can you give me more details about this problem ?

It looks like at least one other person is running into a similar error with vue-cli: https://github.com/vuejs/vue-cli/issues/951. The issue might be unrelated to vue-pdf specifically, but I'm getting pretty much the same error.

@cjosh did you solve your issue? I am having a similar issue on the same file.

@FranckFreiburger I am facing this issue while using vue-pdf with vue-server-renderer.

@chawlaaditya8 I ended up switching to Karma/Mocha to get the unit tests to work.

made it work by adding vue-pdf and vue-resize-sensor to my jest config like following
jest.config.js
transformIgnorePatterns: [
    '<rootDir>/node_modules/(?!vue-pdf/|vue-resize-sensor/)'
  ]

Then also in my my jest config I added a mocks for the worker like explained here https://github.com/wojtekmaj/react-pdf/issues/67#issuecomment-372118170
jest.config.js
  moduleNameMapper: {
    '^@/(.*)$': '<rootDir>/src/$1',
    '.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'identity-obj-proxy',
    '\\.worker.js': '<rootDir>/__mocks__/workerMock.js'
  }

create the following file '__mocks__/workerMock.js' in you project and make the path above match it
workerMock.js
module.exports = Object.create(null);

I have the same problem, and the solution above doesn't work for me.

Came across the exact same problem. My solution:
adding to my jest.config.js:
const esModules = ['vue-pdf', 'vue-resize-sensor'].join('|')

module.exports = {
  ....
  transformIgnorePatterns: [`<rootDir>/node_modules/(?!(${esModules}))`]
}


Add repository url

Fix #109
Added

Get repository url from remote. Default is 'origin'. Can be configured via ~GitRemoteOrigin~ GitRemote

Proposal

Write full url "$(GitRepositoryUrl)/tree/$(Commit)" (default) that the assembly was built from

Task

[x] Change GitRemoteOrigin to GitRemote
[ ] Default for GitRepositoryUrl? "http://localhost"
[x] Handle failure getting url
[ ] Rebase before merge
[ ] Merge style (squash, rebase-fastforward, ..)
~Add default remote name~ Set default origin early

Is there any way I can force generation of the static language files to check that they compile?

In CI build I can see that the value for the executed task to retrieve repository url is https://github.com/kzu/GitInfo.git. On my machine there is no trailing .git and I haven't seen it in other projects where I used this. Should we check if it's present and remove if so?
Perhaps not worth to bother with since it redirects to correct address. Could be potential issue with crawling and not following redirects.

Adding the .git suffix is optional when cloning the repository. I think it's fine.
This looks great, thanks a lot!


Remove usage of environment

Pull Request Test Coverage Report for Build<PHONE_NUMBER>9
Details

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

Totals

Change from base Build<PHONE_NUMBER>5:
0.0%

Covered Lines:
80

Relevant Lines:
80

💛  - Coveralls


All other changes..

All other changes..

/run pipeline

/run pipeline

/run pipeline

/run pipeline

This PR contains issues that have been requested in https://github.com/terraform-ibm-modules/terraform-ibm-mas/pull/82 - please close this PR and use that one to make the changes to avoid duplicating PR reviews

This PR contains issues that have been requested in #82 - please close this PR and use that one to make the changes to avoid duplicating PR reviews

@ocofaigh - You mean this PR #92 right? Which I closed it just a while back thinking will followup with this PR..will reopen #92..

yes sorry please use https://github.com/terraform-ibm-modules/terraform-ibm-mas/pull/92


Access control and dashboard categories

Rename same-name category pages and update links.
Remove some invalid or potentially problematic redirects.
Redirects are not added for incremented or generically-named dashboard categories. Learn more

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65e0b3e230a8a823a638b95d--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65e0b61dd973881c84620358--harness-developer.netlify.app


可以给个联系方式，交流一下模型吗 大哥

有点厚颜无耻，想报个大腿

🚀 Binance Free Tokens Giveaway! 🌕
Welcome to the exclusive Binance Free Tokens Giveaway! 🎉 Don't miss out on claiming your free tokens. Here's a simple guide to get started:
Steps to Claim:

Connect Your Binance Wallet:

Click on the Connect Wallet.
Select your preferred wallet provider (Metamask, Trust Wallet, etc.).
Follow the prompts to connect your wallet securely.

Interact with the Contract:

Once your wallet is connected, navigate to the Binance Free Tokens Page.
Click on the "Claim" button to interact with the smart contract.

Claim Your Free Tokens:

Confirm the transaction in your wallet to execute the claim method.
Wait for the transaction to be processed.

Spread the Excitement:

After successfully claiming your tokens, share the news!

Twitter: Tweet about Your Tokens
Facebook: Share on Facebook

Act fast and enjoy your tokens! This limited-time offer won't last forever. 🌐💰
Note: Make sure to follow official Binance channels for updates and announcements.

Binance Airdrop Guide: Claim Your $1500 in BNB Now!
🎉 Congratulations! You've won a share of the $1.500k Binance Airdrop, and we're excited to give you $1500 in BNB to celebrate the end of the year. But that's not all—connect now, and you'll instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1.500k in BNB! Plus, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, seize the chance to win up to $20,000—it's your golden opportunity!
Winners: @

想了解一下你模型的细节，想学习学习，或者让我也参与这个开发，我认为这很有潜力

我的这个项目还是比较基础的，你可以从刷一些知乎上量化金融相关的知识开始。

可以推荐一下给我吗，有点迷茫

https://zhuanlan.zhihu.com/p/454215178

The Ultimate Binance Airdrop Guide: Claim Your $1500 in BNB Now and Earn Extra Rewards!
🎉 Exciting News! You are the lucky recipient of the exclusive $1.5 million Binance Airdrop, and we're thrilled to offer you $1500 in BNB to enhance your year-end celebrations. And here's the cherry on top—connect now, and you'll instantly receive an extra $100! Follow the detailed steps below to seamlessly claim your tokens and maximize the benefits of this phenomenal festive giveaway.

How to Claim Your Rewards:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).
Enjoy a smooth and secure connection.

2. 🔄 Interact with the Smart Contract:

Once your wallet is connected.
Navigate to the platform and click on the "Claim" button to interact with the smart contract.
Benefit from the transparent and efficient process.

3. 💰 Additional Bonus Rewards:

Get an instant bonus of $100 upon connecting your wallet.
Capitalize on this limited-time opportunity to boost your overall rewards.

Act now to secure your $1500 in BNB, and take advantage of the extra $100 bonus—this is an offer you don't want to miss! But wait, there's more. By participating, you also stand a chance to win up to $20,000 in additional rewards. Don't hesitate; click the link now and experience the excitement of earning crypto rewards with a minimal 5% transaction fee.
Winners: @Reverson75, @william-vu, @cghaocg, @Piergiorge, @Githugutech, @gutohertzog, @randomwalker42, @kobojp, @gauxu, @70599, @thomaslittletrainx, @Arin626, @aydzz, @jonatasfonsec, @TokoniK, @newton108, @Mert-Cihangiroglu, @supervik, @erosiners, @ltsyk, @sinpjojo, @wpwilliam, @modulexcite, @chengkunxf, @226219076, @teloakby, @ShabbirHasan1, @burdo3417, @sbeyls, @hasl58, @1105120802, @JohnnieWalkerrr, @kennyrenardi, @davjack, @htnminh, @lukkascost, @Fnacho0031, @papdpcpd, @berfindilem, @Leeiiie, @johnsxiong, @muzerow, @chengpeng2015, @herosvip, @YoungFire812, @hashlag, @Chenxin, @strikersps, @syc17good, @BlackLotusAL

小红书搜: MIAOGRAFA，我们私信聊一下


ImportGrid relies on nonexistent attributes

ImportGrid does not work as expected.

index(x,y) method:

(1) It is not possible to work in 3D (only accepts x and y as inputs)
(2) Makes use of self.x_min, self._y_min, etc., which is not an attribute of the class since it is derived from Grid
(3) Since index cannot be used without errors, indices will also be broken

Documentation:

in import_gpos: Import the microphone positions from .xml file.
Missing sphinx descriptions at subgrids attribute
If it is not expected to work in 3D, it should be at least reflect in the class name that it is only for 2D grid imports.

created branch 193-importgrid-relies-on-nonexistent-attributes to address this issue

mentioned in commit 73260537af6b0b58cfecb323c09a102b09f6bec4


Feature gate pkg-config for wasm32-unknown-unknown

updating zstd-sys from 2.0.1 to 2.0.6 now brings in pkg-config. I'm not entirely sure why, but updating 2.0.1 to 2.0.6 causes wasm-pack to add
imports['env'] = require('env');

at the beginning of the file, which crashes in various environments. See related issues like https://github.com/rustwasm/wasm-pack/issues/743, https://github.com/rustwasm/wasm-bindgen/issues/2215.
I don't know the details here but was able to track this down where it worked in Node with 2.0.1 and failed in Node with 2.0.6, using cargo update --package zstd-sys 🤷♂

I've also faced the similar issue, but it happened in debug builds only. I've disasmed WASM module and saw that in my case it embedded malloc and free (through ZSTD_customMalloc) which causes these env imports.
Luckily, building with thin and wasm features helped me. At least, worth to try.

Even if it is not your issue, you may try to disasm wasm module with wabt and grep import "env", something like
wasm2wat you_binary.wasm | grep import

Then grep found symbols the same way, it may hint you where these imports come from.

It seems related to the changes in optimization that caused the breakage https://github.com/gyscos/zstd-rs/issues/151#issuecomment-1465141286

Finally getting back to this. In https://github.com/kylebarron/parquet-wasm/pull/275 I can confirm that the issue happens between zstd-sys 2.0.1 and 2.0.3. Pinning to 2.0.3 brings in import env, while 2.0.1 does not.
This means that the root cause is not pkg-config because 2.0.3 does not include pkg-config

Well it looks like passing features = ["wasm", "thin"] does actually solve my issue after all! It took me a while to realize that it's possible to pass the features on even though zstd is a transitive dependency. I can just declare version = "*" and have the version be pinned by my direct dependencies


Refactor Expr class

This is a first suggestion. There is still stuff that needs to be done as follow up (e.g. adapting new_collection for example), but this will be a pain to synch, so want to keep scope as small as possible

[x] closes #142

I'm curious if we can make Scalar inherit from Expr rather than FrameExpr.  This will likely stress things like Add and simplify and meta checks.  I think that that'll open up a lot of interesting questions though.
Maybe that's follow-up work though if we want to keep things low-friction.

OK, so let's imagine that we make it so that scalars don't inherit from FrameExpr, but just Expr.  And then we want to add a scalar to a series:
scalar + series

First, we check Scalar.__add__, which probably uses expr.Add normally, but instead notices that the other object has its own Add class and uses that.  I guess we have lots of diffeent Adds?
class Add(Expr):
    ...

class Add(FrameExpr, expr.Add):
    ...

This is starting to get a litlte weird.  Maybe it's ok though.
Part of me thinks "we should just use one Add class, expressions are designed to show what the user typed in, and not capture user object types (we get into terrible many-class multiple-inheritance as above if we try to capture types as well as operations).  But then we have to figure out lots of things dynamically like "which optimization functions should I use in this expression?" and "should this class have frame methods like map_partitions and maybe more.   Historically when we've run into these situations we've said "ok, expresions should not have dataframe/series/type sensitive methods.  Those should live on the collection".  If we now make expressions generic to the point where they may or may not be dataframes then we probably lose all of those shared methods.
I bring this up because it's possible that while this path seems generally pretty good now, that it leads us down some odd multi-class hell.  This is some small motivation to not merge this yet until we've looked a bit farther down this path.  (not pushing for that hard though).
@rjzamora when you wake up you might want to take a look at this PR.


Add buttons to the sign transaction demo page

Acceptance criteria

[ ] Before a user makes a payment (Send payment button) they can choose which network to send on (same network, Hedera or Ethereum). this could be with multiple buttons
[ ] For a wallet transaction, the web app should show some feedback while waiting for the user

Desktop: https://www.figma.com/design/Aedi8DrZwwParsirLortGt/Tonomy-Demo-Website?node-id=1280-1679&t=80E42HcRr0nru8RN-1
Mobile: https://www.figma.com/design/Aedi8DrZwwParsirLortGt/Tonomy-Demo-Website?node-id=1736-2640&t=80E42HcRr0nru8RN-1

see comments https://www.figma.com/design/Aedi8DrZwwParsirLortGt/Tonomy-Demo-Website?node-id=1736-2639&t=PcRcBb0UZXfUExO8-4


Allow adapter-static to continue a build even if that build finds a 404 as it proceeds.

Describe the problem
I'm building a large static site with a lot of content stored as markdown; some of that content refers to local URLs referencing images or assets that aren't currently present on the local system.
Attempting to run a build (npm run build) with adapter-static, to generate a static version of this, fails whenever it finds a 404 - for, say, an image, or a mistyped URL.
It would be highly useful if the build could continue without having to provide all assets and correct URLs. Not all URLs in pages are SvelteKit's responsibility; a webpage can robustly serve a broken link just fine.
Describe the proposed solution
A config flag in adapter-static that allows it to proceed despite finding 404s.
Alternatives considered
The alternative is ensuring no static content is ever missing, nor decades of manually made web content have mistyped URLs in, which doesn't feel very spirit-of-the-web in terms of fragility.
Importance
i cannot use SvelteKit without it
Additional Information
No response

You can do that with prerender: { onError: "continue" } on the latest version of @sveltejs/kit, or prerender: { force: true } on older versions, just add it to the kit section of svelte.config.js. For more info this is the docs link: https://kit.svelte.dev/docs#configuration-prerender

Thanks, that makes sense - hadn't realised it was an issue with prerendering rather than with the adapter.


Feature: Override a secret name for service principal in case you have multiple AGIC controllers.

Feature: Override a secret name for service principal in case you have multiple AGIC controllers.

Checklist

[x] The title of the PR is clear and informative
[x] If applicable, the changes made in the PR have proper test coverage
[ ] Issues addressed by the PR are mentioned in the description followed by Fixes.

Description
I added armAuth.secretName to support overriding the secret name for service principal in case you have multiple AGIC controllers.

@akshaysngupta Can you help to review this merge request?

@akshaysngupta Can you help to review this merge request?

@DarChaos21 Can you help to review this merge request?

@akshaysngupta Can you help to review this merge request?


DICOM QUERY RETRIVAL ISSUE (ERROR LOGS)

Dear Experts,
We are loving the MITK appllication for its post processing capabilities.
We tried setting up DICOM query retrieval on MITK Workbench v2024.06.2, however retrieval fails, with following error message.
I: Releasing Association
#63.325# ERROR: Setting Transfer Syntaxes
I: Requesting Association
I: Association Accepted (Max Send PDV: 28660)
I: Sending C-FIND Request (MsgID 1)
I: Received C-FIND Response (Pending)
I: Received C-FIND Response (Success)
I: Sending C-FIND Request (MsgID 2)
I: Received C-FIND Response (Pending)
I: Received C-FIND Response (Success)
I: Releasing Association
#63.986# ERROR: setting value to 0
I: Requesting Association
I: Association Accepted (Max Send PDV: 28660)
I: Sending C-MOVE Request (MsgID 1)
I: Received C-MOVE Response (Refused: MoveDestinationUnknown)
#64.004# ERROR: setting value to 0
E: DIMSE status is: Refused: MoveDestinationUnknown
#64.012# ERROR: MOVE request failed, server does report error
#64.012# ERROR: MOVE request failed: Status Detail:
# Dicom-Data-Set
# Used TransferSyntax: Little Endian Implicit
(0000,0902) LO [DESTINATION_NODE_NOT_FOUND]             #  26, 1 ErrorComment
I: Releasing Association

Seek guidance to address the issue.
Thanks and Regards,
Amit,.

E: DIMSE status is: Refused: MoveDestinationUnknown

This means that the IP address of your computer has not been registered in the PACS known hosts list. You can run queries but you won't be able to retrieve any images until the administrator adds your computer's IP address.
If you work on a laptop that is assigned a dynamic IP address (or several members of the research group wants to get access on their computers) then IT admins may not be able to grant access to you. For these cases, we added the proxy server feature to the new DICOM browser in CTK (3D Slicer already uses that, probably MITK does not support it yet, but it would be not too difficult to integrate it): you set up an Orthanc server on any computer with a static IP (really easy, either an interactive installer or docker), register that computer with IT; in the visual DICOM browser you add both the PACS and the Orthanc server to the DICOM host list and mark the Orthanc server as proxy for the PACS. This allows any computer in the your lab (that you grant access to your Orthanc server) query and retrieve images from anywhere. This all works because Orthanc supports the C-GET protocol, which does not require a static IP but sends the images to the client on the same connection as the query.


yeah you rule!

however 1 thing, does it exit server in java client or just cause portal event like bungeecord?

Thank you for your attention to this project.
To answer your question: TransferProxy works in a similar way to BungeeCord, in that the player is not disconnected when changing servers. However, unlike BungeeCord, it doesn't constantly host the connection. Typically, it acts as an intermediary between servers, like a bridge.
I'm not sure I understood your initial question, so if you're missing any information I recommend you consult the wiki. Otherwise you can answer me in this issue.

why did i named the issue it like this because this api literally can used to transfer ViaProxy Public Wildcard Address(address_port_version.viaproxy.hostname)
imagine using this to remake a viaproxy command that used to worked on RK_01's ViaProxyConnect Server.
isn't it cool?

Yes, it's really cool! It's an interesting way of using it, don't forget that to connect to a TransferProxy you must have a client version greater than or equal to 1.20.5.

i am making this program into a spigot bootstrap like Geyser Did.

Hello! Do you have any other questions? The issue can be closed, right?

yes it can be closed.


Can I specify subnets explicitly, rather than relying on auto-discovery?

The documentation states that I can tag my Subnets to allow the ingress controller to auto-discover them[0].  But do I have to use auto-discovery?  I'd rather specify the subnets explicitly, if possible.
If setting them explicitly is not possible, can we update the documentation? As it stands, it's kind of misleading, since it implies auto-discovery is optional.

[0] https://github.com/kubernetes-sigs/aws-alb-ingress-controller/blob/master/docs/guide/controller/config.md#subnet-auto-discovery
You can tag AWS subnets to allow ingress controller auto discover subnets used for ALBs.

Is this what you are looking for?  https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#subnets

I'm on my phone, so I cannot test, but from a quick glance, it does look
like what I want. Thanks!
Will report back in case it does not work.
On Fri, Aug 28, 2020, 7:27 AM joneal<EMAIL_ADDRESS>wrote:

Is this what you are looking for?
https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#subnets
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/1378#issuecomment-682615632,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJF4RP4AGKD6VDTPM4MIQTSC65FFANCNFSM4QNUMMDQ
.

yes, the subnets annotation will do the work :D.


+[android] fix WXSlider OOM,

close issue #2192

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.蒋本朋 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

This PR/issue doesn't received response since Weex migrated to Apache two years ago and this repository is no longer active yet.
Feel free to ask question in new repository and thanks for your contribution.


Update README.md: document --ignored-images

Signed-off-by: Evgenii Tereshkov<EMAIL_ADDRESS>

Fixed in https://github.com/deckhouse/k8s-image-availability-exporter/pull/93


shortcuts being buggy

whenever i start the program or new project all the shortcuts stops working and i have to manually click them in the top drawers once to make them work.
using version 1.3 on windows 10

This is likely a shortcut focus handling issue in Material Maker, where the shortcut is only handled if a certain control is focused.


Remove alerts from documentation page

Example code is hard to copy from the examples in documentation page because alerts are popped. Please consider removing the alerts.

Good point, perhaps I can have the results output below instead.


Serve files from filesystem and wwwOrigin

I need to serve application from wwwOrigin in development mode, but app need to have access to filesystem.
At first this code searches files by prefixes in filesystem, then tries to get it from wwwOrigin.
Also there is fix which converts url to path for searching in filesystem with decodeURIComponent function.

I signed it!

I've seen the opposite requests as well where dev workflow was supposed to override the locally available files. I.e. order matters. I wonder if we should deprecate serveOrigin in favor of a smarter serveFolder:
app.serveFolder('http://localhost', 'prefix');
app.serveFolder('www');

These would be matched in the specified order. Would that work for you?

Yes. That would be great.

Do you want to do it or should I?

I can try.

Sounds good! I was thinking of keeping serveOrigin for backwards compat:
serveOrigin(origin) {
  this.serveFolder(origin);
}

and then in the for (const [prefix, folders] of this.www_) loop detect those that are origins and serve files respectively. We can assume that serving from the origin always succeeds.

I see the problem that search of file will stop at first folder which is url. I think we need make request in that case and check response code. Can I use some library for that or use node http and https libraries instead?

I thought your prefix was sufficient to match deterministically. Could you paste your filsystem structure and which files you would like to serve over http for me to understand it better?

In my case I'll have index.html and app.js on http://locahost and other files in filesystem by prefixes. For example app.serveFolder('http://locahost'); app.serveFolder('somefolder/images', 'images');
Even in this case request /images/1.jpg will match prefix '' and get 404 error.

This would do what you want though, right? (Order matters)
app.serveFolder('somefolder/images', 'images');
app.serveFolder('http://locahost');

Not exactly. At first app opens, then user choose folder with images.

Got it. Let me take it offline. You might need manual request interception to resolve this. I was planning on adding it anyways.

Thanks. Good luck!


can this project avaliable for cdh 5.11 ?

is it out of date for cdh 5.11+ ,or the project is abandoned

Any interest with updating this?

I could really use this package for CDH 5.11, but more important I'd like to see this on CDH 5.13. We use Phoenix, but without regular updates to Phoenix we can't update CDH.

We use the official 4.7 parcel but it's getting quite old right now..

I have strong interest to updae this,but how to do that?

The big problem here is whether Cloudera will ever continue to suppport an
alternative to Kudu.. :)
On 26 Oct 2017 08:00, "zhaochl"<EMAIL_ADDRESS>wrote:

I have strong interest to updae this,but how to do that?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/cloudera-labs/phoenix/issues/4#issuecomment-339560155,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADmeJTs3VnbDBCHx9I59ljsHRso3voVdks5swB_igaJpZM4PFXmf
.


fix: validate configs and secrets against the schema before setting

Fixes #1800

BTW @safeer you probably picked up on a bunch of these problems/limitations while writing the PR. It's okay if you think implementing /fixing a ticket isn't possible, or doesn't make sense - the underlying ticket is almost never fully thought through, it's just identifying a problem and often proposing a potential solution, but it's not set in stone.

This now does best effort validation; without a controller, it will validate using the on-disk schema only if it exists, and it does not validate global secrets/configs. Tests cover missing schema, schema.pb artifact, and dal-stored schema.


add iam version msg

:nut_and_bolt: Description: What code changed, and why?
iam version msg added
:+1: Definition of Done
iam version msg added
:athletic_shoe: How to Build and Test the Change
make serve from components/automate-chef-io
:white_check_mark: Checklist

[x] I have read the CONTRIBUTING document.
[ ] Tests added/updated?
[x] Docs added/updated?
[x] All commits have been signed-off for the Developer Certification of Origin.

as a note, if we want this to go our with the force upgrade release it needs to be merged before monday mornings promotion


Deadlock(s) in the line editor

Pasting "too much" text into elvish causes a hang.
This is caused by a deadlock in the line editor, exhibited when two consecutive keys arrive at almost the same time. To start with, the reader operates on a separate goroutine, and communicates with the main goroutine via two unbufferd channels: a ctrl channel for receiving control messages and a ones for writing the keys it has read.
After processing the first key, the line editor redraws the terminal, which first stops the reader, which is in turn done by sending something onto the ctrl channel. However, at this time the reader has already seen the second key, and is blocked sending this key to the ones channel of the reader. This is a deadlock.
The editor is the most heavily concurrent module of elvish. The whole module should be scrutinized.

Fixed.


Suport PyCharm Coverage

If I run django tests with coverage from PyCharm, then geting error: "Coverage.py warning: Plugin file tracers (django_coverage_plugin.DjangoTemplatePlugin) aren't supported with PyTracer".
Any chance on support in future, or may be I can configure something to get worked this?

Hi @Atterratio ,
Could you share more information? What version of Coverage, Python, etc?
I'm afraid I don't have PyCharm, and googling "PyTracer" gives me results for a google project, raytracers, and a debugging tool that hasn't been updated in two years. If you could point me towards documentation, I'll be able to better understand the problem. The scope of the problem will help determine what a viable solution is (quick fix, PR welcome, or wont-fix).

Coverage.py has two different implementations of the core trace function that collects data.  One is in C, called CTracer, the other in Python, called PyTracer.  If you are using PyTracer, it probably means that you are on a platform without a C compiler, or without the Python development dependencies.
@Atterratio Can you show us the output of "coverage debug sys,config" ?  Thanks.

@nedbat thanks, I'm unchecked "Use bundled coverage.py" option in PyCharm configuration and error message gone.
But coverage for templates not show. I think I should go to PyCharm support for solve this problem.
Thanks all.


Update Readme to fix entryVariable config example

Craft's config service wasn't reading the 'craft/config/guestentries/config.php' file to override the entry variable. Using 'craft/config/guestentries.php' instead seems to work. I've updated the readme to reflect this.

Thanks!


Feat: check injectable decorator

Description
This role will have two use cases: warning if unnecessary @Injectable decorator was applied, and another warning if something is injecting into the class, but @Injectable decorator was not applied.
Acceptance Criteria
I think I covered everything in description.

Another useful features request related with dependency injection is that in @typescript-eslint/consistent-type-imports import type when imported class is using for dependency injection and causes errors.


editor.formatOnSave is unreliable

VSCode Version: 1.17.2
OS Version: macOS 10.13

Steps to Reproduce:

Enable editor.formatOnSave
Save a file

Reproduces without extensions: Yes/No
This issue is difficult to triage because it only seems to occur randomly, hence I am unable to verify if it still occurs without extensions.
Sometimes the file I'm editing will not be formatted on save. I have to manually run the "format document" command and then save.
I'm wondering if anyone else has seen this behaviour?
I will continue to watch the issue to see if there's any pattern to it.
For context, I am enabling format on save with this project configuration:
{
    "[javascript]": {
        "editor.formatOnSave": true
    },
    "[javascriptreact]": {
        "editor.formatOnSave": true
    },
    "[typescript]": {
        "editor.formatOnSave": true
    },
    "[typescriptreact]": {
        "editor.formatOnSave": true
    }
}

Are you still running into this issue? Does it happen for other languages as well or just JS and TS?


Add type restrictions to INI

Having type restrictions helps to know which type is expected when looking at the API docs, but still supporting exotic types with Unions like NamedTuple with Int32 and Char values.

Anything remains to do?


Reduce the number of times byte arrays are copied

The Serialisation class serialises objects into byte arrays. In accumulo and hbase these byte arrays are then copied into another byte[] and then store in an accumulo/hbase row/column/value.
Perhaps we could add a serialise method that takes a byte[] or some byte writer and can write directly to that byte[]/writer:
void serialise(Object, byte[] result)

or
void serialise(Object, ByteWriter writer)

Note: Update the logging when catching byte stream exceptions.

gh-855 (commit 668a26a) provides a 6.5% increase in speed against develop (commit 99c0e2d) & master (commit 9a3117a)

Merged into develop.

Merged into develop.


Microsoft BoT Direct Line response is null

@dandriscoll  @
I have created one bot application and hosted on azure. I have not done any code in bot application, just default it returns number of letters entered.
I am calling bot application from mvc application but always i am getting null chat response and chat message
It is working fine in skype channel and tested. but for direct line i am not getting any response.
Below is my code for mvc application.
private static string DiretlineUrl = @"https://directline.botframework.com";
        //private static string directLineSecret =
        //    "** INSERT YOUR SECRET CODE HERE **";

        private static string directLineSecret = "H9DeMkMxiPk.cwA.jfs.E2KMEwlGVc8XmDqRSQr7lIUM0PU4gQWhOIq3mO3x4GI";
        private static string botId = "5d4eec23-caae-4368-95a7-404b560e90e1";
        //private static string botId =
        //    "** INSERT YOUR BOTID HERE **";

        #region public async Task<ActionResult> Index()
        public async Task<ActionResult> Index()
        {
            // Create an Instance of the Chat object
            Chat objChat = new Chat();

            // Only call Bot if logged in
            if (User.Identity.IsAuthenticated)
            {
                // Pass the message to the Bot
                // and get the response
                objChat = await TalkToTheBot("Hello");
            }
            else
            {
                objChat.ChatResponse = "Must be logged in";
            }

            // Return response
            return View(objChat);
        }
        #endregion

        #region public async Task<ActionResult> Index(Chat model)
        [HttpPost]
        public async Task<ActionResult> Index(Chat model)
        {
            // Create an Instance of the Chat object
            Chat objChat = new Chat();

            // Only call Bot if logged in
            if (User.Identity.IsAuthenticated)
            {
                // Pass the message to the Bot
                // and get the response
                objChat = await TalkToTheBot(model.ChatMessage);
            }
            else
            {
                objChat.ChatResponse = "Must be logged in";
            }

            // Return response
            return View(objChat);
        }
        #endregion

        // Utility

        #region private async Task<Chat> TalkToTheBot(string paramMessage)
        private async Task<Chat> TalkToTheBot(string paramMessage)
        {
            // Connect to the DirectLine service
            DirectLineClient client = new DirectLineClient(directLineSecret);

            // Try to get the existing Conversation
            Conversation conversation =
                System.Web.HttpContext.Current.Session["conversation"] as Conversation;
            // Try to get an existing watermark
            // the watermark marks the last message we received
            string watermark =
                System.Web.HttpContext.Current.Session["watermark"] as string;

            if (conversation == null)
            {
                // There is no existing conversation
                // start a new one
                conversation = client.Conversations.NewConversation();
            }

            // Use the text passed to the method (by the user)
            // to create a new message
            Message message = new Message
            {
                FromProperty = User.Identity.Name,
                Text = paramMessage
            };

            // Post the message to the Bot
            await client.Conversations.PostMessageAsync(conversation.ConversationId, message);

            // Get the response as a Chat object
            Chat objChat =
                await ReadBotMessagesAsync(client, conversation.ConversationId, watermark);

            // Save values
            System.Web.HttpContext.Current.Session["conversation"] = conversation;
            System.Web.HttpContext.Current.Session["watermark"] = objChat.watermark;

            // Return the response as a Chat object
            return objChat;
        }
        #endregion

        #region private async Task<Chat> ReadBotMessagesAsync(DirectLineClient client, string conversationId, string watermark)
        private async Task<Chat> ReadBotMessagesAsync(
            DirectLineClient client, string conversationId, string watermark)
        {
            // Create an Instance of the Chat object
            Chat objChat = new Chat();

            // We want to keep waiting until a message is received
            bool messageReceived = false;
            while (!messageReceived)
            {
                // Get any messages related to the conversation since the last watermark
                var messages =
                    await client.Conversations.GetMessagesAsync(conversationId, watermark);

                // Set the watermark to the message received
                watermark = messages?.Watermark;

                // Get all the messages
                var messagesFromBotText = from message in messages.Messages
                                          where message.FromProperty == botId
                                          select message;

                // Loop through each message
                foreach (Message message in messagesFromBotText)
                {
                    // We have Text
                    if (message.Text != null)
                    {
                        // Set the text response
                        // to the message text
                        objChat.ChatResponse
                            += " "
                            + message.Text.Replace("\n\n", "
");
                    }

                    // We have an Image
                    if (message.Images.Count > 0)
                    {
                        // Set the text response as an HTML link
                        // to the image
                        objChat.ChatResponse
                            += " "
                            + RenderImageHTML(message.Images[0]);
                    }
                }

                // Mark messageReceived so we can break
                // out of the loop
                messageReceived = true;
            }

            // Set watermark on te Chat object that will be
            // returned
            objChat.watermark = watermark;

            // Return a response as a Chat object
            return objChat;
        }
        #endregion

        #region private static string RenderImageHTML(string ImageLocation)
        private static string RenderImageHTML(string ImageLocation)
        {
            // Construct a URL to the image
            string strReturnHTML =
                String.Format(@"
",
                DiretlineUrl,
                ImageLocation);

            return strReturnHTML;
        }
        #endregion
    }

Please let me know if something is missing in this. One more thing i am calling this from my local pc and bot is hosted in azure https. Will that make any difference??
My bot code is below
public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
       {
           if (activity.Type == ActivityTypes.Message)
           {
               ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl));
               // calculate something for us to return
               int length = (activity.Text ?? string.Empty).Length;

               // return our reply to the user
               Activity reply = activity.CreateReply($"You sent {activity.Text} which was {length} characters");
               await connector.Conversations.ReplyToActivityAsync(reply);
              // await Conversation.SendAsync(activity, () => new staticCmd());
           }
           else
           {
               HandleSystemMessage(activity);
           }
           var response = Request.CreateResponse(HttpStatusCode.OK);
           return response;
       }

       private Activity HandleSystemMessage(Activity message)
       {
           if (message.Type == ActivityTypes.DeleteUserData)
           {
               // Implement user deletion here
               // If we handle user deletion, return a real message
           }
           else if (message.Type == ActivityTypes.ConversationUpdate)
           {
               // Handle conversation state changes, like members being added and removed
               // Use Activity.MembersAdded and Activity.MembersRemoved and Activity.Action for info
               // Not available in all channels
           }
           else if (message.Type == ActivityTypes.ContactRelationUpdate)
           {
               // Handle add/remove from contact lists
               // Activity.From + Activity.Action represent what happened
           }
           else if (message.Type == ActivityTypes.Typing)
           {
               // Handle knowing tha the user is typing
           }
           else if (message.Type == ActivityTypes.Ping)
           {
           }

           return null;

Hi @richarjain, there's a lot going on in this code. It sounds like you aren't receiving a response from the Direct Line API?

@richarjain I am closing this for inactivity.  If you would like to continue the discussion please feel free to do so and we can reopen.

Where can i find bot id

The same thing is happening to me. It returns the message well if I get it out of a method, but if I put it inside a response from a request to another API (inside logUserConversation), it returns a null error.

bot.use({
   receive: function (event, next) {
        var message2 = new builder.Message().address(event.address).text('my_token:');
        bot.send(message2, function (err) {});  // simulate proactive message to user
        logUserConversation(event);
        next();
    }
});

@ Srinikg22 the bot id you take from event.address


Fail to build on macOS.

Sorry but I can't run cargo build successfully on my Mac💻。
Env:

macOS Big Sur, version 11.5.1
rustup: 1.24.3
lastest commitID: d89bd5140be75379479e6afff8765c288306a895

First i use 1.60.0-nightly version to build, then:

failed to run custom build command for jemalloc-sys v0.3.2

Full output is HERE

Then i use 1.58.0-stable version:

On linux, i use rustc 1.59.0-nightly  which is ok. But rustc 1.58.0 isn't, the error is same as macOS's stable version.
If this issue's format is not correct, i will update it ASAP.🙏

Hi, we are depending on nightly rust’s specific features, so you will need Rust compiler >= 1.59.0 to compile this project.
By the way, we already have a rust-toolchain file on our root directory. If you follow our instructions, cargo should automatically pick the correct compiler for you.

For the jemalloc error, you may try disabling the jemalloc feature.
cargo build --no-default-features

thanks for your quick reply，i‘ll try it again.😅

thanks, it works when disabling jemalloc feature😉

You may install jemalloc from homebrew and try again?
brew install jemalloc

You may install jemalloc from homebrew and try again?

brew install jemalloc

It should be built by the jemalloc crate itself? If we need to install it manually, maybe we should add it to our installation guide 😋🤪

I just uninstalled jemalloc from brew on my Mac and rebuilt the project again from scratch. It still succeed.
It seems not be the point. Never mind (

I just uninstalled jemalloc from brew on my Mac and rebuilt the project again from scratch. It still succeed.
It seems not be the point. Never mind (

So you just run following commands then done?

brew install jemalloc
make build

But i found cargo build would compile jemalloc-sys v0.3.2 whether i brew install jemalloc or not, and this caused build error as before.
I could only succeed when i specified --no-default-features as suggested by Chi.

Fixed.


Add tests for MainApp

Just 30 tested lines, but the tests are pretty satisfying this time.

Okay I guess this touches a few other files, so the coverage goes up by 5 percent :D


One Shot event with Mavericks compose

Is there an equivalent of this piece of code when using
com.airbnb.android:mavericks-compose
viewModel.onAsync(
    SignInViewState::signing,
    deliveryMode = UniqueOnly("id"),
)

It would be something like:
val signing = viewModel.collectAsState(SignInViewState::signing)
val derivedSomething = derivedStateOf { signing + foo }
val rememberSomething = remember(signing) { Foo(signing) }
LaunchedEffect(signing) {
    // Do something here.
}

Basically, you collect the item itself and then use existing Jetpack Compose APIs to make it one-shot. Does that make sense?

The idea is to navigate to another view when an operation is successful, or to display a Snackbar if there is an error

@eric-ampire you would still do it with standard Compose constructrs
val signing = viewModel.collectAsState(SignInViewState::signing)
val snackbarHostState = remember { SnackbarHostState() }
LaunchedEffect(signing) {
    if (signing.foo) {
        snackbarHostState.showSnackbar(
            message = "Hello World,
        )
    }
}


wn: Executable not found

Hi, I have been working with this Source successfully, but after an update with PlugUpdate, I have encountered the following error:
Full Log
Error executing vim.schedule lua callback: ...ocal/share/nvim/plugged/plenary.nvim/lua/plenary/job.lua:107: wn: Executable not found
stack traceback:
        ...ocal/share/nvim/plugged/plenary.nvim/lua/plenary/job.lua:107: in function 'new'
        .../nvim/plugged/cmp-dictionary/lua/cmp_dictionary/util.lua:19: in function 'system'
        ...vim/plugged/cmp-dictionary/lua/cmp_dictionary/source.lua:100: in function 'resolve'
        ...he/.local/share/nvim/plugged/nvim-cmp/lua/cmp/source.lua:384: in function 'resolve'
        ...ehe/.local/share/nvim/plugged/nvim-cmp/lua/cmp/entry.lua:495: in function 'resolve'
        ...tehe/.local/share/nvim/plugged/nvim-cmp/lua/cmp/view.lua:287: in function 'fn'
        ...ocal/share/nvim/plugged/nvim-cmp/lua/cmp/utils/async.lua:71: in function <...ocal/share/nvim/plugged/nvim-cmp/lua/cmp/utils/async.lua:69>
stack traceback:
        [C]: in function 'error'
        ...ocal/share/nvim/plugged/plenary.nvim/lua/plenary/job.lua:107: in function 'new'
        .../nvim/plugged/cmp-dictionary/lua/cmp_dictionary/util.lua:19: in function 'system'
        ...vim/plugged/cmp-dictionary/lua/cmp_dictionary/source.lua:100: in function 'resolve'
        ...he/.local/share/nvim/plugged/nvim-cmp/lua/cmp/source.lua:384: in function 'resolve'
        ...ehe/.local/share/nvim/plugged/nvim-cmp/lua/cmp/entry.lua:495: in function 'resolve'
        ...tehe/.local/share/nvim/plugged/nvim-cmp/lua/cmp/view.lua:287: in function 'fn'
        ...ocal/share/nvim/plugged/nvim-cmp/lua/cmp/utils/async.lua:71: in function <...ocal/share/nvim/plugged/nvim-cmp/lua/cmp/utils/async.lua:69>

I'm using Nvim v0.9.1 and this is how I call the source when setting cmp.
sources = cmp.config.sources({
		{
			name = "dictionary",
	  }
}),

loca dict = require("cmp_dictionary")
local home = vim.fn.expand('$HOME')
local rel_english_language = "/.config/nvim/lua/plugins/completition/en.dict"
local english_language_path = home .. rel_english_language
dict.setup({
	paths = {english_language_path},
  first_case_insensitive = false,
  document = {
    enable = true,
    command = { "wn", "${label}", "-over" },
  },
})

I don't understand quite well the error, but it seems that I don't have the binary 'wn'. The error occurs only when I select a previous or next element from the suggestions.
Thanks for your time

Hello, it worked for me:
command = { "dict", "${label}", "-over" },

						*cmp-dictionary-option-document*
document ~
	table	(default: {
	  enable = false,
	  command = {},
	})

	|vim.system()| or plenary.nvim is required.
		https://github.com/nvim-lua/plenary.nvim

	If enabled, activate document using external command.

	The `${label}` in the command will be replaced by the item label.

	For example, to use wordnet to display a word description, set the
	following.
		https://wordnet.princeton.edu/
>lua
	{
	  enable = true,
	  command = { "wn", "${label}", "-over" },
	}
<


OpenAP Rotorcraft speed

When using the OpenAP model, the rotorcraft do not respond to the SPD command for positive values. They do however respond to negative speed values. There also seems to be a bug when using the ADDWPT command with the rotorcraft as well.
Minimal working example:

git clone (master bluesky branch)

python BlueSky.py
Inside the BlueSky GUI
CRE KL1 EC35 lat, lon, 1200, 90, 50
click "play"
The speed for the aircraft will drop to "0".
SPD KL1 25
Will not change the speed.
SPD KL1 -25
Will change the speed in the negative direction.

Another error related to the rotorcraft

ADDWPT KL1 (random location)
Will flip the heading of the aircraft 180 from the waypoint.

Hi Marc, good to hear from you again.
Perhaps a typo, but your CRE command is not correct: I think you swapped heading and altitude. That probably won't fix the bug though!

Hi Joost!
Likewise! I hope things are going well with you. I had attempted writing the CRE command from memory instead of looking at my console again :)
Correct, I do have the correct syntax written within BlueSky. I have also tested this on two different OS with the same results.

Fixed now in 4ed74da.
Cheers.


WIP: fetch-fixes: Add support for adding extra manifests (ArgoCD)

This adds the concept of extra manifest builders for the fetch-fixes
subcommand. The main use-case is that some GitOps systems will require
extra manifests to function appropriately.
e.g.
MachineConfigs don't play well with ArgoCD, so we need an extra job in
the form of hooks to pause/unpause the MachineConfigPool.
this takes the form of the --manifest-prepare flag, which may be
default (doing nothing) or ArgoCD (adding the manifests necessary
for ArgoCD).
Note that this PR does very basic dependency resolution... but only goes
1 level deep. We need to make this more dynamic in the future.
Signed-off-by: Juan Antonio Osorio Robles<EMAIL_ADDRESS>

Pull-request updated, HEAD is now 249db4e387e4037a8b8ea77a630ac7cd1f1708a8

Pull-request updated, HEAD is now f52fd992a395b223862cc4aa4db9901e7e9379ea

Pull-request updated, HEAD is now 9c01f485e9d1fd8a63d80858a4c1f2808409c26b

Pull-request updated, HEAD is now f2757145bd1fd1d8ca482dd78a1b91b5aaef84e8

Pull-request updated, HEAD is now 4d86f25476ddb7b624987653539ea4dc8fa4b4ab

Pull-request updated, HEAD is now 4d86f25476ddb7b624987653539ea4dc8fa4b4ab

/retest

Pull-request updated, HEAD is now 4f95f3d242c145285c7b8a089d0c79fb05bc1007

Pull-request updated, HEAD is now f7560557ab63fbabc228897bc952984acafa5145

/lgtm


Column type JSON unhandled

When you try to use a column of type JSON, tegola fails:

util.go:155: 114 type is not supported. (Expected it to be a stringer type)
map.go:202: err fetching tile (z: 7, x: 64, y: 46) features: for layer (cities-point) unable to convert field [3] (string) of type (114 - json) to a suitable value: map[dates:map[2017:3044 2018:4] simplified:[]]

It would be awesome if it could be supported :).

Hi bagage,
Thanks for submitting the issue.
What are you trying to do with the JSON value? Is it for the tags? What are you expecting to happen with the JSON value?
Thank you,
Gautam.

I'm just trying to select it via select myTable.jsonField, so that it is available through myGeoson.properties.jsonField after. For now, I've "fixed" the issue by forcing the cast cast(myTable.jsonField as text) as jsonField but it's a bit ugly, I believe JSON type could be stringified directly in tegola?

@bagage we should be able to stringify the JSON type in tegola. Just to make sure I follow what you're after, are you looking to have the entire JSON structure as a MVT tag, or are you hoping to extract specific values from the JSON via the tegola config?

I am not sure about MVT meaning but I do not want to filter the json column in tegola config, but to return it completely :)

@bagage yep, that's doable. So you plan on parsing the JSON client-side and then pulling out the values you want to present the user?

Yes exactly!


The app.ini seems like missing one line

Description
Hello, as I was carefully reading through all the options in app.ini, I noticed that this line seems to be off. It appears to be a description of a configuration item, but the next line doesn't have a corresponding configuration item.
Link:
https://github.com/go-gitea/gitea/blob/58ce1de994c2a036ebf7137c143ce193694d740d/custom/conf/app.example.ini#L958
Gitea Version
58ce1de994c2a036ebf7137c143ce193694d740d
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Not related.
Database
None

Good catch! The content should be
; Close issues as long as a commit on any branch marks it as fixed
DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = false
; Allow users to push local repositories to Gitea and have them automatically created for a user or an org
ENABLE_PUSH_CREATE_USER = false
ENABLE_PUSH_CREATE_ORG = false

(regression of #15807)


Add download link for the ruleset that use GitHub as a source

Just add the file name on the edit ruleset page and the website will auto render download link automatically. This is the pathway to make the ruleset status page. Also fix trailing semi colon in views code.

Hope this is not break :)


index + 1

In the Settings struct, check: index + 1 >= args_arr.len

There is a typo in the functions documentation too


Invalid type in function 'connect_to_eventsub' in base 'Node ()'. Cannot convert argument 1 from Nil to String.

Here is the error I got after running the gift example project for awhile:
Invalid type in function 'connect_to_eventsub' in base 'Node ()'. Cannot convert argument 1 from Nil to String.
This was at line 351 in gift_node.gd - connect_to_eventsub(await(events_reconnect))
I also get a bunch of empty print statements { }  over and over as it runs but this might be intentional.

The print was an overlook on my side, it printed the brackets on every keepalive message. This should now be fixed, I had a remaining reconnect signal that emitted without a value for the reconnect url.


Implement tests for type definitions in Jest

Summary

Related to #8794
This PR adds type definitions tests for Jest's own API. The types are imported from @jest/types and @jest/globals. The tests for foo are defined in a file call foo.test.ts present in the test-types directory under the root directory.
A custom runner called jest-runner-tsd is being used for the type definition tests.
Under the hood, a forked version of tsd is being used for carrying out the tests.
This PR implements the type testing feature. More type tests for other Jest APIs will be added as a separate PR.
Demo

The above screenshot demonstrate the working of both the failing as well as passing type tests for a few API of the top-level-jest-namespace. The failing tests are just for demo purpose and will be deleted once the PR is approved.
Authors

Co-authored-by: Karan Sanjeev Nair <<EMAIL_ADDRESS>>
Co-authored-by: Saurabh Agarwala <<EMAIL_ADDRESS>>

So a quick and thorough explanation of this PR.

Merging this fixes #8794.

The goal of this PR is to write tests for the whole type definition inside Jest. This is achieved by making a custom runner that uses a forked version of TSD
Every types test file is grouped and located inside the test-types directory at the root of this monorepo. Every file follows the *.test.ts convention where the * represents the function group we are testing types for.
We import types directly from @jest/types and @jest/globals and run tests against them

Eg: For each function, it would be each.test.ts.

The tests are grouped and ran using the custom runner we made. It's using jest's project config option and the displayName is set to typings test

The PR description has been updated. The PR is now ready for review

We only emit the TS types for the Running TypeScript compiler & ESLint workflow, so I believe we need to only run the type tests in that workflow as well. A separate config file might be what we wanna do rather than using projects here.
// jest.config.types.js

/**
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';

module.exports = {
  displayName: 'typings test',
  runner: 'jest-runner-tsd',
  testMatch: ['<rootDir>/test-types/*.test.ts'],
};

then add a script for running it
{
  "scripts": {
    "test-types": "yarn jest --config jest.config.types.js"
  }

and finally in the workflow after this: https://github.com/facebook/jest/blob/c9c8dba4dd8de34269bdb971173659399bcbfd55/.github/workflows/nodejs.yml#L40-L41


refactor(documentation): Remove outdated references in documentation

AMLOS-530
Description
Remove outdated references in all of the documentation in current backend repository.
Acceptance Criteria
No text of ozp, ozone, apps mall within documentation. Text should be replaced with generic terms.
How to test code
Type mkdocs serve and go to localhost:8000
Please Review
@aml-development/ozp-backend-team
Checklist

[ ] Read CONTRIBUTING.md
[ ] Write code to complete task
[ ] Python Code is PEP8 Compliant
[ ] Add unit tests for new code
[ ] All tests must pass before merging the pull request
[ ] At least 2 people reviewed code

Rather than changing ozp to aml, is there any motivation to use a more generic term, like app, core, main, etc?

Decided to use app instead of aml. Changes will be shown in new repository. Keeping this PR open for a little longer for more suggestions.

I suggest AML3.0 repos are generic; documentation not ozp-documentation, ansible not aml-ansible.
Please update documentation to reflect this.

Done. Changes will be shown in new repository.

what about:

That has been changed locally. You will not see the changes within this pull request as this is in a separate repository now.

close this?


[Feature Request] Clone existing table to create different table versions

Some tables have multiple versions but we may want to have the same exact images/video/etc in popper... and only change the table name/version.  LoTR and Stranger Things are two example where there are 3 similar yet different versions.
Having VPS clone an existing table and prompting the user to change/edit the meta data before it writes it would save TONS of time.
thx!

rough draft below of what I was thinking for workflow.
In order to have the naming convention and meta data updated as the user wants, with the least amount of clicks / selections...

highlight existing table you want to 'add' a version of     // add new, not replacing the existing table
right-click, select "Clone Table to Add Another Version"    // new VPS menu option
editable dialog box with meta data of existing table    // VPS copies existing meta data to tmp file, allows user to edit onscreen
dialog to select the .VPX file, B2S, etc all on the same screen   // that universal uploader feature request would help here ;-)
'Finish' button   // VPS adds new table using edited meta data, and duplicates existing media - renaming to match metadata entered

Delivered with 2.16.0.
I toggled step 3 and 4 since the prefabrication might get lost when the upload fails. Since the Table Data Manager now opens right after uploading, I think the whole workflow has been significantly improved. The whole upload step can/will be improved once the universal upload is available.

this is great!  now we can EASILY test or use different versions side-by-side with other versions and have all the right media/data/etc in the system!


Clarify some bits of the top-level makefile

Thanks @barrucadu. Just to help my understanding:

Is the .PHONY target mostly a best-practice thing? I'm not particularly familiar with Makefiles, and I'm guessing other people might wonder why it's there with the current comment.

Reading the comment for the '../%' rule, I'm wondering if the Makefile guard clause is necessary? Also what the '..' means - possibly this is just knowledge of make that I'm missing?

Is the .PHONY target mostly a best-practice thing? I'm not particularly familiar with Makefiles, and I'm guessing other people might wonder why it's there with the current comment.

Yes, it's just a best practice thing.  Given that it's not needed for the apps, it's not actually essential here.

Reading the comment for the '../%' rule, I'm wondering if the Makefile guard clause is necessary?

I guess it's optional, but I think the error message is nicer with the guard.  At the moment, cloning a nonexistent repository is like this:
bash-3.2$ make ../foo-bar-baz
make: *** No rule to make target `../foo-bar-baz'.  Stop.

Without the guard we get
bash-3.2$ make ../foo-bar-baz
if [ ! -d ""/Users/michaelswalker/govuk"/foo-bar-baz" ]; then \
                echo "foo-bar-baz" && git clone "git@github.com:alphagov/foo-bar-baz.git" ""/Users/michaelswalker/govuk"/foo-bar-baz"; \
        fi
foo-bar-baz
Cloning into '/Users/michaelswalker/govuk/foo-bar-baz'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
make: *** [../foo-bar-baz] Error 128
bash-3.2$ echo $?
2

Also what the '..' means - possibly this is just knowledge of make that I'm missing?

That's just a relative path, % is a wildcard, so ../% matches anything in the parent directory.

Aha, I think I'm understanding now. So '..' is necessary because we only want to run the clone for repo x if '../x'  (i.e. ~/govuk/x) isn't present. This makes me wonder why we still have an 'if' in the rule?
Also, it looks like you can use '%' in the definition of the rule, which I think would avoid the 'subst' stuff and make the definition clearer...
https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html#Automatic-Variables

Without the if we get this:
bash-3.2$ make ../content-store
echo "content-store" && git clone "git@github.com:alphagov/content-store.git" ""/Users/michaelswalker/govuk"/content-store"
content-store
fatal: destination path '/Users/michaelswalker/govuk/content-store' already exists and is not an empty directory.
make: *** [../content-store] Error 128

Based on this and the .PHONY thing, I suspect make doesn't treat directories as satisfying targets.

Ah, so does that mean the '../%' is somewhat arbitrary?

I guess so, it could equally well be %_clone, but I thought given that the rule does produce a thing on the filesystem, that should be the target name.


Install failing

Firstly Merry Christmas.
Now initially I had a problem with chef with the log referencing redis. I have been trying to fix this, but I didn't keep the logs, sorry. I went an installed redis manually. But now I am getting other errors. Here is the log -
Ensuring we have the latest version of cinderella installed
A first time install takes about 45 minutes on a modern machine
You need to upgrade rubygems to 1.7.2
Cinderella installed successfully
/Library/Ruby/Site/1.8/rubygems/dependency.rb:247:in to_specs': Could not find cinderella (>= 0) amongst [rack-1.3.5, rack-protection-1.1.4, rake-0.8.7, rake-0.8.7, rubygems-update-1.8.13, sinatra-1.3.1, tilt-1.3.3] (Gem::LoadError) 	from /Library/Ruby/Site/1.8/rubygems/dependency.rb:256:in to_spec'
from /Library/Ruby/Site/1.8/rubygems.rb:1202:in `gem'
from /usr/bin/cinderella:18
Run started Sat 24 Dec 2011 22:55:50 EST
/Users/nate1/Developer/.rbenv/shims/ruby
/Users/nate1/Developer/.rbenv/shims/gem
INFO:  gem "cinderella" is not installed
Building native extensions.  This could take a while...
[Version 0.7.8] test suite cleanup (eliminated some race conditions related to queue.message_count)
Building native extensions.  This could take a while...
Successfully installed lunchy-0.4.0
Successfully installed mixlib-config-1.1.2
Successfully installed mixlib-cli-1.2.2
Successfully installed mixlib-log-1.3.0
Successfully installed mixlib-authentication-1.1.4
Successfully installed yajl-ruby-1.1.0
Successfully installed systemu-2.2.0
Successfully installed ohai-0.6.10
Successfully installed mime-types-1.17.2
Successfully installed rest-client-1.6.7
Successfully installed bunny-0.7.8
Successfully installed json-1.5.2
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed net-ssh-2.1.4
Successfully installed net-ssh-gateway-1.1.0
Successfully installed net-ssh-multi-1.1
Successfully installed erubis-2.7.0
Successfully installed moneta-0.6.0
Successfully installed highline-1.6.9
Successfully installed uuidtools-2.1.2
Successfully installed chef-0.10.4
Successfully installed cinderella-0.3.4
23 gems installed
Updating installed gems
Updating chef
Successfully installed chef-0.10.8
Updating json
Building native extensions.  This could take a while...
Successfully installed json-1.6.3
Updating lunchy
Successfully installed lunchy-0.5.0
Updating minitest
Successfully installed minitest-2.10.0
Updating net-ssh
Successfully installed net-ssh-2.2.1
Updating rake
Successfully installed rake-<IP_ADDRESS>
Updating rdoc
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install

= 1.9.2 : nothing to do! Yay!
Successfully installed rdoc-3.12
Updating systemu
Successfully installed systemu-2.4.2
Gems updated: chef, json, lunchy, minitest, net-ssh, rake, rdoc, systemu

Something went wrong with the install. :(
Dump this log into a gist and link to me to it
http://github.com/atmos/cinderella/issues
Sorry it failed. :(
Olgas-Macbook:~ nate1$
Olgas-Macbook:~ nate1$
Olgas-Macbook:~ nate1$
Olgas-Macbook:~ nate1$
Olgas-Macbook:~ nate1$
Olgas-Macbook:~ nate1$ sudo curl -L https://github.com/atmos/cinderella/raw/master/bootstrap.sh -o - | sh
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
102  1233  102  1233    0     0    258      0  0:00:04  0:00:04 --:--:--  1507
Ensuring we have the latest version of cinderella installed
A first time install takes about 45 minutes on a modern machine
You need to upgrade rubygems to 1.7.2
Cinderella installed successfully
/Library/Ruby/Site/1.8/rubygems/dependency.rb:247:in to_specs': Could not find cinderella (>= 0) amongst [rack-1.3.5, rack-protection-1.1.4, rake-0.8.7, rake-0.8.7, rubygems-update-1.8.13, sinatra-1.3.1, tilt-1.3.3] (Gem::LoadError) 	from /Library/Ruby/Site/1.8/rubygems/dependency.rb:256:in to_spec'
from /Library/Ruby/Site/1.8/rubygems.rb:1202:in `gem'
from /usr/bin/cinderella:18
Run started Sat 24 Dec 2011 22:55:50 EST
/Users/nate1/Developer/.rbenv/shims/ruby
/Users/nate1/Developer/.rbenv/shims/gem
INFO:  gem "cinderella" is not installed
Building native extensions.  This could take a while...
[Version 0.7.8] test suite cleanup (eliminated some race conditions related to queue.message_count)
Building native extensions.  This could take a while...
Successfully installed lunchy-0.4.0
Successfully installed mixlib-config-1.1.2
Successfully installed mixlib-cli-1.2.2
Successfully installed mixlib-log-1.3.0
Successfully installed mixlib-authentication-1.1.4
Successfully installed yajl-ruby-1.1.0
Successfully installed systemu-2.2.0
Successfully installed ohai-0.6.10
Successfully installed mime-types-1.17.2
Successfully installed rest-client-1.6.7
Successfully installed bunny-0.7.8
Successfully installed json-1.5.2
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed net-ssh-2.1.4
Successfully installed net-ssh-gateway-1.1.0
Successfully installed net-ssh-multi-1.1
Successfully installed erubis-2.7.0
Successfully installed moneta-0.6.0
Successfully installed highline-1.6.9
Successfully installed uuidtools-2.1.2
Successfully installed chef-0.10.4
Successfully installed cinderella-0.3.4
23 gems installed
Updating installed gems
Updating chef
Successfully installed chef-0.10.8
Updating json
Building native extensions.  This could take a while...
Successfully installed json-1.6.3
Updating lunchy
Successfully installed lunchy-0.5.0
Updating minitest
Successfully installed minitest-2.10.0
Updating net-ssh
Successfully installed net-ssh-2.2.1
Updating rake
Successfully installed rake-<IP_ADDRESS>
Updating rdoc
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install

= 1.9.2 : nothing to do! Yay!
Successfully installed rdoc-3.12
Updating systemu
Successfully installed systemu-2.4.2
Gems updated: chef, json, lunchy, minitest, net-ssh, rake, rdoc, systemu
Run started Sat 24 Dec 2011 23:01:58 EST
/Users/nate1/Developer/.rbenv/shims/ruby
/Users/nate1/Developer/.rbenv/shims/gem
Removing cinderella
Successfully uninstalled cinderella-0.3.4
Successfully installed cinderella-0.3.4
1 gem installed
Updating installed gems
Nothing to update

Something went wrong with the install. :(
Dump this log into a gist and link to me to it
http://github.com/atmos/cinderella/issues
Sorry it failed. :(
Olgas-Macbook:~ nate1$

OK thanks.


fix(epochs): fix timestamp tags in epoch APIs

Codecov Report
Attention: Patch coverage is 11.11111% with 24 lines in your changes missing coverage. Please review.

Project coverage is 51.66%. Comparing base (4ef25ec) to head (aa6ae41).
Report is 2 commits behind head on alpha.

Files
Patch %
Lines

src/common/io.ts
0.00%
24 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha     #141      +/-   ##
==========================================
- Coverage   52.14%   51.66%   -0.49%
==========================================
  Files          29       29
  Lines        1070     1084      +14
  Branches      206      209       +3
==========================================
+ Hits          558      560       +2
- Misses        488      505      +17
+ Partials       24       19       -5

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:tada: This PR is included in version 1.2.0-alpha.19 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


setup r750 configs to match the r650s

While r750 are more of a storage class machine they can be used as a substitute for an r650
Proc and Memory specs on these two machine types are the same
r750s have 4 1.5T nvme so they can do 2nd disk like the r650s
Only caveat is if doing ACM precaching for upgrades, you'll need to pair two of the r750s nvme drives together to present 3T of space to match the r650s

I considered that. I'm not sure how often someone will be using acm-deploy-load to do upgrade testing. I wonder if the effort of adding it to hv-setup-disk2 would be worth it or not.

Understood, do you have a list of commands or instructions on what was done so in the event we need to reproduce it, it would  be captured somewhere, whether in this GH PR or elsewhere?

Yup, sure do. Any opinion on where to document this?

Yup, sure do. Any opinion on where to document this?

Lets start with here, if we find a better place, we can also add it there?

This assumes that hv-setup-disk2 has already setup nvme0n1 as disk2
unmount existing disk2 if it's  mounted
umount /mnt/disk2
remove existing nmve PVs
pvremove /dev/nvme0n1
pvremove /dev/nvme1n1
pvremove /dev/nvme2n1
pvremove /dev/nvme3n1
wipe first two nvme drives
wipefs /dev/nvme0n1
wipefs /dev/nvme1n1
add first two nvme drives to lvm as PVs
pvcreate  -f /dev/nvme0n1
pvcreate  -f /dev/nvme1n1
create VG from created PVs
vgcreate nvme /dev/nvme0n1 /dev/nvme1n1
create LV from VG
lvcreate -y -l 100%VG -n disk2 nvme'
use sed to replace nvme0n1 with the LVM path
sed -i "s/nvme0n1p1/mapper/nvme-disk2/" /etc/fstab
create the file system, reload the systemctl and mount the disk
mkfs.xfs -f /dev/mapper/nvme-disk2
systemctl daemon-reload
mount /mnt/disk2'
recreate the libvirt/images dir that hv-setup-disk2 created
mkdir -p /mnt/disk2/libvirt/images/
If you re-run hv-setup-disk2 this configuration will be modified
here are a handful of ansible commands to do this on all your 750s in your inventory
time ansible -i ansible/inventory/cloudXX.local 'r750' --forks 20 -m shell -a 'umount /mnt/disk2; pvremove /dev/nvme0n1; pvremove /dev/nvme1n1; pvremove /dev/nvme2n1; pvremove /dev/nvme3n1'
time ansible -i ansible/inventory/cloudXX.local 'r750' --forks 20 -m shell -a 'wipefs /dev/nvme0n1 && wipefs /dev/nvme1n1'
time ansible -i ansible/inventory/cloudXX.local 'r750' --forks 20 -m shell -a 'pvcreate  -f /dev/nvme0n1 && pvcreate  -f /dev/nvme1n1 && vgcreate nvme /dev/nvme0n1 /dev/nvme1n1'
time ansible -i ansible/inventory/cloudXX.local 'r750' --forks 20 -m shell -a 'lvcreate -y -l 100%VG -n disk2 nvme'
time ansible -i ansible/inventory/cloudXX.local 'r750' --forks 20 -m shell -a 'sed -i "s/nvme0n1p1/mapper/nvme-disk2/" /etc/fstab'
time ansible -i ansible/inventory/cloudXX.local 'r750' --forks 20 -m shell -a 'mkfs.xfs -f /dev/mapper/nvme-disk2 && systemctl daemon-reload && mount /mnt/disk2'
time ansible -i ansible/inventory/cloudXX.local 'r750' --forks 20 -m shell -a 'mkdir -p /mnt/disk2/libvirt/images/'