insert update upsert from query

This PR adds the final piece of some changes to BaseBuilder.
This adds the ability to insert, update, upsert from a query rather than a set of data.
Much of the required pieces of this PR were already in place.
Checklist:

[x] Securely signed commits
[x] Component(s) with PHPDoc blocks, only if necessary or adds value
[x] Unit testing, with >80% coverage
[x] User guide updated
[x] Conforms to style guide

@codeigniter4/database-team This is the last major piece for now. Please review.

Perhaps it might be better to not pass a query through the $set parameter of th *Batch() methods and rely on using the fromQuery() method only. The $set parameter is really the same as in setData().

It should be noted that this design works on the assumption that the columns in the query are aliased to match those of the target table. While SQL usually works based on position and doesn't require the column names to match it is usually good practice as queries are much more readable. It also makes it much simpler to handle an upsert scenario where the target and source share the same name.. otherwise the developer would have to map them separately.

Example:
This is valid SQL:
INSERT INTO pageview (user_id, user_name, last_view)
SELECT id, name, created_date
FROM user
ON DUPLICATE KEY UPDATE
SET user_id = VALUES(id),
user_name = VALUES(name),
last_view = VALUES(created_date)

The problem with this is that the fields would have to be mapped: user_id => id
This PR will assume this is done like:
INSERT INTO pageview (user_id, user_name, last_view)
SELECT id AS user_id, name AS user_name, created_date AS last_view
FROM user
ON DUPLICATE KEY UPDATE
SET user_id = VALUES(user_id ),
user_name = VALUES(user_name ),
last_view = VALUES(last_view )

This way the mapping is done in SQL and allows to easily generate the SQL statements. The code will parse the field names from the select statement and use them to generate the other parts of the statement.

Sorry, we reorganized the changelog v4.3.0.
Please rebase.

It seems we should not support the following:
$query = 'SELECT user2.name, user2.email, user2.country
          FROM user2
          LEFT JOIN user ON user.email = user2.email
          WHERE user.email IS NULL';
$sql = $builder->ignore(true)->fromQuery($query)->insertBatch();

Because QueryBuilder is what builds queries.
And it requires to parse SQL statement, but it is not good way.

I have found that QueryBuilder doesn't produce reliable column names either if you use aliases and other complicated sql. A lot of the queries I use in this situation are very complicated and are difficult to replicate in QueryBuilder.
I challenge you to break my query parser. You can use subqueries, aliases, even multi word column names with any escape character. The one thing it wont accept is the wildcard *.

Even if you need to pass a raw query to QueryBuilder, it is sufficient that we can pass RawSql.
QueryBuilder is database abstraction. We should not accept parameters that cannot run on other DBMS.
But the exceptions are RawSql (and $escape = false).

I have found that QueryBuilder doesn't produce reliable column names either if you use aliases and other complicated sql. A lot of the queries I use in this situation are very complicated and are difficult to replicate in QueryBuilder.

Can you show a few example?

QueryBuilder is database abstraction. We should not accept parameters that cannot run on other DBMS.

I don't follow what your trying to say. The method excepts a string of sql. this string can be for any DBMS. The RawSql gets converted to a string so why not just accept a string?

Can you show a few example?

Surely you need to pass raw SQL statements.

I think your confusing QueryBuilder with the code the developer writes. Yes, sometimes you may want your code to be portable but not always. I mean what is the point of the query() method then? Sometimes you need to bend the rules. My method allows you both ways.
I can't remember how exactly but I one came across a special join that wasn't doable with QueryBuilder. I wish I knew where that code is..
When I have long complicated queries I build them in a program called Navicat. I do lots of testing and tweaking until I get what I need. Then when they get so complicated I don't have the time to try and replicate them in QB. My code sits behind a firewall and is mostly only executed by me. Sql injection is not an issue. Sometimes it just saves a lot of time to run raw queries. Other code I maintain is public facing and I use QB. The SQL is much simpler though.

I challenge you to break my query parser. You can use subqueries, aliases, even multi word column names with any escape character. The one thing it wont accept is the wildcard *.

QB may not support the column name:
    public function testColumnWithQuote()
    {
        $builder = new BaseBuilder('test', $this->db);

        // `my"colum` is a column name.
        $sql = <<<'SQL'
                SELECT
                    "my""colum"
                FROM
                    test_table
            SQL;

        $query = $builder->testMode()->fromQuery(new RawSql($sql))->insertBatch();

        $expected = 'INSERT INTO "test" ("my""colum")';

        $this->assertStringContainsString($expected, $query);
    }

A bit more realistic:
    public function testWithComment()
    {
        $builder = new BaseBuilder('test', $this->db);

        $sql = <<<'SQL'
                SELECT
                    id -- , test
                FROM
                    test_table
            SQL;

        $query = $builder->testMode()->fromQuery(new RawSql($sql))->insertBatch();

        $expected = 'INSERT INTO "test" ("id")';

        $this->assertStringContainsString($expected, $query);
    }

Ok, I changed fieldsFromQuery() to use the DBMS. I had forgot about comments and making exceptions for this would get much more complicated. I was trying to avoid running the query to get the column names because a lot of the time I do these sorts of operations my queries are very complicated and sometimes they take 20 or 30 seconds to run. Now they will have to run twice, else we could allow the developer to manually specify the columns. I like the ease of use not having to manually specify columns though. I suppose we could make it an option to specify names else get them automatically.

How about:
$builder->setQuery($query)->insertBatch();

In this case it is the alternative to setData().

An immense amount of work! Checking in on the schedule: if we shoot for 4.3 release today or tomorrow does this have any hope of being ready?

I think not.
I am not sure if we can merge this yet. We need input from other members.

I removed use of setAlias().
What else?
Any chance of getting this or https://github.com/codeigniter4/CodeIgniter4/pull/6734 in 4.3? What can I do to get this moving along?

I have t paid as much attention to these, but aren't they pretty much required for 4.3 because of the previous PRs? I don't want to create a scenario where this work becomes a breaking change because we released something too fast.

I would like to defer this PR to 4.4. I still think it is strange to setQuery to the QueryBuilder.
We need more discussion, more people eyes.

I agree. Looking forwards to more opinions on this.
@MGatner As I recall, the only problem with setAlias() was that it is a public method. Kenjis already took care of it in a separate PR: #6871. So there should be no problems.

Sounds good to me. Thanks for the team input. Once 4.3 is settled I can take a proper look as one of those set of 👀

I changed fromQuery() to setDataAsQuery() as discussed.
I also added the use with deleteBatch()
Any chance on getting this moving along now?

Since setAlias() problem is resolved, and I think we all agreed on the name setQueryAsData() - I see no other issues here.
This PR doesn't change anything else.

@kenjis anything else? Do you think we could get this into 4.3?

If I specify two queries as follows, how should QueryBuilder behave?
$builder->setQueryAsData($query1)->onConstraint('email')
->updateFields($additionalUpdateField, true)->upsertBatch($query2)

If I specify two queries as follows, how should QueryBuilder behave?
$builder->setQueryAsData($query1)->onConstraint('email')
->updateFields($additionalUpdateField, true)->upsertBatch($query2)

I think this is pretty straightforward - this would be the equivalent of:
$builder->setQueryAsData($query1)->setQueryAsData($query2)->onConstraint('email')
->updateFields($additionalUpdateField, true)->upsertBatch();

So only $query2 would be used.
The same story is with onConstraint(). It also can be set via upsertBatch() or deleteBatch().
But... from the other side, *Batch() methods would be the only ones that allow this type of data, leading us to inconsistency. From that point of view, I think I agree with @kenjis. BaseBuilder and RawSql as a parameter should be treated as special cases and allowed to be set via a dedicated method only.

I think that the singularity of the method's name suggests that it can only be used once. Its not setQueriesAsData().
I have removed the BaseBuilder and RawSql inputs from $set parameter in *Batch() methods. I agree that it is a special use case and should not be included. The parameter types should mirror that of setData() and not setQueryAsData().

🥳🎉🎊🕺


feat: refund orders CyberSource [WIP]

Pre-Flight checklist

[ ] Screenshots and design review for any changes that affect layout or styling

[ ] Desktop screenshots
[ ] Mobile width screenshots

[ ] Migrations

[ ] Migration is backwards-compatible with current production code

[ ] Testing

[ ] Code is tested
[ ] Changes have been manually tested

[ ] Settings

[x] New settings are documented and present in app.json
[x] New settings have reasonable development defaults, if applicable
[ ] Opened issue for DevOps regarding necessary configuration changes to deployed environments

What are the relevant tickets?
#571
What's this PR do?

Adds the initial integration of order refunds with the payment-gateway in ol-django.

How should this be manually tested?

Steps to be added

Where should the reviewer start?
To be added
NOTE:
This PR will be associated with it's counterpart work done in ol-django in https://github.com/mitodl/ol-django/pull/64
Any background context you want to provide?
(Optional)
Screenshots (if appropriate)
(Optional)

Codecov Report

Merging #599 (1c56b15) into main (7efd5f2) will decrease coverage by 0.54%.
The diff coverage is 15.90%.

@@            Coverage Diff             @@
##             main     #599      +/-   ##
==========================================
- Coverage   86.21%   85.66%   -0.55%
==========================================
  Files         119      120       +1
  Lines        5121     5163      +42
  Branches      822      828       +6
==========================================
+ Hits         4415     4423       +8
- Misses        573      606      +33
- Partials      133      134       +1

Impacted Files
Coverage Δ

ecommerce/cybersource_api.py
0.00% <0.00%> (ø)

ecommerce/models.py
89.10% <80.00%> (-0.27%)
:arrow_down:

main/settings.py
94.08% <100.00%> (+0.08%)
:arrow_up:

ecommerce/discounts.py
77.19% <0.00%> (+5.26%)
:arrow_up:

Continue to review full report at Codecov.

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

@rhysyngsun This would be the integration of https://github.com/mitodl/ol-django/pull/64. Most of the things w.r.t the integration are done. Let me know if would like to take an initial pass at this.
A few things that will be done once the package from ol-django is out:

Failing tests would pass
I'll remove the cybersource-related settings.

The end to end would actually depend upon sheets work. but I think we can merge this first if we'd like and then use it in sheets.

@rhysyngsun This is ready for review, IMO, it should ideally be reviewed after https://github.com/mitodl/ol-django/pull/64.


MTN: name -> stream_name

name is a fairly common name, so rename to stream_name so no conflicts with map

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@7298708). Click here to learn what that means.
The diff coverage is 91.42%.

@@            Coverage Diff            @@
##             master      #60   +/-   ##
=========================================
  Coverage          ?   98.24%
=========================================
  Files             ?        6
  Lines             ?     1307
  Branches          ?        0
=========================================
  Hits              ?     1284
  Misses            ?       23
  Partials          ?        0

Impacted Files
Coverage Δ

shed/tests/test_streams.py
99.47% <ø> (ø)

shed/event_streams.py
96.23% <91.42%> (ø)

Continue to review full report at Codecov.

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

Closes #62


build: fix openvdb clean build issue

fixed.
https://github.com/tweakoz/orkid/commit/0b128d255458cc73f4001ced7b0fc8cb86518751


About the perceptual distance

I want to caculate the perceptual distance for the specific input images,  could you please provide the detailed impletation of this part?

We used a LPIPS function from here, with net='vgg'.
In our paper, we measured distances between noised images, which are perturbed by diffusion forward process


Support renaming the DB export

In my project I have two databases and I always have to select the correct generated DB type. It would be awesome if I could provide different names through the generator config.

Yeah, sure. I guess @valtyr has no objections.

Sure I'm fine with this.


Don't redefine Object method method.

The Object class in Ruby defines an instance method named method
that receives a symbol a returns a Method object. Byebug uses this
method to grab information about the parameters of each frame in the
backtrace.
The Capybara::RackTest::Form class defines a method called method,
overriding the method mentioned above. This case could probably be
rescued in byebug, but since the method is just a private utility
in the class, I think it is fine to just rename it to something else
inside capybara.
While renaming it, I noticed a typo in a variable name, so I made the
renamings so that the typo is corrected too.
Reference: https://github.com/deivid-rodriguez/byebug/commit/5a634640b4dd40be98e7f8f73abff013a0a6c6e7#diff-4bfdaaf6a5014abdaeae92d370b02373

LGTM - thanks

Thanks!


LSP Specification Tracking Issue

This is a tracking issue to verify that we support all the recent LSP features and to think about whether any of the unused features could provide a better experience. For each item in the list we should understand what it means in terms of the specification and then comment about whether we can use it or not.
3.16.0 (xx/xx/xxxx)

[ ]  Add semantic token support
[ ]  Add call hierarchy support (#18)
[ ]  Add support for insert and replace ranges on CompletionItem
[ ]  Add support for diagnsotic codes
[ ] Add support for tags on SymbolInformation and DocumentSymbol

3.15.0 (01/14/2020)

[ ] Add generic progress reporting support.
[ ] Add specific work done progress reporting support to requests where applicable.
[ ] Add specific partial result progress support to requests where applicable.
[ ] Add support for textDocument/selectionRange.
[ ] Add support for server and client information.
[ ] Add signature help context.
[ ] Add version on PublishDiagnosticsParams
[ ] Add CodeAction#isPreferred support.
[ ] Add CompletionItem#tag support.
[ ] Add Diagnostic#tag support.
[ ] Add DocumentLink#tooltip support.
[ ] Add trimTrailingWhitespace, insertFinalNewline and trimFinalNewlines to FormattingOptions.
[ ] Clarified WorkspaceSymbolParams#query parameter.

3.14.0 (12/13/2018)

[ ] Add support for signature label offsets.
[ ] Add support for location links.
[ ] Add support for textDocument/declaration request.

3.13.0 (9/11/2018)

[ ] Add support for file and folder operations (create, rename, move) to workspace edits.

3.12.0 (8/23/2018)

[ ] Add support for textDocument/prepareRename request.

3.11.0 (8/21/2018)

[ ] Add support for CodeActionOptions to allow a server to provide a list of code action it supports.

3.10.0 (7/23/2018)

[ ] Add support for hierarchical document symbols as a valid response to a textDocument/documentSymbol request.
[ ] Add support for folding ranges as a valid response to a textDocument/foldingRange request.

3.9.0 (7/10/2018)

[ ] Add support for preselect property in CompletionItem

3.8.0 (6/11/2018)

[x] Added support for CodeAction literals to the textDocument/codeAction request.
[ ] ColorServerCapabilities.colorProvider can also be a boolean
[ ] Corrected ColorPresentationParams.colorInfo to color (as in the d.ts and in implementations)

3.7.0 (4/5/2018)

[x] Added support for related information to Diagnostics.

There is a similar one in lsp-haskell: https://github.com/alanz/haskell-lsp/issues/134
Afaiu ghcide/hls would need that haskell-lsp supports them


Consider using 1 or 2 instead of NCPU worker threads in sidecars

Describe the feature request
Currently, sidecars are started without specifying --concurrency parameter, which means that they spawn NCPU (number of CPUs available on the host system) worker threads.
This not only leads to a higher memory usage (~2KB per configured cluster for each worker thread), but also to a higher effective CPU limit, where a single sidecar can saturate all CPUs available to the host system, leaving little to nothing to the workloads.
I've added the ability to control number of sidecar worker threads in https://github.com/istio/istio/pull/8287, but the default was left as-is for the moment.
Additional context
https://github.com/istio/istio/issues/8247

cc @costinm @rshriram @duderino

Yes, Please do make this change for 1.1. We want this number to be equal to the requested CPU.
The minimal should be one and if it make sense 2.

@duderino Are you still working on this?

if template has more containers, you don't know which one container's requested cpu is main, we can add metadata's annotation like proxy.sidecar.istio.io/concurrency?

@knrc looks like this PR is stuck due to the prow/istio-integ-local-tests.sh failure.
Looks like the same failure for both test runs on this PR:  https://k8s-gubernator.appspot.com/builds/istio-prow/pr-logs/pull/istio_istio/10854/istio-integ-local-tests/
But other PRs don't have the issue:  https://k8s-gubernator.appspot.com/builds/istio-prow/pr-logs/directory/istio-integ-local-tests

@duderino at first glance they seem to be unrelated to the changes I've added, I'll take a deeper look

/retest

@duderino It seems to have been an issue elsewhere, rerunning the test passes
https://k8s-gubernator.appspot.com/build/istio-prow/pr-logs/pull/istio_istio/10854/istio-integ-local-tests/4680

@duderino It looks as if there are now more files to update in the tests though, I'll rebase and update those as well.  I'll push it up again tomorrow.

@duderino It looks as if this was left hanging for so long because of the discussions that someone decided to do this through another PR, https://github.com/istio/istio/pull/11311 and https://github.com/istio/istio/issues/11268

fixed by #11311

I've amended my report with results from a setup on Openshift with Istio. TLDR: on 8 or 16 CPU node giving 2 CPUs and passing --concurrency 4 look like a good tradeoff.

Since this issue was closed I'll post on discuss.


Query Playground - Querying customers fails when authenticated

What I'm trying to achieve
Query the emails from customers in the query playground
Steps to reproduce the problem

Run the default saleor-platform application
Generate a token with the following, which clearly has permission MANAGE_USERS

mutation {
  tokenCreate(email<EMAIL_ADDRESS>password: "admin") {
    token
    user { permissionGroups {permissions {code}}}
  }
}

Set the HTTP Headers to be:

{
  "Authorization": "<the_token_field_from_above>"
}

Run the query:

{ customers(first:100) { edges {node{email}} } }

What I expected to happen
Returns the list of all customer emails. Instead I get:
 "message": "You do not have permission to perform this action",

Hi,
At point 3 you should pass "JWT" before token.
{
    "Authorization": "JWT  <the_token_field_from_above>"
}

Hi,
At point 3 you should pass "JWT" before token.
{
    "Authorization": "JWT  <the_token_field_from_above>"
}

Thanks!

Thanks!


PR: Delete print test

The print test segfaults too frequently.

Thanks @dalthviz!
@goanpeca, this test was failing almost 50% of the time on Travis, so I asked @dalthviz to remove it,

Sorry, not failing, segfaulting.


How can I make this work with embedded source files?

I want to be able to create a library that has an embedded PDB as well as embedded source files and have the SourceLink file be generated so that it points to the files that are embedded in the dll of the library rather than a URL. I can't figure out how to do this. Please update your documentation to make it more clear.

If you are embedding all the source files, you do not need to enable source linking. You do not need this tool. I tried to explain this in the overview where I stated:

If you choose to embed all source files, you don't need this tool.

Were you asking how to embed all source files instead of enabling source link? If so, have a look at:
C:\Program Files\dotnet\sdk\1.0.0\Roslyn\Microsoft.CSharp.Core.targets
You will see that the C# Compiler takes in a @(EmbeddedFiles) MSBuild ItemGroup.
    <Csc  Condition=" '%(_CoreCompileResourceInputs.WithCulture)' != 'true' "
          EmbeddedFiles="@(EmbeddedFiles)"

You can do something similar to what I did here with Directory.Build.targets for the Paket pull request and just remove the condition. This should work for both C# and F#:
<Project>
  <PropertyGroup>
    <BuildDependsOn>EmbedAllFiles;$(BuildDependsOn)</BuildDependsOn>
  </PropertyGroup>
  <Target Name="EmbedAllFiles">
    <ItemGroup>
      <EmbeddedFiles Include="$([System.IO.Path]::GetFullPath('%(Compile.Identity)'))" />
    </ItemGroup>
    <CreateProperty Value="@(EmbeddedFiles)">
      <Output TaskParameter="Value" PropertyName="embed" />
    </CreateProperty>
  </Target>
</Project>

If it just C#, probably this will work:
<Project>
  <PropertyGroup>
    <BuildDependsOn>EmbedAllFiles;$(BuildDependsOn)</BuildDependsOn>
  </PropertyGroup>
  <Target Name="EmbedAllFiles">
    <ItemGroup>
      <EmbeddedFiles Include="%(Compile.Identity)" />
    </ItemGroup>
  </Target>
</Project>

Hope that helps.

You can test if it worked by using dotnet sourcelink print-urls. It will list off each document and the instead of the url, it will show print embed.

Thanks @ctaggart. I think this approach would be my fallback in case I can't get it working properly with linking to GitHub. I'm having some trouble with that approach as well though. I'll comment here with any further information when I've gotten to the bottom of it.

As a reference for other people, I finally got this working with the following Directory.Build.targets file:
<Project>
  <Target Name="PopulateEmbeddedFiles" AfterTargets="BeforeCompile" BeforeTargets="CoreCompile"
    Condition="'$(Configuration)'=='Release'">

    <Message Importance="High" Text="  SKIPPED source file embedding for $(MSBuildProjectName) - DebugType: $(DebugType)"
      Condition="'$(DebugType)'!='embedded' and '$(DebugType)'!='portable'" />

    <Message Importance="High" Text="$(MSBuildProjectName) -> Embedding source files"
      Condition="'$(DebugType)'=='embedded' or '$(DebugType)'=='portable'" />

    <ItemGroup Condition="'$(DebugType)'=='embedded' or '$(DebugType)'=='portable'">
      <EmbeddedFiles Include="@(Compile)" />
    </ItemGroup>
  </Target>
</Project>

Obviously, the Message-steps are just for troubleshooting.
Also have a look at https://github.com/dotnet/roslyn/issues/19127 which should make this obsolete by exposing /embed to MSBuild.

Turns out I cheered to soon. 😢 If I embed the source files on a build server (windows) it no longer works.
If I look at the generated DLL (from the nuget package), dotnet sourcelink print-urls returns the following for a file:
eba31d1dd082d4e65d34cdcd15ca9955457ae3d4 sha1 csharp C:\agent\_work\34\s\src\Meceqs.Abstractions\Envelope.cs
embedded

If I try to step into this file in Visual Studio 2017, it fails to load the file and outputs this. Note that the hash is the same.
Locating source for 'C:\agent\_work\34\s\src\Meceqs.Abstractions\Envelope.cs'. Checksum: SHA1 {eb a3 1d 1d d0 82 d4 e6 5d 34 cd cd 15 ca 99 55 45 7a e3 d4}
The file 'C:\agent\_work\34\s\src\Meceqs.Abstractions\Envelope.cs' does not exist.
Looking in script documents for 'C:\agent\_work\34\s\src\Meceqs.Abstractions\Envelope.cs'...
Looking in the Edit-and-Continue directory 'C:\src\tmp\ConsoleApp2\enc_temp_folder\'...
The file with the matching checksum was not found in the Edit-and-Continue directory.
Looking in the projects for 'C:\agent\_work\34\s\src\Meceqs.Abstractions\Envelope.cs'.
The file was not found in a project.
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\agent\_work\34\s\src\Meceqs.Abstractions\Envelope.cs.
The debugger could not locate the source file 'C:\agent\_work\34\s\src\Meceqs.Abstractions\Envelope.cs'.

Any ideas?

@cwe1ss I noticed that I couldn't step into some files when the code is compiled in Release, but I can if the code is compiled in Debug.

@shaynevanasperen same result in my case. thx though!

I think the debugger doesn't yet support extracting source files embedded in the .pdb.

That's a bummer. I got really excited about this! :cry: This sounded like the perfect solution for internal libraries that sit in private repos. I'd still prefer this over enabling authenticated access to the repo because DLL size is not really a concern for our libraries and having to download each file separately seems unnecessary and slower.
Do you know of any place on GitHub where I can vote for this?

Hopefully @gregg-miskelly will get to it at some point soonish...
Keep in mind though that the /embed option embeds the sources in the .pdb, not the .dll (unless of course you're embedding the .pdb itself in the .dll).

I added a user voice item that folks can vote for and track progress: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/19107733-debugger-should-support-c-compiler-embed-optio

Awesome! I gave it my vote! thank you!
Note that the link in your uservoice comment links to itself... not sure if this was intended?!

@cwe1ss Thanks for noticing. Fixed.

I created a SourceLink.Embed.AllSourceFiles nupkg and released it with 2.1.1 just now. It is documented in the readme.
The 2 user issues that @gregg-miskelly added yesterday as well as the lack of pdb pack support are now in the readme too under Known Issues.


Command to generate packets for a binding table softwires

Based on the same parameters used to generate a binding table, generates from-inet and from-b4 traffic that matches the binding table.
Ideally it should read a lwAFTR conf file to get all the info about the settings and the softwires in the binding table. The program can also print out packets to a .pcap file which can be later flushed to a port with  packetblaster. It's working but I still have to clean up the code and maybe change the implementation to use a lwAFTR conf file.

LGTM.  Can you commit a sample large binding table to the repo along with pcap files for bidirectional traffic over 20K active softwires?

OK, I will do that in a different PR. I realize there are some bugs in the code (mainly resetting the counters when an iteration is completed). I will update the code and merge.


error while using save_weights()

I ran into an error while using model.save_weights()
Traceback (most recent call last):
  File "cnn2.py", line 160, in <module>
    model.save_weights('model_weight.hdf5')
  File "/home/cy/.local/lib/python2.6/site-packages/keras/models.py", line 379, in save_weights
    g = f.create_group('layer_{}'.format(k))
ValueError: zero length field name in format
```
Could anyone help ?

Besides, the HDF5 libraries dependance is not automatically checked while installing.

Thanks

Could you please show us how you created the model?

The model is created by:
model = Sequential()

model.add(Convolution2D(32, 3, 3, 3, border_mode='full'))
model.add(Activation('relu'))
model.add(Convolution2D(32, 32, 3, 3))
model.add(Activation('relu'))
model.add(MaxPooling2D(poolsize=(2, 2)))
model.add(Dropout(0.25))

model.add(Convolution2D(64, 32, 3, 3, border_mode='full'))
model.add(Activation('relu'))
model.add(Convolution2D(64, 64, 3, 3))
model.add(Activation('relu'))
model.add(MaxPooling2D(poolsize=(2, 2)))
model.add(Dropout(0.25))

model.add(Flatten())
model.add(Dense(64*16*16, 2048, init='normal'))
model.add(Activation('relu'))
model.add(Dropout(0.5))

model.add(Dense(2048, nb_classes, init='normal'))
model.add(Activation('softmax'))

sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
model.compile(loss='categorical_crossentropy', optimizer=sgd)

which is almost identical to the model in keras/example/cifar10_cnn.py
Then, after training and testing, I want to save it with
model.save_weights('model_weight.hdf5')

where came in the error.
Traceback (most recent call last):
  File "cnn2.py", line 164, in <module>
    model.save_weights('model_weight.hdf5')
  File "/home/cy/.local/lib/python2.6/site-packages/keras/models.py", line 379, in save_weights
    g = f.create_group('layer_{}'.format(k))
ValueError: zero length field name in format

Another minor matter is that it does not allow saving weights to an existing file, which seems quite inconvenient to users.
Traceback (most recent call last):
  File "cnn2.py", line 164, in <module>
    model.save_weights('model_weight.hdf5')
  File "/home/cy/.local/lib/python2.6/site-packages/keras/models.py", line 375, in save_weights
    raise IOError('%s already exists' % (filepath))
IOError: model_weight.hdf5 already exists

Thanks for your attention :)

I just ran your example and could not reproduce your error. Please be sure that you have the latest version.
Be aware that in the latest version there is an issue with save_weights if you use python 2.x (#205). The best way to avoid this is to specify overwrite=True in save_weights at the moment.

Thank you.
I will try to upgrade my package and specify overwrite=True.


Benchmark

Benchmark of an echo server. PGo vs handwritten.
Relaxed mailboxes implemented for having better performance when it's possible!

Seems that the documentation wasn't clear and I have to update it.
We are only removing rollback support. We don't remove timeout support in relaxed mailboxes. Reading relaxed local mailboxes might timeout and it's OK. Also writing to relaxed remote mailbox might timeout and it's fine too.
The point is that with relaxed mailboxes, if you successfully write to a relaxed remote mailbox, there is no way to abort that write.

I haven't added the benchmarks using Go testsuite yet. Do you think we need it?

Re: me thinking timeouts are removed
I just re-read the code, and I had missed that the timeouts feature was still present in the remote resource. I forgot that's the only place the timeouts wrapper is supposed to be in the first place.
I think I understand the precise tradeoff now - the new documentation helps a lot.
My one nitpick in the documentation is the last issue I have with this.
Re: running with Go benchmarking framework
It's more a nice to have. If it's not auto-runnable, as long as there's enough documentation that I could figure it out (I checked, minus the one comment I just added, it's fine), then that's ok.

I improved the benchmark app by adding a command line flag, instead of comment/uncommenting a line. Since we've not yet decided on the benchmark deployment settings, having automated benchmarks is not beneficial.

@fhackett Can we merge this?

Yes, my bad. I forgot to check back on this with all the writing.


Misleading statement on authorization token usage

Section <IP_ADDRESS>.1 Line 422 ff in in IUA.b, Rev.1.2 from September 21, 2019, states:
The Incorporate Authorization Token transactions use an authorization token to indicate that this transaction is authorized. This token can be obtained by means of the Get Authorization Token, or by other methods.
This is misleading since:

The authorization token communicates claims used to authorize the transaction (just like it is in XUA profile), it does not mean in any case that the transaction is authorized already.

refactored the relevant parts to clean up the terms used as discussed during the July F2F meeting.


"There are no references to Ember.$, $ or jQuery" unit test case is failing

Resolved by https://github.com/softlayer/sl-ember-components/commit/b876c5300a5a93c4a58aa5a4b17a4505c9cdcbdc


Live share debugging of jupyter doesn't cause the guest to enter debug mode.

Not sure why or if this is a live share bug, but starting debugging on the host doesn't start debugging on the guest. The cell will look busy, but the guest cannot tell why nor see any of the debugger UI.

Internal bug on the liveshare team
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/946733

May not be a native notebook editor issue proper, but grouping it with that epic it's related.


Renaming ROM::CommandRegistry#as to #map_to

One of the things that's confusing as a new ROM user is that #as is used with a mapper. From the TODO example —
class TaskMapper < ROM::Mapper
  relation :tasks
  model Task
end

class TasksRelation < ROM::Relation[:sql]
end

When I run —
rom.relation(:tasks).as(:tasks)

It's not clear what the second :tasks is or where it comes from.
I would like to recommend it be renamed to be more descriptive like map_to. Open to other ideas.
rom.relation(:tasks).map_to(:tasks)

@co, actually the mapper can map data without any model at all -- to pure hash. That's why naming it after the model is not a good idea. Instead, you can explicitly define the name of the mapper:
class TaskMapper < ROM::Mapper
  relation :tasks
  register_as :tasks
  model Task
end

@nepalez I don't think the confusion is in the naming of the mapper, but that #as does not have any indication that it's using a mapper.
rom.relation(:tasks).as(:tasks)

# as opposed to
rom.relation(:tasks).map_to(:tasks)

# or even
rom.relation(:tasks).mapper(:tasks)

I see. As for me, I feel conformed with as, but maybe you're right.
I think the substantial part of the confusion is a lack of documentation. Feel it as a stimulus for myself to write it faster :)

I agree that documentation is immensely useful, but it's better when the code is clear without it. Both are needed :)

as is an alias of  map_with and we still haven’t decided which one is
better :)
On Thu, May 21, 2015 at 4:32 PM Caleb Wright<EMAIL_ADDRESS>wrote:

I agree that documentation is immensely useful, but it's better when the
code is clear without it. Both are needed :)
—
Reply to this email directly or view it on GitHub
https://github.com/rom-rb/rom/issues/235#issuecomment-104298857.

@solnic good to know. I personally like #map_with

btw you can pass multiple mapper names there ie rom.relation(:users).map_with(:entity, :view_presenter) which for me is an awesome feature :D

eh, I actually prefer as ... I want to get the results of this relation as a  :user_with_tasks  ... makes plenty of sense.

me to, it reads nice imo just like you said. I guess we need to make a decision and stick to just one for 1.0.0 :)

I prefer as too. Having map_with there as an alias is okay from my perspective. It’s potentially a more intricate API than it needs to be, but I can see uses of both for readability reasons, depending on the particular style of client code.
For example, Sequel aliases where and filter.

The way I read as is that it's expecting a noun. i.e. the object/model you'll end up with. I see mappers more as verbs and transformative rather than an end result. So something like rom.relation(:users).through(:entity, :view_presenter) makes more sense.
At the end of the day, I'll follow the consensus. I've been a ruby dev for a number of years, but am new to rom-rb and just wanted to surface some things that may be difficult for newcomers :)

Let's see what people prefer and decide for 1.0.0 how it should be named. Closing this for now.

Sounds like a plan. Thanks everyone for the feedback!


[WIP] - prefixing and routes are confusing

WIP: CURRENTLY TESTING THESE ASSUMPTIONS
one piece of feedback we received as part of today's QA: a user added /w1 to the route config of their toml. They expected that the worker would then be able to find the asset they deployed from their bucket at /index.html when they navigated to www.theusersdomain.com/w1. Related: #675
Setting aside for a moment the issues we have a few issues with leaky abstractions for routes, one possible solution for this would be to add a key prefix to the site configuration, and prepend the value there to the paths built out in the asset manifest that we send up with the worker. I think this is a relatively quick win that handles most issues, and works with our current model of encouraging users to push a single worker for a project and handle routing internally.
I can extend this to encompass the issues with routes that pre-date sites, but the above is easy and solves most of the problem unique to this feature. A second issue can follow up around handling default routes from Wrangler, but I suspect this would require additional assumptions and API calls by Wrangler that are out of scope for the current milestone.

+1 for adding prefix to site config
I'd also say that when deploying to a route that does not end in /* that we should throw a warning

what i would like to work toward here is a world where prefix could make assumptions about route in the case of a zoned worker:
account_id = ACCOUNT_ID
name = "site"
type = "webpack"
workers_dev = true

[site]
bucket = "./public"
entry-point = "workers-site"

# Production
[env.production]
name = "site-prod"
route = "https://developers.cloudflare.com/workers*"
zone_id = ZONE_ID

could instead become
account_id = "95e065d2e3f97a1e50bae58aea71df6d"
name = "docs-site"
type = "webpack"
workers_dev = true

[site]
bucket = "./public"
entry-point = "workers-site"
prefix = "/workers"

# Production
[env.production]
zone_id = ZONE_ID

For both zoned and zoneless workers, this would require appending the prefix (in this case /workers) to the paths in the asset manifest. This removes the necessity for the worker to trim this value as well.
For zoned workers, the assumption is that they only want their static site logic running on /workers, and their other paths should still pass through to the origin. In this case, we can populate their zone on their behalf, by getting the hostname for their zone from the API and appending their prefix as a route with a wildcard.
My only hesitation with the second implementation is that it feels like a bigger issue surrounding the way routes work on the platform and should likely be handled there, or in a larger route-targeted initiative.

I think this issue also highlights the ongoing conflict in the workers platform between middlewares and zoneless. I'm a big fan of your proposal for making assumptions about routes for zoned worker sites but the fact that an abstraction is needed makes me wary.

this is deferred to 1.5.0

Hey, just want to point out: my side-project screenplay.page is served through a Workers Site that seemed to be working fine when I moved it over. Today I checked it and realized I was getting 404s on my site assets. @EverlastingBugstopper helped me figure out I needed the /* at the end of my route. Really didn't enjoy this experience!


Interface text doesn't render on linux

Does this issue occur when all extensions are disabled?: Yes
VS Code Version: fresh install, latest version
OS Version:Ubuntu 20.04
Steps to Reproduce:
1.Install VSCode
2.Run it
No text in the interface appears (like tab titles or command palette). Just blank skelton UI.

Seems to be a duplicate of this: https://github.com/microsoft/vscode/issues/190437

Please attach the output of code --verbose

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Rewrite examples to use env vars

It's really bad practice to hard-code API keys. Our code examples should reflect that.
We could just do this to begin with:
api_key = os.env.get('PD_API_KEY')

I use something similar to this approach for indicating API Key and user (when necessary). The environment variable is the default but I allow for overrides at the command line on startup
    parser.add_argument(
        "--apikey",
        default=os.environ.get("PD_API_KEY"),
        help="API Key can be specified by env variable PD_API_KEY"
    )

    parser.add_argument(
        "--user",
        default=os.environ.get("PD_USER_ID"),
        help="Overrides the user email in the env PD_USER_ID"
    )


Share ServiceAcount for Redis Components

This PR addresses #124 as a workaround for the upstream OLM issue that prevents two or more ServiceAccounts from having Roles that are duplicates. This will eventually get fixed in OLM but for now the Redis StatefulSet and HA Proxy deployment can use the same ServiceAccount, as the permissions required are the same. This can be changed in the future if a need arises to have different Roles for the two components.

When will this version be pushed :) ?


[Feature Request] Add widgets to view notes on home screen.

A widget which can show a note on the home screen (not the list of notes, the actual content of a note)
Edit the note by clicking it
Customizable background, transparent (with colors), etc.

Thanks for requesting this. A homescreen widget is something I've been wanting to get into the app for quite some time now, and with the ongoing app rewrite using Compose, I am wanting to look into Jetpack Glance for implementing homescreen widgets soon.


Feature to forward CLI args to pytest

Minor (but useful) modification to pass CLI arguments to pytest (when needed)
Default:
docker-compose exec backend-tests /tests-start.sh

Stop on first error:
docker-compose exec backend-tests /tests-start.sh -x

Stop on first error, and filter and run debugger:
docker-compose exec backend-tests /tests-start.sh -x -k my-filter --pdb

because test should be easy 🎈

Awesome! Thanks :tada: :clap:


make passable readmes

[ ] talk about dev / live and give domains
[ ] talk about how to use template post
[ ] talk about netfly, lastpass
[ ] credit original code
[ ] credit sophy
[ ] simple site description

@sssoz any chance you can dump whatever standard docs you use for your css in the readme now? I've made a bit of a better stub, but more to do later.


Generated class for Razor Pages shows up in VS Solution Explorer when the CSHTML file is open in the editor

From @DamianEdwards on March 13, 2017 20:28

Copied from original issue: aspnet/Mvc#5957

@NTaylorMullen This issue seems pretty old, is it still relevant in the new editor?

Nope!


Duplicate identifier

Describe the bug
ts-migrate-mongoose conflicts with package mongoose
To Reproduce
Steps to reproduce the behavior:

Use both ts-migrate-mongoose and mongoose packages (I have a nestjs project)

Lots of errors in the console like:
node_modules/ts-migrate-mongoose/node_modules/mongoose/types/virtuals.d.ts:11:10 - error TS2300: Duplicate identifier 'SchemaOptionsVirtualsPropertyType'.

11     type SchemaOptionsVirtualsPropertyType<DocType = any, VirtualPaths = Record<any, unknown>, TInstanceMethods = {}> = {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/mongoose/types/virtuals.d.ts:11:10
    11     type SchemaOptionsVirtualsPropertyType<DocType = any, VirtualPaths = Record<any, unknown>, TInstanceMethods = {}> = {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    'SchemaOptionsVirtualsPropertyType' was also declared here.

Expected behavior
ts-migrate-mongoose works with the mongoose package
Screenshots

Desktop (please complete the following information):

OS: macOS Sonoma
Version 14.1

Additional context

mongoose 6.8.0
ts-migrate-mongoose 3.4.2

Hello @tipoc123, ts-migrate-mongoose was designed to be used with mongoose
I tested your specific versions:

mongoose 6.8.0
ts-migrate-mongoose 3.4.2

Using my sample repo https://github.com/ilovepixelart/ts-express-swc and it's not compatibility issue between two versions

It's either nest.js specific case
Or your tsconfig.json is not setup properly

In either case I would like you to make a sample demo repo and share the link, so I can run and debug your case

I just installed the ts-migrate-mongoose package. Do I need additional steps?

My tsconfig.json:
{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": false,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "es2020",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "strictNullChecks": true,
    "noUncheckedIndexedAccess": true
  }
}

tsconfig.json looks good so it boils down to nest.js and your specific setup, try check https://github.com/ilovepixelart/ts-migrate-mongoose/tree/main/examples/programmatic-usage id you want to use ts-migrate-mongoose in programatic mode.
You need to add  .swcrc file only in case you use aliases in file references
Example:  import { someFunction} from<EMAIL_ADDRESS>as an example

You need to add .swcrc file only in case you use aliases in file references Example: import { someFunction} from<EMAIL_ADDRESS>as an example

named imports or aliases?
alias (as keyword):
import { foo as bar } from 'my-module'
named import:
import { foo } from 'my-module'

In your tsconfig you don't have aliases/paths so you don't need yo use .swcrc
"paths": {    "@/*": ["src/*"]  }

Try making a sample project from scratch without (company or personal) code just nest.js and ts-migrate-mongoose, and same setup that you trying to make, and send me link I need full picture

I solved the problem using the same version of mongoose :)

If you use the same version of mongoose this will help you avoid interface name collision, but interesting to understand why you have it in the first place...

Example with nest: https://github.com/ilovepixelart/ts-express-nest


Suggestion : Search box with floating results

A search box with floating on top suggestions box just like Github, google, Stackoverflow and many others.
i dont know if it fits into a new component or just a demo using currently available components but it's a very much needed feature.
Thank you

@pooyaEst
Using dropdown with text input and menu:
https://play.tailwindcss.com/UeXWmfZ2tR

Thank you very much. i think it's a good idea to add this to examples in website, maybe under text input.


Enable fileshare crc

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.Storage.Common


Enabling arm64 packaging builder before next stable

Only beta and master builds are generating the arm artifacts and we protected the builders to not run on stable just in case we need another hotfix.
The builder will need to be enabled in stable before the next release to stable.

\cc @itsjustkevin @christopherfujino

oh, is the engine change to build the arm dart sdk not in stable?

oh, is the engine change to build the arm dart sdk not in stable?

That's correct, those changes are not yet in stable.

Ahh, ok, sounds good to me.

This is now complete!


[GOBBLIN-1432] Add run with timeout for kafka8 flush when close

Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA

[ ] My PR addresses the following Gobblin JIRA issues and references them in the PR title. For example, "[GOBBLIN-1432] My Gobblin PR"

https://issues.apache.org/jira/browse/GOBBLIN-1432

Description

[ ] Here are some details about my PR, including screenshots (if applicable):
A hang was observed for ingestion flows after an OOM.
This appears to be due to the kafka pusher flush() call not returning.
Add run with timeout for kafka8 flush when close to fix the issue.

Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

[ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Codecov Report

Merging #3270 (e72a3e3) into master (f11d68f) will increase coverage by 0.02%.
The diff coverage is 11.11%.

:exclamation: Current head e72a3e3 differs from pull request most recent head b05dc06.

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


xCertificateImport / xPfxImport: -- Thumbprint Key is redundant

Details of the scenario you tried and the problem that is occurring:
By requiring thumbprint you create an additional step that is dependent on the user to identify the thumbprint of the certificate before importing the certificate. This information can be found in the certificate when you supply the path.
I understand that the thumbprint is quite useful when Ensure = Absent, so it should be left and as an optional parameter, and "required by code" in the instance you are attempting to remove the cert, but not required to add the certificate.
The DSC configuration that is using the resource (as detailed as possible):
xCertificateImport SSLCert {
Thumbprint = 'c81b94933420221a7ac004a90242d8b1d3e5070d'
Location   = 'LocalMachine'
Store      = 'Root'
Path       = '\Server\Share\Certificates\MyTrustedRoot.cer'
}
xPfxImport CompanyCert
{
Thumbprint = 'c81b94933420221a7ac004a90242d8b1d3e5070d'
Path       = '\Server\Share\Certificates\CompanyCert.pfx'
Location   = 'LocalMachine'
Store      = 'WebHosting'
Credential = $Credential
DependsOn  = '[WindowsFeature]IIS'
}
To generate my configuration I need to resolve the thumbprint of each certificate. So If I am using DSC to automate the standup of several hundred IIS Servers / applications each with it's own certificate, it's a real pain to get the thumbprint off all the certs. It would be much easier If I could just supply the path to the correct certificate and be done.
Version of the Operating System and PowerShell the DSC Target Node is running:
All
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Latest / NA

Hi @mrpullen - this is definitely a good use case and I can see the benefit in implementing it.
We currently use the Thumbprint to determine if the certificate has or has not been imported into the certificate store. However, it is fairly easy (at least for x509 CER files) to pull the thumbprint out of the CER file (I think I've implemented something like for PKCS12 PFX too). This could potentially allow us to remove the key from the Thumbprint parameter. This would prevent a breaking change but support your user story.
But I'll leave this open for more discussion for a bit for more discussion before making a start to make sure there are no additional side affects.


User feedback and optional portnumber

Fixed usage hint.
Added error handling.
Added some more user feedback messages.
Added option port number argument.
Fixes #19
Fixes #21

Not 100% sure that the if len(d[55:]) > 25: is a valid check to see if it worked, but it worked in my test setup.

merged. Thanks :+1:


feat: generate config from Proto

Summary:
Briefly describe the changes made in this PR.
Issue Reference(s):
Fixes #1521
/claim 1521

Summary by CodeRabbit

New Features

Introduced a code generation module for creating configuration from protocol buffer definitions, enhancing support for protocol buffers.
Added new protocol buffer files for testing, including definitions for greeting messages, nested imports, news items with CRUD operations, and required fields in messages.

Enhancements

Expanded the configuration module to include the new generator module, facilitating the generation of configurations from proto files.

Tests

Implemented new proto files for testing various functionalities like duplicate methods, nested imports, and enums.

closing in favor of #1576


Support for socks proxy

Preflight Checklist

[X] I have installed the latest version of Storage Explorer.
[X] I have checked existing resources, including the troubleshooting guide and the release notes.
[X] I have searched for similar issues.

Problem
I would like to be able to connect to storage accounts via their private IP addresses. Because of some network configurations, I cannot do it from the machines in allowed networks.
Desired Solution
Supporting socks (v5, with hostname) either in the application or as environment variables would be great, so I could use with e.g. SSH tunnels.
Alternatives and Workarounds
No response
Additional Context
Currently AzureStorageExplorer supports only http(s) proxy, setting *_proxy environment variables to e.g. 'socks5h://<IP_ADDRESS>:1080' does not work.

@tleepa can you give using system proxy setting a try? You can read more about it here: https://docs.microsoft.com/en-us/azure/storage/common/storage-explorer-network#use-system-proxy-preview

I may have forgotten to mention, that I am using Storage Explorer on Linux - so AFAIK system proxy settings are the same as environment variables?

@tleepa are they? I think that would greatly depend on your distro. How have you configured the proxy for your distro?

Well, I haven't. Because I do not need proxy for regular use. I would only need it for specific purposes, like this one :)
BTW, my setup is a bit complicated. I have Fedora with KDE as my desktop OS, but installed Storage Explorer in https://github.com/89luca89/distrobox, under Ubuntu 20.04.

@tleepa , interesting. Well can you at least give the system proxy setting a try? The name may make it seem pointless given the situation you are in, but I think it would be good to try...?

I will try using system proxy settings, but I would need to do it in a VM (setting proxy globally on my system would mean I will not be able to do anything else ;)) and I currently do not have much time for it.
In the meantime, I have managed to work this around using privoxy: I have set ASE to use privoxy's as HTTP proxy and privoxy forwards traffic to my SOCKS proxy using forwarding settings.
Nice thing about this setup is that you can use patterns to forward matching URLs to different proxies :)

Just to confirm:
I have configured system proxy settings in KDE:

and after setting StorageExplorer to 'use system proxy (preview)', it worked - all traffic was routed via my socks proxy tunnel and I could see blob storage content via storage account's private IP address.
PS. I have also managed to run ASE directly from my Fedora desktop, not from distrobox container.

Awesome. It sounds like you've found a variety of ways to get things working for you. So I'm going to close this issue.


ArgumentNullException in JSON parser in Microsoft.Framework.Runtime

I have a site that runs against coreclr 1.0.0-beta4 (x86) on Windows.  But when I run it against coreclr 1.0.0-beta5-11911 (x86) it fails apparently while reading the project.lock.json file:
>	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.FileFormatException.WithLineInfo(Microsoft.Framework.Runtime.Json.JsonValue value)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DependencyManagement.LockFileReader.ReadString(Microsoft.Framework.Runtime.Json.JsonValue json)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DependencyManagement.LockFileReader.ReadLibrary(string property, Microsoft.Framework.Runtime.Json.JsonValue json)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DependencyManagement.LockFileReader.ReadObject<Microsoft.Framework.Runtime.DependencyManagement.LockFileLibrary>(Microsoft.Framework.Runtime.Json.JsonObject json, System.Func<string, Microsoft.Framework.Runtime.Json.JsonValue, Microsoft.Framework.Runtime.DependencyManagement.LockFileLibrary> readItem)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DependencyManagement.LockFileReader.ReadLockFile(Microsoft.Framework.Runtime.Json.JsonObject cursor)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DependencyManagement.LockFileReader.Read(System.IO.Stream stream)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DependencyManagement.LockFileReader.Read(string filePath)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.ApplicationHostContext.ApplicationHostContext(System.IServiceProvider serviceProvider, string projectDirectory, string packagesDirectory, string configuration, System.Runtime.Versioning.FrameworkName targetFramework, Microsoft.Framework.Runtime.Caching.ICache cache, Microsoft.Framework.Runtime.Caching.ICacheContextAccessor cacheContextAccessor, Microsoft.Framework.Runtime.Caching.INamedCacheDependencyProvider namedCacheDependencyProvider, Microsoft.Framework.Runtime.IAssemblyLoadContextFactory loadContextFactory, bool skipLockFileValidation)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DefaultHost.Initialize(Microsoft.Framework.Runtime.DefaultHostOptions options, System.IServiceProvider hostServices)	Unknown
 	Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.DefaultHost.DefaultHost(Microsoft.Framework.Runtime.DefaultHostOptions options, System.IServiceProvider hostServices)	Unknown
 	Microsoft.Framework.ApplicationHost.dll!Microsoft.Framework.ApplicationHost.Program.Main(string[] args)	Unknown
 	[Native to Managed Transition]
 	[Managed to Native Transition]
 	dnx.host.dll!Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(System.Reflection.Assembly assembly, string[] args, System.IServiceProvider serviceProvider)	Unknown
 	dnx.host.dll!dnx.host.Bootstrapper.RunAsync(System.Collections.Generic.List<string> args, Microsoft.Framework.Runtime.IRuntimeEnvironment env)	Unknown
 	dnx.host.dll!dnx.host.RuntimeBootstrapper.ExecuteAsync(string[] args)	Unknown
 	dnx.host.dll!dnx.host.RuntimeBootstrapper.Execute(string[] args)	Unknown
 	dnx.coreclr.managed.dll!DomainManager.Execute(int argc, char** argv)	Unknown

In looking at the beta5 announcements I saw that the use of Newtonsoft.Json has been replaced with a JSON parser in Microsoft.Framework.Runtime.  Seems there might be a bug in the new code.

/cc @murat @troydai looks like a regression. @rkeithhill Can you kindly submit your lock file so we have something to test against?

@davidfowl Do you want me to list the file's contents in a comment?  It's about 6700 lines long.

OK I put it up on my OneDrive here - https://onedrive.live.com/redir?resid=5a8d2641e0963a97!169590&authkey=!AGKUM0xdgjxQ5n0&ithint=file%2Cjson

Thanks @rkeithhill . I'll take a look.

@rkeithhill
The root cause doesn't lie in the JSON deserialization but in the lock file itself. The lock file's schema has changed since beta4.  The property name is changed. The easiest way to solve your problem is to regenerated the lock file by dnu restore.

@ChengTian @troydai we need to make sure if there's a version mismatch, nothing throws while reading the lock file. That part is likely a regression from before. Missing keys should just return null, not explode.

Looks like replacing
https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Framework.Runtime/DependencyManagement/LockFileReader.cs#L263
by returning null should fix the regression.

I tried the exactly same scenario: first restore with coreclr 1.0.0-beta4 (x86) and then run with coreclr 1.0.0-beta5-11911 (x86)
However, I got expected error message saying "please run dnu restore to generate a new lock file"
@rkeithhill , could you please double check whether you are using the exact version of dnx you mentioned? If you can still reproduce it, please submit a simple repro.

BTW, the ways above to "fix" the issue are just guesses. Actually we have a big try-catch block around lock file parsing logic and no matter what kind of parsing exceptions you have, we never expose the exceptions to users.

Cannot reproduce. Closing.


Adding a new EF.Functions function with no object references

I am trying to write additional EF.Functions that must be executed on the server.
This works well if at least one of the function arguments is a reference to a database column. (via the entity model)
If all arguments are constants, or if there are no arguments, it results in an exception.
This exception occurs without our custom IMethodCallTranslator code getting called.
Linq (?) apparently decides that if there are no object references then it can process the expression locally ... which of course it can not.
The second exception message, below, is from the exception we throw when you try to evaluate one of our extension functions locally.
The stack trace seems to indicate that the problem occurs when initially building the Linq expression tree - before the 'Relational' layer gets a chance to look at it.
Exception:
System.InvalidOperationException : An exception was thrown while attempting to evaluate a LINQ query parameter expression.
----> System.InvalidOperationException : Teradata Database specific functions can not be evaluated on the client.
Stack trace:
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.Evaluate(Expression expression, String& parameterName)
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.TryExtractParameter(Expression expression)
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection1 nodes)    at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.VisitNew(NewExpression node)    at System.Linq.Expressions.NewExpression.Accept(ExpressionVisitor visitor)    at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)    at System.Linq.Expressions.ExpressionVisitor.VisitLambda[T](Expression1 node)
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.VisitLambda[T](Expression1 node)    at System.Linq.Expressions.Expression1.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at System.Linq.Expressions.ExpressionVisitor.VisitUnary(UnaryExpression node)
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.VisitUnary(UnaryExpression unaryExpression)
at System.Linq.Expressions.UnaryExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at System.Dynamic.Utils.ExpressionVisitorUtils.VisitArguments(ExpressionVisitor visitor, IArgumentProvider nodes)
at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.ExtractParameters(Expression expression)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Remotion.Linq.QueryableBase1.GetEnumerator()    at System.Collections.Generic.List1.AddEnumerable(IEnumerable1 enumerable)    at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Teradata.EntityFrameworkCore.Tests.TeradataQueryTeradataFunctionTests.NumericTests() in C:\AppSourceCurrent\TdNetDp\Tests\EntityFramework\EFCore.Teradata.Tests\TeradataQueryTeradataFunctionTests.cs:line 142
--InvalidOperationException
at Teradata.EntityFrameworkCore.TeradataDbFunctionsExtensions.Random(DbFunctions _, Int32 lowerBound, Int32 upperBound) in C:\AppSourceCurrent\TdNetDp\src\TdDotNetDataProvider\EFCore.Teradata\Extensions\TeradataDbFunctionsExtensions.cs:line 46
at lambda_method(Closure )
at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ParameterExtractingExpressionVisitor.Evaluate(Expression expression, String& parameterName)
Steps to reproduce
Can not be reproduced without an Entity Provider that implements EF.Functions of this type.
Example 1
The function RANDOM(1, 256) should generate a random number between 1 and 256 for each row in the result set. (This random number will generally be used in an expression, but may sometimes need to be returned in the result set.)
Example 2
The function CurrentUser() should return the user name of the user that connected the database session.
Further technical details
EF Core version: 2.1
Database Provider: Teradata.EntityFrameworkCore
Operating system: Windows 10
IDE: Visual Studio 2017 15.7.2

Have you registered your IMethodCallTranslator in your class which derives from RelationalCompositeMethodCallTranslator?

Yes. All my Teradata specific functions are handled by the same translator and it is only those with no object references that are not working. The failure occurs before the translator would be called.
Mike
From: Paul Middleton<EMAIL_ADDRESS>Sent: Monday, July 2, 2018 22:31
To: aspnet/EntityFrameworkCore<EMAIL_ADDRESS>Cc: Dempsey, Mike<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [aspnet/EntityFrameworkCore] Adding a new EF.Functions function with no object references (#12527)
Have you registered your IMethodCallTranslator in your class which derives from RelationalCompositeMethodCallTranslator?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/aspnet/EntityFrameworkCore/issues/12527#issuecomment-401994208, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcST5zhaxlMu3_3Ct8XMszVzplnnnEKEks5uCtdQgaJpZM4U_-zd.

@MikeDempseyFL @pmiddleton This is currently a by-design behavior, but it is something we have discussed changing. We will discuss again in triage.
/cc @divega

@ajcvickers
Ok - I'm going to hold off on looking at it then.  Let me know what comes out of triage.

This seems to break also https://github.com/aspnet/EntityFrameworkCore/issues/11484

@MikeDempseyFL - In the essence, you need to register "Functions" which are not server correlated as "non-client evaluatable" separately by registering an implementation of IEvaluatableExpressionFilter deriving from appropriate class.
@pmiddleton - MethodCallTranslator has nothing to do with EvaluatableExpressionFilter and they should not interact with each other.

Thanks. I implemented an IEvaluatableExpressionFilter class and returned false for the 4 functions that were causing the issue and they are now working correctly.

@smitpatel - If we want a solution which can handle all cases where the methods parameters are all independent of the rest of the query then either RelationalEvaluatableExpressionFilter or EvaluatableExpressionFilter needs access to the list of provider registered methods stored inside of ICompositeMethodCallTranslator.
Right now that data is not accessible in the form we need.  The registered methods are buried inside of numerous IMethodCallTranslator implementations which ICompositeMethodCallTranslator wraps.
Ideally there would be a central repository of mapped methods which could then be passed into the EvaluatableExpressionFilter.
Having that map method repository would then also clean up query translation a bit.  Right now when a method needs translation, for use in the back end, there is a O(N) walk over all translators asking each one to try to map the MethodCallExpression.  Having a lookup table would turn this into a nice O(1) lookup.

There are 3 different aspects being combined into one here.
The query pipeline (pre-compilation phase), want to funcletize as much as possible. i.e. anything independent of range variable will get evaluated to a parameter. The only purpose of adding implementation of IEvaluatableExpressionFilter was to block evaluation of non-deterministic function which would defer in value on server/client side. I am bit skeptical of why do we need Relational one to block evaluation of DbFunction since they should mostly be dependent on range variable (read part 2 too).
Since we have a mechanism to block evaluation, we can abuse the system to block evaluation of functions which we know will throw exception on client side. i.e. methods which have methodcall translators but no client side implementation. I believe relational level did exactly this for DbFunctions. Same is guidance for above (for now).
Having MethodCallTranslator is independent of evaluating it on client side if possible. Suppose user has a constant datetime followed by bunch of Add* methods, we can still generate single parameter rather than a large SQL which would evaluate to same value. Since except for UDFs & EF.Functions, everything else in BCL is supposed to have client side implementation anyway. Hence EvaluatableExpressionFilter should not depend on MethodCallTranslators at all. We abuse the system to make sure certain functions are never client evaluated (or may be design a different system for that - subjective to value).
As for O(N) vs O(1), if there is a way to make it more efficient, then we should just do it for MethodCallTranslator. It is still useful in the absence of whatever is being discussed in this issue. Feel free to file a new issue with slightly more detailed idea of yours. Its a good perf improvement.

In regards to DbFunctions while it is true that they should mostly be dependent on range variables it is not true 100% of the time.
I myself have a key function in one of my big applications which takes all client provided integers, but can not be evaluated client side because it needs to query a number of tables.
There are also a number of built in functions in Sql Server which if mapped could fall into this category as well depending on how they are used (HAS_DBACCESS, IS_ROLEMEMEBER, USER_ID, etc).

@pmiddleton - That is useful information. Hence abuse of system perhaps. A subcategory of DbFunctions & EF.Functions methods could be independent of range variable yet needs to be server evaluated. In which case, we block it on client side. Though not all methodcalltranslators are about that.


Generate serialization method bodies for models

This PR adds support for generating the serialization related method bodies for a model.
fixes: https://github.com/microsoft/typespec/issues/3330

API change check
APIView has identified API level changes in this PR and created following API reviews.
Microsoft.Generator.CSharp


Implement the Ruckig plugin

There are a couple changes here that might be controversial:

I renamed the joint_limits pkg to limit_enforcement_plugins to describe it better. Previously, I was confused by joint_limits vs joint_limits_interface.

I ended up deleting on_init() and on_enforce(). on_init() saved about 20 lines of code duplication in reading of the joint limits but on_enforce() was completely different for the 2 plugins so there seems to be no reason for it. Overall, I think the extra layer of abstraction isn't worthwhile.

I haven't tested this yet.
Please don't squash merge.

TBH, I a not sure how to even merge this. There are so many disruptive changes at the moment. Some of the ideas are very good and I agree with them, but I would like to keep the first version simple. So I'll cherry-pick commits from this branch.

Um, what? Simplicity was my goal, too. Can you do a code review and tell me what you don't like?

OK, so basically you don't like any of the proposed changes and want to keep it 100% the way it was previously. There is not a lot I can do to help in that case.
I would at least suggest renaming joint_limits package name to something else. It is way too vague.

I merged this manually and find a compromise solution for now.


Better handling for failing routes

Failing routes cause error 500. Error reporting mechanism needs thinking through.

This should be a lot less an issue after implementing #132, provided that stderr is properly monitored.


Assume not svn/git repo when not in path

Fixes #73
If checking during import we are working in a git or svn repo, if either git or svn are not installed, don't stop

Todo: Add tests

Todo: Add tests


Splitting resources into multiple files

I would like to implement a feature of the library where localisation keys can be split amongst multiple files, which can be 'namespaced' by the file name. The reason is mainly for organisation on large sites where there may be hundreds or thousands of keys.
Things for consideration:

There would be the default locale file plus n 'namespaced' files
The default file could remain en.js whereas additional files could be countries-en.js, months-en.js, etc.
We would need some kind of marker to indicate which file to pull from if not the default. Something like i18n.__("countries.Germany") or i18n.__("Germany", "countries"). Either with some kind of marker in the key name as in the former example, or with a method parameter as in the latter (I'm leaning towards the latter)
If no file is specified, then the key is pulled from the default file
If a file is specified but a key name is not found, then it is searched for in the default file. If it is not found in the default file, then a key is created as in the current behaviour

Is there anything else I should consider?

Ben ça refus about the base option, that will cause you somme trouble

After some more thought, I think my initial considerations may be too simplistic. The fact that real language is supported within the key name makes any kind of delimiter difficult as in the first option, and since  __() supports the sprintf syntax makes the second option difficult.
It doesn't look like this fork supports the passing of the options object when translating a string, as in __({ phrase: 'hello', locale: 'fr' }) as I could have put an extra option on there for the file you wish to pull from.
One option I'm considering is to just implement another method alongside __() and __n() which accepts an argument indicating the file, e.g. __f('labels', "Let's go to %s", 'Spain') where the first argument is the file and following arguments are the translation arguments.
Another thing I'm thinking about is whether to only support a flat file structure or nest directories. The directory structure could influence how the locale keys are named which might aid organisation.
For example, consider the following folder structure:
locale
|-- geo
|   | countries-en.js
|   | countries-fr.js
|-- en.js
|-- de.js

To access the key Spain inside countries, one might use __('geo/countries/Spain'), which would search inside the geo/countries local files.

So you think about __f and __fn (because you must reimplement __ and
__n) ?
I do prefer the options object as first argument. But that would be : __({ key: 'foo', path: 'geo/countries/spain' }) No use of locale(usesetLocale` instead)
Did you think about using requires in one file instead and using that file
as locale ?
Le mar. 4 août 2015 à 11:04, Steve Hobbs<EMAIL_ADDRESS>a
écrit :

After some more thought, I think my initial considerations may be too
simplistic. The fact that real language is supported within the key name
makes any kind of delimiter difficult as in the first option, and since
__() supports the sprintf syntax makes the second option difficult.
It doesn't look like this fork supports the passing of the options object
when translating a string, as in __({ phrase: 'hello', locale: 'fr' }) as
I could have put an extra option on there for the file you wish to pull
from.
One option I'm considering is to just implement another method alongside
__() and __n() which accepts an argument indicating the file, e.g. __f('labels',
"Let's go to %s", 'Spain') where the first argument is the file and
following arguments are the translation arguments.
Another thing I'm thinking about is whether to only support a flat file
structure or nest directories. The directory structure could influence how
the locale keys are named which might aid organisation.
For example, consider the following folder structure:
locale
|-- geo
|   | countries-en.js
|   | countries-fr.js
|-- en.js
|-- de.js
To access the key Spain inside countries, one might use
__('geo/countries/Spain'), which would search inside the geo/countries
local files.
—
Reply to this email directly or view it on GitHub
https://github.com/jeresig/i18n-node-2/issues/65#issuecomment-127533522.

I was thinking about __f and __fn as a last resort, just to distinguish from the base methods, since it would be difficult to implement the new functionality based on the arguments alone, but I don't think that will be necessary if we were to reference the keys by a path name.
Using requires would be interesting.. I wonder if this whole issue could be solved using a build step which effectively concatenates the language files together. The benefits of all this only really come into effect at design time, after all.

Using requires would be interesting.. I wonder if this whole issue could be solved using a build step which effectively concatenates the language files together. The benefits of all this only really come into effect at design time, after all.

Interesting, however in my scenario I would like the language files separated for different reasons. I need a clear separation between my templates and their localisation files , so that they can use the same keys, and provide different translations.

@blowsie could you give a short example; I did not get the interest to have a template file

I think its necessary separated files in production.
Options:

Developer defines the files and pattern to retrieve, for example using glob
Use a file prefix in keys, for example for file en/demo.js, the title key is demo.title.
Add a config parameter for define logical
Remove the write option and create a cli package for work with literals using yeoman


install error again

again install on fresh ubuntu 16 and get this
`TASK [influxdb : Create 'stations' database] ***********************************
changed: [localhost] => (item=stations)
TASK [influxdb : Create 'stations' retention policies] *************************
failed: [localhost] (item={u'duration': u'5d', u'default': True, u'name': u'15s'}) => {"failed": true, "item": {"default": true, "duration": "5d", "name": "15s"}, "msg": "{"error":"error parsing query: found 15s, expected identifier at line 1, char 25"}\n"}
failed: [localhost] (item={u'duration': u'2w', u'default': False, u'name': u'1h'}) => {"failed": true, "item": {"default": false, "duration": "2w", "name": "1h"}, "msg": "{"error":"error parsing query: found 1h, expected identifier at line 1, char 25"}\n"}
failed: [localhost] (item={u'duration': u'INF', u'default': False, u'name': u'1d'}) => {"failed": true, "item": {"default": false, "duration": "INF", "name": "1d"}, "msg": "{"error":"error parsing query: found 1d, expected identifier at line 1, char 25"}\n"}
NO MORE HOSTS LEFT *************************************************************
RUNNING HANDLER [azuracast-user : send user notification] **********************
to retry, use: --limit @/var/azuracast/www/util/ansible/deploy.retry
PLAY RECAP *********************************************************************
localhost                  : ok=24   changed=17   unreachable=0    failed=1
`

Seems to have to do with the version of the python-influxdb library in use on the machine...this fix resolves the issue locally for me. Try it again and let me know. :)

i try again install on fresh ubuntu16 droplet now all ok :)


Roll Flutter from 61e927d22fe6 to 1a460cfb93c3 (9 revisions)

https://github.com/flutter/flutter/compare/61e927d22fe6...1a460cfb93c3
2022-11-13<EMAIL_ADDRESS>54795869b Roll Skia from c0f87aed019b to 38edf6197aa9 (1 revision) (flutter/engine#37567) (flutter/flutter#115239)
2022-11-13<EMAIL_ADDRESS>06c390470 Roll Fuchsia Mac SDK from iPqmEVwAbmYwPlh5a... to N-iOLgSVYYh_AfC7Q... (flutter/engine#37566) (flutter/flutter#115236)
2022-11-13<EMAIL_ADDRESS>2bdeaf7d7 Fix inertia cancel event on macOS Ventura (flutter/engine#37067) (flutter/flutter#115226)
2022-11-13<EMAIL_ADDRESS>d4e2188e9 [Impeller] Fix DrawPaint regression (flutter/engine#37561) (flutter/flutter#115222)
2022-11-12<EMAIL_ADDRESS>Roll Flutter Engine from fd56b7ee87f0 to 1ae285897eae (2 revisions) (flutter/flutter#115220)
2022-11-12<EMAIL_ADDRESS>fd56b7ee8 Roll Fuchsia Mac SDK from j3vspnGJcQvIfsXXu... to iPqmEVwAbmYwPlh5a... (flutter/engine#37557) (flutter/flutter#115218)
2022-11-12<EMAIL_ADDRESS>a0d8cd68c Add a limit to the Gaussian blur downsampling curve (flutter/engine#37550) (flutter/flutter#115217)
2022-11-12<EMAIL_ADDRESS>1c8c23754 Roll Fuchsia Linux SDK from xDY5B0-NZzq2idRNU... to IE4logHFoa8ZZQAw3... (flutter/engine#37554) (flutter/flutter#115214)
2022-11-12<EMAIL_ADDRESS>Roll Flutter Engine from e63c9443bc04 to 9500d8c4a4ce (2 revisions) (flutter/flutter#115212)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-plugins
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Plugins: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


general-purpose counters ——like NI DAQ

PYNQ/pynq/lib/pmod/pmod_timer/src/pmod_timer.c
Could PYNQ had func of general-purpose counters ——like NI DAQ ?
Mostly for Single Photon Counting Module.
(:
Number of counter/timers： 4
Resolution： 32 bits
Counter measurements： Edge counting, pulse, pulse width,
period, two-edge separation...
Applications： Event counter, Count, Pulse, pulse train with dynamic updates,
frequency division, equivalent time sampling...
Input frequency: 0 MHz ~ 25 MHz (Floating Random)
Minimum high pulse width 10 ns  (Fixed)
）

Yes please - we are working on some small counters with more IO functionality, but any help appreciated.

I'll close this old issue - please check out the pynq forum for gathering ideas & collaborators: http://www.pynq.io/support.html


feat(Model): add batchWrite Method

:tada: This PR is included in version 2.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Conflict with Excalidraw

The addon now conflicts with Excalidraw and won't let draw on its canvas.
Any ideas how to fix?

@Cossackx Thanks for the lookout! I've pushed a fix.  Let me know if this is now resolved for you.

@Cossackx Thanks for the lookout! I've pushed a fix. Let me know if this is now resolved for you.

@Cossackx Thanks for the lookout! I've pushed a fix. I needed to scope some of my variables to be more specific to this plugin. Let me know if this is now resolved for you.

will test now

@Cossackx  Going to close this soon as it should be resolved, but let me know if not :)

@Cossackx Going to close this soon as it should be resolved, but let me know if not :)

Still conflicting. Had to shut off vizualizer

Ok can you elaborate more?  I saw that it was making the hamburger menu from excalidraw not clickable so you couldn't use it.  From the screenshot, you can see I can open the menu + draw on excalidraw.  Are you using the most up to date version?

Appreciate the info @Cossackx.   I can't seem to replicate the bug, but I'm creating a new release that I expect out by tomorrow with a lot of changes under the hood.  It should address any and all conflicts with other functionality outside the plugin.

@Cossackx Ok nevermind, I was able to finish it much faster than I thought.
Please let them know that they can update to v1.0.12 and it shouldn't interfere with anything.  Thanks! 😁

Since I haven't seen any other issues or users experiencing this since the last release, I will be closing this soon unless you're still reporting the same issue.  I'll give it some more time 👍🏻


Default @cases?

I was wondering if it is possible to have a default branch in a @cases? For some methods it only makes sense to write logic for a few of the possible types, and throw an error if an unexpected type is passed. However, currently this requires one to write out all unexpected types, rather than a default.

yeah I've been thinking for a little while how to support this, it's actually kinda hard to have a default branch without dynamic dispatch, at least if you want to unpack. I think what I'll do instead is have a syntax like
@cases x begin
    A(a, b) => f(a, b)
    B(c) => g(c)
    {C, D, E}(d) => h(d)
end

So that writing {C, D, E}(d) => h(d) gets expanded to
C(d) => h(d)
D(d) => h(d)
E(d) => h(d)

I haven't decided exactly how that should look though.

Yes, I requested this feature on Zulip a couple of weeks ago, and just now went to add an issue for it before stumbling on this.
I agree that it is a difficult trade-off to make here. We can't simply use _, as we also need to unpack arbitrary variants, some of which may want to also be skipped with _, and in doing so we may want to refer to the default variable binding on the rhs.
Even more, we may want nested @cases, and refer to bindings in outer scope.
The solution @MasonProtter provided is sane to work around all these syntax limitations, but I do not know what other implications it may have.
From an API perspective, I'm not sure I like the curly braces used in that context. I think square brackets or even round, would connote the semantics of it expanding into a collection of branches.


Index hold "0.0:" not working as expected

I'm expecting "0.0:" to hold that prompt until the next specification.
However, I observe, that it holds for only one frame and then switches over to the next already.
Have a look at the prompts and the comfy output it produces:

The first prompt appears only on one line. I had expected it to go from 0.0 to 0.33

This is the animate diff implementation of the prompt scheduling, not fizznodes.

You're completely right,
opened an issue there: https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved/issues/487


Handling dynamic routes with nuxt generate

Firstly a huge thanks for making this module. It's exactly what I was looking for and was hoping I wouldn't have to create.
Is there a recommended way to handle localised, dynamic route generation?
Currently I'm getting route slugs as per the generate docs, then going over the locales and adding prefixes to all the routes. This feels hacky, and I suspect I'm doing it the 'wrong' way since the module already includes a routes config feature, but I couldn't see an obvious way to hook into this.
All the routes get generated properly, except the index page for non-default locales gets output with no filename. It ends up in the right place, but named '.html'. This is only when generate.subFolders is set to false.

This question is available on Nuxt.js community (#c19)

Hi @papertokyo !
I didn't do much testing with the nuxt generate command but I just tested it with the example project and it seems to work, even with generate.subFolders set to false.
What kind of dynamic routes do you have? Any way you could share your tests in a repo?
Thanks!

Hmm okay, I'll take a closer look and see if perhaps I'm doing something weird that would generate a blank path name. Netlify seems to be okay with the folders, so getting it working without subfolders is a 'nice to have', along with localising urls.
So just to clarify, the routes config object in nuxt-i18n is only for localising the slugs of folders in the pages tree, and when creating a routes array for generate, I should reference that config?

Yes I think so.
The routes option of generate lets you specify paths. It means that Nuxt will try to find a page that matches the route in order to generate the related HTML file.
This module only works with pages because it creates multiple localized routes from a single page.
Now, if you want to enable localization with generate.routes, how would you provide a different payload for each language? It would mean multiple locales x content?

I tried implementing generation of dynamic routes defined in generate.routes with this module, but it's very difficult if not impossible because of the custom paths per language.
If you don't need customized URLs per language, then maybe this alternative module works for you: https://github.com/njam/nuxt-i18n-module
The code that generates the dynamic routes is here: src/index.js

Has any progress been made to this issue?

+1 to @CodyBontecou 's question


Pigz installation

The install.sh script failed with the following error:
./install.sh: line 89: cd: /scratch/tmp/amikhail/src/Scaff10X/src/pigz-2.6: No such file or directory
cp: cannot stat ‘pigz’: No such file or directory
!! Error: pigz not installed properly!
Pigz-2.6 is not available when trying to download it with wget. I had to change it with Pigz-2.7 manually in the install.sh script. In case other people have the same problem.

Now need to change to 2.8 in the install.sh


[Hotfix][Core][VLM] Disable chunked prefill by default and prefix caching for multimodal models

Currently, multimodal models do not work quite well with chunked prefill and prefix caching

For chunked prefill, this is somewhat working but very flaky: we will run into errors when the available prefill slots in the batch are not enough for the multimodal placeholders for one multimodal item, since currently multimodal placeholders cannot be prefilled partially. This will be addressed in #8346
For prefix caching, this does not work at all since we need additional hash for the multimodal data items. This will be addressed in #8348.

This PR turns off chunked prefill by default, and disable prefix caching for multimodal models.
cc @rkooo567 @patrickvonplaten @DarkLight1337

 PR Checklist (Click to Expand)
Thank you for your contribution to vLLM! Before submitting the pull request, please ensure the PR meets the following criteria. This helps vLLM maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

[Bugfix] for bug fixes.
[CI/Build] for build or continuous integration improvements.
[Doc] for documentation fixes and improvements.
[Model] for adding a new model or improving an existing model. Model name should appear in the title.
[Frontend] For changes on the vLLM frontend (e.g., OpenAI API server, LLM class, etc.)
[Kernel] for changes affecting CUDA kernels or other compute kernels.
[Core] for changes in the core vLLM logic (e.g., LLMEngine, AsyncLLMEngine, Scheduler, etc.)
[Hardware][Vendor] for hardware-specific changes. Vendor name should appear in the prefix (e.g., [Hardware][AMD]).
[Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:

We adhere to Google Python style guide and Google C++ style guide.
Pass all linter checks. Please use format.sh to format your code.
The code need to be well-documented to ensure future contributors can easily understand the code.
Include sufficient tests to ensure the project to stay correct and robust. This includes both unit tests and integration tests.
Please add documentation to docs/source/ if the PR modifies the user-facing behaviors of vLLM. It helps vLLM user understand and utilize the new features or changes.

Adding or changing kernels
Each custom kernel needs a schema and one or more implementations to be registered with PyTorch.

Make sure custom ops are registered following PyTorch guidelines: Custom C++ and CUDA Operators and The Custom Operators Manual
Custom operations that return Tensors require meta-functions. Meta-functions should be implemented and registered in python so that dynamic dims can be handled automatically. See above documents for a description of meta-functions.
Use torch.libary.opcheck() to test the function registration and meta-function for any registered ops.  See tests/kernels for examples.
When changing the C++ signature of an existing op, the schema must be updated to reflect the changes.
If a new custom type is needed, see the following document: Custom Class Support in PT2.

Notes for Large Changes
Please keep the changes as concise as possible. For major architectural changes (>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with rfc-required and might not go through the PR.
What to Expect for the Reviews
The goal of the vLLM team is to be a transparent reviewing machine. We would like to make the review process transparent and efficient and make sure no contributor feel confused or frustrated. However, the vLLM team is small, so we need to prioritize some PRs over others. Here is what you can expect from the review process:

 After the PR is submitted, the PR will be assigned to a reviewer. Every reviewer will pick up the PRs based on their expertise and availability.
 After the PR is assigned, the reviewer will provide status update every 2-3 days. If the PR is not reviewed within 7 days, please feel free to ping the reviewer or the vLLM team.
 After the review, the reviewer will put an  action-required label on the PR if there are changes required. The contributor should address the comments and ping the reviewer to re-review the PR.
 Please respond to all comments within a reasonable time frame. If a comment isn't clear or you disagree with a suggestion, feel free to ask for clarification or discuss the suggestion.

Thank You
 Finally, thank you for taking the time to read these guidelines and for your interest in contributing to vLLM. Your contributions make vLLM a great tool for everyone!

Thanks!


[bug]set the allow_flight attr into False will cause the player lost all the abilities!!!

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Details (please complete the following information):

OS: [e.g. Windows, Linux]
Endstone Version: [e.g. v0.4.0]

Additional context
Add any other context about the problem here.

I use the Player().allow_flight=False and i can't do anything such as mine!

Thanks for reporting the issue. Can you show me your codes that set allow_flight to False?

Thanks for reporting the issue. Can you show me your codes that set allow_flight to False?

self.server.get_player(playername:str).allow_flight=True

Where did you attempt to set that to True? I assume you set it in one of the event handlers?

你尝试将其设置在哪里？我假设您在其中一个事件处理程序中设置它？True

in the event handler"on player join"

This has been known as a "client-side" bug for a while. If you try to set it in the PlayerJoinEvent handler, the client might not be able to break or place blocks. For now, the workaround is to either add a command to set it or start a delayed task in the event handler to set it. Basically, just avoid setting it directly in PlayerJoinEvent.


Renaming method causes behavior change

Does this issue occur when all extensions are disabled?: Yes/No

-VS Code Version: 1.88.1
-OS Version: Windows11
-Language：java
Steps to Reproduce:
1.select "m()"
2.click “Rename”
3. new name "toString()"
// rename m() to toString()
interface I{
String m() throws Exception;
}

What do you expect instead? A syntax/API check per language and a warning beforehand?
Probably too complicated for an operation you do on demmand, you know what you are replacing with.

/extJava

It looks like this is caused by the Java extension. Please file the issue to the Java extension repository. Make sure to check their troubleshooting instructions and provide relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.
Happy Coding!


Create oil / oil barrel icon

Need to create an oil and oil barrel icon in our Assets library

Ready for review @BirteThornquist @benteljones
It falls under the category Technical https://www.figma.com/file/BQjYMxdSdgRkdhKTDDU7L4KU/Assets?node-id=3175%3A6905

LGTM! 😊


Refresh OIDC token for keyvault azadmin tests when deployment is slow

Refresh OIDC token for keyvault azadmin tests when deployment is slow

/azp run go - azadmin - weekly


The semidefinite function is not defined

Hello!
In TICC.py about "theta = semidefinite(probSize, name='theta') and obj = -log_det(theta) + trace(S * theta)" is error.
Are there no definite semidefinite?

u can use cvxpy==0.4.0 to solve it