Change init for KeDei 3.5" 480x320 V6.3 2018/4/9

Messed up the last one and caused it to close.  Oops.
This is same as prior one.
#71

Thanks for the PR, much appreciated. I'll keep this around for a bit before landing, until I find a spot to be able to test this against the KeDei display I have. The original code was implemented via reverse engineering to be bit to bit compatible with the protocol that original driver was sending, so needs a bit of testing to verify if the new code works for both my and your displays, or if there will be a need to have two init sequence options.

juj: i believe this is now in good state. wanna give it a try on your device? check if i have broken any other touch screen variants?

Very impressive work! Unfortunately due to logistics reasons I don't currently have access to any of my Pis to test. Saw you comment on the other issue thread, I hope there are some people there who find interest to try it out.

Hi @kpishere, I'm trying to build your fork on my rpi for a touchscreen based on Waveshare 3.5" 480x320 ILI9486 display (-DWAVESHARE35B_ILI9486=ON). Unfortunately the build is broken:
pi@raspberrypi3A:~/fbcp-ili9341/build $ cmake -DWAVESHARE35B_ILI9486=ON -DSPI_BUS_CLOCK_DIVISOR=24 -DARMV8A=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Doing a Release build
-- Board revision: 9020e0
CMake Warning at CMakeLists.txt:40 (message):
  The board revision of this hardware is not known.  Please add detection to
  this board in CMakeLists.txt.  (proceeding to compile against a generic
  multicore CPU)

-- Enabling optimization flags that target ARMv8-A instruction set (Pi 2B >= rev. 1.2, 3B, 3B+, CM3 or CM3 lite)
-- Enabling fbcp-ili9341 backlight control
-- Scaling source image to view. If the HDMI resolution does not match the SPI display resolution, this will produce blurriness. Match the HDMI display resolution with the SPI resolution in /boot/config.txt to get crisp pixel perfect rendering, or alternatively pass -DDISPLAY_CROPPED_INSTEAD_OF_SCALING=ON to crop instead of scale if you want to view the center of the screen pixel perfect when HDMI and SPI resolutions do not match.
-- Ignoring aspect ratio when scaling source image to the SPI display (Pass -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=OFF to preserve aspect ratio)
-- SPI_BUS_CLOCK_DIVISOR set to 24. Try setting this to a higher value (must be an even number) if this causes problems. Display update speed = core_freq/divisor. (on Pi3B, by default core_freq=400). A safe starting default value may be -DSPI_BUS_CLOCK_DIVISOR=40
-- USE_DMA_TRANSFERS enabled, this improves performance. Try running CMake with -DUSE_DMA_TRANSFERS=OFF it this causes problems, or try adjusting the DMA channels to use with -DDMA_TX_CHANNEL=<num> -DDMA_RX_CHANNEL=<num>.
-- Targeting WaveShare 3.5 inch (B) display with ILI9486
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/fbcp-ili9341/build
pi@raspberrypi3A:~/fbcp-ili9341/build $ make -j
Scanning dependencies of target fbcp-ili9341
[  5%] Building CXX object CMakeFiles/fbcp-ili9341.dir/diff.cpp.o
[ 10%] Building CXX object CMakeFiles/fbcp-ili9341.dir/display.cpp.o
[ 15%] Building CXX object CMakeFiles/fbcp-ili9341.dir/XPT2046.cpp.o
[ 20%] Building CXX object CMakeFiles/fbcp-ili9341.dir/dma.cpp.o
[ 25%] Building CXX object CMakeFiles/fbcp-ili9341.dir/fbcp-ili9341.cpp.o
[ 30%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9486.cpp.o
[ 55%] Building CXX object CMakeFiles/fbcp-ili9341.dir/hx8357d.cpp.o
[ 55%] Building CXX object CMakeFiles/fbcp-ili9341.dir/gpu.cpp.o
[ 55%] Building CXX object CMakeFiles/fbcp-ili9341.dir/keyboard.cpp.o
[ 55%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9341.cpp.o
[ 55%] Building CXX object CMakeFiles/fbcp-ili9341.dir/st7735r.cpp.o
[ 60%] Building CXX object CMakeFiles/fbcp-ili9341.dir/spi.cpp.o
[ 65%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mz61581.cpp.o
[ 70%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ssd1351.cpp.o
[ 75%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mpi3501.cpp.o
[ 80%] Building CXX object CMakeFiles/fbcp-ili9341.dir/statistics.cpp.o
[ 85%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mem_alloc.cpp.o
[ 90%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mailbox.cpp.o
[ 95%] Building CXX object CMakeFiles/fbcp-ili9341.dir/text.cpp.o
/home/pi/fbcp-ili9341/dma.cpp:129:0: warning: "VIRT_TO_BUS" redefined
 #define VIRT_TO_BUS(block, x) ((uintptr_t)(x) - (uintptr_t)((block).virtualAddr) + (block).busAddress)

In file included from /home/pi/fbcp-ili9341/dma.cpp:8:0:
/home/pi/fbcp-ili9341/spi_kernel.h:7:0: note: this is the location of the previous definition
 #define VIRT_TO_BUS(ptr) ((uintptr_t)(ptr) | 0xC0000000U)

In file included from /home/pi/fbcp-ili9341/spi_kernel.h:3:0,
                 from /home/pi/fbcp-ili9341/dma.cpp:8:
/home/pi/fbcp-ili9341/spi.h:50:12: error: ?DMAControlBlock? does not name a type
   volatile DMAControlBlock cb[2];
            ^~~~~~~~~~~~~~~
/home/pi/fbcp-ili9341/dma.cpp: In function ?int InitDMA()?:
/home/pi/fbcp-ili9341/dma.cpp:218:56: error: ?bcm2835? was not declared in this scope
   dma0 = (volatile DMAChannelRegisterFile*)((uintptr_t)bcm2835 + BCM2835_DMA0_OFFSET);
                                                        ^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:243:47: error: ?SHARED_MEMORY_SIZE? was not declared in this scope
   dmaSourceBuffer = AllocateUncachedGpuMemory(SHARED_MEMORY_SIZE*2, "DMA source data");
                                               ^~~~~~~~~~~~~~~~~~
/home/pi/fbcp-ili9341/dma.cpp: In function ?void DumpDMAState()?:
/home/pi/fbcp-ili9341/dma.cpp:352:13: error: ?spi? was not declared in this scope
   DumpSPICS(spi->cs);
             ^~~
/home/pi/fbcp-ili9341/dma.cpp:352:20: error: ?DumpSPICS? was not declared in this scope
   DumpSPICS(spi->cs);
                    ^
/home/pi/fbcp-ili9341/dma.cpp: In function ?void WaitForDMAFinished()?:
/home/pi/fbcp-ili9341/dma.cpp:375:22: error: ?tick? was not declared in this scope
   uint64_t t0 = tick();
                      ^
/home/pi/fbcp-ili9341/dma.cpp:378:15: error: ?usleep? was not declared in this scope
     usleep(100);
               ^
/home/pi/fbcp-ili9341/dma.cpp:390:15: error: ?usleep? was not declared in this scope
     usleep(100);
               ^
/home/pi/fbcp-ili9341/dma.cpp: In function ?void SPIDMATransfer(SPITask*)?:
/home/pi/fbcp-ili9341/dma.cpp:677:3: error: ?spi? was not declared in this scope
   spi->cs = BCM2835_SPI0_CS_DMAEN | BCM2835_SPI0_CS_CLEAR | DISPLAY_SPI_DRIVE_SETTINGS;
   ^~~
/home/pi/fbcp-ili9341/dma.cpp:677:61: error: ?DISPLAY_SPI_DRIVE_SETTINGS? was not declared in this scope
   spi->cs = BCM2835_SPI0_CS_DMAEN | BCM2835_SPI0_CS_CLEAR | DISPLAY_SPI_DRIVE_SETTINGS;
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:678:30: error: invalid use of incomplete type ?SPITask {aka struct SPITask}?
   uint32_t *headerAddr = task->DmaSpiHeaderAddress();
                              ^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:0:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ?SPITask {aka struct SPITask}?
 typedef struct SPITask SPITask;
                ^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:679:72: error: invalid use of incomplete type ?SPITask {aka struct SPITask}?
   *headerAddr = BCM2835_SPI0_CS_TA | DISPLAY_SPI_DRIVE_SETTINGS | (task->PayloadSize() << 16); // The first four bytes written to the SPI data register control the DLEN and CS,CPOL,CPHA settings.
                                                                        ^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:0:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ?SPITask {aka struct SPITask}?
 typedef struct SPITask SPITask;
                ^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:685:55: error: invalid use of incomplete type ?SPITask {aka struct SPITask}?
   memcpy(dmaSourceBuffer.virtualAddr, headerAddr, task->PayloadSize() + 4);
                                                       ^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:0:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ?SPITask {aka struct SPITask}?
 typedef struct SPITask SPITask;
                ^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:692:19: error: invalid use of incomplete type ?SPITask {aka struct SPITask}?
   txcb->len = task->PayloadSize() + 4;
                   ^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:0:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ?SPITask {aka struct SPITask}?
 typedef struct SPITask SPITask;
                ^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:703:19: error: invalid use of incomplete type ?SPITask {aka struct SPITask}?
   rxcb->len = task->PayloadSize();
                   ^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:0:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ?SPITask {aka struct SPITask}?
 typedef struct SPITask SPITask;
                ^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:715:33: error: invalid use of incomplete type ?SPITask {aka struct SPITask}?
   double pendingTaskUSecs = task->PayloadSize() * spiUsecsPerByte;
                                 ^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:0:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ?SPITask {aka struct SPITask}?
 typedef struct SPITask SPITask;
                ^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:717:31: error: ?usleep? was not declared in this scope
     usleep(pendingTaskUSecs-70);
                               ^
/home/pi/fbcp-ili9341/dma.cpp:719:32: error: ?tick? was not declared in this scope
   uint64_t dmaTaskStart = tick();
                                ^
CMakeFiles/fbcp-ili9341.dir/build.make:134: set di istruzioni per l'obiettivo "CMakeFiles/fbcp-ili9341.dir/dma.cpp.o" non riuscito
make[2]: *** [CMakeFiles/fbcp-ili9341.dir/dma.cpp.o] Errore 1
make[2]: *** Attesa per i processi non terminati....
CMakeFiles/Makefile2:67: set di istruzioni per l'obiettivo "CMakeFiles/fbcp-ili9341.dir/all" non riuscito
make[1]: *** [CMakeFiles/fbcp-ili9341.dir/all] Errore 2
Makefile:83: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2

At the moment I'm going to fork your repo and trying to add touch support to my display variant since it has the same touch controller as your screen.

I've made some changes in my fork https://github.com/neuromancer85/fbcp-ili9341/tree/ili9486_touch_support.
At the moment fbcp-ili9341 builds and runs again, I can see the desktop on the display!
However the touch support is still not working... I'll try to poke around with the code later.

@neuromancer85 yeah, touch sensing is only active right now when the display is being updated.  this is no good for gui displays that mostly are still.  I'm trying to find the the spot where the program sleeps .. you'd think it is not that hard but I'm really having an issue with it.  My build parameters are
cmake -DSPI_BUS_CLOCK_DIVISOR=12 -DKEDEI_V63_MPI3501=ON -DDISPLAY_ROTATE_180_DEGREES=ON -DSTATISTICS=0 ..
for my display.  I have a timer that polls the touch display driver and this works OK, but I need to activate/deactivate the timer at the correct points so that it does not interfere when the display is being written to.
I'll check in what I have and maybe you can look too?  Currently, I've got a bunch of printf() statements in it to just get sense of where it is.

Actually ... resorting to good'ol 'strace'. .. yielded some clues .. there is a non-blocking read somewhere that it is in ...
read(5, "52926\n", 21)                  = 6
lseek(5, 0, SEEK_SET)                   = 0
read(5, "52926\n", 21)                  = 6
lseek(5, 0, SEEK_SET)                   = 0
read(5, "52926\n", 21)                  = 6
lseek(5, 0, SEEK_SET)                   = 0
futex(0xb4aaa00c, FUTEX_WAKE, 1)        = 0
read(5, "52926\n", 21)                  = 6
lseek(5, 0, SEEK_SET)                   = 0
read(5, "52926\n", 21)                  = 6
lseek(5, 0, SEEK_SET)                   = 0
read(5, "52926\n", 21)                  = 6
lseek(5, 0, SEEK_SET)                   = 0
read(5, "52926\n", 21)                  = 6
lseek(5, 0, SEEK_SET)                   = 0
...

Device 5 is ... open("/proc/device-tree/soc/ranges", O_RDONLY|O_LARGEFILE) = 5. whatever that is ...

Ah, after more testing today ... it isn't so much where to start/stop timer trigger event to poll touch display device.  It is more simple/complex.  Just inserting a poll event in the main loop.  However, the poll event, when executed outside of the SPI communication is messing up the state of the display.  Getting white screen on display BUT driver running nicely (can tell by my test display program) and touch events recorded.  Likely have to bust out the scope some more and/or go over the datasheet some more to figure out how to query touch display without disturbing the lcd display when not reading/writing to SPI bus with video data.  I believe this is pretty much what @juj recommended.

I'm trying to find the the spot where the program sleeps .. you'd think it is not that hard but I'm really having an issue with it.

there is a non-blocking read somewhere that it is in ...
read(5, "52926\n", 21) = 6
lseek(5, 0, SEEK_SET) = 0

Was this nonblocking read observed with -DSTATISTICS=1/2 enabled? This kind of repeating device file read should be due to some nonessential/auxiliary operation from the display pixel updating itself, for example by polling CPU temps or clock speeds in statistics, or by the feature that polls for keyboard activity to find when to put the display to sleep.

futex(0xb4aaa00c, FUTEX_WAKE, 1) = 0

This futex wake is due to the interplay between main thread <-> GPU thread and/or main thread <-> SPI thread. To summarize the operation, there are three threads in play:

GPU thread: this periodically polls frames down from DispmanX GPU memory and when a new frame is found, it wakes the main thread if it was sleeping, so it will start the update cycle for the next frame. GPU thread improves performance on multi-core Pis at expense of CPU usage, but can be disabled, in which case main thread performs the role that the GPU thread would have done.
main thread: it performs diffing of pixels between previous and current frames, and for all new pixels, it submits SPI update tasks in a work queue to the SPI thread.
SPI thread: this continuously consumes task items from the SPI work queue and pushes them to the actual SPI bus (via DMA or via CPU).

When the SPI work queue is finished that there are no outstanding pixels to update, the SPI thread goes to sleep (at https://github.com/juj/fbcp-ili9341/blob/0b46b04f1d05a5f5088e750bfde28b2099b8da7d/spi.cpp#L479). This sleep is awoken by the main thread after it has produced new items to the SPI work queue, starting at https://github.com/juj/fbcp-ili9341/blob/0b46b04f1d05a5f5088e750bfde28b2099b8da7d/fbcp-ili9341.cpp#L514, which leads to the actual wake operation being performed at https://github.com/juj/fbcp-ili9341/blob/0b46b04f1d05a5f5088e750bfde28b2099b8da7d/spi.h#L375)
If the touch device will function just by submitting no-op commands to the display, then perhaps the main thread should periodically CommitTask() empty no-op tasks for the SPI thread to process. It would probably amount to changing the timeout value at https://github.com/juj/fbcp-ili9341/blob/0b46b04f1d05a5f5088e750bfde28b2099b8da7d/fbcp-ili9341.cpp#L179 from "sleep indefinitely until new GPU frame arrives" to a "sleep until new GPU frame arrives, but at most X msecs", and then somewhere down below in the loop, have a counter that keeps checking how much time has elapsed since anything was sent over to the SPI bus, and if it's been long enough and there are no real pixel tasks to send, instead pump the SPI bus with a dummy no-op task.
Not sure if that will be enough - not completely familiar with the touch details, but hope that might help in the research in more detail!

@neuromancer85 I see the display you are working with.  I'm not familiar with it.  I can tell you for a long time in testing, I used a test drawing program that caused continuous screen refreshes and ran a tail command on the touch screen output fifo location (ex: "tail -f /tmp/TCfifo &").  Touch the screen when it is being drawn on and you'd see the output. Note I'm using a Pi Zero here.  Also, running the kernel loadable module under the kernel folder.  should look like this with 'lsmod' command.
Module                  Size  Used by
bcm2835_spi_display     3928  0
This kernel module listens for the touch interrupt and posts info in /sys/tft/...

@juj : Thanks for the guidance!  Working on it, it is becoming clear.

@juj, thanks much for your help. Dropped the extra timer idea and just put no-ops in main loop.  Only tested on Pi Zero where there are only two threads.  Other displays will have to add macros for their no-ops commands.

+1 on hoping to see this merge... let me know if I can help w/ testing it

@juj  Ok, so only thing left to do for touch support with this driver is to have the tcCalib Utillity delete the config file, restart graphics driver, write the new calibration parameters, and restart the driver again to load the values.

@juj Alas, I think this driver is done.  The calibration Utillity nicely updates driver config file for calibration parameters on touch screen.  Note that I've also update the use of SIGUSR1 .. it is now used as a signal to re-load calibration settings.  At some point, if other drivers are using this touch feature, it may make sense to move some of the init() code somewhere else but for now.  This is 99.99% done.  The one thing I have yet to figure out is the darn codes for turning off the backlight!  So annoying, may have to figure out how to probe for values on the display (you can read register settings via SPI commands) and/or do some scope traces with the a vendor driver that does turn off backlight correctly.

@Juj I'm throwing in the towel on this one.  I can't slow down the binary drivers provided by Kedei, my scope isn't fast enough (200Mhz) to get a clear profile of the signals and my sampling depth is small.  Unless somebody else can provide a sampling with a signal analyzer from a driver that actually turns off the backlight, I'm done with this.  I'm simply going to leave display on all the time and black-out the display during inactive times -- it will be on all the time.  Clearly no good for battery applications but oh well, moving on with my project.  It has been fun getting into the nitty gritty of displays ... once you learn one, the others are all very similar in this small-display space.

Neat work on this one! I hope people find it useful. There is unfortunately trouble to merge this, because the code has an incompatible LGPL license (https://github.com/juj/fbcp-ili9341/pull/76/files#diff-cef9e6445e53afd359ed1bcfe1ad3cddR10). Absolutely great to have this project for people who need touch as well, and do not have any limitations on choosing a license.

Hmm.  Good point @juj   I'll ask Markus what he thinks.
ref: https://github.com/Links2004/XPT2046/issues/3

Hi,
looks like a interesting project you are running here.
I am fine to re license my code under MIT for this Project.
I changed the license and created a PR:
https://github.com/kpishere/fbcp-ili9341/pull/1

@kpishere looks like there are conflicts ?

Hello, thank you a lot for all your contribution. I'm currently trying to run this pull request but got errors when sudo make -j
I have a waveshare 3.5 inch display model B rev2 (https://www.waveshare.com/product/3.5inch-rpi-lcd-b.htm)
Here is what I did on my Rpi4 (4GB of ram):
git fetch origin pull/76/head:pr-76
git checkout pr-76
cd ./fbcp-ili9341
mkdir build
cd build
sudo cmake -DSPI_BUS_CLOCK_DIVISOR=50 -DWAVESHARE35B_ILI9486=ON -DDISPLAY_INVERT_COLORS=ON -DUSE_DMA_TRANSFERS=ON -DSTATISTICS=0 -DDMA_TX_CHANNEL=4 -DDMA_RX_CHANNEL=5 ..
sudo make -j
And it fails..
`
Scanning dependencies of target fbcp-ili9341
[  4%] Building CXX object CMakeFiles/fbcp-ili9341.dir/display.cpp.o
[  9%] Building CXX object CMakeFiles/fbcp-ili9341.dir/fbcp-ili9341.cpp.o
[ 14%] Building CXX object CMakeFiles/fbcp-ili9341.dir/calibrate.cpp.o
[ 19%] Building CXX object CMakeFiles/fbcp-ili9341.dir/diff.cpp.o
[ 23%] Building CXX object CMakeFiles/fbcp-ili9341.dir/XPT2046.cpp.o
[ 28%] Building CXX object CMakeFiles/fbcp-ili9341.dir/gpu.cpp.o
[ 33%] Building CXX object CMakeFiles/fbcp-ili9341.dir/dma.cpp.o
[ 38%] Building CXX object CMakeFiles/fbcp-ili9341.dir/hx8357d.cpp.o
[ 42%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9486.cpp.o
[ 47%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9341.cpp.o
[ 52%] Building CXX object CMakeFiles/fbcp-ili9341.dir/keyboard.cpp.o
[ 57%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mem_alloc.cpp.o
[ 61%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mailbox.cpp.o
[ 66%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mpi3501.cpp.o
[ 71%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mz61581.cpp.o
/home/pi/fbcp-ili9341/dma.cpp:129: warning: "VIRT_TO_BUS" redefined
#define VIRT_TO_BUS(block, x) ((uintptr_t)(x) - (uintptr_t)((block).virtualAddr) + (block).busAddress)
In file included from /home/pi/fbcp-ili9341/dma.cpp:8:
/home/pi/fbcp-ili9341/spi_kernel.h:7: note: this is the location of the previous definition
#define VIRT_TO_BUS(ptr) ((uintptr_t)(ptr) | 0xC0000000U)
[ 76%] Building CXX object CMakeFiles/fbcp-ili9341.dir/spi.cpp.o
[ 80%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ssd1351.cpp.o
[ 85%] Building CXX object CMakeFiles/fbcp-ili9341.dir/statistics.cpp.o
[ 90%] Building CXX object CMakeFiles/fbcp-ili9341.dir/st7735r.cpp.o
[ 95%] Building CXX object CMakeFiles/fbcp-ili9341.dir/text.cpp.o
In file included from /home/pi/fbcp-ili9341/spi_kernel.h:3,
from /home/pi/fbcp-ili9341/dma.cpp:8:
/home/pi/fbcp-ili9341/spi.h:50:12: error: ‘DMAControlBlock’ does not name a type
volatile DMAControlBlock cb[2];
^~~~~~~~~~~~~~~
/home/pi/fbcp-ili9341/dma.cpp: In function ‘int InitDMA()’:
/home/pi/fbcp-ili9341/dma.cpp:218:56: error: ‘bcm2835’ was not declared in this scope
dma0 = (volatile DMAChannelRegisterFile*)((uintptr_t)bcm2835 + BCM2835_DMA0_OFFSET);
^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:243:47: error: ‘SHARED_MEMORY_SIZE’ was not declared in this scope
dmaSourceBuffer = AllocateUncachedGpuMemory(SHARED_MEMORY_SIZE2, "DMA source data");
^~~~~~~~~~~~~~~~~~
/home/pi/fbcp-ili9341/dma.cpp: In function ‘void DumpDMAState()’:
/home/pi/fbcp-ili9341/dma.cpp:352:13: error: ‘spi’ was not declared in this scope
DumpSPICS(spi->cs);
^~~
/home/pi/fbcp-ili9341/dma.cpp:352:3: error: ‘DumpSPICS’ was not declared in this scope
DumpSPICS(spi->cs);
^~~~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:352:3: note: suggested alternative: ‘DumpCS’
DumpSPICS(spi->cs);
^~~~~~~~~
DumpCS
/home/pi/fbcp-ili9341/dma.cpp: In function ‘void WaitForDMAFinished()’:
/home/pi/fbcp-ili9341/dma.cpp:375:17: error: ‘tick’ was not declared in this scope
uint64_t t0 = tick();
^~~~
/home/pi/fbcp-ili9341/dma.cpp:378:5: error: ‘usleep’ was not declared in this scope
usleep(100);
^~~~~~
/home/pi/fbcp-ili9341/statistics.cpp: In function ‘int InitStatistics()’:
/home/pi/fbcp-ili9341/statistics.cpp:290:23: warning: no return statement in function returning non-void [-Wreturn-type]
int InitStatistics() {}
^
/home/pi/fbcp-ili9341/dma.cpp:378:5: note: suggested alternative: ‘fseek’
usleep(100);
^~~~~~
fseek
/home/pi/fbcp-ili9341/dma.cpp:390:5: error: ‘usleep’ was not declared in this scope
usleep(100);
^~~~~~
/home/pi/fbcp-ili9341/dma.cpp:390:5: note: suggested alternative: ‘fseek’
usleep(100);
^~~~~~
fseek
/home/pi/fbcp-ili9341/dma.cpp: In function ‘void SPIDMATransfer(SPITask)’:
/home/pi/fbcp-ili9341/dma.cpp:677:3: error: ‘spi’ was not declared in this scope
spi->cs = BCM2835_SPI0_CS_DMAEN | BCM2835_SPI0_CS_CLEAR | DISPLAY_SPI_DRIVE_SETTINGS;
^~~
/home/pi/fbcp-ili9341/dma.cpp:677:61: error: ‘DISPLAY_SPI_DRIVE_SETTINGS’ was not declared in this scope
spi->cs = BCM2835_SPI0_CS_DMAEN | BCM2835_SPI0_CS_CLEAR | DISPLAY_SPI_DRIVE_SETTINGS;
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:678:30: error: invalid use of incomplete type ‘SPITask’ {aka ‘struct SPITask’}
uint32_t *headerAddr = task->DmaSpiHeaderAddress();
^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ‘SPITask’ {aka ‘struct SPITask’}
typedef struct SPITask SPITask;
^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:679:72: error: invalid use of incomplete type ‘SPITask’ {aka ‘struct SPITask’}
*headerAddr = BCM2835_SPI0_CS_TA | DISPLAY_SPI_DRIVE_SETTINGS | (task->PayloadSize() << 16); // The first four bytes written to the SPI data register control the DLEN and CS,CPOL,CPHA settings.
^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ‘SPITask’ {aka ‘struct SPITask’}
typedef struct SPITask SPITask;
^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:685:55: error: invalid use of incomplete type ‘SPITask’ {aka ‘struct SPITask’}
memcpy(dmaSourceBuffer.virtualAddr, headerAddr, task->PayloadSize() + 4);
^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ‘SPITask’ {aka ‘struct SPITask’}
typedef struct SPITask SPITask;
^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:692:19: error: invalid use of incomplete type ‘SPITask’ {aka ‘struct SPITask’}
txcb->len = task->PayloadSize() + 4;
^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ‘SPITask’ {aka ‘struct SPITask’}
typedef struct SPITask SPITask;
^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:703:19: error: invalid use of incomplete type ‘SPITask’ {aka ‘struct SPITask’}
rxcb->len = task->PayloadSize();
^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ‘SPITask’ {aka ‘struct SPITask’}
typedef struct SPITask SPITask;
^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:715:33: error: invalid use of incomplete type ‘SPITask’ {aka ‘struct SPITask’}
double pendingTaskUSecs = task->PayloadSize() * spiUsecsPerByte;
^~
In file included from /home/pi/fbcp-ili9341/dma.cpp:14:
/home/pi/fbcp-ili9341/dma.h:133:16: note: forward declaration of ‘SPITask’ {aka ‘struct SPITask’}
typedef struct SPITask SPITask;
^~~~~~~
/home/pi/fbcp-ili9341/dma.cpp:717:5: error: ‘usleep’ was not declared in this scope
usleep(pendingTaskUSecs-70);
^~~~~~
/home/pi/fbcp-ili9341/dma.cpp:717:5: note: suggested alternative: ‘fseek’
usleep(pendingTaskUSecs-70);
^~~~~~
fseek
/home/pi/fbcp-ili9341/dma.cpp:719:27: error: ‘tick’ was not declared in this scope
uint64_t dmaTaskStart = tick();
^~~~
/home/pi/fbcp-ili9341/dma.cpp:719:27: note: suggested alternative: ‘txcb’
uint64_t dmaTaskStart = tick();
^~~~
txcb
make[2]: *** [CMakeFiles/fbcp-ili9341.dir/build.make:115: CMakeFiles/fbcp-ili9341.dir/dma.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/pi/fbcp-ili9341/spi.cpp: In function ‘void sendNoOpCommand()’:
/home/pi/fbcp-ili9341/spi.cpp:285:15: warning: unsigned conversion from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} changes value from ‘4352’ to ‘0’ [-Woverflow]
task->cmd = 0x00001100;
^~~~~~~~~~
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/fbcp-ili9341.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
`
Can someone help me out. I really would like to add touch feature!
Thank you in advance
Raphael Bridi

@tousisat have you had any luck, I am trying to get it to work on the same stuff as you.

@tousisat have you had any luck, I am trying to get it to work on the same stuff as you.

Unfortunaletly not, I ended up using the fbcp without touch :/

Hi Y'all, just an FYI, I 'trick' for getting around no activity in display and having responsiveness in the screen is to show a cursor in the application level.  Hence, you're doing screen updates as you touch.  @juj suggested sending a no-op command to display but that would interfere with optimization that he has worked so hard on.  I think I have a demo app in my branch that does this.  If you're wondering why demo works and your app does not, this would by why.  Need to draw the cursor in the application layer logic.

Will this be rebased any time soon?


Support more vscode code actions

Today we just support "refactor.extract.constant", but there are many more such as converting a lambda function to add braces etc

Once we have custom actions the user can add which every one of these they want
Related to #376


nomadCharts: add ellipsis

For downstream consumers who may define their own constants, they can be safely passed in and simply ignored.

For downstream consumers who may define their own constants, they can be safely passed in and simply ignored.

Yet, anyone who makes use of this, beware of: https://divnix.github.io/std/patterns/four-packaging-layers.html#scheduler-chart-layer:

Since these charts are the basis of various environments for development, staging and production, it is highly recommended to keep their function interface extremely mininmal and stable. This avoids the risk of inadvertely modifying production manifests (e.g. via a human error in the base charts) based on a development or staging requirement. In these cases, it is highly recommended to resort to data-oriented overlay mechanisms for ad-hoc modification. A purpose-built tool to do so (called data-merge) is already re-exported under std.dmerge for convenience. Those modifications should only propagate into a chart interface after stabilizing and after having successfully percolated through all existing environments first.

The thing is, if you pass in unknown arguments, there is no way the current job definition could even know about them, since it doesn't reference them anywhere. If these jobs are meant to be consumed by downstream projects, and precendent would have that they are (in Mamba), then I don't see any way around this.

then I don't see any way around this.

Absolutely. This was really just a cautionary note in this context...


Added ES client 8.x instrumentation

What does this PR do?

Checklist

[ ] This is an enhancement of existing features, or a new feature in existing plugins

[ ] I have updated CHANGELOG.asciidoc
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] Added an API method or config option? Document in which version this will be introduced
[ ] I have made corresponding changes to the documentation

[ ] This is a bugfix

[ ] I have updated CHANGELOG.asciidoc
[ ] I have added tests that would fail without this fix

[ ] This is a new plugin

[ ] I have updated CHANGELOG.asciidoc
[ ] My code follows the style guidelines of this project
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] I have updated supported-technologies.asciidoc
[ ] Added an API method or config option? Document in which version this will be introduced
[ ] Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.

[ ] This is something else

[ ] I have updated CHANGELOG.asciidoc

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Start Time: 2023-05-31T14:20:06.203+0000

Duration: 14 min 3 sec

:grey_exclamation: Flaky test report
No test was executed to be analysed.
:robot: GitHub comments
Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

/test : Re-trigger the build.

run benchmark tests : Run the benchmark tests.

run jdk compatibility tests : Run the JDK Compatibility tests.

run integration tests : Run the Agent Integration tests.

run end-to-end tests : Run the APM-ITs.

run windows tests : Build & tests on windows.

run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Newest updates:

ElasticsearchEndpointDefinition and ElasticsearchEndpointMap have been taken from the corresponding OTel plugin. Slight adjustments were needed due to Java 7 support
The plugin has been  adapted to correctly set the db.operation and db.elasticsearch.path_parts.* attributes
If the endpoint-name is available (ES 7.16+), the span name will be Elasticsearch: <endpointName>
If the endpoint-name is unavailable the span name will be Elasticsearch: <method> <http-path> (like it was before)

I had quiet a hard time grasping all the indirections with flags in the tests. That's why I decided to refactor them to use a validation builder (validateSpan()..check()), which should make the tests much easier to understand without having to jump to method definitions.


Fixes EOF detection logic to allow for partial reads of incomplete values when incremental reading is disabled.

Description of changes:
Before this change, the new reader implementation different slightly from the old implementation with regard to how it handled incomplete streams in non-continuable mode. This PR unifies the behavior between the old behavior, adds new unit tests to verify the behavior, and updates out-of-date documentation in IonReaderBuilder. I recommend that reviewers start by reviewing the tests.
I also slightly refactored the scalar parsing logic to eliminate some redundant checks, and to eliminate the need to override the scalar parsing methods in the top-level reader. This, combined with improved factoring of next() in the top-level reader, resulted in some minor performance improvements.
For example, for non-continuable reads:

I/O
Before
After
Units
% Change

buffer
281.316
278.448
ms/op
-1%

file
314.868
308.802
ms/op
-2%

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

This, combined with improved factoring of next() in the top-level reader, resulted in some minor performance improvements.

Nice! A percent here, a percent there... it all adds up.


azure_secret support expansion automatically

improve error handling with friendly message
also fix ruby 3 sytnax related issue fixes https://github.com/boltops-tools/terraspace/issues/184

Related:

https://github.com/boltops-tools/terraspace_plugin_aws/pull/17

Released in terraspace_plugin_azurerm 0.3.3


updated Adventure! Character sheet

Changes / Comments
fixed typos that were causing bug isues
also added assets for better security issues.
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[ ] Does the pull request title have the sheet name(s)? Include each sheet name.
[x ] Is this a bug fix?
[ ] Does this add functional enhancements (new features or extending existing features) ?
[x ] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[ ] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Greetings @Aragent
You are changing a lot of character sheets not mentioned in this pull requests. I recommend updating your fork.

Cassie

Thanks Cassie
I thought I had.
I did a pull request from roll20 to my Fork and merged
then did a pull request from My fork to roll20 it does say I am 6 comments ahead.
not sure why


Not working in MacOS 11.0 M1 chip

My MacBook Air (13 inch, 2020 M1 chip) MacOS 11.0
The message prompt says
You cannot use the Brooklyn screen saver with this version of macOS. Please contact the vendor to get a newer version of the screen saver.

This could be a generic error message, not directly related to the new M1 chip.
Please look into this issue.

It worked. Thanks @pedrommcarrasco


Pipetest: Create views in FAM

The views must be scaled to fit for all projects in project portal and include data as per requirement for cc apps.

@aman-riaz  this is done?


Layout issue on changing locale.

Framework Version: 0.1.3
Test Steps:

Select the attributes to used in layered navigation for one locale.
Change the locale from storefront.

Framework Version: 0.1.4
Fixed


Setting Spawn in MV overrides other spawn/home plugin

Hi
i spent hours working this out on our server
the issue is that when a new player joins the server they are sent to/near the MV spawn area.
we have set up a spawn and have a spawn/home plugin to handle all the /spawn related commands
when a player does /spawn tho they go to the one i set with the other plugin its just when a new player joins they dont
i was wondering if there is anyway to bypass the spawn feature on MV
hope this makes sense

i seems to be a bug/issue with dev build 420 and that  firstworldspawn change

I vote for this to be critical - we absolutely need this fixed soon. I had to pull a latest dev build because multiverse seemed to be ignoring perms or something. See the issue I'm about file...

This is not the same issue as #355, I will look into this one tonight. Thanks for the report.
I think there's a config variable to turn this off, but I don't remember it. Will investigage.
--FF


fix(deps): update module github.com/tubenhirn/dagger-ci-modules/v4 to v4.4.7

This PR contains the following updates:

Package
Type
Update
Change

github.com/tubenhirn/dagger-ci-modules/v4
require
patch
v4.4.6 -> v4.4.7

Release Notes

tubenhirn/dagger-ci-modules
v4.4.7
Compare Source
Bug Fixes

deps: update module dagger.io/dagger to v0.6.0 (0cfab23)
deps: update module github.com/tubenhirn/dagger-ci-modules/v4 to v4.4.6 (762be2e)

Miscellaneous Chores

deps: update goreleaser/goreleaser docker tag to v1.17.0 (aa5b71b)
deps: update goreleaser/goreleaser docker tag to v1.17.1 (c47bc74)
deps: update renovate/renovate docker tag to v35.31.5 (b96046f)
deps: update renovate/renovate docker tag to v35.40.3 (a0451e6)
deps: update renovate/renovate docker tag to v35.48.2 (b91c2ce)

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

:tada: This PR is included in version 4.4.8 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Treat Value::Null as Option::None

With any operation, Value::Null is converted into Value::Null anyway.
With the type conversion for insert, apply_text_affinity() need to support Value::Null case.

https://github.com/kawasin73/prsqlite/commit/d2c22f6ac3526d53dc9c7f84019e7f0b0d5d0733


Activity Events

I am trying to get all events that are being done manually I.e by human in our tenant, currently using activity events for this.
Do we have a wrapper for this API? And any particular functions that joins records on request id example dataflow refresh needs to be joined to see if successful and other details.

Can we use service principal account for this?On 11 Dec 2024, at 7:16 pm, m-kovalsky @.***> wrote:
Yes, https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.admin.html#sempy_labs.admin.list_activity_events
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>


interpret.augment

The OG interpret.augment making a reappearance after I figured out what it was, which is a slight generalization of interpret.write out of Writer.

@etorreborre Done :)

Thanks!


vue-tsc so slow

Every time I use vue-tsc --noEmit --skipLibCheck && vite --host to start my project，it takes me a long time.
Any tips to speed up?
Thank u for your reply!

The check time is related to the number of files that need to be checked, so please make sure that include only lists the files that need to be checked directly.
On the other hand, if you do not need to check the template, future versions will provide the option to disable it, which will reduce the check time by half. (Track #577)


Rustup

@bors r+

:pushpin: Commit 78a370f18ba9322ae6ef5ba8bcf7639d54ae740c has been approved by RalfJung
It is now in the queue for this repository.

:hourglass: Testing commit 78a370f18ba9322ae6ef5ba8bcf7639d54ae740c with merge f6314632eb7e3d63f1eb732042ab5907625b2511...

:sunny: Test successful - checks-actions
Approved by: RalfJung
Pushing f6314632eb7e3d63f1eb732042ab5907625b2511 to master...


az command to update ACIs created by virtual nodes to use specific log analytics workspace

Resource Provider
What is the Azure resource provider your feature is part of?
az command to update ACIs created by virtual nodes to use specific log analytics workspace
Description of Feature or Work Requested
Provide a brief description of the feature or work requested. A link to conceptual documentation may be helpful too.
az command to update ACIs created by virtual nodes to use specific log analytics workspace
Minimum API Version Required
What is the minimum API version of your service required to implement your feature?
Swagger Link
Provide a link to the location of your feature(s) in the REST API specs repo. This should be on the master branch
of the REST API specs repo.
Target Date
If you have a target date for release of this feature/work, please provide it. While we can't guarantee these dates,
it will help us prioritize your request against other requests.

@Dalubash Hello. Is monitor able to do this now?

@vaishnavk Anders indicated you were the owner for this area.

@porrascarlos802018
VN utilizes the same omsagent secret used by omsagents on AKS cluster’s nodes. and workspace information is passed along during the creation of pods on ACI side (that’s how the sidecar monitoring agents on ACI side gets configured).
I believe the main purpose is to get the logs collected and pushed to the same loganalytics workspace used by AKS cluster. So a short answer is that currently there is no commands to do so, as we don’t have any specific cli(s) for VN by itself (except installation ones), but one solution could be manipulating the spec of VN deployment/pod:
Setting the LOG_ANALYTICS_ID & *_KEY env vars to any different workspace.
However this means you'll need to maintain a custom installation. if VN is used through add-on, then AKS is the one that controls the deployed spec.
Is there a specific reason for having a separate workspace for VK-related pods ?

@porrascarlos802018 Apologies for the late reply. We are looking into this issue. We will update this thread once we have more details.
@macolso Could you please let us know if you have any update on this ?


One Click not loading

Trying to access One click action but it is not accessible it keeps on loading indefinitely

.

I noticed this behavior with this error when reviewing a work item from the top search or when looking at work item when not in the Project location where the work item resides.

If I go to the Project location and open the work item foir a query, backlog or kanban, the extension loads correctly. This might be a slightly different concern then the OP presented with the clocking, but end result is the same.


Group editing textbox's should have a margin between them

Describe the bug
The text fields inside the group editing pop-up's should have a margin between them.
To Reproduce
Steps to reproduce the behavior:

Go to admin panel
Click on permissions
Click on a group and attempt to edit
See error

Expected behavior
The text fields should have a margin between them to look separated.
Screenshots

Environment (please complete the following information):

OS: macOS Mojave
Browser: Firefox
Flarum Version 0.1.0-beta.7

This actually looks good and should not be changed.


Looking at the app rather than a package to determine the package's lifecycle type

Thanks for submitting an issue to cloud_controller_ng. We are always trying to improve! To help us, please fill out the following template.
Issue
While on CLI, this failed with the error message "Failed to get blobstore download url for package ...":
cf v3-create-app APP
cf v3-create-package APP -o cloudfoundry/diego-docker-app-custom
cf v3-stage APP --package-guid PACKAGE_GUID

The last command translates to a POST /v3/build -d { "package" :  "guid": GUID } }
Why does the default code in https://github.com/cloudfoundry/cloud_controller_ng/blob/56922f1f95cf382c235c1b1f0592f49610aba7fd/lib/cloud_controller/diego/lifecycles/lifecycle_provider.rb#L16 consult package.app.lifecycle_type and not package.type to
determine the type of the package when it was created?
Context
CLI XTP work on cf v3-stage
Steps to Reproduce
See above
Expected result
The thing stages
Current result
The thing doesn't stage -- details above
Possible Fix
Rework LifecycleProvider.provide to consult the current package if the message doesn't have a lifecycle field.

It seems like the app should be created with lifecycle docker for docker type package to work with it.


Feature request - Update counts based on applied filter

Expected Behavior
I've had a request from users that it would be nice if the counts on the left side respected any applied filter. i.e. if there are 5 alerts in total and I apply a filter which shows no alerts, it would be nice if the counts then show 0. Similar for clients too.
Current Behavior
Currently the counts don't change and always show the totals. I've found #435 which is in a similar vein.
Steps to Reproduce (for bugs)
See above.
Your Environment

Uchiwa version used: 0.25.3
Sensu version used: 0.29.0
Operating System and version (e.g. Ubuntu 14.04): CentOS/RHEL 7

@bodgit is this closed as in "wontfix" or "fixed" ?

Closed as "wontfix", given Uchiwa seems to be in maintenance mode now.

Thanks for the context.


PyCharm setup and package installation tutorial

Addresses #149.

Add instructions for opening a terminal before checking venv / running terminal commands
Add that you may have to go to "VSC" -> "get from version control" if there is no "git" in the menu

Add a step for opening the project if it doesn't open automatically.
Add that venv creation defaults should be fine, but users need to ensure Python v3.7+ is being used.
Add reminder of how users can tell their venv is running.


Add .prettierrc

Add a .prettierrc file to the project which makes sense

Defining Rules: define rules for how Prettier should format the code
Create Readme: on how to integrate with vs code

Duplicate of #266


check in of web storage overview page

This PR addresses issue: https://github.com/google/WebFundamentals/issues/3511

My page is flowing into full page width, I have a feeling due to the table. Any suggestions on how to squeeze it into the right column?

@petele Comments fixed, PTAL


mute_time_intervals in local time zone

Hello,
Does it make sense to add an ability to specify mute_time_intervals start and end times in the local time zone instead of UTC?
Let's imaging that we deploy the same service in 4 regions (US, EU, APAC, AE), And we have a maintenance job for this service starting at 1:00 AM local time.
Also, we have a local Prometheus/Alertmanager in every region.
With the current approach, we have to have 4 different configurations of Alertmanager depending on the target region because the start time will be different in UTC. Also, onboarding a new region will also require Alertmanager's config modification.
Having the configuration in local time will allow having the same config across all regions, and do not care about time conversion

Same here, we are in a time zone that changes year by year for daylight saving.
Only having UTC makes it much more annoying to maintain offhour schedules.
There must be a go library that handles timezones?! Is there interest from the devs for a pull request to implement this?

Hi @arnitolog,
Yes there is interest in this, and it was discussed when the feature was first merged. Initially the mute time interval specification allowed a timezone parameter as part of the definition, however this had some issues. The main problem is that Go does not use the Windows timezone database, so conversion between timezones simply does not work on Windows which is a platform that Prometheus supports.
That being said, Go is capable of retrieving the servers local time from Windows, just not arbitrarily converting between timezones on Windows. Perhaps the easiest option here is to just allow using the servers local timezone as a boolean flag in the timezone definition rather than allowing arbitrary timezones as a parameter.
I'm happy to add this if @simonpasquier or @w0rm are ok with the concept.

We could load the default timezone go provides if we also provide the user the ability to load a fresher timezone file.

I've just opened #2782 which allows a user-specified timezone in time interval definitions. For Windows, users can pass in 'Local' which works without a timezone database and (I would guess) addresses most users who just want to use a local time.

Anything specific that prevents #2782 from being merged?
It's a great feature to have for global companies, we eagerly wait for this merge :)

I'm also interested in seeing this merged because I'd also like to define time zone specific times.


bridge: bridge plugin should allow bridging a host iface

As a convenience feature, bridge plugin should have an ability to connect host interface to the bridge (when the bridge is created).
(moved from https://github.com/coreos/rkt/issues/477)

@steveeJ I wasn't thinking of transferring any attributes. This was for the cases where somebody wants to use a dedicated host interface for containers. Then this interface would not have an IP, it would just be bridged. It can be done now with the user first creating a bridge and then attaching the host interface to it. But since the "bridge" plugin can create the bridge, it might as well also have the ability to plug the host interface into it.

Since plugins have moved to a separate repository this issue is now misplaced.
Judging by the inactivity there's not much request for this feature either, therefore closing should be fine.


Remove todos from Storybook introduction page

The todos text can be removed in the introduction.md (see templates/theme-default/content/docs/introduction/_index.md).

hello can I work on this?

Of course! Have fun and let me know if you have any questions.

Fixed with #29. Thanks to @LewSplenda

You're welcome!


Added signed packages

#175

I'm not sure if any scripts need to be updated to get these to build and push to nuget.

I'd rather ship only a single version that is strong named. Also pointed here: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming

Interesting.  Releasing two packages (strong named, and not strong named) is such a common practice, I didn't realize it was against the official guidelines.
I'll update this PR.

I also do a single package for Jint and Esprima. It has always worked for me.
Thanks

Updated

I didn't understand why I was still seeing all previous commits in the PR, and thought squashing would resolve it. You actually targeted master and didn't realize. I canceled the build and force-pushed to revert the commit. I will try to re-apply it on dev.

Yeah, I noticed when I got the “merged to master” notification
From: Sébastien Ros<EMAIL_ADDRESS>Sent: Tuesday, July 30, 2019 3:36 PM
To: sebastienros/yessql<EMAIL_ADDRESS>Cc: Matt Barnes<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [sebastienros/yessql] Added signed packages (#176)
I didn't understand why I was still seeing all previous commits in the PR, and thought squashing would resolve it. You actually targeted master and didn't realize. I canceled the build and force-pushed to revert the commit. I will try to re-apply it on dev.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsebastienros%2Fyessql%2Fpull%2F176%3Femail_source%3Dnotifications%26email_token%3DAGEVP7BW5F6LKH7E6PN4SELQCC65FA5CNFSM4HEA5EQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3FQJYI%23issuecomment-516621537&data=02|01|mabarnes%40microsoft.com|519649a5ae19489064b908d7153e4d74|72f988bf86f141af91ab2d7cd011db47|1|0|637001229639725745&sdata=obrSQ4Vuw1%2B0HB%2BFiQTfkVyyhJT6AraLMw4cVfJoP18%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGEVP7B45HIZO3GVDSY23P3QCC65FANCNFSM4HEA5EQQ&data=02|01|mabarnes%40microsoft.com|519649a5ae19489064b908d7153e4d74|72f988bf86f141af91ab2d7cd011db47|1|0|637001229639735737&sdata=V01AqSeIDvlJmYdGmnqDYAWuqZdhgexKv%2BrYnV4PqC8%3D&reserved=0.


Responsive option does not work properly

When i use the following options
responsive:true,
maintainAspectRatio: false
the chart is growing more. just the width is working

A lot of that is being re-written, watch this space!


RE: MUMmer path issue

Hi,
I running finisherSc.py using the following command:
``
python $P2F/finisherSC.py -par 16 -l True  ../finisherSC   /home/msa/software/MUMmer3.23/
'''
The run keeps on throwing the following errors and eventually creates many core dump files. I am running it on a node with 900Gb and 16 processors.
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
ERROR: The following critical files could not be used
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
/Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc

Here is the nucmer.error file.
20220321|081252| 25126| ERROR: The following critical files could not be used
20220321|081252| 25126| /Users/kakitlam/Downloads/MUMmer3.23/aux_bin/postnuc
20220321|081252| 25126| /Users/kakitlam/Downloads/MUMmer3.23/aux_bin/prenuc
20220321|081252| 25126| /Users/kakitlam/Downloads/MUMmer3.23/mgaps
20220321|081252| 25126| /Users/kakitlam/Downloads/MUMmer3.23/mummer
20220321|081252| 25126| Check your paths and file permissions and try again
nucmer.error (END)

Any suggestions?
Thanks,

I recommend git clone FinisherSC from source and use absolute paths.
You may find this thread useful. https://github.com/kakitone/finishingTool/issues/19#issuecomment-425761372

Hey,
That's what I did. when I git clone it, it comes with a MUMmer3.23 folder. Do you suggest that I install MUMmer separately?
Thanks

Yes


Bump version to 1.4.3.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.93%. Comparing base (19fbd5a) to head (15a4eb9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #419   +/-   ##
=======================================
  Coverage   90.93%   90.93%
=======================================
  Files          54       54
  Lines        3906     3906
  Branches      360      360
=======================================
  Hits         3552     3552
  Misses        353      353
  Partials        1        1

Flag
Coverage Δ

unittests
90.93% <ø> (ø)

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

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


[ttx] use TTX mtime for 'modified' (default), optionally "--recalc-timestamp"

This was discussed some time ago both on the mailing list and here https://github.com/behdad/fonttools/issues/46.
With this patch, the default behavior would be that ttx uses the TTX file modified timestamp as the OpenType font's head.modified value.
Optionally, one can also have the timestamp recalculated based on the current time (though I don't see why one would like to do that...)
Since "-t" is taken, I used another long option, "--recalc-timestamp", i.e. the same used in pyftsubset.
Please, let me know if think the TTX file modification time shouldn't be the default.
Thanks.
C.

Can you please rebase this?  Thanks.

@behdad I rebased it, but I'm still using epoch_diff because I didn't understand your previous comment about "changing timestampNow to be more useful".
Do you mean something like that:
def timestampNow(current=None):
    if current is None:
        current = time.time()
    return int(current - epoch_diff)

Yes.  Something like that.  Or remove timestampNow() completely since it's rather minor.
If doing what you suggested, rename it to timestampFromEpoch(), possibly also a timestampToEpoch() for others to use in their code.

I left timestampNow and made a new function called timestampSinceEpoch (the use of from could cause ambiguity with the other timestampFromString function).
git grep also found a typo in encodingTools module (it's referred to as timeTools in the docstring, probably after copy/paste).

Thanks!


[FEATURE]  Python 3.11 will be supported?

Is your feature request related to a problem? Please describe.
Python 3.11 is now on security status (https://devguide.python.org/versions/), but it's not supported on this package.
Describe the solution you'd like
to add Python 3.11 on the Python target version.
Describe alternatives you've considered
Additional context
I would like you to know the schedule, if python 3.11 is supported.

@yukke42 did you actually try it? python 3.12 and the latest pytorch 2.5 works fine for me .. setup metadata might be out of date but everything works


Merging api-improvements -> master

This looks great! I love me some unit tests! I’m not at my computer now, but I’ll check and merge within the next few hours


Add support for response_format type json_schema

Feature Description
OpenAI has added support for structured outputs in its API: https://openai.com/index/introducing-structured-outputs-in-the-api/
Ultimately, this means the existing ChatResponseFormat is inadequate. While I could use the class to declare a type of json_schema in the response format, ultimately I won't be able to actually provide the schema in this fashion.
Problem it Solves
Adding support for this OpenAPI feature.
Proposed Solution
If you don't have time to fully implement this, a simpler and more flexible option would be as follows:

Make a parent interface for ChatResponseFormat that is implemented by the current class. Let's call it GenericChatResponseFormat, you can decide on a better name.
Make ChatCompletionRequest.responseFormat be of this new type (GenericChatResponseFormat).
Anyone can now implement their own response format.
Your code just serializes the format and provides it to OpenAI in the request.

Obviously a full implementation of the structured output would be desirable, but this may be an alternative approach to quickly achieve the same thing.
Additional Context
N/A

It would be nice to see this feature!

I can into the problem of not having it for a project of mine, so I forked it and added that capability:
https://github.com/NotAWiz4rd/openai-kotlin
It might break the ability to specify the other formats, so someone should do some testing (I don't have the time right now), which is why I'm putting it in here and not as a PR.
Anyone should feel free to use that as the basis for a PR for this feature though.

@aallam thanks so much for your hard work.  Please can you provide some guidance on how you want this feature implemented?
Please shout if you need any other support to maintain this valuable project.

@aallam
Thank you for maintaining this project.
Making JSON responses based on schemas would be essential for most applications to integrate LLM data into their features. Could you please look into integrating this feature?

+1 here

for everyone concerned, for now you can pass "tools" and force a model to use a particular tool, then parse the arguments of the tool

Temporary Solution for Structured Outputs in OpenAI Kotlin API
I made the temporary solution for this problem, check the code and try to use on your projects if you need it
Code solution
Here's a code what can be solve the problem, but it's ONLY TEMPORARY:
import com.aallam.openai.api.chat.*
import com.aallam.openai.api.model.ModelId
import com.aallam.openai.client.OpenAI
import io.ktor.client.request.*
import io.ktor.http.*
import io.ktor.http.content.*
import io.ktor.util.*
import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.*
import com.aallam.openai.api.chat.ChatResponseFormat as ChatResponseFormat

@Serializable
data class _JsonSchema @OptIn(ExperimentalSerializationApi::class) constructor(
    val description: String = "",
    val name: String,
    val schema: JsonObject,
    @EncodeDefault val strict: Boolean = true
)

fun JsonSchema(schema: String): ChatResponseFormat = ChatResponseFormat(type = "json_schema:$schema")

val client: OpenAI = OpenAI(
    token = "" // add your token here
) {
    install("fieldInterceptor") {
        requestPipeline.intercept(HttpRequestPipeline.Transform) { body ->
            if (body is OutgoingContent.ByteArrayContent) {
                // Process and modify the body with custom JSON schema
                val bodyText = String(body.bytes())
                val json = Json { prettyPrint = true }
                val (format, scheme, jsonObject) = json.parseToJsonElement(bodyText).jsonObject["response_format"]
                    ?.jsonObject?.let {
                        val data = it["type"]?.jsonPrimitive?.content!!
                        if (data.startsWith("json_schema")) {
                            val list = data.split(":", limit = 2)
                            Triple(list[0], list[1], it)
                        } else Triple(data, "", it)
                    } ?: Triple("", "", JsonObject(emptyMap()))

                if (format == "json_schema") {
                    val schema = json.encodeToJsonElement(
                        _JsonSchema(
                            name = "schema",
                            schema = json.parseToJsonElement(scheme).jsonObject,
                            strict = true
                        )
                    )
                    val modifiedJsonObject = JsonObject(
                        jsonObject + ("json_schema" to schema) + ("type" to JsonPrimitive("json_schema"))
                    )
                    val newJsonStr = JsonObject(
                        json.parseToJsonElement(bodyText).jsonObject + ("response_format" to Json.encodeToJsonElement(modifiedJsonObject))
                    ).toString()
                    proceedWith(TextContent(newJsonStr, ContentType.Application.Json))
                } else proceedWith(bodyText)
            }
        }
    }
}

suspend fun main() {
    val completion = client.chatCompletion(
        ChatCompletionRequest(
            model = ModelId("gpt-4o-mini"),
            messages = listOf(
                ChatMessage(
                    role = ChatRole.System,
                    content = "You are a bot"
                ),
                ChatMessage(
                    role = ChatRole.User,
                    content = "What is the meaning of life?"
                )
            ),
            responseFormat = JsonSchema("""
                {
                    "type": "object",
                    "properties": {
                        "choices": {
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "message": {
                                        "type": "object",
                                        "properties": {
                                            "content": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            """.trimIndent())
        )
    )

    val response = completion.choices[0].message.content
    println(response)
}

@mixeden Does this mean the functionality is effectively implemented via 'tools' - is it possible to elaborate and point to relevant API in this library? Thank you.

@chris-hatton so you can pass one single "tool" in a list of tools and force a model to pick this tool (and reply according to its schema).
toolChoice = ToolChoice.Mode("required"),
tools = listOf(Tool(function = yourFunction, type = ToolType.Function)),


Port Conflicts when create replication on single server

Here's part of my docker-compose.yaml:
mongo1:
  image: mongo:4.2
  network_mode: host
  command:  --port 27018 --bind_ip_all --replSet rs0
  environment:
    MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
    MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}

mongo2:
  image: mongo:4.2
  network_mode: host
  command:  --port 27019 --bind_ip_all --replSet rs0
  environment:
    MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
    MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}

mongo2:
  image: mongo:4.2
  network_mode: host
  command:  --port 27020 --bind_ip_all --replSet rs0
  environment:
    MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
    MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}

When I run docker-compose up, some times sevel container boot crash.
2020-11-26T07:59:10.584+0000 I  CONTROL  [initandlisten] options: { net: { bindIp: "<IP_ADDRESS>", port: 27017, tls: { mode: "disabled" } }, processManagement: { fork: true, pidFilePath: "/tmp/docker-entrypoint-temp-mongod.pid" }, security: { keyFile: "/mongodb.key" }, systemLog: { destination: "file", logAppend: true, path: "/proc/1/fd/1", quiet: true } }
2020-11-26T07:59:10.585+0000 E  STORAGE  [initandlisten] Failed to set up listener: SocketException: Address already in use
......
2020-11-26T07:59:10.585+0000 I  CONTROL  [initandlisten] shutting down with code:48

That's because container will create a mongod init process which always using port 27017. The init process will last for about one second. If sevel mongo container boot at the same time, Only one init process can bind 27017, other will crash.

If you're using the host network mode then you'll have to stagger the initializations or pre-initialize them as the entrypoint will temporarily be listening on 27017
https://github.com/docker-library/mongo/blob/da7e52df89c58b9e527e2cc3b0d4bd26e2679587/4.4/docker-entrypoint.sh#L240-L247
There was also a lengthy discussion on replicasets here https://github.com/docker-library/mongo/issues/246

There's a potential solution to this over in #443. :eyes:


Training Loss Abnormal

@andreasjansson @Wendison Hello, sorry to interrupt you!  I'm a rookie of voice model. I have trained the model in VCTK-Corpus-0.92.zip dataset by "python3 train.py use_CSMI=True use_CPMI=True use_PSMI=True" in NVIDIA V100S. But after 65 epochs, the train loss are as follows:

Could you give me some advice? Thank you very much!

Hi, I think the lld losses are normal, you could train for more epoches and listen to converted samples to verify whether your training is successful.

I don't remember the exact value of each loss, but I think your losses should be normal according to the losses shown in https://github.com/Wendison/VQMIVC/issues/15#issue-1025051309
Based on my experience, 500 epoches can obtain stable conversion results. After 500 epoches, I didn't see any noticable performance improvements. One direct way to select the suitable epoch is to listen to intermediate converted samples during training.


feat: support events with the same topic from different contracts

Currently, 2 events with the same topic but from different contracts are not handled correctly, the first register handler callback is called for both events. This commit makes the lookup key contains the both topic and contract address to correctly find the handler callback for the event.

so the idea is we will use the struct containing topic and address as a key for mapping for handling this logic.


Fullscreen mode exists in PWA but not TWA?

It seems quite weird to us that Status and Nav bar cannot be hidden in TWA activity even though it's a non-issue for a PWA installed app. Can anything be done about it?

This is being looked into and tracked in this Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=965329
We're going to add this to the sample, once Chrome supports it.

guys, you mean status bar or navigation one?
I installed my app from .apk file, it had only status bar.
Then I deployed it to Play Store, but it have status bar and navigation...
I uploaded assetlinks.json to website.

@happylolonly we mean the status bar
re: Navigation bar when downloading from Play, you may have the wrong Fingerprint in the assetlinks.json, if you enabled App Signing on Play (which is the default). You can install Peter's Asset Link Tool and use it to check for the correct assetlinks.json file.

I think you may have verified your app with your debug key, not your production key. Have a look at https://developers.google.com/web/updates/2019/08/twas-quickstart#a-note-on-signing-keys

thanks, I changed SHA in assetlinks.json, now without navigation;)

Closing the issue here, in favour of tracking in Chromium Bugs: https://bugs.chromium.org/p/chromium/issues/detail?id=965329

Is there any way on the earth to do this?

https://stackoverflow.com/questions/62797222/how-to-make-android-app-using-twa-full-screen-immersive


SD-card can become ejected in current configuration

During sea-trials SD-card got ejected, no messages could be stored to SD, but they were still successfully transmitted over the cellular. Maybe you have some ideas @BenoitLD for how to secure the SD-card during deployment.

Tough! I think some people 'heat gun glue' SD cards, but then of course harder to take out - maybe possible to read the SD card content through the Artemis instead of extracting the SD card, in which case it could be glued in position?

Yeah! I was sure there was filesystem issues, so it was a good kind of surprise. Reading through something kind of defies the purpose of making it easy to read in a computer: I'm thinking maybe a thin zip-tie... ?
It is (already) possible to read the storage data over cellular, e.g. if buoy drifts off-shore and pops up again somewhere with network cover.

Difficult if the buoy has been filled with water and the Artemis is a rusty
blob :D
On Mon, Jun 6, 2022 at 4:49 PM JR @.***> wrote:

Tja, how hard is it really, if let's say there is a tiny bit of firmware
that is waiting for USB-C connection and, if connected, 1) provides an
index of available records, 2) can dump individual records as CSV over USB?
I don't think plugging a USB cable and running a small python script
(possibly with a small GUI) would be much more hurdle than popping the SD
card and inserting it. But of course I may be wrong :) .
—
Reply to this email directly, view it on GitHub
https://github.com/gauteh/sfy/issues/61#issuecomment-1147533840, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAN36ZSGO4HINI7OFEQYGLVNYFXFANCNFSM5X7QZPLQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


🖐 502 bad gateway when running

What happened? What did you expect to happen?
Context
After migrating our jobs to github enterprise cloud one of our builds stopped working. We're still running inside the same self hosted runner, but now they run in an amazon account instead of our onprem server. I have no idea if that has anything to do with it but just in case.
I'm using dagger 0.8.7 with the python SDK, running the python script without the dagger cli.
Discussion
This error is what sticks out to me.
Server error '502 Bad Gateway' for url 'http://<IP_ADDRESS>:33571/query'

I assume dagger is trying to call itself during some step? I'm not sure what would cause this? maybe network latency? the 502 doesn't help give much detail here.
logs
Publishing image miniconda3:23.5.2-0-1.0.0 [<dagger.Container object at 0x7fe2f7d0ea40>]
  + Exception Group Traceback (most recent call last):
  |   File "/runner/_work/docker-images/docker-images/./build.py", line 136, in <module>
  |     anyio.run(build)
  |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_core/_eventloop.py", line 66, in run
  |     return async_backend.run(func, args, {}, backend_options)
  |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1968, in run
  |     return native_run(wrapper(), debug=debug)
  |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/runners.py", line 44, in run
  |     return loop.run_until_complete(main)
  |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
  |     return future.result()
  |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1961, in wrapper
  |     return await func(*args)
  |   File "/runner/_work/docker-images/docker-images/./build.py", line 91, in build
  |     async with anyio.create_task_group() as tg:
  |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 664, in __aexit__
  |     raise BaseExceptionGroup(
  | exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_transport/httpx.py", line 81, in _prepare_result
    |     result: Dict[str, Any] = response.json()
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/httpx/_models.py", line 756, in json
    |     return jsonlib.loads(self.text, **kwargs)
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/__init__.py", line 346, in loads
    |     return _default_decoder.decode(s)
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/decoder.py", line 337, in decode
    |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/decoder.py", line 355, in raw_decode
    |     raise JSONDecodeError("Expecting value", s, err.value) from None
    | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    |
    | During handling of the above exception, another exception occurred:
    |
    | Traceback (most recent call last):
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_transport/httpx.py", line 101, in _raise_response_error
    |     response.raise_for_status()
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/httpx/_models.py", line 749, in raise_for_status
    |     raise HTTPStatusError(message, request=request, response=self)
    | httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'http://<IP_ADDRESS>:33571/query'
    | For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
    |
    | The above exception was the direct cause of the following exception:
    |
    | Traceback (most recent call last):
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_core.py", line 149, in execute
    |     result = await self.conn.session.execute(query)
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_session.py", line 126, in execute
    |     return await (await self.get_session()).execute(query)
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/gql/client.py", line 1220, in execute
    |     result = await self._execute(
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/gql/client.py", line 1410, in _execute
    |     return await self._execute_with_retries(
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/backoff/_async.py", line 151, in retry
    |     ret = await target(*args, **kwargs)
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/gql/client.py", line 1383, in _execute_once
    |     answer = await super()._execute(
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/gql/client.py", line 1126, in _execute
    |     result = await asyncio.wait_for(
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
    |     return await fut
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_transport/httpx.py", line 181, in execute
    |     return self._prepare_result(response)
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_transport/httpx.py", line 84, in _prepare_result
    |     self._raise_response_error(response, "Not a JSON answer")
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_transport/httpx.py", line 103, in _raise_response_error
    |     raise TransportServerError(str(e), e.response.status_code) from e
    | gql.transport.exceptions.TransportServerError: Server error '502 Bad Gateway' for url 'http://<IP_ADDRESS>:33571/query'
    | For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
    |
    | The above exception was the direct cause of the following exception:
    |
    | Traceback (most recent call last):
    |   File "/runner/_work/docker-images/docker-images/./build.py", line 124, in build_image
    |     await img.publish(
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_guards.py", line 129, in async_wrapper
    |     return await bear(*args, **kwargs)
    |   File "<@beartype(dagger.client.gen.Container.publish) at 0x7fe2fd7779a0>", line 101, in publish
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/gen.py", line 735, in publish
    |     return await _ctx.execute(str)
    |   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/dagger/client/_core.py", line 170, in execute
    |     raise TransportError(msg) from e
    | dagger.TransportError: Unexpected response from engine: Server error '502 Bad Gateway' for url 'http://<IP_ADDRESS>:33571/query'
    | For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
    +------------------------------------

Agree the error here is not helpful. @helderco the codepaths where this could happen are here and here. Is it possible that the Python SDK could also print the body when this happens, just so there's a little more context? I'm also not at all sure how the other SDKs behave in this exact scenario, may not be solvable in the Python SDK specifically, just an initial thought.
@from-nibly One thing to clarify, have you setup a custom dagger engine separately and then having your Python code connect to that via an _EXPERIMENTAL_DAGGER_RUNNER_HOST env var? Or are you just executing the Python code directly without any custom engine?

If you don't know what I'm talking about, which is totally fine, then you are most likely following the default path of no custom engine 🙂

Depending on that, we can help debug further. Also, if the code you are running happens to be open source, a link to it and/or the setup code you use to run it could be helpful too.

I am not using a custom dagger buildkit engine just using the SDK raw.
My code is not open source but I can probably post the root build script. My script is like a docker mono repo build, it's just a bunch of company base images.
Feel free to gawk and point out ~idiotic~ less than ideal things I'm doing in the script (there are probably many, one of which I'm guessing is causing this nasty issue)
the idea is to initiate all the docker builds and just saturate the CPU and I/O as much as possible to try to keep things a little speedy (this thing runs a crudload of builds) at some point I'm going to look into deciding whether or not a build image is going to be new or not (or maybe caching stuff and sidestepping that problem).
#!/usr/bin/env python
# ... imports
builders = [
   #... various images we are building
]

parser = argparse.ArgumentParser(description="Build Docker images")
parser.add_argument("-l", "--load", action="store_true")
parser.add_argument("-p", "--publish", action="store_true")
parser.add_argument("-i", "--image", nargs="+", action="extend", dest="images")
parser.add_argument("-t", "--tag", nargs="+", action="extend", dest="tags")

default_variants = ["linux/amd64"]

def select_platform_variants(builder, args: Namespace) -> List[str]:
    variants = builder.variants or default_variants

    if len(variants) == 0:
        raise Exception(
            f"Variant selection {args.variants} results in 0 matching variants for image {builder.name}: {builder.variants} are available"
        )
    return variants

def shorten_variant(variant: str) -> str:
    return variant.split("/")[1]

async def build():
    args = parser.parse_args()

    async with dagger.Connection(dagger.Config(log_output=sys.stderr)) as client:
        for BuilderClass in builders:
            builder = BuilderClass(client)

            if (
                args.images is not None
                and len(args.images) > 0
                and not builder.name in args.images
            ):
                print(f"Skipping image not selected for build {builder.name}")
                continue

            images: Dict = defaultdict(list)

            variants = select_platform_variants(builder, args)

            for variant in variants:
                for tag in builder.tags:
                    if (
                        args.tags is not None
                        and len(args.tags) > 0
                        and not tag in args.tags
                    ):
                        continue

                    image = builder.image(tag, Platform(variant))
                    print(f"Building image with [tag: {tag}, variant: {variant}]")
                    images[tag].append({"image": image, "variant": variant})

            async with anyio.create_task_group() as tg:
                for tag, contexts in images.items():

                    async def build_image(builder, contexts, tag):
                        full_tag = f"{tag}-{builder.revision}"

                        if args.load:
                            path = f"/tmp/{builder.name}_{full_tag}.tar"

                            # Builds each platform variant as sep images because `docker load` does
                            # not support multi-platform images
                            for cntx in contexts:
                                await cntx.get("image").export(
                                    path, media_types=ImageMediaTypes.DockerMediaTypes
                                )

                                subprocess.run(
                                    [
                                        f"id=$(docker load --input {path} | "
                                        f"grep -o 'sha256.*' | "
                                        f"cut -f2- -d:) && "
                                        f"docker tag $id {builder.name}_{cntx.get('variant')}:{full_tag}"
                                    ],
                                    shell=True,
                                )

                        if args.publish:
                            img: Container = contexts[0].get("image")
                            # The remainder of the images are platform variants
                            rest = [c.get("image") for c in contexts[1:]]

                            print(f"Publishing image {builder.name}:{full_tag}", rest)
                            image_name = f"myrepo.example.com/{builder.name}:{full_tag}"
                            await img.publish(
                                image_name,
                                platform_variants=rest,
                                media_types=ImageMediaTypes.DockerMediaTypes,
                            )
                        for context in contexts:
                            await context.get("image").sync()

                    tg.start_soon(build_image, builder, contexts, tag)

if __name__ == "__main__":
    anyio.run(build)

Is there any more information I can provide that would help narrow down the issue?

The error shows that this is being triggered by the img.publish step. It's getting an unexpected response from your container registry.

The real error is json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) from the response on publish. Request was made but response is unexpected. After that there's a cascading failure. May be EOF there.

Will check on Monday. That's definitely possible.

Yeah this was definitely some weird networking issue. We can close this though I think there's still a vague suggestion to see if there's a way to clean up the error output.


ASP.Net Core 2.2 ILogger

After adding the Microsoft.Extensions.Logging.ApplicationInsights nuget and setting it up by following https://github.com/Microsoft/ApplicationInsights-dotnet-logging/tree/develop/src/ILogger#aspnet-core-application all logs now appears twice in application insights.
The issue is reproducible by creating an Asp.net core 2.2 api app and:

Adding the Microsoft.ApplicationInsights.AspNetCore nuget
Add UseApplicationInsights to Program.cs
Add Microsoft.Extensions.Logging.ApplicationInsights and configure it according to the docs.

What is the correct way of logging to application insights in asp.net core 2.2? Should I remove some other ILogger provider? Or do I lose some other logging if I do that (for example azure diagnostic logging, Microsoft.Extensions.Logging.AzureAppServices)?

Closing as no further action is needed for this repo.


remove ipython-genutils==0.2.0

https://github.com/ipython/ipython_genutils
Vestigial IPython utilities: DO NOT USE

Codecov Report

Merging #29 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master     #29   +/-   ##
======================================
  Coverage    66.9%   66.9%
======================================
  Files           7       7
  Lines         423     423
======================================
  Hits          283     283
  Misses        140     140

Continue to review full report at Codecov.

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


SIMD.js/Asm.js : Float32x4.min/Float32x4.max may produce wrong results if one of the first opnd's lanes is NaN

Two SIMD.js ops: Float32x4.min() and Float32x4.max() produce a wrong result when there's a NaN value in the first operand and a number in the second operand.
For example, if the following two SIMD values are compared both mix and max ops will set the fourth lane of the resulting value to 42.
    var one = SIMD.Float32x4(1, 1,  1, NaN)
    var two = SIMD.Float32x4(1, 1,  1,  42)

Here's a simple test case exposing this issue:
b208.js.txt
Expected Output:
testMin = SIMD.Float32x4(NaN, NaN, NaN, NaN)
testMax = SIMD.Float32x4(NaN, NaN, NaN, NaN)

Actual Output:
testMin = SIMD.Float32x4(NaN, NaN, NaN, 3.140000104904175)
testMax = SIMD.Float32x4(NaN, NaN, NaN, 3.140000104904175)

We will be submitting the fix shortly.


feat: modularize snap arhitecture

feat: PolygonID support (query, save, delete, credential offer, authorization request)
feat: use Ethers HDNodeWallet + entropy for key generation
feat: support network switching on dapp

Fixes #294

Closes #216

Fixes #167


Scaling Cantrips variant rule

Feeling productive this week! 😁
Added a system setting to enable scaling cantrips. Upon enabling, it'll edit the affected spells in the spells compendium.
I was going to add a check to startup to ensure the setting is being followed, but I was concerned about init times so I left that out, let me know if I should pursue that.
The formula used is admittedly a really ugly lookupRange one, I'll see if I can make a non-lookupRange one, but it'll still be a bit ugly. At least when expanded, a non-lookupRange formula won't show all the dice.
Also I just put the function in item.js, let me know if there's a better place for it.

Updated the formulas to be smaller, and not display every single dice used in it. Thanks to Iankid for help with this!

A nice idea, I have some changes I'd like to request.

The supported spells are currently hardcoded, as per the spells variable. This is not very nice. I'd like to see spells eligble for scaling to have a setting, so that we can apply it without having to do name comparisons.
You are making local changes to the compendium. While not intrinsically bad, I would rather have a solution where we update the actors' spell items instead.
After switching to updating actors instead of the compendium, you can do bulk update on an actor for all items in 1 update, rather than 1 update per item. This greatly improves the performance cost.
The "scalingCantrips" function name is not a proper function name. A proper function name should always include a verb. In this case "onScalingCantripsSettingChanged" would be a good function name. The "on" nomenclature indicates it is an event that responds to the setting "scaling cantrips" that is changing.
Variables that do not get changed should be marked const, instead of let.
Our code convention within the project uses semicolons at the end of each instruction.
There are some weird indentations according to the github preview. Please make sure the indentations are neat and correct. If this is a fault in the github preview you can ignore this. :)
There are some double newlines in some places.

Ok, re-implemented this feature with the requested changes.

The affected spells now have a scaling object on them, that stores two booleans, one for if they use the d3 formula, and one for the d6 formula.
The formulas of affected spells are automatically updated when dropped onto an actor from a compendium or the sidebar.
Upon changing the setting, a "migration" is performed on all actors to alter the formulas of affected spells if they have any.

I would suggest assuming CL as CR if that makes your life easier, but I don't know the NPCs that well to know all the exceptions that might apply.. Either way, great work, gonna merge this one in. :)