Getting spammed with [CAMetalLayer nextDrawable] returning nil because device is nil on latest macOS Agent

Description
We are getting spammed by this one message in our emulator android test runs on the latest macOS agent.
You can see the same logs appear in this ticket too: https://github.com/actions/runner-images/issues/6252
I'm not sure anything is wrong because of it, but it is quite distracting to troubleshoot emulator issues with the spam.
[CAMetalLayer nextDrawable] returning nil because device is nil.

Platforms affected

[ ] Azure DevOps
[X] GitHub Actions - Standard Runners
[ ] GitHub Actions - Larger Runners

Runner images affected

[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] Ubuntu 22.04
[ ] macOS 10.15
[ ] macOS 11
[X] macOS 12
[ ] Windows Server 2019
[ ] Windows Server 2022

Image version and build link
<IP_ADDRESS>-main-20220916-1
      - name: Run UI Tests
        uses: reactivecircus/android-emulator-runner@v2
        env:
          ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 120
        with:
          api-level: 30
          arch: x86
          target: google_atd
          profile: Nexus One
          emulator-options: -no-snapshot -noaudio -no-boot-anim -camera-back none
          disable-animations: true
          disk-size: 2048M
          script: ./gradlew connectedDebugAndroidTest

Is it regression?
Not sure
Expected behavior
I'm not quite sure why, but recently in our logs with the above emulator setup, we're getting spammed by this message [CAMetalLayer nextDrawable] returning nil because device is nil on latest macOS Agent, hundreds of times in a run
Actual behavior
Not getting this spam message
Repro steps
Start up an emulator on the latest (<IP_ADDRESS>-main-20220916-1) macOS agent with the above emulator architecture.

@mrk-han thanks, we will take a look

Hi @mrk-han can you provide exact repro steps?

CC: @dsame

It's possible that the new screenshot APIs could be causing this? But not sure.
/**
 * An internal variant of [takeScreenshot] that skips an idle sync call.
 *
 * This intended for failure handling cases where caller does not want to wait for main thread to be
 * idle.
 *
 * @return a [Bitmap]
 * @throws [IllegalStateException] if called on the main thread. This is a limitation of connecting
 * to UiAutomation, [RuntimeException] if UiAutomation fails to take the screenshot
 *
 * @hide
 */
@ExperimentalTestApi
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@Suppress("FutureReturnValueIgnored")
@Throws(RuntimeException::class)
fun takeScreenshotNoSync(): Bitmap {
  Checks.checkState(Looper.myLooper() != Looper.getMainLooper())

  val bitmapFuture: ResolvableFuture<Bitmap> = ResolvableFuture.create()
  val mainExecutor = HandlerExecutor(Handler(Looper.getMainLooper()))
  val uiAutomation = getInstrumentation().uiAutomation
  if (uiAutomation == null) {
    throw RuntimeException("uiautomation is null")
  }

  if (!HardwareRendererCompat.isDrawingEnabled()) {
    HardwareRendererCompat.setDrawingEnabled(true)
    bitmapFuture.addListener({ HardwareRendererCompat.setDrawingEnabled(false) }, mainExecutor)
  }

  try {
    forceRedrawGlobalWindowViews(mainExecutor).get(5, TimeUnit.SECONDS)
  } catch (e: Exception) {
    Log.w("takeScreenshot", "force redraw failed. Proceeding with screenshot", e)
  }

  // take the screenshot on the next frame to increase probability the draw from previous step is
  // committed
  mainExecutor.execute {
    Choreographer.getInstance().postFrameCallback {
      val bitmap = uiAutomation.takeScreenshot()
      if (bitmap == null) {
        bitmapFuture.setException(RuntimeException("uiAutomation.takeScreenshot returned null"))
      } else {
        bitmapFuture.set(bitmap)
      }
    }
  }

You can find code to use here: https://github.com/android/testing-samples/tree/main/ui/espresso/ScreenshotSample but I think we need to hook this sample up to a basic Github Action using the following:

name: UI Testing

on:
  push:
    branches:
      - develop
  workflow_dispatch:

jobs:
  ui-testing:
    runs-on: macos-latest
    environment: Debug

    steps:
      - name: checkout
        uses: actions/checkout@v3
      - name: Set Up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Setup Android SDK
        uses: android-actions/setup-android@v2

      - name: Run UI Tests
        uses: reactivecircus/android-emulator-runner@v2
        env:
          ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 120
        with:
          api-level: 30
          arch: x86
          target: google_atd
          profile: Nexus One
          emulator-options: -no-snapshot -noaudio -no-boot-anim -camera-back none
          disable-animations: true
          disk-size: 2048M
          script: ./gradlew connectedDebugAndroidTest

      - name: Archive Index.html
        uses: actions/upload-artifact@v3
        continue-on-error: true
        if: success() || failure() # always() will cause the function to run even if the build is canceled, so it is best to use success || failure
        with:
          name: Index.html Run Number=${{ github.run_number }}
          path: |
            /app/build/reports/androidTests/**/*.html
          retention-days: 30

      - name: Archive test-result.pb
        uses: actions/upload-artifact@v3
        continue-on-error: true
        if: success() || failure()
        with:
          name: Test-result.pb Run Number=${{ github.run_number }}
          path: |
            /app/**/*.pb
          retention-days: 30

      - name: Archive Build and Outputs Folder (screenshots + logs)
        uses: actions/upload-artifact@v3
        continue-on-error: true
        if: success() || failure()
        with:
          name: Run Number=${{ github.run_number }}
          path: |
            **/app/build/reports/**
            **/app/build/outputs/**
            !**/app/build/outputs/apk/**
            !**/app/build/outputs/code_coverage/**
            !**/app/build/outputs/managed_device_code_coverage/**
            **/app/build/snapshot/**
            **/app/build/generated/crashlytics/**
          retention-days: 30

      - name: Check for HAXM installation
        run: emulator -accel-check && emulator -accel-check > ${{ github.workspace }}/haxm-check-${{ github.run_number }}.txt

      - name: Archive Haxm Check
        uses: actions/upload-artifact@v3
        continue-on-error: true
        if: success() || failure()
        with:
          name: emulator-haxm-check
          path: ${{ github.workspace }}/emulator.txt

@igorboskovic3 @mikhailkoliada
I think the screenshot API is a red herring. I noticed in my log it starts appearing after we revoke the microphone permission
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[209](*/actions/runs/3206368549/jobs/5240032010#step:11:209)
adb: device offline
[210](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:210)
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[211](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:211)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[212](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:212)
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[213](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:213)
adb: device offline
[214](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:214)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[215](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:215)
adb: device offline
[216](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:216)
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[217](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:217)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[218](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:218)
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[219](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:219)
adb: device offline
[220](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:220)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[221](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:221)
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[222](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:222)
adb: device offline
[223](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:223)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[224](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:224)
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[225](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:225)
adb: device offline
[226](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:226)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[227](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:227)
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[228](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:228)
adb: device offline
[229](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:229)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[231](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:231)
WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
[232](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:232)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[234](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:234)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[236](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:236)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[238](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:238)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[240](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:240)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[242](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:242)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[244](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:244)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[246](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:246)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[248](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:248)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[250](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:250)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[252](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:252)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[254](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:254)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[256](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:256)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[258](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:258)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[260](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:260)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[262](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:262)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[264](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:264)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[266](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:266)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[268](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:268)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[270](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:270)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[272](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:272)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[274](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:274)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[276](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:276)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[278](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:278)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[280](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:280)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[282](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:282)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[284](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:284)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[286](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:286)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[288](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:288)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[290](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:290)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[292](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:292)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[294](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:294)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[296](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:296)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[298](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:298)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[300](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:300)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[302](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:302)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[304](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:304)
/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
[305](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:305)
1
[306](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:306)
Emulator booted.
[307](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:307)
/Users/runner/Library/Android/sdk/platform-tools/adb shell input keyevent 82
[308](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:308)
Disabling animations.
[309](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:309)
/Users/runner/Library/Android/sdk/platform-tools/adb shell settings put global window_animation_scale 0.0
[310](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:310)
/Users/runner/Library/Android/sdk/platform-tools/adb shell settings put global transition_animation_scale 0.0
[311](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:311)
/Users/runner/Library/Android/sdk/platform-tools/adb shell settings put global animator_duration_scale 0.0
[312](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:312)

[313](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:313)
/bin/sh -c ./gradlew connectedDebugAndroidTest
[314](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:314)
Downloading https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
[315](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:315)
WARNING | boot completed
[316](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:316)
INFO    | boot completed
[317](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:317)
INFO    | boot time 160699 ms
[318](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:318)
INFO    | Increasing screen off timeout, logcat buffer size to 2M.
[319](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:319)
INFO    | Revoking microphone permissions for Google App.
[320](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:320)
...........10%............20%.......2022-10-07 16:57:44.500 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[321](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:321)
..2022-10-07 16:57:44.654 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[322](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:322)
..2022-10-07 16:57:44.813 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[323](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:323)
30%............40%...........50%............60%...........70%..2022-10-07 16:57:49.061 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[324](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:324)
..........80%...........90%............100%
[325](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:325)
2022-10-07 16:57:49.769 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[326](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:326)
2022-10-07 16:57:50.255 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[327](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:327)
2022-10-07 16:57:50.384 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[328](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:328)
2022-10-07 16:57:50.492 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[329](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:329)
2022-10-07 16:57:50.543 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[330](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:330)
2022-10-07 16:57:50.668 qemu-system-x86_64[2506:11383] [CAMetalLayer nextDrawable] returning nil because device is nil.
[331](https://github.com/redacted-org/redacted-app-name//actions/runs/3206368549/jobs/5240032010#step:11:331)
Starting a Gradle Daemon (subsequent builds will be faster)

Nevermind, it seems the -no-audio flag was a red herring as well.

I ran our pipeline on a variety of system-images and emulators, and they all had the same spam.
I also ran an emulator -accel-check and learned that HAXM is not enabled on these agents by default, which is not what I had originally heard about these macOS agents.

Hi @mrk-han, can you check this thread and use this snippet from that thread to resolve your issue?

Yes, HAXM isnt installed on our MacOS images, you can check same thread for installation, thank you

I'll implement shortly and let you know. Thank you!

@ssrinivasKG @igorboskovic3
I attempted to install HAXM like this:
      - name: Install Haxm
        run: brew install intel-haxm

It gave the following output:
2022-10-17T20:19:47.3593370Z If the installation fails, retry after you enable it in:
2022-10-17T20:19:47.3594550Z   System Preferences → Security & Privacy → General
2022-10-17T20:19:47.3595020Z
2022-10-17T20:19:47.3595820Z For more information, refer to vendor documentation or this Apple Technical Note:
2022-10-17T20:19:47.3598960Z   https://developer.apple.com/library/content/technotes/tn2459/_index.html
2022-10-17T20:19:47.3599510Z
2022-10-17T20:19:47.5647050Z ==> Downloading https://github.com/intel/haxm/releases/download/v7.7.1/haxm-macosx_v7_7_1.zip
2022-10-17T20:19:47.5671010Z ==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/98257850/f4992069-e192-4393-ae91-8018447bbd8f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221017%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221017T201947Z&X-Amz-Expires=300&X-Amz-Signature=452a05b62ae34459d99876bfaa178f80e229d5a08772f70e9e188540ece11ce9&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=98257850&response-content-disposition=attachment%3B%20filename%3Dhaxm-macosx_v7_7_1.zip&response-content-type=application%2Foctet-stream
2022-10-17T20:19:55.7430210Z Warning: macOS's Gatekeeper has been disabled for this Cask
2022-10-17T20:19:55.7431410Z ==> Installing Cask intel-haxm
2022-10-17T20:19:55.8254240Z ==> Running installer script 'silent_install.sh'
2022-10-17T20:20:32.2334970Z Silent installation Pass!
2022-10-17T20:20:32.3790420Z 🍺  intel-haxm was successfully installed!

and to verify, after the tests I ran:
      - name: Check for HAXM installation
        if: always()
        run: |
          emulator -accel-check 2>&1 | tee ${{ github.workspace }}/haxm-check-${{ github.run_number }}.txt

but received:
2022-10-17T20:48:28.5246820Z accel:
2022-10-17T20:48:28.6775500Z 8
2022-10-17T20:48:28.6778470Z HAXM is not installed on this machine (/dev/HAX is missing).

And then the bug still existed:
2022-10-17T20:24:29.9441900Z INFO    | Revoking microphone permissions for Google App.
2022-10-17T20:24:30.6995530Z 2022-10-17 20:24:30.699 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:30.7847920Z 2022-10-17 20:24:30.775 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:30.8452300Z 2022-10-17 20:24:30.836 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:30.9550040Z 2022-10-17 20:24:30.949 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:31.1306670Z 2022-10-17 20:24:31.130 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:31.2130740Z 2022-10-17 20:24:31.207 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:31.2506280Z 2022-10-17 20:24:31.246 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:31.3497000Z 2022-10-17 20:24:31.348 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:32.9928510Z 2022-10-17 20:24:32.992 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.1078150Z 2022-10-17 20:24:33.106 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.1397840Z 2022-10-17 20:24:33.139 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.2133210Z 2022-10-17 20:24:33.212 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.2549300Z 2022-10-17 20:24:33.254 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.3643330Z 2022-10-17 20:24:33.363 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.5150420Z 2022-10-17 20:24:33.514 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.5529410Z 2022-10-17 20:24:33.552 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.6582700Z 2022-10-17 20:24:33.648 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.7710100Z 2022-10-17 20:24:33.762 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.8576420Z 2022-10-17 20:24:33.849 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:33.9728790Z 2022-10-17 20:24:33.972 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:34.0713870Z 2022-10-17 20:24:34.070 qemu-system-x86_64[4667:17550] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-10-17T20:24:34.2971050Z ##[endgroup]
2022-10-17T20:24:34.3073950Z [command]/bin/sh -c echo "Generated AVD snapshot for caching."

Note: This is also showing in the logs from @igorboskovic3 's run here: https://github.com/igorboskovic3/actions-test/actions/runs/3023933068/jobs/4864768035

Based on the comments on my issue, does not seem like something fixable https://github.com/actions/runner-images/issues/6369

Based

@mrk-han this is my testing repo, i wouldnt use that a reference, as I answered on other thread here,  you have there successful and unsuccessful actions so you should use for example successful one https://github.com/igorboskovic3/actions-test/actions/runs/3239143575. Please use this snippet  or image-27 or below for successful action

@igorboskovic3 Thank you so much. I got HAXM working and I am still seeing this output spammed

@mrk-han Code is working and you have output spammed or doesnt work at all?

@igorboskovic3 Well, the stability of the emulator itself is causing UI tests to be very unstable. That is the heart of the issue. When debugging things, this spam is incredible excessive (happening anywhere from 3-7 times a second), it makes it hard to read.
My concern is the amount of times this error is happening is either indicative of, or itself causing performance issues. Or means something is misconfigured.
Here is a picture of the state of the machine when these logs are getting spammed:

And this is happening on every API level / Architecture I run tests with

I am really not sure if this is a problem because of the Google Emulator team, or the MacOS Runner configuration.

Looking at the screenshot, looks very much like a GitHub runner configuration issue. Especially the system dialogue complaining about nested virtualization and plus the GPU driver information system image as well

@ssrinivasKG Exactly, these macOS agents are VMs, and the Android Emulator is a VM -- so it is using Nested Virtualization. But without proper Hardware Support, the Emulators are super flakey -- which is why we are trying to enable HAXM to help.
@igorboskovic3 Across many teams, plus others I have spoken to, none of us are able to get reliable test suites working on Github's MacOS Runners.

Hello, we have the exact same issue, this is our branch : https://github.com/pass-culture/pass-culture-app-native/pull/3840
We are trying to run appium to perform e2e tests, did you find a workaround ? I have tried all github action for avd and none works.

@ssrinivasKG Exactly, these macOS agents are VMs, and the Android Emulator is a VM -- so it is using Nested Virtualization. But without proper Hardware Support, the Emulators are super flakey -- which is why we are trying to enable HAXM to help.
@igorboskovic3 Across many teams, plus others I have spoken to, none of us are able to get reliable test suites (with Android Emulators) working on Github's MacOS Runners.

Yes, we are also tried various approaches, but we dont have of support of HAXM for VMs from one side (as you can see here) and also we get various results randomly for same code which suggest it could be performance issue.

I was getting spammed with this message as well as getting a grey/black screen in my emulator, and I could fix it by changing the rendering mode.
This was the way I was launching the emulator
echo "no" | $ANDROID_HOME/emulator/emulator "-avd" "Nexus_5X_API_26" "-no-audio" "-no-boot-anim" "-gpu" "swiftshader_indirect" &

and after removing the -gpu swiftshader_indirect part, it worked again:
echo "no" | $ANDROID_HOME/emulator/emulator "-avd" "Nexus_5X_API_26" "-no-audio" "-no-boot-anim" &

This may not be the case of everyone, but I wanted to post it as it can be helpful :slightly_smiling_face:

@mrk-han Have you got a working emulator now? We're running out of options for our E2E tests

The issue caused by the low performance of the runner hosts it is reproduced locally it and does not depends on the software configuration. It is expected to be solved with the hardware upgrade.

so this is about performance in the runners ? im using macos11, if use macos13 will it go away or how does it solveS?


[QST]My laptop dont't have Nvidia GPU

What is your question?
My laptop don‘t has Nvidia's independent graphics card, just has Intel's integrated graphics card, so can I run the RAPIDS Accelerator for Apache Spark？Or testing, debuging RAPIDS?

Unfortunately, no.  The RAPIDS Accelerator is based on RAPIDS which requires an NVIDIA GPU with CUDA compute capability 6 or higher.  The hardware and software requirements for each release are documented on the download page.

Unfortunately, no. The RAPIDS Accelerator is based on RAPIDS which requires an NVIDIA GPU with CUDA compute capability 6 or higher. The hardware and software requirements for each release are documented on the download page.

thanks for your answer~


feat!: add support for depchecking typescript projects

@achingbrain not sure if this is too disruptive.
BREAKING CHANGE:

no more forwarding flags
no more positional arguments - cannot depcheck single file
won't throw an error for missing dependency if it's in devDependencies section of package.json

2022-09-02 conversation: next step is that @achingbrain is going to check this out locally and see how much damage this causes.
If we don't land now, we may include in a future aegir release with other breaking changes (e.g., requiring return types).  If there's a lot of pain updating, we want to handle it all in one go.


Grid does not save keybinds (fails to write to the file) when running a full build.

I think you addressed this in #19, but I need to test it.

Confirmed this on v1.0.0-beta and scheduling an update this weekend to fix, release pending should be v1.0.0`


Feature Request: Compatibility with Spellpoints

One of my players uses Spellpoints for his Wild-Magic-Sorceress and it would be great if this module would be compateble with the Spellpoints Module I use: https://foundryvtt.com/packages/dnd5e-spellpoints

The recently added wild magic API should allow a relatively easy way to detect spell points being spent and to roll a surge if needed. Look into the plugins folder for an example :)

A well written MR adding this helper to the stock plugins would be accepted, but I do not have the bandwidth to integrate with this module.


README: bring expectation of canonical-data.json values (description, errors, no msg) up-to-date

Note that while there is a new schema proposed in #336, it's believed by me that everything being said in this PR is still applicable even when that schema is applied:

msg will still be gone
descriptions will still follow the principles
errors will still be defined as they are in #401

So this may be evaluated without having to wait for #336

Previous discussion of descriptions: https://github.com/exercism/x-common/pull/451#issuecomment-263070019

This PR seems like a great improvement.

I think this looks great now!

I think we can merge this now, right?


Azure DevOps task hangs when downloading the installer from GitHub

Describe the bug
The Azure DevOps task hangs at the point of Downloading Dependency Check latest installer from GitHub..

Version of dependency-check used
6.0.4
Log file
Screenshot provided above.
To Reproduce
Steps to reproduce the behavior:

Add the Dependency Check task to a build.
Run the build.

Expected behavior
The task executes successfully or an error is thrown.
Additional context
I have added some logging to the task:
console.log('Getting latest...');
let response = yield client.get(url);
console.log('...Downloaded latest.');

In the case above the first log would execute but the second log was never reached.

Consider opening the ticket on the azure devops issues: https://github.com/dependency-check/azuredevops


ENYO-3379: Set ExpandableListItem spotlight property as false

Issue:
We added Scroll to boundary feature on ScrollStrategy which is checking
5way limit with its first spottable parent. When spotlight container
control is used in scroller with spottable child inside, it is detect
there is no nearest neighbor from the child and try to jump scroll.
This behavior is okay with other case but it is not when child items are
small number like ExpandableListItem Header case. It is try to jump
scroll for every 5way key.
Fix:
We changed spotlight property as container while adding back kay
handling on ExpandablePicker. But, ExpandableListItemDrawer is already
a container control. So, revert spotlight property back to false.
Enyo-DCO-1.1-Signed-off-by: Kunmyon Choi<EMAIL_ADDRESS>

cc: @aarontam since you made the change (24ca411a92cd278400c81ac205dac5f22fee52af) to make it a container

Hi @KunmyonChoi, this change will cause a regression with Expandables + back key, as the history state will be out of sync, particularly when navigating in and out of these controls in 5-way mode. This is due to a quirk where multiple onSpotlightContainerEnter events are fired in these cases, and making the wrapping control (i.e. the entire ExpandableListItem control) a Spotlight container seemed to be the least-intrusive way to address this (as opposed to making a general change to how Spotlight containers behave).

Hi @ryanjduffy and @aarontam, thanks for checking.
I personally considered this issue as a special case that doesn't want to get advantage of Scroll to boundary feature. So, I could think of options: 1) passing by the scroll to boundary logic 2) apply scroll to boundary only when the container contains more than one focus-able items. how do you think?


android - Use course from GB if available

Make use of https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3026. Will mark this as ready when that PR is merged.

Thanks! I guess either way it won't break anything for this to be in - I'll tweak it to !isFinite though as I think that reads better :)


{Cloud} az cloud register: Fix the example

Description

Resolve #15634
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

Cloud


Fix a potential error in

An unrecognisable error will occur if you pass a text node as a child to <Card> element.
For example:
<Card>
  <CardTitle />
  Test
<Card>

I was thinking about adding a warning as well. Should I use console.warn?

What is the warning exactly?

Something like You can only use one of the following elements as children of <Card>: <CardTitle>, <CardHeader>, ...

You should probably either use <CardText> or <CardMedia> which won't change much about the Test text's layout

@TrySpace I know what I should use. This PR actually adds that warning and fixes a potential problem with incorrect usage.

@louy I agree with this change. Can you squash down to one commit and change if (!currentChild) { for if (!currentChild || !currentChild.props) { instead?

@oliviertassinari done

@louy Ok, thanks :+1:


STA extension for MSTEST adapter does not work on .Net Core

Description
We are porting the Windows Community Toolkit's Win32 project from .NET framework to multitarget .NET framework and core, and we are having issues with our tests for the Windows Forms project. We require this tests to be run from a STA Thread, and the current recommended solution is to use https://www.nuget.org/packages/MSTest.STAExtensions (https://github.com/saikrishnav/testfxSTAext). That package is not maintained and they currently only support .NET full framework, so there is no way to use the package. I copied the source and tried compiling it myself on our test project (.net core), but the code still throws an exception because that solution does not work if your TestInitialize needs to run on STA, which is our case.
https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/pull/7#issuecomment-454189440
This will be more and more common with .NET Core 3.0 and WinForms tests, so there needs to be a built in solution for this.
Steps to reproduce
Clone https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/tree/islandsnetcore30,
build the solution and try to run the tests on "Tests/UnitTests.WebView.WinForms"
Expected behavior
I should be able to select which thread compartment my test initialize run, even for the TestInitialize section.
Actual behavior
Can't select thread compartment.
Environment
Only makes sense on Windows.
OS: Win 10 (Insider Fast latest build)
Build version of vstest.console: 16.0.0-preview-20181128-01
Package version of MSTest framework: 1.4.0
Package version of MSTest adapter: 1.4.0

Any news on this ? recently hit this up trying to port MSTest project to .net core 3

@azchohfi Did you ever manage to work around this? I'm hitting the same issue with the WPF Xaml Behaviors project as well. Initialize/Cleanup fails

@azchohfi Here's what I did to get around it: Just added an attribute that automatically gets picked instead, since the namespace match the unit tests:
https://github.com/dotMorten/XamlBehaviorsWpf/blob/b289e419a832f64e4e4277715cb7eb75e2c41721/Test/UnitTests/STATestMethodAttribute.cs

That's how I fixed it:
https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/commit/88e2a236885501c4c1e39dfa91ad4d75e5b0434c

@azchohfi Ugh that's a lot of changes. I'd suggest considering my approach as you don't have to touch any of the test code, so it's easier to maintain in the long run

The simple Attribute-Workaround may work for "99,9%(TM)" of cases.
Our company now needs to migrate applications from net471 to net6. There are IntegrationTests in place, that check Forms/UserControls for design consistency. To do that it will create an instance of each Form, and read it's containing controls and properties. Just using reflection, or Roslyn Analyzers is not enough, as we need to ensure it can be instantiated, and that everything is completely initialized. Since some Controls/Properties/Features are not Design-Time, and by far harder to read/calculate with Roslyn. Also this made us aware about the new Application Default Font in net6, which influences DPI/Scaling - which may not be the case with an analyzer.
This now breaks apart, because some Controls need an STA Thread.  Like:
System.Runtime.Serialization.SerializationException: Type 'System.Text.UTF8Encoding' in Assembly 'System.Private.CoreLib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' is not marked as serializable.

We cannot "split" the test, because some Forms would throw both (STA, and SerializationException).
We are also hesitant to switch Testing Frameworks, because we implemented some workarounds already for MsTest under Net6 for some of our classes (eg wanting to read testhost.config), and that would require "everything" be also aware of the new Framework/Runner

We are not maintaining the project quoted in the description and we will work on providing our own implementation of "STA" test methodsin #1674


Custom metrics collected data, but could not be queried

What did you do?
I have created two types of customized mertics, one is normal collection, and the other is collection time *30. There is a problem. The first type of data is normal, and the second type of data cannot be found
What did you expect to see?
No response
What did you see instead? Under which circumstances?
The first type of data is normal, and the second type of data cannot be found
System information
No response
Prometheus version
No response
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response

Thanks for your report. It looks as if this is actually a question about usage and not development.
It makes more sense to ask questions like this on the prometheus-users mailing list or our forums rather than in a GitHub issue. In our community channels, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.


Improve the HTML node type checking API

This PR adds an is_text function to plugin API.
Also, it simplifies is_document function of the plugin API by just calling the is_document function of the underlying lambdasoup library.

I didn't find a dedicated test file/folder, so didn't add any tests. Let me know how if they are needed.

There are no tests yet, but eventually we should get to that...


Prevent double processing of messages

When a message is received from the mediator, and we don't ack the message immediately (in pickup v2 protocol) and e.g. the app is closed, the mediator won't delete the message and will potentially redeliver the message. We should look at a way to keep track of processed messages and not process already processed messages.
Something like a log of processed messages could help here. This is only needed for messages received through pickup protocol

Another approach could be

upon the recipient receiving delivery response from the mediator do not directly emit AgentMessageReceivedEvent here, instead store those messages in memory (as a list of messages to be received)
Recipients send messages-received to the mediator and the mediator should respond with an acknowledgment of messages being deleted.
Upon the recipient receiving the acknowledgment, the recipient should now emit AgentMessageReceivedEvent event with messages taken from the memory stored during the delivery response.


Update sonar4fe.yml

What type of PR is this：

[y] enhancement

Which issues of this PR fixes ：
fix on file changes for *.java and *.xml
Problem Summary(Required) ：
fix on file changes for *.java and *.xml

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Added much required resources

Added link to C programming book by Dennis Ritchie

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Hi @manishbhatt151, thank you for the PR! However, I have to close it as we do not accept affiliate links.
Feel free to open a new PR. Happy coding!


Intended overflow of valAccumulator is possible in aggregate3Value

There is a comment in the aggregate3Value method regarding valAccumulator overflow, it says that it will never overflow, however, in case of multiple calls with a huge calli.value and allowFailure=true the overflow is simply triggerable since the call will return false success flag that is ignored but valAccumulator is still increasing after each faulty call, so user can put an arbitrary huge calli.value to trigger the overflow and bypass msg.value = SUM(call[0...i].value) check.
https://github.com/mds1/multicall/blob/main/src/Multicall3.sol#L137-L145
uint256 val = calli.value;
// Humanity will be a Type V Kardashev Civilization before this overflows - andreas
// ~ 10^25 Wei in existence << ~ 10^76 size uint fits in a uint256
unchecked { valAccumulator += val; }
(result.success, result.returnData) = calli.target.call{value: val}(calli.callData);
assembly {
    // Revert if the call fails and failure is not allowed
    // `allowFailure := calldataload(add(calli, 0x20))` and `success := load(result)`
    if iszero(or(calldataload(add(calli, 0x20)), mload(result))) {

It's not a really serious bug but the comment leads to the wrong assumption about overflow also I think if any native coin is remaining in the contract it can be drained.

Thanks for reporting. This is a known issue (you can read more here) which is not a problem during normal usage but is a problem if you are relying on the contract to hold ETH, which is not intended usage of the contract anyway. Consequently the first bullet in the Security section of the README says

Ensure it NEVER holds funds after a transaction ends. Any ETH, tokens, or other funds held by this contract can be stolen. There are bots that monitor for this and they will immediately steal any funds they find.

Going to close this I don't think there's anything actionable here, but open to suggestions :)


[Jetson Orin Nano] Device-tree overlays are not applied

Bug Description
We are attempting to deploy a Yocto distribution on an Nvidia Jetson Orin Nano devkit. As part of this, we need to utilize the 40-pin header. To ensure the system boots with the correct pinmux configuration, we aim to apply the tegra234-p3737-0000+p3701-0000-hdr40.dtbo as a device tree overlay.
We followed the instructions in the meta-tegra documentation to apply this overlay.
In the conf/local.conf file, we added the following configuration:
UBOOT_EXTLINUX_FDT = "/boot/${DTBFILE}"
TEGRA_PLUGIN_MANAGER_OVERLAYS:append = " tegra234-p3737-0000+p3701-0000-hdr40.dtbo "

When running the command:
bitbake core-image-base -e

We confirmed that the overlays are set up as follows:
# $TEGRA_PLUGIN_MANAGER_OVERLAYS [3 operations]
#   :append /home/dapie/orin-yocto/build/conf/local.conf:257
#     " tegra234-p3737-0000+p3701-0000-hdr40.dtbo "
#   set /home/dapie/orin-yocto/sources/openembedded-core/../meta-tegra/conf/machine/include/tegra-common.inc:19
#     [_defaultval] ""
#   set? /home/dapie/orin-yocto/sources/openembedded-core/../meta-tegra/conf/machine/include/orin-nano.inc:30
#     "tegra234-carveouts.dtbo tegra-optee.dtbo tegra234-p3768-0000+p3767-0000-dynamic.dtbo"
# pre-expansion value:
#   "tegra234-carveouts.dtbo tegra-optee.dtbo tegra234-p3768-0000+p3767-0000-dynamic.dtbo tegra234-p3737-0000+p3701-0000-hdr40.dtbo "
TEGRA_PLUGIN_MANAGER_OVERLAYS="tegra234-carveouts.dtbo tegra-optee.dtbo tegra234-p3768-0000+p3767-0000-dynamic.dtbo tegra234-p3737-0000+p3701-0000-hdr40.dtbo "
#

Issue
After booting, we inspected the device tree but could not find the overlay entries. Further investigation revealed that even predefined overlays, such as tegra234-carveouts.dtbo and tegra-optee.dtbo, are not being applied.
Steps to Reproduce

Build the meta-tegra Yocto image based on branch Scarthgap commit ac0b6028 with MACHINE set to jetson-orin-nano-devkit.
Use bitbake core-image-base to build the image.
Deploy the image to hardware:

mkdir -p /tmp/tegraflash
tar -C /tmp/tegraflash -xavf /path/to/core-image-base-jetson-orin-nano-devkit.rootfs.tegraflash.tar.gz
cd /tmp/tegraflash
sudo ./dosdcard.sh /dev/mmcblk0 -y

boot and login to the board
Check for the pinmux overlay entries using:

ls /proc/device-tree/bus\@0/pinmux\@2430000/exp-header-pinmux

I may be misremembering, but I'm pretty sure that when you use TEGRA_PLUGIN_MANAGER_OVERLAYS, the overlays are attached to the end of the device tree that's embedded in the UEFI bootloader image. That's all done through the magic of NVIDIA's tegraflash.py script. You would have to update your SPI flash, and not just your SDcard, so the bootloader gets updated, to use this technique.

I can confirm this. DT overlays are stored in one of the partitions in the QSPI NOR flash. So to bring changed  DT overlays onto a device you have to do a complete low level flash (initrd-flash) or you have to do a UEFI capsule update.

ok thanks,
indeed, the Overlay is appended at the end of the DTB,
thanks to the UBOOT_EXTLINUX_FDT variable, the DTB is installed on my SDCard and used by the bootloader.
I finally created a new device tree without the use of overlays.


Release only changed workspace crates

I have some crates in my workspace that do not regularly change, and I would like to skip those when publishing releases for the ones that do have changes. It would be great if I could filter the crates to be released on fly by sth like this
$ cargo release --packages foo,bar,baz minor

cargo-release should support --package, --exclude, and --all in a way similar to built-in cargo commands.  Could you give that a try to see if it works to fit your needs?

oh, great I did not realize that, will try it out and report back

Running
$ cargo release --package foo --dry-run patch
[2020-11-10T13:07:19Z INFO ] Update foo to version 1.0.1
[2020-11-10T13:07:19Z INFO ] Update bar to version 1.0.1
[2020-11-10T13:07:19Z INFO ] Update baz to version 1.0.1
[2020-11-10T13:07:19Z INFO ] Running cargo publish on foo
[2020-11-10T13:07:19Z INFO ] Running cargo publish on bar
[2020-11-10T13:07:19Z INFO ] Running cargo publish on baz
...

so it does not seem to exclude the others

I am using version 0.13.8

(sorry for the long delay)
Does your workspace root have no crate associated with it?  When this is the case, clap-cargo selects all packages, even if you specify --package.  You can only use --exclude in this case.
If this is not what cargo check and friends do, then I'm all for changing it to better match cargo.

Ah yes, there is no root crate, I guess this matches that behaviour you are describing then.

Ah yes, there is no root crate, I guess this matches that behaviour you are describing then.

Regardless of how builtin cargo commands behave it seems counter-intuitive that there is no inclusive-mode in a virtual workspace. Building an exhaustive list for --exclude seems cumbersome and fragile. Cumbersome because it needs to be known prior to calling cargo release which defeats some of its convenience. Fragile because the list can be incomplete and accidentally trigger unwanted releases.
I would like to discuss adding a flag to cargo release to turn on inclusive mode for virtual workspaces.
A very simple solution could be adding a boolean CLI flag which triggers the same condition as if the workspace had a toplevel crate.
Even simpler could be to enable it implicitly whenever --package is provided.
I haven't fully thought this through but I happily will if there is willingness of getting such a feature in.

I've dug into cargo some and confirmed we are deviating/  A fix is up coming

#290 resolved this (linked the wrong one)


Colors are reversed on st7735s tft display

I tried a lot, but I couldn't find a solution about the colors.
Rgb565::WHITE -> Outputs black
Rgb565::BLACK -> Outputs white
My code:
    let spi = spi::Spi::new(
        peripherals.SPI2,
        io.pins.gpio4,
        io.pins.gpio5,
        io.pins.gpio25,
        io.pins.gpio13,
        100u32.kHz(),
        SpiMode::Mode0,
        &mut system.peripheral_clock_control,
        &clocks,
    );

    let reset = io.pins.gpio26.into_push_pull_output();
    let di = SPIInterfaceNoCS::new(spi, io.pins.gpio15.into_push_pull_output());

    let mut display = mipidsi::Builder::st7735s(di)
        .with_display_size(128,160)
        .with_color_order(ColorOrder::Rgb) // Even if I did BGR the problem didn't go away
        .init(&mut delay, Some(reset))
        .unwrap();
    display.clear(Rgb565::BLACK).unwrap();

I tried a lot, but I couldn't find a solution about the colors.

Did you already try to add with_invert_colors(true) to the builder calls?

Method not found
  .with_invert_colors(true)
   |          ^^^^^^^^^^^^^^^^^^ method not found in `Builder<SPIInterfaceNoCS<Spi<esp32_hal::esp32::SPI2>, GpioPin<Output<PushPull>, Bank0GpioRegisterAccess, InputOutputAnalogPinType, 15>>, ST7735s>`

OK, sorry I did forget that this method wasn't included in the latest released version. You could try to use the GIT version until the next version is released.

        .with_invert_colors(false)

run when false. thank you

I believe this is outdated/fixed now, please re-open if this is still a problem.


Jetson AGX NCCL Issue

I am using a Jetson AGX with JetPack 4.4.1 (R32.4.4) and the nvcr.io/nvidia/l4t-pytorch:r32.4.4-pth1.6-py3 docker image from NGC.
Installing setup.py from both 19.10 and 20.03 branches yield issues:
branch 20.03:
odtk infer /data/engine_5_class_finetuned_int8.plan --images /data/sample_inputs/
Traceback (most recent call last):
  File "/usr/local/bin/odtk", line 33, in <module>
    sys.exit(load_entry_point('odtk==0.2.4', 'console_scripts', 'odtk')())
  File "/usr/local/lib/python3.6/dist-packages/retinanet-0.1-py3.6-linux-aarch64.egg/retinanet/main.py", line 181, in main
    worker(0, args, 1, model, state)
  File "/usr/local/lib/python3.6/dist-packages/retinanet-0.1-py3.6-linux-aarch64.egg/retinanet/main.py", line 116, in worker
    torch.distributed.init_process_group(backend='nccl', init_method='env://')
  File "/usr/local/lib/python3.6/dist-packages/torch/distributed/distributed_c10d.py", line 432, in init_process_group
    timeout=timeout)
  File "/usr/local/lib/python3.6/dist-packages/torch/distributed/distributed_c10d.py", line 508, in _new_process_group_helper
    raise RuntimeError("Distributed package doesn't have NCCL "
RuntimeError: Distributed package doesn't have NCCL built in

branch 19.10:
Traceback (most recent call last):
  File "/usr/local/bin/odtk", line 33, in <module>
    sys.exit(load_entry_point('odtk==0.2.4', 'console_scripts', 'odtk')())
  File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 473, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2447, in load
    return self.resolve()
  File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2453, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/dist-packages/retinanet-0.1-py3.6-linux-aarch64.egg/retinanet/main.py", line 10, in <module>
    from retinanet import infer, train, utils
  File "/usr/local/lib/python3.6/dist-packages/retinanet-0.1-py3.6-linux-aarch64.egg/retinanet/infer.py", line 13, in <module>
    from .model import Model
  File "/usr/local/lib/python3.6/dist-packages/retinanet-0.1-py3.6-linux-aarch64.egg/retinanet/model.py", line 8, in <module>
    from ._C import Engine
ImportError: /usr/local/lib/python3.6/dist-packages/retinanet-0.1-py3.6-linux-aarch64.egg/retinanet/_C.so: undefined symbol: _ZN2cv6imreadERKNS_6StringEi

After some troubleshooting I adjusted setup.py with the following:
        library_dirs=['/usr/local/lib', '/usr/local/lib64/'],
        libraries=['nvinfer', 'nvinfer_plugin', 'nvonnxparser', 'opencv_core', 'opencv_highgui', 'opencv_imgproc', 'opencv_imgcodecs'])

And now I am back to getting the NCCL error above.

It look like you need to have jetpack 4.3 installed .. viz. https://github.com/NVIDIA/retinanet-examples#jetpack-compatibility

@tblake84 We have only tested with older versions, as per the comment above. Have you tried inferring using the DeepStream SDK? That would bypass your error messages.

Closing due to inactivity.


guide: add hints for the signature of pymethods protos

A start to give a hint about pymethod-proto args.
By the way, I discovered that it is possible to omit arguments to the methods, e.g. to define a __richcmp__ without arguments.  It seems to be handled all right, just not passing the slot arguments to Rust, but I wonder if that's intentional.

I keep wondering... Should we add variable names too? name: ty is common to both rust and Python, and it'll help users know what to do with the incoming arguments.

As long as we don't also add a blurb about what the function does, this might not make it much clearer.
When the old system is deprecated, or when the new system is finalized, I'd like to move the descriptions from the old chapters below to the new chapter; maybe at this point it would make sense to add names.
On the other hand, the short form makes it clear that these are not copy-pastable signatures.

Updated!


Yahoo API didn't worked anymore

is there any solution for this issue?
i need this library, Thanks

I have released version 1.3.0 that solves this problem.
Now currency rates are get from fixer.io not from yahoo because the service is not stable


pending transactions in the txpool prevent other transactions from being processed still exists

Description
This issue #1891 still exists on v22.4. I had a similar setup as @rami-fatayri and tested a private Besu (8 validators) using Caliper. Pending transactions in the txpool prevented other txs from being processed. Any suggestions would be appreciated.

I am facing the same issue on Besu IBFT 2.0 setup with 4 validators. were you able to resolve this issue?

Hi @CaixiangFan, we have had many improvements in the txpool in later versions (after 22.4). Would you be able to check if this still happens in the latest version?

@shubham-edx what version of besu are you running?

I am using besu  besu-23.1.0  facing same issue


LCFS - Create Organizations page for IDIR users

Description:
Create Organizations page for IDIR users.

Nav bar and main heading: Organizations
Can use Material UI table, should be same as other tables (e.g., user table) for consistency
four columns: Organization name, Balance, In reserve, Registered
Created organizations will be populated in this table, similar to TFRS
Default sort is alphabetical
Material UI table should be accessible in that you can tab through the rows & it shows up in the screen reader

Wireframe:
Purpose and benefit to user:
Will facilitate the management of organizations by government
Acceptance Criteria:

[ ] Given I am a IDIR User, When I am clicking and Organizations page, then I should be able to see all the organizations details like name, balance of compliance units, compliance units that are in reserve and status of registration.

Development Checklist:

[ ] Create a view in UI to show the details of Organizations for IDIR user.

Notes:

Hey team! Please add your planning poker estimate with Zenhub @AlexZorkin @hamed-valiollahi @jig-patel @kevin-hashimoto @prv-proton

@Kailee-Douglas  @airinggov can we get a wireframe for this one?

isn't that this one?
https://preview.uxpin.com/59145260c7d8cc48969ac79401cc03d84843c3d9#/pages/164769377

Yes! Sorry I should have looked through the wireframes before asking for one. Thanks Al!

3 points left

Four columns: Organization name, Balance, In reserve, Registered. Formatting does not cover the entire box. user can expand the columns to fit the table, but it does not stay this way.
Default sort is alphabetical, but sorting "status" function and download buttons scramble the numbers in "compliance units' and 'in reserve' columns every time you use them.
'Organization name' column does not change when filter is applied for a status, but numbers in other columns do change.
Implement breadcrumb navigation on this page

@AlexZorkin fixed in #222


References codelens for every plain object property since TypeScript 3.7

VSCode Version: 1.40.2 and 1.41.0-insider
OS Version: Windows 10 1909
TypeScript 3.7
This setting: "typescript.referencesCodeLens.enabled": true
Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

Create a new .ts file.
Create an object such as

class MyClass {
  private myMethod() {
    const myObject1 = {
      prop1: "prop1",
      prop2: {
        prop2_1: "prop2.1",
        prop2_2: "prop2.2"
      }
    };
  }
}

With TypeScript 3.6, we get codelens for the class and the method:

With TypeScript 3.7, we also get codelens for each property in the object:

Is it normal behavior?
It becomes pretty intense in a React Native screen file when we define styles like so:

or when we pass a plain object as a parameter to a method:

Also, the references found for each React Native styles are styles with the same name in other files, but in reality, those are not related since they are local to each file.

@mjbvz Why was this issue closed? Has it been resolved?

@craxal Yes. Try the insiders builds (1.42)


Add newline after module docstrings in preview style

Change
"""Test docstring"""
a = 1

to
"""Test docstring"""

a = 1

in preview style, but don't touch the docstring otherwise.
Do we want to ask black to also format the content of module level docstrings? Seems inconsistent to me that we change function and class docstring indentation/contents but not module docstrings.
Fixes https://github.com/astral-sh/ruff/issues/7995

This conflicts with https://github.com/asottile/reorder-python-imports v3.12.0 which removes any blank lines between the module docstring and the import lines.
i.e. ruff format in v0.3.0 has the same issue reported in black as https://github.com/psf/black/issues/4175 which is currently unresolved.

is there any config property which disables this behavior?

is there any config property which disables this behavior?

No, there's no such configuration option.

I'd like to have an option to disable this behavior. I didn't have this when using Black 24 with preview features on.

@MichaReiser It looks like a newline is inserted when preview style is disabled. Is this intended?
https://play.ruff.rs/e23adff0-8541-4eab-957b-282e44aef53e

@MichaReiser Never mind. Just saw https://github.com/astral-sh/ruff/pull/9639.


Next/20181219/v3

#174, plus:

fix undefined behavior: signed int overflow
fix compile warnings in tests
improve status code parsing

cc @catenacyber

Looks good to me.
There is some code that may be removed in bstr_util_mem_to_pint
Once we checked for the overflow, we do not have to do it again twice...

Agreed. Simplified it in #176


Add required --host option to examples

While the examples in the page focus on the master/slave concept, not providing the --host option will result in failure to start the test. It should be added, so that any user that copies the command from the documentation does not have to decipher an error message before getting the test to run.

Hmm, I see what you are geting at, but that example is for things that are specific to running distributed. Using the --host parameter isnt specifically for distributed runs, so I dont feel it really belongs in this example.

I also understand the issue, but I'd also like to keep the examples minimal.
Instead of adding the --host argument to the example, I added a short note about it on the same documentation page: 40f64e0594d04b883bd68fefa294a4f849d6879c


[Bug]VoiceActivity Update and died

Go to your plugins folder and delete the file called "VoiceActivity.config.json," then restart Discord. Let me know if the issue still persists.

It works thanks


Website rebrand and port to Next.js

Planning on combining the functionality of newtunes.xyz and MySpotify into a single application. That means functionality from the legacy PHP application will need to be ported over to TypeScript.
Tasks
Initial website port

[x] Initial Next.js and TypeScript setup
[ ] New homepage design and boilerplate
[ ] Login support with Spotify
[ ] Viewing top tracks (short, medium, long)
[ ] Viewing top artists (short, medium, long)
[ ] Viewing recents
[ ] Settings page for account details and deleting

History tracking

[ ] Connect a new database solution
[ ] Implement database functionality to track history
[ ] Combine this functionality with the website UI to be viewed
[ ] Transfer over existing data to the new website? (to be determined if I want it to be done, not sure)

More tasks TBD?

Hi there.
I'm willing to contribute.


Protected settings not working

Please verify that this bug has NOT been raised before.

[X] I checked and didn't find a similar issue

Describe the bug*
While working on #5224 I discovered, that the initial implementation of protected settings (#2339) doesn't work correctly (anymore). You can still see the protected settings values in the plugin settings page and they aren't redacted.
Steps to Reproduce

create a plugin with protected settings
goto the plugins settings page and set a value
reload settings page and see the NOT redacted values

Expected behaviour
protected settings should be redacted with ***.
Deployment Method

[X] Docker
[X] Bare metal

Version Information
Version Information:
InvenTree-Version: 0.13.0 dev
Django Version: 3.2.20
Commit Hash: c30190e
Commit Date: 2023-07-11
Commit Branch: feature/required-settings
Database: sqlite3
Debug-Mode: True
Deployed using Docker: False
Platform: Linux-5.15.49-linuxkit-pr-x86_64-with-glibc2.31
Installer: GIT
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}]
Please verify if you can reproduce this bug on the demo site.

[ ] I can reproduce this bug on the demo site.

Relevant log output
No response

Thanks @wolflu05 - fix incoming in https://github.com/inventree/InvenTree/pull/5229


Cross talk between tests

I have put together a fix for the issue raised in #161 and am now trying to build some tests.
What I have discovered is, is there is cross talk between the tests.  When the server is created on local host port 1234, the simple server.close() call is not actually fully destroying the server, so if the timing is off, the test that follows fails.
I think the reason is open connections, but I am not entirely sure.  I have tried using the server-destroy module but it isn't solving the problem - then the test that follows times out - indicating that response.on('data' ...) is not firing.

I have skirted this issue in the tests I created to fix #161 by using a different port number.  I think it must be the use of a global agent, but I don't understand it enough to suggest any change.  I originally changed by test to use port 1235 but then the server.push test was failing because the response to the original get request in that test was the response I had posted in my test way earlier in the cycle.  In the end I just moved to another port (1236) but that seems a fragile approach.


Update azure-pipelines-netcore-k8s.yml

[Bug-4313: NuGet Package Publish Failing]
📲 What
Resolving the NuGet publish feature which is failing in the release stage of the pipeline
🤔 Why
To publish the NuGet packages
🛠 How
By running the pieline
👀 Evidence
Screenshots / external resources / links / etc.
Link to documentation updated with changes impacted in the PR
🕵 How to test
Notes for QA
✅ Acceptance criteria Checklist

[ ] Code peer reviewed?
[ ] Documentation has been updated to reflect the changes?
[ ] Passing all automated tests, including a successful deployment?
[ ] Passing any exploratory testing?
[ ] Rebased/merged with latest changes from development and re-tested?
[ ] Meeting the Coding Standards?

/azp run

Honestly I think we might just be missing the fact that the parameter in the pipeline file is mispelled - it should be nuget_service_connection and it looks like it's nuget_sevice_connection

Yikes that'd do it 😬

No longer necessary


Local disk boot (Shell trick and USB disabled)

Due to a varargs issue, run/runv functions can't work as usual.
Among other things, we must use shell (rc) to prepare disk for botting the system, doing various part of the work that were done by bootloader in Plan 9.
Also, useb boot is disabled untils we have a solution or better mess for this.

USB is working.


KafkaChannel v1beta1 webhook

Part of https://github.com/knative/eventing-contrib/issues/1350

/assign


Update README.rst

Fixes #465

Codecov Report

Merging #471 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #471      +/-   ##
==========================================
- Coverage   89.26%   89.23%   -0.03%
==========================================
  Files          31       31
  Lines        3522     3522
==========================================
- Hits         3144     3143       -1
- Misses        378      379       +1

Impacted Files
Coverage Δ

scvi/inference/autotune.py
75.57% <0%> (-0.22%)
:arrow_down:

Continue to review full report at Codecov.

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


Alexderpyfox nl finished

finally its up to date

Unfortunately this conflicts.

I am closing this due to inactivity, if you want to work on it again feel free to re-open or let me know that you need me to re-open it.


IE8 compatibility

Unfortunately, IE8 still accounts for a couple percent of Internet users. Using the dot notation to access the for attribute of an object causes an exception in that browser, and there's an easy way to avoid this.
By the way, thanks for this great package!

Thanks, manually merged in devel branch.


Introduce async framework and clean up prefetch related logic

The main change is to build an async framework for storage/worker by using tokio Notify and current thread runtime.
Also clean up data prefetch related logic, those are left over from legacy code.

~can you please elaborate why mpmc is needed here?~
I see that mpsc might be used to serve two async workers, but why do we need two workers if it's async already?

Currently we have enabled the async runtime framework, but most internal implementation is still in sync mode.
So we still need multi-threading here before we have convert the whole stack to async mode.


runtime(vim): Improve :let-heredoc syntax highlighting

"trim" and "eval" are allowed in any order.
@cecamp, I sent this to you about a year ago but didn't receive a reply.  This is unusual so I'm submitting the change here as well in case my email has dissipated in the ether.

@cecamp please

I think this can be included @chrisbra, it's an isolated change.

thanks, makse sense to include


More flexible Config for underscored attributes, to enable them to be used as regular model fields, like '_id' for MongoDB models.

Checks

[x] I added a descriptive title to this issue
[x] I have searched (google, github) for similar issues and couldn't find anything
[x] I have read and followed the docs and still think this feature/change is needed
[x] After submitting this, I commit to one of:

Look through open issues and helped at least one other person
Hit the "watch" button on this repo to receive notifications and I commit to help at least 2 people that ask questions in the future
Implement a Pull Request for a confirmed bug

Feature Request
As mentioned in #2101 "ignoring underscore attrs was default behavior for a long time". But now, been having the Config for such attributes it seems quite artificial limitation.
Underscore attributes are considered as private in Python world, but widely used outside with other meanings, i.g. _id field for MongoDB documents is a normal field and aliasing it when defining model brings lot of inconvenience.
Pydantic is a library for interacting with the outside world, so suppose it should be more flexible there and provide ability to use underscored attributes as an ordinary regular model fields.
Maybe it will be useful to divide underscored attributes to sunder and dunder, but it's discussible and outside of scope of this feature request.
So I propose to introduce the following Config for underscored attrs:
underscore_attrs:  Literal['ignored', 'regular', 'private']

# ignored - default behavior
# regular - regular model fields
# private - are private, like underscore_attrs_are_private = True

or little bit less descriptive config item
underscore_attrs_ignored: boolean = True # by default

Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.7.2
            pydantic compiled: True
                 install path: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pydantic
               python version: 3.7.6 (v3.7.6:43364a7ae0, Dec 18 2019, 14:18:50)  [Clang 6.0 (clang-600.0.57)]
                     platform: Darwin-18.7.0-x86_64-i386-64bit
     optional deps. installed: ['typing-extensions', 'devtools']

# ignored - default behavior

To be honest, can't imagine use case for default behavior of underscored attributes.
They are useless at all - we can nor initialize, nor assign values, and hasattr returns False.
from pydantic import BaseModel

class Model(BaseModel):
    _id: int

m = Model(_id=1)  # ignored
print(hasattr(m, '_id'))  # False
m._id = 1  # ValueError: "Model" object has no field "_id"

Pydantic is a library for interacting with the outside world

Exactly. Note that true private attributes are also affected negatively by how underscore is handled: today, even with Config.underscore_attrs_are_private = True one must declare all private names as class attributes. This pollutes the attribute list with variables that are not meant to be interacted externally, and it's a PITA while developing since the class private attribute list needs to be maintained and kept in sync with class code.
Since attributes starting with underscore are by convention private, I think the library should ignore them altogether by default, both when assigning and accessing, except if they're declared as model attributes. This works nicely with other libraries like MongoDB that use names starting with "_" which, by definition (in the context of those libraries), are public interfaces therefore defining them  as model attributes would make total sense. This also would remove the need of having Config.underscore_attrs_are_private and PrivateAttr kludges.

Pydantic is a library for interacting with the outside world

Exactly. Note that true private attributes are also affected negatively by how underscore is handled: today, even with Config.underscore_attrs_are_private = True one must declare all private names as class attributes. This pollutes the attribute list with variables that are not meant to be interacted externally, and it's a PITA while developing since the class private attribute list needs to be maintained and kept in sync with class code.
Since attributes starting with underscore are by convention private, I think the library should ignore them altogether by default, both when assigning and accessing, except if they're declared as model attributes. This works nicely with other libraries like MongoDB that use names starting with "_" which, by definition (in the context of those libraries), are public interfaces therefore defining them  as model attributes would make total sense. This also would remove the need of having Config.underscore_attrs_are_private and PrivateAttr kludges.

There's a reason Object-Oriented libraries for Mongo like MongoEngine use an un-prefixed id for the _id attribute: https://docs.mongoengine.org/guide/document-instances.html#document-ids
And this Note:

There is one caveat on Dynamic Documents: fields cannot start with _

https://docs.mongoengine.org/guide/defining-documents.html#dynamic-document-schemas

There's a reason Object-Oriented libraries for Mongo like MongoEngine use an un-prefixed id for the _id attribute: https://docs.mongoengine.org/guide/document-instances.html#document-ids
And this Note:

There is one caveat on Dynamic Documents: fields cannot start with _

https://docs.mongoengine.org/guide/defining-documents.html#dynamic-document-schemas

if is mongodb model
you can try " ....alias=_xxxx...."
class BaseDoc(BaseModel):
"""
example
"""
id: ObjectId = Field(None, alias="_id", title="Primary key", description="mongodb's Primary key")

I agree with the private by default behavior, but mangling the sunder attributes once they have been set up as private involves some issues such as losing the type annotations or the need to overload classmethods like from_orm() or construct().
And it's true there's a convention of treating sunder attributes as private, but it's set on the basis of "we are all consenting adults here". IMHO, the enforcement breaks the PoLA with no significant advantages. Also, it's very common for classes that include some kind of metaprogramming to use sunder public attributes to avoid colliding with user or dynamic attributes, and BaseModel falls indeed into this category.

@AntonOvsyannikov Private attributes are intended to be managed on initialization. E.g.
from pydantic import BaseModel
from pydantic.fields import Undefined

class Model(BaseModel):
    _private: str  # also PrivateAttr with default value or factory
    attr: str

    class Config:
        underscore_attrs_are_private = True

    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        for attr, decl in self.__private_attributes__.items():
            value = kwargs.get(attr, decl.get_default())
            if value is not Undefined:
                setattr(self, attr, value)

obj = Model(attr='ATTR', _private='PRIVATE')
print(obj)
#> attr='ATTR'
print(obj._private)
#> PRIVATE

You won't get validation this way, but there's a forthcoming feature that will help with this: #2625. AFAIK, there's not a specific way to do it, and also private attributes lose their annotations, so it would be necessary to use some kludge. E.g.
from pydantic import PrivateAttr

class Model(BaseModel):
    _private: int = PrivateAttr(default_factory=int)

    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        for attr, decl in self.__private_attributes__.items():
            value = kwargs.get(attr, decl.get_default())
            if value is not Undefined:
                if decl.default_factory:
                    value = decl.default_factory(value)
                setattr(self, attr, value)

obj = Model(_private='001')
print(obj._private)
#> 1

obj2 = Model()
print(obj2._private)
#> 0

Also, you can set the attribute in a slot.
class Model(BaseModel):
    __slots__ = '_private',
    attr: str

    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        for attr in self.__slots__:
            try:
                object.__setattr__(self, attr, kwargs[attr])
                # self.__dict__[attr] = getattr(self, attr)
            except KeyError:
                pass

Uncommenting the self.__dict__ line you'll get:
print(obj)
#> attr='ATTR' _private='PRIVATE'

But this is probably not a good idea for production code.
Cheers!

I guess it could be done if we set Config.underscore_attrs_are_private = True by default in v2 (see https://github.com/samuelcolvin/pydantic/discussions/2471).
If set to False we could accept all names (so make is_valid_field more relax) and only refuse dunder names
@samuelcolvin WDYT? Should we add this in v2 milestone?

That would be great :) Some ideas FWIW:

Enable validate_assignment for private attributes. Type annotation is currently erased in PrivateAttr, could Annotated(<type>, PrivateAttr) be a valid approach?

If the private attributes are not going to be added to __fields_set__, passing the kwargs to _init_private_attributes would avoid having to subclass the instantiation methods that don't call __init__ (such as from_orm or construct).

Pydantic sets as an invalid field every attribute that starts with an underscore. Restricting this could be a way to keep both behaviors.
stdlib's enum, for instance, only identifies attributes surrounded by exactly two underscores (__name__) as dunder and by exactly one (_name_) as sunder. Although maybe the latter is very enum-specific and _name is a more conventional sunder form, e.g.
import re
DUNDER = re.compile(r'^__[^_].*?[^_]__$')
SUNDER = re.compile(r'^_[^_].*?[^_]$')

assert DUNDER.match('__test_var__')
assert not DUNDER.match('__test_var___')
assert SUNDER.match('_test_var')
assert not SUNDER.match('_test_var_')

Extra could be a good place to broaden the selection of attributes without modifying the current behavior. For example: Extra.allow_sunder, Extra.allow_dunder, and Extra.allow_under (to allow both).
Or even accepting a set of names in Config.extra that bypasses the is_valid_field check (this would also allow specifying a restricted set of optional attributes easily).
class Model(BaseModel):
    class Config:
        extra = {'this', '_and_this', '__and_this__'}

Happy to allow private attribute fields, but not dunder (__ prefix) attributes.
This should be behind a flag of some sort with default False.

To be clear: I still think using it would almost always be a bad idea, but I don't see any reason why pydantic should prevent it.

Underscore attributes are considered as private in Python world, but widely used outside with other meanings, i.g. _id field for MongoDB documents is a normal field and aliasing it when defining model brings lot of inconvenience.

I'm curious why using an alias is inconvenient.

Ye, very good question, I'm not clear why aliases don't solve this, particularly as we now have load and dump aliases.

It surely solves this, but also adds significant cognitive load, just take a look at the things people do to workaround this limitation: https://github.com/tiangolo/fastapi/issues/771 https://github.com/tiangolo/fastapi/issues/1515
Would be nice to just use _id field and be done with it.

Ye, very good question, I'm not clear why aliases don't solve this, particularly as we now have load and dump aliases.

For databases which use _id using id instead and setting up an alias is not always feasible because we have some models which also have an actual id field, in which case we have to use something else again for the _id field, maybe id_.
But as others have said this add a lot of cognitive load, and a lot of extra explaining to out users. With patching of is_valid_field this was easily fixed in Pydantic v1, I've not yet found a way to do this in v2. It would be great if this was just supported (perhaps with a config option if necessary).

@samuelcolvin I'd suggest an annotation similar to PrivateAttr but doing the opposite for a single field. Maybe just using an explicit Field.
class Model(BaseModel):
    _private_attr: int
    _id: Annotated[str, Field()]

Using Field here explicitly makes this attribute a model field despite its name starts with _.

@samuelcolvin Is this (support for _ prefixed fields) something that is considered to be supported by pydantic?

@Kludex
As mentioned during our brief discussion yesterday, this issue is currently blocking us from updating to pydantic v2.
We use pydantic for models with ArangoDB. Our base model from which all others are inherited looks something like this:
class ArangoModel(BaseModel):
    class Config:
        extra = 'forbid'
        use_enum_values = True
        validate_assignment = True

    _id: str = None
    _key: str = None
    _rev: str = None

And for edge models:
class Edge(ArangoModel):
    _from: str = None
    _to: str = None

Other models for specific vertex/edge collections inherit from these and specify additional fields.
There are many cases where access these base fields on initialized models, and in some cases specifically set them:
other_model = SpecificModel(**returned_dict_from_database_interface)
model._id = 'table_name/some_unique_id'
edge._from = model._id
edge._to = other_model._id

And we want these to be included using the same names (_id) when converting them to a dict to send these to the database, and when retrieving objects from the database.
Currently we use the python-arango package which already handles (de)serialization from json to python and back, perhaps when using v2 we can try to make pydantic create models directly from the json.
So we hope pydantic can support (single-)underscore prefixed fields and treat them as regular fields for assignment, serialization, deserialization, etc.. I understand this might not be the default, so it would be fine if this has to be configured via the model ConfigDict.
Thanks for considering this.

Here's a workaround if you're in the same context as me :

You want MongoDB to handle _id generation
You only need the id field in a response body and not in a request
You cannot use response_model_by_alias because you need the API to be camelCase with alias_generator = to_camel

You just need to override Pydantic constructor in order to rename the _id key to id in the incoming data.

# Represents an ObjectId field in the database.
# It will be represented as a `str` on the model so that it can be serialized to JSON.
PyObjectId = Annotated[str, BeforeValidator(str)]

class YourObjectBase(BaseModel):
    some_field: str

    class Config:
        alias_generator = to_camel
        populate_by_name = True

class YourObjectResponse(YourObjectBase):
    id: PyObjectId

    """
    Overriding Pydantic constructor because of some issues between Pydantic and MongoDB.
    MongoDB uses _id as identifier while Pydantic consider fields beginning with _ as private.
    We cannot use Pydantic alias either because it would generate an incorrect schema documentation.

    For more information, see :
        - https://github.com/tiangolo/fastapi/issues/1515
        - https://github.com/pydantic/pydantic/issues/2105
    """
    def __init__(__pydantic_self__, **data: Any) -> None:
        if '_id' in data:
            data['id'] = data.pop('_id')
        super().__init__(**data)

My code deserializes requests coming from another service, ClientService, as MessagePayload model. ClientService, will set previous_run_id in future but today it doesn't. ClientService, luckily, sends information I can derive previous_run_id from. I think this is natural to define MessagePayload like:
from pydantic import BaseModel

_unset_placeholder = ""

class MessagePayload(BaseModel):
    previous_run_url: str
    # NOTE: previous_run_id will be set by ClientService in future
    _previous_run_id: str | None = Field(_unset_placeholder, alias="previous_run_id")"

    @property
    def calculated_previous_run_id(self) -> str | None:
        if self._previous_run_id != _unset_placeholder:
            return self._previous_run_id

        return derive_previous_run_id_from_url(self.previous_run_url)

I like _previous_run_id be private in my model definition so that I could easily catch if I mistakenly used that field, instead of calculated_previous_run_id in my code. Of course, when I learn ClientService has changed to always supply previous_run_id, I will make that field public and drop calculated_previous_run_id.

@sydney-runkle Could support for underscore prefixed field names be considered for Pydantic v3? (if it would be considered to big of a change to support in v2)
(And for those fields to behave the same as any non-underscore prefixed field.)


Slow on M1 (Grab has bugfix)

Summary
Fix GrabMap loading laggy and jump after pan on M1 simulator.
Grab has bugfix
The original author of this bug report is Grab. They have a bug fix and would like to upstream it to MapLibre GL Native.

Might be related to:

https://github.com/maplibre/maplibre-gl-native/issues/163
https://github.com/maplibre/maplibre-gl-native/issues/257
https://github.com/maplibre/maplibre-gl-native/issues/268


Add the ability to create PE import libraries

Now that we can generate COFF archives, we can also generate import libraries by setting up an archive with the correct members.
This can then be used in the Rust compiler to implement the raw-dylib feature.

Ports the code from COFFImportFile.cpp to generate import libraries.
Adds tests to compare the import libraries to llvm-lib and llvm-dlltool.

Thanks a lot for working on this!

Published as 0.3.1.

I've opened https://github.com/rust-lang/rust/pull/128206 as first step towards wiring this up in cg_clif.


Remove X-UA-Compatible tag in head

This expansion adds <meta http-equiv="X-UA-Compatible" content="ie=edge"> to the head of the document.I don't think this needs to be part of the default !+tab expansion anymore.
A few reasons why:

The last browser that uses this is IE10
Chrome frame was retired over 5 years ago

Some more discussion from many years ago: https://stackoverflow.com/questions/6771258/what-does-meta-http-equiv-x-ua-compatible-content-ie-edge-do
Can we remove it so I can stop deleting it after each expansion?

Published as<EMAIL_ADDRESS>

So fast! thanks a ton.

Yeah, snippets require total review, some of them are obsolete :) Thanks!


Update filepicker.php

A new inspection was created.

The inspection completed: No new issues

Totally! Thank you for the PR @dauvray !


added translation for language dropdown

Added translations for the language keys in the language dropdown.
There are 2 options for translating languages in the dropdown:
Show for every language the native translation
-> for "en" we would always display "English" even when we selected "de" as language.
-> for "de" we would always display "Deutsch" even when we selected "en" as language.
Show for every language the translated language name
-> for "en" we would display "Englisch" when we selected "de" as language.
-> for "de" we would display "German" when we selected "en" as language.
The current implementation follows the option 2.
Let we know in the comments how we should proceed.

There are so much changes in the language files because the languages keys are now ordered in alphabetical order. I just added the key folder language to the translation files.

Thank you for the PR @lingo21m :+1:
Will look at it in detail tomorrow, good idea! Would fix #116 as well :)

I changed a little bit of the layout. Now it should be better in the settings and is aligned with the other setting options. @cstenglein please have a look at it.

Thank you very much for the PR :)


add "valid" output to encoders

It would be helpful to have the onehot2bin converter have a valid output that indicates that one of the inputs was "hot" vs. all inputs zero.
One-hot but w/ all bits zero when nothing is valid is turning out to be a pretty common occurance.
@mgottscho if it sounds good I will go ahead and send a PR.
FYI @btowles-openai

SGTM

@bgelb-openai are you still planning to do a PR?

Unassigning from @zhemao-openai, we have a new hire who will help do this as first PR :D


Fetch CrUX INP metric and budget functionality, updated spreadsheet

Checks the PSI results for INP metric, includes in results, and checks budget for INP.
In order to use, the example spreadsheet needed 7 more columns for the Results:

CrUX INP
CrUX INP Budget
CrUX INP Diff
CrUX INP Status
CrUX INP Good
CrUX INP NI
CrUX INP Poor

as well as 1 more column for Sites:

CrUX INP Budget
Note: I have no idea what LH Perf Score Diff is for but I kept it. It has a reference error in the current example.

and 1 more row for INP budget in Alerts under Metrics to Report:

CrUX INP Budget

I didn't have access to edit the original so I ended up making a new one and pasted in the updated files to it's AppScript. I'd be thrilled if someone else was the owner/the original was updated instead!

Sorry, am realizing that my sheet is not publicly shareable. Do we have a way to update the current URL instead?

Sorry, am realizing that my sheet is not publicly shareable. Do we have a way to update the current URL instead?

I think we can let this go. Xavier is pushing v2, and this fix should be included.


Conditionalize units which require a boot disk

On live PXE or ISO boots, skip units which operate on a boot disk.
Part of https://github.com/coreos/fedora-coreos-config/pull/155.

Updated to fix ignition-diskful.target failing to pull in any units.


fixing automatic translations

[ X] I have read freeCodeCamp's contribution guidelines.
[ X] My pull request has a descriptive title (not a vague title like Update index.md)
[ ] My pull request targets the master branch of freeCodeCamp.
[ X] None of my changes are plagiarized from another source without proper attribution.
[ ] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

LGTM

Congrats @caioslv on your first pull request (PR)! 🎉
Thank you for your contribution to the page! 👍
We're happy to accept these changes, and look forward to future contributions. 📝


[.github] - feat(core): multi-region deployment

Description
This PR enables multi-region deployment for  core
Risk

Deploy Plan

PMRR


A few comments on documentaiton

Here is collection of comments on documentation page.
https://drive.google.com/drive/folders/1kh9RbItKxcQVEOQVVub51uC82Ppye45T?usp=sharing
We put comments on screenshot of each page.

done #145


Problems encountered when adding Frontier (polkadot-v0.9.17)

@99Kies this is currently a work in progress, find a better version here: https://github.com/edgeware-network/frontier branch: erup-5-latest

@flipchan but it's not support polkadot-v0.9.17.