Hero widget in a ListView larger than viewport throws overflow error when poping and animating back to the route with the list

Steps to Reproduce

Execute flutter run on the code sample
Click on any card displayed in the ListView whose id is >= 4.
Pop the route.
Observe the overflow error on the animation back.

Expected results:
I'm not sure if Flutter automatically handles a case where the Hero widget child is a Column and its contents bigger than the viewport or not.
For now, I expect there to be no overflow error.
Actual results:
Overflow error when the widget animates back into the list and its contents is bigger than the viewport.

Code sample

import 'package:flutter/material.dart';

void main() => runApp(const BugApp());

class BugApp extends StatelessWidget {
  const BugApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: ListView.separated(
            separatorBuilder: (_, __) => const SizedBox(height: 20),
            padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 45),
            itemCount: 9,
            itemBuilder: (_, i) => BugAppCard(i + 1),
          ),
        ),
      ),
    );
  }
}

class BugAppCard extends StatelessWidget {
  final int i;
  const BugAppCard(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Widget _current = BugThumbnail(i,
        borderRadius: const BorderRadius.all(Radius.circular(30)));

    _current = Column(children: [_current, BugInfo(i)]);

    _current = BugHero(i, child: _current);

    _current = GestureDetector(
      child: _current,
      onTap: () => Navigator.of(context).push(MaterialPageRoute(
        builder: (context) => BugPageFull(i),
      )),
    );

    return _current;
  }
}

class BugPageFull extends StatelessWidget {
  final int i;
  const BugPageFull(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    const _fakeContent = SizedBox(height: 120);
    Widget _current = BugThumbnail(i);

    _current = ListView(children: [_current, BugInfo(i), _fakeContent]);

    _current = BugHero(i, child: _current);

    return Scaffold(
      backgroundColor: BugInfo.bgColor,
      body: _current,
    );
  }
}

class BugThumbnail extends StatelessWidget {
  final int i;
  final BorderRadiusGeometry? borderRadius;
  const BugThumbnail(
    this.i, {
    Key? key,
    this.borderRadius,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Center(
        child: Text('$i', style: Theme.of(context).textTheme.headline1),
      ),
      width: double.infinity,
      height: MediaQuery.of(context).size.height - 120 + i * 20,
      decoration: BoxDecoration(
        borderRadius: borderRadius,
        color: Colors.teal[i * 100]!,
      ),
    );
  }
}

class BugInfo extends StatelessWidget {
  static final Color bgColor = Colors.blueGrey.shade900;

  final int i;
  const BugInfo(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(15),
        color: bgColor,
      ),
      padding: const EdgeInsets.fromLTRB(30, 20, 30, 20),
      child: Text(
        'ID: $i',
        style: Theme.of(context)
            .textTheme
            .bodyText2!
            .copyWith(color: Colors.white),
      ),
    );
  }
}

class BugHero extends Hero {
  const BugHero(
    int i, {
    required Widget child,
    HeroFlightShuttleBuilder? flightShuttleBuilder,
    Key? key,
  }) : super(
          key: key,
          child: child,
          tag: 'tag-$i',
          flightShuttleBuilder: flightShuttleBuilder,
        );
}

Logs

$ flutter doctor -v

[✓] Flutter (Channel stable, 2.8.1, on macOS 11.6.2 20G314 darwin-x64, locale en-GB)
    • Flutter version 2.8.1 at /usr/local/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (10 days ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/jellynoone/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.64.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • Pixel (mobile)  • <IP_ADDRESS>:5555 • android-arm64  • Android 10 (API 29)
    • macOS (desktop) • macos              • darwin-x64     • macOS 11.6.2 20G314 darwin-x64
    • Chrome (web)    • chrome             • web-javascript • Google Chrome 96.0.4664.110

! Doctor found issues in 1 category.

Additional:
I've found two workarounds. Replace the codes snippets bellow with the relevant parts from the initial example.
Workaround 1:

Wrap only the thumbnail in a `Hero` widget not the entire `Column` (in the home route) and `ListView` (on the `BugPageFull`).
Downside: The animation isn't as nice. (To me)
Relevant changes to the initial example:
class BugAppCard extends StatelessWidget {
  final int i;
  const BugAppCard(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Widget _current = BugThumbnail(i,
        borderRadius: const BorderRadius.all(Radius.circular(30)));

    _current = BugHero(i, child: _current); // wrap thumbnail not Column

    _current = Column(children: [_current, BugInfo(i)]);

    _current = GestureDetector(
      child: _current,
      onTap: () => Navigator.of(context).push(MaterialPageRoute(
        builder: (context) => BugPageFull(i),
      )),
    );

    return _current;
  }
}

class BugPageFull extends StatelessWidget {
  final int i;
  const BugPageFull(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    const _fakeContent = SizedBox(height: 120);
    Widget _current = BugThumbnail(i);

    _current = BugHero(i, child: _current);  // wrap thumbnail not ListView
    // however this change isn't necessary this is not the error-causing widget

    _current = ListView(children: [_current, BugInfo(i), _fakeContent]);

    return Scaffold(
      backgroundColor: BugInfo.bgColor,
      body: _current,
    );
  }
}

Workaround 2:

Use the `Hero.flightShuttleBuilder` property to wrap the `Column` in a `SingleChildScrollView`.
Downside: Feels like a hack.
Relevant changes to the initial example:
class BugAppCard extends StatelessWidget {
  final int i;
  const BugAppCard(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Widget _current = BugThumbnail(i,
        borderRadius: const BorderRadius.all(Radius.circular(30)));

    _current = Column(children: [_current, BugInfo(i)]);

    // save reference to the widget using just _current would at the time of the closure call refer to the GestureDetector
    final ref = _current;
    _current = BugHero(
      i,
      child: _current,
      flightShuttleBuilder: (flightContext, animation, flightDirection,
          fromHeroContext, toHeroContext) {
        final Hero toHero = toHeroContext.widget as Hero;
        final child = toHero.child;

        // only affect this widget leave others unchanged
        if (child != ref) return child;

        return SingleChildScrollView(child: child);
      },
    );

    _current = GestureDetector(
      child: _current,
      onTap: () => Navigator.of(context).push(MaterialPageRoute(
        builder: (context) => BugPageFull(i),
      )),
    );

    return _current;
  }
}

Hi @jellynoone, Thanks for filing the issue. I ran your code sample and did not reproduce any overflow error. Can you please share your output of flutter doctor -v?
https://user-images.githubusercontent.com/31410839/147469461-fb0347aa-a3b3-4761-b305-f06cfcc9a7b1.mov

flutter doctor -v
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale en-GB)
    • Flutter version 2.8.1 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (11 days ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 60.1.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.61.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • iPhone 13 (mobile) • 45FE8AD8-94DA-4F94-B52B-81102B1B42E7 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)    • macos                                • darwin-arm64   • macOS 12.1 21C52 darwin-arm
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 96.0.4664.110

• No issues found!

Hi, @maheshmnj. The flutter doctor -v output is under logs in my initial response. Re-sending here:

[✓] Flutter (Channel stable, 2.8.1, on macOS 11.6.2 20G314 darwin-x64, locale en-GB)
    • Flutter version 2.8.1 at /usr/local/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (11 days ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/jellynoone/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.64.0-insider)
• VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
• Flutter extension version 3.29.0
[✓] Connected device (3 available)
• Pixel (mobile)  • <IP_ADDRESS>:5555 • android-arm64  • Android 10 (API 29)
• macOS (desktop) • macos              • darwin-x64     • macOS 11.6.2 20G314 darwin-x64
• Chrome (web)    • chrome             • web-javascript • Google Chrome 96.0.4664.110
! Doctor found issues in 1 category.

Could you try again? But have the black part / info be on the screen?
I get an overflow report on my android device and on web.
You can test it out at: https://dartpad.dev/?id=784592c7d7d8b0d7bbf6390f1520ac65
View video bellow:
https://user-images.githubusercontent.com/77585130/147500537-13799367-e02c-46e5-b1c5-060651d8edd0.mov

I also noticed that when you pop the route no hero animation actually occurs. Could be that iOS / Mac default popping mechanism doesn't trigger the hero animation while android does?
Similarly, if I pop the route differently on the web no hero animation is triggered. But again could be because I'm on a Mac.
https://user-images.githubusercontent.com/77585130/147500905-694f9d11-bf1b-4352-b0b6-9ce2efdb5494.mov

Also an AppBar could be added to the Scaffolds to ensure there is an app provided way to pop the route. Maybe that would cause the same behavior to be observed on the iOS simulator?

thanks for the info @jellynoone, I was able to reproduce the issue on stable. and the master channel. This issue seems to be a duplicate of https://github.com/flutter/flutter/issues/27320 (closed)

Android
MacOS

code sample
import 'package:flutter/material.dart';

void main() => runApp(const BugApp());

class BugApp extends StatelessWidget {
  const BugApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: ListView.separated(
            separatorBuilder: (_, __) => const SizedBox(height: 20),
            padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 45),
            itemCount: 9,
            itemBuilder: (_, i) => BugAppCard(i + 1),
          ),
        ),
      ),
    );
  }
}

class BugAppCard extends StatelessWidget {
  final int i;
  const BugAppCard(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Widget _current = BugThumbnail(i,
        borderRadius: const BorderRadius.all(Radius.circular(30)));

    _current = Column(children: [_current, BugInfo(i)]);

    _current = BugHero(i, child: _current);

    _current = GestureDetector(
      child: _current,
      onTap: () => Navigator.of(context).push(MaterialPageRoute(
        builder: (context) => BugPageFull(i),
      )),
    );

    return _current;
  }
}

class BugPageFull extends StatelessWidget {
  final int i;
  const BugPageFull(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    const _fakeContent = SizedBox(height: 120);
    Widget _current = BugThumbnail(i);

    _current = ListView(children: [_current, BugInfo(i), _fakeContent]);

    _current = BugHero(i, child: _current);

    return Scaffold(
      backgroundColor: BugInfo.bgColor,
      appBar: AppBar(
        backgroundColor: BugInfo.bgColor,
        leading: IconButton(
          icon: const Icon(Icons.arrow_back),
          onPressed: () => Navigator.of(context).pop(),
        ),
      ),
      body: _current,
    );
  }
}

class BugThumbnail extends StatelessWidget {
  final int i;
  final BorderRadiusGeometry? borderRadius;
  const BugThumbnail(
    this.i, {
    Key? key,
    this.borderRadius,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Center(
        child: Text('$i', style: Theme.of(context).textTheme.headline1),
      ),
      width: double.infinity,
      height: MediaQuery.of(context).size.height - 120 + i * 20,
      decoration: BoxDecoration(
        borderRadius: borderRadius,
        color: Colors.teal[i * 100]!,
      ),
    );
  }
}

class BugInfo extends StatelessWidget {
  static final Color bgColor = Colors.blueGrey.shade900;

  final int i;
  const BugInfo(this.i, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(15),
        color: bgColor,
      ),
      padding: const EdgeInsets.fromLTRB(30, 20, 30, 20),
      child: Text(
        'ID: $i',
        style: Theme.of(context)
            .textTheme
            .bodyText2!
            .copyWith(color: Colors.white),
      ),
    );
  }
}

class BugHero extends Hero {
  const BugHero(
    int i, {
    required Widget child,
    HeroFlightShuttleBuilder? flightShuttleBuilder,
    Key? key,
  }) : super(
          key: key,
          child: child,
          tag: 'tag-$i',
          flightShuttleBuilder: flightShuttleBuilder,
        );
}

flutter doctor -v
[✓] Flutter (Channel master, 2.9.0-1.0.pre.93, on macOS 12.1 21C52 darwin-arm, locale en-GB)
    • Flutter version 2.9.0-1.0.pre.93 at /Users/mahesh/Documents/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1be7f1ea56 (13 days ago), 2021-12-14 22:14:07 -0500
    • Engine revision e444009bf4
    • Dart version 2.16.0 (build 2.16.0-109.0.dev)
    • DevTools version 2.9.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 60.1.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.61.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • Redmi K20 Pro (mobile) • <IP_ADDRESS>:5555 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)        • macos            • darwin-arm64   • macOS 12.1 21C52 darwin-arm
    • Chrome (web)           • chrome           • web-javascript • Google Chrome 96.0.4664.110

• No issues found!

[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale en-GB)
    • Flutter version 2.8.1 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (12 days ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 60.1.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.61.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • Redmi K20 Pro (mobile) • <IP_ADDRESS>:5555 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)        • macos            • darwin-arm64   • macOS 12.1 21C52 darwin-arm
    • Chrome (web)           • chrome           • web-javascript • Google Chrome 96.0.4664.110

• No issues found!


Add Gazebo multi-robot simulator and dependencies to nixpkgs

This is my first serious attempt at contributing, but I have plans for adding other packages as well. Please let me know if any changes are needed.

(Compiled it and is working, thanks) Travis fails because licence apache is called asl20

Awesome. I'll update the license setting.

@therealpxc do you also use yarp + gazebo-yarp-plugins? I've started porting yarp but libace is quite a mess, don't know where to start

I'm afraid I'm not familiar with yarp. We've not yet gotten very deep into a specific Gazebo workflow at my workplace. Right now we're just trying to get Nixy builds and continuous integration for PX4 and Gazebo. We're mostly looking to simulate quadcopters for now. What's yarp? I'd be happy to work on getting it packaged after we get initial support for some of this stuff, especially it might apply to my use case.
PS: I updated the meta information to be correct. :-)

We might have friends in those interested in #11713 as well. I'm not much interested in leading, but I'd be happy to work on a 'Nix robotics packages maintainers' team.

On the gist I linked (click on yarp on my previuous post), I already build it without ace. They say the function are limited though.

@nico202 What about the way Homebrew does it?

I'll try tomorrow (I think you need to rebase your commit. Travis failing because of this)

It's not continuing to fail, as far as I can tell. I just had to add that second commit. Am I mistaken?

yes my fault

Updated the descriptions for Gazebo and TinyXML-2. Thanks

Is KDE really required? I'd be interested in making this installable with Nix on OS X.

It only uses Qt. Qt is in the namespace kde4. Maybe I could change that line at the top.
I am also interested in getting this to work on OS X, but at present I don't have any hardware for testing on Darwin.

Are any further changes required?

Good work considering this is your first contribution to NixOS! :beers:
If you add the meta attributes mentioned in my comment above, I'll merge.

@the-kenny Because I want to package Gazebo for development as well as use, and future versions are being built upon the new release, which has just come out. We need to have a fully functional, ready-to-use version and also keep up with development.
At the time that I made ignition-math-2, it wasn't clear whether I would need any versions earlier than 2.x. The OSRF website is a bit out of date and obscures the current releases of the ignition libraries, so ignition-math-2 doesn't look like the current release at first glance. There's also a 1.x release of Ignition math, and the naming difference is reflected upstream. (Their binary release tarballs are called like ignition-math-12345.tar.gz, and then ignition-math2-45678.tar.gz, etc.)
I also don't yet know whether some other tools I want to package will depend on different versions of the Ignition libraries, since they're intended for general use.

@fpletz done! :-D

Oh, sorry, one more thing that hit me after reading @the-kenny's comments and your explanation:
Are these libraries intended for general use or are they just usable by or within gazebo? In the latter case it would probably make sense to give them their own attribute in all-packages.nix to group them like gitAndTools or gst_all. This keeps the global namespace clean. :wink:
What do you think?

At present, I am using them only in Gazebo, but the libraries are for general use. Later, I have plans to package ROS & ROS 2. When I do so, I might want to put all of the Open-Source Robotics Foundation projects into a single namespace, because then we will have genuinely many of them. Can I determine the preferred layout in a new PR for those additions when I get to them? I'm not sure I can know yet what the best structure is.

@fpletz What's the right way to separate these packages out into their own namespace? If it's not much work I'll just do it.

I've implemented a few improvements, including that one recommended in the comments here by @fpletz. I've made them in a new PR here (https://github.com/NixOS/nixpkgs/pull/14211), for reasons explained there.


Docker deployment of micro services, can not modify the registered address of docker-consul

I used docker to start a micro service, and started the docker-consul container, can not modify the registered address of consul.
Dockerfile
FROM ubuntu:latest

RUN mkdir /sms

WORKDIR /sms

ADD . /sms

CMD ["./sms"]

docker-compose.yml
sms:
    build: .
    environment:
        - MICRO_REGISTRY_ADDRESS=http://consul:8501
    volumes:
        - ./logs/:/sms/logs/
        - ./etc/env_strings.conf:/etc/env_strings.conf
    links:
        - consul
consul:
    image: progrium/consul

error message:
Attaching to sms_consul_1, sms_sms_1
consul_1  | ==> WARNING: It is highly recommended to set GOMAXPROCS higher than 1
consul_1  | ==> Starting Consul agent...
consul_1  | ==> Starting Consul agent RPC...
consul_1  | ==> Consul agent running!
consul_1  |          Node name: '70f340bc6eec'
consul_1  |         Datacenter: 'dc1'
consul_1  |             Server: false (bootstrap: false)
consul_1  |        Client Addr: <IP_ADDRESS> (HTTP: 8500, HTTPS: -1, DNS: 53, RPC: 8400)
consul_1  |       Cluster Addr: <IP_ADDRESS> (LAN: 8301, WAN: 8302)
consul_1  |     Gossip encrypt: false, RPC-TLS: false, TLS-Incoming: false
consul_1  |              Atlas: <disabled>
consul_1  |
consul_1  | ==> Log data will now stream in as it occurs:
consul_1  |
consul_1  |     2016/06/23 12:50:45 [INFO] serf: EventMemberJoin: 70f340bc6eec <IP_ADDRESS>
consul_1  |     2016/06/23 12:50:45 [WARN] serf: Failed to re-join any previously known node
consul_1  |     2016/06/23 12:50:45 [ERR] agent: failed to sync remote state: No known Consul servers
sms_1     | 2016/06/23 12:50:45 Listening on [::]:50573
sms_1     | 2016/06/23 12:50:45 Broker Listening on [::]:34602
sms_1     | 2016/06/23 12:50:45 Registering node: service.sms-F05AE48C
sms_1     | 2016/06/23 12:50:45 consul.watch: Watch (type: services) errored: Get http://<IP_ADDRESS>:8500/v1/catalog/services: dial tcp <IP_ADDRESS>:8500: getsockopt: connection refused, retry in 5s
sms_1     | time="2016-06-23T12:50:45Z" level=error msg="Put http://<IP_ADDRESS>:8500/v1/agent/service/register: dial tcp <IP_ADDRESS>:8500: getsockopt: connection refused"
sms_sms_1 exited with code 0

How should I solve this problem? thx :)

Have you tried not specifying http:// in the registry address?

Error messages that do not specify http:// are the same.
sms_1     | time="2016-06-23T13:44:18Z" level=error msg="Put http://<IP_ADDRESS>:8500/v1/agent/service/register: dial tcp <IP_ADDRESS>:8500: getsockopt: connection refused"

Where you have this - MICRO_REGISTRY_ADDRESS=http://consul:8501 change it to - MICRO_REGISTRY_ADDRESS=consul:8501

Wait. Your consul address is not different. How would this even work? It's still set to 8500.
Client Addr: <IP_ADDRESS> (HTTP: 8500, HTTPS: -1, DNS: 53, RPC: 8400)

okay. I try:)

There is still a problem.
sms_1     | 2016/06/23 14:00:22 consul.watch: Watch (type: services) errored: Get http://<IP_ADDRESS>:8500/v1/catalog/services: dial tcp <IP_ADDRESS>:8500: getsockopt: connection refused, retry in 5s
consul_1  |     2016/06/23 14:00:22 [WARN] Service name "service.sms" will not be discoverable via DNS due to invalid characters. Valid characters include all alpha-numerics and dashes.

Please specify your entire config. It's difficult to debug without having full context.

Here's a simple configuration that does work.
consul:
  command: -server -bootstrap -rejoin
  image: progrium/consul:latest
api:
  command: api
  build: .
  environment:
    - MICRO_REGISTRY_ADDRESS=consul:8500
  links:
  - consul

I think it should be a success.
log:
Creating sms_consul_1
Creating sms_sms_1
Attaching to sms_consul_1, sms_sms_1
consul_1  | ==> WARNING: It is highly recommended to set GOMAXPROCS higher than 1
consul_1  | ==> Starting Consul agent...
consul_1  | ==> Starting Consul agent RPC...
consul_1  | ==> Consul agent running!
consul_1  |          Node name: 'd93350097e77'
consul_1  |         Datacenter: 'dc1'
consul_1  |             Server: false (bootstrap: false)
consul_1  |        Client Addr: <IP_ADDRESS> (HTTP: 8500, HTTPS: -1, DNS: 53, RPC: 8400)
consul_1  |       Cluster Addr: <IP_ADDRESS> (LAN: 8301, WAN: 8302)
consul_1  |     Gossip encrypt: false, RPC-TLS: false, TLS-Incoming: false
consul_1  |              Atlas: <disabled>
consul_1  |
consul_1  | ==> Log data will now stream in as it occurs:
consul_1  |
consul_1  |     2016/06/23 14:23:11 [INFO] serf: EventMemberJoin: d93350097e77 <IP_ADDRESS>
consul_1  |     2016/06/23 14:23:11 [ERR] agent: failed to sync remote state: No known Consul servers


Grabbing multiple frames takes too long

Hello,
my ultimate goal here is to grab every frame from video file and apply some image processing, compute some values...
Frame grabbing part seems very difficult in UWP. Anyway I managed to grab individual pictures with FrameGrabber class:
(Link to full UWP project)
var currentFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/beru.wmv"));
var  stream = await currentFile.OpenAsync(FileAccessMode.Read);
var  frameGrabber = await FrameGrabber.CreateFromStreamAsync(stream);

//...
 int numOfFrames = (int)Math.Floor(mpe.MediaPlayer.PlaybackSession.NaturalDuration.TotalSeconds * 25);
 TimeSpan currentPosition = TimeSpan.Zero;

for (int i = 0; i < numOfFrames; i++)
{
   currentPosition += TimeSpan.FromMilliseconds(1000d / 25d);//every frame (fps is 25 for test video)
  var frame = await frameGrabber.ExtractVideoFrameAsync(currentPosition, true);
}

But it is slow (25 second for 12 sec video). Same task, with saving to file operation takes about 4 seconds with this ffmpeg command: ffmpeg -i beru.wmv -r 25 $filename%03d.bmp.
I red some old issues about FrameGrabber, but didn't find what I am doing wrong here..
Can I somehow speed up the process with full resolution?

Hi @tesar-tech,
yes, in your scenario, the current FrameGrabber will have very bad performance. The FrameGrabber was made for grabbing one or a few individual frames from specific positions, to create e.g. thumbnail images or seek preview images. It was not designed for grabbing consecutive frames.
Every call to ExtractVideoFrameAsync will involve a seek operation to that position, and a seek will flush all buffers. If you have a video file with frames K1, B1, B2, B3, B4, B5, K2 (where K are key frames, and B are bidirectional frames which depend on previous frames), then to grab B3 the lib will seek to K1, decode K1, B1, B2 and B3, then return B3. If you then grab B4, it will again seek to K1, decode B1, B2, B3, B4 and return that. Obviously that will give you pretty horrible performance.
To grab consecutive frames with good performance, we'd instead need a new API like ExtractNextVideoFrameAsync, which would just grab the next frame from wherever we are right now. That would mean no seek and no duplicate frame decoding. It would also save you from trying to calculate video positions (which might get wrong at some point, and some videos have gaps in timestamps). We could add a Timestamp to the VideoFrame class, so you know where you are right now.
I think it should be pretty easy to add the new API. I will see if I can do a PR in the next days.

Actually, it was so easy that the PR is already there. Please try again with FrameGrabber.ExtractNextVideoFrameAsync() and let me know if you get the performance you expect.
If you want to squeeze out the maximum performance, you can pass in an IBuffer which will receive the raw pixel data (use widthheight4 as buffer size, format is Bgra8). This avoids any copy operation, the frame is decoded directly into that IBuffer.
If you want to seek in the file, you can use the old ExtractVideoFrameAsync to seek and get the first frame, then call ExtractNextVideoFrameAsync to continue decoding from there.

I think using a read-only video filter is faster.

Implementing a native FFmpeg video filter sure would be a way to accomplish what you want. But it would probably be a lot more work, and I don't believe that it will be really any faster. When you use the IBuffer overload, the new method has practically zero overhead. FFmpeg will directly decode into the IBuffer.
The only way how you could really further improve speed is by removing the Bgra color space conversion that currently happens in the FrameGrabber path. Then your code would have to work in the native color space of the video file (which is YUV420P for most codecs). That would be a difficult task I guess.

I was thinking more of using winRT video filter in read-only mode. It was implemented to support this kind of scenario.
But as I took another look at this, you are right. The current has virtually no overhead and would probably be faster anyway, since we cannot know for sure what MF does under the hood.

Oh yes, that's one more option. Lots of ways to do this...

Thank you for your quick response, useful explanation and immediate "fix".
Now It is approx 16 times faster and its able to get all (300) frames in 1.5 seconds (with test video 512x288 px and 12 sec duration).
Neat!


FSharpCompiler.SourceCodeServices.FSharpChecker.ParseFile is slow due to trace

Upon doing a performance investigation of Fantomas I found that FSharpCompiler.SourceCodeServices.FSharpChecker.ParseFile tracing takes a long time on net framework targets.
Repro steps
run the following code in a console app
Get the source file
https://raw.githubusercontent.com/fable-compiler/fable-recharts/master/sample2/src/Charts.fs
async {
  let parsingOptions =
  {{ SourceFiles = [|"/tmp.fsx"|]
    ConditionalCompilationDefines = []
    ErrorSeverityOptions =
                         { WarnLevel = 3
                           GlobalWarnAsError = false
                           WarnOff = []
                           WarnOn = []
                           WarnAsError = []
                           WarnAsWarn = [] }
    IsInteractive = false
    LightSyntax = None
    CompilingFsLib = false
    IsExe = false }}
    CompilingFsLib: false
    ConditionalCompilationDefines: Length = 0
    ErrorSeverityOptions: {{ WarnLevel = 3
    GlobalWarnAsError = false
    WarnOff = []
    WarnOn = []
    WarnAsError = []
    WarnAsWarn = [] }}
    IsExe: false
    IsInteractive: false
    LightSyntax: null
    SourceFiles: {string[1]}
  let sourceText = FSharp.Compiler.Text.SourceText.ofString source
  let! untypedRes = checker.ParseFile("/tmp.fsx", sourceText, parsingOptions)
}

Expected behavior
Trace logging / diagnostics should not take much time (<10 ms)
Actual behavior
Notice that tracing in jetbrains dotTrace shows that TraceEvent method takes a lot of time.

Related information

Win 10 x64
dotnet framework 4.6.1
FSharp.Compiler.Services 31.0.0

Can you replicate and report on the upstream repo, dotnet/fsharp? This repo doesn't get new features/fixes directly, it absorbs them from that repository.

@baronfel thanks for letting me know. I was a bit confused about the purpose of this repo

Ive created
https://github.com/dotnet/fsharp/issues/7669


MSL attributes/resources override

TODO:

[x] wrapper level support
[x] expose to Rust
[x] dogfood verify
[x] tests/examples

@kvark Thanks! I'll try to test this later but it looks like the CI failures are legitimate - we get buffer(0) instead of buffer(5) (except for Windows/GNU 😕). I guess SPIRV-Cross doesn't copy the structs and they're freed from Rust before use in compile?
We could try to keep them alive on the Rust side or copy them on the C++ side. We could replace ParserOptions with set_{resource_binding|vertex_attribute}_overrides on the Rust side as discussed, this would add them to the compiler struct. Later we would pass them into compile (without copy).


Diff tool will not identify tabs additions if there is any real code change

VSCode Version: 1.3.0-insiders
OS Version: Windows 10

Steps to Reproduce:

Put some tabs before code like below

Add some real code change

With this tiny bug, you might check in additional tabs/control characters (this happens a lot when your editor has auto-format turned on) blindly and people might don't love you any more :cry:

Let's track in #18353


[Query] Multi-agent with human in loop at every step

I am trying to create a hierarchical crew with 3 agents for chatbot, the main agent should route the interaction of the human to the other 2 agents based on the human inputs (chat messages).
Also, the other 2 agents should take human input at each step of the process to find out what the human wants.
front = Agent(
    role='Front Agent',
    goal='...',
    verbose=True,
    memory=True,
    backstory=(
        "..."
    ),
    tools=[]
)

second = Agent(
    role='Second Agent',
    goal='...',
    verbose=True,
    memory=True,
    backstory=(
        "..."
    ),
    tools=[]
)

third = Agent(
    role='Third Agent',
    goal='...',
    verbose=True,
    memory=True,
    backstory=(
        "..."
    ),
    tools=[]
)

front_task = Task(
    description=(
        "Interact with the customer to determine if their request"
    ),
    expected_output=(
        "A decision on whether the customer's request is for first agent or second,"
        "and delegation to the respective agent."
    ),
    agent=front,
    human_input_required=True,
    human_input_instructions="..."
)

second_task = Task(
    description=(
        "Ask the customer relevant questions to understand their"
    ),
    expected_output=(
        "A detailed list of the customer's requirements and preferences"
    ),
    agent=second,
    human_input_required=True,
    human_input_instructions="..."
)

third_task = Task(
    description=(
        "Ask the customer relevant questions to understand"
    ),
    expected_output=(
        "A detailed list of the customer's service requirements"
    ),
    agent=third,
    human_input_required=True,
    human_input_instructions="..."
)

# Create Crew
my_crew = Crew(
    agents=[front, second, third],
    tasks=[front_task, second_task, third_task],
    process=Process.sequential,
    human_input=True
)

# Kick off the crew with a sample input
result = my_crew.kickoff()
print(result)

In this, the agent is not stopping to get any inputs from the user. What I am missing here?

3 immediate issues Im seeing.

You say you are trying to create a hierarchical crew but you have configured the crew process as sequential
You are using the following parameters in your tasks:
human_input_required
human_input_instructions

These are not valid parameters for the task class, you need human_input= True
3. You are defining human_input=True on your crew instance, this is not correct and should only be on your tasks, see the docs - https://docs.crewai.com/how-to/Human-Input-on-Execution/

Thanks for the quick response, @theCyberTech.
However, I am still facing issues. PFB the changed code. I want the front agent to ask the human to select either second or third agent.
And at every step I am expecting the human input.
front = Agent(
    role='Front Agent',
    goal='...',
    verbose=True,
    memory=True,
    backstory=(
        "..."
    ),
    tools=[]
)

second = Agent(
    role='Second Agent',
    goal='...',
    verbose=True,
    memory=True,
    backstory=(
        "..."
    ),
    tools=[]
)

third = Agent(
    role='Third Agent',
    goal='...',
    verbose=True,
    memory=True,
    backstory=(
        "..."
    ),
    tools=[]
)

front_task = Task(
    description=(
        "Interact with the customer to determine if their request"
    ),
    expected_output=(
        "A decision on whether the customer's request is for first agent or second,"
        "and delegation to the respective agent."
    ),
    agent=front,
    human_input=True
)

second_task = Task(
    description=(
        "Ask the customer relevant questions to understand their"
    ),
    expected_output=(
        "A detailed list of the customer's requirements and preferences"
    ),
    agent=second,
    human_input=True
)

third_task = Task(
    description=(
        "Ask the customer relevant questions to understand"
    ),
    expected_output=(
        "A detailed list of the customer's service requirements"
    ),
    agent=third,
    human_input=True
)

# Create Crew
my_crew = Crew(
    agents=[front_desk_agent, sales_agent, service_agent],
    tasks=[front_desk_task, sales_task, service_task],
    manager_llm=ChatOpenAI(temperature=0, model="gpt-4"),  # Mandatory if manager_agent is not set
    process=Process.hierarchical,  # Specifies the hierarchical management approach
    memory=True,  # Enable memory usage for enhanced task execution
    manager_agent=None,  # Optional: explicitly set a specific agent as manager instead of the manager_llm

)

# Kick off the crew with a sample input
result = my_crew.kickoff()
print(result)

Ok, I have some suggestions but we are better off taking this to discord if that's ok?
IF you could raise a support post I can respond there in detail

Sure. I will post it there.
Thanks, @theCyberTech

hello, guys!
I'm currently trying to implement the same flow in my project
could you please share how did you solve it?


[Micro-service] Node Manager

Node Manager (Part I) manages host (node) information.  Here is the brief description of node manager:

Node management functions: create, get, list, allocate, update, delete

Node manager acquires nodes' information using two options:

(Option 1) Reading a configuration file (e.g. machine.json)
(Option 2) Interact with ignite repository

Data Format : JSON

Deployment: Update Application.properties and POM file

Test: JUNIT test cases to test REST APIs

We have merge conflicts here.

We have merge conflicts here.

Hi @kimeunju108 , didn't see update since the last check-in. Could you push your latest change here? Thanks.


Change device prefix to mobile for mobile events?

With https://github.com/open-telemetry/semantic-conventions/pull/473 the event.domain and event.name are merged into a single field, where event.domain becomes a prefix.
So new event names for the mobile space will be something like device.app.lifecycle.
I'm wondering why we are using the device namespace for things that are mobile-related. Device can stand for anything, while we explicitly target mobile devices here.
How about changing the device prefix to mobile so the event name would be something like mobile.app.lifecycle ?
@open-telemetry/semconv-mobile-approvers WDYT?
To be clear: I am NOT proposing to change the device resource attributes, though!

I wasn't part of the decision to use device as a way to identify mobile events so I couldn't tell for sure what's the reasoning behind it, however, one thing that comes to my mind would be that, at least for Android, you can run apps on TVs too, so it might not be fully correct to call them "mobile devices", however, I also don't think it would be too confusing to do so since I guess people should understand that, when we refer to "mobile", we're talking about Android OS and iOS, so I don't have strong opinions for not making the change, though it would probably be nice to have some description in the docs that explains what "mobile" means in this context.

Hey all, any change in this subject? Are any of you interested in proposing the changes for this?


defaultReadN should be documented as intended for single-threaded use

This is a very minor issue, but it might be good to document that defaultReadN is intended for single-threaded usage only. (In http2 this is the case because it's only the frame receiving thread that is using it.)

Good point.
A PR is welcome!


ValidationError is not thrown out correctly with get_pydantic method

Description
According to the documentation I noticed that the ValidationError is not thrown out correctly if models generated with get_pydantic are used in FastAPI requests.
Example:
class EnumExample(str, enum.Enum):
    A = 'A'
    B = 'B'
    C = 'C'

class ModelExample(ormar.Model):
    class Meta(ormar.ModelMeta):
        database = database
        metadata = metadata
        tablename = "examples"

    id: int = ormar.Integer(primary_key=True)
    str_field: str = ormar.String(min_length=5, max_length=10, nullable=False)
    enum_field: str = ormar.String(max_length=1, nullable=False, choices=list(EnumExample))

    @pydantic.validator('str_field')
    def validate_str_field(cls, v):
        if ' ' not in v:
            raise ValueError('must contain a space')
        return v

ModelExampleCreate = ModelExample.get_pydantic(exclude={'id'})

@app.post("/examples/", response_model=ModelExample)
async def create_example(example: ModelExampleCreate):
    return await ModelExample(**example.dict()).save()

Result:
Client receives an Internal Server Error, the ValidationError is only output in the error log.
  File "/home/vscode/.local/lib/python3.9/site-packages/ormar/models/newbasemodel.py", line 143, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for ModelExample
__root__
  enum_field: 'D' not in allowed choices set: ['A', 'B', 'C'] (type=value_error)

  File "/home/vscode/.local/lib/python3.9/site-packages/ormar/models/newbasemodel.py", line 143, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for ModelExample
str_field
  must contain a space (type=value_error)

Expected result:
Client receives the ValidationError.
Note:
Everything goes as expected with the original model:
@app.post("/examples/", response_model=ModelExample)
async def create_example(example: ModelExample):
    return await example.save()

Versions:

ormar 0.10.20
pydantic 1.8.2
fastapi 0.68.2

Many thanks for your effort. I can confirm that the custom validators now also work with generated models. :+1:
I have one more question: It looks like the built-in choices validators that previously worked on the original models have been removed (see first post). Both variants, the original model and the generated model, no longer validate automatically. Is that the default behavior now?

Fixed in 0.10.22, thanks for catching that!


New Extension: Kinopio

Description
Hi, this adds a new extension for https://kinopio.club, that lets users add text cards to their kinopio inbox
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hi @pketh 👋
I tested it and can't get it to save

Just getting
13:12:48.636 🚒 HTTPError: Response code 404 (Not Found)
    at Request.<anonymous> (/extensions/kinopio-inbox/add-card.js:5890:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start:<PHONE_NUMBER>960,
    socket:<PHONE_NUMBER>961,
    lookup:<PHONE_NUMBER>997,
    connect:<PHONE_NUMBER>110,
    secureConnect:<PHONE_NUMBER>234,
    upload:<PHONE_NUMBER>235,
    response:<PHONE_NUMBER>611,
    end:<PHONE_NUMBER>620,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 1,
      dns: 36,
      tcp: 113,
      tls: 124,
      request: 1,
      firstByte: 376,
      download: 9,
      total: 660
    }
  }
}

Hi @pernielsentikaer to help me debug, can you let me know whether you signed up for a kinopio.club account and entered the apikey when you first ran the extension? Or if you put in a random string as your apikey, I could add better error messaging around that case too.
thx

hey @pernielsentikaer ,
I fixed this with server side changes, as well as adding better error logging/messaging. Can you update and try this again? Thanks!

Bumping this up because I haven’t heard anything in 2 weeks,

Checking, was waiting for a Request for Review 😊

Hi @pketh 👋
Still not working out for me; getting this error:
07:30:26.570 🎑 { name: 'HELLO FROM RAYCAST' }
07:30:27.055 🐸 response https://api.kinopio.club/card/to-inbox 404 {
  status: 404,
  message: 'inbox space not found for user',
  user: {

That’s working as designed , your kinopio account needs an inbox space which you can create from Kinopio via new ->

by default new accounts once they sign up do have inbox spaces (which I just confirmed myself by making a new test account ). That said the inbox is optional for kinopio users and can be removed like any other space , hence the error msg

In case that’s not the source of the error you’re seeing can you let me know if the user object in the error output you pasted above has keys or if it’s an empty object?

I just send you an e-mail with the complete log 😊

Hey @pernielsentikaer , I just updated your account to add an Inbox space (I just renamed your hello kinopio default space). Can you try it again?
On my end, I'll investigate why the inbox space wasn't created by default for you

Checking, was waiting for a Request for Review 😊

I can't figure out how to add this. Is it a label? It doesn't look like I'm able to add labels to issues in this repo

Thanks!


Data compression of OpenVpn in SoftEtherVpn

Can you add this feature?

compression is deprecated, have a look
https://docs.openvpn.net/phasing-out-compression-due-to-voracle-vulnerability/

Is the similar attack probable on Softether VPN's traffic compression function? Because the VORACLE attack seems very similar to general case SSL chosen plaintext attack like CRIME and BREACH. I don't mean to disturb, but this is kind of worrying to me.


./src/emitter no longer exists

This plugin no longer loads when nodebb is starting, and gives the following error:
2018-12-18T17:11:56.526Z [4567/25413] - error: Error: Cannot find module './src/emitter'
inside the nodebb.js file.

Discovered fix, #26

The plugin was configured to work with v1.5 and higher. It was a matter of time when NodeBB will introduce a breaking minor version.

I'm going to do extra small changes and release the compatible version with NodeBB v1.11.x


Replied To # is not updating in real time

Log into A and B in two windows
in A open a thread from parent report (1)
in B keep open parent report (1)
have A add comments to thread report.
notice that B's view does not update in real time. Very delayed
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01cf958b1270e518df
Upwork Job ID:<PHONE_NUMBER>220824064
Last Price Increase: 2023-05-17

closing, not reproducible anymore!


How to handle country specific phone number variations ? (ex: prefix zero in some countries)

In France for instance, phone numbers are usually written as:
06 65 11 22 33
The valid equivalent to this number is:
+336 65 11 22 33
Now with react-native-international-phone-number if a user selects France as a country, it will automatically prefix +33 in front of the number. However, not everybody will know that they have to remove the zero prefix when they see +33.
So in my case, I sometimes end up with this number being saved to the database:
+3306 65 11 22 33
Is there a way to handle this kind of country specific variations in user input ? I don't know what variations exist in each country so I'm wondering if this library has something doing this.
I think ideally it would detect that a zero has been inserted, and put it in parenthesis like so:
+33(0)6 65 11 22 33 -> On the user interface
+336 65 11 22 33 -> Saved to the DB

Hey @gkpo! Thanks for your issue, an interesting point that I wasn't aware of...
I will think about a solution soon...
But, for now..you can remove the 0 (usying substring method) if the phoneNumber started with 0 before saving to your DB.
🚀 AstrOOnauta 🚀

Yes, that's what I ended up doing :) thanks for your work!

@AstrOOnauta Thank you for the great library. I would like to add my vote to implement the option to remove zeros inserted between the country code and the local phone number. Some other libraries provide this feature as a method.
Example 1:
https://github.com/thegamenicorus/react-native-phone-input/blob/43d935639a7806b25a9fef15be6c9f6fcd8c88b4/lib/index.js#L166
Example 2:
https://github.com/garganurag893/react-native-phone-number-input/issues/20#issuecomment-1975505529

Thank you for adding the property allowZeroAfterCallingCode. However, I am not sure how it works!?
When this property is set to true, I expected onChangePhoneNumber to remove the leading zero before sending the value to the relevant callback function. Example:
<PhoneInput
   allowZeroAfterCallingCode={true}
   value={state.phoneNo}
   onChangePhoneNumber={(value) => {
       console.log("value:", value, ); // value should NOT include the leading zero
       // ......
   }}
/>

Moreover, I expected the mask to allow a leading zero, in addition to the significant digits. So, mask would allow 0123 and 123.
For users reading this, I use a workaround by specifying a custom mask customMask={[ "04## ### ###", "4## ### ###", ]}, and removing the leading zero manually inside the callback function.

Hey @Bilal-Abdeen, sorry for my late.
The props allowZeroAfterCallingCode works like you send me in this comment (Example 1).
So, if this props  is TRUE ...the mask allow 0123 and 123. But is  this props is FALSE, the mask allow only 123 (without 0 after the calling code).
I release a new version with this solution. So, please, update your lib for the latest version v.0.8.1.
Let me know if this solve your issue.
🚀 AstrOOnauta 🚀

@AstrOOnauta Thank you for the change. Setting this property affects the value sent to the callback onChangePhoneNumber. This is good.
However, it seems that the masks defined in the library do NOT know that they need to accept a prefix of zero! In effect, the mask wrongly shortens the allowed number of digits. Please check the example below.
Using the default country US and using allowZeroAfterCallingCode={true}
user enters the phone number: 0123 456 7891
the component wrongly masks the value to: 0123 456 789 - the last digit is removed
I had to go back to the previous release. With this release, my workaround (below) does NOT work any more! :(

using custom mask customMask={[ "04## ### ###", "4## ### ###", ]}, and
removing the leading zero manually inside the callback function.

I strongly suggest un-publishing this release 0.8.1.

Now, I understand your point @Bilal-Abdeen !!
I will fix it soon..sorry about that.

Hey @Bilal-Abdeen, I release a new version with a new solution. So, please, update your lib for the latest version v.0.8.2 and let me know if this solve your issue.
Now, the props allowZeroAfterCallingCode is true by default.
🚀 AstrOOnauta 🚀

@AstrOOnauta It works perfectly!
However, it seems that cusomMask property does NOT work anymore!? The correct mask for Australian mobile numbers follows. It stopped working. The default mask (from the library) is used, and my custom mask is ignored.
customMask={[ "04## ### ###", "4## ### ###", ]}

@AstrOOnauta It works perfectly!
However, this can be considered a breaking change! I suggest clarifying this in the readme file.
To allow a prefix of zero, my code was using customMask={[ "04## ### ###", "4## ### ###", ]} as a workaround . This stopped working. For my code to work with the use of the new allowZeroAfterCallingCode, I need to use  customMask={[ "4## ### ###", ]}. It seems that the prefix of a zero cannot be used in the mask anymore.
By the way, the correct mask for Australian mobile phone numbers is "4## ### ###", and not the one in the library .

It's good to know that this has been resolved @Bilal-Abdeen !
I will think about in your suggest to README file, nice point.
And I will fix the Australian mobile phone number mask, thanks...next version this will be up!
🚀 AstrOOnauta 🚀


 displays 'No type:' when exceptions are thrown

Actual

<PatternSection> displays 'No type:'
See the attached screenshot

Expected

<PatternSection> displays the the <PatternLoader> with red dot

Steps to reproduce

Invalidate a pattern by making pattern.json or any source file invalid (syntax errors, etc.)
Navigate to the affected pattern

This issue was moved to sinnerschrader/patternplate#29


Handle time conversions from constants.

We use 2 different clocks, TimestampClock and DurationClock. They are aliases for std::chrono::system_clock and std::chrono::steady_clock. I created a wrapper around these clocks to make them easier to work with. E.g: #134,
I had 2 assumptions in mind when writing these classes.
First, the DurationClock and TimestampClock have the same precision. This caused a bug on a system in which this didn't hold. I fixed it in #145 by casting the duration from one clock to the other.
My second assumption was that the clocks always are in the nanoseconds precision. The second bug happens in this code:
class Timestamp {
 public:
  static Timestamp FromNanoseconds(int64_t nanos) {
    return Timestamp(
        TimestampClock::time_point(TimestampClock::duration(nanos)));
  }

  Timestamp(TimestampClock::time_point timestamp) : timestamp_{timestamp} {}

  int64_t ToNanoseconds() const {
    return std::chrono::nanoseconds(timestamp_.time_since_epoch()).count();
  }

 private:
  TimestampClock::time_point timestamp_;
};

The Timestamp class is a wrapper around a TimestampClock. It has a FromNanoseconds() factory method that receives an input and stores it in the underlying TimestampClock::time_point variable assuming the TimestampClock has a nanoseconds precision. That is why this line of test fails in a system that has a different clock.
https://github.com/google/vulkan-performance-layers/blob/main/layer/unittest/trace_event_log_tests.cc#L198

Knowing more about time_point, duration, and clock helps solve this problem.
chrono::time_point: Is a point in time. It stores a duration type value indicating the time since the clock's epoch.
chrono::duration: Holds the number of ticks, where the tick period is a compile-time rational fraction representing the time in seconds from one tick to the next.
clock: Is a bundle containing a time_point and a duration. The origin of the clock's time_point is referred to as the clock's epoch.
To create a time_point from a number, we should create a TimestampClock::duration. The given number is used to set the ticks of the duration variable of the time_point.  Since we want this number to represent a duration in nanoseconds, the period of the duration must be in nanoseconds. The problem with the current FromNanoseconds is that the TimestampClock can vary from one system to another. Hence, the result will not always be a duration in nanoseconds precision.
To fix this issue, we could write something like this:
std::chrono::nanoseconds duration_ns{nanos};

To create a time_point from the duration_ns, we must convert the ticks in duration_ns into the ticks in a TimestampClock::duration.  To do that, we have to explicitly cast the duration; otherwise, the implicit cast leads to a compile time error when the precision of the TimestampClock::duration is less than nanoseconds. The explicit cast tells the compiler we are aware of the possible data loss.
TimestampClock::duration casted_dur = std::chrono::duration_cast<TimestampClock::duration>(duration_ns);

Now that we have a duration in TimestampClock::duration, we can create a TimestampClock::time_point from it.
 TimestampClock::time_point timestamp(casted_dur);

A sample code for different casting scenarios: https://godbolt.org/z/5cEEoGdon
references:

https://en.cppreference.com/w/cpp/chrono/time_point
https://en.cppreference.com/w/cpp/chrono/duration
https://en.cppreference.com/w/cpp/named_req/Clock


Fix file name in the example code

Category

[x] Content fix
[ ] New article

What's in this Pull Request?
Fix file name in the example code.

Docs Build status updates of commit c880967:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/spfx/toolchain/extending-webpack-in-build-pipeline.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

thx @AriGunawan, appreciated.


refactor: improve OpenTelemetry configuration

Description

This change fixes some inconsistencies in how the Python SDK handles the configuration API for its OpenTelemetry support. These changes should improve the developer experience and general usage of the feature.

We can now permit a dict-style configuration to be provided, similar to how we support JSON-style approaches in some of the other SDKs.

Current behavior expects classes to be supplied:
from openfga_sdk.telemetry.configuration import (
    TelemetryConfiguration,
    TelemetryMetricConfiguration,
    TelemetryMetricsConfiguration,
)
from openfga_sdk import ClientConfiguration, OpenFgaClient

configuration = ClientConfiguration(
    telemetry=TelemetryConfiguration(
        metrics=TelemetryMetricsConfiguration(
            histogram_request_duration=TelemetryMetricConfiguration(
                attr_fga_client_request_method=True,
                attr_http_response_status_code=True,
            ),
        ),
    ),
    # ...
)

fga = OpenFgaClient(configuration)

After this change, a dict configuration can be provided instead:
from openfga_sdk.telemetry.configuration import (
    TelemetryConfiguration,
    TelemetryMetricConfiguration,
    TelemetryMetricsConfiguration,
)
from openfga_sdk import ClientConfiguration, OpenFgaClient

configuration = ClientConfiguration(
    telemetry=TelemetryConfiguration({
        metrics: {
            fga_client_credentials_request: {
                fga_client_request_method: True,
                http_response_status_code: True,
            },
        },
    ),
    # ...
)

fga = OpenFgaClient(configuration)

The naming convention of metrics has been updated to more closely match the actual naming used in the counters and histograms created by the SDK rather than aliases. For example, fga_client_credentials_request instead of histogram_request_duration for the fga-client.credentials.request histogram.

counter_client_credentials -> fga_client_credentials_request
histogram_request_duration -> fga_client_request_duration
histogram_query_duration -> fga_client_query_duration

This makes the configuration more self-expressive and offers a better experience, particularly for the dict style configuration.

This removes the attr_ prefix from attribute names on TelemetryMetricConfiguration, which makes for a cleaner-looking API in real-world usage.

attr_fga_client_request_client_id -> fga_client_request_client_id

By adding an is_enabled helper method to the TelemetryMetricConfiguration class, we will reduce the number of instances of redundant code that check whether a particular metric should be used when metrics are being written.

metric = TelemetryMetricConfiguration()

metric.is_enabled() # False, as nothing is enabled.

metric.fga_client_request_method = True

metric.is_enabled() # True, as `fga_client_request_method` is enabled.

Adds is_valid helper method. This will verify the configuration is valid and (optionally) raise an exception if it is not. is_enabled leverages this without raising the exception to ensure the configuration is fully ready for use.

metric = TelemetryMetricConfiguration(
    attr_fga_client_request_method=True,
    attr_http_response_status_code=True,
)

metric.is_valid(fatal: True) # Raises an exception if there is a misconfiguration of some kind.

Right now, the configuration's default state is established at initialization time. While this avoids having to have a separate default state scaffolding, it means that unless each attribute is expressly assigned a boolean during initialization, it will be assigned its SDK-supplied default state, which is not ideal.

This means if an application sets:
config = TelemetryMetricConfiguration(
    attr_fga_client_request_method=True,
    attr_http_response_status_code=True,
),

Internally, config will represent this state:
attr_fga_client_request_method=True,
attr_http_response_status_code=True,

# Still inherits the default states of these
attr_fga_client_request_client_id=True,
attr_fga_client_request_model_id=True,
attr_fga_client_request_store_id=True,
attr_fga_client_response_model_id=True,
attr_fga_client_user=False,
attr_http_client_request_duration=False,
attr_http_host=True,
attr_http_request_method=True,
attr_http_request_resend_count=True,
attr_http_server_request_duration=False,
attr_url_scheme=True,
attr_url_full=True,
attr_user_agent_original=True,

These changes update the configuration to default to False, so in the case of:
config = TelemetryMetricConfiguration(
    fga_client_request_method=True,
    http_response_status_code=True,
),

It's state will be:
attr_fga_client_request_method=True,
attr_http_response_status_code=True,

# Still inherits the default states of these
attr_fga_client_request_client_id=False,
attr_fga_client_request_model_id=False,
attr_fga_client_request_store_id=False,
attr_fga_client_response_model_id=False,
attr_fga_client_user=False,
attr_http_client_request_duration=False,
attr_http_host=False,
attr_http_request_method=False,
attr_http_request_resend_count=False,
attr_http_server_request_duration=False,
attr_url_scheme=False,
attr_url_full=False,
attr_user_agent_original=False,

References

Review Checklist

[x] I have clicked on "allow edits by maintainers".
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected

Codecov Report
Attention: Patch coverage is 81.18812% with 38 lines in your changes missing coverage. Please review.

Project coverage is 69.16%. Comparing base (e2ce832) to head (44c8a47).

Files with missing lines
Patch %
Lines

openfga_sdk/telemetry/configuration.py
81.04%
29 Missing :warning:

openfga_sdk/telemetry/attributes.py
65.00%
7 Missing :warning:

openfga_sdk/telemetry/metrics.py
90.47%
2 Missing :warning:

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #127   +/-   ##
=======================================
  Coverage   69.16%   69.16%
=======================================
  Files         121      121
  Lines        9982    10019   +37
=======================================
+ Hits         6904     6930   +26
- Misses       3078     3089   +11

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


merge from arlac77/npm-package-template

package.json

chore(package<EMAIL_ADDRESS>chore(scripts): cover@#overwrite c8 -x 'tests/**/*.mjs' --temp-directory build/tmp ava && c8 report -r lcov -o build/coverage --temp-directory build/tmp
chore(package): set $.ava.require='esm' as in template
chore(package): set $.ava.files='tests/*-test.mjs' as in template
chore(package): set $.ava.extensions='mjs' as in template

Coverage remained the same at 98.438% when pulling fcbaf41c6152bb65c380880c9f8abee52dd71d4b on npm-template-sync/1 into a47793634e9678ed783a012b5f05e3d551782b8d on master.

Coverage remained the same at 98.438% when pulling fcbaf41c6152bb65c380880c9f8abee52dd71d4b on npm-template-sync/1 into a47793634e9678ed783a012b5f05e3d551782b8d on master.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[Bug]: copy_to_directory execution-time performance issues

What happened?
Hi,
This is a follow-up to https://github.com/aspect-build/bazel-lib/issues/258. The analysis-time performance issues were addressed by https://github.com/aspect-build/bazel-lib/commit/350408b93d3d4f714f287beebdb4581a7d3ef13e (thank you!), but the execution-time performance is still problematic. I wanted to raise this to track that.
The problem is that the copy_to_directory is generally slow and particularly slow on MacOS. The wall time on our build went up after moving from rules_nodejs to rules_js, mainly because of copy_to_directory. It seems that any non-trivial folder (i.e. a library) is going to block for anything from 2s to 10s on this action (and more on MacOS). This seems problematic for rules_js users in general as copy_to_directory is in the critical path of any change in a linked npm_package, which seems like a path that needs to be as fast as possible for the UX around a developer making local changes and ibazel rebuilding those to work.
copy_to_directory generates a bash script which is invoked through ctx.actions.run_shell. The script, in my case looks like:
if [[ ! -e "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-pref-service/user-pref-service.js" ]]; then echo "file 'bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-pref-service/user-pref-service.js' does not exist"; exit 1; fi
if [[ -f "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-pref-service/user-pref-service.js" ]]; then
    mkdir -p "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-pref-service"
    cp -v -n "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-pref-service/user-pref-service.js" "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-pref-service/user-pref-service.js" >> "$OUT_CAPTURE" 2>>"$OUT_CAPTURE"
else
    if [[ -d "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-pref-service/user-pref-service.js" ]]; then
        # When running outside the sandbox, then an earlier copy will create the dst folder
        # with nested read-only folders, so our copy operation will fail to write there.
        # Make sure the output folders are writeable.
        find "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-pref-service/user-pref-service.js" -type d -print0 | xargs -0 chmod a+w
    fi
    mkdir -p "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-pref-service/user-pref-service.js"
    cp -v -R -n "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-pref-service/user-pref-service.js/." "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-pref-service/user-pref-service.js" >> "$OUT_CAPTURE" 2>>"$OUT_CAPTURE"
fi

if [[ ! -e "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/index.js" ]]; then echo "file 'bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/index.js' does not exist"; exit 1; fi
if [[ -f "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/index.js" ]]; then
    mkdir -p "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service"
    cp -v -n "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/index.js" "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/index.js" >> "$OUT_CAPTURE" 2>>"$OUT_CAPTURE"
else
    if [[ -d "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/index.js" ]]; then
        # When running outside the sandbox, then an earlier copy will create the dst folder
        # with nested read-only folders, so our copy operation will fail to write there.
        # Make sure the output folders are writeable.
        find "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/index.js" -type d -print0 | xargs -0 chmod a+w
    fi
    mkdir -p "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/index.js"
    cp -v -R -n "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/index.js/." "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/index.js" >> "$OUT_CAPTURE" 2>>"$OUT_CAPTURE"
fi

if [[ ! -e "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/mock-user-service-providers.js" ]]; then echo "file 'bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/mock-user-service-providers.js' does not exist"; exit 1; fi
if [[ -f "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/mock-user-service-providers.js" ]]; then
    mkdir -p "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service"
    cp -v -n "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/mock-user-service-providers.js" "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/mock-user-service-providers.js" >> "$OUT_CAPTURE" 2>>"$OUT_CAPTURE"
else
    if [[ -d "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/mock-user-service-providers.js" ]]; then
        # When running outside the sandbox, then an earlier copy will create the dst folder
        # with nested read-only folders, so our copy operation will fail to write there.
        # Make sure the output folders are writeable.
        find "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/mock-user-service-providers.js" -type d -print0 | xargs -0 chmod a+w
    fi
    mkdir -p "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/mock-user-service-providers.js"
    cp -v -R -n "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/src/lib/user-service/mock-user-service-providers.js/." "bazel-out/darwin_arm64-fastbuild/bin/libs/generic/generic/src/lib/user-service/mock-user-service-providers.js" >> "$OUT_CAPTURE" 2>>"$OUT_CAPTURE"
fi

You can see how dong all these checks and bash program invocations serially, and each blocking, and spawning a subprocesses, would get very slow for non-trivial directories. I'm fairly confident that if, rather than using bash, copy_to_directory called out to a go or js program that used non-blocking I/O and could do the work in parallel (not to mention not spawning subprocesses), the performance would be on a different level.
Of course, another question is whether any of this logic can be short-circuited and circumvented. It looks like some of the logic is long the lines of "if the src is a directory, do this, if the src is a file, do that", but doesn't bazel know at analysis time whether these inputs are files or directories (at least assuming no TreeArtifact inputs, which itself feels like an edge case to me)?
I'm keen to help with the implementation of this. It feels like the first step is just figuring out what direction(s) to take.
Version
Development (host) and target OS/architectures:
Output of bazel --version:
6.0.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
1.18.0
Language(s) and/or frameworks involved:
How to reproduce
No response
Any other information?
No response
Fund our work

[ ] Sponsor our open source work by donating a bug bounty

Performance improvements all landed and released in the v1.23.3. release


Can not remove user

Hello team
Scenario
I tried to delete a user via admin web page, but got an error.
The target user is not admin.
2020-03-01T13:43:30.559Z crowi:middlewares:csrfVerify req.skipCsrfVerify undefined
2020-03-01T13:43:30.561Z crowi:models:user Activate User { lang: 'en-US',
  status: 3,
  admin: true,
  _id: 5e5bb88f7e525b00120d5117,
  createdAt: 2020-03-01T13:28:47.650Z,
  email: '<user email>',
  __v: 0,
  name: '<user name>',
  username: '<username>' }
POST /_api/admin/user/5e5bb5277e525b00120d50fa/remove 404 0.378 ms - 187
POST /_api/admin/user/5e5bb5277e525b00120d50fa/remove 404 0.381 ms - 187
POST /_api/admin/user/5e5bb88f7e525b00120d5117/remove 404 0.405 ms - 187

Environment Details
Crowi Version: 1.8.0-dev
Im using crowi docker container image and deploy it on k8s v1.17.3.
Steps to Reproduce
Make users and delete them by using crowi container image.

Thank you Thank you for using Crowi, and sorry for inconvenient.
The user deletion feature is not yet implemented.
Please use "suspend" flag instead until we deliver this feature to users 🙇

@sotarok
OK, I will do user operation by using it.


Remove custom pipeline from pyartcd

Follows https://github.com/openshift-eng/aos-cd-jobs/pull/3866

/lgtm


Problems with the name of the main file when creating a project

When I create a mineral project with the CLI (version 2.0.0-dev.1) the file is named mineral_cli.dart instead of main.dart.

Thank a lot for your report, I have fix it in https://github.com/mineral-dart/cli/commit/06365658742cd93414827c3a71e525e26bbf852c


Desync with "--tune Psnr" with speed 0 and 1 for 4k image at 2nd frame.

Tested with commit: acb7b69227ab29b42f8258b66d5c0dfee9a32470
./target/release/rav1e ~/Downloads/crowd_run_2160p50.y4m -o test.ivf -r test_rec.y4m --quantizer 128 --speed=1 --limit=3 --low_latency --tune=Psnr
../aom_build/aomdec test.ivf -o test_dec.y4m -v
../aom_build/aomdec test.ivf --rawvideo -o test_dec.yuv -v
ffmpeg -i test_rec.y4m test_rec.yuv -v 0
cmp test_rec.yuv test_dec.yuv
test_rec.yuv test_dec.yuv differ: char 8324073, line 1
==> difference in 2nd frame
Similar desync with speed 0. 1st frame is fine.
speed 2, 6 and 10 were fine.

Could you give it a test at speed 2? I'd like to see if this is likely related to bottom-up encoding.

Oh- Yeap, I missed stating that it was fine with speed 2!

If I try narrowing down the problematic area, it is inter frame & bottom-up partition search.

@shssoichiro
It is possible "--tune Psnr" is causing desync for speed 0 and 1 (i.e. bottomup partition).
I tried:
./target/release/rav1e ~/Downloads/crowd_run_2160p50.y4m -o test.ivf -r test_rec.y4m --quantizer 128 --speed=1 --limit=2
, then it is fine.
And I tried again:
./target/release/rav1e ~/Downloads/crowd_run_2160p50.y4m -o test.ivf -r test_rec.y4m --quantizer 128 --speed=1 --limit=2 --tune Psnr
, then desync happens.
test_rec.yuv test_dec.yuv differ: char 8418299, line 1

As far as I can tell, the desync occurs where 4x4 blocks are chosen. If I increase min_block_size to BlockSize::BLOCK_8X8 keeping all other settings, then it is fine.

I am trying with tx_domain_distortion off now (its default is on, and used with --tune Psnr), which I suspect.

I am trying with tx_domain_distortion off now (its default is on, and used with --tune Psnr), which I suspect.

There is still a desync, though different pixels are affected.

I tried with smaller input and 2x2 tiles, and there is also desync. Hence the issue is not specific to 4K but speed 0 or 1 with --tune Psnr.

Faster test:
./target/release/rav1e nyan.y4m -o test.ivf -r test_rec.y4m --quantizer 150 --speed=1 --limit=2  --low_latency --tune=Psnr
gives a desync!

And if I do this, it fixes for speed 1 nut speed 0 still has desync.
  //dist_scale: [1.0, lambda / lambda_u, lambda / lambda_v],
  dist_scale: [1.0, 1.0, 1.0],

i.e. if not use dist_scale[].

Trying with more recent commit, ed524d6c893d81c7b3b9f8122d954e078379a52e,
./target/release/rav1e nyan.y4m -o test.ivf -r test_rec.y4m --quantizer 150 --speed=1 --limit=2 --tune=Psnr
there is still desync for speed 1 with --tune Psnr. (As in split issue #, desync for speed 0 with both Psnr and Psycho")
test_rec.yuv test_dec.yuv differ: char 157117, line 113

Same desync occur with 1d44f9f4ea746664fbb0e32c9fca41e47f7be831
So, it seems broken before two suspected landed features, 1) Chroma scaling, 2) Activity masking

Located the culprit commit that causes this sync (i.e. speed 0 and 1 with --tune Psnr)
3bf1c46359ed61c9622f0f6fe8251c5a33885977

W/o reverting 3bf1c46, just disablling quantizer_rdo_preset() fixes the issue for both speed 0 and 1.

Update: It is NOT inter frame only. If two frames are encoded, both frames are affected, i.e. showing desync on both frames. However, if only one frame is encoded, there is no desync.

With different enc options, like more frames and smaller qndex,
./target/release/rav1e nyan.y4m -o test.ivf -r test_rec.y4m --quantizer 50 --speed=0 --limit=10
desync occur regardless --tune, with commit 1c01f90b788085e10c4ea5b2bb9206ef6b1c75d4
that is right before chroma scaling, Oct 11.

@shssoichiro ,
It also happens with speed 2, commit 3bf1c46359ed61c9622f0f6fe8251c5a33885977
./target/release/rav1e nyan.y4m -o test.ivf -r test_rec.y4m --quantizer 50 --speed=2 --limit=10

As early as b074992e54ab4067b3eabecd45110d451da95c2d has desync issue.
And now checking even earlier than it.

The issue only appears intermittent, depending on enc options.

Affected:
6b9f362fe1b7d859b07d94ee338ff99f7dca946d, Sep 3.

In commit 3c79e025f7c13635558ce66370920fb5a8a38754
I think speed 2 is affected because at that time it enables quantizer_rdo (With current master as of Dec 5, only speed 0 and 1 enables quantizer_rdo).

///  - speed - 2, Min block size 8x8, TX domain distortion, complex pred modes for keyframes, RDO TX decision, include near MVs,
///  - speed - 1, Min block size 8x8, TX domain distortion, complex pred modes, RDO TX decision, include near MVs,
///  - speed - 0, slowest,  Min block size 4x4, TX domain distortion, complex pred modes, RDO TX decision, include near MVs, bottom-up encoding.

///  - speed - 2, Min block size 8x8, TX domain distortion, complex pred modes for keyframes, RDO TX decision, include near MVs, quantizer RDO,
///  - speed - 1, Min block size 8x8, TX domain distortion, complex pred modes, RDO TX decision, include near MVs, quantizer RDO,
///  - speed - 0, slowest,  Min block size 4x4, TX domain distortion, complex pred modes, RDO TX decision, include near MVs, quantizer RDO, bottom-up encoding.

commit 3c79e025f7c13635558ce66370920fb5a8a38754 seems the origin of desync.
Date:   Wed Jul 31 10:27:20 2019 -0700
"Use segmentation to adjust block quantizers"
I.e. When quantizer_rdo is enabled for the 1st time for speed 0,1,2.

Reverting 3c79e025f7c13635558ce66370920fb5a8a38754 or disabling quantizer_rdo fixes the desync at the origin commit, however after that, commit db0da3c97efb269cb23571f2c1f68afdf1ad9813 (Add heuristic quantizer adjustment, Aug 21) causes desync again. So, I think that, before fixing those two, disabling two features will stops the desync at least temporarily on master.

This issue has been TEMPORARILY fixed by disabling the use of segmentation and thus quantizer rdo and heuristic quantizer selection but we will desire it fixed since it contributes to the coding efficiency significantly.

This issue has been TEMPORARILY fixed by disabling the use of segmentation and thus quantizer rdo and heuristic quantizer selection but we will desire it fixed since it contributes to the coding efficiency significantly.

I will create new issue its title originates more according names, and close this issue.


setup.py CACE" -> CACE, PyTorch -> torch

setup.py should probably have name='CACE' (not 'CACE"'), and install_requires=[..., 'torch'] (not PyTorch). With those changes I was able to python -m pip install .

Thank you! Fixed now.


Having issues running grumpy

Cloned the repository

Ran a successful build
echo "print 'hello, world'" | make run hello, world

Generated a simple python script
echo 'print "hello, world"' > hello.py

Transpiled py to go

build/bin/grumpc hello.py > hello.go

Tried to run the executable, it threw an error
./hello: line 1: syntax error near unexpected token `newline'

./hello: line 1: `!<arch>'

Investigated the file hello.py and found some weird characters

https://gist.github.com/codecraf8/7e3a246e711425166bfd5b8df4522f7a

All paths were properly set.
export GOPATH=$PWD/build
export PYTHONPATH=$PWD/build/lib/python2.7/site-packages

What's gone wrong?

The output of the grumpc command is Go code that can be compiled using go build or similar. It's not an executable. Let me know if that helps.

I have the same error?
after " go build"
I can't run ./hello


WIP: parallel tests + rmrk stats

Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR type

[ ] Bugfix
[ ] Feature
[ ] Refactoring

What's new?

[ ] PR closes #3841, closes #3681
[ ] Requires deployment <rubick/magick_issue>
[ ] test parallelization + stats test, coming soon

Before submitting Pull Request, please make sure:

[ ] My contribution builds clean without any errors or warnings
[ ] I've merged recent default branch -- main and I've no conflicts
[ ] I've tried to respect high code quality standards
[ ] I've didn't break any original functionality
[ ] I've posted a screenshot of demonstrated change in this PR

Optional

[ ] I've tested it at </rmrk/collection/26902bc2f7c20c546a-1FVG7>
[ ] I've tested PR on mobile and everything seems works
[ ] I found edge cases
[ ] I've written some unit tests 🧪

Had issue bounty label?

[ ] Fill up your KSM address: Payout

Community participation

[ ] Are you at KodaDot Discord?

Screenshot

[ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

✅

I need to ask for help from the pros here, I'm not making much progress on the parallelization part of the PR:
In order to parallelize the tests with cypress (not locally) cypress test needs to be recorded (happening with secret key which is saved in our GH repo already - it can be accessed through ${{ secrets.CYPRESS_RECORD_KEY }}).
However, here's what I'm getting when trying to record our tests to Cypress dashboard:

Is it possible to start passing those keys to forked builds? this way, we can get to a point where the install and cache jobs gets saved in cypress dashboard and parallelized tests will run on virtual machines in the dashboard.
ref: https://docs.cypress.io/guides/guides/parallelization#CI-parallelization-interactions
@kkukelka @preschian I know you guys have worked with both workflows and Cypress before 🙏🏻 I'm trying couple workflows there, feel free to push in any ideas you might have straight to the PR.

I need to ask for help from the pros here, I'm not making much progress on the parallelization part of the PR:
In order to parallelize the tests with cypress (not locally) cypress test needs to be recorded (happening with secret key which is saved in our GH repo already - it can be accessed through ${{ secrets.CYPRESS_RECORD_KEY }}).
However, here's what I'm getting when trying to record our tests to Cypress dashboard:
Is it possible to start passing those keys to forked builds? this way, we can get to a point where the install and cache jobs gets saved in cypress dashboard and parallelized tests will run on virtual machines in the dashboard. ref: https://docs.cypress.io/guides/guides/parallelization#CI-parallelization-interactions
@kkukelka @preschian I know you guys have worked with both workflows and Cypress before 🙏🏻 I'm trying couple workflows there, feel free to push in any ideas you might have straight to the PR.

i believe you have to set this CYPRESS_RECORD_KEY in the repository as well since we don't push our .env file to remote.
maybe this article can help

Is it possible to start passing those keys to forked builds?

hhmm, interesting 🤔. maybe for cypress, we use another platform for CI (https://buildkite.com/ for example) and put that secrets.CYPRESS_RECORD_KEY into that platform
I need to test it out

i believe you have to set this CYPRESS_RECORD_KEY in the repository as well since we don't push our .env file to remote. maybe this article can help

it is set as this (kodadot/nft-gallery) secret, I've tried to set it in my fork as well, that didn't do the job

use https://circleci.com/, "If you are comfortable sharing secrets with anyone who forks your project and opens a PR, you can enable the Pass secrets to builds from forked pull requests option" https://circleci.com/docs/oss#pass-secrets-to-builds-from-forked-pull-requests

This would also enable the native Cypress solution 😄 I'd rather stick with that then

use gitlab as ci/cd. cons, need premium account https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/github_integration.html

Generally speaking, it would be better in my opinion to stick with one solution for E2E tests -> from actual tests to parallelization. @yangwao could we pass the cypress secret (saved in this repo) to other forks?
This would be the solution here, without requiring another CI/CD service (just Cypress + GH)

expanding e2e test suite makes no sense without parallelization, this needs to get revisited once somebody manages to do that


Launch file for B1 robot

Could you kindly add a simulation environment and launch file for B1 robot ?

As far as I know, unitree robotics has no related simulation project to simulate the b1 robot currently.


How to remove a resource from helm without deleting it

Output of helm version:
version.BuildInfo{Version:"v3.2.1", GitCommit:"fe51cd1e31e6a202cba7dead9552a6d418ded79a", GitTreeState:"clean", GoVersion:"go1.13.10"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
AWS (Non managed node groups)
Hi there! I've ran into a scenario I couldn't find documented. Previously we had namespaces as part of helm releases. Due to the danger of this (removing a namespace, even by accident wipes everything in it), we're wanting to move namespaces out of helm. However, despite removing any labels from the namespace resource that tie it to the helm release, and additionally trying to use something like helm edit to edit the release in place, resources are still deleted.
Is there a way to remove these from being managed by helm while keeping the resource? We're not purging the release as there are other things in there and are looking for ways to prevent an outage without migrating clusters.
Appreciate any help!

try helm.sh/resource-policy: keep annotation
links:

Hook resources are not managed with corresponding releases
Tell Helm Not To Uninstall a Resource

closing as answered in the documentation.


 This is literal garbage.

It took me a few hours to even figure out how to install this shit on linux and it doesn't even have an ESP? This is literal garbage.

You could do better, could you?
Also nobody forces you to use it

It took me a few hours to even figure out how to install this shit on linux and it doesn't even have an ESP? This is literal garbage.

You could do better, could you? Also nobody forces you to use it

Okay you right. Just got heated, the cheat has a lot of useful things and you have much lower chances of a ban cause it ain't walls.

It took me a few hours to even figure out how to install this shit on linux and it doesn't even have an ESP? This is literal garbage.

You could do better, could you? Also nobody forces you to use it

Okay you right. Just got heated, the cheat has a lot of useful things and you have much lower chances of a ban cause it ain't walls.

Also cheat is still in early stage and Daniel is gonna 100% improve it


Maybe use --release by default

cargo mutants does many incremental builds and test runs. In most trees, most of the time is spent running the tests.
Tests will typically run faster with --release; in some crates it will be much faster.
So that should at least be an option (#59) but according to the principle of "make it easy" perhaps --release should be the default.
There are at least two potential downsides:

Conceivably in some trees the performance hit from doing the initial and incremental builds in release mode will outweigh the benefit of the tests being faster. However, even if that is true sometimes it's probably a win across most trees.
Some projects might have test suites that are less rigorous, or simply don't work properly, in release mode. For example they might rely on debug_assert to catch some bugs. I think this would be an unidiomatic use of Rust, but it might well happen.

I think those could both reasonably be handled by having an option to go back to debug builds.

It will probably help on some crates, but I'm not sure it's a good default. Some crates like time take a long time to compile and link with --release, and have relatively quick test suites. Probably better to leave this to the user.


Windows bug fix + support for negative tile coordinates

We have fixed an issue that prevents the disk cache from working under Windows, since it requires binary files to be opened with the "rb" flag.
We have also added support for negative tile coordinates (just changed the regexp that parses the incoming request URL), since we need this for our work with transverse mercator projections.

Just pushed this all to v1.20.0


[v3] enhance search input to better support CJK language users

Description
Resolves #2833
This pull request aims to provide better support for CJK language users while ensuring that the existing search behavior for non-Pinyin characters remains unaffected.
I referred to the foxact implementation and changed the search input to be uncontrolled to ensure that the state in <Flexsearch> only updates the composition process is complete, allowing the input state in the browser to be reflected to the user.
To better understand the changes in this PR, here's an overview of the sequence of events when composing the character "你" using Pinyin:
Chrome
compositionstart
input (value: n, isComposing: true)
input (value: i, isComposing: true)
input (value: 1, isComposing: true)
input (value:你, isComposing: true)
composition end

Firefox
compositionstart
input (value: n, isComposing: true)
input (value: i, isComposing: true)
input (value: 1, isComposing: true)
compositionend
input (value: 你, isComposing: false)

Screenshots

Pinyin characters
https://github.com/user-attachments/assets/f2f602d4-aff4-4944-a06f-18f5104d78c6

Non-Pinyin characters
https://github.com/user-attachments/assets/f4f2319d-0a32-4f22-819c-90932dc7e219

Thank you for the suggestion; it's a great idea. To ensure that the tests effectively cover CJK languages, I need to research which test cases would be most helpful. Would it be okay if I submit a separate PR for this?

Sure, can you fix lint check? and I will merge this pr 👍