text:
Switch repo-labels workflow to a new GitHub Action

The existing label sync action appears to no longer be maintained. Running the action in this repository generates rejected promise errors due to abuse detections from the GitHub API.
crazy-max/ghaction-github-labeler looks to be a maintained alternative. This action also supports dry runs.
This change runs the label sync action in dry run mode on PRs where either the label manifest or the GitHub Actions workflow changes.
This change runs the label sync action in live mode on merges to either the label manifest or the GitHub Actions workflow as well as once a week on a schedule.
The logged output from this new action is :100:.

It looks like the action being replaced had some bugs where labels were not updated after creation. This action will make some changes when it is merged. Dry run logs:
👉 Current labels
- name: A-C-API
  color: f7e101
  description: 'Area: C APIs for compatibility with existing interpreters.'
- name: A-build
  color: f7e101
  description: 'Area: CI build infrastructure.'
- name: A-build-target
  color: f7e101
  description: 'Area: Support for builds of specific targets.'
- name: A-codegen
  color: f7e101
  description: 'Area: Code generation while executing Ruby.'
- name: A-compiler
  color: f7e101
  description: 'Area: Ruby to Rust/machine-code compiler support.'
- name: A-core
  color: f7e101
  description: >-
    Area: Core traits and interpreter-agnostic Ruby Core and Ruby stdlib
    implementations.
- name: A-crate-features
  color: f7e101
  description: 'Area: Compile-time features or attributes.'
- name: A-deps
  color: f7e101
  description: 'Area: Source and library dependencies.'
- name: A-emoji
  color: f7e101
  description: 'Area: Emoji support in interpreter implementations.'
- name: A-filesystem
  color: f7e101
  description: 'Area: Filesystem access and implementations.'
- name: A-frontend
  color: f7e101
  description: 'Area: Frontends for interpreters, like the `ruby` or `irb` binaries.'
- name: A-gems
  color: f7e101
  description: 'Area: Support for Rubygems.'
- name: A-memory-management
  color: f7e101
  description: 'Area: Memory management and garbage collection.'
- name: A-optional-stdlib
  color: f7e101
  description: 'Area: Optional Ruby Standard Library.'
- name: A-packaging
  color: f7e101
  description: 'Area: Packaging releases for distribution.'
- name: A-parallelism
  color: f7e101
  description: 'Area: Multi-threading and true parallelism at an interpreter level.'
- name: A-parser
  color: f7e101
  description: 'Area: Parser implementations.'
- name: A-performance
  color: f7e101
  description: 'Area: Performance improvements and optimizations.'
- name: A-project
  color: f7e101
  description: 'Area: Infrastructure for running an open source project.'
- name: A-release
  color: f7e101
  description: 'Area: crates.io releases and version bumps.'
- name: A-ruby-core
  color: f7e101
  description: 'Area: Ruby Core types.'
- name: A-ruby-language
  color: f7e101
  description: 'Area: Ruby language spec support.'
- name: A-ruby-stdlib
  color: f7e101
  description: 'Area: Ruby Standard Library packages.'
- name: A-rust-extensions
  color: f7e101
  description: >-
    Area: Rust extension support for Artichoke interpreters, support for native
    Rubygems.
- name: A-security
  color: f7e101
  description: 'Area: Security vulnerabilities and unsoundness issues.'
- name: A-single-binary
  color: f7e101
  description: 'Area: Single binary distribution..'
- name: A-spec
  color: f7e101
  description: 'Area: ruby/spec infrastructure and completeness.'
- name: A-vm
  color: f7e101
  description: 'Area: Interpreter VM implementations.'
- name: B-Artichoke
  color: ed95e4
  description: 'Backend: Implementation of artichoke-core using Rust-native backend.'
- name: B-MRI
  color: ed95e4
  description: 'Backend: Implementation of artichoke-core using MRI.'
- name: B-mruby
  color: ed95e4
  description: 'Backend: Implementation of artichoke-core using mruby.'
- name: C-bug
  color: c1c8ff
  description: 'Category: This is a bug.'
- name: C-docs
  color: c1c8ff
  description: 'Category: Improvements or additions to documentation.'
- name: C-enhancement
  color: c1c8ff
  description: 'Category: New feature or request.'
- name: C-quality
  color: c1c8ff
  description: 'Category: Refactoring, cleanup, and quality improvements.'
- name: C-question
  color: c1c8ff
  description: 'Category: Further information is requested.'
- name: CAPI-MRI
  color: 1d76db
  description: 'C API: MRI-compatible C API'
- name: CAPI-mruby
  color: 1d76db
  description: 'C API: MRB_API-compatible C API.'
- name: E-easy
  color: 02e10c
  description: 'Call for participation: Experience needed to fix: Easy / not much.'
- name: E-hard
  color: 02e10c
  description: 'Call for participation: Experience needed to fix: Hard / a lot.'
- name: E-help-wanted
  color: 02e10c
  description: 'Call for participation: Help is requested to fix this issue.'
- name: E-medium
  color: 02e10c
  description: 'Call for participation: Experience needed to fix: Medium / intermediate.'
- name: E-needs-test
  color: 02e10c
  description: 'Call for participation: writing correctness tests.'
- name: O-linux
  color: 6e6ec0
  description: 'Target: Support for building on Linux (GNU / musl) targets.'
- name: O-macOS
  color: 6e6ec0
  description: 'Target: Support for building on macOS / Darwin targets.'
- name: O-wasm-emscripten
  color: 6e6ec0
  description: 'Target: Support for building the `wasm32-unknown-emscripten` target.'
- name: O-wasm-unknown
  color: 6e6ec0
  description: 'Target: Support for building the `wasm32-unknown-unknown` target.'
- name: O-windows
  color: 6e6ec0
  description: 'Target: Support for building the `x86_64-pc-windows-msvc` target.'
- name: S-archive
  color: d3dddd
  description: 'Status: This pull request exists to archive an unmerged branch.'
- name: S-blocked
  color: d3dddd
  description: >-
    Status: marked as blocked ❌ on something else such as other implementation
    work.
- name: S-do-not-merge
  color: d3dddd
  description: 'Status: This pull request should not be merged.'
- name: S-duplicate
  color: d3dddd
  description: 'Status: This issue or pull request already exists.'
- name: S-invalid
  color: d3dddd
  description: 'Status: This doesn''t seem right.'
- name: S-postponed
  color: d3dddd
  description: 'Status: This issue or pull request is being postponed until later.'
- name: S-speculative
  color: d3dddd
  description: 'Status: This is just an idea.'
- name: S-stale
  color: d3dddd
  description: This PR is stale. Please open a new PR if you'd like to pick this back up.
- name: S-wip
  color: d3dddd
  description: 'Status: This pull request is a work in progress.'
- name: S-wontfix
  color: d3dddd
  description: 'Status: This will not be worked on.'
- name: dependencies
  color: 0366d6
  description: Pull requests that update a dependency file
- name: rust
  color: '000000'
  description: Pull requests that update Rust code

🏃 Running GitHub Labeler
[dryrun] ✅ Skipping update for 'A-build' label. Same color and description
[dryrun] ✅ Skipping update for 'A-build-target' label. Same color and description
[dryrun] ✅ Skipping update for 'A-C-API' label. Same color and description
[dryrun] ✅ Skipping update for 'A-codegen' label. Same color and description
[dryrun] ✅ Skipping update for 'A-compiler' label. Same color and description
[dryrun] ✅ Skipping update for 'A-core' label. Same color and description
[dryrun] ✅ Skipping update for 'A-crate-features' label. Same color and description
[dryrun] ✅ Skipping update for 'A-deps' label. Same color and description
[dryrun] ✅ Skipping update for 'A-emoji' label. Same color and description
[dryrun] ✅ Skipping update for 'A-filesystem' label. Same color and description
[dryrun] ✅ Skipping update for 'A-frontend' label. Same color and description
[dryrun] ✅ Skipping update for 'A-gems' label. Same color and description
[dryrun] ✅ Skipping update for 'A-memory-management' label. Same color and description
[dryrun] ✅ Skipping update for 'A-optional-stdlib' label. Same color and description
[dryrun] ✅ Skipping update for 'A-packaging' label. Same color and description
[dryrun] ✅ Skipping update for 'A-parallelism' label. Same color and description
[dryrun] ✅ Skipping update for 'A-parser' label. Same color and description
[dryrun] ✅ Skipping update for 'A-performance' label. Same color and description
[dryrun] ✅ Skipping update for 'A-project' label. Same color and description
[dryrun] ✅ Skipping update for 'A-release' label. Same color and description
[dryrun] ✅ Skipping update for 'A-ruby-core' label. Same color and description
[dryrun] ✅ Skipping update for 'A-ruby-language' label. Same color and description
[dryrun] ✅ Skipping update for 'A-ruby-stdlib' label. Same color and description
[dryrun] ✅ Skipping update for 'A-rust-extensions' label. Same color and description
[dryrun] ✅ Skipping update for 'A-security' label. Same color and description
[dryrun] ✅ Skipping update for 'A-single-binary' label. Same color and description
[dryrun] ✅ Skipping update for 'A-spec' label. Same color and description
[dryrun] ✅ Skipping update for 'A-vm' label. Same color and description
[dryrun] ✅ Skipping update for 'B-Artichoke' label. Same color and description
[dryrun] ✅ Skipping update for 'B-MRI' label. Same color and description
[dryrun] ✅ Skipping update for 'B-mruby' label. Same color and description
[dryrun] ✅ Skipping update for 'C-bug' label. Same color and description
[dryrun] ✅ Skipping update for 'C-docs' label. Same color and description
[dryrun] ✅ Skipping update for 'C-enhancement' label. Same color and description
[dryrun] ✅ Skipping update for 'C-quality' label. Same color and description
[dryrun] ✅ Skipping update for 'C-question' label. Same color and description
[dryrun] 🔨 Updating 'CAPI-MRI' label with color '1d76db' and desc 'C API: MRI-compatible C API.'
[dryrun] 🔨 Updating 'CAPI-mruby' label with color '1d76db' and desc 'C API: mruby MRB_API-compatible C API.'
[dryrun] ✅ Skipping update for 'E-easy' label. Same color and description
[dryrun] ✅ Skipping update for 'E-medium' label. Same color and description
[dryrun] ✅ Skipping update for 'E-hard' label. Same color and description
[dryrun] ✅ Skipping update for 'E-help-wanted' label. Same color and description
[dryrun] 🔨 Updating 'E-needs-test' label with color '02e10c' and desc 'Call for participation: Writing correctness tests.'
[dryrun] ✅ Skipping update for 'O-linux' label. Same color and description
[dryrun] ✅ Skipping update for 'O-macOS' label. Same color and description
[dryrun] ✅ Skipping update for 'O-wasm-emscripten' label. Same color and description
[dryrun] ✅ Skipping update for 'O-wasm-unknown' label. Same color and description
[dryrun] 🔨 Updating 'O-windows' label with color '6e6ec0' and desc 'Target: Support for building on Windows targets like `x86_64-pc-windows-msvc`.'
[dryrun] ✅ Skipping update for 'S-archive' label. Same color and description
[dryrun] 🔨 Updating 'S-blocked' label with color 'd3dddd' and desc 'Status: Marked as blocked ❌ on something else such as other implementation work.'
[dryrun] ✅ Skipping update for 'S-do-not-merge' label. Same color and description
[dryrun] ✅ Skipping update for 'S-duplicate' label. Same color and description
[dryrun] 🔨 Updating 'S-invalid' label with color 'd3dddd' and desc 'Status: This issue or pull request is not well-formed.'
[dryrun] ✅ Skipping update for 'S-postponed' label. Same color and description
[dryrun] ✅ Skipping update for 'S-speculative' label. Same color and description
[dryrun] 🔨 Updating 'S-stale' label with color 'd3dddd' and desc 'Status: This PR is stale. Please open a new PR if you'd like to pick this back up.'
[dryrun] ✅ Skipping update for 'S-wip' label. Same color and description
[dryrun] 🔨 Updating 'S-wontfix' label with color 'd3dddd' and desc 'Status: This issue or pull request will not be worked on.'
[dryrun] 🔫 Deleting 'dependencies'
[dryrun] 🔫 Deleting 'rust'

repo: artichoke/artichoke


text:
Update docker-hub-image-readme.md

Remove reference to Ruby 2.6.3, resync markdown link anchors with upstream artichoke/artichoke README.

this update has been pushed to Docker Hub

source: gharchive/pull-request

repo: artichoke/docker-artichoke-nightly

license: MIT

license_type: permissive

license_source: github-api


text:
CI is all broken

Apparently the CI is all broken, see:

https://github.com/artipie/rpm-adapter/runs/636089140?check_suite_focus=true

there are old puzzles that doesn't pass the checks

https://github.com/artipie/rpm-adapter/runs/636089098?check_suite_focus=true

codecov can't run

@g4s8/z please, pay attention to this issue

The job #161 assigned to @olenagerasimova/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@victornoel the puzzle #168 is still not solved.

@victornoel @olenagerasimova I've also renamed check names in #169 and enabled it as required

@g4s8 @olenagerasimova I think I can close this then, thanks :)

Job was finished in 26 hours, bonus for fast delivery is possible (see §36)

@sereshqua/z please review this job completed by @olenagerasimova/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat quality good

@victornoel the only puzzle #168 is solved here.

source: gharchive/issue

repo: artipie/rpm-adapter


text:
[BUG] Fedora: ansible role fails when systemd is degraded

Describe the bug
If my systemd status is degraded, i.e. systemctl is-system-running returns degraded and non-zero return code, task Fedora | Wait for systemd to complete initialization. fails.
To Reproduce
Steps to reproduce the behavior:

Have a systemd service failure
Run the role
See error:

TASK [ansible-tailscale : Fedora | Wait for systemd to complete initialization.] **********************************************************************************************************************************
fatal: [localhost]: FAILED! => changed=false
  attempts: 1
  cmd:
  - systemctl
  - is-system-running
  delta: '0:00:00.006059'
  end: '2022-12-10 11:24:32.714114'
  msg: non-zero return code
  rc: 1
  start: '2022-12-10 11:24:32.708055'
  stderr: ''
  stderr_lines: <omitted>
  stdout: degraded
  stdout_lines: <omitted>

Expected behavior
Role continues running even if sytemd service is degraded
Screenshots
Target (please complete the following information):

OS: Fedora
Ansible version: core 2.14.0
artis3n.tailscale version: 3.4.0
Tailscale version (set verbose to true):

1.34.0
 tailscale commit: bb6e746f335b45c0b103345c88a8ba9e0fba0e1a
 other commit: 8d1edab6f4eb0c28a9e64f7919b7e19a24beaa57
 go version: go1.19.2-ts3fd24dee31

Output of tailscale status during role execution (set verbose to true):
tailscale was already running.
Additional context
Add any other context about the problem here.

Can you elaborate more on your use case? If systems is degraded, tailscaled will not be able to start and tailscale will be unable to run.

I was running the playbook on my laptop, and my nvidia-powerd service failed. systemd was therefore degraded with an rc of 1, but tailscaled should and will run.

The task is here: https://github.com/artis3n/ansible-role-tailscale/blob/a60ff5d3bba8b57b56b3a9404d62bf2d265df7d0/tasks/fedora/install.yml#L3-L12
I think degraded is an acceptable state for the installation to proceed, but because the rc is 1, the command would fail instead.

Ah, I didn't look at my task before responding to you :)
This makes sense, I'll explore a conditional failed_when.

I disabled and stopped the nvidia-powered service and then ran systemctl reset-failed to clear the degraded status.

Intermittent reproduction in tests: https://github.com/artis3n/ansible-role-tailscale/actions/runs/4931556721/jobs/8813704921?pr=328#step:7:253

This should be fixed when I next release this role

authors: JonathanPorta artis3n zoenglinghou


text:
update circleci job contexts #PLATFORM-1349

AWS IAM credentials set via the "hokusai" circleci context

🙌

repo: artsy/APR

license: mit

license_source: bigquery


text:
auction preview state

current

update

ohh, hrm, interesting - makes sense.

authors: katarinabatina orta

repo: artsy/eigen


text:
[Tests] Trait collections are nil at the time of running tests

So one can't accurately determine whether we should use a compact or large layout.
This was causing issues in the ARCreateAccountViewControllerTests, and is used in other places.

Our guess was that it was related to the view setup structure of the test when using the trait collections instead of the [UIDevice isPad]

@mennenia What’s the status on this?

These tests are now covered in integration test, and this particular view controller will be removed in the new onboarding anyway.

authors: alloy mennenia orta


text:
feat(FX-4305): add ability to hide bottom tabs on specific screen

This PR resolves FX-4305
Description

Demo
iOS
https://user-images.githubusercontent.com/3513494/205075962-6e138520-1512-43ee-b33b-6ce760de1e22.mp4
Android
https://user-images.githubusercontent.com/3513494/205077788-d45d93b6-cf39-4449-b8df-f309818a7c95.mp4
PR Checklist

[x] I tested my changes on iOS / Android.
[x] I added screenshots or videos to illustrate my changes.
[x] I added Tests and Stories for my changes.
[ ] I added an app state migration.
[ ] I hid my changes behind a feature flag.
[ ] I have prefixed changes that need to be tested during a release QA with [NEEDS EXTERNAL QA] on the changelog.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

add ability to hide bottom tabs on specific screen - dimatretyak

Need help with something? Have a look at our docs, or get in touch with us.

also tested on my device and the previous issue is not reproducible any more!

if we could move from the hook to the routes

I don't quite understand what you mean. if it's not difficult for you, can you please describe it in a little more detail?

I don't want to block this, but I do want to understand the grey bit

Here you can find a little more context about the problem and some solutions (only the first proposed solution solved the problem in our case)

authors: dimatretyak gkartalis


text:
chore: update Fastlane version to latest

Description
This PR comes as an attempt to fix the latest ios beta failures due to Could not install WWDR certificate. Starting first with the easy route by updating to latest fastlane, if this doesn't work, happy to take the long route as well 😄

PR Checklist

[ ] I have tested my changes on iOS and Android.
[x] I hid my changes behind a feature flag, or they don't need one.
[x] I have included screenshots or videos, or I have not changed the UI.
[x] I have added tests, or my changes don't require any.
[x] I added an app state migration, or my changes do not require one.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

update fastlane to latest - mounir

Need help with something? Have a look at our docs, or get in touch with us.

I triggered a build - let's hope it fixed the issue


text:
BUGFIX: Add missing info tip

(Missed a label from https://github.com/artsy/force/pull/1631)

cc @katarinabatina .

@damassi if it's not too much of a bother to use the avant vs garamond

will the user bid status come through in this change?

Yup, that was always there (meaning, was never an issue); you just have to be logged in otherwise it won't appear.

@damassi sweeeeeeeet! Looks great

authors: damassi katarinabatina

repo: artsy/force


text:
adding usage for domesticShipping and internationalShipping fees for artwork

This assumes we can get data introduced here: https://github.com/artsy/metaphysics/pull/1205 and here: https://github.com/artsy/metaphysics/pull/1207
I don't think MP was deployed any time lately but this does seem to not change anything if the data in not available.

In CMS there is also a field that asks if the work is available for pick up. Not sure if/how this information should be reflected in force. @briansw?

@mzikherman - updated here based on the laters MP changes. The code here is definitely way cleaner now!
Don't think we'll see those new values for shipping though before gravity changes to json permissions are merged/deployed.
But the old stuff works as expected (shows old string)

Nice! 😎
If we want to update this (such as not showing this data if the work isn't available for ecommerce or other conditions), we can 🤞 easily do so in Metaphysics [hopefully]!

MP is in prod, so 💚

authors: mzikherman oxaudo


text:
fix: Redirect about sub-sections GRO-212

While working through #7079 I failed to handle the sub-section URLs. This PR gobbles them up and redirects them to the main about page. More chatter here:
https://artsy.slack.com/archives/C9SATFLUU/p1614380046128900
https://artsyproduct.atlassian.net/browse/GRO-212
/cc @artsy/grow-devs @dblandin @joeyAghion @dzucconi

Wondering how this broke when it looks like this app hasn't been touched in quite some time?

Also: it's fine, but technically these routes should be supported (and scrolled to) on load; rather than redirecting to bare /about

Yeah there's more context here @dzucconi - the brand team has asked for us to drop two sections altogether and they have been editing the JSON that drives the page. We're simplifying the whole thing and so there's no need for this scroll behavior nor the sub-section URLs!

authors: dzucconi jonallured


text:
Build depends on a full download of IntelliJ

When building detekt now that the detekt-intellij-plugin is merged Gradle will download a full installation of IntelliJ during the build phase.
Expected Behavior

We don't depend on a 350+MB download to build the project.

Current Behavior
Gradle downloads ideaIC-2017.3.5.zip
Steps to Reproduce (for bugs)
./gradlew assemble

Yes, that's right. It's huge, but what to do about it?
gradle and travis caches the dependency. After the first download it is not a big deal, is it?
Well, ofc we could open a new repository for it.

I agree with @Mauin
I think there are a number of people out there who don't want to use detekt with the IntelliJ plugin. Especially those who use detekt on their CI server.
Adding a new repository is a good approach in my opinion.

#826 removes the plugin. It has now a new home here

authors: Mauin arturbosch schalkms

repo: arturbosch/detekt


text:
Rename config and id of ConfigAware

adds documentation to the interface
and hopefully make it clearer what this properties should be used for

Argh. It confused me again...
On Mon, Sep 24, 2018, 19:53 Artur Bosch notifications@github.com wrote:

@arturbosch commented on this pull request.
In
detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/ConfigAware.kt
https://github.com/arturbosch/detekt/pull/1156#discussion_r219929730:

@@ -32,7 +52,7 @@ interface ConfigAware : Config {
*/
val autoCorrect: Boolean
get() = valueOrDefault("autoCorrect", false) &&

		config.valueOrDefault("autoCorrect", true)

		ruleSetConfig.valueOrDefault("autoCorrect", true)

Nope, valueOrDefault operates on the rule config and
ruleSetConfig.valueOrDefault operates on the rule set config.
That means the user can write active = true for all rules but also turn
off autoCorrect by only but the autoCorrect property on the rule set
level:
formatting:
autoCorrect: false
Indentation:
autoCorrect: true
In this example the auto correction wont work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/arturbosch/detekt/pull/1156#discussion_r219929730,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF4k0VKWRnzx1CLkFDd725to2q2QSzBYks5ueRwIgaJpZM4W13If
.

I will write proper documentation for all api and core classes soon.

authors: Mauin arturbosch


text:
add descriptions to rules in style, empty, exceptions

A first set of (very basic) descriptions of all rules in the style, empty and exception rulesets.

I like them! Will merge them asap -> got the sonar-plugin to work, need descriptions :D

Awesome!

Links to #110


text:
Possible future feature

For the Telegram bot.
Giving album/playlist links should return the audio files for all tracks in it.

Thank you for fast Implementation.

repo: artyshko/smd


text:
PR for https://github.com/arun-gupta/kubernetes-aws-workshop/issues/8

rolling-upgrade-clusters should be complete

done. created issue for blue/green method: https://github.com/arun-gupta/kubernetes-aws-workshop/issues/38

fixed links. let me know if you see anything else.

repo: arun-gupta/kubernetes-aws-workshop


text:
CLANG-16 UBSan Error constructor call with insufficient space for an object of type 'node_t'

Our sanitizer runs have produced the following errors. UBSan claims that an object is constructed in a memory region that is too small for the object.
Details

```
/immer/immer/detail/hamts/node.hpp:224:26: runtime error: constructor call on address 0x60300009a540 with insufficient space for an object of type 'node_t' (aka 'immer::detail::hamts::node, std::shared_ptr>, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::hash_key, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::equal_key, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5>')
0x60300009a540: note: pointer points here
 00 00 00 00  be be be be be be be be  be be be be be be be be  be be be be be be be be  00 00 00 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /immer/immer/detail/hamts/node.hpp:224:26 in
/immer/immer/detail/hamts/node.hpp:229:12: runtime error: member access within address 0x60300009a540 with insufficient space for an object of type 'node_t' (aka 'immer::detail::hamts::node, std::shared_ptr>, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::hash_key, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::equal_key, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5>')
0x60300009a540: note: pointer points here
 00 00 00 00  01 00 00 00 be be be be  be be be be be be be be  be be be be be be be be  00 00 00 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /immer/immer/detail/hamts/node.hpp:229:12 in
/immer/immer/detail/hamts/node.hpp:229:12: runtime error: member access within address 0x60300009a540 with insufficient space for an object of type 'impl_t' (aka 'immer::detail::csl::member_two, std::shared_ptr>, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::hash_key, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::equal_key, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5>::impl_data_t, immer::detail::csl::member>>::type::ownee>::type>::type>::type')
0x60300009a540: note: pointer points here
 00 00 00 00  01 00 00 00 be be be be  be be be be be be be be  be be be be be be be be  00 00 00 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /immer/immer/detail/hamts/node.hpp:229:12 in
/immer/immer/detail/hamts/node.hpp:229:17: runtime error: member access within address 0x60300009a548 with insufficient space for an object of type 'immer::detail::hamts::node, std::shared_ptr>, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::hash_key, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::equal_key, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5>::impl_data_t'
0x60300009a548: note: pointer points here
 be be be be  be be be be be be be be  be be be be be be be be  00 00 00 00 00 00 00 00  00 00 00 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /immer/immer/detail/hamts/node.hpp:229:17 in
/immer/immer/detail/hamts/node.hpp:229:19: runtime error: member access within address 0x60300009a548 with insufficient space for an object of type 'data_t'
0x60300009a548: note: pointer points here
 be be be be  be be be be be be be be  be be be be be be be be  00 00 00 00 00 00 00 00  00 00 00 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /immer/immer/detail/hamts/node.hpp:229:19 in
/immer/immer/detail/hamts/node.hpp:229:24: runtime error: member access within address 0x60300009a548 with insufficient space for an object of type 'inner_t'
0x60300009a548: note: pointer points here
 be be be be  be be be be be be be be  be be be be be be be be  00 00 00 00 00 00 00 00  00 00 00 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /immer/immer/detail/hamts/node.hpp:229:24 in
/immer/immer/detail/hamts/node.hpp:230:12: runtime error: member access within address 0x60300009a540 with insufficient space for an object of type 'node_t' (aka 'immer::detail::hamts::node, std::shared_ptr>, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::hash_key, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::equal_key, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5>')
0x60300009a540: note: pointer points here
 00 00 00 00  01 00 00 00 be be be be  00 00 00 00 be be be be  be be be be be be be be  00 00 00 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /immer/immer/detail/hamts/node.hpp:230:12 in
/immer/immer/detail/hamts/node.hpp:230:12: runtime error: member access within address 0x60300009a540 with insufficient space for an object of type 'impl_t' (aka 'immer::detail::csl::member_two, std::shared_ptr>, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::hash_key, immer::map, std::shared_ptr, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>>::equal_key, immer::memory_policy>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5>::impl_data_t, immer::detail::csl::member>>::type::ownee>::type>::type>::type')
0x60300009a540: note: pointer points here
 00 00 00 00  01 00 00 00 be be be be  00 00 00 00 be be be be  be be be be be be be be  00 00 00 00
```

A backtrace is also available:
    #0 0x55fcb55776b2 in make_inner_n /immer/immer/detail/hamts/node.hpp:224
    #1 0x55fcb55776b2 in immer::detail::hamts::champ<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<arangodb::consensus::Node const>>, immer::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<arangodb::consensus::Node const>, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy<arangodb::consensus::Node::AccountingHeap<arangodb::immer::thread_local_free_list_heap_policy<immer::cpp_heap, 1024ul>>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5u>::hash_key, immer::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<arangodb::consensus::Node const>, arangodb::consensus::Node::TransparentHash, arangodb::consensus::Node::TransparentEqual, immer::memory_policy<arangodb::consensus::Node::AccountingHeap<arangodb::immer::thread_local_free_list_heap_policy<immer::cpp_heap, 1024ul>>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5u>::equal_key, immer::memory_policy<arangodb::consensus::Node::AccountingHeap<arangodb::immer::thread_local_free_list_heap_policy<immer::cpp_heap, 1024ul>>, immer::refcount_policy, immer::spinlock_policy, immer::no_transience_policy, false, true>, 5u>::empty() /immer/immer/detail/hamts/champ.hpp:142
    #2 0x55fcb55afe70 in map /immer/immer/map.hpp:547

I had a closed look at the code in question:
    static node_t* make_inner_n(count_t n)
    {
        assert(n <= branches<B>);
        auto m = heap::allocate(sizeof_inner_n(n));
        auto p = new (m) node_t;
        assert(p == (node_t*) m);

        p->impl.d.data.inner.nodemap = 0;
        p->impl.d.data.inner.datamap = 0;
        p->impl.d.data.inner.values  = nullptr;
        return p;
    }

The size of the allocated memory is calculated using size_of_inner_n in the same file, which looks like this
    constexpr static std::size_t sizeof_inner_n(count_t count)
    {
        return immer_offsetof(impl_t, d.data.inner.buffer) +
               sizeof(inner_t::buffer) * count;
    }

Now the part that confuses me: The type impl_t is
using impl_t = combine_standard_layout_t<impl_data_t, refs_t, ownee_t>;

Since refs_t and ownee_t are empty classes, they are optimized away by combine_standard_layout_t. impl_data_t remains and is defined as
    struct inner_t
    {
        bitmap_t nodemap;
        bitmap_t datamap;
        values_t* values;
        aligned_storage_for<node_t*> buffer;
    };

    union data_t
    {
        inner_t inner;
        collision_t collision;
    };

    struct impl_data_t
    {
        data_t data;
    };

For now lets ignore what happens if collision_t which depends on T is actually bigger than inner_t. If make_inner_n is called with n = 0, it does not allocate enough memory, because the member buffer is no longer accounted for.
This indeed happens here:
    static node_t* empty()
    {
        static const auto node = node_t::make_inner_n(0);
        return node->inc();
    }

Any ideas whether this bogus or, if the above analysis is correct, how it can be fixed?
My first guess would be to patch sizeof_inner_n and always use max(1, n) instead of n.

Indeed, the allocation is to small.
     constexpr static std::size_t sizeof_inner_n(count_t count)
     {
         auto const inner_size = immer_offsetof(impl_t, d.data.inner.buffer) +
                sizeof(inner_t::buffer) * count;
         return std::max(sizeof(node_t), inner_size);
     }

Fix the issue at hand. However, I think there are many more places where not enough memory is allocated for the objects that are constructed.

That buffer object is never used when N=0 as it used to construct in it the actual elements of the node (it also does not have constructor nor touches the memory unless we do it explicitly).
I see the solution in @jsteemann PR and that should fix the UB, but at the cost of some memory waste. Maybe a solution is to take the buffer type completely out of the struct, and append it (with correct alignment) after the struct "manually".

That could work, indeed. I might give it a try later today.

@maierlars did you find time to try that solution?
It could help with this: https://github.com/google/oss-fuzz/pull/12087/files/bc7e6e5181614ea5ab41c9dce7613cc420686b5d..50591a9fcf22e37316e5f18a4e047f4a31a377cf

I'm sorry, there was so much else to do. I totally forgot about it. :(

Are you still interested in trying to fix it? :)

Please don't hold back if you want to give it a try. You seem eager to attack it ;)

Not really... I'm super busy and won't be able to do it this month. Just saw the comments on the other ticket and thought of this. Feel free to fix it first :) I'll let you know here when/if I have time to work on it myself.

authors: arximboldi maierlars

repo: arximboldi/immer


text:
GraphQL

Add Graphql CheatSheet

Sure, you can start working on it :)


text:
Convert html text to NSString

is there any method that could help me display the text converted from html string?

If you have an HTML NSString, you can display it with setHtmlString:, which will automatically convert the NSString to an NSAttributedString and display it in the text view. If you already have an NSAttributedString, you can call the setAttributedText: method.

thanks @Deadpikle

authors: Deadpikle Milan3792 aryaxt

repo: aryaxt/iOS-Rich-Text-Editor


text:
🛑 SeeJSONBot is down

In 07bdb49, SeeJSONBot (https://backend.isbotdown.com/bots/SeeJSONBot) was down:

HTTP code: 200
Response time: 86 ms

Resolved: SeeJSONBot is back up in 937bf5a after 1 hour, 59 minutes.

repo: arynyklas/uptime


text:
doc(README): remove typo

Description:
This Pull Request fixes a typographical error in the README.md file.
Changes Made:

Corrected "transpilation" to "transpiration" in the README.md file.

Additional Information:
This fix is not related to any existing issue. It's a minor typo that I noticed while reviewing the README.
Thank you for considering this contribution.

Not a typo. See #180

repo: as/a


text:
JSON style validation errors

It would be neat to have the errors returned as JSON instead of a string.
Given
type Profile struct {
  Email string `json:"email" valid:”required,email”`
}

type User struct {
  Profile Profile `json:"profile" valid:”…”`
}

you get errors back like
{
  “profile”: {
    “email”: [
      “non zero value required",
      "does not validate as email"
    ]
  }
}

Good idea, but at this moment I haven't thoughts how to solve it :smile: I will keep in mind this issue, maybe I'll find solution. Now you can do something using ErrorByField function, I hope that it will a bit helpful

authors: asaskevich wyattjoh

repo: asaskevich/govalidator


text:
Guide of using sdf mode

I find the quantitative results of the sdf mode are generally worse than the non-sdf mode. Would you or others provide some advice about the configuration of the sdf mode? Sincerely waiting for your kind help.

same problem, i run this, from offical scripts:   ./scripts/runall_syn_sdf.sh
CUDA_VISIBLE_DEVICES=7 python main.py data/nerf_synthetic/lego/ --workspace trial_syn_sdf_lego/ -O --bound 1 --scale 0.8 --dt_gamma 0 --stage 0 --sdf


text:
AttributeError: 'Trainer' object has no attribute 'log_ptr'

Description
Follow your steps to create the virtual environment and so on, but when training the below, i get the error in picture
train
pass in the processed _rgba.png by --image and do NOT pass in --text to enable zero-1-to-3 backend.
python main.py -O --image _rgba.png --workspace trial_image --iters 5000

Steps to Reproduce
train
pass in the processed _rgba.png by --image and do NOT pass in --text to enable zero-1-to-3 backend.
python main.py -O --image _rgba.png --workspace trial_image --iters 5000
Expected Behavior
training for successful
Environment
Package                     Version

absl-py                     1.4.0
accelerate                  0.19.0
aiofiles                    23.1.0
aiohttp                     3.8.4
aiosignal                   1.3.1
antlr4-python3-runtime      4.9.3
anyio                       3.6.2
async-timeout               4.0.2
attrs                       23.1.0
beautifulsoup4              4.12.2
cachetools                  5.3.0
carvekit-colab              4.1.0
certifi                     2023.5.7
charset-normalizer          3.1.0
click                       8.1.3
clip                        1.0
cmake                       3.26.3
contourpy                   1.0.7
cycler                      0.11.0
dearpygui                   1.9.1
debugpy-run                 1.6
diffusers                   0.16.1
einops                      0.6.1
fastapi                     0.95.1
filelock                    3.12.0
fonttools                   4.39.3
freqencoder                 0.0.0
frozenlist                  1.3.3
fsspec                      2023.5.0
ftfy                        6.1.1
gdown                       4.7.1
google-auth                 2.17.3
google-auth-oauthlib        1.0.0
gridencoder                 0.0.0
grpcio                      1.54.0
h11                         0.14.0
huggingface-hub             0.14.1
idna                        3.4
imageio                     2.28.1
imageio-ffmpeg              0.4.8
importlib-metadata          6.6.0
importlib-resources         5.12.0
Jinja2                      3.1.2
joblib                      1.2.0
kiwisolver                  1.4.4
kornia                      0.6.12
lightning-utilities         0.8.0
lit                         16.0.3
loguru                      0.7.0
Markdown                    3.4.3
markdown-it-py              2.2.0
MarkupSafe                  2.1.2
matplotlib                  3.7.1
mdurl                       0.1.2
mpmath                      1.3.0
multidict                   6.0.4
networkx                    3.1
ninja                       1.11.1
numpy                       1.24.3
nvdiffrast                  0.3.0
nvidia-cublas-cu11          11.10.3.66
nvidia-cuda-cupti-cu11      11.7.101
nvidia-cuda-nvrtc-cu11      11.7.99
nvidia-cuda-runtime-cu11    11.7.99
nvidia-cudnn-cu11           8.5.0.96
nvidia-cufft-cu11           10.9.0.58
nvidia-curand-cu11          10.2.10.91
nvidia-cusolver-cu11        11.4.0.1
nvidia-cusparse-cu11        11.7.4.91
nvidia-nccl-cu11            2.14.3
nvidia-nvtx-cu11            11.7.91
oauthlib                    3.2.2
omegaconf                   2.3.0
opencv-python               4.7.0.72
packaging                   23.1
Pillow                      9.5.0
pip                         23.1.2
protobuf                    3.20.3
psutil                      5.9.5
pyasn1                      0.5.0
pyasn1-modules              0.3.0
pydantic                    1.10.7
Pygments                    2.15.1
PyMCubes                    0.1.4
pymeshlab                   2022.2.post3
pyparsing                   3.0.9
PySocks                     1.7.1
python-dateutil             2.8.2
python-multipart            0.0.6
pytorch-lightning           2.0.2
PyYAML                      6.0
raymarching                 0.0.0
regex                       2023.5.5
requests                    2.30.0
requests-oauthlib           1.3.1
rich                        13.3.5
rsa                         4.9
scikit-learn                1.2.2
scipy                       1.10.1
sentencepiece               0.1.99
setuptools                  58.1.0
shencoder                   0.0.0
six                         1.16.0
sniffio                     1.3.0
soupsieve                   2.4.1
starlette                   0.26.1
sympy                       1.11.1
taming-transformers-rom1504 0.0.6
tensorboard                 2.13.0
tensorboard-data-server     0.7.0
tensorboardX                2.6
threadpoolctl               3.1.0
timm                        0.6.13
tokenizers                  0.13.3
torch                       2.0.1
torch-ema                   0.3
torchmetrics                0.11.4
torchvision                 0.15.2
tqdm                        4.65.0
transformers                4.28.1
trimesh                     3.21.6
triton                      2.0.0
typing_extensions           4.5.0
urllib3                     2.0.2
uvicorn                     0.22.0
wcwidth                     0.2.6
Werkzeug                    2.3.4
wheel                       0.40.0
xatlas                      0.0.7
yarl                        1.9.2
zipp                        3.15.0

Your image name is wrong, you wrote "cactus__rgba.png" (instead of "cactus_rgba.png" I think)

authors: cwwjyh voletiv

repo: ashawkey/stable-dreamfusion


text:
Unable to upgrade to angular 12 from 11

I keep getting this error in the console due to some required dependency in your package
Package "angular4-paystack" has an incompatible peer dependency to "@angular/common" (requires "^8.0.3" (extended), would install "12.2.2").
Package "angular4-paystack" has an incompatible peer dependency to "@angular/core" (requires "^8.0.3" (extended), would install "12.2.2").
✖ Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.

Hi @sleekcoda, it's a warning, not an error and should not cause any issues
A peer dependency is the recommended dependency for a package. I think it has been tested to work with angular v12
I could create a PR to make angular versions 8-12 compatible peer dependencies

Can you try updating to v3.0.2 and testing

Can you try updating to v3.0.2 and testing

I didn't need to update to this version
I forced the update and it worked after clearing other errors
Thank you!

authors: ashinzekene sleekcoda


text:
🛑 KMSd is down

In 7c7ffa0, KMSd (home.ashishkhokhar.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: KMSd is back up in 8837159 after 9 minutes.

repo: ashish-khokhar/services-status


text:
MDModeDisplayGlass模式下，發生畫面閃爍問題

切換成MDModeDisplayGlass模式時，左邊的畫面會不定時閃爍造成lag，但右邊畫面卻可以流暢的正常播放
想請問是GL在渲染發生的錯嗎？有辦法修復嗎？

是用的1.2.0版本吗？

對，是用1.2.0版本
右邊畫面播放時很流暢，但左邊畫面就會不定時閃爍

感谢反馈，下班回去我试试

authors: StewartXIII ashqal


text:
No module named PIL?

It goes wrong when running trackgesture.py. something I didn't install?

PIL is PILLOW package. Did you install it ?
try
pip install pillow

@Alpslee did you try installing pillow ? I am closing this issue. Feel free to reopen in case you still see same error msg.


text:
Retry certain operations before crashing

This PR adds retrying to certain requests so that gekko doesn't instantly crash when there's a network error. The mailer was the most problematic, but I've also seen it crash due to the exchange ticker not being available.

Sorry for the late reply! Looks great :) We should probably move all retries here (so all the implemented retries within the exchange implementations)

authors: andreialecu askmike

repo: askmike/gekko


text:
space between home and about section

the space between ironman description and about section is too much and also the font bold is look that you are highlighting the thing but the thing that you are highlight which is no too important that why the website doesn't look like responsive.

I am interested to do this can you please assign me this.

please assign me with the task @aslams2020


text:
🛑 Hacker News is down

In 0731fcd, Hacker News (https://news.ycombinator.com) was down:

HTTP code: 502
Response time: 60 ms

Resolved: Hacker News is back up in 23a7922 after 13 minutes.

repo: asolergo/upptime


text:
Not clear how to use multiple application directories

I'm trying to apply reorder-python-imports to Werkzeug, and eventually automate it with a pre-commit config.
There are multiple directories that act as source roots: src/ contains the werkzeug package, examples/ contains various example packages and modules. I tried reorder-python-imports --application-directory=src:examples, but this produced the equivalent of not using --application-directory at all: werkzeug wasn't sorted last under src, and the example package names weren't sorted last under examples. Specifying only one directory sorted that directory correctly but not the other.
From the current docs, I couldn't tell if I was using --application-directories incorrectly, so I'm not sure if this is an issue with me or the library.

From the readme:

(note: multiple paths are separated using a :).

Looking at the layout of werkzeug (it doesn't appear to be using ./src layout) I think you probably want:
--application-directories .:examples

Sorry, I have a branch I'm working on where I moved to src, was about to edit the op with the correct link: https://github.com/pallets/werkzeug/tree/code-style

I see, in that case you probably want .:src:examples

Hmm, I think src:examples actually worked, but not the way I expected. It's treating both werkzeug and the package under examples as sorting in the same group, when I wanted stuff under examples to treat werkzeug as installed rather than local.
For reference, here's the command:
reorder-python-imports --application-directories src:examples **/*.py

And an example of the sorting in the examples/cupoftee package:
import time
from os import path
from threading import Thread

from jinja2 import Environment
from jinja2 import PackageLoader

from cupoftee.db import Database
from cupoftee.network import ServerBrowser
from werkzeug.exceptions import HTTPException
from werkzeug.exceptions import NotFound
from werkzeug.middleware.shared_data import SharedDataMiddleware
from werkzeug.routing import Map
from werkzeug.routing import Rule
from werkzeug.wrappers import Request
from werkzeug.wrappers import Response

I want werkzeug to be at the same level as jinja in this case.

I see, so you want the examples to treat werkzeug as a third party
Yeah you can accomplish that with multiple entries of the hook, something like this? (untested, might need to tweak the regex)
-   repo: https://github.com/asottile/reorder_python_imports
    rev: ...
    hooks:
    -   id: reorder-python-imports
        files: ^(?!examples/)
        args: [--application-directories, '.:src']
    -   id: reorder-python-imports
        files: ^examples/
        args: [--application-directories, examples]

the . is to make the imports inside tests sort correctly btw

That worked, thanks for the example.

Awesome!  Thanks for the issue 🎉

authors: asottile davidism


text:
Example of building an ejected React app

If you eject from CRA (react-scripts) you can make something more incremental and bazel-idiomatic.
https://github.com/heartless-clown/bazel_aspect_rules_js_react/blob/ejected/app/react-app/BUILD.bazel#L111-L112 is a start
Also note: we promised this as "react-scripts-like" in https://github.com/bazelbuild/rules_nodejs/blob/stable/docs/examples.md#react

The https://github.com/aspect-build/bazel-examples/tree/main/react-cra is now ejected with fine grained ts_project transpilation & type checking done before the react-scripts build step. Babel not being used as suggested in https://github.com/bazelbuild/rules_nodejs/blob/stable/docs/examples.md#react but that would be easy to support with the transpiler attribute of ts_project.

Should we still keep an example of react that's not ejected?

Am I missing something? The example react-cra does not appear to be ejected as it's still using react-scripts rather than the ejected scripts that are generated.

I "ejected" it in the Bazel sense that it is now using fine grained ts_project targets for transpilation: https://github.com/aspect-build/bazel-examples/blob/main/react-cra/src/BUILD.bazel#L34 and not in the webpack config sense. The CRA webpack build is not only consuming the .js files transpiled by Bazel instead of doing transpilation & bundling.
Ejecting the webpack config is orthogonal to ejecting the transpilation. It could be done relatively easily as well.

I'll re-open this as a place holder to add an example of an ejected CRA webpack config as well.

That would be great, I'm currently trying to use the various js_rules to replace some legacy custom rules that were written a while ago and an example with a CRA ejected app would be great.
On a tangential topic, I noticed that due to the use of symlinks in the rules/bazel live reload features don't seem to work (due to watchman). Is there a way to get around using symlinked files?

That would be great, I'm currently trying to use the various js_rules to replace some legacy custom rules that were written a while ago and an example with a CRA ejected app would be great.
On a tangential topic, I noticed that due to the use of symlinks in the rules/bazel live reload features don't seem to work (due to watchman). Is there a way to get around using symlinked files?

The js_run_devserver rule should solve for that. Do you have an example or repro of it failing?

Hey there, sorry I've been out on holidays. The issue I'm seeing with js_run_devserver is I'm trying to run what is effectively scripts/start.js

js_run_devserver(
    name = "start",
    chdir = package_name(),
    data = _RUNTIME_DEPS,
    entry_point = "scripts/start.js",
)

However, it is complaining that the rule got multiple values for paramter 'entry_point'. Not sure if that's a bug, since the docs seem to indicate it is a valid parameter.

Ah the thing I also missed is that you need ibazel in order to pick up the changes. I think just using js_binary likely will work with ibazel.

Ahh. Looks like the doc generation is wrong for that attribute since it is not meant to be set the by the user. The macro looks like this,
def js_run_devserver(**kwargs):
    _js_run_devserver(
        enable_runfiles = select({
            "@aspect_rules_js//js/private:enable_runfiles": True,
            "//conditions:default": False,
        }),
        entry_point = "@aspect_rules_js//js/private:js_devserver_entrypoint",
        # This rule speaks the ibazel protocol
        tags = kwargs.pop("tags", []) + ["ibazel_notify_changes"],
        **kwargs
    )

I'll make an issue for it and also post a better failure message if it gets set by accident by a user.

That makes sense, thanks for looking into it. I'll try using node as the tool.

That makes sense, thanks for looking into it. I'll try using node as the tool.

You can pass a js_binary target as the tool. That is where you'll specify your custom entry point.

authors: alexeagle gregmagolan yads


text:
Skip anti forgery validation for non-browser clients

As I know, CSRF is only problem for browsers with cookie based authentication (since cookies are sent in a cross site request).
Think that we added global AutoValidateAntiforgeryTokenAttribute to protect out application. What if we want to use same controllers (API controllers) from a mobile application (or from postman for tests). In that case, we don't want to send antiforgery token in the cookie, because it's not a security problem for these clients, and it's hard to do it.
The problem is this code: https://github.com/aspnet/Antiforgery/blob/dev/src/Microsoft.AspNetCore.Antiforgery/Internal/DefaultAntiforgery.cs#L160
It throws exception if antiforgery cookie is not sent. My suggestion is to assume the request valid if this cookie is not present. Because, a cross-site request can not prevent to send this cookie (and just send the auth cookie).
What do you think?

Use tokens instead to protect your endpoints. That's what you have to do if you want to support both browser and non-browser clients.

But we may have an MVC project which both provides UI and API in single endpoint. In that case, we would want to apply anti forgery for browsers but not for other clients. I believe many developers in this case.
Also it's native to use token auth for a SPAs, but not always possible for multi-page applications.

In that case, we would want to apply anti forgery for browsers but not for other clients.

So how do you verify that?

I explained it in my first post:

assume the request valid if this cookie is not present. Because, a cross-site request can not prevent to send this cookie.

So, if a cross site will make a hack request, then it will automatically send the antiforgery cookie too.

So then the antiforgery has to know what other cookie to look for to know if should run? G'd luck getting them to agree to this :)

My recommendation is so simple: Just return without exception if Cookie is null: https://github.com/aspnet/Antiforgery/blob/dev/src/Microsoft.AspNetCore.Antiforgery/Internal/DefaultAntiforgery.cs#L160
No need to know another cookie. It's already knowing the Cookie which should carry the token.

There are no plans to make product changes to enable this. You could choose not to use AutoValidateAntiforgeryTokenAttribute, and then selectively enable antiforgery via your own application logic.

This strategy is a failure because while the antiforgery token is delivered as a session cookie, the authentication cookie might have a considerably longer lifespan.
    protected override bool ShouldValidate(AuthorizationFilterContext context)
    {
        if (!base.ShouldValidate(context))
        {
            return false;
        }

        //No need to validate if antiforgery cookie is not sent.
        //That means the request is sent from a non-browser client.
        //See https://github.com/aspnet/Antiforgery/issues/115
        if (!context.HttpContext.Request.Cookies.ContainsKey(_options.CookieName))
        {
            return false;
        }

        // Anything else requires a token.
        return true;
    }
}

The premise made above : "No need to validate if antiforgery cookie is not sent" is a broken vulnerability.
After restarting the browser, it will be possible to forge a post with a long-lived auth cookie ("remember me?") and no anti-forgery token (it was deleted when the browser closed). Perfect for at least one post (until the new antiforgery cookie is sent in the response).

@biggyspender however that case could be prevented, if ShouldValidate would actually check the Auth Cookie and the CSRF Token.

authors: Eilon biggyspender brockallen hikalkan schmitch

repo: aspnet/Antiforgery


text:
Testing the POST method code snippet

Can someone please give a way to test the following code snippet (appearing in this article):
[HttpPost]
[ProducesResponseType(StatusCodes.Status201Created)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public ActionResult<Pet> Create(Pet pet)
{
pet.Id = _petsInMemoryStore.Any() ? _petsInMemoryStore.Max(p => p.Id) + 1 : 1;
_petsInMemoryStore.Add(pet);
return CreatedAtAction(nameof(GetById),
    new { id = pet.Id }, pet);

}
My completed code for the above is:
public class TestController : ControllerBase
{
// private readonly string GetById = string.Empty;
List<Pet> _petsInMemoryStore = new List<Pet>();
public TestController()
{
_petsInMemoryStore.Add(new Pet { Id = 1, petType = "Puppy" });
_petsInMemoryStore.Add(new Pet { Id = 2, petType = "Cub" });
_petsInMemoryStore.Add(new Pet { Id = 3, petType = "Kitten" });
}
public ActionResult<Pet> Create(Pet pet)
{
        pet.Id = _petsInMemoryStore.Any() ? _petsInMemoryStore.Max(p => p.Id) + 1 : 1;
        _petsInMemoryStore.Add(pet);

        return CreatedAtAction(nameof(GetById),
            new { id = pet.Id }, pet);
    }
    [HttpGet("{id}", Name = "GetTodo")]
    private IActionResult GetById(int id)
    {
        // throw new NotImplementedException();
        var item = _petsInMemoryStore.Find(x=>x.Id==id);
        if(item==null)
        {
            return NotFound();
        }
        return new ObjectResult(item);
    }

public class Pet
{
public int Id { get; set; }
public string petType { get; set; }
}

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

ID: b391017f-25e1-d5e1-c4f7-020408ade7b5
Version Independent ID: 263a7b64-2e42-bbfc-c1d3-61680438e1e4
Content: Create web APIs with ASP.NET Core
Content Source: aspnetcore/web-api/index.md
Product: aspnet-core
Technology: aspnetcore-webapi
GitHub Login: @scottaddie
Microsoft Alias: scaddie

Hello @krchome ... We have an open issue to provide a testing doc for web API at https://github.com/aspnet/AspNetCore.Docs/issues/13575. With regard to providing tests of the code that you cited, your best bet is to go off of samples on the web (e.g., there are a lot of blog posts out there that deal with this subject), discuss with devs in a support forum, such as Stack Overflow, or discuss with devs on a support chat, such as Slack or Gitter. We don't have the staffing to provide code-level support ... there are only a few of us here working on docs. 🏃🏃😅

Hello @guardex - Thanks very much. I appreciate your suggestions and shall proceed accordingly.

authors: guardrex krchome


text:
SharedResources on ASP.NET Core 3.0 Project not working after updating Visual Studio to v16.4.0

Since updating Visual Studio to v16.4.0 the SharedResources Keys are not found anymore in  IHtmlLocalizer<SharedResource> my ASP.NET Core 3.0 MVC WebApp. When the ASP.NET Core 3.0 App gets compiled with Azure Pipeline Hostest Windows-2019 Agent (actual running Visual Studio v16.9.x) it is running and working as expected.
I use CookieRequestCultureProvider, and Cookies are set und read correctly.
What I tried after Visual Studio Update without success:

Reinstall .NET Core SDK v3.0.101 (which gets uninstalled at Visual Studio update)
Create global.json with:

{
  "sdk": {
    "version": "3.0.100"
  }
}

Clean and Rebuild multiple times, manually deleting /bin and /obj folders
Cleared cookies and Browser Caches
Restarting Windows and restarting Visual Studio multiple times

Expected Behavior:
SharedResource Keys are found with IHtmlLocalizer<SharedResource> and localization is used. It also works with Azure Pipeline and Hosted Agent Windows-2019 Image
Actual Behavior:
SharedResource Keys are not found with IHtmlLocalizer<SharedResource>
@inject IHtmlLocalizer<SharedResource> Localizer
Localizer["ExistingResourceKey"].IsResourceNotFound // is true

Version Used:
OS: Windows Server 2016 x64 (all Updates installed)
dotnet --info
.NET Core SDK (reflecting any global.json):
Version:   3.1.100
Commit:    cd82f021f4
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.14393
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.1.100\
Host (useful for support):
Version: 3.1.0
Commit:  65f04fb6db
.NET Core SDKs installed:
2.1.509 [C:\Program Files\dotnet\sdk]
3.0.101 [C:\Program Files\dotnet\sdk]
3.1.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft Visual Studio Enterprise 2019
Version 16.4.0
VisualStudio.16.Release/16.4.0+29519.181
Microsoft .NET Framework
Version 4.8.03761

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

ID: d1833676-ff1b-c587-cc9c-81afffa8ef68
Version Independent ID: ad989395-3f49-4d55-521e-cf6fe56281ee
Content: Globalization and localization in ASP.NET Core
Content Source: aspnetcore/fundamentals/localization.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

If you think this is a product bug, create the simplest possible sample that reproduces the problem and open an issue at GitHub ASP.NET Core
Include steps to reproduce the bug

Correct, is a bug somewhere else:  dotnet/sdk#4033

authors: Rick-Anderson pocki


text:
Transient file locking during MusicStore E2ETests publishing

See the "History" tab here: https://dev.azure.com/dnceng/public/_build/results?buildId=120375&view=ms.vss-test-web.build-test-results-tab&runId=2720340&resultId=108403
The MusicStore E2E tests seem to fail frequently during dotnet publish with errors like the following:
| [68.498s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): error MSB3027: Could not copy "/home/vsts/work/1/s/src/Http/Routing/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Routing.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Routing.pdb". Exceeded retry count of 10. Failed.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
| [68.498s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): error MSB3021: Unable to copy file "/home/vsts/work/1/s/src/Http/Routing/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Routing.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Routing.pdb". The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Routing.pdb' because it is being used by another process. [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
| [68.500s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): error MSB3027: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics.EntityFrameworkCore/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.pdb". Exceeded retry count of 10. Failed.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
| [68.501s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): error MSB3021: Unable to copy file "/home/vsts/work/1/s/src/Middleware/Diagnostics.EntityFrameworkCore/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.pdb". The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.pdb' because it is being used by another process. [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
| [68.581s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Error: dotnet publish exited with exit code : 1

We need to make these tests more reliable, possibly by publishing test projects to isolated directories or ensuring processes from previous runs/other tests are shut down.

BRT to investigate mitigating on Ubuntu and macOS (these issues don't seem to occur on Windows, yet...)

It looks like the issue is that publish is trying to overwrite a locked file. Perhaps a previous test published to the same directory?

Another report from @jkotalik in https://github.com/aspnet/AspNetCore/issues/8462
| [42.271s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/StaticFiles/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb". Beginning retry 1 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.271s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Session/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb". Beginning retry 1 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.271s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Security/Authentication/Core/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb". Beginning retry 1 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.271s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb". Beginning retry 1 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.272s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Session/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb". Beginning retry 2 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.272s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/StaticFiles/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb". Beginning retry 2 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.272s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Security/Authentication/Core/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb". Beginning retry 2 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.276s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb". Beginning retry 2 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.624s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/StaticFiles/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb". Beginning retry 3 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.625s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Session/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb". Beginning retry 3 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [42.625s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Security/Authentication/Core/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb". Beginning retry 3 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [43.277s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb". Beginning retry 3 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [43.626s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Session/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb". Beginning retry 4 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [43.626s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Security/Authentication/Core/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb". Beginning retry 4 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [43.626s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/StaticFiles/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb". Beginning retry 4 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [44.278s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb". Beginning retry 4 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [44.627s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Session/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb". Beginning retry 5 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [44.627s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Security/Authentication/Core/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb". Beginning retry 5 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [44.627s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/StaticFiles/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb". Beginning retry 5 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [45.279s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb". Beginning retry 5 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [45.627s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Session/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb". Beginning retry 6 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [45.628s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Security/Authentication/Core/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb". Beginning retry 6 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [45.628s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/StaticFiles/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb". Beginning retry 6 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [46.280s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb". Beginning retry 6 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [46.628s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Session/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb". Beginning retry 7 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Session.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [46.628s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/StaticFiles/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb". Beginning retry 7 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.StaticFiles.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [46.629s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Security/Authentication/Core/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb". Beginning retry 7 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Authentication.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [47.281s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /home/vsts/work/1/s/.dotnet/sdk/3.0.100-preview4-010309/Microsoft.Common.CurrentVersion.targets(4374,5): warning MSB3026: Could not copy "/home/vsts/work/1/s/src/Middleware/Diagnostics/src/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb" to "bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb". Beginning retry 7 in 1000ms. The process cannot access the file '/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/bin/Release/netcoreapp3.0/Microsoft.AspNetCore.Diagnostics.pdb' because it is being used by another process.  [/home/vsts/work/1/s/src/MusicStore/samples/MusicStore/MusicStore.csproj]
   | [47.628s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish std

We should resolve that by moving test app publishing to a build step, like IIS did. Some relevant things:

Test Apps include a props file: https://github.com/aspnet/AspNetCore/blob/master/src/Servers/IIS/build/testsite.props
Test Apps describes the "profiles" they need to be published under: https://github.com/aspnet/AspNetCore/blob/master/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj
Test projects include a props file that allows them to "reference" test apps via a <ProjectReference>: https://github.com/aspnet/AspNetCore/blob/master/src/Servers/IIS/IIS/test/FunctionalTest.props
Test projects reference test apps via a <ProjectReference> with ReferenceOutputAssembly set to false: https://github.com/aspnet/AspNetCore/blob/master/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj

@pakrym can answer some questions too (while he's still around :))

repo: aspnet/AspNetCore


text:
Use the defaults that existed in Kestrel before

Preserving the existing settings but now at the transport level.

@aspnet-hello triage https://dev.azure.com/dnceng/public/_build/results?buildId=208641

This comment was made automatically. If there is a problem contact aspnetcore-build@microsoft.com.
I've triaged the above build. I've created/commented on the following issue(s)
https://github.com/aspnet/AspNetCore-Internal/issues/1950

@davidfowl you know this missed preview6, right?

Yep. @anurse told me it was too late to change these values :trollface: . If there's no performance regression, it's fine.

authors: Tratcher aspnet-hello davidfowl


text:
Binding to non-null IEnumerable doesn't work

When using the binding feature in the config system, for IEnumerable collections that have a default, non-null value, the collection is never assigned into the target model. For example:
For this json:
{
  "config": {
    "data": [ "a", "b" ]
  }
}

and this application code:
 public class Config
    {
        IEnumerable<string> _data = new List<string>();
        public IEnumerable<string> Data
        {
            get
            {
                return _data;
            }
            set
            {
                _data = value;
            }
        }
    }

    public class Program
    {
        public static void Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("test.json")
                .Build();

            var val = config.GetSection("config").Get<Config>();
            Console.WriteLine(val?.Data?.Count());
        }
    }

The output is:
0
Press any key to continue . . .

I'd expect it to print "2".
I'd argue the issue is in BindInstance and explicit handling for IEnumerable should be made (much like the check for IsArray https://github.com/aspnet/Configuration/blob/dev/src/Microsoft.Extensions.Configuration.Binder/ConfigurationBinder.cs#L281).

I ran into this issue today and came to the same conclusion as @brockallen

We could treat a non-null but empty collection as something that we add to. This way an empty collection would be treated the same as a null collection.

Can you handle the non-null and non empty collection case too?
e.g.          IEnumerable _data = new[] { "c" };
The Config data can have default value if it does not exist in the JSON and can be overwritten if it exists in the JSON.
I find this problem when I try to bind the IdentityServer4 Client
For version 1.5.2, the allowedGrantTypes is IEnumerable and has default value (it is changed to ICollection in latest dev version).   I try to put the client settings in the JSON file but the AllowedGrantTypes can't be overwritten because it is IEnumerable with default value.  It works find if the IEnumberable is null or if it is ICollection
    private IEnumerable<string> _allowedGrantTypes = GrantTypes.Implicit;

authors: ajcvickers brockallen kevinlo sei-jmattson

repo: aspnet/Configuration


text:
Set "TreatWarningsAsErrors" before NuGet restore

Ensures our build stays clean of NuGet warnings

@ryanbrandenburg,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

authors: dnfclas ryanbrandenburg

repo: aspnet/DependencyInjection


text:
Services that use Entity Framework context

In section "Entity Framework contexts" it is written, that " Services that use the database context should also use the scoped lifetime."
Unfortunatly, it is not elaborated why to do so. For me, the statement is very confusing. Why should it not be fine to use a transient service? When using a singelton service, it makes sense to me. As it will hold on to a reference to a DbContext that is being disposed later. But if you have two transient service (of the same type) holding on to the same instance of a DbContext... ...that should be fine. No?
Even more: a controller is transient (by using the default AddMvc or AddControllerAsServices). If you use a DbContext directly in a controller (which you may do) you allready violating the "should" from the above statement. So somewhere you should find information about, either registering your controllers as scoped when using a DbContext directly or it should be warned about doing so.
Either way, i did not find any more information about the above sentence in the documentation or the blogosphere.
Am i missing something obvious? Or could it make sense to add some more precise wording about the lifetime of DbContext and it's using services?

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

ID: 0d78f540-81fd-1ba9-cb90-591e4ec27d9b
Version Independent ID: 2251f557-dd3a-ec35-2558-6243337db009
Content: Dependency injection in ASP.NET Core
Content Source: aspnetcore/fundamentals/dependency-injection.md
Product: aspnet-core
GitHub Login: @guardrex
Microsoft Alias: riande

the statement is very confusing

Confusing and not accurate because it doesn't specify which services should use the scoped context.
Quick note: I recommend not using "transient scoped service" when referring to a service. "Transient" and "scoped" are two different lifetimes.
Unfortunately, the EF Core docs don't maintain more/better information AFAICT: https://docs.microsoft.com/ef/core/miscellaneous/configuring-dbcontext#using-dbcontext-with-dependency-injection
As you say, the general rule of thumb is don't allow a service of a given lifetime to use another service with a shorter lifetime.
You can set the context's (and options) lifetimes with the AddDbContext overloads; and Yes! you're correct about a transient service using a transient dB context. For example ...
services.AddDbContext<AppDbContext>(options =>
    options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")),
    ServiceLifetime.Transient, ServiceLifetime.Transient);

https://docs.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.entityframeworkservicecollectionextensions.adddbcontext
WRT controllers, they are scoped to the request, so the default scoped dB context is fine.
I'll take a look at this in a bit and see what we can do here. Thanks for opening this issue.

Thanks a lot for your quick reply. I edited the issue and replaced/removed the word "scoping" or "scoped" when i meant lifetime, so it makes it clearer. Nonetheless i think you understood the issue. :)

authors: Burnaster guardrex

repo: aspnet/Docs


text:
Create WebAPI top level node

per @danroth27 3-13 meeting.

cc @scottaddie  feel free to grab this.


text:
Authoring Razor docs #130

I would like to write the Razor Syntax Article described by #130. The contributions guide said to get approval here so here I am.

Resolved this in #130


text:
If origin is not allowed, HTTP status 403 should be returned, not 400

In the example given for WebSocket Origin Restriction, the HTTP status returned when the origin is not allowed should be 403 according to https://tools.ietf.org/html/rfc6455#section-10.2.

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

ID: 8af11946-ea05-3be2-6fa1-c4c01aa76d8c
Version Independent ID: 58e87eb0-240b-ab00-c5f4-32a0ab2e0028
Content: Security considerations in ASP.NET Core SignalR
Content Source: aspnetcore/signalr/security.md
Product: aspnet-core
GitHub Login: @tdykstra
Microsoft Alias: anurse

@anurse In the code snippet under WebSocket Origin Restriction should we change
context.Response.StatusCode = StatusCodes.Status400BadRequest;

to
context.Response.StatusCode = StatusCodes.Status403Forbidden;

Agreed. I'll send a PR now

https://github.com/aspnet/Docs/pull/9250

authors: anurse slorion tdykstra