Proposal - simplifying resource referencing (part 1)

Proposal - simplifying resource referencing (part 1)
Part 1 / Part 2
Problem statement
Passing around / obtaining references to resources in a type-safe manner is overly complex. Rather than inventing non-type-safe mechanisms to refer to resources or resource properties, we should provide a first-class syntax for doing so, with full type-safety and editor support.
New 'resource' function
The az namespace will expose an additional function named resource, which can be used to obtain a reference to a resource within the current scope.
The resource() function takes the first parameter a string (following the resource type format), and a variable number of arguments based on the number of qualified types in the type string. The semantics and validation for the type string parameter behave exactly as those for the type string in resource declarations.
Objects of type scope will also expose a resource() function, which can be used similarly to obtain a reference to a resource at a different scope.
Examples
Global function
var server = resource('Microsoft.Sql/servers@2020-02-02-preview', serverName)
// 'server' can now be used to access resource properties.
var serverProp = server.properties.someProp

Scope function
var otherRg = resourceGroup('otherRgName')
var otherRgServer = otherRg.resource('Microsoft.Sql/servers@2020-02-02-preview', serverName)
// 'otherRgServer' is a reference to a resource in another scope.
var otherRgServerProp = otherRgServer.properties.someProp

Use to set parent property
// here we can inline the function to provide a reference to the parent resource
resource mySubnet 'Microsoft.Network/virtualNetworks/subnets@2020-08-01' = {
  parent: resource('Microsoft.Network/virtualNetworks@2020-08-01', vnetName)
  name: 'mySubnet'
  ...
}

Use to set scope property
// here we can inline the function to set a scope for the extension resource
resource diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2020-01-01' = {
  scope: resource('Microsoft.Compute/virtualMachines@2020-01-01', vmName)
  name: 'diags'
  ...
}

Notes

This provides the same functionality as the existing keyword, but as a more convenient one-liner.

The 'child' function on a resource
All resources will expose an additional function named child, which can be used to obtain a reference to a child resource of a given type.
The child() function takes a string for the first parameter (following the nested resource type format), and a second argument for the child resource name.
Examples
Obtaining child resource references
resource myVnet 'Microsoft.Network/virtualNetworks@2020-06-01' = {
  name: 'myVnet'
  ...
}

// inheriting the same API version
var subnetRef1 = myVnet.child('subnets', subnetName)

// obtaining a reference with a different API version
var subnetRef2 = myVnet.child('subnets@2020-08-01', subnetName)

EDIT 5/28/21: Added info on child() function, removed proposal for extension resources

Exposing it as a method has a really nice effect of reducing the number of parameters that you have to pass to the resource() function and improves composability.
Even though the name resource() is very generic, I would prefer for us to have one function instead of parent() and child(). The experience will be more seamless because the user doesn't have to think about choosing the right function - it's always resource().

I lean towards parent and child. with resource it's not possible to get parent reference.
as for extension resources in option 1, they start with provider namespaces like Microsoft. can we use that as something which will separate extension from child?

@miqm that's a good point. I'm inclined to using different functions as it's unambiguous. Also I'd prefer the function names to be more explicit:
// child resource
var myChild = storageAcc.childResource('blobServices', 'default')
// extension resource
var myExt = storageAcc.extensionResource('Microsoft.Insights/diagnosticSettings@2020-01-01', 'diags')
// parent resource
var storageAcc = blobServices.parentResource()

Oh my bad. I read things too quickly and mixed up parent() and child() with the child() and extension() discussion we had previously ☹.
We have two types of "hierarchies" here (resource nesting and resource extending) and two directions of travel (up and down). In the worst case, we end up with 4 functions.
For resource nesting, parent() and child() absolutely make sense. The language is clear, unambiguous, and symmetric. One of these also matches the parent property name, which is great because they are related semantically.
Where it gets confusing for me is what do we call traversing the extension "hierarchy". What is the name of a resource being extended relative to an extension? extendee()? Definitely not fond of that ☹. The other direction seems fine with extension(). What also doesn't make naming easy here that the property that specifies the extendee resource on an extension resource is called scope.
The other wrinkle is that resource extending also typically does not use parent/child terminology in any of our docs and other content. Could we fix that/teach users about it? I think the answer is yes here, but would it be going too far?
Going up or down the hierarchy, it's technically feasible to distinguish between nesting and extending by inspecting the resource types (aka counting the / chars, etc.)  because they are never expressions and are always available.
But does it make sense to combine nesting and extending into a pair of functions if we've already split parent and scope? Or do we stick with it and introduce separate pairs of functions for traversal of each type of hierarchy? I have a really strong preference for consistency in that regard. (Either have 2 pairs of functions or combine scope and parent.)
So I think the big choice we need to make is between these options (ignore names for now):

parent()/child() for everything
parent()/child()/extension()/extendee()

After that, things should fall into place IMO.
With choice 1 above, there's also a tiny risk that we may have missed some rare case by combining the two hierarchy traversals. I can't think of anything, but we would be abstracting concepts that are technically separate in the runtime.
@shenglol's point about more explicit function names (*resource()) applies to all the choices and is something we should consider.

idea: what about hving a method for traversing downwards and property (parent, scope) for going upwards? scope in case of resources would return resource group. scope of resource group returns subscription.

It's also worth thinking about what this means for the nested resource scenario. I know that @marcre was keen for us to try to unify deploying children & deploying extensions - e.g.:
Child:
resource vnet 'Microsoft.Network/virtualNetworks@2020-08-01' = {
  name: vnetName

  resource subnet 'subnets' = {
    name: subnetName

  }
}

Extension:
resource vm 'Microsoft.Compute/virtualMachines@2020-12-01' = {
  name: vmName

  resource diags 'microsoft.insights/diagnosticSettings@2015-07-01' = {
    name: diagsName

  }
}

If we were to enable this scenario, then conceptually (in Bicep at least), it might also feel confusing to people that with nested resources, there's a single hierarchy, but outside of nested resources, there are 2 hierarchies. e.g. using the above two examples:
// these two references are equivalent
var subnet = vnet.child('subnets', subnetName)
var subnet2 = vnet::subnet

// these two references are equivalent, but why do I have to remember to use a different function?
var diags = vm.extension('microsoft.insights/diagnosticSettings@2015-07-01', diagsName)
var diags2 = vm::diags

To me, I feel like this leads to two options:

Support extensions in nested resources, unify parent/child & scope/extension into a single hierarchy/set of functions.
Do not support extensions in nested resources, have two separate hierarchies & sets of functions for traversing.

I'm curious to hear whether this changes anything, and if so, which option would be preferred.

I prefer option 2. Although option 1 feels simpler, in fact it's obscuring the underlying concepts (e.g. the differences between child and extension resources) to a degree that I think it could be more confusing than helpful overall.

I've revised this spec to remove references to extension resources. There's some benefit to providing similar functionality for them, but I feel like child references are going to be more useful - and it feels we can safely punt this decision.

I did a bit of digging; some implementation notes:

Bicep's resource analysis and codegen heavily utilizes the fact that every resource is represented by a ResourceSymbol. We'll need to introduce indirection to change this in order to handle references to resources obtained through functions (resource() & child()), as well as other means (param -> #2246 & var -> #3594).
I suggest an initial refactor to add a ResourceMetadata proxy class around ResourceSymbol, and replace relevant usages of ResourceSymbol.
Introduce a means of having ResourceMetadata be generated by a non-ResourceSymbol while still able to provide all the necessary information for codegen and validation (e.g. type info, name fields, IsExistingResource(), ancestry etc).
At this point it should be safe to add resource() / child() functions and have these references behave the same way as references obtained with the resource keyword. We will probably want to generate ResourceMetadata info lazily, but should be careful to collect all instances prior to codegen for IDE validation.

Makes sense to me. We need to make sure that it's thread safe (the registry work will add new concurrency fun).
If the resource metadata can be efficiently calculated on-demand for any arbitrary place where a resource reference can arise and if that calculation understands its dependencies and can request them on-demand as well, then you don't really need the ability to collect them all.

Adding a link to this discussion that covers a feature that is available in ARM templates, however is not available in Bicep.
https://github.com/Azure/bicep/discussions/5805
Discussion covers the ability to create a Scope from strings.
We currently have open discussions on passing Resources, however I wonder if it would be possible to pass a Scope or have a scope function to have parity with ARM templates?

Posting on this issue as mine #9468 has since been closed. There are some limitations to having different resources using different scopes in the same module that might limit this, but I'd like to see a mechanism where, even if it's just more syntactical sugar on the dev's part, I can use overloads on a resource type in Bicep and assign to a variable for use elsewhere in the same module.
For example:
Global
var server = resource('Microsoft.Sql/servers@2020-02-02-preview', serverName)

Scoped
var server = resource(subscriptionId, resourceGroupName, 'Microsoft.Sql/servers@2020-02-02-preview', serverName) //Note the optional override passing the subscription ID and resource group name into the resource()

Personally, this comes up a lot when I need to do some sort of DNS validation and need to modify a DNS zone or need to pull a secret from a Key Vault in another subscription/resource group and being able to specify that other scope in one place without modularizing every single child operation that has different scopes would simplify the deployments at dev time.
I'm pretty happy with the child syntax, though I cannot immediately think of a scenario in which I'd use it (unless it can be used to specify a modification target instead of creating a new resource).

Posting here instead of a new issue to cite an inconsistency that I hope this issue would fix. Especially when looping through objects/arrays in order to derive values for resource references, I frequently opt first to do something like the following:
@description('Used to identify the details of a specific certificate')
type certificateMapping = {
  @description('The subject value of the certificate')
  subject: string
  @description('The name of the secret in the Key Vault')
  secretName: string
  @description('The thumbprint of the certificate')
  thumbprint: string
  @description('The identifier of the Key Vault instance')
  keyVault: keyVaultIdentifier
}

@description('Used to identify a Key Vault and where it\'s deployed to')
type keyVaultIdentifier = {
  @description('The name of the Key Vault')
  name: string
  @description('The ID of the subscription the Key Vault is associated with')
  subscriptionId: string
  @description('The name of the resource group the Key Vault is associated with')
  resourceGroupName: string
}

param CertificateSubjects certificateMapping[]

resource KeyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = [for (c, i) in CertificateSubjects: {
  name: c.keyVault.name
  scope: resourceGroup(c.keyVault.subscriptionId, c.keyVault.resourceGroupName)
}

resource Secret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' existing = [for (c, i) in CertificateSubjects: {
  name: c.secretName
  parent: KeyVault[i]
}

This will throw an exception in the compiler:

Unhandled exception. System.NotImplementedException: Mismatch between count of index expressions and inaccessible symbols during array access index replacement.
at Bicep.Core.Emit.ExpressionConverter.CreateConverterForIndexReplacement(SyntaxBase nameSyntax, SyntaxBase indexExpression, SyntaxBase newContext) in C:__w\1\s\bicep\src\Bicep.Core\Emit\ExpressionConverter.cs:line 281
at Bicep.Core.Emit.ExpressionEmitter.EmitExpression(SyntaxBase resourceNameSyntax, SyntaxBase indexExpression, SyntaxBase newContext) in C:__w\1\s\bicep\src\Bicep.Core\Emit\ExpressionEmitter.cs:line 100
at Bicep.Core.Emit.ScopeHelper.<>c__DisplayClass7_0.b__0() in C:__w\1\s\bicep\src\Bicep.Core\Emit\ScopeHelper.cs:line 367
at Bicep.Core.Emit.PositionTrackingJsonTextWriter.WritePropertyWithPosition(SyntaxBase keyPosition, String name, Action valueFunc) in C:__w\1\s\bicep\src\Bicep.Core\Emit\PositionTrackingJsonTextWriter.cs:line 110
at Bicep.Core.Emit.ExpressionEmitter.EmitPropertyInternal(LanguageExpression expressionKey, Action valueFunc, SyntaxBase location, Boolean skipCopyCheck) in C:__w\1\s\bicep\src\Bicep.Core\Emit\ExpressionEmitter.cs:line 467
at Bicep.Core.Emit.ExpressionEmitter.EmitProperty(String name, Action valueFunc) in C:__w\1\s\bicep\src\Bicep.Core\Emit\ExpressionEmitter.cs:line 445
at Bicep.Core.Emit.ScopeHelper.EmitResourceOrModuleScopeProperties(SemanticModel semanticModel, ScopeData scopeData, ExpressionEmitter expressionEmitter, SyntaxBase newContext) in C:__w\1\s\bicep\src\Bicep.Core\Emit\ScopeHelper.cs:line 367
at Bicep.Core.Emit.ScopeHelper.EmitResourceScopeProperties(SemanticModel semanticModel, ScopeData scopeData, ExpressionEmitter expressionEmitter, SyntaxBase newContext) in C:__w\1\s\bicep\src\Bicep.Core\Emit\ScopeHelper.cs:line 327
at Bicep.Core.Emit.TemplateWriter.<>c__DisplayClass43_0.b__0() in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 748
at Bicep.Core.Emit.PositionTrackingJsonTextWriter.WriteObjectWithPosition(SyntaxBase sourcePosition, Action propertiesFunc) in C:__w\1\s\bicep\src\Bicep.Core\Emit\PositionTrackingJsonTextWriter.cs:line 99
at Bicep.Core.Emit.TemplateWriter.EmitResource(PositionTrackingJsonTextWriter jsonWriter, DeclaredResourceMetadata resource, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 639
at Bicep.Core.Emit.TemplateWriter.EmitResources(PositionTrackingJsonTextWriter jsonWriter, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 597
at Bicep.Core.Emit.TemplateWriter.GenerateTemplateWithoutHash(PositionTrackingJsonTextWriter jsonWriter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 140
at Bicep.Core.Emit.TemplateWriter.Write(SourceAwareJsonTextWriter writer) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 104
at Bicep.Core.Emit.TemplateWriter.<>c__DisplayClass45_0.b__0() in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 916
at Bicep.Core.Emit.PositionTrackingJsonTextWriter.WriteObjectWithPosition(SyntaxBase sourcePosition, Action propertiesFunc) in C:__w\1\s\bicep\src\Bicep.Core\Emit\PositionTrackingJsonTextWriter.cs:line 99
at Bicep.Core.Emit.TemplateWriter.EmitModule(PositionTrackingJsonTextWriter jsonWriter, ModuleSymbol moduleSymbol, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 841
at Bicep.Core.Emit.TemplateWriter.EmitResources(PositionTrackingJsonTextWriter jsonWriter, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 607
at Bicep.Core.Emit.TemplateWriter.GenerateTemplateWithoutHash(PositionTrackingJsonTextWriter jsonWriter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 140
at Bicep.Core.Emit.TemplateWriter.Write(SourceAwareJsonTextWriter writer) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 104
at Bicep.Core.Emit.TemplateWriter.<>c__DisplayClass45_0.b__0() in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 916
at Bicep.Core.Emit.PositionTrackingJsonTextWriter.WriteObjectWithPosition(SyntaxBase sourcePosition, Action propertiesFunc) in C:__w\1\s\bicep\src\Bicep.Core\Emit\PositionTrackingJsonTextWriter.cs:line 99
at Bicep.Core.Emit.TemplateWriter.EmitModule(PositionTrackingJsonTextWriter jsonWriter, ModuleSymbol moduleSymbol, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 841
at Bicep.Core.Emit.TemplateWriter.EmitResources(PositionTrackingJsonTextWriter jsonWriter, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 607
at Bicep.Core.Emit.TemplateWriter.GenerateTemplateWithoutHash(PositionTrackingJsonTextWriter jsonWriter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 140
at Bicep.Core.Emit.TemplateWriter.Write(SourceAwareJsonTextWriter writer) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 104
at Bicep.Core.Emit.TemplateWriter.<>c__DisplayClass45_0.b__0() in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 916
at Bicep.Core.Emit.PositionTrackingJsonTextWriter.WriteObjectWithPosition(SyntaxBase sourcePosition, Action propertiesFunc) in C:__w\1\s\bicep\src\Bicep.Core\Emit\PositionTrackingJsonTextWriter.cs:line 99
at Bicep.Core.Emit.TemplateWriter.EmitModule(PositionTrackingJsonTextWriter jsonWriter, ModuleSymbol moduleSymbol, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 841
at Bicep.Core.Emit.TemplateWriter.EmitResources(PositionTrackingJsonTextWriter jsonWriter, ExpressionEmitter emitter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 607
at Bicep.Core.Emit.TemplateWriter.GenerateTemplateWithoutHash(PositionTrackingJsonTextWriter jsonWriter) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 140
at Bicep.Core.Emit.TemplateWriter.Write(SourceAwareJsonTextWriter writer) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateWriter.cs:line 104
at Bicep.Core.Emit.TemplateEmitter.<>c__DisplayClass8_0.b__0() in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateEmitter.cs:line 68
at Bicep.Core.Emit.TemplateEmitter.EmitOrFail(Func`1 write) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateEmitter.cs:line 122
at Bicep.Core.Emit.TemplateEmitter.Emit(Stream stream) in C:__w\1\s\bicep\src\Bicep.Core\Emit\TemplateEmitter.cs:line 59
at Bicep.Cli.Services.CompilationWriter.ToStream(Compilation compilation, Stream stream) in C:__w\1\s\bicep\src\Bicep.Cli\Services\CompilationWriter.cs:line 38
at Bicep.Cli.Services.CompilationWriter.ToFile(Compilation compilation, String outputPath) in C:__w\1\s\bicep\src\Bicep.Cli\Services\CompilationWriter.cs:line 28
at Bicep.Cli.Commands.BuildCommand.RunAsync(BuildArguments args) in C:__w\1\s\bicep\src\Bicep.Cli\Commands\BuildCommand.cs:line 71
at Bicep.Cli.Program.RunAsync(String[] args) in C:__w\1\s\bicep\src\Bicep.Cli\Program.cs:line 75
at Bicep.Cli.Program.Main(String[] args) in C:__w\1\s\bicep\src\Bicep.Cli\Program.cs:line 64
at Bicep.Cli.Program.(String[] args)

And frankly, that doesn't make a lot of sense that it's not supported since I'm just iterating through a loop to get the Key Vault reference for that element, then also its Secret reference, using the same index to then point to the Key Vault resource.
This works fine though:
@description('Used to identify the details of a specific certificate')
type certificateMapping = {
  @description('The subject value of the certificate')
  subject: string
  @description('The name of the secret in the Key Vault')
  secretName: string
  @description('The thumbprint of the certificate')
  thumbprint: string
  @description('The identifier of the Key Vault instance')
  keyVault: keyVaultIdentifier
}

@description('Used to identify a Key Vault and where it\'s deployed to')
type keyVaultIdentifier = {
  @description('The name of the Key Vault')
  name: string
  @description('The ID of the subscription the Key Vault is associated with')
  subscriptionId: string
  @description('The name of the resource group the Key Vault is associated with')
  resourceGroupName: string
}

param CertificateSubjects certificateMapping[]

//Maintains a reference to the certificate in the Key Vault for this subject
resource Secret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' existing = [for (c, i) in CertificateSubjects: {
  name: '${c.keyVault.name}/${c.secretName}'
  scope: resourceGroup(c.keyVault.subscriptionId, c.keyVault.resourceGroupName)
}]

Even though logically it's doing the same thing in my mind. I know there's an attempt to ensure there's only one way to do things in Bicep, but this would be another instance where I would argue consistency should trump One Best Approach, especially since the former arguably is more "Bicep-y" than the latter which requires non-trivial knowledge that you can reference children in that manner all in one resource and skip over the parent/child relationship.
Thanks for the continued consideration!

The docs page points here for the experimental feature resourceTypedParamsAndOutputs
Was a little tricky to find the details here.
This change implements functionality for declaring strongly type
parameters and outputs using resource types.
Example:
param storage resource 'Microsoft.Storage/storageAccounts@2020-01-01'

This declares a parameter that can be interacted with as-if it were an
'existing' resource type declaration of the provided type.
In addition you can do the same with outputs:
output out resource 'Microsoft.Storage/storageAccounts@2020-01-01' = foo

or using type inference (outputs):
output out resource = foo

These features together allow you to pass resources across module
boundaries, and as command line parameters (using the resource ID).

This boy should close as not planned, not completed... Or just not close things

This bot should close as not planned, not completed... Or just not close things

Agreed. https://github.com/Azure/bicep/issues/10874

Is this still happening?

Don't have a clear ETA as there is a dependency on a lower-level improvement to how we process expressions, but this is very much still on our committed list!

Don't have a clear ETA as there is a dependency on a lower-level improvement to how we process expressions, but this is very much still on our committed list!

Also intered on this, noticed this issue is very popular now. Specially regarding RoleAssignments as a module. Hope this get the proper attention a an ETA soon. Thanks for all support.

This unfortunately won't get done in the current semester, but it's working its way up to the top of the list. Added it to our next semester which runs from March '25 - September '25.


propose to update composer package name

packagist error:
The package name mikey179/vfsStream is invalid, it should not contain uppercase characters. We suggest using mikey179/vfs-stream instead.

Coverage remained the same at 94.279% when pulling 1fab43186a441368f89613afd33ded7247fd1825 on yjqg6666:master into 0247f57b2245e8ad2e689d7cee754b45fbabd592 on mikey179:master.

Well, the name was chosen at a time when it was not considered invalid...
I'm open to the idea of renaming it, but it will not happen within the 1.x series. This is a serious bc break, so it requires a new major version. I guess it takes some time until this can happen, as a new major release just for the sake of renaming the package seems a bit disproportionate to me.

May consider add replace field to the composer.json.   https://blog.naderman.de/2014/02/17/replace-conflict-forks-explained/

When the package name is changed I think about replacing the "mikey179" with "bovigo" as well, for various reasons, one of them is to ensure the namespace matches better with the package name.

This should be closed in favor of the BC #174

Fixed by #174.


tzwhere.init() async

It'd be very nice if the tzwhere.init() function was asynchronous. My server has to lock every time I restart until the init function is finished.

Would still merge a PR for this.


CLI refactor

zcbor.py: Refactor CLI to add 'verify' and put all options after keyword

Added the 'verify' keyword instead of using 'convert' with no output.
'convert' now requires an output.

All options now appear after the keyword. I.e. code/verify/convert are
always first when invoking zbor.

Also, do a slight refactor of the README

Signed-off-by: Øyvind Rønningstad<EMAIL_ADDRESS>

Are we breaking CLI compatibility now? If users need to re-order their arguments to be compatible with this change then we need to bump the major version IMO. If the old argument order can still be used then we need to keep some tests with the old order to avoid regression.

IIUC, semantic versioning works differently for versions below 1, but I am strongly considering moving to 1.0. If not, it will certainly be a new minor version. I thought about supporting the old ordering as well, but it will be a bit hacky, and the fix is really simple (move "code"/"convert" to the beginning of the line). I'm open to debate about this though.


made cornerImage optional

made cornerImage optional so nil can be passed to hide the image

Hi, thanks for contributing. Sorry I didn't merge this PR, in the meantime so many PR and Issues piled up and the project was not very expandable and flexible I decided to go with a version 2.0 So until it's release I can't merge this request. I made the new planned release contribution friendly so if you'd like to check it out please got to #89
Thanks again!


Possible to live rebuild more than 1 Elm file?

I have different .elm files that correspond to different webpages. As an example, I might have an Index.elm file that gets compiled and referenced in index.html and I have a Dashboard.elm file for dashboard.html. I run elm-live with:
elm-live Index.elm --output=public/elm/index.js --open

Works great for Index.elm, but changes to Dashboard.elm do not get recompiled. Is there a way to have both files auto-rebuild?

Good question! I don’t think it’s possible at the moment. Can you suggest a reasonable API for this? Keep in mind that elm-live is intentionally a very slim wrapper over elm-make, so elm-live Index.elm --output=public/elm/index.js is almost the same as elm-make Index.elm --output=public/elm/index.js. This allows us to be very intuitive and future-proof. For example, when Elm 0.18 came out, we were able to support --debug instantly. No changes to elm-live needed. 😀
Don’t get me wrong though. I totally see your use case, just thinking about a reasonable and intuitive API to get this kind of behavior.

Makes sense for elm-live to be a slim wrapper over elm-make. One option is to run elm-live with a list of .elm and output .js file pairs:
elm-live Index.elm --output=public/elm/index.js Dashboard.elm --output=public/elm/dashboard.js --open

Any .elm file changes and both Index.elm and Dashboard.elm get recompiled with the corresponding elm-make commands. Hopefully, elm-make is able to recognize not to compile when the dependent .elm files have an earlier timestamp than the target?

Looks good! Intuitive and unambiguous, at first sight.

Hopefully, elm-make is able to recognize not to compile when the dependent .elm files have an earlier timestamp than the target?

I don’t think that’s the case. With the current design of elm-live and elm-make, this would probably mean recompiling both files every time an .elm file changes.
On a positive note though, elm-make is smart enough to precompile modules and use the precompiled version if there were no changes to the source file in the meantime. So although elm-make would recompile both files, one of those recompilations would be super cheap.

To be totally honest with you, there’s a lot happening in my life right now and I likely won’t be able to pick this up very soon. elm-live is a very open project though, so you’re more than welcome to contribute! I always find the time for reviewing stuff 🙂

Why don't you add a package.json rule like that:
"live": "elm-live Index.elm --output=public/elm/index.js --open && elm-live Dashboard.elm --output=public/elm/dashboard.js --open ?

For the time being, there’s a cheeky npm module making it nice and easy to run two commands in parallel: https://www.npmjs.com/package/concurrently.

Hmm this is interesting. I will think about this. I think the answer here is to move outside of the CLI in a more complex use case like this.

The way that elm compiler handles two separate elm sources is still as one output so as this is just a live server on top of elm make I do not think we will be adding this ability to have multiple outputs. However you can already have multiple input files. To see how you can checkout the doc site at https://elm-live.com

Would also be useful for testing libraries wrapped in Platform.worker, where the test or example itself is Elm application and Worker is another Web Application with no view.

Would also be useful for testing libraries wrapped in Platform.worker, where the test or example itself is Elm application and Worker is another Web Application with no view.

I have a long running process in Platform.worker. So would be nice, if I could add those to elm-live watch list as well.


[Bug]: Door lock does not show the correct status in Home app

What happened?
Hello! First, I would like to show my appreciation to you for creating and maintaining a wonderful plugin for the community.
And now is the fun part: I found a bug: Eufy Door lock does not show the correct status in Home app. It always show as Unlocked.
If I try to lock it from the Home app, it just keeps spinning without making any progress or status update.
If I manually (or through Eufy app) unlock the lock, I can then use the Home app to lock it. Home app then shows the correct status (Locked)for only 30 seconds or so, and it updates the status back to Unlocked.
I have tried to restart the lock, its wifi bridge, as well as recalibrate the lock from Eufy app.
I am on the latest beta version 2.1.0 beta 8. But I tried with the official 2.0.1 to no avail. I also tried uninstalling the plug-in, clear all the Homebridge cache and start over. None of them addresses the issue.
The lock model is T8510 (https://us.eufylife.com/products/t8510). It comes with a wifi bridge T8021 to connect itself to our wifi network (since the lock is bluetooth-only).
Device Type
other (UnSupported)
Plugin Version
beta (Best Effort)
HomeBridge Version
v1.4.x (Supported)
NodeJS Version
v16 (Supported)
Operating System
Ubuntu 18.04+ (Supported)
Relevant log output
Log from Homebridge:
[7/13/2022, 3:32:49 PM] [EufySecurity-2.1.0-beta.8] DEBUG: Front Door LockStatus false
[7/13/2022, 3:32:49 PM] [EufySecurity-2.1.0-beta.8] DEBUG: Front Door Triggered GET LockCurrentState 0
[7/13/2022, 3:32:49 PM] [EufySecurity-2.1.0-beta.8] DEBUG: Front Door LockStatus false
[7/13/2022, 3:32:49 PM] [EufySecurity-2.1.0-beta.8] DEBUG: Front Door Triggered GET LockTargetState 0

Hi @phamhainguyen68
as mentioned on discord I am currently trying to get this working with some other users who help me debug this. You're welcome to join us.

Thank you, @thieren, for resolving this issue. Below is the summary of the error (quoted from thieren on Discord):
The main issue were some bugs in eufy-security-client. this library handles the lock with two parameters: DeviceLocked (true/false) and DeviceLockState (a number value 1-7). The thing was that this was muddled up and in specific cases the DeviceLockState was handled as boolean. That resulted in false values returned from the library.

I'll open a PR for the library and I'm confident that this will be updated in the next release.

The last issue you've reported was a missing update in the plugin itself. So in summary both plugin and library had to be changed.

I'll keep this open, since this can only be really fixed after this PR in eufy-security-client is merged.

Hi @phamhainguyen68
I updated to the latest eufy-security-client version with 2.1.0-beta.14
The door lock states should be fine now.

Is fixed with release of 2.1.0


chore: refactor of txs migrations

Description

[x] refactor SQLite migrations of transactions
[x] fix Alert backgrounds in dark mode

Motivation and Context
#373
How Has This Been Tested?
Manually inserted sample transaction:
transactionsRepository.addOrReplace({
      event: TransactionEvent.Mined,
      tx_id: 'test-id-1',
      source_pk: 'source-1b',
      dest_pk: 'destination-1',
      status: 'Coinbase',
      direction: TransactionDirection.Inbound,
      amount: 1000,
      message: 'test fancy message',
      is_coinbase: true,
    })

...and explored the database with sqlite browser (sqlite db location: ~/Library/Application Support/com.tari.launchpad.
Then, added few more new and updating transactions.
Alerts UI fix
Before:

After:

This PR makes a breaking change in SQLite
It requires to remove current db file. On MacOS, the file is located in ~/Library/Application\ Support/com.tari.launchpad.
Instructions to delete db file (tested on MacOS):
$ cd ~/Library/Application\ Support/

// Delete whole folder containing db files
$ rm -rf com.tari.launchpad

Now, you can start the launchpad app.


SSL handshake failing with latest Apple clang from Command Line Tools for Xcode 14.3 on MacOS

OpenSSL 1.1.1 stable has been working fine on multiple platforms until recently the MacOS version broke after installing the latest Xcode Command Line Tools, which includes Apple clang 14.0.3
The symptom we received (we use OpenSSL through CURL), was a Curl SSL connect error returning "error:1012606B:elliptic curve routines:EC_POINT_set_affine_coordinates:point is not on a curve" which is an OpenSSL error.
After a long investigation, it was determined that the latest Apple clang 14.0.3 is the issue. This has been reproduced on two separate machines, across a number of 1.1.1 tags (k..t). Rolling back to clang 14.0.0 solves the problem.

I've tried to reproduce this on the sslecho demo - https://github.com/openssl/openssl/tree/master/demos/sslecho but wasn't able to. If there's more info you need about our SSL server details let me know and I can follow it up.

Please try openssl s_client if that reproduces the issue.

I tried s_client on our domain and it seems to connect ok:
---
SSL handshake has read 4161 bytes and written 351 bytes
---
New, TLSv1/SSLv3, Cipher is AEAD-CHACHA20-POLY1305-SHA256
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : AEAD-CHACHA20-POLY1305-SHA256
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Start Time:<PHONE_NUMBER>
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

Using it on what? Which domain?

So we ended up solving this by re-enabling asm.
Previously we did this
./Configure darwin64-arm64-cc no-asm -isysroot ${CMAKE_OSX_SYSROOT}
Removing the 'no-asm' fixed our issue.

Closing as this as resolved.

Actual there's more to the story, re-opening.

Apple clang 14.0.3 is the issue

Do you mean that compiling with 14.0.3 created binaries that didn't work, but that the binaries complied with 14.0.0 did work?
Could you see if there was much difference in the generated object files, and if so, in which functions?

Do you mean that compiling with 14.0.3 created binaries that didn't work, but that the binaries complied with 14.0.0 did work?
yes

I'll get back to you with the specific details...sorry don't have them on hand right now

The version 1.1.1 is not supported anymore. Closing. If this is still an issue with currently supported releases, please open a new issue.


MB-3559 Add event trigger to GHC Payment Request update endpoint

Description
This PR adds an event trigger after a payment request is successfully updated using the GHC API updatePaymentRequestStatus endpoint. This event will add a record to the webhook_notifications table if the payment request is attached to a move that is available to the Prime. It also adds tests to this endpoint and the Support API endpoint version to verify that a notification record was created if the object was Prime-available.
Reviewer Notes
I manually set the traceID in the handler for the tests because I was only getting the nil UUID whenever I tried to retrieve it using GetTraceID(). If anyone knows of a way to get this value without having to manually set one, let me know!
Setup
First you'll need to run your local server and your local client:
make db_dev_e2e_populate && make server_run
make client_run

To test the GHC API using Postman, you'll also need to:

Navigate to http://officelocal:3000. You should see a "Local Sign In" option - click this.
Choose one of the default office user, TOO, or TIO emails and click "Login".
Open up your developer tools and grab the following cookies (or enable Postman Interceptor and let that grab the cookies for you):

office_session_token
masked_gorilla_csrf
_gorilla_csrf

Open Postman and click GHC API updatePaymentRequestStatus endpoint. Add the cookie values here by clicking the "Cookies" button on the right side (or, if using Postman Interceptor, make one dummy request using the endpoint and it will populate the cookie values for you).
Now take the value for the masked_gorilla_csrf cookie and add a header called X-CSRF-Token and set it to the same value.
Grab a Prime-available payment request's ID and eTag.

You can do this by using the Prime API endpoint fetchMTOUpdates, which returns all Prime-available moves and their subobjects. Instructions for testing the Prime API here: https://github.com/transcom/prime_api_deliverable/wiki.
You may also use a combination of GHC endpoints to get this info (listMTOs then listPaymentRequests).

Fill in the body with a new status, such as "PAID" or "REJECTED", and submit the request!
If the request was successful, you should see an entry in the log that says that a "Notification was created." You can also look directly in the database to verify that this did indeed happen.

Code Review Verification Steps

[x] The requirements listed in Querying the Database Safely have been satisfied.
[x] Request review from a member of a different team.
[x] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change.

Messages

:book:
:link: MB-3559

  Generated by :no_entry_sign: dangerJS against 826904d32b8195689df508624522b4b3fb3e4850


Add a versions compatibility table to README

Resolves #1089.
Changelog-friendly one-liner: Add a versions compatibility table to README.
Contributor checklist

Provided the tests for the changes.
[X] Gave a clear one-line description in the PR (that the maintainers can add to CHANGELOG.md on release).
[X] Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

Thank you, @vphilippon!


Markdown: Fix panic on sitegen for request dependent template values.

Fix for #430

I like this. A very clever, simple way to fix it. You've also added a comment explaining the reason behind the empty request. And this seems to be one of the rare cases where ignoring the error value is OK (for now).
Thanks!


Side effect when using match stub body with content type is not JSON

Expected Behavior
Using stub using proxy and matching body with content type:

Multipart form data
Form data
Expect proxy success

Actual Behavior
Observe the error http: ContentLength=32 with Body length 0
Steps to Reproduce the Problem
Using stub using proxy and matching body with content type:

Multipart form data
Form data

Potential root cause
SincematchJSONBody using readRequestBody function which return a new reader, matchMultiplePart and matchURLEncodedBody use ParseMultipartForm of HTTP package directly -> This lead to original request body is read once.
Suggest solution

Transform request.Body to some struct implement the interface io.Seeker and call Seek(0,0) to reset the reader for each time call to matchBody

Specifications
Version: newest release (1.2.4)

Hi @hungdv136  , Could you please take a look on this issue


Swift 4 compiler warning

Now getting the following warning when using master branch for swift 3 compatibility:
/Pods/JSONSchema/Sources/Validators.swift:282:34: Bridging '[NSNumber]' to '[Bool]' may fail at runtime and will become a checked cast in Swift 4; did you mean to use 'as!' to force downcast?
For the following line:
   let booleans = numerBooleans as [Bool]

Created a PR for the fix: https://github.com/kylef/JSONSchema.swift/pull/23


I already have different SD models locally. Where do I have to place them to use them?

Automatic1111 has a models folder where all the models can be placed in. I could not find something like that for LC.

.ckpt model is not supported. The cache directories for different models:

lama/ldm/zits/mat/fcf: ~/.cache/torch
sd1.5: ~/.cache/huggingface

thanks


Error when running ssh-tpm-keygen: open /dev/tpmrm0: permission denied

Hello, when I try to run the ssh-tpm-keygen command, I get the following error: open /dev/tpmrm0: permission denied. Is the user executing the command expected to have some special permissions and / or is the user expected to belong to some group (e.g. tss group)?
Thank you very much and have a nice day!

You need to be part of the tss group, but the implementation depends on your distribution.

I'll close this issue if there isn't more to it.


Inverse Kinematic calculation yields inaccurate arm placement

Inverse Kinematic calculation yields inaccurate arm placement at coordinate values that are closer to 0,0,0. As coordinate values grow, towards 200mm and above, end-effector placement is accurate and repeatable.

The actual error was more actuated as the arm turret was further off-center, with large y values.
The issue was a result of adding the x gripper offset as-is to the x coordinate value. Where in fact a component of the offset should have been added to the x and y coordinates based on the arm rotation. Fix was added and tested in the oarmik.py class that calculates the inverse kinematics model.


Vendored code inside of vendored code

Do you support the vendored inside of vendored use case?  I'm starting my project from scratch, and upon hitting an entry like this in our vendor/vendor.json file:
                {                         "checksumSHA1": "Uzyon2091lmwacNsl1hCytjhHtg=",                         "origin": "github.com/hashicorp/consul/vendor/github.com/hashicorp/go-cleanhttp",                         "path": "github.com/hashicorp/go-cleanhttp",                         "revision": "a6bb339621daadf20eea29e5a68afd7e39e3e239",                         "revisionTime": "2016-12-01T05:47:33Z"                 }
I get this error:
Caused by: java.lang.IllegalStateException: Sorry, we should not be here: {name=github.com/hashicorp/consul, version=a6bb339621daadf20eea29e5a68afd7e39e3e239}         at com.github.blindpirate.gogradle.task.GoInit.mapEntryToString(GoInit.java:152)         at com.github.blindpirate.gogradle.task.GoInit.appendOneLine(GoInit.java:135)         at com.github.blindpirate.gogradle.task.GoInit.lambda$appendToBuildDotGradle$2(GoInit.java:124)         at com.github.blindpirate.gogradle.task.GoInit.appendToBuildDotGradle(GoInit.java:124)         at com.github.blindpirate.gogradle.task.GoInit.initByExternalLockfiles(GoInit.java:114)         at com.github.blindpirate.gogradle.task.GoInit.init(GoInit.java:81)

Thanks for reporting, that's definitely a missing test case of Gogradle. I'll fix it in December release. As a workaround, you could put this line in your build.gradle:
build name:'github.com/hashicorp/go-cleanhttp', host: [name:'github.com/hashicorp/consul', version:'a6bb339621daadf20eea29e5a68afd7e39e3e239'], vendorPath: 'vendor/github.com/hashicorp/go-cleanhttp', transitive: false

Fixed by 0.8.0. Any feedbacks are welcomed.


MRM!CK-[]^[]-  update uuid to version 3.1.

Fixes #[replace brackets with the issue number that your pull request addresses].
Changes proposed in this pull request:

[list out summary of changes here]
[list out summary of changes here]
[list out summary of changes here]
[etc]

Note: pull requests without proper descriptions may simply be closed without further discussion. We appreciate your contributions, but need to know what you are offering in clearly described format. Thanks! (you can delete this text)
cc @HospitalRun/core-maintainers

just looking for any server I may currently require to forfill current obligation


 Sry but I found no other words to express my feelings. Luckily, I could fix this issue manually. I like orientdb very much but where is your focus and what is your philosophy behind orientdb?

move vertex Animal to cluster:germany
I have to update all propertys of all vertex which has a reference to the vertex above. On a use case with million of records and connections this would be the horror worst case.

OrientDb: 2.0.8, Studio

What version? We already fixed this in 2.0.x

OrientDb: 2.0.8, Studio

Why do you say "update all propertys of all vertex which has a reference to the vertex above"? Are you using links instead of edges? Can you provide the json of any of those vertex?

E.g this is the root vertex which has the ID #19:0
{
            "@type": "d",
            "@rid": "#19:0",
            "@version": 5,
            "@class": "Root",
            "DisplayName": "Company",
            "Name": "Company",
            "Email"<EMAIL_ADDRESS>            "References": [
                "#18:52",
                "#12:0",
                "#12:1",
                "#12:53",
                "#18:0",
                "#18:1"
            ]
}

therefore I could have lots of vertexes which has a reference to that vertex e.g in the SponsoredBy property.
{
              "@type": "d",
            "@rid": "#19:0",
            "@version": 5,
            "@class": "Node",
            "DisplayName": "Company",
            "Name": "Company",
            "Email"<EMAIL_ADDRESS>            "SponsoredBy": "#19:0"
}

When I move the vertex to another cluster the integrity will break.

MOVE VERTEX takes care of updating edges, not links:
http://orientdb.com/docs/last/SQL-Move-Vertex.html

@StarpTech, please keep the tone moderated.  Sry but I found no other words to express my feelings" is very un-constructive for OrientDB product and community.

@lvca there is always a point where you can't talking moderate anymore. I find so much issues in the core like parser or transactions and the only echo I get from orientdb is "we have introduce new feature X" instead to make the core more stable.  Also on my open issues I receipt only occasional response. This roadmap is very un-constructive for OrientDB product and community.

@StarpTech in this case the issue not even exist. I saw that the more friendly the user is, the more the community helps him.

@lvca sure, I understand you but it should be clear that core functionality has more priority. I help where I can. They aren't dramatic ?:

broken transactions issue: https://github.com/orientechnologies/orientdb/issues/4045
Unable to move vertex with unique index issue: https://github.com/orientechnologies/orientdb/issues/4074


Conjur Backend for Spring Cloud Config Server - docs

I would like to see docs for Conjur Backend for Spring Cloud Config Server, because readme.md states that

"The Spring Cloud Config Server can be integrated with different storage mechanism like GitHub, File System Backend, Conjur Backend etc",

but it describes in depth only Git Backend which is a duplication of Config Server's docs. I would like to use Conjur as a backend for storing configuration in my Config Server, is it even possible?

Michal, step 3 of the linked documentation describes integration with the Spring Cloud Config Server:
https://docs.cyberark.com/conjur-enterprise/13.0/en/content/integrations/spring-boot-plugin.htm

I'm struggling with understanding the goal of step 3. It looks like setting up Conjur SDK properties by "Git Backend" of Config Server. Since the readme.md says that there is "Conjur Backend" alongside "Git Backend" and other backends, I thought that I can configure Config Server to pull configuration directly from Conjur and serve it to client apps, like in these integrations: Git, filesystem, HashiCorp Vault etc.


Make persp-find-some smarter

I'm not thrilled with the way persp-find-some works when you're killing off perspectives.
The gist: Let's say you're using this mode (persps sorted chronologically) to do a yak shave and you have several perspectives pushed on the stack. You finish up some of them and start to kill the perspectives. The first time, it uses persp-last to switch to the last one you were on. That seems fine. But after that, persp-last is nil and it goes to (car (persp-names)) instead. That doesn't really match the workflow for this mode and should be something a bit smarter (newest, or persp-last should maintain a stack, or something).
Originally posted by @zenspider in https://github.com/nex3/perspective-el/pull/87#issuecomment-528053148

I wonder if this might be the excuse needed to stop using frame parameters to store state and switch to a global hash table indexed by frame (id). Frame parameters cause other problems, like the one #86 attempts to address. It's kind of a big change, though.

Let's reopen if this is still something we need to look at.


Allow sources to turn off

Currently each source is either a star or a galaxy. We should allow for a third possibility: that a source doesn't contribute any photons to any image. Then we can initialize the model with a different source on each "peak" in each image, without certainty that each corresponds to a different star or galaxy.
Alternatively, we could iteratively add sources, based on the current residual images. But starting with way too many sources and allowing them to turn off is probably simpler.

I understand Steve is working on this now.


RGB values 1 and 2 == 0 (LED off). Invalid scaling somewhere inside the library?

Code
Using ws2812_esp32_rmt_driver at the latest commit (8625018) and the following code:
use smart_leds_trait::SmartLedsWrite;
use std::thread::sleep;
use std::time::Duration;
use ws2812_esp32_rmt_driver::{Ws2812Esp32Rmt, RGB8};

const INTENSITY: u8 = 2;

fn main() -> ! {
    esp_idf_sys::link_patches();

    let mut ws2812 = Ws2812Esp32Rmt::new(0, 27).unwrap();
    let pixels = std::iter::repeat(RGB8 {
        r: INTENSITY,
        g: 0,
        b: 0,
    })
    .take(25);
    ws2812.write(pixels).unwrap();

    loop {
        sleep(Duration::from_millis(100));
    }
}

Actual results
All leds completely turned off
Expected results
The first 25 LEDs should have the red channel turned on with a low but visible intensity.
Notes
if I change INTENSITY to 3 the first 25 LEDs turn very dim red. The same applies for the green and blue channels. So it seems like somewhere in the library the RGB values 1 and 2 are scaled down to 0? With other ws2812 crates for other microcontrollers I'm able to use the values 1 and 2 for individual color channels and have the LED turn on.

I also suspect that intensity 3 is scaled down to 1 before it actually hits the LED strip. Because the brightness I see for INTENSITY = 3 is very similar to what I usually expect a brightness value of 1 to have.

This behavior is seen with other C++ library such as FastLED. And I believe that threshold is depending on devices (LED strips).

Strange. I'm sure it works in https://github.com/jgarff/rpi_ws281x. But maybe that library is doing some scaling up of low values then.. I guess I have to dive in and look more at the code. And also try some other strip models I have laying around.

I'm sorry, my bad! You are correct in that it depends on the strip itself. It turns out I tried this library out on a roll of LED-strip I have never used before. When hooked it up to my RPi and used the same software I usually use, this strip is completely turned off for RGB values of 0-2 there as well. And conversely hooking up my "regular" strips to the ESP with this software, they are shining as expected for RGB values 1-2.
Sorry for the confusion. Closing this issue since the error was on my side.


Update changing-project-board-visibility.md

https://t.me/OKExPromotionGroup s/blob/main/contributing/self-review.md#self-review).

Why:
Closes [issue link]

What's being changed:

Check off the following:

[x] I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
[ ] For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

[x] This pull request impacts the contribution experience

[ ] I have added the 'writer impact' label
[ ] I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

ARG EXTRA_NODE_VERSION=10

<EMAIL_ADDRESS>

0398847678


aggregateWithRandomness performance issue when subscribing to all subnets

Describe the bug
It takes up to 3 minutes on holesky for aggregateWithRandomness when subscribing to all subnets

considering 1 epoch = 6.4 minutes, this takes almost 50% of main thread cpu time this cause performance issue for attached validators
cpu profile shows 51.6% for this time

holesky_subscribe_all_subnets_network.cpuprofile.zip
holesky_subscribe_all_subnets_main.cpuprofile.zip
Expected behavior
reduce this time, or consider offload this to native using async/await call
cc @wemeetagain @matthewkeil
Steps to reproduce
No response
Additional context
No response
Operating system
Linux
Lodestar version or commit hash
unstable, v1.22.0

beacon_attestation messages per slot increased from <3k to ~45k since we turned subscribe_all_subnets flag on

to fix your trouble check this solution click
maybe this will solve your problem.

Closed by #7204.  Might be some more optimizations possible by tuning the number of libuv threads though


High Memory Usage since at least v3.2.1

Description
Somewhere since version v3.0.1, a bug was introduced increasing memory usage a lot.
Steps to reproduce
Run a couple thousand requests again a coraza instance. I can provide pprofs which show this behaviour
Expected result
What should happen?
Static or at least not that high of an increase of memory
Actual result
Lots of memory.

Ok this is a side effect of coraza allocating the response body on every request. Maybe this should be replaced with a buffer pool

Hey! So there is no issue?

I really don't know. I have to investigate more because I get different results via go Benchmarks and running the process with pprof export built in

Maybe this should be replaced with a buffer pool
We use a pool of transactions and each of them has a buffer for request/response body.

Yeah so was my idea. There is a static maximum size anyway, so there is nothing against it. I do the same inside my haproxy package.

I would think that replacing TransactionVariables.responseBody with static capacity byte slice that gets reused between transactions would help a lot


Move the esp-alloc package into the repository

As discussed in yesterday's (and previous) team meetings, we will start to move some supporting libraries into this repository to help reduce the maintenance burden and to ensure that these packages remain relatively maintained.
Didn't bother adding a CI job as, like esp-hal-smartled, this package is a dependency of the examples package, so esp-alloc will still be built in CI regardless.
I will open a subsequent PR on the esp-alloc repository once this is merged pointing users here, transfer the one open issue, and then archive the repository.

Oops, forgot to pull down the latest changes from esp-alloc first 😅


Using an existing OpenGL context

Is it possible to create a glow Context  from "nothing", i.e. using a pre-existing OpenGL context that has been made current using the Windows call wglMakeCurrent() ?

I solved this problem. It was just a matter of creating the context using Context::from_loader_function().


Sample docs rewrite

TODO Decide if more examples are needed
TODO Decide if greedy needed in docs

Wow, amazing improvement! Big thanks! 👍👍

I think we can describe greedy in an advanced section of documentation and put additional examples for sample to it as well


Sort Goby Hash Keys in Certain Order

The hash pair order in REPL seems not corresponding to the input order, e.g., when I try to print out simple hash:
$ go run goby.go -i
Goby 0.0.9
» h = {a: "Hello", b: "World", c: "Goby"}
#=> <Instance of: Object>
» h
#=> { c: Goby, b: World, a: Hello }
» h
#=> { c: Goby, b: World, a: Hello }
» h
#=> { a: Hello, c: Goby, b: World }
» h
#=> { b: World, a: Hello, c: Goby }
» h
#=> { b: World, a: Hello, c: Goby }
» h
#=> { b: World, a: Hello, c: Goby }
» h
#=> { c: Goby, b: World, a: Hello }
» h
#=> { c: Goby, b: World, a: Hello }
»

Any idea?

@Maxwell-Alexius This is because we use Go's map to store pairs, and in Go map's key/value are random ordered.

I'll try to find a solution for this case, thanks!

@st0012 Maybe we can sort the keys in alphabetical order so that we can guarantee that the hash will be appear in certain order in Goby lang?
https://stackoverflow.com/questions/23330781/sort-golang-map-values-by-keys

@Maxwell-Alexius I think we should just sort them in toString method, and keep it random in other places. I remember I read a post about why Go made this random decision but I can't find it now. @hachi8833 Do you know why?

Looks like the article is the one.

As for Ruby, the order of Hash items had not been guaranteed by 1.8: 1.9 or higher guarantees the order of Hash items.

@st0012 @hachi8833 Thanks, I think I can adjust this feature request which is listed below:

[ ] Proposal I. There is no need to sort or order the Hash key-value pairs. However, for some method implementation, like Hash#keys, we can return an array of keys of hash in alphabetical order. (Affect some Hash API method implementation in #247)

[ ] Proposal II. Remain current arbitrary state of the key-value pairs in hash API, so if implementing Hash#keys, the keys may also in an arbitrary order. (Issue closed here, if anyone wants to change the Hash pairs order, they can reopen this issue)

I actually agree that the hash shouldn't guarantee the key's order, so I suggest keep it this way. But maybe we can provide some extra API like sorted_keys for those who need the keys sorted.

Okay, got it ~

This should be closed because PR #247 completed.


Umbrella issue for HT (high throughput) terms for Gene Ontology

Please use this ticket to track any GO-related HT term issues, per discussions held at the GO meeting in Switzerland.
--Marcus

GO has requested the following:

We (the HTP working group) have come to a mementos decision and would like to ask if you could make some more flavours of HTP evidence codes.
Below is the GO shorthand (name and three-letter code) for xref. Note these mappings would be for manual assertion only i.e. 'high throughput…...used in manual assertion'.
inferred from high throughput mutant phenotype (HMP)
inferred from high throughput genetic interaction (HGI)
inferred from high throughput direct assay (HDA)
inferred from high throughput expression pattern (HEP)
Just to note that you have already provided: ECO:0006056 'high throughput evidence used in manual assertion' which would map to the 'inferred from high throughput experiment' (HTP) for GO.

@nsuvarnaiari @jbmunro I've created a ROBOT sheet for the above terms... if you have a chance could you look over the definitions? They are mainly used from their low-throughput counterparts.
https://docs.google.com/spreadsheets/d/1dTRaHJeDds3ycEvjyaRvWhRG4kIk1-SG7dcdFQkoCOU/edit?usp=sharing

Thanks, Becky. Sounds like a good strategy. I’ll look at them today.
Best, Helen

On 3 Oct 2017, at 15:34, Rebecca Tauber<EMAIL_ADDRESS>wrote:
@nsuvarnaiari https://github.com/nsuvarnaiari @jbmunro https://github.com/jbmunro I've created a ROBOT sheet for the above terms... if you have a chance could you look over the definitions? They are mainly used from their low-throughput counterparts.
https://docs.google.com/spreadsheets/d/1dTRaHJeDds3ycEvjyaRvWhRG4kIk1-SG7dcdFQkoCOU/edit?usp=sharing https://docs.google.com/spreadsheets/d/1dTRaHJeDds3ycEvjyaRvWhRG4kIk1-SG7dcdFQkoCOU/edit?usp=sharing
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/evidenceontology/evidenceontology/issues/97#issuecomment-333861781, or mute the thread https://github.com/notifications/unsubscribe-auth/ALUOkpUA0NypBJPiEC0QkxfXSlHnqqEtks5sokYMgaJpZM4ISNxz.

I've HTP made some slight modifications to the definitions - under the tab "HTP_modified" on the spreadsheet.  But otherwise looks good to me.
Do you allow multiple parents? They could also have a Is_a to the corresponding low throughput equivalent.
Could I also ask you to modify the parent terms ECO_0006055 and ECO_0006056 so that they remove the "large numbers of" reference as they are not always large. e.g. A type of evidence where data generation is automated with equipment to allow for assaying samples or molecules in parallel.
Thanks

Thanks @hattrill !
Re: multiple parents... We do have a handful of terms in ECO now that have multiple inheritance, but they've given us some issues for our OBI integration project. Ideally, we would have one asserted parent, then the logic from the OBI mappings would allow for inference of the second parent. As we haven't implemented this logic in the live version of ECO yet, I'm ok with asserting these parents for now. They will be later removed and inferred, though.
I'll fix the HTP defs now. As for the defs for the other terms, our definition pattern is typically "A type of [parent class] that/where/derived from/etc..." so the only thing I would change is to replace evidence with "high throughput evidence" in there. If that's okay with you, I think we're good to go!

That sounds fine to me. Let's go! And thank you!

Tagging @cmungall

@hattrill @cmungall - is everything good with these terms? I'm proposing to close this issue if so, unless there are other HT terms that GO needs. Thanks! 😄

Nothing further needed. Many thanks.

Hi @rctauber , @mchibucos -
Excuse me for this highly inappropriate use of an issue tracker, but thought it was kind of a good place to contact you!
I am attempting to put something togther for the ISB DATABASE Journal Biocuration issue (deadline 31st Oct!) about annotating high throughput data using the GO. As you both worked on this, I was going to put you down as authors. If you want to look over the draft it is here -
https://docs.google.com/document/d/1UGXWy38134Lvq22qb2tVizIgNUhZKQC1x5-docMb-ro/edit
in the GO google drive.
I've just made a doc for author names and details here - https://docs.google.com/document/d/16XW-iKZauIN9wisQDX77_fRt5adSyuGRoIF19eSjmWM/edit
If you need access, just shout.

Note that issue https://github.com/evidenceontology/evidenceontology/issues/162 raises a question related to HT terms.


[MOB-7322] automate ios sdk release with fastlane

🔹 Jira Ticket(s)

MOB-7322

Description
Implemented https://fastlane.tools/ to automate iOS SDK release. Also uses a fastlane plugin create_xcframework.
Steps to release in the new process:

Update CHANGELOG.md
Update new version number for sdkVersion variable in IterableAPI.swift
Push CHANGELOG.md and IterableAPI.swift changes to the branch
Run: fastlane ios release_sdk
It will prompt you to enter release version number (e.g. 6.5.0-beta) and output directory (e.g. build2)

That's it! When release_sdk lane is run, it will run these lanes in subsequent order:

bump_release_version
clean_and_lint
build_xcframework
tag_version
pod_trunk_push

Github release created with assets uploaded:

automatically uploads zip files and puts the correct changelog header section notes

Finished success status:

See available lanes:

So from Step 1 to Step 3 will be on a separate branch -> which will be reviewed by the team. Once the branch is merged into master, thats when we run fastlane ios release_sdk right? Does it also take care of uploading the zip files? Or will that need to be uploaded from build folder to tags?

Yes I think the best process would be:

Step 1 to Step 3 on a separate branch and merge to master.
Run a manual github workflow -- this takes care of uploading zip files and creating a release


add test cases

Test cases do not cover some exceptions such as missing parenthesis or
mismatched parenthesis.
This commit just adds small test cases for those cases.
I think patterns are not always one-to-one pair.(e.g.  Considering half-char and full-char, users sometimes want '(' and '（' to be matched by ')' and '）' .) What do you think of  signature like (Set<Char>,Set<Char>)?
I also think it would be better if users can choose whether they override default patterns or append patterns.  Current implementation always overrides default patterns.
For example, we can define custom patterns parameter as ADT.

enum Patterns {
  case Override(pat)
  case Add(pat)
}

val patterns = patterns match
  case Override(pat) => pat
  case Add(pat) => DEFAULT_PATTERNS ++ pat

@i10416
I'm sorry for the late response, and thanks for your great contribution!
I agree it is better to be able to consider N-to-M pairs.
It would be useful to change the internal signature, and add methods for N-to-M patterns on the builder.
Though, since the 1-to-1 pair is likely to be used in many cases, I'll leave the 1-to-1 method for convenience.
It's interesting to change the behavior of the method which is overriding or adding with enums, however, it seems to make the interface a little more complicated.
I think it would be easier to use by adding overriding the pattern method and adding a new pattern method to the builder.
Anyway, I'll merge your PR, and thanks a lot for your helpful comments.


Polymer cli don't support the spread operator (...) condition during build

I just had this error during the build:
src/growspace/growspace-detailed-info.html(102,12) error [parse-error] - Unexpected token ...
for this kind of code:
this.$.modifyOneLightAjax.body = {
          "name": this.$.modifyLightNameInput.value,
          ...this.$.createLightDescriptionInput.value && {
            "description": this.$.createLightDescriptionInput.value
          },
          "type": this.$.createLightTypeInput.selected
        };

Thank you!

Any help? This is blocking us & we have thousands of spread operators in our polymer project?

Related to #665

Related to #665

I don't think there is any relation with the #665 ...

The relation is that both build and modulizer use analyzer under the hood and it apparently needs to be updated to parse object rest / spread properly.

Okay, thank you for the explanation! Is there any chance that the analyzer will be updated?

@rictic @usergenic could you help us with a hint about where to apply the proper fix to support object spread?

Probably adding this babel plugin should help: https://babeljs.io/docs/en/babel-plugin-transform-object-rest-spread
But I don't know how to do it...

Are there still no news on this? It's a serious blocker for big applications with many spread operators..

Also running into this in our project here. Does anyone have any news on this?

Hey guys! I'm also having the same. Are you going to fix this?


Clarify on how to merging the same extension with different versions

We didn't specify how linker should merge the extension with different
versions before, and here is proposal for how to manage that.
NOTE: binutils just silently merge that for now.

We would like to more non-normative text to describe how to handle that like https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/338


[vcpkg]report error while runing command 'vcpkg install osg'

when I implement command ''vcpkg install osg' ,It reported error in last step.
enviroment:
Package: osg:x64-windows
Vcpkg version: 2020.02.04-nohash
error:

It should be the last step to install osg,It takes long time,help please

I have installed cmake-3.17.0

error log files attach

error log files attach

sorry I don't upload the file,this is its last several line in the log

Did you Install Visual Studio English Language Pack?

The example application osgmovie build failed because of SDL/SDL.h not found.
There is already fix-sdl.patch in ports/osg, but not correct.
Should use SDL2/SDL.h when USE_SDL2, use SDL/SDL.h when USE_SDL

thank you all, @linquize and @Voskrese ,I've solved this error by installing sdl1


Polymorphic Gson

Gson by default does not allow serialization of polymorphic references (e.g. base type references to a sub-type instance). This PR introduces the PolymorphicTypeAdapterFactory, which serializes type metadata for types deriving from the given base type.
Changes

Add PolymorphicTypeAdapterFactory
Rename GsonFactory to GsonBuilderFactory

Usage

Create a GsonBuilder from a factory method in GsonBuilderFactory.
Register instances of PolymorphicTypeAdapterFactory in the GsonBuilder for each base type you wish to support (e.g. gsonBuilder.registerTypeAdapterFactory(PolymorphicTypeAdapterFactory.of(Event.class)))
Serialize base type references of sub-type instances (like Event event = new AttackEvent()) with ease

Hooray Jenkins reported success with all tests good!


Improve TypeScript type inference for string values

Hello,
thank you for this very useful package! It would be awesome if the type definitions supported a bit nicer inferring of return values. This way one could use literal string values.
Based on my testing something like this in resolveAcceptLanguage would already help:
https://github.com/Avansai/resolve-accept-language/blob/07a8a3292358790009ae6f47b06c0087ed76cb02/src/resolve-accept-language.ts#L113-L117
const resolveAcceptLanguage = <TLocale extends string>(
  acceptLanguageHeader: string,
  locales: TLocale[],
  defaultLocale: TLocale
): TLocale => {

It would allow type inference like:

Hello,
thanks for the update! It looks like the return type is still string, should it be TLocales[number] instead?
https://github.com/Avansai/resolve-accept-language/blob/7deeb6614357dfc3463ce11ca1fd0ff0b3d4ac85/src/resolve-accept-language.ts#L117

My bad you're right @iiroj - the change is available in version 1.1.56
Thanks


All Tickets Not Displaying

Current: The 'all tickets' webpage isn't displaying any tickets.
Expect: To display some data table.
Either something went wrong in the controller section or check out the handlebar view page.

False alarm.


Update docs for web hook subscriptions

@ianco / @amanji -- anyone know why Aries-VCR tests are failing?  Something in the setup of the tests?

I'm not sure but I'll look into it next week.  They've been failing for awhile.

@ianco / @amanji -- anyone know why Aries-VCR tests are failing? Something in the setup of the tests?

Fixed the tests


fix: parse millis

doesn't parse all the durations, akka by default uses this function to parse strings such as '5s' '10s' etc..
@andreaTP

please provide proper tests to target this issue.

LGTM


Feat:  Adding a front-end test using puppeteer.

Why ?
To ensure the website functions as described in the source code by using puppeteer tests
How ?
I chose puppeteer because of its ease of use and prior experience with the package
Test plan
cd website
npm test

I believe this is for https://github.com/facebookresearch/stopes/issues/38 ?
I think the idea of this issue is to add front-end test for seamlisten, and not the stopes website.

Yes, thats why i closed the issue. I've made a new pull request at https://github.com/facebookresearch/stopes/pull/46
Please tell me what you think


playwright: use Edge stable instead of Beta channel

There is now a stable channel since a few months.

Docs Build status updates of commit 9f90116:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/playwright/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Diagnostics Tab is renamed in Azure Portal

It's called App Service logs now

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

ID: ef9002ed-c817-c615-fe32-05ad4cc78b61
Version Independent ID: 72295255-8d90-a2c6-0995-0e1208fcdcab
Content: Introduction to App Service on Linux - Azure
Content Source: articles/app-service/containers/app-service-linux-intro.md
Service: app-service
GitHub Login: @msangapu
Microsoft Alias: msangapu;yili

@pascalnaber Thanks for your feedback! We will investigate and update as appropriate

@pascalnaber Thanks for bringing this to our attention. I have assigned the issue to the content author to review further and update the document as appropriate.

Being handled in https://github.com/MicrosoftDocs/azure-docs-pr/pull/80837

PR has been signed-off.
#please-close


Update /etc/systemd/system/k3s.service to point to load balancer or DNS round robin

https://github.com/alexellis/k3sup#create-a-multi-master-ha-setup-with-external-sql

https://github.com/plunder-app/kube-vip

https://github.com/plunder-app/kube-vip


[ci,i2c] Re-enable "i2c_host_eeprom_test" in CI

Description
This test was disabled in https://github.com/lowRISC/opentitan/pull/22346 as it broke, this issue tracks its re-enablement.

This test might have been broken by #22049, where this test failed (for the first time?).

I2C DV carried over to M5.

This test likely broke because the software was not updated to handle and acknowledge a NACK event, causing the hardware to halt indefinitely awaiting this action.

The software issue was fixed with #23772 but the i2c_host_eeprom_test_rom test still fails around 1% of the time. Debugging suggests that this is a UART issues on the CW310 since the test logs quite a bit of data. In contrast, i2c_host_eeprom_sival nevers fails with the fix and it uses hyperdebug for UART. Therefore the options are:

keep both test enabled, but keep in mind that the random failures are unrelated to i2c,
or disable specifically the test_rom and only keep the sival version.

Thanks @pamaury - flagging to @timothytrippel / @cfrantz to see what they would like to do with this.

Thanks @pamaury ! Based on your comment, and that any remaining issues with this test are more likely UART-related, I'm going to close this issue. I presume that ongoing UART issues are tracked already in open issues, so can we possibly link the failure modes you are now seeing with one of the pre-existing issues? If not, would you mind opening a new issue? If you disagree, please feel to re-open this one. Thanks :)


accounts: return an empty array if no accounts are found

Rather than null, which is harder for a UI to deal with.

Codecov Report

Merging #102 into master will decrease coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
- Coverage   61.19%   61.09%   -0.11%
==========================================
  Files          33       33
  Lines        1853     1853
==========================================
- Hits         1134     1132       -2
- Misses        511      512       +1
- Partials      208      209       +1


Synchronize main branch with Apache

I guess I need to revert the CI updates to do this

I guess I need to revert the CI updates to do this

For the projects we productized I've been ignoring most of the changes in .ci and .jenkins as some of them are only related to Apache. But for kogito-docs I dont know much the context, but maybe we should follow this same idea? But let's see what others think.

Do we need midstream for this repo? 🤔

@ricardozanini Good question, I was trying to figure out a process to have midstream for doc syncing but didnt figure it out yet. This PR is result of the backport happening now :D

@domhanak @rgdoliveira I think we don't need it. The openshift-knative is our midstream. And once we migrate to OpenShift Docs, that will be an entire new process/architecture.

Closing.


404 on data.json and /api/components/

After cloning from the repo to http://timeboxplanner.site/simplycode/ the server cannot find data/components and data.json (404)
data.json is called in simply-edit.js 3440(xhr)
/api/components/ is called in  /simplycode/:167(fetch)

Since simplyCode implements its own storage using the raw api / data api, we don't need to load data.json at all. It should be ok to add 'data-simply-storage="none"' to the the script source for simply-edit.js all the page frames.

the server wasn't configured, so currently no PUT would work, I know better now!

Not actually an issue.


WL-4502: add "Graduands" groups to Participant Group browser

Would have been nice to have made the code a little more readable at the same time.


[FIX,PYLINT] Fix pylint errors on MacOS with Python 3.8

These errors do not seem to show up in CI, but they show up locally.
@areusch

I think this one we should potentially not merge. the reason is: I think we should keep ci-lint as the source of truth for which things are lint errors and which are not. open to be convinced otherwise, though.

I think we can merge this case, as the changes are not incompatible to the ci-lint. And will likely help when we upgrade the ci-lint's pylint version in the future


Add /health API endpoint

Should give a good idea as to the overall status of the service, including:

HTCondor (collector, schedd, etc)
IMC

Should return status codes:

200 service is healthy
500 service is not healthy

No auth required

Currently have a health endpoint: <hostname>:/api/v1/health returning:

204 service is healthy
409 service is not healthy (status code from https://stackoverflow.com/a/58597797, can easily change this!)

At the moment only the HTCondor collector and schedd are checked. These are the most essential things to check because it allows job/workflow submission and status checking etc.


SLIM-472 retries

Return failed messages to Core with retry properties so Core can trigger a scheduled retry.

SonarQube analysis reported 11 issues:

 6 major
 5 info

Watch the comments in this conversation to review them.
Note: the following issues could not be reported as comments because they are located on lines that are not displayed in this pull request:

 Do not forget to remove this deprecated code someday.
 Do not forget to remove this deprecated code someday.
 Do not forget to remove this deprecated code someday.
 Constructor has 10 parameters, which is greater than 7 authorized.
 Constructor has 12 parameters, which is greater than 7 authorized.
 Constructor has 10 parameters, which is greater than 7 authorized.
 Do not forget to remove this deprecated code someday.
 Do not forget to remove this deprecated code someday.
 Constructor has 11 parameters, which is greater than 7 authorized.
 Constructor has 9 parameters, which is greater than 7 authorized.
... 0 more

All is well.

SonarQube analysis reported 11 issues:

 6 major
 5 info

Watch the comments in this conversation to review them.
Note: the following issues could not be reported as comments because they are located on lines that are not displayed in this pull request:

 Do not forget to remove this deprecated code someday.
 Do not forget to remove this deprecated code someday.
 Constructor has 12 parameters, which is greater than 7 authorized.
 Constructor has 10 parameters, which is greater than 7 authorized.
 Constructor has 10 parameters, which is greater than 7 authorized.
 Do not forget to remove this deprecated code someday.
 Do not forget to remove this deprecated code someday.
 Do not forget to remove this deprecated code someday.
 Constructor has 11 parameters, which is greater than 7 authorized.
 Constructor has 9 parameters, which is greater than 7 authorized.
... 0 more

All is well.


Expected TypeScript compilerOptions to be merged instead of overwritten

Try the following:
const project = new TypeScriptProject({
    ...
    tsconfig: {
        compilerOptions: {
            noUnusedLocals: false
        }
    },
    ...
});

You will end up with the following ts config:
{
  "compilerOptions": {
    "noUnusedLocals": false
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules",
    "lib"
  ]
}

This completely breaks the compile and packaging because the location of javascript files changes.
$ ls src
index.js        index.ts

Projen version: 0.3.117

Current solution:
project.tsconfig.compilerOptions.noUnusedLocals = false

Sounds like a bug. Contributions are welcome.


A question about the num_level the proposal network

Hello author, I note that in the docs you mentioned that using two different proposal networks to speed resample process can have a better result, I would like to ask if there is any quantitative analysis or comparison of the effect related to two resampling with only one proposal network, thanks a lot!

We have quality numbers for a single proposal network in the paper. Still images generally look good, but you seed banding artifacts from aliasing when the camera moves (thin objects disappear and reappear). There is a marginal speedup from using one prop network, but generally the prop networks is pretty quick relative to everything else.

We have quality numbers for a single proposal network in the paper. Still images generally look good, but you seed banding artifacts from aliasing when the camera moves (thin objects disappear and reappear). There is a marginal speedup from using one prop network, but generally the prop networks is pretty quick relative to everything else.

Get that! Thanks a lot~


Support Swift 5.5 / Xcode 13

The introduction of async/await in Swift 5.5 (https://github.com/apple/swift-evolution/blob/main/proposals/0296-async-await.md) promoted the "await" word to keyword. Therefore to use it in this context, it must be wrapped in backticks.
Change is compatible with previous Swift versions.

Unfortunately my internet connection is really bad and I can't download the last Xcode... :( And so I can't test it locally yet. I mostly trust you there (it looks good to me though).
Thanks for the help!


Trigger release of EKS Go Debian base image

Issue #, if available:
Description of changes:
Trigger release of EKS Go Debian base image for Go 1.19.10 and 1.20.5
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/approve


Another way to specify Custom Usage Data

Now we have two way to give Browserslist Custom Usage Data:

stats option
BROWSERSLIST_STATS environment variable

I need more way and want to create Pull Request, but I need help to suggest.
What would be better?

set Custom Usage Data at file with standard name (browserslist-stats for example) like browserslist file
use package.json:

{
  ...
  "browserslist": {
    "stats": "./path_to_file"
  }
  ...
}

Maybe we can specified it in browserslist config?
[stats]
big json

or
[stats file]
path/to/file

I think, keep json in browserslist config file can be uncomfortable.
But [stats file] is fine!

Sure. Let’s use [stats] for path.
But this fix will not be soon (I am working on HolyJS topic right now).

browserslist-stats.json file support was added by @AleshaOleg in https://github.com/ai/browserslist/pull/86


Uncaught TypeError: 'ownKeys' on proxy: trap returned duplicate entries

This is another case where a doc (attached) triggers an error in automerge-js that doesn't appear to happen in upstream Automerge, although it's a little more work to repro than #394:
const Automerge = require('automerge-js');
Automerge.use(require('automerge-wasm'));

const doc = Automerge.load(require('fs').readFileSync('automerge_data_2'));

console.log(Object.entries(doc.versions['70d4809a163446aaa91db8c5795e955e'].grid.cells));

// Uncaught TypeError: 'ownKeys' on proxy: trap returned duplicate entries
//    at Function.entries (<anonymous>)
//    at REPL113:1:39
//    at _change (/Users/rfitz/src/gridlock/gridlock_app/node_modules/automerge-js/dist/cjs/index.js:97:9)
//    at Object.change (/Users/rfitz/src/gridlock/gridlock_app/node_modules/automerge-js/dist/cjs/index.js:62:16)

Oh sorry, I got a 404 when I submitted this the first time. Closing the dupe.


feat(server-routes): json-editor for tab inputs

ability to write json and have type option in inputs,
(I think still there is some bugs when you switch from json to input, the change type might not work accurately in some caces)
https://github.com/nuxt/devtools/assets/38922203/e0e523df-2607-41af-866a-8246e21d0a21

@antfu Awww that's so right, I totally miss it, thanks
yes I think it would be easy if we don't sync them, and do you think we need json-editor only for body tab or all the tabs?

I think only for body should be good enough

here is the latest
https://github.com/nuxt/devtools/assets/38922203/f0d475cc-0405-4229-918a-2e23fab660e0


email regexp

the first exemple of this lib is a very basic email matching regexp. I would suggest to replace this with something else. Using regexp for matching email addresses is often a bad idea and this example suggests it's fine and/or that this regexp is actually correct for validating email
https://fightingforalostcause.net/content/misc/2006/compare-email-regex.php

I agree with you on validating emails using regular expressions is a bad idea, but the example spans further and parses emails out of plain text. I've updated the website and added a paragraph to inform about this, in the first step.
Maybe we'll find a better example to show off on the page.

thx for adding that comment on the website @KarimGeiger
I'll come back if I think of an useful example to show off


Universal wheel

Edit 1: posted this prematurely (hotkey on commute...), please refresh!
Edit 2: structured up findings into one single post
Goal
Offer one single, universal, wheel for Qt.py: Qt.py-0.6.6-py2.py3-none-any.whl.
Background
I'm maintaining an internal wheel "registry" at my company and I recently realized there are one wheel for each major version of Python:
Qt.py-0.6.6-py2-none-any.whl
Qt.py-0.6.6-py3-none-any.whl

If you attempt to install e.g. the py3 version into Python 2.x you'll get this:
pip2 install Qt.py-0.6.6-py3-none-any.whl
Qt.py-0.6.6-py3-none-any.whl is not a supported wheel on this platform.

So far, I haven't looked into the pip deployment at all, but there seems to be a possibility to have Qt.py use one and the same wheel for either version, which would be nice. An example of another open source package doing this is virtualenv. Here you can see only one wheel is available and it's called virtualenv-15.1.0-py2.py3-none-any.whl.
Implementation
It seems we need to do two things:

Add setup.cfg with the following contents:

[bdist_wheel]
universal=1

Change this line of the Travis PyPi deployment into:

distributions: "sdist bdist_wheel"

Sources:

https://wheel.readthedocs.io/en/latest/
http://www.dougalmatthews.com/2016/Sep/01/automate-publishing-to-pypi-with-pbr-and-travis/
https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/

@mottosso I believe you have a better overall understanding (than me) on how the PyPi deployment works and how to test it out. Would you like to have a look at this? (there's absolutely no hurry on my part on getting this implemented)

Hm. It seems like all we have to do is add setup.cfg with the following contents:
[bdist_wheel]
universal = 1

Please see here where he explains:

The first part will make wheel build a universal wheel file (e.g. attrs-15.1.0-py2.py3-none-any.whl) and you won’t have to circle through virtual environments of all supported Python versions to build them separately.

This is also how virtualenv does it, it seems: https://github.com/pypa/virtualenv/blob/master/setup.cfg

It's also possible we need to change this line of the Travis PyPi deployment into:
distributions: "sdist bdist_wheel"

Thanks @fredrikaverpil, looks interesting. I have very little experiences with wheels, my understanding was that they are better (only?) suited for packages that contain binaries, and offer a way of providing identical sources with unique binaries per platform.
Since Qt.py has no binaries, I didn't think it applies.
But, having had a look at the wheels documentation it appears they do apply, and what we're looking for is - as you say - a "universal wheel".
As for testing it out, you should be able to locally build a wheel and see how it works for you.
$ git clone
$ cd Qt.py
$ python setup.py bdist_wheel --universal

It should build a "universal" wheel for you, that you can later try out.
To have it automatically built and uploaded to PyPI, we'll have to pass through Travis, and some quick Googling didn't reveal how to accomplish this.
Simply adding bdist_wheel to our .travis.yml seem to only produce a "Pure Python Wheel", which isn't cross-compatible with Python 3.
From the docs, it might be a combination of bdist_wheel and a new setup.cfg file that does the trick.
I'd be happy for you to try, the only way we can really be sure is by making a few releases and seeing what travis and PyPI says. If you can build it locally first and make sure there isn't anything in Qt.py that hinders the ability, that would be best.

Sounds good, I'll look into this.
I just noticed these are the variants which can get downloaded from pip wheel -w . Qt.py:
Qt.py-0.6.6-py2-none-any.whl  # macOS
Qt.py-0.6.6-py3-none-any.whl  # macOS
Qt.py-0.6.6-cp27-none-any.whl   # Windows
Qt.py-0.6.6-cp35-none-any.whl  # Windows

Ok, here we go:
$ python setup.py bdist_wheel --universal
running bdist_wheel
running build
running build_py
creating build
creating build/lib
copying Qt.py -> build/lib
installing to build/bdist.macosx-10.11-x86_64/wheel
running install
running install_lib
creating build/bdist.macosx-10.11-x86_64
creating build/bdist.macosx-10.11-x86_64/wheel
copying build/lib/Qt.py -> build/bdist.macosx-10.11-x86_64/wheel
running install_egg_info
running egg_info
creating Qt.py.egg-info
writing Qt.py.egg-info/PKG-INFO
writing top-level names to Qt.py.egg-info/top_level.txt
writing dependency_links to Qt.py.egg-info/dependency_links.txt
writing manifest file 'Qt.py.egg-info/SOURCES.txt'
reading manifest file 'Qt.py.egg-info/SOURCES.txt'
writing manifest file 'Qt.py.egg-info/SOURCES.txt'
Copying Qt.py.egg-info to build/bdist.macosx-10.11-x86_64/wheel/Qt.py-0.6.6-py2.7.egg-info
running install_scripts
creating build/bdist.macosx-10.11-x86_64/wheel/Qt.py-0.6.6.dist-info/WHEEL

This resulted in:
$ tree dist
dist
└── Qt.py-0.6.6-py2.py3-none-any.whl

0 directories, 1 file

Tried to pip install it:
$ pip2 --version
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)

$ pip2 install dist/Qt.py-0.6.6-py2.py3-none-any.whl
Processing ./dist/Qt.py-0.6.6-py2.py3-none-any.whl
Installing collected packages: Qt.py
Successfully installed Qt.py-0.6.6

$ pip3 --version
pip 9.0.1 from /usr/local/lib/python3.5/site-packages (python 3.5)

$pip3 install dist/Qt.py-0.6.6-py2.py3-none-any.whl
Processing ./dist/Qt.py-0.6.6-py2.py3-none-any.whl
Installing collected packages: Qt.py
Successfully installed Qt.py-0.6.6

What do you think, should I create a PR and we can try this out with Travis?
All I did was the two things outlined in my initial post:

Add setup.cfg
Add bdist_wheel to Travis config

Yes, put together a PR. We'll have to make releases as well, to get it to upload to PyPI so that you can test. It's safe to delete a release after it's been made, but we can't remove the versions from PyPI, so maybe make the version number something temporary, like 0.6.7-test-01. Then when we remove them and make a final version, we can call it 0.6.7 as per usual.
The reason being that PyPI doesn't allow duplicate versions, at all. So again, don't test with a real version number, or else we'll get a gap in our releases - like 0.6.6 to 0.6.12, once we're done testing and removing releases. Not the end of the world, but if it can be avoided, let's.
Does that make sense?

Yes, makes a lot of sense. I'd like to go through this together with you thoroughly, since like you say, it's irreversible with PyPi. I'll set up a PR and we'll continue talking there before actually tagging.

I made a release (0.6.7) which turned up almost instantly in PyPi. Then I created release 0.6.8-test-01 but I still don't see that in PyPi.
I wonder if I did things in the wrong order... although I followed your instructions. Where do you see the deployment status?

HTTPError: 400 Client Error: Invalid version, cannot be parsed as a valid PEP 440 version. for url: https://pypi.python.org/pypi
/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/setuptools/dist.py:294: UserWarning: The version specified ('0.6.8-test-01') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.

Gah, managed to create the release before I commited...
Okay, let's have another try with #167.

I keep getting this:

Skipping a deployment with the pypi provider because this is not a tagged commit

I don't understand how to fullfil that requirement. I do a merge with a version bump in Qt.py and then I create a new release with the corresponding tag/version. What am I missing?

I keep getting this

Ah, I was looking at the wrong commit, it seems. When looking at the correct one it now seems like it worked fine (although a small error which we've probably had all along).

Uploading distributions to https://pypi.python.org/pypi
Uploading Qt.py-0.6.8.dev2.tar.gz
[================================] 9578/9578 - 00:00:03
running upload_docs
creating build
creating build/docs
error: no files found in upload directory 'build/docs'
No stash found.
Done. Your build exited with 0.

Pip doesn't download the tar.tgz file yet, but downloading that manually from PyPi and then producing a wheel seems like it does indeed work:
$ pip wheel -w . /Users/fredrik/Downloads/Qt.py-0.6.8.dev2.tar.gz
Processing /Users/fredrik/Downloads/Qt.py-0.6.8.dev2.tar.gz
Building wheels for collected packages: Qt.py
  Running setup.py bdist_wheel for Qt.py ... done
  Stored in directory: /Users/fredrik/code
Successfully built Qt.py

$ pip2 install Qt.py-0.6.8.dev2-py2.py3-none-any.whl
Processing ./Qt.py-0.6.8.dev2-py2.py3-none-any.whl
Installing collected packages: Qt.py
Successfully installed Qt.py-0.6.8.dev2

$pip3 install Qt.py-0.6.8.dev2-py2.py3-none-any.whl
Processing ./Qt.py-0.6.8.dev2-py2.py3-none-any.whl
Installing collected packages: Qt.py
Successfully installed Qt.py-0.6.8.dev2

Pip still doesn't download the tar.tgz hosted in PyPi. Is it possible this is because it's a dev release?
Either way, it now looks like the wheel is universal and we should be able to file a new non-dev release. What do you think?

That's an interesting feature, looks like releases marked dev have special meaning to pip.

https://packaging.python.org/installing/#installing-prereleases

You install them using the --pre flag.
$ pip install --pre Qt.py

Looks good to me, let's pull the trigger!

Ah!
That's actually a very nice feature (in our case).
$ pip2 wheel --no-cache --pre -w . Qt.py
Collecting Qt.py
  Downloading Qt.py-0.6.8.dev2.tar.gz
Building wheels for collected packages: Qt.py
  Running setup.py bdist_wheel for Qt.py ... done
  Stored in directory: c:\users\iruser\code\repos\qt.py
Successfully built Qt.py

$ dir *.whl
 Volume in drive C is Windows
 Volume Serial Number is 92FF-FCC6

 Directory of C:\Users\iruser\code\repos\Qt.py

11/25/2016  10:18 AM             6,723 Qt.py-0.6.8.dev2-py2.py3-none-any.whl
               1 File(s)          6,723 bytes
               0 Dir(s)  1,807,888,773,120 bytes free

So, what do you say, should I just change the Qt.py version into 0.6.8 and create a new 0.6.8 release to make this happen?

Allright, implemented in #168 🎉
Qt.py-0.6.8-py2.py3-none-any.whl

Whop whop! Good job!

Hi everyone. I discovered your repo by chance while trying to solve the universal wheel issue for my project. It looks like we both have the same bug: we put the "distributions" field inside the "on" part of "deploy".
Looking back at the comments here, it looks like travis was never actually building the wheel for you, and I think this is why.
I've submitted a pull request with the fix. I know it's hard to test changes to the "deploy" part of a travis config so you might be hesitant to change it, but I thought I'd offer up this fix anyway, because I found this to be a hard bug to track down.


Angular-moment-picker not working in IE

angular moment picker is not working in IE. Any Help ?

not working for me in IE either, any thoughts?


[Bug]: Plugin is not working

Describe the bug

I write (@ - calendar pops up
I click on date - nothing happens
Calendar disapears and and I see only text (@

Obsidian 0.13.24
Minimal theme

Expected Behavior
No response
Steps to reproduce
See above.
Operating system
Windows

Same here on MacOS

I can't see even the popup (nothing happens when I write (@ )
Obsidian: 0.13.23

Still not working even after last update.

I sort of figure out why this not working by reading the source code.
This plugin only works in the environment of a Todo list, not anywhere.
Since many got same need of adding a non-todo reminder, may we discuss the logic there, otherwise I'm not able to directly fire a pull request.

Oh, this is new and important information for me. I din´t know that.
It is OK. I will adapt to it now.

README and manual documents explain that this plugin uses TODO list for reminder.

https://github.com/uphy/obsidian-reminder/blob/master/README.md
https://uphy.github.io/obsidian-reminder/

I feel there are no problems.


Some documentation pages appear to be missing

There used to be a page called attrs in the docs, listing that module's API, which now redirects to Attr.
However, that new page has been empty for a few weeks – would be great to get it back!

Sorry for late reply.
Right now we have two separate page for attrs and Attr
attrsis  the namespace in starlark andAttris the type. TheAttris empty there, it would be great to have a link to point toattrsinAttr`