breakfix: LDAP authentication against openLDAP doesn't seem to work

Describe the issue
I'm trying to create a proof of concept of using OpenLDAP as source of authentication. I'm using https://github.com/osixia/docker-openldap this docker container.  I seem to be unable to make it go through with the password that is correct for a given user. I just get
Authentication Failed

Your session failed to meet authorization requirements.

Password authentication failed. Please retry.

Configuration
Paste full Caddyfile below:
{
	http_port 8080
	https_port 8443
	debug

	order authenticate before respond

	security {
		authentication portal myportal {
			crypto default token lifetime 3600
			crypto key sign-verify "test"
			backends {
				ldap_backend {
					method ldap
					realm localhost
					servers {
						ldap://<IP_ADDRESS>:389
					}
					attributes {
						name cn
						surname sn
						username uid
						member_of memberOf
						email	mail
					}
					username "cn=admin,dc=example,dc=org"
					password "admin"
					search_base_dn "dc=example,dc=org"
					search_filter "(&(|(sAMAccountName=%s)(cn=%s))(objectclass=person))"
					groups {
						"ou=groupper,dc=example,dc=org" admin
					}
				}
			}
		}
		authorization policy mypolicy {
      set auth url /auth/
      crypto key verify "test"
      allow roles admin
    }
	}
}

localhost:8080 {
	route {
		authorize with mypolicy
		respond "foobar website" 200
	}

	handle {
    route /auth* {
      authenticate * with myportal
    }
  }
}

Version Information
Provide output of caddy list-modules -versions | grep git below:

http.authentication.providers.authorizer v1.0.12
http.handlers.authenticator v1.0.12
security v1.0.12

Expected behavior
I'm able to log in using apache directory studio to my LDAP server, however same credentials don't seem to work with caddy-security.
Additional context
Log Output
2022/02/19 13:06:59.008 DEBUG   security        validating LDAP backend
2022/02/19 13:06:59.008 DEBUG   security        successfully validated LDAP backend
2022/02/19 13:06:59.008 DEBUG   security        Provisioned authentication backend      {"portal_name": "myportal", "portal_id": "1b0eab64-dfb3-4538-a2ce-370decb6f460", "backend_name": "ldap_backend", "backend_type": "ldap", "backend_realm": "localhost"}
2022/02/19 13:06:59.008 DEBUG   security        Provisioned login options       {"portal_name": "myportal", "portal_id": "1b0eab64-dfb3-4538-a2ce-370decb6f460", "options": {"external_providers_required":"no","form_required":"yes","identity_required":"yes","password_recovery_required":"no","realm_dropdown_required":"no","realms":[{"default":"no","label":"LOCALHOST","realm":"localhost"}],"registration_required":"no"}}
2022/02/19 13:06:59.009 DEBUG   security        Configuring user interface      {"portal_name": "myportal", "portal_id": "1b0eab64-dfb3-4538-a2ce-370decb6f460"}
2022/02/19 13:06:59.009 DEBUG   security        Configured user interface       {"portal_name": "myportal", "portal_id": "1b0eab64-dfb3-4538-a2ce-370decb6f460", "title": "Sign In", "logo_url": "/assets/images/logo.svg", "logo_description": "Authentication Portal", "action_endpoint": "", "private_links": [], "realms": [], "theme": "basic"}
2022/02/19 13:06:59.009 DEBUG   security        Configuring default authentication user interface templates     {"portal_name": "myportal", "template_theme": "basic", "template_name": "login"}
2022/02/19 13:06:59.009 DEBUG   security        Configuring default authentication user interface templates     {"portal_name": "myportal", "template_theme": "basic", "template_name": "portal"}
2022/02/19 13:06:59.009 DEBUG   security        Configuring default authentication user interface templates     {"portal_name": "myportal", "template_theme": "basic", "template_name": "whoami"}
2022/02/19 13:06:59.009 DEBUG   security        Configuring default authentication user interface templates     {"portal_name": "myportal", "template_theme": "basic", "template_name": "register"}
2022/02/19 13:06:59.009 DEBUG   security        Configuring default authentication user interface templates     {"portal_name": "myportal", "template_theme": "basic", "template_name": "generic"}
2022/02/19 13:06:59.010 DEBUG   security        Configuring default authentication user interface templates     {"portal_name": "myportal", "template_theme": "basic", "template_name": "settings"}
2022/02/19 13:06:59.011 DEBUG   security        Configuring default authentication user interface templates     {"portal_name": "myportal", "template_theme": "basic", "template_name": "sandbox"}
2022/02/19 13:06:59.012 DEBUG   security        Configured user interface       {"portal_name": "myportal", "portal_id": "1b0eab64-dfb3-4538-a2ce-370decb6f460", "title": "Sign In", "logo_url": "/assets/images/logo.svg", "logo_description": "Authentication Portal", "action_endpoint": "", "private_links": [], "realms": [], "theme": "basic"}
2022/02/19 13:06:59.012 DEBUG   security        Configured gatekeeper   {"gatekeeper_name": "mypolicy", "gatekeeper_id": "017d2fd5-7e80-41b0-b51a-235436aae206", "auth_url_path": "/auth/", "token_sources": "cookie header query", "token_validator_options": {}, "access_list_rules": [{"conditions":["match roles admin"],"action":"allow log debug"}], "forbidden_path": ""}
2022/02/19 13:06:59.012 INFO    security        provisioned app instance        {"app": "security"}
2022/02/19 13:06:59.012 INFO    http.handlers.authenticator     provisioned authenticator       {"portal_name": "myportal", "portal_id": "1b0eab64-dfb3-4538-a2ce-370decb6f460", "path": "*", "id": "42badb3b-bc86-4cd8-908b-49fd6b91f01f"}
2022/02/19 13:06:59.012 INFO    http.handlers.authenticator     validated authenticator {"portal_name": "myportal", "portal_id": "1b0eab64-dfb3-4538-a2ce-370decb6f460", "path": "*", "id": "42badb3b-bc86-4cd8-908b-49fd6b91f01f"}
2022/02/19 13:06:59.012 INFO    http.authentication.providers.authorizer        provisioned authenticator       {"gatekeeper_name": "mypolicy", "gatekeeper_id": "017d2fd5-7e80-41b0-b51a-235436aae206", "path": "*", "id": "1b0fe6e8-7912-4bd2-b30e-84f4941c0032"}
2022/02/19 13:06:59.012 INFO    http.authentication.providers.authorizer        validated authenticator {"gatekeeper_name": "mypolicy", "gatekeeper_id": "017d2fd5-7e80-41b0-b51a-235436aae206", "path": "*", "id": "1b0fe6e8-7912-4bd2-b30e-84f4941c0032"}
2022/02/19 13:06:59.012 DEBUG   security        starting app instance   {"app": "security"}
2022/02/19 13:06:59.012 DEBUG   security        started app instance    {"app": "security"}
2022/02/19 13:06:59.012 DEBUG   http    starting server loop    {"address": "[::]:8080", "http3": false, "tls": false}
2022/02/19 13:06:59.012 INFO    tls     cleaning storage unit   {"description": "FileStorage:~/.local/share/caddy"}
2022/02/19 13:06:59.012 INFO    tls     finished cleaning storage units
2022/02/19 13:06:59.012 INFO    autosaved config (load with --resume flag)      {"file": "~/.config/caddy/autosave.json"}
2022/02/19 13:06:59.012 INFO    serving initial configuration
2022/02/19 13:07:03.339 DEBUG   security        Redirect served {"session_id": "XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U", "request_id": "0fa06098-6df4-4fa3-b82e-5ff49cbe23b3", "redirect_url": "http://localhost:8080/auth/login", "status_code": 302}
2022/02/19 13:07:03.420 DEBUG   security        static assets   {"session_id": "XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U", "request_id": "6e2e3c17-764e-4a9f-ae71-3e12ebc596cb", "url_path": "/auth/assets/line-awesome/fonts/la-regular-400.woff2", "request": {"session_id":"XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U","base_url":"http://localhost:8080","base_path":"/auth/","content_type":"application/font-woff2;q=1.0,application/font-woff;q=0.9,*/*;q=0.8"}, "source_address": "<IP_ADDRESS>"}
2022/02/19 13:07:03.468 DEBUG   security        static assets   {"session_id": "XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U", "request_id": "226842df-df29-47ae-9c91-6ba018241d0f", "url_path": "/auth/assets/images/favicon.png", "request": {"session_id":"XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U","base_url":"http://localhost:8080","base_path":"/auth/","content_type":"image/avif,image/webp,*/*"}, "source_address": "<IP_ADDRESS>"}
2022/02/19 13:07:06.487 DEBUG   security        LDAP dialer setup succeeded     {"server": "ldap://<IP_ADDRESS>:389"}
2022/02/19 13:07:06.488 DEBUG   security        LDAP binding succeeded  {"server": "ldap://<IP_ADDRESS>:389"}
2022/02/19 13:07:06.488 DEBUG   security        LDAP search succeeded   {"server": "ldap://<IP_ADDRESS>:389", "entry_count": 1, "search_base_dn": "dc=example,dc=org", "search_user_filter": "(&(|(sAMAccountName=nextone)(cn=nextone))(objectclass=person))", "users": [{"DN":"cn=nextone,dc=example,dc=org","Attributes":[{"Name":"cn","Values":["nextone"],"ByteValues":["bmV4dG9uZQ=="]},{"Name":"sn","Values":["gordonowski"],"ByteValues":["Z29yZG9ub3dza2k="]},{"Name":"memberOf","Values":["ou=groupper,dc=example,dc=org"],"ByteValues":["b3U9Z3JvdXBwZXIsZGM9ZXhhbXBsZSxkYz1vcmc="]}]}]}
2022/02/19 13:07:06.488 DEBUG   security        LDAP user match {"server": "ldap://<IP_ADDRESS>:389", "name": "nextone gordonowski", "username": "", "email": "", "roles": {"admin":true}}
2022/02/19 13:07:06.499 DEBUG   security        user authorization sandbox      {"sandbox_id": "h6Bllo8NgTRZtOxbuFXn7V3hjgs2ldZKp5FD", "sandbox_secret": "tfepiQguZjMjF6aeNwlBYDc2jdhAiO87TfgtFTs7IdgEt", "sandbox_partition": "", "checkpoints": [{"name":"Authenticate with password","type":"password"}]}
2022/02/19 13:07:06.499 DEBUG   security        next user authorization checkpoint      {"session_id": "XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U", "request_id": "bc0828db-784f-41d8-af6e-4fa299009891", "data": {"action":"auth","title":"Password Authentication","view":"password_auth"}}
2022/02/19 13:07:06.560 DEBUG   security        static assets   {"session_id": "XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U", "request_id": "f3384d0e-7de3-4f96-8c6b-c3865bf2d4bc", "url_path": "/auth/assets/images/favicon.png", "request": {"session_id":"XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U","base_url":"http://localhost:8080","base_path":"/auth/","content_type":"image/avif,image/webp,*/*"}, "source_address": "<IP_ADDRESS>"}
2022/02/19 13:07:09.276 DEBUG   security        user authorization sandbox      {"sandbox_id": "h6Bllo8NgTRZtOxbuFXn7V3hjgs2ldZKp5FD", "sandbox_secret": "tfepiQguZjMjF6aeNwlBYDc2jdhAiO87TfgtFTs7IdgEt", "sandbox_partition": "password-auth", "checkpoints": [{"name":"Authenticate with password","type":"password"}]}
2022/02/19 13:07:09.276 WARN    security        password authentication failed  {"session_id": "XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U", "request_id": "47acbfd7-e4c1-4039-a58a-9b061f727c09", "checkpoint_id": 0, "src_ip": "<IP_ADDRESS>", "src_conn_ip": "<IP_ADDRESS>", "checkpoint_name": "Authenticate with password", "checkpoint_type": "password"}
2022/02/19 13:07:09.276 WARN    security        user authorization checkpoint failed    {"session_id": "XOOBBkUAkEcq8qPVlQENFtpn83DR7ca9Ucgq0r5ym9U", "request_id": "47acbfd7-e4c1-4039-a58a-9b061f727c09", "error": "Password authentication failed. Please retry"}

Oh, Accidentally pressed enter... eh, I'll edit it, give me a few minutes

I just tried with v1.0.16 just to be sure and it's the same issue.

I'm able to log in using apache directory studio to my LDAP server, however same credentials don't seem to work with caddy-security.

@Nicarim , thank you for the issue! 👍 Here are some preliminary thoughts on this.

I suspect the issue is attribute mapping with your LDAP. Also, it could be using POSIX groups.

See configuration examples here: https://authp.github.io/docs/authenticate/ldap/ldap#configuration-examples
Add posix_groups to the server definition.
					servers {
						ldap://ldap.forumsys.com posix_groups
					}

Your search_filter  is "(&(|(sAMAccountName=%s)(cn=%s))(objectclass=person))" and at the same time the username mapping is username uid. Have you considered:

"(&(|(uid=%s)(cn=%s))(objectclass=person))"

Also, use ldapsearch to see if you are getting the values for the attributes you'd defined.
For example, for the following:
						name cn
						surname sn
						username uid
						member_of memberOf
						email	mail

Use:
ldapsearch -v -x -H ldaps://ldaps.contoso.com/ -D "CN=gitlabldapsvc,OU=Users,DC=CONTOSO,DC=COM" -w YYYY -b "OU=Users,DC=CONTOSO,DC=COM" "(objectclass=person)" uid memberOf sn cn mail

Side note: After getting things working, try using LDAPS.

According to the logs, the user is successfully found
2022/02/19 13:07:06.488 DEBUG   security        LDAP search succeeded   {"server": "ldap://<IP_ADDRESS>:389", "entry_count": 1, "search_base_dn": "dc=example,dc=org", "search_user_filter": "(&(|(sAMAccountName=nextone)(cn=nextone))(objectclass=person))", "users": [{"DN":"cn=nextone,dc=example,dc=org","Attributes":[{"Name":"cn","Values":["nextone"],"ByteValues":["bmV4dG9uZQ=="]},{"Name":"sn","Values":["gordonowski"],"ByteValues":["Z29yZG9ub3dza2k="]},{"Name":"memberOf","Values":["ou=groupper,dc=example,dc=org"],"ByteValues":["b3U9Z3JvdXBwZXIsZGM9ZXhhbXBsZSxkYz1vcmc="]}]}]}

I previously had the issues with memberOf not working, however I was able to figure it out by installing openLDAP distribution that has memberOf implemented. It now returns groups correctly.
Problem is that now the credentials to log in are just not working. I always get the same response from caddy.

Using the provided query with ldapsearch gives me the correct user
root@7e6eae9ae48f:/# ldapsearch -v -x -H ldap://<IP_ADDRESS>:389/ -D "CN=nextone,DC=example,DC=org" -w password -b "cn=nextone,DC=example,DC=org" "(objectclass=person)" uid memberOf sn cn mail
ldap_initialize( ldap://<IP_ADDRESS>:389/??base )
filter: (objectclass=person)
requesting: uid memberOf sn cn mail
# extended LDIF
#
# LDAPv3
# base <cn=nextone,DC=example,DC=org> with scope subtree
# filter: (objectclass=person)
# requesting: uid memberOf sn cn mail
#

# nextone, example.org
dn: cn=nextone,dc=example,dc=org
cn: nextone
sn: gordonowski
memberOf: ou=groupper,dc=example,dc=org

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Problem is that now the credentials to log in are just not working. I always get the same response from caddy.

@Nicarim , they might not be working if there is no match on the username.
The relevant code is here:
https://github.com/greenpau/go-authcrunch/blob/27766dcc232658851a81f8bdcff7f8f73cb4a1cf/pkg/authn/backends/ldap/authenticator.go#L303-L318
Initially, it takes username and performs substitution of the the search filter search_filter "(&(|(sAMAccountName=%s)(cn=%s))(objectclass=person))"
What is the username you provide on login? Which LDAP field the username corresponds to?

Oh!
I get it now
The username attribute has to match with the username that I provide. I replaced attribute username with "cn" instead of "uid" (which was empty for me, probably a leftover) and it now works!
Thank you very much. I am not that familiar with LDAP and I couldn't wrap my head around it.

					attributes {
						name cn
						surname sn
						username cn # <- this field must match the username that user provides.
						member_of memberOf
						email	mail
					}

This is what I had to do instead, for anyone that comes across this problem too.

Thank you very much. I am not that familiar with LDAP and I couldn't wrap my head around it.

@Nicarim , glad it worked out! 👍 We are all learning! It is the way 😄
See https://github.com/greenpau/caddy-security/issues/14#issue-1111599735


Upgrade agent to use active span mechanism available in opentracing-j…

…ava 0.30.0 and focus rules on installing framework integrations, rather than direct instrumentation (i.e. removing the java-net rules).

Note: will release next version as 0.1.0 as breaking API changes, both in OpenTracing 0.30.0 and as a consequence in the agent's OpenTracingHelper class.

Decided to remove the previous span management methods on helper class, as not possible to meaningfully deprecate and maintain same behaviour.
java-net rules have been disabled (will remove at a later date), and removed from the README, as focus of agent from now on should be just installation of framework integrations and custom rules for instrumenting business logic.


docs: update docstore readme to include proper import

Looks like there was a broken import in the documentation, this should resolve.

Thanks!


Undefined variable $blog_id?

It looks like the $blog_id variable used on line 268 here hasn't been defined yet. Or am I missing something in the greater context?
https://github.com/onelogin/wordpress-saml/blob/d8690ff33aada4573198cdd633c9bbdbb1dfcba6/onelogin-saml-sso/php/functions.php#L267-L278

It seems you are right.
Do you have a PR?


numbers are considered valid string key types but not vice versa

TypeScript Version:  4.1.0-beta

Search Terms:
key types
Code
type Num = {
    [bar: number]: unknown
}
type Str = {
    [bar: string]: unknown
}

const bar: Num = {
    "adsf": "" //TS2322: Type '{ adsf: string; }' is not assignable to type 'Num'. Object literal may only specify known properties, and '"adsf"' does not exist in type 'Num'.
}
const baz: Str = {
    1: "" //no error
}

Expected behavior:
both bar and baz declarations raise type errors because the keys do not match their types
Actual behavior:
only bar fails. TS2322: Type '{ adsf: string; }' is not assignable to type 'Num'. Object literal may only specify known properties, and '"adsf"' does not exist in type 'Num'.
Playground Link:
https://www.typescriptlang.org/play?#code/C4TwDgpgBAcgrgWygXigbwLACgq6gbQCMBDAJwC4oA7RQiUgXUrioGsqB7AdyuwF9soSFADKwUinTY8BEhSgBncQEsqAcyZQW7brywCs2AMYcqSqHMrwkqTDjwAiYgBMFAMweUHDqAHpfACoiAEwAzMHBlAHg0ADkaFAu7pRKpKpqANxQfLFQygrUHMCJCgrKalTEhAA20MAcUEJx1rEAdFAA8oQAVhBGxdXKwPTE1VAIxCBQptVTCpBGym5TOjxQYKQckKTAyhAKADSJVM5QsU6uHrnOHPuFxRAAHvnFqo0xZy2t-Mam5iQAL0oYgktmkeAAjF4HPwgA

This is the intended behavior, because JS coerces all keys to strings. There's no observable difference between writing { 1: "" } and { "1": "" }; they have identical meanings.

it works the other way around as well though, you can access string keys with numbers and number keys with strings. so i don't get why it only works one way in ts

so from what i understand it doesn't matter that they're strings at runtime, as its valid to use either a string or number no matter what the key type is

both of these are valid at runtime, but it doesn't make sense to prevent one but not the other in my opinion
const foo: string[] = [""]
foo["asdf"] = "" //TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.

const bar: {[key: string]: string} = {}
bar[1] = ""

The bar for correctness is intentionally set higher than "doesn't throw an exception". One of those lines of code is extremely suspect, and the other is extremely straightforward. Disregarding the clear intent of the types isn't a productive way to look at code examples.

what about this more realistic example
const bar: {[key: number]: string} = {}
bar["1"] = "" //error

const bar: {[key: string]: string} = {}
bar[1] = "" //no error

I don't understand what that example is attempting to convey. What problem are you trying to solve here?

It's inconsistent for a string key type to accept a number. This is not the case anywhere else, but the reasoning for it (that it's valid at runtime) also applies to number key types that can accept strings. So I don't understand why it doesn't work both ways

const bar: {[key: string]: string} = {}
bar[1] = "" //no error

This is clearly suspect as it looks like an index, and with no way to disable this?

The bar for correctness is intentionally set higher than "doesn't throw an exception".

Yet it's valid to coerce numbers to strings?

It's inconsistent for a string key type to accept a number.

You can write
const obj = { 1: 0 }

and
const obj = { "1": 0 }

and they mean exactly the same thing, so you have to park this "inconsistency" somewhere - it can't be removed.

yeah i get that, so why does typescript only get that when trying to coerce string to number but not number to string? this just makes no sense at all.
const obj: {[key: string]: unknown} = { 1: 0 } //valid
const obj2: {[key: number]: unknown} = { "1": 0 } //valid

console.log(obj[1]) //valid
console.log(obj["1"]) //valid
console.log(obj2[1]) //valid
console.log(obj2["1"]) //invalid!

either it should either complain about both obj[1] and obj2["1"], or none of them. perhaps a flag for strict key types or could be added, but it shouldn't be restricting it only one way like it currently does.

@DetachHead, I think the difference here comes to the fact that there can only be string keys in JS (and symbols, I guess). JS has implicit type conversions here after all - you can, technically, pass numbers as keys, but they'll be converted to strings immediately, even before they're actually used as keys, as was stated here earlier.
So, by defining the index signature as { [key: string]: unknown; } you're essentially saying "hey, TypeScript, I want keys of this to behave as they regularly do in JS" - that is "convert all passed keys to strings",
but when you define the signature as { [key: number]: unknown } it's more like "hey, TS, I want these keys to be restricted to numbers specifically (before they're converted to strings)!".
I get why inconsistency can be seen here, as only one of the two signatures behaves as "restrict keys to this type before they're converted to strings". But inconsistency doesn't imply incorrectness.
JS is also inconsistent regarding this "keys are converted to strings" behaviour. When using array methods, keys get parsed back to numbers:
const arr = [1, 2, 3];

// Using standard iteration by keys
for (const i in arr) {
  console.log(typeof i);
}
// string
// string
// string

// Using builtin array method
arr.forEach((_, i) => console.log(typeof i));
// number
// number
// number

So, which is it after all - number or string?
Some more inconsistency here.
I think that if JS itself allowed keys to be numbers without actually converting them to strings, then the complaint here would be valid.
So if JS is inconsistent in its behaviour regarding key types, then TS must be inconsistent here too, to satisfy its design goals (the 7-th one, I guess).

It's no surprise JavaScript is packed full of inconsistencies, but I don't see how that example justifies this specific inconsistency in typescript. Usually when you want to tell typescript to "behave like JavaScript" you'd just use the any type, not the string type.
If the goal you mentioned is to "preserve runtime behaviour of all JavaScript code" (which, tbh, I don't fully understand as these types only exist at compile-time), then wouldn't the solution be to allow it both ways, as they're both valid at runtime? If I have type Foo = "bar" | "baz", that's just a string at runtime. But that doesn't mean typescript should let me go const foo: Foo = "qux" just because it's valid JavaScript right? But as i understand it that's the reasoning behind what's happening here.

"no recent activity"
two days ago.... seriously?

This is the intended behavior, because JS coerces all keys to strings

By that same logic, then shouldn't the return type of keyof always be string??

It really seems like you went one way with mapped types, and you went the complete opposite way with the keyof operator. This inconsistency rears it's ugly head most clearly in the example below...

In the "ugly but working" example, we are declaring our generic type T and literally saying "T is an object and it's keys are strings". Then, when we use the keyof operator to get the keys of T, Typescript now thinks that the keys of T could include numbers. So we have to resort to unfortunate workaround such as string &.


Add AWS Codeartifact contrib module

This allows Mill projects to deploy to AWS Codeartifact. It functions similarly to the Artifactory PublishModule. Its credentials value is a Codeartifact auth token.

Ah of course! Just added it

Thank you for this contribution!


EXPERIMENTAL_FASTCALL

Why don't you try to speak with nodejs core team about that?

With added EXPERIMENTAL_FASTCALL I can trigger these differences when running wrk with pipelining:
v17.0.0
Requests/sec: 274626.65 (best)
v17.1.0
Requests/sec: 246552.92
v17.2.0 default
Requests/sec: 245258.78 (worst)
v17.2.0 EXPERIMENTAL_FASTCALL=1
Requests/sec: 265362.05 (second best)
The added dynamic dispatch has measurable overhead, but can restore some perf.


Removed "Finish Waiting for control plane" from host stages in the sw…

…agger

Why are we removing this?
What is the jira ticket?

https://issues.redhat.com/browse/MGMT-1482

This status is no longer required (not set by the assisted-installer).
Once we are done "Writing image to disk" we will "Wait for control plane", and once that is done we will move to "Rebooting".


Skip tests if updating website/docs

Should skip tests if all changes are within website folder (details)

When all the path names match patterns in paths-ignore, the workflow will not run. If any path names do not match patterns in paths-ignore, even if some path names match the patterns, the workflow will run.

What about skipping tests if the .github/workflows directory changes 😆


WIP: test: add ut for pkg/remote/trans/netpoll

What type of PR is this?
test
What this PR does / why we need it (English/Chinese):
Adding missing tests for pkg/remote/trans/netpoll
Which issue(s) this PR fixes:
#372

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

I haven't reached the goal yet, but I will do it as soon as possible. :)

"It is suggested to add comments with clear descriptions for each unit test."

hi, when will it be done ? @Jacob953

Sorry for the slow progress ( @GuangmingLuo
Too little documentation and best practices are slowing me down, I'm doing my best to finish.

Sorry for the slow progress ( @GuangmingLuo Too little documentation and best practices are slowing me down, I'm doing my best to finish.

@Jacob953 hi, can you join the community Feishu chat group and reach out to me, so that we can help you to finish it.

Hi, @GuangmingLuo!
I've got coverage: 81.0%(target 80%) of statements with your help.
 Please let me know if it needs an update. ;)

Thx a lot! @GuangmingLuo @simon0-o @SinnerA
I've reached coverage: 81.6% of statements (target 80.0%) with ur help. Please let me know if there is something else that needs to be improved. ;)

Hi, @simon0-o! PTAL.
Sorry for my misunderstanding before, I have corrected it. ;)


Reduce DB query number in post index action

Performance Issue
After tags feature the blog index page performs one extra query for each post to fetches its related tags. This PR avoids that.
Other changes:

Refactoring the Post repository methods to reuse paginator creation in the future.

I noticed this issue too but I'm not sure avout this fix since the LIMIT is then applied to the tags. If the first post has 10 tags, then it will be the only one in the listing right ?

@Grafikart I'm not sure I understand your comment. This is how join queries are supposed to work in Doctrine. I always use a code similar to this one. I've just tested this PR locally and it seems to be working as expected. The results are the same, but the database queries:

Before
After

Thanks Yonel.

@javiereguiluz sorry it works with PagerFanta indeed. It didn't worked for me cause I tried this PR without the paginator :
        $query = $this->getEntityManager()
            ->createQuery('
                SELECT p, t
                FROM AppBundle:Post p
                LEFT JOIN p.tags t
                WHERE p.publishedAt <= :now
                ORDER BY p.publishedAt DESC
            ')
            ->setMaxResults(5)
            ->setParameter('now', new \DateTime())

But doing a first query to get the posts ids (like PagerFanta does) solve this issue. Sorry for the false issue.


Custom commandline argument parsing

I have a preexisting codebase with an ingrained system for parsing configuration from commandline arguments and environment variables. It seems like redun run cannot support "passing through" unrecognized arguments to user code; I am forced to either:

Adopt redun's system of expressing all commandline args as input parameters to the top-level task.
Write my own commandline entrypoint that uses my system's preexisting arg parsing, and manually invokes the redun scheduler.

Option 2 seems like a fine option, and its feasibility speaks to the benefits of redun's "just be a library" philosophy. But in that case some documentation about "How to instantiate a scheduler with all the configuration in the .redun/ directory" would be nice. I think it would just be:
from redun.cli import setup_scheduler

scheduler = setup_scheduler()

Does the above all seem correct? Have I missed something regarding redun run's capabilities?
PS.
Just wanted to say I find this project really promising and refreshing! It feels like it's "how I would've done it", unlike all the DSL-centric frameworks out there. Thanks so much for building it and sharing it!

Hi @spitz-dan-l, thanks for raising these questions. This is an interesting use case. Here are a couple of my thoughts.
Option 2 is definitely possible, and setup_scheduler() is mostly what you need. It would look something like this:
from redun.cli import setup_scheduler

a_task = # determine the task you want.
args, kwargs = # determine the arguments from your own parsing of sys.argv

scheduler = setup_scheduler()
result = scheduler.run(a_task(*args, **kwargs))

Here, are a couple of other ideas in case you like to continue to use the redun cli (it has a lot of other nice options implemented, for example). Perhaps you have thought of these.
# workflow.py

@task
def my_task(x: int, y: int, extra_args: str):
    parser = argparse.ArgumentParser()
    parser.add_argument("--a", type=int)
    parser.add_argument("--b", type=int)
    args = parser.parse_args(shlex.split(extra_args))

    # Now you have x, y, args.a, args.b

And from the command line you have,
redun run workflow.py my_task --x 1 --y 2 --extra-args "--a 3 --b 4"

The downside here is that you may not like having to pass arguments a and b through a string.
Another technique is that arguments of type List are treated as multiple values.
# workflow.py
@task
def main(extra_args: List[str]):
    return extra_args

On the command line you would have:
redun run workflow.py main --extra-args 1 2 3 4 a b
['1', '2', '3', 'a', 'b']

If you are trying to configure the scheduler itself or the broader environment, take a look at setup_scheduler in redun.ini: https://insitro.github.io/redun/config.html#setup-scheduler

Thanks very much @mattrasmus !
I had not considered gathering the extra args as a string; it seems pretty viable for my use case!
I'll close this issue for now. When I figure out what works best I'll leave a comment here for posterity.


Refreshing AppSyncWsProtocol authorization

Question
Trying to work out how to refresh the authorization sent in the AppSyncWsProtocol protocol constructor.
    fun provideAuthorizedWebSocketNetworkTransport(
        okHttpClientAppSync: OkHttpClient.Builder,
        credentialsStore: CredentialsStore,
    ): WebSocketNetworkTransport {
        return WebSocketNetworkTransport.Builder()
            .serverUrl(getWebSocketServerUrl())
            .protocol(AppSyncWsProtocol.Factory(authorization = getAuthorizationMap(credentialsStore)))
            .webSocketEngine(DefaultWebSocketEngine(okHttpClientAppSync.build()))
            .build()
    }

If this protocol was built before the credentials have been received or the auth token used in the startOperation has been revoked. What is the recommended method of resetting authentication used in the AppSyncWsProtocol?
The Apollo documentation seem to recommend closing and reopening the connection via an exception. This doesn't appear to re-set the protocol used.
Apollo 2 provided the ability of a custom serialiser to overwrite/append the payload of websocket requests which we previously relied on but I can't seem to find something similar.

Have since discovered that protocol is recreated from the factory when the stream is re-opened.
So have implemented a custom factory to re-fresh the auth token.
Can close off this thread 😄


Move audits controller specs to request specs

Resolves #1419
Description
I moved audtis_controller_spec.rb to audtis_requests_spec.rb.
Type of change

Improvement

How Has This Been Tested?
All tests were green

Looks great, thanks!


Implemented DSDL compiler for the libcanard.

#50 Here is the proposal for the libcanard compatible DSDL compiler

Thanks for the good review comments! I agree all of them. I'll do the changes and lets do a second round. Cheers!

Thank you, Sami.

Another thing is that the generated code does not follow the Zubax standard, if I am right. @pavel-kirienko does this also matter for generated code?

Yes of course it does. We should be as consistent as possible. Although I think it's perfectly acceptable to use snake_case for namespace separation and suffixing, otherwise type names get fused with implementation-specific entity identifiers; e.g. uavcan_protocol_NodeStatus_encode is, in my opinion, better than uavcan_protocol_NodeStatusEncode. Do you agree?
@storola you should know that we are deprecating TAO. The backward-compatible deprecation strategy is to always attempt deserialization on the assumption that the TAO is not used, and then if the decoder ran out of data, try again with the TAO enabled. Should be a trivial modification; would you be able to implement it please? Libuavcan and pyuavcan are going to catch up soon as well.
When encoding messages, TAO should always be used for now. We are going to switch all implementations to never use TAO when serializing around 2019~2020.
I don't understand your policy in regards to float16. There aren't that many hardware platforms out there which natively support float16; does it make to design-in this special-case support into this general-purpose library? I would suggest you to consider the approach we use in libuavcan instead: when decoding, float16 is automatically promoted to the native float type (libuavcan also performs a static check ensuring that the native float is in fact IEEE754-compliant); when encoding, the native float is downcasted to float16. Shall we not use the same approach in libcanard? Note that libcanard provides two built-in functions for converting between float16 and float32.
Also I am curious whether you found the performance of the scalar encoding/decoding functions provided by libcanard satisfactory? When I implemented them, I was expecting difficulties with large transfers, because at every invocation they have to traverse a linked list of data blocks up to the requested offset (Shlemiel the Painter problem). I am not suggesting to change anything here, just pointing out that we should keep in mind that there is a bit of a bottleneck here and it can be resolved by implementing a stateful encoder-decoder that retains data pointers between invocations.

e. Although I think it's perfectly acceptable to use snake_case for namespace separation and suffixing, otherwise type names get fused with implementation-specific entity identifiers; e.g. uavcan_protocol_NodeStatus_encode is, in my opinion, better than uavcan_protocol_NodeStatusEncode. Do you agree?

Agree.

There aren't that many hardware platforms out there which natively support float16; does it make to design-in this special-case support into this general-purpose library?

That's true. I think we could even assume that float is IEEE754 compliant (checking it statically might be difficult in C).

I don't understand your policy in regards to float16. There aren't that many hardware platforms out there which natively support float16; does it make to design-in this special-case support into this general-purpose library? I would suggest you to consider the approach we use in libuavcan instead: when decoding, float16 is automatically promoted to the native float type (libuavcan also performs a static check ensuring that the native float is in fact IEEE754-compliant); when encoding, the native float is downcasted to float16. Shall we not use the same approach in libcanard? Note that libcanard provides two built-in functions for converting between float16 and float32.

There aren't that many hardware platforms out there which natively support float16; does it make to design-in this special-case support into this general-purpose library?

That's true. I think we could even assume that float is IEEE754 compliant (checking it statically might be difficult in C).

I am a bit scared what will happed to platforms which does not have HW float support in the first place. E.g. I have one STM32 which does not have HW float support. Gcc will cover you, but it will cost you quite much flash size when you do any float operations. You can optimize how to do calculation with floats and even write parts of you own. Then if _Encode function will the do more conversion "on the fly" on top of everything, will it make break the flash bank?
I try to do some trials what happens to code size with this approach.
BTW: At least some of the STM32 have HW float16 support, which is storage only mode. So it will do all the calculations in float32 and then convert them back to "storage" format.

But is there some hardware that can compute using fp6 and not fp32? If no then it does not matter to use float16 or float32 no?

Are we sure that the code size problem should be placed above usability issues? Applications that care a great deal about code size are likely to avoid automatic marshaling entirely and serialize manually as we did in the Kocherga bootloader. Automatic marshaler is supposed to make the life of the developer more comfortable, but then things like weird handling of float16 or the C file naming trickery are getting in the way of that.

Based on common concerns raised with libuavcan: I believe its critical to have a really efficient, but auto-generated marshaling solution.

A third option regarding C file naming and code size would be to put all the generated code in a single C file. Less code usage than static function duplication, and easy to drop in any build system.

I am a bit scared what will happed to platforms which does not have HW float support in the first place. E.g. I have one STM32 which does not have HW float support. Gcc will cover you, but it will cost you quite much flash size when you do any float operations. You can optimize how to do calculation with floats and even write parts of you own. Then if _Encode function will the do more conversion "on the fly" on top of everything, will it make break the flash bank?

I try to do some trials what happens to code size with this approach.

Seems like that if using float as storage and converting to float16 and back does not cause huge effect on flash size. Only that canardConvert* causes gcc to take in fmul (600 bytes in my env), which I was avoiding. So this could be default strategy and I am fine with it. I would like to leave a possibility to use casting to do the conversion. E.g. #define CANARD_USE_FLOAT16_CAST __fp16 to let the gcc do the float - fp16 - float conversion instead of canard function. It would allow me to save those bytes, which I really need.
How does this sound?

E.g. #define CANARD_USE_FLOAT16_CAST __fp16 to let the gcc do the float - fp16 - float conversion instead of canard function. It would allow me to save those bytes, which I really need.

I'm ok with that. May I ask you what kind of application makes you care about the ROM footprint so much?

A third option regarding C file naming and code size would be to put all the generated code in a single C file. Less code usage than static function duplication, and easy to drop in any build system.

@storola could you please evaluate the impact of the header-only approach on code size, with LTO enabled? I don't expect it to change anything significantly, if at all.

I don't there is any change.
I tried with include_all_c_files.c but compared to have those all in Makefile sure it does not change anything. (I am having LTO flag on).

Do you think we can go ahead now and implement the header-only approach (no. 2 listed above)?

Do you think we can go ahead now and implement the header-only approach (no. 2 listed above)?
Actually, I would prefer solution 1.
I think after all it is still cleaner/nicer than having only one huge file. It would also allow usage more freely. E.g. including only 1 file and so.

I know some people who refuses to use LTO flag.

Sorry, I think I wasn't quite clear above. The solution I am referring to is this one:

Put all entities in the header files, declare functions static. I understand that there may be some code size disadvantages involved, but are they significant enough, and is the link-time optimization not a viable option?

I agree that using the same C file for all definitions is probably a questionable idea. What I am suggesting instead is to avoid C files completely and put definitions in header files. This way, the user won't have to change their build process at all, and only necessary definitions will be included in the compilation process. The resulting code footprint growth can be negated by LTO if used.

I agree that using the same C file for all definitions is probably a questionable idea. What I am suggesting instead is to avoid C files completely and put definitions in header files. This way, the user won't have to change their build process at all, and only necessary definitions will be included in the compilation process. The resulting code footprint growth can be negated by LTO if used.

I got a lot of resistance for this approach.
For now I'll change the c-file names having the folder where c-files are as a name space and push for review.

I got a lot of resistance for this approach.

What was the reason, could you elaborate please?

HI all! I've been watching this pull request and thought I would add to the discussion about static definitions in header files vs. definitions in c files; why not support both and let the user choose?
if the user chooses the static definitions option, then we (conceptually at least) just add static inline[1] to the declarations and definitions, remove the externs from the function declarations, concatenate the transformed files together, and move the include guard #endif to the bottom of the concatenated file. We would also want to "namespace" any symbol in the c file template to avoid name clashes (e.g. #define SATURATE -> #define LIBCANARD_INTERNAL_SATURATE or something). I think all of this can be easily expressed in the template files. Does this sound like a good avenue forward?
[1] inline is necessary here to prevent compile warnings about static-but-unused functions.

Thanks for chiming in, @eckel-formlabs.

Does this sound like a good avenue forward?

Let's wait for Sami to get back to us regarding his motivation to avoid the header-only approach (my previous message above). Your suggestion could be used as a last resort if we failed to reach a consensus here; I'm not a big fan of it because it introduces extra complexity with a quite insignificant practical gain.

cc: @janboen

What progress of this PR?

Hi, I am back,
so lets try to finish this PR, but were we left?

One debate was, header only or normal library as output from code generator.
I would rather generate normal library (c and h-files). Header only works, but may increase flash size, it is ugly not "real c", leaves cleaning work to compiler (if all compilers even support -flto),

One debate was, header only or normal library as output from code generator.
I would rather generate normal library (c and h-files). Header only works, but may increase flash size, it is ugly not "real c", leaves cleaning work to compiler (if all compilers even support -flto),

I am still very much in favor of the header-only approach, as it is easier to set up and use. Alternatively we could just support both with a switch as suggested earlier by somebody else. The code size concerns are likely exaggerated, that can be easily verified with a simple test.

@storola anything we can do to help move this forward?

@storola anything we can do to help move this forward?
I think we are good now. Even tough I am not so pleased with the header only solution, I think it OK to implement under some cmd line flagging. I try to cook up solution by the end of this week.

@storola Are we ready for the final review? If not, please let us know when we should have a look. Thanks!

Almost there then :rocket:
@antoinealb you have a review that request changes. If you're happy you should change your review as well. No merging can be done before Pavel accepts the changes as well anyway.


This should not be there. You should filter this when you load the phase not when you create it or write it to file.

This should not be there. You should filter this when you load the phase not when you create it or write it to file.
Originally posted by @zpreisler in https://github.com/zpreisler/XRDXRFutils/pull/11#discussion_r847209219

Hi, @zpreisler
I've fixed everything in commit 32c46c4.
Now we create experimental phases with the same structure as tabulated phases read from cif files.
On the other hand, when we save these newly created experimental phases, we write a cif file with the same structure as before.
I've also thought about PhaseList and list of Phase.
We want a PhaseList only when we want to fit multiple phases to the same experimental signal. On all the other cases, we want a list of Phase.
I've modified the code according to that. In particular, GammaMap.select_phases() now returns a list of Phase.
Also, when I create a GammaMap instance in my analysis notebook, I pass a list of Phase.

Hi, @zpreisler
More refinements.
From the beginning, the function GammaMap.select_phases() adds new information to each phase: name and point. We may want to preserve this information when writing and reading cif file. For this reason, I've updated Phase.save_cif() and DatabaseXRD.read_cifs() to handle this new information.
Also, a note about PhaseList. We create GammaMap passing a list of phases. While we expect Phase instance, some of those elements can be PhaseList. To handle this case in a more consistent way, I've defined the functions set_name() and set_point() for both classes Phase and PhaseList.
Of course, I've tested all the new functionalities and everything works as expected.


build release failed in flutter v1.12.13

Removed unused resources: Binary resource data reduced from 840KB to 797KB: Removed 5%
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':tflite:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/apple/Flutter/projects/fixtime/build/tflite/intermediates/res/merged/release/values/values.xml:236: error: resource android:attr/fontVariationSettings not found.
/Users/apple/Flutter/projects/fixtime/build/tflite/intermediates/res/merged/release/values/values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 1m 50s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                     111.6s
Gradle task assembleRelease failed with exit code 1
flutter dcotor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G87, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.3)
[✓] VS Code (version 1.41.1)
[✓] Connected device (2 available)
• No issues found!

I  add this to build.gradle
subprojects {
project.evaluationDependsOn(':app')
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
}
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-gcm:16.1.0'
force 'com.google.android.gms:play-services-location:16.0.1'
force 'com.google.android.gms:play-services-basement:16.2.0'
force 'com.google.android.gms:play-services-auth:16.0.1'
force 'com.google.android.gms:play-services-stats:16.0.1'
force 'com.google.android.gms:play-services-base:16.0.1'
}
}
}
}
}
it reports
FAILURE: Build failed with an exception.

What went wrong:
Could not determine the dependencies of task ':location:compileReleaseAidl'.

Could not resolve all task dependencies for configuration ':location:releaseCompileClasspath'.
Could not find com.google.android.gms:play-services-location:16.0.1.
Required by:
project :location

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 2m 53s

@shaqian 求救呀~~

原来是插件 compileSdkVersion 是27 ，需要更改到 28

Closing the issue as the PR is merged.


IEnumerable allow circular dependencies

Let's say I want to do something wrong:

Example 1. Not working.
public class Greater
{
   private readonly DebugConsole _console;

   public Greater(DebugConsole console) =>
        _console = console;

   public void Hello() =>
        _console.Notify("Hello, World!");
}

public class DebugConsole
{
    private readonly Greater _greater;

    public DebugConsole(Greater greater) =>
        _greater = greater;

    public void Welcome() =>
        _greater.Hello();

    public void Notify(string message) =>
        Debug.Log(message);
}

var builder = new ContainerBuilder();
builder.AddSingleton(typeof(DebugConsole));
builder.AddSingleton(typeof(Greater));
var container = builder.Build();
var console = container.Resolve<DebugConsole>();
console.Welcome();

There is a circular dependency here (Greater <-> DebugConsole) and the container, expectedly, can't solve this problem. In runtime, we'll get an exception, when try resolve it, refactor the code, use other approaches to solve it, and solve this problem, making our code better. That's fine. However, I can hack it with enumerations:

Example 2. Working.
public class Greater
{
   private readonly DebugConsole _console;

   public Greater(DebugConsole console) =>
        _console = console;

   public void Hello() =>
        _console.Notify("Hello, World!");
}

public class DebugConsole
{
    private readonly IEnumerable<Greater> _greater;

    public DebugConsole(IEnumerable<Greater> greater) =>
        _greater = greater;

    public void Welcome() =>
        _greater.First().Hello();

    public void Notify(string message) =>
        Debug.Log(message);
}

var builder = new ContainerBuilder();
builder.AddSingleton(typeof(DebugConsole));
builder.AddSingleton(typeof(Greater));
var container = builder.Build();
var console = container.Resolve<DebugConsole>();
console.Welcome(); // now it's work! Print "Hello, World!"!

It happens because enumerations is a lazy evaluation, and the container returns exactly the enumeration when it is resolved.

Code from Reflex Container
public IEnumerable<object> All(Type contract)
{
    return ResolversByContract.TryGetValue(contract, out var resolvers)
        ? resolvers.Select(resolver => resolver.Resolve(this))
        : Enumerable.Empty<object>();
}

So the previous code works, but the next one fails again:

Example 3. Not working.
public class DebugConsole
{
    private readonly Greater _greater;

    public DebugConsole(IEnumerable<Greater> greater) =>
        _greater = greater.First();

    public void Welcome() =>
        _greater.Hello();

    public void Notify(string message) =>
        Debug.Log(message);
}

This could be solved by explicitly calling the enumeration at creation time, for example, with .ToArray():

Added ToArray to Reflex Container
public IEnumerable<object> All(Type contract)
{
    return ResolversByContract.TryGetValue(contract, out var resolvers)
        ? resolvers.Select(resolver => resolver.Resolve(this)).ToArray()
        : Enumerable.Empty<object>();
}

I don't know if this is a bug or a feature. But in my opinion, it is a hack. Such functionality can be implemented by other means (if necessary), and leaving the enumeration as an enumeration. The containers I've worked with throw an exception here. And this seems to me to be the more expected behavior. What do you think about it?

Hello @Scrawach great finding here, actually the only reason im not calling .ToArray() for when resolving enumerations is to avoid allocating an array to fit all elements, not because I would like to support this hacky way of having circular dependencies.
So in current implementation, consumer can decide if he want to iterate using the returned IEnumerable with a foreach, or want to cache an array calling .ToArray() having now a contigous version of this enumerable to be able to iterate a bit faster.

Hello @gustavopsantos , good point, I agree. However, the problem is that at the moment when a consumer wants to cache an array by calling .ToArray() in the constructor, he won't be able to do it, because there are cyclic dependencies in the system. And he will find out about it exactly at the moment of caching, not at the moment of designing before that. And how painful it will be depends on the concrete situation and the time of the project's life. I guess, of course, architecture problems are not the concern of a DI container, but it would be convenient if the consumer found out about his problem much earlier.
Anyway, I've highlighted this point and if you think that performance is a more important factor here (as a killer feature), I certainly won't insist. Nevertheless, it might make sense to highlight this in the documentation in future.

@Scrawach Well, I believe most of people are not using much All<T> API, specially if performance is a concern, so I think in this case design consistency is more important than performance, thanks for pointing this out!
 Thanks for the framework! :)

@Scrawach Added .ToArray() to .All() and to .All<T>() methods, ensuring all resolve kind APIs throw exception when resolving cyclic dependencies. Thank you so much for you detailed feedback ;)
https://github.com/gustavopsantos/Reflex/releases/tag/8.0.0


D3-color while occured error when use @angular-devkit/build-optimizer/webpack-loader.

🐞 Bug report
Command (mark with an x)

[ ] new
[x] build
[ ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[ ] extract-i18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Is this a regression?

 no.
Description
 A clear and concise description of the problem...
🔬 Minimal Reproduction

🔥 Exception or Error

🌍 Your Environment

Anything else relevant?

Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information.
If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.


Cant download big video

It can usually happen due to an unstable Internet connection. Try to download again.

ok


Support PostgreSQL 10+ versions

Psycopg2 doesn't seem to work with more recent versions (10/11+) of libpq-dev. This requires experimentation and maybe replacing psycopg2 with something else more generic. For per-minute metrics purposes we don't need high performance, but simplicity and maintainability with future PostgreSQL versions.

I'm thinking of using this library with PostgreSQL 10. Did you ever get it to work?


How to get a frame when the camera is previewing, without capture still picture?

I need to regoznize a frame when camera is previewing, now I know how to get the still picture, but when
the capture picture request is started, the preview can't be smoothed, it means the preview repeating request is interrupt by the Capture still picture request. So is theri any way to get the frame under the perview and didn't interrupt the preview?

@tjohns @ryanseys @shailen do all you know how to get a frame not a still picture under the previewing state and didn't interrupt the preview

Hello,
I have the same issue. Could anybody to help to get frame from preview?
ImageReader.OnImageAvailableListener is not a right way, because you will not getting 30 frame during seconds.
But if you're using Camera.PreviewCallback you can getting a lot of frames during a second and use it in real time.

@sinnuswong @syakimchik there are several things that you can do to address this problem. If I'm understanding correctly, you are trying to do some sort of frame analysis while showing the preview on a SurfaceView (or TextureView).

when the capture picture request is started, the preview can't be smoothed

There are a few ways to address this problem. You can use a template designed not to interrupt the preview stream, like ZSL. It is also recommended that you add the Surface from your SurfaceView as a target to your still picture capture request. For more details, take a look at the "Interleaving Requests" section in our latest blog post.

ImageReader.OnImageAvailableListener is not a right way, because you will not getting 30 frame during seconds

If you setup your capture session and image processing pipeline correctly, you should be able to maintain ~30 FPS on most if not all devices -- the actual expected FPS can be computed by taking into consideration StreamConfigurationMap.getOutputMinFrameDuration() and StreamConfigurationMap.getOutputStallDuration(). If you use 3-5 frames as a buffer in your ImageReader by passing that number as the maxImages parameter in the ImageReader constructor and you keep your average processing time per frame at a rate higher than 30 FPS, you should be seeing 30 FPS output.
The problem here is that if you also want to display that same output to the user in real time then you need to either setup two separate targets, in which case you may not be able to do both the analysis and the preview shown to the user at maximum resolution; or use a single output target and copy each frame as it comes into a View (which you then show to the user), but then the copy alone will be taking up a lot of the scarce processing time necessary to maintain 30 FPS.

Hi @sinnuswong
One way I used in the preview session is by calling getBitmap() inside the capture session's callback onCaptureCompleted as long as the current class inherits from TextureView. (Like the demo).
I believe for each frame we could access its bitmap.
mPreviewSession.setRepeatingRequest(previewBuilder.build(),
new CameraCaptureSession.CaptureCallback() {
@Override
public void onCaptureCompleted(@NonNull CameraCaptureSession session,
@NonNull CaptureRequest request, @NonNull
TotalCaptureResult result) {
super.onCaptureCompleted(session, request, result);
Bitmap bitmap = getBitmap();
//do your own logic there
}
}, backgroundHandler);

Hi @liute62,
I've tried you way to get Bitmap from SurfaceView on onCaptureCompleted method. But it also causes a freezing UI. It's not a good way. Camera1 API is using onPreviewFrame method which is not caused any UI freezing.

@syakimchik have you some news for this?

I tried to get the frame as @liute62 suggested and it works really well for a start. I do prefer to get it from the ImageReader.OnImageAvailableListener as I request my pictures to be a minimum of 480 height.
@the moment I'm getting the texture.getBitmap() from the public void onSurfaceTextureUpdated(SurfaceTexture texture) instead of the captureCalback as @liute62 pointed if you do it on the captureCallback you will have to do a runOnUiThread(new Runnable().
i wait for a frame to be processed and failed to get another frame for processing and add to a AsyncTask. The UI gets blocked but I can live with that until I find a more suitable method from the ImageReader.OnImageAvailableListener
Uploaded a video if you want to check it out, at the end I move shake it a bit for the blocking to be more noticeable.
I think is a start.

I manage to get it working with Camera2 by creating a captureStillPicture() like in the sample:
    private void captureStillPicture() {
        try {
            if (cameraDevice == null) {
                return;
            }
            int rotation = getWindowManager().getDefaultDisplay().getRotation();
            CaptureRequest.Builder captureBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
            captureBuilder.addTarget(imageReader.getSurface());
            captureBuilder.set(CaptureRequest.FLASH_MODE, torchStatus);
            captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation));
            captureBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);
            captureBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON);
            captureBuilder.set(CaptureRequest.JPEG_QUALITY, (byte) 100);
            captureBuilder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, range);
            CameraCaptureSession.CaptureCallback captureStillCallback = new CameraCaptureSession.CaptureCallback() {
                @Override
                public void onCaptureCompleted(@NonNull CameraCaptureSession session, @NonNull CaptureRequest request, @NonNull TotalCaptureResult result) {
                }

                @Override
                public void onCaptureStarted(@NonNull CameraCaptureSession session, @NonNull CaptureRequest request, long timestamp, long frameNumber) {
                    super.onCaptureStarted(session, request, timestamp, frameNumber);
                }
            };
            captureSession.capture(captureBuilder.build(), captureStillCallback, null);
        } catch (CameraAccessException e) {
            e.printStackTrace();
        }
    }

Which gets called from the preview captureCallback, as is, from the sample, since I'm using OCR with MLKit I don't really need much settings, i get really good results as you can see in this video However in my LGM250 which reported to be CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY was REALLY horrible. So I thought on using the deprecated Camera API for LEGACY and LIMITED when found out of CameraView and oh sweet baby Jesus!!!
Do yourself a favor if you don't need any of the fancy stuff you can get with Camera2 for frame processing use CameraView it reduced my camera logic to 30% and is LIGHTNNING FAST!!!!! and is virtually very easy to implement

@GuanacoDevs
Can you look into my stackoverflow's problem? I can't even have the camera set to the setting I want correctly and can you guide me more regarding getting frame by frame?
https://stackoverflow.com/questions/56539650/why-turning-on-flash-change-the-focus-mode-of-the-camera

@chungyau97 To be honest is been awhile since I tinkered around with Camera2 since I'm using [CameraView](https://github.com/natario1/CameraView), but I did post an answer that might help.
On a side note I think is better if you drop Camera2 and start using [CameraX](https://developer.android.com/training/camerax) I haven't used yet but looking forward to, seems promising.
On the frame by frame side, I did got to get good results after two or three weeks of working with it until I found out about CameraView but the reality is that Camera2 is not good for frame processing(you will make it work, but it will be a real pain in the ass), it will make you work really hard, when now CameraX seems a better bet is Camera2 simplified(as stated in the link), so I'd suggest, no, I BEG YOU!!!! to switch to CameraX.

This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).
As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.
If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!


Prevent user disabled package sources

VS settings on my box were preventing us from restoring because I'd disabled a source in VS which broke our repo. Prevent that, like we prevent VS registered sources from breaking us.

tag @dotnet/project-system I'll retarget to master once we've merged post-dev15 -> master.


MM-38134 - change first purchase success screen texts

Summary
This PR makes sure that after the initial purchase (when purchasing in free trial), the success page message makes reference to an initial purchase instead of an upgrade as it has been doing so far.
Ticket Link
https://mattermost.atlassian.net/browse/MM-38134
Screenshots
First subscribe to Cloud Professional:

After first purchase any other upgrade will show:

Release Note
NONE

LGTM, I would just center the laptop illustration on the page (not the laptop + card) @pablovelezvidal


Cilium latest error: iptables: No chain/target/match by that name

Recent builds of the latest Cilium code (v1.10 dev cycle) have been succeeding, while printing the following error to the logs:
level=error msg="Command execution failed" cmd="[iptables -t mangle -n -L CILIUM_PRE_mangle]" error="exit status 1" subsys=iptables
level=warning msg="iptables: No chain/target/match by that name." subsys=iptables

The same error happens in v1.8 but not in v1.9, so it seems it was caused by https://github.com/cilium/cilium/pull/12964. /cc @jrajahalme

We are also seeing this in v1.9, and it is causing an issue with node-local-dns rules
Before restarting agent (node-local-dns is broken):
-A PREROUTING -d <IP_ADDRESS>/32 -p udp -m udp --dport 53 -j NOTRACK
-A PREROUTING -d <IP_ADDRESS>/32 -p tcp -m tcp --dport 53 -j NOTRACK
-A PREROUTING -m comment --comment "cilium-feeder: CILIUM_PRE_raw" -j CILIUM_PRE_raw

After restart (node-local-dns working):
-A PREROUTING -m comment --comment "cilium-feeder: CILIUM_PRE_raw" -j CILIUM_PRE_raw
-A PREROUTING -d <IP_ADDRESS>/32 -p udp -m udp --dport 53 -j NOTRACK
-A PREROUTING -d <IP_ADDRESS>/32 -p tcp -m tcp --dport 53 -j NOTRACK

Same problem here. When hubble is enabled we see the same iptables error and the cilium pods never reach a working state.
level=info msg="Envoy: Starting xDS gRPC server listening on /var/run/cilium/xds.sock" subsys=envoy-manager
level=error msg="Command execution failed" cmd="[iptables -t mangle -n -L CILIUM_PRE_mangle]" error="exit status 1" subsys=iptables
level=warning msg="iptables: No chain/target/match by that name." subsys=iptables
level=info msg="Waiting until all Cilium CRDs are available" subsys=k8s
level=info msg="All Cilium CRDs have been found and are available" subsys=k8s
level=info msg="Creating or updating CiliumNode resource" node=ip-172-31-54-105.eu-central-1.compute.internal subsys=nodediscovery
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Retrieved node information from cilium node" nodeName=ip-172-31-54-105.eu-central-1.compute.internal subsys=k8s
level=warning msg="Waiting for k8s node information" error="required IPv4 PodCIDR not available" subsys=k8s
level=info msg="Exiting due to signal" signal=terminated subsys=daemon

Once hubbe is disabled again it works as expected.


Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)'

What steps will reproduce the problem?
following tutorial https://code.tutsplus.com/tutorials/building-your-startup-with-php-feature-requirements-and-database-design--cms-22618
install yii, make a database, user, put the credentials in \environments\dev\common\main-local.php
 [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=your-db',
            'username' => 'your-username',
            'password' => 'your-pwd',
            'charset' => 'utf8',
        ],

then run "./yii migrate/up 1"

### What is the expected result?
Creating migration history table "migration"...done.
Total 1 out of 15 new migrations to be applied:

### What do you get instead?
Error: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
on clearlinux web server

-or-

Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)'
on  Ubuntu localhost

### Additional info

| Q                | A
| ---------------- | ---
| Yii version      | 2.0.?
| PHP version      | 5.6.31 and/or 7.1.8
| Operating system | Ubuntu 17.10 and/or CloudLinux

After editing environment config files you must run console command: php init, then select from by default configs: Dev on development version, or Prod on production.

I ran php init and composer update. I tried both dev and prod settings.
Same error. This does not fix the proble.
On Tue, Oct 31, 2017 at 11:21 PM, Dmitriy Kim<EMAIL_ADDRESS>wrote:

After editing environment config files you must run console command: php
init, then select from by default configs: Dev on development version, or
Prod on production.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/yiisoft/yii2/issues/15057#issuecomment-340967573, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AJ347Ac3bYfgEfJlADbdx5j52cf69jeiks5sx-OmgaJpZM4QNrti
.


Fixing missing docstrings and adding example for chloropleth

Codecov Report

Merging #34 (e2c9472) into main (1e5cd7c) will increase coverage by 0.59%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   74.73%   75.33%   +0.59%
==========================================
  Files          23       23
  Lines         669      669
==========================================
+ Hits          500      504       +4
+ Misses        169      165       -4

Impacted Files
Coverage Δ

src/aggregate.jl
87.03% <ø> (ø)

src/data_cleaning/interpolation.jl
92.30% <0.00%> (+15.38%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


readme: update exmaple binary version

What is changed and how it works?

Issue Number: Close https://github.com/tikv/tikv/issues/16884

What's Changed:

Update the binary version in README.md example.

Related changes

[ ] PR to update pingcap/docs/pingcap/docs-cn:
[ ] Need to cherry-pick to the release branch

Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[x] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Release note

None

/check-issue-triage-complete

/merge


Rename match into condition

To be closer even of the UX with Falco, I propose to rename the match field into condition.
Feel free to comment if you think it is worth or not.

i would go for match because talon triggers action that matches rules built-in the configuration.
but that's my 2cents

Both terms are a little computer scienc-ey to me. From the naive UX view, what is the UI functionality we are trying to model?

Both terms are a little computer scienc-ey to me. From the naive UX view, what is the UI functionality we are trying to model?

This section in the rules is there to find which Falco events match to trigger actions. Basically, it's a match when the condition is true.

Ah ok. Can I suggest event_action_trigger?
Mark
On Mon, 6 May 2024 at 22:11, Thomas Labarussias @.***>
wrote:

Both terms are a little computer scienc-ey to me. From the naive UX view,
what is the UI functionality we are trying to model?
This section in the rules is there to find which Falco events match to
trigger actions. Basically, it's a match when the condition is true.
—
Reply to this email directly, view it on GitHub
https://github.com/falco-talon/falco-talon/issues/232#issuecomment-2095871813,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGQV5KDC7JLUYIIEEOQPW3ZA5XQHAVCNFSM6AAAAABHD673GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVHA3TCOBRGM
.
You are receiving this because you commented.Message ID:
@.***>

Ah ok. Can I suggest event_action_trigger? Mark
…
On Mon, 6 May 2024 at 22:11, Thomas Labarussias @.> wrote: Both terms are a little computer scienc-ey to me. From the naive UX view, what is the UI functionality we are trying to model? This section in the rules is there to find which Falco events match to trigger actions. Basically, it's a match when the condition is true. — Reply to this email directly, view it on GitHub <#232 (comment)>, or unsubscribe <github.com/notifications/unsubscribe-auth/AAGQV5KDC7JLUYIIEEOQPW3ZA5XQHAVCNFSM6AAAAABHD673GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVHA3TCOBRGM> . You are receiving this because you commented.Message ID: @.>

A little bit long :sweat_smile:
My point is between:
- rule: Suspicious outbound connection
  description: Block suspicious outbound connections and terminate the pod
  match:
    rules:
      - Unexpected outbound connection destination
  actions:
    - action: Terminate Pod
      actionner: kubernetes:terminate
      parameters:
        gracePeriods: 2

- rule: Suspicious outbound connection
  description: Block suspicious outbound connections and terminate the pod
  condition:
    rules:
      - Unexpected outbound connection destination
  actions:
    - action: Terminate Pod
      actionner: kubernetes:terminate
      parameters:
        gracePeriods: 2

I noticed Kyverno uses the term match too:
spec:
  validationFailureAction: enforce
  rules:
    - name: check-config-map
      match:
        any:
        - resources:
            kinds:
            - ConfigMap

With your comments and more discussion aside, I think we can consider it's not worth to spend time on that change.
Thanks everybody.


Add Rails class template

This is what I get from your template in app/foo/bar.rb:
# frozen_string: literal

class Bar < Base

end

While this is the default from projectile-rails' template:
class Bar

end

The magic comment can be turned on by setting (setq projectile-rails-expand-snippet-with-magic-comment t) and results in:
# frozen_string_literal: true

class Baz

end

The only difference with your template (apart from the slightly mis-formed magic comment) that I can see is the automatic inheritance of Base, which I think is not a good thing to have in Doom upstream. Not everyone who uses a Ruby project with a nested app/ directory will have a class called Base.
I'd just use the file templates from projectile-rails for app/ since it does a good job with its templates there. For lib/, I came up with another advice that might be better because projectile-rails--snippet-for-module is used both for lib/ and for app/ (if no specialized app/ snippets applies):
(when (featurep! :editor file-templates)
  (defadvice! +projectile-rails-ignore-snippet-for-lib-a (orig-fn)
    "Use ruby-mode's __app_class file template by returning no snippet."
    :around 'projectile-rails-corresponding-snippet
    (if (string-match "lib/\\(.+\\)\\.rb$" (buffer-file-name))
        nil
      (funcall orig-fn))))

It uses the same regexp that projectile-rails-corresponding-snippet uses to find lib/ and will therefore only override that one. The downside is that this regexp needs to be kept up to date in case projectile-rails changes its regexp, but in this case I doubt there will be many changes.

This is what I get from your template in app/foo/bar.rb:
# frozen_string: literal

class Bar < Base

end

While this is the default from projectile-rails' template:
class Bar

end

The magic comment can be turned on by setting (setq projectile-rails-expand-snippet-with-magic-comment t) and results in:
# frozen_string_literal: true

class Baz

end

The only difference with your template (apart from the slightly mis-formed magic comment) that I can see is the automatic inheritance of Base, which I think is not a good thing to have in Doom upstream. Not everyone who uses a Ruby project with a nested app/ directory will have a class called Base.
I'd just use the file templates from projectile-rails for app/ since it does a good job with its templates there. For lib/, I came up with another advice that might be better because projectile-rails--snippet-for-module is used both for lib/ and for app/ (if no specialized app/ snippets applies):
(when (featurep! :editor file-templates)
  (defadvice! +projectile-rails-ignore-snippet-for-lib-a (orig-fn)
    "Use ruby-mode's __app_class file template by returning no snippet."
    :around 'projectile-rails-corresponding-snippet
    (if (string-match "lib/\\(.+\\)\\.rb$" (buffer-file-name))
        nil
      (funcall orig-fn))))

It uses the same regexp that projectile-rails-corresponding-snippet uses to find lib/ and will therefore only override that one. The downside is that this regexp needs to be kept up to date in case projectile-rails changes its regexp, but in this case I doubt there will be many changes.

about the Base, its changable, i don't use base either, when i create the file, it come selected (by the snippet), just press C-d and its gone, or tab and i can change forr my Base (in case, is ApplicationBusiness)

You're right that nested modules don't indent well, however I think that should be fixed upstream at projectile-rails and not worked around by creating a new file template in Doom.

You're right that nested modules don't indent well, however I think that should be fixed upstream at projectile-rails and not worked around by creating a new file template in Doom.

this template that i made is a little better than projectile rails, but anyway, i created an issue there:
https://github.com/asok/projectile-rails/issues/155


Way to cap the number of tokens per groups

Is there any way to cap the number of NFTs minted per group ? For example having public first capped at 1k NFTs minted then have the whitelist group mint the rest of the supply ?
Thanks in advance :)

I think you can do it by just calulcation of wallets collected and how many you can mint , and do not allow all mints at the same time

I think you can do it by just calulcation of wallets collected and how many you can mint , and do not allow all mints at the same time

if we do not end the whitelist phase before open public, noth will work right?
Whitelsit wallets can mint on whitelsit and not whitelisted can mint on public?


WIP - Implement CkFinite opcode for WebAssembly

Most of the borrowed cases from https://github.com/dotnet/coreclr/blob/9b0a9fd623/tests/src/JIT/IL_Conformance/Old/Base/ckfinite.il are working.
WIP: For some reason, 0x7F7FFFC0 is running into trap branch with CkFinite32 in CkFinite.il, however it works until 0x7F7FFFBF. Investigating.
Closes #4549

So far this looks reasonable. I'm not immediately spotting the reason for the bug you've described.

On closer inspection of the LLVM documentation for fptoui/fptosi, it looks like those are value conversion rather than bit conversion where the test case is setting bits. Should this be a case for LLVM.BuildBitCast instead?

@morganbr, it is true that we need to use BitCast and using that yields the same (false-positive for value 0x7F800000 -- passing, instead of failing), similar to our CastIfNecessaryPtr variant (https://github.com/dotnet/corert/pull/5405#discussion_r169862225).
This implementation has same parity as https://github.com/dotnet/llilc/pull/848 (both are incomplete implementation of ckfinite spec).
However, we could use llvm.fabs intrinsic (https://llvm.org/docs/LangRef.html#llvm-fabs-intrinsic) to get the float abs value and implement isfinite efficiently (e.g. https://github.com/kcc/fuzzing-with-sanitizers/blob/f312e7d195c6/llvm/llvm-as/C1/fp-classify.ll#L15). However, I could find a way to utilize LLVM intrinsic using LLVMSharp wrapper. 😢
Do you have any suggestions how to emit raw LLVM ops using LLVMSharp?

@am11, LLVM intrinsics work by defining them as external functions and then calling them. Take a look at https://github.com/dotnet/corert/blob/b65389a856901b93d8d75851341a79b17ca5e745/src/ILCompiler.WebAssembly/src/CodeGen/ILToWebAssemblyImporter.cs#L201-L205
for an example of how we use the llvm.memset intrinsic.

@morganbr, I haven't forgotten about this PR. :)
I tried opted into the cast-with-arbitrary-precision approach taken by llilc implementation and hit a tiny blocker in LLVMSharp API surface, which was fixed by https://github.com/Microsoft/LLVMSharp/pull/68. Waiting for the package update. Though, that llilic approach might not be the only way to land this.

@am11 quite a few things have changed both with LLVM/LLVMSharp and CoreRT.  Do you have time to see if this is just fixed now?

@yowl, thanks for the heads up. I will likely not get time to visit this anytime soon. If you think you can drive this forward, please feel free. :)
Maybe it would make the steps more clearer if the C++ version is implemented alongside https://github.com/dotnet/corert/blob/be4acd6/src/ILCompiler.CppCodeGen/src/CppCodeGen/ILToCppImporter.cs#L3398 to find out if we get matching results when running ckfinite.il tests?

@am11 ok, thanks.  It was nearly there, fptoui as you suspected does not bitcast, but converts the float to the nearest int.  I didn't go with the intrinsic as I couldn't create the 32 bit float const.  The updated version of your branch is at https://github.com/yowl/corert/tree/wasm-ckfinite.  I have another PR to go in first, then will do one for this.  You can close this PR if you like.

Thanks for the update and all your work on WASM @yowl! I will go ahead and close this PR.


Optimize the code in some places

Optimize the code in some places for HeaderExchangeServer and NettyServer

Codecov Report

Merging #7799 (2b7502c) into master (e845e16) will increase coverage by 0.10%.
The diff coverage is 100.00%.

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


chore: update next-spec branch with master changes

This is PR is part of https://github.com/asyncapi/spec/issues/830 and updates next-spec branch with changes from master.

https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html URL is used twice within the spec and it seems like it's dead. Let's wait a bit to see if it's just a temporary 404 or permanent one.

Verification question - I've created this PR by merging master branch with next-spec and issuing a PR containing the merges + a merge commit. There are other ways to achieve the same. Is there any preference in how to achieve the goal of updating the next-spec branch from master? If yes please let me know.

@derberg @fmvilas @dalelane this is ready for review. The links check reports incorrectly failure. The links have been fixed on master and the commit is part of my forked branch as well. So I assume that link checker is checking next-spec branch instead of running the check on the merge commit of my forked branch + next-spec branch.

I guess you need to update this one because of https://github.com/asyncapi/spec/pull/832

@derberg it was already updated yesterday

oh, ok, I'll check why markdown link checker fails then

/rtm

Forget about the last comment saying it was released in version 2.5.0-next-major-spec.1. I made a mistake and it created this version but it should actually be 3.0.0-next-major-spec.1. There's a notice in the release. Apologies for the noise.

Recent comments about the release from the bot were added by mistake. More details in https://github.com/asyncapi/spec/issues/899


fix: fix bad exports

Overview

Fixing some bad exports in the index.js file and some left over from the revert of the unwrap code.
Related Issue(s)

https://issues.newrelic.com/browse/NEWRELIC-7903
https://github.com/newrelic/newrelic-browser-agent/issues/454
Testing

Added a vite react wrapper project to the test builds and a functional test to make sure that wrapper generates a rum call.

Codecov Report

Merging #455 (e780a27) into main (fec8c63) will increase coverage by 3.55%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           main    #455      +/-   ##
=======================================
+ Coverage      0   3.55%   +3.55%
=======================================
  Files         0     119     +119
  Lines         0    3915    +3915
  Branches      0     966     +966
=======================================
+ Hits          0     139     +139
- Misses        0    2978    +2978
- Partials      0     798     +798

Impacted Files
Coverage Δ

src/common/wrap/wrap-events.js
0.00% <ø> (ø)

src/common/wrap/wrap-fetch.js
0.00% <ø> (ø)

src/common/wrap/wrap-function.js
0.00% <ø> (ø)

src/common/wrap/wrap-history.js
0.00% <ø> (ø)

src/common/wrap/wrap-jsonp.js
0.00% <ø> (ø)

src/common/wrap/wrap-raf.js
0.00% <ø> (ø)

src/common/wrap/wrap-timer.js
0.00% <ø> (ø)

src/common/wrap/wrap-xhr.js
0.00% <ø> (ø)

... and 111 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Merged with #455


Updating s3 docs for Automate and A2HA

Description
[Please describe what this change achieves]
Issues Resolved
[List any existing issues this PR resolves, or any Discourse or
StackOverflow discussions that are relevant]
Check List

[ ] New functionality includes tests
[ ] All buildkite tests pass
[ ] Full omnibus build and tests in buildkite pass
[ ] All commits have been signed-off for the Developer Certificate of Origin. See https://github.com/chef/chef/blob/main/CONTRIBUTING.md#developer-certification-of-origin-dco
[ ] PR title is a worthy inclusion in the CHANGELOG

Why should this be in the Server docs? This seems like content that should be in an Automate config doc. I also don't see any of those config settings in the server docs or anywhere else.

Maybe I'm missing something.
First, we shouldn't be talking about A2HA in Server docs.
None of those settings are referenced in the Server docs, so if users can and should modify or set them in Server, then we should document what they are first.
From the context here, it looks like something that only applies to Automate users, so this would fall under a doc for configuring Server to work with Automate in the Automate docs.
If chef-server.rb isn't present, then what is the alternative? Why do they care about sys.config if their issue is the chef-server.rb. The relationship between the two isn't clear here. Can the settings that normally fall in the chef-server.rb be passed from the sys.config, or is that file stored on S3 and the path is in the sys.config?
Also, it looks like you're not specifying a location, but a command to run to return a file path.

Closing because there hasn't been a response to my questions.


Updates to rodents static content

Ok, this should be right, the files have been renamed to start with a capital letter and everything should be beautiful... let me know if it isn't
Thanks!

There are a few files at the bottom of the list that are still lower case, and I think the chinese hamster needs the cell line in its name. Have a look on staging to see each species' URL.

Are you sure those aren’t just deleted files (in red)? e.g. ensembl/htdocs/ssi/species/ictidomys_tridecemlineatus_assembly.html https://github.com/Ensembl/public-plugins/pull/88/files#diff-139fdd0c451db2d2a2e04d88543c2abbhas been deleted and a new file has taken it’s place ensembl/htdocs/ssi/species/Ictidomys_tridecemlineatus_assembly.html https://github.com/Ensembl/public-plugins/pull/88/files#diff-ab442a00b77dd7798b2142cc157a1fac

On 28 Jul 2017, at 15:47, Anne Lyle<EMAIL_ADDRESS>wrote:
There are a few files at the bottom of the list that are still lower case, and I think the chinese hamster needs the cell line in its name. Have a look on staging to see each species' URL.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/Ensembl/public-plugins/pull/88#issuecomment-318671844, or mute the thread https://github.com/notifications/unsubscribe-auth/AHpqc5vSWAzpBMRWSiIMOMpvWj5FboXUks5sSfSGgaJpZM4OmsRl.

Ah yes, you're right - sorry, it's Friday afternoon and our sandboxes are very sluggish, so we're all tired and frustrated in this office!

Completely understandable, we have a very similar feeling in this office, we’ve almost made it to the weekend though!
Thanks for all your help :)

On 28 Jul 2017, at 15:58, Anne Lyle<EMAIL_ADDRESS>wrote:
Ah yes, you're right - sorry, it's Friday afternoon and our sandboxes are very sluggish, so we're all tired and frustrated in this office!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/Ensembl/public-plugins/pull/88#issuecomment-318674967, or mute the thread https://github.com/notifications/unsubscribe-auth/AHpqc5ypqI_wSvfFaTedE70R2FJwReMSks5sSfcAgaJpZM4OmsRl.


Release versions using twine

coverage: 92.554%. remained the same
when pulling 4426bf13d25c93647831ab66d1065f0f591cc61d on add_twine
into 4b90a384885601894b168b0311170cf3eec4888f on main.


Note that Boards requires EnableReliableWebsockets in important upgrade details

Summary

Note boards requirement (per https://github.com/mattermost/focalboard/discussions/1971) in important upgrade details
This issue has come up a number of times: https://github.com/mattermost/focalboard/issues?q=EnableReliableWebSockets+
Ticket Link

Hello @bbodenmiller,
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.


Move SUBNETS_PER_NODE from Constants to Configuration

Per https://github.com/ethereum/consensus-specs/pull/3312#issuecomment-1548973273,
This PR moves SUBNETS_PER_NODE from "Constants" to "Configuration".
/cc @AgeManning

Yeah. I thought it might be nice to have this flexibility so we can change it between networks which have different node-counts.
It might make it easier for testnets with very-low node counts to function by increasing this parameter.

Should this be closed to avoid confusion?

replaced by #3375


Add Dockerfile for aquatic_ws

Thanks for the great work here on acquatic.
Would you consider creating a docker file so that it's easier to test this software (and become a contributor) without having to go through the Rust setup?

@zackees
I realise that being able to build and run aquatic_ws with Docker would be slightly easier (and require making less changes to your machine) than installing rustup and cmake and building it. However, creating a decent Dockerfile that covers things such as setting up a TLS certificate (a real one, or maybe a bogus one for debugging locally), mapping configuration keys and achieving decent build times is not trivial. I unfortunately don't think that the group of people who currently are not able to/interested in running aquatic, but would be if a Docker setup was available, is large enough for me to justify expending the time.
Developing Rust projects is generally a lot slower when using Docker since incremental compilation isn't supported, including when using cargo-chef and the like. Contributors will likely want to install rustc and cmake on their own machine (or a Linux VM) eventually.
However, if you want to take a stab at creating a Dockerfile, you could have a look at the CI pipeline. You could also build off something like the following:
# Run aquatic_ws in Docker (place in aquatic_ws/Dockerfile)
#
# $ docker build -t aquatic-ws -f aquatic_ws/Dockerfile .
# $ docker run -it --rm -p 3000:3000 --name aquatic-ws aquatic-ws

FROM rust:latest
WORKDIR /usr/src/aquatic
COPY . .
RUN . ./scripts/env-native-cpu-without-avx-512 && cargo install --path ./aquatic_ws
RUN ./scripts/gen-tls.sh
RUN echo "log_level = 'debug'\n[network]\naddress = '<IP_ADDRESS>:3000'\ntls_certificate_path = './tmp/tls/cert.crt'\ntls_private_key_path = './tmp/tls/key.pk8'" > ./ws.toml
EXPOSE 3000
CMD ["aquatic_ws", "-c", "./ws.toml"]

Sorry if this is newb question but why do you need to have TLS in the app itself?
When I deploy http microservices with DigitalOcean or render.com I always use port 80 and let the DO/Render.com service itself issue TLS/SSL certs for the app. The app itself just communicates through <IP_ADDRESS>:80 and has no idea what the actual domain it's resolving to, nor does it care.

I'll donate $$ to the project if you can implement this feature with DigitalOcean as the reference host.
That's how important this feature is.

Here's a testing client fork of instant.io which adds specification for tracker server
https://webtorrentseeder.com

Fork: https://github.com/greatest-ape/aquatic
I've put about 8 hours into this with docker and the main blocker right now on both Digital Ocean and Render.com is the failure of the health checks.

Which from the documents shows that what's basically happening is that these services are sending a ping to the service at port 8080 (or 3000 in the case of this app) and the expected result is a 200 or 204 response code. It appears that the aquatic_ws doesn't have an http engine and so the request produces an error and the docker instance fails to deploy.
https://www.digitalocean.com/community/questions/why-am-i-getting-a-deploy-error-health-checks

I'm closing this bug since i was able to deploy a dockerized version of bittorrent-tracker. Although it's not nearly as fast as your rust based solution, it does get the job done and is accessible to a broader range of developers and even non developers.
So I'll go ahead and close this bug. Thanks for the quick response and taking the time to create a dockerfile!
https://github.com/zackees/docker-bittorrent-tracker

Thanks for trying!
It would indeed be possible to make TLS optional, and if I do, I might also create a Dockerfile for a reasonable “very easy to deploy” default config (no TLS, assuming use of a reverse proxy, no access control).
I would also have to consider if I want the extra complexity of responding to HTTP GET requests just for cases like the health checks that you mentioned, even if they are not part of WebSocket specification.
Then of course, people might still want to eg only allow announces for certain torrents (which I assume would indeed be important to you for DCMA reasons), meaning that the dockerfile would have to support that too.

I would however then also have to consider if I want the extra complexity of responding to HTTP GET requests just for cases like the health checks that you mentioned, even if they are not part of WebSocket specification.

I think this would be trivial to implement and very important. People want to see if the program works. You could just report "ok" or do something like print out stats.

Then of course, people might still want to eg only allow announces for certain torrents (which I assume would indeed be important to you for DCMA reasons), meaning that the dockerfile would have to support that too.

That would be a great feature idea. Would you need it though in v1?

I would however then also have to consider if I want the extra complexity of responding to HTTP GET requests just for cases like the health checks that you mentioned, even if they are not part of WebSocket specification.

I think this would be trivial to implement and very important. People want to see if the program works. You could just report "ok" or do something like print out stats.

No, it’s not trivial, I’ve had a look at it.
Having a way to monitor the service definitely makes sense, but I’m thinking more along the lines of a Prometheus integration or the like.

Then of course, people might still want to eg only allow announces for certain torrents (which I assume would indeed be important to you for DCMA reasons), meaning that the dockerfile would have to support that too.

That would be a great feature idea. Would you need it though in v1?

Yes. The whole point is to make aquatic easier to use for people who do not know how to compile applications, run their own server etc. If they are hosting an open tracker on any major docker hoster such as render, their account will definitely be shut down if they track allegedly infringing hashes and can not meaningfully respond to DMCA notices (frankly, they are likely to have their accounts deactivated before they even have a chance to react to a notice, especially if running on a free tier).
I might be interested in implementing the functionality you’re looking for under contract. Feel free to send me an email if you want to discuss details :-)