Transaction rollback method

Hi! first, thanks for this great orm is it possible to have a rollback transaction for unit test or something similar. Exemple I use mocha for my unit test, inside each describe in the before hook I want begin a transaction and rollback in after hook. I don t know how I can do it simply now.

Hi! The transaction API is still a work in progress, and what you want is not currently easy to implement. You should test the following implementation though:
var Person = require('./path/to/your/models/Person');
var Movie = require('./path/to/your/models/Movie');

describe('foo', function () {
  // The knex transaction object. It has `commit` and `rollback` methods
  // in addition to all the normal query building methods.
  var transaction;

  // These are the models that you should use in the tests since.
  // they are bound to the transaction. Queries started through
  // the original models do not take part in the transaction.
  var TransactingPerson;
  var TransactingMovie;

  before(function (done) {
    objection.transaction(Person, Movie, function (Person, Movie) {
      transaction = this;
      TransactingPerson = Person;
      TransactingMovie = Movie;
      done();

      // This is a hack that makes sure the transaction ends only after you
      // call transaction.rollback() or transaction.commit(). I will consider
      // updating objection.js so that this is not needed.
      return new Promise(function (res, rej) {});
    });
  });

  it('bar', function () {
    // Test something,
  });

  after(function () {
    return transaction.rollback();
  });
});

Thanks for the fast reply, your solution is good but I don t use directly the models, I use it inside some services where models is directly included.

Yeah transactions are a bit difficult with single threaded environments such as node.js. Because of the asynchronous way things are handled, you must specify the transaction for each database operation explicitly. If you declare some kind of global transaction, it will be used for all operations of all request that are running in parallel.
So you must somehow pass the transaction to your services. In objection.js you currently should pass the "bound" models to the services and use them instead of the directly required ones. Another way to do this is to pass the transaction object around. You could do something like this:
var Person = require('./path/to/your/models/Person');
var Movie = require('./path/to/your/models/Movie');

function myAwesomeServiceFunc(transaction) {
  return Person.bindKnex(transaction).where('foo', 'bar').then(function (people) {
    // ... do more stuff.
  });
}

describe('foo', function () {
  // The knex transaction object. It has `commit` and `rollback` methods
  // in addition to all the normal query building methods.
  var transaction;

  before(function (done) {
    objection.transaction(Person, Movie, function (Person, Movie) {
      transaction = this;
      done();

      // This is a hack that makes sure the transaction ends only after you
      // call transaction.rollback() or transaction.commit(). I will consider
      // updating objection.js so that this is not needed.
      return new Promise(function (res, rej) {});
    });
  });

  it('bar', function () {
    return myAwesomeServiceFunc(transaction);
  });

  after(function () {
    return transaction.rollback();
  });
});

Oh if I just need to bind the transaction is a lot easier, thanks a lot !

I do it like this
class MyAwesomeClass {
  constructor() {
    this.MyModel = require('./path/to/my/MyModel');
  }
  /*For the test*/
  bindTransaction(transaction) {
    this.MyModel.bind(transaction);
  }
  someFunction() {
    return this.MyModel.query().first()
  }
}

describe('foo', function () {
  // The knex transaction object. It has `commit` and `rollback` methods
  // in addition to all the normal query building methods.
  var transaction;
  var MyAwesomeService = new MyAwesomeClass();

  before(function (done) {
    objection.transaction(Person, Movie, function (Person, Movie) {
      transaction = this;
      done();

      // This is a hack that makes sure the transaction ends only after you
      // call transaction.rollback() or transaction.commit(). I will consider
      // updating objection.js so that this is not needed.
      return new Promise(function (res, rej) {});
    });
    MyAwesomeService.bindTransaction(transaction);
  });

  it('bar', function () {
    return MyAwesomeService.someFunction();
  });

  after(function () {
    return transaction.rollback();
  });
});

It is possible to use Models.bindKnex to do the same thing without declaring each model in objection.transaction?

Sure. But currently you still need to give at least one model from which the transaction function can get the knex connection. Something like this:
var SomeModel = require('./models/SomeModel');
var SomeOtherModel = require('./models/SomeOtherModel');

objection.transaction(SomeModel, function () {
  return Promise.all([
    SomeModel.bindKnex(this).insert({foo: 'bar'}),
    SomeOtherModel.bindKnex(this).insert({spam: 'eggs'})
  ]);
});

All transaction function does is it calls the bindKnex method for all models that are passed in and passes them to the callback. You don't need to use them.

Bluebird don't like the hack I get Unhandled rejection Error: undefined at Object.ensureErrorObject

If you copy my example exactly you don't get the unhandled exception. Note that I don't return the promise from the before method. I will figure out a better way to do this for sure. Something like this:
var transaction;
before(function () {
  return objection.transaction.start(SomeModelOrTheKnexConnection).then(function (trx) {
    transaction = trx;
  });
});

after(function () {
  return transaction.rollback();
});

I reopened the issue and will close this when I add a fix in the near future. Please post any suggestions you might have here.

I don t see .start method in the transaction.js file and i get undefined

And I think if the objection.transaction is call without any models you can use this.Model.knex() inside transaction to get the global knex instance?

Yes, start method doesn't exist yet. My comment was a bit confusing.. I meant that I will add the start method or something similar in the near future.
The transaction call needs a model or a knex instance so that it can create the transaction.

Ok sry my english is really limited, I'm looking for implement something like
var transaction = objection.transaction.start(knexInstance);

if (ok)
    transaction.end();
else
    transaction.rollback();

see https://github.com/Vincit/objection.js/pull/44


warning on react-particles lib

When I'm building I got:
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>

The library is deprecated...
The fix:
remove the package and install
"react-tsparticles": "2.5.3",

(and change the relevant import in the project...)


ci: update workflow

This PR:

Removes Git credentials/SSH keys after checkout as a security precaution by setting persist-credentials to false, they are not used after the initial checkout
Adds --ignore-scripts option to pnpm install command to protect against malicious scripts in dependencies
Enables concurrency in ci.yml; see related docs, this allows a subsequently queued workflow run to interrupt previous runs in PRs

That's just fantastic! Thank you for your contribution. I greatly appreciate your time.


DOC: add pybind11 to the other part of quickstart guides

Follow-up to #10412

Merging right away, lgtm.


[Bug]: Unable to Register Korifi as a Cloud Foundry Endpoint in Stratos

What happened?
I have Korifi & Stratos running on Kubernetes but I am unable to Register Korifi as a Cloud Foundry Endpoint in Stratos.
What you expected to happen
We should be able to Register Korifi as a Cloud Foundry Endpoint in Stratos.
Acceptance Criteria
GIVEN I have Stratos & Korifi Setup
WHEN I Register Korifi as Cloud Foundry Endpoint in Stratos
THEN I Should be able to Successfully Register Korifi as a Cloud Foundry Endpoint and Manage Korifi via Stratos
How to reproduce it (as minimally and precisely as possible)

Login to Stratos
Navigate to Endpoints
Click on Add Endpoint button
Select Cloud Foundry as Endpoint Type
Enter details of Korifi Endpoint
Click Register

Anything else we need to know?
No response
Environment
Revision of codebase:latest
Kubernetes version (use kubectl version):
Client Version: v1.26.0
Kustomize Version: v4.5.7
Server Version: v1.25.3
Others: Stratos version : 4.4.0

Hi @vineethvkumar!
As Korifi leverages Kubernetes authentication and authorization, clients need to authenticate differently than with traditional CF. The CF CLI is currently the only client supporting us.
It shouldn't be too hard to add Korifi support to Stratos, as they can already authenticate against Kubernetes. Unfortunately, the project seems to be unmaintained, and it's been removed from its working group charter. A call for maintainers is still in progress but hasn't resulted in anything concrete yet.
I'm going to close this bug as there's nothing else we can do at the moment. Anyone interested in working on Korifi support for Stratos can get in touch with us and we'll be happy to help.


Improve comments

Description
N/A
Alternate Designs
N/A
Benefits
N/A
Possible Drawbacks
N/A
Applicable Issues
N/A

Codecov Report

Merging #39 into master will increase coverage by 0.6%.
The diff coverage is 93.33%.

@@            Coverage Diff            @@
##           master      #39     +/-   ##
=========================================
+ Coverage   96.44%   97.05%   +0.6%
=========================================
  Files           3        3
  Lines         169      170      +1
=========================================
+ Hits          163      165      +2
+ Misses          6        5      -1

Impacted Files
Coverage Δ

src/resources.rs
96.77% <100%> (ø)
:arrow_up:

src/generators/names.rs
97.1% <92.85%> (+0.75%)
: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 2e20917...fb77385. Read the comment docs.


Addon Rework - Per-Core Addons with Manager

Now add-ons are added per core with a manager, which allows add-ons to be added and memory recovered if an add-on is not used.

Tested and working on my end. Good to merge if you are


[FEATURE] implement spinner for better UX

Fixes Issue
Closes #5366
Changes proposed

[x] Implemented Loader to render in-between page change

Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[ ] My change requires changes to the documentation.
[ ] I have updated the documentation accordingly.
[x] All new and existing tests passed.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

Screenshots

Thank you for your contribution but issue #5366 is still awaiting triage by the maintainers and is not status: ready for dev. I have closed issue #5366 as it is a duplicate of https://github.com/EddieHubCommunity/LinkFree/issues/3900 (which is currently in blocked status, please read the issue for further information)
Please read our contributing guidelines to avoid you doing unnecessary work https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md

Ah I didn't see that my bad, thanks anyways tho!


AddMvcCore should include AddAuthorization

It's far too easy to think you're secure with the [Authorize] attribute.

This behavior is intended. AddMvcCore is intended to allow you to replace the authorization system if you so desire.


Develop update offer get_meta_data

Coverage increased (+0.07%) to 86.559% when pulling 2baf9d75f211aa1dad983bafc02550222e408922 on Em-jey:develop into eaee04db3846e7e017c45e429a850ddc10b21c27 on limebrains:master.


feat(settings): add new option to choose the exact meeting date on S-140

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


[AMBARI-23020] Decreasing the log level from WARN to DEBUG in case we use the default value of an undefined LDAP configuration element

What changes were proposed in this pull request?
Lowering the log level to DEBUG when an LDAP configuration element's default value is used (i.e. it's not stored in the DB).
How was this patch tested?
Latest JUnit test results in ambari-server:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25:41 min
[INFO] Finished at: 2018-02-19T14:35:33+01:00
[INFO] Final Memory: 214M/832M
[INFO] ------------------------------------------------------------------------

Besides this I re-deployed my ambari-server using the new JAR I built locally and queried a previously saved LDAP configuration;  checking the log files I found that the "...using default value" log entries are no longer there.

@rlevas @zeroflag @dlysnichenko Please review this PR! Thanks!

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/690/
Test FAILed.
Test FAILured.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/694/
Test FAILed.
Test FAILured.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/696/
Test FAILed.
Test FAILured.

Now Ambari Web is failing... :(
retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/701/
Test FAILed.
Test FAILured.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/711/
Test FAILed.
Test FAILured.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/718/
Test PASSed.

@rlevas @zeroflag @dlysnichenko
Tests passed (finally); could any of you merge this PR? Thanks!


Quilt Incompatibility

Despite being marked as compatible for Quilt on Modrinth, as of QSL+QFAPI 9.0.0-alpha.5+0.96.11-1.20.4, the mod is incompatible with Quilt.
Crash Report: https://pastebin.com/qrEqymvx
Log: https://mclo.gs/limj9O5
If it would be possible to make a fix for Quilt, i feel it'd be appreciated by users. Or please go and unmark the versions as Quilt Compatible

Legacy4J is compatible with Quilt, but not with the Quilted Fabric API, which for some reason changed support for builtin Resource Packs, you must use the Fabric API

Ideally you should report this to the Quilted Fabric API issue tracker as it IS an incompatibility with Fabric API

https://github.com/QuiltMC/quilted-fabric-api/issues/168#issuecomment-2246042185


Clarify DRBG seeding.

There is a legacy code path that OpenSSL won't use anymore but applications could.  Add a comment indicating this to avoid confusion for people not intimately conversant with the nuances in the RNG code.

[x] documentation is added or updated
[ ] tests are added or updated

Not sure what the @paulidale [Merge branch 'master' of github.com:openssl/openssl into rng-comment](https://github.com/openssl/openssl/pull/24745/commits/8c52b8bbd4ace4bb19883b61d18c34fc65a9ab68) line is about.

I did a fixup to remove a spurious single quote.  This will need reapproval but I don't think it should reset the timer.

approval holds

Not sure what the @paulidale [Merge branch 'master' of github.com:openssl/openssl into rng-comment](https://github.com/openssl/openssl/pull/24745/commits/8c52b8bbd4ace4bb19883b61d18c34fc65a9ab68) line is about.

You probably clicked on something in the Github UI that created the merge commit. It can be dropped when merging.

The confusing part is that I was not awake when it happened.

24 hours has passed since 'approval: done' was set, but as this PR has been  updated in that time the label 'approval: ready to merge' is not being automatically set.  Please review the updates and set the label manually.

Merged, thanks for the reviews.


add: ID Generator option

Codecov Report

Merging #3 (91f53c2) into main (31c3197) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main        #3   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            1         2    +1
  Lines           32        42   +10
=========================================
+ Hits            32        42   +10

Impacted Files
Coverage Δ

opts.go
100.00% <100.00%> (ø)

tracing.go
100.00% <100.00%> (ø)

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 31c3197...91f53c2. Read the comment docs.


node: Don't skip masquerading for External node IPs

See commits for details. The first has the fix, the second documents the different between our two implementations.
Fixes: https://github.com/cilium/cilium/pull/16603.
Related: https://github.com/cilium/cilium/issues/17177.

Hence, this commit changes the logic to only skip masquerading in iptables for Internal node IPs. This commit doesn't affect the BPF-based masquerading logic, as unfortunately we can't easily distinguish between Internal and External node IPs in our datapath today (both are identified as host or remote-node).

I think we should document this subtle difference in the masquerading.rst.

I think we should document this subtle difference in the masquerading.rst.

@brb :+1: Done in the second commit. Please have a look.

/test

test-runtime

Several tests failed with known flakes:

GKE with https://github.com/cilium/cilium/issues/17307.
k8s-1.22-kernel-4.19 with https://github.com/cilium/cilium/issues/18318 and https://github.com/cilium/cilium/issues/18447.
k8s-1.23-kernel-net-next with https://github.com/cilium/cilium/issues/18520.

Reviews are in, except for the agent team, but I'm not sure why that team was requested in the first place. Marking ready to merge.


GEODE-4869: Move all the Configuration objects to a public package

fixed packages for config objects in sanctioned-geode-core-serializables.txt

Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

[x] Has your PR been rebased against the latest commit within the target branch (typically develop)?

[x] Is your initial contribution a single, squashed commit?

[x] Does gradlew build run cleanly?

[ ] Have you written or updated unit tests to verify your changes?

[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to<EMAIL_ADDRESS>

Closing this PR as the fix is already on develop with commit 8da6377


Different values of reuseCount in different groups

Hi, thank you very much for your incredible work.
How can I define reuseCount differently in different groups? I tried it this way, but it seems not working.
   	{
   		module: "MMM-ValuesByNotification",
   		disabled: false,
   		position: "top_right",
   		header: "Informationen",
   		config: {
   		 groups: [
   		  {
   		   groupIcon: "fa fa-car",
   		   valueFormat: "\"${value}\".replace(\"ON\",\"Tor zu\").replace(\"OFF\",\"Tor auf\")",
   		   reuseCount: 10080,
   		   items: [
   			{
   				notification: "GPTOR",
   				valueTitle: "Passat",
   				values: [
   				 {},
   				]
   			},
   			{
   				notification: "GATOR",
   				valueTitle: "Audi",
   				values: [
   				 {},
   				]
   			},
   		   ]
   		  },
   		  {
   			// group2
   			groupTitle: "Power",
   			groupIcon: "fa fa-plug",
   			reuseCount: 60,
   			items: [
   				{
   					notification: "POWER",
   					unitSpace: true,
   					values: [
   					 {
   					   valueUnit: "W",
   					 },
   					]
   				   },
   			],
   		  },
   		 ]
   		},
   	   },

After a few minutes the values of GATOR und GPTOR change to "na".

Hi,
i only had implemented to set the reuseCount on item level but i released a new version a couple of seconds ago.
It should be possible, now

Thanks again!
General options gave me the impression that it also works on group level.

Your welcome.
You are right. The docs did not correspond with the code in this point.


Deactivating wheel

Is there an appropriate way to exit/unplug the wheel? When I unplug the wheel it switches back to "no wheel connected" and then I exit out of the app, but it still thinks there's a controller plugged in. So if I then plug in a different controller after it defaults it to second player. Is there a proper way to exit out to avoid this?

Right now there isn't, but I'll see if I can have it automatically disconnect when the wheel is unplugged. For now, you can stop the "Wheel Compatibility Service" in the Windows services app and it should disconnect the virtual controller.


Support i18n

Description / Summary
When language: fr is enabled in _config.yml, the theorems/examples/… display english strings and are not translated.
Value / benefit
When publishing a course/document in other language, such as French, it would be interesting to have the name translated.
Implementation details
No response
Tasks to complete

[x] Implement the i18n framework in the extension
[ ] Translate the strings.

I've opened the PR #71 for this, but I'm a bit stuck in the process.

String translation on https://smodin.io/translate-one-text-into-multiple-languages is limited to 5/day.


fix(material/table): switch back to class-based styling for flex tables

In an earlier PR we switched the flex-based table styles to target the tag names, rather than classes in order to support flex tables in MDC. The problem with targeting tag names is that it doesn't allow our styles to be applied to other elements within the table. E.g. in #22349 the user isn't able to target the "no data" row.
These changes switch back to targeting classes and add some styles to prevent the flex-specific styles from bleeding into the table-based ones.
Fixes #22349.

Caretaker note: these changes will increase the specificity of some selectors. We should determine whether to move forward with the fix based on the amount of breakages in g3.


fix empty servicePath in discovery

The discovery test was not catching this issue in part because it wasn't
using the exact same JSON serialization as it does at runtime. That has
also been fixed. This change will likely reintroduce empty maps in
serialization, but this is currently the best workaround to allow empty
strings inside maps, which we need to serialize the discovery document
correctly.

Codecov Report

Merging #76 into master will decrease coverage by 0.12%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master      #76      +/-   ##
============================================
- Coverage     79.49%   79.36%   -0.13%
+ Complexity     1619     1617       -2
============================================
  Files           154      154
  Lines          5447     5447
  Branches        701      701
============================================
- Hits           4330     4323       -7
- Misses          840      849       +9
+ Partials        277      275       -2

Impacted Files
Coverage Δ
Complexity Δ

...va/com/google/api/server/spi/ObjectMapperUtil.java
46.66% <100%> (-15.56%)
4 <0> (-2)

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 fa30223...3ceda5d. Read the comment docs.


Zero copy may lead to wrong text generation results

Hi,
I was trying the "zero copy" method in the t5 notebook on a seq2seq transformer model. When I set the clone_tensor to True everything looks fine, just not as much speedup as I expected.
When I tried to set the clone_tensor to False, the text generation gives wrong results (some are repetitive ids). I debugged a bit and found that although the binding inputs are the same as when clone_tensor is True, after run_with_io_binding the results are different. It seems that it could be somehow fixed by not reusing the iobinding, but at some steps, generating a new iobinding, but I really have no clue why.
I'm still playing with it and can post some code snippets later, but wonder if you have encountered something like this (different results when switching between clone_tensor and if you have any suggestions. Thanks!

I tested a lot the clone tensor set to False for obvious reason and had no issue at the time. Did you test with ORT 1.11 ?

Thanks for the reply! I was testing with ORT 1.12. It might be due to the model implementation(since I was using Pegasus instead of T5, and had to modify the code a bit to make it work). It's quite some code so I need some time to put them together and showcase. I will update this thread.

@pommedeterresautee Here are the notebooks to replicate the error. To make things easier I use a t5 model for illustration.
I first run make docker_build from a clean transformer-deply directory, then run docker run -p 8686:8686 -v $PWD/demo/generative-model:/docker_folder ghcr.io/els-rd/transformer-deploy:latest \   bash -c "cd /docker_folder && jupyter notebook --ip <IP_ADDRESS> --port 8686 --no-browser --allow-root" to start docker container & notebook server.
This notebook is for exporting the ONNX. I am using fp32 instead of trying to do fp16.
This notebook shows the inference. When the clone_tensor is set to False, the result shows a lot of 0s. When setting the clone_tensor to True, the inference result is the same as pytorch result.
I was using a g5.2xlarge instance.
Can you please help take a look?

@brevity2021 it may not be relevant anymore since your question was a while ago, but I noticed the same thing when modifying the approach to T5 for another model. Downgrading onnxruntime-gpu to 1.11 fixed the issue for me.

Strangely though, even though outputs with the cache are correct after downgrading ORT, that approach is almost 4x slower than using only a decoder without cache support and ~2x slower than the vanilla pytorch implementation. Do you have any idea why that might be @pommedeterresautee? I'm using a similar seq2seq model so not a lot has changed from the T5 build.

@c-schumacher This [notebook] mentions "Version 1.11.1 of ONNX Runtime and older have a bug which makes them much slower when most inputs are used by subgraphs of an If node.
Use a version >= 1.12.0 instead."
This might be the reason of your slow speed. Although downgrading to 1.11 might be good for the non-copy to work, it introduces other problems.
For my case, setting clone_tensor to False does not work for ORT >= 1.12.


Support setting revs_limit via REST in LiteServ

@sethrosetter Does this block your auto-mate testing?

No. However, now would be a good time to discuss matching the rest options that liteserv-ios has and making sure Xamarin.iOS and Xamarin.Android liteserv are consistent as well.

@sethrosetter Tomorrow's all platforms sprint planing is good time to discuss this topic.


publishing JS runtime to azure functions results in a misconfiguraiton

Describe the bug
When I publish a Javascript runtime to the Azure Functions target, I get an error in Azure:

This may be related to the FUNCTIONS_WORKER_RUNTIME setting, which is always set to dotnet

Version
wenyluo/provision branch
To Reproduce

Create an azure functions environment
Eject runtime and select JS
Publish to azure functions
Navigate to the azure portal and look at the "overview" tab - you will see an error.

Expected Behavior
The publishing tool should set the necessary configuration to run the language I am using.

@luhan2017 was this addressed in the recent provisioning work that is in v1.3?

@a-b-r-o-w-n not yet... we are still investigating on this. will update later.


extra "-" at the end of the signing key install

xx@xx:~$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –
gpg: can't open '–': No such file or directory
xx@xx:~$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add
OK
xx@xxi:~$ sudo apt-key list
/etc/apt/trusted.gpg
pub   rsa2048 2015-10-28 [SC]
BC52 8686 B50D 79E3 39D3  721C EB3E 94AD BE12 29CF
uid           [ unknown] Microsoft (Release signing<EMAIL_ADDRESS>

@Guillaume-Fourrat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

As indicated in issue  #3000 :
the dash is in fact correct (thanks @msebolt for pointing it out).
But in our doc we used a EnDash ASCII 0x96 instead of regular hyphen ASCII 0x2D.
So solution is either change trailing En-dash to actual hyphen
OR
as in initial PR, delete the En-dash althogether, as the apt-key add also works with default piping redirection.

Verifying

Merge Conflict arose and must now be fixed, between this public PR #2901 versus private PR #11899 .

https://github.com/MicrosoftDocs/sql-docs-pr/pull/11899

Assuming people are conscientious about doing frequent/timely GIT PULL UPSTREAM MASTER in the private repo ('sql-docs-pr'), we know this type of conflict problem is an unnecessary painful risk when Microsoft employees use the public repo ('sql-docs'). Microsoft employees should make their PRs in the private repo only.
Going forward, please use the private repo for PRs.  Thanks.
( @Guillaume-Fourrat @MikeRayMSFT @Peter-Msft @rothja )


METS files need to follow the official METS Schema version 1.11  - MoSCoW?

Section 5.3 https://dilcisboard.github.io/E-ARK-CSIP/specification/implementation/metadata/#53-use-of-mets the first sentence states:

The main requirement for METS files in a CS IP Information Package is that these need to follow the official METS Schema version 1.11 .

I guess that this sentence need to be isolated to a MoSCoW requirement with an ID as the rest of the requirements?

The current standard used is METS and the schema now is version 1.12. We should perhaps omit the version number?


segfault when inverting matrix containing nans

On x86_64 Linux, using 0.2.16.dev, I'm getting a crash when using dgretrf/dgetri to
invert a general (square) matrix with nan values. Obviously one should not pass
such a matrix to such a function, but this can happen inadvertently and BLAS really
shouldn't crash. The regular netlib doesn't crash. I'm attaching a test program that
demonstrates the issue. I'm also attaching the valgrind log from the crash.
valgrind.log.txt
blascrash.c.txt

Probably same issue as #671 - with NaN elements, the function that computes the pivot point returns "some array element number" in netlib, while the machine-optimized version in OpenBLAS currently returns "some number" which can be outside the bounds of the array. As a stopgap solution for #671, the returned value was clamped in the caller, while the general solution needs to be in the called function. (Though using nan values arguably takes you into the realm of "undefined behaviour", which may include crashes, flying pigs or any combination thereof)

Ah, thanks! I just noticed #671 myself. I'll try clamping the ipiv values from dgetrf.
As for undefined behaviour, I don't think that should be the case. According to the netlib LAPACK FAQ one should be able to expect IEEE-754 behavior: "LAPACK, version 3.0, introduced new routines which rely on IEEE-754 compliance. [...] As a result, two settings were added to LAPACK/SRC/ilaenv.f to denote IEEE-754 compliance for NaN and infinity arithmetic, respectively. By default, ILAENV assumes an IEEE machine [...]"

That may be their goal, but see #642 and associated netlib bug - probably not everything in LAPACK is NaN-safe yet.

Granted. And it's true that the pivot order is undefined if the matrix contains NaNs. I wouldn't object if dgetrf flagged an error. However, I think that dgetrf returning out-of-bounds values in the pivot array is a bug. Many of us expect OpenBLAS to work like netlib lapack/blas (but much faster -- thanks, developers!), so if "info" is clear when dgetrf returns, we don't expect a subsequent call to dgetri to destroy the heap and crash our application.

Does not crash with netlib  lapack + openblas blas (pthread,omp,single)
The crash is in dswap routine which does not care about numeric values.

Something corrupts one of pointers before invert_general_matrix (testcase.c:54)
Can you print all pointers before and after each dgetr?_ call ?
(relevant part of helgrind output)
==78412== Process terminating with default action of signal 11 (SIGSEGV)
==78412==  Access not within mapped region at address 0x2805B286E0
==78412==    at 0x606B5ED: dswap_k_SANDYBRIDGE (in /usr/lib64/libopenblas_pthreads.so.0)
==78412==    by 0x5182EA6: legacy_exec (in /usr/lib64/libopenblas_pthreads.so.0)
==78412==    by 0x518364F: exec_blas (in /usr/lib64/libopenblas_pthreads.so.0)
==78412==    by 0x5183BD2: blas_level1_thread (in /usr/lib64/libopenblas_pthreads.so.0)
==78412==    by 0x4F6FAA1: dswap_ (in /usr/lib64/libopenblas_pthreads.so.0)
==78412==    by 0x690FB82: dgetri_ (in /usr/lib64/libopenblas_pthreads.so.0)
==78412==    by 0x400B0A: invert_general_matrix (testcase.c:54)
==78412==    by 0x400C3C: main (testcase.c:83)
==78412==  If you believe this happened as a result of a stack
==78412==  overflow in your program's main thread (unlikely but
==78412==  possible), you can try to increase the size of the
==78412==  main thread stack using the --main-stacksize= flag.
==78412==  The main thread stack size used in this run was 8388608.

In my testing, there's no problem with the pointers before the second call to dgetri (the first call is just a workspace query, but on the second call dgetri tries to make use of the invalid ipiv array generated by dgetrf). I'm attaching a revised version of my test program, and its output.
blascrash2.c.txt
(The C file is given a ".txt" suffix because GitHub won't accept *.c files!)
output.txt

Maybe i am wrong, but seems to fail to read 2nd matrix (bt, disas /0x.... i.e search crash address in gdb)
0x00007ffff69363c8 <+456>:   test   $0x2,%rdi
0x00007ffff69363cf <+463>:   jle    0x7ffff69363f0 <dswap_k_ATOM+496>
0x00007ffff69363d1 <+465>:   movaps -0x80(%rcx),%xmm0
=> 0x00007ffff69363d5 <+469>:   movaps -0x80(%r9),%xmm1
0x00007ffff69363da <+474>:   movaps %xmm0,-0x80(%r9)
0x00007ffff69363df <+479>:   movaps %xmm1,-0x80(%rcx)
0x00007ffff69363e3 <+483>:   add    $0x10,%rcx

To spell it out, the second element of the ipiv array generated by dgetrf is 11 while the dimension of the matrix is 10 - this is the similarity to #671. A simple
for (int ii=0;ii<dim;ii++){
fprintf(stderr,"ipiv[%d]=%d\n",ii,ipiv[ii]);
if (ipiv[ii]<0 || ipiv[ii]>dim) ipiv[ii]=dim;
}
inserted between the calls to dgetrf and dgetri makes the crash go away. But this is just papering over part of the bug, where ipiv[2] is outside the bounds already when used within dgetf2_k - the actual cause appears to be (like idamax in #671) the invalid result of IAMAX_K as called in line 96 of lapack/getf2/getf2_k.c.
If I put an  "if (jp>n) jp=n;" there before the assignment to ipiv[j+offset], all the valgrind warnings (from accesses beyond the end of the array in the next iteration) go away.
I suspect 5a291606a did not address this particular code path, as all it does is clamp MAX_K as
obtained in interface/imax.c, which does not appear to figure in the sequence of events here.

Hi,
I wrote the following test code:
#include <stdlib.h>
#include <stdio.h>
extern int idamax_( int *N, double *x, int *INC_X);
main()
{
int n=6;
int inc_x =1;
double x[6] = { 0.1, 0.2, 0.3, 0.2, 0.1, 0.0 };
int i;
int j;
i = idamax_(&n, x, &inc_x);
printf("Normal                   :\t\t%d\t%f\n",i,x[i-1]);

x[3]=1.0/0.0;
i = idamax_(&n, x, &inc_x);
printf("With INF at position 4   :\t\t%d\t%f\n",i,x[i-1]);

x[3]=0.0/0.0;
i = idamax_(&n, x, &inc_x);
printf("With NAN at position 4   :\t\t%d\t%f\n",i,x[i-1]);

x[3]=0.2;
x[0]=0.0/0.0;
i = idamax_(&n, x, &inc_x);
printf("With NAN at position 1   :\t\t%d\t%f\n",i,x[i-1]);

x[0]=0.1;
x[1]=0.0/0.0;
i = idamax_(&n, x, &inc_x);
printf("With NAN at position 2   :\t\t%d\t%f\n",i,x[i-1]);

for ( j=0; j<n; j++)
	x[j]=0.0/0.0;

i = idamax_(&n, x, &inc_x);
printf("With NAN at all positions:\t\t%d\t%f\n",i,x[i-1]);

}
The results are:
Linked with refblas:
Normal                   :		3	0.300000
With INF at position 4   :		4	inf
With NAN at position 4   :		3	0.300000
With NAN at position 1   :		1	-nan
With NAN at position 2   :		3	0.300000
With NAN at all positions:		1	-nan
Linked with OpenBLAS generic kernel:
Normal                   :		3	0.300000
With INF at position 4   :		4	inf
With NAN at position 4   :		3	0.300000
With NAN at position 1   :		1	-nan
With NAN at position 2   :		3	0.300000
With NAN at all positions:		1	-nan
Linked with OpenBLAS optimized kernel:
Normal                   :		3	0.300000
With INF at position 4   :		4	inf
With NAN at position 4   :		3	0.300000
With NAN at position 1   :		1	-nan
With NAN at position 2   :		2	-nan
With NAN at all positions:		1	-nan
The optimized kernel, where idamax is written in assembly,
computes a wrong result, if a nan appears before the max value.
Best regards
Werner

@martin-frbg , you are right. I just modified interface/imax.c and forgot to modify other function which directly use i?amax kernels.

Glad to know that my comment was not completely wrong. Once the assembler code is improved, none of these guards should be strictly necessary anymore, at least three tickets can be closed for good (if I counted correctly), and maybe I can even learn a bit more about x86 assembler from comparing the old and new versions then.


Possibly can remove VSCode display error overrides - current extension doesn't use them

Relies on Base.display_error instead.

Okay it's more complicated than that, but I should look into what they're doing here: https://github.com/julia-vscode/julia-vscode/pull/3389

Done


Describe extended QP ranges in the manual

See #1980
It looks currently MSDK manual doesn't mention it.

@saosipov , any update?

@vilichev can you please follow up?


Double check there's sufficient clearance for the display

It looks like the screen may be bowing a little in the current implementation.

👌🏻


What about Ports?

How does one specify a different port? Is that a matter of specifying the server and then ',<port>'? Like so:
"Server=(localdb)\mssqllocaldb,1633;Database=EFGetStarted.ConsoleApp.NewDb;Trusted_Connection=True;"

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

ID: de9db02d-7310-1141-6aeb-539c02326a36
Version Independent ID: 90062036-aa01-3f73-dac9-b4a092245721
Content: Connection Strings - EF Core
Content Source: entity-framework/core/miscellaneous/connection-strings.md
Product: entity-framework
GitHub Login: @rowanmiller
Microsoft Alias: divega

@ecoffman this topic is not trying to cover every possible option of specific database providers, just the patterns that you can use to provide the connection string when working with EF Core.
But to answer your question, LocalDB uses named pipes, and the (localdb)\name syntax is a shortcut. If you want to use a port, I assume you want to use the TCP transport, in which case you can use tcp:servername, port. This is documented in the SQL Server topic at https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.connectionstring?redirectedfrom=MSDN&view=netframework-4.7.2#remarks (look for the Data Source section).


Resolve issue with deploy script

Who is this PR for?
developers, me specifically
What problem does this PR fix?
deploy script didn't work for me today, not sure why.  Example output:
$ scripts/deploy/all.sh
🚢  Fetching from GitHub...
🚢  Deploying...
yarn run v1.3.2
warning ../package.json: No license field
$ /Users/krobinson/Documents/github/studentinsights/node_modules/.bin/concurrently --names demo,somerville,new-bedford -c yellow.bold,blue.bold,magenta.bold scripts/deploy/deploy.sh demo scripts/deploy/deploy.sh somerville scripts/deploy/deploy.sh new-bedford
[somerville] /bin/sh: demo: command not found
[] /bin/sh: somerville: command not found
[] /bin/sh: new-bedford: command not found
[] scripts/deploy/deploy.sh exited with code 0
[new-bedford] scripts/deploy/deploy.sh exited with code 0
[demo] scripts/deploy/deploy.sh exited with code 0
[] new-bedford exited with code 127
[] somerville exited with code 127
[somerville] demo exited with code 127
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
🚢  Done.

What does this PR do?
It looks like there's some kind of escaping issue.  This escapes the quotes around each command, and this resolved the problem for me.

selfie

Weird, after this change I'm not able to use the deploy/all.sh script. I get similar weird errors which I'll paste below. I'm using Zsh and I wonder if it handles escaping slightly differently.

hmm, yeah I don't get why this stopped working.  Does it help to add #!/bin/sh at the top of this script?  The one on master still works for me with that at the top.  If not and you can share errors we can try to sort it out.

No, unfortunately #!/bin/sh at the top of the script doesn't fix it.

What do you see?

@alexsoble That error message looks like a typo in the deploy script name (/bin/sh: scripts/deploy/deploy.s: No such file or directory with .s at the end of the filename instead of .sh).  Is that what you see?

That does seem to be what the error message is saying. But my local, broken copy of all.sh references scripts/deploy/deploy.sh three times, no typo involved. Also hard to see how I could have a typo locally that wouldn't also be reflected on GitHub and on your copy, since the script is broken for me when I'm totally up-to-date with master.
Here's a screenshot of my Sublime, in case that helps. Might be a red herring, but interesting to me how the sh is highlighted below. That might speak to why it's being parsed wrong on my local machine.

Yeah, I'm not sure how to help more.  You could try:
$ sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.

Or if you can modify the script to make it work for you and push it, I can work around and make it work on my computer.

@kevinrobinson Or we could have two scripts in the folder!


Where HasData fails

HasData relies completely on migrations, so if you already had data in that table before adding HasData migration next time you will try to migrate an exception will be thrown. There is no way to check if data already exists in the table you want to seed. I think that seeding using the old way (without HasData) inside using (var serviceScope = webHost.Services.CreateScope()) is more advantageous because you can check if data exists before seeding, not if migration was applied.
So Imagine we have 2 migrations, first migration creates the table, some data was added to that new table in the meantime, after some time we decide we want to seed the table with some default rows but the problem is there are already some rows in the table and we can't protect ourselves against it. Just 1 problem showing that manual seeding like before EF Core 2.1 is superior to HasData.

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

ID: fc418ab9-0592-f610-e751-40cb501220da
Version Independent ID: 822e8923-2647-f573-0c74-66af903776d8
Content: Data Seeding - EF Core
Content Source: entity-framework/core/modeling/data-seeding.md
Product: entity-framework
GitHub Login: @AndriySvyryd
Microsoft Alias: divega

Yeah, faced the same issue today =(
Actually, as for me, old plain SQL seems to remain the most reliable and flexible option to perform data seeding in EF Core.
This 'HasData' look like a workaround, applicable for a initial development, when you always can drop & recreate a development database from the scratch. But not a reliable solution for production DB migrations, unless you are using SQL script generation and further manual SQL script corrections for migrations.

HasData has many drawbacks and limitations compared to the traditional seeding approach, but if your scenario is supported it makes the deployment process simpler by integrating seeding into migrations.

@AndriySvyryd thanks for clearing this up. I think because of these drawbacks I just prefer to use custom seeding.


open CanIUse for Babylon.js

Babylon.js is the world standard for internet game design, and so it would be very helpful to know if you could use it

Caniuse only tracks browser features, not library/frameworks. Will leave this issue open to add a search result.

Added as search result at https://caniuse.com/#search=babylonjs


Support rubies other than MRI

[ ] Rewrite the c-extension part of byebug in pure ruby and install the c-extension only when possible.
[ ] Add a java extension. A starting point could be this: https://github.com/ruby-debug/ruby-debug

I'll join this request to support Rubinius.

@bararchy That's very unlikely because Rubinius does not implement the TracePoint API (what Byebug uses under the hood) and I think they provide their own debugger...

I am trying to revive debugger support for JRuby and have filed issues with debug.gem and ruby-debug to that end. I'm unsure whether it's worth the effort to add byebug support at this point, or if we should just assume debug.gem will become the standard everyone uses from now on.
https://github.com/ruby/debug/issues/1120
https://github.com/ruby-debug/ruby-debug/issues/32
JRuby also supports debugging using standard JVM tooling, but it's rather foreign to a Ruby user because our classes and objects are structured so differently from Java's.


wireguard-tools Add proper dependencies

wg-quick calls iproute, resolvconf and sysctl on Linux.
These dependencies where missing.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Confirmed locally and by checking sources.

@exi thanks!


HACS submission

PR submitted here

HACS currently has a massive backlog! PRs merged now are from February!! I guess it will take some time before we're officially on HACS.


feat: completion of docker mutil stage build

I think vs and vscode configuration should be ignored

Yes, we do have, between line 32 - 33


Installing on Rust nightly fails with "expected unit struct/variant or constant, found tuple variant RangeEnd::Included"

% rustc --version
rustc 1.22.0-nightly (0e6f4cf51 2017-09-27)
% cargo install --force rustfmt-nightly
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing rustfmt-nightly v0.2.7
   Compiling void v1.0.2
   Compiling log v0.3.8
   Compiling num-traits v0.1.40
   Compiling term v0.4.6
   Compiling getopts v0.2.15
   Compiling utf8-ranges v1.0.0
   Compiling quote v0.3.15
   Compiling rustfmt-nightly v0.2.7
   Compiling regex-syntax v0.4.1
   Compiling unicode-segmentation v1.2.0
   Compiling lazy_static v0.2.8
   Compiling unicode-xid v0.0.4
   Compiling serde v1.0.15
   Compiling dtoa v0.4.2
   Compiling itoa v0.3.4
   Compiling libc v0.2.31
   Compiling diff v0.1.10
   Compiling unreachable v1.0.0
   Compiling strings v0.1.0
   Compiling synom v0.11.3
   Compiling memchr v1.0.1
   Compiling thread_local v0.3.4
   Compiling syn v0.11.11
   Compiling aho-corasick v0.6.3
   Compiling serde_json v1.0.3
   Compiling toml v0.4.5
   Compiling regex v0.2.2
   Compiling serde_derive_internals v0.16.0
   Compiling serde_derive v1.0.15
   Compiling env_logger v0.4.3
error[E0532]: expected unit struct/variant or constant, found tuple variant `RangeEnd::Included`
  --> /Users/fsouza/.cargo/registry/src/github.com-1ecc6299db9ec823/rustfmt-nightly-0.2.7/src/patterns.rs:62:17
   |
62 |                 RangeEnd::Included => rewrite_pair(
   |                 ^^^^^^^^^^--------
   |                           |
   |                           did you mean `Excluded`?

error: aborting due to previous error

error: failed to compile `rustfmt-nightly v0.2.7`, intermediate artifacts can be found at `/var/folders/t4/s5cn564x04j7s6nz7w_8cd3c0000gp/T/cargo-install.JyUUZ62SqT36`

Caused by:
  Could not compile `rustfmt-nightly`.

To learn more, run the command again with --verbose.

Installing rustfmt from master works, maybe it needs a new release?

There doesn't seem to be a nightly-0.2.8 tag and crates.io still shows the version of rustfmt-nightly as 0.2.7.  Do I just need to wait longer or does something else need to be done?

Yeah, I'm still getting 0.2.7 as well:
% cargo install --force rustfmt-nightly
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing rustfmt-nightly v0.2.7
   Compiling serde v1.0.15
   Compiling getopts v0.2.15
   Compiling num-traits v0.1.40
   Compiling term v0.4.6
   Compiling void v1.0.2
   Compiling libc v0.2.31
   Compiling regex-syntax v0.4.1
   Compiling unicode-xid v0.0.4
   Compiling diff v0.1.10
   Compiling dtoa v0.4.2
   Compiling log v0.3.8
   Compiling quote v0.3.15
   Compiling lazy_static v0.2.8
   Compiling rustfmt-nightly v0.2.7
   Compiling unicode-segmentation v1.2.0
   Compiling utf8-ranges v1.0.0
   Compiling itoa v0.3.4
   Compiling unreachable v1.0.0
   Compiling memchr v1.0.1
   Compiling synom v0.11.3
   Compiling strings v0.1.0
   Compiling thread_local v0.3.4
   Compiling aho-corasick v0.6.3
   Compiling syn v0.11.11
   Compiling serde_json v1.0.3
   Compiling toml v0.4.5
   Compiling regex v0.2.2
   Compiling serde_derive_internals v0.16.0
   Compiling serde_derive v1.0.15
   Compiling env_logger v0.4.3
error[E0532]: expected unit struct/variant or constant, found tuple variant `RangeEnd::Included`
  --> /Users/fsouza/.cargo/registry/src/github.com-1ecc6299db9ec823/rustfmt-nightly-0.2.7/src/patterns.rs:62:17
   |
62 |                 RangeEnd::Included => rewrite_pair(
   |                 ^^^^^^^^^^--------
   |                           |
   |                           did you mean `Excluded`?

error: aborting due to previous error

error: failed to compile `rustfmt-nightly v0.2.7`, intermediate artifacts can be found at `/var/folders/t4/s5cn564x04j7s6nz7w_8cd3c0000gp/T/cargo-install.jkVr74XN3lsC`

Caused by:
  Could not compile `rustfmt-nightly`.

To learn more, run the command again with --verbose.

@topecongiro can you double check?

Sorry for the inconvinience. For now, could you please install from source?
git clone https://github.com/rust-lang-nursery/rustfmt
cargo install --force rustfmt-nightly

@topecongiro that doesn't seem to work for me.
$ cargo install --force                                                                 ~/Code/play/rustfmt
  Installing rustfmt-nightly v0.2.8 (file:///home/isaac/Code/play/rustfmt)
   Compiling rustfmt-nightly v0.2.8 (file:///home/isaac/Code/play/rustfmt)
error[E0432]: unresolved import `syntax::ast::RangeSyntax`
  --> src/patterns.rs:11:72
   |
11 | use syntax::ast::{self, BindingMode, FieldPat, Pat, PatKind, RangeEnd, RangeSyntax};
   |                                                                        ^^^^^^^^^^^ no `RangeSyntax` in `ast`

error[E0532]: expected tuple struct/variant, found unit variant `RangeEnd::Included`
  --> src/patterns.rs:63:21
   |
63 |                     RangeEnd::Included(RangeSyntax::DotDotDot) => "...",
   |                     ^^^^^^^^^^^^^^^^^^ not a tuple struct/variant
   |
help: possible better candidate is found in another module, you can import it into scope
   |
74 | use std::collections::Bound::Included;
   |

error[E0532]: expected tuple struct/variant, found unit variant `RangeEnd::Included`
  --> src/patterns.rs:64:21
   |
64 |                     RangeEnd::Included(RangeSyntax::DotDotEq) => "..=",
   |                     ^^^^^^^^^^^^^^^^^^ not a tuple struct/variant
   |
help: possible better candidate is found in another module, you can import it into scope
   |
74 | use std::collections::Bound::Included;
   |

error[E0554]: #[feature] may not be used on the stable release channel
  --> src/lib.rs:11:1
   |
11 | #![feature(rustc_private)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 4 previous errors

error: failed to compile `rustfmt-nightly v0.2.8 (file:///home/isaac/Code/play/rustfmt)`, intermediate artifacts can be found at `/home/isaac/Code/play/rustfmt/target`

Caused by:
  Could not compile `rustfmt-nightly`.

@topecongiro sure, source works fine. Thanks!

@isaacaggrey You appear to be trying to compile using the stable compiler.  Do you want to try the following commands?
rustup install nightly
cargo +nightly build

It looks like rustfmt-nightly 0.28 is now on crates.io (cargo +nightly install --force rustfmt-nightly) now works for me, at least).

Indeed it works here as well, thank you! :D


fix(dropdown): correctly update isOpen

Update bound value of isOpen correctly on toggle

Plunker with fix in action here.
This fixes #3261

LGTM


is pt22k_ft22k or pt22k avaliable?

Hello, I see that currently the publicly available ckpts have been fine-tuned on 1k, is there an available model that has not been fine-tuned on 1k?

yes


How can I call evolve() inside a classmethod?

@frozen
class Context:
    text: str
    index: int = 0

    def set(self, index) -> Context:
            return evolve(self, index=min(max(0, index), len(self.text)))

This code is fine during Runtime, but prompted 'attr.evolve' method should be called on attrs instances in IDE.
How can I fix it?

Talk to you IDE vendor I suppose. self is clearly an attrs class.

It's weird, I will report a bug to PyCharm
在 2022年3月9日 +0800 PM6:22，Hynek Schlawack @.***>，写道：

Talk to you IDE vendor I suppose. self is clearly an attrs class.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: @.***>


Add .editorconfig

Add .editorconfig file

I made a mistake with my features branches and mixed them up, now it should be ok both PRs.


[Bug] time evaluator on 3090

I want to evaluator the time cost of tvm, and use the code from https://tvm.apache.org/docs/how_to/optimize_operators/opt_conv_cuda.html?highlight=convolution
But I found in my RTX 3090, the time cost is just 5.750624 ms, 10x faster than the results reported by the link.
I download tvm from github yesterday and I don't know if there are some errors occured in github project or what codes should I change in my env.
Thanks!

Well, I don't think the number generated in the tutorial is realistically meaningful, because it is run on a slower CI machine that is not necessarily a 3090 GPU. Please feel free to reopen the issue if further explanation/action is needed :-)


Get get voice from rtsp restreamed by go2rtc in Frigate docker

Environment:  Docker Desktop, integrated with wsl2; HA docker + Frigate Docker
Frigate Docker re-stream RTSP from original camera. StreamAssist can wake-up when the stream source point to the orignal camera, but when point to the restream flow, nothing will wake up.
Can confirm the re-streamed flow including AAC audio, verified by VLC play the restreamed RTSP.

close. this is a docker on WSL2 with #mirrored network mode issue., StreamAssist actually didn't received restream.
Only recommendation is that right now StreamAssist can still create service/entities when the Input not exist, this behavior hide the real issue from user (docker prevented the network connection).


The summary displayed after running unit tests is wrong when using nested calls

It clearly counts every call to describe and it as a separate test, which can be seen with a trivial example.
describe("something", function()
  it("should still only count as one test", function()
    -- This is the only test that should count
  end)
end)

This will display "3 tests complete", and so on. There may be some other scenarios where different behavior is needed?

Clearly caused by the mess in the C_Testing API (see #70 ). That's what you get when you commit prototypes, I guess 🤷♂


SimpleDateFormat - parsing time only wrong on iOS

For some reason SImpleDateFormat  returns different outputs on Android and iOS
Example:
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");

String time = "08:00:00";

System.out.println(sdf.parse(time));

On Android this will return 25200000 which is ok.
On iOS it returns 21600000 which is wrong.

This is fixed in current source as of fa63741b02e355ebeae7755ef2efece71acde767.

Here are instructions for how to build J2ObjC from source. We also plan on releasing a new distribution soon.


macOS(Darwin) System Proxy

Describe the bug
System Proxy is not enabled when activated GreenTunnel CLI
To Reproduce
Steps to reproduce the behavior:
$ gt

Expected behavior
gt doesn't work at all.
Desktop (please complete the following information):

OS: macOS High Sierra 10.13.6
Browser: Safari 12.1.1

Additional context

System Proxy is not enabled automatically on CLI start.

// bin/gt.js#L107
-	await proxy.start();
+	await proxy.start(true);

In High Sierra, (I'm not sure about Mojave), the commands to activate system proxy is wrong.

sh -c "$(node --eval "console.log('networksetup -listnetworkserviceorder | grep \'Wi-Fi\' -B 1 | cut -d\')\' -f2')")"
# => denotes that a network service is disabled.
# => Wi-Fi

// src/utils/system-proxy.js#L16 and #L22
-	const wifiAdaptor = (await exec('networksetup -listnetworkserviceorder | grep \'Wi-Fi\' -B 1 | cut -d\')\' -f2')).stdout.trim();
+	const wifiAdaptor = 'Wi-Fi';

I'm not sure why you are getting wifiAdaptor as an additional variable?̊̈ The shell command is already grepping to find 'Wi-Fi'...

I was trying to open a PR, but 'point 2' made me hesitate.
Could you please clarify?

for 'point 2' I use that command to grep true wifi name!
the name of the wifiAdaptor is by default 'Wi-Fi', but the users may have changed the name.
for example see my adaptor:

@SadeghHayeri Thinking more about point 2, the code currently doesn’t cover Ethernet-based Internet connections, Bluetooth-based ones, etc...
It looks like displaying a message asking the user to add the proxy server would be better... (Currently there is no such message or mention in README; That’s why I initially thought that the CLI should automatically register the proxy server...)
Sent with GitHawk

yeah, you are right, I didn't think about it.
i'll try to improve it, if I find time.
thanks @pcr910303

@SadeghHayeri This is something super off-topic, but I see you're connecting to a MSCHAPv2 EAP-PEAP network with macOS Mojave.
As I have upgraded to Mojave, found out our school wifi doesn't connect (with a message 'Can't connect to wifi. Contact the IT administrator'), and downgraded to High Sierra multiple times, (about ~5 times) I'm very interested how you managed connect to the wifi.
Did the wifi connect without any problems?̊̈

Yes my wifi connect very easy and with no problem.
I only select ssid in the list and submit my user/pass and connected!

@SadeghHayeri Thanks!

@SadeghHayeri Okay, I'm trying to mitigate this issue, and I realized that the reason it works in your computer is that your Wi-Fi network service name isn't Wi-Fi, while the default is Wi-Fi, making the grep returning the wrong place.
Looks like instead of grepping Wi-Fi, grepping the current used network interface name (en0, en1, etc...) retrieved by a route -n get <IP_ADDRESS> would be a more robust solution. (I'll not work for people who set the network adaptor name as en* thou...)
So the diff would more look like something like this...
// src/utils/system-proxy.js#L16 and #L22
-	const wifiAdaptor = (await exec('networksetup -listnetworkserviceorder | grep \'Wi-Fi\' -B 1 | cut -d\')\' -f2')).stdout.trim();
+	const wifiAdaptor = (await exec(`sh -c "networksetup -listnetworkserviceorder | grep \`route -n get <IP_ADDRESS> | grep 'interface' | cut -d ':' -f2\` -B 1 | head -n 1 | cut -d ' ' -f2"`)).stdout.trim();


fix(util): do not consume leading slash

Closes #12

Thanks for the contribution, sorry for the small delay in merging...


[stable-5] ocis crashes with fatal error: concurrent map iteration and map write

ocis crashed:
fatal error: concurrent map iteration and map write

goroutine 998 [running]:
github.com/cs3org/reva/v2/pkg/publicshare/manager/json.(*manager).cleanupExpiredShares(0xc0031d3800)
	/drone/src/vendor/github.com/cs3org/reva/v2/pkg/publicshare/manager/json/json.go:557 +0xff
github.com/cs3org/reva/v2/pkg/publicshare/manager/json.(*manager).startJanitorRun(0xc0031d3800)
	/drone/src/vendor/github.com/cs3org/reva/v2/pkg/publicshare/manager/json/json.go:191 +0xe5
created by github.com/cs3org/reva/v2/pkg/publicshare/manager/json.New in goroutine 577
	/drone/src/vendor/github.com/cs3org/reva/v2/pkg/publicshare/manager/json/json.go:132 +0x138

goroutine 1 [IO wait, 2 minutes]:
internal/poll.runtime_pollWait(0x7f7fb4811160, 0x72)
	/usr/local/go/src/runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc001b88a80?, 0xc003a974b0?, 0x0)

Similar https://github.com/owncloud/ocis/issues/8171, https://github.com/owncloud/ocis/issues/7697

I guest it should be fixed after merging https://github.com/owncloud/ocis/pull/8207

@saw-jan If it happened in a CI, please attach a link or logs dump.

@saw-jan If it happened in a CI, please attach a link or logs dump.

Sorry that I missed the ci build link. here is the one: https://drone.owncloud.com/owncloud/ocis/31136/34/3 (logs should be there)


[Feature Request] 'go to definition' enhancement

I found go to defintion is not working in following cases
1. store variable with auto-subscriptions
when press F12 on $count, it won't go to definition
import { count } from './store.js'

$: double = $count * 2

2. variables & functions in html section
when press F12 on {count} or {handleClick}, it won't go to definition.

(ps: go to definition works on html files, ex: <button onclick="handleClick">)
3. svelte component tag
when press F12 on Nested, it won't open Nested.svelte file.
<script>
	import Nested from './Nested.svelte';
</script>

<Nested answer={42}/>

(ps: I read an article said React Components support this)
I just moved from vim to vscode for one week, because this extension is the only way I found to do correct syntax highlight for Svelte. 😄 But the above experience made me think vscode didn't do go to definition correctly at all, so I created a stupid extension for go to definition by global search... 😭
I guess supporting it via vscode language server? will be better approach.

@juanmait it's not working for me even it's on the features list

@moshfeu as far I could investigate, this seems to be some how out of scope for svelte-vscode, and is more on the vscode side. See this issue: https://github.com/microsoft/vscode/issues/26338. Apparently they're on the way to support intellisense in regular script tags, specifically on tags like <script type=module> (check this one: https://github.com/microsoft/vscode/issues/29315), which is very close to become "more popular" and is already supported in browsers. This would be the preferred solution as it would mean to have a sort of "native" support for intellisense in vscode. That's my guess though. We'll see..

@wangchou
My problem is that I can not go to definition of the JS file in script blocks, I search this question any where but not solve yet, except this 'stupid extension'. you are so awesome! thanks!


Download URLs

while I worked on https://github.com/open-telemetry/opentelemetry.io/pull/4078 I ran into very long URLs for the downloads of OCB, we have similar instances already for collector, java agent and .NET auto instrumentation, it would be nice to have something like http://download.opentelemetry.io/<artifact> or get.opentelemetry.io/<artifact> instead sucht that we can replace
https://github.com/open-telemetry/opentelemetry-collector/releases/download/cmd%2Fbuilder%2Fv0.95.0/ocb_0.95.0_linux_amd64

with
https://get.opentelemetry.io/ocb_0.95.0_linux_amd64

We could implement that as part of the website via hugo redirects, or use a 3rd party solution that provides some additional features as well (statistics, etc.)

Scarf lets us do this pretty easily iirc. We can define routes for each thing and even template it... https://docs.scarf.sh/packages/#files

Scarf lets us do this pretty easily iirc. We can define routes for each thing and even template it... https://docs.scarf.sh/packages/#files

Then let's prototype scarf :-)

Here's a link for ocb:

opentelemetry.gateway.scarf.sh/0.95.0/darwin/arm64/ocb (or opentelemetry.gateway.scarf.sh/0.95.0/{os}/{arch}/ocb in general
for windows: opentelemetry.gateway.scarf.sh/0.95.0/windows/amd64/ocb.exe

Love this!

depends on https://github.com/open-telemetry/community/issues/1993


Skipping ResponseTrailerMode is not letting the stream close / EOF

I just tested the externalprocessor filter with envoy (1.19 > v <= 1.24) and got the below issue.
With below configuration the stream is not closing and not reaching EOF.
request_header_mode: "SEND"
response_header_mode: "SEND"
request_body_mode: "BUFFERED"
response_body_mode: "BUFFERED"
request_trailer_mode: "SKIP"
response_trailer_mode: "SKIP"
Once the response trailer mode is set to SEND the stream is closing properly. It should ideally work with SKIP mode also.
My code looks similar to this -> https://github.com/salrashid123/envoy_ext_proc/blob/main/grpc_server.go.
Versions earlier to 1.19 with v3alpha.ExternalProcessor was working fine with the above mentioned request_mode
Stack overflow issue - https://stackoverflow.com/questions/75227362/envoy-filter-for-ext-proc-not-reaching-eof

cc @gbrail @snowp @pradeepcrao @chaoqin-li1123

The async_mode is under development i think. We send a response back for every header / body for request and response. I stopped sending response for the body on responseBody EOF and it worked.
I think the problem is not just only with Skipping trailers, its with sending response back from the server for each stream recvd.

You can reproduce this issue if you run https://github.com/salrashid123/envoy_ext_proc/blob/main/grpc_server.go - > this code. You can remove all the Mutation code pieces and change the mode like below.
request_header_mode: "SEND"
response_header_mode: "SEND"
request_body_mode: "BUFFERED"
response_body_mode: "BUFFERED"
request_trailer_mode: "SKIP"
response_trailer_mode: "SKIP"

Help Needed

Do we have any update on this?  I am getting the exact same error


[5.5] Avoid use Carbon\Carbon in core

Why? What does this change? What guidelines says we should avoid Carbon\Carbon?

@sisve There are no guidelines, but there was a previous PR that avoid using Str aliases. I guess we can apply to Carbon as well :sweat_smile:

Aliases are weird facades that causes additional code to execute, parse config files and forward method calls. They are different than just referencing Carbon\Carbon.


Don't alloc during opcode creation

Probably minimal impact but doesn't degrade code quality a ton. Also replaced some var -> let.

LGTM, mergable when CI is green.

one comment, then it should be good to go.

I've been sort of working on a bunch of babel transforms to hopefully make this a non manual endeavor. https://github.com/chadhietala/babel-array-method-zero-cost-abstractions

@chadhietala cool, the tricky bit is knowing if the given forEach is being called on an array or not.

:grimacing: yea...

@chadhietala a different approach, i took some time ago was to use sweet.js style macro, i think the same approach could work here nicely.
import { forEach } from 'zero-cost-abstractions';

forEach(array, callback)

Then use babel's matcher stuff to detect which forEach it is, now the developer has basically annotated which forEach/map etc it want's to optimize. such macro fun.

Yea annotation is what I was thinking

So on my flight I took a whack at the macros. Was more of experiment in writing sweet.js macros then anything that I would recommending using at this point. https://github.com/chadhietala/array-method-macros


Tutorial 9: Filters, Experiment 2 and a few plurals in filenames

Tutorial 9 experiment 2 says
    <input ng:model="userInput"> Uppercased: {{ userInput | uppercase }}

I had to add an input name to make a value show the result of the filter as I typed:
<input name="userInput" ng:model="userInput"> Uppercased: {{ userInput | uppercase }}

There are a few pluralization typos across the tutorials:

Tutorials 4,7, and 8 say "app/js/controller.js" but need to pluralize controller: "app/js/controllers.js"
Tutorial 4 says "test/unit/controllerSpec.js" but needs to pluralize controller: "test/unit/controllersSpec.js"

Thanks for the tutorials.

opps.. will get this fixed when I'm doing the next round of updates to the
tutorial. Thanks for the feedback.
/i


feat: support maxContentLength option

Fixes #35

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Help needed to load tflite model

1. System information

OS Platform and Distribution: Debian GNU/Linux 12 (bookworm)
TensorFlow installation: pip
TensorFlow library: 2.14.1
tflite-runtime library: 2.14.0

2. Code
model = Sequential([
  LSTM(32, return_sequences=True, input_shape=(window_size, 1)),
  Dropout(0.2),
  LSTM(32, return_sequences=True),
  Dropout(0.2),
  LSTM(16, return_sequences=False),
  Dense(n_steps_out),
])
model.save('testttt-2')

from tensorflow import lite

converter = lite.TFLiteConverter.from_saved_model('testttt-2')
converter.optimizations = [lite.Optimize.DEFAULT]
converter.target_spec.supported_ops = [lite.OpsSet.TFLITE_BUILTINS, lite.OpsSet.SELECT_TF_OPS]
tflite_model = converter.convert()

with open('testttt-2.tflite', 'wb') as f:
  f.write(tflite_model)

Option B: Paste your code here or provide a link to a custom end-to-end colab
Output when converting:
2024-03-08 18:52:13.471941: I tensorflow/cc/saved_model/loader.cc:316] SavedModel load for tags { serve }; Status: success: OK. Took 189169 microseconds.
2024-03-08 18:52:13.616872: W tensorflow/compiler/mlir/lite/flatbuffer_export.cc:2178] TFLite interpreter needs to link Flex delegate in order to run the model since it contains the following Select TFop(s):
Flex ops: FlexTensorListReserve, FlexTensorListSetItem, FlexTensorListStack
Details:
	tf.TensorListReserve(tensor<2xi32>, tensor<i32>) -> (tensor<!tf_type.variant<tensor<?x16xf32>>>) : {device = ""}
	tf.TensorListReserve(tensor<2xi32>, tensor<i32>) -> (tensor<!tf_type.variant<tensor<?x32xf32>>>) : {device = ""}
	tf.TensorListSetItem(tensor<!tf_type.variant<tensor<?x16xf32>>>, tensor<i32>, tensor<?x16xf32>) -> (tensor<!tf_type.variant<tensor<?x16xf32>>>) : {device = "", resize_if_index_out_of_bounds = false}
	tf.TensorListSetItem(tensor<!tf_type.variant<tensor<?x32xf32>>>, tensor<i32>, tensor<?x32xf32>) -> (tensor<!tf_type.variant<tensor<?x32xf32>>>) : {device = "", resize_if_index_out_of_bounds = false}
	tf.TensorListStack(tensor<!tf_type.variant<tensor<?x16xf32>>>, tensor<2xi32>) -> (tensor<1x?x16xf32>) : {device = "", num_elements = 1 : i64}
	tf.TensorListStack(tensor<!tf_type.variant<tensor<?x32xf32>>>, tensor<2xi32>) -> (tensor<?x?x32xf32>) : {device = "", num_elements = -1 : i64}
See instructions: https://www.tensorflow.org/lite/guide/ops_select

3. Failure after conversion
Output when loading and trying to infer using tflite
RuntimeError: Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter.
Make sure you apply/link the Flex delegate before inference.
For the Android, it can be resolved by adding "org.tensorflow:tensorflow-lite-select-tf-ops" dependency. See instructions: https://www.tensorflow.org/lite/guide/ops_selectNode number 5 (FlexTensorListReserve) failed to prepare.

I am not sure how to get this working on my edge device - Debian GNU/Linux 12 which has tflite-runtime.
Requesting guidance on same.
Thanks

Hi @acode-x,
I have reproduced the code on Debian GNU/Linux 12 (bookworm) with TF 2.14.1. The LSTM model is successfully converted to TFLite and inferencing on the same  platform also done and no errors found. Screenshots are attached below. Regarding the error which you encountered ....please confirm, on which platform you have taken the inference?

Thank You


Telemetry various fix

The prompt was never shown to the user because of a combination of issues;

the "scripts" key in package.json is not kept during building.
when a user lack a global configuration file, we return as if the user answered false (because it's null, not undefined).
prompting on non-tty terminals also meant that CI was broken.

This fixes those issues.

Hi @hansl, is this supposed to be OK in beta.10? Because my Circle-CI is failing because of the new analytics prompt.


Demographics class does not properly use county population demographics

The demographics class has six values for races:
  private static final List<String> CSV_RACES = Arrays.asList(
      "WHITE", "HISPANIC", "BLACK", "ASIAN", "NATIVE", "OTHER");

This is out of sync with the US Census categories for race. The census only has five categories for race and considers Hispanic to be an ethnicity.
The demographics.csv file, which is built from the county population demographics file appears to add the values for WA_MALE and WA_FEMALE, then divide by TOT_POP to get the ratio for the WHITE.
The value in the demographics.csv file HISPANIC is the sum of H_MALE and H_FEMALE divided by TOTAL_POP. This leads to double counting people and will lead to incorrect ratios of race as generated by Synthea.
Since Hispanic is considered an ethnicity by census, population reports race and ethnicity. The county population demographics will therefore lists totals such as White alone Hispanic or Black alone Hispanic. So, H_MALE will include people who identify with a race as White and an ethnicity of Hispanic.
The Demographics class loads all six values from the CSV file. Since those with an ethnicity of Hispanic are double counted, the ratios add up to more than one. Analyzing the data in the file shows this to be the case:
count    34491.000000
mean         1.054223
std          0.101293
min          0.371787
25%          1.005272
50%          1.018247
75%          1.055306
max          1.956796

This means that the generated race ratios will be incorrect, with all US Census-based races having a lower portion of the population than reported by the county data.
Suggested Fixes

Drop the non-US Census ethnicities (Irish, Italian, English, etc.)
Do not use the HISPANIC column when loading race distributions
Use the US Census based definition on ethnicity (Hispanic or non-Hispanic)
Use the HISPANIC column to set the distribution of ethnicity
Move language selection to a set of probabilities based on language spoken by state from the US Census
Move language selection to use race, based largely on previous associations of language to race through Sythea-based ethnicity. Use information at the national level for English speaking by race and language spoken distributions.

Updated approach.


It went a bit off the rails XD

1: Task 76000: Research and identify the best practices
2: Task 100000: Research and identify the best practices for securely storing API keys in mobile applications.
3: Task 104000: Research and identify the best practices for securely storing API keys in web applications.
4: Task 116000: Research and identify the best practices for securely storing API keys in server.
5: Task 132000: Research and identify the best practices for securely storing API keys in desktop application
Anyone got tips how to write the prompt so that it does not go off the rails?

@Philomath88 can you provide some more context on how it went "off the rails"?

@Abeansits I don't have the exact logs anymore but you can see that it went to task 132000 (starting from task 1).
The goal was to develop a python script to allow me to interact with chatgpt

No worries @Philomath88!
If you're curious about it you don't really need an agent for that kind of task. The web UI will gladly output that in seconds without costing you anything.


REST API Function files/body

https://github.com/projectkudu/kudu/wiki/Functions-API
How to get the files and its content?

get /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{functionapp}/functions/MyFunction?api-version=2015-08-01

returns function information, but file tag is empty/null

"files": null

Yes, this API is not designed to return the files. There could be thousands and it wouldn't work in a json payload. Instead, you can use the vfs and zip APIs.

@davidebbo
Yes, I did find vfs and zip APIs, but I want to do all with Function API and don't switch context.
So mybe there is point to allow picking files by name as well? Very simple api improvment

get /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{functionapp}/functions/MyFunction/files/{filename}?api-version=2015-08-01

Now it possible to create or update file, by adding "get", there would be a full house and no need to use zip or vfs.
Pretty, please? :)

Problem is that this really breaks down when you have binary files, since ARM API must return everything as JSON. So we can't really have a function file API that works in all cases. On the other hand the vfs & zip APIs are designed for arbitrary files, as they're not tied to json payloads.

{
  "name": "run.csx",
  "extension": ".csx",
  "size": "84",
  "content": "VGhlcmUgaXMgbm8gcmVhbCBwcm9ibGVtLCB3aGljaCBjb3VsZCBub3QgYmUgc29sdmVkIHdpdGggYmFzZTY0LiBWb2lsYSE="
}


Broken VariableLengthInlineArray<T> after upgrade from 0.3.49-beta to 0.3.106

Actual behavior
Multiple build errors for VariableLengthInlineArray<T>:
Windows.Win32.VariableLengthInlineArray.g.cs(30,27,30,34): error CS8170: Struct members cannot return 'this' or other instance members by reference
Windows.Win32.VariableLengthInlineArray.g.cs(30,12,30,42): error CS8347: Cannot use a result of 'Unsafe.Add<T>(ref T, int)' in this context because it may expose variables referenced by parameter 'source' outside of their declaration scope

Expected behavior
The build succeeds.
Repro steps

NativeMethods.txt content:

ApplicationDocumentLists
CopyFileEx
CoTaskMemFree
ExtractIconEx
FileOpenDialog
FileSaveDialog
GetActiveWindow
GetModuleFileName
GetSystemWindowsDirectory
HRESULT_FROM_WIN32
IApplicationDocumentLists
IEnumObjects
IFileDialog
IShellItem2
ITaskbarList3
SendMessage
SetActiveWindow
SHAddToRecentDocs
SHCreateItemFromParsingName
SHGetKnownFolderItem
SHOpenFolderAndSelectItems
SHParseDisplayName
SHSetTemporaryPropertyForItem
StrCmpLogical
TaskbarList
TaskDialogIndirect

E_*
FOLDERID_*
ICON_*
MAX_PATH
MESSAGEBOX_RESULT
PBST_*
PKEY_*
S_*
SHARD
TASKDIALOG_ELEMENTS
TASKDIALOG_MESSAGES
TD_*
WIN32_ERROR
WM_*

NativeMethods.json content (if present):

Any of your own code that should be shared?

Context

CsWin32 version: 0.3.106
Win32Metadata version (if explicitly set by project): 60.0.34-preview
Target Framework: net5.0-windows

I can't repro the problem. Can you provide a minimal repro project?

cswin32-issue1205-repro.zip
The issue only occurs when building with Visual Studio 2019. I wasn't able to reproduce it in VS Code.

> dotnet --list-sdks
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.203 [C:\Program Files\dotnet\sdk]
5.0.214 [C:\Program Files\dotnet\sdk]
5.0.406 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
5.0.416 [C:\Program Files\dotnet\sdk]
6.0.203 [C:\Program Files\dotnet\sdk]
6.0.300 [C:\Program Files\dotnet\sdk]
6.0.407 [C:\Program Files\dotnet\sdk]
8.0.201 [C:\Program Files\dotnet\sdk]

MSBuild is using SDK version 6.0.203.

Great. I got it by using the 6.0.423 SDK and C# lang version 9. Investigating further...

The C# language version isn't what does it. It's just the compiler version. The compiler that ships in .NET SDK 6.0.x fails where .NET SDK 8's compiler works. I guess the older compiler didn't know how to respect the [UnscopedRef] attribute. I suspect the only workaround we can make in the source generator will be to avoid emitting the VariableLengthInlineArray<T> type for that version of the compiler. That's trouble though, because the source generator isn't told what the compiler version is, I think. I'll have to get the roslyn team's take on it.

The Unsafe.Add is a bit of a red herring here, from a ref safety standpoint the method looks like this:
internal ref T this[int index]
{
    [UnscopedRef]
    get => ref this.e0;
}

I guess the older compiler didn't know how to respect the [UnscopedRef] attribute

That is correct. The attribute was added in .NET 7 so the .NET 6 compiler doesn't attach any special meaning to it. From the perspective of .NET 6 compiler this method has no attribute and is a ref safety violation.

That's trouble though, because the source generator isn't told what the compiler version is, I think. I'll have to get the roslyn team's take on it.

Think it would be better to look at the language version than compiler version. That is available through parse options on the source files. In this case the language version is 9.0 which doesn't support ref fields, [UnscopedRef], etc ... That should be enough to know when this pattern is / isn't safe to code gen.
Note: in November the .NET 6 SDK goes out of support and at that time all supported compilers will be able to use these attributes. This pattern might be tricky to emit in older compilers.

With .NET Framework this also causes problems. If you don't include the latest System.Runtime.CompilerServices.Unsafe package it fails to build with:
Error (active)	CS0117	'Unsafe' does not contain a definition for 'SkipInit'

@nuklon The SkipInit issue is a dupe of #1199.


customs map labels

[Customs Map Labels]
Added Labels of important locations to the customs map

Related Issues 🔗
Related to https://github.com/the-hideout/tarkov-dev/issues/840

Feel free to leave any feedback on name changes or locations that I may have missed!

Love it!
Would you say that 80% size should be the default size?
Possible locations:

Warehouse 4 and 17
Bus Station (or Terminal)
Powerline Tower (hill)
'USEC' -> Streamers (house). Do you call it USEC? We call it Streamers because it has the streaming setup on the 2nd floor.

.deploy to development

Very nice!
Regarding USEC/Streamer, my group calls it USEC too. But I think Streamer House is fairly common too. 🤷♂

.deploy


websocket is not connected

Minted NFT but second transaction (list) threw an error:

trying to transfer some BSX:

continue in #7670


⚠ Bofrost.at has degraded performance

In 8ed5feb, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2226 ms

Resolved: Bofrost.at performance has improved in f9a567b after 9 minutes.


LS: cancell_all method for database

Stack:

#6775
#6774
#6773
#6772 ⬅

⚠ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

This change is

please recreate this stack in the new repo

Closing in favor of https://github.com/software-mansion/cairols/pull/6


Tute2 -- Basic Python | Chenglong Ma

https://chenglongma.com/03/pds-tute2/
I’ll introduce some basic Python programming knowledge in this article.

Haven't finished...


Hover doesn't show anymore

type a word
have a squiggle
the hover doesn't show

https://github.com/microsoft/vscode/assets/5047891/2d7d71f6-4999-4c43-8596-72338ec47a2f
Version: 1.86.0-insider
Commit: ab0520decb7284b2b2a9bbe3ababea57ac83c86b
Date: 2023-12-08T01:25:06.391Z
Electron: 27.1.3
ElectronBuildId: 25612240
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 23.1.0

Is this a duplicate of #200283?


[Hotfix v3.13.1] Create basic migration for addressbook chain id

This is a quick draft to hotfix this issue
What it solves
Resolves #
How this PR fixes it
Create a new address book migration to change existing chain ids from integer to string
How to test it
Screenshots

I think we need to cover this with tests.

@katspaugh We have the following options to solve this:

Apply a full migration script restoring the full addressbook in local storage
When batchLoading the entries to the store, force the chainId to be an string. Next time the sync script will detect the difference and will store the updated values to the local storage

For now in this PR I just left the fix to allow use the addressbook either with number or string

Looks good to me
So I took the AB as I have it in dev, where there are 78 entries, 8 of them have the chainID as a string, the rest are all numbers. 12 of the entries are from other chains so they will not show in the list.
The result: The AB shows all 66 entries from this chainID (rinkeby ID 4), whatever they are a string or a number.
https://pr2688--safereact.review.gnosisdev.com/rinkeby/app/#/safes/0x288A58c93e5aE40ce707F6Df128948df011B6dcC/address-book

If anyone wants to check, paste this value in the SAFE_addressBook key in the local storage and enter into the addressbook in a rinkeby env. Any entry with the number or string 4 will be seen.
The other chainID's are for Bsc 56, xdai 100, eth mainnet 1 and polygon 137 so after pasting this value into the key you can visit the other builds in different networks and check that the entries are there as well
{"address":"0x4BaE4C49f02d29F14417bc9bd3237E90cf3e1Efd","name":"test1","chainId":4},{"address":"0xac338C3B3A9F574B1D63fb88bf2Fbb17E0Aa3fDf","name":"test2","chainId":4},{"address":"0xc293f6eAE3E9170766C74f0867cb4Ad2c8d8fa0c","name":"test3","chainId":4},{"address":"0x00Be14E33760FCD61e46C619eC089a3BfB6d1352","name":"autom safe 2","chainId":4},{"address":"0x4d22E66A8dbFe88aDe00aC22b14d548116eCaB33","name":"test1","chainId":4},{"address":"0xc23d7ea637d36C87A52BA8B6597fFade01EC0eaE","name":"safe","chainId":4},{"address":"0x66bE167c36B3b75D1130BBbDec69f9f04E7DA4fC","name":"Rinkeby user 2","chainId":4},{"address":"0xFD71c1ABadBD37F60E4C8F208386dDFC4d2Bf01f","name":"Rinkeby user 3","chainId":4},{"address":"0x730F87dA2A3C6721e2196DFB990759e9bdfc5083","name":"Mainnet user 1","chainId":1},{"address":"0x66bE167c36B3b75D1130BBbDec69f9f04E7DA4fC","name":"Mainnet user 2","chainId":1},{"address":"0xFD71c1ABadBD37F60E4C8F208386dDFC4d2Bf01f","name":"Mainnet user 3","chainId":1},{"address":"0x730F87dA2A3C6721e2196DFB990759e9bdfc5083","name":"xdai user 1","chainId":100},{"address":"0x66bE167c36B3b75D1130BBbDec69f9f04E7DA4fC","name":"xdai user 2","chainId":100},{"address":"0xFD71c1ABadBD37F60E4C8F208386dDFC4d2Bf01f","name":"xdai user 3","chainId":100},{"address":"0x730F87dA2A3C6721e2196DFB990759e9bdfc5083","name":"bsc user 1","chainId":56},{"address":"0x66bE167c36B3b75D1130BBbDec69f9f04E7DA4fC","name":"bsc user 2","chainId":56},{"address":"0xFD71c1ABadBD37F60E4C8F208386dDFC4d2Bf01f","name":"bsc user 3","chainId":56},{"address":"0x730F87dA2A3C6721e2196DFB990759e9bdfc5083","name":"polygon user 1","chainId":137},{"address":"0x66bE167c36B3b75D1130BBbDec69f9f04E7DA4fC","name":"polygon user 2","chainId":137},{"address":"0xFD71c1ABadBD37F60E4C8F208386dDFC4d2Bf01f","name":"polygon user 3","chainId":137},{"address":"0x7724b234c9099C205F03b458944942bcEBA13408","name":"test2","chainId":"4"},{"address":"0x2b98ED26228aAaDf030BCA6184827490dE642c8f","name":"grateful-safe","chainId":"4"},{"address":"0x61a0c717d18232711bC788F19C9Cd56a43cc8872","name":"test1","chainId":"4"},{"address":"0xeB37f9Dc51FB74E8992A50cD23795fBA53e74a6A","name":"delighted-safe","chainId":"4"},{"address":"0x834C5e06f98cB129d142f0D99A9c617927f49F17","name":"thankful-safe","chainId":"4"},{"address":"0x6E45d69a383CECa3d54688e833Bd0e1388747e6B","name":"test3","chainId":"4"},{"address":"0xF6Fc48D4d7817F05A6229CF780Cf6f4a51835E49","name":"fabulous-safe","chainId":"4"},{"address":"0xC1652ceeFBC303Ec286933FdCea3F391d64ccd3C","name":"safe new","chainId":"4"}]


Support hosted/mounted sub applications on FastAPI

How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.39.1
Steps to Reproduce
In order to handle different hostnames, FastAPI application can serve sub applications via host or mount options. Methods signature in Starlette
For example:
app = FastAPI()
sub_app_1 = FastAPI()
sub_app_2 = FastAPI()
# setup routes for each app

app.host(HOST_1, sub_app_1)
app.host(HOST_2, sub_app_2)

This leads to child routes being substituted with Host or Mount object respectively.
Expected Result
FastAPI & Starlette integrations do not crash.
Ideally, it should capture the actual URL, if it is possible from additional objects.
Actual Result
After adding StarletteIntegration with default arguments (transaction_style="url") application crashes with the following logs:
2024-01-10 14:05:59,236 ERROR [httptools_impl.py] : Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 364, in _sentry_patched_asgi_app
    return await middleware(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 146, in _run_asgi3
    return await self._run_app(scope, receive, send, asgi_version=3)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 241, in _run_app
    raise exc from None
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 234, in _run_app
    return await self.app(
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 157, in _create_span_call
    return await old_call(app, scope, new_receive, new_send, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 157, in _create_span_call
    return await old_call(app, scope, new_receive, new_send, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 108, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/webapp/app.py", line 297, in init_db_session
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 84, in call_next
    raise app_exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 146, in _run_asgi3
    return await self._run_app(scope, receive, send, asgi_version=3)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 161, in _run_app
    raise exc from None
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 157, in _run_app
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 256, in _sentry_exceptionmiddleware_call
    await old_call(self, scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 157, in _create_span_call
    return await old_call(app, scope, new_receive, new_send, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 157, in _create_span_call
    return await old_call(app, scope, new_receive, new_send, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 515, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 364, in _sentry_patched_asgi_app
    return await middleware(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 146, in _run_asgi3
    return await self._run_app(scope, receive, send, asgi_version=3)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 161, in _run_app
    raise exc from None
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 157, in _run_app
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 115, in _create_span_call
    name, source = _get_transaction_from_middleware(app, scope, integration)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 684, in _get_transaction_from_middleware
    name = _transaction_name_from_router(asgi_scope)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 647, in _transaction_name_from_router
    return route.path
           ^^^^^^^^^^
AttributeError: 'Host' object has no attribute 'path'

@OleksandrRakovets Thank you for reporting. We currently assume that all routes have a path attribute, but this is not the case for Host, so we'll need to fix that.

Hi @OleksandrRakovets, could you please provide more detail on how to reproduce this bug, including the exact steps you took?

Hi @szokeasaurusrex!
I cannot share the actual app code, tried to outline its setup in initial ticket.
The app purpose is to respond to different subdomains from a single container.
app = FastAPI()
sub_app_1 = FastAPI()
sub_app_2 = FastAPI()
# setup routes for each app

app.host('app.company.local', sub_app_1)
app.host('api.company.local', sub_app_2)

# alternatively, for local development, it can serve API sub app with a path prefix with
# app.mount('/api', sub_app_2)

I have updated sentry-sdk (1.11.1 -> 1.39.1) and according to the latest docs updated the package to sentry-sdk = {extras = ["fastapi"], version = "^1.39.1"}
This immediately crashed the app with the log above before I even tried to add a deliberate error to see in Sentry.
Then I followed the integration docs advice and changed transaction_style to endpoint.
The app stopped crashing, but every error in Sentry had been labelled from fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware instead of actual function.
So I have pointed the issue to Starlette integration, managed to disable it from autoloading, and opened this ticket :)

Hi @OleksandrRakovets, are you also experiencing the same error when you use app.mount instead of app.host?
The part I was having difficulty with was accessing the app.host routes in my local development environment after starting the dev server. But, if you also observe the error with app.mount, I can try reproducing with app.mount, instead.