Commit Graph

38390 Commits

Author SHA1 Message Date
Andrew Stanton-Nurse d3dc92ff6c
suppress ExecutionContext by default in TestServer (#10094)
fixes #7975

There is a 'PreserveExecutionContext' property to turn the old behavior back on. Also I had to modify where IHttpApplication.CreateContext is called since that's what sets the IHttpContextAccessor, which depends on AsyncLocals!
2019-05-09 20:47:43 -07:00
Ryan Nowak 0b590ff46f Fix #6764 EndpointConventionBuilder API review 2019-05-09 19:38:43 -07:00
Mikael Mengistu d37b2ca70a
Remove CancelableEnumerator (#10099) 2019-05-09 17:04:51 -07:00
Alexander Tsoi 41df269eaf Fix typo in xml docs (#10119) 2019-05-09 14:56:11 -07:00
Stephen Halter 2a88a3dd65
Expand slow heartbeat warning (#10092)
- Mention thread pool starvation as a possible cause.
2019-05-09 14:44:26 -07:00
Ryan Nowak b03bca15de Fix: #10091 2019-05-09 14:00:31 -07:00
Ryan Nowak 15b1566d90 Do something different I guess. 2019-05-09 13:59:38 -07:00
Ryan Nowak 434bf614d5 Make GetOrdereredMetadata return something good 2019-05-09 13:59:38 -07:00
Ryan Nowak f45250ce5e Mark test as flaky 2019-05-09 13:44:16 -07:00
Ryan Nowak 24784d0681 Fix #10066 2019-05-09 13:44:16 -07:00
BrennanConroy 9c3266008a
Set defaults for Json options (#10057) 2019-05-09 12:50:38 -07:00
Ryan Nowak 7642f9d12a
Fixes: #9281 - implement SignalR detection (#10065)
This change adds detection of various SignalR configure-related calls to
the startup analysis infrastructure.

Also adds a shim that VS is going to call into to analyze the project
pre-publish.
2019-05-09 12:33:09 -07:00
Steve Sanderson 4db8260c6c
Fix components event dispatch ordering + E2E test fixes (#10112) 2019-05-09 18:32:26 +01:00
David Fowler dcf49f2575
Move service registration before hosting startups run (#10105)
* Move service registration before hosting startups run
- This allows IHostingStartup to see default service registrations and override them.
- Added a test to verify that hosting startup can see the IWebHostingEnvironment. Unfortunately this is used by MVC to get the application name before the container is baked. This was found when porting our workshop from 2.2 to 3.0
2019-05-09 09:14:31 -07:00
Mickaël Derriey a677fd231e Make OIDC handler skip unrecognized requests (#10060) 2019-05-08 22:05:58 -07:00
huysentruitw 6d5b6b0c6f Calling abort inside TestServer handler should set RequestAborted (#9975) 2019-05-08 22:00:42 -07:00
Ryan Nowak b3836954ed Fix #9316 Expose Blazor HubOptions 2019-05-08 16:22:13 -07:00
Doug Bunting 16c01d56e2
Merge branch 'release/2.2' => 'master' (#10023) 2019-05-08 15:32:57 -07:00
Nate McMaster 3dbbb2994c
Upgrade yarn and cleanup npm commands (#10054)
* Add yarn.lock file for NodeServices
* Remove references to 'npm install' (causes double-download of node modules) and replace npm commands in package.json with yarn for consistency
* Upgrade yarn to 1.15.2
2019-05-08 15:07:25 -07:00
Doug Bunting 82a68eacbd
Merge branch 'release/2.2' -> 'master' 2019-05-08 12:21:33 -07:00
Mikael Mengistu e3bf01eec3
Adding more streaming benchmark scenarios (#10049) 2019-05-08 10:13:43 -07:00
Nick Sullivan 48d2f40192 blazor.boot.json - don't set physicalpath 2019-05-08 17:45:43 +01:00
Justin Kotalik c22de8f39c
Add retries to helix failures and re-enable helix as a required workload (#9221) 2019-05-08 08:21:44 -07:00
Ryan Nowak 0a1d68b8f3 Remove EndpointSelectorContext 2019-05-08 08:14:24 -07:00
Larry Ewing a36a57df65 Avoid using exception filters for AOT runtimes 2019-05-08 07:49:48 -07:00
Steve Sanderson e0007f4f4b Improve robustness of components Bind and EventBubbling E2E tests 2019-05-08 13:53:04 +01:00
Andrew Stanton-Nurse 8759518a97
add support for both env vars in #7916 fix (#10009) 2019-05-07 22:10:31 -07:00
Doug Bunting 58c67727df
Update all the things (except EF Core dependencies) (#10025)
- see #9923 for related discussion
- pin aspnet/EntityFrameworkCore dependencies
- chain aspnet/Extensions dependencies through aspnet/AspNetCore-Tooling instead
- run `darc` to grab the latest
- remove System.Text.Encodings.Web references
  - now included in runtime.*.Microsoft.NETCORE.App packages

nits:
- copy a few `ReferenceResolution.md changes from aspnet/Extensions version
2019-05-07 22:06:39 -07:00
Doug Bunting 858f5195d9
Merge 'release/2.1' -> 'release/2.2' (#10064) 2019-05-07 22:04:11 -07:00
Mikael Mengistu b0659f660b
Add System.Text.Json protocol to the SignalR functional tests (#9936) 2019-05-07 18:04:56 -07:00
Doug Bunting bdd2134928
Merge branch 'release/2.1' into release/2.2 2019-05-07 17:38:00 -07:00
Doug Bunting 0c0596b910
Merge branch 'release/2.1' => 'release/2.2' (#10017) 2019-05-07 17:29:50 -07:00
Mikael Mengistu a26c4e936b
Make stream buffer capacity configurable (#9877) 2019-05-07 17:13:07 -07:00
Andrew Stanton-Nurse 11516c9272
comment typo (#9954) 2019-05-07 15:22:00 -07:00
BrennanConroy f30e738848
Pre-encode known Json values in SignalR (#9999) 2019-05-07 15:21:00 -07:00
Ryan Nowak 1b47f44876
Add a top-level node for analyzers (#9906)
This is the first step, and just estabilishes a skeleton. The end goal
is organize our analyzers under this node because:
1. We're writing some 'top level' analyzers that depend on everything
else
2. We want to be able to service analyzers on the SDK schedule
(independent of runtime).

Next, we'll merge the MVC analyzers into this assembly since there's no
reason for them to be separate. The MVC API analyzers will remain a
separate package, but under this node. The component analyzers will
remain separate as they need to ship as a package, but will move under
this node as well.
2019-05-07 15:01:08 -07:00
Stafford Williams 04600e83fc Docs: Fix branch link (#10014) 2019-05-07 13:59:12 -07:00
John Luo 58447bee31
Remove gRPC template workarounds (#10026) 2019-05-07 13:57:15 -07:00
Justin Kotalik 18faf4ad7a
Make inprocess not set CaptureStartupErrors and let ANCM handle it. (#9859) 2019-05-07 12:03:11 -07:00
Ryan Nowak e401f35b45
Header propagation sample and UX improvements (#9793)
Creating a sample for the header propagation package and some various
misc UX improvements based on building the sample.

A small list:
- allow duplicate inbound names
- de-dupe based on outbound names
- add sugar for configuration
- simplify pattern for transforming values
- add error message for missing middleware

Also a few small perf things.

I started this out by wanting to remove the following from the
configuration pattern:
```C#
options.Headers.Add("X-TraceId", null);
```

This pattern with null is undiscoverable, but we didn't provide
something simpler. The most common case was to add a custom collection
type so we can define sugar methods.

The next realization is that in practical case (dist tracing sample) you
either way to *key* off of the same inbound header twice, or you don't
have an inbound header at all, and you will synthesize the value every
time. This means that the way we're treating inbound header names is a
bit wrong. We don't want inbound header names to be unique, we want
*outbound header names to be unique*.

Next, I want to consolidate DefaultValue and ValueFactory. The problems
I saw with this:
- DefaultValue is a trap. It's rare to use a static value.
- ValueFactory really wants the header name *and* value

I think what's there now is much more terse to work with.
2019-05-07 11:07:42 -07:00
Steve Sanderson e0c32f42f4
Key support. Implements #8232 (#9850)
* Store component/element keys on RenderTreeFrame

Also refactored how RenderTreeFrame gets constructed. The previous arrangement of having ad-hoc ctor overloads for different scenarios became intractible (too many combinations to avoid clashes; risk of accidentally losing field values when cloning). There's now one constructor per RenderTreeFrameType, so you always know where to add any new field values, and implicitly guarantees you don't lose other field values because adding a new param forces updates at all the call sites.

* Add StackObjectPool, which will be useful momentarily

* Support keyed insertions/deletions

* Refactor AppendDiffEntriesForRange to prepare for adding "move" logic

* Apply permutations on the JS side

* Handle keyed moves by writing a post-edit permutation list

* Shrink KeyedItemInfo struct

* Include sourcemaps when building client-side Blazor apps with ReferenceFromSource

* Update struct length of edit frames now it's explicit layout

It's longer now because all the reference-type fields, except the last, now have to be 8 bytes for compatibility with 64-bit runtimes. Previously on Mono WebAssembly the reference-type fields were all 4 bytes.

* Tolerate clashing keys (i.e., produce a valid diff, even if suboptimal)

* Tolerate keys being added/removed incorrectly

* E2E test harness for 'key'

* Some more unit test cases

* Invert diffing logic to prefer matching by key over sequence

Previously it preferred sequence over key, but that's wrong, and surfaces as bugs when you mix keyed and unkeyed items. We need to prefer key over sequence, because key is meant to guarantee preservation, whereas sequence is just best-effort preservation.

* Make unit test cases more adversarial

* First actual E2E test

* In E2E test, verify correct preservation of components

* E2E tests for simple insert/delete cases (with and without keys)

* E2E test for reordering. Also extend other tests to verify simultaneous editing.

* E2E test for many simultaneous changes

* Update reference sources

* CR: Avoid x = y = z

* CR: Only use 'finally' for actual cleanup

* CR: Clean up RenderTreeFrame assignment

* CR: Include 'key' in RenderTreeFrame.ToString()

* CR: Avoid "new T()" in StackObjectPool

* CR: Make KeyedItemInfo readonly

* CR: Handle change of frame type with matching keys (and sequence)

* CR: Add E2E test showing form + key scenarios

* Preserve focus across edits

* Tweak E2E test case

* In client-side Blazor, prevent recursive event handler invocations

* Actual E2E tests for moving form elements
2019-05-07 18:22:10 +01:00
BrennanConroy 14496c9989
React to SignalR hub protocol change (#10010)
https://github.com/aspnet/AspNetCore/issues/5320
2019-05-07 08:18:12 -07:00
John Luo 6e691e9f20
Use nuget release of netfx ref package (#10024) 2019-05-07 01:17:14 -07:00
Doug Bunting c7287509a0 Update EF Core submodule for 2.1
- aspnet/AspNetCore-Internal#2474
2019-05-06 21:50:39 -07:00
Doug Bunting fcd96b2fe5 Update EF Core submodule for 2.2
- aspnet/AspNetCore-Internal#2474
2019-05-06 18:49:46 -07:00
Doug Bunting 493e216ca6
Correct `$(StartArguments)` 2019-05-06 18:46:52 -07:00
Ryan Nowak d3400f7cb2
Fix: #6882 - Explode UseBlazor (#9449)
This changes the recipe for client-side blazor to use similar primitives
to server side applications.

---

I ignored auto-rebuild support because it's currently dead code until we
have that in VS. If we add auto-rebuild to ASP.NET Core - we'd probably want
to make that a separate gesture inside `IsDevelopement()` like other
dev-time features anyway.

---

The static files hookup is a special thing because creating the file
server for a client-side Blazor app involves some non-trivial work. We
plan to make this better in the future.

What's nice about this pattern is that the implementation is pretty
simple and literal, and it scales fine if you have multiple Blazor
client-side apps.

I didn't provide a lot of options here, it's pretty much the same as
UseBlazor.

---

I feel pretty good about the wireup with routing to use the
`index.html` from the client app. I think it's pretty to-the-point.
2019-05-06 18:09:26 -07:00
Ryan Brandenburg 8fd86c38db
Make some tests Flaky (#9935)
Mark some tests flaky.
2019-05-06 15:33:02 -07:00
Doug Bunting 2b186421d8
Merge branch 'release/2.2' into merge/release/2.1-to-release/2.2 2019-05-06 15:18:44 -07:00
Ben Adams bbf7ed2907 Lazy create ExceptionHandlerMiddleware statemachine (#9549) 2019-05-06 15:15:48 -07:00