How to make bounding boxes hollow?

hi dustin,
I use python for detection via mobilenetv2. It worked very well. However the bounding boxes are solid. I want to make it hollow.
The action of adding a bounding box is operated by the cpp library.I have found the cudaOverlay.cu file which is located in jetson inference/utils/cuda/. Is this file correct? How can I change the function to make it hollow? Do I need to reinstall jetson inference after the modification is completed?
Thank you very much!

Here is the content of cudaOverlay.cu.
template
global void gpuRectFill( T* input, T* output, int width, int height,
float4* rects, int numRects, float4 color )
{
const int x = blockIdx.x * blockDim.x + threadIdx.x;
const int y = blockIdx.y * blockDim.y + threadIdx.y;
if( x >= width || y >= height )
	return;

const T px_in  = input[ y * width + x ];
      T px_out = px_in;

const float fx = x;
const float fy = y;

//const float thick = 10.0f;
const float alpha = color.w / 255.0f;
const float ialph = 1.0f - alpha;

for( int nr=0; nr < numRects; nr++ )
{
	const float4 r = rects[nr];

	printf("%i %i %i  %f %f %f %f\n", numRects, x, y, r.x, r.y, r.z, r.w);

	if( fy >= r.y && fy <= r.w /*&& (eq_less(fx, r.x, ep) || eq_less(fx, r.z, ep))*/ )
	{
		if( fx >= r.x && fx <= r.z /*&& (eq_less(fy, r.y, ep) || eq_less(fy, r.w, ep))*/ )
		{
			printf("cuda rect %i %i\n", x, y);

			px_out.x = alpha * color.x + ialph * px_out.x;
			px_out.y = alpha * color.y + ialph * px_out.y;
			px_out.z = alpha * color.z + ialph * px_out.z;
		}
	}
}

output[y * width + x] = px_out;

}

Hi @wrz57661, the detectNet overlay code is in detectNet.cu:   https://github.com/dusty-nv/jetson-inference/blob/master/c/detectNet.cu
It is similar to cudaOverlay, except it is specialized to draw detectNet::Detection lists.
Also, if you note the commented out parts from cudaOverlay like eq_less(fx, r.x, ep) || eq_less(fx, r.z, ep) - it is from when I previously tried line rendering (instead of filled box).  However unfortunately it didn't work for some reason...

Thank you very much,dustin!  I read the detectNet.cu and found that I'm not familiar with C++. I couldn't change it because I don't want to damage it.
So I took another measure to achieve my goal.
detections = model.Detect(img, width, height,"labels,conf")
I blocked the  overlay box function and got the detections' left,top,width,height.Then use opencv to add rectangle.It worked. Thank you again for your reply!

Hi @wrz57661
Can you share what you set as the overlay parameter? E.g., what does 'conf' stand for? How did you link it with openCV to get the bounding boxes?
Thanks,
Sam

Hi Dustin
I want to draw boxe in specific coordinate in the video, i'm using python, how i do that with jetson.utils? I also want to detect just human object, how to do that with jetson.inference. the goal is to detect human inside specific box in the video.
thank you

@samiit Sorry for watching you too late!
In the example detectnet.py,63th row is "detections = net.Detect(img, overlay=opt.overlay)".
You can see opt.overlay == "box,labels,conf" in 38th row.
I replace it with None or null.
After net.Detect is done,the model will output dictionary include left,Top,Width,Height keys for every boundingbox, you can use these data to draw.

Thanks @wrz57661, I will try it out

Thank you very much,dustin!@dusty-nv  I read the detectNet.cu and found that I'm not familiar with C++. I couldn't change it because I don't want to damage it.
So I took another measure to achieve my goal.
detections = model.Detect(img, width, height,"labels,conf")
I blocked the  overlay box function and got the detections' left,top,width,height.Then use opencv to add rectangle.It worked. Thank you again for your reply!

When you used opencv, did it decrease your FPS? Also how were you able to integrate opencvs rectangle option into the gstreamer? I would love to see your code for it if that's possible.

@samiit Sorry for watching you too late!
In the example detectnet.py,63th row is "detections = net.Detect(img, overlay=opt.overlay)".
You can see opt.overlay == "box,labels,conf" in 38th row.
I replace it with None or null.
After net.Detect is done,the model will output dictionary include left,Top,Width,Height keys for every boundingbox, you can use these data to draw.

it kinda sux that you are being so vague with helping others! the image is a cuda image and is not that simple to just draw on. It would not of been hard for you to show people what had to be done.  it is clearly not as simple as drawing a rectangle on it. You asked for help in the first place and people tried to help you the least you can do is behave that way in kind!!

This is the output when attempting to draw on the image before calling output.Render(img):
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter1
[gstreamer] gstreamer changed state from NULL to READY ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse1
[gstreamer] gstreamer changed state from NULL to READY ==> queue0
[gstreamer] gstreamer changed state from NULL to READY ==> qtdemux1
[gstreamer] gstreamer changed state from NULL to READY ==> filesrc0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter1
[gstreamer] gstreamer changed state from READY to PAUSED ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse1
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status CREATE ==> sink
[gstreamer] gstreamer changed state from READY to PAUSED ==> qtdemux1
[gstreamer] gstreamer changed state from READY to PAUSED ==> filesrc0
[gstreamer] gstreamer stream status ENTER ==> sink

(python3:20443): GStreamer-CRITICAL **: 14:42:57.162: gst_caps_is_empty: assertion 'GST_IS_CAPS (caps)' failed

(python3:20443): GStreamer-CRITICAL **: 14:42:57.162: gst_caps_truncate: assertion 'GST_IS_CAPS (caps)' failed

(python3:20443): GStreamer-CRITICAL **: 14:42:57.162: gst_caps_fixate: assertion 'GST_IS_CAPS (caps)' failed

(python3:20443): GStreamer-CRITICAL **: 14:42:57.162: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:20443): GStreamer-CRITICAL **: 14:42:57.162: gst_structure_get_string: assertion 'structure != NULL' failed

(python3:20443): GStreamer-CRITICAL **: 14:42:57.162: gst_mini_object_unref: assertion 'mini_object != NULL' failed
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Allocating new output: 1088x1088 (x 14), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1080, nFrameHeight = 1080
[gstreamer] gstDecoder -- onPreroll()
[gstreamer] gstreamer message stream-start ==> pipeline0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer message duration-changed ==> h264parse1
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ /\ AVC", language-code=(string)en, bitrate=(uint)10090419;
[gstreamer] gstreamer mysink taglist, datetime=(datetime)2021-05-18T19:49:29Z, private-qt-tag=(sample){ 00000017a954494d000b000030303a30323a30303a3233:None:R3N0U2VnbWVudCwgZmxhZ3M9KEdzdFNlZ21lbnRGbGFncylHU1RfU0VHTUVOVF9GTEFHX05PTkUsIHJhdGU9KGRvdWJsZSkxLCBhcHBsaWVkLXJhdGU9KGRvdWJsZSkxLCBmb3JtYXQ9KEdzdEZvcm1hdClHU1RfRk9STUFUX1RJTUUsIGJhc2U9KGd1aW50NjQpMCwgb2Zmc2V0PShndWludDY0KTAsIHN0YXJ0PShndWludDY0KTAsIHN0b3A9KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTUsIHRpbWU9KGd1aW50NjQpMCwgcG9zaXRpb249KGd1aW50NjQpMCwgZHVyYXRpb249KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTU7AA__:YXBwbGljYXRpb24veC1nc3QtcXQtX3RpbS10YWcsIHN0eWxlPShzdHJpbmcpaXNvOwA_, 0000000ea9545343000200003235:None:R3N0U2VnbWVudCwgZmxhZ3M9KEdzdFNlZ21lbnRGbGFncylHU1RfU0VHTUVOVF9GTEFHX05PTkUsIHJhdGU9KGRvdWJsZSkxLCBhcHBsaWVkLXJhdGU9KGRvdWJsZSkxLCBmb3JtYXQ9KEdzdEZvcm1hdClHU1RfRk9STUFUX1RJTUUsIGJhc2U9KGd1aW50NjQpMCwgb2Zmc2V0PShndWludDY0KTAsIHN0YXJ0PShndWludDY0KTAsIHN0b3A9KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTUsIHRpbWU9KGd1aW50NjQpMCwgcG9zaXRpb249KGd1aW50NjQpMCwgZHVyYXRpb249KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTU7AA__:YXBwbGljYXRpb24veC1nc3QtcXQtX3RzYy10YWcsIHN0eWxlPShzdHJpbmcpaXNvOwA_, 0000000da954535a0001000031:None:R3N0U2VnbWVudCwgZmxhZ3M9KEdzdFNlZ21lbnRGbGFncylHU1RfU0VHTUVOVF9GTEFHX05PTkUsIHJhdGU9KGRvdWJsZSkxLCBhcHBsaWVkLXJhdGU9KGRvdWJsZSkxLCBmb3JtYXQ9KEdzdEZvcm1hdClHU1RfRk9STUFUX1RJTUUsIGJhc2U9KGd1aW50NjQpMCwgb2Zmc2V0PShndWludDY0KTAsIHN0YXJ0PShndWludDY0KTAsIHN0b3A9KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTUsIHRpbWU9KGd1aW50NjQpMCwgcG9zaXRpb249KGd1aW50NjQpMCwgZHVyYXRpb249KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTU7AA__:YXBwbGljYXRpb24veC1nc3QtcXQtX3Rzei10YWcsIHN0eWxlPShzdHJpbmcpaXNvOwA_ }, container-format=(string)"ISO\ MP4/M4A", image-orientation=(string)rotate-0;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", language-code=(string)en, bitrate=(uint)10090419;
[gstreamer] gstDecoder recieve caps:  video/x-raw, format=(string)NV12, width=(int)1080, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
[gstreamer] gstDecoder -- recieved first frame, codec=h264 format=nv12 width=1080 height=1080 size=1749600
RingBuffer -- allocated 4 buffers (1749600 bytes each, 6998400 bytes total)
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer message async-done ==> pipeline0
[gstreamer] gstreamer message new-clock ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> mysink
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> qtdemux1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> filesrc0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> pipeline0
RingBuffer -- allocated 4 buffers (3499200 bytes each, 13996800 bytes total)
detection: <detectNet.Detection object>
   -- ClassID: 2
   -- Confidence: 0.780762
   -- Left:    202.104
   -- Top:     487.266
   -- Right:   572.168
   -- Bottom:  780.798
   -- Width:   370.063
   -- Height:  293.533
   -- Area:    108626
   -- Center:  (387.136, 634.032)
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", language-code=(string)en, bitrate=(uint)10090419, minimum-bitrate=(uint)18565000, maximum-bitrate=(uint)18565000;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", language-code=(string)en, bitrate=(uint)10090419, minimum-bitrate=(uint)7159800, maximum-bitrate=(uint)18565000;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", language-code=(string)en, bitrate=(uint)10090419, minimum-bitrate=(uint)7159800, maximum-bitrate=(uint)19658800;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", language-code=(string)en, bitrate=(uint)10090419, minimum-bitrate=(uint)361200, maximum-bitrate=(uint)19658800;
Segmentation fault (core dumped)

So how does one draw on the cuda image and feed it back into gstreamer without crashing it please??

You need to use cudaToNumpy() and cudaFromNumpy() - https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-image.md#converting-to-numpy-arrays

You need to use cudaToNumpy() and cudaFromNumpy() - https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-image.md#converting-to-numpy-arrays

thank you very much will give it a go now :)

Ok here is the code to achieve this, note I did a quick and dirty fix for getting the labels but its enough to get anyone going at leas the box issue is solved
for those wondering how much time it adds it is best to test that on your system, just uncomment the time_perf stuff. For me each box took between 0.02 and 0.03 seconds to draw and composite.
import jetson.inference
import jetson.utils
import argparse
import sys
import numpy
import cv2
from time import perf_counter

# parse the command line
parser = argparse.ArgumentParser(description="inference test tool",
                                 formatter_class=argparse.RawTextHelpFormatter,
                                 epilog=jetson.inference.detectNet.Usage() +
                                        jetson.utils.videoSource.Usage() + jetson.utils.videoOutput.Usage() + jetson.utils.logUsage())

parser.add_argument("input_URI", type=str, default="", nargs='?', help="URI of the input stream")
parser.add_argument("output_URI", type=str, default="", nargs='?', help="URI of the output stream")
parser.add_argument("--network", type=str, default="ssd-mobilenet-v2",
                    help="pre-trained model to load (see below for options)")
parser.add_argument("--overlay", type=str, default="box,labels,conf",
                    help="detection overlay flags (e.g. --overlay=box,labels,conf)\nvalid combinations are:  'box', "
                         "'labels', 'conf', 'none'")
parser.add_argument("--threshold", type=float, default=0.5, help="minimum detection threshold to use")
# added labels argument
parser.add_argument("--labels", type=str, default="labels.txt", help="labels txt file")

is_headless = ["--headless"] if sys.argv[0].find('console.py') != -1 else [""]

try:
    opt = parser.parse_known_args()[0]
except:
    print("")
    parser.print_help()
    sys.exit(0)

# load the object detection network
net = jetson.inference.detectNet(opt.network, sys.argv, opt.threshold)

# create video sources & outputs
input = jetson.utils.videoSource(opt.input_URI, argv=sys.argv)
output = jetson.utils.videoOutput(opt.output_URI, argv=sys.argv + is_headless)

labels_for_box = opt.labels
label_file = open(labels_for_box)
label_data = label_file.readlines()
print(f'label data: {label_data}')

# process frames until the user exits
while True:

    # capture the next image
    img = input.Capture()
    detections = net.Detect(img, overlay='None')

    for detection in detections:
        print(f'detection: {detection}')
        # t1_start = perf_counter()
        box_color = (255, 255, 255)
        # obtain x0,y0 x1,y1 of the detection box
        shape_a = (round(detection.Left), round(detection.Bottom))
        shape_b = (round(detection.Right), round(detection.Top))
        # convert the cuda image to a numpy array
        img_array = jetson.utils.cudaToNumpy(img)
        # convert to RGB
        rgb_array = cv2.cvtColor(img_array, cv2.COLOR_BGR2RGB)
        # this is a quick hack for my personal use as I only have two classes (BACKGROUND is 0 remember!)
        # NOTE: when selecting colour here it is BRG!
        if detection.ClassID == 1:
            box_color = (0, 255, 255)
        if detection.ClassID == 2:
            box_color = (0, 0, 255)
        # draw box
        cv2.rectangle(rgb_array, shape_a, shape_b, box_color, 4)
        # obtain class label based on detection class id
        class_label = label_data[detection.ClassID]
        # strip new lines otherwise they appear as ? on the label
        stripped_label = class_label.rstrip('\n')
        # place text using the top left, can be modified
        cv2.putText(rgb_array, stripped_label,
                    (round(detection.Left) + 20, round(detection.Top) + 40),
                    cv2.FONT_HERSHEY_SIMPLEX,
                    1,  # font scale
                    (255, 255, 255),
                    2)  # line type
        # convert back to BGR
        new_img = cv2.cvtColor(rgb_array, cv2.COLOR_RGB2BGR)
        # composite new image onto the original
        img = jetson.utils.cudaFromNumpy(new_img)
        # t1_stop = perf_counter()
        # time_taken = t1_stop - t1_start
        # print(f'time to draw one box: {time_taken}')

    # render the image
    output.Render(img)

    # update the title bar
    output.SetStatus("{:s} | Network {:.0f} FPS".format(opt.network, net.GetNetworkFPS()))

    # print out performance info
    net.PrintProfilerTimes()

    # exit on input/output EOS
    if not input.IsStreaming() or not output.IsStreaming():
        break

Thanks @dusty-nv for your great great work, also @OBLateral this is exactly what I wanted and find it very useful,
Thanks for sharing your complete code and guide, newbies like me would wonder where to add stuff while not messing up other things so Thanks and it works perfectly.
Although there are something missing in it that, if you would help with that
a) The video doesn't display While Inferencing, only logs display in the terminal, I have to wait till it complete inference and then it saved in the given folder to view the output. Also output.Render(img) is included but doesn't show the output video I don't know why. Can we make it to show the video during the inference .
b) The inference doesn't show the confidence score, Where to change so we can get the confidence score.
Thanks again for help


add release as support

User should be able to ask fork-version to release as a major, minor or patch, which will override the defualt bump logic.

Completed with the commit 9ed9c19d8b1b8bad94fe01a7eb7559af02f8084f.


Test infrastructure improvements for several tests

Tests improved: hash_test, hash_perf_test, pktdev_test, pkt_test, acl_test

Improves #234
Replaced cne_printf() with tst_*()
Changed some output to improve readability

Signed-off-by: Byron Marohn<EMAIL_ADDRESS>Signed-off-by: Stephen Weeks<EMAIL_ADDRESS>Signed-off-by: Matthew Leon<EMAIL_ADDRESS>Signed-off-by: Edmund Leemhuis<EMAIL_ADDRESS>

Fixed review suggestions & rebased


Sort icons Array before passing to exportIcons

Hi, I'm using figma-export in our Android team.
I'm very satisfied with this tool. Thank you!
But I'm worried about that every time executing figma-export producing different output of Icons.kt because icons in Icons.kt.stencil contains different ordered items.
So I added .sorted() before passing Array to icons.
This will produce constant Icons.kt file every time.
I will hope you to merge this PR.
Thank you.

Thanks, @niusounds!


DRY up transaction signing

Cleanup the big mess I copy-pasted myself into.

Codecov Report

Merging #49 into master will decrease coverage by 0.92%.
The diff coverage is 98.68%.

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
- Coverage   95.44%   94.52%   -0.93%
==========================================
  Files          11       11
  Lines         747      657      -90
==========================================
- Hits          713      621      -92
- Misses         34       36       +2

Impacted Files
Coverage Δ

src/event.rs
100% <ø> (ø)
:arrow_up:

src/logger.rs
97.14% <ø> (-0.69%)
:arrow_down:

src/genesis.rs
88.05% <100%> (-1.13%)
:arrow_down:

src/accountant_stub.rs
89.53% <100%> (-1.29%)
:arrow_down:

src/accountant.rs
95.53% <100%> (-0.27%)
:arrow_down:

src/log.rs
97.16% <100%> (-1.47%)
:arrow_down:

src/historian.rs
100% <100%> (ø)
:arrow_up:

src/transaction.rs
98.7% <98.36%> (-1.3%)
: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 b98e04d...f09952f. Read the comment docs.


Adding design content.

Category

[ ] Content fix
[ ] New article
Related issues: fixes #X, partially #Y, mentioned in #Z

For the above list, an empty checkbox is [ ] as in [SPACE]. A checked checkbox is [x] with no space between the brackets. Use the PREVIEW tab at the top right to preview the rendering before submitting your issue.
(DELETE THIS PARAGRAPH AFTER READING)

What's in this Pull Request?

Please describe the changes in this PR. Sample description or details around bugs which are being fixed.
(DELETE THIS PARAGRAPH AFTER READING)

Guidance

Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.
Please target your PR to 'master' branch. Released documents are in live branch.
(DELETE THIS PARAGRAPH AFTER READING)

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/design/empty-states.md
:white_check_mark:Succeeded
View

docs/design/key-web-part-examples.md
:white_check_mark:Succeeded
View

docs/design/themes-colors.md
:white_check_mark:Succeeded
View

docs/design/web-part-commanding.md
:white_check_mark:Succeeded
View

docs/images/Commanding_Doclib_multiplecommands_05.png
:white_check_mark:Succeeded
View

docs/images/Commanding_Events_1column_01.png
:white_check_mark:Succeeded
View

docs/images/Commanding_Events_2column_03.png
:white_check_mark:Succeeded
View

docs/images/Commanding_Events_3column_04.png
:white_check_mark:Succeeded
View

docs/images/Commanding_News_1column_02.png
:white_check_mark:Succeeded
View

docs/images/Commanding_News_tab_order_06.png
:white_check_mark:Succeeded
View

docs/images/empty_state_ctas_03.png
:white_check_mark:Succeeded
View

docs/images/empty_state_events_02.png
:white_check_mark:Succeeded
View

docs/images/empty_state_template_01.png
:white_check_mark:Succeeded
View

docs/images/empty_state_unique_05.png
:white_check_mark:Succeeded
View

docs/images/empty_state_views_04.png
:white_check_mark:Succeeded
View

docs/images/sharepoint-neutral-greys.png
:white_check_mark:Succeeded
View

docs/images/sharepoint-neutralgreys.png
:white_check_mark:Succeeded
View

docs/images/sharepoint-theme-primary.png
:white_check_mark:Succeeded
View

docs/images/sharepoint-themes-dark.png
:white_check_mark:Succeeded
View

docs/images/sharepoint-themes.png
:white_check_mark:Succeeded
View

docs/images/sites_showcase.png
:white_check_mark:Succeeded
View

docs/images/sites_teamsite.png
:white_check_mark:Succeeded
View

docs/images/sites_topic.png
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


License information in the certificate summary is incorrect

If a dataset is licensed under a different version of a license but has the same abbreviation as a common license (such as CC-BY) then ResponseSet#data_licence_determined_from_responses is using Odlifier to lookup the license by license_id and is finding the most recent standard version of the license as decided by http://licenses.opendefinition.org/ list, for example CC-BY-4.0.
This seems to be caused by the questionnaire only having an approved list of licenses and the importer then trying to convert the answers to fit this format.

I think this is closed now fixed #997


xilem: invalidate TaffyLayout cache on child layout request

TaffyLayout caches layout based on input dimensions. If a widget in the tree under a TaffyLayout requests a layout change, it is only performed on e.g. a subsequent window size change or a tree rebuild.
Note TaffyLayout already conditionally clears the cache in the view rebuild, but layout requests made from a child widget currently do not.
Example to reproduce: TestWidget renders two rectangles, a green one indicating the currently computed layout, and a yellow one indicating the layout we wish to have. Hovering over the rectangle and scrolling the mouse wheel increases or decreases the widget's desired height. Without this patch, the layout is not recomputed until the window size changes.
use vello::peniko::{Brush, Color, Stroke};
use xilem::{
    view::{View, ViewMarker},
    widget::Widget,
    App, AppLauncher,
};

struct TestView {}

impl<T, A> View<T, A> for TestView {
    type Element = TestWidget;
    type State = ();

    fn build(&self, cx: &mut xilem::view::Cx) -> (xilem_core::Id, Self::State, Self::Element) {
        let (id, element) = cx.with_new_id(|_cx| TestWidget { height: 20. });
        (id, (), element)
    }
    fn rebuild(
        &self,
        _cx: &mut xilem::view::Cx,
        _prev: &Self,
        _id: &mut xilem_core::Id,
        _state: &mut Self::State,
        _element: &mut Self::Element,
    ) -> xilem::widget::ChangeFlags {
        xilem::widget::ChangeFlags::empty()
    }
    fn message(
        &self,
        _id_path: &[xilem_core::Id],
        _state: &mut Self::State,
        _message: Box<dyn std::any::Any>,
        _app_state: &mut T,
    ) -> xilem_core::MessageResult<A> {
        xilem_core::MessageResult::Nop
    }
}

impl ViewMarker for TestView {}

struct TestWidget {
    height: f64,
}

impl Widget for TestWidget {
    fn update(&mut self, _cx: &mut xilem::widget::UpdateCx) {}

    fn event(&mut self, cx: &mut xilem::widget::EventCx, event: &xilem::widget::Event) {
        if let xilem::widget::Event::MouseWheel(mouse_wheel_event) = event {
            self.height = f64::max(20., self.height + mouse_wheel_event.wheel_delta.y);
            cx.request_layout();
            cx.request_paint();
        }
    }

    fn lifecycle(
        &mut self,
        _cx: &mut xilem::widget::LifeCycleCx,
        _event: &xilem::widget::LifeCycle,
    ) {
    }

    fn layout(
        &mut self,
        cx: &mut xilem::widget::LayoutCx,
        bc: &xilem::widget::BoxConstraints,
    ) -> glazier::kurbo::Size {
        cx.request_paint();
        let size = glazier::kurbo::Size::new(100., self.height);
        dbg!(bc.constrain(size))
    }

    fn paint(&mut self, cx: &mut xilem::widget::PaintCx, builder: &mut vello::SceneBuilder) {
        let stroke = Stroke::new(2.0);

        let mut size = cx.size();
        let rounded_rect = size.to_rect();
        let brush = Brush::Solid(Color::YELLOW);
        builder.stroke(
            &stroke,
            vello::kurbo::Affine::IDENTITY,
            &brush,
            None,
            &rounded_rect,
        );

        size.height = self.height;
        let rounded_rect = size.to_rect();
        let brush = Brush::Solid(Color::GREEN);
        builder.stroke(
            &stroke,
            vello::kurbo::Affine::IDENTITY,
            &brush,
            None,
            &rounded_rect,
        );
    }
    fn accessibility(&mut self, _cx: &mut xilem::widget::AccessCx) {}
}

#[cfg(not(feature = "taffy"))]
fn app_logic(_data: &mut AppState) -> impl View<AppState> {
    "Error: this example requires the 'taffy' feature to be enabled"
}

#[cfg(feature = "taffy")]
fn app_logic(_state: &mut ()) -> impl View<()> {
    use taffy::style_helpers::length;
    use xilem::view::{div, flex_column};

    flex_column((
        div(())
            .with_background_color(vello::peniko::Color::RED)
            .with_style(|s| {
                s.size.width = length(200.0);
                s.size.height = length(200.0);
            }),
        TestView {},
        div(())
            .with_background_color(vello::peniko::Color::RED)
            .with_style(|s| {
                s.size.width = length(200.0);
                s.size.height = length(200.0);
            }),
    ))
}

fn main() {
    let app = App::new((), app_logic);
    AppLauncher::new(app).run()
}

Before scrolling:

Scroll a bit, the layout does not update:

Then resize the window to force a relayout:

@nicoburns Is this the right way to go about it?


Run JCK without STF wrapper

Currently JCKs run via STF wrappers. These wrappers are part of systemtest repository. So, in order to compile and run JCKs we need to compile systemtests and STF, however JCKs have run without STF wrappers in the past. For sake of simplicity and maintenance we may want to think about running JCKs without the STF wrappers.

@Mesbah-Alam - please clarify

"at the moment you can't get/compile STF without getting and compiling systemtests".  This is not true.  You can clone, make (and make test) the stf repository on its own.

" JCKs don't need systemtests to be built".  This is also not true.  The Jck.java test automation (which requires the stf framework) resides in the openjdk-systemtest repository (on the basis that it is automation for java testing, whereas stf itself is test product agnostic (though it has actually only ever been used for java testing as far as I'm aware)).

There is a makefile in the openjdk-systemtest repository (on the same project as Jck.java (test,jck) which can be used to build the JCK native (C) test cases.  Without that you would have to build them manually.  If you just want to run the JCK without using the openjdk-systemtest automation (e.g. using the javatest GUI) then that is the only 'dependency'.
What is the actual problem you have which you are trying to resolve?

@lumpfish
Apology for a not-so-clear description. I have updated it. The issue was originally created with the following in mind:  JCK tests currently run via STF wrappers. These wrappers are part of systemtest repository. So, in order to compile and run JCKs we need to compile systemtests and STF. However JCKs have run without STF wrappers in the past. So, for sake of simplicity and ease of maintenance we may want to think about running JCKs without the STF wrappers.

Following steps should allow us to run JCK without STF:

Extract logic from jck.java that generates jtb file.
Invoke javaagent directly with the jtb file.
Run JCK directly using command line to generate output in xml.
Use stylesheet to convert output xml into junit format so that we can view individual failure output in jenkins.

See here for scripts to generate .jti files which can then be used to run the JCK either through the javatest GUI or the javatest command line tool supplied with the JCK.  Note also that AdoptOpenJDK is not currently running the JCK due to licensing issues.

This issue is now being tracked by backlog/issues/372


Issue with k8s.io/docs/concepts/services-networking/service/

This is a...

[ ] Feature Request
[x] Bug Report

Problem:
I believe the text is wrong at https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws, it reads

The first specifies the ARN of the certificate to use. It can be either a certificate from a third party issuer that was uploaded to IAM or one created within AWS Certificate Manager.

As far as I know the third party certificates are uploaded / imported to AWS Certificate Manager and not to AWS IAM.
Please also see the AWS docs at https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html as reference.
Proposed Solution:
Page to Update:
https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws

AWS supports uploading certificates to IAM.
AWS does recommend using ACM; however, both methods work.

Oh i see! I didn't know you could upload certificates to IAM.

AWS does recommend using ACM; however, both methods work.

If AWS recommends using ACM why would you recoomend AMI? Is there any benefit of using AMI over ACM? As far as I could see the required files are the same.

This might be a good one to take to the AWS forums? [I believe that] Kubernetes as a project doesn't have strong opinions on different AWS technologies.

/language en
/triage support
/close


Correct links to two Awesome lists whose username had changed

This PR makes no substantive changes to the list. Instead, it simply corrects links to two lists I maintain by updating the URL referencing their GitHub repository addresses, which future-proofs the links in the event their current redirects stop working.

Mmmmkmm9mmmmmmkk..oo
On Sat, Nov 28, 2020, 15:16 bvbvyoy<EMAIL_ADDRESS>wrote:

@bvbvyoy approved this pull request.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sindresorhus/awesome/pull/1913#pullrequestreview-540377939,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI4GSEWCHZBI2KLGX4KO2NDSSEA3HANCNFSM4UFQ7QEQ
.


Minor incompatibility between Authentic and the URL sent by virtualmin's "package updates" emails

(I'm not familiar with github and issues reporting, sorry about that)
I receive email notifications about virtualmin/webmin/debian updates, as configured by a webmin/virtualmni default module, and the issue is that those emails contain an hyperlink to an internal page of the admin...
... And that internal page, once loaded, doesn't include the left column of the virtualmin administration.
Example of one of those mails:

Subject: Package updates on (ip)
Contents:
An update to webmin-virtual-server from 6.00.gpl to 6.01.gpl is available.
Updates can be installed at (ip:port)/security-updates/

And the results, once opened, are:

Minor issue, sure. But maybe worth reporting, still. Good day everyone!

I see now, thank for reporting.
That is not trivial to fix.
I'll see what I can do.

Patched in:
https://github.com/webmin/webmin/pull/724


Added bash, openssl-client, lftp and html-proofer

Useful utilities for CI building.

Please justify each package and change. Except for html-proofer.

bash: Required for GitLab CI (it's runner just needs it)
lftp: Upload built site to static web server
openssl-client: required by lftp for some protocols, but could be used by self

Can you provide the image sizes for me?

Of course, for "latest" tag:

before: 144 MB
after: 153 MB

I'm gonna let this sit and think, that's a huge bump for something so tailored.  The most concerning part is the bash, I don't know if I'm willing to fix quirks in Gitlab CI (and to be honest I don't even know how or why it would "require bash" because you would have to launch Docker yourself -- unless there is something I am missing, but either way that is a bug in Gitlab.)
The other stuff is stuff that should really be done on the host system.

I understand. I already asked for this "feature" in it: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/226

So do you think it is better to maintain second tag for this use case?
Do you want to do it only because bash or for another things what could be useful? (deploy tools, remove nginx, ...)

Btw, if you want, maybe it will be better to name tag "builder" or something like this, because it is not fixed only for this CI solution. "gitlab" tag is too specific.

I like build-and-deploy, but if we are gonna name it that, make sure to add git and rsync for other people, I've added a commit that creates a per-tag packages variable for you to add all those packages to, if you create a dedicated tag and rebase/cleanup-merge those commits I'll happily accept the pull!

Nah, builder is fine.  The dashes are annoying me kinda. Yeah builder is fine.


Update Readme.md

I had a hard time figuring that I could just push body in requestWhitelist or responseWhitelist.

@floatingLomas ^


add OCP also to On-Premises VMs and Bare Metal on pick-right-solution.md

following up on #11771, OCP is supported both to On-Premises VMs and Bare Metal, so OK to list it there was well?

@tengqm thanks for having merged #11771 (and #11770) - do you want to get this one in as well?
/cc tengqm
/meow
/joke

/lgtm
/approve


Visibility plot changes time range too early

When the visibility plot is set to "Night Center", the time range shown in the plot changes to the next night at midnight.

@emdailey, what time did you notice that? When I tried just now (at 15:00), switching to "Night Center" switched to the current (coming, correct) night.

I think I see the problem.

Possibly fixed in 1450d8ce7612df42c3b3ccdfa394d9dae382c70a


Gift notifications.

It seems that when people are scanning and getting a "Gift already claimed" message. The sender is getting a "Gift rejected by" message.

Try sending from new version and claim from an older version.


Specify Swarm Node to run Edge Job

Before you start, we need a little bit more information from you:
Use Case (delete as appropriate): Using Portainer at Home
Have you reviewed our technical documentation and knowledge base? Yes
Question:
Is there a way in the Edge Jobs, with a Docker Swarm Cluster to specify which node my job would run?
Right now, its seems to be random. I create a job and its always run by one of my nodes, and that node only.

Any answer to this?

Something similar is even implemented in Swarm: https://github.com/moby/moby/pull/40307

@miberecz
Thank you for the additional information.  I am currently investigating.  I will update you as I learn more.
Thanks!

@miberecz
I wanted to follow up on this request.  Edge Jobs are only available in Docker Standalone.
More for review here:   https://docs.portainer.io/user/edge/jobs
Product is having ongoing conversations on improvements.
Thanks!


shareing tilt-extensions from on-prem GitLab instance

Hello - I've defined a few extensions that I want to share internally at work. Is this possible somehow?
I've attempted to do it using v1alpha1.extension_repo and v1alpha1.extension, somewhat like this:
v1alpha1.extension_repo(name="ci-cd", url="https://HOSTNAME/GROUP/ci-cd")
v1alpha1.extension(name="a", repo_name="ci-cd")
load("ext://a","dotnet_build");
load("ext://a","vue_build");

allow_k8s_contexts("docker-desktop");

vue_build(ref="client",context="client")
dotnet_build(ref="server", context="server")

k8s_yaml("k8s.yml");
k8s_resource(workload = "server", port_forwards = "5000:5000");
k8s_resource(workload = "client", port_forwards = "3000:3000");

Hi! This issue report doesn't have enough information to repro your issue, or even understand what question you're asking. Can you post:

a repro case
what you expected to happen
what actually happened

This guide on how to debug extension loading might also help: https://docs.tilt.dev/extensions.html#debugging-extension-loading-with-the-cli

well, I guess it really comes down to a question - can I host my tilt-extensions from GitLab instead of Github? if so, do you have a guide or some docs about it? :sunny:

I can't think of any reason it wouldn't work for any git repo.


Add new categories to submission form

We need to add Condensed Matter and Quantum Physics to the Literature submission form, which was overlooked in #1554.

TECH NOTES
Add new categories here


docs(README): add CodeFund sponsor

What:

Why:
Requested by @kentcdodds

How:

Checklist:

[ ] Documentation
[ ] Tests
[ ] Ready to be merged
[ ] Added myself to contributors table

@all-contributors please add @jdorfman for fundingFinding

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Vary validation of struct when used in different contexts

First off, thanks a ton for this package!  Much better than the validation stuff we rolled on our own at the start of our project.
Package version eg. v8, v9:
v9
Issue, Question or Enhancement:
I'm wondering if there's a way to deal with an issue I've run into recently.  Let's say we have a custom type, which is intended to be used as a fairly low-level type.  It's used as a field in multiple other structs.
For instance, let's say I run a movie-related website:
type Person struct {
    FirstName string
    LastName string
}

type User struct {
    Email string `validate:"required,email"`
    Author Person
}

type Movie struct {
    Title string  `validate:"required"`
    Director Person
}

Let's say our business logic demands that the LastName field is required for a movie's director but the FirstName is optional.  On Users, the FirstName is required but the LastName is optional.  Is there any way to vary the validation configuration across the various uses of the lower-level struct?
We could write custom validators for Person and do something like:
type User struct {
    Email string `validate:"required,email"`
    Author Person `validate:"required,firstNameRequired"`
}

type Movie struct {
    Title string  `validate:"required"`
    Director Person `validate:"required,lastNameRequired"`
}

But since the FirstName and LastName fields are just strings, we'd have to re-implement all sorts of base logic that this package comes with (e.g. gte, lt, email, uuid, etc).
Any ideas on how we can vary the validation on a struct depending on where it's used?
This is coming up for us using techniques like this or this where JSON behavior is having us use structs not fields for pretty low-level types across multiple structs.

Seems like maybe from #245 that I can't actually do the custom validator solution I mentioned above, as those validations can only be written for fields which aren't a next level of struct, is that right?

thanks @mkadin been thinking about #245 a lot and hoping I can think of a way to combine both i nthe future.


scalaJSLinkerOutputDirectory in fastLinkJS / fullLinkJS have bad suffixes

They have the suffixes -dev / -prod from when the tasks still were called linkJSDev / linkJSProd. IMHO at this point the suffixes are just confusing.

@sjrd how shall we deal with this w.r.t. v1.3.0? Changing the defaults after the fact is maybe a bit annoying :S

I can still cancel 1.3.0 if necessary.

Should we for this?

No, probably not. IMO we could still change the default in a subsequent version.


Wrong updates reported

Brief description of your issue

OBS studio is already updated to 29.1.3 but still wrongfully reported above. Just that OBS was updated from OBS studio itself
Dot Runtimes for desktop they can coexist with other versions. There are latest ones also but old still getting reported as outdated. Wrong logic altogather.
Steps to reproduce
winget upgrade command
Expected behavior
it should show correct versions instead of wrong and should check for packages that can coexist with their old versions
Actual behavior
Wrong information as you can see from pic
Environment
windows 10
powershell 7.3.4

OBS studio is already updated to 29.1.3

This is a bug with OBS not reporting the updated version to the Windows Registry

https://github.com/microsoft/winget-pkgs/issues/83521

Dot Runtimes for desktop they can coexist with other versions. There are latest ones also but old still getting reported as outdated. Wrong logic altogather.

This is a known issue and is being tracked -

https://github.com/microsoft/winget-cli/issues/2129


Change for protractor npm install

There is no karma-protractor should change to install protractor https://www.npmjs.com/package/protractor

:+1:


Adding _asyncTransfer after _safeMint

Hi!
First of all, thank you for the tutorial! 😄
At part four, I believe that maybe it's missing the deposit of the values after (or before) minting.
I checked at the docs and found the _asyncTransfer (link)  function which stores the value to the Escrow contract.
As I didn't find any example showing up the flow of using PullPayment, I ended up testing it in the tutorial and taking the opportunity to open this PR to know about your opinion and also make it clearer for me.
Many thanks!

Hi,
thanks for posting this PR. I was struggling with exactly the same problem.
IMO you are right with your changes and I also applied them to my changes.
Additionally, what I think the tutorial is also missing, is updating the mint.js script so that ether is sent when minting a token.
Here's how I changed the mint. script:
diff --git b/scripts/mint.js a/scripts/mint.js
index 735d165..e1f4e82 100644
--- b/scripts/mint.js
+++ a/scripts/mint.js
@@ -1,12 +1,14 @@
 const { task } = require("hardhat/config");
 const { getContract } = require("./helpers");
 const fetch = require("node-fetch");
+const { ethers } = require("ethers");

 task("mint", "Mints from the NFT contract")
   .addParam("address", "The address to receive a token")
   .setAction(async function (taskArguments, hre) {
     const contract = await getContract("NFT", hre);
     const transactionResponse = await contract.mintTo(taskArguments.address, {
+      value: ethers.utils.parseEther("0.08"),
       gasLimit: 500_000,
     });
     console.log(`Transaction Hash: ${transactionResponse.hash}`);

you can just pull the token mint price from the contract instead of hard coding a dup in the mint.js:
task("mint", "Mints from the NFT contract")
    .addParam("address", "The address to receive a token")
    .setAction(async function(taskArguments, hre) {
        const contract = await getContract(nftName, hre);
        const mintPrice = await contract.MINT_PRICE();
        const transactionResponse = await contract.mintTo(taskArguments.address, {
            gasLimit: 500000,
            value: mintPrice
        });
        console.log(`Transaction Hash: ${transactionResponse.hash}`);
    });

I added the asyncTransfer, but that didn't help either. The transfer you added just sends the mint value back out to the owner wallet instantly, so there's no need for later withdraw? In my test, the mint worked, but the contract ended up with 0 value, and my wallet (owner) also didn't get the mint eth back 🤣


ModuleNotFoundError: No module named 'azure'

Getting the error below. Have the Azure CLI and Python 3.8 64 bit installed from Python.Org on Windows 10.
What am I doing wrong? Thanks!
C:\BlobHunter-main\BlobHunter-main>python Blobhunter.py
Traceback (most recent call last):
File "Blobhunter.py", line 1, in
import azure.core.exceptions
ModuleNotFoundError: No module named 'azure'
C:\BlobHunter-main\BlobHunter-main>

Did you install the requirements.txt packages?

Thank you Daniel. I reinstalled and everything worked. Thanks again!


demo for hyparquet

After this PR:

move the common code from this demo and components to a new package?
remove the demo code from hyparquet

also @platypii: your demo was js, this is ts. Do you think we should also provide an example with pure js? maybe the hyparquet readme is sufficient.


OS X support

OS X support is planned, but lower priority than getting a reasonable working experience in Linux.

MacOS releases that can auto update require code signing which means paying Apple $100/year so this is on hold till just before v1.0.

If you want to run a local build in the meantime, the process is simple:
npm install
npm run build && npm run pack -- --mac

You'll now have a .dmg in the dist/ folder. Currently the app name is Notes.app which conflicts with the OS X provided application.


Move block selector into the empty text block on smaller screens

When sidebar is open. See #1272
This at least makes the block selector visible again similar with how the drag handle and the delete icon are shifted when it's required.
Technically I had to add a new offset parameter (addoffset), the drag & delete icons are handled relatively, but the (+) icon is using absolute positioning. The BlockChooser is at the moment shifted with the same amount.
The current nested -> .contentWitdh() -> .contentwidthMedia() less functions are a bit problematic with fine tuning the icon positions.  If you look closely to the trash icon, the mobile shift is not exactly right, the @offset variable is used by both the drag handle & the trashcan. For every element we'd need to pass in a new variable.  But maybe 3 variables is enough, there's only limited space for more icons :-P
I would like to shift the Draf.js Placeholder text a bit (15px?) more to the right so that the (+) can be moved completely inside the editor line, but I cannot find the place where to edit this. As soon as someone starts typing the (+) button disappears again, then the actual text can be at the beginning of the editor line again.
Current WIP position of the (+) on mobile. Can anybody with more semantic uid experience fix this a bit more?

@fredvd This is really difficult to fix IMHO. If we move the + icon inside the field, it overlaps with the field itself. This is a UX issue. Maybe @albertcasado can weight in...

To clarify, this is how the empty text field currently looks (before this pull request) in volto 4.0.2+ master below a certain size of the browser window on deskop mode, the (+) is completely gone.

If we move the + icon inside the field, it overlaps with the field itself. This is a UX issue.

I don't know to which element the border belongs, you could put the (+) choose block inside the text border and the draft.js editor next to it, then they don't overlap. The 'draggable' is doing the same thing ATM on the left side. If you start typing the first character will hide the add block icon and the draft.js editor can fill up the whole line.
But it's still ugly-ish, the real problem is the design to maximise editor line width and hide the left gutter margin where these icons are (block selector, draggable & trashcan on the right)

This issue has dragged on too much and it's a major usability issue, as far as I'm concerned. Even I, as a developer, struggle with this issue whenever I develop on my laptop. The current situation now (the block chooser + button is hidden) is even worse then any overlap or ugly things showing up at that resolution. I propose that we merge this.
Alternatively, on the low res screens we can use something along the direction of block decorations used in volto-columns-block. See https://raw.githubusercontent.com/eea/volto-columns-block/docs/docs/edit.png

This issue has dragged on too much and it's a major usability issue, as far as I'm concerned. Even I, as a developer, struggle with this issue whenever I develop on my laptop. The current situation now (the block chooser + button is hidden) is even worse then any overlap or ugly things showing up at that resolution. I propose that we merge this.
Alternatively, on the low res screens we can use something along the direction of block decorations used in volto-columns-block. See https://raw.githubusercontent.com/eea/volto-columns-block/docs/docs/edit.png

Just bumped into this issue with our users. It does appear, that even in 1200px wide resolution the Plus icon is not visible. So that excludes tablets and some monitors in a vertical setting, some laptops too. I too find this a rather major usability issue (that could be quite easily improved).
Quick and dirty fix could be just add massive z-index to the plus icon, like
.ui.basic.icon.button.block-add-button {
z-index: 100;
}
Even that would be better than no icons visible.


WIP & PoC: Unicode matchers

The data is taken from the Unicode 14.0.0 beta files.
I prefer everything the latest. :smile:
ToDo:

[x] Unicode blocks
[ ] Unicode properties
[ ] Unicode scripts

@Hejsil I'm waiting for some feedback from you. :(

:sob:

Ooh, sorry. I think I saw the PR when it was first opened and concluded it wasn't done enough to give a real look. Didn't see your comment 3 days ago. I'm very sorry.
It is quite a lot of code to maintain and would need to be updated to newer unicode standards when they come out. That is not really something I wonna take on. Also, what is stopping us from having the unicode stuff in some seperate library, and then people can hook it up to mecha themselfs?
I think it is worthwhile to have the utf8.umatcher as an api though (maybe with a different name though). This function allows an external library to easily hook up to mecha:
const basic_latin_parser = mecha.utf8.matches(fn (c: u21) bool { return unicode_lib.block(c) == .BlockLatin });


feat: custom readers and writers

With this pull request,  users can register a custom reader/writer and mirror would use it.
To register a reader/writer,  the user adds an assembly attribute.  For example:

// register a reader and writer for Quests
[assembly: ReaderWriter(
    typeof(Quest),
    typeof(Quest),
    nameof(Quest.ReadQuest),
    typeof(Quest),
    nameof(Quest.WriteQuest)]

class Quest
{
          public static Quest ReadQuest(NetworkReader reader)
          {
                Quest quest = new Quest();
                quest.xxx = reader.Readxxx();
                 ...
                return quest;
          }
          public static void WriteQuest(NetworkWriter writer,  Quest quest)
          {
                 writer.Writexxx(quest.xxx);
                 ...
          }
}

As part of this pull request,  mirror itself has been refactored to use the attribute and remove all the hardcoded types in the weaver.
Should fix #1043

what about using a NetworkWriter extension for Quest etc.?
this way it would be easier to use for Mirror users, if all write methods are in NetworkWriter.
shouldn't be a difference in your code, only in your quest example. or is there a reason why this wouldn't work with an extension?

what about using a NetworkWriter extension for Quest etc.?
this way it would be easier to use for Mirror users, if all write methods are in NetworkWriter.
shouldn't be a difference in your code, only in your quest example. or is there a reason why this wouldn't work with an extension?

@vis2k that is what #1045 does.   I would prefer to merge #1045 instead of this one.

closing in favor of #1047


WIP (DO NOT MERGE) - Add validation just before execution of deploy and push commands. Should include init?

- What I did
Added validation before deploy and push
Closes: https://github.com/docker/app/issues/424
- How I did it
I extracted the validation to a function, so we can call it from other commands, then it's just a question of calling it at the very beginning of the other commands and check it's return error
- How to verify it
Can be tested by commenting any mandatory fields, like metadata's version then trying to push or deploy
- Description for the changelog
Added validation before deploy and push

Redundant with invocation-image building step


Move ordering

Implementation away for ABP using legalMoves as search standard. Sorting criteria are:

can Castle (rel. weight 25%)
can Capture (rel. weight 25%)
can Promote (rel. weight 50%)

Did not want to create this here I am sorry.


Drop transitional sparsehash package

In Ubuntu Vivid, support for the sparsehash transitional package was dropped (see the package page for details), so the apt package is now libsparsehash-dev, not sparsehash.
For the sake of completeness, sudo apt-get install sparsehash now fails with the following error (in Xenial):
Package sparsehash is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libsparsehash-dev

E: Package 'sparsehash' has no installation candidate

Because libsparsehash-dev exists in Precise and Trusty, it may be possible to simply change line 4038 to
ubuntu: [libsparsehash-dev]

but there's probably a reason for the transitional package.

I'm not sure why the Travis check failed on this pull request; it appears to be throwing errors about mercurial being multiply defined:
mercurial is multiply defined in
    file:///home/travis/build/ros/rosdistro/rosdep/python.yaml and
    file:///home/travis/build/ros/rosdistro/rosdep/base.yaml

@dirk-thomas any ideas?

hmmm it looks like an undesired side effect of #15788
Not sure why check_duplicate didnt complain on that PR and starts failing now though o_O

@k-okada @dirk-thomas Is it expected behavior for check_duplicates to not allow duplicates if there is no overlap between platforms ?

Is it expected behavior for check_duplicates to not allow duplicates if there is no overlap between platforms ?

If there is no overlap I think it is ok that the function doesn't complain. Since it is not a duplicate in terms of these two rules are affecting each other.

@k-okada Could you have a look at this? it seems that the check_duplicates test does not behave as expected:

finds duplicate between non overlapping rules
doesn't process the osx-homebrew.yaml file

I you don't have any spare cycles these days, we can disable the test for now and create a ticket to track the identified issues

Ok, this is very strange, but I found how to re-produce this situation. I think I can fix this.
https://s3.amazonaws.com/archive.travis-ci.org/jobs/266958690/log.txt?X-Amz-Expires=30&X-Amz-Date=20170822T005012Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJRYRXRSVGNKPKO5A/20170822/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d9f6f9da290f057e2d5dc058f2b1a11a22c6f71972501251d5a6b58373f8f6b > Checking duplicates rosdep file: ['rosdep/base.yaml', 'rosdep/gentoo.yaml', 'rosdep/osx-homebrew.yaml', 'rosdep/python.yaml', 'rosdep/ruby.yaml'] => OK
https://s3.amazonaws.com/archive.travis-ci.org/jobs/266964685/log.txt?X-Amz-Expires=30&X-Amz-Date=20170822T004728Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJRYRXRSVGNKPKO5A/20170822/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=753d4306a05bfd823e3d12da8d0117879bfbd579eef8b252610bd8bca1e99403 > Checking duplicates rosdep file: ['rosdep/gentoo.yaml', 'rosdep/osx-homebrew.yaml', 'rosdep/python.yaml', 'rosdep/ruby.yaml', 'rosdep/base.yaml'] => NG

should be solved by https://github.com/ros/rosdistro/pull/15805

retriggering travis...

@jatowler can you add missing ubuntu versions please? (W, Y, Z and Artful)

Also the other missing Ubuntu distros please.

@mikaelarguedas @dirk-thomas Sure, no problem. In general, which distributions are considered necessary when adding keys to this file? The contributions guide says to follow REP 3, which doesn't list an EOL for Indigo, but it's listed as 2019-04 on the Distributions page. So to try to answer my own question, all the distributions supported by ROS versions that have not yet EOL'd, which appears to be these:

Saucy
Trusty
Utopic
Vivid
Wily
Xenial
Yakkety
Zesty
Artful

Is that standard? Or does it need to go back further? I see a lot of packages that have keys going back to Lucid, but it hardly makes sense to be adding keys for Ubuntu versions that aren't supported by currently supported ROS versions.

The list you proposed looks sufficient to me. :+1:

In general, which distributions are considered necessary when adding keys to this file? The contributions guide says to follow REP 3, which doesn't list an EOL for Indigo, but it's listed as 2019-04 on the Distributions page.

I would say there are 2 categories of modifications to rosdep files:

adding new rules:
In that case adding all OS distributions of currently non-EOL ROS distribution is the way to go

modifying existing rules:
In that case you want to be sure to not break thing by removing rules used by some packages (even if they are from EOL distributions). Some users still use precise and groovy for example and they should be able to keep using rosdep to install their dependencies.

This PR falls under the second category so going back all the way to precise seems sensible to me. :+1:


[SPARK-28806][DOCS][SQL] Document SHOW COLUMNS in SQL Reference

What changes were proposed in this pull request?
Document SHOW COLUMNS statement in SQL Reference Guide.
Why are the changes needed?
Currently Spark lacks documentation on the supported SQL constructs causing
confusion among users who sometimes have to look at the code to understand the
usage. This is aimed at addressing this issue.
Does this PR introduce any user-facing change?
Yes.
Before:
There was no documentation for this.
After.

How was this patch tested?
Tested using jykyll build --serve

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/14534/
Test PASSed.

Test build #109477 has started for PR 25531 at commit 6c41310.

Test build #109477 has finished for PR 25531 at commit 6c41310.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/109477/
Test PASSed.

cc @gatorsmile

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/14564/
Test PASSed.

Test build #109508 has started for PR 25531 at commit 0f6218b.

Test build #109508 has finished for PR 25531 at commit 0f6218b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/109508/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/14573/
Test PASSed.

Test build #109518 has started for PR 25531 at commit 50ad094.

Test build #109518 has finished for PR 25531 at commit 50ad094.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/109518/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/15047/
Test PASSed.

Test build #110029 has started for PR 25531 at commit 8b63b4d.

Test build #110029 has finished for PR 25531 at commit 8b63b4d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110029/
Test PASSed.

LGTM
Thanks! Merged to master.

@gatorsmile Thank you very much for fixing the doc and merging in.


Make regtest compatible

Add regtest mode to Electrum client and server for easier testing.

Mark as solved. It's working now.


luci-proto-wireguard: tab peers: optimize page for less error prone configuration

In the 'peers' tab the page is getting very long if you have several peers defined.
Even if you just have 5 peers, you have to scroll 4-5 pages (using 1080p resolution) to edit last peer or add another one.
It gets even worse if you have more than 10 peers. It would be also a good idea to add "Add peer" button to the top.
Therefore I would suggest to at least clearly seperate peers by adding some horizontal bar between them.
Or even better to be able to fold/unfold each peer for a better overview if this is somehow possible?
Now at the moment (LuCI openwrt-21.02 branch (git-21.231.26241-422c175) / OpenWrt 21.02.0 r16279-5cc0535800) it is rather impractical to edit peers if you have several defined and easily mess up the configuration if one does not use descriptions for peers and does not carefully look which peer is getting edited.
Any ideas are welcome to optimize that.

Great! Thank you very much @jow- !


Stock logic not working with manage_stock: false

Current behavior
Using Magento and setting manage_stock false for product leads to situation where product cannot be added to cart. This is because maxQuantity for product is checked from stock.qty and theres no logic for manage_stock attribute.
Expected behavior
If manage_stock is false no qty should be checked when adding product to cart or showing add to cart button
Steps to reproduce the issue

Set product in Magento with manage stock false
Go to product page
Add to cart button is disabled

Repository
https://github.com/DivanteLtd/vue-storefront/blob/master/src/themes/default/pages/Product.vue#L411
Environment details

Browser: Chrome 79.0.3945.88
OS: Centos 8
Node: v10.16.0
Code Version: v1.11.0

Additional information
As the maxQuantity is also used for showing amount in frontend I did come up with easy fix with adding this logic
this.maxQuantity = res.manage_stock ? res.qty : ' '
This way  !this.maxQuantity === false as whitespace in string is counted as truthy value. Maybe not correct solution but add to cart works with this and no weird info shown for customer in stock field just ( available).
Also I think this issue is not that critical as most of the folks are using stock from eCom but in case someone doesn't this is blocker.

Good point. Can you provide us with pull request solving this issue?

Ill try, did find out that logic doesnt work in production mode so gonna figure out something different there.

I don't believe this issue is fully resolved @andrzejewsky . If manage_stock is set to false on a product, we should not be making the API calls to check the stock. So, when we check config.stock.synchronize, we should also check product.manage_stock before making the call. Doing this will reduce unnecessary API calls to the back-end in multiple places.
Our shop is an example use-case for this, because we have config.stock.synchronize enabled because we manage stock for some of our products, but we have others where manage_stock is disabled.


ML: unsupervised learning

Another very interesting task for you,
It seems that this notebook is not running well:
https://github.com/open-academy/machine-learning/blob/main/open-machine-learning-jupyter-book/assignments/ml-advanced/unsupervised-learning/implementation-of-k-means-algorithm-from-scratch.ipynb
However, it’s a really good idea to have some animations included in this notebook,
so maybe your can refer to this one as how to fix the issue:
https://www.kaggle.com/code/banerz/linear-classifier-from-scratch-with-animation

All "I" should be changed to "we"

https://github.com/open-academy/machine-learning/blob/main/open-machine-learning-jupyter-book/assignments/ml-advanced/unsupervised-learning/customer-segmentation-clustering.ipynb
black format all cells


.no-gutter: specificity issue in some build processes

Within the PR #21211 a class of .no-gutter was added to allow for no gutter rows.
Including the grid through a build process that has a media query cleaner (either through gulp or grunt) kills the cascade position and the margins on .row of -15px for left and right take precedence.
While I know it introduces some specificity issues, adding .row to the selector fixes the issue.
.row.no-gutters {
  margin-right: 0;
  margin-left: 0;

  > .col,
  > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
  }
}

I can confirm this behaviour. In my project, everything works fine in dev mode, but in production where i use postcss with css-mqpacker and options { sort: true } .no-gutters margins are being overridden

So the problem here is that a build tool is juggling around our CSS? I don't know how well we can solve this and all other problems that could arise from that—there's a decent amount of things that rely on a particular order to our Sass imports.

Hey @mdo, yeah that's correct. I definitely agree with you, that we can't account for all of the issues that may pop up with anyone's various build system. But in this case, if you consider that .no-gutter is really a utility/helper class of a .row item, then following the same mentality of the other Bootstrap utilities by using !important to ensure that declarations are executed regardless of conflict seems appropriate. While I suggested turning the selector .no-gutters into .row.no-gutters to correct the specificity issue created by the media queries, an alternative solution of just using an !important might line up better with the mentality of existing utility classes.

Punting as a won't fix for now, but let's keep an eye on this for after Beta 1 drops.


fix(falco/env-variable): allow users to set env variables

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

If this PR will release a new chart version please make sure to also uncomment the following line:

/kind chart-release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area falco-chart

/area falco-exporter-chart

/area falcosidekick-chart

/area event-generator-chart

What this PR does / why we need it:
Users are now allowed to set environments variables using dictionaries such as:
    - name: myEnv
      valueFrom:
        fieldRef:
          fieldPath: metadata.namespace

The previous solution required variables to be provided as key values:
    - name: myEnv
      value: myVar

Which issue(s) this PR fixes:

Fixes #414
Special notes for your reviewer:
I have tested the chart. Everything seems to work fine. Please give it a try
Checklist

[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] CHANGELOG.md updated

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ReddaHawk
Once this PR has been reviewed and has the lgtm label, please assign cpanato for approval by writing /assign @cpanato in a comment. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Welcome @ReddaHawk! It looks like this is your first PR to falcosecurity/charts 🎉

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: alacuku, ReddaHawk
Once this PR has been reviewed and has the lgtm label, please assign cpanato for approval by writing /assign @cpanato in a comment. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 1a6646f0a9f6b4f1c00dfd7991b3dbff635eb494

New changes are detected. LGTM label has been removed.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: alacuku, leogr, ReddaHawk
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: eca8552ac5ecbd89f8b0993e4ba408276e054a33


Runtime reconfiguration of log level

🚀 Feature Request
At the moment we set the logging level in the RUST_LOG environment variable at startup, and changing the log level requires restarting the process. It would be useful to be able to change the log level at runtime to avoid throwing away the process state. The feature request is to build an API which allows the administrator to provide new logging configuration. For example, this could be an HTTP endpoint which takes a new RUST_LOG value and reconfigures the logging:
curl -d level=debug http://localhost:6190/config/logging

I'm currently adding back in Filtering from Env Vars as we speak (it had to be ripped out for text logs when we unified our two systems) And once thats done I'll be able to do this! :D


[C++] Use a custom optional instead of std::optional for non-scalar type

Is your feature request related to a problem? Please describe.
Currently bebop use concrete type when generating a field with non-scalar types. This make things simple since everything is value-based, but prevents user to make cyclic dependency which gracefully prevented in https://github.com/betwixt-labs/bebop/pull/111.
Describe the solution you'd like
I would like to suggest to revise and support cyclic dependency instead. Here what I had in mind:

Define a custom std::optional implementation, but instead of use value type, use heap (e.g smart pointer). This is relatively simple to do.
Determine definitions that are cyclic in parser, and then in the generator, forward declare them before generating the actual definitions.
The custom optional will incur extra cost in runtime; typically it use 4-8 bytes (the std::optional use extra 1 byte only) and it loss cache locality. Thus, this custom optional should only be used only for non-scalar type where the size is trivial

Describe alternatives you've considered
The easiest way (and relatively safe) to do this is to expose smart pointer for non-scalar type. But this would be a breaking change to the user.
Additional context
N/A

For reference, Protobuf use pointer in the backing field, capnproto use it too (although I'm not sure how exactly it is implemented in capnproto). Both seems to allow user to have cyclic dependency


Error: Command 'Python: Select Interpreter' resulted in an error

Discussed in https://github.com/microsoft/vscode-python/discussions/20933

Originally posted by HikmetBeyoglu March 29, 2023
Dear folks,
I am using
Version: 1.76.2 (user setup)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:55:54.936Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No
My issue starts from having the following error:
'Solving: Command 'Python: Select Interpreter' resulted in an error' Command 'Python.setIntrepreter' not found
I tried to:
1- Go to, %USERPROFILE%/.vscode/extensions
2- Delete any folder with the name starting with ms-python.python*
However, I am still facing the same issue!
Support to solve the error would be appreciated.

I tried to uninstall vscode and reinstall it again. after installing the extension of Python. I, again as before, see the following issue:
"Extension host terminated unexpectedly 3 times within the last 5 minutes."

Looks like the issue is solved by downgrading vscode to 1.75 release and uninstalling Jupyter notebook plugin. However, this solution scarifies Jupyter

Even keeping the most recent version of vscode while disabling jupyter makes the things fine. However, in this case jupyter is sacrificed.

However, in this case jupyter is sacrificed.

to

However, in this case jupyter is sacrificed.

I take it to mean that this issue goes away once Jupyter extension is disabled, hence transferring to Jupyter.


Add support for older Linux instances

Hello,
I was trying this out on older OSes like RHEL 5 and RHEL 6, and I noticed this would not work on those OSes.
I was attempting to identify where and found that Finder.java on line 74 is coded to use the shell on /usr/bin/sh which doesn't exist on older RHEL-based OSes. Shell is in /bin/sh, the same as Alpine and MACOS.
private static final String[]          LINUX_JAVA_HOME_CMDS      = { "/usr/bin/sh", "-c", "echo $JAVA_HOME" };
I was wondering if the Linux shell should also be referencing /bin/sh as newer OSes like RHEL 8, RHEL 9, Ubuntu 22.04, 23.10, have /bin/sh.
Perhaps this is a better idea for now?
If that doesn't work, perhaps a new File("/usr/bin/sh").exists() to default to /bin/sh is an alternative?

That should be easy to fix, will take a look tomorrow. Thanks for the report 👍🏻

Should be fixed with version 17.0.37

Will test it out soon after the holidays. Thank you very much!


Issue with prettier-loader and *.vue files

If you know how to fix the issue, make a pull request instead.

[ ] I tried using the latest stable version of prettier-loader
[ ] I've read readme

Select one of these and delete the others:
If asking a question:

[ ] Question: ...
[ ] Code (if necessary) below:

If reporting a bug:
Good morning and thank you for this wonderful tool! I just want to bring to your attention that this loader doesn't work properly on *.vue files. It actually doesn't recognize the syntax and confuse it with *.js files. Could you please provide a fix for that!

[ ] Steps to repeat:
If you try to add this loader to Storybook Webpack configuration, it will alter the vue files and generate a syntax error
[ ] Code (if necessary) below:

[ ] Expected behavior:

It should prettify *.vue files

[ ] Observed behavior:

It is not prettifying *.vue files and it outputs a run error!

Feel free to reach out if the bug is unclear!


chore(ci): add cache action

Thank you for contributing! Please confirm this pull request meets the following requirements:

[x] I followed the contributing guidelines: https://github.com/github/explore/blob/master/CONTRIBUTING.md
[x] I have no affiliation with the project I am suggesting (as a maintainer, creator, contractor, or employee).

Which change are you proposing?

[ ] Suggesting edits to an existing topic or collection
[ ] Curating a new topic or collection

Editing an existing topic or collection
I'm suggesting these edits to an existing topic or collection:

[ ] Image (and my file is *.png, square, dimensions 288x288)
[ ] Content (and my changes are in index.md)

Please replace this line with an explanation of why you think these changes should be made.

Curating a new topic or collection

[ ] I've formatted my changes as a new folder directory, named for the topic or collection as it appears in the URL on GitHub (e.g. https://github.com/topics/[NAME] or https://github.com/collections/[NAME])
[ ] My folder contains a *.png image (if applicable) and index.md
[ ] All required fields in my index.md conform to the Style Guide and API docs: https://github.com/github/explore/tree/master/docs

Please replace this line with an explanation of why you think this topic or collection should be curated.

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.

9320 runs, 248419 assertions, 36 failures, 0 errors, 0 skips
##[error]Process completed with exit code 1.


Errors executing run_command do not affect exit code

Example: file error.lean
run_command tactic.fail "Error"

Test
% lean error.lean
error.lean:1:12: error: don't know how to synthesize placeholder
context:
⊢ Type
error.lean:1:0: error: Error
state:
⊢ true
% echo $?
0

BTW, this would be fixed by #1405 as well.


Disconnect the Adapters when no playback is detected

I have my Rainmeter skin configured to hide it when no adapter is being used. Using this Extension now results in always an empty, white skin on my desktop.
That's why I'm asking if it's possible to disconnect the adapters when no current playback from a supported site is detected and reconnect when a playback starts?

Duplicate of #20


Error: unable to find valid certification path to requested target

We are experiencing issues with requesting the migration endpoint. The certification path can not be found:
[org.keycloak.services] (default task-1) KC-SERVICES0013: Failed authentication: javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The root CA is trusted by default in the jvm cacerts truststore. We have tried importing multiple variants with the full chain and without, but the errors persists. Even when we try to disable the trustmanager, the error persist. Any thoughts?

Solved it in one of our nginx containers which didn´ t have the full chain crt included allthough it was correctly configured in loadbalancer in front of the nginx.


datasette secrets imcompatible with older datasette versions

Arrived at this issue
ImportError while importing test module 'C:\Users\m3n7es\source\datasette-enrichments-gmap-elevation\tests\test_elev_parse_args.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests\test_elev_parse_args.py:2: in <module>
    from datasette_enrichments_gmap_elevation import get_template_args
datasette_enrichments_gmap_elevation\__init__.py:7: in <module>
    from datasette_enrichments import Enrichment
venv\Lib\site-packages\datasette_enrichments\__init__.py:5: in <module>
    from datasette_secrets import Secret, get_secret
venv\Lib\site-packages\datasette_secrets\__init__.py:5: in <module>
    from datasette.plugins import pm
venv\Lib\site-packages\datasette\plugins.py:27: in <module>
    pm.load_setuptools_entrypoints("datasette")
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\importlib\metadata\__init__.py:202: in load
    module = import_module(match.group('module'))
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
E   ModuleNotFoundError: No module named 'datasette_gis_partial_path_lat'

I'm not controlling the version of datasette I require:
dependencies = [
    "datasette",
    "datasette-enrichments>=0.2",
    "sqlite-utils",
    "datasette-gis-partial-path",
]

As can be seen above, I am controlling the version of enrichments for some reason. I'll try removing that control. Current release is 0.4.2

Ha! You know what? This project is agile.
You know what's easier than debugging this? Placing the short-ish partial path code directly in the enrichment for now.

Once that was done, the issue became more apparent:
datasette-secrets 0.1a4 requires datasette>=1.0a13, but you have datasette 1.0a3 which is incompatible.```

Or.... that might not be the issue at all since I'm not in a venv. Bummer.

I'm going to have to back out the changes pip made.

Finally bludgeoned around to get
ModuleNotFoundError: No module named 'datasette_gis_partial_path_lat'
which was fixed in my venv by
pip uninstall datasette-gis-partial-path
I need to work on that package apparently.


frontend: NLJ selected when hash join could be used

Describe the bug
Sometimes, the optimizer could have selected hash join.
To Reproduce
create table t1(v1 int not null);
create table t2(v1 int not null);
create materialized view mv2 as select * from t1, t2 where t1.v1 = t1.v1;

will panic because NLJ is not implemented for stream.
Expected behavior
Build plan using hash join.
Additional context

This is strange. It should be solved by Optimizer.

Is it supposed to be t2.v1? NLJ is required for where t1.v1 = t1.v1.

Oh, that's true! Sorry for the typo.

Verified to work if t1.v1 == t2.v1.


Licence Clarification

I would like to use the package, but would like to clarify the licence under which I can use it.  Please could you include a LICENCE file?
Thanks

The licence is in the https://github.com/web-animations/web-animations-js/blob/dev/COPYING file. I'm not sure why it's not called LICENCE.

Fantastic, thanks!


NIO makes it incredibly hard to change a port number on a given socket address

if we want to set the port number on a given SocketAddress we need to use code like this which is really dodgy and outright wrong if we don't know it's an IPv4 address:
let destAddress = en0Interface.broadcastAddress?.withSockAddr { (ptr, size) -> sockaddr_in in
    // this is terrible code making fragile assumptions just to change a port number :(
    precondition(size == MemoryLayout<sockaddr_in>.size)
    return ptr.withMemoryRebound(to: sockaddr_in.self, capacity: 1) { ptr in
        var newAddress = sockaddr_in()
        newAddress = ptr.pointee
        newAddress.sin_port = in_port_t(destPort).bigEndian
        return newAddress
    }
}

we need to fix this.

Fixing this should be straightforward enough for anyone with Swift experience.

Agreed. My API proposal would be to make port settable too. Only question is: What do we do if the address is a Unix Domain Socket? Ignore port or hard crash? CC @glbrntt / @Lukasa ?

I'd normally say crashing is fine, but given that port is already optional to cover this case I'd say we should only crash if it's being set to a non-nil value.

Agreed, sounds good to me!

Sounds totally reasonable!

Agreed. My API proposal would be to make port settable too. Only question is: What do we do if the address is a Unix Domain Socket? Ignore port or hard crash? CC @glbrntt / @Lukasa ?

I looked at the code, but the point is: address is read-only. So even we make it settable or it's necessary to make a new SocketAddress. I came up with this code for the moment:
    public var port: Int? {
        get {
            switch self {
            case .v4(let addr):
                // looks odd but we need to first convert the endianness as `in_port_t` and then make the result an `Int`.
                return Int(in_port_t(bigEndian: addr.address.sin_port))
            case .v6(let addr):
                // looks odd but we need to first convert the endianness as `in_port_t` and then make the result an `Int`.
                return Int(in_port_t(bigEndian: addr.address.sin6_port))
            case .unixDomainSocket:
                return nil
            }
        }
        set {
            switch self {
            case .v4(let addr):
                var sin_address = addr.address
                sin_address.sin_port = in_port_t(newValue!).bigEndian
                self = SocketAddress(sin_address, host: addr.host)
            case .v6(let addr):
                var sin_address6 = addr.address
                sin_address6.sin6_port = in_port_t(newValue!).bigEndian
                self = SocketAddress(sin_address6, host: addr.host)
            case .unixDomainSocket(_):
                fatalError("fatalError: Cannot set the port of a unix domain socket.")
                // TODO: How can I make a Test on this?
            }
        }
    }

Agreed. My API proposal would be to make port settable too. Only question is: What do we do if the address is a Unix Domain Socket? Ignore port or hard crash? CC @glbrntt / @Lukasa ?

If we make port settable, should we also make the new ipAddress mutable? Maybe not, because SocketAddress(ipAddress: ... can throw (and the throwable setters are not yet implemented).

I'll be working on this

Ah, you were faster! Cool 😎
But @ all: what do you think about my last comment? Should ipAddress also be settable? I would say no, but it’s better to discuss it :)

I’m inclined to say that it should be settable via a mutating function, which will be allowed to throw.


Error verifying JSON payload

var isJSON = require('is-json');
req = {"Name": "List_1"}
console.log(isJSON.strict(req)); //false

I'll take a look thanks

fixed with the PR https://github.com/joaquimserafim/is-json/pull/5


Cannot restore database from backups (server becomes read-only, activefailover setup)

My Environment

ArangoDB Version:        3.4.10
Storage Engine:             RocksDB
Deployment Mode:       Active Failover
Deployment Strategy:   ArangoDB Starter
Configuration:               3 VMs
Infrastructure:               Azure and own
Operating System:        Centos 7 / Ubuntu 18.04
Total RAM in your machine:        64GB / vm
Disks in use:        SSDK
Used Package:              .deb | .rpm

I cannot restore the databases from backups, always had this problem - at times it was succeeding on Ubuntu, it fails every time on Centos now.
arangorestore --server.username "<db-user>" --server.database "<db-name>" --input-directory "backup/" --overwrite true --batch-size 65535

It always fails with this message (triggered after about 1 minute, some objects get restored, some not):
2020-07-06T13:31:19Z [5177] ERROR {restore} Error while restoring data into collection '<collection>': got invalid response from server: HTTP 403: 'read only: server is in read-only mode' while executing 'restoring payload' with this payload: ''

2020-07-06T13:31:20Z [5177] ERROR {restore} got invalid response from server: HTTP 403: 'read only: server is in read-only mode' while executing 'restoring payload' with this payload: ''

Cluster was started with the ArangoDB starter like so
vm1
sudo /usr/bin/arangodb --starter.address=ip1 --starter.data-dir=/var/lib/arangodb/cluster --starter.join=ip1,ip2,ip3 --server.storage-engine=rocksdb --starter.mode=activefailover

vm2
sudo /usr/bin/arangodb --starter.address=ip2 --starter.data-dir=/var/lib/arangodb/cluster --starter.join=ip1,ip2,ip3 --server.storage-engine=rocksdb --starter.mode=activefailover

vm3
sudo /usr/bin/arangodb --starter.address=ip3 --starter.data-dir=/var/lib/arangodb/cluster --starter.join=ip1,ip2,ip3 --server.storage-engine=rocksdb --starter.mode=activefailover

Is there anything I can do? Someone please chime in if you happen to have any insights, blocked by db restoration with absolutely no idea on what to do next, there's no error I'm aware of which could explain this.
Many thanks in advance!

please note that ArangoDB 3.4 is EOL:
https://www.arangodb.com/eol-notice/
Numerous improvements have been made to the replication code in the 3.5 release cycle. Please upgrade.

@amorroxic Can you try to restore the dump into a 3.6 setup and report whether the error occurs there still?


Emit output that is styled like a normal markdown paragraph rather than a CodeBlock

I'd like to template some text but it is styles as a code block.
import math
print ("The value of pi is {pi:1.3f}".format(pi=math.pi))

The following works when outputting to html but gets ignored when outputting to latex.
from IPython import display
import math
t = "The value of pi is {pi:1.3f}".format(pi=math.pi)
display.HTML(t)

How can I get this to display in both html and latex?

Print messages go through stdout. At the moment, I just wrap those in a CodeBlock, mainly to signify that the text is output from a code chunk.

How can I get this to display in both html and latex?

I thought that display.display(t) would work. The documentation says

By default all representations will be computed and sent to the frontends.
Frontends can decide which representation is used and how.

However, I only see text/plain coming through. If that returns representations for text/html and text/pdf I think we would correct intercept and render it.

I thought display.Markdown(t) might be a solution that could then be rendered to latex or html by pandoc

Thanks, that worked for me (for html and latex).

Thinking about it more, when display.display says it computes all the representations, that probably means _repr_latex_, _repr_html_, etc. But strings don't define any of those methods, just str.
I'll write a couple tests and merge that tonight. Thanks for trying it out.


Feature request: TransactionBuilder.setMode()

Some SQL dialects have different ways to start a transaction for write or read-only. I'm writing a driver for SQLite, which has BEGIN DEFERRED and BEGIN IMMEDIATE.  It would be great if an implementation of Driver.beginTransaction() could get enough information to choose among these variants.
I'm suggesting a new method TransactionBuilder.setMode(mode), where mode can be 'read-only'|'read-write'. This optional value would be passed to the driver in a new mode property on TransactionSettings.
In SQLite, the value of using BEGIN IMMEDIATE for a write transaction is that potential deadlock will be detected by attempting to acquire an exclusive lock immediately. This would allow the driver to implement backoff and retry in beginTransaction() instead of requiring handling at the application level.
Note that I'm only requesting a way for drivers to get this information, not necessarily for any currently provided drivers to add support.
Thanks for your consideration!

Hey 👋
We're able to add things that are optional for existing drivers. e.g. savepoint methods in the upcoming ControlledTransaction feature.
I'm not sure about the naming of this method.
PostgreSQL docs refer to them as "modes", together with isolation levels.

The DEFERRABLE transaction_mode is a PostgreSQL language extension.
The SQL standard requires commas between successive transaction_modes, but for historical reasons PostgreSQL allows the commas to be omitted.
https://www.postgresql.org/docs/current/sql-start-transaction.html

MySQL docs refer to them as "characteristics".

START TRANSACTION
   [transaction_characteristic [, transaction_characteristic] ...]

transaction_characteristic: {
    WITH CONSISTENT SNAPSHOT
  | READ WRITE
  | READ ONLY
}

https://dev.mysql.com/doc/refman/8.4/en/commit.html

SQLite docs refer to them as "behaviors".

The default transaction behavior is DEFERRED.
https://www.sqlite.org/lang_transaction.html#deferred_immediate_and_exclusive_transactions

Also, putting all of these together in one method will be confusing for users:
e.g. PostgreSQL has the defferable option, and SQLite has the deffered option.
It seems that, unlike with isolation levels, the specs here diverge a lot.

How about .setReadOnly(value: boolean), so it only specifies (optionally) whether the transaction is read-only or read-write? This would sidestep terminology differences.
Or what about just adding .settings(value: TransactionSettings)? This would provide a general way to communicate with custom drivers.

This is unintuitive. Naming has to be close to spec.

PostgreSQL's deferred and not deferred "transaction modes" (a word used to also describe isolation levels and "access modes") seem to belong with SQLite's deferred, immediate, exclusive "behaviors".
PostgresSQL docs also refer to them as just "properties"

The DEFERRABLE transaction property has no effect unless the transaction is also SERIALIZABLE and READ ONLY. When all three of these properties are selected for a transaction, the transaction may block when first acquiring its snapshot, after which it is able to run without the normal overhead of a SERIALIZABLE transaction and without any risk of contributing to or being canceled by a serialization failure. This mode is well suited for long-running reports or backups.
https://www.postgresql.org/docs/current/sql-set-transaction.html

This pushes us towards
setBehavior(behavior: 'deferrable' | 'deferred' | 'immediate' | 'exclusive')

Which is not ideal - wish PostgreSQL (the popular one) had a proper name for this, but its the lesser evil.