Raspberry Pi + Arduino + Pressure Sensors & Solenoid Valves, Nanpy Serial Timeout Error

Hello reader! My project involves filling a tank with a liquid called ox and fu. I have to make sure the pipelines and tank are at certain pressures. Using Nanpy, the Pi tells the Arduino to measure pressures and to trigger relays which triggers solenoid valves as well.
My problem is that my program runs well but will eventually result in a timeout error (error outlined in below).
I have a system consisting of the following:  Raspberry Pi 3 Model B, Arduino Mega 2560 Rev3, powered USB hub, Sainsmart 16-channel relay module, 5 pressure transducers and 7 solenoid valves. The setup is below.
The connections are as follows:
*Pi3 to powered USB hub to Mega via USB
*Mega connected to pressure transducers (pins A0 to A4) and relay board (pins 22 to 38)
*relay board connected to solenoids.
I apologize for the long code. I removed a lot of the other essential parts and reduced it to its absolute core.
Your Python code
from nanpy import (ArduinoApi, SerialManager)
from time import sleep
from timeit import default_timer as timer
import time
import datetime
import RPi.GPIO as GPIO
import sys
import numpy
import random
from threading import Thread
import curses

#connect to arduino
connection = SerialManager('/dev/ttyACM1', 9600)
a = ArduinoApi(connection=connection)

#start timer
start_time = time.time() #needed to measure runtime before program crashes :(

#curses options
stdscr = curses.initscr()#for the non-blocking text
#This allows the program to continue running after waiting for input for a limited amount of time.
stdscr.nodelay(1) #set input to non-blocking mode.
curses.noecho() #echoing of input characters is turned off
stdscr.nodelay(1) #set getch() non-blocking

#Used to zero the pressure transducers.
global zero_pt
zero_pt = False

# allows the safety solenoids to vent when tanks are overpressurized.
auto_safety = 'YES'

#arms the system and powers the solenoids
armed = 'OFF'

#setting the pinmodes for the Sainsmart 16 channel relay board.
a.pinMode(34, a.OUTPUT) #fuel safety solenoids
a.digitalWrite(34, 1)
a.pinMode(29, a.OUTPUT) #Oxygen safety solenoids
a.digitalWrite(29, 1)
sleep(0.1)
a.pinMode(31, a.OUTPUT) #Arming relay
a.digitalWrite(31, 1)
sleep(0.1)
a.pinMode(22, a.OUTPUT) # Normally CLOSED solenoid (Main Pressure Solenoid).
a.digitalWrite(22, 1)
sleep(0.1)
a.pinMode(23, a.OUTPUT) # Normally OPEN solenoid. (Venting Open Solenoid).
a.digitalWrite(23, 1)
sleep(0.1)
a.pinMode(24, a.OUTPUT) # Normally OPEN solenoid. (Venting Close Solenoid).
a.digitalWrite(24, 1)
sleep(0.1)
a.pinMode(25, a.OUTPUT) # Normally OPEN solenoid. (Mainshut Solenoid).
a.digitalWrite(25, 1)
sleep(0.1)
a.pinMode(26, a.OUTPUT) # Normally OPEN solenoid.  (Mainopen Solenoid).
a.digitalWrite(26, 1)
sleep(0.1)
a.pinMode(27, a.OUTPUT) #Oxygen Pump Heater
a.digitalWrite(27, 1)
sleep(0.1)
a.pinMode(28, a.OUTPUT) #Fuel Pump Heater
a.digitalWrite(28, 1)
sleep(0.1)
a.pinMode(30, a.OUTPUT)
a.digitalWrite(30, 1)
sleep(0.1)
a.pinMode(32, a.OUTPUT)
a.digitalWrite(32, 1)
sleep(0.1)
a.pinMode(33, a.OUTPUT)
a.digitalWrite(33, 1)
sleep(0.1)
sleep(0.1)
a.pinMode(35, a.OUTPUT)
a.digitalWrite(35, 1)
sleep(0.1)
a.pinMode(36, a.OUTPUT)
a.digitalWrite(36, 1)
sleep(0.1)
a.pinMode(37, a.OUTPUT)
a.digitalWrite(37, 1)

		#defining functions to operate solenoids
#Arduino digital channels 22 to 37. HIGH (1) in arduino corresponds to off on relay board
#Currently, the pressure transducers have not been zeroed.

#***Pressurization Functions***
def presson(): #The D2061-LN2-C203 is normally closed. 0Ard => 1Relay => Open Valve.
  press = 22
  a.digitalWrite(press,0) #Open Valve
##  print "Pressurizing ox and fu ON"
def pressoff(): #The D2061-LN2-C203 is normally closed. 1Ard => 0Relay => Closed Valve.
  press = 22
  a.digitalWrite(press,1) #Close Valve
##  print"Pressurizing ox and fu OFF"

#***Venting Functions***
def ventopenon(): #The A3021-T-T0-C203 is normally closed. 0Ard => 1Relay => Open Valve
  ventopen = 24
  a.digitalWrite(ventopen,0)
##  print "Venting ox and fu (Solenoid ON)"
def ventopenoff():
  ventopen = 24
  a.digitalWrite(ventopen,1)
##  print "Venting ox and fu (Solenoid OFF)"
def ventcloseon():
  ventclose = 23
  a.digitalWrite(ventclose,0)
##  print "NOT Venting ox and fu (Solenoid ON)"
def ventcloseoff():
  ventclose = 23
  a.digitalWrite(ventclose,1)
##  print "NOT Venting ox and fu (Solenoid OFF)"

#***Main Valve Functions***
def mainshuton():
  mainshut= 25
  a.digitalWrite(mainshut, 0)
##  print "main shut ON"
def mainshutoff():
  mainshut=25
  a.digitalWrite(mainshut, 1)
##  print "main shut OFF"
def mainopenon():
  mainopen = 26
  a.digitalWrite(mainopen, 0)
##  print "\n main open ON \n"
def mainopenoff():
  mainopen=26
  a.digitalWrite(mainopen, 1)
##  print "\n main open OFF \n"

## Safety solenoids
def oxsafetyoff():
  oxsafety=29
  a.digitalWrite(oxsafety,0) #close the LOX safety
##  print "\n Ox safety CLOSED"
def oxsafetyon():
  oxsafety=29
  a.digitalWrite(oxsafety,1) #open the LOX safety
##  print "\n Ox safety OPENED"

def fusafetyoff():
  fusafety=34
  a.digitalWrite(fusafety,0) #close the PP safety
##  print "\n PP safety CLOSED"
def fusafetyon():
  fusafety=34
  a.digitalWrite(fusafety,1) #open the PP safety
##  print "\n PP safety OPENED"

# Arming Relay
def armingon():
  arming = 31
  a.digitalWrite(arming, 0)
  global armed
  armed = 'ON'
##  print "arming on"
def armingoff():
  arming = 31
  a.digitalWrite(arming, 1)
  global armed
  armed = 'OFF'
##  print "arming off"

#Pump Heaters
def oxheateron():
  oxheater = 27
  a.digitalWrite(oxheater, 0)
##  print "Oxygen pump heater ON."
def oxheateroff():
  oxheater = 27
  a.digitalWrite(oxheater, 1)
##  print "Oxygen pump heater OFF."
def fuheateron():
  fuheater = 28
  a.digitalWrite(fuheater,0)
##  print "Fuel pump heater ON."
def fuheateroff():
  fuheater= 28
  a.digitalWrite(fuheater,1)
##  print "Fuel pump heater OFF"

#Combination functions.
def waitenter():
  try:
    input("Press Enter to Continue")
  except SyntaxError:
    pass

def mainopen(): #Opens the main valve
  mainopenon()
  sleep (1.0)
  mainopenoff()

def mainclose(): #Closes the main valves
  mainshuton()
  sleep(1.0)
  mainshutoff()

def ventopen(): #Opens the venting valves
  ventopenon()
  sleep(1.0)
  ventopenoff()
def ventclose():  #Closes the venting valves
  ventcloseon()
  sleep(1.0)
  ventcloseoff()

def purge():      #Purge the line
  purgeon()
  sleep(1)
  purgeoff()

def sleepmes(secs):
  print "wait ",
  print secs,
  print " seconds"
  sleep(secs)

#***Pressure Transducer Functions***
  #These are the functions needed to measure the pressure from the pressure transducer.
def press_volt(x, in_min, in_max, out_min, out_max):
  return (x - in_min)*(out_max-out_min)/(in_max-in_min)+out_min

def psiox_measure():
  PT1_slope = 23.81173
  PT1_intercept = -0.60496
  PT1_volt_correct = 0.0038
  PT1_voltage = press_volt(a.analogRead(0), 0.0, 1023.0, 0.0, 5.0)+PT1_volt_correct
  return PT1_voltage*PT1_slope+PT1_intercept # [psi] A0 pin, PT1
##  return PT1_voltage
##  return a.analogRead(0)

def psifu_measure():
  PT2_slope = 24.10409
  PT2_intercept = -0.95421
  PT2_volt_correct = 0.0186
  PT2_voltage = press_volt(a.analogRead(1), 0.0, 1023.0, 0.0, 5.0)+PT2_volt_correct
  return PT2_voltage*PT2_slope+PT2_intercept # [psi] A1 pin, PT2
##  return PT2_voltage
##  return a.analogRead(1)

def psiox_pump_measure():
  PT3_slope = 277.962127
  PT3_intercept = -130.83277
  PT3_volt_correct = 0.021531378
  PT3_voltage = press_volt(a.analogRead(2), 0.0, 1023.0, 0.0, 5.0)+PT3_volt_correct
  return PT3_voltage*PT3_slope+PT3_intercept # [psi] A2 pin, PT3
##  return PT3_voltage
##  return a.analogRead(2)

def psifu_pump_measure():
  PT4_slope = 281.237104
  PT4_intercept = -139.852626
  PT4_volt_correct = 0.015977517
  PT4_voltage = press_volt(a.analogRead(3), 0.0, 1023.0, 0.0, 5.0)+PT4_volt_correct
  return PT4_voltage*PT4_slope+PT4_intercept # [psi] A3 pin, PT4
##  return PT4_voltage
##  return a.analogRead(3)

def psichamb_measure():
  PT5_slope = 279.899666
  PT5_intercept = -136.618869
  PT5_volt_correct = 0.020039101
  PT5_voltage = press_volt(a.analogRead(4), 0.0, 1023.0, 0.0, 5.0)+PT5_volt_correct
  return PT5_voltage*PT5_slope+PT5_intercept # [psi] A4 pin, PT5
##  return PT5_voltage
##  return a.analogRead(4)

def timer(first_time):
  end_time = time.time()
  time_period = (end_time - first_time)/60 #time in minutes
  return time_period

# ------------------------MAIN FUNCTION===================

fopen = open('LogData'+str(time.strftime("%m%d%y%H%M")),'w') #will create new file named LogDataMMDDYYHHMM
fappend = open('LogData'+str(time.strftime("%m%d%y%H%M")),'a') #defines fappend to append data to log file
fname = 'LogData'+str(time.strftime("%m%d%y%H%M")) #static file name
print "Log file opened in ~/pi/Teststand: LogData"+str(time.strftime("%m%d%y%H%M"))
#write a header for each log entry
fappend.write('Log Data Date: ')
fappend.write(str(time.strftime("%c"))) #formatted time and date
fappend.write('\n')

print_once = True
try:
  while True:
    # Zero the pressure transducers or print the values as they are.
    if zero_pt == True:
      psiox = psiox_measure() - z_psiox
      psifu = psifu_measure() - z_psifu
      psioxpump = psiox_pump_measure() - z_psioxpump
      psifupump = psifu_pump_measure() - z_psifupump
      psichamb = psichamb_measure() - z_psichamb
    else:
      psiox = psiox_measure()
      psifu = psifu_measure()
      psioxpump = psiox_pump_measure()
      psifupump = psifu_pump_measure()
      psichamb = psichamb_measure()

    #calculate the elapsed time
    elapsed_time = timer(start_time)

    #Safety release valves.
    if auto_safety == 'YES':
      #Keep the valves open if tank is overpressurized
      if (psiox >= 50 and armed == 'ON') or (psifu >= 50 and armed == 'ON'):
        oxsafetyon()
        fusafetyon()
        sleep(0.1)
      #Keep the valves closed if tank is not overpressurized
      elif (psiox <= 50 and armed == 'ON') or (psifu <= 50 and armed == 'ON'):
        oxsafetyoff()
        fusafetyoff()
        sleep(0.1)
    elif auto_safety == 'NO':
      oxsafetyon()
      fusafetyon()

    stdscr.addstr(0,0, "%d oxtankpress[psi]" %int(psiox))
    stdscr.addstr(1,0, "%d futankpress[psi]" %int(psifu))
    stdscr.addstr(2,0, "%d oxpumppress[psi]" %int(psioxpump))
    stdscr.addstr(3,0, "%d fupumppress[psi]" %int(psifupump))
    stdscr.addstr(4,0, "%d psichambpress[psi]" %int(psichamb))
    stdscr.addstr(5,0, "%.2f time elapsed [min]" %elapsed_time)

    #Printing the pressure values
    if print_once == True:

      fappend.write(" oxtankpress[psi] \t  futankpress[psi] \t oxpumppress[psi] \
\t fupumppress[psi] \t psichambpress[psi] \t elapsed time[min]\n")
      print_once = False

    fappend.write(str(psiox))
    fappend.write(" \t\t ")
    fappend.write(str(psifu))
    fappend.write(" \t\t ")
    fappend.write(str(psioxpump))
    fappend.write(" \t\t ")
    fappend.write(str(psifupump))
    fappend.write(" \t ")
    fappend.write(str(psichamb))
    fappend.write(" \t ")
    fappend.write(str(elapsed_time))
    fappend.write(" \t ")

    #Print the Options menu
    (y_win, x_win) = stdscr.getmaxyx()
    mid_screen = int(x_win/2)
    stdscr.addstr(7, mid_screen-8, "***Main Menu***")
    stdscr.addstr(8, 0, "1=Armed \t 2=Unarmed \t 3=Open Vent \t 4=Close Vent")
    stdscr.addstr(9, 0, "5=Open Main \t 6=Close Main \t 7=Pressurization")
    stdscr.addstr(10,0, "8=Pressure Stopped\t 9=Ox/Fu Safety OPEN \t 10=Ox/Fu Safety CLOSED")
    stdscr.addstr(11,0, "11=Zero Pressures \t 12= Pump Heaters ON \t 13= Pump Heaters OFF")
    stdscr.addstr(12,0, "14= Auto Safety ON \t 15= Auto Safety OFF\t 16=")

    sleep(1)    #Wait to get command response
    cmd = stdscr.getstr()   #get the command response

    #Command option responses
    if cmd == '1':
      armingon()
      stdscr.addstr(15,0,"Arming ON                              ")
    elif cmd == '2':
      oxsafetyon()
      sleep(0.1)
      fusafetyon()
      armingoff()
      stdscr.addstr(15,0,"Arming OFF                             ")
    elif cmd == '3':
      ventopen()
      stdscr.addstr(15,0,"Vent OPEN                              ")
    elif cmd == '4':
      ventclose()
      stdscr.addstr(15,0,"Vent CLOSE                             ")
    elif cmd == '5':
      mainopen()
      stdscr.addstr(15,0,"Main OPEN                              ")
    elif cmd == '6':
      mainclose()
      stdscr.addstr(15,0,"Main CLOSED                            ")
    elif cmd == '7':
      presson()
      stdscr.addstr(15,0,"Pressurizing                           ")
    elif cmd == '8':
      pressoff()
      stdscr.addstr(15,0,"Pressured Stopped                      ")
    elif cmd == '9':
        oxsafetyon()
        sleep(0.1)
        fusafetyon()
        stdscr.addstr(15,0,"Ox/Fu Safety OPEN                    ")
    elif cmd == '10':
      if armed == 'ON':
        oxsafetyoff()
        sleep(0.1)
        fusafetyoff()
        stdscr.addstr(15,0,"Ox/Fu Safety CLOSED                  ")
      elif armed == 'OFF':
        stdscr.addstr(15,0, "Solenoids are not yet armed!        ")
    elif cmd == '11':
      zero_pt = True
      z_psiox = psiox_measure()
      z_psifu = psifu_measure()
      z_psioxpump = psiox_pump_measure()
      z_psifupump = psifu_pump_measure()
      z_psichamb = psichamb_measure()
      stdscr.addstr(15,0, "All Pressures Zeroed                  ")
    elif cmd == '12':
      oxheateron()
      fuheateron()
      stdscr.addstr(15,0, "Ox/Fu Pump Heater ON                  ")
    elif cmd == '13':
      oxheateroff()
      fuheateroff()
      stdscr.addstr(15,0, "Ox/Fu Pump Heater OFF                  ")
    elif cmd == '14':
      auto_safety = 'YES'
      stdscr.addstr(15,0, "Auto Safety ON                         ")
    elif cmd == '15':
      auto_safety = 'NO'
      stdscr.addstr(15,0, "Auto Safety OFF                        ")
    elif cmd == 'q':
      break

finally:
  pressoff()
  armingoff()
  curses.endwin()

Your log messages
File "10secfiretest_debug_RevD.py", line 472, in <module>
	pressoff()
File "10secfiretest_debug_RevD.py", line 130, in pressoff
 	a.digitalWrite(press,1) #Close Valve
File "/usr/local/lib/python2.7/dist-packages/nanpy/arduinoboard.py", line 125, in wrapper
 	return _call(cls_name, 0, call_pars, connection=connection)
File "/usr/local/lib/python2.7/dist-packages/nanpy/arduinoboard.py", line 47, in _call
 	ret = return_value(connection)
File "/usr/local/lib/python2.7/dist-packages/nanpy/arduinoboard.py", line 16, in return_value
 	return connection.readline().replace('\r\n', '')
File "/usr/local/lib/python2.7/dist-packages/nanpy/serialmanager.py", line 101, in readline
 	raise SerialManagerError('Serial timeout!')
nanpy.serialmanager.SerialManagerError: Serial timeout!
...

Your cfg.h
#define USE_Info                                    1
#pragma once

// only for ESP8266
#define USE_WIFI_CONNECTION                         0

// for WIFI connection
#define WIFI_SSID 		"***"
#define WIFI_PASSWORD 	"***"

// for serial connection
#define BAUDRATE 9600

// info about existence of other features
#define USE_Info                                    1

// definitions: MCU type, frequency, Arduino version,
// EEPROM size, RAM size, pin count, build time,..
#define USE_Define                                  1

// low level mapping of pins and ports
#define USE_ArduinoCore                             1

// read, write RAM
#define USE_RAM                                     1

// read, write EEPROM
#define USE_EEPROM                                  1

// read, write AVR registers
#define USE_Register                                0

// watchdog and reset
#define USE_Watchdog                                0

#define USE_Tone                                    0

#define USE_LiquidCrystal                           0

// I2C
#define USE_Wire                                    0

#define USE_Servo                                   0

#define USE_Stepper                                 0

// frequency counter,  USE_Tone should be off!
#define USE_Counter                                 0

///////////////////////////////////////////////////////////////////////
// external libraries should be installed for the following features:
///////////////////////////////////////////////////////////////////////

// https://github.com/PaulStoffregen/OneWire
#define USE_OneWire                                 0

// https://github.com/milesburton/Arduino-Temperature-Control-Library
#define USE_DallasTemperature                       0

#define USE_CapacitiveSensor                        0

// https://github.com/adafruit/DHT-sensor-library
#define USE_DHT                                     0

// https://bitbucket.org/fmalpartida/new-liquidcrystal
#define USE_LiquidCrystal_I2C                       0

// https://www.adafruit.com/products/1429
#define USE_TLC5947                                 0

As I have said before the program operates well. It shows the pressure readings in real time while giving me the option to input commands without an input block. I have noticed that when I adjust sleep() [the one before input options] by giving it 4 seconds the program is very stable and can run for an error without error but the time to accept the command is longer of course. When I decrease the value, the program has a higher tendency to fail early.
Currently, I am at a loss of what to do. I would very much appreciate any input any of you could give.
Thank you for your time.
Your hardware

Arduino board: Arduino Mega 2560
Additional hardware:  Raspberry Pi 3
Additional hardware:  Sainsmart 16 Channel Relay
Additional hardware:  5 Pressure Transducers
Additional hardware:  7 Valve Solenoids'

I know that this is an outdated topic but how did you fix it?


[BUG] With vertical pagination, it interferes with horizontal swipe in TabView on watchOS

Describe the bug
There is a problem on watchOS. If Pager is in TabView like in an example, then switching between tabs from left to right very often does not work. Probably Pager is blocking gestures horizontally somewhere.
To Reproduce

Download and unzip PagerInTabView.zip
Run project on simulator or watch2.
Try swiping left or right on a screen with vertical pagination (yellow or red background).
Horizontal swipe very often does not work.

Expected behavior
Stable operation of swipe left and right every time.
Screenshots / Videos
https://user-images.githubusercontent.com/49787488/162640669-19e93316-f19a-4a39-9f3b-d0fcc2086ca9.mov
Environment:

OS: watchOS 8
Device: any Apple Watch
SwiftUIPager version: 2.4.0

Additional context
Pay attention that on other screens where Pager is not used (green or blue background) horizontal swipe works in 100% of cases.

@andriy-appuchino apologies but I haven't had time to look at this and I don't think I will within the next days.
Some people have mentioned this a while ago, here are some hints that would solve this issue:

Try using pagingPriority(.simultaneous). This will allow the DragGesture inside Pager to propagate the touch event.
If this still doesn't have the desired effect, I'd suggest embedding the vertical Pager inside a horizontal Pager and deal with the page indicator yourself. The vertical Pager should use the modifier mentioned in the previous bullet

Hope that helps

Just using pagingPriority(.simultaneous) doesn't help.
I tried to use a horizontal Pager, but the problem is no less serious with it. If there are buttons on the page, then they are constantly accidentally pressed when swiping. Normally, if the beginning of the movement of the finger hits the button, then it should not trigger.

@fermoya do you know how to fix case 2?

@andriy-appuchino have you tried using onTapGesture or gesture(TapGesture().onEnded {}) instead of a Button? That could do the trick, I believe that if swiping, those gestures should get canceled and the callbacks should never be called. Same can't be said about Button, but it's just a guess

No, I haven’t, I don’t want to give up buttons so as not to lose their visual effects.
I was able to interrupt a button touch in during a swipe using .disabled(areControlsDisabled) and
.onDraggingBegan({
	 areControlsDisabled = true
})
.onDraggingEnded({
	 areControlsDisabled = false
})

Nevertheless, thanks for the help.
P.S. I recommend disabling digitalCrownRotation by default for the horizontal Pager, because it is very unusable.

Closing this as it's a similar problem as #153


Fix broken headings in Markdown files

GitHub changed the way Markdown headings are parsed, so this change fixes it.
See bryant1410/readmesfix for more information.
Tackles bryant1410/readmesfix#1

@bryant1410 thanks 👍


[website] vercel and markdoc setup

[ ] need to fix https://www.datathinking.org/university-of-tartu (table of contents)
[ ] need to add lecture recordings but only via email
[ ] need to add newsletter of homework instructions and writing to each lecture
[ ] need to translate jupyter notebooks at https://github.com/onefact/datathinking.org-codespace to markdown files using markdoc
[ ] need to add data.datathinking.org using https://github.com/onefact/aws-s3-bucket-browser

http://hn.premii.com/#/comments/34438115 - and https://codebraid.org/presentations/scipy2022/


Add datamigration/resource-manager/readme.typescript.md

Autogenerated

Automation for azure-sdk-for-python

Can one of the admins verify this patch?

Automation for azure-sdk-for-js
Nothing to generate for azure-sdk-for-js

Automation for azure-sdk-for-node

Automation for azure-sdk-for-ruby

Automation for azure-sdk-for-go


feat(cli): Add logging

@bartlomieju Can this be merged and publish please? Hidden compilations crash is a huge pain.


Improvise the landing page

In the landing page the background picture and label are not visible properly together. Need to change the design.

Hey, @Ritu01-git  This issue is similar to #60
Please msg there Thanks :)


Revamp port forwarding to support UDP

Fixes #366
Discussion - #2402
Revamps port forwarding to use existing GRPC communication.
Advantages

No SSH daemon (See Notes below)
No Subprocess for SSH
Faster (See performance below)
Ease of support for newer protocol (We do support UDP as well with this implementation)

Todo

[x] GRPC based tunnels
[x] TCP support
[x] UDP support
[x] Config to enable / disable this new port forwarding model
[x] Testing on MacOS
[ ] Testing on Linux
[ ] Testing on Windows

Performance
GRPC TCP - ~3.80 Gbits/sec
GRPC TCP Reverse - ~4.77 Gbits/sec
SSH TCP - ~3.38 Gbits/sec
SSH TCP Reverse - ~3.08 Gbits/sec
Notes

We will support only TCP and UDP via this approach. Unix and unixgram support socket to be added later as a separate PR
We support forwarding from host (Listen) -> guest (Dial). We don't support reverse forwarding host (Dial) -> guest (Listen) as of this PR. But can be extended and support it in a separate PR

Converting to draft as it needs some more changes related to handling of ports on host side

@lima-vm/maintainers
Do we need to back this feature on with a config in lima yaml ??
Just thinking because we are looking at this as a drop-in replacement. If we went with config we need to mark this experimental and later bring it to stable / default. Also it will pollute the yaml as well
One another idea is to back this with a ENV / start option

ENV

👍

Added a env and updated docs as well for this feature.
@lima-vm/maintainers
We are good to review this PR.
I have done decent amount of testing in macOS and a very basic test in linux. For performance tried with iperf3 for both tcp and udp.
Need some help to test in windows (Not sure if we even support port forwarding here, i think wsl takes care of it)

@lima-vm/maintainers Can we merge this?

@jandubois @afbjorklund Do you need more testers?

I'm sorry, I won't have time to test/review this until September. 😞

@balajiv113 I have been testing UDP port forwarding with some Docker Compose applications, and I may have found an issue.
After I first run docker compose up, any UDP ports that I choose to expose are reachable, as expected. However, I find that after I restart the application, those ports are not reachable anymore. This does not happen with TCP port forwarding. TCP ports that I expose in the container(s) are reachable even after restarting. The only way I was able to make the UDP ports for my Compose apps reachable again was to restart the Lima VM. However, the problem reappears when I restart the Compose app.
To test, I built Lima from your most recent commit in this PR at the time of writing this comment. I created a VM using the Docker template with the following command: limactl create --vm-type vz template://docker --name=default. Below is the docker-compose.yml for a simple Docker Compose application that demonstrates the issue:
services:
  iperf3-server:
    image: networkstatic/iperf3
    command: -s
    ports:
      - "5201:5201/udp"
      - "5201:5201/tcp"

To verify whether or not the iperf3-server container is listening on TCP port 5201 and UDP port 5201, I used sudo lsof -i TCP:5201 and sudo lsof -i UDP:5201, respectively. If it is listening on a port, the command should have output. If there is no output, then that means the service is not listening on the port. When I run the Compose app for the first time, I get output from both commands. After restarting the app, I only get output from the lsof command for the TCP port.
Although I was primarily using Docker Compose in my tests, it seems to affect Docker containers in general. If I start a container with a certain UDP port forwarded, then stop it, then that UDP port is not able to be exposed in subsequently created containers, until the Lima VM is restarted.
Would be curious to see if you or anyone else can reproduce this.
I am testing this on macOS Sonoma 14.5 on an Intel Mac. I am also able to test on Sonoma machine with Apple silicon.

@suhailskhan Thanks for trying it out.
Yes it is indeed a issue. It happens due to conn cache on guest side. On closing of listener its not cleared properly
Will fix and let you know

@suhailskhan Fixed it. It should work now

@balajiv113 Pulled, rebuilt, and tested. Works indeed!

Lint is failing

@AkihiroSuda Done. All Green


Allow server_default nullable: False to be optional in Pydnatic

Is your feature request related to a problem? Please describe.
When using server_default and nullable: False, the Pydantic model still requires this field even though it will be filled in by the server.
Describe the solution you'd like
There should be a way to allow this.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

It's because ormar is conflating what 'nullable' means. I want nullable: False to apply at the database level. I want the DB to enforce that the column X cannot be null. But from the pydantic side, I never want to pass it in because i want to use the server_default.

That is true - ormar combines those settings, but from the point of orm the conflicting options doesn't make sense:

there is no point in having an orm model that you cannot ever save (null field in pydantic and not nullable db field)
there is no point in having a nullable field if you always provide a value (required field in pydantic, and nullable column in db).

With fail early approach (zen of python :) )  the ormar/pydantic should be matching what you set on the database side.
When you provide a server_default parameter (that will be used only when you pass None for a given column/field) then your ddl schema will be modified to reflect this https://docs.sqlalchemy.org/en/14/core/defaults.html#server-invoked-ddl-explicit-default-expressions.
Now I know that what you request might be useful, probably a separate argument that by default takes the nullable parameter value but you can explicitly overwrite it.
As a workaround till then you can hack server_default functionality, that simply inserts the corresponding value into the ddl.
So if you construct you model like this:
class Song(ormar.Model):
    class Meta:
        tablename = "songs"
        metadata = metadata
        database = database

    id: int = ormar.Integer(primary_key=True)
    name: str = ormar.String(max_length=100, nullable=True, server_default=text("CURRENT_TIMESTAMP NOT NULL"))
    sort_order: int = ormar.Integer()

the corresponding ddl looks like this:
CREATE TABLE songs (
	id INTEGER NOT NULL,
	name VARCHAR(100) DEFAULT CURRENT_TIMESTAMP NOT NULL,
	sort_order INTEGER NOT NULL,
	PRIMARY KEY (id)
)

Note that nullable is explicitly set to True but column is still created as NOT NULL.

I have this model:
class Entry(Model):
    class Meta(BaseMeta):
        tablename = f'{DB_LEGACY_PREFIX}entry'

    id: int = Integer(primary_key=True)
    start_time: int = Integer(nullable=False, index=True, server_default=text("'0'"), comment='Unix timestamp')
    end_time: int = Integer(nullable=False, index=True, server_default=text("'0'"), comment='Unix timestamp')
    entry_type: int = Integer(nullable=False, server_default=text("'0'"))
    created_on: datetime = DateTime(name="timestamp",
                                    server_default=text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"))
    created_by: str = String(name="create_by", max_length=80, nullable=False, server_default=text("''"))
    modified_by: str = String(max_length=80, nullable=False, server_default=text("''"))
    name: str = String(max_length=80, nullable=False, server_default=text("''"))
    type: str = String(max_length=1, nullable=False, server_default=text("'E'"))
    description: str = String(max_length=1000, nullable=True)
    status: int = SmallInteger(nullable=False, server_default=text("'0'"))

and when I try to send request with body:
{
  "id": 0,
  "start_time":<PHONE_NUMBER>,
  "end_time":<PHONE_NUMBER>,
  "entry_type": 0,
  "name": "This is my test",
  "type": "M",
  "description": "Testttt",
  "status": 0,
}

I get validation errors:
{
  "detail": [
    {
      "loc": [
        "body",
        "created_by"
      ],
      "msg": "field required",
      "type": "value_error.missing"
    },
    {
      "loc": [
        "body",
        "modified_by"
      ],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}```

Why is this happening? I am using MySQL as a DB.

That's exactly what this issue is about.
Right now the same settings change both the SQL column as well as the pydantic field, so when you set nullable=False it means the column becomes not null and the pydantic field becomes required.
I will add sql_nulable argument that will allow overwriting this setting for the database column.

Thank you a bunch!! Any ETA or workaround?

That's exactly what this issue is about.
Right now the same settings change both the SQL column as well as the pydantic field, so when you set nullable=False it means the column becomes not null and the pydantic field becomes required.
I will add sql_nulable argument that will allow overwriting this setting for the database column.

Thank you a bunch!! Any ETA or workaround?

This is already done, pushed to branch add_index, waiting for some clarification on 2 more issues to check if I can fix them quickly before the next release.

Added in #346


If peer disconnects during boot, don't add to pool

What was wrong?
Fixes #1455
(Well, it doesn't fix the issue the way that 1455 originally asked to, but I would rather prevent the problem than do occasional cleanups after an unknown problem occurs)
How was it fixed?
Identify if a peer has disconnected during the boot up process, and if so, don't add it to the pool.
Cute Animal Picture

Looks good. I went ahead and merged it. Will put it to work real quick as the last thing I do before I go to bed.

Ok great! I'm pretty optimistic that solves the problem.
Looks like it was squash merged BTW

Looks like it was squash merged BTW

Rebase + merge. Sorry about that, it's my preferred way of managing git history. I need a chrome extension that gives me a huge warning when I try to do this on your PRs :sweat_smile:

@cburgdorf I've found that just letting the person (assuming it's part of our team) who opened the PR merge it allows for our individual preferences without needing extra process in place to agree on what the right way to merge things is.

@pipermerriam yes, that's the strategy that I (usually) go with. I just merged this because I really wanted to put it to work. Anyway I could have used the PR branch for that. Will refrain from doing that in the future!

I just merged this because I really wanted to put it to work.

Yup, totally the right decision at the time. I don't want to add roadblocks to anyone testing things out. It just means that before I delete my local branch, I feel compelled to double-check that the commit patch didn't change during merge. That little bit of extra work makes me whiny X)
It would be cool if git had a content-hash that ignored all metadata. Then, I could trivially check that somewhere in the master history, there is a content hash that matches the tip of my local branch. Is that a thing?

Yup, totally the right decision at the time. I don't want to add roadblocks to anyone testing things out.

To be honest, I could have as easily put the branch to work because my .git/config looks like this:
[remote "upstream"]
	url = https://github.com/ethereum/py-evm.git
	fetch = +refs/heads/*:refs/remotes/upstream/*
	fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*

This means, just running git fetch upstream pulls down all PRs so that one doesn't have to add individual remotes per contributor.
So I should just used the PR instead of merging and then putting master to work.

Is that a thing?

Unfortunately not afaik. The -x flag for git cherry-pick is the closest that I can think of but afaik a similar thing does not exist for rebase and even if it existed its nothing github exposes.

This means, just running git fetch upstream pulls down all PRs so that one doesn't have to add individual remotes per contributor.

Ah, that's a neat trick :+1:


53032 - Acount has been blocked due to Azure AD Identity Protection p…

…olicies
53032 - Acount has been blocked due to Azure AD Identity Protection policies

@PeterSelchDahl : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Webhook enhancements

Bundled to avoid merge conflicts
Subsumes #515 #516 #517:

Periodic cert reloading
Improved error reporting
Strict error handling

@khogeland can you address the remaining comments? It looks good otherwise.

@liyinan926 Addressed your above comments


feat(Tabs): allow custom className for <TabContent>

Closes IBM/carbon-components-react#1854
Related:
#1790
#1784
#1846
This PR exposes a tabContentClassName prop for the consumer to attach custom classNames to the tab content container element

@lovemecomputer @jnm2377 What do you think...? Thanks!

@jnm2377 Thank you for bringing this up! @emyarod Let's take a note, and discuss further on what we'd do with something like radioButtonWrapper - Created: #1863


Updated *.nix files

Description of changes

updated dependencies, forced enabled network manager

Things done

Built on platform(s)

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

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

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

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

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

[ ] Fits CONTRIBUTING.md.

@sagie-shamay
So, summary:

updated appropriate *.nix files, checked that it work well, tested with nixos 22.11 and 22.05
device posture feature that works - firewall, disk encryption, fetching last OS upgrade date doesn't implemented
autostart of client doesn't work and didn't work before(will pay attention on this, but as @tonyshkurenko said to me it was blocker from nixos side)
we can't merge this PR to master branch because  current twingate/default.nix contains link that refers to build of rc/nixos-support. So, we should release new version of twingate client, after that update link and sha to master

cc: @tonyshkurenko

New update. Quick approach to install twingate package without involving long nixos-rebuilt switch:

NIXPKGS_ALLOW_UNFREE=1 nix-build -E 'with import <nixpkgs> {}; callPackage /media/sf_alex/dev/twingate/nixpkgs/pkgs/applications/networking/twingate/default.nix {}'
sudo nix-env -i /nix/store/f47b3w6nrz8m176bxy8dga8js9xs4i0v-twingate-1.0.58	#last line of output nix-build


Bad use of flush interval

I saw the default buffer flush time as 1000ms and min as 10ms.
I also saw flink checkpointing every 100ms. Then data gets flushed with each checkpoint with flushOnCheckpoint
Flush is a protected method but looks like it was made accessible via reflection,
This is highly not recommended as the allowed minimum flush internal is 1second from Snowpipe Streaming. Reducing it below 1 second here will create inefficient micro-partitions.

Flush was used as a starter since streaming API documentation didn't suggest any official way of force flushing data (for checkpoint alignment). I had posted a question in the community to get ideas around a force flush, especially since close() is not documented as a way of flushing on demand either.
I do agree that rapid writes come with a cost, but that's also something that's going to be case-by-case. The ramifications of low flush time can be documented on the SnowflakeSinkBuilder as a way of educating about the side effects.

Flush happens automatically every 1 second. Close() is also not recommended as it is better to keep the channel active when there is a continuous stream of data. Opening and closing channels frequently is more taxing than keeping it open.
In the 2.0.4 release, we have since added a configuration for increasing the flush interval to be higher. But we do not support setting it to be lower than 1 second.


[Bug]: How to locate/decorate number variant in union?

Describe the bug
Say we have following spec and we want to add a better name for enum item 3, but the compile reports errors. Is this a bug?
import "@typespec/http";
import "@azure-tools/typespec-client-generator-core";

using TypeSpec.Http;
using Azure.ClientGenerator.Core;

union ExtensibleNumber {
  One: 1,
  Two: 2,
  3,
  int8,
}
model Foo {
  extensibleNumber: ExtensibleNumber;
}
op post(@body body: Foo): void;

@@clientName(ExtensibleNumber.One, "ItemOne");
@@clientName(ExtensibleNumber.Two, "ItemTwo");
@@clientName(ExtensibleNumber.`3`, "ItemThree");

Reproduction
playground
Checklist

[x] Follow our Code of Conduct
[x] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
[x] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
[x] The provided reproduction is a minimal reproducible example of the bug.

@markcowl  look for design issue on referencing union variants

@MaryGao  It is by design that union variants cannot be decorated, and so cannot be referenced in augment decorators.  The workaround would be to create a scalar type with the needed decoration and use that as the union variant. You can also use enums for these scenarios, as shown here


RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one.

when trying to finetune BLIP2 with caption_coco_ft.yaml, I got the following error:
  File "/data/a/bowenz/LAVIS/lavis/tasks/base_task.py", line 222, in _train_inner_loop
loss, loss_dict = self.train_step(model=model, samples=samples)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/a/bowenz/LAVIS/lavis/tasks/base_task.py", line 64, in train_step
output = model(samples)
             ^^^^^^^^^^^^^^
File "/data/a/bowenz/anaconda3/envs/lavis/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/a/bowenz/anaconda3/envs/lavis/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/a/bowenz/anaconda3/envs/lavis/lib/python3.11/site-packages/torch/nn/parallel/distributed.py", line 1515, in forward
inputs, kwargs = self._pre_forward(*inputs, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/a/bowenz/anaconda3/envs/lavis/lib/python3.11/site-packages/torch/nn/parallel/distributed.py", line 1409, in _pre_forward
    if torch.is_grad_enabled() and self.reducer._rebuild_buckets():
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one.  This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by passing the keyword argument `find_unused_parameters=True` to `torch.nn.parallel.DistributedDataParallel`, and by
making sure all `forward` function outputs participate in calculating loss.

And after setting find_unused_parameters=True and TORCH_DISTRIBUTED_DEBUG=DETAIL I got this traceback message:
RuntimeError: Expected to mark a variable ready only once. This error is caused by one of the following reasons: 1) Use of a module parameter outside the `forward` function. Please make sure model parameters are not shared across multiple concurrent forward-backward passes. or try to use _set_static_graph() as a workaround if this module graph does not change during training loop.2) Reused parameters in multiple reentrant backward passes. For example, if you use multiple `checkpoint` functions to wrap the same part of your model, it would result in the same set of parameters been used by different reentrant backward passes multiple times, and hence marking a variable ready multiple times. DDP does not support such use cases in default. You can try to use _set_static_graph() as a workaround if your module graph does not change over iterations.
Parameter at index 511 with name visual_encoder.blocks.38.mlp.fc2.weight has been marked as ready twice. This means that multiple autograd engine  hooks have fired for this particular parameter during this iteration.

Could someone please offer some idea on how I can solve this?

This can be temporarily solved by either disabling gradient checkpointing (but the memory requirement increases dramatically) or using singe card training. But I got another error during the single card training process:
RuntimeError: Function 'SoftmaxBackward0' returned nan values in its 0th output.
which is caused by this line attn = attn.softmax(dim=-1) in the forward function of eva_vit.py
It always happens after a certain amount of iterations (after 450/17710 in the first epoch)
I simply used the provided code and script for coco finetuning and I don't understand why I got all these errors. Could someone please help? @LiJunnan1992

self._wrapped_model._set_static_graph() solved it for me.


Cognito default authentication flow in Amplify

** Which Category is your question related to? **
Auth flows
** What AWS Services are you utilizing? **
Cognito
** Provide additional details e.g. code snippets **
When we do amplify add auth which authentication flow does it default to? I'm guessing "Implicit"? If correct, is there a way to change it to "Authorization Code" flow from the amplify cli?
Finally, does anyone have a recommendation on the best practices (and how to) for passing the access token from a back-channel to the client (if we're using Auth code flow of course)?

Default is code grant flow. Here's an overview of the setup:
https://aws-amplify.github.io/docs/js/authentication#social-provider-federation
https://aws-amplify.github.io/docs/js/authentication#oauth-and-hosted-ui
If you want to change to implicit you can change the responseType in the oauth key in your aws-exports file that the CLI generated to token as outlined here: https://aws-amplify.github.io/docs/js/authentication#oauth-and-hosted-ui
Once you go through this flow the client will have JWT tokens provided to it. You can retrieve them as outlined here: https://aws-amplify.github.io/docs/js/authentication#retrieve-current-session

@undefobj  Thank you for this info.
So if you plug in the withAuthenticator wrapper in a react project, and look at the network, it looks like it comes back with the token set in the second call. Just trying to wrap my head around the implementation here. If this is using the code grant flow, wouldn't there be a need for a callback after which the authorization code is exchanged for tokens? Wondering where's that happening.
Request

Response

Thank you @undefobj  for the info.
So I'm using withAuthenticator to see what's happening in the background. The following calls happen when I sign in:

AWSCognitoIdentityProviderService.InitiateAuth // AuthFlow: "USER_SRP_AUTH"
AWSCognitoIdentityProviderService.RespondToAuthChallenge

At this point we have id token. Then we get the user id and the credentials. Why do we need this step if all we need is the token to access resources?

AWSCognitoIdentityService.GetId
AWSCognitoIdentityService.GetCredentialsForIdentity
AWSCognitoIdentityProviderService.GetUser

Then a refresh:

AWSCognitoIdentityProviderService.InitiateAuth // AuthFlow: "REFRESH_TOKEN_AUTH"

I'm trying to wrap my head around how this is an authorization code flow at the same time.


Issue 134 removing the no longer needed patch + adding integration tests

Looks like the patch is no longer needed. Tested with maven 3.2.5 as well as 3.6.3. Added integration tests which test against the case described in the issue.

Waiting for #476

Looks like infrastructure problems again.
Could you please relaunch the failed jobs?

@slawekjaranowski please review

Also resolves #743

Resolves: #743, #308, #309, #346, #395

@slawekjaranowski please review

Waiting for #476

rather replace - not waiting - I'm right?

Waiting for #476

rather replace - not waiting - I'm right?

Not anymore. I meant to wait for the outcome of the discussion there.


Clean-up exception message for invalid url

Invalid url php-lt-5.4.7-hack://<some-invalid-string> isn't a very nice exception message.
My suggestion would be to strip the php-lt-5.4.7-hack:// and put the string in quotes.
e.g. Invalid url "<some-invalid-string>"

You're right. Where are you getting that message? In what context? Can you give me enough info to recreate it?

The context is when an invalid url is provided to the parser, to test I used an empty string and it spat out:
Invalid url php-lt-5.4.7-hack://
Whereas I'd have expected it to say:
Invalid url ""

Aha! Perfect, and thank you. I'll clean that up ASAP.

It's only ~10 months later, but I'm finally fixing this one. Thanks again for the report!


Issues installing with the new qiime2 version 2-2021.8

Hi @wwydmanski I am interested in using this plugin. However I am facing issues with installing it with the new version of qiime2-2021.8. Is this plugin compatible with this version? Or any plans to make it compatible?
Thanks!

Hi @shreyaskumbhare Sorry for late reply. I've just checked the plugin installation on my macOS (version 11.2.3) with qiime2-2021.8 and everything works fine. Could you provide a little bit more details what went wrong?

Hi, @PawelSzczerbiak and @tkosciol sorry for the delay in responding! I think there were a few issues with my qiime installations. It's working fine with the qiime2-2021.8. Thanks!


Suggested host header injection mitigation does not seem to be working

Since I opened https://github.com/rails/rails/issues/29893, I thought I should also mention here that I tried the suggested mitigation:

Prevent host header injection - add the following to config/environments/production.rb
config.action_controller.default_url_options = {host: "www.yoursite.com"}
config.action_controller.asset_host = "www.yoursite.com"

on on a rails 5.1.2 application, and it did not seem to work. Please see the details on https://github.com/rails/rails/issues/29893 for more info on the test I ran and an alternative mitigation.
If it's definitely working for you, it would be great if you could mention that on the rails issue.

Hey @jdleesmiller, thanks for reporting 👍  I commented on the Rails issue, but also wanted to comment here. The mitigation technique in this repo does prevent cache poisoning in views. Try rendering root_url. It does look like open redirects are still possible if you use redirect_to some_path rather than redirect_to some_url, which needs a fix.

Actually, the redirect issue shouldn't be harmful, so not sure there's an issue. Going to close for now, but feel free to continue the conversation if you have additional thoughts.

For completeness: as noted in https://github.com/rails/rails/issues/29893#issuecomment-319768403, you're right that this does bring root_url back under the application's control.
The open redirect issue does seem less worrying. AFAICT it requires the attacker to get a downstream cache to cache the redirect, which is apparently possible, if I am reading https://hackerone.com/reports/487 correctly (there they escaped the issue, but mainly by luck).
Thanks again for your time on this!


[Question] Is it production ready?

Hello guys!
Can I use this in a production system? Yahoo is using somewhere?
Tks!

Some yahoo production systems are using it, and that we believe it's safe to do so.
We also recommend you to consider using secure-handlebars or express-secure-handlebars to make it easier, i.e., apply the filters automatically.

Very nice! I'll use it too! :smirk: :+1:
Thanks @adon-at-work

Just a point, I'm migrating from Swig.js to "something.js" template engine, after your suggestion about handlebars.js, I'll consider it. Tks again!


Incorrect prefix for message signing

We use the wrong phrasing for the message signing prefix:
https://github.com/hirosystems/stacks.js/blob/5ac9385069ce48bde452520d5168c84e31b5b961/packages/encryption/src/messageSignature.ts#L5-L7
Following the Ethereum format, already followed on the Ledger app, the message should be Stacks Signed Message, not Stacks Message Signing.
This is a change of length, too, so if I'm not mistaken about how the prefixing works, should be:
\x17Stacks Signed Message:\n

"Stacks Signed Message:\n".length.toString(16) // 17
Useful info on prefix here https://blog.ricmoo.com/verifying-messages-in-solidity-50a94f82b2ca

Do we have a SIP for that?

I don't believe there is a SIP for general message signing (with prefix for safety). Only SIP-018 with a separate prefix (which might also cause problems with ledger).
There are also more comments and information in the PR: https://github.com/hirosystems/stacks.js/pull/1329


[CLEANUP] temporarily removing samples from assemblies

:white_check_mark: Build finished in 5m 11s
Build command:
mvn clean verify -B -e -Daudit -amd -pl assemblies

:exclamation: No tests found!
:information_source:  This is an automatic message


07 Registers --release Status_Access_Violation

Hi,
I am reading through the material with great interest. I am currently in chapter 7.2 in the discovery book. I face the following problem when trying to build the --release:
> cargo run --release
    Finished release [optimized + debuginfo] target(s) in 0.24s
     Running `arm-none-eabi-gdb -q -x openocd.gdb [...]\target\thumbv7em-none-eabihf\release\registers`
[...]\GNU Tools ARM Embedded\8 2018-q4-major\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from [...]\target\thumbv7em-none-eabihf\release\registers...
error: process didn't exit successfully: `arm-none-eabi-gdb -q -x openocd.gdb
[...]\target\thumbv7em-none-eabihf\release\registers` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Windows 10 Build 1803
toolchain: arm-none-eabi-gdb
Rust version: rustc 1.33.0 (2aa4c46cf 2019-02-28)

I also see this with on a thumbv6-none-eabi project:
$ rustc --version
rustc 1.35.0 (3c235d560 2019-05-20)
$ arm-none-eabi-gdb --version
GNU gdb (GNU Tools for Arm Embedded Processors 8-2018-q4-major) <IP_ADDRESS>81213-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I should also note that gdb-multiarch running under WSL works fine. arm-none-eabi-gdb 8-2018-q4-major for Linux (under WSL) gives a segfault. So it seems like a bug in that release of GDB?

I have the same problem with 8-2018-q4-major.
GNU Arm Embedded Toolchain: 7-2018-q2-update seems to work fine for me on Windows. This bundle seems to ship GDB 8.1, which is mentioned as the newest tested version in the book:
GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q2-update) <IP_ADDRESS>80315-git

Same issue on nightly win10, only when compiling with --release. Debug builds work.

It works for me if lto = false is set in Cargo.toml.

It works with the newest version of the GNU-Toolchain. So I think the issue can be closed.
$ arm-none-eabi-gdb --version
GNU gdb (GNU Tools for Arm Embedded Processors 8-2019-q3-update) <IP_ADDRESS>90703-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Yeah, the GNU toolchains from ARM are a bit hit and miss. One release works fine, the next release has a few severly broken tools which are fixed in the next one but then other stuff is broken. Not sure we can even recommend a specific release which works fine because it really depends on which jobs you're doing.


Update fields according to Etuovi suggestions

Use UTF-8 instead of ISO-8859-1.
Refactor chargeswater2 -> chargeswater. chargeswater2 is used for housing company water fee which we do not need. Remove chargeswater from Item since it should be set as a Text -element.
Add the Scontact element for real estate agent information. All the Scontact fields are optional.
The showing dates need to be in the format  "dd.mm.yyyy hh:mm".

Codecov Report

Merging #7 into develop will increase coverage by 0.06%.
The diff coverage is 93.75%.

@@             Coverage Diff             @@
##           develop       #7      +/-   ##
===========================================
+ Coverage    96.23%   96.29%   +0.06%
===========================================
  Files            7        7
  Lines          478      486       +8
  Branches        16       17       +1
===========================================
+ Hits           460      468       +8
  Misses          17       17
  Partials         1        1

Impacted Files
Coverage Δ

django_etuovi/etuovi.py
65.38% <0.00%> (ø)

django_etuovi/items.py
100.00% <100.00%> (ø)

django_etuovi/utils.py
96.22% <100.00%> (ø)

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 3a9bf28...19cc283. Read the comment docs.


Your specified Property Groups with a GLOB pattern returns more than 20 directories to search through

Description of the enhancement requested
Warning messages are issued when searching for COPYBOOKs locally on the number of folders scanned.
We may have many folders because we import Git repositories of resources (dedicated to copybooks) into the VS Code workspace, although we apply a "sparse-checkout" on these repositories to reduce the number of folders, (this choice was made to ensure compatibility with IBM DBB).
The fact that the message is a warning seems to automatically enable display of IBM Z Open Editor output, with the default log level at "INFO".
We would like :

either to be able to control the number of files that triggers the warning via a ZOE parameter
either the message is downgraded from warning to DEBUG to no longer trigger the display of the ZOE output

It may also not be necessary to repeat this warning message each time you search for a COPYBOOK.

Considering the timestamps on the COPYBOOK searches, to see if the control over the number of scanned folders does not turn out to be more expensive than the search itself.

We are looking for ways to improve this as we observe that just the pure evaluation of the glob patterns (i.e. finding the list of directories to search in) already has a performance impact; especially when user slower storage. Once we optimized the overall behavior we well also reexamine the log messages.

Hi,
I think the situation may depend on a lot of contextual conditions and it will be difficult to find a general rule.
The best would be to allow you to set our own limit by means of a setting, to be set either at the user settings level or at the workspace level settings, with a value to deactivate any control (value 0 for example).
The level of the alert (info, warning...) should also be able to be managed by a setting.

Also be careful not to overload the log, event un DEBUG mode, by writing a message each time a COPYBOOK is accessed.
Our COBOL programs use hundreds of COPYBOOKs (at least potentially referencing, as we use conditional compilation in COPYBOOKs to make context-dependent cascading calls).

Hi,
In our solution, searching for a local copybook takes an average of 0.3 seconds, (SSD disk) including writing the warning message in the ZOE log about the number of folders scanned, and without this management, the time would still be less than 0.3 seconds.

We made some big performance improvements in Z Open Editor 3.1.0 and removed this warning altogether.


Render fewer components when composing components

What:

Why:

How:

Checklist:

[ ] Documentation N/A
[x] Tests
[x] Code complete

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@a50fe8b). Click here to learn what that means.
The diff coverage is 100%.

@@           Coverage Diff            @@
##             master    #202   +/-   ##
========================================
  Coverage          ?   89.8%
========================================
  Files             ?      22
  Lines             ?     912
  Branches          ?     246
========================================
  Hits              ?     819
  Misses            ?      75
  Partials          ?      18

Impacted Files
Coverage Δ

src/react/index.js
100% <100%> (ø)

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 a50fe8b...799ad47. Read the comment docs.


Always throwing general exception even though i raise custom exception.

I'm throwing custom exception based on the scenarios but it's always going to general exception in custom middle ware.
It is always going to default in switch case instead of KeyNotFoundException. is this expected behavior?. Am i missing anything to add?.
middleware:
namespace WebApi.Middleware
{
public class ErrorHandlerMiddleware
{
private readonly RequestDelegate _next;
    public ErrorHandlerMiddleware(RequestDelegate next)
    {
        _next = next;
    }

    public async Task Invoke(HttpContext context)
    {
        try
        {
            await _next(context);
        }
        catch (Exception error)
        {
            var response = context.Response;
            response.ContentType = "application/json";

            switch(error)
            {
                case AppException e:
                    // custom application error
                    response.StatusCode = (int)HttpStatusCode.BadRequest;
                    break;
                case KeyNotFoundException e:
                    // not found error
                    response.StatusCode = (int)HttpStatusCode.NotFound;
                    break;
                default:
                    // unhandled error
                    response.StatusCode = (int)HttpStatusCode.InternalServerError;
                    break;
            }

            var result = JsonSerializer.Serialize(new { message = error?.Message });
            await response.WriteAsync(result);
        }
    }
}

}
Exmple Error Service:
namespace WebApi.Services
{
public class ExampleErrorService
{
public void ExampleErrors() {
// a custom app exception that will return a 400 response
throw new AppException("Email or password is incorrect");
        // a key not found exception that will return a 404 response
        throw new KeyNotFoundException("Account not found");
    }
}

}

The code shared here does not look like azure functions code. If you are trying to create a middleware in aspnet core web api and running into issues,  please open an issue in https://github.com/dotnet/aspnetcore repo. Thanks!


fix ngrok2 error

fix ngrok2 error

I didn't really get an error with ngrok2 but ok

lol in my colab ngrok2 can't run always show some tunnel error


Properly parse parameters in single transaction REST endpoint

Coverage increased (+0.03%) to 67.668% when pulling 3aecba1f03aabc7cc8fe69ff083fd930ba96b974 on fix/rest-transaction into 1ec91f5f7591af8c1c906eef2963479e774180be on master.


Issue in matter_power_spt.py line 62

the Z function in matter_power_spt.py line 62 (P_13_reg function) has 96/.5/r^2, it should be 96/5/r^2 (difference of 0.5 to 5)
@DDeRienzo

This will be corrected in this pull request: https://github.com/jablazek/FAST-PT/pull/11

Solved with PR #11


Reels media items is empty

Im trying to get reels media of some users, rawResponse is fine but items (TrayElements) returns empty array and I couldn't access media.
handler.stories.reelsMedia(userIds, completionHandler: { (response) in
    switch response {
    case .success(let dict):
        dict.values.forEach { (tray) in
            print(tray.items.map { $0 }) // -> This returns empty array []
            print(tray.rawResponse.items.array?.map { $0 }) // -> This is fine
        }
    case .failure(let error):
            print(error.localizedDescription)
     }
})

Apparently tray.items actually accesses tray.rawResponse.tray.array instead of .items.
It might have either changed or it was based on another response, but I'm definitely fixing this soon.
Thx 😊

Any update on this?

@sbertix thanks for quick response and the fix 😊I can access tray.items, but item's media objects is empty now.

That's intended, if I understand correctly.
TrayElement are not always immediately populate. You need to call the appropriate method with the related identifier.

@sbertix rawResponse is fine I can see all urls in rawResponse, and model is fine excluding media.
handler.stories.reelsMedia(userIds, completionHandler: { (response) in
    switch response {
    case .success(let dict):
        dict.values.forEach { (tray) in
            print(tray.rawResponse.beautifiedDescription) // -> This is fine I can see all Url's
            print(tray.items.first?.user) // -> This is fine, I can reach User object
            print(tray.items.first?.media) // -> This returns empty array []
        }
    case .failure(let error):
            print(error.localizedDescription)
     }
})

I've realised where the issue is 😞.
reelsMedia was never supposed to "return" [String: Tray], but always [String: TrayElement]. That's why properties aren't matching. I'm pushing a PR asap.


[website] Enable Translation & Localization

Motivation
Docusaurus allows for easy translation functionality using Crowdin.
Documentation files written in English are uploaded to Crowdin for translation by users within a community.
Changes

Enable the integration with Crowdin.
Adjust hyperlinks to include language.

Crowdin project: https://crowdin.com/project/apache-pulsar

for reviewers, this change is based on #2247 . so gitsha 6d08fa3 is the change to be reviewed in this PR.

@cckellogg ^^

👍

Can we have a statement that says translated documents will be licensed under AL2 on the project description or somewhere?

We don't store the translated the md files directly. However we store the generated html files in asf-site branch.
It is a good idea to put a statement in the site2 README explaining all the translated documents will be licensed under AL2.

And we also need to make sure that only committers have a privilege to approve suggested translations.

yes. I will add committers as managers to that crowdin project once this is live on the website.

@maskit I add a section called "contribute translations" in the README.md. Add a statement there saying all the translations are licensed under ALv2

rerun java8 tests

@sijie The added section looks perfect, but I was worried about a case people suggest translations without reading those contribution guide, because there’s no references on Crowdin side. Maybe I’m too anxious but there should be no cons to have a reference for the README or a statement on Crowdin side.

@maskit : I updated the https://crowdin.com/project/apache-pulsar to have a statement all contributed translations are licensed under Apache License V2. I also add you as the manager, so you can edit that project as well.

@maskit can you review this again once you have time?


Add test to repro problem with mocking out 'getDerivedStateFromProps'

what is the change?:
Soon folks will be adopting the new 'getDerivedStateFromProps' in their
React components, and re-running existing tests.
If those components are mocked in existing tests, then React will throw
errors currently.
Why? Because React validates that any component defining this method has
state and returns the right thing from 'gDSFP', and when an auto-mock is
created it doesn't fit these invariants.
Talking through this with @mael and @mjesun we determined an easy
solution is to add a small conditional to either blacklist mocking
functions with this name, so that automocks just don't have this method
and the invariant is never checked in React.
An alternative solution would be to make the mocked 'gDSFP' method
return 'null' and define 'state' on the mocked component.
why make this change?:
Let's work together to make Jest and React work together incredibly
smoothly, like a sea of butter. ^_^
test plan:
This test will throw errors right now - tagging @mjesun to tweak Jest so
that the new test will pass correctly.

Whoa, congrats on #6000 PR! We'll take it from here :)

Hi!  Can you double-check that?

Nevermind, i was able to reproduce it. Can you enable pushes to your branch, though? Thanks! :)

I had thought checking 'enable edits from maintainers' would allow you to push to the branch.

Invited you as a collaborator on my fork also for good measure, and thanks for your help!

Codecov Report

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

@@           Coverage Diff           @@
##           master    #6000   +/-   ##
=======================================
  Coverage   64.32%   64.32%
=======================================
  Files         217      217
  Lines        8312     8312
  Branches        3        4    +1
=======================================
  Hits         5347     5347
  Misses       2964     2964
  Partials        1        1

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 70e7ac2...ac26a1a. Read the comment docs.

@mjesun do we still need to do something here?

Don't think so; we agreed on fixing this somewhere else.


If-Match does not behave as it should.

According to the rfc If-match allows for a list of Etags, of which any one of them can be they correct Etag for  the request.
https://datatracker.ietf.org/doc/html/rfc2616#section-14.24
Also apparently '*' is the wildcard symbol and should be treated special .

Ill adjust the if-match to work similar if-none-match comparison, where a list of etags is already supported.
I'll have a look at the wildcard too
Thanks for the issue

Fixed in https://github.com/365Werk/etagconditionals/releases/tag/1.3.0


fix(archiver): logging while syncing is not noisy enough

Overview
When syncing a large number of blocks, the archiver does not emit enough information to let the operator know what it is doing. It simply prints syncing from block genesis to the current block.
We need move verbose logging to output incremental progress of the syncing operation

(context; I'm a DevOps Engineer at ZKV we've run validators and provers on the last few testnets)
A progress log that shows the target block and last synched block (maybe with an estimated time and %) would be amazing!


Inspector instantly crashes on startup

Windows 7 SP1 with inspector version <IP_ADDRESS> problem event name is CLR20r3

Driver version?


Removed

Just removed all lines of work with download, unzip and copy packer to live box
#21

ok, will check it out this evening, some tips for the future:

make the title of the PR more clear, I had to read the branch name to know what is going on :)
when you write a commit message, include also the issue number.


csi-wrapper: add example for AWS EBS CSI driver

and how to add the peer-pods CSI wrapper to it
Fixes: #1363

hi @snir911 ! Mind if I hold this PR until I give it a try? Never used CSI with peer pods...so I'd like to use that opportunity to learn :D

hi @snir911 ,
I finally got some free time to try it out, but the pod app is in crashloopback status:
[wmoschet@wainer-laptop aws]$ kubectl describe pod/app
Name:         app
Namespace:    default
Priority:     0
Node:         ip-10-0-0-91.ec2.internal/<IP_ADDRESS>
Start Time:   Tue, 05 Sep 2023 15:19:53 -0300
Labels:       <none>
Annotations:  <none>
Status:       Running
IP:           <IP_ADDRESS>
IPs:
  IP:  <IP_ADDRESS>
Containers:
  app:
    Container ID:  containerd://5cedbe174c8a217b5d11a7d9d2becd420164359a79f5737d8121276442d97f4b
    Image:         centos
    Image ID:      [Encrypted]
    Port:          <none>
    Host Port:     <none>
    Command:
      /bin/sh
    Args:
      -c
      while true; do echo $(date -u) >> /data/out.txt; sleep 5; done
    State:          Running
      Started:      Tue, 05 Sep 2023 15:21:14 -0300
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /data from persistent-storage (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-p544x (ro)
  csi-podvm-node-driver:
    Container ID:   containerd://0a2b3f0059772280a4b126669b0e781077e2b62d9bd7181b153f43734305f112
    Image:          public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.21.0
    Image ID:       [Encrypted]
    Port:           9808/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Error
      Exit Code:    2
      Started:      Tue, 05 Sep 2023 15:22:02 -0300
      Finished:     Tue, 05 Sep 2023 15:22:18 -0300
    Ready:          False
    Restart Count:  2
    Environment:
      KUBE_NODE_NAME:   (v1:spec.nodeName)
      CSI_NODE_NAME:    (v1:spec.nodeName)
    Mounts:
      /tmp from plugin-dir (rw)
      /var/lib/kubelet from kubelet-data-dir (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-p544x (ro)
  csi-podvm-wrapper:
    Container ID:  containerd://3846b13d62ce119d18e5c71d45fba5e991e39f3c4e6151a1374173f7a40d57ea
    Image:         quay.io/confidential-containers/csi-podvm-wrapper:latest
    Image ID:      [Encrypted]
    Port:          <none>
    Host Port:     <none>
    Command:
      /usr/bin/csi-podvm-wrapper
    Args:
      --v=2
      --endpoint=/tmp/csi-podvm-wrapper.sock
      --target-endpoint=/tmp/csi.sock
      --namespace=kube-system
    State:          Terminated
      Reason:       Error
      Exit Code:    255
      Started:      Tue, 05 Sep 2023 15:22:19 -0300
      Finished:     Tue, 05 Sep 2023 15:22:21 -0300
    Last State:     Terminated
      Reason:       Error
      Exit Code:    255
      Started:      Tue, 05 Sep 2023 15:21:47 -0300
      Finished:     Tue, 05 Sep 2023 15:21:48 -0300
    Ready:          False
    Restart Count:  3
    Environment:
      BINARY:          csi-podvm-wrapper
      POD_NAME:        app (v1:metadata.name)
      POD_NAME_SPACE:  default (v1:metadata.namespace)
      POD_UID:          (v1:metadata.uid)
      POD_NODE_NAME:    (v1:spec.nodeName)
    Mounts:
      /tmp from plugin-dir (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-p544x (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  persistent-storage:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  ebs-claim
    ReadOnly:   false
  kubelet-data-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet
    HostPathType:  Directory
  plugin-dir:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
  kube-api-access-p544x:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              katacontainers.io/kata-runtime=true
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason                  Age                From                     Message
  ----     ------                  ----               ----                     -------
  Warning  FailedScheduling        2m40s              default-scheduler        0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
  Normal   Scheduled               2m35s              default-scheduler        Successfully assigned default/app to ip-10-0-0-91.ec2.internal
  Normal   SuccessfulAttachVolume  2m33s              attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-8ad28226-bdf0-4933-8401-bbddbc488cb1"
  Normal   Pulling                 79s                kubelet                  Pulling image "centos"
  Normal   Pulled                  75s                kubelet                  Successfully pulled image "centos" in 4.645341073s (4.645349227s including waiting)
  Normal   Created                 75s                kubelet                  Created container app
  Normal   Started                 74s                kubelet                  Started container app
  Normal   Pulled                  72s                kubelet                  Successfully pulled image "public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.21.0" in 1.825911694s (1.825924865s including waiting)
  Normal   Pulled                  68s                kubelet                  Successfully pulled image "quay.io/confidential-containers/csi-podvm-wrapper:latest" in 2.987932919s (2.987941026s including waiting)
  Normal   Pulled                  59s                kubelet                  Successfully pulled image "quay.io/confidential-containers/csi-podvm-wrapper:latest" in 231.71683ms (231.740711ms including waiting)
  Normal   Started                 59s (x2 over 67s)  kubelet                  Started container csi-podvm-wrapper
  Normal   Created                 59s (x2 over 68s)  kubelet                  Created container csi-podvm-wrapper
  Normal   Created                 55s (x2 over 72s)  kubelet                  Created container csi-podvm-node-driver
  Normal   Pulled                  55s                kubelet                  Successfully pulled image "public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.21.0" in 164.242194ms (164.251044ms including waiting)
  Normal   Started                 55s (x2 over 71s)  kubelet                  Started container csi-podvm-node-driver
  Normal   Pulling                 55s (x2 over 74s)  kubelet                  Pulling image "public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.21.0"
  Warning  BackOff                 53s (x3 over 55s)  kubelet                  Back-off restarting failed container csi-podvm-wrapper in pod app_default(1cbf1bfb-036d-4ded-a600-e4d15ba8fded)
  Normal   Pulling                 42s (x3 over 71s)  kubelet                  Pulling image "quay.io/confidential-containers/csi-podvm-wrapper:latest"
  Normal   Pulled                  42s                kubelet                  Successfully pulled image "quay.io/confidential-containers/csi-podvm-wrapper:latest" in 432.751745ms (432.811723ms including waiting)
[wmoschet@wainer-laptop aws]$ kubectl get pods
NAME   READY   STATUS             RESTARTS      AGE
app    1/3     CrashLoopBackOff   5 (13s ago)   2m43s

The PVC claim is Bound:
[wmoschet@wainer-laptop aws]$ kubectl get pvc ebs-claim
NAME        STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
ebs-claim   Bound    pvc-8ad28226-bdf0-4933-8401-bbddbc488cb1   4Gi        RWO            ebs-sc         4m32s

The EBS pods running:
[wmoschet@wainer-laptop aws]$ kubectl get pods -n kube-system -l app.kubernetes.io/name=aws-ebs-csi-driver
NAME                                  READY   STATUS    RESTARTS   AGE
ebs-csi-controller-6cdc9cd849-qprbt   7/7     Running   0          10m
ebs-csi-node-qlzd4                    4/4     Running   0          10m

I'm running in a VPC with inbound/outbound ports restricted, basically I'm just opening https, ssh, icmp and caa proxy ports. Might this be the problem?

One last comment: it would be nice to have instructions to uninstall the csi-wrapper.

@snir911 @wainersm what is pending on this PR ?

@wainersm ok to merge on your side? I'll add instructions to delete once I'll have this setup again and I'll be able to verify, for now, AFAIR it should be specified in the official aws driver instructions and nothing is special for deleting the wrapper


[feat]: 3D components

Feature description
The feature request involves integrating 3D components into the website/application. These 3D elements could include interactive models, animations, or visualizations that enhance the user experience and engagement.
Adding 3D components can significantly elevate the website's aesthetic appeal and user engagement. It creates a more dynamic and interactive environment, which can lead to longer user sessions and increased interest in the content. Additionally, 3D elements can showcase products or concepts in a more engaging and realistic manner, making them more appealing to visitors.
Affected component/components
No response
Additional Context
Additional details here...
Before submitting

[X] I've made research efforts and searched the documentation
[X] I've searched for existing issues and PRs

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.


Use the Select mode C10k problem cannot be solved

Use the Select mode C10k problem cannot be solved

We don't really have enough information to keep this open. @aotgc if you describe clearly what the issue is we can reopen this.


Allow uploads/downloads to/from rstudio server sessions

In rstudio server sessions it is possible to click the Upload button (under the file tab) to send files to the server, or (still under the file tab) to click on files names (e.g. docx, zip) to download them locally. This works in a regular web browser but unfortunately not in the RSwitch viewer.
I am using Rswitch v1.5.1 on macOS Mojave v10.14.6

thx for using RSwitch and taking the time to file an issue!
Thx esp for this. I never use that feature but I can see why it's failing (I have to account for all possible popups ahead of time given the way WebKit works programmatically so I'll figure out which named windows the server uses and get this in there).

Progress! I've got uploads working and just need to tweak a bit more code to get downloads working.

Looks promising, I am looking forward to the update 😄

and downloads are working in the forthcoming release (later today)


Graphic artifact when environment Glow is turned on

Godot version:
3.0.1, but the issue is present in 3.0 as well
OS/device including version:
Ubuntu 17.04, gpu: GTX1060
Issue description:
I noticed that rarely in my game some elements are starting to shine for one frame when camera is moving around, after investigation it turns out that it's caused by GLOW in environment node. I was able to record short gif of it with still camera:

the effect is immediately appearing/disappearing if I move camera in any direction, it's the most noticeable when camera moves (one frame brightness), but it's impossible to capture it in such motion on gif
Steps to reproduce:

For the most visible effect download reproduction project (little modified materials demo). Or alternatively you can open material demo and turn GLOW on in environment node.

Minimal reproduction project:
https://www.dropbox.com/s/ga20u9qq9vpbf84/MaterialTesterGlowArtifacts.7z?dl=0 (file to big to upload on github)

This usually happens due to specular blobs.. maybe I should add something to limit specular strength in some materials.

I think this is fixed in 4.0 already. Realistically it is not something that can be "fixed" but the impact is reduced by improvements to specular aliasing (roughness limiter and FXAA) and to the glow effect itself.

Fixed by https://github.com/godotengine/godot/pull/54409

For people finding this issue via a web search, note that a variant of this issue still exists in 3.x: https://github.com/godotengine/godot/issues/15756


[Outlook] (office-runtime) Mailbox 1.10 supports Storage

Related PR: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56978

Docs Build status updates of commit 24d4167:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/reference/objectmodel/requirement-set-1.10/outlook-requirement-set-1.10.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Laravel does not use more than 512MB memory on Redis.

Laravel Version: 9.51.0
PHP Version: 8.2.2
Database Driver & Version:
-redis server : Redis server v=5.0.7 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64
composer.json

"predis/predis": "^2.0",

Description:
I have chunk files to append into one file  in a directory.
If it is over 512MB, it cause error.
Predis\Response\ServerException: ERR string exceeds maximum allowed size (512MB) in file vendor/predis/predis/src/Client.php on line 354

I set maxmemory of redis-server
<IP_ADDRESS>:6379> config get maxmemory
1) "maxmemory"
2) "16106127360"

I set php memory_limit
// /etc/php/8.2/fpm/php.ini
memory_limit = 20G

// /etc/php/8.2/cli/php.ini
memory_limit = -1

// database.php
'redis' => [
    'client' => 'predis',
    ;
],

So it means I am using predis.
Even with above configs, the error still comes out.
Steps To Reproduce:
I run this code in Controller which runs from  web Router.
$chunks_dir = 'somewhere_dir';

$files = scandir($chunks_dir);
$redis_key = 'key';
Redis::set($redis_key , null);
foreah( $files as $chunk_file_path) {
    Redis::append($redis_key, Storage::disk($disk)->get($chunk_file_path) );
}

Redis::append makes error.
To see the error, the  'somewhere_dir' size should be bigger than 512MB .

Are you sure it works in the console?
Redis documentation says that it has a maximum key and value size of 512 MB which matches with the error you are seeing. I believe the maxmemory setting is increasing the total memory that Redis will use across all keys and values, not the individual key/value size. So changing this setting won't affect the limitation in redis.
This doesn't look like a Laravel bug, but a limitation in Redis.

Thank you but see the above.
Thanks @jameshulse


AutoComplete not working on first added card

The search does not work and the "A" toggle does not show up when you add the first card.

[X] I've restarted Anki to see if it helps
[X] I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
[X] I've tried to disable other add-ons to see if there are any interactions present
[ ] My issue disappears when I hold shift while starting Anki.
[X] I've checked if anyone else reported this problem before by looking through the issue reports. I also checked to see if there is a section about known issues in the add-on description, documentation, or README.

I'm using Version 24.06.2
I'm attaching a short videorecording to demonstrate the issue.
https://github.com/AnKing-VIP/anki-field-autocomplete/assets/174269148/21534ec2-d49d-42ba-901d-9ff9838d1b4a

@damronatron can you look into this and see if it's happening on your end as well?

Team, any update here?

@AnKingMed curiously, this is happening to me too. But when I was a third year student making cards for missed Uworld questions, I do not remember this happening.
See clip:
https://jmp.sh/nHR5qBQ4

@RisingOrange do you have any idea why this might be?

I made a fix and released a new version!

Thank you!

Great, thank you guys! I've updated the rating on the add-on page as well. Much appreciated!


CONTRIBUTING.md

In my opinion, we should create a document with a contribution protocol from now on. Because the code is getting complicated. Let's talk about this together if you have any opinions about it.

Well, I don't think this project is big enough to have something like https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md. And the repository is not so popular, so I did not expect new contributors
But we can create some step-by-step guide on setting up a repository and adding new behavior to the toolbar

yeah, I agree.
then lets try to make a guideline for new user before contributing rules.


Implement descriptor for Commitment transaction.rs

Do note that and and or are binary operators. I went for a quick and dirty usage of thresh,
we may want to think more about it and possibly use and(A,and(B,C)) instead.

@bonomat any objection to merging that? I'll replace thresh with and and or before merging.

@bonomat any objection to merging that? I'll replace thresh with and and or before merging.

Please go ahead and merge it.

bors r+


[bug]: Incredibly low generation speed on M2 CPU

Is there an existing issue for this?

[X] I have searched the existing issues

OS
macOS
GPU
mps
VRAM
No response
What version did you experience this issue on?
2.3.5
What happened?
Today I did a fresh install of InvokeAI on a new Mac Mini with an M2 processor and 8Gb RAM. The image was generated in 53 minutes (!!!). Which is about 6 times slower than on a Mac on an Intel i7 CPU and 70-80 times slower than Draw Things and DiffusionBee do on the same hardware.
user@MacMini ~ % /invokeai/invoke.sh
Generate images with a browser-based interface
* Initializing, be patient...
>> Initialization file /invokeai/invokeai.init found. Loading...
>> Internet connectivity is True
>> InvokeAI, version 2.3.5-rc1
>> InvokeAI runtime directory is "/invokeai"
>> GFPGAN Initialized
>> CodeFormer Initialized
>> ESRGAN Initialized
>> Using device_type mps
>> xformers not installed
>> NSFW checker is disabled
>> Current VRAM usage:  0.00G
>> Loading 3moonAnime_3moonAnime from /Volumes/SSDex/AIModels/somemodel.safetensors
>> Converting legacy checkpoint somemodel into a diffusers model...
   | global_step key not found in model
   | Using checkpoint model's original VAE
>> Model loaded in 33.39s
>> Loading embeddings from /invokeai/embeddings
>> Textual inversion triggers:
>> Setting Sampler to k_lms (LMSDiscreteScheduler)
## Your history file /invokeai/outputs/.invoke_history couldn't be loaded and may be corrupted. Renaming it to /invokeai/outputs/.invoke_history.old

* --web was specified, starting web server...
* Initializing, be patient...
>> Initialization file /invokeai/invokeai.init found. Loading...
>> Started Invoke AI Web Server!
>> Default host address now <IP_ADDRESS> (localhost). Use --host <IP_ADDRESS> to bind any address.
>> Point your browser at http://<IP_ADDRESS>:9090
>> System config requested
>> patchmatch.patch_match: INFO - Compiling and loading c extensions from "/invokeai/.venv/lib/python3.10/site-packages/patchmatch".
>> patchmatch.patch_match: ERROR - patchmatch failed to load or compile (Command 'make clean && make' returned non-zero exit status 2.).
>> patchmatch.patch_match: INFO - Refer to https://invoke-ai.github.io/InvokeAI/installation/060_INSTALL_PATCHMATCH/ for installation instructions.
>> Patchmatch not loaded (nonfatal)
>> System config requested
>> System config requested

>> Image Generation Parameters:

{'prompt': '-', 'iterations': 1, 'steps': 25, 'cfg_scale': 7.5, 'threshold': 0, 'perlin': 0, 'height': 768, 'width': 512, 'sampler_name': 'ddim', 'seed':<PHONE_NUMBER>, 'progress_images': True, 'progress_latents': False, 'save_intermediates': 5, 'generation_mode': 'txt2img', 'init_mask': '...', 'hires_fix': False, 'seamless': False, 'variation_amount': 0}

>> ESRGAN Parameters: False
>> Facetool Parameters: False
>> Setting Sampler to ddim (DDIMScheduler)
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [53:05<00:00, 127.42s/it]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [53:05<00:00, 129.45s/it]

>> Image generated: "/invokeai/outputs/000001.fead1de2.3262182838.png"

Generating: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [53:08<00:00, 3188.32s/it]

>> Usage stats:
>>   1 image(s) generated in 3191.11s
>> System config requested

Screenshots
No response
Additional context
No response
Contact Details
No response

many people have the same issue on windows, too. nothing really helps as i tried many steps. reducing prompts, using an older version, re-install invokeai, installing xformers, installing and testing different versions of python and so on... this is absolutely frustrating, because there is not even the tiniest hint to what you can do anywhere. nothing on google, nothing on github, python, civitai or elsewhere. no guide, nothing.
that's why i have simply given up on using invokeai. it is really sad, because invokeai was the best and fastest solution for me and i had really fun with it.

2.3.2.post1 is running quite well on M2, around 30s for generating a picture.

I can confirm that Invoke AI runs very slowly on an M2. It's not that the Mac is too weak. It's just that the computing capacity is not utilized! The processor workload is about 2%? I have a 128GB Ram M2, that shouldn't be a problem either.
It is also frustrating that there are NO instructions on what settings do what in a MAC OS installation!
The startup options are not described anywhere. What is "Sequential guidance", what is "force_tiled_decode", what is "lazy_offload"?
Is it a problem that it is started in the terminal? Is there no multiprocessor support used?


Ungating pods should use patch/apply instead of update

What happened:
When there are new fields in the Pod API, and Kueue is using an old k8s library versions, it is possible for it to drop fields that it doesn't know about when using update.
The simple solution is to use patch or server-side-apply instead.
What you expected to happen:
The pod integration to be resilient to k8s upgrades.
How to reproduce it (as minimally and precisely as possible):

Use k8s 1.30, kueue v0.6.x
Enable pod integration
Create a pod using annotation container.apparmor.security.beta.kubernetes.io/main

Anything else we need to know?:
Found in #2029
Environment:

Kubernetes version (use kubectl version): 1.30
Kueue version (use git describe --tags --dirty --always): 0.6
Cloud provider or hardware configuration: any
OS (e.g: cat /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

/assign @trasc

/assign

/unassign trasc


socket.c listen() bug

The bug occurs when the client connects instantly after listen(),  getSn_SR(sn) never returns SOCK_LISTEN, but returns SOCK_ESTABLISHED. In this case listen() calls close(sn) and returns SOCKERR_SOCKCLOSED.
Possible fix:
socket.c, int8_t listen(uint8_t sn)
changing code
while(getSn_SR(sn) != SOCK_LISTEN)
{
close(sn);
return SOCKERR_SOCKCLOSED;
}
to
==============================
uint8_t res;
.....
res=getSn_SR(sn);
if (res != SOCK_LISTEN && res!=SOCK_ESTABLISHED)
{
close(sn);
return SOCKERR_SOCKCLOSED;
}

The situation you describe, where there might be a delay between calling listen() and checking the socket status using getSn_SR before a TCP connection is established, seems plausible. Although it may not be a common occurrence, we will discuss it internally before deciding to implement it.