About environment.yml

Thanks for your released codes. In the "Setup conda env:" part, where is the file of environment.yml. Thank you very much!

Sorry for missing this. The environment.yml is uploaded.


Customized Nginx Conf hasn't applied

Hello,
I'm using Devilbox on Linux: Latest release, latest docker and latest docker-compose version.
I am using PHP 7.1, Nginx-Stable versions.
I've created .devilbox inside my project folder and put nginx.yml
And I put fastcgi_read_timeout 300; parameter.
But I get timeout while working on a PHP project.
So I've go inside the docker shell and check httpd settings.
I've checked /etc/httpd/vhost.d/myproject.conf file and the fastcgi_read_timeout settings it nowhere.
So maybe I'm doing something wrong or maybe there is a bug.
What do you think?

@alivelimeli could you read through this issue here: https://github.com/cytopia/devilbox/issues/144
Maybe you have missed something.

I've used the documentation as a reference: https://github.com/cytopia/devilbox/blob/master/docs/Configure.md#433-customize-the-vhost-configuration

Copy all available templates from vhost-gen templates directory to a a sub directory in your projects dir (By default .devilbox/) and adjust those template files to your needs.

I've just copied nginx.yml to my project folder ./devilbox/data/www/myproject/.devilbox
And I've expected to see the changes after devilbox restart, but it didn't worked.
So from issue #144 my understanding is; at the moment I cannot customize vhost configuration for specific project right?

Sorry, wrong ticket number, I actually meant: https://github.com/cytopia/devilbox/issues/142

Yes, I already check #142 also. I've applied same steps, but it didn't worked on my side.
1- Created a new project folder /devilbox/data/www/myproject
2- Created a new htdocs folder /devilbox/data/www/myproject/htdocs
3- Downloaded nginx.yml and copied into /devilbox/data/www/myproject/.devilbox folder.
4- Added required nginx related configurations to yml file (fastcgi_read_timeout 300;)
5- Restarted devilbox.
6- Still having timeout issues (in 60 seconds i guess, probably a default timeout value)
After I've tried these steps and it didn't worked, I've fixed my issue by going into nginx shell and changing /etc/httpd/vhost.d/myproject.conf by hand and reloading nginx (which solved timeout problem, because new configuration is worked). But it shouln't be done inside the shell, you've already developed that feature. But somehow it didn't worked.
Which part is wrong on these steps? Or are there any missing steps?

Looks all good to me so far.

4- Added required nginx related configurations to yml file (fastcgi_read_timeout 300;)

Can you paste your yml file.
Also, whatever you added to the yml file. Did that show up inside your myproject.conf after devilbox restart?

My yml file:
`---
Nginx vHost Template defintion for vhost-gen.py

The 'feature' section contains optional features that can be enabled via
conf.yml and will then be replaced into the main vhost ('structure' section)
into their corresponding position:

XDOMAIN_REQ
PHP_FPM
ALIASES
DENIES
STATUS

The features itself also contain variables to be adjusted in conf.yml
and will then be replaced in their corresponding feature section
before being replaced into the vhost section (if enabled):

PHP-FPM:
PHP_ADDR
PHP_PORT
XDomain:
REGEX
Alias:
REGEX
PATH
Deny:
REGEX
Status:
REGEX

Variables to be replaced directly in the vhost configuration can also be set
in conf.yml and include:
VHOST_NAME
DOCUMENT_ROOT
INDEX
ACCESS_LOG
ERROR_LOG
PHP_ADDR
PHP_PORT

Basic vHost skeleton

vhost: |
server {
proxy_read_timeout 300;
fastcgi_read_timeout 300;
listen       PORT____DEFAULT_VHOST;
server_name  VHOST_NAME;
  access_log   "__ACCESS_LOG__" combined;
  error_log    "__ERROR_LOG__" warn;

VHOST_DOCROOT
VHOST_RPROXY
PHP_FPM
ALIASES
DENIES
SERVER_STATUS
# Custom directives
CUSTOM
}

vHost Type (normal or reverse proxy)

vhost_type:
Normal vHost (-p)
docroot: |
# Define the vhost to serve files
root         "DOCUMENT_ROOT";
index        INDEX;
Reverse Proxy (-r)
rproxy: |
# Define the vhost to reverse proxy
location LOCATION {
proxy_read_timeout 300;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass PROXY_PROTO://PROXY_ADDR:PROXY_PORT;
}

Optional features to be enabled in vHost

features:
PHP-FPM will not be applied to a reverse proxy!
php_fpm: |
# PHP-FPM Definition
location / {
proxy_read_timeout 300;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ .php?$ {
try_files $uri = 404;
include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_split_path_info ^(.+\.php)(.*)$;

    fastcgi_pass __PHP_ADDR__:__PHP_PORT__;

    fastcgi_index index.php;
    fastcgi_intercept_errors on;

proxy_read_timeout 300;
fastcgi_read_timeout 300;
}

alias: |
# Alias Definition
location ~ ALIAS {
proxy_read_timeout 300;
fastcgi_read_timeout 300;
root  PATH;
XDOMAIN_REQ
}
deny: |
# Deny Definition
location ~ REGEX {
deny all;
}
server_status: |
# Status Page
location ~ REGEX {
stub_status on;
access_log off;
}
xdomain_request: |
# Allow cross domain request from these hosts
if ( $http_origin ~* (REGEX) ) {
add_header "Access-Control-Allow-Origin" "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Max-Age' 0;
return 200;
}`
No, those settings are not shoed on myproject.conf. Thats why I tried to solve it by modifying inside shell .

Could you please also paste the final generated vhost config for myproject.conf

Sure. Here it is:
# cat /etc/httpd/vhost.d/myproject.conf
server {
    listen       80;
    server_name  myproject.loc;

    access_log   "/var/log/nginx-stable/myproject-access.log" combined;
    error_log    "/var/log/nginx-stable/myproject-error.log" warn;

    # Define the vhost to serve files
    root         "/shared/httpd/myproject/htdocs";
    index        index.php;

    # PHP-FPM Definition
    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }
    location ~ \.php?$ {
        try_files $uri = 404;
        include fastcgi_params;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_split_path_info ^(.+\.php)(.*)$;

        fastcgi_pass php:9000;

        fastcgi_index index.php;
        fastcgi_intercept_errors on;
    }

    # Alias Definition
    location ~ /devilbox-api/ {
        root  /var/www/default/api;
        # Allow cross domain request from these hosts
        if ( $http_origin ~* (http(s)?://(.*)$) ) {
            add_header "Access-Control-Allow-Origin" "$http_origin";
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
            add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
            add_header 'Access-Control-Max-Age' 0;
            return 200;
        }
    }

    # Deny Definition
    location ~ /\.git {
        deny all;
    }

    # Deny Definition
    location ~ /\.ht.* {
        deny all;
    }

    # Custom directives

}

What is the value of HTTPD_TEMPLATE_DIR in your .env file?

And can you do an ls -laR inside your myproject directory.

Everything looks normal but inside httpd container standart nginx.conf is created:
# cat /etc/httpd/vhost.d/myproject.conf
server {
    listen       80;
    server_name  myproject.loc;

    access_log   "/var/log/nginx-stable/myproject-access.log" combined;
    error_log    "/var/log/nginx-stable/myproject-error.log" warn;

    # Define the vhost to serve files
    root         "/shared/httpd/myproject/htdocs";
    index        index.php;

    # PHP-FPM Definition
    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }
    location ~ \.php?$ {
        try_files $uri = 404;
        include fastcgi_params;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_split_path_info ^(.+\.php)(.*)$;

        fastcgi_pass php:9000;

        fastcgi_index index.php;
        fastcgi_intercept_errors on;
    }

    # Alias Definition
    location ~ /devilbox-api/ {
        root  /var/www/default/api;
        # Allow cross domain request from these hosts
        if ( $http_origin ~* (http(s)?://(.*)$) ) {
            add_header "Access-Control-Allow-Origin" "$http_origin";
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
            add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
            add_header 'Access-Control-Max-Age' 0;
            return 200;
        }
    }

    # Deny Definition
    location ~ /\.git {
        deny all;
    }

    # Deny Definition
    location ~ /\.ht.* {
        deny all;
    }

    # Custom directives

}

Docker version:
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:06 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:06 2017
 OS/Arch:      linux/amd64
 Experimental: false

docker-compose version:
docker-compose version 1.17.1, build 6d101fb

@alivelimeli could you set DEBUG_COMPOSE_ENTRYPOINT to 1 in .env.
As well as setting the DEBUG_ENTRYPOINT in docker-compose.yml to 2 only for the httpd section.
Then start up the devilbox, wait for httpd to add your vhost and please post the docker logs for httpd

Apart from that you meet all the requirements which are at least:
Docker Engine 1.12.0+
Docker Compose 1.9.0+

Here are the logs:
WARNING: The MONGO_SERVER variable is not set. Defaulting to a blank string.
WARNING: The MEMCD_SERVER variable is not set. Defaulting to a blank string.
WARNING: The REDIS_SERVER variable is not set. Defaulting to a blank string.
WARNING: The PGSQL_SERVER variable is not set. Defaulting to a blank string.
devilbox_bind_1 is up-to-date
Starting devilbox_php_1 ...
Starting devilbox_php_1 ... done
Starting devilbox_httpd_1 ...
Starting devilbox_httpd_1 ... done
Attaching to devilbox_httpd_1
httpd_1  | [INFO] $DOCKER_LOGS not set. Logging errors and access to log files inside container.
httpd_1  | [INFO] Setting docker timezone to: Europe/Berlin
httpd_1  | root $ ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
httpd_1  | [INFO] Docker date set to: Thu Nov 16 14:28:06 CET 2017
httpd_1  | [INFO] Changing user 'nginx' uid to: 1000
httpd_1  | root $ usermod -u 1000 nginx
httpd_1  | usermod: no changes
httpd_1  | [INFO] Changing group 'nginx' gid to: 1000
httpd_1  | root $ groupmod -g 1000 nginx
httpd_1  | [INFO] $MAIN_VHOST_DISABLE set to 0. Not disabling the default vhost.
httpd_1  | [INFO] $MAIN_VHOST_DOCROOT not specified. Keeping default: htdocs
httpd_1  | [INFO] $MAIN_VHOST_TPL not specified. Keeping default: cfg
httpd_1  | [INFO] $MAIN_VHOST_STATUS_ENABLE set to 1. Enabling httpd status.
httpd_1  | [INFO] Setting httpd status page to: '/devilbox-httpd-status'
httpd_1  | [INFO] $MASS_VHOST_ENABLE set to 1. Enabling mass vhosts.
httpd_1  | [INFO] $MASS_VHOST_TLD set to: .loc
httpd_1  | [INFO] $MASS_VHOST_DOCROOT is set to: htdocs
httpd_1  | [INFO] $MASS_VHOST_TPL is set to: cfg
httpd_1  | [INFO] $PHP_FPM_ENABLE set to 1. Enabling PHP-FPM.
httpd_1  | [INFO] $PHP_FPM_SERVER_ADDR is set to: php
httpd_1  | [INFO] $PHP_FPM_SERVER_PORT is set to: 9000
httpd_1  | root $ sed -i'' 's/__PHP_ENABLE__/yes/g' /etc/vhost-gen/conf.yml
httpd_1  | root $ sed -i'' 's/__PHP_ENABLE__/yes/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__PHP_ADDR__/php/g' /etc/vhost-gen/conf.yml
httpd_1  | root $ sed -i'' 's/__PHP_ADDR__/php/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__PHP_PORT__/9000/g' /etc/vhost-gen/conf.yml
httpd_1  | root $ sed -i'' 's/__PHP_PORT__/9000/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ERROR__/no/g' /etc/vhost-gen/conf.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ERROR__/no/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ACCESS__/no/g' /etc/vhost-gen/conf.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ACCESS__/no/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__ENABLE_STATUS__/yes/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's|__STATUS_ALIAS__|/devilbox-httpd-status|g' /etc/vhost-gen/main.yml
httpd_1  | root $ vhost_gen.py -n localhost -p /var/www/default/htdocs -c /etc/vhost-gen/main.yml -o /var/www/default/cfg -v -d -s
httpd_1  | vhostgen: [2017-11-16 14:28:06] Adding: localhost
httpd_1  | root $ sed -i'' 's/__DOCROOT_SUFFIX__/htdocs/g' /etc/vhost-gen/conf.yml
httpd_1  | root $ sed -i'' 's/__TLD__/.loc/g' /etc/vhost-gen/conf.yml
httpd_1  | root $ sed -i'' 's/__MASS_VHOST_TPL__/.devilbox/g' /etc/supervisord.conf
httpd_1  | root $ sed -i'' 's/__VERBOSE__/-v/g' /etc/supervisord.conf
httpd_1  | 2017-11-16 14:28:06,476 CRIT Set uid to user 0
httpd_1  | 2017-11-16 14:28:06,477 INFO supervisord started with pid 1
httpd_1  | 2017-11-16 14:28:07,479 INFO spawned: 'nginx' with pid 117
httpd_1  | 2017-11-16 14:28:07,480 INFO spawned: 'watcherd' with pid 118
httpd_1  | watcherd: [2017-11-16 14:28:07] Starting daemon.
httpd_1  | vhostgen: [2017-11-16 14:28:07] Adding: myproject.loc
httpd_1  | watcherd: [2017-11-16 14:28:07] [OK]  ADD: succeeded: /shared/httpd/myproject
httpd_1  | 2017/11/16 14:28:08 [notice] 155#155: signal process started
httpd_1  | watcherd: [2017-11-16 14:28:08] [OK]  TRIGGER succeeded: nginx -s reload
httpd_1  | watcherd: [2017-11-16 14:28:08] Using bash loop to watch for changes.
httpd_1  | 2017-11-16 14:28:09,309 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
httpd_1  | 2017-11-16 14:28:09,310 INFO success: watcherd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

I think its replacing required configuration on supervisord.conf on this line:
httpd_1  | root $ sed -i'' 's/__MASS_VHOST_TPL__/.devilbox/g' /etc/supervisord.conf
But its somehow not working. Any ideas?

I also tried to change folder name, logs created but it didn't worked again. (custom config is not applied)
httpd_1  | watcherd: [2017-11-16 15:10:40] [OK]  ADD: succeeded: /shared/httpd/myproject_
httpd_1  | watcherd: [2017-11-16 15:10:40] [OK]  DEL: succeeded: /shared/httpd/myproject
httpd_1  | 2017/11/16 15:10:40 [notice] 14033#14033: signal process started
httpd_1  | watcherd: [2017-11-16 15:10:40] [OK]  TRIGGER succeeded: nginx -s reload
httpd_1  | vhostgen: [2017-11-16 15:10:43] Adding: myproject.loc
httpd_1  | watcherd: [2017-11-16 15:10:43] [OK]  ADD: succeeded: /shared/httpd/myproject
httpd_1  | watcherd: [2017-11-16 15:10:43] [OK]  DEL: succeeded: /shared/httpd/myproject_
httpd_1  | 2017/11/16 15:10:43 [notice] 14066#14066: signal process started
httpd_1  | watcherd: [2017-11-16 15:10:43] [OK]  TRIGGER succeeded: nginx -s reload

I think its replacing required configuration on supervisord.conf on this line:
httpd_1 | root $ sed -i'' 's/MASS_VHOST_TPL/.devilbox/g' /etc/supervisord.conf
But its somehow not working. Any ideas?

Can you show the contents of /etc/supervisord.conf please

Sure, here it is:
# cat /etc/supervisord.conf
[supervisord]
user=root
nodaemon=true

[program:nginx]
command=/usr/sbin/nginx -g 'daemon off;'
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stdout_events_enabled=true
stderr_events_enabled=true

[program:watcherd]
command=watcherd -v -p /shared/httpd -a "vhost_gen.py -p %%p -n %%n -o %%p/.devilbox/ -s -v" -d "rm /etc/httpd/vhost.d/%%n.conf" -t "nginx -s reload"
#startsecs = 0
#autorestart = false
#startretries = 1
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stdout_events_enabled=true
stderr_events_enabled=true

Replacement of sed -i'' 's/__MASS_VHOST_TPL__/.devilbox/g' /etc/supervisord.conf is fine.
I will need to add some debug to vhost-gen.py itself for docker-logs.

What do you advice me to do now? Will it take some time?
I think this will also probably solve my problem but its a hacky solution for now: https://github.com/cytopia/devilbox/issues/144#issuecomment-343698418

One more thing. Could you give it a try with nginx-mainline instead of nginx-stable?

I've tried with nginx-mainline, still same. The configuration from nginx.yml file inside /myproject/.devilbox folder not applied.

I think this will also probably solve my problem but its a hacky solution for now: #144 (comment)

Yes, use it for now, until I have more debug into vhost-gen.py

I found the problem after I tried #144
It looks like nginx.yml doesn't like tab characters.
It gave this error:
httpd_1  | [ERR] Error loading template [ERR] Error loading templatewhile scanning for the next token
httpd_1  | found character '\t' that cannot start any token
httpd_1  |   in "/etc/vhost-gen/templates/nginx.yml", line 95, column 1

I've removed #144 changes and start over with /myproject/.devilbox/nginx.yml file. Replaced tab characters with spaces.
And voila! It worked.
So tab characters caused trouble. Was it documented and maybe I've missed that point? Or should it be added on the documentation?

In your above pasted docker logs I don't see any error message. So why didn't it work then?
And how did you trigger this error message?

So tab characters caused trouble. Was it documented and maybe I've missed that point? Or should it be added on the documentation?

Should be added to the documentation for sure.
Btw, could you put an Update section at your initial comment of this issue stating the problem and that it has been resolved.
I will also keep this issue open until it has been properly documented.
Good catch btw. :+1:

And how did you trigger this error message?

Well after I tried the instructions on  #144 it gave error while starting on docker logs. So I've checked the contents of nginx.yml file and found that to keep indentation I added custom lines with tab. So I've replaced tabs with spaces and tried again and it worked.
Later I revert my changes related to #144 and tried again with tab replacement and it worked.

Btw, could you put an Update section at your initial comment of this issue stating the problem and that it has been resolved.

I've updated initial comment.
Thanks.

The whole thing is going to be documented with new documentation setup: https://github.com/cytopia/devilbox/issues/157

Documented here: http://devilbox.readthedocs.io/en/documentation/tutorials/adding-subdomains.html


Using async validators with allErrors:true does not run in parallel

I'm using { allErrors: true} with an async schema with async keywords.
(Side note: the reason I'm using allErrors: true is because I actually want to validate individual fields at runtime -- like I click off of a field on the UI and it runs the validation -- but I won't be able to get a specific field's errors back unless I run allErrors: true... correct? Is there a better way to do that?)
I noticed that the async keywords run sequentially and wait for the result of the previous one to finish, leading to a performance issue if you have multiple async validators that are waiting on some external resource.
What version of Ajv are you using? Does the issue happen if you use the latest version?
4.4..0 (issue still occurs in beta version)
Ajv options object (see https://github.com/epoberezkin/ajv#options):
{ allErrors: true }

JSON Schema (please make it as small as possible to reproduce the issue):
{
  "$async": true,
  "title": "User Schema",
  "type": "object",
  "properties": {
    "firstName": {
      "description": "First Name",
      "type": "string",
      "nameBlacklist": true
    },
    "lastName": {
      "description": "Last Name",
      "type": "string",
      "nameBlacklist": true
    }
  }
}

Data (please make it as small as posssible to reproduce the issue):
{
  "firstName": "Paul",
  "lastName": "Paul"
}

Your code (please use options, schema and data as variables):
https://runkit.com/58d3cd89ae69180014e71b26/58d3cd89ae69180014e71b27
What results did you expect?
Expected time to take ~1000ms (running async keywords in parallel).
Actual time is ~2000ms (indicating sequential execution of keywords)
Are you going to resolve the issue?
If it is determined to be valid, then yes I can.

@pselden thank you for highlighting the problem. I don't think there is any viable way to resolve it on Ajv level. All Ajv does is adding yields (or awaits) in front of async keyword calls so the code stays "synchronous" in structure. Doing anything more advanced is definitely out of scope - it would dramatically increase the complexity and given the relatively small share of users who use async validation it is not justified.
What you can do on your end is to define the keyword differently - rather than using it in each property to have it appear once on the top level with the list of properties. This way you can control how you do validation in your own code. It's the same syntax that required keyword uses:
{
  "$async": true,
  "title": "User Schema",
  "type": "object",
  "nameBlacklist": ["firstName", "lastName"],
  "properties": {
    "firstName": {
      "description": "First Name",
      "type": "string",
    },
    "lastName": {
      "description": "Last Name",
      "type": "string"
    }
  }
}

Thanks for the speedy response! That example was just a trivial distillation of what we were going to attempt to do with it, so unfortunately changing the keywords won't work because we'll have multiple of them.
I'm working on a wrapper around a json schema validator that would be able to run on both front end and backend -- with the ability to specify server-side-only keywords for when we need to hit the DB. This requirement would essentially force all validation to need to be async.
I think maybe what I could do to lessen the impact is to make it pass allErrors: false when running on the server.

The only difference without allErrors: true (false is the default) is that it fails sooner, successful validation will take the same time, so yes it won't be faster.
The problem is essentially taking a "synchronous looking" code with yield (or await) and converting it into a code where all yields are resolved in parallel. This is not a trivial task. If you know how to do this transformation of the code - they you can supply Ajv with a different transpiler and it will do what you need.
Refactoring the schema can be not as simple as in the sample example, but I think it should be possible. For example, you can have custom keywords that register necessary processing (and the registration itself is synchronous) and have another keyword that is only used on top level that executes all async operations in one go (or it can even be outside of schema) so that all your async operations are batched.
Another option is to use promises as a part of the data you validate and do merging of these promises (that's the approach I used in JSONScript).
So I am sure there are a couple solutions that would give you parallel async operations with some simple changes in how you define and use keywords.

I'm running into this issue now, and am looking into replacing where validateArray uses a gen.forRange, and instead of:
const len0 = data.length;
for (let i0 = 0; i0 < len0; i0++) { ... }

trying to generate:
await Promise.all(data.map(async (_, i0) => { ... } )

Can you see any issues with this approach?

how I've ended up solving it is splitting into two phases with a couple of tricks to get it working:
Phase 1 is completely synchronous - I change the schema such that:
{
  type: 'object',
  keyword: true,
  properties: { ... }
}

becomes:
{
  anyOf: [
    { type: 'object', keyword: true },
    { type: 'object', properties: { ... } },
  ]
}

And then inside the validate function for keyword, I return true if the function will result in some asynchronous work, while updating the value to be the promise. If the workload was not asynchronous, i return false so that the next entry in the anyOf array is run
Phase 2 is the asynchronous piece, where all the promises created in Phase 1 are awaited. The new schema used is (notice allOf this time instead of anyOf)
{
  $async: true,
  allOf: [
    { type: 'object', keyword: true },
    { type: 'object', properties: { ... } },
  ]
}

In the validate function for keyword, I check if the incoming value is a promise, and if it is then I await it, then use the resolved value to update the parent property. Seems to be working quite well, despite the mental gymnastics required to build it.


Sharing: Via email not working?

This may be just me - will make a shout out in slack. I tried with two email addresses in french and english interfaces. It was working last week when I tested it so I feel like its on my side

Tested it out throughout the week and haven't run into any issues - closing as the error doesn't persist :)


Question: API Docs for communication?

Hi, I'm looking into integrating Jade into a wallet I'm working on.
Is there any documentation out there on how to communicate with Jade via USB/BLE/QR? I'm having a hard time reverse-engineering how the protocol is supposed to work just by looking at the firmware code or the Green wallet source.
Since Jade is integrated with a ton of wallets already, is there any guideline or documentation on how to go about that?

Most wallets use HWI to communicate with Jade
Here is an example of us using webserial to talk to Jade
https://github.com/Blockstream/webjadeupgrader
doc for the messages:
https://github.com/Blockstream/Jade/blob/master/docs/index.rst
For QR we just use the bc-ur


Set up Forest to be able run a devnet with the storage miner

Before writing docs, fork Lotus & generate v3 genesis files that can be used to start up a devnet.

Acceptance Criteria

[ ] Update devnet flag to change block times to 4s
[ ] Documentation on Notion that anyone can follow the documentation to set up Forest with the Lotus Storage Miner

@ec2 checking in on this since it's been in review for a week or so.


Add one more Join function to StringUtil and code refactoring

I have found a lot of repetative operations with strings in code base and decided to extract this code into one more Join function in StringUtil.

Thank you very much! Merged it just now.


fix(create-robo/templates): remove typeRoots property to prevent interference with default ts behavior

Closes #341
Summary
This pr removes the typeRoots property from all typescript projects created from robo.
Changes

Removed code related to inserting/updating typeRoots
Removed code related to inserting/updating compilerOptions (since this was only being used for the above? ^)
Manually removed all typeRoots property from tsconfig.json files in create-robo, activities and bot templates.

CLA Assistant Lite bot: Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the CLA Document and I hereby sign the CLA

You can retrigger this bot by commenting recheck in this Pull Request

I have read the CLA Document and I hereby sign the CLA

Hello ! looks good to me, thanks a lot


Linter doesn't catch broken relative links.

https://github.com/gravitational/teleport/pull/21161 Introduced broken links relative to the partial location, but not the location the partials were used in. The linter did not catch this, and allowed broken links into production.

Okay, so it looks like running this command in a gravitational/docs clone after running yarn git-update causes linter errors to appear again:
$ find content -name "package.json" -delete

It looks like the remark CLI is getting confused by one of the package.json files in each content directory, though I'm not sure why yet or how to overcome this.

This command seems to work, I guess because it stops remark from searching package.json files for its config: npx remark --rc-path .remarkrc.mjs <files>


Bump angular-ui-bootstrap dependency

https://github.com/rpocklin/ui-router-tabs/blob/master/bower.json#L25 specifies ^0.11.2
https://github.com/angular-ui/bootstrap/releases 0.12.1 is the last version

Sure, I can bump it - is there tab functionality (or bugfixes) that has changed though?  We can't assume everyone is using 0.12.1.

Considering the diff I don't think there are any issues
I'm using this plugin with 0.12.1 (forced bower resolution) and it works well.

Landed with 6b2bb76a8390ed7a30f873a0700ec3b899df9c3c - v1.4.1.


Update to 1.21 Please

Done: https://modrinth.com/mod/better-nether-map/version/4.0.0-1.21.1

Thank you! 😄

@Jummit Please update metadata such that the required Minecraft version is >= 1.21 instead of strictly 1.21.1. 1.21 is compatible in my testing.

@Jummit Please update metadata such that the required Minecraft version is >= 1.21 instead of strictly 1.21.1. 1.21 is compatible in my testing.

Done.


Hello Rails React: Ready to Be Released

Objectives met:

Set up Rails.
Set up and pass Linters.
Set up the project with webpacker and the react-rails gem.
Set up a PostgreSQL database.
Created the greetings table with 6 initial greetings.
Created an API endpoint to connect the app to the front end.
Set up the React app.
Set up Redux
Fetched the random greeting from the API and displayed it in a React component.

Note that the initial 6 greeting messages were created using the seed.rb file. If the app is not displaying the messages correctly, please have the kindness to run rails db:seed before continuing.

Hi @descholar-ceo 🙌
Thank you for reviewing my work! I will proceed to merge these changes into the main branch. 🚀
Cheers and Happy coding to you too! 💻


Added Inplace rotation of matrix by 90 degree

Have you read the Contributing Guidelines on Pull Requests?
Yes
Description
Inplace rotation of matrix by 90 degree
Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[ ] I've edited the README.md and link to my code.

Related Issues or Pull Requests
#5966

@ankitaggarwal23 Sir plz review this pr me and let me know if further changes are required.


compatibility_profiles inside of PSScriptAnalyzer eating 324 MiB of space

After a recent PSScriptAnalyzer upgrade, we now have an embedded directory compatibility_profiles that weighs 324 MiB.
We should figure out how to strip them, and what's their use exactly.

See also https://github.com/PowerShell/PSScriptAnalyzer/issues/1148
For now, I'm going to just strip these files from our distribution. The analyzer seems to work well without them.


Feat/window focus polling

In light of https://github.com/synapsecns/sanguine/pull/1248#issuecomment-1716802658 Track if User has app browser focused, and if not focused, prevent polling/fetching of scribe queries.
Should reduce explorer load
bc5420731aedbd401be7510c3ad3cf82b4438070: synapse-interface preview link
795c741fb87bf3c0892df2d1dbf92a7477d3df89: synapse-interface preview link
57fd0c62959a211b26cc217bf70efdcd3012e7ca: synapse-interface preview link
a6d9192d010863673a03b4dcde16c44413dcaeb6: synapse-interface preview link

Is there any blockers from merging this? @trajan0x

Closing - merged branch in https://github.com/synapsecns/sanguine/pull/1406


? character being replaced with $1 after upgrading 4.0.7 --> 4.1.0

Describe the bug
I recently upgraded from 4.0.7 to 4.1 and noticed some strange behavior when persisting values that contain a ? character.  For some reason once the data is written to the database I'm seeing the ? replaced with $1.
Stack trace
On 4.0.7 when I save a string containing a ? I see the following query generated:
update "team" set "profilephotourl" = 'https://SOME_URL/profile.png?t=1602648800506' where "id" = '123'

And in the database it shows up as expected:
https://SOME_URL/profile.png?t=1602648800506

And on 4.1, I see the following query:
update "team" set "profilephotourl" = 'https://SOME_URL/profile.png?t=1602631580559' where "id" = '123'

But in the database I see:
https://SOME_URL/profile.png$1t=1602631580559

Where the ? appears to have been replaced with a $1
To Reproduce
Nothing has changed with the code other than to move from 4.0.7 --> 4.1 and the code itself in this case is super simple:
const team = await em.findOneOrFail(Team, {id: teamId})
team.profilePhotoUrl = url
await em.flush()

Where url contains the URL examples from above.
Versions

Dependency
Version

node
v14.5.0

typescript
3.8.3

mikro-orm
4.0.7 & 4.1

your-driver
postgresql

fixed in 4.1.1


Telescope theme is broken due to missing correct color reference

TelescopePromptNormal = { fg = milk, bg = c.medium_gray },
TelescopePromptTitle = { fg = milk, bg = c.soft_yellow },

Should reference c.milk.

Fixed it locally. Wow that looks simply awesome.

One thing I find a bit hard to read is the left hand side yellow background with white text. Maybe dark text on such a light background could be better contrast and thus better to read

One thing I find a bit hard to read is the left hand side header which is yellow background with white text. Maybe dark text on such a light background could be better contrast and thus better to read

You're totally right, foreground color should be dark, I didn't notice it because of the milk variable error 😉


Stop exposing internal methods on serialization

Invoking internal methods from the UI led to exceptions. So, they won't be provided to the API anymore.

I'm not sure if this is the right solutions as the behaviour hasn't changed lately and never caused issues. But if it is the right solution @Toxantron should we also fix this in the last major?

Discussion with Christian and Marisa lead to the conclusion: We fix the bug here to not reproduce filters that we would need for other serializations as well. (Assuming this bug was circumvented in all prior major versions by just using public methods we do not backport the change)

Explizitly removing it here instead of fixing the invocation seems wrong. I am not sure if it is used somewhere, but exposing internal means that developers can have "Debug" functions with internal objects. If the method has to be public, so does every of its arguments.

@seveneleven this can be closed right?

Has been solved with https://github.com/PHOENIXCONTACT/MORYX-Framework/pull/254


Update odo deploy proposal to use go's text/template format for template variables

Signed-off-by: Steven Groeger<EMAIL_ADDRESS>What type of PR is this?
/kind design
[skip ci]
What does does this PR do / why we need it:
PR updates the design proposal for odo deploy to utilise go's text/template format for template variables using within the deployment manifest. This will change the format to {{.PORT}} from just having PORT.
Which issue(s) this PR fixes:
Fixes #?
PR acceptance criteria:

[ ] Unit test

[ ] Integration test

[ ] Documentation

How to test changes / Special notes to the reviewer:

/ok-to-test

/approve
/lgtm

/override ci/prow/v4.4-integration-e2e


global-state resolve data

Hi. I need to load user-data from api before app-run, but loading by $resource is async. My views is generating from that user-data (show login-form/authenticated etc..). I check auth in $stateChangeStart, but it calls before my data is coming. How i can avoid this?
I need something like global-state resolve function, which triggers on first/every ui-state call before $stateChangeStart. Thanks

closing due to inactivity. if you still need help with this, try first on stackoverflow since its more of a implementation question.


ModuleNotFoundError: No module named 'tensorflow.python.util'

import tensorflow as tf
2020-07-14 21:15:42.824490: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-07-14 21:15:42.827687: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\廖宇杰\AppData\Roaming\Python\Python37\site-packages\tensorflow_init_.py", line 41, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\廖宇杰\AppData\Roaming\Python\Python37\site-packages\tensorflow\python_init.py", line 64, in
from tensorflow.python.framework.framework_lib import *  # pylint: disable=redefined-builtin
File "C:\Users\廖宇杰\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\framework_lib.py", line 24, in
from tensorflow.python.framework.device import DeviceSpec
File "C:\Users\廖宇杰\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\device.py", line 24, in
from tensorflow.python.framework import device_spec
File "C:\Users\廖宇杰\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\device_spec.py", line 21, in
from tensorflow.python.util.tf_export import tf_export
ModuleNotFoundError: No module named 'tensorflow.python.util'

@1340896123 I think pip is installing it for python 2 and then you are running in python 3. Use pip3 while installing tensorflow.
Also, if the above solution doesn't work, Please go through these solutions


Ac subsetbam

Added downsampling function for both paired end and single end. Andreas checked function before christmas and suggested that because of the way dictionaries are called in python 3 the testing for this cannot be performed on py3 because the dictionary order is random. Therefore, testing is only performed for downsampling in python 2. This is a short term workaround until we can think of a way to test properly in py3.

Thanks. Possible solution is to set PYTHONHASHSEED environment variable. Issue, if I recall, is setting the numpy random seed?

Hi @AndreasHeger or @sebastian-luna-valero , I think this may solve the problem for py3 tests. However I can't test it because since the way we call scripts now is chat bam2bam, and not python bam2bam.py, I can not pass the -R option to python. Is there a pay of passing this option to an EASY-INSTALL-ENTRY-SCRIPT?

Thanks @Acribbs
I have pushed minor amendments.
Before going deeper into solving your problem, have you had a look at this:
http://stackoverflow.com/questions/18955554/get-random-keyvalue-pairs-from-dictionary-in-python
It looks like Python's random.sample() function can do what you need:
https://docs.python.org/2/library/random.html#random.sample
https://docs.python.org/3/library/random.html#random.sample
Would you be happy to give it a go or do you want me to try?

Have implemented suggestions by @sebastian-luna-valero and the tests are now passing. Thanks for help.


resetBrowser

Summary
Add jestPuppeteer.resetBrowser() function to reset the global.browser object according to the configuration.

global.browser is is setup based on the configuration.
this.global.browser = await puppeteer.connect({
  ...config.connect,
  ...config.launch,
  browserURL: undefined,
  browserWSEndpoint: wsEndpoint,
})

This will allow the browser to be reset by the user and ensure the global.browser object will be the same after this call as the when it was first setup.
Users can reset the global.browser object before each test by calling jestPuppeteer.resetBrowser() in a beforeEach function easily.
beforeEach(async () => {
  await jestPuppeteer.resetBrowser()
})

fixes https://github.com/smooth-code/jest-puppeteer/pull/183#issuecomment-490210920
Test plan

describe('resetBrowser', () => {
  test('should reset browser', async () => {
    const oldBrowser = browser
    await jestPuppeteer.resetBrowser()
    expect(browser).not.toBe(oldBrowser)
    // eslint-disable-next-line no-underscore-dangle
    expect(browser._connection._closed).toBe(false)
    // eslint-disable-next-line no-underscore-dangle
    expect(oldBrowser._connection._closed).toBe(true)
  })
})

I'm not sure how to get the browser.closed state without using browser._connection._closed in the tests. It would be better if there was a browser.isClosed() function like on page but I don't think there is anything like that.

hi @UziTech
thanks for your great work! I will take a look before this Sunday.

https://github.com/GoogleChrome/puppeteer/pull/4403 did get merged so there will be a browser.isConnected() function in the next release of puppeteer.
Should we wait to merge this until that is released? Or we could just change the test later.

Hmm maybe we should wait for the new release?

That code is just in the test so we would just need to update puppeteer in devDependencies.
That code isn't crucial so I don't think it matters too much if we don't use .isConnected()

@UziTech if it is only in test, then it is OK for me, do you know when will it be released?

I updated puppeteer in devdependencies and use the new .isConnected() function in the test.

It looks good, @xiaoyuhen are you OK with it?

@xiaoyuhen @neoziro any progress on this?

@xiaoyuhen seems to be absent. I will try to take time to test it next week.

I fixed the spelling and rebased to fix the conflict.


Pass key-value properties into events in slf4j-reload4j.

I'm aiming to migrate an existing codebase off Log4j as a logging framework. Logging is through SLF4J, but there's also extensive direct use of Log4j's org.apache.log4j.MDC to pass values (other than Strings) through to a Layout that produces structured logging output.
An incremental migration would be significantly easier if I were able to adopt SLF4J's new fluent API without having to simultaneously change the backend logging framework.
This PR makes exactly that change: the key-value properties from the fluent API are merged into the snapshot of the MDC, leaving the existing logging backend with exactly the same data, while the logging calls lose their direct dependency on Log4j.
It's not clear to me whether this approach was considered and rejected, because it conflates the two different types of property, or whether it's suitable as a general purpose change.

This approach has worked well: I've incrementally migrated the codebase away from direct use of Log4j 1.x to pure SLF4J 2.x, without losing any existing structured logging, or needing any whole-codebase changes. It's now possible to move to another logging framework without changing the application code that's producing logs.
This is currently implemented with a fork of slf4j-reload4j, which could be dropped if this were applied, but that can go away as soon as the logging framework changes to something currently supported.


Fix Issue #120: Fix parallel for  (DTD)

Fix Issue #120: Fix parallel for  (DTD)
+
Replace parallel string values by a Java5 enum

LGTM after one comment.

@cbeust Done :)

Thanks @juherr !


Remove Unused Parser Files

See conversation in #855. These files are not used or referenced. We can remove them.
https://www.youtube.com/watch?v=K9qgKwB5lBo

Coverage increased (+0.02%) to 75.382% when pulling db08e7f4ac2d560c25d8b970572e2fbfca9fdc71 on apavlo:remove-parser-files into 3be24362cf7690266392430d16c383b715aaf34d on cmu-db:master.


Switch Docker base image from CentOS (as it is now EOL)

Is your feature request related to a problem? Please describe.
CentOS is now EOL (https://www.centos.org/centos-linux-eol/) and is the OS of the base Docker image used for the development and CI setup.
The YUM repository was removed from the CentOS update servers, and therefore packages cannot be installed.  We are pointing to a mirror in the existing Dockerfile - meaning there will be no updates, so this is a temporary fix.
Describe the solution you'd like
Switch the Dockerfile to a base image from an actively maintained Linux distribution (debian:bullseye-slim is preposed).
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

The PR to close this issue is here https://github.com/snowplow/snowplow-python-tracker/pull/284


Refactor NodeActions to depend on ActionModule for executions

Summary of the changes / Why this improves CrateDB
continuation of #12343, refactoring how TransportActions are carried and executed to a more generic approach based on ActionModule and ElasticsearchClient.
#12343 handled the implementations of TransportActions while this handles the implementations of NodeActions.
Checklist

[ ] Added an entry in CHANGES.txt for user facing changes
[ ] Updated documentation & sql_features table for user facing changes
[ ] Touched code is covered by tests
[ ] CLA is signed
[ ] This does not contain breaking changes, or if it does:

It is released within a major release
It is recorded in CHANGES.txt
It was marked as deprecated in an earlier release if possible
You've thought about the consequences and other components are adapted
(E.g. AdminUI)

Initially had some trouble with that but I think it is doable now. Thank you will try.

@mfussenegger Thanks for reviewing. Please take a look at my followup commit. Thank you


GPL-414 New plate type to cherrypick UK Biocenter  [RT 688547]

User story
GPL-414 | As process development we need to add a new plate type for Sample Management to cherry pick from in order to support the processing of deep well plates from the UK Biocentre in Project Heron.
Who the primary contacts are for this story
Scott T (R&D)
Acceptance criteria
To be considered successful the solution must allow:

The name of the plate type to be added should be ‘KingFisher 96 2ml’.

Additional context
Add any other context or screenshots about the feature request here.

PlateTypes have a maximum volume, assuming this is probably 2000 (as its in ul) but will check with Scott on the RT

Note to anyone unfamiliar: Plate Type is a different thing from Plate Purpose and describes the physical shape of the labware. It gets passed to the Tecans to let them know information about tip positioning. From our perspective its just a name, and a maximum volume.

Hi James,
That's right, the maximum volume would be 2000 ul for this plate, but it will always be a source plate rather than a destination plate.
Thanks,
Scott.


Add Python Analytics SDK to Snowplow Analytics SDK wiki

Blog: http://snowplowanalytics.com/blog/2016/05/17/snowplow-python-analytics-sdk-0.1.0-released/
Wiki: https://github.com/snowplow/snowplow/wiki/Snowplow-Analytics-SDK

Actually it's already added but not referenced in the homepage for Snowplow Analytics SDK. Updating it now...

@alexanderdean - updated (locally). Please, push.

Done, closing


Explore what security practices we could do with

Some resources: https://ropensci.github.io/dev_guide/package-development-security-best-practices.html

Feel free to post suggestions/findings in this thread


Error: invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description

Steps to reproduce the issue:

Use podman-compose version 0.1.6dev (also tested against 0.1.7dev)

run podman-compose against attached YAML
$ podman-compose/podman_compose.py -t 1podfw -f docker-compose-podman.yml up -d

Downgrade podman to 1.6.2 and the up command is successful

Describe the results you received:
$ podman-compose/podman_compose.py -t 1podfw -f docker-compose-podman.yml up -d
podman pod create --name=docker --share net -p 1900:1900/udp -p 32413:32413/udp -p 32414:32414/udp -p 32410:32410/udp -p 8324:8324/tcp -p 32469:32469/tcp -p 3005:3005/tcp -p 32400:32400/tcp -p 32412:32412/udp
5c1d2396c81d3e84fb32119209998f62600c6246de85678873430985acf5669b
0
podman volume inspect docker_plexms_61d2c5338290839e067190b2927f1f0d || podman volume create docker_plexms_61d2c5338290839e067190b2927f1f0d
podman run --name=plexms -d --pod=docker --label io.podman.compose.config-hash=123 --label io.podman.compose.project=docker --label io.podman.compose.version=0.0.1 --label com.docker.compose.container-number=1 --label com.docker.compose.service=plexms --network host -e TZ="America/Toronto" -e HOSTNAME="localhost plex" -e PLEX_CLAIM="<redacted>" -e PLEX_UID=1000 -e PLEX_GID=2002 -e ADVERTISE_IP="http://<redacted>:32400" --mount type=bind,source=/home/sonik/docker/./plexms/plexms-config,destination=/config,bind-propagation=z --mount type=bind,source=/home/sonik/docker/./plexms/plex_tmp,destination=/transcode,bind-propagation=z --mount type=bind,source=/home/sonik/docker/./plexms/shared,destination=/shared,bind-propagation=z --mount type=bind,source=/home/sonik/docker/./../Videos,destination=/media,bind-propagation=z --mount type=bind,source=/home/sonik/.local/share/containers/storage/volumes/docker_plexms_61d2c5338290839e067190b2927f1f0d/_data,destination=/run,bind-propagation=Z --add-host plexms:<IP_ADDRESS> --add-host plexms:<IP_ADDRESS> --privileged plexinc/pms-docker
Error: invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd
125

Describe the results you expected:
$ podman-compose/podman_compose.py -t 1podfw -f docker-compose-podman.yml up -d
podman pod create --name=docker --share net -p 32412:32412/udp -p 1900:1900/udp -p 8324:8324/tcp -p 32400:32400/tcp -p 32414:32414/udp -p 3005:3005/tcp -p 32410:32410/udp -p 32469:32469/tcp -p 32413:32413/udp
c5499607c15724aa8e9c0686cc19116597f34851d8b05a0bd968a8a1b190cac8
0
podman volume inspect docker_plexms_61d2c5338290839e067190b2927f1f0d || podman volume create docker_plexms_61d2c5338290839e067190b2927f1f0d
podman run --name=plexms -d --pod=docker --label io.podman.compose.config-hash=123 --label io.podman.compose.project=docker --label io.podman.compose.version=0.0.1 --label com.docker.compose.container-number=1 --label com.docker.compose.service=plexms --network host -e TZ="America/Toronto" -e HOSTNAME="localhost plex" -e PLEX_CLAIM="<redacted>" -e PLEX_UID=1000 -e PLEX_GID=2002 -e ADVERTISE_IP="http://<redacted>:32400" --mount type=bind,source=/home/sonik/docker/./plexms/plexms-config,destination=/config,bind-propagation=z --mount type=bind,source=/home/sonik/docker/./plexms/plex_tmp,destination=/transcode,bind-propagation=z --mount type=bind,source=/home/sonik/docker/./plexms/shared,destination=/shared,bind-propagation=z --mount type=bind,source=/home/sonik/docker/./../Videos,destination=/media,bind-propagation=z --mount type=bind,source=/home/sonik/.local/share/containers/storage/volumes/docker_plexms_61d2c5338290839e067190b2927f1f0d/_data,destination=/run,bind-propagation=Z --add-host plexms:<IP_ADDRESS> --add-host plexms:<IP_ADDRESS> --privileged plexinc/pms-docker
7ed4223d66e23d235adcb69ca2f48cf56fb2312e255b9649dd7f68f94e761b62
0

Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Version:            1.9.0
RemoteAPI Version:  1
Go Version:         go1.13.9
OS/Arch:            linux/amd64

Output of podman info --debug:
  compiler: gc
  gitCommit: ""
  goVersion: go1.13.9
  podmanVersion: 1.9.0
host:
  arch: amd64
  buildahVersion: 1.14.8
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.15-1.fc31.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.15, commit: 4152e6044da92e0c5f246e5adf14c85f41443759'
  cpus: 4
  distribution:
    distribution: fedora
    version: "31"
  eventLogger: journald
  hostname: darkdog3
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.5.17-200.fc31.x86_64
  memFree:<PHONE_NUMBER>
  memTotal:<PHONE_NUMBER>
  ociRuntime:
    name: crun
    package: crun-0.13-2.fc31.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.13
      commit: e79e4de4ac16da0ce48777afb72c6241de870525
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.0.0-1.fc31.x86_64
    version: |-
      slirp4netns version 1.0.0
      commit: a3be729152a33e692cd28b52f664defbf2e7810a
      libslirp: 4.1.0
  swapFree:<PHONE_NUMBER>
  swapTotal:<PHONE_NUMBER>
  uptime: 8h 15m 8.17s (Approximately 0.33 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/sonik/.config/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-0.7.8-1.fc31.x86_64
      Version: |-
        fusermount3 version: 3.6.2
        fuse-overlayfs: version 0.7.8
        FUSE library version 3.6.2
        using FUSE kernel interface version 7.29
  graphRoot: /home/sonik/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 4
  runRoot: /run/user/1000
  volumePath: /home/sonik/.local/share/containers/storage/volumes

Package info (e.g. output of rpm -q podman or apt list podman):
podman-1.9.0-1.fc31.x86_64

Additional environment details (AWS, VirtualBox, physical, etc.):
YAML file:
services:
  plexms:
    privileged: true
    container_name: plexms
    restart: unless-stopped
    image: plexinc/pms-docker
    volumes:
      - ./plexms/plexms-config:/config:z
      - ./plexms/plex_tmp:/transcode:z
      - ./plexms/shared:/shared:z
      - ./../Videos:/media:z
      - /run
    ports:
      - "32400:32400/tcp"
      - "3005:3005/tcp"
      - "8324:8324/tcp"
      - "32469:32469/tcp"
      - "1900:1900/udp"
      - "32410:32410/udp"
      - "32412:32412/udp"
      - "32413:32413/udp"
      - "32414:32414/udp"
    environment:
      - TZ="America/Toronto"
      - HOSTNAME="localhost plex"
      - PLEX_CLAIM="<redacted>"
      - PLEX_UID=1000
      - PLEX_GID=2002
      - ADVERTISE_IP="http://<redacted>:32400"
    network_mode: "host"

Ran into this yesterday and took a while to figure out it was 1.9 that broke. Reverting versions made it work again.

@rhatdan PTAL - I suspect this is containers.conf related.

It sounds like it also reproduces without podman-compose involved

It sounds like it also reproduces without podman-compose involved

Yeah

runs if provided with --cgroup-manger=systemd or running using sudo. This isn't th solution, just an observation.

runs if the podman command is provided with the --cgroup-manager=systemd argument or run using sudo.
This isn't the solution, just an observation.

if this is the case then perhaps I should open a bug with podman-compose

@rhatdan We may have swapped default cgroup manager for rootless from cgroupfs to systemd in 1.9

Ah, my libpod.conf had cgroupfs set for cgroup_manager. It was set that way on my laptop and a box I run some containers on. I don't ever remember setting that. I only noticed from here: https://github.com/containers/libpod/blob/master/docs/source/markdown/podman.1.md
--cgroup-manager=manager
CGroup manager to use for container cgroups. Supported values are cgroupfs or systemd. Default is systemd unless overridden in the libpod.conf file.

switching ~/.config/containers/libpod.conf to systemd results in:
```Error: error executing hook /usr/libexec/oci/hooks.d/oci-systemd-hook (exit code: 1): OCI runtime error

Could you just remove oci-systemd-hook and ~/.config/containers/libpod.conf
Not sure oci-systemd-hook would work with rootless and it is not needed by podman.

containers.conf replaces libpod.conf, we just use it for compatibility mode.

Can someone provide a sample libpod.conf that is causing them breakage, as well? That would help track down what's causing breaks.

In my case, modifying cgroup_manager = "cgroupfs" to cgroup_manager = "systemd" in ~/.config/containers/libpod.conf fixed the issue.

Maybe related: I'm on kernel 5.6.5 with cgroup_no_v1="all"

$ cat ~/.config/containers/libpod.conf.BAK
volume_path = "/home/sonik/.local/share/containers/storage/volumes"
image_default_transport = "docker://"
runtime = "/usr/bin/crun"
runtime_supports_json = ["runc"]
conmon_path = ["/usr/libexec/podman/conmon", "/usr/local/libexec/podman/conmon", "/usr/local/lib/podman/conmon", "/usr/bin/conmon", "/usr/sbin/conmon", "/usr/local/bin/conmon", "/usr/local/sbin/conmon", "/run/current-system/sw/bin/conmon"]
conmon_env_vars = ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]
cgroup_manager = "cgroupfs"
init_path = ""
static_dir = "/home/sonik/.local/share/containers/storage/libpod"
tmp_dir = "/run/user/1000/libpod/tmp"
max_log_size = -1
no_pivot_root = false
cni_config_dir = "/etc/cni/net.d/"
cni_plugin_dir = ["/usr/libexec/cni", "/usr/lib/cni", "/usr/local/lib/cni", "/opt/cni/bin"]
infra_image = "k8s.gcr.io/pause:3.1"
infra_command = "/pause"
enable_port_reservation = true
label = true
network_cmd_path = ""
num_locks = 2048
lock_type = "shm"
events_logger = "journald"
events_logfile_path = ""
detach_keys = "ctrl-p,ctrl-q"
SDNotify = false
cgroup_check = true

[runtimes]
  crun = ["/usr/bin/crun", "/usr/local/bin/crun"]
  runc = ["/usr/bin/runc", "/usr/sbin/runc", "/usr/local/bin/runc", "/usr/local/sbin/runc", "/sbin/runc", "/bin/runc", "/usr/lib/cri-o-runc/sbin/runc", "/run/current-system/sw/bin/runc"]

Could you just remove oci-systemd-hook and ~/.config/containers/libpod.conf
Not sure oci-systemd-hook would work with rootless and it is not needed by podman.

$ mv ~/.config/containers/libpod.conf ~/.config/containers/libpod.conf.BAK
$ sudo yum remove oci-systemd-hook-0.2.0-2.git05e6923.fc31.x86_64

performing the two above steps allows the container to start.

cgroup_manager = "cgroupfs" in libpod.conf seems to be causing the problem, but only in 1.9...
Can someone try keeping cgroup_manager as cgroupfs but changing events_logger to file?

I can confirm this with Podman v1.9.0 on Fedora 31. Setting cgroup_manager = "systemd" in ~/.config/containers/libpod.conf fixed Podman for me and my containers started up again.

@rhatdan:
containers.conf replaces libpod.conf, we just use it for compatibility mode.

Is the containers.conf file used in v1.9.0? I searched my Fedora 31 system and couldn't find this file.
$ rpm -ql podman | grep ".conf"
/etc/cni/net.d/87-podman-bridge.conflist
/usr/lib/tmpfiles.d/podman.conf
/usr/share/containers/libpod.conf
/usr/share/man/man5/containers-mounts.conf.5.gz
/usr/share/man/man5/libpod.conf.5.gz

We have not released it yet, It will be in Fedora 32 shipped by containers-common.  We were supposed to be the same defaults.  The problem was in that we had bugs in older versions of podman that forced "file" on events-logger,  We are working to fix this in podman-1.9.1.  But for now you can work around it by using containers.conf.

I am seeing this too, even with --cgroups-manager=systemd.
podman-1.9.1-1.fc32.x86_64

podman system migrate and podman system reset did not fix it.

Can you open a fresh issue? This should have been resolved with v1.9.1

#6084


smach: 3.0.2-1 in 'iron/distribution.yaml' [bloom]

Increasing version of package(s) in repository smach to 3.0.2-1:

upstream repository: https://github.com/ros/executive_smach.git
release repository: https://github.com/ros2-gbp/executive_smach-release.git
distro file: iron/distribution.yaml
bloom version: 0.11.2
previous version for package: null

executive_smach
* Fix #92 <https://github.com/ros/executive_smach/issues/92>

smach
* Fix #92 <https://github.com/ros/executive_smach/issues/92>

smach_msgs

No changes

smach_ros

No changes

There is a build failure for this pkg which is affecting other smach related pkgs. Full log. Are you able to address the problem by friday? Else it will not be part of the upcoming sync.
14:15:20 CMake Error at CMakeLists.txt:10 (find_package):
14:15:20   By not providing "Findament_cmake_flake8.cmake" in CMAKE_MODULE_PATH this
14:15:20   project has asked CMake to find a package configuration file provided by
14:15:20   "ament_cmake_flake8", but CMake did not find one.
14:15:20
14:15:20   Could not find a package configuration file provided by
14:15:20   "ament_cmake_flake8" with any of the following names:
14:15:20
14:15:20     ament_cmake_flake8Config.cmake
14:15:20     ament_cmake_flake8-config.cmake
14:15:20
14:15:20   Add the installation prefix of "ament_cmake_flake8" to CMAKE_PREFIX_PATH or
14:15:20   set "ament_cmake_flake8_DIR" to a directory containing one of the above
14:15:20   files.  If "ament_cmake_flake8" provides a separate development package or
14:15:20   SDK, be sure it has been installed.

@Yadunund Might be too late but a new version with fixes is suggested https://github.com/ros/rosdistro/pull/37977

Build has succeeded with 3.0.3 🎉


react-cornerstone-viewport crash

Bug Report
Describe the Bug
When I select a study in the study list the viewer flashes on for a second and then goes away.
The web console says:
webpack-internal:///../../../node_modules/react-cornerstone-viewport/dist/index.umd.js:9858 Uncaught TypeError: Cannot read property 'length' of undefined
    at CornerstoneViewport._validateExternalEventsListeners (webpack-internal:///../../../node_modules/react-cornerstone-viewport/dist/index.umd.js:9858)
    at CornerstoneViewport._validateExternalEventsListeners (webpack-internal:///../../../node_modules/react-hot-loader/dist/react-hot-loader.development.js:714)
    at new CornerstoneViewport (webpack-internal:///../../../node_modules/react-cornerstone-viewport/dist/index.umd.js:9437)
    at new CornerstoneViewport (eval at ES6ProxyComponentFactory (webpack-internal:///../../../node_modules/react-hot-loader/dist/react-hot-loader.development.js), <anonymous>:14:7)
    at constructClassInstance (webpack-internal:///../../../node_modules/react-dom/cjs/react-dom.development.js:14204)
    at updateClassComponent (webpack-internal:///../../../node_modules/react-dom/cjs/react-dom.development.js:18413)
    at beginWork$1 (webpack-internal:///../../../node_modules/react-dom/cjs/react-dom.development.js:20186)
    at HTMLUnknownElement.callCallback (webpack-internal:///../../../node_modules/react-dom/cjs/react-dom.development.js:336)
    at Object.invokeGuardedCallbackDev (webpack-internal:///../../../node_modules/react-dom/cjs/react-dom.development.js:385)
    at invokeGuardedCallback (webpack-internal:///../../../node_modules/react-dom/cjs/react-dom.development.js:440)

What steps can we follow to reproduce the bug?
I'm using the current master, deployed to https://idc-sandbox-000.firebaseapp.com/ but the same thing also happens on my local build with yarn run dev.
@dannyrb you should have access to the datastore.
Here's an example deep link:
https://idc-sandbox-000.firebaseapp.com/projects/chc-tcia/locations/us-central1/datasets/apollo/dicomStores/apollo/study/<IP_ADDRESS>.4.1.145<IP_ADDRESS>.5438.5601.883798764358380577682162142297

Interestingly, if I hard reload (command-shift-R on mac) the deep link above the viewer doesn't disappear, but I nothing renders and I get the following.  Is this a service worker thing?
cornerstone.js:2565 Uncaught (in promise) TypeError: Cannot read property 'call' of undefined
    at e.value (cornerstone.js:2565)
    at r (cornerstone.js:7623)
    at Object.t.default [as enable] (cornerstone.js:2140)
    at t.<anonymous> (index.umd.js:9478)
    at l (runtime.js:45)
    at Generator._invoke (runtime.js:271)
    at Generator.forEach.e.<computed> [as next] (runtime.js:97)
    at C (index.umd.js:933)
    at a (index.umd.js:955)
    at index.umd.js:962

Thanks for the report, and for providing a reproduction.
I am able to reproduce :+1:
Because we "loosely" version in our package.json, the easiest way to determine the bundled library's version is to examine our lock file. When our CI builds, it installs from frozen lock file for reproducible builds:
https://github.com/OHIF/Viewers/blob/master/yarn.lock#L15205-L15213
This is actually a cornerstone-core bug that was illuminated in react-cornerstone-viewport by uncommon usage. I've implemented a workaround in<EMAIL_ADDRESS>and created a follow-up issue in cornerstone-core.
react-cornerstone-viewport: https://github.com/cornerstonejs/react-cornerstone-viewport/issues/66
cornerstone-core: https://github.com/cornerstonejs/cornerstone/issues/444
If the deploy-preview on the PR looks good, I'll have a release cut shortly.


Module Load Event

    /**
     * Boot the modules.
     */
    public function boot()
    {
        foreach ($this->getOrdered() as $module) {
            //pre event
            $module->boot();
           //after event
        }
    }

Can you add  pre boot load event And after boot load event  to analyze performance?

Yes, feel free to send a pull request 👍

I'll close this as there hasn't been a reply in a while, feel free to comment if needed.


fileSizeLimitBytes option not available

Can't create rolling file using file size. it creates new file for every request.

That's because I don't use the https://github.com/serilog/serilog-sinks-file sink anymore, I now use the https://github.com/serilog/serilog-sinks-periodicbatching now. The reason for this was that the file sink isn't extensible (E.g. the main classes are internal).
The reasons:

I didn't just want to copy-paste the file sink.
I didn't want to maintain all changes in the file sink manually
There were performance issues as described in https://github.com/SeppPenner/Serilog.Sinks.AmazonS3/issues/4

You can specify the options, e.g. BatchSizeLimit or so as described under https://github.com/SeppPenner/Serilog.Sinks.AmazonS3/blob/master/HowToUse.md#configuration-options.

Ah, now I understand the problem. Sorry for that, I guess I forgot to update the how to use section.

This is now fixed with https://github.com/SeppPenner/Serilog.Sinks.AmazonS3/commit/b7467ab97a2185c17f510766e0267270aef57616.

Thanks


Issue 13

Codecov Report

Merging #14 (bf61ea3) into php (bdaca4f) will increase coverage by 1.67%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                php      #14      +/-   ##
============================================
+ Coverage     85.82%   87.50%   +1.67%
- Complexity       38       41       +3
============================================
  Files             3        4       +1
  Lines           134      152      +18
============================================
+ Hits            115      133      +18
  Misses           19       19

Impacted Files
Coverage Δ

app/Coding.php
100.00% <100.00%> (ø)

app/Commands/WikiImportCommand.php
84.16% <100.00%> (-0.14%)
:arrow_down:

app/Confluence.php
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


How to separate poly to several polys

After some bool operations, I may get a poly which actual is a combination of several separated polys, like this:

this blue poly difference the red poly and get the green poly.
How could I separate the green poly to two polys? Is there a simple solution to this question, or I need to solve it by other algorithm?

The result's regions is a list of polygons, so simply index into it.

What if the result contains holes? like this:

I want to separate them to A and B.

Hmm, that's a good question.
But I think it's outside the scope of this library.
You might be able to use some of the logic that's in geojson.js to figure out the different roots:
https://github.com/voidqk/polybooljs/blob/master/lib/geojson.js#L52
There's a comment describing a similar issue.

So the index of each polygon does not tell anything about their spatial relationship, right?

correct

I get it.


add compiled query and timing to error logs

This PR is a follow up to this issue.
The change makes it possible to log the compiled query along with its timing in case of error logs. As the issue mentioned, this makes it easier to debug failing queries.
closes #342

Nice, thank you!


add commands for windows client users

I was disappointed to see several labs in that this tutorial didn't have any instructions for Windows users, leaving them to type a lot of commands longhand (or at least greatly increase the amount of copy/pasting).
I wrote some Powershell to bridge that gap, I hope you find it useful.

If it were my choice, I'd be of two minds. I see the merit - but this also would diverge from the guide's distilled nature.
The parts re compatibility could possibly be merged anyway.
Assuming KH doesn't want to merge all the Windows commands, then perhaps some guidance on the replacement commands or download URLs would be a good halfway point.
Another possibility for Windows users is instead to suggest installing the Ubuntu/Windows Subsystem feature.

I was always under the impression that with things like this, KH would advise "fork, modify, and be merry", essentially. imho this is going to clog up the guide for what is probably going to benefit a very small minority of the targeted user base.

Whilst I appreciate the work done, I concur with @tokiwinter - perhaps Windows users could maintain their own fork. Whilst you are at it, could someone do a fork for aws users too? ;) (i.e. you can't please everyone)

Whilst you are at it, could someone do a fork for aws users too? ;) (i.e. you can't please everyone)

Actually... https://github.com/kelseyhightower/kubernetes-the-hard-way/tree/1.4

This is a great PR, but as others have stated I don't have the bandwidth to test on windows. I run through each command multiple times to ensure everything works. Adding windows would increase the time it takes for me to maintain this guide. Please fork, and keep a windows port up to date. I tag each "release" of this guide to make it easier to keep up.


Improve edit api

This PR implements my take on #86. The edit api now takes ownership of the migration it edits.
Closes #86

I think we can do something like this:
diff --git a/rusqlite_migration/src/builder.rs b/rusqlite_migration/src/builder.rs
index 8ecfcf6..28ccef0 100644
--- a/rusqlite_migration/src/builder.rs
+++ b/rusqlite_migration/src/builder.rs
@@ -1,4 +1,4 @@
-use std::iter::FromIterator;
+use std::{iter::FromIterator, mem};

 use include_dir::Dir;

@@ -10,6 +10,9 @@ pub struct MigrationsBuilder<'u> {
     migrations: Vec<M<'u>>,
 }

+// Placeholder migration used to replace and edit
+const PLACEHOLDER_M: M<'static> = M::up("");
+
 impl<'u> MigrationsBuilder<'u> {
     /// Creates a set of migrations from a given directory by scanning subdirectories with a specified name pattern.
     /// The migrations are loaded and stored in the binary.
@@ -42,14 +45,19 @@ pub fn from_directory(dir: &'static Dir<'static>) -> Result<Self> {
     ///
     /// Panics if no migration with the `id` provided exists.
     #[must_use]
-    pub fn edit(mut self, id: usize, f: impl Fn(&mut M)) -> Self {
+    pub fn edit(mut self, id: usize, f: impl Fn(M)) -> Self {
         if id < 1 {
             panic!("id cannot be equal to 0");
         }
-        f(self
-            .migrations
-            .get_mut(id - 1)
-            .expect("No migration with the given index"));
+
+        let migration_to_edit = mem::replace(
+            self.migrations
+                .get_mut(id - 1)
+                .expect("No migration with the given index"),
+            PLACEHOLDER_M.clone(),
+        );
+
+        f(migration_to_edit);
         self
     }

What do you think @czocher ?

What do you think @czocher ?

We still need to copy the PLACEHOLDER which is not perfect. Maybe we can implement Default for M, which would return M("") and use https://doc.rust-lang.org/std/mem/fn.take.html? I'll implement it to show you how it would look like.

I see two issued with implementing Default:

Users of the library will be tempted to use it and maybe that’s inadvisable
I’m not sure that calling M::default is cheaper than cloning a constant made up of just pointers & other small values.

If we want to avoid the cloning, we could keep a Vec<Option> inside MigrationsBuilder and then use the take method of Option. Then we put f(M) back in place.

If we want to avoid the cloning, we could keep a Vec inside MigrationsBuilder and then use the take method of Option. Then we put f(M) back in place.

That's the best case in my opinion. I'll implement it and check how it'll look like.

I'll implement it and check how it'll look like.

I suspect it’ll be easier if we merge #92 first. I’m happy to approve that other PR once we discuss the points raised there.

I'll implement it and check how it'll look like.

I suspect it’ll be easier if we merge #92 first. I’m happy to approve that other PR once we discuss the points raised there.

Let's do that first, yes.


Enable async setup of an application

Objective

Async is cool. We need more async.
Enable async initialisation of an application

Solution

Add async variants of methods to add a plugin or a plugin group. They transform the build/ready/finish steps of the plugin init to a future, and await that future
Inside the same app, users can mix as they want async and sync plugins, depending on what they want to do. This can be nicer for plugins that actually needs the renderer (currently the only plugin with mandatory "asyncness") to do useful work
the #[bevy_main] macro can handle an async main function

Current state
Plugins are built when called add_plugins, then the application starts and the event loop wait for plugins to be ready then finish their setup before actually starting the application
fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .run();
}

New async :sparkles:
Plugins are built, waiting for them to be ready, then finished, and then the application can start directly
#[bevy_main]
async fn main() {
    App::new()
        .add_plugins_async(DefaultPlugins)
        .await
        .run();
}

Can you say a bit more about the motivation here? Who would this be useful for, and why can't they use the existing approach?

I still think an async API is cleaner, and I prefer it over the limited task executor embedded at the start of the event loop. Doing it this way is not contagious, and leave the decision to the consumer what they want to add async or sync, both can be mixed however the user want in the same app.
I also find that adding support for this doesn't require a lot of code, and the only somewhat complex part is how to handle the waker in both native and wasm (https://github.com/mockersf/bevy/blob/c50406cfb48bbb1a70300fad5935a35755b2481b/crates/bevy_app/src/app.rs#L747-L762)
It's a cleaner way to enable this kind of scenario https://github.com/bevyengine/bevy/pull/8553#discussion_r1186928089 from @JMS55
And as I may have mention, I like async things

When https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-nightly.html is stable, it will be possible to have real async plugins, and that will clean up the code nicely, while still keeping the possibility of not needing to put everything in async.
This PR is a first step for that, and show the workaround with a manual Poll implementation

Does this PR become more useful as https://github.com/bevyengine/bevy/pull/8624 becomes reality?
As asset loading becomes more complex and potentially longer in duration via asset processing/pipelines, doesn't support for async become more practical (especially as rust itself continues to push this) for additional user level concurrent, implementations while waiting for asset code paths to complete? If so, does async become preferred under the covers, providing a synchronous await for the current synchronous APIs?

Creates questions like "which way is the right way" that have no clear answer.

Isn't this the same answer as always? Synchronous if you want synchronous and asynchronous if you want asynchronous? Whereby continued support for this makes bevy more async friendly as it grows? Rust itself is continuing to push forward its async support. Shouldn't bevy follow? Is singular idiomatic bevy APIs the ideal for bevy vs idiomatic rust? Are they different?

so... anyone ready to make Bevy full async? 😄

I'm not opposed 😅 As long as there's a single way and the incantation isn't dramatically more complex, I'm fine with unblocking this work.
I would really like to get plugin dependencies and so on working properly.


Update existing-devices.md

issue #4284

@nenonix @JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@greg-lindsay - PR has been copy edited and is ready for final review. This is based on issue #4284
Thank you.


Moving gatsby-ssr and adding injectHTML check.

This makes no sense at all. Please have a look at how other gatsbyJS plugins are written, eg. https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-manifest

Babel compiled js files should not be committed to the repo, there is a .gitignore for that reason https://github.com/Creatiwity/gatsby-plugin-favicon/pull/6/files#diff-a084b794bc0759e7a6b77810e01874f2
Adding the config change to the Readme does not make much sense, without the corresponding implementation of that functionality also in gatsby-node.js
React is not necessary as a dependency

Please can you describe, what is 'not working for you'?

Added injectHTML config param to es6 version of gatsby-ssr.js.
https://github.com/Creatiwity/gatsby-plugin-favicon/pull/6/commits/da8849b8d8c76993d1c81c661c17786e31c88964

Hi Michael,
With the gatsby-ssr file in the src folder, the code wasn’t being accessed at all. Maybe it’s because of the pieces missing that you added in your commit.
I guess I figured I’d just follow what was happening in this repo, because the Gatsby-node file was in the base directory, there was no need for Babel in either case. However without react as a dependency, I was getting validation errors from ‘setHeadComponents’.
I added the config to the readme because I’d added the functionality to Gatsby-ssr. I dont think Gatsby-node needs to be impacted by injecthtml at all.
No problems at all going with your code if it works though.
Cheers.

I added the config to the readme because I’d added the functionality to Gatsby-ssr. I dont think Gatsby-node needs to be impacted by injecthtml at all.

true. Just saw, the config param is already addresses in gatsby-node. https://github.com/Creatiwity/gatsby-plugin-favicon/blame/master/gatsby-node.js#L22

#6 Fixes this issue.


bump version to v1

Describe what this PR does and why we need it:
Moving api version for AutomationBroker to v1

Coverage remained the same at 40.97% when pulling 5b583117a7f2595ab3e53db1f9e957d2109436d4 on shawn-hurley:feature/bump-api-version into 95fa72621432e35c8952a4b5c9ad8a42b5bd08e7 on openshift:master.


CameraCaptureUI.CaptureFileAsync() returns null

Describe the bug
See https://github.com/dotnet/maui/issues/5849.
The MAUI MediaPicker.CapturePhotoAsync() method returns null instantly on Windows. Expect to either see camera UI or an exception indicating a problem (e.g. lack of permissions, incorrect config, no camera available, etc).
Digging deeper, I am able to reproduce in a new, empty WinUI3 project:
var captureUi = new CameraCaptureUI();
var result = await captureUi.CaptureFileAsync(CameraCaptureUIMode.Photo);
// We get here straight away, result == null
...

Whereas the lower-level MediaCapture API works as expected:
var devices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);
DeviceInformation device = devices.FirstOrDefault(); // Finds one device, my webcam

MediaCaptureInitializationSettings settings = new MediaCaptureInitializationSettings();
settings.VideoDeviceId = device.Id;

MediaCapture mediaCapture = new MediaCapture();
await mediaCapture.InitializeAsync(settings);

StorageFolder storageFolder = ApplicationData.Current.LocalCacheFolder;
var result = await storageFolder.CreateFileAsync("test.jpg", CreationCollisionOption.ReplaceExisting);

await mediaCapture
    .CapturePhotoToStorageFileAsync(ImageEncodingProperties.CreateJpeg(), result)
    .AsTask();

// result is not null, JPEG file produced has a valid image inside

Captures a picture and displays the filename as expected.
So there doesn't seem to be a hardware / driver / OS / Windows SDK level issue. Seems to be Windows.Media.Capture.CameraCaptureUI that is misbehaving.
I created a WinUI3 app (no MAUI) and the CameraCaptureUI code still returns null. I tried adding more permissions on top of runFullTrust:
  <Capabilities>
    <rescap:Capability Name="runFullTrust" />
    <uap:Capability Name="videosLibrary"/>
    <uap:Capability Name="picturesLibrary"/>
    <DeviceCapability Name="webcam"/>
    <DeviceCapability Name="microphone"/>
  </Capabilities>

Which seems like all relevant capabilities.
Steps to reproduce the bug

Create a new WinUI3 project using the Visual Studio template ("Blank App, Packaged (WinUI 3 in Desktop)
Change myButton_Click() in the generated MainWindow.xaml.cs to:private async void myButton_Click(object sender, RoutedEventArgs e)
{
    var captureUi = new CameraCaptureUI();
    var result = await captureUi.CaptureFileAsync(CameraCaptureUIMode.Photo);

    myButton.Content = result == null ? "null result" : (result.DisplayName ?? "null DisplayName");
}

Observe output

expect to see camera UI followed by the UI showing a filename
actually see the UI show null result instantly

Add <DeviceCapability Name="webcam" /> to Package.appxmanifest
Repeat steps 1 - 3
Observe same behaviour

Expected behavior
Expect to see camera UI, followed by the button caption showing a filename.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.0
Windows app type

[X] UWP
[ ] Win32

Device form factor
Desktop
Windows version
Windows 10 (21H1): Build 19043
Additional context
No response

onecoreuap\shell\windows.system.launcher\lib\windows.system.launcher.cpp(1659)\Windows.System.Launcher.dll!53940162: (caller: 53BA63CC) Exception(1) tid(4a6c) 8000000E A method was called at an unexpected time.
Exception thrown at 0x764FB922 in App1.exe: Microsoft C++ exception: wil::ResultException at memory location 0x02F7CA68.
Exception thrown at 0x764FB922 in App1.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
onecoreuap\shell\windows.system.launcher\lib\windows.system.launcher.cpp(1676)\Windows.System.Launcher.dll!53940130: (caller: 53BA63CC) ReturnHr(1) tid(4a6c) 8000000E A method was called at an unexpected time.
    Msg:[onecoreuap\shell\windows.system.launcher\lib\windows.system.launcher.cpp(1659)\Windows.System.Launcher.dll!53940162: (caller: 53BA63CC) Exception(1) tid(4a6c) 8000000E A method was called at an unexpected time.
]
avcore\cameracaptureui\lib\cameracaptureui.cpp(236)\CameraCaptureUI.dll!53BA63E5: (caller: 53BA6610) ReturnHr(2) tid(4a6c) 8000000E A method was called at an unexpected time.
avcore\cameracaptureui\lib\cameracaptureui.cpp(274)\CameraCaptureUI.dll!53BA6629: (caller: 53BA9714) ReturnHr(3) tid(4a6c) 8000000E A method was called at an unexpected time.

Just noticed this in the debugger output - the last two lines may be relevant?

I should also note that I can reproduce this on two different machines which have two different webcam models (one Logitech, one Microsoft Lifecam).

Belongs in WindowsAppSDK repo and dupe of:
https://github.com/microsoft/WindowsAppSDK/issues/1034
On productboard:
https://portal.productboard.com/winappsdk/1-windows-app-sdk/c/49-support-cameracaptureui?utm_medium=social&utm_source=portal_share


Beta: sign-in links do not expire after 15 minutes and are reusable

Issue Description

I am able to sign in using the links well after 15 minutes (and in one case, 2 hours). And I can do so repeatedly using the same link in different browsers (private mode) and on different devices. Reproducible on my local copy of freeCodeCamp and on beta.freecodecamp.org.
Browser Information

Browser Name, Version: Chrome, Firefox, Safari
Operating System: macOS
Mobile, Desktop, or Tablet: mobile and desktop

Wait… just checked my MongoDB records. The auth tokens' TTLs are all set to 900000. Is that intentional?

Interesting, 900000 ms would be 15 minutes. Are they not miliseconds? If they are seconds those links would stay valid for 15000 minutes instead, that's more than 10 days 😲

Ok, I can confirm that:

authentication links are not deleted after use
authentication links are valid for longer than the ttl

My guess is that they will never expire, as I do not see the code for it, but I'm pretty new to the code base.

Hi @leonfeng
Nice find.
I guess, the last discussions we had about an year ago that MongoDB should be doing this for us. One of the causes this could be the TTL expiration thread needs to be configured explicitly?
But, I guess we would have to have this in to a message queue, and schedule it.
I will investigate further.

Or, maybe we simply missed the invalidation in a recent refactoring.

I'll just drop here what I cam across trying to unravel this little puzzle, hope it's helpful:
Intention to validate:
https://github.com/freeCodeCamp/freeCodeCamp/blob/bce8e0a5e93dca57d7734de5b0d6abedd0517272/server/boot/authentication.js#L140
Intention to destroy:
https://github.com/freeCodeCamp/freeCodeCamp/blob/bce8e0a5e93dca57d7734de5b0d6abedd0517272/server/boot/authentication.js#L155
I noticed that validation of length and existence of the token does happen, I'm not familiar with the code base and frameworks but that seems to happen in passwordlessGetValidators:
https://github.com/freeCodeCamp/freeCodeCamp/blob/bce8e0a5e93dca57d7734de5b0d6abedd0517272/server/boot/authentication.js#L69
I guess a shortcut is to add TTL validation in passwordlessGetValidators, but as you still need to solve the removal of used tokens, I'd suggest fixing it properly.

Hi all. I saw that @raisedadead submitted a PR to migrate authentication to Auth0, but I thought I'd comment here.
Did some searching through the Mongo docs for getting TTL to work. Seems like Mongo will automatically remove documents, but an index needs to be created on the collection first. To get the email authentication links to expire correctly, I had to run mongo, use freecodecamp, then run db.AuthToken.createIndex( { "created": 1 }, { expireAfterSeconds: 900 } ). After that, the links would be removed and would no longer work after 15 minutes, give or take a minute -- the background task that removes documents runs every 60 seconds, apparently.
One thing I noticed is that the authentication token is not always destroyed when the user clicks on the link and logs in. I'm not sure what is causing the issue, but it seems to be destroyed about half the time. So a user could click on an email link, log in, sign out, then log in multiple times until the token is destroyed or ~15 minutes passes.
Another potential issue I saw is that the db.AccessToken collection seems to grow every time a user logs in with a new authentication token. Not sure if that's supposed to happen, but I thought it worth mentioning. Also, the ttl field in the documents in db.AccessToken reads NaN. Again, not sure, but maybe it's supposed to be set by this line?:
https://github.com/freeCodeCamp/freeCodeCamp/blob/a2076ce1ec96e5c333964f20dc20cc9621501f37/common/models/user.js#L181

We've implemented Auth0 and heeded the advice "never roll your own authentication." Thanks for all the help QA'ing the old passwordless authentication, and to @raisedadead for building our new Auth0 implementation.


Copy Header menu context

Description

Acceptance Criteria

Right Click on the header row -> Show Menu Context (Only Support Copy item)
Shortcut should work
Support Single or Multiple selections on the header
Correct format

Example:
User-Agent: Proxyman/30800 CFNetwork/1335.0.3 Darwin/21.6.0
Connection: keep-alive

This ticket should wait until https://github.com/ProxymanApp/proxyman-windows-linux/issues/87 is resolved because it would drop the MUI Context Menu and adopt the BlueprintJS Menu Context again.


Roll engine 0928c1af2f45..5b87cd077327 (2 commits)

git@github.com:flutter/engine.git/compare/0928c1af2f45...5b87cd077327
git log 0928c1af2f45..5b87cd077327 --no-merges --oneline
2019-11-05<EMAIL_ADDRESS>Fix bug where Enter doesn't add new line in multi-line fields (flutter/engine#13630)
2019-11-05<EMAIL_ADDRESS>Roll src/third_party/dart ab5cf0f854..8bdca37e98 (23 commits)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

PullRequest is not longer mergeable. Closing it.

PullRequest is not longer mergeable. Closing it.

Commit queue failed; closing this roll.

PullRequest is not longer mergeable. Closing it.


"Permission Denied" on http://getdunne.net/wiki/doku.php?id=vanillajuce

When going to http://getdunne.net/wiki/doku.php?id=vanillajuce, I get the following page:

Am I expected to register?
I am using Chrome Version 60.0.3112.113 on Windows 10.

Whoops! Thank you. That's fixed now.

Great! Thanks.


How to build MXNet in debug mode?

It looks like if I set an environment variable called DEBUG that it changes some aspects of the build.  Is there more to it than this?
DEBUG=1 make -j$(nproc)

You can set in the config.mk https://github.com/dmlc/mxnet/blob/master/make/config.mk#L28


based on https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Man…

…ual-%28v2.x%29#t
t:none should be add before every transformation.

Thank you for fixing this.
We usually write all the transformations (-> t:...) on the same line. Would you mind adopting your PR? If not, I can do this for you.

yes, i will update.
------------------ 原始邮件 ------------------
发件人:                                                                                "coreruleset/auto-decoding-plugin"                                                                                @.>;
发送时间: 2022年2月17日(星期四) 下午4:20
@.>;
<EMAIL_ADDRESS>主题: Re: [coreruleset/auto-decoding-plugin] based on https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Man… (PR #1)
Thank you for fixing this.
We usually write all the transformations (-> t:...) on the same line. Would you mind adopting your PR? If not, I can do this for you.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: @.***>

Thank you

Thank you for this welcome contribution. Merging now.

1


Dev test improved fixed fit

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


libuev: 2.4.0 -> 2.4.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/troglobit/libuev/releases.
meta.description for libuev is: Lightweight event loop library for Linux epoll() family APIs
meta.homepage for libuev is: https://codedocs.xyz/troglobit/libuev/
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2.4.1 with grep in /nix/store/xn6wmj13x13p1mdiya8mvjnq4mffs5g6-libuev-2.4.1
found 2.4.1 in filename of file in /nix/store/xn6wmj13x13p1mdiya8mvjnq4mffs5g6-libuev-2.4.1

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
libuev
uftpd

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/xn6wmj13x13p1mdiya8mvjnq4mffs5g6-libuev-2.4.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A libuev https://github.com/r-ryantm/nixpkgs/archive/646b43f8c52feb8833add707c057710cd7d36f6e.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/646b43f8c52feb8833add707c057710cd7d36f6e#libuev

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/xn6wmj13x13p1mdiya8mvjnq4mffs5g6-libuev-2.4.1
ls -la /nix/store/xn6wmj13x13p1mdiya8mvjnq4mffs5g6-libuev-2.4.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

libuev
uftpd

Maintainer pings
cc @vifino for testing.

CVE-2022-48620


Check Context::connect result.

This applies the same fix made in kinetiknz/cubeb#425.

One very minor nit, I'd prefer to see connected like:

Hah, I wrote it that way initially and then decided I didn't like it for some reason.  Reverted to that variation now.


[BEAM-13081]Fixes a compatible issue of decoding null-value bitmap between JVM coder and Python Coder

The JVM RowCoder strips trailing 0s from the null-value bitmap, while both python and go expect all bits to be present in the encoded bitmap.  This causes index-out-of-range errors when trying to decode a row encoded on the JVM in other languages in some circumstances.
This PR aims to add missing trailing 0s to the null-value bitmap to avoid the index-out-of-range error for Python Coder.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @reuvenlax

R: @TheNeuralBit

Hi @TheNeuralBit, thanks for reviewing! Sorry I am not familiar with Go and I don't plan to add more commits to this PR.

@TheNeuralBit what are next steps here? : )

I think this can be merged as-is. I'll do that and take my question to BEAM-13081.


Updated Russian language added by Heroboria

@Heroboria Hi i updated your code and added changes. Also i send PR to correct branch collabsio:v3 not coolabsio:main.
coolabsio:main is for v4

Thanks for the PR! I would like to focus on v4 and it will have a better way to add translations.

Hello, I would like to know if this new way of adding translations has been implemented, I would like to make one for Portuguese.