Backups are broken since upgrade to 1.27

Summary
Backup consists of a 213-215 byte tar.gz file containing nothing. This started happening after upgrading to 1.27
Running /snap/microk8s/current/bin/migrator --endpoint unix://${SNAP_DATA}/var/kubernetes/backend/kine.sock:12379 --mode backup-dqlite --db-dir ./ hangs for more than a day and never completes.
I created another issue but responses stopped 3 weeks ago. https://github.com/canonical/microk8s/issues/4259
What Should Happen Instead?
The backup should work and probably (and statistically) be around 1.3mb.
Reproduction Steps
I have a backup of my db that can be imported into a new cluster and it will reproduce. I need to send it privately.
Introspection Report
inspection-report-20231019_220512.tar.gz
Can you suggest a fix?

Are you interested in contributing with a fix?
Ill help with whatever I can

Hi @franco-martin would it be possible for you to use microk8s.dbctl backup -o backup? microk8s.dbctl is the expected way to take backups.

Sorry I missed that detail, I already tried that and it generates an empty
tar.gz file. I linked another issue where all my tests were conducted. I
got a backup you can use to replicate the problem, how can I send it to you?
On Mon, Nov 20, 2023, 02:55 Konstantinos Tsakalozos <
@.***> wrote:

Hi @franco-martin https://github.com/franco-martin would it be possible
for you to use microk8s.dbctl backup -o backup? microk8s.dbctl is the
expected way to take backups.
—
Reply to this email directly, view it on GitHub
https://github.com/canonical/microk8s/issues/4308#issuecomment-1818273911,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK6RJQF4GYPJXCYK2ZTLXUTYFLWFBAVCNFSM6AAAAAA7RGEBAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJYGI3TGOJRGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

Folks I understand you all have a lot of work to do, but please communicate if this is not a priority. Ghosting people that are reporting issues and willing to troubleshoot them is not the way to get more contributors.
@ktsakalozos Im waiting for a way of sending you the backup so that you can reproduce the issue. Im not going to post my whole kubernetes cluster information here for anyone to download.

Hi @franco-martin sorry for the late reply. My main issue with is that in my tests backups do not produce an empty file.Even if you sent me an empty tar.gz I would not be able to do anything with it.  Can you help me reproduce this? Using VMs can you get me through the steps you follow that result an empty tar ball, thank you.

I have a backup that when imported into a cluster, breaks the backup functionality. How do I send it privately?

Lets talk on the #microk8s channel over at the kubernetes slack. I am kjackal there.

Updated the description with reproduction steps and a publicly available download link. Hopefully thatll speed things up

Hi @franco-martin, going though the steps you provided I was not able to get to a functioning cluster.

I just tried it in a new node and it worked. Whats failing on your side? Im testing 1.28/stable went through step by step and it works every time.
Here are things you can try:

set the hostname to test-mk8s
set the IP to <IP_ADDRESS> (I tested it with other ips as well but its the original IP of the testing node I used)
If neither work please tell me where it breaks. Im able to run microk8s  kubectl get nodes and it shows two nodes (mk8s09 and test-mk8s)

I'm also seeing this issue of empty backup files. They contain a single empty directory. My cluster is on 1.29, but I don't know when the problem started.

Also seeing this issue, even with v1.29.2 (latest version of the 1.29/stable track).  microk8s dbctl backup produces a tgz of size 216 bytes which contains nothing.

Hello everyone.
I can confirm this behavior after updating a multi-node microk8s cluster (classic) from 1.26.14 stable to 1.27.11 stable a couple weeks ago. Before, our daily backups had a size of around 6.2M. Now they're at 216 Byte, just as @franco-martin described.
Doesn't make a difference if we only use microk8s.dbctl backup or specifying a certain filename microk8s.dbctl backup -o backup.tar.gz, the resulting "backup"-file is always useless.

According to https://microk8s.io/docs/restore-quorum#stop-dqlite-on-all-nodes-1 it is required to stop all dqlite instances using microk8s stop while backing up the dqlite. Might this be the reason why microk8s dbctl backup fail?

According to https://microk8s.io/docs/restore-quorum#stop-dqlite-on-all-nodes-1 it is required to stop all dqlite instances using microk8s stop while backing up the dqlite. Might this be the reason why microk8s dbctl backup fail?

It looks like you stumbled across the microk8s documentation that explains recovering a multi-node cluster after a failure with a lost quorum. The issue explained in this thread however deals with non-working backups using microk8s dbctl in general, even during normal cluster operation without any known issues. A healthy cluster shouldn't have to be stopped via microk8s stop for a backup task to work properly. I cannot shutdown a whole cluster with 200+ pods every night for a backup process to run and start it again afterwards...
As the author of this thread and many others mentioned (me included) the microk8s dbctl backup -procedure worked flawlessly until upgrading from microk8s channel 1.26.x to a newer version, after which the backup process broke. Hence I don't think there's a link to stopping the service before creating backups via dbctl. But I tried to follow your suggestion and stopped the service (in a clean test environment). Nothing happens when I try to create a backup afterwards. In the console there is an output “Backing up datastore” and it seems like the backup process freezes because the services are not running.
I just reproduced the problem with the following steps:

create a Linux VM, e.g. Ubuntu 22.04.03 LTS / Server
be root, or add sudo when executing the following commands in a terminal
install microk8s via snap install microk8s --classic --channel=1.26
check if working as intended with e.g. microk8s status, microk8s inspect, microk8s kubectl get all -A
start a dbctl backup task microk8s dbctl backup, which should create a file like backup-2024-05-21-15-08-24.tar.gz in your pwd
show content of backup tar-file with tar -tf backup-2024-05-21-15-08-24.tar.gz, which should give you an output of several .data and .key files, named with numbers (e.g. backup-2024-05-21-15-08-24/167.data, backup-2024-05-21-15-08-24/143.data, backup-2024-05-21-15-08-24/95.key, etc.).
The backup-2024-05-21-15-08-24.tar.gz file has a size of 116K

So far so good. Seems to be working with 1.26.14.
Now update the snap to a higher major version and try the backup again.

update via snap refresh microk8s --channel=1.27/stable
start backup microk8s dbctl backup, which again should create a file like backup-2024-05-21-15-24-00.tar.gz in the current folder
check its content tar -tf backup-2024-05-21-15-24-00.tar.gz
You'll see its empty. The only output will look like this: backup-2024-05-21-15-24-00/ - that's it.
the backup-2024-05-21-15-24-00.tar.gz file has a size of 216 Bytes

This seems to be exactly the problem that the author described above.
I'd really like to know why this happens and how to solve it.

Same issue, it does not work even with 1.30, problem is I cannot revert to older version since when I revert cluster stop working.
$ microk8s dbctl backup -o test
Backing up the datastore
INFO[0000] Starting migrator                             dir=/tmp/tmpy_e7ckac/test endpoint="unix:///var/snap/microk8s/6876/var/kubernetes/backend/kine.sock:12379" mode=backup-dqlite
The backup is: test.tar.gz
$ ll test.tar.gz
-rw-rw-r-- 1 user group 192 Jun  5 06:31 test.tar.gz
mkonicek@linux:~

Hi, is there anything we users can do to diagnose the issue? --debug does not show any additional information, nor is anything visible in the logs. But the resulting tar.gz is empty.
# microk8s dbctl --debug backup -o test
Backing up the datastore
INFO[0000] Starting migrator                             dir=/tmp/tmpe6zb425z/test endpoint="unix:///var/snap/microk8s/6876/var/kubernetes/backend/kine.sock:12379" mode=backup-dqlite
The backup is: test.tar.gz

@sbidoul I tried a bunch of things, but without much success. What you could do is debugging "https://github.com/canonical/microk8s/blob/master/scripts/wrappers/dbctl.py" with an existing cluster. I haven't had the time to do that, but if there's business interest in this, you might be able to convince a stakeholder to back you up in the name of open source.

I traced a little bit until the kine client.List call which indeed returns an empty result.
https://github.com/canonical/k8s-dqlite/blob/36366fd2213050d57fa2a36fb6f29f7e04a8d7b2/pkg/migrator/migrator.go#L94
No time to dig deeper for now...


Would you find a trivial build system and github pages doc dir helpful?

Thank you; that'd be great!

https://github.com/transatomic/reactor/pull/10


New configuration not loaded on Caddy reload

Hi,
You may have noticed that I am actively testing the module before utilizing it in production (kudos for the excellent work, by the way 😄 ). During my recent tests, I observed that in both versions 1.x and 2.x, the WAF configurations are not refreshed when I make changes to the .conf file and reload Caddy. However, if I restart the Caddy service, it functions properly (of course...).
This is associated with #11, which is closed, but reloading Caddy after modifying my configuration file, as mentioned, doesn't work.
Currently, the only method I have found is to modify the file name with an added random number, but this approach is not really "clean". Do you know if there is an alternative way to completely reload the WAF configuration for a specific site without restarting Caddy?
Thank you,
Simone

Ok sorry I think I found the issue.
Essentially, Caddy operates in a manner where if it does not detect any alterations in the configuration (even if we modify sections), it does not execute an actual reload and instead displays a message similar to:
{"level":"info","ts":1689607946.3474102,"msg":"config is unchanged"}
{"level":"info","ts":1689607946.3475072,"logger":"admin.api","msg":"load complete"}

This happens if for example we have a configuration like:
(1_waf) {
        coraza_waf {
			include /myconfig.conf
        }
}

and somewhere in the config we import it:
import 1_waf

By modifying it to (2_waf) and importing it with (2_waf), Caddy omits the block name and acknowledges that no modifications were made. The only option is to make an actual alteration in the current configuration, such as changing /myconfig.conf to /myconfig1.conf. Currently, instead of altering the file name, I am appending a custom header with a random value, which is a more cost-effective alternative compared to changing the file name.
Do you have other ideas?
Thank you,
Simone

Thanks a lot! ping @mholt for advice.
also this should be documented, are you up to open a PR?
On Mon, 17 Jul 2023, 17:43 Simone Tavoletta, @.***>
wrote:

Ok sorry I think I found the issue.
Essentially, Caddy operates in a manner where if it does not detect any
alterations in the configuration (even if we modify sections), it does not
execute an actual reload and instead displays a message similar to:
{"level":"info","ts":1689607946.3474102,"msg":"config is unchanged"}
{"level":"info","ts":1689607946.3475072,"logger":"admin.api","msg":"load complete"}
This happens if for example we have a configuration like:
(1_waf) {
coraza_waf {
include /myconfig.conf
}
}
and somewhere in the config we import it:
import 1_waf
By modifying it to (2_waf) and importing it with (2_waf), Caddy omits the
block name and acknowledges that no modifications were made. The only
option is to make an actual alteration in the current configuration, such
as changing /myconfig.conf to /myconfig1.conf. Currently, instead of
altering the file name, I am appending a custom header with a random value,
which is a more cost-effective alternative compared to changing the file
name.
Do you have other ideas?
Thank you,
Simone
—
Reply to this email directly, view it on GitHub
https://github.com/corazawaf/coraza-caddy/issues/89#issuecomment-1638403257,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXOYAUX4GYQZVSNFYR7VBTXQVMTHANCNFSM6AAAAAA2NC7NPQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

wondering ir adding a timestamp inside a commented line before the import
would work?
On Mon, 17 Jul 2023, 17:55 José Carlos Chávez, @.***> wrote:

Thanks a lot! ping @mholt for advice.
also this should be documented, are you up to open a PR?
On Mon, 17 Jul 2023, 17:43 Simone Tavoletta, @.***>
wrote:

Ok sorry I think I found the issue.
Essentially, Caddy operates in a manner where if it does not detect any
alterations in the configuration (even if we modify sections), it does not
execute an actual reload and instead displays a message similar to:
{"level":"info","ts":1689607946.3474102,"msg":"config is unchanged"}
{"level":"info","ts":1689607946.3475072,"logger":"admin.api","msg":"load complete"}
This happens if for example we have a configuration like:
(1_waf) {
coraza_waf {
include /myconfig.conf
}
}
and somewhere in the config we import it:
import 1_waf
By modifying it to (2_waf) and importing it with (2_waf), Caddy omits
the block name and acknowledges that no modifications were made. The only
option is to make an actual alteration in the current configuration, such
as changing /myconfig.conf to /myconfig1.conf. Currently, instead of
altering the file name, I am appending a custom header with a random value,
which is a more cost-effective alternative compared to changing the file
name.
Do you have other ideas?
Thank you,
Simone
—
Reply to this email directly, view it on GitHub
https://github.com/corazawaf/coraza-caddy/issues/89#issuecomment-1638403257,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXOYAUX4GYQZVSNFYR7VBTXQVMTHANCNFSM6AAAAAA2NC7NPQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Hi,
Sure, I checked out this section in the Caddy documentation yesterday. I gave it a try, and it's working smoothly now, without requiring any extra steps.
Thanks! 😃

I think this problem isn't explicit enough. Are you up to add a
TROUBLESHOOTING.MD with such problem?
On Tue, 18 Jul 2023, 09:15 Simone Tavoletta, @.***>
wrote:

Hi,
Sure, I checked out this section
https://caddyserver.com/docs/api#post-load in the Caddy documentation
yesterday. I gave it a try, and it's working smoothly now, without
requiring any extra steps.
Thanks! 😃
—
Reply to this email directly, view it on GitHub
https://github.com/corazawaf/coraza-caddy/issues/89#issuecomment-1639637006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXOYAUEPHCFV6XALWTO443XQYZX3ANCNFSM6AAAAAA2NC7NPQ
.
You are receiving this because you commented.Message ID:
@.***>

Hello,
Certainly, I submitted the PR 😄


Importing custom targets does not work with .NET Core & Paket 4.X

Description
We have a NuGet package with a build target inside it which we use to enforce our "build police" (checking for things like namespace prefix and other things). I can see that paket is not adding the targets reference into the csproj file.
paket.dependencies:
source http://nuget.geniussports.net/NugetWebFeed/nuget

nuget GeniusSports.Common.Targets import_targets: true

nuget System.Net.NetworkInformation ~> 4.0
nuget Newtonsoft.Json ~> 9.0

paket.references
GeniusSports.Common.Targets import_targets: true

Newtonsoft.Json
System.Net.NetworkInformation

Repro steps
Please provide the steps required to reproduce the problem
See attached ZIP. I have also attached our target nuget package.
PaketRepro.zip
GeniusSports.Common.Targets.1.0.2.nupkg.zip
Expected behavior
This is added to the csproj:
  <Import Project="..\packages\MSBuildTasks\build\MSBuildTasks.targets" />
  <Import Project="..\packages\GeniusSports.Common.Targets\build\GeniusSports.Common.targets" />

Actual behavior
No build targets are added.

did that work with odler versions?

Interestingly no. So I've checked this on a normal .NET 4.6.2 project and it does work:
<Import Project="..\..\..\packages\GeniusSports.Common.Targets\build\GeniusSports.Common.targets" Condition="Exists('..\..\..\packages\GeniusSports.Common.Targets\build\GeniusSports.Common.targets')" Label="Paket" />
  <Import Project="..\..\..\packages\MSBuildTasks\build\MSBuildTasks.targets" Condition="Exists('..\..\..\packages\MSBuildTasks\build\MSBuildTasks.targets')" Label="Paket" />

Doesn't work on any of my .NET Standard/Core projects.

Ah so you want these target's installed into MSBuild 15 csproj?

I think so. Interestingly they don't work if I add the reference to them manually anyway. Has the format and process of using targets changed in MSBuild15?
We have been using these successfully with Paket 3.X, VS2015 and .NET 4.6.2 projects for some time now.
Disclaimer that I didn't write these build targets, I'm not a user. I never actually checked they worked once we started developing with .NET Standard/Core, just made an assumption they would.

@cjbhaines I have no idea you would need to ask the MSbuild people /shrug

Ok let me see if we can get our targets working with a manual reference. If so it would be good if targets could be included in .NET Standard/Core projects like they do for .NET 4.6.2. I will report back when I know more. Cheers!

please let me know when we need to do something in paket, but right now I don't really know

Hi guys, I looked over this issue and I can confirm the target files should be imported.
https://docs.microsoft.com/en-us/dotnet/articles/core/tools/cli-msbuild-architecture (you can see here under (With the move to the new project system, the previous diagram changes: ) that they should work.

Also targets can work on .net framework or .net core.

@forki do you think it's a big job to add the target imports for the new csproj format / .NET Standard & .NET Core projects?

It's probably not too hard. Will take a look next week when I'm back from
vacation.
Am 20.03.2017 14:39 schrieb "Chris Haines"<EMAIL_ADDRESS>
@forki https://github.com/forki do you think it's a big job to add the
target imports for the new csproj format / .NET Standard & .NET Core
projects?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2190#issuecomment-287779228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNCxnN7M0xEoF37iyizN81sPLEnVeks5rno-vgaJpZM4MfTV5
.

Thanks mate, much appreciated!

OK. What I need is a repro with a project that was already converted to paket and then a description of the diff you want to see.

Fixing this and fixing how paket doesn't pull in .props files properly across dependencies will give us everything we need to generate graph json nuget.g.props and nuget.g.targets for restore.
Then maybe we could use the paket.lock to populate the assets.json and we'd have everything we need to do restore on our own and be able to run msbuild afterward.

As I said: I'd appreciate a full repro

@forki I'll try and get this done over the next couple of days, it's not a straight forward repo to produce because I need a publicly available package with targets. Can you think of any packages on the official NuGet feed which contain targets?

no I don't know any. maybe you can ask on twitter?

@cjbhaines  Microsoft.VSSDK.BuildTools FSharp.NET.Sdk

Another one https://www.nuget.org/packages/MSBuildTasks/<IP_ADDRESS>

Microsoft.Net.Compilers / FSharp.Compiler.Tools both include .props to override the current compiler.
Fody also includes a .targets file.
I think the difference is that .props should be included at the top of the project file, and .targets at the end.
At least that is what nuget does, whatever much that is worth.

I have prepared a repo for you. Inside the repo you will find 2 solutions in folders called VS2015 and VS2017. Both solutions have been prepared from scratch (no VS2017 automatic upgrade process). There are various different frameworks included under each solution, with the results below.
Bug 2190 Repo.zip
Paket version: 4.1.5
The paket dependencies file contains 2 packages containing build targets:
source https://www.nuget.org/api/v2

nuget Microsoft.VSSDK.BuildTools
nuget MSBuildTasks

The paket references file in each project references these packages with the import_targets option set to true:
Microsoft.VSSDK.BuildTools import_targets: true
nuget MSBuildTasks import_targets: true

VS2015:

DotNet462 - Were targets added: Yes
DotNetPortable - Were targets added: Yes
DotNetStandard - Were targets added: Yes
DotNetCore - Were targets added: No - I'm not sure why I added this as it's xproj and irrelevant now

VS2017:

DotNet462 - Were targets added: Yes
DotNetStandard - Were targets added: No
DotNetCore - Were targets added: No
DotNetUWP - Were targets added: Yes

Expected results: All projects under the VS2017 solution have build targets referened.
Action results: DotNetStandard and DotNetCore do not get build targets referenced.
The build targets import should look like this, if comparing from a successful import:
 <Import Project="..\..\packages\Microsoft.VSSDK.BuildTools\build\Microsoft.VSSDK.BuildTools.targets" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools\build\Microsoft.VSSDK.BuildTools.targets')" Label="Paket" />

<Import Project="..\..\packages\MSBuildTasks\build\MSBuildTasks.targets" Condition="Exists('..\..\packages\MSBuildTasks\build\MSBuildTasks.targets')" Label="Paket" />

@cjbhaines have you tried running dotnet restore for the vs2017 sln on the commandline first and then trying to build it with msbuild15?
(the repro is referencing a bunch of targets from vs packages I don't have installed (UWP, xaml stuff) so I can't properly test this out myself atm)

@cloudRoutine that wasn't the point of the repo. We have some custom build targets we distribute internally but I obviously can't reference those in a public repro. Those are not being included which is why this bug was opened. I just couldn't think of any projects apart from VS build tools which have custom build targets on NuGet which is why those are used, so this is not to be confused with a restore or build issue. You don't actually need to build this to see the packet repro, it's about update/install not adding build targets to the csproj files.

I asked because the information would be useful for fixing this and other related issues

I doubled checked this against Paket 5.0.0-beta003 and it is still an issue.
@cloudRoutine everything seems to build fine in 2015 and 2017 after running dotnet restore, however the imports are still not added on a paket install. I have reduced the size of the repro to just have .NET, Standard and Core so you can open it.
Bug.2190.Repro.SimplifiedWithoutUWP.zip
For .NET 4.6.2, the requested imports in the paket.references:
Microsoft.VSSDK.BuildTools import_targets: true
MSBuildTasks import_targets: true

Resulting in the following being added to the .NET 4.6.2 csproj:
  <Import Project="..\..\packages\Microsoft.VSSDK.BuildTools\build\Microsoft.VSSDK.BuildTools.targets" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools\build\Microsoft.VSSDK.BuildTools.targets')" Label="Paket" />
  <Import Project="..\..\packages\MSBuildTasks\build\MSBuildTasks.targets" Condition="Exists('..\..\packages\MSBuildTasks\build\MSBuildTasks.targets')" Label="Paket" />

The same requested imports for the .NET Standard and Core projects do not get imported from the package when paket install is called. This predates the new csproj format and looks to have been a long standing issue.
I guess the Paket logic to add custom imports is only enabled for specific runtimes? As it's working for regular .NET and UWP but not for .NET Standard and Core.

Does nuget add the imports? Because in netcore world the props and target files are just copied to the obj dir and picked up by msbuild15 automatically. No Import needed. That's why you need to call restore before it works after all.

Ah sorry I didn't realise that, I thought they had just move the references into obj. I can now see this in my obj g.targets file:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
  </PropertyGroup>
  <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
    <Import Project="$(NuGetPackageRoot)msbuildtasks\<IP_ADDRESS>\build\MSBuildTasks.targets" Condition="Exists('$(NuGetPackageRoot)msbuildtasks\<IP_ADDRESS>\build\MSBuildTasks.targets')" />
    <Import Project="$(NuGetPackageRoot)microsoft.vssdk.buildtools\15.0.26201\build\Microsoft.VSSDK.BuildTools.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.vssdk.buildtools\15.0.26201\build\Microsoft.VSSDK.BuildTools.targets')" />
  </ImportGroup>
</Project>

So that has imported the MS packages fine. Interestingly I still can't get it to import my custom targets:
paket.dependencies:
source http://nuget.geniussports.net/NugetWebFeed/nuget

nuget GeniusSports.Common.Targets

source https://www.nuget.org/api/v2

nuget Microsoft.VSSDK.BuildTools
nuget MSBuildTasks

paket.references:
GeniusSports.Common.Targets import_targets: true
Microsoft.VSSDK.BuildTools import_targets: true
MSBuildTasks import_targets: true

Comparing my package to the MSBuildTasks packages it looks like everything is fine:

I have tried:

paket update
paket install
dotnet restore

All without luck. I can see that the dependency has been added to the obj references file:
GeniusSports.Common.Targets,2.0.0,Direct
Microsoft.VSSDK.BuildTools,15.0.26201,Direct
MSBuildTasks,<IP_ADDRESS>,Direct

But nothing has been added to the g.targets file for the Genius Sports targets. Hopefully I'm not doing something silly here.
I have attached our targets package for reference as well.
GeniusSports.Common.Targets.2.0.0.nupkg.zip

Hehehe, the filename Must be <packageid>.targets. It looks like your package has the id GeniusSports.Common.Targets
so the file should be named /build/GeniusSports.Common.Targets.targets.

and queue the "it was the being silly part" music! :) Thanks for your help! I will test this when I'm back in the office on Monday and report back


How to get newly created entry's Id, which is database generated

My app will display a bunch of uploaded product pictures, and these pictures will be stored in the "~/Pictures/ProductId/" folder, therefore I have to break my Create actions into two stages:

Enter all regular properties and insert them into the database. After insertion, I will have a database generated ProductId.

With ProductId at hand, I can generate a directory "~/Pictures/ProductId/", then I can upload my product pictures into this folder.

My question is how do I get this newly database generated ProductId? Since all other fields such as ProductName may not be unique, if I do a search based on any of these fields, the result may not be safe.
Here is what I have tried:
    public Product Insert(Product product)
    {
        Product p = (Product) _context.Add(product);
        _context.SaveChanges();
        return p;
    }

To ease the compiler's complaint on type casting - "(Product) _context.Add(product)" - in my Product.cs file, I added:
public class Product
{
    .....
    public static explicit operator Product(EntityEntry<Product> v)
    {
        return (Product) v;
    }

 }

The compiler doesn't complain, but at run time I got a stackoverflow  exception.

Immediately after
 _context.SaveChanges();
You can get p.productId
because it populated with the updated id once you saveChanges

@arielcloud Thank you for the reply.

@arielcloud Thank you.


Unable to print on TD-2125NWB using Bluetooth

Hello,
I'm trying to print labels from an iPad using Bluetooth on the TD-2125NWB but consistently get a ERROR_COMMUNICATION_ERROR message.
Everything works perfectly when using the same printer over WIFI.
I have also tested the Brother Print SDK demo app which works both with WIFI and Bluetooth.
Here is the code I use to connect to the printer and print a file :
List<BluetoothPrinter> printers = await Printer().getBluetoothPrinters([
  Model.TD_2120N.getName(),
  Model.TD_2125N.getName(),
  Model.TD_2125NWB.getName(),
  Model.TD_2130N.getName(),
]);

Printer printer = Printer();
PrinterInfo printInfo = PrinterInfo();
printInfo.printerModel = printers.first.model;
printInfo.printMode = PrintMode.FIT_TO_PAGE;
printInfo.isAutoCut = false;
printInfo.port =  Port.BLUETOOTH;
printInfo.macAddress = printers.first.macAddress;
printInfo.binCustomPaper = _customPaperFromModel();
printInfo.printQuality = PrintQuality.HIGH_RESOLUTION;
printInfo.rjDensity = 8;

printer.setPrinterInfo(printInfo);

PrinterStatus status = await printer.printFile(testFile.path);

Output :
flutter: Received Result: {labelType: -1, maxOfBatteryResidualQuantityLevel: -1, labelId: -1, isACConnected: {id: -1, name: Unknown}, batteryResidualQuantityLevel: -1, isBatteryMounted: {id: -1, name: Unknown}, batteryLevel: -1, errorCode: {name: ERROR_COMMUNICATION_ERROR, id: -1}}
flutter: ERROR_COMMUNICATION_ERROR

Any idea how to fix this?

Hi @CodeMinion,
I'm now getting a new error :
I/BluetoothAdapter(14631): cancelDiscovery
I/BluetoothSocket(14631): connect() for device XX:XX:XX:XX:C0:B8 called by pid: 14631
I/gralloc4(14631): register: id=4340000012c, handle:0xb40000797d060700, vaddr=0x7979752000
D/BluetoothSocket(14631): close() this: XX:XX:XX:XX:C0:B8, channel: 1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@81764ed, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@f045f22, mSocket: android.net.LocalSocket@250db3 impl:android.net.LocalSocketImpl@5658f70 fd:java.io.FileDescriptor@e9262e9, mSocketState: CONNECTED
D/BluetoothSocket(14631): close() this: XX:XX:XX:XX:C0:B8, channel: 1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@81764ed, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@f045f22, mSocket: null, mSocketState: CLOSED
D/BluetoothSocket(14631): close() this: XX:XX:XX:XX:C0:B8, channel: 1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@81764ed, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@f045f22, mSocket: null, mSocketState: CLOSED
I/flutter (14631): Received Result: {isBatteryMounted: {name: Unknown, id: -1}, labelId: 65535, maxOfBatteryResidualQuantityLevel: -1, labelType: 65535, errorCode: {name: ERROR_NOT_SAME_MODEL, id: -1}, isACConnected: {name: Unknown, id: -1}, batteryLevel: -1, batteryResidualQuantityLevel: -1}
I/flutter (14631): ERROR_NOT_SAME_MODEL

In the Android settings I paired the printer but it is unable to connect, clicking the connect button doesn't do anything, no error message either.
I reckon the first time I paired the device it told me "This device requires an app to function"
Let me know if I can run more tests to help

Okay I got it to work.
What confused me is the the '''modelName''' returned by the Bluetooth search function is not the same as for Wifi, and since I used this to determine which model I'm dealing with it didn't work.
Wifi returns Brother TD-2125NWB whereas Bluetooth returns TD-2125NWB_5452

Glad you to it to work @PrimaelQuemerais. That's correct, for some printers the Bluetooth name includes the first octect of the Bluetooth MAC of the printer.
Apologies for the confusion, the connected step was meant for iOS devices.

Ah right I switched devices in the middle of my test, I will test again with the iPad by perhaps the issue also came from me passing the wrong model to the printer


fix #16 by add the color itself to the samples to ensure the color existed

Fix #16.
Some zones may be empty after clustering iteration. Add the colors array into the samples to ensure there is at least one in the zones.
Note: I'm not sure how to build the package so the files under lib/ folder are not modifed!

@YuJianrong I thought about this and took a slightly different approach.
My method does not add the colors into the samples. So it (hopefully) doesn't introduce as much bias into the result.
I'm leaving this open for now as I'm not sure which way is better.
Also I've added a build script to the package.json, thanks for pointing that out.

Did more testing, seems to be working well 3.0.0 published


[feature] #2163: Detailed logging.

Signed-off-by: Aleksandr Petrosyan<EMAIL_ADDRESS>

Description of the Change
Adds  a new trait LoggedError, that allows quickly logging errors when they occur.
Issue
Addresses #2163

Benefits
More logging information
Possible Drawbacks
Performance regression possible.
Usage Examples or Tests [optional]
TODO

Closed until further notice.


Status update records don't expire

Status updates for compactions and ingest are stored with an expiry date in milliseconds, with DynamoDB Time to Live configured for the field.
That doesn't work because DynamoDB needs the TTL field in seconds: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/howitworks-ttl.html

Going to merge this into https://github.com/gchq/sleeper/issues/238


Search: isSearchMatch not properly propagated, overlays are missing.

The component doesn't work like in
https://frontend-collective.github.io/react-sortable-tree/?path=/story/basics--search
Overlay for matched elements is missing. State is wrongly propagated.
Overlay for focused element is missing.

Screen from my own project.

Try the use case when multiple elements are matched. There should be a blue overlay on all matched elements and it is missing.

Try without react strict mode, that is an issue that originates from the
front-end collective package that predates this one.
On Sat, Apr 23, 2022 at 4:44 PM Karol @.***> wrote:

Try the use case when multiple elements are matched. There should be a
blue overlay on all matched elements and it is missing.
[image: missing blue overlay]
https://user-images.githubusercontent.com/4671354/164885369-7270306f-d461-4307-827e-28cfb6f9c01a.png
—
Reply to this email directly, view it on GitHub
https://github.com/nosferatu500/react-sortable-tree/issues/21#issuecomment-1107416748,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP4PE3U6UDO7VZTZ5CI5WXTVGOS43ANCNFSM5UCXQPCQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Nicholas Danvers
Software Engineer
https://www.imagineeverything.com/

OK, it works fine without strict mode. Thx. It would helpful to add it to "Troubleshooting" section in the readme.


How to load pretrained weights

I have downloaded the pretrained weights from https://github.com/rwightman/pytorch-image-models/releases/tag/v0.1-vitjx
However, I'm not sure how you load the weights into your cats and dogs example.  Anyone have a working example how to do this?

@rbunn80110 Hi Robert! You can just use Ross' comprehensive image library with https://rwightman.github.io/pytorch-image-models/


Fix Rakefile typo that caused default rake task to fail

The Rakefile had a typo that caused the default rake task to fail:
$ bin/rake
rake aborted!
Don't know how to build task 'test:integraton' (See the list of available tasks with `rake --tasks`)
Did you mean?  test:integration

Fix "integraton" → "integration"

Thank you for seeing this! I have been staring at this all day and could not see the typo :)

Released as 2.21.1


Fullpage.js can only be initialized once and you are doing it multiple times!

This happens with simple back and forth of the routes using the browser navigation.
For example, steps:

go to homapge of your app, say /home
click to go to fullpage.js enabled component, say /withfullpage
click your browser back button, should go to /home
then click forward which should go to /withfullpage

The error is: fullPage: Fullpage.js can only be initialized once and you are doing it multiple times! and the page is broken with regards to it being fullpage enabled.

Add this code to your component
ngOnDestroy() { this.fullpageService.destroy('all'); }

Thanks. Using swipejs now though.

@seanmavley can you post your approach of replacing fullpage.js with swipejs?

@besserwisser I'm using this project for my swiperjs https://github.com/zefoy/ngx-swiper-wrapper


Main

Considering in training stage, we may use speed_permutation and spec_augmentation which may not be used in the dev and test stage, so I seperate the config of training dataset with dev and test dataset


[Feature] support const folding for to_date() (backport #39067)

Why I'm doing:
cp from https://github.com/StarRocks/starrocks/pull/39067
What I'm doing:
Fixes #issue
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[x] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.2
[ ] 3.1
[ ] 3.0
[ ] 2.5

@Mergify backport branch-3.2


Code style improvement

Use 2-space indentation in general.

Can one of the admins verify this patch?

It is too tiny to make a pr, so let us close it, OK?

@uncleGen Ok！

@zhoucen  please close this PR and read http://spark.apache.org/contributing.html


Imported name suffix in family part

Debug log ID
6MKZLSYL-refs-apse/6.7.143-6
What happened?
When imported from .bib, the name suffix "Jr." is placed in the family name part and it's not correctly recognized as suffix in the exported CSL-JSON. According to https://forums.zotero.org/discussion/23745, the "Jr." is expected in the given part. The exported CSL-JSON works correctly in the latter format. See also https://forums.zotero.org/discussion/37289 and https://forums.zotero.org/discussion/3271.
BibTeX data:
@BOOK{apa-test.9.46:8,
  AUTHOR = {Costa, Jr., P. T. and McCrae, R. R.},
  DATE   = {2013}
}

Exported CSL-JSON:
			{
				"family": "Costa, Jr.",
				"given": "P. T."
			}

Exported CSL-JSON with "Jr." in given name part:
			{
				"family": "Costa",
				"given": "P. T.",
				"suffix": "Jr."
			}

Is Jr. a special case then? Because Costa, J. would mean { given: 'J.', family: 'Costa' }.

@njbart? Do you know if there are more of these special cases?

Does that mean {MacCallum, III, T.} should parse into { given: 'T.', family: 'MacCallum, III' }?

Does that mean {MacCallum, III, T.} should parse into { given: 'T.', family: 'MacCallum, III' }?

No. My understanding is that “III” is also a name suffix as "Jr". In the apa.csl output, { given: 'T.', family: 'MacCallum, III' } becomes MacCallum, III, T. and { given: 'T., III', family: 'MacCallum' } with "III" in the given part gives MacCallum, T., III. as expected in the APA manual.

CSL-JSON:
[
	{
		"id": "apa.9.44:6b",
		"type": "document",
		"language": "en-US",
		"note": "tex.entrytype: nameonly",
		"author": [
			{
				"family": "MacCallum",
				"given": "T.",
				"suffix": "III"
			}
		]
	}
]

Is Jr. a special case then? Because Costa, J. would mean { given: 'J.', family: 'Costa' }.

The btxdoc.pdf says:

To summarize, BibTeX allows three possible forms for the name:
"First von Last"
"von Last, First"
"von Last, Jr, First"

The Jr part is not likely to be confused with First part because it's delimited by the second comma.
If there are more commas, BibTeX will raise an error.
Too many commas in name 1 of "Costa, Jr., P. T., Doe" for entry apa-test.9.46:8

All right, that's what my parser does, I just stuck the result in the wrong place.

5614 fixes it. Would appreciate it if you could check it does what you want.

It works correctly now.


The effectiveness of mean value removing

As far as I know, most deep CNN-based methods do not remove the mean value.
In this work, it seems that the mean values of RGB components are removed before training. Does the operation help improve performance? Thanks.

Actually, almost every CNN do normalization using dataset mean.
Although we found that removing mean value is not the essential component of our training, it will make training more stable.
Thank you.

@thstkdgus35   Thanks


Adopt UTC for all Timestamps

@jmbeisner, @kkotaich, @tralexander and @bfaivre discussed adding a timezone to the site today to keep things clean and easy.

Scratch that previous comment. Grafana works nicely if everything is stored in UTC. We'll be able to leverage moment for the rest of the work.


LimitChunkCountPlugin - ERROR in chunk runtime [entry] Cannot convert undefined or null to object

Bug report

What is the current behavior?
I need to set the max chunck to only 1 and I can't currently do that. This error has been reported before but nothing was done.
If the current behavior is a bug, please provide the steps to reproduce.
1 - Create a Nuxt App using npx create-nuxt-app <project-name> (Choose bootstrap, axios and eslint when asked)
2 - Change your "nuxt.config.js" to match the one below.
3 - npm run build
4 - Verify that is a Webpack Bug

5 - Change maxCount:4
6 - npm run build
7 - Verify that it now worked

obs: The file is located in the root of the project.
nuxt.config.js
import webpack from 'webpack';

export default {
  // Target: https://go.nuxtjs.dev/config-target
  target: 'static',
  ssr: false,

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'salesforce-query-editor',
    htmlAttrs: {
      lang: 'en',
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
    ],
    link: [],
    script: [],
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    // https://go.nuxtjs.dev/eslint
    ['@nuxtjs/eslint-module', { fix: true, quiet: true }],
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    'bootstrap-vue/nuxt',
    '@nuxtjs/axios',
  ],

  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {},

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    extend(config, ctx) {
      if (ctx.isDev) {
        config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map';
      }
    },

    plugins: [
      new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 1
      })
    ],
  },

  router: {
    mode: 'hash',
  },
}

What is the expected behavior?
It should output one js file as I specified maxChunk = 1 on the LimitChunkCountPlugin

Other relevant information:
webpack version:  4
Node.js version: v12.13.0
Operating System:  Windows
Additional tools:

Duplicate https://github.com/webpack/webpack/issues/9964, sorry, no fixes for webpack@4, because it can create regressions, please consider to update webpack@5

Duplicate https://github.com/webpack/webpack/issues/9964, sorry, no fixes for webpack@4, because it can create regressions, please consider to update webpack@5

I fixed my issue. For those who have this problem, just change the chunck name like shown below:
config.output.filename = 'app.js',
config.output.chunkFilename = '[id].js';
config.optimization.splitChunks.cacheGroups.default = false;
config.optimization.runtimeChunk = false;

plugins: [
  new webpack.optimize.LimitChunkCountPlugin({
    maxChunks: 1
  })
],

The problem is caused because of the [contenthash:7].js. For some reason it does not work when using the maxChuncks:1. So just change to be like in the example above and it should work :)

output: {
    filename: '[contenthash:7].js',
    chunkFilename: '[contenthash:7].js',
},

I fixed my issue. For those who have this problem, just change the chunck name like shown below:
config.output.filename = 'app.js',
config.output.chunkFilename = '[id].js';
config.optimization.splitChunks.cacheGroups.default = false;
config.optimization.runtimeChunk = false;

plugins: [
  new webpack.optimize.LimitChunkCountPlugin({
    maxChunks: 1
  })
],

The problem is caused because of the [contenthash:7].js. For some reason it does not work when using the maxChuncks:1. So just change to be like in the example above and it should work :)

output: {
    filename: '[contenthash:7].js',
    chunkFilename: '[contenthash:7].js',
},

@AllanOricil Can you provide simple reproducible test repo, I want to add this to tests to ensure we will not break it again

@AllanOricil Can you provide simple reproducible test repo, I want to add this to tests to ensure we will not break it again

@AllanOricil Can you provide simple reproducible test repo, I want to add this to tests to ensure we will not break it again

@alexander-akait  Follow these steps to have a project that you can base your tests on
1 - npx create-nuxt-app ANY_NAME
2 - Inside the project root folder there is a file called nuxt.config.js. Nuxt uses Webpack 4 to pack the app, and it comes with pre configure Webpack. And it is in this file  that any webpack config can be overwritten. On the build section of the nuxt.config.js is the place where we can do our changes to webpack. So change your build section to match this one below and don't do anything else
build: {
    extend(config, ctx) {
      if (ctx.isDev) {
        config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map';
      }
    },

    plugins: [
      new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 1
      })
    ],
  },

3 - run npm run build and check the error from this issue
4 - Now change your build again to match the following:
build: {
    extend(config, ctx) {
      if (ctx.isDev) {
        config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map';
      }

      if (ctx.isClient) {
        config.output.filename = 'app.js',
        config.output.chunkFilename = '[id].js';
        config.optimization.splitChunks.cacheGroups.default = false;
        config.optimization.runtimeChunk = false;
      }
    },

    plugins: [
      new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 1
      })
    ],
  },

5 - Verify it does not throw any error

@AllanOricil Can you provide simple reproducible test repo, I want to add this to tests to ensure we will not break it again

@alexander-akait  Follow these steps to have a project that you can base your tests on
1 - npx create-nuxt-app ANY_NAME
2 - Inside the project root folder there is a file called nuxt.config.js. Nuxt uses Webpack 4 to pack the app, and it comes with pre configure Webpack. And it is in this file  that any webpack config can be overwritten. On the build section of the nuxt.config.js is the place where we can do our changes to webpack. So change your build section to match this one below and don't do anything else
build: {
    extend(config, ctx) {
      if (ctx.isDev) {
        config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map';
      }
    },

    plugins: [
      new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 1
      })
    ],
  },

3 - run npm run build and check the error from this issue
4 - Now change your build again to match the following:
build: {
    extend(config, ctx) {
      if (ctx.isDev) {
        config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map';
      }

      if (ctx.isClient) {
        config.output.filename = 'app.js',
        config.output.chunkFilename = '[id].js';
        config.optimization.splitChunks.cacheGroups.default = false;
        config.optimization.runtimeChunk = false;
      }
    },

    plugins: [
      new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 1
      })
    ],
  },

5 - Verify it does not throw any error

config.output.chunkFilename = '[id].js';

you saved my day!
Thanks

@alexander-akait OMG thank you so much!!  Was banging my head on this all day and this was it!
config.output.chunkFilename = '[id].js';


textdistance is very slow

Issue Report Checklist

[ ] Searched the issues page for similar reports
[ ] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[ ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[ ] Tried basic troubleshooting (if a bug/error)

[ ] Restarted Spyder
[ ] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[ ] Tried the other applicable steps from the Troubleshooting Guide

[ ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
Spyder is very slow when editing complex files since #13783
What steps reproduce the problem?

open https://github.com/spyder-ide/spyder/blob/master/spyder/plugins/editor/widgets/codeeditor.py
go to line https://github.com/spyder-ide/spyder/blob/a47660b44e5e446acac6e23aef72e76b7f60ece9/spyder/plugins/editor/widgets/codeeditor.py#L3551
type def a(self):

What is the expected output? What do you see instead?
typing def a(self): takes almost a minute.
Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

Spyder version:
Python version:
Qt version:
PyQt version:
Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE

This was fixed several weeks ago. Could you update your clone and try again?

This is with the latest 4.x

Closing as a duplicate of #14570 (I forgot about this issue, sorry).

Closing as a duplicate of #14570 (I forgot about this issue, sorry).


Abstract Web3API

Support abstract Web3API packages, where only a schema.graphql is published, and it's expected that implementations will be published for the schema (either in WASM or the Client's language).

What's the use case for this one?

So the concept of abstract Web3APIs is currently "half implemented", as we're currently using this for the api-resolver API. The abstract interface is defined here: https://github.com/Web3-API/monorepo/blob/6cd18b4bcbf88f2a6e28ecee0921046109cb955b/packages/core-apis/api-resolver/schema.graphql#L1-L15
And it's implemented by the ENS and IPFS plugins. These implementations are then retrieved by the resolve-api algorithm: https://github.com/Web3-API/monorepo/blob/6cd18b4bcbf88f2a6e28ecee0921046109cb955b/packages/js/core/src/algorithms/resolve-uri.ts#L71-L75
using the get-implementations algorithm.
The implementation described above is minimal, and does not include tooling to allow developers to publish Abstract Web3APIs. The manifest schema is also not implemented, but you can see what an abstract manifest file might look like here: https://github.com/Web3-API/monorepo/blob/6cd18b4bcbf88f2a6e28ecee0921046109cb955b/packages/core-apis/api-resolver/web3api.yaml#L1-L7
So in order to complete this issue we'd want to:

Define a manifest schema for Abstract Web3APIs.
Create tooling to build and publish Abstract Web3API packages.
Come up with a better name for an "Abstract Web3API"? Maybe "Web3API Standard"?
Implement the necessary code needed for the following use-cases:

A Web3API WASM module wants to fetch all implementations, iterate through them and do something. A real world example would be "fetch all AMMs and get liquidity for a given token pair".
A Web3API Plugin wants to fetch all implementations, and do the same as the above.
A Web3API WASM package implements an abstract Web3API schema (maybe add a field to the manifest file?)
A Web3API Plugin implements an abstract Web3API schema (already implemented, but should be looked over again)
A Web3API Client user wants to "let the client know" of multiple implementations of a given abstract Web3API (through redirects). This already works with plugins, and should be tested with WASM based implementations.
Any other use cases you can think of?

Additionally @morrigan please see this issue for more use-cases: https://github.com/Web3-API/monorepo/issues/35

Something else that needs to be done:

For plugins, verify they fully implement the schema they're claiming to implement. I can't think of an easy way to do this for all languages... may have to be done by the client when it's instantiated? For example, the logger plugin claims to implement the "w3/logger" interface. We should be able to detect if the implementation changes (in core-apis) and give an error.

An example schema from the IPFS package, which implements the w3://w3/api-resolver interface:
#import { Query } into ApiResolver from "w3/api-resolver"

type Query implements ApiResolver_Query {
  ...

  tryResolveUri(
    authority: String!
    path: String!
  ): ApiResolver_MaybeUriOrManifest

  getFile(
    path: String!
  ): Bytes
}

One piece of "syntax sugar" we can add is to automatically populate the interface's functions for the developer (tryResolverUri, getFile) within the @web3api/schema-compose package.

Another piece of the work needed for this is to support importing "core-apis" which use the w3 URI authority (i.e. w3://w3/api-name).
I'm thinking thinking in the future we'll want to fetch these APIs from the core.web3api.eth subdomain, but want to also support pulling them in locally (from an NPM package) for development purposes, allowing us to iterate quickly.

Notes after chatting with @nerfZael :
How does "get-implementations" work?
Get implementations tries its best to get all implementations of an interface
that a client knows about (in its redirects). For example:
const client = new Web3ApiClient({
  redirects: [
    // 1. Manually adding an implementation
    {
      from: "ens/some-interface.eth",
      to: "ens/some-implementation.eth"
    },
    // 2. Plugin says it implements an implementation
    {
      from: "ens/some.eth",
      to: pluginSome()
      // ^^ inside of this manifest, it could say
      // "I implemented "ens/some-interface.eth"
    }
  ]
});

client.getImplementations("ens/some-interface")
// 2 results

Here are the following supported cases for implementations:

Plugin implementation:

a. Manifest
packages/js/plugins/ens/src/manifest.ts
export const manifest: PluginManifest = {
  schema: `...`,
  implemented: [new Uri("w3/api-resolver")],
  imported: [new Uri("ens/ethereum.web3api.eth")],
};

b. Schema

Web3API implementation:
a. Schema

#import { Query } into Interface from "ens/inter.eth"

type Query implements Interface_Query {
  # auto add the functions
}

b. Built Schema
@imports(
  type: [

  ]
)
type Query implements Interface_Query {
  function1(
    ...
  )
}

#### Web3API Imported Queries START ####

@imported(
  uri: "ens/inter.eth",
  ...
)
interface Interface_Query {
  function1(
    ...
  )
}

The developer experience for defining a new interface is as follows:

Define the schema
packages/core-apis/logger/schema.graphql

#import should still be supported

enum LogLevel {
  DEBUG,
  INFO,
  WARN,
  ERROR,
}

interface Query {
  log(
    level: LogLevel!
    message: String!
  ): Boolean!
}

Define the manifest
packages/core-apis/logger/web3api.yaml

format: 0.0.1-prealpha.1
description: Web3API Logger Interface
repository: https://github.com/web3-api/monorepo
interface: true
query:
  schema:
    file: ./query.graphql

Build the interface package
w3 build
->
./build/schema.graphql
./build/web3api.yaml

Publish the contents of your ./build folder to ENS & IPFS

Implementations can be queried at run-time like so:

dApp Developer: Using the Web3ApiClient instance directly:

const impls = client.getImplementations("ens/inter.eth");

for (const impl of impls) {
  client.query({
    uri: impl,
    query: `{ someFunc(...) }`
  });
}

Web3API Developer: Using the Web3Api standard interface:
packages/wasm/as/assembly/get-implementations.ts

// Assemblyscript

__w3_get_implementations
...

w3_get_implementations(interface: string) {
  // use __w3_... std functions here
}

We could "wrap it up nicely" in the generated code
// Assemblyscript
import {
  client,
} from "./w3";

const impls = client.getImplementations(...)

for (const impl of impls) {
  client.query(
    ...
  )
}

Questions:

Can you add the @imports directive above the type definition


feat: Unified workflows list UI and API

Fixes https://github.com/argoproj/argo-workflows/issues/10781.
Still WIP but early feedback is appreciated.

For workflow deletion, we need to delete workflow in K8s cluster and in the DB. Here's what I propose we should do:

When deleting a workflow, we always delete the workflow in the K8s cluster.
In addition, there's a popup in the UI (when clicking the delete button) where the user can select whether to delete the workflow in the DB.

For the backend, we can choose either of the following:

Keep the existing behavior of workflowServer.DeleteWorkflow() and UI should call both workflowServer.DeleteWorkflow() and archivedWorkflowServer.DeleteWorkflow().
Add an argument deleteArchived bool to workflowServer.DeleteWorkflow(). If deleteArchived=true, workflowServer.DeleteWorkflow() will also call archivedWorkflowServer.DeleteWorkflow() under the hood.

Any thoughts? @jessesuen @sarabala1979

Discussed with Bala, for the backend we'll use this approach:

Keep the existing behavior of workflowServer.DeleteWorkflow() and UI should call both workflowServer.DeleteWorkflow() and archivedWorkflowServer.DeleteWorkflow().

Are you going to show the icon in the workflow list archived?

Right now it's text "true/false" in the column.  The icon doesn't look good in the column and the meaning of the icon is not intuitive.

Merging this since all comments have been addressed.


Move to OpenZipkin repo

In support of community-driven zipkin, Twitter decided to join the OpenZipkin org, including moving the authoritative repository (currently twitter/zipkin) there.
This needs coordination with one of @rtyler @jamescway @michaelsembwever @eirslett as I think the zipkin fork there will need to be removed first.

I believe twitter/zipkin has all the changes present in openzipkin/zipkin.

@adriancole tomorrow let's move this, you will need admin privs to the twitter/zipkin repo and owner privs to openzipkin org (which you already have)
Once that's ready, I can walk you through it so we don't lose anytihng

@adriancole should have the power now :)

Remember to assign adrian to the issues first!

and done!

Nice one!


Stdlib and Integration Tests

a  la aya.

Standard library is already shipped, and its integration tests are guaranteed before publishing the compiler's npm package.


StackOverflowException when retrieving document node on UWP platform

Description
StackOverflowException when retrieving document node on UWP platform. This happen after nuget version 1.11.19. This has no effect on Xamarin Android / iOS that running the same piece of code.
Exception
Since the stack is overflowed, no stack trace is available.
Fiddle or Project
var doc = new HtmlDocument();
doc.LoadHtml(respondContent);
var productInfoNode = doc.DocumentNode.Descendants("div").FirstOrDefault(x => x.GetAttributeValue("class", null)?.Contains("product-info") ?? false);
if (productInfoNode != null) // crash
{
}
Further technical details
Nuget version 1.11.18 running perfectly fine on UWP.
Nuget version 1.11.22 have the same problem too.

Hello @Jon,
Do you think you could provide a project sample with this issue?
It will help my developer investigate the issue more efficiently.
At this moment, I don't; think we can do anything with this request unless we have the content of respondContent to reproduce the issue
We now always ask for a project sample even if the issue is easy to reproduce. As a free product, we must find some way to save time to offer an overall better experience for everyone and release fixes faster.
You can send it to<EMAIL_ADDRESS>if you need to keep the source private
Best Regards,
Jonathan

Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Entity Framework Classic • Bulk Operations •  Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function

@JonathanMagnan Here is the sample project: https://github.com/ooikengsiang/HtmlAgilityPackStackOverflow

I've also ran into StackOverflow issues in 1.11.22, but after reading this post I downgraded to 1.11.18 and it all works fine again. Unfortunatly I don't have a simple reproducable project at the moment.

Hello @ooikengsiang , @mrjfalk ,
The v1.11.23 has been released.
This new version should fix the issue with the method GetAttributeValue that causes this StackOverflow Exception.
Let me know if everything works as expected with the latest version.

@JonathanMagnan v1.11.23 working as intended.
Thank you so much for the quick fix and update.

Thanks, fixed the bug for me as well :)


Possibly missing error reporting

I get status Failed for file-based transcriptions but there is no indication of what the cause is (in UI or logs). Running from main branch.

I didn't know the logs are written to file. This is what I get:
[2023-01-09 21:19:02,656] model_loader.download_model:102 DEBUG -> Downloading model from https://openaipublic.azureedge.net/main/whisper/models/65147644a518d12f04e32d6f3b26facc3f8dd46e5390956a9424a650c0ce22b9/tiny.pt to /home/user/.cache/whisper/tiny.pt
[2023-01-09 21:19:03,046] transcriber.run:611 DEBUG -> Starting next transcription task
[2023-01-09 21:19:03,046] transcriber.run:358 DEBUG -> Starting whisper file transcription, task = FileTranscriptionTask(file_path='/home/user/Music/Recording 6.ogg', transcription_options=TranscriptionOptions(language=None, task=<Task.TRANSCRIBE: 'transcribe'>, model=TranscriptionModel(model_type=<ModelType.WHISPER: 'Whisper'>, whisper_model_size=<WhisperModelSize.TINY: 'tiny'>, hugging_face_model_id=None), word_level_timings=False, temperature=(0.0, 0.2, 0.4, 0.6, 0.8, 1.0), initial_prompt=''), file_transcription_options=FileTranscriptionOptions(file_paths=['/home/user/Music/Recording 6.ogg']), model_path='/home/user/.cache/whisper/tiny.pt', id=827779, segments=[], status=<Status.QUEUED: 'queued'>, error=None)
[2023-01-09 21:19:03,632] transcriber.read_line:417 DEBUG -> whisper (stderr): /home/user/.cache/pypoetry/virtualenvs/buzz-DqnAh-gc-py3.10/lib/python3.10/site-packages/whisper/transcribe.py:78: UserWarning: FP16 is not supported on CPU; using FP32 instead
  warnings.warn("FP16 is not supported on CPU; using FP32 instead")
[2023-01-09 21:19:05,529] transcriber.read_line:417 DEBUG -> whisper (stderr):
[2023-01-09 21:19:05,530] transcriber.read_line:417 DEBUG -> whisper (stderr):
[2023-01-09 21:19:05,555] transcriber.run:380 DEBUG -> whisper process completed with code = 1, time taken = 0:00:02.508427, number of segments = 1
[2023-01-09 21:19:05,555] transcriber.run:591 DEBUG -> Waiting for next transcription task

It says whisper doesn't complete. One question then: is whisper output written to logs just as Buzz output or disregarded?

[2023-01-09 21:19:05,555] transcriber.run:380 DEBUG -> whisper process completed with code = 1, time taken = 0:00:02.508427, number of segments = 1

That's a bit weird that the process returned with code "1" but still had segments. I found this post which seems related: https://stackoverflow.com/a/67274925/9830227. Based on that, it looks like you can try either:

Adding this line to the if __name__ == "__main__" block:
multiprocessing.set_start_method('spawn')

Replacing this block in WhisperFileTranscriber:
    if self.current_process.exitcode == 0:
        self.completed.emit(self.segments)
    else:
        self.error.emit('Unknown error')

with:
    # Allow Linux to fail with exitcode 1
    if self.current_process.exitcode == 0 or (self.current_process.exitcode == 1 and platform.system() == 'Linux'):
        self.completed.emit(self.segments)
    else:
        self.error.emit('Unknown error')

is whisper output written to logs just as Buzz output or disregarded?

The Whisper output is written to logs (see the lines that start with "whisper (stderr)", except the output that prints out the progress bar and transcription text.

multiprocessing.set_start_method('spawn')

This one worked. (haven't tried the other one)

Likely not, I don't have a proper setup for it


chore: re-enable resume-upgrade action

I have tested the upgrade process, from a local charm of this PR refreshing to the same local charm, but the process does not seem to work.
In particular, after the first unit is upgraded successfully (and the Kafka process comes back up and running) the juju status shows:
Model  Controller  Cloud/Region        Version  SLA          Timestamp
tests  micro       microk8s/localhost  3.1.7    unsupported  21:46:57Z

App              Version  Status  Scale  Charm                     Channel      Rev  Address         Exposed  Message
...
kafka-k8s                 active      3  kafka-k8s                                1  <IP_ADDRESS>  no
...

Unit                Workload  Agent  Address      Ports  Message
...
kafka-k8s/0         active    idle   <IP_ADDRESS>
kafka-k8s/1         active    idle   <IP_ADDRESS>
kafka-k8s/2*        active    idle   <IP_ADDRESS>
...

The other units have surely not upgraded, as also shown by the databag that shows:
...
 relation-id: 2
    endpoint: upgrade
    related-endpoint: upgrade
    application-data:
      dependencies: '{"kafka_service": {"dependencies": {"zookeeper": ">3.6"}, "name":
        "kafka", "upgrade_supported": "^3", "version": "3.6.0"}}'
      upgrade-stack: '[0, 1]'
...

But the real problem is that I'm now stuck since I cannot resume the upgrade anymore, as running the action
❯ juju run kafka-k8s/leader resume-upgrade --format yaml                                                        ubuntu@ip-172-31-28-106
Running operation 17 with 1 task
  - task 18 on unit-kafka-k8s-2

Waiting for task 18...
kafka-k8s/2:
  id: "18"
  message: Upgrade can be resumed only once after juju refresh is called.
  results:
    return-code: 0
  status: failed
  timing:
    completed: 2024-02-19 21:49:59 +0000 UTC
    enqueued: 2024-02-19 21:49:56 +0000 UTC
    started: 2024-02-19 21:49:56 +0000 UTC
  unit: kafka-k8s/2

Attaching the bundle export of my tests environment.
bundle-test-k8s-upgrades.txt


[WIP]: Move to using files for EK CA certs

I had a look at issue https://github.com/keylime/keylime/issues/218 and plotted something together just to replace the statically defined certs by loading the files into the same dict. I'd be happy to receive some feedback on how to implement this and make it conform with the rest of the codebase.
@lukehinds

This looks great, thanks @amylily1011 !
Do we also need to include the new certificates directory in the setup process now to ensure these certs will be included, @lukehinds ?
https://github.com/keylime/keylime/blob/a300a3d9818b0e306e61d734cb26911c09d21ccb/setup.py#L102
Also, we should be able to leave out the .auditing-0, NVChip, and  testdata.sqlite files for the PR.

This looks great, thanks @amylily1011 !

Agree, thanks @amylily1011

Do we also need to include the new certificates directory in the setup process now to ensure these certs will be included, @lukehinds ?
https://github.com/keylime/keylime/blob/a300a3d9818b0e306e61d734cb26911c09d21ccb/setup.py#L102

That's a good point. I expect we do, as we will want these to be included in the packaging.

Also, we should be able to leave out the .auditing-0, NVChip, and  testdata.sqlite files for the PR.

hi @amylily1011
Got this working against a HW tpm. Here are the changes I recommend.
Put all the same certificates into a folder in the root of the repository tpm_cert_store.
Regarding the atmel_trusted_keys, you can put those into individual files, for example
$ cat ATM6.pem

C3DB3DCA4A60CC7D418ABCFC25598773F8D7352685B0341833D85C4B7E75DCFEDAAD     2FABFE6BAC994A9F7726D8FC643CF98A8003A219ABEC65199ED65049B1BE8FC79679BF1508F77A96460F7AEE0299BEF1D2D5E     07BECE118D9092F1C7E9911672821FA745DAD9DDA0306518D06E1BE5F26009390D91A7D00D699333623ADEEDA764BAA2050DA     F379CA827E1790C21FB7E32D84EBDC318999B522FAE20BC0359ECF8ABC81D9C3214BED3200C18AFCEAA6D042C8464F30A8047     F977B71455C68404A80F5F064D9BBC63625AF6BDD9C87108BA445FDF827195AF51E1FA529E5AD840F1C3C060C44D0BEACAA32     0D5A7DAE374C7B8E52B2B20F97132A3BA94A4C45

Don't worry about exponent  etc, we don't use those keys.
tpm_ek_ca.py
import configparser
import glob
import os
from keylime import common

config = configparser.RawConfigParser()
config.read(common.CONFIG_FILE)

trusted_certs = {}

tpm_cert_store = config.get('tenant', 'tpm_cert_store')

def cert_loader():
  file_list = glob.glob(os.path.join(os.getcwd(), tpm_cert_store + "/*.pem"))
  trusted_certs = []
  for file_path in file_list:
      with open(file_path) as f_input:
          trusted_certs.append(f_input.read())
  return trusted_certs

keylime.conf
Add the following to the [tenant] section
# EK certificate storage location
tpm_cert_store = /var/lib/keylime/tpm_cert_store

For both tpm2.py and tpm1.py the whole of the verify_ek function will now look like this
    def verify_ek(self, ekcert, ekpem):
        """Verify that the provided EK certificate is signed by a trusted root
        :param ekcert: The Endorsement Key certificate in DER format
        :param ekpem: the endorsement public key in PEM format
        :returns: True if the certificate can be verified, false otherwise
        """
        #openssl x509 -inform der -in certificate.cer -out certificate.pem
        try:
            ek509 = M2Crypto.X509.load_cert_der_string(ekcert)
            ekcertpem = ek509.get_pubkey().get_rsa().as_pem(cipher=None).decode('utf-8')

            # Make sure given ekcert is for their ek
            if str(ekpem) != str(ekcertpem):
                logger.error("Public EK does not match EK certificate")
                return False

            trusted_certs = tpm_ek_ca.cert_loader()
            for cert in trusted_certs:
                signcert = M2Crypto.X509.load_cert_string(cert)
                signkey = signcert.get_pubkey()
                if ek509.verify(signkey) == 1:
                    logger.debug("EK cert matched cert: ", cert)
                    return True
        except Exception as e:
            # Log the exception so we don't lose the raw message
            logger.exception(e)
            raise Exception("Error processing ek/ekcert. Does this TPM have a valid EK?").with_traceback(sys.exc_info()[2])

        logger.error("No Root CA matched EK Certificate")
        return False

If you commit these changes I will test again, and we can then update the installers to set up the tpm_cert_store

Don't worry about exponent etc, we don't use those keys.

It looks like they're all using the common exponent of 65537 (or 10001 in hex) anyways, so we can just hard-code this into the code (we're dropping support for TPM 1.2 eventually, so this probably doesn't need to be flexible).
Note that these are not PEM certificates, they are the modulus n and exponent e values of the RSA key.  It might be good to name them something other than .pem to avoid confusion.
We will also need to keep this code for TPM 1.2 if we want to use them:
https://github.com/keylime/keylime/blob/22a9789e25a36a9b8d0a69a679de63125a2d1fca/keylime/tpm1.py#L515-L520

Note that these are not PEM certificates, they are the modulus n and exponent e values of the RSA key. It might be good to name them something other than .pem to avoid confusion.

@jetwhiz , please go ahead and make a suggestion for a file extension.

Note that these are not PEM certificates, they are the modulus n and exponent e values of the RSA key. It might be good to name them something other than .pem to avoid confusion.

@jetwhiz , please go ahead and make a suggestion for a file extension.

Should we just leave them in the dictionary in tpm_ek_ca.py?   They will need to be treated specially anyways if we pull them out into a file, since we will have to use the modulus ("key") and exponent to rebuild the public RSA key.
In the future, we can just strip those lines out of tpm_ek_ca.py when we want to drop support for TPM 1.2 (rather than juggling a bunch of files and special code).

Note that these are not PEM certificates, they are the modulus n and exponent e values of the RSA key. It might be good to name them something other than .pem to avoid confusion.

@jetwhiz , please go ahead and make a suggestion for a file extension.

Should we just leave them in the dictionary in tpm_ek_ca.py? They will need to be treated specially anyways if we pull them out into a file, since we will have to use the modulus ("key") and exponent to rebuild the public RSA key.
In the future, we can just strip those lines out of tpm_ek_ca.py when we want to drop support for TPM 1.2 (rather than juggling a bunch of files and special code).

Sounds good to me.

@lukehinds done! :-) Fingers crossed.

@lukehinds done! :-) Fingers crossed.

yay!
I hope your laptop is feeling better now. Maybe send it to a health spa for the weekend :)
Will take a look at this sometime over this weekend. Great work, it was a challenging patch to take on and you have nailed it!


Allow filename autocomplete to match against files that aren't part of git repo

Hi, I just created some new files and aider does not "see" them. Autocompletion finally works but maybe it only shows files from git? That would be undesirable since we are developing...
Aider v0.23.0
Model: gpt-4-1106-preview using udiff edit format
Git repo: .git with 35 files
Repo-map: using 1024 tokens

never mind, I was looking at a clone ;p

Yeah, it only sees stuff in github, which defeats the point of being in dev mode and creating new files and tests for those ;(

Thanks for trying aider and filing this issue.
Sorry, can you be more clear about the problem you are having with new files? Aider certainly allows you or GPT to create new files.
See the transcript below for examples, which does the following:

Makes a new dir with a new git repo, all empty.
Launches aider with a new file called hello.py on the cmd line. Asks aider to make it print hello world.
Uses /add goodbye.py to add another new file to the chat, and then make it print goodbye.
Asks GPT to create another new file bonjour.py and make it print hello world in French.

$ mkdir newfiles
(aider) macbook:~/tmp$ cd newfiles/

(aider) macbook:tmp/newfiles$ git init
Initialized empty Git repository in /Users/gauthier/tmp/newfiles/.git/

(aider) macbook:tmp/newfiles$ aider hello.py
Aider v0.24.1-dev
Model: gpt-4-0613 using diff edit format
Creating empty file /Users/gauthier/tmp/newfiles/hello.py
Git repo: .git with 0 files
Repo-map: using 1024 tokens
Added hello.py to the chat.
Use /help to see in-chat commands, run with --help to see cmd line args
──────────────────────────────────────────────────────────────────────────────────────────
hello.py> print hello world

To print "Hello, World!" in Python, we need to modify hello.py:

 1 Add a print statement to hello.py.

Here is the SEARCH/REPLACE block:

hello.py

 <<<<<<< SEARCH
 =======
 print("Hello, World!")
 >>>>>>> REPLACE

Applied edit to hello.py
Commit 7372f99 aider: Added print statement to hello.py.
──────────────────────────────────────────────────────────────────────────────────────────
hello.py> /add goodbye.py

No files matched 'goodbye.py'. Do you want to create /Users/gauthier/tmp/newfiles/goodbye.py? y
Added /Users/gauthier/tmp/newfiles/goodbye.py to the chat
────────────────────────────────────
goodbye.py hello.py
> print goodbye

To print "Goodbye" in Python, we need to modify goodbye.py:

 1 Add a print statement to goodbye.py.

Here is the SEARCH/REPLACE block:

goodbye.py

 <<<<<<< SEARCH
 =======
 print("Goodbye")
 >>>>>>> REPLACE

Applied edit to goodbye.py
Commit bae2185 aider: Added print statement to `goodbye.py`.
────────────────────────────────────
goodbye.py hello.py
> make a new file call bonjour.py that says hello world in french

To create a new file bonjour.py that prints "Hello, World!" in French, we need to:

 1 Create a new file bonjour.py.
 2 Add a print statement to bonjour.py that prints "Bonjour, le monde!".

Here is the SEARCH/REPLACE block:

bonjour.py

 <<<<<<< SEARCH
 =======
 print("Bonjour, le monde!")
 >>>>>>> REPLACE

Allow creation of new file bonjour.py? y
Applied edit to bonjour.py
Commit 1c59cf7 aider: Create a new file `bonjour.py` that prints "Bonjour, le monde!".
────────────────────────────────────

I think I can clarify a little bit. @Morriz, let me know if I've got the wrong idea.
I use tmux, but this also happens when I use two terminals. I keep aider running in one window and use a second window to edit and create files.
$ aider testfile1.txt
Aider v0.24.1
Model: gpt-4-0613 using diff edit format
Git repo: .git with 0 files
Repo-map: using 1024 tokens
Added testfile1.txt to the chat.
Use /help to see in-chat commands, run with --help to see cmd line args
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
testfile1.txt
>

In a second window, I create a new file.
$ echo "second testfile" > testfile2.txt

Go back to aider and try to add it.
> /add test<TAB>

No file shows up in tab completion, but if I type out the fqfn /add testfile2.txt, the file is added to the context.
The problem I have is that when I create a new file in subdirectories. It's kind of a pain to have to type out the whole path. Especially when short-term memory sucks mud. :)

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

why did you close this? it is like @harleypig also describes...can you reopen this or at least tell us why you would close it?

It's a minor issue. It's not that file won't load, it's just that the autocomplete won't see it. You could use aider to try and fix it and submit a pr. :)

Ok, it sounds like you want autocomplete to match against files that are not part of the git repo.
Currently, autocomplete intentionally only matches against the git repo files. There are good reasons for that, as well as a reasonable argument for the change you are requesting.
I'll leave this issue open as an enhancement request.

I really want this. I often create new files and want to add them to aider before adding them to git. I don't use aider's git committing features at all.

yeah, why the forced git approach?


Can not read property index of undefined

Hello! When loading a model (http://openifcmodel.cs.auckland.ac.nz/_models/23111022_IFCR2_Buildings_1.ifc), I received an error in developer's console window:

.

Did you resolve it?

Hello! When loading a model (http://openifcmodel.cs.auckland.ac.nz/_models/23111022_IFCR2_Buildings_1.ifc), I received an error in developer's console window:

.

Hey, sorry, I went on vacation and missed this. I'll take a look these days!

Hey, sorry, I went on vacation and missed this. I'll take a look these days!

Can you help with export?
I generated mesh by threejs and i need to export in IFC format. Do you know, mb, can i do that?

@Vladres sure. In the future, please try to keep the conversation of each issue inside that thread.


⚠ Processors has degraded performance

In 3f395c4, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 64 ms

Resolved: Processors performance has improved in fc2d6f2.


thanks: Add C. Michael Pilato

Ping @cmpilato
Thanks for your contributions to PG! Mostly the performance ones.
As a thanks I want to mention you on the thanks page on the PG website.
Would it be OK for you?

Thanks, will merge!

Done!


🐇 Add a basic fuzz target

This adds a fuzz target to ensure that parsing doesn't panic
If you wanted to get a bit fancier and had some code for rendering the document back to a string then you could fuzz the full parse -> render -> parse and then check if the tables from both parses are equivalent to ensure semantic equivalence

Thinking on it more I think adding another target for comparing the parsed value to toml-edit would be better than a parse -> render roundtrip

This adds a fuzz target to ensure that parsing doesn't panic

Nice! Thanks so much for contributing this.

Thinking on it more I think adding another target for comparing the parsed value to toml-edit would be better than a parse -> render roundtrip

Yeah, we could definitely have toml-edit as a dev dependency and do this.

Edit: eh that would require us following strict compliance with the spec which I now see listed as a non-goal

I made that a non-goal only because I was anticipating maintaining and developing this most alone. If you're going to continue contributing, we can definitely make it a goal, as long as it doesn't conflict with the other goals, especially to keep the crate simple and small.

I can address all your comments after I'm off work

I can address all your comments after I'm off work

No!

Squashed and fuzzy emoji added

If you're going to continue contributing, we can definitely make it a goal, as long as it doesn't conflict with the other goals, especially to keep the crate simple and small.

I'd be willing to help maintain this crate. I've still got more PRs planned anyways :grin:

It would be great to have this run as part of the CI, like I'm doing for zvariant subcrate of zbus here. I'd prefer it if you could already do that as part of this PR (obviously this would mean we must fix all issues we find through fuzzing before merging this PR but I'm ok with that) but I'm also fine with doing that in a follow-up PR. Up to you.

Sure I can add that to this PR :+1:
I didn't find any crashes beyond #9 after working around #9 and #8 to fuzz for around a 100 million iterations

Squashed and fuzzy emoji added

Thanks but the emoji needs to be one of the curated ones. That's why I recommend using one of the two methods. The point of the emoji is not just so it looks cute and nice (that's a bonus :smile:) but rather making it easy for highly-visual folks like me to read and search through the git log and release notes created out of the git log.
Having said that, we don't exactly seem to have a specific emoji for fuzzing and :rabbit: is a great choice. I'll add it to the gimoji list.

If you're going to continue contributing, we can definitely make it a goal, as long as it doesn't conflict with the other goals, especially to keep the crate simple and small.

I'd be willing to help maintain this crate. I've still got more PRs planned anyways 😁

That's very great to hear. In that case, I'm more than happy to remove strict compliance with the spec from our non-goals.

Sure I can add that to this PR 👍

Nice!

I didn't find any crashes beyond #9 after working around #9 and #8 to fuzz for around a 100 million iterations

Cool. I also didn't see many unwraps used in the parser so that makes sense. I'll try to fix #9 today along with un-ignoring some of the related tests.

Should be ready for another review :)

I think it's fine merging this already. #8 can cause the fuzzing to slow down a lot, but it won't cause failures which I think is fine


PyMongo 4.4.0 causes openedx to crash

We know that aspects v1.0.2 will use "platform-plugin-aspects==v0.9.7" and "edx-event-routing-backends==v9.2.1" and will add them in openedx-dockerfile-post-python-requirements patch
https://github.com/openedx/tutor-contrib-aspects/blob/306fe4467d86f3eb0e85495d55eecee963abe3e5/tutoraspects/patches/openedx-dockerfile-post-python-requirements#L1-L5
After installing aspects==1.0.2, weirdly, pymongo v4.4.0 will install and it causes a crash in lms and cms.
*** Operational MODE: preforking ***
Traceback (most recent call last):
  File "lms/wsgi.py", line 25, in <module>
    modulestore()
  File "/openedx/edx-platform/xmodule/modulestore/django.py", line 331, in modulestore
    contentstore(),
  File "/openedx/edx-platform/xmodule/contentstore/django.py", line 29, in contentstore
    _CONTENTSTORE[name] = class_(**options)
  File "/openedx/edx-platform/xmodule/contentstore/mongo.py", line 44, in __init__
    mongo_db = connect_to_mongodb(
  File "/openedx/edx-platform/xmodule/mongo_utils.py", line 72, in connect_to_mongodb
    mongo_conn.authenticate(user, password, source=auth_source)
  File "/openedx/venv/lib/python3.8/site-packages/pymongo/collection.py", line 3217, in __call__
    raise TypeError(
TypeError: 'Collection' object is not callable. If you meant to call the 'authenticate' method on a 'Database' object it is failing because no such method exists.

I'm fully aware that in the requirements of edx-event-routing-backends==v9.2.1 and event-tracking==2.3.2, pymongo 3.13.0 is specified.
https://github.com/openedx/event-routing-backends/blob/980b2aa264261430c5b8dfaeea70c02d44e5e08a/requirements/base.txt#L148
You can reproduce this by installing "edx-event-routing-backends==v9.2.1" in a new environment.
root@pubnito-nightly:/tmp/aspects# virtualenv -p python3 .venv
root@pubnito-nightly:/tmp/aspects# source .venv/bin/activate
(.venv) root@pubnito-nightly:/tmp/aspects# pip install "edx-event-routing-backends==v9.2.1"
(.venv) root@pubnito-nightly:/tmp/aspects# pip freeze | grep pymongo
pymongo==4.4.0

I see that event-tracking==2.4.1 is installed instead of 2.3.2 which makes it more vague.
(.venv) root@pubnito-nightly:/tmp/aspects# pip freeze | grep event-track
event-tracking==2.4.1

also, here is the pipdeptree for pymongo
(.venv) root@pubnito-nightly:/tmp/aspects# pipdeptree --reverse --packages pymongo
pymongo==4.4.0
├── edx-opaque-keys==2.10.0 [requires: pymongo]
│   ├── edx-ccx-keys==1.3.0 [requires: edx-opaque-keys>=2.0.0]
│   │   └── openedx-events==9.11.0 [requires: edx-ccx-keys]
│   │       └── event-tracking==2.4.1 [requires: openedx-events>=9.5.1]
│   │           └── edx-event-routing-backends==9.2.1 [requires: event-tracking>=2.3.2]
│   └── openedx-events==9.11.0 [requires: edx-opaque-keys]
│       └── event-tracking==2.4.1 [requires: openedx-events>=9.5.1]
│           └── edx-event-routing-backends==9.2.1 [requires: event-tracking>=2.3.2]
└── event-tracking==2.4.1 [requires: pymongo>=4.0.0,<4.4.1]
    └── edx-event-routing-backends==9.2.1 [requires: event-tracking>=2.3.2]

Yee the problem is with the event-routing-backends/requirements/constraints.txt that uses event-tracking>=2.3.2 . By this way pip will automatically install the latest event-tracking package which is 2.4.1 now. the problem is the difference between 2.4.1 & 2.4.0 which they upgraded the pymongo package from 3.13.0 to 4.4.0. I will create a PR on event-routing-backends project and put the link here.

I think the edx-lint fix is probably the best one until the edx-platform changes lance. Other projects are going to also pick up this change otherwise, and better to have one place to update later.

I will close this issue as this was already pinned in edx-lint


[ScrollView] Scrolling in both directions (horizontally and vertically) stops working on 0.28.0

Hi!
My app needs to scroll both, horizontally and vertically, basically its a big canvas where you can draw, put objects, move them, etc. I was using horizontal={true} but now I upgrade to 0.28.0 and it doesn't work anymore. It just scrolls horizontally (makes sense, I think) but it doesn't scroll vertically anymore.

This still broken on 0.29.0 :(

:+1:

+1

+1

this probably related to https://github.com/facebook/react-native/issues/8369

Yes! Thanks!
Setting the contentContainerStyle with a fixed size works in my case. But I don't think it'll work if you don't know the size of the content.

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/scrollview-scrolling-in-both-directions-horizontally-and-vertically-stops-working-on-0280
Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix.

solved
here is currently not a direct way to achieve this. If setting contentContainerStyle prop is not a problem for you, you can go that way. If it is, you can always use 2 nested ScrollViews.         {this.buildContent()}
-- | --


Is the target_sources accumulated for shared libraries??

From CMakeLists.txt,
option(SPIRV_CROSS_SHARED "Build the C API as a single shared library." ON) seems to tell, if I wanna build a SHARED library, it will combine everything into a single library???
However, for instance, line 355~358 of CMakeLists.txt,
if (SPIRV_CROSS_ENABLE_GLSL)
		target_sources(spirv-cross-c-shared PRIVATE ${spirv-cross-glsl-sources})
		target_compile_definitions(spirv-cross-c-shared PRIVATE SPIRV_CROSS_C_API_GLSL=1)
	endif()

is the target_sources accumulated?
I tested and it seems for SHARED libraries, if we build a section, say: SPIRV_CROSS_ENABLE_GLSL, then, I cannot build another section SPIRV_CROSS_ENABLE_MSL at the same time, which is NOT as convenient as static  ?????
Am I right??
Cheers

target_sources in CMake is accumulative, yes. Not sure exactly what the question is. You can build everything (GLSL/MSL/HLSL/etc) into the shared library.

Doesn't seem like there are further actions, so closing.


Generalize IntoWeightedEdge from Copy to Clone

Hm why is this? The ix types are always Copy

It's a first step towards a plan to generalize the whole library in the same way.  Is that not desired?

I don't think so, I went from clone to copy for GraphBase::NodeId in 0.3 or 0.4.

Oh, ok!  I'll close this then.  :)


Update Google.Protobuf version in Unity package

Context
I am using the grpc unity package in my project. I generate my C# protos outside of unity with bazel using the latest protoc/grpc versions and import them into my project. Recently, I ran into an issue where the generated code was not compatible with the latest grpc-unity package. Here's an example of the error I saw:
error CS1729: 'GeneratedClrTypeInfo' does not contain a constructor that takes 7 arguments

After some digging, I found that this PR (and maybe others) changed the API of the generated code so the packaged Google.Protobuf version in the unity package is not compatible with code files generated with the latest code generation plugins.
Is it possible to update the unity package to use the latest versions?
Thanks for your help!
@jtattermusch

I am planning to upgrade  protobuf in our repository soon, but for your use case, the only thing you need to do is to make sure that you're using compatible versions of protoc, grpc_csharp_plugin and the Google.Protobuf runtime.  This should be pretty easy to achieve.

https://github.com/grpc/grpc/pull/21590

#21590 has been merged for a while, which should have fixed the problem.


iOS 15 breaks this Application

While the application does not error out, When choosing to send link via email, message or teams, only the keyboard appears, it is not possible to share the link. Additionally, this repo is using code that several methods are depreciated - modifyRecordsCOmpletionBlock, fetchRecordZoneChangesCompletionBlock for example. https://highstrungpro.com/wp-content/uploads/Screen-Shot-2021-10-22-at-8.55.37-AM.png please fix

https://stackoverflow.com/questions/69868944/uicloudsharingcontroller-does-not-display-work-with-cloudkit-app/71191346#71191346
I managed to find a way to fix that issue. But I don't understand it, so not submitting a pull request.


Execute macro problem

Steps to reproduce,

ctrl-x, ( -- Start recording the macro
ctrl-x, ) -- End recording the macro
ctrl-x, e  -- Added ), closing bracket, instead of execute the macro, undo 2 times, and you get the macro
Same problem for execute macro for N times, just that undo N*2 times.

What OS are you using?

Same problem. I'm on Debian Linux, Atom 1.12.5, atom-keyboard-macros 0.9.2

Workaround is to set "one-level" key bindings. I set it like this:
    'ctrl-[': 'atom-keyboard-macros:start_kbd_macro'
    'ctrl-]': 'atom-keyboard-macros:end_kbd_macro'
    'ctrl-;': 'atom-keyboard-macros:call_last_kbd_macro'

@Michal-Mikolas,
The work around doesn't seem to work:
'atom-workspace':
  'ctrl-[': 'atom-keyboard-macros:start_kbd_macro'
  'ctrl-]': 'atom-keyboard-macros:end_kbd_macro'
  'ctrl-;': 'atom-keyboard-macros:call_last_kbd_macro'

I have the same problem. Arch Linux.
$ atom --version
Atom    : 1.14.1
Electron: 1.4.15
Chrome  : 53.0.2785.143
Node    : 6.5.0

I rebound the macro commands to function keys, which is a workaround for now, but am happy to provide more information to help diagnose this so it can be fixed.

I have the same problem. Ubuntu 16.0.4
Atom    : 1.14.1
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0

Same here, Ubuntu 16.04.

Atom    : 1.14.4
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0

Same problem here, Mac OS X 10.11. Atom: 1.15.0.

Same Problem  Windows 10,
Atom: 1.15.0 x64
atom-keyboard-macros: 0.9.2

workaround that works for me (win 10)
'atom-workspace':
'ctrl-{': 'atom-keyboard-macros:start_kbd_macro'
'ctrl-}': 'atom-keyboard-macros:end_kbd_macro'
'ctrl-"': 'atom-keyboard-macros:call_last_kbd_macro'


After upgrading to latest release extensions can not find correct workspace root

I pulled in the latest changes in my vim pack directory (using vim8's plugin method), and now extensions like coc-vetur and coc-prettier can not find the correct workspace root for my projects.  If a file is opened directly it seems to work fine, but if I open a file in another buffer or tab when a file is open that is not in the project then this happens.  For example, if I have a file in ~/dirA open, and then try to open another file in ~/dirA/projectDir, then coc-veture looks in ~/dirA for the package.json file, but of course that isn't where it is.  It does not find the package.json file in ~/dirA/projectDir.

Sorry, this was supposed to be on coc.nvim.  Not here.


vsce publish fails due to linting issue

VSCode Version: 1.4
OS Version: OSX

I have an extension (https://github.com/cfjedimaster/htmlescape-vscode) that I'm trying to publish to the store. It tests fine in Code, but when I vsce publish, I get:
Executing prepublish script 'node ./node_modules/vscode/bin/compile'...
Error: Command failed: node ./node_modules/vscode/bin/compile
Ok, it would be nice if it told me the error (grin), so I tried running the command directly:
src/extension.ts(112,9): error TS4091: Loop contains block-scoped variable 'editor' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher.
So... I have something that works in Code, but isn't allowed by vsce?

Duplicate of Microsoft/vscode-vsce#111
As for the error itself, vsce just calls node compile, so ping @bpasero


requirement versions (tensorflow 1.15.0)

As I cannot launch the binary version I'm trying to make it from source..
But one problem remain.
setup.py requires a 1.15.0 maximum version of tensorflow .. which is not available with pip..
Can we use current version of TF ?
If not, is there a way to bypass the problem ?

You need to use python <=3.7. It seems you are using python 3.8

Here are my configurations. And it's under Python3.6.5

For the record, following docker image works for me:
docker pull tensorflow/tensorflow:1.15.5-gpu

Only need to install this if there is an error.


Wearable backpacks issue.

Hey there!
I love your mod guys!
Could you add compatibility with wearable backpacks?
Basically after installing the mod the backpack is invisible when you wear it.
https://minecraft.curseforge.com/projects/wearable-backpacks

I worked directly with the WearableBackpacks people, and we sorted the issue out on both sides, so whenever Mo' Bends 1.0.0 comes out, it will be fixed 😄


Print Active Inventory or Item

Print Active Inventory or Item

allow user to print the values associated with an individual item
allow user to print the whole active inventory with each item's associated values

Also add a searchByCategory function that prints all items of the given category.


[Feature] Add a readmore component

Objective
First draft of a readmore component.
To do

[ ] Add an option to enter one content and crop it
[ ] Add the length to which it should be cropped
[ ] Animate the reveal
[ ] Add an option to not use the animate
[ ] Be sure that the component is abstract and reusable.
[ ] Add documentations

Nice !


throw error if a migration method doesn't return a thenable

Although the README says that

In order to allow asynchronicity, tasks have return a Promise object which provides a then method

In actuality, tasks that don't return a Promise succeed and can cause intermittent failures if something else is writing to the database at the same time (since umzug can't wait for the operations in the task to finish).  I just discovered yesterday that I wasn't returning Promises from my migration tasks (because I hadn't RTFM...), and now I know why I had seen inconsistent migration behavior in the past.
This PR at least throws an error whenever a task doesn't return a thenable object, so that devs will find out immediately if they make this mistake.

I agree, that sometimes guiding a user a little bit is nice, especially if it can have strange race conditions like here. Still this is changing the behaviour of a existing version, so will include it in the next minor release.
It looks good to me, I will merge it, when I have some spare time.
Thanks for contributing!

@PascalPflaum I think according to semver this probably qualifies as a breaking change, even though not returning promise is incorrect usage of umzug.

I thought about that as well, but I will thread it as minor. In my eyes it is not a breaking change because not returning a promise leads to errors and is against the documentation. It results in errors before and will result in errors afterwars, but a verbose error, not based on race conditions.
The only alternative I see is to add a deprecation warning in 2.2.x and throw a error in 3.x.

Yeah, that's a good point.  Some people may have to make code changes but it will help them unbreak what was already broken.