WebView sometimes isn't loaded when run with IntegrationTestWidgetsFlutterBinding

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce

Create an empty project and cd into it
flutter create example --platforms android --empty

Add dependency on flutter_webview and integration_test:
dependencies:
  webview_flutter: ^4.2.2

# ...

dev_dependencies:
  flutter_test:
    sdk: flutter
  integration_test:
    sdk: flutter

Modify lib/main.dart to show a button that, when tapped, opens hackernews.com in a WebView:
App code
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() {
  runApp(const ExampleApp());
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      darkTheme: ThemeData(
        primarySwatch: Colors.blue,
        brightness: Brightness.dark,
      ),
      theme: ThemeData(
        primarySwatch: Colors.blue,
        brightness: Brightness.light,
      ),
      home: const ExampleHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class ExampleHomePage extends StatelessWidget {
  const ExampleHomePage({super.key, required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(title)),
      body: Center(
        child: TextButton(
          onPressed: () async => Navigator.of(context).push(
            MaterialPageRoute<void>(
              builder: (_) => const WebViewScreen(
                title: 'WebView (Hacker News)',
                url: 'https://news.ycombinator.com',
              ),
            ),
          ),
          child: const Text('Open webview (Hacker News)'),
        ),
      ),
    );
  }
}

class WebViewScreen extends StatefulWidget {
  const WebViewScreen({super.key, required this.title, required this.url});

  final String title;
  final String url;

  @override
  State<WebViewScreen> createState() => _WebViewScreenState();
}

class _WebViewScreenState extends State<WebViewScreen> {
  late final WebViewController controller;

  @override
  void initState() {
    super.initState();
    controller = WebViewController()
      ..setJavaScriptMode(JavaScriptMode.unrestricted)
      ..setNavigationDelegate(
        NavigationDelegate(
          onProgress: (progress) => print('WebView progress: $progress'),
          onPageStarted: (url) => print('WebView started loading: $url'),
          onPageFinished: (url) => print('WebView finished loading: $url'),
          onWebResourceError: (error) => print('WebView error: $error'),
        ),
      )
      ..loadRequest(Uri.parse(widget.url));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title)),
      body: WebViewWidget(controller: controller),
    );
  }
}

Create a new test: integration_test/webview_hackernews_test.dart
Test code
import 'package:example/main.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';

void main() {
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();

  testWidgets('interacts with the orange website in a webview', (tester) async {
    await tester.pumpWidget(ExampleApp());

    await tester.tap(find.text('Open webview (Hacker News)'));

    await tester.pumpAndSettle(Duration(seconds: 10));
  });
}

Start an Android emulator
I tested on Pixel 6, API level 31, hardware rendering enabled, and plentiful of resources available (4GB ram, 4GB VM heap, 6GB internal storage), system image: system-images;android-31;google_apis;arm64-v8a). I also have a fast and stable internet connection, so that's very likely not problem.

Run the test with flutter test integration_test/webview_hackernews_test.dart and observe that the WebView is not loaded (see video below), even though the logs say "100% loaded"

Expected results
I expect the WebView to load the same as if the app was running normally.
Actual results
The WebView doesn't load.
This is an important problem in the Patrol framework – it integrates with native tooling (UIAutomator, XCUITest) to make it possible to interact with native UI (permission dialogs, notifications, webviews) from normal Dart test code. This problem makes our webview interaction feature flaky.

I did a fair share of debugging of this, and it was an quite uncanny experience (mainly in this issue). There are differences between e.g. OS versions, and hardware rendering enabled/disabled. I think creating this issue and waiting for somebody from the Flutter team to respond is the best I can do right now.
I'm also curious to hear some details:

if/how the different underlying Platform View implementations (Texture Layer Hybrid Composition, Hybrid Composition, Virtual Display) might affect this bug.
how Engine's standard rendering pipeline (triggered by pump() in tests) works with these different Platform Views implementations? According to my testing/trial&error, pumping is a separate mechanism and is not required to display a webview (because it's a Platform View).
What could be the cause of this problem?

Screenshots or Video

Screenshots / Video demonstration
flutter test integration_test/webview_hackernews_test.dart (doesn't work)
https://github.com/flutter/flutter/assets/40357511/4d27a39a-9211-4f95-8f2f-005d1c628d5a

flutter run (works)
https://github.com/flutter/flutter/assets/40357511/42837e87-02c4-46b0-a3f4-ad4945015c50

flutter run integration_test/webview_hackernews_test.dart - incredibly flaky:

usually, works after Hot Restart (R key) except the first time
sometimes doesn't work during a few first Hot Restarts
sometimes no amount of Hot Restarts helps

https://github.com/flutter/flutter/assets/40357511/1e165fc8-36b7-48df-ba32-ce13a04efbfd

Logs
Logs
$ flutter test integration_test/webview_hackernews_test.dart
00:00 +0: loading /Users/bartek/dev/leancode/patrol/packages/patrol/example/integration_test/webview_hackernews_test.dart                                                                                R00:10 +0: loading /Users/bartek/dev/leancode/patrol/packages/patrol/example/integration_test/webview_hackernews_test.dart                                                                                9.8s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
00:11 +0: loading /Users/bartek/dev/leancode/patrol/packages/patrol/example/integration_test/webview_hackernews_test.dart                                                                                555ms
00:13 +0: interacts with the orange website in a webview
WebView progress: 10
WebView started loading: https://news.ycombinator.com/
WebView progress: 22
WebView progress: 70
WebView progress: 80
WebView progress: 100
WebView progress: 100
WebView finished loading: https://news.ycombinator.com # but the WebView is not visible!

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.10.6, on macOS 13.4.1 22F770820d darwin-arm64, locale en-PL)
    • Flutter version 3.10.6 on channel stable at /Users/bartek/fvm/versions/3.10.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (7 days ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/bartek/androidsdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_HOME = /Users/bartek/androidsdk
    • Java binary at: /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/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 17.0.6+0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/bartek/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 74.0.4
    • Dart plugin version 231.9161.14

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
    • 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

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 114.0.5735.198

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Thanks for the detailed report.
Reproducible using the steps and code sample provided above.

flutter doctor -v
[✓] Flutter (Channel stable, 3.10.6, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
    • Flutter version 3.10.6 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (7 days ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/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 17.0.6+0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 74.0.4
    • Dart plugin version 231.9161.14

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/IntelliJ IDEA.app
    • 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

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
    • 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

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

[✓] Connected device (3 available)
    • Pixel 7 (mobile) • 28291FDH2001SA • android-arm64  • Android 13 (API 33)
    • macOS (desktop)  • macos          • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)     • chrome         • web-javascript • Google Chrome 114.0.5735.198

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.13.0-6.0.pre, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
    • Flutter version 3.13.0-6.0.pre on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 33d174d797 (29 hours ago), 2023-07-18 22:36:21 -0400
    • Engine revision 39d60be72f
    • Dart version 3.1.0 (build 3.1.0-324.0.dev)
    • DevTools version 2.25.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/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 17.0.6+0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/IntelliJ IDEA.app
    • 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

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
    • 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

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

[✓] Connected device (3 available)
    • Pixel 7 (mobile) • 28291FDH2001SA • android-arm64  • Android 13 (API 33)
    • macOS (desktop)  • macos          • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)     • chrome         • web-javascript • Google Chrome 114.0.5735.198

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

observe that the WebView is not loaded (see video below), even though the logs say "100% loaded"

This suggests that the webview is just not displaying. The logging is from native callbacks that would only be fired by the webview actually loading a page.

@johnmccutchan FYI,


gather objects in TPU is not supported

Do you have any plans to implement the above functionality on a TPU (Also is this even possible on TPU ?) ? I'm trying to distribute evaluation using accelerate.
Error:
    raise NotImplementedError("gather objects in TPU is not supported")
NotImplementedError: gather objects in TPU is not supported

Hi @carlesoctav, thanks for opening the PR. torch.distributed is not fully supported on TPU v2/v3. See related docs here.
Can you check if torch.distributed.all_gather_object works on TPU ? If so, we can potentially extend this function to TPUs also.

do you think this part of documentation relevant to your question? i can run the below code on v4-8
import torch
import torch.distributed as dist
import torch_xla.core.xla_model as xm
import torch_xla.distributed.xla_multiprocessing as xmp
from torch_xla.experimental import pjrt

# Required for `xla://` init_method and `xla` backend
import torch_xla.distributed.xla_backend

def _all_gather(index: int):
  # No need to pass in `rank` or `world_size`
  dist.init_process_group('xla', init_method='xla://')

  t = torch.tensor([index], dtype=torch.int32, device=xm.xla_device())
  output = [torch.zeros_like(t) for _ in range(dist.get_world_size())]
  dist.all_gather(output, t)

  xm.mark_step()
  print(output)

if __name__ == '__main__':
  xmp.spawn(_all_gather)

Note: Although the xla:// init_method is not required on TPU v4, it is still recommended. If you use env://, MASTER_ADDR must be set to IP host that has device 0, which is not always worker 0. The xla:// init_method finds this IP automatically.
Note: For TPU v2/v3, you still need to import torch_xla.experimental.pjrt_backend, as TPU v2/v3 support in torch.distributed is still experimental.

well if i naively change the all_gather to all_gather_object, the above code results an error:
*** End stack trace ***
Input tensor is not an XLA tensor: CPULongType
error executing "python test_distributed.py": exit status 1

Hey @carlesoctav , I was talking about this code in accelerate:
`python
def _gpu_gather_object(object: Any):
output_objects = [None for _ in range(PartialState().num_processes)]
torch.distributed.all_gather_object(output_objects, object)
# all_gather_object returns a list of lists, so we need to flatten it
return [x for y in output_objects for x in y]
def gather_object(object: Any):
"""
Recursively gather object in a nested list/tuple/dictionary of objects from all devices.
Args:
    object (nested list/tuple/dictionary of picklable object):
        The data to gather.

Returns:
    The same data structure as `object` with all the objects sent to every device.
"""
if PartialState().distributed_type == DistributedType.XLA:
    # replace it by _gpu_gather_object(object)
    raise NotImplementedError("gather objects in TPU is not supported")
elif PartialState().distributed_type in TORCH_DISTRIBUTED_OPERATION_TYPES:
    return _gpu_gather_object(object)
else:
    return object

`


EASGD implementation guildance

Hi all,
Now I'm trying to implement EASGD using MXNet and give it a test. So I'm asking for some advice on its implementation. What I'm trying now is to modify _update_params_on_kvstore in model.py. I need to keep both the local model and a server averaging model. But it would be nasty if I'm going further for EAMSGD with momentum as momentum is on local. Is there any DIY instruction on optimizer to handl this? Thanks.

@mli

Ok. So here are some updates and questions after I tried implementing EASGD and EAMSGD (momentum EASGD) for single machine case. Anyone interested in implementing this one can have an idea on how to do so. Right now the result looks good. I did't post the code here because I went the nasty approach of modifying model.py and optimizer.py files.
auther implementation for Torch link: mpiT
How to implement in MxNet:

modify the _update_params_on_kvstore and implement everything according to paper,I used the kvstore to manage averaging weight, and you need to pass in optimizer to learning rate etc..

create a dummy optimizer which passes pushed gradient to weight.

(optional) if u are implementing EAMSGD, you need to create a velocity array in the train_multi_machine for momentum and pass it to _update_params_on_kvstore.

modify train_multi_machine so u can call modified _update_params_on_kvstore according to the optimizer object type. Basically using "if else" stuff.

on each epoch testing, you need to synchronize each worker weight once using weight stored in kvstore(the averaging weight author used, I took the mean of works which is a little different). Make a copy of original one before this action,cause each worker weight is different, and restore it back after testing.

Questions:
Is there any documents explaining multi machine updating details? How my modification on _update_params_on_kvstore  and optimizer affects dist_sync case?
Now I'm trying to scale this algorithm for multiple machines. My brain messed up with this case as I have no experience on this. I did 2 experiments using dmlc_mpi.py both with n=2, s=1 but 2 different kvstore setup (dist_sync, dist_async). the dist_async works while the dist_sync failed converging. I did't expected dist_async to work as my single machine code is for sync case, the single machine async case is not tested (because I don't know how to do so, LOL. I guess dmlc_local might be a direction).

_update_params_on_kvstore means we will update the parameters by the optimizer set in the kvstore, namely by kvstore.set_optimizer(optimizer)
there are some documents explains the difference between dist_sync and dist_async
http://mxnet.dmlc.ml/how_to/multi_devices.html#distributed-training-with-multiple-machines
http://ps-lite.readthedocs.org/en/latest/overview.html

Ye, I read the pslite and kv_store code and roughly understood how it works. I think my solution is functional but ugly. I used kv-store only to keep weight and do some synchronization. Thanks for the help.


Rethink indexing

Although a lot of effort has been put into making indexing nice, we should ensure that it's as elegant and performant as possible, since this is such a common operation.

Closing as a subset of #599


feat: Support index

chore: reformat logs & add ones

fix: handle creating existing-in-db entity kinds

Raises ValueError if at least one entity kind already exists in DB

feat: Add droping graph database keeping ontology

feat: Support SQL index for faster search

fix: Make team argument optional to connect

fix: create_entity_kinds now works even if a kind's in DB

chore: Add logs

fix: Use get_document for getting an entity kind

fix: Encode symbols before storing in index

fix: Add list copy of arg to maintain immutability

Opened #3 instead


updated Kria pattern docs

Hey guys I have done a first past on updating/expanding the pattern section of the Kria docs. would love to get some feedback. Also is it ok to put the great video by n-So on the documents page? It doesn't really match the aesthetics of the current video set by @tehn but its super easy to follow and is a great example.
https://www.youtube.com/watch?v=ZWBXLsbxWlw
anyway let me know if there is stuff I should change/ reword, and more importantly where I should post this on lines to get community feedback.

thank you for taking this on!
a link to the video would be good-- but i'd prefer not to have it embedded inline.

Ok ill just add a link then.

i need to merge the firmware, then we can announce a new version
On Mon, Apr 16, 2018 at 10:21 PM, Matthew Allen<EMAIL_ADDRESS>wrote:

Committed! should I open a new thread around this or just respond to the
1.5 firmware announcement?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/monome/docs/pull/36#issuecomment-381809482, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAPEcGYPrPl6q8pezPp0e5zr2vfXiPSmks5tpVGvgaJpZM4TXdqr
.

Thanks for your support with all this.


Update enumeratum to 1.7.0

Updates com.beachape:enumeratum from 1.5.15 to 1.7.0.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.beachape", artifactId = "enumeratum" } ]

labels: library-update, semver-minor

Superseded by #201.


plugin doesn't work with logstash >= 5

the plugin still locks the dependency on logstash-core-plugin-api at ~> 1, it needs a change like the one performed in the supported plugins

#4 to the rescue


Reducing the number of jar files

Do we need all these jar files for https://github.com/dice-group/owlapy/tree/develop/owlapy/jar_dependencies ?

I am afraid they are all necessary because I remember adding them one by one (with some exceptions) when trying to make the java code work. Some of them are needed for specific functionalities like jgrapht-core-1.2.0.jar for example is needed for some of the methods of pellet reasoner. However I can still double check to make sure there isn't any unnecessary library.

Thank you. It would be great to double check it


[883] Clean up withdrawal page

Context
Withdrawal page updates
Changes proposed in this pull request

Content
Form legend styles
Backlink label
Cancel CTA

Guidance to review
After

Happy to approve this from a product perspective.


C compilation without using nightly

I maintain a Homebrew formula that can be used to install rustls-ffi, Hyper, curl, git (and hopefully other software), using the Rust backends. You can view the repo and instructions here: https://github.com/kevinburke/homebrew-safe
I've had to pin the Hyper formula to 0.14.17 because the 0.14.18 release depends on the nightly Rust release, and Homebrew makes it difficult to install the nightly.
Because of this I've also had to pin curl at version 7.82, which is now two point releases behind.
I'm wondering if there's a time frame when I might be able to get back up to tip again - if it's possible to not have to depend on the nightly at some point in the near future.

I'm wondering if there's a time frame when I might be able to get back up to tip again - if it's possible to not have to depend on the nightly at some point in the near future.

As far as I know, the only nightly feature hyper uses for the C API is https://github.com/rust-lang/cargo/issues/10083. which was motivated by hyper's needs in https://github.com/hyperium/hyper/issues/2685. It should be possible to use the first stable rust toolchain that feature ships with.

Yep exactly that. The cargo rustc --crate-type cdylib command line option (https://github.com/rust-lang/cargo/issues/10083) needs to stabilize to be able to use it on a non-nightly toolchain.

Nightly hasn't been necessary since Rust 1.64.0 was released. See the build instructions in https://github.com/hyperium/hyper/blob/master/capi/README.md.
Which means this issue can be closed.


Why the Class column?

Installed, looks good in backend. However, what is the Class columns you added and what do you need it for?
Also, how do I add 2 more columns for custom options:
-Qty, so each option has its own qty/is_in_stock when placing an order
-Status, set status 0/1 if option should be used or not
Rgds.

@joell67 we use the class to specify a custom CSS class to be applied to each option, for example product-custom-option-{class}


Enhance 'network inspect' to show PoolID

Closes-issue #23025
Signed-off-by: vikaschoudhary16<EMAIL_ADDRESS>

Cc @mavenugo @aboch @icecrime @mrjana @MoBani

Related changes in engine-api repo are here in seperate PR, https://github.com/docker/engine-api/pull/247

Can you add a second commit that includes the changes you made to engine-api here? That way we can verify/review those changes here, before the engine-api changes are merged. Making those changes here will make the vendor check fail, but at least the other tests will pass.
Once the design is approved, and we go to code review, we can merge the engine-api and vendor those changes here.

@thaJeztah ,
Done. PTAL

oh, looks like there's a test failing;
2:24:42 FAIL: docker_cli_network_unix_test.go:643: DockerNetworkSuite.TestDockerNetworkInspectCustomUnspecified
12:24:42
12:24:42 docker_cli_network_unix_test.go:654:
12:24:42     c.Assert(len(nr.IPAM.Config), checker.Equals, 1)
12:24:42 ... obtained int = 0
12:24:42 ... expected int = 1
12:24:42
12:25:12
12:25:12 ----------------------------------------------------------------------

@thaJeztah ,
Thanks for the response.
It is failing because with these changes length of response has increased and assertion on length is failing. I am planning to adjust test cases, once design is approved by you guys. If your preference is otherwise, please let me know.

@aboch ping

ping @mavenugo @aboch PTAL!

Looking at the discussion in https://github.com/docker/docker/issues/23025, and https://github.com/docker/docker/issues/23025#issuecomment-222290876, I think we should close this; the PoolID is an internal detail, and should just be seen as that, and ID, and not to extract information from (the format may change in future)


Feature/redirect should not check subdomain 4.30.0

Fixes DE53008 - Partial Open-Redirect in UAA via Subdomains Inclusion

Also, could you squash the commits? The ideal number of commits for a PR is 2. The first one should be tests, the second one should be implementation and passing tests. Obviously it doesn't always work out that way but we should shoot for it.

OK - I've squashed the commits into 2.


Files aren't served using whitenoise unless the django 'static' templatetag is used

Correct me if I'm wrong, but according to the whitenoise docs all static files must be referenced from a {% static ... %} tag in order to be served through whitenoise. Is that right?

Can you post a link to this doc section please? For me whitenoise is working just fine without using the templatetag.


The 'Tumor' segment is getting added even for non tumorous CT images...please let me know how to resolve this

The 'Tumor' segment is getting added even for non tumorous CT images...please let me know how to resolve this

@kruthi-manakari, we need more information about this issue. Could you describe the steps to reproduce the issue?


Build the appropriate AGE build into both PostgreSQL development versions.

Build, make and install, the appropriate AGE build into both versions of PostgreSQL. Run 'make installcheck' for each version and put the results here.

PG 11.5

PG12.10

Installed Apache AGE into both but one test is failing. Will try solving the issue

Installed apache AGE into both pg version but test expr is failing in both versions.

What OS distro and version are both of you using?

You can use the following command to see what is different. You will need to execute it from the root of the distro -
diff regress/expected/expr.out regress/results/expr.out
If the diff isn't large, you can paste the results in here. Or, if there appears to be a 'theme' to the diff, then just post an example.

11.5

12.10


Add apigateay integration tests

This adds a new folder for integration tests that are separate from the
examples. This will be for tests that should not be used as examples,
but are needed just for test coverage.
As part of this testing I found some issues that needed to be fixed

Schema type with additionalProperties
Some resources properties are an object type with
additionalProperties. These properties Should not have their keys
transformed, but should have their values.

Returning multiple resources from the mapping function
Sometimes a single CFN resource requires multiple aws classic resources.
In this case we need to return a list of resources with the unique
logicalId of the resources, otherwise each resource gets the same
logicalId and can cause issues with mapping attributes.

An Schema type with additionalProperties Some resources properties are an object type with additionalProperties.  - this is good, this is called a map type in Pulumi.
Indeed it is very different from objects:
https://github.com/pulumi/pulumi/blob/t0yv0%2Fno-secret-leaks-in-provider-config/developer-docs/providers/metaschema.md?plain=1#L414
Can you which part of the PR makes this change and tests it? Thanks!


autocomplete context

Hi again!
when running autocomplete from CLI it also prints other commands from OSX, mostly folders on the current path (im using oh-my-zsh)
to fix this issue, i just updated completion template to the following:
(borrowed from bower autocomplete from oh-my-zsh)
# Credits to npm's awesome completion utility.
### credits to npm, this file is coming directly from isaacs/npm repo
#
# Just testing for now. (trying to learn this cool stuff)
#
# npm command completion script
#
# Installation: {completer} completion >> ~/.bashrc  (or ~/.zshrc)
#

COMP_WORDBREAKS=${COMP_WORDBREAKS/=/}
COMP_WORDBREAKS=${COMP_WORDBREAKS/@/}
export COMP_WORDBREAKS

if type complete &>/dev/null; then
  _{pkgname}_completion () {
    local si="$IFS"
    IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
                           COMP_LINE="$COMP_LINE" \
                           COMP_POINT="$COMP_POINT" \
                           {pkgname} completion -- "${COMP_WORDS[@]}" \
                           2>/dev/null)) || return $?
    IFS="$si"
  }
  complete -F _{pkgname}_completion {pkgname}
elif type compctl &>/dev/null; then
  _{pkgname}_completion () {
    local cword line point words si
    read -Ac words
    read -cn cword
    let cword-=1
    read -l line
    read -ln point
    si="$IFS"
    IFS=$'\n' reply=($(COMP_CWORD="$cword" \
                       COMP_LINE="$line" \
                       COMP_POINT="$point" \
                       {pkgname} completion -- "${words[@]}" \
                       2>/dev/null)) || return $?
    IFS="$si"
  }
  compctl -K _{pkgname}_completion {pkgname}
fi
###-end-{pkgname}-completion-###

Hey have you found a way to make this global for users after install? I can add it to my own ~/.bashrc but I would rather find a way to do it automatically for users who download my package.

Hello @rauluranga @plentybinary

Hey have you found a way to make this global for users after install? I can add it to my own ~/.bashrc but I would rather find a way to do it automatically for users who download my package.

Depends from system to system, but I don't recommend it. This is pretty obtrusive, and npm doesn't do that (as far as I know), I'd rather not force anything global on a package download.
However, when you install git (again depends on the packaging), the completion helpers are automatically installed, might be worth checking out.


Allow prefilling fields from URL parameters

This patch adds the ability of generating permalinks for creating bread items and prefilling any of their fields.
Example use scenario: we have two models "Post" and "Category" and we'd like to add action buttons in the "Category" browse view next to the "View", "Edit" and "Delete" buttons. Our buttons would read "Add Post" and "Add Draft" so the admin can instantly add a post inside the selected category without leaving the category browse view. With this patch applied, this could be achieved simply by giving the buttons the following links:
Add Post:
route('voyager.posts.create', ['prefill' => base64_encode(serialize((
    new \App\Post())->forceFill([
        'category_id' => $data->{$data->getKeyName()},
    ])
))])

Add Draft:
route('voyager.posts.create', ['prefill' => base64_encode(serialize((
    new \App\Post())->forceFill([
        'category_id' => $data->{$data->getKeyName()},
        'status' => 'draft',
    ])
))])

I was asked to do this for a client so I thought I'd share it with everyone else as well.
Things that could be improved:

I think the "base64_encode serialize" part looks ugly and would appreciate any effort at cleaning it up.
I know this could throw unhandled errors if the prefill parameter had invalid b64 string or invalid serialized object but I didn't want to overcomplicate my patch. besides, this should only happen if the admin panel developer didn't test their implementation well.

I'm okay with this as a concept, though we definitely need to make sure this is tested and hardened a bit.  Also, I think I like state better than prefill as the url parameter.

Closing due to inactivity.
Please feel free to reopen or grab this fork and continue developing.
But note that this will likely be unnecessary for Voyager 2.


[Windows] Enable RSC in the vSwitch to optimize network performance

Signed-off-by: Quan Tian<EMAIL_ADDRESS>

/test-all

Codecov Report

Merging #2198 (1736502) into main (fa54190) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2198      +/-   ##
==========================================
- Coverage   60.92%   60.91%   -0.02%
==========================================
  Files         273      273
  Lines       20662    20662
==========================================
- Hits        12589    12586       -3
- Misses       6752     6766      +14
+ Partials     1321     1310      -11

Flag
Coverage Δ

kind-e2e-tests
51.70% <ø> (-0.11%)
:arrow_down:

unit-tests
41.18% <ø> (-0.02%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/controller/networkpolicy/tier.go
47.50% <0.00%> (-5.00%)
:arrow_down:

pkg/agent/controller/traceflow/packetin.go
56.94% <0.00%> (-4.63%)
:arrow_down:

pkg/apis/controlplane/v1beta2/sets.go
66.66% <0.00%> (-2.57%)
:arrow_down:

pkg/controller/traceflow/controller.go
69.27% <0.00%> (-2.41%)
:arrow_down:

pkg/agent/openflow/pipeline.go
69.42% <0.00%> (-0.69%)
:arrow_down:

pkg/agent/route/route_linux.go
43.08% <0.00%> (-0.55%)
:arrow_down:

pkg/agent/openflow/client.go
58.99% <0.00%> (-0.53%)
:arrow_down:

pkg/agent/openflow/network_policy.go
75.67% <0.00%> (-0.15%)
:arrow_down:

pkg/ovs/ovsconfig/ovs_client.go
49.37% <0.00%> (+0.62%)
:arrow_up:

pkg/agent/cniserver/server.go
70.83% <0.00%> (+1.92%)
:arrow_up:

... and 4 more

/test-all

/test-windows-conformance

/test-windows-conformance

/test-windows-e2e


diffsol build hangs on beta and nightly channels

Some other issues that might be relevant:

https://github.com/rust-lang/rust/issues/116914
https://github.com/rust-lang/rust/issues/114891
https://github.com/rust-lang/rust/issues/108826

as with the issues above, turning on debug messages:
RUSTC_LOG=TRACE cargo +beta build

eventually hangs with a stream of rustc_trait_selection::traits::project::normalize_with_depth_to calls with an ever increasing depth.

workaround for this is to remove the following bounds from Vector (done in #25)
    + for<'a> VectorOpsByValue<Self::View<'a>>
    + for<'a, 'b> VectorOpsByValue<&'b Self::View<'a>>

I think https://github.com/rust-lang/rust/pull/123471 is in beta now (?) so this can be reverted. We don't currently need these bounds though so I think this can just be closed


UIThreadException on Selecting Objects with Lasso Tool and Pressing D

07 / 13 / 2021 11:53UIThreadException
version <IP_ADDRESS>89 built on 11/07/2021 11:32
Oops, ppInk crashed! Please include the following information if you plan to contact the developers (a copy of the following information is stored in crash.txt in the application folder):
Index was outside the bounds of the array.
Stack Trace:
at gInk.FormCollection.tiSlide_Tick(Object sender, EventArgs e) in D:\gink.git\ppInk\src\FormCollection.cs:line 4664
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

You beat me to this one! I'll attach a crash log as well
crash.txt

This should fix.
ppInk64_varFix13a.zip

I haven't encountered this issue anymore. Now it seems to be much more stable.

1.8 RC1 released


modified:   README

modified:   README.mkdn
modified:   README.pod
modified:   lib/WebService/UrbanDictionary/Term.pm
modified:   lib/WebService/UrbanDictionary/Term/Definition.pm

The synopsis was broken in that the line: my $results = request('perl'); would fail with errors.
Changing the line to my $results = $ud->request('perl'); makes the example work.
The synopsis for WebService::UrbanDictionary::Term and WebService::UrbanDictionary::Term::Definition should also be changed to reflect the same.
I think there could be more examples for this module and it's missing documentation for "definitions".

Thanks. Merged.


chore: Refactoring multiple environments to use editorId instead of appId

Description
Refactoring multiple environments to use editorId instead of appId for supporting this feature on package editor on EE.
PR fixes following issue(s)
Fixes #28502
Type of change

Chore (housekeeping or task changes that don't impact user perception)

Testing
How Has This Been Tested?

[x] Manual
[ ] JUnit
[x] Jest
[x] Cypress

Checklist:
Dev activity

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

Summary by CodeRabbit

New Features

Search functionality now includes editor-specific results, enhancing user experience in multi-editor environments.
Route matching has been improved for better navigation within the application.

Enhancements

Updated components and sagas to support the new editorId parameter, ensuring consistent application behavior across different workspaces and editors.
Improved state management in the BottomBar component for a more responsive environment change handling.

Bug Fixes

Fixed logic in ImportApplicationModal and ReconnectDatasourceModal to correctly identify workspaces during import and reconnection processes.

Refactor

Replaced path-to-regexp with react-router's matchPath for more efficient route matching.
Streamlined environment configuration fetching to accommodate new editorId parameter.

Documentation

Updated internal documentation to reflect changes in function signatures and dispatch calls involving workspaceId and editorId.

/ok-to-test

/ok-to-test<EMAIL_ADDRESS>

/ok-to-test<EMAIL_ADDRESS>

/ok-to-test<EMAIL_ADDRESS>


Refs #15902 -- Deprecated storing current language in the session.

I pushed some edits. I made a few edits in the first commit before I realized a separate commit would make follow up review easier.


Bumped Mesos to 1.4.0-rc1.

High Level Description
Bumping Mesos to 1.4.0-rc1
Related Issues
Checklist for all PR's

[ ] Included a test which will fail if code is reverted but test is not. If there is no test please explain here:
Replying on Mesos test suite.
[x] Read the DC/OS contributing guidelines
[x] Followed relevant code rules Rules for Packages and Systemd

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[x] Change log from the last version integrated (this should be a link to commits for easy verification and review): Mesos changelog
[ ] Test Results: [link to CI job test results for component]
[ ] Code Coverage (if available): [link to code coverage report]

PLEASE FILL IN THE TEMPLATE ABOVE / DO NOT REMOVE ANY SECTIONS ABOVE THIS LINE
Instructions and Review Process
What is the review process and when will my changes land?
All PRs require 2 approvals using github's pull request reviews.
Reviewers should be:

Developers who understand the code being modified.
Developers responsible for code that interacts with or depends on the code being modified.

It is best to proactively ask for 2 reviews by @mentioning the candidate reviewers in the PR comments area. The responsibility is on the developer submitting the PR to follow-up with reviewers and make sure a PR is reviewed in a timely manner. Once a PR has 2 ship-it's, no red reviews, and all tests are green it will be included in the next train.

@mesosphere-mergebot bump-ee

CC: @adam-mesos @Gilbert88 @vinodkone

@mesosphere-mergebot label Ready For Review

@mesosphere-mergebot bump-ee

LGTM!


Scroll up when you press a tab

Kind (Required)

Improvement

Overview (Required)

It seems that we need to communicate the event well

Links

Can I try it ? 🙋♂

Thanks! Assigned!


Update nf-tests and language server fixes

Fix image in usage.md.
Fix small warnings and errors with updated language server.
def has been added when necesary, `
:use instead of,` in assertions,
_ added to variables not used in closures,
for loop replaced by .each{},
remove unused code / input.
Fix getFileExtension function.

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/phaseimpute branch on the nf-core/test-datasets repository.
[ ] Make sure your code lints (nf-core pipelines lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

The scope of the PR has been changed to only fix the language server and nf-test updates.
The fulltest changes has been moved to #158


Update JavaScript Twilio Link

Link to the JavaScript version of the examples was out of date, so updated it to one that resolves.

Fixing in the private repo.

Fixing in the private repo.


Connection in read-only mode

Hi,
Is there a way to put the connection in read-only mode ?
Thank's

What is connection read-only mode in Postgres? Do you mean read-only transactions(https://www.postgresql.org/docs/current/sql-set-transaction.html)?

Yes, this is what I mean

Have you tried scheduling a query to control it directly?

What I am currently doing is adding "SET TRANSACTION READ ONLY" for each Sql query.
I want to do this using the client API. Is it possible ?
Thank's

There's no specific API for this, I wonder does it make any difference between calling such an API and a query :-)

I mean , open transations in read only mode using reactive-pg-client ;-)

I agreed we could add such APIs for the transactions characteristics, you can check the https://github.com/eclipse-vertx/vertx-sql-client/issues/432

It would be interesting ( at least for me :-) )
Thank you


MetricWrapperBase.remove() should accept kwargs in the same way as label() does

https://github.com/prometheus/client_python/blob/master/prometheus_client/metrics.py#L160
Making it usable as ctr.labels(...).remove() can also be a useful enhancement, by holding a reference to the parent Counter inside children.

What's your use case for this? Remove should be used pretty rarely to start with.

We have a system under monitoring whose subsystems (each with its own metrics, distinguished by a label) can dynamically be added or removed once in a while depending on external events. Imagine hot-[un]plugging of storage devices.

That sounds like you should be using custom collectors rather than direct instrumentation.

I'm rather hesitant to start a philosophical design discussion here, when we already have a functional system and all I propose is improving the usability of an existing API

This is a usage question that was answered, so closing.


Issues with "long term debugging" for Rails - Attached with rdbg

I have a set of issues, probably related. If not, I can file separate issues.
When debugging rails application, I do the following:

run the application with rdbg -O -n -c -- bin/rails server -p 3000
set some breakpoints in vscode
attach the debugger in vscode
reach the breakpoint in app
breakpoint correctly fires and vscode pops up

But now:

if I add a breakpoint, it doesn't work
if I remove a breakpoint, it still fires

I have to restart app and reattach debugger. Desired behaviour would be, that this "adjusts automatically". Is this a known limitation of how rdbg works or is that some problem on my side? Thanks

Hmm, it looks like an unexpected behavior. Could you show us the sample program to reproduce this problem?

Hm, just created a fresh new test app, and that works correctly with the same settings of vscode, extensions, ... Unfortunately the one I'm working on is not open source yet, so I can't provide it. If you have any idea how to debug, pls let know. If not, you can close. Thanks

I see. This is the first time I've seen this issue.
I leave this ticket open. Please let us know when you can reproduce the problem. Thank you.


issue-120: Profile page integration block code

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
Fix #
Test URLs:

Before: https://main----.hlx.page/
After: https://----.hlx.page/

@shehjadkhan-ansys - could you please refer to other PRs and correct the issue number , before and after links so that the page performance check will complete.  Before is - the state of the page before merging code into main branch and after is the link to issue branch.


Correct translatable string from Bitcoin to Paycoin

This fixes an issue raised by a translator on Transifex.
Will push a translation master file update in a future pull closer to the next release.

LGTM! :+1:


Add inputFormatters option in DatePickerDialog and InputDatePickerFormField

Use case
When using DatePickerDialog or InputDatePickerFormField in some Android devices(E.g. Samsung)  slash symbol(/) is not available for TextInputType.datetime, therefore the only way to use DatePickerEntryMode.input mode is to use a different keyboardType which makes it less efficient.
Proposal
Add inputFormatters option which will allow developers to use something like mask_text_input_formatter to autocomplete slashes and improve the overall usability of the DatePickerEntryMode.input and DatePickerEntryMode.inputOnly modes.

Hi @Pana-g
I still can input the slash symbol(/) when using keyboardType: TextInputType.datetime as below sample code on my Samsung device Samsung Galaxy Tab A7 Lite, Android 12 OneUI 4.1, SM-T225:

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

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  void onPressed() {
    showDatePicker(
      keyboardType: TextInputType.datetime,
      context: context,
      initialDate: DateTime.now(),
      firstDate: DateTime(1970, 1, 1),
      lastDate: DateTime(2100, 12, 31),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: onPressed,
          child: const Text('Show date picker'),
        ),
      ),
    );
  }
}

Demo
https://user-images.githubusercontent.com/104349824/201584466-7c7351f3-a14a-459a-98e3-ff6cbc359601.mp4

Can you share the affected device info?

Hi @huycozy
Thanks for your quick response. Using the sample code you provided in a Samsung Galaxy Tab A7 10.4 (2020) which uses Samsung Keyboard there is no slash symbol(/) option as you can see in the Demo below.
Demo
https://user-images.githubusercontent.com/21154472/201873099-183e7441-00dc-4373-9530-a4d8995ce309.mp4

@Pana-g It seems the issue only reproduces on specific devices as I don't see it on my other devices.
I also see you filed a PR for this. Labeling this issue for further tracking/investigation. Thank you!

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.3.8, on macOS 13.0 22A380 darwin-x64, locale en-VN)
    • Flutter version 3.3.8 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 52b3dc25f6 (23 hours ago), 2022-11-09 12:09:26 +0800
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (3 available)
    • iPhone 14 Pro Max (mobile) • 332079AF-E895-4685-910E-7B1E18B0C6B8 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-0 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 13.0 22A380 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[!] Flutter (Channel master, 3.6.0-3.0.pre.48, on macOS 13.0 22A380 darwin-x64, locale en-VN)
    • Flutter version 3.6.0-3.0.pre.48 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 93c4b09e62 (15 minutes ago), 2022-11-15 18:07:50 -0800
    • Engine revision baad8f2c55
    • Dart version 2.19.0 (build 2.19.0-403.0.dev)
    • DevTools version 2.19.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (3 available)
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos            • darwin-x64     • macOS 13.0 22A380 darwin-x64
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

same issue: no /
return InputDatePickerFormField(
  keyboardType: TextInputType.datetime,
  initialDate: DateTime.now(),
  firstDate: DateTime.now(),
  lastDate: DateTime.now().add(Duration(days: 7)),
);

flutter doctor -v:
➜  ~ flutter doctor -v
[✓] Flutter (Channel stable, 3.7.3, on macOS 12.6 21G115 darwin-x64, locale
    en-BR)
    • Flutter version 3.7.3 on channel stable at /Users/rubensmelo/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (10 days ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/rubensmelo/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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.13+0-b1751.21-8125866)

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

[✓] Connected device (3 available)
    • SM A325M (mobile) • RX8RA0HZNXD • android-arm64  • Android 13 (API 33)
    • macOS (desktop)   • macos       • darwin-x64     • macOS 12.6 21G115
      darwin-x64
    • Chrome (web)      • chrome      • web-javascript • Google Chrome
      109.0.5414.87

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@Pana-g made some progress on this in https://github.com/flutter/flutter/pull/115144, if anyone would like to pick it up and land it that would be a good place to start! See the comments in that PR for next steps.


请问一下Tugraph支持向量检索or混合检索（向量+关键词）吗

Is your feature request related to a problem? Please describe.
A clear and concise description of the problem.
Describe the solution you'd like
A clear and concise description of what you want to happen and any alternative solutions or features you've considered.

暂时还不支持向量的存储和检索


Support hot-reloading by caching ImGui context in initially loaded DLL

As it stands UnrealNetImgui is not hot-reload friendly. UE4 supports the hot-reloading of code by building and loading additional instances of DLLs. If the user rebuilds while NetImGui is running, the first call to ImGui:: methods will crash as GImGui is null in that DLL.
This change supports that workflow by providing a hook that can be called to ensure the ImGui context is correct for hot-reloaded DLLs.
To fully support this the game project must call into this hook at an appropriate time. One way to achieve this is by creating a UEngineSubsystem that calls the FNetImguiModule hook as follows.
// Ensure that hot-reloaded DLLs have their ImGui context set
UCLASS()
class UNetImGuiContextRefreshSubsystem : public UEngineSubsystem
{
	GENERATED_BODY()

protected:
	virtual void Initialize(FSubsystemCollectionBase& Collection) override;
	virtual void Deinitialize() override;
};

...

void UNetImGuiContextRefreshSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
#if NETIMGUI_ENABLED
	FNetImguiModule::EnsureImGuiContext();
#endif // NETIMGUI_ENABLED
}

void UNetImGuiContextRefreshSubsystem::Deinitialize()
{
}

Looks good. Thanks!

Wouldn't always calling FNetImguiModule::IsDrawing() before calling ImGui drawing commands, prevent this issue?

I'd have to check, but I believe I was still getting a crash despite having that check. Even if it doesn't crash nothing would be drawn after a hot-reload.
Let me at least double-check that FNetImguiModule::IsDrawing() is enough to prevent a crash.

FNetImguiModule::IsDrawing() is true in the original DLL after a reload. That's because ImGui::GetCurrentContext() is set correctly in that DLL. After a hot-reload I have code that runs in the original DLL (e.g. FNetImguiModule::Update()) and in the reloaded DLL.
To reproduce this I did the following:

Launched my project with the debugger attached from VS
Connected to NetImgui
Ran a second VS instance, touched a file and built the project

So, I was trying to reproduce the hot reloading issue, but I seem to be having issue using the 'Hot reload' feature. It always fails to get write access to UE4Editor-NetImgui.dll, so nothing gets reloaded. :/

Are you building Unreal from source? I am in my use case. AIUI UnrealBuildTool should detect the dll is in use and build a second dll (e.g. MyGameProject/Plugins/NetImgui/Binaries/Win64/UE4Editor-NetImgui-0001-Win64-DebugGame.dll) alongside the original (e.g. MyGameProject/Plugins/NetImgui/Binaries/Win64/UE4Editor-NetImgui-Win64-DebugGame.dll).

Yes, building UE4 from VisualStudio 2019. Tried both "launch sample project editor->detach->build" and "Launch editor from EU4 project->compile sample project" with same result of locked dll output.
I'll have to see if I can find a solution to this problem online.

I managed to get the Hot-reloading working. The NetImgui plugin needed to be in the project plugin folder (instead of  Engine).
I have been testing and unable to get a hot-reload crash (without this pull request).

I Compile->Debug run my sample project from VisualStudio
Modify a NetImgui file (disabled font push/pop)
Recompile NetImgui with Compile button in the editor
Everything works fine for me (and I can see the the new code if in effect)

Also tested this approach

I Compile->Debug run my sample project from VisualStudio
Set breakpoints in NetImgui Startup/Shutdown
Open the Window->Developer Tools->Modules window
Find the NetImgui module and click recompile
My breakpoints get called properly

So, the issue you are having, is that in the middle of unload/load, it is possible that the game code is trying to draw Imgui? Is your code using FNetImguiModule::IsDrawing() like in my sample actor?

In my use case the module's Startup & Shutdown calls will always be made in the originally loaded DLL, not the hot-reloaded DLL.
Let me try the approach you used (without the workaround) and see what result I get. The approach I used was the build from a second VS instance, not to use the the Unreal Editor Modules UI.

Had you made a change that required recompilation? There could be an optimization in the Modules UI that doesn't actually trigger a hot-reload if there are no changes.

Had you made a change that required recompilation? There could be an optimization in the Modules UI that doesn't actually trigger a hot-reload if there are no changes.

I checked. Hot-reload always occurs.

In my use case the module's Startup & Shutdown calls will always be made in the originally loaded DLL, not the hot-reloaded DLL.
Let me try the approach you used (without the workaround) and see what result I get. The approach I used was the build from a second VS instance, not to use the the Unreal Editor Modules UI.

So I only get the crash if I build via a second VS instance. Unreal is handling those two workflows differently.

In my use case the module's Startup & Shutdown calls will always be made in the originally loaded DLL, not the hot-reloaded DLL.
Let me try the approach you used (without the workaround) and see what result I get. The approach I used was the build from a second VS instance, not to use the the Unreal Editor Modules UI.

I get the crash in both workflows. What may be significant is that I am making ImGui:: calls from a second game-specific module, not the NetImgui plugin itself. Specifically there is call to ImGui::SetNextWindowSize() that crashes because GImGui is nullptr, but I would expect any call into ImGui:: code to crash.

Ah, that must be it! Makes sense. I will retest by adding ImGui drawing code from the game sample module. Thanks.

I have been able to reproduce the issue (by calling Dear ImGui code inside sample dll) and found the cause of the problem.
It seems that with HotReload, 2 NetImgui dll remains loaded (first one not released).

The 1st dll is uninitialized, with its associated Dear ImGui context set to null. The 2nd dll is behaving as expected, with a new context created and connection established.

When the Sample dll makes calls to NetImgui, things are working properly (calling Dear ImGui functions from its dll).
When the sample makes call the Dear ImGui function directly, these are still pointing to the original dll...

At the moment, I am not sure how Unreal does its HotReload, but it probably doesn't like that I do a #define IMGUI_API NETIMGUI_API to enable exporting the Dear ImGui methods. Looks like it doesn't find them when patching the code. (
Once I find a solution to this, I'll probably rollback this Pull Request, since it shouldn't be needed.
Note: A quick fix might be for me to just do a quick search/replace of the IMGUI_API string instead of relying on pre-processor, but I'd like to avoid touching the Dear ImGui code everything I update this.

Hmmm, this might be working 'as designed'.
(...\Engine\Source\Developer\HotReload\Private\HotReload.cpp : 794)
// Abandon the old module.  We can't unload it because various data structures may be living
// that have vtables pointing to code that would become invalidated.
ModuleManager.AbandonModuleWithCallback(ShortPackageFName);

// Load the newly-recompiled module up (it will actually have a different DLL file name at this point.)
bReloadSucceeded = ModuleManager.LoadModule(ShortPackageFName) != nullptr;

When calling thing through the GetModule(), things are working fine. When skipping the Getmodule (making the Dear ImGui function call directly, we are using the original dll). Now have to see if there's any way for the 2nd Dll to access the 1st Dll ImGui function, but I doubt it. Other option could be for the Module to return the Dear ImGui context and set it from the Sample code :/

I believe the latest version will solve your issue, without needing some callbacks or special function call.
I rolled-back your changes, to something simpler and not requiring user to manage this. Your changes were working because of the added Imgui::SetCurrentContext(). My fix is similar, I just inserted it directly in FNetImguiModule::IsDrawing(). Because that function is static and declared in the header, it ends up being called in the SampleDll, thus calling the 1st dll function.

That is excellent work. Thank you very much for being so patient and diligent with this. I will take it for a spin and let you know.

I can confirm that https://github.com/sammyfreg/UnrealNetImgui/commit/05d204b0890c5a64c46bd9712eaaca1a5e787c0c fixes this issue without the complications introduced by the this PR. Thanks again!

I'm glad people are finding this useful and actually using it :)
I am not sure about the need to Hotreload this dll (unless you have your ImGui drawing code in it), but it's good to make sure everything is working as expected.


"Non workspaced" monorepo editable dependencies path resolution is by relative path.

Hey there, and thanks for uv!
I am trying to setup a monorepo with editable dependencies.
(I don't want to use the workspace feature because
mostly because you can import stuff you are not allowed you don't need to (it also affects IDE completions)
Anyways thats my setup:
.
├── hello.py
├── libs
│   └── sdk
│       ├── pyproject.toml
│       ├── README.md
│       ├── src
│       │   └── sdk
│       │       ├── amaizing.py
│       │       ├── __init__.py
│       └── uv.lock
├── LICENSE
├── pyproject.toml
├── README.md
└── uv.lock

libs/sdk/pyproject.toml
[project]
name = "sdk"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = []

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
sources = ["src/sdk"]

./pyproject.toml
[project]
name = "uv-monorerpo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "sdk",
]

[tool.uv.sources]
sdk = { path = "libs/sdk", editable = true }

hello.py
def main():
    def this_fails():
        from sdk.amaizing import so_amaizing  # what I would expect
        print(so_amaizing())
    def this_works():
        from libs.sdk.src.sdk.amaizing import so_amaizing # reality
        print(so_amaizing())
    this_works()
    this_fails()

if __name__ == "__main__":
    main()

As you can see you can only import the sdk package via its relative path from ./pyproject.toml (normalized with dots) which is kinda weird.
here is the demo project https://github.com/nrbnlulu/uv-monorerpo

Ok found it. you should remove this entry
[tool.hatch.build.targets.wheel]
sources = ["src/sdk"]

otherwise it would generate wheels for whats inside "src/sdk" :disappointed:


Improve filtering helm chart list by repo

fixes #4655

Codecov Report

Merging #4714 into master will decrease coverage by 0.04%.
The diff coverage is 35.55%.

@@            Coverage Diff             @@
##           master    #4714      +/-   ##
==========================================
- Coverage   54.44%   54.40%   -0.05%
==========================================
  Files        1120     1120
  Lines       38961    38976      +15
  Branches     4904     4904
==========================================
- Hits        21211    21203       -8
- Misses      17574    17597      +23
  Partials      176      176

only one repo? don't show. still show if only artifact hub
width of filter panel


Warning: Failed prop type: Required prop source was not specified in SelectInput.

Hi, when following the example using a SelectInput inside a ReferenceInput, there is a warning in the console log saying that the 'source' property is missing.
Since the ReferenceInput clone its children and add the source, it seem to work properly, but it would be great to remove that warning.
Removing the required in the SelectInput doesn't seem to be the appropriate solution, do you have a better idea?

Fixed by #81


Added rotate matrix program in Java.

I've added rotate matrix program in Java in SDE Striver's sheet.

Write the complete code & rename the file

import java.util.*;
Use the file name Rotate_Matrix.java.

If you appreciate my work, please 🌟 this repository. It motivates me. 🚀


Return full payload from batch_upsert

Changes the return signature of batch_upsert from a list of records to a dict
Iterates over multiple pages of inputs and combines them all into a single response
Fixes #280 – FYI @awb715

Thank you for this fix!


Where does lazydocker obtain the "Project" string?

Hi,
I got all my docker stuff in ~/docker/[container_name] Usually I cd into a stack's subdir and then run lazydocker and it displays the subdir's name as "Project" in top left corner.
I got 1 stack (librenms) that misbehaves. When I run lazydocker in ~/docker/librenms, for split second it will show (correctly) librenms, then it will change to nextcloud. I was wondering why, where does lazydocker get this string from? I have a nextcloud stack in ~/docker/nextcloud that gets called nextcloud by lazydocker, but why would it pick the name for other directory too? Nothing in docker-compose.yml mentions nextcloud.
the docker-compose.yml in question: https://o.o5.ddns.net/yYgg4

See the discussion in this PR thread: https://github.com/jesseduffield/lazydocker/pull/88
We're pulling that project name based on the 'com.docker.compose.project' tag from docker inspect

I see thanks for the explanation, must've been something with the image back then, I've since moved the stack to different host and forgot about the issue. Just checked and the inspect and project name are now ok
pi@pi-docker:~/docker/librenms $ docker inspect librenms | grep project
                "com.docker.compose.project": "librenms",
                "com.docker.compose.project.config_files": "/home/pi/docker/librenms/docker-compose.yml",
                "com.docker.compose.project.working_dir": "/home/pi/docker/librenms",

and the lazydocker project name comes up as librenms


Automatic slot addition/removal to Scene node

logic-style, after connecting / disconnecting inputs, automatically remove/add input slots so that there is an extra one in the end of the list
(and remove the add/remove slot buttons)

This is done ^_____^


Release Google.Cloud.Compute.V1 version 1.0.0-beta05

Changes in this release:

Commit 5f323c1: fix: make parent_id fields required compute move and insert methods (issue 686)
Commit f8f4704: feat: Add classes with generated constants for enums for Compute
Commit 238f43c: feat: Add helper methods for converting Compute enum values
Commit 5d969a2: feat: Switch to string enums for compute (issue 685)

Created release for Google.Cloud.Compute.V1-1.0.0-beta05


XSS vulnerability in APOLLO_STATE

JSON.stringify is not XSS safe in HTML. It could contain eg. a  tag, which would allow an attacker to inject whatever they want into your page.
See http://redux.js.org/docs/recipes/ServerRendering.html#inject-initial-component-html-and-state

@corydolphin I'm not quite following you, where is the XSS vulnerability?
JSON.stringify is executed server-side and produces string. This results in the following code executed client-side:
window.APOLLO_STATE = 'some string'
What XSS vulnerability we have here?

@corydolphin Okay, I understand now. On client-side the code is actually:
window.__APOLLO_STATE_ = {object definition}

Something seems to be wrong.
I get Uncaught SyntaxError: Unexpected token {, when starting...

If I inspect html I see:
window.__APOLLO_STATE__=${"apollo" ... }}}

@mitjade Okay, I have rewritten this commit

Works now!

@corydolphin Many thanks for reporting this!


(Heads up) Switch to SHA256

Hash function compatibility between Eth1 and Eth2 is important for several reasons:

Eth1 deposits into Eth2
Eth1 finalisation using Eth2 (unlocking two-way transfers of ETH)
Eth1 execution engines using Eth2 data availability

In December 2018 we ditched Blake2b on Eth2 because of incompatibility with Eth1. In doing so we fell back to Eth1's native Keccak256. It turns out Eth1 has a SHA256 precompile. This opens up the possibility to use SHA256 on Eth2. Below is a breakdown of the pros and cons of SHA256 vs Keccak256.
Pros

Interoperability: SHA256 is the de facto blockchain standard. It is adopted by Bitcoin, Filecoin, Algorand, Chia, Dfinity, Cosmos, Bitcoin Cash, Litecoin, EOS, Tron, etc. (A notable exception is Polkadot which is planning to use Blake2b and xxHash. This is somewhat ironic as a key selling point of Polkadot is interoperability.)
Speed: SHA256 is ~50% faster than Keccak256.

Cons

Gas: The SHA256 precompile is twice the gas cost of the Keccak256 opcode. (This is arguably a mispricing because SHA256 is faster than Keccak256.)
Length extension: Unlike Keccak256, SHA256 does not provide built-in protection against length extension attacks. Various protections are possible.

The goal of this issue is to provide a heads-up and encourage discussion. My personal gut feel is that interoperability alone outweighs the two listed cons.

As a side note I'd put that "ewasm on eth1.x" proposes to introduce blake2 support on Eth1, which may happen in time before the release of Eth2.  This might be a point to consider.

I don't have a strong preference but if I had to vote it would be against.

When looking into those timelines, I feel like SHA2-256 will have critical issues soon.

Source: http://valerieaurora.org/hash.html

Keccak256 vs SHA3-256 is already confusing in Eth1 and now we're adding SHA2-256.

Speed: SHA256 is ~50% faster than Keccak256.

From https://github.com/ethereum/eth2.0-specs/issues/218:

The performance benefits of Blake cannot be relied upon because STARK/SNARK-friendly hashes will likely be no faster than SHA3.

Is that assumption was changed anyhow?

Is that assumption was changed anyhow?

Speed of hash functions can be evaluated in different contexts. In the "plain-text model" (i.e. naive execution) SHA256 is faster than Keccak256. In the context of MPCs/SNARKs/STARKs all binary hash functions (SHA2, SHA3, Blake) are pretty terrible.

When looking into those timelines, I feel like SHA2-256 will have critical issues

I'd say that SHA2 only needs to survive another 5-10 years. The reason is that we intend to migrate to a STARK-friendly hash function when we make the cryptographic primitives quantum-secure with STARKs. Are there cryptoanalysts who believe SHA2-256 will be broken within 10 years?

I'd say most cryptographers think the SHA2 breaking is less likely than significant improvements in classical solutions to the discrete log problem or composite prime factoring.
Here was our reasoning for choosing SHA256 in the Cosmos Merkle Tree.
https://github.com/tendermint/iavl/issues/38
I'd say the right mix of hash functions in any blockchain protocol is SHA256 and a generic function SPONGE function from KECCACK family for Merlin. https://docs.rs/merlin/1.0.2/merlin/

a generic function SPONGE function from KECCACK family for Merlin

Why not use SHA256 for Merlin?

So Merkle Damgard style hash functions accumulate input and then produce 1 output.
Sponge constructions allow you to put in some input and take out some output and then put in some more input and then get some more output etc.
What's interesting about the KECCAK family is not when you are using them in the same way as Merkle Damgard hashes but when you are using the unique properties of it's SPONGE construction.

This is mentioned in the IAVL thread but SHA256 is getting support in future hardware Intel processors which makes it as fast as BLAKE2.

Interesting suggestion from my colleague, Nicolas Gailly: https://multiformats.io/multihash/
This wouldn't be supportable natively in Eth1: the deposit contract would have to prepend the metadata to the hashes it outputs for the Merkle path, but that's relatively easy. This would give us good agility around hash functions for the foreseeable future.
It doesn't necessarily give us interop with other chains out-of-the-box, but could make that realistic with a simple shim layer to insert the appropriate hash metadata. Then we could interoperate with any chain using any of the hashes we choose to implement in the client.

Just thought I'd weigh in with some thoughts. It seems that this problem can be viewed via one of two lenses:

Compatibility
Future-proofing

Compatibility: The advantages to using SHA256 for the sake of compatibility are clear, as are are the implementation/speed advantages over Keccak (e.g. Intel's instruction sets). Backwards compatibility is the reason blake2b has been decided against for Eth2.0, however there are some indicators that suggest Eth1 will eventually be able to compute blake2b efficiently, at which point it would make a lot of sense for Eth2.0 to use blake2b.
While maintaining backwards compatibility is clearly essential, I believe one of the Eth2.0 project goals is to pave the way for a better Ethereum overall; which I think means that it should exert a positive influence on Eth1. If we think that blake2b is a better function, I would hope that Eth1 can adapt in due course.
From my understanding, the main reason that using a hashing algorithm which is inefficient in Eth1, such as blake2b, is that it inhibits the ability to move data/ether from Eth2.0 back into Eth1; i.e. it prevents Eth1 from reading/verifying the Eth2.0 state. I imagine that regardless of the hash function, Eth1 will require an update before it can perform verification in any case, and so introducing a more efficient hash function in the same update will be comparatively easier. Also, this would only need to happen once Eth2.0 is well established, and Eth1 decides to support it.
Future-Proofing: Since Bitcoin's PoW mechanism uses SHA256, the global potential/expected hashes-per-second rate for SHA256 is far higher than any other hash function. There exist clear incentives for developing faster hashing, and more sophisticated attacks for, SHA256; demonstrated so far by Bitcoin's historical hashrate. I think that this increases the likelihood of hash collisions in the long-term. As such, I don't think it's a good long-term strategy to depend solely on SHA256. Keccak256 however, does not currently suffer from this issue, and so I would consider it slightly more future-proof than SHA256, but much less than blake2b.
I also don't believe the  length-extension attack is a disadvantage of SHA256 in our use case, reasons for which have been explained by @zmanian.
Personally, I feel the goal of choosing the correct technology with good future-proofing is more important than maintaining compatibility. In this case, I think blake2b is the best choice, and I can understand why Polkadot made this choice. However, if we have collectively decided to not use blake2b, then I don't think the future-proofness of Keccak256 outweighs the compatibility advantages of SHA256.
I think @benjaminion's suggestion of using multihash is a fantastic one. The implementation overhead for supporting multiple hashes in this format is negligible and it means we get the ultimate flexibility in choosing hash functions on-the-fly. I imagine that this would mean particular blocks or shards could select a hash function according to their goals. Maybe, in the beginning, only certain blocks need to be verified by Eth1, and those blocks can simply choose SHA256, while others can choose blake2b, thereby having selective interoperability and allowing us to adjust the slider between compatibility/future-proofing as we go. It also means that if vulnerabilities are discovered in any hashing algorithm, deprecating a function would be considerably easier. Further, multihash is maintained by Protocol Labs, so I assume it would have good support in libp2p.
Summary:
I prefer:

blake2b
SHA256
Keccak256

But I don't think we should choose now and we should instead support multihash and allow any secure hashing algorithm.

I asked Dan Boneh

Do you think SHA256 will plausibly remain secure until 2030? What about 2040? SHA256 seems to be the "blockchain standard" we are inclined to favour, but concerns around its security have been raised. In particular, we are aware of the length extension attack on SHA256, and this website suggests "minor weaknesses".

and he responded

I guess you are asking about the collision resistance of SHA-256.   There is nothing known about the full SHA-256 that is better than the birthday bound.   Assuming no algorithmic improvements, and assuming Moore's law continues (a big assumption) then one could expect a collision to be found in about 75 years, which seems fine for your applications.   Quantum attacks also do not affect collision resistance.
However, the fact that NIST put out SHA-3 may suggest that there are non-public attacks against SHA-256 that are better than the birthday attack.  This is just speculation.   We have no information about this.


fix: optimize dra_zh_CN doc

Thanks for contributing!

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

the CI check failed , because all PR must be signed off
so pls add '-s' option when you are typing 'git add'

pls fix relevant english doc to completely finish it
https://github.com/spidernet-io/spiderpool/pull/3491/files


How do I disable (format +onsave) when on js2-mode

What are you trying to achieve?
To disable (format +onsave) when working with Javascript (js2-mode)
What have you tried?
Below are the things I tried to put in the config.el file
; while deleting the .prettierrc based on issue #2027
(add-hook! 'js2-mode-hook
  (unless (locate-dominating-file default-directory ".prettierrc")
    (format-all-mode -1)))

; trying to force the (unless)
(add-hook! 'js2-mode-hook
  (unless nil (format-all-mode -1)))

;;
(add-hook 'js2-mode-hook 'format-all-mode)

;;
(add-hook 'js2-mode-hook
    (lambda () format-all-mode -1))

And many more variations of the same thing and all I got was either a broken configuration (due to wrong Elisp) or nothing to happen at all

You can do it by adding js2-mode to +format-on-save-enabled-modes list (defined in modules/editor/format/config.el) which contrary to its name serves as a black list when first item in the list is not.
(add-to-list '+format-on-save-enabled-modes 'js2-mode)

Thanks for the response @AloisJanicek
I tried your solution, but it does not seem to work :/
I put the line in my ~/.doom.d/config.el and executed doom refresh (not sure if its needed in this case) but it still formats "using prettier".
Probably a "dump" of my configs would help to see if I messed up on something

Oh, my bad!
We must ensure that we are appending to the list by adding t as 3rd argument to the add-to-list.

Thank you! It worked :smile:


Remove OutputReport::name due to misleading name and behavior

Currently OutputReport::name is used for documentation purposes and semantically is closer to description. Also documentation for is misleading user to think that it contains same value as id
I suggest 2 possible solutions:

remove name, replace it's usages with id
rename name to description

Personally I vote for first option

Exactly 2 places:
    fun write(filePath: Path, detektion: Detektion) {
        val reportData = render(detektion)
        if (reportData != null) {
            assert(filePath.extension == ending) {
                "The $name needs to have a file ending of type .$ending, but was ${filePath.fileName}."
            }
            ....
        }
    }

private fun handleOutputReports(result: Detektion) {
        val extensions = OutputReportLocator(settings).load()
        for (report in extensions) {
            val filePath = reports[defaultReportMapping(report.id)]?.path
            if (filePath != null) {
                report.write(filePath, result)
                result.add(SimpleNotification("Successfully generated ${report.name} at ${filePath.toUri()}"))
            }
        }
    }

Both are logs, I think putting id instead of name in both places would be better. Consumer can search for it in their code base, name is not mentioned anywhere except for logs

Agree. We can remove name and use I'd for that. Do you want to send the pr?

OK, will do

https://github.com/detekt/detekt/pull/6500

Fixed https://github.com/detekt/detekt/pull/6500


initial entries

This was an initial take at ports to allow. Once we get to the point of adding worker nodes it may need to massaged especially to allow the flannel coms. The testing I did on my side was to access the cluster from another instance within the same CIDR using the kubeconfig and then create an application using nodeport and verify I can access.

Assist #86 but does not close

/approve
/lgtm


Move puffin crate contents inside iceberg crate

Part of https://github.com/apache/iceberg-rust/issues/744
Summary

Move contents of the puffin crate over to the existing iceberg crate
Delete the puffin crate

Context
@liurenjie1024 raised a good question about why we needed a separate puffin crate at all.
On reflection, I realized that there's no particularly strong reason to have a separate puffin crate.
Hence this PR.

I can see value in both. It could be that folks just want to have logic to read the Puffin files, and then they could just use the crate (for example PyIceberg) without having to pull in core.

Thank you, @Fokko, for the feedback. Since neither of us has a strong opinion on this and the suggestion comes from @liurenjie1024 with agreement from @fqaiser94, I believe there’s no need to wait for another round of review. This change can easily be reverted at any time if we find it to be incorrect. So, let’s move forward.

That makes sense @liurenjie1024 thanks for the explanation 👍  Coming from Java/Python, everything in Rust is small anyway, so I think we're good by moving Puffin into Core.


Bump sbt version to 1.3.12

Closes #794
Change to latest sbt version to stay up to date.
Checklist
Please include the following checklist in your PR:

[ ] The documentation has been updated if necessary.
[ ] All code conforms to the Scala and Java style guides.
[ ] All code has been tested where possible.

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


Feat: expose file's sequence number for interface data_files_of_snapshot

Currently, data_files_of_snapshot returns a vector of DataFile which lacks sequence number information, so it can't be used to support MOR table scan. Any plan for a better interface?
pub async fn data_files_of_snapshot(
        &self,
        snapshot: &Snapshot,
    ) -> Result<Vec<types::DataFile>>

Closing for https://github.com/icelake-io/icelake/issues/279


Consider using electron-builder

electron-builder is an alternative to electron-forge that is fully compatible and has better support for Linux. You can see the changes at my fork. It requires no configuration and supports, in addition to all the electron-forge targets, non-broken Snap, Flatpak and AppImage builds.

Hi @aleksrutins, I haven't tried electron-builder yet, but I will soon. Please let me know if it works for you.


Does drywall support Oath2 workflows?

I'm interested in using drywall as a user management system however I need to be able to authenticate users from various other apps. I'd like to be able to use drywall as the source for users in my system.  Does drywall support this behaviour out of the box? Or could I integrate oauth2orize with it?

@fantapop  did you finally do it? Thanks

We ended up using jwt for our authentication instead.  Its a lot easier to
implement and understand than oauth.
On Thu, May 28, 2015 at 4:55 AM, existeundelta<EMAIL_ADDRESS>wrote:

@fantapop https://github.com/fantapop did you finally do it? Thanks
—
Reply to this email directly or view it on GitHub
https://github.com/jedireza/drywall/issues/169#issuecomment-106289146.

thanks @fantapop, you use Drywall with jwt? can you give me some tips/links to understand it better, thanks

http://jwt.io/ has good information.
Also be sure to checkout Frame which is the core API of Drywall, built with Hapi instead of Express. My more recent user system project, Aqua was built on top of Frame.


Translation for persian language farsi

Hello
I would ask you is there any plan for translation to the Persian/farsi language ?

Translations for all other languages besides English are provided by contributors.
Please check https://bagisto.com/en/ecommerce-language-translation-in-bagisto/ in case you want to start translating it yourself.

it's ok thank you, so can I send my translated files with a PR for Persian translation here?

Sure @wikiccu we are looking forward to your pull request.