ev3dev + rpi3 + brickpi + python - how to setup ?

ev3dev version: none
ev3dev-lang-python version: none
python version 2.7.6 and 3.4

I want to use ev3dev library on rpi3 and brickpi setup. I can't find any tutorial though. I do not have ev3 brick, just rpi3 and brickpi. Last month I tried to flash sd with image from ev3dev main site but for some reasons it couldn't boot so I abandoned it and focused on brickpi solutions. That solutions are completely unusable so I'm back to ev3dev.
Is it possible to use raspbian for robots and somehow install ev3dev library for python on my rpi3? If yes then how?

Did you edit config.txt on the SD card before booting? You have to enable BrickPi there and there are some special considerations for RPi 3 since the Bluetooth tries to use the same UART/serial port as the BrickPi by default.

Is it possible to use raspbian for robots and somehow install ev3dev library for python on my rpi3?

You could, but it won't work because the ev3dev python library requires a hardware driver. If you are comfortable with compiling the driver (and possibly your own device tree) you could in theory make ev3dev stuff work using Raspbian for Robots.

Would it boot without configuring config.txt? I can't remember modifying that file. I don't and won't need bluetooth for my robot. Guess I'm gonna need to start again. Will following tutorial on http://www.ev3dev.org/docs/getting-started/ suffice? I can't quite grasp what ev3dev actually is - ev3 system or it also works on rpi?

Would it boot without configuring config.txt?

It would boot, but you could not use the BrickPi.

Will following tutorial on http://www.ev3dev.org/docs/getting-started/ suffice?

Yes, it should. Be sure to look for the info/warning boxes about Raspberry Pi.

I can't quite grasp what ev3dev actually is - ev3 system or it also works on rpi?

It is a Debian Linux based operating system for LEGO MINDSTORMS and LEGO MINDSTORMS compatible devices. Since BrickPi and PiStorms are LEGO compatible, we have a Raspberry Pi version of the OS and there is also a BeagleBone cape called the EVB that is LEGO compatible, so we have a BeagleBone version of the OS.

It would boot, but you could not use the BrickPi.
Then I must've done something else wrong. Mine didn't boot at all. Stuck in the middle. I'm finishing flash right now and will test it

It is booting almost 25minutes. Stuck on "Started Update UTMP about system runlevel changes" Green activity led is blinking. Two BrickPi blue led's are on. I have modified config.txt. Disabled BT (left commented) and enabled brickpi

The blue lights are a good sign. Have you tried making a network connection with ssh? I've never actually used and HDMI display with RPi, so I don't know what to expect there.

I'm afraid ssh wont work. I had fail on setting up network connection (wifi password not set for wpa suppl.) After 2h it is still in the same state. I will reflash using another tool and try again. Etcher said my card may be corrupted...

:) reflashed, botted and still stucks on UTMP

Etcher said my card may be corrupted...

It is probably right. Do you have another card to try?

I sacrificed other card for that. Etcher said its ok.
And uncommented this lines:
dtoverlay=brickpi
init_uart_clock=32000000
dtoverlay=pi3-disable-bt
Do I need to plug Ethernet cord ? Or should I place my wifi password somewhere on the card so it could load it during boot? Bit weird but maybe it will help.
Well so far 2minutes stuck on UTMP

Do I need to plug Ethernet cord ?

Yes, that is the best way to attach to start with.

Or should I place my wifi password somewhere on the card so it could load it during boot?

There is not currently a way to do this with ev3dev.

Well so far 2minutes stuck on UTMP

The Pi 3 boots in about 5 seconds, so no need to wait this long. I'm not really sure that it is stuck. Try ssh via Ethernet or press ALT+CTRL+F6 to try a different console.

Connectinv ethernet didnt help but after switching to console f6 i got logging screen

OK, so you can log in as robot password maker and setup wifi with connmanctl.

Connectinv ethernet didnt help

If your host computer is Windows, using hostname of ev3dev should work. on Mac/Linux ssh ev3dev.local should connect.

Okay, I managed to do this all. I've set up /var/lib/connman/wifi.config to autoconnect to wifi at boot. Dont know if that works yet. Now I will try if nxt stuff works with python.

Huh so... running example led or motor from here gets me "device not connected" . And after rebooting and plugging in battery pack motors connected to B and C run continuously

BrickPi motors will not run without using the BrickPi power connector. That is to say, back-powering the BrickPi from the RPi via USB or some other means is not supported. It sounds like the script work (at least partly) and left the motors running, which didn't actually start until you powered them.
Also, please post your code if you would like more help with it.

Nxt motors connected to brick pi connected to rpi will only work if i power up brickpi with battery pack. Let me clarify: After first boot I opened python console and tried to run motor b. Didn't work (device not connected) after that I noticed I switched off battery so I switched it on. Script was not running and I was out of python console amd motors (both ) were running non stop. So I rebooted and switched battery on. Still running continuously. I will paste that script on Monday but it is described I that link I gave in previous post. I used python 3

LED.py:
import ev3dev.ev3 as ev3
ts = ev3.TouchSensor()
while True:
        ev3.Leds.set_color(ev3.Leds.LEFT, (ev3.Leds.GREEN, ev3.Leds.RED)[ts.value()])

motor.py:
import ev3dev.ev3 as ev3
m = ev3.LargeMotor('outB')
m.run_timed(time_sp=3000, speed_sp=500)

Files are located in home directory /home/robot
Few seconds after powering on brickPi (with battery on) motors start tor run. I can't ssh before that point, nor run any script.

When you are on brickpi, you should import ev3dev.brickpi as ev3. BrickPI and EV3 have different leds and input/output port address names.

Okay, but why motors start to run on boot?

Sorry, that I have no idea about :sheep:

I just reflashed card and booted it up with battery power on. I got few lines like this, which I've not seen before:
lego-port port1: Registered 'ttyAMA0:S2' on 'ttyAMA0'
But motors still run cont.

I also got "Started BrickPi Line Discipline" is that predefined program ? Maybe that is why it turns motors?

"Started BrickPi Line Discipline"

This is the ev3dev hardware driver for BrickPi, so this message is expected.
I'm not sure why the motors would be running continuously at boot though. Please open an new issue at https://github.com/ev3dev/ev3dev/issues and list the exact model of Raspberry Pi and BrickPi you are using as well as the image file that your are using and I will try to reproduce the problem.
If you are not completely removing all power when you reboot, I imagine that the BrickPi is not being rebooted and it is in a bad state when the Raspberry Pi is rebooted.


Page not found

I tried to see the telegraf configuration documentation (https://docs.influxdata.com/telegraf/v1.22/administration/configuration/), and I got an 404 page not found.

Relevant URLs

https://docs.influxdata.com/telegraf/v1.22/install/
https://docs.influxdata.com/telegraf/v1.22/administration/configuration/

Duplicate of #3983
Closing.


test[next]: Enable multi-GPU execution with xdist

The GPU execution time is definitely not the bottleneck of unittest execution. The parallelization across multiple GPUs is therefore not the highest priority. It would be more interesting to split a GH200 into 4 nodes and be able to run 4 Gitlab jobs in parallel.


[infra] GitHub actions no longer completes a build or test

Context
As of a couple days ago, all GitHub actions now fail on any new PR on this repo.

The site still deploys, and preview URLs still work, so this does not block content changes.
However, it increases the risk of infrastructure changes.
Augustine did some investigating as a possible starting point (rephrased from chat):
There is a `BlockingRender` that exists (which makes some async work sync). It uses `Atomic.wait`, and `Atomics.notify`. At some point it may be that there are so many things happening, that there are not enough cycles for the worker thread to pick up the render request. They hang until one times out.

Theory is that the very slow build time of lit.dev is due to the special syntax highlighting that is done.
I changed the dev:build command to 0x<EMAIL_ADDRESS>--quiet which runs eleventy and generates a flamegraph using 0x.
Here is the full flamegraph of building the site:

If we color all the work that uses playwright to emulate a browser, we can see a huge amount of the work is playwright related:

And if we filter for renderer.ts or blocking-renderer.ts, this also reveals the length of time spent syntax highlighting:

Some rough numbers (on my M2 silicon mac)
Note the table should be read from top to bottom, and I am removing features using if (!DEV) { ... } flag.

Features
Time

Current dev:build time
17.24 seconds (46.2ms each)

Without blocking renderer
11.28 seconds (30.2ms each)

Without search index creation
7.97 seconds (21.4ms each)

It is possible to remove search index creation in dev mode because we don't upload dev mode search indexes to algolia, so it's wasting time.
Proposal

Easy win: do not create search index in dev mode.
Not so easy win: do not use the blocking renderer in dev mode.

Found a third slow path once I added caching to the blocking-renderer.
See flame graph of our lit-eleventy-plugin highlighted in blue:


Coder toplevel constants

Codecov Report

Merging #158 into lablua will decrease coverage by 1.41%.
The diff coverage is 74.4%.

Impacted Files
Coverage Δ

titan-compiler/util.lua
72% <100%> (+1.16%)
:arrow_up:

titan-compiler/parser.lua
95.79% <100%> (+0.03%)
:arrow_up:

titan-compiler/scope_analysis.lua
89.32% <100%> (+1.02%)
:arrow_up:

titan-compiler/coder.lua
75.83% <72.64%> (-24.17%)
:arrow_down:

titan-compiler/ast.lua
95.45% <72.72%> (-4.55%)
:arrow_down:

titan-compiler/pretty.lua
100% <0%> (+4.16%)
:arrow_up:

Continue to review full report at Codecov.

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


[Component] Command Menus should toggle when opening and closing

Bug Description
Command Menus should toggle to open, rather than opening every time that they are clicked (resulting in it having to close and re-open).
Actual Result:
The command menu opens and closes every time it is clicked. One click opens it and a second click closes and opens it again.

Expected Result:
The command group menu should toggle. One click should open it and a second click should close it (as well as being able to click elsewhere).

Platform Info
Aurora Version: 1.1.0
Operating System: Windows 11

Should also do the same for Radiance command buttons


Add reset to circuits with transpiler

What is the expected enhancement?
The reset instruction will be a more optimal way to initialize circuits in the ground state than the default. Qubits which are active in a circuit, and which do not already have a reset instruction, should have a reset added to them by the transpiler, unless the optimization level is 0.

I believe support for this is backend specific. That is unless they are ignored by those that do not support them.

Hi @lcapelluto , is there a way for a backend to signal that an initial reset is been added?


E2E tests for Azure are failing

The following tests are failing:

pull-machine-controller-e2e-azure for ubuntu
pull-machine-controller-e2e-azure-custom-image-reference

This might be just Azure on Ubuntu failing since pull-machine-controller-e2e-azure-custom-image-reference uses ubuntu as well but this needs to be investigated.
References:

https://github.com/kubermatic/machine-controller/pull/1789
https://public-prow.loodse.com/view/gs/prow-dev-public-data/pr-logs/pull/kubermatic_machine-controller/1789/pull-machine-controller-e2e-azure/1785950609619292160
https://public-prow.loodse.com/view/gs/prow-dev-public-data/pr-logs/pull/kubermatic_machine-controller/1789/pull-machine-controller-e2e-azure-custom-image-reference/1785936782236323840

Fixed through https://github.com/kubermatic/operating-system-manager/pull/388, tested against https://github.com/kubermatic/machine-controller/pull/1791


Config: Make TestConf DRYer, move block interval to ConsensusConfig

This contains three commits:

First, fixing a small typo which I believe didn't have any impact but was definitely wrong;
Second, add a ConsensusConfig member in TestConf instead of repeating its members, as was done for NodeConfig recently;
Third, move block_interval_sec to ConsensusConfig, as it's already part of ConsensusParams;

The second commit is most of the diff, but ended up being needed to simplify the third.

Rebased

Rebased

I checked payout_period and rebase looks good.

The test failure for unlockAge I also saw in PR https://github.com/bosagora/agora/pull/2309 and I added a commit to solve it.


Sporadic Failures

Sometimes I am seeing the following error, sometimes not. I believe this happens when I am running multiple steps in parallel. How would I go about fixing this?
Run android-actions/setup-android@v[2](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:2)
  env:
    JAVA_HOME: /home/actions-runner/_work/_tool/Java_Zulu_jdk/11.0.14-9/x64
(node:[3](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:3)061[4](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:4)) UnhandledPromiseRejectionWarning: Error: Unable to locate executable file: unzip. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
    at Object.<anonymous> (/home/actions-runner/_work/_actions/android-actions/setup-android/v2/dist/index.js:2117:27)
    at Generator.next (<anonymous>)
    at fulfilled (/home/actions-runner/_work/_actions/android-actions/setup-android/v2/dist/index.js:1942:[5](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:5)8)
(node:30[6](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:6)14) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:30614) [DEP001[8](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:8)] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Also it looks like this action is not terminating correctly so it looks like the steps after this one fail.

@sdoward , I don't know why it's sporadic, but the error message tells me that unzip tool is missing. Error: Unable to locate executable file: unzip. Please verify either the file path exists.
Could we make sure that the tool exists by running unzip -v in the console?

I should add detection for missing unzip tool


Extend locators with absAt(position)

What are you trying to achieve?
I want to do something with the first element that matches the locator.
What do you get instead?
I get an array of all matches.
I.amOnPage('https://www.google.com/search?q=test')
I.grabTextFrom(locate(h3).first())

Possible Solution
Extend the LocatorAPI (e.g. veryFirst() or absFirst())
  absAt(position) {
    if (position < 0) {
      position++; // -1 points to the last element
      position = `last()-${Math.abs(position)}`;
    }
    if (position === 0) {
      throw new Error('0 is not valid element position. XPath expects first element to have index 1');
    }
    // Important difference brackets around the first %s
    const xpath = sprintf('(%s)[position()=%s]', this.toXPath(), position);
    return new Locator({ xpath });
  }

  absFirst() {
    return this.absAt(1);
  }

  absLast() {
    return this.absAt(-1);
  }

Details

CodeceptJS version: 2.1.1
NodeJS Version:  does not matter
Operating System: does not matter
puppeteer: 1.11.0
Configuration file: does not matter

Have you tried this again recently? I ran nearly the same code that you did above (used GrabTextFrom instead of GrabText) and my response was
I grab text from {xpath: (.//h3)[position()=1]}
Speedtest by Ookla - The Global Broadband Speed Test
CodeceptJS version: 2.3.1
puppeteer: 1.19.0

with 2.3.0 my proposed change (round brackets) was released (see #1829) but sadly with a breaking change in the locator api.


Encoding error on GET for keys created using SETBIT

Trying to perform a GET operation on a key that was created using the SETBIT command results in encoding error.
How to reproduce
<IP_ADDRESS>:7379> SETBIT mykey369 7 1
(integer) 0
<IP_ADDRESS>:7379> GET mykey369
(error) ERR unsupported encoding: 4

Expected behavior
GET on key created using SETBIT should return correct value.
Corresponding output from REDIS
redis:6379> SETBIT mykey369 7 1
(integer) 0
redis:6379> GET mykey369
"\x01"

Screenshots

@soumya-codes i think it is issue in evalGET , we have not added case for "ObjEncodingByteArray" in  typeEnconding.
i tried with adding that in evalGet add got expected result.
possible patch in evalGET:
	case ObjEncodingByteArray:
		// Value is stored as a bytearray, use type assertion
		if val, ok := obj.Value.(*ByteArray); ok {
			return Encode(string(val.data), false)
		}
		return Encode(errors.New("ERR expected byte array but got another type"), false)

after applying patch

@soumya-codes i think it is issue in evalGET , we have not added case for "ObjEncodingByteArray" in  typeEnconding.
i tried with adding that in evalGet add got expected result.
possible patch in evalGET:

	case ObjEncodingByteArray:

		// Value is stored as a bytearray, use type assertion

		if val, ok := obj.Value.(*ByteArray); ok {

			return Encode(string(val.data), false)

		}

		return Encode(errors.New("ERR expected byte array but got another type"), false)

after applying patch

cc @JyotinderSingh

Thanks for catching this bug! Couls you raise a PR for the same?

Thanks for catching this bug! Could you raise a PR for the same? Please add a test for this case too.

Sure

+1 this case also happens with other commands
<IP_ADDRESS>:7379> LPUSH mykey "value1"
OK
<IP_ADDRESS>:7379> GET mykey
(error) ERR unsupported encoding: 4

@JyotinderSingh also we are not handling case where existing key has value integer type.
we need to add here.(https://github.com/DiceDB/dice/blob/master/core/eval.go#L1409)
current behavior

expected behavior

@JyotinderSingh also we are not handling case where existing key has value integer type.
we need to add here.(https://github.com/DiceDB/dice/blob/master/core/eval.go#L1409)
current behavior

expected behavior

i will fix this also in same PR.

Thank you!

@JyotinderSingh @kushal0511-not @lucifercr07 I think we need a broader discussion on encoding type.
I have few things in mind that we need to look into.

Is it correct for SETBIT to use "ObjEncodingByteArray" while storing the values. Why can't we use string encoding like we do for SET?
What should be the supported encoding types and under what scenarios should we use each type of encoding.

Here are the list of supported encoding types in DiceDB vs Redis:
REDIS Object Types
#define OBJ_STRING 0    /* String object. /
#define OBJ_LIST 1      / List object. /
#define OBJ_SET 2       / Set object. /
#define OBJ_ZSET 3      / Sorted set object. /
#define OBJ_HASH 4      / Hash object. */
Object Encoding supported in REDIS
/* Objects encoding. Some kind of objects like Strings and Hashes can be

internally represented in multiple ways. The 'encoding' field of the object
is set to one of this fields for this object. /
#define OBJ_ENCODING_RAW 0     / Raw representation /
#define OBJ_ENCODING_INT 1     / Encoded as integer /
#define OBJ_ENCODING_HT 2      / Encoded as hash table /
#define OBJ_ENCODING_ZIPMAP 3  / No longer used: old hash encoding. /
#define OBJ_ENCODING_LINKEDLIST 4 / No longer used: old list encoding. /
#define OBJ_ENCODING_ZIPLIST 5 / No longer used: old list/hash/zset encoding. /
#define OBJ_ENCODING_INTSET 6  / Encoded as intset /
#define OBJ_ENCODING_SKIPLIST 7  / Encoded as skiplist /
#define OBJ_ENCODING_EMBSTR 8  / Embedded sds string encoding /
#define OBJ_ENCODING_QUICKLIST 9 / Encoded as linked list of listpacks /
#define OBJ_ENCODING_STREAM 10 / Encoded as a radix tree of listpacks /
#define OBJ_ENCODING_LISTPACK 11 / Encoded as a listpack /
#define OBJ_ENCODING_LISTPACK_EX 12 / Encoded as listpack, extended with metadata */

Dice DB Object Types
var ObjTypeString uint8 = 0 << 4
var ObjTypeByteList uint8 = 1 << 4
var ObjTypeJSON uint8 = 3 << 4 // 00110000
var ObjTypeInt uint8 = 5 << 4 // 01010000
var ObjTypeBitSet uint8 = 2 << 4 // 00100000
var ObjTypeByteArray uint8 = 4 << 4 // 01000000
Dice DB Object Encoding
var ObjEncodingRaw uint8 = 0
var ObjEncodingInt uint8 = 1
var ObjEncodingEmbStr uint8 = 8
var ObjEncodingQint uint8 = 0
var ObjEncodingQref uint8 = 1
var ObjEncodingStackInt uint8 = 2
var ObjEncodingStackRef uint8 = 3
var ObjEncodingDeque uint8 = 4
var ObjEncodingBF uint8 = 2      // 00000010
var ObjEncodingJSON uint8 = 0
var ObjEncodingByteArray uint8 = 4
As can be seen we differ on the Object and ObjectEncoding types when compared to REDIS.
Lets make sure we are following the correct approach while handling encoding.
cc @AshwinKul28
Let me know what you all think about this.

@JyotinderSingh @kushal0511-not @lucifercr07 I think we need a broader discussion on encoding type.
I have few things in mind that we need to look into.

Is it correct for SETBIT to use "ObjEncodingByteArray" while storing the values. Why can't we use string encoding like we do for SET?

What should be the supported encoding types and under what scenarios should we use each type of encoding.

Here are the list of supported encoding types in DiceDB vs Redis:
REDIS Object Types
#define OBJ_STRING 0    /* String object. */
#define OBJ_LIST 1      /* List object. */
#define OBJ_SET 2       /* Set object. */
#define OBJ_ZSET 3      /* Sorted set object. */
#define OBJ_HASH 4      /* Hash object. */
Object Encoding supported in REDIS
/* Objects encoding. Some kind of objects like Strings and Hashes can be

internally represented in multiple ways. The 'encoding' field of the object

is set to one of this fields for this object. */

#define OBJ_ENCODING_RAW 0     /* Raw representation */
#define OBJ_ENCODING_INT 1     /* Encoded as integer */
#define OBJ_ENCODING_HT 2      /* Encoded as hash table */
#define OBJ_ENCODING_ZIPMAP 3  /* No longer used: old hash encoding. */
#define OBJ_ENCODING_LINKEDLIST 4 /* No longer used: old list encoding. */
#define OBJ_ENCODING_ZIPLIST 5 /* No longer used: old list/hash/zset encoding. */
#define OBJ_ENCODING_INTSET 6  /* Encoded as intset */
#define OBJ_ENCODING_SKIPLIST 7  /* Encoded as skiplist */
#define OBJ_ENCODING_EMBSTR 8  /* Embedded sds string encoding */
#define OBJ_ENCODING_QUICKLIST 9 /* Encoded as linked list of listpacks */
#define OBJ_ENCODING_STREAM 10 /* Encoded as a radix tree of listpacks */
#define OBJ_ENCODING_LISTPACK 11 /* Encoded as a listpack */
#define OBJ_ENCODING_LISTPACK_EX 12 /* Encoded as listpack, extended with metadata */
Dice DB Object Types
var ObjTypeString uint8 = 0 << 4
var ObjTypeByteList uint8 = 1 << 4
var ObjTypeJSON uint8 = 3 << 4 // 00110000
var ObjTypeInt uint8 = 5 << 4 // 01010000
var ObjTypeBitSet uint8 = 2 << 4 // 00100000
var ObjTypeByteArray uint8 = 4 << 4 // 01000000
Dice DB Object Encoding
var ObjEncodingRaw uint8 = 0
var ObjEncodingInt uint8 = 1
var ObjEncodingEmbStr uint8 = 8
var ObjEncodingQint uint8 = 0
var ObjEncodingQref uint8 = 1
var ObjEncodingStackInt uint8 = 2
var ObjEncodingStackRef uint8 = 3
var ObjEncodingDeque uint8 = 4
var ObjEncodingBF uint8 = 2      // 00000010
var ObjEncodingJSON uint8 = 0
var ObjEncodingByteArray uint8 = 4
As can be seen we differ on the Object and ObjectEncoding types when compared to REDIS.
Lets make sure we are following the correct approach while handling encoding.
cc @AshwinKul28
Let me know what you all think about this.

Let's discuss this in today's call?


Changing other players avatar?

How to do so? On the official api this is achieved with room.setPlayerAvatar({avatar} , {playerId})

I'm moving the issue to discussions, since it is not an issue.


Fix emojis are overlapping

It maybe overlapping because mTop of the result is negative when emoji size is bigger than text size.

Checking...


Webhook design

Webhook
With webhook you can receive event notifications from perfsee on your own server, which is very useful when integrating other services with perfsee.
Receiving payloads
When an event occurs, perfsee will send a POST request to the configured url and includes the data involved in the payload, more details on the different types of events can be found here.
The following code demonstrates how to build a simple server with express to receive webhook events.
const express = require('express')
const app = express()

app.post('/callback', express.json(), function (req, res) {
  switch (req.body.eventType) {
    case 'bundle-finished':
    //... your code here
  }
  res.status(204).send()
})

app.listen(3000)

When your server receives a webhook request, it should return a success status code (>= 200 and < 300) as soon as possible. If no response is received for 30 seconds, perfsee will retry the request.

Validating payloads
To ensure that the webhook request comes from perfsee and prevent others faking the request, you also need to validate the payload.
First you need to set a secret in the webhook settings, after that every webhook requests sent by perfsee will contain an X-Perfsee-Signature-256 header. This is an HMAC hex digest for request body, with sha256= prefix, typical forms are sha256=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
When your server receives a request, you can to use secret and the request body to generate a digest and compare it with the digest provided in the header to complete the validation.
The following demonstrates how to validate with express.
const express = require('express')
const crypto = require('crypto')
const app = express()

app.post('/callback', express.text({ type: '*/*' }), function (req, res) {
  const digest = crypto
    .createHmac('sha256', process.env.SECRET)
    .update(req.body)
    .digest('hex')
  if (req.header('X-Perfsee-Signature-256') === 'sha256=' + digest) {
    const data = JSON.parse(req.body)
    switch (data.eventType) {
      case 'bundle-finished':
      //... your code here
    }
    res.status(204).send()
  } else {
    res.status(400).send()
  }
})

app.listen(3000)

POST Example
Request:
Accept: */*
content-type: application/json
User-Agent: Perfsee-Hookshot/1
X-Perfsee-Delivery: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
X-Perfsee-Event: bundle-finished
X-Perfsee-Hook-ID: 1
X-Perfsee-Hook-Project: perfsee
X-Perfsee-Signature-256: sha256=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

{
  "eventType": "bundle:finished",
  "payload": {
    "data": {
      "project": {
        "id": "anything",
        "host": "Github",
        "namespace": "perfsee",
        "name": "perfsee",
        "isPublic": false,
        "artifact": {
          "id": 65,
          "branch": "feat/webhook",
          "name": "main",
          "hash": "50fae89df58f7e61431268470df5edebad4ba902",
          "status": "Passed",
          "duration": 5433,
          "failedReason": null,
          "buildKey": "builds/1/ad38f6ba-80a0-4d67-869b-8edbbfde0d81.tar",
          "reportKey": "artifacts/1/bundle-results/89540a83-d862-4652-bd8b-3fe338c3eb4e.json",
          "contentKey": "artifacts/1/bundle-content/4a5cbd9a-e04a-4b7f-a76d-0572cae28cab.json",
          "score": 57,
          "createdAt": "2022-12-18T23:12:04.076Z"
        }
      }
    },
    "variables": {
      "projectId": "anything",
      "artifactId": 65
    }
  }
}

Events
Currently webhook has 4 types of events available.
bundle-finished

Payload Property
Value Type

project
Project

artifact
Artifact

snapshot-completed

Payload Property
Value Type

project
Project

snapshot
Snapshot

snapshot-report-finished

Payload Property
Value Type

project
Project

snapshotReport
SnapshotReport

source-finished

Payload Property
Value Type

project
Project

snapshotReport
SnapshotReport

UI Design
Settings:

resolved in #206


update access configuration docs

[x] Closes #7689
[ ] Tests added / passed
[x] Passes black dask / flake8 dask / isort dask

Update access configuration docs to mos recent behavior.

@jrbourbeau @jsignell  I just noticed that the Conversion Utility section is also not up to date https://docs.dask.org/en/latest/configuration.html#conversion-utility
I think we should use the same examples than the ones we use in the section we just modify and show how to do it with env variables and config.set. What do you think?

Good catch, updating the "Conversion Utility" section seems reasonable too


Non NULL terminated strings and strcmp

I see a lot of code snippets like
if (strcmp(*v8::String::Utf8Value(format_val), "jpeg") == 0) {}

strcmp - compares two null-terminated byte strings lexicographically http://en.cppreference.com/w/c/string/byte/strcmp
v8::Strings are not NULL terminated e.g can have \0 anywhere 'A\u0000Z'

So it's possible to have format_val = 'jpeg\0bonkers big bytes by bad buddy blows ....big bang`
Does anyone see an issue here ?
/cc @lightmare @springmeyer
Also, it's considered a good practice to prefix "C" library functions with std when used in c++

:+1 to fix. Looks like these are only in src/blend.cpp which means they are carry over from the node-blend port to node-mapnik.


Are you Hacktoberfest-ing?

Any plans to make this repo Hacktoberfest-able?

@bblommers  I could see many of the issues labelled as hacktoberfest-accepted.
But https://hacktoberfest.digitalocean.com/faq says that only PRs are counted as valid contributions
Do issues/commits count?	|  No, only pull requests count.

Or those issues are just labelled for any potential contributions?

Looks like this is the end of another Hacktoberfest. There was a noticable uptick in contributions this month, with plenty of bug fixes and enhancements being added to Moto.
Thank you to everyone who contributed! :tada:


Switch to martinez clipper

Ok, so this is promising.  It's fast and small, but I am running into some of the unioning issues reported in the martinez repo:
JSTS/Turf

Martinez

I have a feeling https://github.com/w8r/martinez/pull/115 might fix this, so I'm going to leave this work on a branch and wait for martinez to get an update.  It's great to see that there is active work being done!

Simply the best feeling:

I updated this branch to have the latest code from master as well as updating martinez-polygon-clipping to 0.7.0, but still seeing some artifacts.  I'm not surprised, as there are open issues upstream for things like this..

@bhousel Are there tweaks we could make to the data to work around the martinez bugs? Things to avoid? I'd be happy to sacrifice some space efficiency in order to drop JSTS.

@bhousel Are there tweaks we could make to the data to work around the martinez bugs? Things to avoid? I'd be happy to sacrifice some space efficiency in order to drop JSTS.

I don't think so.. We can probably always invent situations where the country coder geometries will intersect this way.
It looks like https://github.com/w8r/martinez/pull/115 didn't actually merge yet, and there are some related issues in the comment thread that it would also fix, so I wonder if I could spend time on that to finish it up..

I dug in a bit more today and learned a few things.
The clipping might be ok.  The rendering artifacts are probably caused by a mapbox-gl / earcut issue

https://github.com/mapbox/mapbox-gl-js/issues/7023

The locationSet that I'm testing is:
{ include: ['039', '015'] }
This is the "Southern Europe + Northern Africa" example:
https://ideditor.github.io/location-conflation/?locationSet={ include%3A ['039'%2C '015'] }
The region around the Canary Islands does this:

But it looks fine on https://geojson.io:

So I reduced it to this simpler test case:
{
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "MultiPolygon",
    "coordinates": [
      [
        [
          [-15, 40],
          [-15.92339, 29.50503],
          [-8, 32],
          [-7.37282, 36.96896],
          [-15.92339, 29.50503],
          [-25.3475, 27.87574],
          [-17.27295, 21.93519],
          [5.14112, 40],
          [-15, 40]
        ]
      ]
    ]
  }
}

Geojson.io:

Mapbox GL 1.8:

Some more things I want to try

Run the result through geojson-rewind ?
Do the clipping with integers only (no floating point).  I wrote this code today and it's working ok.  It's kind of hacky but if it helps I'll leave it in, if not I'll throw it out.

ok it's definitely a bad clipping result and not the result of improper winding.
Going to also check out this other alternative library: https://github.com/mfogel/polygon-clipping

superseded by #20


Update onecodex-realtime.py with API key error display

Thanks for putting this together, Alexis!
Here's a small change to let you know (a little sooner hopefully) if our server's unhappy with you. 😄

Hi Roderick,
Thank you for this!
I am aware of a 429 error they may also introduce if you're overloading their system that may require a timeout. Regarding the API_KEY I may suggest users create a ~/.onecodex_apikey file in a future update exporting the ONECODEX_API_KEY variable.

That sounds like a great idea!
Also, the other error status code the search service can occasionally return is a 503. We don't have strict guarantees about up-time for the service yet, so the compute instance it's on may die occasionally and take a little while to get restarted.


raylib.h: rename color to include COLOR_ prefex

This is necessary since when I was attempting to use hw.h in initial setup PR I ran into errors where they both had defined COLORS with the same name. spinner still works and is just to resolve the duplicate naming between hw.h and raylib.h

That's not how you want to do it. You will have to modify it on our fork here first and then bump the commit here

This might also conflict with colors from ncurses that already use the COLOR_... nomenclature (see here)

That's not how you want to do it. You will have to modify it on our fork here first and then bump the commit here

was actually thinking of whether I needed to make the change on the raylib repo or not. Was gonna go back to check but this confirms it. Thanks!

This might also conflict with colors from ncurses that already use the COLOR_... nomenclature (see here)

I don't see how it would conflict since what you linked is specifically being called for the consoleUI, i don't think we'll ever include both consoleui and raylib.h in one at any point in the future.

It's just confusing to have 2 objects with the same name but not the same origin and definition (when grepping for stuff)

It's just confusing to have 2 objects with the same name but not the same origin and definition (when grepping for stuff)

yeah I agree, we can have the prefix be RAYLIB_ just so it's obvious where its being used. I'll make the changes on the raylib repo and change this PR to just be the commit update later today.

I'll mark it as ready for review once the PR in raylib gets merged, then i can push the commit onto here.

You should be good to include hw.h now


CIFAR 10 Classifier using Conv Net

[x] Added Simple CNN architecture for classifying CIFAR 10 (WIP)
[x] Pretrained Model
[x] Notebook for visualization & predicting
[x] Dataset Source

Solved: Encountering this (PFA Screenshot below) issue at the end of epoch 1, any help or suggestions would be helpful

Dataset source: https://drive.google.com/file/d/1zTBYb1oPCJEd0wUbkCuXS6xSA1N1QXLM/view?usp=sharing

Dataset uploaded - http://datasets.mlpack.org/cifar-10.tar.xz

I'll get the conda package ready, and then I think we can merge this in.

Sounds good

Almost ready, have to find a way to automatically push it to conda.

Almost ready, have to find a way to automatically push it to conda.

Maybe this will help https://stackoverflow.com/a/66539742

Let's see if http://ci.mlpack.org/job/mlpack-conda-nightly/3/ works.

Looks like all the packages are uploaded - https://anaconda.org/zoq/mlpack/files let's see if that works.

Looks like all the packages are uploaded - https://anaconda.org/zoq/mlpack/files let's see if that works.

Sure, I'll check it out

Looks like all the packages are uploaded - https://anaconda.org/zoq/mlpack/files let's see if that works.

Sure, I'll check it out

It's not working as expected, notebook dies or runs predict method infinitely

Okay, thanks for the update, I think in this case we have to wait until the ann code restructure code is finished. In any case let's update the Jupyter local setup script, and merge this afterwards, since the code works in a local C++ env it should work in a notebook as well.

Pre-trained weights for CIFAR10 classifier: https://drive.google.com/file/d/1uRE-2NeKeij44J368lSoSJGqPfPV_y8A/view?usp=sharing (test accuracy 46.38%)
I have also updated comments in notebook regarding issues in model inference & added some standalone C++ file for evaluating the model on test data.

Uploaded http://datasets.mlpack.org/cifarNet.xml.


download pile dataset is not working

seems like https://the-eye.eu/public/AI/pile/ is not reachable.
Is there any other reliable alternative location to fetch data?

I learned that the dataset has been removed due to the DMCA claim. There is an alternative location, https://huggingface.co/datasets/EleutherAI/the_pile_deduplicated/tree/main
This has formatted in parquet, so you will need to read from parquet (instead of jsonl.zst) and convert to tfrecord.
Here is an example.
import pandas as pd
import tensorflow_datasets as tfds
import tensorflow as tf
import io
import zstandard
import jsonlines
import os
import time
from itertools import chain
import glob

_DESCRIPTION = """
The Pile is a large, diverse, open source language modelling data set
that consists of many smaller datasets combined together.
The objective is to obtain text from as many modalities as possible to
ensure that models trained using The Pile will have much broader generalization abilities.
We are currently developing Version 1, with an ultimate goal of 1 TiB of English text.
After the completion of Version 1, our next goal is a fully-multilingual, 10TiB text dataset.
"""
_CITATION = """
"""
_DATASET_MODES = ["lm"]
_VERSION = tfds.core.Version('1.0.0')

os.environ['TFDS_DATA_DIR']="/mnt/resource_nvme/the_pile"

class PileReader:
    def __init__(self, filenames, para_joiner='\n\n'):
        if not isinstance(filenames, list):
            filenames = [filenames]
        self.filenames = filenames
        self.para_joiner = para_joiner

    def _read_fn(self, filename):
        print(filename)
        df = pd.read_parquet(filename)
        for _, row in df.iterrows():
            yield row.to_dict()

    def __iter__(self):
        print(self.filenames)
        return chain.from_iterable([self._read_fn(filename) for filename in self.filenames])

class ThePileConfig(tfds.core.BuilderConfig):
    def __init__(self, *, mode=None, **kwargs):
        super(ThePileConfig, self).__init__(
            name=mode,
            description="The Pile dataset",
            **kwargs)

class ThePile(tfds.core.GeneratorBasedBuilder):
    BUILDER_CONFIGS = [
        ThePileConfig(version=_VERSION, mode=mode) for mode in _DATASET_MODES
    ]
    def _info(self) -> tfds.core.DatasetInfo:
        return tfds.core.DatasetInfo(
            builder=self,
            description=_DESCRIPTION,
            features=tfds.features.FeaturesDict({
                'text': tfds.features.Text()
            }),
            supervised_keys=("text", "text"),
            homepage='https://github.com/EleutherAI/The-Pile',
            citation=_CITATION,
        )

    def _split_generators(self, dl_manager: tfds.download.DownloadManager):
        dl_manager.verify_ssl = False
        dl_paths=glob.glob('./data/*.parquet')
        print(dl_paths)
        return {
            'train': self._generate_examples(dl_paths),
        }

    def _generate_examples(self, paths):
        pipeline = PileReader(paths)
        #print('pipeline', pipeline)
        for x, result in enumerate(pipeline):
            if result:
                idx = f'{x}_the_pile'
                yield idx, {'text': result['text']}

if __name__ == '__main__':
    ds = tfds.load('ThePile')


Fix image

This PR includes:

How to run locally the site (for debugging and testing)
Fix the image not showed
Some minor changes in the content to align along the content

@mpbravo Here the fix!!!

Brilliant, thanks!!


fix: only show signs from current buffer & line

What?
When fetching the possible code actions for a line we're calling vim.lsp.diagnostic.get_line_diagnostics() inside code_action_request(), which will fetch all diagnostics on that specific line number across buffers, and not the current buffer.
Example
We're on buffer 1, and on line 7. Buffer 2 is in the background, and contains a diagnostic on line 7. We will now get a sign for the diagnostic on line 7 in buffer 1, even though no code actions are available for this specific line.
Solution
We could just add bufnr as an argument like this:  vim.lsp.diagnostic.get_line_diagnostics(bufnr).
As get_line_diagnostics is deprecated, I instead wrote a utility function utils.get_current_line_diagnostics which will fetch the correct bufnr and line and call vim.diagnostic.get.

Thanks a lot for the PR and the fix! I've already experienced that issue, but I couldn't reproduce it. Thanks for pointing that out.


Fix /tmp/modsecurity/* directories permissions so nginx workers can write to them

Hello,
We've noticed these errors in the logs:
[173049359014.027868] [/private/api/v1/fileUpload] [1] Multipart: Failed to create file: /tmp/modsecurity/upload/20241101-203950-173049359014.027868-file-XXXXXX
[173049359014.027868] [/private/api/v1/fileUpload] [1] Multipart: Final boundary missing.

The important bit is Multipart: Failed to create file, while Multipart: Final boundary missing is the consequence of that and is not the cause, but the effect of the issue.
This PR changes the ownership on /tmp/modsecurity from root:root to nobody:nobody recursively, so nginx workers running under that user can write to the directories within /tmp/modsecurity.

Thanks!

Release is building now. The new image will be available in a couple of hours.


Do effectful components count as part of the Elm Architecture?

So, I have the use case where I have a component that does some animations. These animations involve timing.
An example of this is the material design components:
https://material.angularjs.org/#/demo/material.components.button
In material design, when you click a button, you have this ripple effect. The effect goes as follows:

Start as a small circle
Grow to fill the container
Wait a few milliseconds
Fade away

Conceptually, in Elm, you could implement this as two components: Button and Ripple.
You'd like to send the Button an action like:
ClickAt (Int, Int)

and then that Button would send an action to the Ripple like :
Animate (Int, Int) Float

where you pass in the starting position of the ripple effect and the maximum size that effect would have.
The problem, is, how to implement this animation in Elm? The problem is that a single action is expected to produce several actions that are separated by a time interval.
Solution 1: Do it in CSS
You could implement this in CSS with CSS Animations and just change a "class" in Elm. Certainly, this follows some of the best practices, but then these things are harder to share.
Pros :

Straightforward to implement
Putting styles in a stylesheet follows best practices

Cons :

You must include a separate stylesheet whenever you want to use a component, making it harder to have components that depend on other components that depend on other components especially if at each level of the dependency there's a different author / package.
CSS is a different language. With inline styles, you get to pair the awesomeness of Elm and all of its libraries and functionality with CSS. For example, you can have functions that produce new styles and variables to hold different values (no need to use a pre-processor or something).
Harder to maintain. Any modification of the component requires to make modifications in two different languages and keeping everything in sync is challenging.

Solution 2: Make the component effectful
Instead of having the view function for the Button look like this
view : Address Action -> State -> Html

it would instead look like this:
view : Address (Task error ()) -> Address Action -> State -> Html

And, instead of sending one action to the Ripple, you would send multiple actions interspersed by timers.
rippleAnimation : Address Ripple.Action -> (Int, Int) -> Float -> Task error ()
rippleAnimation address startingPosition maxRadius =
  send address (StartAt startingPosition)
    `andThen` \_ -> send address (GrowTo maxRadius)
    `andThen` \_ -> sleep 100
    `andThen` \_ -> send address FadeAway

And then, in the Button.view you'd do something like:
onButtonClick taskAddress (rippleAnimation rippleAddress)

(we can assume onButtonClick gets the necessary info from the DOM and passes it to rippleAnimation)
Pros :

No need to go into CSS. Animation is fully handled in Elm. No need for extra stylesheet. This also means that you can see the results in elm-reactor as opposed to in some html file.
Easier to maintain. Everything is self-contained in Elm and subject to all the guarantees Elm provides.
This solution is extensible to arbitrary effects. This means you can have a component that display a map from google maps or an autocompleter that can fetch its data from the web, etc...
You can see here for real-life examples of effectful components

Cons :

Components now require opening a port for them to work. Ideally, if you manage to make sure all your tasks are of the same type, then you could jam everything into a single address and thus need to open only one port. But this also means that leaving out the port does not guarantee that a button will work properly.

A component which could be effect-free is now effectful just for the sake of an animation. This means that for an animation, this component has been granted the potential capability of getting data from or sending data to the internet, etc... It does feel a bit heavy handed if your goal is to just animate something.

So, my question is, do these things still count as part of the Elm Architecture? Is having components that can send tasks a good thing?

I think the real question might be "how do we do animations in a good way?" I know elm-d3 is not up to date at all, but that direction would be my solution 3.
As for tasks from components, I'd generally stay away from it. A task tells you nothing about what is actually going to happen, so any ability to cache or batch stuff goes away, no analysis can be done once you go into tasks. If you just pass out data and have some interpreter that'll do what the data says, you can be much fancier. Let's say you have 5 animations stacked up. With tasks, they just hopefully work out okay. With an interpreter, you can decide to accelerate things or skipped things if stuff starts piling up. I think this is true for animations, but I suspect it's the general pattern when you feel tempted to put tasks in components.

Also, I don't think there's such a thing as "an effectful component" in Elm. Even when you are passing out tasks, there are no effects. When you do want to allow some effects, I think a reasonable API is to have something like this:
type Request

update : Action -> Model -> (Model, Maybe Request)

run : Request -> Task e a    -- where e and a are filled in as appropriate

This means someone higher up the chain can turn it to tasks when it's the right time. And if you want to add something like this it's doable:
batch : List Request -> Request

Once we have concurrency, I suspect we can do fancier things with "runners" that manage any batching or caching or whatever and you just have to pipe in the requests.

This makes a lot of sense. Basically, the top-most component would be like the grand central dispatcher that sends all the queries and relays everything. But with this model, it only cares what was sent from one level down. Cool!
This also guarantees that the whole thing is serializable, including the request. This is a really important point I missed out. One of the approaches I was considering was to sneak in the address in the component state. But this would break everything cuz you want the state to be serializable. You'd like to be able to grab it, cache it, send it over the wire, etc...
The other approach I was considering is having one big address for all the tasks and you could get at it cuz it was defined somewhere in a library. All the components send tasks to that one mailbox defined somewhere. I think it sounds alright until we get to your point about batching requests. Basically, if all the components just wildly start sending tasks, you loose control of what did what when.  Whereas if you deal just with these requests, the top-most component or the main view function or whatever will get to control what to do exactly. It could even group these requests, filter out the redundant ones, etc... With a good enough system, you could even enforce that the same request never gets made twice.
Although, it did give me pause to think about animations. This is an aside, but I think one way this could be done is by using something like Time.fps or AnimationFrame.frame, to generate a counter. Imagine a counter that starts at one and increments every 16 milliseconds. This counter could represent the current frame (the actual value of which may or may not be useful cuz we could just do modulo or whatever).
You can then send this value down the component hierarchy to all the components that need animation. Like, suppose they just all have a field called currentAnimationFrame.
Then, animations would be simple. Either it's something like the ink ripple effect, in which case you can use canvas and that works well. (actually, that's how the Polymer guys implemented it)
Or, we want to move or resize a component, in which case we do the animation by modifying CSS dynamically via inline styles. No CSS Transitions or Animations. Like, if you wanna move a component, you do it by defining the dimensions and position of a component in Elm and then you take into account the current animation frame to figure exactly what these values must be.
This is why I came up with that "History/Timeline" thing. The idea is to explore a way of defining keyframe animations as "timelines". An animation is just a set of keyframes (the individual frames) and there's a way to transition from one frame to the other. Then you can connect multiple animations together to form an animation group and even define how to transition from one to the other.
Aside from that, I think that D3 would be a cool option, although I'm no expert on D3 so I can't say much about it.

I think this is covered by the new elm-effects stuff? I'm closing on that supposition. Please reopen if not!

I think it is covered. As for animations, I think there's more work to be done but for the moment, effects seem to be fully covered.

Okay, and check out the new version of example 8. @Dandandan cleaned it up quite a bit.
I still think the batching of animations needs special considerations outside the scope of the basic elm-effects package. I suspect we will get a fan out of packages like that for things like GraphQL and batched animations and such, after which we can bring it all back into a centralized place.

Looks good and clean. :D I like the direction this has taken.
Yeah, I think that the day we'll start having to deal with things like GraphQL we'll learn about how to deal with non-task based effects, which could then re-inform the API in a positive way. Anyways, good job. Looks super usable and very little boilerplate added to the Elm Architecture in general.


Support for Anarchy Linux, Calculate Linux and NuTyX

I added support for Anarchy Linux, Calculate Linux and NuTyX to neofetch, including ascii-art files.

 You mean the trailing white spaces, not the leading ones ;) I'll check for the correct colors.

I mean the leading and trailing white space. The white space surrounding
tenge ASCII art.
Take a look at the other art in Neofetch to get an idea.
 You mean the
trailing white spaces, not the leading ones ;) I'll check for the correct
colors.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dylanaraps/neofetch/pull/901#issuecomment-362393514,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGfAaxBDj9HbaTzMOOHK8rnayy0-ry8Cks5tQh_0gaJpZM4R0Cst
.

Ok, done. I applied the changes and uploaded the new files to my fork, including the latest changes you made to neofetch.

LGTM :+1:
Thanks

Thanks for merging :)


fix passing additional networks to login nodes

Adds passing of additional networks to login nodes.
Submission Checklist
Please take the following actions before submitting this pull request.

Fork your PR branch from the Toolkit "develop" branch (not main)
Test all changes with pre-commit in a local branch #
Confirm that "make tests" passes all tests
Add or modify unit tests to cover code changes
Ensure that unit test coverage remains above 80%
Update all applicable documentation
Follow Cluster Toolkit Contribution guidelines #

/gcbrun

Why do we need this on instance if template already got additional networks?

Let me double check that

We need that because in _slurm_instance we are always providing the network_interface section. This overwrites interfaces defined in the template, due to that fact, currently additional interfaces do not work for login instances (i.e. template has 2 interfaces, but instance only one assigned).

We need that because in _slurm_instance we are always providing the network_interface section. This overwrites interfaces defined in the template, due to that fact, currently additional interfaces do not work for login instances (i.e. template has 2 interfaces, but instance only one assigned).

Thank you @wiktorn, that is great reason!) It would make sense to stop supplying additional_networks to the template (to simplify TF graph at least). WDYT?
Could you please address that and I will run set of integration tests before landing.

Thank you @wiktorn, that is great reason!) It would make sense to stop supplying additional_networks to the template (to simplify TF graph at least). WDYT?
Could you please address that and I will run set of integration tests before landing.
Done, works good. Ready to run integration tests.

/gcbrun


Prevent closing or force-restart of chromium

There is a page(not mine) I am displaying with some buttons.
Each button is opening popup in fullscreen mode. There are no buttons to close it so.
I only can press Alt+F4 to close it. Is there some possibility to make X button of windows visible?
Because people sometimes press Alt+F4 too many times and closes main window which I want to prevent because after that I need to switch to console and start chromium process again or restart Pi.

The kiosk uses the Matchbox window manager, which is meant for these "embedded" use cases, so there's no window controls by default.
Some avenues you may try:

Not running Chromium in full screen mode, which allows you to just use the X button of the tab/window to close it
Writing a Tampermonkey userscript that adds a close button to the page itself
Trying something like matchbox-keyboard (probably not going to be useful here, though)

Hope this helps.

I think the second option will be the best because in first it's opening a new window so no frame with X button.

Sounds good.
But also somewhat outside the scope of this project, so I'm going to go ahead and close this one. :)


echarts "finished" event not fired when animation is disabled

Version
4.9.0
Steps to reproduce

Create a chart
Set option.animation to false (disable animation)
Listen to the "finished" event of the chart

What is expected?
"finished" event is fired when the chart is loaded.
What is actually happening?
"finished" event is not fired

The charts are used in both modes (animation enabled and disabled) at the same time. I want to do some work when the chart is just finished loading. But it seems that "finished" event doesn't work for charts with animation disabled.

can't reproduce

can't reproduce

@hsluoyz  Sorry, I was using the latest version(5.0.1), maybe you can try it out.

@hsluoyz  Sorry, I was using the latest version(5.0.1), maybe you can try it out.

Updating to latest v5.0.2 fixed the issue, thanks!


Enable more builds with rest of experimental flags

Apologies if I got Travis stuff wrong in advance.

SCALAR=32bit FIELD=32bit EXPERIMENTAL=yes RANGEPROOF=yes WHITELIST=yes GENERATOR=yes build stalls out during exhaustive test

squashed


Extension doesn't work on OSS Code

At first i tried to find the extension in OSS code but i couldn't find it even if i added the extension id in product.json and then installed it with the vsix file but it didn't work

This seems to be because of code-oss is bundled with some settings in product.json which prevents some extensions from being installed. Some workarounds are described here.
I've installed code-marketplace from AUR and it works.


@conda-forge-admin, please update version

Additional comment:
No response

Fixed in https://github.com/conda-forge/pymupdf-feedstock/pull/27


typo

Thanks: this wasn't a typo actually but rather an IDE autoformatting (in ES5 mode). In another branch I've gone back to using a function here: in another project I've just had to revert all my ES6isms as there's still enough browsers out there that don't have the arrow syntax (it seems!)


./feroxbuster --help Bus error

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
Expected behavior
A clear and concise description of what you expected to happen.
Traceback / Error Output
If applicable, add error output to help explain your problem.
Environment (please complete the following information):

feroxbuster version: [e.g. v1.0.1]
OS [e.g. ubuntu 20.04]

Additional context
Add any other context about the problem here.

did you ever get this sorted? to have any hope of helping, i need more information than what you've provided


Column no. 525 is missing

File 词汇.csv is missing column no. 525. When you scroll through the column that contain the numbers, you can see that it goes from 524 to 526. This is the direct link to that part.
This makes the CSV to show 11093 numbered rows, when actually the official list only shows 11092 rows.

Thanks @rdrg109 fixed.
You can download csv files and excel files.
2.1


iframes eat mouse events

When Jyve opens a new activity tab with iframe content, that iframe eats mouse events. This is noticeable when attempting to resize the panel using a splitter, since the splitter never gets the mouse event when the mouse is over the iframe.
The solution for this is a CSS trick (which is automatically applied if you use the jlab iframe widget):
https://github.com/jupyterlab/jupyterlab/blob/master/packages/apputils/style/iframe.css#L17-L35
https://github.com/jupyterlab/jupyterlab/blob/master/packages/apputils/src/iframe.ts#L13

Looks to be sorted up on demo! Thanks @sccolbert!


Time series tensor - io merge

io merge

apache parquet
apache arrow
apache feather
numpy
pandas

merge io subpackage
this package is used for transforming different io type


Not possible to set max. number of iterations manually

Hello,
I stumbled upon the following problem with quad-rs version 0.1.1:
fn integrand(x: f64) -> f64 {
    x.exp()
}

fn main() {
    let integrator = GaussKronrod::default();
    let range = -1f64..1f64;
    let integrator = integrator.with_maximum_iterations(200); // <== Compiler complains "type annotations needed - cannot satisfy `_: ComplexField`

    let result = integrator
                .integrate(&integrand, range, None)
            .unwrap();
}

Am I doing something wrong? I didn't find any tests where the method with_maximum_iterations is actually used, therefore I can't tell ...
Thanks a lot for your help!

Hey, thank you for finding this. It's an irritating error actually, I think it's because the set methods only depend on the RealField, while the integrate methods depend on the ComplexField. In this version both groups of methods are bundled into the same trait, so when you call the set method the compiler gets upset because it can only work out some of the trait boundaries it needs. I think anyway, I would have assumed the compiler would be able to work it out when you call integrate later. Maybe I am missing something.
Anyway, I have fixed this in #2 by splitting the methods, keeping an Integrate trait to run the integrals, and creating a new IntegrationSettings trait which sets the maximum iterations and tolerances. As this has bloated the API a little bit I moved these and the integrator into a prelude. You should be able to run your example if you utilise the latest version (0.1.2) as
use quad_rs::prelude::*;

fn integrand(x: f64) -> f64 {
    x.exp()
}

fn main() {
    let mut integrator = GaussKronrod::default()
         .with_maximum_function_evaluations(200);  // <== Compiler is hopefully happy
    let range = -1f64..1f64;

    let result = integrator.integrate(&integrand, range, None).unwrap();
}

Note that in the new version the set function is now called with_maximum_function_evaluations rather than with_maximum_iterations, as this is really what the method is constraining.
Does this work now?


Change COMA API to have "use_instances" as keyword instead of "strategy"

Resolves #57
Examples and readme.md have also been adjusted.

The build for Python 3.12 now works on master. Try to rebase


Incorrect typings for styled inputs on Canary

Bug report
Describe the bug
On v1.0.0-canary.5 a styled component created as so:
styled('input', { ... })

has an onChange of any.
On 0.2.4 the same styled component's onChange is correctly typed as React.ChangeEvent<HTMLInputElement>.
To Reproduce
Here are some sandboxes to compare:
CodeSandbox on 0.2.4: https://codesandbox.io/s/stitches-input-event-0-2-4-1ojvo?file=/src/App.tsx
CodeSandbox on 1.0.0-canary.5: https://codesandbox.io/s/stitches-input-event-canary-mnrpc?file=/src/App.tsx
Expected behavior
Correctly type intrinsic props.
It looks like this started in 1.0.0-canary.0.

This was fixed in canary.6!
https://codesandbox.io/s/stitches-input-event-canary6-srexp

Confirmed! 🎉


pgr-mdb error building index

I'm trying to build an index with the pgr-mdb utility, however I'm getting an error consistently even with the test data supplied in the repo. The error message is as follows:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: InvalidData, message: "stream did not contain valid UTF-8" }', pgr-bin/src/bin/pgr-mdb.rs:47:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I tried with multiple versions of AGC tool and also the pgr-mdb executable. I'm on Ubuntu server 22.04.

Hi, I encontered the same issue. It might because the file you provided for the first postional argument is a agc file while pgr-mdb accept a utf-8 file which contains file path of agc files or fasta files @rishavray


[Hotfix] Fix the redundant deleteIngress calling when 'doTriggerSavepoint' for k8s.

What changes were proposed in this pull request
Fix the redundant deleteIngress calling when 'doTriggerSavepoint' for k8s.
Brief change log
Fix the redundant deleteIngress calling when 'doTriggerSavepoint' for k8s.
Verifying this change
This change added tests and can be verified as follows:

Manually verified the change by testing locally.

Does this pull request potentially affect one of the following parts

Dependencies (does it add or upgrade a dependency): (yes / no)

Hi, @wolfboys  @MonsterChenzhuo .
Could you help to review it if you are in free time?
Thanks a lot~


Unverified breakpoints

VSCode Version: 1.26.1
OS Version: Windows 10

Steps to Reproduce:

for reference https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/angular?view=aspnetcore-2.1&tabs=visual-studio

Install dotnet core 2.1
Create a project using dotnet new angular
Inside the ClientApp directory run npm install
Open project in VSCode
Run with debugging (F5) with any break points in typescript files

Does this issue occur when all extensions are disabled?: Yes (as many as I can disable and still run dotnet core with debugging)

please file this issue against the dotnet debugger you are using.

@weinand I am a bit confused as to your answer. The extension I think you are referencing is the C# extension which uses OmniSharp as a debugger. However, it is not C# debugging I am having issues with. As I described in my issue, this is only a problem with debugging in TypeScript files, which leads me to believe that VSCode is not properly reading how Angular does the mapping between the TS files and the resulting JS files. C# debugging works just fine when I'm having this problem.

What kind of debugging are you using then?
Node.js, Chrome?

Here is my launch.json
   // Use IntelliSense to find out which attributes exist for C# debugging
   // Use hover for the description of the existing attributes
   // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
   "version": "0.2.0",
   "configurations": [
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/core-template.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "internalConsoleOptions": "openOnSessionStart",
            "launchBrowser": {
                "enabled": true,
                "args": "${auto-detect-url}",
                "windows": {
                    "command": "cmd.exe",
                    "args": "/C start ${auto-detect-url}"
                },
                "osx": {
                    "command": "open"
                },
                "linux": {
                    "command": "xdg-open"
                }
            },
            "env": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "sourceFileMap": {
                "/Views": "${workspaceFolder}/Views"
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
    ,]
}```

I do not have a specific extension installed for debugging the angular or typescript files. However my browser I'm working with is Chrome. This is the code that you get when you run `dotnet new angular` so it is the angular template for dotnet core. At first I was able to place break points in the editor in my TS files and debug without issue. So I don't know if it's an update to VSCode that I installed that contributed to the problem or not. But it is happening with a fresh project from the template both in the stable build, and the insiders build.

Both launch configs are of type "coreclr" which is the C# debugger.
I cannot see any TypeScript debugging in your launch.json.

Thank you for your help. I thought for sure I had debugged typescript files before in this project and I only use VSCode. Maybe something caused my launch.json configuration to change, or maybe I'm just remembering wrong. But I appreciate your help a great deal, and I'll investigate that further.

You can add launch configs of different types to the launch.json. Just press on the "Add Configuration..." button and pick a debug config from the list:

Every installed debugger contributes to that list. And the node.js debugg is builtin. If you want to debug client side JS/TS please install "The Debugger for Chrome".


Question: using of methods

Question: How do I use react method and redraw?
I am having the data updated with another fetch from the backend but it is not reflecting the change in the chart.
Thanks

<vue-plotly
                        :data="plotTelems(inv.telems)"
                        :layout="layout"
                        :options="layouts.options"
                      />

plotTelems(data) {
      let time = data.map(a => a.time);
      let foo= data.map(a => a.foo);
      let trace1 = {
        name: "foo",
        x: time,
        y: foo,
        type: "scatter",
        yaxis: "y"
      };
      let pData = [trace1];
      return pData);
    },

If you give example i could help you more


Release Google.Cloud.Dialogflow.V2 version 4.24.0

Changes in this release:
New features

Properly mark TrainingPhrase name field output-only (commit d336935)

Documentation improvements

Fixed the references to proto method / fields (commit d336935)

Created release for Google.Cloud.Dialogflow.V2-4.24.0


Updates

Description

Related Issues
Fixes #
Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

jest coverage report 🧪
Total coverage

Status
Category
Percentage
Covered / Total

🟢
Statements
90.95%
352/387

🔴
Branches
54.97%
210/382

🟢
Functions
88%
88/100

🟢
Lines
90.9%
350/385

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold


Licensing Questions

Hello, I am developing a C# program at my company. I want to use this package because I need to implement the preview features of ZEBRA ZPL in my project. I wonder if I can use this package and if I use the package's own viewer it won't collect data or create security issues differently than Labelary. Also, I wonder if there is no limit on the number of preview views, etc. thank you

There is no limit to preview images and it also does not require an external connection


ci: revert "feat(add-tav-action): add test-all-versions as github act…

Which problem is this PR solving?
The CI seems to be unstable at this point and the only way I was able to get it working reliably was to revert the recent addition of TAV runs. We still definitely want to add TAV back but after we've found a way to work around the issues we're experiencing.
My theory is that the resource limits are shared between the workflows and we're hitting the limits of those with two processes of Cassandra running(each consuming ~4GB of memory, 7GB is the limit). I don't know how to make sure it's the case.
cc: @haddasbronfman

Closing this now for it's not reliably fixed even when reverting TAV. Looking into it.


Include response output for spfx commands. Closes #3925

Include response output for spfx commands. Closes #3925

Thank you @nanddeepn
We'll review it ASAP!

Thank you @plamber. I will check it.
Can you please guide, how can I run the documentation locally? Is there any npm run command for this?

You should find more info under documentation
https://github.com/pnp/cli-microsoft365/wiki/Minimal-Path-to-Awesome


data: use a not common word to store object data

I was migrating one of my project to BS 5 and React use key as attribute a lot, so there was a conflict with us.
Which is why I renamed key --> bsKey

I like it, but I think it's a good chance to prefix all our data attributes. I have a WIP branch so it would be nice if we could finish that too.

it's not a data attribute here, it's an object attribute

I know but still I could use help with that.
On Wed, Jun 17, 2020, 11:55 Johann-S<EMAIL_ADDRESS>wrote:

it's not a data attribute here, it's an object attribute
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/twbs/bootstrap/pull/31067#issuecomment-645246499, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AACVLNKVN36QZ7SVRCNDTJTRXCAHDANCNFSM4OAMDTZA
.


[WIP] Add more mangling information to demangling API.

Overview:
This patch adds a field to FrameDebugInfo to store the (original) mangled name that has been retrieved during symbolication, and extends demangle_any to return the demangling scheme used, as well as the demangled name. This allows users of the demangle_any interface  and FrameDebugInfo to access (respectively) the scheme by which a given name was mangled, as well as the original mangled name.
Rationale:
I'm currently working on a tool that needs to be able to symbolicise in precisely the same way that samply-symbols/wholesym provides, with one cavaet: I need to be able to access the original mangled names.
Given an address (e.g. from a firefox profile), this is currently quite difficult, as there is no "built-in" way to retrieve an address. Users would instead have to retrieve a de-mangled name from a symbolication source and then manually mangle it themselves. Given the difficulties of mangling, combined with the various sources of mangling (e.g. finding a name from code compiled with MSVC, but re-mangling into an Itanium form), this approach is extremely difficult.
The specific case that I'm interested in is transforming processed Firefox profiles into Clang PGO  (profile guided optimisation) compatible profiles. Clang's PGO optimisations are compatibile with sampling based profilers, but require mangled names.

Interesting, so this gives the mangled names both for the outer function and for any functions that were inlined at the sampled code addresses. Do you know what clang expects for inlined functions? Does it want to know if an inlined function call is hit, or is it ok to just tell it about the outer functions?

Is there any reason this isn't merged?


[Tabs] First component iteration

First version of a tabs switcher container component. See [0] for a feature breakdown. Implementation re-uses the UI components (Dialog and Edit Toolbar) that were introduced in the Carousel sandbox component.
[0] - https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/blob/feature/tabs/content/src/content/jcr_root/apps/core/wcm/sandbox/components/tabs/v1/tabs/README.md

Q
A

Fixed Issues?
Fixes #275

Patch: Bug Fix?

Minor: New Feature?
👍

Major: Breaking Change?

Tests Added + Pass?
👍

Documentation Provided
👍 (code comments and or markdown)

Any Dependency Changes?

License
Apache License, Version 2.0

@vladbailescu - addressed your feedback in https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/pull/284/commits/1958daab4e0737bb97c8f7ce4bae51bda0a19403, https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/pull/284/commits/aff4e7d417dfe10588447faa96a7bcf1db46cc88

Codecov Report

Merging #284 into development will increase coverage by 0.12%.
The diff coverage is 100%.

@@                Coverage Diff                @@
##             development     #284      +/-   ##
=================================================
+ Coverage          82.14%   82.27%   +0.12%
- Complexity           852      858       +6
=================================================
  Files                 79       81       +2
  Lines               2733     2736       +3
  Branches             507      507
=================================================
+ Hits                2245     2251       +6
+ Misses               201      199       -2
+ Partials             287      286       -1

Impacted Files
Coverage Δ
Complexity Δ

...ndbox/internal/servlets/ChildrenEditorServlet.java
75% <ø> (ø)
11 <0> (ø)
:arrow_down:

...sandbox/internal/models/AbstractContainerImpl.java
100% <100%> (ø)
7 <7> (?)

.../wcm/core/components/sandbox/models/Container.java
100% <100%> (ø)
4 <4> (?)

...mponents/sandbox/internal/models/CarouselImpl.java
100% <100%> (+7.14%)
2 <1> (-5)
:arrow_down:

...e/components/sandbox/internal/models/TabsImpl.java
100% <100%> (ø)
2 <2> (?)

.../sandbox/internal/models/ResourceListItemImpl.java
93.33% <0%> (+13.33%)
7% <0%> (+2%)
:arrow_up:

Continue to review full report at Codecov.

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


fix freq='D' behaviour of standardized indices

Pull Request Checklist:

[x] This PR addresses an already opened issue (for bug fixes / features)

This PR fixes #xyz

[x] Tests for the changes have been added (for bug fixes / features)

[ ] (If applicable) Documentation has been added / updated (for bug fixes / features)

[x] CHANGES.rst has been updated (with summary of main changes)

[x] Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?
*Fixes an error when using freq='D (or daily datasets with freq=None)
Does this PR introduce a breaking change?
No
Other information:

coverage: 90.299% (+0.02%) from 90.278%
when pulling f68a0feadb04a03f4825bad5c981073ce486b0f1 on spi_day_bug
into ccf574c512cde46d5d5eb741e51691eb788e3a72 on master.


Add support for Workflow Steps from Apps

❗ WIP / DRAFT ❗
Summary
This pull request contains changes outlined to incorporate support for Workflow Steps from Apps.

Workflow Steps provide the ability for Slack apps to create and process custom Workflow Steps for use in Workflows. Steps can be built to do things such as send data to external services, create tasks in project management systems, or update tickets. These steps can then be shared and used by anyone in the Workflow Builder to incorporate into Workflows they're building.
For more information on Workflow Steps, read full details here: https://api.slack.com/workflows/steps

Category (place an x in each of the [ ])

[x] slack_bolt.App and/or its core components
[ ] slack_bolt.async_app.AsyncApp and/or its core components
[ ] Adapters in slack_bolt.adapter
[ ] Document pages under /docs
[x] Others

Requirements (place an x in each [ ])
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[ ] I've run ./scripts/install_all_and_run_tests.sh after making the changes.

Codecov Report

Merging #97 into main will decrease coverage by 2.99%.
The diff coverage is 44.64%.

@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
- Coverage   90.05%   87.05%   -3.00%
==========================================
  Files         135      148      +13
  Lines        3832     4103     +271
==========================================
+ Hits         3451     3572     +121
- Misses        381      531     +150

Impacted Files
Coverage Δ

slack_bolt/app/app.py
83.42% <25.00%> (-1.37%)
:arrow_down:

slack_bolt/app/async_app.py
93.47% <33.33%> (-1.92%)
:arrow_down:

slack_bolt/workflows/step/async_step_middleware.py
36.66% <36.66%> (ø)

slack_bolt/workflows/step/step_middleware.py
36.66% <36.66%> (ø)

slack_bolt/workflows/step/async_step.py
41.26% <41.26%> (ø)

slack_bolt/workflows/step/step.py
41.26% <41.26%> (ø)

...ck_bolt/workflows/step/utilities/async_complete.py
57.14% <57.14%> (ø)

slack_bolt/workflows/step/utilities/async_fail.py
57.14% <57.14%> (ø)

...lack_bolt/workflows/step/utilities/async_update.py
57.14% <57.14%> (ø)

slack_bolt/workflows/step/utilities/complete.py
57.14% <57.14%> (ø)

... and 18 more

Continue to review full report at Codecov.

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


rds: remove unused  masterpassword field from spec

Description of your changes
Remove unused  masterpassword field from spec. It's not used anywhere but somehow exists.

Checklist

I have:

[x] Run make reviewable to ensure this PR is ready for review.
[x] Ensured this PR contains a neat, self documenting set of commits.
[x] Updated any relevant documentation, examples, or release notes.
[x] Updated the dependencies in app.yaml to include any new role permissions.

it might be worth considering if we should allow the ability to create a k8s secret and reference it for the password

@muvaf and I discussed a similar pattern for CloudSQL in https://github.com/crossplaneio/stack-gcp/pull/46. @muvaf did you end up raising an issue to track that we might want this functionality? I agree this is probably something like what we want to do, but there is some interesting interplay between reading credentials from a secret and writing them back to another secret (the connection secret) that we might need to work through.

I'm thinking perhaps we should hold this for 0.3.0, given it's technically an API change. I could be convinced to include it in 0.2.1 considering it's non-breaking AFAIK (the field will be ignored if submitted now, which will be the same behaviour after).

@negz this issue was raised for that specific case https://github.com/crossplaneio/stack-gcp/issues/54
I think getting a secret as input is a feature that should be implemented per managed resource since the transfer of the values from secret to the SDK api call would happen in the ExternalClient implementation. I'm planning to submit some updates to https://github.com/crossplaneio/crossplane/blob/master/design/one-pager-managed-resource-api-design.md and this is one of the things I'll mention.

I'm thinking perhaps we should hold this for 0.3.0, given it's technically an API change

I am not sure whether it really is an API change from the user's perspective.
Before: User supplies a value and it doesn't work
After: User supplies a value and it disappears, effect on the resource is same.
So, neither their pipeline nor the state of the created object will be affected.


FR: clicking on a test with a snapshot should open the snapshot for viewing

This is a feature request.
I have started doing unit tests for Vue components and I find that I am opening up the snapshot to see the underlying html that I need to run tests against. This makes it much easier to write the unit tests and to know where to put the "data-test" attributes so that I can use them in my tests.
It would be great if Majestic could recognize that a unit test file has an associated snapshot file and provide a way to show me the snapshot related to a particular test.
It isn't as useful to just display the snapshot file because it could be huge and there could be many snapshots in the file. But each snapshot is prefixed with the unit test that created it. So it would be nice if each unit test that had a snapshot had a little "snapshot" icon beside it's name that was a link to an action that would popup a dialog with the contents of the snapshot.

I used to use WallabyJS quite a bit, one of the really good features that had was an option to open a snapshot in a side-by-side diff (which makes for much easier comparison) and then update the snapshot from the dialog if the new is correct.

@IPWright83 Yes, that would be a great feature!

@IPWright83 actually, I am pretty sure it starts flat. When I double checked 2 days ago, I didn't realize that I had overwritten the version I was checking with the unmodified version. I am having trouble building right now, but I will double check that it starts collapsed. The original reason I wanted collapsing in the first place is because i have lots of tests in each file and the list was too long for the screen. I wanted it to start collapsed and only spring up to show errors if there are errors. I am pretty sure I was happy with this type of work flow when I did the PR.
My branch also has a fix for #184. When there is a failed test, clicking on the failed test opens that file in VSCode to the failure. I hadn't submitted that change as a PR because the first PR wasn't accepted and the second PR was built on the first.

@IPWright83 just in case you are still interested in this, I updated my fork to the latest version from the master fork and then continued enhancing it. It turned out that the tests did default to open, but now on my fork they default to closed. If the maintainer takes the collapse code, then I can create PRs for all the other enhancements that I have done. I think at this point it is pretty close to where I want it. There might be a few more things I will do eventually like a collapse/expand all for the project tree and for the test list.

@gregveres honestly I got a little confused by the expand/collapse discussion with relation to snapshots!


Supporting comma separated values in environment variables on command-line

Based on the conversation in #308 , this PR adds the ability to pass multiple comma separated env variables for a single env flag. This is done by replacing StringSlice with StringArray.
Please let me know if I need to do something else to get this PR merged into master.
Thanks!

I tested the changes, it works for me:

Using StringSlice:

$ kubeless function deploy hello --env foo=bar,hap ...
$ kubectl exec -it hello-1730543884-tw4nj env | grep foo
foo=bar
$ kubectl exec -it hello-1730543884-tw4nj env | grep hap
hap=

Using StringArray:

$ kubeless function deploy hello --env foo=bar,hap ...
$ kubectl exec -it hello-3941471439-m0ht6 env | grep foo
foo=bar,hap

Maybe we should do the same for the labels option, what do you think @sebgoa?

@andresmgot I thought the same thing but I wasn't sure what the expected interaction with labels was. If you guys agree its needed, I can add that change to this PR as well.

As far as I can see there are no reasons to use StringSlice since it make impossible to use commas in labels or env vars. Could you update the PR with that?

Added labels change to the PR as well

Sorry, checking the Travis result, there is a test that enforces the opposite:
# time="2017-09-27T14:07:23Z" level=fatal msg="Function.k8s.io \"get-python-metadata\" is invalid: metadata.labels: Invalid value: \"bar,bar=foo,foobar\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')"

So, to avoid breaking changes please revert c0b3ec3. I will merge this PR afterwards.
Thanks for checking!

The tests pass now. @andresmgot  please let me know if theres anything else I need to do to get the PR merged. Thanks!

Thanks @arjunrao87 for the PR. Can you also add a unit test for this ?

@ngtuna Added tests for deploy.go and update.go. Please let me know if any changes are required.

@arjunrao87 so we want to test that commas in environment values work, so this doesn't break again in the future.  We should a) add a case to function_test.go to make sure parseEnv does the right thing (easy, just put back the thing you had earlier), but the other important half is b) whether the command line parsing does the right thing.
You can test the command line parsing directly with (eg)
updateCmd.SetArgs([]string{"update", "foo", "--env", "foo:bar,hap", "--env", "x:y"})

then check for updateCmd.Flags().GetStringArrayP("env") with the expected value(s).  Similar for deploy.
This feels a bit too implementation specific and fragile to me, and better (imo) would be an integration test that actually invoked kubeless cli and looked for the expected environment values - but that's a much larger change so I'm not suggesting doing that as part of this PR unless you're feeling particularly eager.

this lgtm, is there anything still "WIP" about this?

There shouldnt be anything WIP anymore. Updated the issue title. I have updated the tests based on what we discussed. Please let me know if there is something else that needs to be done to get the PR merged. I wont be able to to add the integration test at the moment but I can open an issue for it to take a look at it in the near future if that works.


add ospath and pathutil

...am I doing this right? i assume we want to mirror the directory structure of ...windmilleng/windmill as closely as possible? or should i put e.g. data/pathutil in with os/ospath (either in the ospath package or its own package nested there), since no other code uses it right now?

let's talk about this Matcher library for a sec
the design goals of live integration's pathutil/Matcher were more about having a path algebra that integrated well with the Operational algebra we needed for live integration. e.g., you could do things like WriteFileOp + DirOp + PreserveOp(pattern), and do clever things with rearranging the ops.
if i was going to start a brand new project, I would make very different design trade-offs. I might place a lot of value in a library that has widespread adoption. Or a library that tried to mimic the syntax of .gitignore or .dockerignore as closely as possible. there is no shortage of interesting matcher libraries.
so...which of those are you trying to accomplish here?

i really just want the Child func, cuz i get a buncha abs filepaths in and need to tell which files belong to which Mount.LocalDir so i can match them to Mount.ContainerPath

talked to nick, just gonna port the one func i need.