manage.py inspectdb: All redshift tables fail with unable to inspect table - function unnest(int2vector) does not exist

I have:
17:51 $ pip freeze | grep redshift
django-redshift-backend==0.5

and:
17:59 $ pip freeze | grep Django
Django==1.10.3

I am running the following command:
python manage.py inspectdb

And I get the following output on every table in my redshift schema:
# Unable to inspect table 'dogs'
# The error was: function unnest(int2vector) does not exist
HINT:  No function matches the given name and argument types. You may need to add explicit type     casts.

It seems like the driver is falling back to postgres 9.x despite my database settings:
DATABASES = {
    'default': {
        'ENGINE': 'django_redshift_backend',
        'NAME': 'dogs',
        'USER': 'user',
        'PASSWORD': 'password',
        'HOST': 'hostname',
        'PORT': '5439',
    }
}

Same issue here

same problem

same problem

Based on detailed information from @Surgo (thanx!)  I used a workaround by using older django version to do the inspection. I have A LOT of tables (and am lazy) so here it is:
mkdir tmp && cd tmp
virtualenv -p python2 venv
source venv/bin/activate
pip install django==1.4.0 psycopg2
django-admin.py startproject djangold
cd djangold
export PYTHONPATH=$(pwd)
export DJANGO_SETTINGS_MODULE=djangold.settings
# Update your settings to include
# DATABASES = {
#    'default': {
#        'ENGINE': 'django.db.backends.postgresql_psycopg2',
#        'NAME': 'db_name',
#        'USER': 'username',
#        'PASSWORD': 'pwd',
#        'HOST': 'host',
#        'PORT': '5439',
#        'OPTIONS': {
#            'options': '-c search_path=schema_name',  # if using schema
#        }
#    },
#}
# Voila! Now it works
django-admin.py inspectdb

I hope this helps: @epineda @gauravnexus

For anyone getting:
TypeError: sequence index must be integer, not 'slice'

I was able to get around this by going all the way back to Django 1.2

Unable to inspect table 'auth_group' - Can anyone help with this mistake?

@RicoChivela1, this message typically indicates that the table is missing.  Did you run ./manage.py migrate or ./manage.py syncdb?  If you're unfamiliar with Django I strongly recommend working through the tutorial.

I am getting
# Unable to inspect table 'table_name'
# The error was: syntax error at or near "WITH"
LINE 6:                     FROM unnest(c.conkey) WITH ORDINALITY co...

on
Django==2.2.5
django-redshift-backend==1.1.0

Same issue here...Based on @hlodver 's solution (thx!) and I tested that the last working version of django is 1.7.11 which is slightly better than django==1.4 for me, in the way that 1.7.11 added one extra line
class Meta:
        managed = False

just for anyone who needs this...

fixed by #90 . Thanks to @MattFisher !

It has been released https://pypi.org/project/django-redshift-backend/3.0.0/


Update to Chromium 124.0.6367.78

This PR updates to Chromium 124.0.6367.78.
There were no notable changes on our end.

Change log
Blog post

portable linux builds fine and runs at least on manjaro and ubuntu 20.04 upwards including 24.04

Since .91 just dropped I'll merge this in a bit, then the readme change

I can also do that and tag it, however you like

Sure, I'll let you handle that then!


Use tb_poll_event instead of tb_peek_event

Reduces CPU usage noticeably on my system, from 14% to nearly 0%. There is an issue where the cursor doesn't get positioned correctly on startup, this is because the cursor position is set in input_handles[active_input] on line 144 (which calls tb_set_cursor), before position_inputs has been called. It is not enough to just call position_inputs before line 144, because position_inputs itself requires that draw_box has been called,
There are other issues with this approach as well, if I can't find a solution for them it might be easier to just increase the default min_refresh_delta.

This is definitely a step in the right direction, however it breaks animations: we should decide which method to use depending on the current configuration. If the animations are enabled, we should peek events. If not, then we can poll. If you can make these changes I will merge this asap :)

I added a call to *input_handles[active_input] in the if (update) block, as this seems to fix the cursor positioning issues.

thanks a lot!


Fix issue with length of blog

Using minutes as the mechanism to control the length of the blog doe not seem to work. More specifically, the app returned a blog of similar length for 4 and 9 minutes. With this story, we will use word count as a different mechanism to control the length.

Based on reddit, it seems that there is a know limitations with the Google Gemini models to respect the length provided in number of words.


Add arm64 support

Hi again!
I recently got an iPhone 6 and noticed that OSCKit isn't working on 64-bit ARM processors. To fix this, I picked the necessary changes originally made in this iOS-oscpack commit: https://github.com/heisters/iOS-oscpack/commit/aae5d8e038603b0533a3458a27b35c2af4e66437
Let me know how this looks!

looks good to me, thanks!

wrong button...

Version 0.3.2 released!

Thanks! :)


Packet Underflow

When using the lib to call this rust server a error is thrown.

This seems to be happening as a empty string was retuned within data and this caused get_string_utf8() to throw a PacketUnderflow error.
https://github.com/gamedig/rust-gamedig/blob/1b13d398567636f8f779f3d6d4b58fde0827bbd1/src/bufferer.rs#L96

Didn't had the time to look into it, but I'm almost sure it's because of the get_string_utf8, get_string_utf8_unended and/or get_string_utf16 of the Bufferer.
When they have no data left, they throw this error (also happens for u8, u16 and so on, but it's something that I also encountered on strings).
I'm not sure whether to remove this buffer size check completely or not (for strings).

When I did some debugging I was able to know that it is coming from 1 of those functions within bufferer. I think this can be confirmed as a bug. The issue maybe occurring on empty strings but that still unknown.

Not really a bug, calling one of those functions does not expect the buffer to be empty, maybe you want a get a string and you know that it must contain something (even only the NULL character, that's something).

An empty string (in UTF8 at least) is just 0x00 if I'm right.

As I'm working on #25 I encountered the same problem and I ended up creating another function, get_string_utf8_optional which if the buffer is empty, it returns an empty string.
Having a normal get_string_utf8, this get_string_utf8_optional and the additional get_string_utf8_unended when packets end with a string but they dont provide the final NULL byte, is a bit messy and I'll have to look into making this cleaner.

All of this makes a lot more sense and possibly get_string can just be a generic fn

@CosminPerRam what do you think of this as a possible way to make it a it simpler

Looks really nice, I just have a small comment, would you make a PR?  we'll discuss thing over there.

I'm deviating from the example shown for prod use as it comes with shortfalls in protocol impl, Ill open a draft when I got something together.

Fixed in #62


[Bug]: Error executing lua callback: expected string, got nil

Bug Description
Error when typing in insert mode when using cmp_yanky with default options.
Error detected while processing TextChangedI Autocommands for "*"
Error executing lua callback: vim/shared.lua:0: s: expected string, got nil
stack traceback:
	[C]: in function 'error'
	vim/shared.lua: in function 'validate'
	vim/shared.lua: in function 'trim'
	.../local/share/nvim/lazy/cmp_yanky/lua/cmp_yanky.lua:23: in function <...local/share/nvim/lazy/cmp_yanky/lua/cmp_yanky.lua:23>
	vim/shared.lua: in function 'tbl_filter'
	.../.local/share/nvim/lazy/cmp_yanky/lua/cmp_yanky.lua:22: in function 'complete'
	.../.local/share/nvim/lazy/nvim-cmp/lua/cmp/source.lua:334: in function 'complete'
	...local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:299: in function 'complete'
	...local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:169: in function 'callback'
	...local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:229: in function 'autoindent'
	...local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:161: in function 'on_change'
	...local/share/nvim/lazy/nvim-cmp/lua/cmp/init.lua:338: in function 'callback'
	...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/autocmd.lua:49: in function 'emit'
	...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/autocmd.lua:23: in function <...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/autocmd.lua:22>

Relevant Screenshot
No response
To Reproduce
Start typing in Insert mode when using cmp_yanky
neovim version
0.9.4

Make sure you have done the following

[X] I have updated to the latest version of the plugin.

thanks, fixed


How to run this app.py in windows 10

using python app.py i have this error
(venv) C:\Users\Carlos Gonzalez\Flask-Admin-Dashboard>python app.py
Traceback (most recent call last):
  File "app.py", line 5, in <module>
    from flask_security import Security, SQLAlchemyUserDatastore, \
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\flask_security\__init__.py", line 13, in <module>
    from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\flask_security\core.py", line 24, in <module>
    from passlib.context import CryptContext
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\context.py", line 15, in <module>
    from passlib.registry import get_crypt_handler, _validate_handler_name
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\registry.py", line 12, in <module>
    from passlib.ifc import PasswordHash
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\ifc.py", line 10, in <module>
    from passlib.utils.decor import deprecated_method
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\utils\__init__.py", line 845, in <module>
    from time import clock as timer
ImportError: cannot import name 'clock' from 'time' (unknown location)

follow the steps, but i don't know how to run this app in os windows 10
any help?

Hi @soullessdead, I think it is a problem with python 3.8. Can you try with an older version? Maybe 3.6.

You will need to run it in docker with linux containers!


Selection of "Nr. joburi nepublicate (desc.)" leads to the page with correct results

Description: Select the "Nr. joburi nepublicate (desc.)" option from the sort dropdown menu in the "Companii" section and make sure it leads to the page with correct results.
Preconditions: Have the https://admin.peviitor.ro/ page opened.

Step 1
Select the "Nr. joburi nepublicate (desc.)" option from the sort dropdown menu in the "Companii" section.

Expected results
The "Nr. joburi nepublicate (desc.)" option is highlighted when hovering over it.

Step 2
Make sure that when clicking on "Nr. joburi nepublicate (desc.)", it leads to the page with correct results.

Expected results
When clicking on "Nr. joburi nepublicate (desc.)", it leads to the page with correct results.

Incorrect job listing when selecting "Nr. joburi nepublicate (desc)" filter.
Description:
When selecting the option "Nr. joburi nepublicate (desc)" from the dropdown filter, the page incorrectly displays all the published jobs in descending order.
Preconditions: Have the https://admin.peviitor.ro/ page opened.
Steps to Reproduce:
Open the dropdown filter.
Select the "Nr. joburi nepublicate (desc)" option.
Observe that all published jobs are listed in descending order, instead of showing only unpublished jobs.

Expected Result:
The page should only display unpublished jobs in descending order.
Actual Result:
The page displays all published jobs in descending order, ignoring the filter for unpublished jobs.


git-node v8 [major | minor | backport] not doing anything

git node v8 is not doing anything. I tried:
$ git node v8 backport --verbose ada64b58bfde3bc7dd4eda887918e229a1399907
$ git node v8 minor
$ git node v8 major

Am I doing something wrong? I just installed ncu with npm install -g https://github.com/nodejs/node-core-utils, Node.js version is v8.11.1 and other ncu commands are working fine.

Fix is in https://github.com/nodejs/node-core-utils/pull/240


Move ErrorHandler into separated package

After https://github.com/yiisoft/yii-web/pull/325 be merged ErrorHandler can be independent package.

#325 is merged.

@samdark can you please create a new repo?

https://github.com/yiisoft/error-handler


New sanitize functions

MODSEC-146: Need some new sanitize functions that will work with large data...
sanitizeMatchedBytes -- This would x out only the bytes that matched.
sanitizeMatchedBytes:1/4 -- This would x out the bytes that matched, but keep the first byte and last 4 bytes.
This will only be able to work on un-transformed data.  If the data is transformed, then it should result the same as if sanitizeMatched was used.
Others?
Consider that we may add functionality that may alter the response data (i.e. x out CC numbers, etc) in the future.

sanitizeMatchedBytes is already implemented so this can now be closed.


Kit authoring document references undocumented gen operator

AUTHORING-KITS.md reads (please note last line of YAML file content):

Time for an example. If you want your kit to generate a random, 40-character password for the admin account, you can put this in your kit.yml:

credentials:
  base:
    users/admin:
      password: gen 40

gen operator is either undocumented or, more likely, should be replaced with the random operator which is well-documented below.

oops.  good catch!

Fixed!


Question: How to do multiple checks for password validation with Yup and RFH?

I am wondering if there is a way with yup and yupResolver with RHF to do something similar to this:
https://codesandbox.io/s/eager-bush-dfl5t
Basically using this code when a user starts typing into the password field you get separated booleans for each validation criteria which allows you to build an interactive component such as:

Code that I have been playing around with:
....
import { yupResolver } from '@hookform/resolvers';

const passwordSchema = yup.object().shape({
  password: yup
    .string()
    .required()
    .min(8)
    .matches(RegExp('(.*[a-z].*)'), 'Lowercase')
    .matches(RegExp('(.*[A-Z].*)'), 'Uppercase')
    .matches(RegExp('(.*\\d.*)'), 'Number')
    .matches(RegExp('[!@#$%^&*(),.?":{}|<>]'), 'Special'),
});

  const { register, handleSubmit, errors, formState, getValues } = useForm({
    resolver: yupResolver(
      passwordSchema
    ),
    criteriaMode: 'all',
    reValidateMode: 'onChange',
    mode: 'onChange',
  });
....

Which results in:

I was hoping to have types returned like the coding sample so I can flag the realtime critera.
Any help or things in yup would be super helpful.
Thanks!

we do actually support validateAllFieldCriteria https://github.com/react-hook-form/resolvers/blob/master/src/yup.ts otherwise it would be a bug if it's not working.

Thanks @bluebill1049  for the quick reply. Going to try that quickly now to see if that is what I am looking for. Will post here and close out if it works :)

I am pretty new to RFH and Yup looking at the types, I am not seeing validateAllFieldCriteria
// Not Correct
 resolver: yupResolver(
      passwordSchema,
      { validateAllFieldCriteria: true }
    ),```

This is what it is expecting:

```export declare const yupResolver: <TFieldValues extends Record<string, any>>(schema: Yup.ObjectSchema, options?: Yup.ValidateOptions) => Resolver<TFieldValues, object>;```

export interface ValidateOptions {
/**
* Only validate the input, and skip and coercion or transformation. Default - false
/
strict?: boolean;
/*
* Return from validation methods on the first error rather than after all validations run. Default - true
/
abortEarly?: boolean;
/*
* Remove unspecified keys from objects. Default - false
/
stripUnknown?: boolean;
/*
* When false validations will not descend into nested schema (relevant for objects or arrays). Default - true
/
recursive?: boolean;
/*
* Any context needed for validating schema conditions (see: when())
*/
context?: object;
}

I will do some more digging / googling, but just wanted. to let you know what I was trying.

Hey @sngreg! I think if you add abortEarly to the options when declaring the resolver it might solve your problem. It is true by default.
resolver: yupResolver(passwordSchema, { abortEarly: true })

I haven't actually tested it but it seems like the solution to me.

@Mathius17  - Thanks for the suggestion. I did set it to false and am experiencing the same result above, where the password errors will trigger, but only shows one of each "type" so for reference: I have 4 different .matches regex but it only fires the first one.

Hi @sngreg  so yes for the validate all criteria it is the criteriaMode need to be 'all'.
If you abortEarly to true you will only get the first error Property in your schema
If you abortEarly to false you will get all yup errors from every properties.
So your question is more about many errors for only one props, and after investigate it yup only send you back the first error you got from your schema, and if it successfull, it will take the next one ( the next yup validation of the same property ) .
And so yup don't this feature that give you all props errors in an array.
Infortunetly -> https://github.com/formik/formik/issues/243 there is no change today for this :/.

Thanks @Vandell63  - I was afraid this might be the case after all the digging I was doing. I appreciate everyone jumping into this discussion.

You welcome, i think you can close it, and as soon as yup want to add this feature, i'm pretty sure that @bluebill1049  will be already on :) .

@Vandell63  @bluebill1049  - Thank you again for the really quick responses.
Vandell63 - I opened an issue on yup (https://github.com/jquense/yup/issues/975) which it looks like this is not a problem in yup. Here is a very quick sample that shows ALL the errors when we call yup.validate.
https://codesandbox.io/s/nice-brown-61nzg
Notice in the console:
Error - password is a required field,password must be at least 8 characters,Lowercase,Uppercase,Number,Special ```

I believe this something with how RHF or the resolver handles these errors and makes the object to return

Thoughts?

@sngreg  Im so sorry to lead you to the bad way. Effectively yup return an array of all errors ( log on codesandbox an Error class lead me to a weird log  ).
I continue investigate into the yup resolver code.
I already started this -> https://codesandbox.io/s/yup-resolver-with-errors-array-pvph7?file=/src/resolver.js

@Vandell63  no worries at all! Glad we are able to narrow this down. Thanks for starting that, i have narrowed it down to the parseErrorSchema method. It looks like that is where the "BUG" or "FEATURE REQUEST" would be. It is grouping and only saving one of each "type" in the "types" node.
EX:
Parse Inner Reduce ----
PATH: password MESSAGE: password is a required field TYPE: required
PATH: password MESSAGE: password must be at least 8 characters TYPE: min
PATH: password MESSAGE: Lowercase TYPE: matches
PATH: password MESSAGE: Uppercase TYPE: matches
PATH: password MESSAGE: Number TYPE: matches
PATH: password MESSAGE: Special TYPE: matches
This is the start of the inner.reduce, but after what the function returns is:

Which only has one of the "Matches" TYPES

I believe this is where the error is happening, it only appends the latest error of a type:
https://github.com/react-hook-form/resolvers/blob/master/src/yup.ts#L15
Looking at what this does https://github.com/react-hook-form/react-hook-form/blob/173e0c1740108d23101681d79000708c5a2b7778/src/logic/appendErrors.ts#L21
It overwrites the type match with the latest error in the array.
I tested this out adding a random number to type in the resolver and it. "solved" the issue.
I am not sure the best approach to where a permeant should live, is appendError in RFH functioning as intended (not to duplicate types) or is this something we should fix in the resolver?
Thoughts?

thanks for the invitation @sngreg i haven't got time to look too deep on this one, do you have any fix in mind since you already traveled this deep into the code.

Thanks Bill! I don’t have a fix in mind. I know why it is broken but not sure how or where to fix. I know it is the appendError in RHF code.
One thought if we are fixing in resolvers can we build a unique list before appending them, or build our own error list.

@sngreg  Yes this is the case for the appendError, it replace the previous one every time. In my code sandbox link you can see in the resolver file that i have remove the appendError to return the first error if validateAllCriteria is set to firstError. And now i will work on the all from validate all criteria to show you instead a list of error with the same shape of the firstError.
[path]: validateAllFieldCriteria
                  ? // RETURN AN ARRAY OF MESSAGE AND TYPE INSTEAD if it is TRUE
                    [...(previous[path] || []), { message, type }]
                  : { ...previous[path], message, type }

So if you switch to all you will get the error list directly. But i have to investigate the goal of the function transformToNestObject to make it working properly you got it ?

Thanks, @Vandell63 for all the support and investigation. I am really appreciated it here.

@bluebill1049  is totally normal, you are really active and we all like this. And i have to switch from formik to this library ( performance reason ). And no way for me i stay here.
I need to know how react-hook-form handle the yup resolver behind because instead Object error he will get an array of error so it should impact the react-hook-form behind. I continue

@bluebill1049 & @sngreg  I got a working example of @sngreg needs on

https://codesandbox.io/s/yup-resolver-with-errors-array-pvph7?file=/src/index.js
Switch from "all" or "firstError" gave you one or many errors. Must be documented.
@bluebill1049  I don't know if it follow the mindset of what you call the criteriaMode ?
The changes:
Remove the transformToNestObject function
Remove the appendErrors
Refactor the appendErrors to be :

                [path]: validateAllFieldCriteria
                  ? [...(previous[path] || []), { message, type }]
                  : { ...previous[path], message, type }

Et voilà. But im pretty sure that it will work for this issue. I don't know how it could impact into the react-hook-form library. To be tested.

yes i think we can remove: transformToNestObject. can you create a PR and let's do some further testing and see if this impact other stuff or not.

@bluebill1049 same here i will give a try :)

@Vandell63  - Thank you so much, taking a look now to see what you made and trying it out in my application.

@bluebill1049 @Vandell63  This is exactly what I needed. Things are looking good in my application, but I think the way we have this now will introduce a breaking change for people that have coded for the old type:
Now all the fields in the schema return an array of errors (GREAT!) but prior to this change their was the top level error exposed and then an object called types to. see the "partial / broken" list
BEFORE:

AFTER:

So if anyone is display label / field messages for their form it will break because errors.lastName.message now has to be errors.lastName[0].message
One thought to enhance this change and not introduce it as a breaking change would be an object like this
{   email:     message: 'Email  is Required'     type: 'min'     errors: [       {         message: 'Email is Required'         type: 'min'       },       {         message: 'Email is not valid format'         type: ''       }     ] }

Thanks guys. I think we need to keep the same object shape, otherwise, it's a breaking change not just the resolve but he core as well:

@bluebill1049 - So with the thoughts of keeping the object the same, I agree.
We run into issues using the type as the key in types object. Do you think we can keep the object the same and then add on just an errors array or would your thought be to make the keys unique in the types key / value pair like this:
matches-1: 'Special'
matches-2: ' Number'
...

Hey after a diving session into react hook form i didnt find any deps with the props types from the resolver into the core so it could be used easily. It was not documented and maybe could be a soft breaking change for any user which used the types props in errors ( i don't think many of them ).
I have updated the code -> https://codesandbox.io/s/yup-resolver-with-errors-array-pvph7?file=/src/App.js
And it still do the job. What you think about this @bluebill1049  @sngreg  ?

@Vandell63 - this looks great to me! I like that we keep the same object type and just repurpose the types array with “all” the validation criteria.
I am new to this repo, but I think you should make a PUll request with this code and see what @bluebill1049  thinks!
I appreciate all the time, intelligent discussion, and collaboration we all put towards this feature.

@sngreg  thx same feeling.
I can propose at the same time the context at the second argument which is not inject into resolver when user fill the object context into the resolver object ( and not in the yupResolver option ) -> https://github.com/react-hook-form/react-hook-form/issues/2222#issuecomment-658622204 sounds good to you @bluebill1049 with the code change ?

yea totally! thanks for all the investigations. looking forward to your PRs, this is going to help some many developers.

Thanks guys. I think we need to keep the same object shape, otherwise, it's a breaking change not just the resolve but he core as well:

@Vandell63 if we can try to have the same structure is the best, then they are consistent and no breaking changes. 🙏

@bluebill1049 i understand not changing the structure for breaking changes, I guess what would recommend we can do to keep the same structure. Right now in the types object the key has to be unique. This will be a problem with having 4 validation criteria with the key “match”.
So do we appended a number to the end of the key or do we keep the same object, but just add another item to the object called “errors” which is the list of all the errors like @Vandell63 created?

yes, perhaps we can return a match object?
match: {
   xxx: 'xxx',
   yyy: 'yyy',
}

it's probably easier to Type as well.

@bluebill1049  - I am struggling figuring out how we will want to key the matches object
Real Example:
{
  message: "Special"
  type: "matches"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: {

    }
  }
}

So if we are going to have the message be the key and the stringified value, that can be a sentence. Not sure that would be a great key.
The only thing I can think of is something like
matches {
  message1: "Special Character needed" // Dynamic message
  message2: "Uppercase Character needed"
  message3: "Lowercase character needed"
...
}

Thoughts? I still think we should do something like this
{
  message: "Special"
  type: "matches"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: "Special"
  }
  allErrors: [
    {
      message: 'Special',
      type: 'matches'
    },
    {
      ...
     }
  ]
}

doesn't matchees return type and message?

I don't think we will go with allErrors.

So the first error is exposed at the top level:
{
  message: "Special"
  type: "matches"
....

Then the object has a types key which the current way uses the type as the key and the message as a value. The problem we are having is that type matches has multiple messages, so we can't use the type as the key.
What about something like
{
  message: "Special"
  type: "matches"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: [ // type
      'Special character needed', // message
      'Uppercase needed' // message
      'Lowercase needed' // message
      'Number needed'  // message
    ]
  }
}

So the first error is exposed at the top level:
{
  message: "Special"
  type: "matches"
....

Then the object has a types key which the current way uses the type as the key and the message as a value. The problem we are having is that type matches has multiple messages, so we can't use the type as the key.
What about something like
{
  message: "Special"
  type: "matches"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: [ // type
      'Special character needed', // message
      'Uppercase needed' // message
      'Lowercase needed' // message
      'Number needed'  // message
    ]
  }
}

Oh I see, sorry I am missing some content here (without careful read), you are trying to return multiple messages with a single type. perhaps we should have a new messages then.

test: {
  type: 'match',
  messages: [xxx, yyy]
}

Yes, I think we can just return the array of messages in the types object.
What is "test" in your example? Is that a new key to the object?
If we want to keep the object consistent I do like the idea of what I proposed above where the types key is an object that has the type as the key and an [] of messages

{
  messsage: '',
  messages:  [
      'Special character needed', // message
      'Uppercase needed' // message
      'Lowercase needed' // message
      'Number needed'  // message
  ],
  type: "matches"
}

This is what i meant.

II see what you mean, just to add more context, the top level of
{
 // This is just the FIRST error for the field, so it could be any `type` (min, required, matches)  -- This should NOT change
  message: '',
  type: "matches"

  // this is a key value pair where type is the key and the value is the message (we should change value to array of message)
  types: {
  }
}

{
  message: '' // single message
  messages: [] // mutilple message for single type
  type: '', // single type
  types: {} // multiple types for single error and message
}

Okay, I like this, I just dont think we will be able to do
  messages: [] // multiple message for single type
The reason being at the top level which you posted above, the type object is just the first error message so for a password in the schema:
CURRENT
{
  message: "password is a required field"
  type: "required"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: "Special character needed" // only returns 1
  }
}

Your SUGGESTION:
{
  message: "password is a required field"
  messages: [
    'Special character needed', // Type = Match
    'Uppercase needed' // Type = Match
    'Lowercase needed' // Type = Match
    'Number needed'  // Type = Match
    'password is a required field' // Type = required
    'password must be at least 8 characters' // Type = min
  ]
  type: "required"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: "Special character needed" // only returns 1
  }
}

Another SUGGESTION:
Make the messages: [] an object with message and type
{
  message: "password is a required field"
  messages: [
    {
      message: 'Special character needed'
      type: matches
    },
    {
      message: 'Uppercase needed'
      type: matches
    },
    {
      message: 'Lowercase needed'
      type: matches
    },
    {
      message: 'Number needed'
      type: matches
    },
    {
      message: 'password is a required field'
      type: required
    },
    {
      message: 'password must be at least 8 characters'
      type: min
    }
  ]
  type: "required"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: "Special character needed" // only returns 1
  }
}

The reason being at the top level which you posted above, the type object is just the first error message so for a password in the schema:

can you explain above? I thought it's just matter of map the data.

The reason being at the top level which you posted above, the type object is just the first error message so for a password in the schema:

So how the object is currently structured:
{
  type: 'required'
  message: 'password is required'
}

This is just the first / top level error for this field  (say we dont have "abortEarly = false", it would only return this) When we have abortEarly = false it still returns the top validation error that failed (based on the yup schema object and the first criteria to fail in the chain"
export const passwordSchema = yup.object().shape({
  password: yup
    .string()
    .required()
    .min(8)
    .matches(RegExp("(.*[a-z].*)"), "Lowercase")
    .matches(RegExp("(.*[A-Z].*)"), "Uppercase")
    .matches(RegExp("(.*\\d.*)"), "Number")
    .matches(RegExp('[!@#$%^&*(),.?":{}|<>]'), "Special")
});

So if Password is blank, it fails on .required() and the type and message is just for that criteria
So if we have a messages [] - there are still 5 other validations that fail, 4 being of type match and 1 being type min
Therefore if we did a messages array. (which I LOVE) it will just be a list of ALL messages that failed and we would NOT know the type.
Does that make sense?

Yes make sense, the bit it confuses me is if you can have messages like below, why you can't strip those type?
messages: [
    {
      message: 'Special character needed'
      type: matches
    },
    {
      message: 'Uppercase needed'
      type: matches
    },
    {
      message: 'Lowercase needed'
      type: matches
    },
    {
      message: 'Number needed'
      type: matches
    },
    {
      message: 'password is a required field'
      type: required
    },
    {
      message: 'password must be at least 8 characters'
      type: min
    }
  ]
``

We totally can strip the types (I think that is fine and we dont need them, at least I don't)
{
  message: "password is a required field"
  messages: [
    'Special character needed', // Type = Match
    'Uppercase needed' // Type = Match
    'Lowercase needed' // Type = Match
    'Number needed'  // Type = Match
    'password is a required field' // Type = required
    'password must be at least 8 characters' // Type = min
  ]
  type: "required"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches: "Special character needed" // only returns 1
  }
}

The object above works for me, the only thing we. wouldn't be able to do is map the type for all the messages strings. I was just countering a point earlier for based on this comment from you:

messages: [] // multiple message for single type

messages [] will just me multiple messages for ANY type in the above schema? If we are good with that, I think we should change @Vandell63 code and get a PR up :)

{
  message: "password is a required field"
  type: "required"
  types: {
    required: "password is a required field"
    min: "password must be at least 8 characters"
    matches:  [
    'Special character needed', // Type = Match
    'Uppercase needed' // Type = Match
    'Lowercase needed' // Type = Match
    'Number needed'  // Type = Match
    'password is a required field' // Type = required
    'password must be at least 8 characters' // Type = min
  ]
  }
}

what about this @sngreg? just think twice about this, type is important and you are right.

I am just saying it out loud, i need to play with the code to verify by the way.

I do like this and it would solve. my problem of why I raised the question. (Just for anyone following the thread, we. wouldn't have the last 2 messages in that matches array as those are for min and required
So we should have the types key
IF type has 1 message THEN  -- [type]: "message"
ELSE IF type has > 1 message THEN -- [type]: [ "message1", "message2"...]
I like this, one other thought is we could make all values in the types object be arrays
types: {
    required: [
      "password is a required field"
   ],
    min: [
      "password must be at least 8 characters"
    ],
    matches:  [
    'Special character needed', // Type = Match
    'Uppercase needed' // Type = Match
    'Lowercase needed' // Type = Match
    'Number needed'  // Type = Match
    'password is a required field' // Type = required
    'password must be at least 8 characters' // Type = min
  ]

Thinking out loud, making each type an array probably doesn't make sense. I dont think there are many types that will have multiple validation criteria so maybe go with your plan. I just hate having inconsistent types array vs string depending on the amount of messages.

let me think about this issue a bit more. thanks a lot for your input @sngreg

Thanks @bluebill1049 looking forward to what you come up with :)

Thanks @sngreg it's going to be one of those options that we discussed. Just try to pick one that makes most of the sense and developer-friendly.

Perfect, I will code for that in my repo and make a custom resolver until we get a fix in :)

Let's go with this  @sngreg @Vandell63. 👍
type Message = string;
type TypeName = string;

type ValidateResult = Message | boolean | undefined;

type FieldError = {
  "type": TypeName, // no chnage
  "message": Message, // no chnage
  "messages": Record<TypeName, ValidateResult[]> // new
  "types": Record<string, ValidateResult>, // no chnage
}

i will create a PR at the core as well for this.

Thanks @bluebill1049 i like this plan! Thanks for all the thought and making the PR! Excited to get this enhancement in this awesome repo!

Woaw guys 20 messages missing :) . Great let's do this. Do you want me some helps or modify the codesandbox or all goods  ?

@sngreg  @bluebill1049  I have update the codesandbox -> https://codesandbox.io/s/yup-resolver-with-errors-array-pvph7?file=/src/App.js
And it work as expected BUT the ui refresh only when one of types has been remove or added SO:
If you tested, special message still as soon as all special message are resolved.
You can find the Yup errors in the logs to see all yup errors updated correctly.
What you suggest ?

@Vandell63  Thanks! This is functioning how I would expect it to function!
@bluebill1049 - Not to throw a wrench into our solution, but we might have an issue with types adding messages
const { errors } = useForm<T>();

// errors type = DeepMap<T, FieldError>

// Type that is from RHFs
export declare type FieldError = {
    type: string;
    ref?: Ref;
    types?: MultipleFieldErrors;
    message?: Message;
};

@sngreg  this preparation ? -> https://github.com/react-hook-form/react-hook-form/pull/2247

Thanks @Vandell63  -  Bill's always one step ahead of me!

@sngreg  i think we have to wait for a decision and the PR too to be sync on . And take in mind that the ui do not refresh on new yup errors from the same types. It work when message was a Array. So the current example refresh the ui if one of the key appear or disappear base on yup errors.
Wating here you final though and decision @bluebill1049  @kotarella1110  :)

Thanks @Vandell63  - In my use case, I will need the UI to refresh to give live feedback on the password criteria. I agree, lets see what Bill and Kotarella1110 has to say in RFH and then work on our solution

@bluebill1049 @Vandell63 - looks like the PR is merged in RHFs (thanks for doing that) -
Bill - would you like us to submit a PR to this repo now with the final structure that we talked about using types and message arrays? I still think this resolver should return an array for every message in the types key (like we were going to do for messages)

let's follow this, unless if there is anything that we are missing.

@Vandell63 okay that works, so basically, the type is the key and if there is only one message it is
But if multiple messages it is
That works for me, I just like to be consistent as possible with value types but works for my scenario

@sngreg  I saw that the types are merge to rhf but for this repo nothing has change yet right ? Or am i missing something
@bluebill1049  @kotarella1110  thx for your time :)

@Vandell63 based on looking at open / closed PRa nothing has changed. That being said not sure if bill or kota are working in it?

@sngreg please create this PR 👍
We will review the PR you created.

@Vandell63 do you have a PR started, if not I can look into making one. (I don’t want to duplicate the efforts)

looking forward for the PR. thanks 👍

@sngreg  sorry not yet, do want me to give a try ?

@Vandell63 if you have time today sure. I looked at the code sandbox and I think we are almost there. I am using the latest code sandbox and was working as intended.

@sngreg  @bluebill1049  i let you video instead of hundred of wording.
https://www.loom.com/share/d561dd07ce9948e489d881d2bd62e1c5
I will start the pull request tomorrow if it sounds good to you ;).

@Vandell63 thanks for making the video and the code! This looks great to me. Looking forward to the PR!

@bluebill1049  @sngreg  there we go -> https://github.com/react-hook-form/resolvers/pull/32

@sngreg  are you happy with the new release 0.1.0 ? If yes we should maybe close this issue ?

@Vandell63  Yes! Everything works great! Thanks @Vandell63 / @bluebill1049 / @kotarella1110  for the quick work and the release. Closing this issue out.

I think it's because of https://github.com/react-hook-form/resolvers/commit/fe53179542b1fcda27df7427d61cca3c9965c2f9#diff-1c9dbc45c6880a5a6b5aef346c662825aa881277d91717d88cd8aae0cd35bcc4.
Looking forwards for your update.

Hi @codemaster115
Can you share a codesanbox with your problem please ?

Hi, Joris. Thanks for your quick reply.
https://codesandbox.io/s/react-hook-form-basic-forked-60bno?file=/src/index.js
React Hook Form - Basic (forked) - CodeSandbox
This is example with my problem.
Kind Regards
Jason
On 13 Apr 2021, 15:29 +0100, Joris @.***>, wrote:

Hi @codemaster115
Can you share a codesanbox with your problem please ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks for the codesandbox @codemaster115
I've opened a new issue, I'll fix it soon
The issue: https://github.com/react-hook-form/resolvers/issues/155

Thank you, @jorisre


Design: Miner power graph

The blockchain team expressed the need for a miner power graph to be able to demonstrate how decentralized our network is. The miner power data would come from annotations inside Coinbase transactions (from the last 24 hours' worth of blocks).
Compared to other Explorer mainnet design tasks, this seems lower in priority.
Examples:
- https://www.blockchain.com/charts/hash-rate
- https://www.blockchain.com/charts/pools
- https://www.etherchain.org/charts/topMiners

https://www.figma.com/file/31q1g27k69z1yXb6r6vrRD/Explorer?node-id=1882%3A18930


ipfs: default to not listen on the local network

Motivation for this change
ipfs listens by default to addresses on private networks. It does port scanning which doesn't sit well with some server providers.
This PR introduces sensible default for addresses not to scan to not be banned.
the list is coming from here https://github.com/ipfs-search/ipfs-sniffer/commit/4a7c4441fc9039ce96edffc6ab30d08ac4c2a5f6
the setting details are available here https://docs.ipfs.io/how-to/configure-node/#swarm
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

@Luflosi @kevincox you might be interested by this PR.

Why is this needed anyways? Setting services.ipfs.localDiscovery to false already executes ipfs --offline config profile apply server before starting the daemon, which adds this list automatically. The documentation of that NixOS option also states

Whether to enable local discovery for the ipfs daemon. This will allow ipfs to scan ports on your local network. Some hosting services will ban you if you do this.

I did miss that option. How about setting that default to false ?
I'm going to test it.
Perhaps adding in the description to not enable this if you are using a cloud provider.

I'm testing this on my server. If I don't receive a message from the hosting provider within the next few days then it should be good.
My preference would be to just disable this by default.

I'm fine with changing the default of that option.

Cool, let me switch this to just changing the default then.

Ok I just changed the default.
Let me know if you have any objections. (going to sleep now, but planning to merge this tomorrow unless there are objections).

I suggest also changing the title of the PR so it matches the commit message.

no problem.
I don't mind waiting a bit longer.

The advantage is that if you have multiple IPFS nodes on your network they can discover each other and share data without going over the internet.

Just added it to the docs, happy to wait one more day.


Unable to chain find_by_css().find_by_text() with 0.9.0

https://github.com/cobrateam/splinter/issues/426 seems to have resurfaced in 0.9.0.
With 0.8.0, browser.find_by_css(".onboarding-modal").find_by_text("Slack") finds one element on my site, but 0.9.0 returns none.
I think https://github.com/cobrateam/splinter/commit/1cfd05086a5ccb1c3297072e2bc0e713e71b2156 is the commit that changed this behavior.
I can try to find a reproduceable example on a public site if necessary.

Can I help with this one @jacebrowning ?

Thanks! @jacebrowning I will install and follow the tutorial first, If I am facing something that I don't know I will contact you

@rubiagatra do you want to get the bounty for solving the problem? @Naggertooth volunteered to solve the task, but because you were first in the comments, maybe you're already halfway there and I would award the bounty to you.

Tengo un poco de dudas respecto al proyecto, podría ponerme en contacto contigo?

I see there is no progress on this, so I'll try to fix it. I have some ideas to try.

hey @super-oleg - it looks like you've closed this out -> do you mind cancelling the bounty? https://gitcoin.co/issue/cobrateam/splinter/628/1376


[MM-38832] Update Run overview automatically

Summary

This Pull Request updates the retrospective, set of status posts, description, timeline and status of run in real time for page playbooks/runs/{run_id}/.
Ps. It took some time to understand the codebase and find the right selector to use.
https://user-images.githubusercontent.com/43992469/143416674-9a796f1b-14ca-4a88-99e9-1d380dc5b73d.mp4
Ticket Link

Fixes: https://github.com/mattermost/mattermost-server/issues/18568
Checklist

~[ ] Status of Run~
~[ ] Description~
~[ ] Overview~
~[ ] Retrospective~
~[ ] Timeline~
~[ ] Add Screenshots and gif to pull request~
[ ] Ask the team about race conditions during Retrospective Edit. (Currently while editing, the retrospective does not change if a socket action is triggered.)

Hello @shadowshot-x,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@cpoile @iomodo Any further review? I have pushed some new commits to match the existing repository changes.

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!
/cc @aspleenic

No issues @cpoile. Glad to help :D


Events & Actions 🌶

this is a restart of: https://github.com/fastlane/fastlane/pull/9000 (man i loved to get that number ❤ )
in my months off, i had to work on a couple of wordpress related things, no matter what one may think about the code quality over there, and their concepts and so on 🙉 🙈 🙊
the concept of filters and actions, to quickly adopt core parts is amazing.
with this PR i am trying to bring in the basics for a filter/action model.
here is a fictional sample (users might add this to their plugin, or directly to the fastfile itself):
# register an action
Fastlane::Events.add_action("some_action", 101) do | name,payload |
    puts "ACTION: #{name}"
    puts "PAYLOAD: #{payload}"
end

# register a filter:
Fastlane::Events.add_filter("some_filter", 100) do | name,value |
    puts "filter1: #{name}"
    puts "filter1-value: #{value.inspect}"
    value[:b] = 2344; #new one_off
    value[:a] = "X" # changed
    value
end

multiple filters/Actions can be registered and ordered by prio. an action is a "as is" call, like "gym build is done" - a filter is a method for overriding values. (e.g.: "config_items_parsed")
we then can add calls to the actions/filters as follows (plugin authors can do this too, and even invent custom filters/action names):
### FILTERS
# code yada yada
go_on_with_this = Fastlane::Events.do_filter("some_filter", :b => 2)
if go_on_with_this[:a]
  puts "whoop whoop some filter intercepted"
end
# code yada yada

### ACTIONS
# code yada yada
Fastlane::Events.do_action("some_action", :b => 2)
# return value is not needed as its an informational call.
# code yada yada

next steps:

define a set of standard filters/actions.
add rspec for it.
add sample plugin

for quickly testing this pr use this :lane  in your fastfile:

lane :demo do
  Fastlane::Events.add_action("some_action", 101) do | name,payload |
    puts "ACTION: #{name}"
    puts "PAYLOAD: #{payload}"
  end

  Fastlane::Events.add_action("some_action", 102) do | name,payload |
    puts "ACTION1: #{name}"
    puts "PAYLOAD1: #{payload}"
  end

  Fastlane::Events.add_action("some_action", 100) do | name,payload |
    puts "ACTIONTOP: #{name}"
    puts "PAYLOADTOP: #{payload}"
  end

  Fastlane::Events.do_action("some_action", :a  => 1)

  Fastlane::Events.add_filter("some_filter", 100) do | name,value |
    puts "filter1: #{name}"
    puts "filter1-value: #{value.inspect}"
    value[:b] = 2344; #new one_off
    value[:a] = "X" # changed
    value
  end

  Fastlane::Events.add_filter("some_filter", 100) do | name,value |
    puts "filter2: #{name}"
    puts "filter2-value: #{value.inspect}"
    value
  end

  Fastlane::Events.do_filter("some_filter", :b => 2)
end

Results in:
INFO [2018-01-13 12:30:27.96]: Driving the lane 'demo' 🚀
INFO [2018-01-13 12:30:28.03]: ACTIONTOP: some_action
INFO [2018-01-13 12:30:28.09]: PAYLOADTOP: {:a=>1}
INFO [2018-01-13 12:30:28.17]: ACTION: some_action
INFO [2018-01-13 12:30:28.23]: PAYLOAD: {:a=>1}
INFO [2018-01-13 12:30:28.29]: ACTION1: some_action
INFO [2018-01-13 12:30:28.38]: PAYLOAD1: {:a=>1}
INFO [2018-01-13 12:30:28.43]: filter1: some_filter
INFO [2018-01-13 12:30:28.51]: filter1-value: {:b=>2}
INFO [2018-01-13 12:30:28.58]: filter2: some_filter
INFO [2018-01-13 12:30:28.64]: filter2-value: {:b=>2344, :a=>"X"}

Hey @hjanuschka, it has been quite some time, but I think this still might be worth merging.
Can you please explain a bit more what exactly this is, how it works and why one would want to use it to do what exactly?
Maybe this is a thing we are all waiting for, without exactly knowing it. To me this currently looks like a "hooks" system of some way?
Thanks.

Hey @hjanuschka - I am going through all fastlane PRs right now to clean up our PR list and I will close this one.
I totally like the idea and implementation, but as it has been sitting here for more than 1.5 years the need for it doesn't seem to big. It might be a nice new feature in the future though, so I am happy that we have a "Far future Fastlane" milestone (soon project) that we can use to collect all the interesting PRs and issues.
Thanks so much for your effort, and I hope this code will be used in fastlane one day.


When the host doesn't have openssl...

When the host doesn't have openssl, embed a statically linked copy of it in the script?
Bonus points for making it work on multiple architectures.  (It's a shell script, so...)
Anyway, thanks for your work, @vbezhenar.  Now we can all act like fictitious movie hackers. :)

I want it to be cross-platform and a statically linked copy means that it'll work only with Linux (or whatever system that binary was compiled for, including specific architecture). Also it's one thing to run not so big script and another thing to run some unknown binary which happens to be named openssl. Who knows what it really is?
OS X includes copy of openssl in the base system. Many Linux distributions and some BSD systems too. So I don't think it has many use-cases. User always can do "apt-get install openssl" or something similar and it's much better than running binary from the script.
For such a system it would be better to create a completely different program which will generate small statically linked binary file with necessary algorithm implementations included (RSA, AES do not require that much code) so it won't depend on anything at all (except operating system and architecture, of course).
Thanks for your kind words, I appreciate it. I hope, this project is useful.


Switch e2e/matmul tests on vmvx+ukernel to data-tiling

This is part 5/9 of #11755: Finish the transition to --iree-flow-enable-data-tiling.
This switches the last holdout e2e tests that were exercisting the old mmt4d pass, making it unused.

Would be great to get a bit more detail in the description of why this change is happening. Some of us haven't been following along very closely :-)

Would be great to get a bit more detail in the description of why this change is happening. Some of us haven't been following along very closely :-)

+1 - would love to get a status/update in the new year about how all of this is coming together.

Would be great to get a bit more detail in the description of why this change is happening. Some of us haven't been following along very closely :-)

Good point! Filed #11755 with an overview and referenced it in all 9 PRs implementing that. Does that answer the basic questions?


Extend the Context with an ExecutorService

Different approaches should be possible

User can inject his own executor service into the Context
The Context needs to create its own ExecutorService if none is provided

This ExecutorService is needed for

DigitalOut Blink
DigitalOut Pulse

https://www.baeldung.com/java-executor-service-tutorial

Multi-threaded capability and implementations of the asynchronous APIs would be a terrific step forward!
I assume this would require some non-trivial changes to provide the necessary thread safety, correct?

Indeed @tcfurrer will have some impact. I have been looking into this in the past.
It would all start with defining the ExecutorService in the context
https://github.com/Pi4J/pi4j-v2/blob/develop/pi4j-core/src/main/java/com/pi4j/context/Context.java
And could be used to handle for instance thread actions like pulsing a LED
https://github.com/Pi4J/pi4j-v2/blob/develop/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBase.java#L102
These are only a few first steps and to be further investigated where and how such multi-threading should be applied.
Here would be an ideal place to discuss this functionality.


Adding internationalization

Support for

English
German
Russian

With menu to toggle between languages

Thanks for the PR 👍

can you please convert these to YAML instead? you can use this site to convert JSON to YAML. https://www.json2yaml.com/
should we also import this library inside the application (CLI)? if yes maybe we can have CLI argv option as well (default english) and have some tests in github CI to check the outputs.

thoughts?

yes we can use YAML it will be more clean.

for the CLI part i will take a look

@Ali-Razmjoo. @dhirensr  Please review

ignore the error in regard of credential events; we fix that in elasticsearch branch


CMake not finding vcpkg installed libraries

Describe the bug
While trying to build a PCL .cpp project, CMake does not find any installed libraries, even when using the toolchain file.
Environment

OS: Windows
Compiler: CMake, VS2019

To Reproduce
Steps to reproduce the behavior:

./vcpkg install install pcl:x64-windows-static
./vcpkg install integrate
create .cpp file and CMakeLists.txt in a new Folder
build using cmake ( either normally or with  -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake command)

My CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
project("D:/Projekte/WattX/Tech in Contruction/PCLViewer VS/PCDWrite")
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(pcd_write_test pcd_write.cpp)
target_link_libraries(pcd_write_test ${PCL_LIBRARIES})
Expected behavior
CMake should finish building successfully
Failure logs
CMake Error at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:288 (_find_package):
By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "PCL", but
CMake did not find one.
Could not find a package configuration file provided by "PCL" with any of
the following names:
PCLConfig.cmake
pcl-config.cmake

Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files.  If "PCL" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:7 (find_package)
-- Configuring incomplete, errors occurred!
Additional context
I was following this tutorial from the official PCL documentation
http://pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php

Closed as duplicate of #6190.


Doesn't work with Beta 15.3

As the title really - if this is installed in the latest beta (15.3) then selecting the options from the menu doesn't do anything, the dialog doesn't popup.

Visual Studio Mac 7.1 from the beta channel has an updated the version of NuGet it uses. Everytime NuGet updates the NuGet extensions addin breaks.
The NuGet extensions addin 0.12.3 below works with Visual Studio for Mac 7.1:
https://github.com/mrward/monodevelop-addins/blob/gh-pages/7.1/MonoDevelop.PackageManagement.Extensions_0.12.3.mpack


Add generalized KEM public_key/ciphertext send/receive functions

Please note that while we are transitioning from travis-ci to AWS CodeBuild, some tests are run on each platform. Non-AWS contributors will temporarily be unable to see CodeBuild results. We apologize for the inconvenience.
Resolved issues:
N/A
Description of changes:

Adds five new KEM functions to generalize the sending and receiving of PQ public keys and ciphertexts:

s2n_kem_send_public_key()
s2n_kem_recv_public_key()
s2n_kem_send_ciphertext()
s2n_kem_recv_ciphertext()
s2n_get_kem_from_extension_id()

Integrates these functions into the current PQ-TLS1.2 KEX code.

Call-outs:
This is a forward-looking change; the intent is to easily reuse the new functions for PQ-TLS1.3.
Testing:
Unit tests (both happy and sad cases) added for all functions
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #1922 into master will decrease coverage by 11.35%.
The diff coverage is 63.46%.

@@             Coverage Diff             @@
##           master    #1922       +/-   ##
===========================================
- Coverage   81.15%   69.80%   -11.36%
===========================================
  Files         230      229        -1
  Lines       17371    17265      -106
===========================================
- Hits        14097    12051     -2046
- Misses       3274     5214     +1940


Language specific resource settings are not resolved for files opening right on startup

I've made a language extension, that sets "files.encoding" to cp850 and has a definition for which file-extensions this extension should be used.
It seems everything is working fine as long i open my files from within VSC or if VSC is already running and i double click on a file e.g. from desktop.
If VSC is NOT running and i open the same file from e.g. desktop, it sets the language mode (lower right) correct, but the encoding is not set to cp850.
I also tried to overrule the settings with customer-specific settings for my language

but when i reopen vsc by double clicking on a file this wont work either - if i see it right, vsc seems to "think" there is a comma at the end of my string..

...but there is no comma...

How can i bring VSC to open a file with the correct encoding used by my extension? I dont want to set it by default, because i want to use VSC also for javascript with UTF8...
Thanx
Roman

VSCode Version: 1.19.0-Insider
OS Version: Windows 10

At first I thought this was a general problem with our config, but it is not (removing the "important" label again).
The issue is that textResourceConfigurationService.getValue is called early enough on startup that the extensions are not being parsed yet and as such the markdown extension is not contributed yet.
I verified that this issue exists in stable, so it is NOT a regression from us moving the extension host starting to a later phase.
I am not sure about how to fix this unfortunately.

@bpasero & @sandy081 the strange thing on this topic is also, the point with the "comma" when i try to set "language related settings" and overrule the encoding this way.  it seems those settings are also not working this way.
Looking forward to hear from you guys.

@bpasero Yes, by the time we get the encoding value extensions are not read as a result languages are not registered. Hence non-language overridden values is being read.
I see listening to configuration change event is also not helpful here.

@Raydir A trailing comma should not have any impact. Please let us know the scenario that is not working with trailing comma. Also, please file a new issue for that. Thanks.

@sandy081 i'm not sure if the trailing comma is a problem - i just tried to force the encoding by calling the encoding for my language by that setting. I see that you an @bpasero, found a reason why the encoding isn't used, so i forget about the "comma issue" since that seems to be related.

I think this issue is not specific to file-encoding but will occur for any resource setting potentially simply because by the time we resolve the settings we do not have any language specific setting resolved.

I agree @bpasero

by the time we resolve the settings we do not have any language specific setting resolved.

Just to be clear, It's languages that are not registered.

what you mean by "registred"?
My language is shown in the lower right panel... so it looks like the "language itself" is registred at that moment...

Just to be clear, It's languages that are not registered.

Yes. Because that only happens when the extension host has scanned all extensions and for performance reasons we do not want to wait on that. I think for some settings we might be able to mitigate this issue by updating the config after the languages have been resolved and we find out that the opened editor matches a language with specific settings. But for things like the encoding it would not help because the file is already opened...

Any updates on this? Any workarounds? I failed to set json to "editor.tabSize": 2. This is driving me crazy. I can not edit json file in vscode now. Please let me know if there is a workaround. Thanks a lot.

I have this issue too. Is there a workaround until this is fixed? Changing the default encoding in Settings is not helpful. Thanks.

Is this a joke ? vscodebot closes serious issues and all its related like #122632 ? Does it sound normal to ignore bugs during four years ?
One can mess with big problems if he begins to write and save a file with the wrong encoding when previously saved with another encoding.
For instance. These settings ↓ are not enforced. When a bat file encoded with cp850 is opened while VSCode is not currently running, the file is opened with encoding tis620. It seems it tries to autoguess encoding while I specifically tell it not to do so.
	"[bat]": {
		"files.autoGuessEncoding": false,
		"files.encoding": "cp850",
		"files.eol": "\r\n",
	},

How do we get priority on this issue? It's really annoying.
If it's really because the extension host has to scan all extensions and for performance reasons we do not want to wait on that, then why not trying to solve this by a configurable setting. I could live with a small delay when opening a file with vscode. This delay would only occur if vscode was not opened before.

@bpasero is it possible to look into this issue again? This is a blocker that keeps VSCode from being adopted at our company and we would really love to get away from SciTE. I'm happy to answer any questions.

Yeah, one question would be how it is possible that this bug blocks a company from using VSCode? What is the scenario that fails and requires devs to use a different editor or IDE?

@Lisoph a possible workaround:
open the folder that contains the files and not a specific file.
This way the settings are already loaded when you open a specific file within by pressing e.g. "F1".

@bpasero thanks for the quick reply. I'm aware this isn't typical nowadays, but here it goes:
We're working with ERP software that always encodes source files in Windows-1252 (for historical reasons). In conventional software projects, you have a source directory from which you build or run your artifacts. This ERP however treats source code as an asset that is attached to some component - kind of like how scripts are attached to GameObjects in Unity. Unlike Unity, to edit you click a button and it invokes your editor by launching a process with a temporary copy of the file (which is beamed back to the mothership after you're done with it). We're not the vendor of the ERP, so we can't change this behavior. (@Raydir your workaround doesn't work for us for this reasons - thanks for the help).
The problem stems from our developers not necessarily having VSCode up and running when beginning to edit code. In that case, VSCode is freshly launched and inevitably the file opens in UTF-8. If the developer doesn't catch this, they're going to destroy the source on save - documentation, string literals and some identifiers. This has happened before and this is what blocks adoption.
Currently I'm the only dev using VSCode and, like a maniac, I make sure that I've manually launched it before clicking the edit button of death. As you can imagine, this is error prone. I've had conversations with consultants (from other companies) who would loved to switch to VSCode, but I had to turn them off for this reason.
Another workaround was to set Windows-1252 as the global default. This does work, but then we have the same problem when editing UTF-8-without-BOM files. Yet another workaround was to turn our temp source directory into a workspace and to set Windows-1252 as a workspace setting, but sadly this didn't work either, VSCode defaulted to UTF-8.
To summarise our problem:

VSCode is always invoked for every edit with a temporary Windows-1252 file.
VSCode is not guaranteed to be up and running (manaually launched). It might be a fresh start, which enables the bug described in this issue.

@Lisoph for me to understand: when the file opens you are basically in a "empty" VSCode window with just the file right? Empty is indicated in a different background color of the status bar:

I am not sure how even the current way settings work would help here because in this model:

you are not in a workspace, so workspace settings do not apply
there is no way to globally configure an encoding for a specific file path (files.encoding is always global for all or workspace specific)
you cannot really tell VSCode on startup which encoding to use

Is that accurate? My gut feeling is that even with a possible fix for this issue, the experience would still not be nice unless you force users into a workspace all the time.

for me to understand: when the file opens you are basically in a "empty" VSCode window with just the file right? Empty is indicated in a different background color of the status bar:

Yes, VSCode is launched as a "blank" window, just with the requested file loaded - same status bar color.

you are not in a workspace, so workspace settings do not apply
there is no way to globally configure an encoding for a specific file path (files.encoding is always global for all or workspace specific)
you cannot really tell VSCode on startup which encoding to use

Is that accurate?

Sounds about right. 1: All files land in the same dir, which we can turn into a VSCode workspace, that was a workaround we tried, but the last time I tested this it did not change VSCode's behavior. Because workspace or not, VScode is invoked the same (just for the file and not the folder). Or am I wrong and should that work? 2-3: Yes, unless VSCode has some settings that can do this, that I'm not aware of.
I also should've mentioned I'm using the following settings, sorry about that:
"window.openFilesInNewWindow": "off",
"window.restoreWindows": "none",

This is to reuse the already open window when editing multiple files and to not reopen closed (dead) temporary files.
VSCode is invoked as code -w -r

My gut feeling is that even with a possible fix for this issue, the experience would still not be nice

Besides the encoding, it's not that bad actually. Our ERP's language and tooling is so bizarre that VSCode just acts as a "dumb" text editor with syntax highlighting anyway. We have what we need (in-house extension) and what we're missing is fundamentally impossible, because the ERP doesn't support it. For all our other VSCode needs we're using it in a sane way, so that works out well.
Since the VSCode extension for the ERP language is developed in-house (should've mentioned that too, sorry), is there a way to programmatically switch to Windows-1252? This is something I've researched but I couldn't find an API for it at the time. I assume this hasn't changed?
I'll look into the issues you've linked.

@Lisoph if you can control how VSCode is opened, you can force it to open the workspace and then the file via:
code -w -r <the_folder> <the_file>

Then when you can configure workspace settings for that folder, it should work.

I have pushed an attempt to resolve this, see https://github.com/microsoft/vscode/issues/127936#issuecomment-1084514937

@Lisoph can you maybe give your scenario a test from the newly released insiders version of today where a fix is included:
You can give our preview releases a try from: https://code.visualstudio.com/insiders/
To clarify: it should work when an encoding is configured in settings for the language of the file in question.

@Lisoph if you can control how VSCode is opened, you can force it to open the workspace and then the file via:
code -w -r <the_folder> <the_file>

Then when you can configure workspace settings for that folder, it should work.

Wow! This did it, it's working now. I would've never thought of this, yet it's so obvious! Thanks so much!

I have pushed an attempt to resolve this, see https://github.com/microsoft/vscode/issues/127936#issuecomment-1084514937
@Lisoph can you maybe give your scenario a test from the newly released insiders version of today where a fix is included:
To clarify: it should work when an encoding is configured in settings for the language of the file in question.

I'll give it a shot (without the workspace) - will let you know.

Thanks!

@bpasero Sorry for the wait, been busy with work.
So I've tested your changes with 1.67.0-insider (e7c6ad74aff28965d0189ca1dd584f5e9829cf06) and it looks like it's working!
I tried out two methods for providing the language specific encoding:

I copied over our ERP-extension, which contributes some default settings for the file type, including encoding. Besides some workspace trust things, I did not change or add any settings.
Not using our extension this time (empty extensions folder), I added files.associations and the lang-specific "files.encoding": "windows1250" to settings.json. Besides workspace trust, no other settings were touched.

For each method, I tested the following two scenarios and I made sure the files were not opened with the workspace "trick" you mentioned last time:

Invoke VSCode with a file when it is already running (empty window, no folder / workspace).
Invoke VSCode with a file when it is not yet running (launch VSCode in the process).

The ERP files were always correctly opened in Windows-1252. Other files retained the default encoding and were opened in UTF-8.
Looks like a job well done!

Thanks!


Caching per-request token on flask.g is problematic

In https://github.com/lepture/flask-wtf/commit/653f662306b65b81e301cae45e42474cd1652609 a change was made to start caching the csrf_token on flask.g instead of flask.request.  However, flask.g is application level in scope since v0.10:

Starting with Flask 0.10 this is stored on the application context and no longer on the request context

http://flask.pocoo.org/docs/0.12/api/#flask.g
This makes it impossible for subsequent requests to work with the CSRF token because once the token has been generated for an application instance, and saved in that request's session, no other subsequent requests will cause a session to be generated, thereby preventing CSRF from working for things like form fields.

See this commit for a test case that exposes the bug.

An application context is generated per request. So this should not change anything.

Ok, so I may be wrong on understanding the scope of flask.g, but the tests on my PR:
https://github.com/lepture/flask-wtf/pull/302/files#diff-93d2b8546b1110e297d3eee61336f255
Show there is some kind of bug involved.  If you keep the test but remove the code changes, the test fails (and I don't believe it should).

That's because you are manually re-using an app context.

Wow, I've completely misunderstood the nature of the app context for years.  I thought that it should be present as long as the app instance was present.  Having now read the docs on Flask's app context, I understand my problem.  I'll have to rethink how I'm doing testing in Keg, since that is really where my problem is.


Introduce structure for domains, systems and resources

This PR documents the basic structure of domain, system and resource entities based on the discussions in #3765 and other places. The idea is to go with a minimal set of fields for the beginning and extend this later. This is especially visible for the resource entity, which is kind of a placeholder right now. This also introduces a new partOf/hasPart relationship.
Some things that are up for a discussion:

We added an owner to every new entity. We think as someone is creating the entity there has to be an owner. We think that it is valuable to know who is the owner of a domain. This might be the expert with the domain knowledge that can assess requirements or design solutions. From our understanding that might relate to a "tribe" in the Spotify model. For resources there need to be an owner responsible for managing the resource.
This issue is something unrelated to this PR, but part about owner states: "Apart from being a string, the software catalog leaves the format of this field open to implementers to choose". Shouldn't it state that it has to be the name of a group or user entity? => This is now solved by the new table for entity references.
Beside the separate system and domain property, an array partOf would be an alternative that could reference other entities by name (and kind!) like partOf: ["Domain/artists", "System/artist-engagement-portal"]. This would be more generic, however removes the restriction of belonging to a single system or domain, not sure if we want to do that. The one with separate properties is more explicit (and would also allow multiple system and domains to if we choose and array instead).
The type examples for resources could be better. We wonder how generic or specialized the term would be: Is it a database, a postgres-database or even a amazon-rds-postgres? I think we could come up with some better examples :laughing:

We would be interested in the feedback of @freben once he is "back in the office" :wink:.
This PR ONLY introduces the documentation, the implementation is provided once we settled on the exact structure. Implementation should contain:

type definitions
validation rules
relationship emission

This PR is based on previous work from #1951. Documentation only and doesn't need a changeset.
:heavy_check_mark: Checklist

[ ] A changeset describing the change and affected packages. (more info)
[x] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)

Not sure how to best "flip" that wording.

Maybe we just use reuse component X dependsOn resource Y here?

Not sure how to best "flip" that wording.

Maybe we just use reuse component X dependsOn resource Y here?

Maybe we just use reuse component X dependsOn resource Y here?

Ah yeah ... That may be the right choice here. The wording is good in a spoken English sense. It isn't overloaded at this point, and I can't at least right now think of ANOTHER way that you would like to "depend on" a resource other than calling out to it and being in need of it to function.

Maybe we just use reuse component X dependsOn resource Y here?

Ah yeah ... That may be the right choice here. The wording is good in a spoken English sense. It isn't overloaded at this point, and I can't at least right now think of ANOTHER way that you would like to "depend on" a resource other than calling out to it and being in need of it to function.

I update the images to dependsOn for now. I would still see this open for changes, I don't plan to implement anything related to relations for resources. I would start with creating the resources and ingesting the other relations.

I update the images to dependsOn for now. I would still see this open for changes, I don't plan to implement anything related to relations for resources. I would start with creating the resources and ingesting the other relations.

Nice. This looks mergeable to me.

Nice. This looks mergeable to me.

Looks great! Only other thing I would consider is if we want to skip on manually declaring providesApi and consumesApi for systems for now? We could just start with assuming that a system provides and consumes the combined set of all of its components?

Looks great! Only other thing I would consider is if we want to skip on manually declaring providesApi and consumesApi for systems for now? We could just start with assuming that a system provides and consumes the combined set of all of its components?

Looks great! Only other thing I would consider is if we want to skip on manually declaring providesApi and consumesApi for systems for now? We could just start with assuming that a system provides and consumes the combined set of all of its components?

Not sure if I would do that. Team should explicitly be able to choose which APIs are "public" or exposed by a system.

Looks great! Only other thing I would consider is if we want to skip on manually declaring providesApi and consumesApi for systems for now? We could just start with assuming that a system provides and consumes the combined set of all of its components?

Not sure if I would do that. Team should explicitly be able to choose which APIs are "public" or exposed by a system.

@Fox32 For APIs that are not "public", we could also not track them in Backstage at all. Or have a visibility attribute on the API entity (like private, system, public, ...). But either should work.

@Fox32 For APIs that are not "public", we could also not track them in Backstage at all. Or have a visibility attribute on the API entity (like private, system, public, ...). But either should work.

"public" is probably not the right term. I mean a team explicitly decided to expose an API from their system for other system or teams to use.

For APIs that are not "public", we could also not track them in Backstage at all.
I don't think that this is a good idea. If my team has an internal API, we still want to take advantage of features that are related to APIs, like viewing the documentation or having monitoring integrations.

For consumesApis on system we could also have a different logic: We could list all APIs that are consumed by components in a system that are from different system.
For providesApis I would prefer to go with a relation instead of adding an additional field to the spec.

"public" is probably not the right term. I mean a team explicitly decided to expose an API from their system for other system or teams to use.

For APIs that are not "public", we could also not track them in Backstage at all.
I don't think that this is a good idea. If my team has an internal API, we still want to take advantage of features that are related to APIs, like viewing the documentation or having monitoring integrations.

For consumesApis on system we could also have a different logic: We could list all APIs that are consumed by components in a system that are from different system.
For providesApis I would prefer to go with a relation instead of adding an additional field to the spec.

@Fox32 If we expose APIs using providesApis on the system level, it will only work for APIs that are part of a system though. Which is currently optional. So you'll need to group your APIs into systems to be able to explicitly mark them as exposed (or not exposed). As far as I'm aware, we are aiming to do that for most of the Spotify APIs anyway so it wouldn't be a big issue for us. But might be a consideration depending on how confident we are that we can get other users to adopt the system abstraction.
And agree re: consumesApis, would be nice if it's aggregated automatically. Less opportunity for it to go out of sync.

@Fox32 If we expose APIs using providesApis on the system level, it will only work for APIs that are part of a system though. Which is currently optional. So you'll need to group your APIs into systems to be able to explicitly mark them as exposed (or not exposed). As far as I'm aware, we are aiming to do that for most of the Spotify APIs anyway so it wouldn't be a big issue for us. But might be a consideration depending on how confident we are that we can get other users to adopt the system abstraction.
And agree re: consumesApis, would be nice if it's aggregated automatically. Less opportunity for it to go out of sync.

Since components seem to be the core entity kind that will be most used, enforcing a system abstraction to use APIs seems a bit too opinionated. I can see many cases where any system would just be a 1 to 1 of the component so it would be unnecessary to introduce system.
I can also see the usefulness of being able to scope APIs internal vs public as the component level as well. The maintains team may want to know about the private API. If there were such an indicator backstage could indicate to consumers if they are using something not recommended.

Since components seem to be the core entity kind that will be most used, enforcing a system abstraction to use APIs seems a bit too opinionated. I can see many cases where any system would just be a 1 to 1 of the component so it would be unnecessary to introduce system.
I can also see the usefulness of being able to scope APIs internal vs public as the component level as well. The maintains team may want to know about the private API. If there were such an indicator backstage could indicate to consumers if they are using something not recommended.

Right now this implementation is the interpretation of what the system model says about systems:

With increasing complexity in software, systems form an important abstraction level to help us reason about software ecosystems. Systems are a useful concept in that they allow us to ignore the implementation details of a certain functionality for consumers, while allowing the owning team to make changes as they see fit (leading to low coupling).
A system, in this sense, is a collection of resources and components that exposes one or several public APIs. The main benefit of modelling a system is that it hides its resources and private APIs between the components for any consumers. This means that as the owner, you can evolve the implementation, in terms of components and resources, without your consumers being able to notice. Typically, a system will consist of at most a handful of components (see Domain for a grouping of systems).
For example, a playlist management system might encapsulate a backend service to update playlists, a backend service to query them, and a database to store them. It could expose an RPC API, a daily snapshots dataset, and an event stream of playlist updates.

Right now this implementation is the interpretation of what the system model says about systems:

With increasing complexity in software, systems form an important abstraction level to help us reason about software ecosystems. Systems are a useful concept in that they allow us to ignore the implementation details of a certain functionality for consumers, while allowing the owning team to make changes as they see fit (leading to low coupling).
A system, in this sense, is a collection of resources and components that exposes one or several public APIs. The main benefit of modelling a system is that it hides its resources and private APIs between the components for any consumers. This means that as the owner, you can evolve the implementation, in terms of components and resources, without your consumers being able to notice. Typically, a system will consist of at most a handful of components (see Domain for a grouping of systems).
For example, a playlist management system might encapsulate a backend service to update playlists, a backend service to query them, and a database to store them. It could expose an RPC API, a daily snapshots dataset, and an event stream of playlist updates.

The system abstraction makes a lot of sense. I guess I'm saying it should be optional. Ideally one can evolve and decompose their components over time and abstract those boundaries into systems as needed.

The system abstraction makes a lot of sense. I guess I'm saying it should be optional. Ideally one can evolve and decompose their components over time and abstract those boundaries into systems as needed.

The system abstraction makes a lot of sense. I guess I'm saying it should be optional. Ideally one can evolve and decompose their components over time and abstract those boundaries into systems as needed.

Yeah I think this is a sensible empathic way of thinking about it. No matter what the "golden" end state is, we need to provide a solution that lets you move in increments to that state over a long period of time, while still being effective and getting bang for the buck while on that journey.

The system abstraction makes a lot of sense. I guess I'm saying it should be optional. Ideally one can evolve and decompose their components over time and abstract those boundaries into systems as needed.

Yeah I think this is a sensible empathic way of thinking about it. No matter what the "golden" end state is, we need to provide a solution that lets you move in increments to that state over a long period of time, while still being effective and getting bang for the buck while on that journey.

Talked to @freben and we decided to remove the providesApis and consumesApis from systems for now to keep going. We can have a deeper look on this topic later.
@freben can you please take a look?

Talked to @freben and we decided to remove the providesApis and consumesApis from systems for now to keep going. We can have a deeper look on this topic later.
@freben can you please take a look?

:shipit:

:shipit:

Missed to remove
providesApis:
    - artist-api

from the example, will be part of the implementation PR.

Missed to remove
providesApis:
    - artist-api

from the example, will be part of the implementation PR.


WIP: streaming for resample image filter in case of linear transforms

Inspired by the discussion of the discourse topic Why ResampleImageFilter is slow?, this PR is a try to realize streaming for at least some transforms for the itkResampleImageFilter.
It is one of the most general filters in ITK and much used and the essential one for isotropic down-sampling of large datasets. Especially for that case it would be very helpful to have streaming capabilities, in order to generate smaller datasets for filters that cannot stream. Apart from a reduced memory footprint, streaming can lead to a significant speed up because a chunk can be processed while the next is loaded from disc, drastically reducing loading latencies.
As the filter is of great importance, the idea is to first create some new test cases (failing with the current implementation) that are expected to succeed (partially) when streaming is realized. These tests are now merged from #392 and ready committed to the branch test_RSI-SDI (based on v4.13.1) and merged into streaming4ResampleImageFilter for testing the new contributions to itkResampleImageFilter, which enable streaming for linear transforms. Test showed that streaming already works but (even for an identity transform) the result's extent is larger than without streaming.
Therefore, itkResampleImageTest7 is meant to compare the current results of itkResampleImageFilter in various cases with those obtained when streaming is employed. There, a reader and a writer are avoided to rule out any interference concerning streaming limitations in respect to a chosen file format.
itkResampleImageTest2s is based on itkResampleImageTest2 adjusted to write MHAs, which support streaming.

@romangrothausmann
Thanks for the patches and the discussion !
I am not an expert in the way these filters were implemented, but others will hopefully chime in.
A few comments that also apply to #84 :

The transition to GitHub is still note completed, it might take a few days or weeks still. Meanwhile, we still use gerrit.
You may want to read the coding style section (Appendix 3) of the ITK SW Guide. Specifically, and although some residuals may still be around in the SW Guide or remote parts of the code:

We no longer use the keyword typedef, but use the C++11 friendly using. You may want to visit http://review.source.kitware.com/#/c/23103/ to see why.
Rather than using try / catch blocks, we have the TRY_EXPECT_NO_EXCEPTION macro that should be used in tests for the sake of readability. IT makes the code shorter also.
Other conventions (the use of the auto keyword, range-based loops, the use of nullptr, the override keyword, use of C++11 headers, etc.) may need to be applied to the code you contributed with also.

The above is not an exhaustive list. Hopefully, the ITK v5 migration guide provides further insight. Also you may find many useful scripts here to do the job for you.

Thanks @jhlegarreta for looking at this and your comments.
I created a PR because @blowekamp asked for one, PR meant for me GH not gerrit (does gerrit have PRs?). Also, I'm waiting for GH because I'm not so familiar with gerrit (and the contribution is likely going to take some time before it is ready for a merge...).
It is not clear to me what code style changes are specific for a contribution to ITK-5 and which expected for a contribution to ITK-4.13.1. Mine here is specifically based on  ITK-4 because I would need it for a project that is not (yet) ported to ITK-5. When it works for ITK-4 I would port it to ITK-5 and open a new PR.
Concerning the "commit message convention": I sometimes have difficulties to assign one of the given categories to a commit, e.g. what would be the right one for https://github.com/InsightSoftwareConsortium/ITK/pull/82/commits/0f962c5c30ec28d96b950f64ed3cdce8fa0887f3? ENH, BUG or all together WIP? In the end, I might consider squashing all commits into the first working commit (then using ENH) or is that not preferred?

Thanks for creating the PR to share your code. I hope to get to this tomorrow afternoon. Thank you for you patience.

Thanks for creating the PR to share your code. I hope to get to this tomorrow afternoon. Thank you for you patience.

Sure, no problem. The whole contribution is going to take some more time anyway and I am very thankful for any help and advice on this, especially since I am a bit lost on the problem with itkResampleImageTest7 and the change in output extent when streaming is employed.

It is not clear to me what code style changes are specific for a contribution to ITK-5 and which expected for a contribution to ITK-4.13.1. Mine here is specifically based on ITK-4 because I would need it for a project that is not (yet) ported to ITK-5. When it works for ITK-4 I would port it to ITK-5 and open a new PR.

@romangrothausmann, true, you are right: I had completely neglected the intention to submit this to ITK 4.13.
Some of the comments concerning the use of macros (e.g. TRY_EXPECT_NO_EXCEPTION) are still valid, though.
But your roadmap sounds reasonable, yes ! Thanks for the explanation !

Concerning the "commit message convention": I sometimes have difficulties to assign one of the given categories to a commit, e.g. what would be the right one for 0f962c5? ENH, BUG or all together WIP? In the end, I might consider squashing all commits into the first working commit (then using ENH) or is that not preferred?

True, at times it is difficult to tell, especially when there are many changes, and the payload of making all of them separately is too high.
Squashing would be OK I guess.

@romangrothausmann could this please be rebased on master?

Sure. Rebased, adjusted and squashed (like for #392).
The individual commits are in https://github.com/romangrothausmann/ITK/commits/streaming4ResampleImageFilter_incr, in particular with https://github.com/romangrothausmann/ITK/commit/2cdc0ee3f7993069907150c38f6c9b47758695ed the streaming tests are now expected to pass.

in particular with romangrothausmann@2cdc0ee the streaming tests are now expected to pass.

Which they do not.
In ResampleImageTest7 the monitor filter reports:
Down stream filter didn't execute PropagateRequestedRegion well
which could hint towards the problem I was experiencing before (https://discourse.itk.org/t/why-resampleimagefilter-is-slow/1217/17?u=grothausmann.roman), i.e. that the output extent is different with streaming.

@romangrothausmann excellent. Yes, we can close this PR in favor of #469.


Provide build-time switch to disable JSON support.

This patch provides a mechanism to omit JSON support (and libjsmn dependency). By default, JSON support is included.
To build without JSON support, set the relevant CMAKE option with:
make CMAKE_OPTIONS=-DWITH_JSON=OFF

Ref: FLOWDM-693
Signed-off-by: David Antliff<EMAIL_ADDRESS>

Retest this please

Retest this please


An fatal error occurred in asynchronous engine operation.

I use GPU and copy some parameters from Cpu to Gpu, When I excuted the program , It got the following error:
/home/shawn/mxnet/dmlc-core/include/dmlc/logging.h:235: [11:15:35] src/engine/threaded_engine.cc:87: Check failed: (num_pending_reads_) > (0)
[11:15:35] /home/shawn/mxnet/dmlc-core/include/dmlc/logging.h:235: [11:15:35] src/engine/./threaded_engine.h:306: [11:15:35] src/engine/threaded_engine.cc:87: Check failed: (num_pending_reads_) > (0)
An fatal error occurred in asynchronous engine operation. If you do not know what caused this error, you can try set environment variable MXNET_ENGINE_TYPE to NaiveEngine and run with debugger (i.e. gdb). This will force all operations to be synchronous and backtrace will give you the series of calls that lead to this error. Remember to set MXNET_ENGINE_TYPE back to empty after debugging.
terminate called after throwing an instance of 'dmlc::Error'
what():  [11:15:35] src/engine/./threaded_engine.h:306: [11:15:35] src/engine/threaded_engine.cc:87: Check failed: (num_pending_reads_) > (0)
An fatal error occurred in asynchronous engine operation. If you do not know what caused this error, you can try set environment variable MXNET_ENGINE_TYPE to NaiveEngine and run with debugger (i.e. gdb). This will force all operations to be synchronous and backtrace will give you the series of calls that lead to this error. Remember to set MXNET_ENGINE_TYPE back to empty after debugging.
When I  only use Cpu, I got this error:
terminate called after throwing an instance of 'std::out_of_range'
what():  array::at
I don't know why this error happend? Can anybody help me?

Could you help provide an example that reproduces the error? I've met this error message before. But in my case, it is corrected after starting the program again.

oo,,my example codes scale is a bit large, besides, I don't know  where the error is happend, if you are convenient, I can email the code to you.

It would be better for us to debug if you could simplify the code and get a minimal example.

After I simplified the code, it works! I am  tangled now.... @sxjscience

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!


MODELIX-470 API ref pipeline is broken

https://issues.modelix.org/issue/MODELIX-470

:tada: This PR is included in version 2.12.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add support for Cloud IAP.

Add support for Cloud Identity-Aware Proxy. Turning it on will make it safer to run PDF Sprinkles for yourself.
This isn't ready to merge quite yet; I need to document the --expected_audience flag used to configure this.

I've documented the --expected_audience flag used to configure this. Merging now.


Change wording around escort risk assessment and escape pack

Text changes and removal of _completion_date columns from DB

LGTM 👍

Good for me too, just maybe add a link to the trello card in the PR description.


Added PopupMenuDivider, Divider

Added a Divider class and replaced uses of DrawerDivider with it.
Popup menus are now lists of PopupMenuEntry items. PopupMenuItem and PopupMenuDivider are PopupMenuEntry subclasses.
PopupMenuDivider builds a Divider.

LGTM

lgtm