new(sinsp): Allow enabling/disabling individual container engines on startup

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

Any specific area of the project related to this PR?

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

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap-engine-udig

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

feat(sinsp): added sinsp::set_container_engine_mask() to disable individual container engines (all are enabled by default)

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: gnosek
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 [gnosek]

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

/milestone 0.11.0

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

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: gnosek, Molter73
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 [Molter73,gnosek]

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

/hold for the release

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, gnosek, Molter73
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 [FedeDP,Molter73,gnosek]

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

/unhold


[Enhancement]: the hide and pin icons are too dark

Feature Description
the notifications monitor is dark and therefore it makes sense to make them white instead

It's dark because you use your system in dark mode, night mode in the browser or a dark mode extension?
This might be a CSS issue, I'll try to figure it out.

Ok I figured it out. Will be fixed in the next version.

2.10.4 released


Unexpected behaviour while using IndexDecider

Does this issue relate to a new feature or an existing bug?

[X] Bug
[ ] New Feature

What version of Serilog.Sinks.Elasticsearch is affected?  Please list the related NuGet package.
Serilog.Sinks.Elasticsearch Version 6.5.0
**What is the target framework and operating system? See

[X] netCore 2.1.4
[ ] netCore 2.0
[ ] netCore 1.0
[ ] 4.7
[ ] 4.6.x
[ ] 4.5.x

Please describe the current behavior?
I am trying to use IndexDecider for storing RequestLogs to different Index on ElasticSearch. However, the code does not work. Basicly, It creates the new Index but does not populate in it. Instead, sink sends logs to default Index which is logstash-{0:yyyy.MM.dd}
Please describe the expected behavior?
The expected behavior would be to send logs into the request-log-{0:yyyy.MM.dd}
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem
The configuration and code is as below:
  var loggerConfiguration =  new LoggerConfiguration()
                .ReadFrom.Configuration(_configuration.GetSection("Logging"))
                .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri("http://cwlog.somehost.com:9200"))
                {
                    IndexDecider = (e, offset) =>
                    {
                        if (e.MessageTemplate.Text.Equals("<{EventID:l}> Http Request Method: {Method} Url: {Url}"))
                        {
                            var indexName = $"request-log-{offset:yyyy.MM.dd}";
                            return indexName;
                        }

                        return $"logstash-{offset:yyyy.MM.dd}";
                    },
                    CustomFormatter = new ExceptionAsObjectJsonFormatter(true)
                });

{
          "Name": "Elasticsearch",
          "Args": {
            "nodeUris": "http://cwlog.creditwestbank.com:9200",
            //"minimumLogEventLevel": "Debug",
            "autoRegisterTemplate": true,
            "autoRegisterTemplateVersion": "ESv6",
            //"customFormatter": "Serilog.Sinks.Elasticsearch.ExceptionAsObjectJsonFormatter, Serilog",
            "bufferBaseFilename": "c:\\logs\\dev\\westapi\\es-buffer",
            "bufferFileSizeLimitBytes": 52428800,
            "period": 2,
            "bufferLogShippingInterval": 5000
          }
        }

ElasticSearch Log
{
	"request-log-2018.10.02": {
		"aliases": {

		},
		"mappings": {

		},
		"settings": {
			"index": {
				"creation_date": "1538455897529",
				"number_of_shards": "5",
				"number_of_replicas": "1",
				"uuid": "NXLTgX9JQ56HBhOywycmPg",
				"version": {
					"created": "6010299"
				},
				"provided_name": "request-log-2018.10.02"
			}
		}
	}
}

Please note that; the index is created but is not populated, And the logs are sent to default index.

Can you try with "request-log-{0:yyyy.MM.dd}" instead?

@mivano  no luck with that. the behavour is still same.

Indexdecider is not supported with persistant file option either. So i ended up using filters which seems to work and gives less complex code in the sink. Log.Logger = new LoggerConfiguration()
.WriteTo.Console()
.Filter.ByExcluding(Matching.WithProperty("Count", p => p < 10))
.CreateLogger();


Video CMS

[ ] It should be possible to control the order that video entries are shown on /videos in admin - use https://github.com/alsoicode/django-admin-sortable
[ ] It should be possible to control the order that video languages are shown using the existing inline and https://github.com/alsoicode/django-admin-sortable

The inline doesn't seem to be sortable for me. Does it work for you?

The inline doesn't seem to be sortable for me. Does it work for you?

It doesn't show sort button but you should drag&sort them. It works fine on my local project


[Bug]: Help and resources icon missing

Is there an existing issue for this?

[X] I have searched the existing issues

Description
Help and resources icon missing throughout
Steps To Reproduce
refer to the screenshot

Public Sample App
No response
Issue video log
No response
Version
1.9.6

This is a new feature and resolved by the latest release merge. @parth-appsmith please verify if the following update to design is okay?

The resource and help icon is supposed to be part of the footer, this got missed to be presented in the designs since our footer component probably wasn't updated and I missed on explicitly adding it.
To confirm @ayushpahwa @AnandShahs123 the icon should be visible since it is already there in the prod.

Help and resources visible now.


Envsalink arm night

Description:
Adding the ability to call the arm_night service, as requested by the community.  Also adding a custom service for "arm_max" which is another arming mode offered by the envisalink device.
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8886
Example entry for configuration.yaml (if applicable):

Checklist:

[X] The code change is tested and works locally.
[X] Local tests pass with tox. Your PR cannot be merged unless tests pass
[X] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[X] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[X] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[X] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

There are merge conflicts.

@Cinntax are you still working on this?

I'll close here since there's no new work for some time. Please open a new PR when ready to finish.


pluralize('staff') returns staff

pluralize('staff') returns staff
In general case, staff is countable. The result should be staffs.

Sorry i found that staff is uncountable


Check for directories on Windows before creating

Description
Under Chef 14 bootstrap, creation of directories
that already existed in Windows would log an error,
but not raise an error.
With the Chef 15 bootstrap change to run the bootstrap
script under powershell, any error in the script now causes
an error to be raised up. Even though the bootstrap complets
successfully - the script execution does not halt on error -
it presents a confusing error to the human that makes it look like
bootstrap failed.
Related Issue
Fixes #8469
Signed-off-by: Marc A. Paradise<EMAIL_ADDRESS>Types of changes

[x] Bug fix (non-breaking change which fixes an issue)

Checklist:

[x] I have read the CONTRIBUTING document.
[ ] I have run the pre-merge tests locally and they pass.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.
[ ] All commits have been signed-off for the Developer Certificate of Origin.

👍


Server side apply

Some CRDs inside kube-prometheus-stack fails to apply due to large size.

The CustomResourceDefinition "prometheuses.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

The proposed way for installation is using the --server-side flag for kubectl apply.
Is there a way to support that with tanka?
Currently, I'm using this as a workaround.
#!/usr/bin/env bash

rm -rf manifests
tk export manifests/ environments/prod -t 'CustomResourceDefinition.*'
find manifests -type f ! -name '*.yaml' -delete
kubectl apply --server-side -f manifests
tk apply environments/prod -t '!CustomResourceDefinition.*'

Thank you, @jjo, for the prompt fix!


Action initiated from LControl and popup state

Description

I found that if you try to create custom buttons, forms, etc. inside LControl component there is a problem with popup state. Popup not showing from the actions initiated from this button's - action is executed, but popup opens and immediately closes (in older versions of leaflet/vue/vue2leaflet you can see that popup is blinking - https://jsfiddle.net/mike_trueh/g1xv5s9y/20/).
In console you can see that action is initiated and coordinates are provided to function
If this buttons are out from map controls popup opens normally.
Live Demo

https://jsfiddle.net/mike_trueh/g1xv5s9y/
Steps to Reproduce
Just click on buttons above map and inside LControl
Expected Results

Actual Results

Browsers Affected

[x] Chrome
[x] Firefox
[ ] Edge
[x] Safari 12
[ ] Safari 9
[ ] Safari 8
[ ] IE 11

Versions

Leaflet: v1.5.1
Vue: v2.6.10
Vue2Leaflet: v2.1.1

@mike-trueh this should be because the click event is emitted two times / catched two times.
you can use this:  @click.stop.prevent= to fix your issue.

@DonNicoJs Oh great! Thanks a lot! I spent about two days to solve that problem

I am glad that the issue is resolved
On Fri, 21 Jun 2019 at 13:40, mike-trueh<EMAIL_ADDRESS>wrote:

Closed #406 https://github.com/KoRiGaN/Vue2Leaflet/issues/406.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KoRiGaN/Vue2Leaflet/issues/406?email_source=notifications&email_token=ABM6A5QZ2E7POU5YME63VA3P3S435A5CNFSM4H2QS4A2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSDMDSFI#event-2430089493,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABM6A5RTJFGTVPERUSKBBETP3S435ANCNFSM4H2QS4AQ
.

I still don't fully understand why the event was executed twice in LControl?

@mike-trueh Hello! I think source of this behavior is event bubbling. Good article abuit this here. When you click custom control, event buble from control to map and call default click handler on map.
For see this it add <l-map @click="window.console.log(arguments)"
When you use @click.stop event not propagated to map.
But it is not stop propagantation other events: double click, drag, etc. For stop bubbling all events see below.
@DonNicoJs May be add some describe about events bubbling in documentation of LControl? Or add some configurations property for disable event bubbling in LControl and set to true by default. I found special function stopPropagation for this in leaflet utils. And same problem with solution on stackoverflow. And in leaflet source code usages disableClickPropagation function in Control.Zoom.
For vue we can use code like this:
mounted () {
  DomEvent.disableClickPropagation(this.$refs.control.$el)
}

I can make PR.

Hi @bezany yeah your suggestion is more than valid a PR would be awesome
On Tue, 2 Jul 2019 at 16:00, bezany<EMAIL_ADDRESS>wrote:

@mike-trueh https://github.com/mike-trueh Hello! I think source of this
behavior is event bubbling. Good article abuit this here
https://javascript.info/bubbling-and-capturing. When you click custom
control, event buble from control to map and call default click handler on
map.
For see this it add <l-map @click="window.console.log(arguments)"
When you use @click.stop event not propagated to map.
But it is not stop propagantation other events: double click, drag, etc.
For stop bubbling all events see below.
@DonNicoJs https://github.com/DonNicoJs May be add some describe about
events bubbling in documentation of LControl? Or add some configurations
property for disable event bubbling in LControl and set to true by
default. I found special function stopPropagation
https://leafletjs.com/reference-1.5.0.html#domevent-stoppropagation for
this in leaflet utils. And same problem with solution
https://stackoverflow.com/questions/37628635/stop-interactions-click-drag-from-propagating-on-control-leaflet
on stackoverflow. And in leaflet source code usages disableClickPropagation
function
https://github.com/Leaflet/Leaflet/blob/master/src/control/Control.Zoom.js#L94
in Control.Zoom.
For vue we can use code like this:
mounted () {
DomEvent.disableClickPropagation(this.$refs.control.$el)
}
I can make PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KoRiGaN/Vue2Leaflet/issues/406?email_source=notifications&email_token=ABM6A5QT4RNYDQFFSZIOQPDP5NNPTA5CNFSM4H2QS4A2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZBLYPY#issuecomment-507690047,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABM6A5R3VGJ3QYIBGY2HF4DP5NNPTANCNFSM4H2QS4AQ
.


0.12.0 crash - stack overflow

Running 0.12.0 binary I get a stack overflow after a few seconds of runtime. Tested on Fedora 35 and vanilla Ubuntu 20.04
Nov 30 22:49:11 protobuf go-dnscollector[2238]: runtime: goroutine stack exceeds<PHONE_NUMBER>-byte limit
Nov 30 22:49:11 protobuf go-dnscollector[2238]: runtime: sp=0xc020380390 stack=[0xc020380000, 0xc040380000]
Nov 30 22:49:11 protobuf go-dnscollector[2238]: fatal error: stack overflow
Nov 30 22:49:11 protobuf go-dnscollector[2238]: runtime stack:
Nov 30 22:49:11 protobuf go-dnscollector[2238]: runtime.throw({0x9cb67f, 0xe00220})
Nov 30 22:49:11 protobuf go-dnscollector[2238]: #011/opt/hostedtoolcache/go/1.17.3/x64/src/runtime/panic.go:1198 +0x71
Nov 30 22:49:11 protobuf go-dnscollector[2238]: runtime.newstack()
Nov 30 22:49:11 protobuf go-dnscollector[2238]: #011/opt/hostedtoolcache/go/1.17.3/x64/src/runtime/stack.go:1088 +0x5ac
Nov 30 22:49:11 protobuf go-dnscollector[2238]: runtime.morestack()
Nov 30 22:49:11 protobuf go-dnscollector[2238]: #011/opt/hostedtoolcache/go/1.17.3/x64/src/runtime/asm_amd64.s:461 +0x8b
Nov 30 22:49:11 protobuf go-dnscollector[2238]: goroutine 21 [running]:
Nov 30 22:49:11 protobuf go-dnscollector[2238]: runtime.heapBitsSetType(0xc009804f50, 0x10, 0x10, 0x901880)
config file:
trace:
verbose: false
collectors:
dnstap:
enable: true
listen-ip: <IP_ADDRESS>
listen-port: 6000
tls-support: false
loggers:
logfile:
enable: true
file-path:  "/var/log/dnstap.log"
max-size: 100
max-files: 20
mode: json

0.12.0-crash.txt

Can you share a network dump with DNS packets ?
I suspect this crash is caused by a badly decoded packet, but so far I don't succeed to reproduce in my side .

hello, thank you, shared by email for relative confidentiality of data.

could you try this new beta release https://github.com/dmachard/go-dnscollector/releases/tag/v0.12.0-b2 ?

so far so good, running for about 10 hours so far

good news :) thank for testing

still going strong.


Newbie - keyboard interface attempt

Hi,  If any has any time to offer feedback or a more effective way to create a keyboard interface to the bebop2, I would appreciate the tips.
Able to get connected to the drone, but the flight controls are not working and getting a clear indicator that I am creating more than one wifi scoket connect.  I.e., my logic is flawed - still much for me to learn.
I dd it this way as the 'pynput" package would not release control (until the return was false), and I thought to keep the keyboard interface as the managing application was a reasonable solution....
Thanks as always for any time anyone can offer.
Setup = Windows 10, python 3.6 bebop2
The screen displays are:
C:\Users\Joe\Anaconda3\Lib\site-packages\pyparrot>keyboard_dc_2.py
"Zeroconf called and running - successfully - print statement added as a check on Zeroconf"
"This is keyboard interface to the Parrot Bebop drone."
"The prep steps are the wifi needs to be turn on and the connect established"
connecting
Service Bebop2-176199._arsdk-090c._udp.local. added, service info: ServiceInfo(type='_arsdk-090c._udp.local.', name='Bebop2-176199._arsdk-090c._udp.local.', address=deleted', port=44444, weight=0, priority=0, server='Bebop2-176199.local.', properties='deleted': False})
{"d2c_port": 43210, "controller_type": "computer", "controller_name": "pyparrot", "arstream2_client_stream_port": 55004, "arstream2_client_control_port": 55005}
{'status': 0, 'c2d_port': 54321, 'c2d_update_port': 51, 'c2d_user_port': 21, 'qos_mode': 0, 'arstream2_server_stream_port': 5004, 'arstream2_server_control_port': 5005}
c2d_port is 54321
starting listening at
 [38;5;22m Success in setting up the wifi network to the drone!  [0m
True
**keyboard enter: q**
 bebop.ask_for_state_update()
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(144, 0, 2)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(142, 0, 3)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 3)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 4)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 4)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 4)
 [38;5;196m Error: tried to parse a bad sensor packet  [0m
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(144, 0, 1)
**other keys checked**
bebop.safe_takeoff(10)
bebop.ask_for_state_update()
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(144, 0, 2)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(142, 0, 3)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 3)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 4)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 4)
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(134, 0, 4)
 [38;5;196m Error: tried to parse a bad sensor packet  [0m
 [38;5;196m Could not find sensor in list - ignoring for now.  Packet info below.  [0m
(144, 0, 1)
**more key checks:**
bebop.safe_land(10)
bebop.move_relative(0, 0, -0.1, math.radians(0))
bebop.move_relative(0.1, 0, 0, math.radians(0))
bebop.move_relative(-0.1, 0, 0, math.radians(0))
bebop.move_relative(0, 0, 0.1, math.radians(0))
bebop.move_relative(0, 0, -0.1, math.radians(0))
bebop.safe_takeoff(10)
bebop.move_relative(0, 0, 0, math.radians(90))
bebop.move_relative(0, 0, 0, math.radians(-90))
bebop.start_video_stream()
bebop.stop_video_stream()
bebop.emergency_land()
This is keyboard interface to the Parrot Bebop drone.
The prep steps are the wifi needs to be turn on and the connect established
connecting
Service Bebop2-176199._arsdk-090c._udp.local. added, service info: ServiceInfo(type='_arsdk-090c._udp.local.', name='Bebop2-176199._arsdk-090c._udp.local.', address=deleted, port=44444, weight=0, priority=0, server='Bebop2-176199.local.', properties='deleted': False})
{"d2c_port": 43210, "controller_type": "computer", "controller_name": "pyparrot", "arstream2_client_stream_port": 55004, "arstream2_client_control_port": 55005}
{'status': 0, 'c2d_port': 54321, 'c2d_update_port': 51, 'c2d_user_port': 21, 'qos_mode': 0, 'arstream2_server_stream_port': 5004, 'arstream2_server_control_port': 5005}
c2d_port is 54321
Traceback (most recent call last):
  File "C:\Users\Joe\Anaconda3\Lib\site-packages\pyparrot\keyboard_dc_2.py", line 13, in <module>
    success = bebop.connect(10)
  File "C:\Users\Joe\Anaconda3\lib\site-packages\pyparrot\Bebop.py", line 218, in connect
    connected = self.drone_connection.connect(num_retries)
  File "C:\Users\Joe\Anaconda3\lib\site-packages\pyparrot\networking\wifiConnection.py", line 157, in connect
    self._create_udp_connection()
  File "C:\Users\Joe\Anaconda3\lib\site-packages\pyparrot\networking\wifiConnection.py", line 361, in _create_udp_connection
    self.udp_receive_sock.bind(('<IP_ADDRESS>', int(self.udp_receive_port)))
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted

The code is:
from pynput import keyboard
from pyparrot.Bebop import Bebop
import pyparrot.keyboard_dc
import math

print("This is keyboard interface to the Parrot Bebop drone.")
print("The prep steps are the wifi needs to be turn on and the connect established")

bebop = Bebop()

print("connecting")
success = bebop.connect(10)
print(success)

# set safe indoor parameters
bebop.set_max_tilt(5)
bebop.set_max_tilt_rotation_speed(90)
bebop.set_max_vertical_speed(1)
bebop.set_max_altitude(10)

bebop.flat_trim(.2)

# trying out the new hull protector parameters - set to 1 for a hull protection and 0 without protection
bebop.set_hull_protection(0)

def on_press(key):
    try:
        if key.char == "q":
            # Check for state update, expecting error messages
            print("bebop.ask_for_state_update()")
            bebop.ask_for_state_update()
            return

        if key.char == "f":
            # Send drone forward 0.1 meters
            print("bebop.move_relative(0, -0.1, 0, math.radians(0))")
            bebop.move_relative(0, 0.1, 0, math.radians(0))
            return

        elif key.char == "b":
            # Send drone back 0.1 meters
            print("bebop.move_relative(0, -0.1, 0, math.radians(0))")
            bebop.move_relative(0, -0.1, 0, math.radians(0))
            return

        elif key.char == "r":
            # Send drone turn right
            print("bebop.move_relative(0, 0, 0, math.radians(90))")
            bebop.move_relative(0, 0, 0, math.radians(90))
            return

        elif key.char == "y":
            # Send drone turn left
            print("bebop.move_relative(0, 0, 0, math.radians(-90))")
            bebop.move_relative(0, 0, 0, math.radians(-90))
            return

        elif key.char == "t":
            # Send drone safe Takeoff
            print("bebop.safe_takeoff(10)")
            bebop.safe_takeoff(10)
            return

        elif key.char == "l":
            # Send drone safe Land
            print("bebop.safe_land(10)")
            bebop.safe_land(10)
            return

        elif key.char == "v":
            # Send drone video start
            print("bebop.start_video_stream()")
            bebop.start_video_stream()
            return

        elif key.char == "s":
            # Send drone video stop
            print("bebop.stop_video_stream()")
            bebop.stop_video_stream()
            return

    except AttributeError:
        return
#		 print('')

def on_release(key):
    if key == keyboard.Key.esc:
        # Stop listener
        print("bebop.emergency_land()")
        bebop.emergency_land()
        return False

    elif key == keyboard.Key.up:
        # Send drone up 0.1 meters
        print("bebop.move_relative(0, 0, -0.1, math.radians(0))")
        bebop.move_relative(0, 0, -0.1, math.radians(0))
        return

    elif key == keyboard.Key.down:
        # Send drone down 0.1 meters
        print("bebop.move_relative(0, 0, 0.1, math.radians(0))")
        bebop.move_relative(0, 0, 0.1, math.radians(0))
        return

    elif key == keyboard.Key.left:
        # Send drone left 0.1 meters
        print("bebop.move_relative(-0.1, 0, 0, math.radians(0))")
        bebop.move_relative(-0.1, 0, 0, math.radians(0))
        return

    elif key == keyboard.Key.right:
        # Send drone right 0.1 meters
        print("bebop.move_relative(0.1, 0, 0, math.radians(0))")
        bebop.move_relative(0.1, 0, 0, math.radians(0))
        return

# Collect events until released
with keyboard.Listener(
        on_press=on_press,
        on_release=on_release) as listener:
    listener.join()

you are only calling connect once so that is odd...

Hi,
I'm working on a script that allows me to control the parrot swing with a joystick. It's pretty simple to modify it for bebop I think (I'm not trying yet).
Here is the link if you are interested: https://github.com/Victor804/pyparrot/blob/joystick_support/examples/demoSwingJoystick.py

Victor804,
Thank you for sharing.  I will look it over.  I was able to get the
keyboard interface working somewhat. The drone takes flight commands but
does time out unexpectedly. I need more testing over the wekkend to better
define the issue I am seeing.
I will mark this issued closed as soon as the interface is stable and get
the video feed working.
Thanks again!
On Thu, Aug 23, 2018, 11:44 AM Victor804<EMAIL_ADDRESS>wrote:

Hi,
I'm working on a script that allows me to control the parrot swing with a
joystick. It's pretty simple to modify it for bebop I think (I'm not trying
yet).
Here is the link if you are interested:
https://github.com/Victor804/pyparrot/blob/joystick_support/examples/demoSwingJoystick.py
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/amymcgovern/pyparrot/issues/86#issuecomment-415464902,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AT5ww0icxvgGymxqbX0DT1HvZyc-JeFaks5uTs3JgaJpZM4WA4Oa
.

The issue I was calling "zeroconf" a second time via the "import pyparrot.keyboard_dc" code. Thus newbie...
The keyboard functions are working OK, but the drone does not seem to be very repeatable. I say this as typing the same command in the same order puts the drone in different locations, off by about a foot on a few tests. Has anyone else tried a repeatability test? Lastly, can not get the video to work with any repeatability or for any length> 2120 seconds.  Will open a new issue to get some suggestions. Thanks as always for the help and insight.

are you using a mambo or a bebop?  Mambo sensors are only at 2Hz.

Mambo.    So you are saying that there is no hope to get a reason png set of pictures or a live video feed from the mambo?
If so, how is the Mambo android interface able to have FPV flight control while supporting video storage on the SD card?  Do we have the same access (bit rate data transfer) as available to the Android app via the access parrot allows via the XLMs you have nicely created and shared? If that is the case, no issue I will switch to the Bebop 2, and break out the paint for all the walls I will be hitting and denting...
Thank you!

  It is about .25 to .5 second behind (which does annoy me, I wish I could get it to be fully real time!) but it is live and works just fine long-term for me.
You can store photos on the SD card if you are using the downward facing camera.  If you want to download from that camera, it seems to run about 0.5 second behind between sending the "take photo" command and then being able to download it.

That is good news, - when I learn a little more and reach that point, I too can deal with a lag of .25 to .5, it just means slower flight speed and less flight time, as you know.
Are you aware of any way to have the Mambo plugged in and charging while still being able to have the wifi connection? I would not think so but wanted to ask.
Lastly, In the morning I may open an issue/question around release 1.5.1 and demoMamboVisionGUI.py example not working correctly with Windows 10.  I want to test again with a fresh battery in the AM before wasting anyone time.
Amy, thank you again for all you do and offer your user group !!!

Oh having it plugged in and working would be so nice!  Not that I know of :(
For the windows, I'll do my best to fix.  I don't have a windows machine myself (I guess I need to do that) but I tested a bunch of stuff with one of my students and we fixed the permissions issues.  What works on Mac and linux was misbehaving on windows so I just hard-coded the file name.  But I'll be happy to help again.

Maybe I will try to hack a battery apart and solder in a USB cable? Not pretty, but functional.
Let me confirm before I waste any of your time.

Amy, May I ask if you would be willing to share the code you created to have the live streaming video on a mambo?  I ask as have 3 mambos, and am getting different results every time I run the same code even with the same mambo. The video capture will work one run and not the next.  My goal is to allow my wife to use the examples in her fifth-grade classroom. The mambo is a little safer for classroom vs the bebop 2. Thanks either way.  Joe - email is<EMAIL_ADDRESS>

Which code are you looking for that is different than what is in the demos?  What specifically do you want it to do?

I am trying to capture the rstp link real time into a mp4 file.   I am guessing I have
created a conflict or race condition some where?
My goal is to capture the rstp output to a mp4 file. From there add in a
key board command function.
On Fri, Aug 31, 2018, 11:31 AM amymcgovern<EMAIL_ADDRESS>wrote:

Which code are you looking for that is different than what is in the
demos? What specifically do you want it to do?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/amymcgovern/pyparrot/issues/86#issuecomment-417701247,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AT5www_B_qjEpNZr8zIy5kbnlnGNW145ks5uWVbdgaJpZM4WA4Oa
.

Ok, so you are trying to do it using opencv opening the RTSP directly?  I cannot make that work reliably, that is why I wrote the other two approaches (using VLC and FFMPEG).  It should just be one line of code to open the RTSP library in opencv but it fails quite reliably.
Does the GUI version of the vision not work for you?  It shows a live (with about 0.5 sec delay) window.


RenderBuffers not set in Render() path in OpenGL.

@Findus79 reports on Gitter that the example programs work in Extended mode, and his program works in DirectMode but not Extended mode because the buffers are not filled in on the OpenGL path in Extended mode (though they are in DirectMode).

This is with the regular RM examples installed with RM installer / SDK? I cannot reproduce here, OpenGL examples are working in either mode.

RenderManager demos work fine, but they ignore the RenderBuffer entries.  The user app is making use of them, so is failing.  We don't have a method to reproduce; we should be able to do so by setting the buffers in one of the Render() display apps, like the high-poly-count one.  It should then work in DirectMode but not extended until fixed.

Hi, there seems to be a misunderstanding, so I'd like to add that I do not use the renderbuffers. I just noticed that they are set in DirectMode and not set in ExtendedMode. My Render/Game Loop looks just like the examples (I built my application upon them), that is:

Update Context
Update Scene
Render

I just noticed the differences with the render buffers when debugging my problem. I do not use them directly.

Okay, good to know.  They should probably still be set in both cases, so I'll leave the issue open.


Expectation fails and display the very first line of my test on an empty char

🐛 Bug Report
When an expectation fails, it displays the wrong line (the very first line of the file, on an empty char, just like this:
    expect(object).toContain(value)

    Expected object:
      ...
    To contain value:
      "mycontent"

    > 1 | import React from 'react';
        |                                                                   ^
      2 |
      3 | import { shallow, mount, render } from 'enzyme';
      4 |

      at Object.<anonymous> (src/__tests__/sxxx/field-test.js:1:622)

To Reproduce
Steps to reproduce the behavior: create a simple test for React (using Jest, Enzyme and React) and make it fails:
import React from 'react';
import { shallow, mount, render } from 'enzyme';
import Field from '../xxx/field';

describe('Field suite', () => {
  it('should render a p with title and content', () => {
    expect(shallow(<Field title="hello" content="mycontent" />).find('span')).toContain('mycontent');
  });
});

Expected behavior
Something like:
    expect(object).toContain(value)

    Expected object:
      ...
    To contain value:
      "mycontent"

    > 7 | expect(shallow(<Field title="hello" content="mycontent" />).find('span')).toContain('mycontent');
        |                                                                   ^

      at _the right line and file name_

Link to repl or repo (highly encouraged)
Not currently public.
Run npx envinfo --preset jest
Paste the results here:
npx : 1 installé(s) en 1.973s
  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  Binaries:
    Node: 10.9.0 - /usr/local/bin/node
    Yarn: 1.9.4 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0

That's odd! Are you able to share Field so I can reproduce?
If I have this file:
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

import React from 'react';
import { shallow, mount, render } from 'enzyme';
// import Field from '../xxx/field';

const Field = ({content, ...props}) => <span {...props}>{content}</span>;

describe('Field suite', () => {
  it('should render a p with title and content', () => {
    expect(shallow(<Field title="hello" content="mycontent" />).find('span')).toContain('mycontent');
  });
});

I have this output:
 FAIL  ./test.js
  Field suite
    ✕ should render a p with title and content (20ms)

  ● Field suite › should render a p with title and content

    expect(object).toContain(value)

    Expected object:
      {Symbol(enzyme.__root__): {Symbol(enzyme.__root__): [Circular], Symbol(enzyme.__unrendered__): <Field content="mycontent" title="hello" />, Symbol(enzyme.__renderer__): {"batchedUpdates": [Function batchedUpdates], "getNode": [Function getNode], "render": [Function render], "simulateError": [Function simulateError], "simulateEvent": [Function simulateEvent], "unmount": [Function unmount]}, Symbol(enzyme.__node__): {"instance": null, "key": undefined, "nodeType": "host", "props": {"children": "mycontent", "title": "hello"}, "ref": null, "rendered": "mycontent", "type": "span"}, Symbol(enzyme.__nodes__): [{"instance": null, "key": undefined, "nodeType": "host", "props": {"children": "mycontent", "title": "hello"}, "ref": null, "rendered": "mycontent", "type": "span"}], Symbol(enzyme.__options__): {"adapter": {"options": {"enableComponentDidUpdateOnSetState": true, "lifecycles": {"componentDidUpdate": {"onSetState": true}, "getDerivedStateFromProps": true, "getSnapshotBeforeUpdate": true, "setState": {"skipsComponentDidUpdateOnNullish": true}}}}, "attachTo": undefined, "hydrateIn": undefined}}, Symbol(enzyme.__unrendered__): null, Symbol(enzyme.__renderer__): {"batchedUpdates": [Function batchedUpdates], "getNode": [Function getNode], "render": [Function render], "simulateError": [Function simulateError], "simulateEvent": [Function simulateEvent], "unmount": [Function unmount]}, Symbol(enzyme.__node__): {"instance": null, "key": undefined, "nodeType": "host", "props": {"children": "mycontent", "title": "hello"}, "ref": null, "rendered": "mycontent", "type": "span"}, Symbol(enzyme.__nodes__): [{"instance": null, "key": undefined, "nodeType": "host", "props": {"children": "mycontent", "title": "hello"}, "ref": null, "rendered": "mycontent", "type": "span"}], Symbol(enzyme.__options__): {"adapter": {"options": {"enableComponentDidUpdateOnSetState": true, "lifecycles": {"componentDidUpdate": {"onSetState": true}, "getDerivedStateFromProps": true, "getSnapshotBeforeUpdate": true, "setState": {"skipsComponentDidUpdateOnNullish": true}}}}, "attachTo": undefined, "hydrateIn": undefined}}
    To contain value:
      "mycontent"

      12 | describe('Field suite', () => {
      13 |   it('should render a p with title and content', () => {
    > 14 |     expect(shallow(<Field title="hello" content="mycontent" />).find('span')).toContain('mycontent');
         |                                                                               ^
      15 |   });
      16 | });
      17 |

      at Object.toContain (test.js:14:79)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        2.029s
Ran all test suites.

So it works correctly

Mind pasting your package.json as well? I added babel-preset-minify and your component, still behaves correctly.
Can you try to set up a small repository which shows the error?

Mind pasting your package.json as well?

To big, I'm ashamed to paste it here! What relevant part do you want to see? Here is the part about Jest
"jest": {
    "setupTestFrameworkScriptFile": "./src/__tests__/setup/setup.js",
    "snapshotSerializers": [
      "enzyme-to-json/serializer"
    ],
    "testPathIgnorePatterns": [
      "./src/__tests__/setup/"
    ],
    "moduleNameMapper": {
      "^.+\\.(css|scss|png|jpg|scvg)$": "identity-obj-proxy"
    }
  },

And the setup:
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Can you try to set up a small repository which shows the error?

Hum I don't know where to start! I feel like the problem is because something breaks in my noodle project (based on a create-react-app I did not initialize)
(thanks for your time, I hope it's not a boring ticket)

Going to close this but happy to re-open if there's a repo we can reproduce with 👌


Testing with clippy?

Not a mainstream use case: To test that some code fails cargo clippy. (OK to restrict/specialize for Github Actions, and locally on Linux/Mac OS.) Any feasible way, please?
(The actual use case: Internal tests of a crate generating attribute macros that inject #[allow(clippy::xyz...)].)
Based on https://github.com/dtolnay/trybuild/issues/13 I assume we can't use clippy driver, since trybuild invokes cargo instead of rustc. Or, could this somehow replace cargo ... with cargo clippy?
Any ready-to-use alternatives? (I understand I don't want compiletest - thx for explaining in #13).
If no, could having a simple bash script invoke cargo clippy and compare the exit value be the simplest way? (I could narrow down/specialize the "test" crates to have 1 clippy lint checked per crate, so "failed/not failed" would be enough information and I could ignore any output. Or could that be fragile?)
Or, how about CARGO_HOME and/or RUSTC_WRAPPER or any other tricks, please?

RUSTC_WORKSPACE_WRAPPER=clippy-driver cargo test should be sufficient to make the UI tests get built by clippy. Or std::env::set_var("RUSTC_WORKSPACE_WRAPPER", "clippy-driver"); in the test function that calls trybuild.
You would also need to put #![deny(clippy::all)] (or more specific attribute) into each UI test if you want to compare clippy output against a stderr file.


docs: change in contribution.md file #410

Add some changes to the documentation.
ISSUE_NUMBER: #410

Add label


Dashboard: Add a save button to the google analytics id form

Summary
Add a save button to the google analytics id form

User-facing changes

Adds a button to the google analytics id form that becomes disabled under two exclusive conditions:

You supply an invalid GA id
You type in the currently saved GA id

Testing Instructions

Navigate to Editor Settings
Type in a valid GA id (ua-#-#) and click save. Refresh the page and see that the GA id you entered is the value in the text box
Edit the GA id to another valid GA id and press Enter.  Refresh the page and see that the GA id you entered is the value in the text box
Delete the value from Input box and press Enter/Click Save.  Refresh the page to see that there is no GA id.

#3843

Verified in QA


[Snyk] Security upgrade python from 3.10.3-bullseye to latest

This PR was automatically created by Snyk using the credentials of a real user.Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Changes included in this PR

Dockerfile

We recommend upgrading to python:latest, as this image has only 245 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Some of the most important vulnerabilities in your base image include:

Severity
Priority Score / 1000
Issue
Exploit Maturity

500
Buffer Overflow SNYK-DEBIAN11-GLIBC-2340922
No Known Exploit

571
Out-of-bounds Write SNYK-DEBIAN11-LIBDE265-2445047
No Known Exploit

614
Use After Free SNYK-DEBIAN11-LIBXML2-2413974
No Known Exploit

686
Use After Free SNYK-DEBIAN11-SUBVERSION-2635643
No Known Exploit

586
Incorrect Authorization SNYK-DEBIAN11-SUBVERSION-2635645
No Known Exploit

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

Outdated, plus changing the base Docker container version to latest leads to non-reproducible builds.


Adhere to Community Standards

This PR will add:

A CoC
Contributing guidelines
Issue templates
PR templates
A security policy

@Ju1-js review this rn

Bro turn this repo in to a discord server 💀
Also,

for real

you didn't review it 💀

Indeed. re-star though <3


[BUGFIX]Update Keyboard Shortcuts

Coverage remained the same at 80.852% when pulling 01d0b4982c4f009b64621d0b0f0a1bfbe862626d on jeffreygohkw:master into 50702609aff7c3f77a831a8c4c2912184bea139c on CS2103AUG2017-W09-B2:master.


Fix spelling in first-animation.md

📜 Description

💡 Motivation and Context

📢 Changelog

JS

iOS

Android

🤔 How Has This Been Tested?

📸 Screenshots (if appropriate):

📝 Checklist

[ ] CI successfully passed

@irisjae thank you for your contribution! May I kindly ask you to fix spelling in other versions too (just search for ShareValue in other places). Since you've changed only non-versioned docs, these changes will be applied to next version, but I think it would be good to fix in all versions :)

Sure, let me look into that in bit

@irisjae I'll merge this PR and will make other fixes on my own. Thank you for your contribution!


FindPageForAlloc out of memory

I'm currently trying to load a large SDKMesh and getting an out of memory throw in LinearAllocator's FindPageForAlloc. Is there any defined maximum size an SDKMesh can be, or is that something which is system dependant?

Finished in 3048fe4

Please build and then run the sdkmeshdump.cpp tool on your sdkmesh and post the results here so I can get a sense of the size of resources you need.

Here's what I got back for the model I'm having issues with.

Also, are you calling GraphicsMemory::Commit each rendering frame? It's critical for the memory reclamation.

Yeah, I call it at the end of every render. I'm also utilising GraphicsMemory:GarbageCollect in-between loading models to try and help, but it doesn't seem to make much difference.

I'm calling DeviceResources::WaitForGpu before GraphicsMemory::GarbageCollect as the function states the GPU must be idled before using for best effects - is this correct?

I think the question is what is your overall memory usage. The LinearAllocator used by GraphicsMemory grows the heap on-demand so it's not a fixed size. That said, it can't grow the heap larger than the amount of memory that your DirectX 12 driver supports for UPLOAD type heaps.
Are you loading a lot of models? Are you using LoadStaticBuffers to convert the UPLOAD VB/IB to DEFAULT?

The issue occurs usually when switching between models - I use one large model for each of our environments. When changing environments I unload it, then load the next. They're all of a similar size to the dump I posted. The environments have a few other models loaded within them but they're all pretty small (~3K verts). When loading the models I do call LoadStaticBuffers, I guess this is correct?

Utilising GraphicsMemory::GarbageCollect after a call to DeviceResources::WaitForGpu following a reset of model resources did the trick for my runtime model swapping issue. To solve the initial "out of memory" loading issue I simply split my model into two SDKMESH files to load-in which seems to work fine.
This issue still applies to the original problem (loading the large SDKMESH and getting an "out of memory" issue), but my situation is fixed.

Thanks. I'll keep an eye out for future problems.
I did add some more debugging output in this commit.
BTW, are you using 32-bit or 64-bit native?

Appreciate the help! I'm using 64-bit.


⚠ Avatar API Endpoint has degraded performance

In f903827, Avatar API Endpoint (https://avatar.roblox.com/v1/avatar-rules) experienced degraded performance:

HTTP code: 200
Response time: 4594 ms

Resolved: Avatar API Endpoint performance has improved in c4579c5 after 2 minutes.


Switching to tokio+futures?

Just stumbled across this project and noticed that it uses mio. Any thoughts about switching to Tokio and Futures?
https://aturon.github.io/blog/2016/08/26/tokio/

I am slowly moving the crates in this repository off of mio directly. In the future, I plan to do a lot of rewrites for many of the crates here as the initial implementations were just to see what works and what doesn't.
As for tokio, it sounds like it is still in a state of development? I think the overall tokio ecosystem sounds very promising, especially given how many resources are being poured into it. Before hearing about tokio I was planning on moving everything here over to the rotor ecosystem as I have had a pleasant time using those crates.
In the meantime, I will be keeping up with the development of tokio to see if it is a viable alternative to rotor in time for the rewrites.
Cheers!

Closing as I am working towards #66 currently.


Add Abiotic Factor

Closes #758

Sorry to necro this thread @IceOfWraith and @Greelan but I think I have found an issue with the .kvp. I have tried setting the server up in AMP but cannot locate the server via the in game browser. It looks to me that line #85 should include both the -PORT flag and the -QueryPort flag. This is also reflected in the server documentation provided by the game devs. This would likely also require an "AF Server Settings" option for the game port to be able to change it from the default of 7777.

No, the server uses steam sockets and the game port doesn't actually listen or make a difference. Despite what their docs say (most devs don't know how their own dedicated servers work).
Have you forwarded you query port?

@Greelan I have indeed forwarded the query port as well as port 7777 since . Other than that all I did was change the name of the server and add a password.
I do see the following in the log though:
[2024.05.31-16.15.28:739][ 0]LogNet: GameNetDriver SteamNetDriver_2147482351 IpNetDriver listening on port 7777

I found the issue. The name of my server has spaces in it and for whatever reason that was causing an issue with the search functionality in the game


fix: parsing of numeric env vars

Description:

added parseNumericEnvVar to packages/relay/src/formatters.ts which handles edge cases like empty strings, undefined, and other non-numeric values
modified Overrideable options used when initializing. section of packages/relay/src/lib/eth.ts to make use of parseNumericEnvVar
added units tests for parseNumericEnvVar

Related issue(s):

Fixes #1409 fix: caching of block number

Notes for reviewer:

See #1409

Checklist

[ ] Documented (Code comments, README, etc.) --> N/A
[x] Tested (unit, integration, etc.)

Codecov Report
Patch coverage: 100.00% and project coverage change: +0.30 :tada:

Comparison is base (09d0f62) 77.83% compared to head (27849d4) 78.14%.

:exclamation: Current head 27849d4 differs from pull request most recent head 8557299. Consider uploading reports for the commit 8557299 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1417      +/-   ##
==========================================
+ Coverage   77.83%   78.14%   +0.30%
==========================================
  Files          32       32
  Lines        2599     2599
  Branches      539      529      -10
==========================================
+ Hits         2023     2031       +8
  Misses        402      402
+ Partials      174      166       -8

Impacted Files
Coverage Δ

packages/relay/src/lib/eth.ts
85.98% <100.00%> (+0.94%)
:arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

@Nana-EC addressed the nitpick comments with new commit just pushed.

LG Left 2 nits to remove comments.

Yes, for this specific subset on env values - the rest (probably) should be addressed separately.

Also assuming this ensure the relay doesn't start with bad int env values, which is preferred that what you encountered.


Supported Windows Operating systems for WAD agent

Can we have the supported Windows Operating Systems for WAD agent also listed here. We are seeing multiple issues with WAD on Windows Server 2008 SP2 server running in Azure.

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

ID: 0d1ee470-5d0c-4281-edac-d3b88287caab
Version Independent ID: c3eb4829-1139-b5e8-7e18-960c2cbcc652
Content: Azure Diagnostics extension overview - Azure Monitor
Content Source: articles/azure-monitor/platform/diagnostics-extension-overview.md
Service: azure-monitor
Sub-service: diagnostic-extension
GitHub Login: @bwren
Microsoft Alias: bwren

@desreela Thanks for the comment.
Assiging @bwren for visibility, review and document enhancement consideration as appropriate.

I think we forgot to close this one. 2008 SP2 is no longer on the supported list.
#please-close


CASMINST-6717: install-goss-tests.sh: Improve & make idempotent

Description
The install-goss-tests.sh would fail if re-run on the PIT node, because of how it created the prep/rpm directory. This PR changes its logic to prevent this problem, and also does other minor linting and improvements to the script.
I tested the updated script on wasp (where the problem was observed) and verified that it works as expected now.

Checklist

[x] If I added any command snippets, the steps they belong to follow the prompt conventions (see example).
[x] If I added a new directory, I also updated .github/CODEOWNERS with the corresponding team in Cray-HPE.
[x] My commits or Pull-Request Title contain my JIRA information, or I do not have a JIRA.

/backport release/1.3


Question: Best way to refer to sibling secrets (not generators)?

I'm open to the idea that I'm going about this the wrong way.
Some context: I have an ambitious goal of generating TLS certificates for all of my hosts, all chained to a CA - and the best part is I want agenix-rekey conducting all of this for me.  My #21 PR is part of this work.
I know TLS can get pretty complicated and distributed.  I'm just working with the assumption of a single root + leaf certificates - nothing in between and no crazy features forwarded.  That is presently beyond my simian mind.
I want my CA generated on the fly.  Granted this happens once, but when I have to reissue it (for when it expires), I want the CA and the leaf certs to be regenerated as well.  It also makes the configuration really easy to share with others as a reusable generator.  Most of this agenix-rekey can already do as I understand it.
Here's the caveat:
I know I can use deps to declare dependencies between generators.  However I want to have dependencies between secrets.  My reasoning:  Let's say I have hosts alice and bob.  They both will need leaf certificates tied to the same CA.  I need a way of indicating that they are tied to this CA, and not just any CA.  Under the current system of deps, each host would generate a leaf on its own CA, unless I'm misunderstanding something.  That, or I wouldn't be able to indicate an arbitrary CA (only one CA because there's only one CA generator).
Okay that's a lot of words.  Let's show some code that pushes this idea.  Please, correct me if I'm just on the wrong path here :) Note that this does assume my settings addition in #21 went in.
I have these generators:
The root:
  age.generators.tls-ca-root = { name, pkgs, secret, ... }: let
      inherit (lib) isAttrs isString;
      inherit (lib.trivial) throwIfNot;
      inherit (secret) settings;
    in
      throwIfNot (isAttrs settings) "Secret '${name}' must have a `settings` attrset."

      throwIfNot (isString settings.fqdn) "Secret '${name}' is missing a `fqdn` string."
      # throwIfNot (isAttrs settings.root-certificate) "Secret '${name}' is missing a `root-certificate` value."
        This is its output:
-rw-r--r-- 1 logan staff 1785 May 23 20:30 signing.crt
-rw------- 1 logan staff 3272 May 23 20:30 signing.key
ls: cannot access '/run/agenix/internal-ca': No such file or directory

The first ls showing me the signing key that was generating during this run, and the second showing me the root certificate decrypted values (I would hope).  The second ls is failing.
This got me thinking: This error is likely presenting itself because root-certificate hasn't been emitted yet.  That then leads me to the question I've had, which is:  Is there a way we can depend upon and reference secrets from other secrets?  Or is that the wrong approach entirely?
For additional context, here is the secret definitions:
  age.secrets.internal-ca = {
    rekeyFile = ../secrets/internal-ca.age;
    settings = {
      tls = {
        domain = "proton";
        subject = {
          country = "US";
          state = "Oregon";
          location = "Portland";
          organization = "Barnett family";
          organizational-unit = "IT Department";
        };
        validity = 365 * 5;
      };
    };
    generator.script = "tls-ca-root";
  };

      age.secrets."tls-${host-id}" = {
        # dependencies = [
        #   config.age.secrets.internal-ca
        # ];
        generator.script = "tls-signed-certificate";
        settings = {
          root-certificate = config.age.secrets.internal-ca;
          fqdn = "lithium.proton";
        };
        rekeyFile = ../secrets/tls-${host-id}.age;
      };

Thanks again for your work on this and all of your help!

I know I can use deps to declare dependencies between generators. However I want to have dependencies between secrets.

No reasoning needed, dependencies are already between secrets - not generators :D
I've built this precisely for the purpose of regenerating dependencies when the parent changes, because I wanted to auto-generate nginx htpasswd files (you can see this example in the readme).
The generator gets passed deps as an argument so it has access to the specific dependencies of the secret that is generated. And it will automatically be regenerated if any of these deps changes. It might be a bit misleading that the definition of dependencies is nested in the generator scope, but this is becaues it's only relevant to the generator. What we usually refer to as the generator is really just the .script setting.
Does this make sense or have I missed something specific in your example about certificates?

It occurs to me that I mentioned #21 for an added settings but that doesn't have it (nor is the branch I was thinking of actually there!).  I'll get that filed, and update the references for posterity.  I still believe a settings is needed.


🎖 Math magicians: fetch data from API 🎖

Project Requirements : https://github.com/microverseinc/curriculum-react-redux/blob/main/math-magicians/project_fetch_data_from_api.md
📝 General requirements

✅ No Linters error
✅ Used GitFlow.
✅ Used the correct React hook when fetching data
✅ Connected to an API within a functional component
✅ Different UI outputs depending on the component state
✅ The application runs in the browser without errors

Thanks dear @rotimiazeez


RK2020 - There was an Error installing this update.

Wegen trying to update from 1.6 to 1.7 i receive the error message named in the title. Remote services are enabled, time is set properly and WiFi dongle is working.
I was able to install the update before but the memory card died and i wanted to create a new one, but was not able to do this yet...

It may be github had issues earlier or maybe your internet connection.  I just loaded a fresh image of 1.6, updated to the 1.7 (07282021) without issue.  Only suggestion I have is to be sure your internet connection is stable, your not to far from your wireless signal and try it again.

Any update on this?

Sorry, was busy due to my work. 🙂
The problem was my router somehow, because it decided to block out the RK2020, while other devices like the Odroid Go Super or the Piboy work without problems. After making some changes to the channels used by 2.4ghz WiFi it worked like a charm... 😊

Great news!  Enjoy!


Basic proxy support

Feature request
I'm submitting a proposal to ...

[ ] new feature
[ ] change an existing feature

Describe your request

I live in Cuba, as some others countries in some places simply we don't have internet directly, only trough a proxy server, some time ago the proxy works but not now, I already read why, but I just can't use a VPN or another proxy. This was working some versions ago.
Describe the use case

unable to access after log-in
Describe an alternative

just re-support basic proxy
Development tips

Additional details or screenshots (if appropriate)
Specific details

Screenshots

https://github.com/CastagnaIT/plugin.video.netflix/wiki/VPN-and-Proxy


Misspelling: "triphenylanime", and some turd descriptions

Mod source
Factorio Mod Portal
Operating system

=Windows 10

What kind of issue is this?

[ ] Compatibility
[X] Locale (names, descriptions, unknown keys)
[ ] Graphical
[ ] Crash
[ ] Progression
[ ] Balance
[ ] Pypostprocessing failure
[ ] Other

What is the problem?
Triphenylanime - a Japanese cartoon about chemistry?
Additionally, in mukmoux TURD descriptions:
option 2: extra "uneaten": "In an effort to reduce waste, uneaten any uneaten food will be recycled for future generations."
option 3: missing "as": "environmental data such wind, humidity..."
Steps to reproduce
No response
Additional context
No response
Log file
No response

Fixed. Thanks for the report.


Promise or event for render complete?

Please can someone tell me if the render process is a Promise or if there is an event for its completion?
I need to screenshot an ERPNext dashboard (multiple charts) so need to know when all the charts have completed rendering.
TIA
@uhrjun ?

It seems an event should be triggered when updateNav is run?
I think adding a Promise would be too difficult because charts are rendered directly from the constructor, so no chance to return something.
https://github.com/frappe/charts/blob/f33309601201776c9f724e46badadaeef4663358/src/js/charts/BaseChart.js#L313


Release v0.25.3

This PR does the following:
Adds

Adds the ImageRatios, ImageSizes, and ImageTypes enums.
Composes the DS Fieldset component with Chakra. This always renders a legend element as its first child but it can be optionally hidden from the screen.
Adds the ability to make an entire Card component clickable with Chakra's LinkBox and LinkOverlay components. Links in the CardActions component can still be accessed in this state by clicking with the mouse or tabbing and pressing "enter".
Adds new file type SVG files to use in the Icon component: Audio, Doc, GenericDoc, Image, PDF, Spreadsheet, Video.
Adds ActionCheckCircle SVG file to use in the Icon component.

Changes

Updates the Github Action for the changelog reminder.
Updates the Checkbox component with an "indeterminate" state through the isIndeterminate prop.
Updates the CheckboxGroup component story with an "indeterminate" state example.
Updates the CheckboxGroup and RadioGroup components to use the Fieldset component.
Updates the HelperErrorText and TextInput components with added additionalStyles prop.
Updates the Button Style Guide documentation.
Updates the Iconography Style Guide story documentation.
Updates the Button font weight to "regular".

Fixes

Fixes nondeterministic unit test in the DatePicker component.
Version of latest List component release in its storybook page.
Adds validation to the height prop in the HorizontalRule so percentage values are not used. If a percentage value is used, the default "2px" value is set.
Fixes styling issues for the Notification dismissible button.
Fixes SearchBar mobile styling for the Select, TextInput, and Button components.
Fixes SearchBar focus flicker when the Select component is selected.

Breaking Changes

Updates the Notification component to fix the custom icon alignment.
Adds the title prop to the Icon component to render a title HTML element for accessible SVG icons.
Updates the default font size of the Button component to "-1" (14px) for all variants except the Link variant. Removes the bem function from internal use and makes it clearer that the ButtonGroup Chakra component is exported in the Design System.
Updates the errorText prop to invalidText for the Checkbox component.
Composes the DS Pagination component with Chakra. Removes the BEM-related props and updates the currentPage prop to initialPage. The current selected page is now kept in state inside the Pagination component and returned to the user through getPageHref or onPageChange. This also adds better aria attributes to the list inside the Pagination component.
Composes the DS Image component with Chakra styling and updates all Image references in other DS components. The attributes prop and the BEM related props blockname and modifiers have been removed. Adds the following new props: additionalStyles, component, imageAspectRatio, imageSize, imageType.
Composes the DS Card component with Chakra. BEM related props modifiers and blockname have been removed. Replaces the CardImageRatios with ImageRatios. Removes the CardImageSizes enum.
Composes the DS DatePicker component with Chakra. Adds more tests, documentation, and examples. This component now uses the Fieldset component for the date range type, and better Form components for layout. Prop name changes: dateRange is now isDateRange and required is now isRequired. BEM related props modifiers and blockname have been removed. The "Required"/"Optional" text in the date range legend can now be hidden with the showOptReqLabel prop.
Composes the DS SkeletonLoader with Chakra's Skeleton component. BEM related prop modifiers has been removed. Chakra's default Skeleton styles have been updated with NYPL's theme.

Tugboat has finished building the preview for this pull request!
Link:

https://pr773-yynwpom3mvwjxc9zaz2laech9fuiz2ob.tugboat.qa

Dashboard:

https://dashboard.tugboat.qa/61967d8be368650eb1418bd1


Investigate IN_VEHICLE_REGISTRATION

IN_VEHICLE_REGISTRATION
ID:37
The anonymization outputted:
IN_VEHICLE_REGISTRATION
ID:37:Original  : The vehicle registration number was incorrect.  The correct number is ##########
ID:37:Anonymized: The vehicle registration number was incorrect.  The correct number is <IN_VEHICLE_REGISTRATION>
The current output anonymizes correctly, as seen in the example where "##########" becomes "<IN_VEHICLE_REGISTRATION>." However, further analysis is needed to confirm the matching logic works for all formats, avoids false positives, and handles edge cases like alphanumeric combinations, state-specific patterns, and variants with spaces or special characters.


Allow Cards to only show images, and make them fit the entire Card

How to test

Evaluate https://design-system-git-fix-card-img-fit-nihruk.vercel.app/component/card
Evaluate https://design-system-git-fix-card-img-fit-nihruk.vercel.app/component/hero

Not seeing any space between cards on smaller resolutions inside a hero.

@bartfeenstra Not seeing any space between cards on smaller resolutions inside a hero.

That's a bug on main already, unfortunately, not introduced by this PR: https://design-system.nihr.ac.uk/component/hero


Add Medium to social links

Medium is a centralized writing hub.
Note that the username link is formatted https://medium.com/@{username} (line 17 in social.html). I felt that the readme and config should make it clear how the user should format theirs.

@MichaelCurrin Can I ask you to re-approve (since I rebased the branch?
Or do you not have write access?

I have. You have to update with master again though.
This branch is out-of-date with the base branch

I have. You have to update with master again though.
This branch is out-of-date with the base branch

Done. Hmm, I guess I did that incorrectly, by rebasing - now it needs your approval again. Merging creates a merge commit, which I assume would also need your approval. I will make sure to do it with the Github UI next time, I guess that is the only way to do it without requiring re-approval.

And yes I don't have write access so my review doesn't count towards the requirement.

Thanks, but we won't be adding any more social media icons to this theme.


Use utf8 for http body

Use utf8 for decoding the response body to avoid weird characters showing up in stations and tags and elsewhere.
Before:

After:

Ref #https://github.com/ubuntu-flutter-community/musicpod/issues/141

Out with version 1.0.1!


Issue 3114 check coord

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

[ ] New feature (non-breaking change which adds functionality)
[ ] Optimization (back-end change that speeds up the code)
[ ] Bug fix (non-breaking change which fixes an issue)

Key checklist:

[ ] No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
[ ] All tests pass: $ python run-tests.py --all (or $ nox -s tests)
[ ] The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).
Further checks:

[ ] Code is commented, particularly in hard-to-understand areas
[ ] Tests added that prove fix is effective or that feature works

sorry I accidentally create another one

I think this was the correct way. @RuiheLi, you may reopen this pill request and cherry-pick your commits from the develop branch (#3378) to this branch so that you don't lose progress

I think this was the correct way, because it is from a feature branch to the develop branch. @RuiheLi, you may reopen this pull request and cherry-pick your commits from the develop branch (#3378, which can be closed afterwards) to this branch so that you don't lose progress

Thank you so much for the kind suggestion. Reopen now.
All the commits before should be alright because I cereated the branch issue_3114_check_coord based on the develop branch.

@all-contributors please add @RuiheLi for code and tests

@all-contributors please add @RuiheLi for code and tests

Please update the PR description so that 3114 gets closed by this change (use the fixes tag in the template)

@RuiheLi Are you still working on this?

@RuiheLi Are you still working on this?

I have added the final else as suggested. But I had a try and still cannot write a proper test for the divergence as it will require to define a spatial variable with incorrect coordinate system first which will trigger an early error.

I have added the final else as suggested. But I had a try and still cannot write a proper test for the divergence as it will require to define a spatial variable with incorrect coordinate system first which will trigger an early error.

@kratman what's the best way to approach that? Should we add a # pragma: no cover tag?

I will take a look at this closer in the afternoon and give my opinion on the tests

I have added the final else as suggested. But I had a try and still cannot write a proper test for the divergence as it will require to define a spatial variable with incorrect coordinate system first which will trigger an early error.

@kratman what's the best way to approach that? Should we add a # pragma: no cover tag?

now that the coordinate system is already checked should the logic in discretisation be changed? i.e. we don't need to throw that error and the final else can just be the Cartesian case? alternatively, if we want to keep the error and have a test you could create a spatial variable with the correct domain, then manually overwrite cood_sys for the submesh later and then create the divergence object. seems clunky though

@RuiheLi Sorry it took so long for me to respond, but I think there is a nice workaround to test this change without ignoring anything lines.
If you are having trouble testing that function, then it might get easier if you create a function for the block in question. If you create a function called something along the lines of "check_coordinate_system()" for the if-elif-else block, then it can take all things it is supposed to check as arguments. That might make it easier to write a test without adding making the test too complicated. I did something similar in this commit: https://github.com/pybamm-team/PyBaMM/pull/3682/commits/fa6bdc22eac87e63a3a200bc826ed1eb97b2ebea
In general short functions are easy to test. So breaking up complicated functions is probably a good thing anyway. Whenever it is difficult to test a function and we consider adding a pragma to ignore it. It is often a sign that we need to break up the function into smaller testable methods.

thanks @kratman, i like this approach as we check coordinates a few times in that file, so will reduce duplication too

@RuiheLi Are you still working on this?


Can we get colorStyle:  colorTextButton:  to take UIColor or ColorLiterals?

Is it possible to pass UIColor or ColorLiterals to colorStyle:  colorTextButton:  ?

Any update on this?

done in https://github.com/vikmeup/SCLAlertView-Swift/pull/502


Move the unit test runners to Python.

Reviewers: @ximinez @seelabs

The number one thing this needs is testing on different systems that aren't mine - particularly Windows!!
I'll bet it doesn't work first time on Windows, let's see.  :-)

All right! I just pushed a few tiny changes, one of which should enable it for windows!
You want to try things like this:
Builds/Test.py -v all   # Builds all configurations, with full logging (--verbose)
Builds/Test.py   # Builds the default configuration
Builds/Test.py all   # Builds all configurations

@vinniefalco There are problems getting this to find scons in Windows. Since you have more experience with Python under Windows, could you take a look?

$ ./Builds/Test.py -v

IS_WINDOWS = True Windows
Building: default
$ scons
'scons' is not recognized as an internal or external command,
operable program or batch file.
'scons' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "./Builds/Test.py", line 93, in <module>
    lines = shell('scons', '-n', '--tree=derived', *args, verbose=False)
  File "./Builds/Test.py", line 80, in shell
    (' '.join(cmd), e.returncode, e.output))
ValueError: Couldn't execute "scons -n --tree=derived", errorcode=1:

On my system, scons is available as a script in ~/bin, which calls scons.py.

$ type -a scons

scons is /c/Users/EdHennis/bin/scons

$ cat ~/bin/scons

#!/bin/bash

python /C/Python27/Scripts/scons.py "${@}"

Consider providing a -j default to scons if the user does not provide one. multiprocessing.cpu_count() might be a good default.

I don't see a way to set the -j flag for scons through this script.

To pass an option that looks like a flag to any Python script or shell script using getopt (and also for Perl and a few others, I think), use -- to end flag parsing.
  This has gotten longer than I liked, but eh, it's clear enough.
I wanted to really learn how to use subprocess correctly and I did.  We're collecting the output now bit at a time and emitting it exactly if there's an error, or you're in verbose mode.
(Subprocess is easy if you wait and collect everything when it's done, but I wanted to run the job and print "as I go".  Thus the fanciness with the .s)
I could also save log files still if we wanted that?

I finally had a good complete test run on Windows with tests and everything. I'd like to see it return a non-zero exit code on failures, but otherwise :+1:

I had trouble getting the npm tests to run on windows last Friday (on Windows only). Today they are running fine. I do not suspect this script is the problem. I wait until you address Ed's concern with npm's test cases and then I'll give a thumbs up.

Is this passed?

No. There are problems detecting failures in the Npm tests.
On Mar 25, 2015 9:16 PM, "Nik Bougalis"<EMAIL_ADDRESS>wrote:

Is this passed?
—
Reply to this email directly or view it on GitHub
https://github.com/ripple/rippled/pull/935#issuecomment-86278439.

SO sorry this fell through the cracks.  Let me take a look at this!
Was this failure on Windows or Linux?

Windows. It's easy enough to try to recreate. Just rename test/config-example.js before running npm test and everything goes wonky.

So sorry - I got totally distracted!  On this right now.

I pushed a new change fixing this!
See also: https://ripplelabs.atlassian.net/browse/RIPD-850

Wah? How is travis working(build fails if npm tests fail) then if ret codes
are always 0?

OH, hmm, good question!  Dunno!
But if it were returning an error code, I'd get it when I ran it as a subprocess.  The unit tests do that, for example...?

Popen.returncode
The child return code, set by poll() and wait() (and indirectly by communicate()).
A None value indicates that the process hasn’t terminated yet.

I guess you want to put process.wait() somewhere

The process is definitely finished - I get all the results, it ends, I then get the returncode.
It's not a big deal to look for the error.  But let me check for sure from the command line that what I'm saying is true...

repr(return_code)
Travis works. Echo $? Works. So my guess is domething is awry with that
code. Tiny window when code is still None maybe. Shrug.

Bleh.  process.wait() did it.  But that's lame!  If it's a stream it should be finished when it gets to the end!
Take a look now... much simpler...

@rec When I run the npm tests I get the error Error: Cannot find module '/home-path/test/config-example' on both windows and mac.

Looks like a file was deleted accidentally

Yep. @rec, you deleted test/config-example.js in 904407d. I suggested that earlier as a way to easily force the npm tests to fail, but the deletion shouldn't have been committed.

[expletive!]
That was NOT deliberate.  moment pls.  HAH, the file is still there renamed in the directory.  :-)
Pushed.

@rec I'm having a heck of a time getting npm tests to pass. On mac JSON-RPC subscribe ledger consistently times out. On windows the msvc.debug npm tests pass, the msvc.release npm tests fail in Robust transaction submission. I do not believe your Test.py script is causing any of these problems, but I can't give a thumbs up until I get these issues solved. I'm assuming I'm the only one with these issues, yes?

Ach!  "Robust transaction submission"!
No, I'm not seeing that today on this branch - but last week, on a completely unrelated branch - the candidate develop-next branch, actually, I saw the same behavior consistently... on Ubuntu.
Weirdly, I didn't see the JSON-RPC subscribe ledger issue at all on the Mac or Ubuntu.
you might want to try checking out the (base) develop branch and seeing if you see the same issue...?

When the build works, and the tests pass, everything proceeds nicely. However, it's still not very robust when there are problems.
First, I intentionally broke the build, and it started running tests anyway:
$ ./Builds/Test.py -v --all
Building: debug release
$ scons debug release
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cl /Fobuild\msvc.debug.nounity\src\ripple\app\data\tests\SociDB.test.obj /c src\
ripple\app\data\tests\SociDB.test.cpp /TP /nologo /bigobj /EHa /fp:precise /Gd /
Gm- /GR /Gy- /FS /MP /openmp- /Zc:forScope /Zi /errorReport:none /nologo /W3 /WX
- /wd"4018" /wd"4244" /wd"4267" /wd"4800" /GS /MTd /Od /RTC1 /DOPENSSL_NO_SSL2 /
DDEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER /DHAVE_USLEEP=1 /DDEBUG /D_DEBUG
/D_WIN32_WINNT=0x6000 /D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /DWIN3
2_CONSOLE /D_CRTDBG_MAP_ALLOC /Isrc\soci\src\core /Isrc\sqlite /IC:\boost_1_57_0
 /IC:\OpenSSL-Win64\include /Isrc /Isrc\beast /Ibuild\proto /Isrc\soci\src /Isrc
\protobuf\src /Isrc\protobuf\vsprojects
SociDB.test.cpp
src\ripple\app\data\tests\SociDB.test.cpp(379) : error C3861: 'fil': identifier
not found
scons: *** [build\msvc.debug.nounity\src\ripple\app\data\tests\SociDB.test.obj]
Error 2
scons: building terminated because of errors.
Unit tests for msvc.debug.nounity
$ build\msvc.debug.nounity\rippled.exe --unittest
RPC.Status.codeString OK
RPC.Status.codeString error

...etc...
Then, I fixed the build, and intentionally broke both unit and npm tests.
Good: It detected the failures.
Unit tests: FAILED: msvc.debug.nounity:unittest msvc.debug:unittest msvc.release.nounity:uni ttest msvc.release:unittest
Npm tests: FAILED: msvc.debug.nounity:npm msvc.debug:npm msvc.release.nounity:npm msvc.release:npm
Bad: Test.py had a successful exit code when tests failed. I like to run ./Builds/test-all.sh && ./build/gcc.debug/rippled --conf ~/.config/ripple/rippled-validator.cfg --net, then go make a sandwich. If I come back and rippled is running, then I know the tests passed. I can't do that now.
Unsure: If the unit tests fail, it doesn't run the npm tests, which is good, but it then proceeds to run the unit tests for the next build type. The original test-all.sh scripts would abort on the first failure, so the user can quickly start fixing things. I'm not sure which behavior is better, really.

Changed the error code;  added an option to "keep_going" if a test fails (default is no, fail as soon as anything fails).

When there was a build error, it ran the npm tests and unit tests twice (one windows, command line: python Builds/Test.py msvc.debug -- -j8)
It also left a vc120.pdb file in my main project directory.

:x: The script still continues to run tests after a failed build, even without using the "keep_going" option. Worse, without the -v option, there is no indication that the build failed.
:heavy_check_mark: : Failed unit tests and npm tests are correctly detected, and it aborts as I expected without the "keep_going" option. With the "keep_going" option, it tries all of them, including running the npm tests.
:x: The exit code doesn't seem to have been passed out to the shell. I suspect this is a Windows thing, because exit(1) got picked up properly, so this should be an easy fix.
https://docs.python.org/2/library/sys.html#sys.exit

Most systems require it to be in the range 0-127, and produce undefined results otherwise.

@seelabs The vc120.pdb file is created as a side-effect of scons, not Test.py. It probably should be put under build, but that's a separate / preexisting issue.

The .pdb needs to be in the same directory as the executable. And it should have the same name as the executable. It is the msvc compiler and linker that produce this file.

When I build using Visual Studio, I get a .pdb file with the right name in the right place. This misplaced vc120.pdb only happens when building with scons. So it sounds like there's functionality missing in SConstruct to pass some setting on to the msvc compiler and linker.
OTOH, I would call it pretty low priority to fix, because if I'm going to need those symbols to debug, I'm usually going to build and run from within Visual Studio anyway.

Fixed your two points, I hope...!

:+1:

:+1:

When you squash, you might want to change the final commit message to something like: "Port to Python: Build and run tests for multiple build configurations."

Done!

Merged as b450d62138314fd27a02db2636667c0cb053dd26


make seed with 2 foreign key

I want to seed a model that have 2 foreign key and I don't know how to do that.

What exactly do you mean by 2 foreign key? Please share some context and code around it

I have a Model for ShoppingTrip and have 2 foreign key user_id and merchant_id that point to User and Merchant Model and I want to seed ShoppingTrip.

@vrwebdesign Sorry it's hard to help without seeing the actual code and what exact errors you are running into


Major Bug: User cannot delete their own comment on someone else's post

Describe the bug
After signing if, if a user comments on someone else's post, and then try deleting it, they are asked for the admin's password. That means, the comment is not being recognised as the user's own comment.
To Reproduce
Steps to reproduce the behavior:

Sign in to the website
Post a comment on someone's post
Try deleting it
User is prompted for admin's password, and a toast notification saying you are trying to delete someone else's comment appears

Expected behavior
The user should be allowed to delete their own comment and not prompted for admin's password or shown the error toast notification
Screenshots

Desktop (please complete the following information):

OS: Windows
Browser: Edge
Version: Latest

@N-Shar-ma Would you like to work on this issue?

@sanjay270899 Yes, I've figured out what needs to be changed to fix the bug as well!

@N-Shar-ma Go Ahead!


Commercial Rules from Trustwave SpiderLabs don't hit with data

Hi,
I am using Nginx open source version 1.14.2 and Modsecurity version 3.0.4. I have run "OWASP ModSecurity Core Rule Set (CRS)" and it has worked well. But recently I have bought the Commercial Rules from Trustwave SpiderLabs and it doesn't work, the malicious data is not hit the rules.
this is a log from error.log: 2020/06/08 14:19:53 [notice] 22541#0: ModSecurity-nginx v1.0.0 (rules loaded inline/local/remote: 0/14892/0
The main.conf
include /usr/local/nginx/conf/modsecurity/modsecurity.conf
include /usr/local/nginx/conf/modsecurity/portal/owasp/crs-setup.conf
##include /usr/local/nginx/conf/modsecurity/portal/owasp/rules/*.conf
SecRemoteRules xxx https://dashboard.modsecurity.org/rules/download/plain
When I use include /usr/local/nginx/conf/modsecurity/portal/owasp/rules/*.conf => this is ok. When i use SecRemoteRules xxx https://dashboard.modsecurity.org/rules/download/plain=> this not work
any idea?
Thanks.

This is my debug log
[159167437013.343341] [] [4] Initializing transaction
[159167437013.343341] [] [4] Transaction context created.
[159167437013.343341] [] [4] Starting phase CONNECTION. (SecRules 0)
[159167437013.343341] [] [9] This phase consists of 0 rule(s).
[159167437013.343341] [] [4] Starting phase URI. (SecRules 0 + 1/2)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Adding request argument (GET): name "alert(1)", value ""
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Starting phase REQUEST_HEADERS.  (SecRules 1)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] This phase consists of 3 rule(s).
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] (Rule: 200000) Executing operator "Rx" with param "(?:application(?:/soap+|/)|text/)xml" against REQUEST_HEADERS:Content-Type.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Rule returned 0.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Matched vars cleaned.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] (Rule: 200001) Executing operator "Rx" with param "application/json" against REQUEST_HEADERS:Content-Type.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Rule returned 0.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Matched vars cleaned.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] (Rule: 900990) Executing unconditional rule...
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Running [independent] (non-disruptive) action: setvar
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [8] Saving variable: TX:crs_setup_version with value: 302
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Running action: log
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Saving transaction to logs
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Running action: auditlog
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Saving transaction to logs
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Running action: status
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Running action: tag
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Rule tag: Host: datphonghop.pnj.com.vn
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Running action: nolog
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Running (disruptive)     action: pass.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [8] Running action pass
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Starting phase REQUEST_BODY. (SecRules 2)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] This phase consists of 4 rule(s).
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] (Rule: 200002) Executing operator "Eq" with param "0" against REQBODY_ERROR.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Target value: "0" (Variable: REQBODY_ERROR)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Rule returned 0.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Matched vars cleaned.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] (Rule: 200003) Executing operator "Eq" with param "0" against MULTIPART_STRICT_ERROR.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Target value: "" (Variable: MULTIPART_STRICT_ERROR)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Rule returned 0.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Matched vars cleaned.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] (Rule: 200004) Executing operator "Eq" with param "1" against MULTIPART_UNMATCHED_BOUNDARY.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Target value: "" (Variable: MULTIPART_UNMATCHED_BOUNDARY)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Rule returned 0.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Matched vars cleaned.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] (Rule: 200005) Executing operator "StrEq" with param "0" against TX:regex(^MSC_).
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Rule returned 0.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Matched vars cleaned.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Starting phase RESPONSE_HEADERS. (SecRules 3)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] This phase consists of 0 rule(s).
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Appending response body: 3854 bytes. Limit set to:<PHONE_NUMBER>00
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Appending response body: 6342 bytes. Limit set to:<PHONE_NUMBER>00
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] Appending response body: 6342 bytes. Limit set to:<PHONE_NUMBER>00
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Starting phase RESPONSE_BODY. (SecRules 4)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] This phase consists of 0 rule(s).
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [4] Starting phase LOGGING. (SecRules 5)
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [9] This phase consists of 0 rule(s).
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [8] Checking if this request is suitable to be saved as an audit log.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [8] Checking if this request is relevant to be part of the audit logs.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [5] Saving this request as part of the audit logs.
[159167437013.343341] [/qlph/Presentation/login.aspx?%3Cscipt%3Ealert(1)%3C/script%3E] [8] Request was relevant to be saved. Parts: 6006

@hieulv1, please reach out to Trustwave support for further information on the commercial rules. The person from support will identify your profile configuration and will give you the detailed information.

Ok, Thanks.


px4fmu-v2 vs px4fmu-v3 confusion

I am trying to flash one of the early 3DR Pixhawks and I'm confused whether to build and flash px4fmu-v2 or px4fmu-v3 because I see conflicting information.
When I boot the Pixhawk I am informed that I should be using 1MB flash only, therefore px4fmu-v2
MCU: STM32F42x, rev. Y

WARNING   WARNING   WARNING!
Revision Y has a silicon errata:
This device can only utilize a maximum of 1MB flash safely!
https://pixhawk.org/help/errata

However, when I try to flash px4fmu-v2, the uploader does not agree:
[100%] Built target nuttx_px4fmu-v2_default.elf
[100%] uploading px4
Loaded firmware for 9,0, size: 985021 bytes, waiting for the bootloader...
Trying /dev/serial/by-id/usb-3D_Robotics_PX4_BL_FMU_v2.x_0-if00
Found board 9,0 bootloader rev 4 on /dev/serial/by-id/usb-3D_Robotics_PX4_BL_FMU_v2.x_0-if00

ERROR: Board can accept larger flash images (2080768 bytes) than board config (1032192 bytes). Please use the correct board configuration to avoid lacking critical functionality.
[100%] Built target upload

I'm assuming the uploader is wrong, right?
@davids5 could you comment?

GitMate.io thinks a possibly related issue is #7675: Some questions about  “mc_att_control” hope to get help.

GitMate couldn't be more wrong.

The uploader is wrong, yes. This could be the result of a weird combination of Bootloader and silicon errata.

@LorenzMeier ok, so you think I have "a wrong bootloader revision" ?

So, I can reproduce exactly the same behavior with 3 different Pixhawks, so this batch is consistent and it's probably not some bootloader that I flashed myself.

The silicon check was added to the bootloader with revision 5: https://github.com/PX4/Bootloader/pull/47/files.
My pixhawks have bootloader revision 4 and therefore should be defaulted to 1MB.

https://github.com/PX4/Firmware/pull/8811

My PR tries to do something more complex, it might be easier as you suggested to just default any v4 board that reports larger than 1M to 1M.

Ok thanks, this let's me flash px4fmu-v2 again.
The other question is if we should prevent flashing v3 for older bootloaders where we don't know if it is safe?

I think we should prevent flashing > 1M images on old boot loaders, yes.

Ok, do you want to add it to your PR, or should I?

Makes more sense if you go ahead as you have the test setup.

Ok, will do.

as you have the test setup.

You could call it that 😄

@LorenzMeier done, commits added to #8811.

I did a quick pass and many of the newer fmu-v2/v3 boards still have bootloader version 4.

pixhawk mini
mRo pixhawk
pixhack v3
holybro pixhawk (brand new)

@dagar do you agree with the change though? Or do you think we should only display a warning?
Or should we support a script that updates bootloaders?

The safest thing to do is stick with px4fmu-v2_default if the the bootloader is older than revision 5, but there are obviously plenty of cases where that's annoying.

@dagar Ok, the change went in. Do we need to do the same for QGC?

I was told on the dev call that this is correct for QGC and it looks indeed correct:
https://github.com/mavlink/qgroundcontrol/blob/af45d4ad275968332afb43d18145ccd244b200fb/src/VehicleSetup/Bootloader.cc#L586-L591
Closing.

@LorenzMeier
I am new to this and I just followed from fresh install ubuntu 16.04 from devpx4 site and I got problem when running make px4fmu-v2_default, here is the error that I got
[100%] Linking CXX executable ../../nuttx_px4fmu-v2_default.elf
Error running link command: No such file or directory
platforms/nuttx/CMakeFiles/nuttx_px4fmu-v2_default.elf.dir/build.make:186: recipe for target 'nuttx_px4fmu-v2_default.elf' failed
make[3]: *** [nuttx_px4fmu-v2_default.elf] Error 2
CMakeFiles/Makefile2:5100: recipe for target 'platforms/nuttx/CMakeFiles/nuttx_px4fmu-v2_default.elf.dir/all' failed
make[2]: *** [platforms/nuttx/CMakeFiles/nuttx_px4fmu-v2_default.elf.dir/all] Error 2
Makefile:105: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:153: recipe for target 'px4fmu-v2_default' failed
make: *** [px4fmu-v2_default] Error 2

@cdlwhm1217096231 this looks like a separate issue, please create a new issue for this and share all the build output, and make sure to do a make clean as well.


Migration. Alter table, set default and get syntax error. postgresql

Hello.
I have migration. Yii 2.0.6. Postgres 9.4
public function up()
{
        $this->alterColumn('client', 'banned', $this->smallInteger(1)->defaultValue(0));
}

And got error:

alter column banned in table client to smallint(1) DEFAULT 0 ...Exception 'yii\db\Exception' with message 'SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "DEFAULT"
LINE 1: ...TABLE "client" ALTER COLUMN "banned" TYPE smallint DEFAULT 0
^
The SQL being executed was: ALTER TABLE "client" ALTER COLUMN "banned" TYPE smallint DEFAULT 0'

in /Users/yevgeniy/sites/vendor/yiisoft/yii2/db/Schema.php:628

Error Info:
Array
(
    [0] => 42601
    [1] => 7
    [2] => ERROR:  syntax error at or near "DEFAULT"
LINE 1: ...TABLE "client" ALTER COLUMN "banned" TYPE smallint DEFAULT 0
                                                              ^
)

Any idea why?

I read in documentaion
http://www.postgresql.org/docs/9.4/static/sql-altertable.html
that right syntax is
 ALTER [ COLUMN ] column_name SET DEFAULT expression

I'll fix

Or maybe not. The problem is not as easy, as I thought :hankey:
The only way I found to fix the problem is to pass some optional altering flag as an additional argument in chain of calls QueryBuilder::alterColumn() -> QueryBuilder::getColumnType($type, $alter) -> ColumnSchemaBuilder::__toString($alter) -> ColumnSchemaBuilder::buildSomeString($alter).
The only problem - this will break the existing API of QueryBuilder and ColumnSchemaBuilder. We can fix it in the Yii2 core sources, but this will break 3rd part DB extensions, that extends our base classes.
Any ideas?

And we can not just change DEFAULT to SET DEFAULT in buildDefaultString, because for CREATE TABLE query we have to use DEFAULT, and for ALTER TABLE - SET DEFAULT.
pg=> create temporary table test (id integer not null, test text SET DEFAULT 'oh no');
ERROR:  syntax error at or near "SET"
LINE 1: ...porary table test (id integer not null, test text SET DEFAUL...
                                                             ^
Time: 0.261 ms
pg=> create temporary table test (id integer not null, test text DEFAULT 'oh yeah');
CREATE TABLE
Time: 7.313 ms

The PR with fix breaks BC, so I have to re-assign this issue to 2.1.0

just try this one. "alter table blabla".