Automated cherry pick of #5014: fix: support empty dns domain

Cherry pick of #5014 on release/2.13.
#5014: fix: support empty dns domain

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.13@1e79fc1). Click here to learn what that means.
The diff coverage is 0%.

@@              Coverage Diff               @@
##             release/2.13   #5018   +/-   ##
==============================================
  Coverage                ?   6.83%
==============================================
  Files                   ?     527
  Lines                   ?   89479
  Branches                ?       0
==============================================
  Hits                    ?    6119
  Misses                  ?   82852
  Partials                ?     508

Flag
Coverage Δ

#aFlag
6.83% <0%> (?)

Impacted Files
Coverage Δ

pkg/hostman/guestfs/fsdriver/linux.go
0% <0%> (ø)

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 1e79fc1...e497eb7. Read the comment docs.

/lgtm

/approve


Switch from Tarpaulin to llvm-cov

llvm-cov is both more accurate and portable (works natively in MacOS) than tarpaulin.
It also allows doing a single run for coverage and it can be used to report coverage from the memory comparison programs (will be addressed later).

Installation and usage: https://github.com/taiki-e/cargo-llvm-cov


ARROW-13800 [R] Use divide instead of divide_checked

mapping divide for / has the intended consequences, however integer division (%/%) doesn't work.
a <- Array$create(c(1:4, NA_integer_))

# results in integer overflow irrespective of %/% being mapped to divide or divide_checked
a %/% 0

Array
<int32>
[
<PHONE_NUMBER>,
<PHONE_NUMBER>,
<PHONE_NUMBER>,
<PHONE_NUMBER>,
  null
]

The expected behaviour for integer division by 0 should probably:

error when %/% is mapped to divide_checked
result in Inf when %/% is mapped to divide

Currently, none of these 2 are happening and integer division by 0 results in max_int

Here's what R does:
> 5 %/% 0
[1] Inf
> typeof(5 %/% 0)
[1] "double"

> 5L %/% 0L
[1] NA
> typeof(5L %/% 0L)
[1] "integer"

Leaving aside the questions of type stability, I think it's still accurate that integer division by 0 should/could return a missing value in Arrow. (It can't return Inf because that's not an integer.) But that's not what currently happens, even if you directly call the functions without any of our casting and wrapping:
> call_function("divide", Array$create(5L), Array$create(0L))
Error: Invalid: divide by zero
../src/arrow/compute/exec.cc:695  kernel_->exec(kernel_ctx_, batch, &out)
../src/arrow/compute/exec.cc:633  ExecuteBatch(batch, listener)
../src/arrow/compute/function.cc:239  executor->Execute(implicitly_cast_args, &listener)
> call_function("divide", Array$create(5L), Array$create(0))
Array
<double>
[
  inf
]
> call_function("divide_checked", Array$create(5L), Array$create(0))
Error: Invalid: divide by zero
../src/arrow/compute/exec.cc:695  kernel_->exec(kernel_ctx_, batch, &out)
../src/arrow/compute/exec.cc:633  ExecuteBatch(batch, listener)
../src/arrow/compute/function.cc:239  executor->Execute(implicitly_cast_args, &listener)

Let's leave aside the integer division question for now, I'll make a followup jira. Either way, switching to divide instead of divide_checked is the right move.


Tree drag'n'drop for sorting

Hello. Thx for your widget.
How I can change sort order of child in node?
E.g. when I try move Mexico higher then Canada - Mexico drops into Canada or into USA
http://gijgo.com/tree/demos/treeview-drag-and-drop

This is supported. The easiest way to do this is to move the mouse on the left side of the item. You have to see line above or below the node in order to reorder tree items.

Got it. Thx

How I can change sort order of parent nodes in tree? Frontend its showing but in backend its not updating accordingly.


fluentd (0.12.43) in_syslog doesn't process rfc5424 UDP message

Describe the bug
I am using following configuration in EFK deployed on Openshift 3.11 and its not processing rfc5424 messages.
To Reproduce
Use below configurations
<source>
  @type syslog
  port 5140
  bind <IP_ADDRESS>
  tag test
  message_format auto
  keep_time_key
  with_priority true
</source>

i tried without "with_priority" but result is same
<match test.**>
  @type copy
  <store>
    @type stdout
  </store>
</match>

Expected behavior
it should process both rfc5424 and rfc3164 messages, but it throwing error for rfc5425
Your Environment

Fluentd or td-agent version: fluentd 0.12.43
Operating system: CentOS 7.7
Kernel version: 3.10.0-1062.9.1.el7.x86_64

Your Error Log
message sent was
logger  -n <IP_ADDRESS> -P 5140 "<34>1 2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 - BOM'su root' failed for lonvick on /dev/pts/8 priority"
Error in logs is
2020-01-05 11:12:22 -0500 [warn]: pattern not match: "<5>Jan  5 11:12:22 root: <34>1 2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 - BOM'su root' failed for lonvick on /dev/pts/8 priority\x00"
Following messages were processed correctly
rfc3164
logger  -n <IP_ADDRESS> -P 5140 "<165>Aug  4 05:34:00 mymachine myproc[10]: %% It's\n  time to make the do-nuts. %% Ingredients: Mix=OK, Jelly=OK #\n" Devices: Mixer=OK, Jelly_Injector=OK, Frier=OK # Transport:\n Conveyer1=OK, Conveyer2=OK # %%"
Modified rfc5424 message by removing 1
logger  -n <IP_ADDRESS> -P 5140 "<34> 2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 - BOM'su root' failed for lonvick on /dev/pts/8 priority"
Additional context
This is deployed in Openshift 3.11 as EFK

We already stopped supporting fluentd 0.12 and fluentd 1.8.1 seems to work. Please update fluentd.
2020-01-06 11:41:21 +0900 [info]: parsing config file is succeeded path="example/debug/syslog2.conf"
2020-01-06 11:41:21 +0900 [info]: gem 'fluentd' version '1.8.1'
2020-01-06 11:41:21 +0900 [warn]: define <match fluent.**> to capture fluentd logs in top level is deprecated. Use <label @FLUENT_LOG> instead
2020-01-06 11:41:21 +0900 [info]: using configuration file: <ROOT>
  <source>
    @type syslog
    port 5140
    bind "<IP_ADDRESS>"
    tag "test"
    message_format auto
    keep_time_key
    with_priority true
    <parse>
      keep_time_key
      with_priority true
      message_format auto
    </parse>
  </source>
  <match **>
    @type stdout
    <buffer>
      @type "memory"
      flush_interval 1s
    </buffer>
  </match>
</ROOT>
2020-01-06 11:41:21 +0900 [info]: starting fluentd-1.8.1 pid=8436 ruby="2.7.0"
2020-01-06 11:41:21 +0900 [info]: spawn command to main:  cmdline=["ruby", "-Eascii-8bit:ascii-8bit", "-r/ruby/2.7.0/bundler/setup", "bin/fluentd", "-c", "example/debug/syslog2.conf", "--under-supervisor"]
2020-01-06 11:41:21 +0900 [info]: adding match pattern="**" type="stdout"
2020-01-06 11:41:21 +0900 [info]: adding source type="syslog"
2020-01-06 11:41:22 +0900 [warn]: #0 define <match fluent.**> to capture fluentd logs in top level is deprecated. Use <label @FLUENT_LOG> instead
2020-01-06 11:41:22 +0900 [info]: #0 starting fluentd worker pid=8450 ppid=8436 worker=0
2020-01-06 11:41:22 +0900 [info]: #0 listening syslog socket on <IP_ADDRESS>:5140 with udp
2020-01-06 11:41:22 +0900 [info]: #0 fluentd worker is now running worker=0
2020-01-06 11:41:22.001587000 +0900 fluent.info: {"pid":8450,"ppid":8436,"worker":0,"message":"starting fluentd worker pid=8450 ppid=8436 worker=0"}
2020-01-06 11:41:22.001816000 +0900 fluent.info: {"message":"listening syslog socket on <IP_ADDRESS>:5140 with udp"}
2020-01-06 11:41:22.004165000 +0900 fluent.info: {"worker":0,"message":"fluentd worker is now running worker=0"}
2003-10-12 07:14:15.003000000 +0900 test.auth.crit: {"time":"2003-10-11T22:14:15.003Z","host":"mymachine.example.com","ident":"su","pid":"-","msgid":"ID47","extradata":"-","message":"BOM'su root' failed for lonvick on /dev/pts/8 priority"}

@ganmacs As i am using Red Hat OpenShift 3.11 for which i cant update Fluentd version until they provide, Till then can i do some customization to achieve this?


Enable merge-conflict extension in virtual workspaces

This PR fixes https://github.com/microsoft/vscode/issues/142447
With this, I'm able to implement merge conflict handling in RemoteHub:

Thanks @joyceerhl!


Dreamview display not working: AuroAI CARLA-Apollo bridge

Hi, I am using Apolllo 5.0 with docker, because is the only version with a bridge with CARLA simulator: https://github.com/AuroAi/carla_apollo_bridge
Hi I am trying to follow the Demo tutorial to launch Dreamview:
https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_launch_and_run_apollo.md
However I am having the following error:
nohup:appending output to '/home/ubuntu/nohup.out Could not launch module monitor. Is it already built? Module dreamview is already running- skipping
Ok then I have cleaned the build:
./apollo.sh clean
Rebuild Apollo:
./apollo.sh build_opt_gpu
Afterwards still not working then I have built **Dreamview and Monitor ** modules separately:
bash apollo.sh build modules/dreamview/…
bash apollo.sh build modules/monitor/…

Still not working...Then following the suggestion of @daohu527 in this post: https://github.com/ApolloAuto/apollo/issues/14114
I have rebuilt again with the **-c ** flag option:
bash apollo.sh build -c opt
The output of my terminal was different this time, and the build failed with the following error:

I have no idea what is going on, and why dreamview is not appearing.
What I do not understand, is that in this tutorial (APOLLO 5.0 + CARLA) they launch dreamview with a different command:
. /apollo/scripts/dreamview.sh start_fe
after start there is an "_fe". I guess the AUROAI company has modified the Dreamview frontend right? I am not an expert...but this could be an explanation?
What the _fe means?
The problem is that I wish to run the DEMO from this tutorial: https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_launch_and_run_apollo.md
Do you think it should work running dreamview with this "customized" command or not? What am I doing wrong?
Thanks in advance

I have rebuilt again with the **-c ** flag option: bash apollo.sh build -c opt

-c opt for release builds and -c dbg is for debug messages, so this not the problem ref

pls try to use below cmd to rebuild dreamview frontend.
bash apollo.sh build_fe

Hi @daohu527 thanks for the attention!
I still could not enable Dreamview. I will detail the attempts:
1- Runned the suggested command, before build apollo:
bash apollo.sh build_fe
My output was:

You can a libcaffe2_gpu error and libopenCV core error at beginning. These errors I have already modifying the apollo_bash.sh file, adding this commit: https://github.com/ApolloAuto/apollo/commit/7997b9a3312dc7aa4ac0475b6a945cd4cdf4b708#diff-ccc78ede332b74b1730b71f544c94683
However the other error, regarding ./gen_pbjs.sh still persists, as well as command error 127
I have visited the suggested website (yarnpkg) and could not have conclusions how to fix this error, it is a kind of running yarn commands tutorial, nothing to do with this error (I imagine).
In summarize I could not run this command successfully. Have you tried with Apollo 5.0, does it work in your machine? It did not work for me in my virtual machine or local machine with Apollo 5.0, points the same error.
2- I have tried to run Dreamview, with the CARLA-AURO bridge tutorial
. /apollo/scripts/dreamview.sh start_fe
My output was:

Then going to localhost:8888 , the webpage and dreamview does not open (blank page).
3-Finally I have rebuilt Apolllo in debug mode, with the command:
./apollo.sh build -c dbg
I had numerous cannot touch and permission denied output as you can check below:

However, the built passed....
Any idea of what is wrong?
I have enabled docker start everything without sudo permission:  https://docs.docker.com/engine/install/linux-postinstall/
Also running the commands with sudo the build fails, then I do not know what is the issue and how to fix...Some solution ? What could I try please?

In addition @daohu527 I have runned now in my local computer, which is installed Apollo5.0
./apollo.sh build -c dbg
and later
./scripts/bootstrap.sh
And dreamview opened. However in my company's pc (AWS cloud machine), doing the build with the debug otpion (same previoous command), did not work you can check in previous comment the permission denied errors. In my local desktop these "permission denied" info did not occur....
My dreamview.log.info under apollo/data/log folder is attached:
Log file created at: 2022/02/03 22:25:43 Running on machine: in_dev_docker Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg I0203 22:25:43.333912  7476 processor.cc:80]  processor_tid: 7476 I0203 22:25:43.333981  7477 processor.cc:80]  processor_tid: 7477 I0203 22:25:43.334070  7478 processor.cc:80]  processor_tid: 7478 I0203 22:25:43.334117  7442 init.cc:104]  Register exit handle succ. I0203 22:25:43.334131  7479 processor.cc:80]  processor_tid: 7479 I0203 22:25:43.337949  7442 map_service.cc:107]  Failed to open map meta file: /metaInfo.json I0203 22:25:43.337961  7442 map_service.cc:144]  Updated with map: x_offset 0, y_offset 0 I0203 22:25:43.400777  7442 scheduler.cc:55]  create croutine: image_handler_/apollo/sensor/camera/front_6mm/image I0203 22:25:43.401129  7442 scheduler.cc:55]  create croutine: image_handler_/apollo/sensor/camera/front_6mm/image/compressed I0203 22:25:43.403935  7442 scheduler.cc:55]  create croutine: sim_control_/apollo/localization/pose I0203 22:25:43.413220  7442 scheduler.cc:55]  create croutine: sim_control_/apollo/planning I0203 22:25:43.414346  7442 scheduler.cc:55]  create croutine: sim_control_/apollo/routing_response I0203 22:25:43.415067  7442 scheduler.cc:55]  create croutine: sim_control_/apollo/navigation I0203 22:25:43.416038  7442 scheduler.cc:55]  create croutine: sim_control_/apollo/prediction I0203 22:25:43.421888  7442 scheduler.cc:55]  create croutine: data_collection_monitor_/apollo/canbus/chassis I0203 22:25:43.430711  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/routing_request I0203 22:25:43.430868  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/routing_response I0203 22:25:43.431053  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/canbus/chassis I0203 22:25:43.431157  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/sensor/gnss/odometry I0203 22:25:43.431322  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/localization/pose I0203 22:25:43.431504  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/perception/obstacles I0203 22:25:43.431607  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/perception/traffic_light I0203 22:25:43.432152  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/prediction I0203 22:25:43.434617  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/planning I0203 22:25:43.435518  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/control I0203 22:25:43.436164  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/navigation I0203 22:25:43.436792  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/relative_map I0203 22:25:43.436970  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/drive_event I0203 22:25:43.437067  7442 scheduler.cc:55]  create croutine: simulation_world_/apollo/monitor I0203 22:25:43.439575  7442 scheduler.cc:55]  create croutine: /internal/task0 I0203 22:25:43.439599  7442 scheduler.cc:55]  create croutine: /internal/task1 I0203 22:25:43.439611  7442 scheduler.cc:55]  create croutine: /internal/task2 I0203 22:25:43.439625  7442 scheduler.cc:55]  create croutine: /internal/task3 I0203 22:25:43.441360  7442 hmi_worker.cc:167]  Loaded HMI config: modes {   key: "Ipc1 Mkz Close Loop"   value: "/apollo/modules/dreamview/conf/hmi_modes/ipc1_mkz_close_loop.pb.txt" } modes {   key: "Ipc1 Mkz Standard Debug"   value: "/apollo/modules/dreamview/conf/hmi_modes/ipc1_mkz_standard_debug.pb.txt" } modes {   key: "Ipc2 Mkz Close Loop"   value: "/apollo/modules/dreamview/conf/hmi_modes/ipc2_mkz_close_loop.pb.txt" } modes {   key: "Ipc2 Mkz Standard Debug"   value: "/apollo/modules/dreamview/conf/hmi_modes/ipc2_mkz_standard_debug.pb.txt" } modes {   key: "Map Collection"   value: "/apollo/modules/dreamview/conf/hmi_modes/map_collection.pb.txt" } modes {   key: "Mkz Close Loop"   value: "/apollo/modules/dreamview/conf/hmi_modes/mkz_close_loop.pb.txt" } modes {   key: "Mkz Standard Debug"   value: "/apollo/modules/dreamview/conf/hmi_modes/mkz_standard_debug.pb.txt" } modes {   key: "Mkz Standard Debug Smart Recorder"   value: "/apollo/modules/dreamview/conf/hmi_modes/mkz_standard_debug_smart_recorder.pb.txt" } modes {   key: "Navigation"   value: "/apollo/modules/dreamview/conf/hmi_modes/navigation.pb.txt" } modes {   key: "Rtk"   value: "/apollo/modules/dreamview/conf/hmi_modes/rtk.pb.txt" } modes {   key: "Vehicle Calibration"   value: "/apollo/modules/dreamview/conf/hmi_modes/vehicle_calibration.pb.txt" } maps {   key: "Carla Town01"   value: "/apollo/modules/map/data/carla_town01" } maps {   key: "Carla Town02"   value: "/apollo/modules/map/data/carla_town02" } maps {   key: "Carla Town03"   value: "/apollo/modules/map/data/carla_town03" } maps {   key: "Carla Town04"   value: "/apollo/modules/map/data/carla_town04" } maps {   key: "Carla Town05"   value: "/apollo/modules/map/data/carla_town05" } maps {   key: "Demo"   value: "/apollo/modules/map/data/demo" } maps {   key: "San Mateo"   value: "/apollo/modules/map/data/san_mateo" } maps {   key: "Sunnyvale Big Loop"   value: "/apollo/modules/map/data/sunnyvale_big_loop" } maps {   key: "Sunnyvale Loop"   value: "/apollo/modules/map/data/sunnyvale_loop" } maps {   key: "Sunnyvale With Two Offices"   value: "/apollo/modules/map/data/sunnyvale_with_two_offices" } vehicles {   key: "Mkz Example"   value: "/apollo/modules/calibration/data/mkz_example" } I0203 22:25:43.446130  7442 kv_db.cc:65]  Executing SQL: CREATE TABLE IF NOT EXISTS key_value (key VARCHAR(128) PRIMARY KEY NOT NULL, value TEXT); I0203 22:25:43.446959  7442 kv_db.cc:65]  Executing SQL: SELECT value FROM key_value WHERE key='/apollo/hmi/status:current_mode'; I0203 22:25:43.447741  7442 hmi_worker.cc:207]  Loaded HMI mode: modules {   key: "Camera"   value {     start_command: "nohup mainboard -d /apollo/modules/drivers/camera/dag/camera.dag -d /apollo/modules/drivers/video/dag/video.dag &"     stop_command: "pkill -f \"/apollo/modules/drivers/camera/dag/camera.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/drivers/camera/dag/camera.dag"     }     required_for_safety: true   } } modules {   key: "Canbus"   value {     start_command: "nohup mainboard -d /apollo/modules/canbus/dag/canbus.dag &"     stop_command: "pkill -f \"/apollo/modules/canbus/dag/canbus.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/canbus/dag/canbus.dag"     }     required_for_safety: true   } } modules {   key: "Control"   value {     start_command: "nohup mainboard -d /apollo/modules/control/dag/control.dag &"     stop_command: "pkill -f \"/apollo/modules/control/dag/control.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/control/dag/control.dag"     }     required_for_safety: true   } } modules {   key: "GPS"   value {     start_command: "nohup mainboard -d /apollo/modules/drivers/gnss/dag/gnss.dag &"     stop_command: "pkill -f \"/apollo/modules/drivers/gnss/dag/gnss.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/drivers/gnss/dag/gnss.dag"     }     required_for_safety: true   } } modules {   key: "Guardian"   value {     start_command: "nohup mainboard -d /apollo/modules/guardian/dag/guardian.dag &"     stop_command: "pkill -f \"/apollo/modules/guardian/dag/guardian.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/guardian/dag/guardian.dag"     }     required_for_safety: true   } } modules {   key: "Localization"   value {     start_command: "nohup mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_localization.dag &"     stop_command: "pkill -f \"/apollo/modules/localization/dag/dag_streaming_msf_localization.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/localization/dag/dag_streaming_msf_localization.dag"     }     required_for_safety: true   } } modules {   key: "Perception"   value {     start_command: "nohup mainboard -d /apollo/modules/perception/production/dag/dag_streaming_perception.dag &"     stop_command: "pkill -f \"/apollo/modules/perception/production/dag/dag_streaming_perception.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/perception/production/dag/dag_streaming_perception.dag"     }     required_for_safety: true   } } modules {   key: "Planning"   value {     start_command: "nohup mainboard -d /apollo/modules/planning/dag/planning.dag &"     stop_command: "pkill -f \"/apollo/modules/planning/dag/planning.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/planning/dag/planning.dag"     }     required_for_safety: true   } } modules {   key: "Prediction"   value {     start_command: "nohup mainboard -d /apollo/modules/prediction/dag/prediction.dag &"     stop_command: "pkill -f \"/apollo/modules/prediction/dag/prediction.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/prediction/dag/prediction.dag"     }     required_for_safety: true   } } modules {   key: "Radar"   value {     start_command: "nohup mainboard -d /apollo/modules/drivers/radar/conti_radar/dag/conti_radar.dag &"     stop_command: "pkill -f \"/apollo/modules/drivers/radar/conti_radar/dag/conti_radar.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/drivers/radar/conti_radar/dag/conti_radar.dag"     }     required_for_safety: true   } } modules {   key: "Recorder"   value {     start_command: "/apollo/scripts/record_bag.py --start"     stop_command: "/apollo/scripts/record_bag.py --stop"     process_monitor_config {       command_keywords: "cyber_recorder record"     }   } } modules {   key: "Routing"   value {     start_command: "nohup mainboard -d /apollo/modules/routing/dag/routing.dag &"     stop_command: "pkill -f \"/apollo/modules/routing/dag/routing.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/routing/dag/routing.dag"     }     required_for_safety: true   } } modules {   key: "Traffic Light"   value {     start_command: "nohup mainboard -d /apollo/modules/perception/production/dag/dag_streaming_perception_trafficlights.dag &"     stop_command: "pkill -f \"/apollo/modules/perception/production/dag/dag_streaming_perception_trafficlights.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/perception/production/dag/dag_streaming_perception_trafficlights.dag"     }     required_for_safety: true   } } modules {   key: "Transform"   value {     start_command: "nohup mainboard -d /apollo/modules/transform/dag/static_transform.dag &"     stop_command: "pkill -f \"/apollo/modules/transform/dag/static_transform.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/transform/dag/static_transform.dag"     }     required_for_safety: true   } } modules {   key: "Velodyne"   value {     start_command: "nohup mainboard -d /apollo/modules/drivers/velodyne/dag/velodyne.dag &"     stop_command: "pkill -f \"/apollo/modules/drivers/velodyne/dag/velodyne.dag\""     process_monitor_config {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/drivers/velodyne/dag/velodyne.dag"     }     required_for_safety: true   } } monitored_components {   key: "GPS"   value {     process {       command_keywords: "mainboard"       command_keywords: "/apollo/modules/drivers/gnss/dag/gnss.dag"     }   } } monitored_components {   key: "Lidar 128"   value {     channel {       name: "/apollo/sensor/lidar128/compensator/PointCloud2"     }   } } monitored_components {   key: "Localization"   value {   } } monitored_components {   key: "Recorder"   value {     process {       command_keywords: "cyber_recorder record"     }     resource {       disk_spaces {         path: "/apollo/data"         insufficient_space_warning: 8         insufficient_space_error: 2       }       disk_spaces {         path: "/media/apollo/internal_nvme"         insufficient_space_warning: 128         insufficient_space_error: 32       }     }   } } I0203 22:25:43.447858  7442 kv_db.cc:65]  Executing SQL: CREATE TABLE IF NOT EXISTS key_value (key VARCHAR(128) PRIMARY KEY NOT NULL, value TEXT); I0203 22:25:43.447959  7442 kv_db.cc:65]  Executing SQL: INSERT OR REPLACE INTO key_value (key, value) VALUES ('/apollo/hmi/status:current_mode', 'Mkz Standard Debug'); I0203 22:25:43.453446  7442 scheduler.cc:55]  create croutine: point_cloud_/apollo/localization/pose I0203 22:25:43.453613  7442 scheduler.cc:55]  create croutine: point_cloud_/apollo/sensor/lidar128/compensator/PointCloud2 I0203 22:25:43.456024  7442 point_cloud_updater.cc:63]  Lidar height is updated to 1.91 I0203 22:25:43.457608  7442 scheduler.cc:55]  create croutine: HMI_/apollo/monitor/system_status I0203 22:25:43.457855  7442 scheduler.cc:55]  create croutine: HMI_/apollo/canbus/chassis I0203 22:25:43.553468  7476 simulation_world_service.h:224]  Has not received any data from /apollo/canbus/chassis I0203 22:25:43.553495  7476 simulation_world_service.h:224]  Has not received any data from /apollo/sensor/gnss/odometry I0203 22:25:43.553498  7476 simulation_world_service.h:224]  Has not received any data from /apollo/localization/pose I0203 22:25:43.553503  7476 simulation_world_service.h:224]  Has not received any data from /apollo/perception/obstacles I0203 22:25:43.553505  7476 simulation_world_service.h:224]  Has not received any data from /apollo/prediction I0203 22:25:43.553508  7476 simulation_world_service.h:224]  Has not received any data from /apollo/planning I0203 22:25:43.553514  7476 simulation_world_service.h:224]  Has not received any data from /apollo/control I0203 22:25:53.553445  7478 simulation_world_service.h:224]  Has not received any data from /apollo/canbus/chassis I0203 22:25:53.553467  7478 simulation_world_service.h:224]  Has not received any data from /apollo/sensor/gnss/odometry I0203 22:25:53.553472  7478 simulation_world_service.h:224]  Has not received any data from /apollo/localization/pose I0203 22:25:53.553474  7478 simulation_world_service.h:224]  Has not received any data from /apollo/perception/obstacles I0203 22:25:53.553478  7478 simulation_world_service.h:224]  Has not received any data from /apollo/prediction I0203 22:25:53.553480  7478 simulation_world_service.h:224]  Has not received any data from /apollo/planning I0203 22:25:53.553483  7478 simulation_world_service.h:224]  Has not received any data from /apollo/control I0203 22:26:03.553426  7478 simulation_world_service.h:224]  Has not received any data from /apollo/canbus/chassis I0203 22:26:03.553448  7478 simulation_world_service.h:224]  Has not received any data from /apollo/sensor/gnss/odometry I0203 22:26:03.553452  7478 simulation_world_service.h:224]  Has not received any data from /apollo/localization/pose I0203 22:26:03.553457  7478 simulation_world_service.h:224]  Has not received any data from /apollo/perception/obstacles I0203 22:26:03.553458  7478 simulation_world_service.h:224]  Has not received any data from /apollo/prediction I0203 22:26:03.553462  7478 simulation_world_service.h:224]  Has not received any data from /apollo/planning I0203 22:26:03.553465  7478 simulation_world_service.h:224]  Has not received any data from /apollo/control I0203 22:26:13.553429  7478 simulation_world_service.h:224]  Has not received any data from /apollo/canbus/chassis I0203 22:26:13.553452  7478 simulation_world_service.h:224]  Has not received any data from /apollo/sensor/gnss/odometry I0203 22:26:13.553457  7478 simulation_world_service.h:224]  Has not received any data from /apollo/localization/pose I0203 22:26:13.553462  7478 simulation_world_service.h:224]  Has not received any data from /apollo/perception/obstacles I0203 22:26:13.553464  7478 simulation_world_service.h:224]  Has not received any data from /apollo/prediction I0203 22:26:13.553467  7478 simulation_world_service.h:224]  Has not received any data from /apollo/planning I0203 22:26:13.553470  7478 simulation_world_service.h:224]  Has not received any data from /apollo/control I0203 22:26:23.553433  7478 simulation_world_service.h:224]  Has not received any data from /apollo/canbus/chassis I0203 22:26:23.553457  7478 simulation_world_service.h:224]  Has not received any data from /apollo/sensor/gnss/odometry I0203 22:26:23.553460  7478 simulation_world_service.h:224]  Has not received any data from /apollo/localization/pose I0203 22:26:23.553474  7478 simulation_world_service.h:224]  Has not received any data from /apollo/perception/obstacles I0203 22:26:23.553479  7478 simulation_world_service.h:224]  Has not received any data from /apollo/prediction I0203 22:26:23.553485  7478 simulation_world_service.h:224]  Has not received any data from /apollo/planning I0203 22:26:23.553488  7478 simulation_world_service.h:224]  Has not received any data from /apollo/control I0203 22:26:33.553422  7477 simulation_world_service.h:224]  Has not received any data from /apollo/canbus/chassis I0203 22:26:33.553444  7477 simulation_world_service.h:224]  Has not received any data from /apollo/sensor/gnss/odometry I0203 22:26:33.553447  7477 simulation_world_service.h:224]  Has not received any data from /apollo/localization/pose I0203 22:26:33.553452  7477 simulation_world_service.h:224]  Has not received any data from /apollo/perception/obstacles I0203 22:26:33.553457  7477 simulation_world_service.h:224]  Has not received any data from /apollo/prediction I0203 22:26:33.553459  7477 simulation_world_service.h:224]  Has not received any data from /apollo/planning I0203 22:26:33.553462  7477 simulation_world_service.h:224]  Has not received any data from /apollo/control

Apollo 5.0 works well, and build_fe use yarn build to build node.js

/apollo/scripts/dreamview.sh start_fe
the start and start_fe have no difference

  case $cmd in
    start)
      start_customized_path $module_path $module "$@"
      ;;
    start_fe)
      start_fe_customized_path $module_path $module "$@"

I found that build_fe prompts some permission errors, I think you can solve it first, or you can try


finalizers  on .Net Core

- .NET Framework: The output shows that the finalizers for the three classes are called automatically when the application terminates, in order from the most-derived to the least-derived.
- .NET 5 (including .NET Core) or a later version: There's no output, because this implementation of .NET doesn't call finalizers when the application terminates.

Basically, you can check by yourself and see that both .net framework and .net core returns the same result from finalizers.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a96eaef8-dcc9-4659-3f4e-be5a1c4c6b50
Version Independent ID: d3da7981-542d-e906-5988-b80e403fa651
Content: Finalizers - C# Programming Guide
Content Source: docs/csharp/programming-guide/classes-and-structs/finalizers.md
Product: dotnet-csharp
Technology: csharp-fundamentals
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

Hi @robertok77
I'm not sure what you're asking in this issue. See dotnet/runtime#65845 and dotnet/runtime#9328 for more details on how the behavior is different on framework and core.
This article is correct in describing what the language and runtime guarantees on Framework and .NET Core, and how they are different.

Hi @BillWagner
I run the code from https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/finalizers
on rapid tool - LinqPad .Net 6. That is why I got the strange response from finalizers I wrote you.
However on pure console app .net 6 the behaviour is according to documentation.
I send info about explanation to Joseph Albahari.


[Feature Proposal] - Safelist values should have access to RuleContext

Clear and concise description of the problem
Variants, rules and shortcuts supports syntax that allows to access RuleContext object that contains active theme and other useful information. Safelist for some reason doesn't support such syntax which prevents generating safelist based on main project configuration.
Suggested solution
I will provide a practical example why access to theme might be needed.
Let's suppose we want to generate safelist for utility on all media breakpoints specified in the project.
In theme we may have something like this:
const breakpoints = {
  "md": 768,
  "lg": 1024
}
...
theme: {
    screens: mapObject(breakpoints, (size) => `${size}px`),
}

than I would like to access those screens in my safelist to generate utility on those resolutions
safelist: ['md:p-1 lg:m-1'] // Currently I have to define them manually which is misaligned with a theme

sagelist should allow such syntax:
safelist: [( { theme } ) => Objec.keys(theme.screens).map(mq => `${mq}:m-1`)]

Alternative
At the moment I have to manually import needed data from a JSON file but this is inflexible solution taking into account that my project uses Nuxt layers where every layer potentially can override/augment Uno theme object. So breakpoints as any other parts of config are determined only once unocss:config Nuxt hook was executed.
Additional context
No response
Validations

[X] Read the Contributing Guidelines.
[X] Read the README.md of using the package.
[X] Already used the Interactive Docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

I am not against it. Feel free to PR - tho I am not sure if the timing allows it to have such context, but if we do, happy to have that capability


receiving undefined in class with valid code

⏯ Playground Link
https://www.typescriptlang.org/play?#code/MYGwhgzhAEBC4AtoG8BQ1oDcwgK4FNoBeaAIgEFT1owBlAewFt8AXBASwDsBzALhWgRGbfgAoAlMQB8WeuwAm0AL6pqwepwgsATrmAt62iSmoY27CADo6TVhx7ETGZ4OEJ+5qxFvmep5dQq1AAO2uzYLITezL7cxmgu6pr0IPiWIPRxnpbYePjigahBnPgA7nCIEtYMMfbclkJsEkA
🙁 Actual behavior
should print the the value
🙂 Expected behavior
but receiving undefined

You forgot to fill out the rest of the issue template.
This is working as intended. The this value is not bound when storing methods like this. You get the same result in plain JavaScript.
See also: Why does this get orphaned in my instance methods?

okay thank you for the help!


feat(forge): exclude certain contracts from being eavesdropped on by vm.expectRevert

Component
Forge
Describe the feature you would like
Take the following test:
function test_RevertWhen_BatchSizeZero() external {
    Batch.CancelMultiple[] memory batch = new Batch.CancelMultiple[](0);
    vm.expectRevert(Errors.SablierV2ProxyTarget_BatchSizeZero.selector);
    bytes memory data = abi.encodeCall(target.batchCancelMultiple, (batch, defaults.assets()));
    proxy.execute(address(target), data);
}

The test does not pass because Forge expects a revert in the defaults.assets() call, which precedes the proxy.execute call. The catch is that defaults is a testing-only contract containing default values used throughout the tests.
contract Defaults {
    uint256 public constant BATCH_SIZE = 10;
    UD60x18 public constant BROKER_FEE = UD60x18.wrap(0);
    uint40 public constant CLIFF_DURATION = 2500 seconds;

    // --- snip --- //
}

This has to be a contract (rather than a library) because I need to calculate certain values dynamically in the constructor.
I know I could easily address the problem in my code above by flipping the order of operations. Still, I wanted to open this issue to suggest a feature to improve the developer experience when this scenario occurs.
It would be nice to have the ability to exclude certain contracts from being eavesdropped on by vm.expectRevert. This functionality would be analogous to excludeContract for invariants.

I offer a $200 bounty for implementing this feature. DM me on Telegram once you have the PR.

The lack of this functionality has continued to be a pain.
CC @mattsse, @gakonst

As evidenced by this StackExchange Q&A, people keep bumping into hard-to-debug scenarios that could be prevented with a feature that would allow users to exclude certain contracts from being eavesdropped by vm.expectRevert.

Thanks for mentioning the issue here @PaulRBerg.

Another idea is a cheat to enable disable expect* checks for staticcalls, because really the use case here most of the time is going to be skipping staticcalls (h/t @brockelmore)

I think this would be the best solution.

Supportive, also on this note

I think that the behavior of this exclusion functionality should mimic that of excludeContract in StdInvariant.

@grandizzy I don't think they would. From Matt's code:

If the revert data matches but the address that originated the revert does not, that is considered a failure.

I would like the test to not fail if the revert address does not match. This is what I mean by excluding certain contracts from being eavesdropped.

@grandizzy I don't think they would. From Matt's code:

If the revert data matches but the address that originated the revert does not, that is considered a failure.

I would like the test to not fail if the revert address does not match. This is what I mean by excluding certain contracts from being eavesdropped.

@PaulRBerg I actually think it helps, tested the following scenario using PR https://github.com/foundry-rs/foundry/pull/8770 for 2 contracts like
contract CounterWithoutRevert {
    uint256 public number;
    function count() public {
        number += 1;
    }
}

contract CounterWithRevert {
    error RandomError();
    uint256 public number;
    function count() public pure {
        revert RandomError();
    }
}

a test as
function test_count_with_revert() public {
    CounterWithoutRevert countNoRevert = new CounterWithoutRevert();
    CounterWithRevert countRevert = new CounterWithRevert();
    vm.expectRevert(address(countRevert));
    countNoRevert.count();
    countNoRevert.count();
    countNoRevert.count();
    countRevert.count();
}

it's a pass. That is because when reverter address is specified vm.expectRevert(address(countRevert)); we're not looking for the next call to revert but rather for the next reverted call to be done by address(countRevert), I included this test in PR too, wdyt?

That is because when reverter address is specified vm.expectRevert(address(countRevert)); we're not looking for the next call to revert but rather for the next reverted call to be done by address(countRevert)

This wasn't clear from Matt's comment. Or I might have misunderstood it.
Anyway, in this case, yes this new feature accomplishes the desired behavior. Thank you!

it's a pass. That is because when reverter address is specified vm.expectRevert(address(countRevert)); we're not looking for the next call to revert but rather for the next reverted call to be done by address(countRevert), I included this test in PR too, wdyt?

@grandizzy Has this always been the case for expextRevert or is that new to this version? I thought, like other expect* cheats, that  expectRevert wants the revert to happen on the next call? I think it makes more sense to keep that behavior consistent for all cheats and expect it to be the next call.

it's a pass. That is because when reverter address is specified vm.expectRevert(address(countRevert)); we're not looking for the next call to revert but rather for the next reverted call to be done by address(countRevert), I included this test in PR too, wdyt?

@grandizzy Has this always been the case for expextRevert or is that new to this version? I thought, like other expect* cheats, that expectRevert wants the revert to happen on the next call? I think it makes more sense to keep that behavior consistent for all cheats and expect it to be the next call.

@mds1 that's only with PR https://github.com/foundry-rs/foundry/pull/8770 in review and with cheatcodes specifying reverter addresses as per https://github.com/foundry-rs/foundry/issues/5299#issuecomment-1623838745

Does that mean the next top level to reverterAddress (i.e. call from the test contract), or a call at any depth? See comments below for example:
function test_count_with_revert() public {
    CounterWithoutRevert countNoRevert = new CounterWithoutRevert();
    CounterWithRevert countRevert = new CounterWithRevert();
    vm.expectRevert(address(countRevert));
    countNoRevert.count(); // If this call makes a subcall to `countRevert` and it doesn't revert, does test fail?
    countNoRevert.count();
    countNoRevert.count();
    countRevert.count();
}

I think that nuance is why I'd prefer expectRevert(reverterAddress) to always apply to the next call regardless: it's simpler, and it's the same as how expectEmit(emitter) always applies to the next call and doesn't wait for the next call to emitter
I know this doesn't meet @PaulRBerg requirements, but the use case of the feature was really just to skip listening for reverts from staticcalls, and that same feature would also apply to events as well. So I don't think this proposed behavior of expectRevert(reverterAddress) is the optimal solution, compared to something like an overload of those methods with a skipStatic arg

countNoRevert.count(); // If this call makes a subcall to `countRevert` and it doesn't revert, does test fail?

yes, that's correct, in this case the test will fail right away

I think that nuance is why I'd prefer expectRevert(reverterAddress) to always apply to the next call regardless

Agree, open to suggestions if that's not desired behavior, maybe let's move convo in that PR?

Sounds good, will move my thoughts there now


Fix broken links in the serialization guide

Fix broken links in the serialization guide
https://docs.ploomber.io/en/latest/user-guide/deployment.html#online-service-api -> https://docs.ploomber.io/en/latest/deployment/online.html

🎉


Saliency map

I want to know how to implement saliency map to detect objects and box them.
In keras,
after saliency = K.gradient(K.sum(model.output), model.input),
K.function([model.input, K.learning_phase()], saliency).
But I can't get what I want to show.
How do you implement saliency map?

Unfortunately, the code for this project cannot be made public. But you can find some simple implementation here: https://github.com/Lasagne/Recipes/blob/master/examples/Saliency Maps and Guided Backpropagation.ipynb


Skip all guard clauses at function start for ReturnCount - Closes #2342

Codecov Report

Merging #2428 into master will increase coverage by 0.01%.
The diff coverage is 86.95%.

@@             Coverage Diff              @@
##             master    #2428      +/-   ##
============================================
+ Coverage     82.83%   82.85%   +0.01%
+ Complexity     2166     2156      -10
============================================
  Files           356      357       +1
  Lines          6136     6142       +6
  Branches       1119     1119
============================================
+ Hits           5083     5089       +6
  Misses          478      478
  Partials        575      575

Impacted Files
Coverage Δ
Complexity Δ

.../io/gitlab/arturbosch/detekt/rules/GuardClauses.kt
75% <75%> (ø)
0 <0> (?)

...itlab/arturbosch/detekt/rules/style/ReturnCount.kt
94.87% <93.33%> (+7.11%)
10 <6> (-10)
:arrow_down:

Continue to review full report at Codecov.

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


Fixed #32539 -- Added ability to toggle on facet filters in the admin.

Ticket: https://code.djangoproject.com/ticket/32539
Now aiming to have an optional toggle ?...&facets=1 that adds facet counts to all admin filters, need to add this to each existing admin filter:

[x] SimpleListFilter
[x] RelatedFieldListFilter
[x] BooleanFieldListFilter
[x] ChoicesFieldListFilter
[x] DateFieldListFilter
[x] AllValuesFieldListFilter
[x] RelatedOnlyFieldListFilter
[x] EmptyFieldListFilter
[x] add documentation

@simonw What do you think?

Hi @carltongibson thank you for testing :tada: glad it kinda works
I think it should be possible to have the facet counts magically appear everywhere. I really like the toggle idea
I have updated the SimpleListFilter one, you can have a look if you like but otherwise I will every now and again push up for the other filters. I will mark the PR as draft
I'm thinking we can have a warning that there will be a performance hit, especially for the SimpleListFilter, with the other ones, should be able to do some fancy aggregates to reduce the impact. :thinking:
Thank you again :star:

Alright, I think that is ready for another look :+1:
I think I could add a picture similar to at the top of the filter docs to show the filters, is there a demo site the images are coming from?

Are there gotchas to this pattern we need to handle before we just ship it?

If anyone has a filter with a parameter name of "facets" I think they will lose their filter, I could make the name really obscure, but it is optional

If anyone has a filter with a parameter name of "facets" I think they will lose their filter, I could make the name really obscure, but it is optional

How about using ?_facets=1 instead? That's a pattern I use a lot in Datasette - having an underscore to avoid accidental collisions with existing columns - but I don't think it's a pattern Django has used before, so it might be weird to add it for this.

I'm trying this out against an existing Django application. It looks really good!
I installed the branch with:
pip install https://github.com/sarahboyce/django/archive/refs/heads/ticket_32539_lookups.zip

Now when I add ?facets=1 to an admin URL for anything that uses list_filter=... I get this:

Django Debug Toolbar shows me that the SQL query looks like this:

SELECT COUNT("feedstats_subscribercount"."id") FILTER (WHERE "feedstats_subscribercount"."path" = '/atom/entries/') AS "0__c",
       COUNT("feedstats_subscribercount"."id") FILTER (WHERE "feedstats_subscribercount"."path" = '/atom/everything/') AS "1__c",
       COUNT("feedstats_subscribercount"."id") FILTER (WHERE "feedstats_subscribercount"."path" = '/atom/links/') AS "2__c"
  FROM "feedstats_subscribercount"

This adds a count / filter where clause for every displayed value. That's fine for things with only a few unique values, but it does mean you end up with a pretty huge SQL query for columns with a large number of values. Arguably those aren't a great fit for the list_filter= function though, so I'm not sure if that's something we need to worry about.
I like the idea of a toggle to turn these on and off. I would want them on by default for most of my projects - I wonder if the Django admin.ModelAdmin subclasses could grow a show_facets=True option that sets that default?

I noticed that it's not currently sorting the listed filters by the number of results:

When I'm working with facet interfaces generally I always like to sort them with the largest counts at the top, as then the feature doubles as a "what's most popular" feature.
This makes more sense for things like column value facets than it does for date filters - this filter interface here makes more sense sticking to its time order than sorting by those numbers:

It looks to me like Django defaults to sorting these filters alphabetically - as illustrated by this larger example that facets/filters by user agent:

I don't have a particularly strong opinion about this. I feel that sorting by numerical count makes more sense that sorting alphabetically for most cases, but that's just an intuition based on how I've used these kinds of interfaces in the past - I'm not ready to confidently state that every Django project in existence would benefit more from numerical than from alphabetical sorting here.

Just spotted this: clicking on one of those filter links currently does not persist the ?facets=1 in the URL:

This feels wrong to me: when I'm interacting with facets I like to do things like drill down using one to see how that affects the numeric counts for the others.
Ideally the URLs generated for the facets should persist the ?facets=1 query string parameter.

I'm really impressed with how slim this implementation is - love how much new functionality we get from so little code, and the tests look good to me too.

How about using ?_facets=1 instead? [...] having an underscore to avoid accidental collisions with existing columns - but I don't think it's a pattern Django has used before [...]

👍 There is some prior precedent -- _popup and _to_field keys are already used in contrib.admin.options.

Thank you @simonw for the review and testing :star:

facets has been updated to _facets
adding _facets=1 to the url should now be persisted in filter links
added an attribute show_facets to the ModelAdmin to allow facets to be turned on by default without using the query parameter
I did an update for getting the counts for SimpleListFilter to achieve this in a single query
Updated the docs and tried to add a note around that the queries may cause performance issues

I need to think a bit more about the ordering, I can see the value of having it. Maybe the SimpleListFilter as it's set up with a specific order maybe doesn't want to be ordered (but maybe does) and the date one mostly will look ok with the count order just sometimes 7 days ago is bigger than this year. Choosing to add it to some and not others feels like it might look like a bug. So I feel like it should be all or nothing.
I think this is ready for another set of testing and review, happy for anyone else to weigh in their thoughts on whether they are for or against the ordering also.

@sarahboyce congratulations for the functionality you propose and for its implementation. I can only suggest to use more f-strings in some places of the code because it's more readable and faster. Also, I think the Django version should be specified in the two additions to the documentation.

Unless you have a solution come to mind @sarahboyce (which you might! sweat_smile)

I have something for the ordering 9c0f1f5, I have put it in a seperate commit and we can still decide whether to include it or not. :+1:

OK I pushed some suggested docs edits. Please take a look, and use as you think. (The main bit was documenting the ShowFacets enum as nested in the show_facets section, since that's the only place it applies — but it's targetable with rst roles this way.)

It looks good to me! Thank you, the enum especially is much clearer :star:

Then I just wonder — please feel free to shout "NO!" at me :) — if a UI toggle to add/remove the _facets query parameter just at the top of the filter list might be a nice finishing touch? thinking (For me, it's a long way until 5.0, and we could add that as an easy picking ticket for someone to follow-up with...)

Ahhhh I see what you mean, it's definitely nice for feature discovery :thinking: probably quite important for it to be used
Similar to the pretty toggle for the admin light mode/dark mode. I will have a quick look later and if I'm struggling, I'll push to another ticket :+1:

Toggle off

Toggle on

:shrug: maybe?

I'd be happy to provide more information on the change made in Django's codebase!
In Django, the ModelAdmin class is used to define the admin interface for a particular model. Prior to the change made in ticket #16495, ModelAdmin did not have built-in support for facet filters, which allow users to filter data based on a set of predefined options.
In ticket #32539, support for toggleable facet filters was added to ModelAdmin. This change allows developers to specify a list of facets for a particular model, along with the options for each facet. Users can then toggle the facets to filter the data based on their preferences.
To add facet filters to a ModelAdmin class, developers can use the list_filter attribute and specify the facets as a list of strings. For example, to add facet filters for a Book model based on the author and genre fields, the following code can be used:
python
Models.py file
class BookAdmin(admin.ModelAdmin):
list_filter = ('author', 'genre')
By default, the facet filter options are displayed in a list, but developers can customize the appearance and behavior of the facet filters using the list_filter_template attribute.
Overall, the addition of toggleable facet filters to ModelAdmin provides a more user-friendly interface for filtering data in the Django admin, which is an important feature for many Django applications.

Is _facets preserved as changelist filters?

It's preserved when clicking on other filter options (so the issue described earlier). I think it wouldn't preserve if you do things like click on another table/changelist view or click on the breadcrumbs.

Your email has been received and will be addressed by our team shortly.
On Thu, Feb 23, 2023 at 7:02 AM Sarah Boyce @.***>
wrote:

Is _facets preserved as changelist filters?
It's preserved when clicking on other filter options (so the issue
described earlier). I think it wouldn't preserve if you do things like
click on another table/changelist view or click on the breadcrumbs.
—
Reply to this email directly, view it on GitHub
https://github.com/django/django/pull/16495#issuecomment-1441641598, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AG6RARSXPHKQ4YTKBJ7TEJDWY5GUFANCNFSM6AAAAAAUCRCIXA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

I received your email and wanted to confirm that it has been received and
is being reviewed.
On Thu, Feb 23, 2023 at 6:55 AM Mariusz Felisiak @.***>
wrote:

@.**** commented on this pull request.
In tests/admin_filters/tests.py
https://github.com/django/django/pull/16495#discussion_r1115567552:

@@ -1150,7 +1172,7 @@ def test_simplelistfilter(self):

     # Make sure the correct queryset is returned

     queryset = changelist.get_queryset(request)

   self.assertEqual(list(queryset), list(Book.objects.order_by("-id")))

   self.assertSequenceEqual(list(queryset), list(Book.objects.order_by("-id")))

Ah yes because we have two querysets 👍
—
Reply to this email directly, view it on GitHub
https://github.com/django/django/pull/16495#discussion_r1115567552, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AG6RARV2MULO7MOUHXAYJS3WY5FZJANCNFSM6AAAAAAUCRCIXA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Toggle off
Toggle on
🤷 maybe?

I think "show counts / hide counts" would be clearer for the button text here.

I think "show counts / hide counts" would be clearer for the button text here.

I agree.

Thank you :+1: updated
Should I also localize the numbers? So Test (1000) looks like Test (1,000) / Test (1.000)
I think I need to use something like formats.localize(count, use_l10n=True) everywhere if we want it

Is _facets preserved as changelist filters?

It's preserved when clicking on other filter options (so the issue described earlier). I think it wouldn't preserve if you do things like click on another table/changelist view or click on the breadcrumbs.

It looks like it it preserved as a part of changelist filters (_changelist_filters) :+1:

Hide/Show counts should have the same font size as Clear all filters

We should also wrap both in div and move the bottom border from #changelist-filter #changelist-filter-clear a to the new div.

Unless you have a solution come to mind @sarahboyce (which you might! sweat_smile)

I have something for the ordering 9c0f1f5, I have put it in a seperate commit and we can still decide whether to include it or not. +1

I found ordering by facets quite disturbing as the list of choices is constantly changing. I'm also not sure what to do with facets when an option is selected because then all other options appear with (0). It's confusing that changing the filter to an option with (0) shows a non-empty list. We should probably ignore the selected filter when calculating facets for the same option :thinking:
https://user-images.githubusercontent.com/2865885/221117042-45fe0c1f-daa6-4507-903a-e17993da994d.mp4

The size is updated :+1: nice suggestion
Also made it not include the current filter option when one of same group applied (screenshot hopefully illustrates it) but would appreciate feedback on that bit as feels a little hacky.
On the reordering, I can remove it :shrug: I don't really mind, I added it based of @simonw 's suggestion here but also

I don't have a particularly strong opinion about this. I feel that sorting by numerical count makes more sense that sorting alphabetically for most cases, but that's just an intuition based on how I've used these kinds of interfaces in the past - I'm not ready to confidently state that every Django project in existence would benefit more from numerical than from alphabetical sorting here.

I guess with the adjustment that it doesn't apply to the one you selected, it should move a little less (only the ones you weren't looking at move) maybe it's now less disturbing? Or is it still jarring?

@sarahboyce Can you drop reordering (at least for now)? This should simplify the current implementation, e.g. OptionalFacetsMixin would be unnecessary.
I'd like to merge it :star2:

It should be dropped :+1:

@sarahboyce I merged the first commit in 4cb55733527d39ebf58c1987f72a19b7c2e0bac6 and pushed small edits to a few files.
I noticed an issue while polishing this patch, i.e. facets is not preserved when using X total option:
https://user-images.githubusercontent.com/2865885/222430022-c0bffc24-31ff-4ebf-a08c-66590ab7ddf8.mp4
Can you take a look? Please push changes in a separate commit.

Well spotted :+1: thank you for testing :star:

@sarahboyce I tried to move some common logic to the FacetsMixin, what do you think?

@sarahboyce I tried to move some common logic to the FacetsMixin, what do you think?

I like it :+1:

I reorganized and simplified tests with subTest(), we're getting close... :crossed_fingers:

buildbot, test on selenium.

I deployed this on my blog and it's working great!


#2689 - Retrieve SFAS/SAIL Award Values Needed for PT PY Maximums

Handle all award values imported from SFAS/SAIL if the award values are attached to the program year.
Use sfas_part_time_applications and sfas_applications tables to query and fetch the sum of grants.
Set the start date as the program year start date and the end date as the first calculated assessment date for the current application.
Added E2E test scenarios to the verify-assessment-calculation-order

"Should sum the grants and awards from two past applications with different offering intensities and SFAS/SAIL applications data when the applications are for the same student and program year."
"Should sum the awards from SFAS/SAIL applications data when there is no past application and the applications are for the same student and program year."

Screenshot of the assessment values with SFAS part time application record and without.

I am removing the label camunda workflow as there is no workflow change here.

Nice start @lewischen-aot . Please look at the comments. Please leverage the existing framework which could reduce a lot of code.

Thanks for doing the changes @lewischen-aot. It is almost there.
One important comment to addressed raised by @andrewsignori-aot on using the logic to select sfas(FT and PT) applications.
We must check only the start date of sfas applications to see if start_date >= program_year_start_date(from sims) AND start_date < reference asssessment date
https://github.com/bcgov/SIMS/pull/3120/files#r1569257102


:sparkles: add extra client for workload clusters

Hello,
This PR:

adds golangci-lint to improve code quality checks
adds a second k8s client to check remote clusters managed by flux

Rémi

Need a huge rebase, I will reopen it


Pull-Request-Request: DebugConsole UI tweaks/fixes

I've been playing with my own local clone of Kudu's repo to see how easy it is to fix some of the UI quirks and issues in the DebugConsole pages and I've now got something that I think works well and I was wondering if the Kudu team would accept a PR with those changes.
What I have right now is proof-of-concept-y and needs tidying up, which I'm perfectly happy to do, provided that my effort wouldn't be wasted in the event the PR was rejected for policy reasons...
Here's some of the changes/additions I've made:

The console window and file-list now properly fill and resize with the browser window and don't overlap each other.
Added a ".." (parent-directory) item to the directory contents list.
I've also tweaked the overall layout to be more compact and not be as wasteful with screen whitespace.
Changes to make the DebugConsole more like Windows File Explorer:

Added a simple directory tree-view to the left-hand-side (it doesn't eager-load, but it could do without much extra work, I imagine).
Added (optional) Created and File Type columns (file-type information comes from the web-server's own registry)

Added file-selection checkboxes and "Select all" / "Select inverse" options, and context-sensitive buttons to move selected items to subfolders. This includes subdirectories too.

Right now it's a huge pain to try to move ranges of files and subfolders to other directories.

...and I've got a wishlist of my own that's a mile-long which I'll be happy to implement if the stuff I've done already looks good to the project maintainers.
I'm also looking to see if I can cancel long-running console tasks.

Hi
If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request
This way we can better track and assist you on this case
Thanks,
Joaquin Vano
Azure App Service


Implemented percentage values in YogaKit

We still need to wait for the YGUnitPoint PR to be merged :) But please let me know what you think. One caveat: because of a limitation of Swift, a literal value can be automatically understood as a point-based YGValue, but variables have to be explicitly cast. I haven't found a way around it yet:
view.yoga.width = 10 // value == 10, unit == YGUnitPixel

let a: CGFloat = 100
view.yoga.height = a // Compiler error
view.yoga.height = YGValue(a) // works, not great

Very cool! I'll be able to merge this in on Monday, can you rebase and update the new CHANGELOG.md file, and list this as breaking change?

We also need to update this gist so the github docs have been updated.

[ ] Add EXTERN_C_BEGIN and END to the header.
[ ] Update the Changelog
[ ] Add some unit tests. (If you want to put them into a new file, that'd be great. I want to split up YogaKitTests into separate files.

@dshahidehpour Any ideas for improving the problem with Swift variables?

@hartbit Not yet, but I haven't taken much a look yet.

@hartbit, since Swift doesn't allow implicit casting, I think we might be out of luck...
In the meantime, the Pixel rename has landed (as well as a bunch of changes to YogaKit), so, if you want to rebase, we can move forward this.
I would also really appreciate it if you could add an example to the new Sample App for percentage widths.

@hartbit Do you have an update on this? I would love to get this into the next release.

@emilsjolander Hello! Sorry, I've been very busy lately. I'll rebase this ASAP.

No worries! Thanks 👍

@emilsjolander finally rebased. Sorry for the delay!

I'm on vacation this week. @dshahidehpour could you have a look?

@hartbit Sorry this took ages to merge. My bad. Really appreciate this contribution and we are all excited to start using it 👍 👍 👍


revise eqtl

Description of your changes
Cleaning up eQTL notebook a bit and trying to dial back the compute time.

The ISM computes still take too long, but we'd have to get into the helper functions to add options to work with single folds, so I'm pausing here for the moment.


Foundry General Information changes with this installed

The general information section in the options tab inside a world loses some information when this module is installed.
Without Module Management+:

With Module Management+:

Well It loses module count, the removing the name and placing the version of the system twice appears to be a bug

Should be fixed in version <IP_ADDRESS> https://github.com/mouse0270/module-credits/releases/tag/<IP_ADDRESS>
If not let me know.


[master branch only] UI crashes when clicking node with an error message: Buffer is not defined

Pre-requisites

[X] I have double-checked my configuration
[X] I can confirm the issues exists when I tested with :latest
[ ] I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?
THIS DOES NOT RELATES TO RELEASED IMAGES either v3.5.0-rc nor v3.10.0.
Might be local development only?

Summary

UI crashes when we click a node hello1.
Curiously, step-mnss7 is ok.

Procedure

checkout master branch
make start UI=true

My Env

WSL
k3d

Version
master
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: steps-
spec:
  entrypoint: hello-hello-hello

  # This spec contains two templates: hello-hello-hello and whalesay
  templates:
  - name: hello-hello-hello
    # Instead of just running a container
    # This template has a sequence of steps
    steps:
    - - name: hello1            # hello1 is run before the following steps
        template: whalesay
        arguments:
          parameters:
          - name: message
            value: "hello1"
    - - name: hello2a           # double dash => run after previous step
        template: whalesay
        arguments:
          parameters:
          - name: message
            value: "hello2a"
      - name: hello2b           # single dash => run in parallel with previous step
        template: whalesay
        arguments:
          parameters:
          - name: message
            value: "hello2b"

  # This is the same template as from the previous example
  - name: whalesay
    inputs:
      parameters:
      - name: message
    container:
      image: docker/whalesay
      command: [cowsay]
      args: ["{{inputs.parameters.message}}"]

### Logs from the workflow controller

```text
kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

Logs from in your workflow's wait container
kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

Might be related to recent dependency updates? cc @agilgur5

I'm not completely sure, but https://github.com/argoproj/argo-workflows/commit/aac4f89d1649125a7c431e0c92fbc3862e60f494 might cause this problem.
Previous commits are ok.

I can check if I can reproduce. All of my PRs I had no errors locally, but maybe when mixed with dependabot updates something broke.

I'm not completely sure, but aac4f89 might cause this problem.
Previous commits are ok.

Buffer is not defined

So #11628 upgraded to Webpack v5, which no longer auto-adds Node polyfills. Buffer I believe is one of them. In https://github.com/argoproj/argo-workflows/pull/11418#issuecomment-1696260188 I got a build error on Buffer not resolving. This is a run-time error though, so that suggests that a dep might be using Buffer as a global (i.e. did not explicitly import it) 🤔

Oh. That is internal code using Buffer: https://github.com/argoproj/argo-workflows/blob/94fbb3bf27f0746a0b84ea2f654568cc655bfbfb/ui/src/app/shared/pod-name.ts#L38.
That probably requires a polyfill now. I'll look into that.

TIL what an FNV hash is. This comes from 2 year old code in #6925, which was quite literally intended to duplicate server-side code per https://github.com/argoproj/argo-workflows/issues/6865#issuecomment-934930003.
So that makes a bit more sense why server-side JS is being used 😅
Ideally we might be able to replace the hash function with a library that works client-side, but if not, will add a polyfill

Great! Thank you!
FYI, this regression does not included in v3.4.11.
I've checked this by checking out to release-3.4.11 and create local environment.

Yeah I intentionally didn't include those UI changes since they are relatively new and not thoroughly tested yet. Thanks for confirming.

Yea the UI build system being upgraded a major version is definitely more of a risky change and certainly not a bugfix 😅
Idk how long 3.4.x will get backports for (this is the first minor release I've been part of), but if it's a while, we may eventually want to add some of the UI deps changes so that it doesn't diverge too much.

Managed to find a pretty tiny fix that didn't need a polyfill or another library.
See #11766


Placeholder %jobsr_user_jtoplvl_jobName_1% don't parse

*Detailed description of the issue:
---I use the placeholder %jobsr_user_jtoplvl_jobName_1% or 2_3_4... to make a leaderboard per job on my spawn. I use Decent Holograms plugin to make my holograms. Every placeholders looks to parse. Even when I try to make /jobs placeholders parse ... It don't give any return of this placeholder. Could you fix this ? (When I use the internal classement of Jobs (parsed on scoreboard) it works perfectly !
I have no errors in my console & no error on starting.
Jobs version:5.1.2
**Server Type (Spigot/Paper/etc):Paper 1.18.2-388 **
Server Version (using /ver):1.18.2
Relevant plugins (Delete if this isn't needed): DecentHolograms-2.7.9.jar
ProtocolLib : Last Update

%jobsr_user_jtoplvl_jobName_1% placeholder was... broken, to put it lightly. Reworked it and made it actually working, now it will be as %jobsr_jtop_name_[jobName/number][1-15]% which will provide player name by provided job name and place in the top list. Additionally new %jobsr_jtop_level[jobName/number]_[1-15]% will be added to provide level.
2fd03a4384bf2204cc4ef4c04cda07e089f7457e


The code from this SDK is too big! easy solution

I am working on an embedded system where I don't have 256GB of RAM to work with, instead I have 128MB. When I link to the AWS SDK it is adding over 30MB to my app. This is because I am using one or two APIs from a dozen different services. If I touch one API in a service the SDK brings in the full API for that service.  So my app uses about 20 APIs but support for about 1,000 APIs is getting added to my app.
I did an experiment to reduce the SDK size. I went into the API JSON definition file for S3 and manually deleted the definitions for all of the APIs I was not using. Voila, my app shrank 5MB just from adjusting this one service. Cognito is especially bad, I used one API and it pulls in over 400 APIs.
So, could the API generator be modified to let me specify a list of APIs I need in a file? I could then fill in that file and do cmake -DREGENERATE_CLIENTS=1. And I would magically get an SDK that is about 1/20th the size of my current one.
The linker can not eliminate the unused APIs. I tried putting them all in their own linker segments and it had no effect on removing them.  It looks like they are all tied together via virtual functions which stops the linker from tossing them. Deleting the defintions from JSON file is a good solution. I am already using -DBUILD_ONLY and -DMINIMUM_SIZE but need even more shrinkage.

Customized model file is supported. But it's a complicated work to do to
put different APIs from different services in one file.  And use one file
instead of multiple files will not make the target much smaller(generated
code is the same, just in different files). My suggestion for you is to
delete unused apis from the original model files. And strip the target to
make it smaller.
On Wed, Nov 8, 2017 at 6:13 PM Jon Smirl<EMAIL_ADDRESS>wrote:

I am working on an embedded system where I don't have 256GB of RAM to work
with, instead I have 128MB. When I link to the AWS SDK it is adding over
30MB to my app. This is because I am using one or two APIs from a dozen
different services. If I touch one API in a service the SDK brings in the
full API for that service. So my app uses about 20 APIs but support for
about 1,000 APIs is getting added to my app.
I did an experiment to reduce the SDK size. I went into the API JSON
definition file for S3 and manually deleted the definitions for all of the
APIs I was not using. Voila, my app shrank 5MB just from adjusting this one
service. Cognito is especially bad, I used one API and it pulls in over 400
APIs.
So, could the API generator be modified to let me specify a list of APIs I
need in a file? I could then fill in that file and do cmake
-DREGENERATE_CLIENTS=1. And I would magically get an SDK that is about
1/20th the size of my current one.
The linker can not eliminate the unused APIs. I tried putting them all in
their own linker segments and it had no effect on removing them. It looks
like they are all tied together via virtual functions which stops the
linker from tossing them. Deleting the defintions from JSON file is a good
solution. I am already using -DBUILD_ONLY and -DMINIMUM_SIZE but need even
more shrinkage.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/aws/aws-sdk-cpp/issues/724, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADTsCEGpGbiJ4nm5cjakdbLfiMM9XhFFks5s0l-2gaJpZM4QXVXZ
.

--
Best Regards!
Liang.
Software Engineer
Game Developer

I agree. I am hoping AWS will provide an automated way to strip out the unneeded definitions. I want it automated so that I can continue receiving updates to the SDK code.
If not, I guess I can write a program to do it myself. I would just rather have them maintain the code.

If you are static linking the executable wouldn’t this be done for you automatically by the linker?
Sent from my iPhone

On Nov 8, 2017, at 6:44 PM, Jon Smirl<EMAIL_ADDRESS>wrote:
I agree. I am hoping AWS will provide an automated way to strip out the unneeded definitions. I want it automated so that I can continue receiving updates to the SDK code.
If not, I guess I can write a program to do it myself. I would just rather have them maintain the code.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I am statically linking and it does not happen with the linker. I believe that is due to a shared base class and virtual functions. It is not possible for the linker to be sure that the function is not used.
I also tried the scheme with '-fdata-sections -ffunction-sections -Wl,--gc-sections' and that did not eliminate them either.
If this was C code the linker would be able to eliminate them, with C++ it can't do it.

There's definitely room for improvement here.
We need to conditionally mark the APIs as virtual via a compile-time definition. And we need to compile with  -ffunction-sections -fdata-sections and link with -dead_strip.
In my local testing this brought down the size of the unit test executables by over 60%.

(apologies if this isn't relevant):
C++ compilers can't eliminate unused virtual functions. I.e. if you reference a vtable -- you'll pull in all it's functions (and everything they reference). Old problem. GCC had this feature, but it wasn't working very well, so it was removed. Note that one class can have multiple vtables and even if function is overridden and never used -- it still gets pulled in (along with it's dependencies)

Hi @jonsmirl , after reading thru this thread I realized that I'm having the same situation that you had a few years back... I'm working on an embedded system with a very small memory I'm trying to reduce the size of the AWS CPP SDK, which even after adding all the build options provided by AWS is still too big... Coincidently the set of features I'm looking for is similar to yours, I'm just using for now S3 PutObject and honestly do not need that huge amount of APIs built for S3...
I'm not an embedded developer, so this is proving to be quite the challenge for me... Do you still have samples around of what you did to reduce the SDK size?
Regards!

I don't have access to the old project anymore, but the solution is to stop using the AWS and make direct HTTPS calls using your own code.  For S3 the simplest solution is to use pre-signed URLs.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html

I suggest not using this SDK unless you need some specific non-trivial
functionality it provides. We did a mistake of integrating it in our
product couple of years ago and now are regretting it -- quite a few
problems that we had to hack/workaround because fixes were talking too
long. Some of those problems aren't fixed to this day. Now we have a
Frankenstein in the codebase that is hard to upgrade because of these hacks
-- it makes sense to simply invest a bit more and replace with a
lightweight solution where we directly form HTTP requests ourselves and
process responses.
On Mon, Jun 20, 2022, 3:52 PM Jon Smirl @.***> wrote:

I don't have access to the old project anymore, but the solution is to
stop using the AWS and make direct HTTPS calls using your own code. For S3
the simplest solution is to use pre-signed URLs.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html
—
Reply to this email directly, view it on GitHub
https://github.com/aws/aws-sdk-cpp/issues/724#issuecomment-1160476418,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFKSIGFYNDIMJDUGLSEUAQLVQBZQ5ANCNFSM4EC5KXMQ
.
You are receiving this because you commented.Message ID:
@.***>


[[FIX]] Remove module import declaration

Fixes #2395 to remove the deprecated module import declaration from the parser and the associated test.

Coverage increased (+0.02%) to 96.58% when pulling fb2cf9ec969b61bb168bc6caa7f913067c5215e1 on jamestaylr:master into 2444a0463e1a99d46e4afa50ed934c317265529d on jshint:master.

lgtm. @rwaldron this ok to you?

@jugglinmike are we okay pulling this given (again) its technically a breaking change, though given the usage of the old module pattern it may be minimal. master or jshint 3?

Yeah, given that JSHint is a tool for linting JavaScript, and that this is official no longer JavaScript, we can call this change a bug fix.

@lukeapage Mind squashing and doing the honors?

Thanks will do

on master, thanks @jamestaylr 1749ac06d1aec9c195b3482171c5a6a94c3845a5


Improvements to determining valid license choices

Shorten the case distinction via a helper function. The helper function can neither be local or an extension function due to its use of contract.
While at it, add some helpful code comment for the cases.

See https://github.com/oss-review-toolkit/ort/pull/8106 instead.


Correct typo in README

Hello, thanks for providing this library. I was looking at the README and noticed a little typo, so I thought I would suggest a little PR.
Love the name of this package by the way, it's very clever 😃

💚 💙 💜 💛 ❤


AirSimRescue.zip

Hi,
I just wanted to try out the lab.
However, when I try to download the zip file AirSimRescue.zip, I get the following error message:
The specified resource does not exist. RequestId:30c51061-001e-00b8-65ff-88d453000000 Time:2021-08-04T07:07:40.9420902Z
Can you please re-upload or provide me with the file or a link to it.
Thanks in advance.

same promble may i ask did you solved this question?

Has this problem been solved?

Unfortunately, the problem still persists, no replies for 2.5 years(


Error setting up Lambda

When I try to parse the layer you provided I get this error:
arn:aws:lambda:us-east-2:319723967016:layer:css-dashboard-writer:4
You are not authorized to perform: lambda:GetLayerVersion
Without this I am not able to set up lambda to process logs from s3 and send to our influx db
Any help greatly appreciated!

Thanks for reporting - can you please outline the exact steps you take to replicate this and share a screenshot? Then we'll be able to investigate.

Thanks for reporting - can you please outline the exact steps you take to replicate this and share a screenshot? Then we'll be able to investigate.

I followed these instructions:

Create an IAM execution role with permissions: AWSLambdaBasicExecutionRole + AmazonS3FullAccess
Go to 'Services/Lambda', then select your S3 bucket region (upper right corner)
Add a new Lambda function with a name, a Python 3.7 environment and your execution role
Add a 'Trigger': Select S3, your test bucket, All object create events and suffix .MF4
Create a zip containing lambda_handler.py, utils.py and inputs.py (ensure your inputs are updated)
Upload the zip via the Lambda 'Actions' button and confirm that your code shows in the online code editor
Find the pre-built layer ARN for your AWS S3 region in the lambda_layer_arns.csv file
In the 'Designer' tap, click Layers/Add a layer/Specify an ARN and parse your ARN
When I try to parse the ARN from your CSV file for my region I get the error shown in the attached screenshot

I followed these instructions:

Create an IAM execution role with permissions: AWSLambdaBasicExecutionRole + AmazonS3FullAccess
Go to 'Services/Lambda', then select your S3 bucket region (upper right corner)
Add a new Lambda function with a name, a Python 3.7 environment and your execution role
Add a 'Trigger': Select S3, your test bucket, All object create events and suffix .MF4
Create a zip containing lambda_handler.py, utils.py and inputs.py (ensure your inputs are updated)
Upload the zip via the Lambda 'Actions' button and confirm that your code shows in the online code editor
Find the pre-built layer ARN for your AWS S3 region in the lambda_layer_arns.csv file
In the 'Designer' tap, click Layers/Add a layer/Specify an ARN and parse your ARN
When I try to parse the ARN from your CSV file for my region I get the error shown in the attached screenshot

It almost looks like the AWSLambdaBasicExecutionRole  does not give any actual access to the lambda service? It only lists write access to CLoudwatch logs?

It almost looks like the AWSLambdaBasicExecutionRole  does not give any actual access to the lambda service? It only lists write access to CLoudwatch logs?

Hi again, did you also add the AmazonS3FullAccess permission to the user?
I tested just now and I'm unable to replicate this on my end. I tested with that ARN and using my user with AWSLambdaBasicExecutionRole + AmazonS3FullAccess as policies. It's not enough to only have the AWSLambdaBasicExecutionRole I believe.

Hi again, did you also add the AmazonS3FullAccess permission to the user?
I tested just now and I'm unable to replicate this on my end. I tested with that ARN and using my user with AWSLambdaBasicExecutionRole + AmazonS3FullAccess as policies. It's not enough to only have the AWSLambdaBasicExecutionRole I believe.

Yes I followed the instructions exactly. See attached. I am logged in as the root user for the AWS account.
Is it possible that the ARN is not giving me access to it?

Yes I followed the instructions exactly. See attached. I am logged in as the root user for the AWS account.
Is it possible that the ARN is not giving me access to it?

Which user exacly has to have those permissions?  The user logged in to AWS?  I am logged in as the root user for the account
which should have full access to everything right?  I created the role in your instructions. How do I apply that role to
the logged in AWS user?
From: Martin Falch
Sent: Saturday, January 30, 2021 5:12 PM
To: CSS-Electronics/dashboard-writer
Cc: fmahannah ; Author
Subject: Re: [CSS-Electronics/dashboard-writer] Error setting up Lambda (#2)
Hi again, did you also add the AmazonS3FullAccess permission to the user?
I tested just now and I'm unable to replicate this on my end. I tested with that ARN and using my user with AWSLambdaBasicExecutionRole + AmazonS3FullAccess as policies. It's not enough to only have the AWSLambdaBasicExecutionRole I believe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Which user exacly has to have those permissions?  The user logged in to AWS?  I am logged in as the root user for the account
which should have full access to everything right?  I created the role in your instructions. How do I apply that role to
the logged in AWS user?
From: Martin Falch
Sent: Saturday, January 30, 2021 5:12 PM
To: CSS-Electronics/dashboard-writer
Cc: fmahannah ; Author
Subject: Re: [CSS-Electronics/dashboard-writer] Error setting up Lambda (#2)
Hi again, did you also add the AmazonS3FullAccess permission to the user?
I tested just now and I'm unable to replicate this on my end. I tested with that ARN and using my user with AWSLambdaBasicExecutionRole + AmazonS3FullAccess as policies. It's not enough to only have the AWSLambdaBasicExecutionRole I believe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I gave those permissions to admin group, and to an IAM user account and I get the same error logged in as each.
Sorry

I gave those permissions to admin group, and to an IAM user account and I get the same error logged in as each.
Sorry

Hi again,
I suggest you send us your AWS login credentials to our mail at<EMAIL_ADDRESS>Please provide a link to this thread there and we'll try to login directly and see if we can get clarity on what is going on.
The mail will get to me so I'll be helping you out on it.
best,
Martin

Hi again,
I suggest you send us your AWS login credentials to our mail at<EMAIL_ADDRESS>Please provide a link to this thread there and we'll try to login directly and see if we can get clarity on what is going on.
The mail will get to me so I'll be helping you out on it.
best,
Martin

I sent you the info you requested. Thanks!

I sent you the info you requested. Thanks!

This should be solved now via the latest commit, with an updated set of ARN layers that are now correctly made public

This should be solved now via the latest commit, with an updated set of ARN layers that are now correctly made public

Sorry to be a pest but now when I try to run the test I get this error
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'lambda_function'
I have the three python files in the folder uploaded via zip file per instructions, so I am not sure if this might be an issue with the new layer?
I did not replace those files since github only showed changes to the csv with the arns in it
Thanks
From: Martin Falch
Sent: Sunday, January 31, 2021 2:24 PM
To: CSS-Electronics/dashboard-writer
Cc: fmahannah ; Author
Subject: Re: [CSS-Electronics/dashboard-writer] Error setting up Lambda (#2)
This should be solved now via the latest commit, with an updated set of ARN layers that are now correctly made public
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Sorry to be a pest but now when I try to run the test I get this error
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'lambda_function'
I have the three python files in the folder uploaded via zip file per instructions, so I am not sure if this might be an issue with the new layer?
I did not replace those files since github only showed changes to the csv with the arns in it
Thanks
From: Martin Falch
Sent: Sunday, January 31, 2021 2:24 PM
To: CSS-Electronics/dashboard-writer
Cc: fmahannah ; Author
Subject: Re: [CSS-Electronics/dashboard-writer] Error setting up Lambda (#2)
This should be solved now via the latest commit, with an updated set of ARN layers that are now correctly made public
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi you'll need to go to the Runtime settingsInfo and rename the lambda_function to match the filename of your main script, in your case lambda_handler. To minimize confusion, I've renamed the script to lambda_function.py as this should eliminate this confusion going forward. Let me know if it works then.

Hi you'll need to go to the Runtime settingsInfo and rename the lambda_function to match the filename of your main script, in your case lambda_handler. To minimize confusion, I've renamed the script to lambda_function.py as this should eliminate this confusion going forward. Let me know if it works then.

It seems that I must still be missing some files. I fixed the issue above and now the error is
{
"errorMessage": "Unable to import module 'lambda_handler': No module named 'utils_db'",
"errorType": "Runtime.ImportModuleError"
}

Hi again, you'll need in your folder also the utils_db.py file - can you try this?

Yes I tried that

Actually now I see a function error instead. Where should files needed for dbc conversion be placed? It is looking for our dbc file
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/var/task/CSS-Electronics-OBD2-v1.4.dbc'
Thanks

For the test data you provided, what should be entered for the bucket info as now it is throwing an error that the bucket was not found?  Getting closer and I do appreciate your help
{
"errorMessage": "The specified bucket does not exist",
"errorType": "FileNotFoundError",
"stackTrace": [
"  File "/var/task/lambda_function.py", line 22, in lambda_handler\n    df_raw, device_id = proc.get_raw_data(log_file)\n",
"  File "/var/task/utils.py", line 180, in get_raw_data\n    with self.fs.open(log_file, "rb") as handle:\n",
"  File "/opt/python/lib/python3.7/site-packages/fsspec/spec.py", line 903, in open\n    **kwargs\n",
"  File "/opt/python/lib/python3.7/site-packages/s3fs/core.py", line 378, in _open\n    autocommit=autocommit, requester_pays=requester_pays)\n",
"  File "/opt/python/lib/python3.7/site-packages/s3fs/core.py", line 1097, in init\n    cache_type=cache_type)\n",
"  File "/opt/python/lib/python3.7/site-packages/fsspec/spec.py", line 1224, in init\n    self.details = fs.info(path)\n",
"  File "/opt/python/lib/python3.7/site-packages/s3fs/core.py", line 546, in info\n    return super(S3FileSystem, self).info(path)\n",
"  File "/opt/python/lib/python3.7/site-packages/fsspec/spec.py", line 577, in info\n    out = self.ls(self._parent(path), detail=True, **kwargs)\n",
"  File "/opt/python/lib/python3.7/site-packages/s3fs/core.py", line 619, in ls\n    files = self._ls(path, refresh=refresh)\n",
"  File "/opt/python/lib/python3.7/site-packages/s3fs/core.py", line 487, in _ls\n    return self._lsdir(path, refresh)\n",
"  File "/opt/python/lib/python3.7/site-packages/s3fs/core.py", line 409, in _lsdir\n    raise translate_boto_error(e)\n"
]
}

OK I have it closer now and when triggered it is giving me an error about my influx db permissions so I should be able to figure it out. Thanks again for all the help

Hi again,
you'll need to place the relevant DBC file as part of the zip you create - we'll note this explicitly in the README.
When testing the data using the JSON test inputs as described, you'll need to use "valid" test data inputs if you want to get a successful response. Alternatively, you can "simply" test by uploading a log file via CANcloud once the function is setup and watching the logs.

I finally have everything working. tested by putting files into the s3 bucket and using cloudwatch to monitor the results. It correctly put the data into the influx db and the dashboard updated.
Thanks again!

Great! Thanks for pointing out some of our README gaps and the layer issue! If you have ideas for further improvement, let us know.


Sort btn highlight

If a sort button is not an actual button (as in the example), the text on it can be highlighted accidentally with a double click, which is a bit awkward.
This patch fixes the problem without having to add anything to the CSS, but it's a lot of lines to do the job.
The alternative is to use an actual button element for the sort, instead of a span.

Hmm, i like the thought of disabling the highlight functionality. But I don't think that the behavior is worth the lines, it's too easy just to write own css for this. Sorry.
But thanks for you commitment!


g++ v4.8.2 (Intel Edison) error: 'Result' not a member of 'mraa'

When I try to compile some code using MRAA on my Edison g++ tell's me there is no 'Result' in namespace mraa.
Compiling (NOT LINKING!) with:
g++ -std=gnu++11 -Wall -c GPIO.cpp -o GPIO.o
Failes with:

GPIO.cpp:57:7: error: 'Result' is not a member of 'mraa'
mraa::Result response = gpio->dir(mraa::DIR_OUT);

The same code compiles fine on my Mac and with Bitbake/Crosscompiling. But on Target it failes.

Can you post your full code as a gist? At a glance I'm a bit confused

@bhorn indeed please provide your code - I've just tried the c++ blink example, which has the same string as the one in your error message (so I guess you took the example and modified it?) - and it compiled just fine:
root@edison1:~# g++ -std=gnu++11 -Wall -c mraa-test-cpp.cpp -o mraa-test-cpp.o
root@edison1:~# opkg list-installed |grep mraa
mraa - 1.1.2

It's hard to post some Code. Basically it's just the c++ blinkio example.
I can't even compile the example. Not the blinkio, not the pwm.
Same error every time.

root@edison:~/devel/mraa/examples/c++# g++ -std=gnu++11 -Wall Blink-IO.cpp -o io
e++.cpp: In function 'int main(int, char**)':
e++.cpp:60:16: error: 'ERROR_UNSPECIFIED' is not a member of 'mraa'
         return mraa::ERROR_UNSPECIFIED;
                ^
e++.cpp:62:5: error: 'Result' is not a member of 'mraa'
     mraa::Result response = gpio->dir(mraa::DIR_OUT);
     ^
e++.cpp:62:18: error: expected ';' before 'response'
     mraa::Result response = gpio->dir(mraa::DIR_OUT);
                  ^
e++.cpp:63:9: error: 'response' was not declared in this scope
     if (response != mraa::SUCCESS) {
         ^
e++.cpp:63:21: error: 'SUCCESS' is not a member of 'mraa'
     if (response != mraa::SUCCESS) {
                     ^
e++.cpp:69:9: error: 'response' was not declared in this scope
         response = gpio->write(1);
         ^
e++.cpp:75:12: error: 'response' was not declared in this scope
     return response;
            ^

MRAA got installed via Yocto.

Essentially it looks so wrong that either I'd guess there's an error
previous to that one that is causing g++ to go crazy. Or you have an issue
with the headers. What headers are you including and are they there &
contain the right stuff? Also what version of mraa is this?
On 25 Jul 2016 7:45 a.m., "Benedikt-Alexander Mokroß" <
<EMAIL_ADDRESS>wrote:
It's hard to post some Code. Basically it's just the c++ blinkio example.
I can't even compile the example. Not the blinkio, not the pwm.
Same error every time.
root@edison:~/devel/mraa/examples/c++# g++ -std=gnu++11 -Wall Blink-IO.cpp -o io
e++.cpp: In function 'int main(int, char**)':
e++.cpp:60:16: error: 'ERROR_UNSPECIFIED' is not a member of 'mraa'
return mraa::ERROR_UNSPECIFIED;
^
e++.cpp:62:5: error: 'Result' is not a member of 'mraa'
mraa::Result response = gpio->dir(mraa::DIR_OUT);
^
e++.cpp:62:18: error: expected ';' before 'response'
mraa::Result response = gpio->dir(mraa::DIR_OUT);
^
e++.cpp:63:9: error: 'response' was not declared in this scope
if (response != mraa::SUCCESS) {
^
e++.cpp:63:21: error: 'SUCCESS' is not a member of 'mraa'
if (response != mraa::SUCCESS) {
^
e++.cpp:69:9: error: 'response' was not declared in this scope
response = gpio->write(1);
^
e++.cpp:75:12: error: 'response' was not declared in this scope
return response;
^
MRAA got installed via Yocto.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/intel-iot-devkit/mraa/issues/547#issuecomment-234853153,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfZZu5NbcoD8esKMzBfOf_IPWBZBNWvks5qZFuegaJpZM4JRt3D
.

I use the mraa.hpp like in the example. The headers are in /usr/include on my Edison (/usr/include/mraa/ is there, too).
This mraa.hpp includes
#include "mraa/common.hpp"
#include "mraa/pwm.hpp"
#include "mraa/aio.hpp"
#include "mraa/gpio.hpp"
#include "mraa/i2c.hpp"
#include "mraa/spi.hpp"
#include "mraa/uart.hpp"

All the enums are defined in types.h, right? Shouldn't be there a types.hpp of some sort with the enums in a namespace mraa{enum Result {[...]};[...]}?
Like I said, everything was installed by Yocto (using the official Intel-Sources).

Try get the version with:
Is -l /usr/lib/libmraa*
There's lots of yocto based images flying around what does cat /etc/os-release say?
Types.hpp gets included from those headers see common.hpp and others so
that's why it's not in mraa.hpp it's just not necessary.
This is really odd, can you try compile mraa from git on the board or
compile an example verbatim?
On 25 Jul 2016 10:55 a.m., "Benedikt-Alexander Mokroß" <
<EMAIL_ADDRESS>wrote:

I use the mraa.hpp like in the example. The headers are in /usr/include on
my Edison (/usr/include/mraa/ is there, too).
This mraa.hpp includes
#include "mraa/common.hpp"
#include "mraa/pwm.hpp"
#include "mraa/aio.hpp"
#include "mraa/gpio.hpp"
#include "mraa/i2c.hpp"
#include "mraa/spi.hpp"
#include "mraa/uart.hpp"
All the enums are defined in types.h, right? Shouldn't be there a
types.hpp of some sort with the enums in a namespace mraa{enum Result
{[...]};[...]}?
Like I said, everything was installed by Yocto (using the official
Intel-Sources).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/intel-iot-devkit/mraa/issues/547#issuecomment-234911108,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfZZntoUam0WUCjgPUE8zzzkA3RJ2Krks5qZIgZgaJpZM4JRt3D
.

It might be an older version. What does opkg command like the one in my previous post return on your board?

Oh. /usr/lib/libmraa.so.0.6.1.
So the Yocto-Reciepe installs a (very) old Version. I'll update the recipes...
This is a bit embarrassing. I should have checked this first.