[webview_flutter] onWebResourceError is invoked when calling goBack

Steps to Reproduce

Execute flutter run on the code sample
The GitHub page will appear, so go to any page.
Tap the back arrow in the lower left corner of the screen.
An error (The operation couldn't be completed.) is output to the console.

Expected results:
"The operation couldn't be completed." does not occur.
Actual results:
An error occurs in goBack and onWebResourceError is called.

Code sample

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.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({super.key, required this.title});

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  late WebViewController _webViewController;
  bool _isLoading = true;
  bool _canGoBack = false;
  bool _canGoForward = false;
  double _downloadPercentage = 0.0;
  String _title = '';

  @override
  void initState() {
    super.initState();
    if (Platform.isAndroid) WebView.platform = AndroidWebView();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(_title),
      ),
      body: Column(
        children: [
          _isLoading
              ? LinearProgressIndicator(
                  value: _downloadPercentage,
                  minHeight: 7.0,
                )
              : const SizedBox(),
          Expanded(
            child: Scrollbar(
              trackVisibility: true,
              child: WebView(
                initialUrl: 'https://github.com/',
                javascriptMode: JavascriptMode.unrestricted,
                onWebViewCreated: (controller) {
                  _webViewController = controller;
                },
                onPageFinished: (String url) async {
                  final title = await _webViewController.getTitle();
                  if (title != null) _title = title;

                  _canGoBack = await _webViewController.canGoBack();
                  _canGoForward = await _webViewController.canGoForward();

                  if (_isLoading) _toggleLoading();
                },
                onProgress: (progress) => _calculateProgress(progress),
                onWebResourceError: (error) async {
                  print(
                    'errorCode=${error.errorCode}, domain=${error.domain}, description=${error.description}, errorType=${error.errorType}, failingUrl=${error.failingUrl}',
                  );
                },
              ),
            ),
          ),
        ],
      ),
      persistentFooterAlignment: AlignmentDirectional.center,
      persistentFooterButtons: [
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            IconButton(
              icon: const Icon(Icons.arrow_back),
              onPressed: _canGoBack ? _webViewController.goBack : null,
            ),
            IconButton(
              icon: const Icon(Icons.arrow_forward),
              onPressed: _canGoForward ? _webViewController.goForward : null,
            ),
          ],
        ),
      ],
    );
  }

  void _toggleLoading() {
    setState(() => _isLoading = !_isLoading);
  }

  void _calculateProgress(int progress) {
    setState(() => _downloadPercentage = (progress / 100));
  }
}

Logs
Launching lib/main.dart on motucraft in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: PNRW3X92CC
Running pod install...
Running Xcode build...
Xcode build done.                                           15.8s
Installing and launching...
[VERBOSE-2:FlutterObservatoryPublisher.mm(101)] Failed to register observatory port with mDNS with error -65555.
[VERBOSE-2:FlutterObservatoryPublisher.mm(103)] On iOS 14+, local network broadcast in apps need to be declared in the app's Info.plist. Debug and profile Flutter apps and modules host VM services on the local network to support debugging features such as hot reload and DevTools. To make your Flutter app or module attachable and debuggable, add a '_dartobservatory._tcp' value to the 'NSBonjourServices' key in your Info.plist for the Debug/Profile configurations. For more information, see https://flutter.dev/docs/development/add-to-app/ios/project-setup#local-network-privacy-permissions
[VERBOSE-2:FlutterObservatoryPublisher.mm(101)] Failed to register observatory port with mDNS with error -65555.
[VERBOSE-2:FlutterObservatoryPublisher.mm(103)] On iOS 14+, local network broadcast in apps need to be declared in the app's Info.plist. Debug and profile Flutter apps and modules host VM services on the local network to support debugging features such as hot reload and DevTools. To make your Flutter app or module attachable and debuggable, add a '_dartobservatory._tcp' value to the 'NSBonjourServices' key in your Info.plist for the Debug/Profile configurations. For more information, see https://flutter.dev/docs/development/add-to-app/ios/project-setup#local-network-privacy-permissions
Debug service listening on ws://<IP_ADDRESS>:53972/NetNoqfwW10=/ws
Syncing files to device motucraft...
[Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
[Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
[Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
[Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
[Loading] 0x13b01a218 - [pageProxyID=6, webPageID=7, PID=21785] WebPageProxy::didFailLoadForFrame: frameID=3, isMainFrame=1, domain=NSURLErrorDomain, code=-999
flutter: errorCode=-999, domain=NSURLErrorDomain, description=The operation couldn’t be completed. (NSURLErrorDomain error -999.), errorType=null, failingUrl=null

pubspec.yml
name: webview
description: A new Flutter project.

publish_to: 'none'

version: 1.0.0+1

environment:
  sdk: '>=2.18.1 <3.0.0'

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.2
  webview_flutter: ^3.0.4

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_lints: ^2.0.0

flutter:
  uses-material-design: true

flutter analyze
% flutter analyze
Running "flutter pub get" in webview...                            357ms
Analyzing webview...

   info • Avoid `print` calls in production code • lib/main.dart:87:19 • avoid_print

1 issue found. (ran in 3.5s)

flutter doctor -v
% flutter doctor -v
[✓] Flutter (Channel stable, 3.3.2, on macOS 12.6 21G115 darwin-arm, locale ja-JP)
    • Flutter version 3.3.2 on channel stable at /Users/osaki/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e3c29ec00c (13 days ago), 2022-09-14 08:46:55 -0500
    • Engine revision a4ff2c53d8
    • Dart version 2.18.1
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/osaki/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • Java binary at: /Users/osaki/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/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.2)
    • Android Studio at /Users/osaki/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8815526/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.12+0-b1504.28-7817840)

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/osaki/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/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 Ultimate Edition (version 2022.2.2)
    • IntelliJ at /Users/osaki/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.2)
    • IntelliJ at /Users/osaki/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4167.29/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 2022.2.1)
    • IntelliJ at /Users/osaki/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.3739.54/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.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (4 available)
    • SC 02M (mobile)    • RF8MA2FM5PE               • android-arm64  • Android 11 (API 30)
    • motucraft (mobile) • 00008110-000679041A81801E • ios            • iOS 16.0.2 20A380
    • macOS (desktop)    • macos                     • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)       • chrome                    • web-javascript • Google Chrome 105.0.5195.125

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

• No issues found!

https://user-images.githubusercontent.com/35750184/192419292-d220ad38-4bc1-42ec-a631-d8e258db96c7.mp4

Hi @motucraft, thanks for filing the issue but I can not reproduce the issue on the latest stable and master channels.
I tested with both iOS simulator and physical device:

Simulator: iPhone 14, iOS 16.0
Physical device: iPhone 7, iOS 15.7

Please try loading other websites to see if you see the same log.
As far as I can see from your video the app is working properly. I don't know how this will affect the app. If possible, please describe this further.

@huycozy
Thank you for your response. I will check it out.

@huycozy
Sorry for the delay.

Physical device: iPhone 13, iOS 16.0.2
Xcode 14.0.1

I have tried changing to another website, but the situation remains the same.
I don't understand why onWebResourceError is called.
Here is the code with showDialog added.

Code sample
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.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({super.key, required this.title});

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  late WebViewController _webViewController;
  bool _isLoading = true;
  bool _canGoBack = false;
  bool _canGoForward = false;
  double _downloadPercentage = 0.0;
  String _title = '';

  @override
  void initState() {
    super.initState();
    if (Platform.isAndroid) WebView.platform = AndroidWebView();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(_title),
      ),
      body: Column(
        children: [
          _isLoading
              ? LinearProgressIndicator(
                  value: _downloadPercentage,
                  minHeight: 7.0,
                )
              : const SizedBox(),
          Expanded(
            child: Scrollbar(
              trackVisibility: true,
              child: WebView(
                initialUrl: 'https://stackoverflow.com/',
                javascriptMode: JavascriptMode.unrestricted,
                onWebViewCreated: (controller) {
                  _webViewController = controller;
                },
                onPageFinished: (String url) async {
                  final title = await _webViewController.getTitle();
                  if (title != null) _title = title;

                  _canGoBack = await _webViewController.canGoBack();
                  _canGoForward = await _webViewController.canGoForward();

                  if (_isLoading) _toggleLoading();
                },
                onProgress: (progress) => _calculateProgress(progress),
                onWebResourceError: (error) {
                  print(
                    'errorCode=${error.errorCode}, domain=${error.domain}, description=${error.description}, errorType=${error.errorType}, failingUrl=${error.failingUrl}',
                  );

                  showDialog(
                    context: context,
                    builder: (_) => const AlertDialog(
                      title: Text('onWebResourceError is called.'),
                    ),
                  );
                },
              ),
            ),
          ),
        ],
      ),
      persistentFooterAlignment: AlignmentDirectional.center,
      persistentFooterButtons: [
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            IconButton(
              icon: const Icon(Icons.arrow_back),
              onPressed: _canGoBack ? _webViewController.goBack : null,
            ),
            IconButton(
              icon: const Icon(Icons.arrow_forward),
              onPressed: _canGoForward ? _webViewController.goForward : null,
            ),
          ],
        ),
      ],
    );
  }

  void _toggleLoading() {
    setState(() => _isLoading = !_isLoading);
  }

  void _calculateProgress(int progress) {
    setState(() => _downloadPercentage = (progress / 100));
  }
}

https://user-images.githubusercontent.com/35750184/193379033-cdba7ebf-e12b-4de1-a306-3d72475d640d.mov

@motucraft thanks for updating the issue with more information as above. This issue is reproducible on the latest stable and master channels with webview_flutter: ^3.0.4
The sample code can be found at https://github.com/flutter/flutter/issues/112433#issuecomment-1264200637

Android: ✅
iOS: ❌

✅: No Issue ❌: Issue reproduced

Demo

iOS
Android

flutter doctor -v
[✓] Flutter (Channel stable, 3.3.3, on macOS 12.6 21G115 darwin-x64, locale en-VN)
    • Flutter version 3.3.3 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18a827f393 (10 hours ago), 2022-09-28 10:03:14 -0700
    • Engine revision 5c984c26eb
    • Dart version 2.18.2
    • 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.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode14.0.1.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.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] 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.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (4 available)
    • SM T225 (mobile)           • R9JT3004VRJ                          • android-arm64  • Android 12 (API 31)
    • 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 12.6 21G115 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 105.0.5195.125

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

• No issues found!

[✓] Flutter (Channel master, 3.4.0-36.0.pre.3, on macOS 12.6 21G115 darwin-x64, locale en-VN)
    • Flutter version 3.4.0-36.0.pre.3 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5cd15fd224 (2 hours ago), 2022-10-02 21:21:39 -0400
    • Engine revision a7785c48cd
    • Dart version 2.19.0 (build 2.19.0-265.0.dev)
    • DevTools version 2.17.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.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode14.0.1.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.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] 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.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (4 available)
    • SM T225 (mobile)           • R9JT3004VRJ                          • android-arm64  • Android 12 (API 31)
    • 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 12.6 21G115 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 105.0.5195.125

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

• No issues found!

Labeling this issue for further investigation from the team.

cc @bparrishMines

@motucraft I can't reproduce this error consistently, but I doesn't seem like one that is caused by the plugin. According to Apple,

NSURLSession sends this error to its delegate when a task is cancelled.

Is the website still working as intended? It's possible that an asynchronous task may have been cancelled and this is an error that could be ignored for this use case.
Also, I would recommend that you call setState(() {}) when u change _canGoBack and canGoForward in the example.

@bparrishMines
I have executed setState(() {}) in onPageFinished, but the situation does not seem to change.
onPageFinished: (String url) async {
  final title = await _webViewController.getTitle();
  if (title != null) _title = title;
  _canGoBack = await _webViewController.canGoBack();
  _canGoForward = await _webViewController.canGoForward();
  if (_isLoading) _toggleLoading();
  setState(() {});
},

I was thinking of consistently performing error handling when onWebResourceError is called, but is this the wrong way to use the package?

We should wrap the error here into a more generic "cancelled" WebResourceErrorType to make it easier for clients to filter this out when it makes sense for them to ignore it.

@bparrishMines @stuartmorgan
What are the workarounds that users can take at this time?

If you aren't interested in cancel events you can ignore errorCode=-999, domain=NSURLErrorDomain.

@stuartmorgan Hello, when I access the link, the onWebResourceError method will always trigger. In fact, the WebViewWidget has been destroyed and still triggers. I am using version 4.2.2.
link: https://www.nra.gov.cn/images/20230129.mp4


The description of the repo is… misleading ;)

"Prometheus instrumentation library for Go applications" should be "Prometheus instrumentation library for Python applications" I think.

Ugh, copy and paste bug. Fixed, thanks!

Thanks for the great project.


Medical Charges for Smokers and Non-smokers

In this project I have created an EDA and a prediction model based on the insurance.csv dataset and also I have been assigned this task for contributing in the LGMSOC 2021 as a participant.
Project Name : Medical Charges Analysis for Smokers and Non-smokers
Tool used : Jupyter Notebook
Requirements : numpy, pandas, matplotlib, seaborn, os, warnings
Task Taken : EDA and Model Creation

@Niketkumardheeryan I have created the PR for the project that I have been assigned, please evaluate it.

Issue #89


Improve focusing in ginkgo extensions

Current implementation of the ginkgo helpers doesn't handle focusing
correctly, this result in unnecessary *All helper calls which slow
down tests.
With additional logging we can check that filtered-out scopes are
being executed. Truncated stack trace where you can observe that
BeforeAll block is being scheduled from the runtime/ssh.go while
it supposed to be filtered.
goroutine 52 [running]:
runtime/debug.Stack(0x128f560, 0xc0008b4000, 0x244)
        /usr/lib/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
        /usr/lib/go/src/runtime/debug/stack.go:16 +0x25
github.com/cilium/cilium/test/ginkgo-ext.BeforeAll(0xc0003c7d00, 0xc0003c7d00)
        /home/ap4y/git/cilium/test/ginkgo-ext/scopes.go:202 +0x8c
github.com/cilium/cilium/test/runtime.glob..func15()                                                                                /home/ap4y/git/cilium/test/runtime/ssh.go:31 +0x79
...

This patch corrects filtering logic by testing regex match in all top
level Describe blocks and by improving matching method
implementation. Console output with the patch:
$ ginkgo --focus "RuntimePol" -v
Will run 27 of 27 specs

I have compared output with raw ginkgo and I think correct behavior is to show total unfiltered amount of tests, I will try to fix that.

Sorry after debugging this a bit more I realized that I was using system-wide ginkgo v1.14.1 and that version breaks extensions due to https://github.com/onsi/ginkgo/commit/d44dedf3e3dd9dedc4d8dc177a65cfc5a13a3f8c. Rolling back to 1.11 fixes this.


Add filtering of english words from entropy checks

By filter I mean, before alerting off of a secret, we check if an english word (of length 4 or greater) is in the string, and then don't alert off of it, in order to reduce false-positives.
To get the wordlist, we can either:

add an e.g. --word-list words.txt option
or
do what the How Bad Can It Git? paper did, and hard-code a list of 2,298 English words.

Once we have the wordlist, we have to do an Aho-Corasick type algorithm to efficiently tell if a secret has an English word in it. We can either:

write hacky regex code to make a trie regex out of the english words
or
Use the seemingly best python library for Aho-Corasick (there are other libs, but they don't look as good. And make it an optional dependency

For a first iteration, a word list argument and using a library seems to be the quickest way to get an MVP.
From the How Bad Can It Git? paper:
Words Filter
Another intuition is that a random string should not contain linguistic sequences of characters [12]. For this check, we compiled a dictionary of English words of length as least as long as a defined threshold. Then we searched each candidate string for each one of these words and failed the check if detected.
A trade-off exists in choosing this threshold. If it is too small, randomly occurring sequences that happen to create words will create false negatives (marking valid secrets as invalid), but if it is too large, legitimate words will be missed and create false positives (marking invalid secrets as valid). In our experiments, we set the word length threshold to be 5. This threshold was chosen as a best judgment after careful manual review; unfortunately, experimental derivation of this threshold was not possible given limited initial ground truth.
A dictionary of every English word would contain words that would not likely be used as part of a string in a code file and cause high amounts of false negatives. Therefore, we took the intersection of an English dictionary [45] and a dictionary of the 5 most common words used in source code files on GitHub [40]. The resulting dictionary contained the 2,298 English words that were likely to be used within code files, reducing the potential for false negatives.

PR was merged, going to close, will release a new version soon (today or tomorrow)
Note for posterity that, aside from e.g. /usr/share/dict/words, you'll probably have to add things like the following to get the most use out of this functionality
  .org
  addr
  http
  attr
  href
  html
  yaml
  info
  %.2d
  json
  uri
  debug
  value
  123456789
  abcd
  !@#$%^&*(
  utf-8
  ISO-
  %2c
  %3A
  Mon:
  Fri:
  Sat:
  Mon-
  Fri-
  Sat-
  5:30PM
  10AM
  6PM


Start with random heavy/assault

For completions sake

Would you accept a pull request for this? I forked your repo and added this, as well as the ability to start with more than 6 mechs (the excess go into storage).

Sure.

This is now in release 0.2.0


Stream events are no longer catched

Stream events are no longer catched - e.g. Tweet deleted event.

Todo - verify all events

Verified


Using a different AeroDyn module

Hi,
I am looking into switching from the BEMT to a different method for the calculation of the aerodynamic loads. Therefore, I would like to know how closely the different modules are linked together.

Can I just take the input variables and calculate the same output variables (which are those?) as AeroDyn does but with the new method?
Do other modules need more data besides the output information?
Are the calculations and functions calling the calculations spread all over the source code or do I just need to look in specific locations, i.e. FAST_Subs.F90?
Is the data between the AeroDyn module and the other modules linked by using the mesh map system?

How easily can the AeroDyn module be exchanged?
Thanks
Martin

Dear Martin,
OpenFAST is modular and data is encapsulated.  This means OpenFAST only communicates with modules through predefined interfaces (SUBROUTINES) and data is only transferred through these interfaces (as SUBROUTINE arguments).  The modularization framework is well documented here: https://nwtc.nrel.gov/FAST-Developers.  Here are my answers to your specific questions:

Yes.

No, but there are two sets of outputs: 1) outputs computed by the *_CalcOutput() routine every time step and 2) initialization outputs computed only once at initialization by the *_Init() routine.

Calculations for a given module are limited to that module's source code, e.g. the interface routines for AeroDyn are in AeroDyn.f90.

Yes.  All data passed across spatial boundaries in OpenFAST use the mesh-mapping system.

The ease of changing e.g. AeroDyn depends on the nature / sophistication of the state update and output calculations and your experience with programming / Fortran and the modularization framework.
Best regards,

Closing this issue as it is a development question rather than issue or feature request in the code.


Is it possible to convert it to onnx/ncnn?

LaneATT is not possible to be converted to onnx/ncnn/caffe, espcially in the part of generating the anchor. Is this model able to be converted?

I didn't try to convert to onnx in the past. If you did, I look forward to your conclusion here.


-restrack calloc and reallocarray sizes are incorrect

Expected behavior
For calloc and reallocarray the allocation size should be nmemb*size
Actual behavior
Currently the size is size
Steps to reproduce the behavior

Run procdump with -restrack against a process that uses calloc

The resulting leak track report only reports size rather than nmemb*size
System information (e.g., distro, kernel version, etc.)
All

This has now been fixed.


Weird error report

Sometimes, the error reporting logic may not produce great results. I can add the examples in this thread.

This one is due to the following empty incompatibility:
Final incompatibility:
     <<<  derived from:
      foo: 2.0.0, bar: Not ( 1.0.0 <= v < 2.0.0 )  <<<  from dependency of foo at version 2.0.0
      bar: 1.0.0 <= v < 2.0.0, foo: Not ( 1.0.0 <= v < 2.0.0 )  <<<  from dependency of bar at version 1.0.0: ""

This is coming from an "offline" example where I did not provide the dependencies of foo 1.0.0:
    PubGrub.emptyCache
        -- Example performing conflict resolution
        -- https://github.com/dart-lang/pub/blob/master/doc/solver.md#performing-conflict-resolution
        |> PubGrub.cachePackageVersions
            [ ( "root", Version.one )
            , ( "foo", Version.one )
            , ( "foo", Version.two )
            , ( "bar", Version.one )
            ]
        |> PubGrub.cacheDependencies "root" Version.one [ ( "foo", Range.higherThan Version.one ) ]
        |> PubGrub.cacheDependencies "foo" Version.two [ ( "bar", Range.between Version.one Version.two ) ]
        -- |> PubGrub.cacheDependencies "foo" Version.one []
        |> PubGrub.cacheDependencies "bar" Version.one [ ( "foo", Range.between Version.one Version.two ) ]
        |> Init

Now I have prevented the merge on "noVersion" incompatibilities and the same example still gives a weird result:
      foo: Not ( 1.0.0 <= v < 2.0.0 )  <<<  derived from:
         foo: 2.0.0, bar: Not ( 1.0.0 <= v < 2.0.0 )  <<<  from dependency of foo at version 2.0.0
         foo: Not ( 1.0.0 <= v < 2.0.0 ), bar: 1.0.0 <= v < 2.0.0  <<<  derived from:


Better handling of precision in index_nhdplus()

See #283 for details.

Codecov Report

Merging #284 (632694a) into main (66f6f3e) will decrease coverage by 0.43%.
The diff coverage is 74.57%.

:exclamation: Current head 632694a differs from pull request most recent head f487d56. Consider uploading reports for the commit f487d56 to get more accurate results

@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   93.18%   92.75%   -0.44%
==========================================
  Files          22       23       +1
  Lines        2716     2746      +30
==========================================
+ Hits         2531     2547      +16
- Misses        185      199      +14

Impacted Files
Coverage Δ

R/boundary_datasets.R
0.00% <0.00%> (ø)

R/get_vaa.R
75.47% <0.00%> (-4.53%)
:arrow_down:

R/map_nhdplus.R
89.36% <ø> (ø)

R/downloading_tools.R
78.64% <50.00%> (-0.57%)
:arrow_down:

R/geoserver_tools.R
95.08% <50.00%> (-1.56%)
:arrow_down:

R/get_nldi.R
88.88% <66.66%> (-0.74%)
:arrow_down:

R/get_oaproc.R
92.96% <83.33%> (-1.44%)
:arrow_down:

R/get_paths.R
95.85% <100.00%> (+0.01%)
:arrow_up:

R/index_nhdplus.R
97.87% <100.00%> (+0.03%)
:arrow_up:

R/nhdplusTools.R
98.63% <100.00%> (+0.03%)
:arrow_up:

... and 2 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


Replace $ Symbol with ₹ Symbol for INR

Description :
I noticed that there are several instances where the $ (dollar) symbol is used throughout the marketplace. Since this is an Indian marketplace, it would be more appropriate to use the ₹ (Indian Rupee) symbol to represent prices in INR.
Instances of $ Symbol :
Here are a few places where the $ symbol appears:

Home Page - Top Selling / Trendind Products / Recently Added / Top Rated

All Products - Change 'Rs' with '₹'

Suggested Change
Replace all instances of the $ symbol with the ₹ symbol to better reflect the local currency.
Screenshots

@MAVRICK-1 I would like to take up this issue. Please assign it to me.

@kushagra-singhh okay go ahead

Admin please check my merge request

@MAVRICK-1 I would like to take up this issue. Please assign it to me.

Sorry but I was solved when it is open

@MAVRICK-1 I would like to take up this issue. Please assign it to me.

Sorry but I was solved when it is open

If an issue has already been assigned then creating a pr without getting it assigned is not a good practice.

Sorry

@AsifpMulla123 it has been assigned to @kushagra-singhh  . Sry @AsifpMulla123 I can't accept your PR


Users complaining work clean up should not be default

Had a few issues with people loosing entire work dir through the --clean true default.
Often time people do not want to automatically delete the entire work, as they will want to resume with more data etc, so we should leave this setting off by default.

Fixed
6a7259a


A way for the levelblock to be considered in the backing of Navmesh

This plugin is awesome, the only problem is you can't bake any navmesh on the nodes, which makes it a lot harder to design enemy pathfinding on the nodes, unless you use AStar3D.
See this thread response for more deatils on adding compatibility for navmesh in the plugin.

Navigation support is implemented in #15. Would you be willing to test the implementation in your project and report back with a comment to the PR?
You can get the updated version from add-navigation-support branch with Git or download it as a ZIP using this link.


Availability of go-build s390x images

Expected Behavior

Can not build s390x images because the calico/go-build image does not seem to be available for s390x. (based on the tags here)
Current Behavior

Should be able to use the calico/go-build:s390x image to build calico s390x images.
(This is based off the targets in the Makefile)
Possible Solution

Push the s390x calico/go-build images up to docker hub.
(I'm not sure if the ProjectCalico team has access to s390x architecture)
Context

Trying to build images on s390x

@jose-bigio The images that we push are built using cross-compilation on amd64.  Unfortunately, s390x isn't supported by the tools that enable that cross-compilation approach.  You can build the image yourself if you have access to an s390x system by checking out the go-build repo and running make image (IIRC).

@fasaxc  would it be okay if I changed
https://github.com/projectcalico/calico/blob/release-v3.0/calico_node/Makefile#L24
To parametrize the calico of:
CALICO_BUILD?=calico/go-build$(ARCHTAG):$(GO_BUILD_VER)

Hi @jose-bigio, as @fasaxc  has suggested , you can clone  https://github.com/projectcalico/go-build and build go-build image specific to s390x architecture which can be used to build calico.


After click save button in cluster logging, UI keep loading

A reproduce step show the error:

Disable logging: select "none" and save. (If you have enabled)
Select "Splunk" and add "Custom Log Fields".

result:
Right preview cannot show the "Custom Log Fields" you added and console throw the same error.


Fix file loading in PandasCSVReader

Description
I found a typo in README to use PandasCSVReader.
Edit: Reverted changes to README and updated the class instead.
Changelog

🐛 fixed file loading in PandasCSVReader

Good catch! It's actually the class itself that's wrong haha (in base.py) and not the README. Feel free to make that change, or I will later.

Good catch! It's actually the class itself that's wrong haha (in base.py) and not the README. Feel free to make that change, or I will later.

I see! I thought it was by design. I'll make the change.

@emptycrown can you please review again?


Add additional get_proposer_head test coverage

Currently clients can potentially pass all get_proposer_head spec tests without having a fully spec compliant implementation.  This PR attempts to improve get_proposer_head test coverage. A new test_parent_weak test is added to check for the following scenario:

is_head_late, is_shuffling_stable, is_shuffling_stable, is_finalization_ok, is_proposing_on_time is_head_weak all  evaluate to true
is_parent_strong evaluates to false

In this situation, the parent block doesn't have enough attestation votes and therefore the head root is returned from get_proposer_head. This new test is pretty much a copy paste of test_basic_is_parent_root with a few minor tweaks.
There are several more tests needed to further improve test coverage. This is my first time writing a consensus spec test so I'm looking for some feedback before writing additional tests.

Thank you @eserilev! Have you run this new test vector with Lighthouse?

@hwwhww yes I have. On Lighthouse unstable this new test vector fails, but on this branch the test passes

@hwwhww The test passes on LH unstable now so we are happy to merge if you are! Thanks

@hwwhww I think this test case is a nice to have, let me know what you think


services/horizon: Switch from lib/pq to pgx postgres library

Seems like, pgx solves a few bugs in lib/pq, and offers some possibilities for performance improvements (e.g. CopyFrom for bulk insertions).
In particular, pgx seems to have better timeout enforcement. (https://github.com/stellar/go/issues/4392)
Note: BeginEx method for pgx, doesn't autorollback, so we can pass a context to it as well. 👍
See previous work on this: https://github.com/stellar/go/pull/3342

This is low priority, given https://github.com/stellar/go/pull/4390


Update index.html

Fixes Issue🛠

Closes #
Description👨💻

Type of change📄

[] Bug fix (non-breaking change which fixes an issue)
[] New feature (non-breaking change which adds functionality)

How this has been tested✅

Checklist✅

[] My code follows the style guidelines of this project
[] I have performed a self-review of my own code
[] I have commented my code, particularly in hard-to-understand areas
[] I have added demonstration in the form of GIF/video file
[] I am an Open Source Contributor

Screenshots/GIF📷

Don't create any PR if you are not assigned to any issue @tushargupta1504


Watchlist with the price column?

Feature Description
I'm not sure if this feature already exists. I thought the watchlist was meant to be a single place to look for price changes. I can't figure out how to add columns to the watchlist. Is there such an option? Such that price changes in particular games can be checked directly?

I added price column to watching page.

ok that was way too fast! Thanks!


Infer variant type instead of passing it via cli

Issue #186

@jeromekelleher pushed update

Nice, +1.
As an aside, the extra stuff you had to do here with the expected IDs makes me even more certain that hard coding strings in test cases is a bad idea...

Oops, I forgot - we need to update the README also, as this will now tell people the wrong thing. Can you add this here please @dcolligan?

@jeromekelleher pushed a new change with the README updated


Deleted Notebooks remain open in the editor

Environment data

VS Code version: 1.52.1
Extension version (available under the Extensions sidebar): v2021.1.502429796
OS and version: Ubuntu 20.04

Expected behaviour
Consistency when deleting files. When you delete any file in the explorer, the file is removed from the editor window.
Actual behaviour
If you delete an ipynb file in the explorer, the notebook remains open. This makes it really easy to accidentally edit the deleted file (or even run a cell) which results in it being recreated.
Steps to reproduce:

Open a notebook
Delete the file in explorer

Thanks for the bug.
This should be addressed when we switch over to VS code's new notebook API. Please track this issue for when we switch:
#1231.
You can try it yourself if you use VS code insiders.

Thanks for your feedback. This issue will be addressed once VS Code adds native support for editing notebooks. Please see https://github.com/microsoft/vscode/issues/91987.


Webstorm not showing Rich Presence

Hi,
Rider is showing but Webstorm is not showing. I try force reconnect but not working.

In the discord server from this repo there are some fixes for common problems, you could try these.

The plugin does not work with the web version of Discord
Open Settings > Other Settings > Discord and check for any big red error messages
Enable/Disable the Rich Presence once (Settings > Other Settings > Discord > Disable 'Show Rich Presence' > Apply > Enable 'Show Rich Presence' > Apply)
Due to Windows security features if you run Discord as administrator you also have to run your IDE as admin
When using Linux don't install Discord/IDE from the Software Center (Ubuntu) or as Snap Package, the packages are broken
Make sure in Discord Settings -> Game Activity -> Display running game as status message is checked
Make sure your IDE isn't added as a game in Discord
Check the IDE logs for any error messages involving this plugin. You can get to them by clicking Help > Show Log in Explorer and opening the idea.log file
Try starting Discord before starting the IDE
Try restarting both Discord and the IDE
Try reinstalling the plugin
Try restarting your PC

I run IDE as admin and problem solved


feat: experimental sqlite support

🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[x] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
Nitro provides a platform-agnostic abstraction layer for many features including unstorage for powerful and versatile KV storage. However, there are limitations to supporting full relational DBs via KV.
The idea behind this new future is to provide a simple SQLite database out of the box making it available for development time and also for small production deployments.
Same as other parts of Nitro, DB provider can be abstract and from any service provider. In this PR, i have added a playground for cloudflare D1 integration. (needs refactor!)
Nitro provides no ORM but we can integrate with a driver for 3rd party orms like drizzle easily. (We might also build some simple conventions in server folder for migrations, etc in later steps)
Usage:
export default defineEventHandler(async (event) => {
  const db = await useSQliteDB();
  await db.exec(
    "CREATE TABLE IF NOT EXISTS users (id TEXT PRIMARY KEY, firstName TEXT, lastName TEXT, email TEXT)"
  );
  const id = String(Math.round(Math.random() * 10000));
  await db.prepare("INSERT INTO users VALUES (?, 'John', 'Doe', '')").run(id);
  const row = await db.prepare("SELECT * FROM users WHERE id = ?").get(id);
  return {
    row,
  };
});

Local playing:

Switch to feat/exp-db branch
Development: pnpm nitro dev examples/sqlite
Production:

NITRO_PRESET=cloudflare-module pnpm nitro build examples/sqlite
npx wrangler dev examples/sqlite/.output/server/index.mjs --local

Credits to @Atinux for pushing the initiatives behind this idea ❤
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Moving to https://github.com/unjs/nitro/pull/1351


[GSoC17] Unit tests + travis-ci.org build

Unit tests are currently missing.
It would be good to have javascript based tests of the main features and an automated travis build.
The main features are:

ensure NetJSON Graph is converted correctly
ensure the right number of nodes is created
ensure the right number of links is created
ensure metadata overlay is displayed correctly
ensure information overlay is displayed when clicking on nodes
ensure information overlay is displayed when clicking on links

@ralphtheninja suggests https://github.com/substack/tape :+1:

I'd try to break apart the functionality as much as possible and put into separate files for easier testing and then have a main file, e.g. index.js that pulls in the different parts.

@geekplux can you work on this next please?

yep, next step we should add the test and CI

What's the status of this issue?

done


Handle empty arrays properly

Postgres' logical replication does not distinguish between {} and {""}. Both come through as {}.
Here, we add tests for both empty arrays and arrays with empty strings. We expect them to be returned as [].
We fix an issue where {} was erroneously processed as {""}.
https://chatgpt.com/c/67073168-6904-8006-b82e-df2a5c4ce2eb

#368  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @acco and the rest of your teammates on  Graphite


Global Navigation, flyout: Review specs

The text does not reflect the actual behavior.
https://swiss.github.io/styleguide/en/hierarchical-navigation.html#01-hierarchical-navigation-01-global-navigation
The “close” function at the top right and on the the tab at the bottom edge do not exist anymore.
Please review the specs or alter the function of the flyout.

close buttons should be present on every flyouts, Example page have to be corrected (and also the example provided above)


az acr build error: ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

We want to run builds of docker images using ACR BUILD feature that lets ACR build the image for us. When logged-in using my user principal it works fine. Basically this command sequence:
az login  (prompted externally to login)
az acr build  ..... (files are pushed to ACR which then builds and pushes the image to ACR fine)
When using the system-assigned managed identity however, this fails:
az login --identity (login succeeds as expected)
az acr build ... (same build statement as above, fails with the following traceback)
The command failed with an unexpected error. Here is the traceback:
invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'
Traceback (most recent call last):
File '/opt/az/lib/python3.6/site-packages/knack/cli.py', line 231, in invoke
cmd_result = self.invocation.execute(args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 657, in execute
raise ex
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 691, in _run_job
result = cmd_copy(params)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 328, in call
return self.handler(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py', line 121, in handler
return op(**command_args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/build.py', line 45, in acr_build
cmd, registry_name, resource_group_name, BUILD_NOT_SUPPORTED)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 141, in validate_managed_registry
cmd.cli_ctx, registry_name, resource_group_name)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 110, in get_registry_by_name
return client.get(resource_group_name, registry_name), resource_group_name
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2021_06_01_preview/operations/_registries_operations.py', line 276, in get
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 211, in run
return first_node.send(pipeline_request)  # type: ignore
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/core/policies/_base.py', line 47, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
[Previous line repeated 1 more time]
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_redirect.py', line 158, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_retry.py', line 445, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 69, in send
_await_result(self._policy.on_request, request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_tools.py', line 29, in await_result
result = func(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

https://github.com/Azure/azure-cli/blob/58a202511af609ad350e3f3ca57d365842ae5721/src/azure-cli-core/azure/cli/core/adal_authentication.py#L148
The highlight code is in CLI shared library that handles AAD token. ACR was not involved in the failed step.
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

route to service team

I am finally able to pin down the exact root cause for this issue.
Repro

In Azure Portal, create an app service with "quickstart" docker image mcr.microsoft.com/appsvc/staticsite:latest
Configure system assigned identity for the app service
Follow the doc to SSH into the container: https://docs.microsoft.com/en-us/azure/app-service/configure-linux-open-ssh-session
Install Azure CLI (remove sudos): https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt

# az login --identity --debug

  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/auth/adal_authentication.py", line 43, in get_token
    return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '11/05/2021 15:18:31 +00:00'

Using MSIAuthentication:
# /opt/az/bin/python3.6 -c "from msrestazure.azure_active_directory import MSIAuthentication; auth = MSIAuthentication(); auth.set_token(); print(auth.token)"

{'access_token': '...', 'expires_on': '11/05/2021 15:18:31 +00:00', 'resource': 'https://management.core.windows.net/', 'token_type': 'Bearer', 'client_id': 'df45d93a-de31-47ca-acef-081ca60d1a83'}

Using curl:
# curl "${MSI_ENDPOINT}?resource=https://management.core.windows.net/&api-version=2017-09-01" -H "secret: ${MSI_SECRET}"

{"access_token":"...","expires_on":"11/05/2021 15:18:31 +00:00","resource":"https://management.core.windows.net/","token_type":"Bearer","client_id":"df45d93a-de31-47ca-acef-081ca60d1a83"}

Notice "expires_on":"11/05/2021 15:18:31 +00:00" which contradicts that on the document:
https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=powershell#rest-protocol-examples
"expires_on": "1586984735",

Root cause
The managed identity endpoint in the app service container returns expires_on in datetime format, but Azure CLI expects epoch time so fails.

In Azure CLI 2.30.0, az login fails because it uses expires_on to build an AccessToken, leading to the error.
In Azure CLI 2.29.2 (you may install with apt install azure-cli=2.29.2-1~buster), az login doesn't fail because it doesn't care about expires_on at all. Instead, other subsequent commands like az group list will fail.

Action plan
This behavior is not observed on Azure VM.
We need to work with app service team about this incorrect managed identity endpoint behavior.

The new API 2019-08-01 gives the correct result:
# curl "${IDENTITY_ENDPOINT}?resource=https://management.core.windows.net/&api-version=2019-08-01" -H "X-IDENTITY-HEADER: ${IDENTITY_HEADER}"

{"access_token":"xxx","expires_on":"1636125511","resource":"https://management.core.windows.net/","token_type":"Bearer","client_id":"df45d93a-de31-47ca-acef-081ca60d1a83"}

@jiasli is there a chance we're hitting the same thing with storage log on? https://github.com/getporter/azure-plugins/issues/39

in fact, I'm finding this in several places: https://github.com/microsoft/AzureTRE/issues/1067

@squillace your issue is different from this one. Let's work on #20211.

Wait. I mixed up this issue with an app service one.
@JennyLJY, where are you running Azure CLI?

Hi @jiasli,
in #20215 you mentioned that msrestazure is out of maintenance. Can you elaborate further? The module is heavily used in the azureml modules and in my project this is currently an ugly blocker we can not work around, as we can not simply change which API version is used in azureml.
Opening a Workspace like
ws = Workspace(sub, rg, wsname, MsiAuthentication(identity_config={ "client_id": os.getenv("MSI_CLIENT_ID") }))
will end up in the same deserialization issue as mentioned here.

The module is heavily used in the azureml modules and in my project this is currently an ugly blocker we can not work around, as we can not simply change which API version is used in azureml.

@m-gora, msrestazure is not maintained by Azure CLI team, but by Azure SDK team. As far as I know, managed identity related features are now moved to Azure Identity.
If you have concern with azureml, you may report to Machine Learning service.
@singankit, @harneetvirk, where can azureml issues be reported?

For SDK related issues they can be reported on azure-sdk-for python repo and they get redirected to correct team depending on the issue.

@singankit, I am not seeing azureml in https://github.com/Azure/azure-sdk-for-python/tree/main/sdk. Only machinelearning:

Is azureml code open source?

Thats right azureml sdk is not open sourced. It is managed by AML team internally.

@singankit, is there any plan to drop msrestazure as @m-gora suggested?

@jiasli i think we might have a misunderstanding. I thought you meant that msrestazure is not actively maintained anymore. Therefore I asked whether it will be removed in the future. However a colleague of mine fixed the issue by pinning the version of Azure CLI in the requirements.txt.
I still don't understand why that made a difference, but at least it works.

I thought you meant that msrestazure is not actively maintained anymore.

This is true.

The module is heavily used in the azureml modules and in my project this is currently an ugly blocker we can not work around, as we can not simply change which API version is used in azureml.

As for azureml issues, @singankit can help.


SSL_read() does not return in the server application

After our server application successfully accepts and completes the initial handshake with client peer, receiver thread in the application freezes or blocks or hangs on etc. during the read of real message. We added some additional lines in our server application and we saw that the receiver thread blocks on SSL_read() method call i.e. SSL_read() method does not return anything. Afterwards server application cannot respond to any requests from clients and the only workaround can be applied is the restart of server application. Let me state some specific status for this incident:

This incident occurs occasionally, we did not observe any regular pattern or any specific client that always causes this issue.

In this application TCP sockets respectively underlying BIO is set as BLOCKING during SSL_read() call (I could not remember exact reason but we use NON-BLOCKING sockets for only SSL_accept(). After that we set back to BLOCKING mode).

In the Wireshark traces, we observe some RETRANSMISSION occurrences between server and client messaging but I do not know a retransmission might lead to such a blockage.

OpenSSL version is 1.0.2j.

Any help/proposal/recommendation would be appreciated. Thanks in advance.

If your application blocked in the system call?  Or is it looping in SSL_read calling BIO_read?

If understand your question correctlyi I would say the latter one i.e. the message can be successfully retrieved by system and then we call SSL_read as:
int result = SSL_read (MySSL, MyBuffer, MyBufferSize);
But this method does not return and therefore corresponding thread is blocked in the application.

Thank you for your comment, the wireshark traces are overwritten unfortunately but I can say that client and server are in different countries, the connection is not really stable. Maybe some data is lost during transmission? Nevertheless, I still wonder if there a way to make the application more rebust i.e. even the specified message cannot be retrieved/processed completely, let the SSL_read() returns some error and proceeds with the next messages?

You should then really switch to non-blocking mode. SSL_read() is
documented to only return once it has data to return when in
blocking mode.
If you really want to use blocking mode, I suggest you instead
create a thread per connection.


Associated type projection Iterator<Item = X> looks wrong

I'm used to Iterator<Item=X> without spaces, not Iterator<Item = X>.

There's a few places where we do this - bounds is also one (e.g., Box<Foo+Bar> vs Box<Foo + Bar>). We should have an option for this spacing (although some of it is done by the pretty printer so we don't control it yet).

I guess whatever option is introduced here should also apply to #[attribute = foo].

I would have a different one for attributes, but yes, we should have one there too.

Closing this in favour of https://github.com/rust-lang-nursery/rustfmt/issues/489.


Awake not keeping my compter on

Microsoft PowerToys version
0.51.1
Running as admin

[X] Yes

Area(s) with issue?
Awake
Steps to reproduce
PowerToys up and running with awake set to keep computer on indefinitely. After a couple of hours (not exactly sure how long) the PC powers off. I have checked all power setting in Windows 11 and have set them all to full performance with the power savings/hibernation/sleep all set to off.
✔ Expected Behavior
Want my PC to stay on all the time.
❌ Actual Behavior
Power off after a few hours of no use.
Other Software
No response

Seen more issues with awake.
@dend did you happen to find a cause?

/bugreport

@ Yakuzama8391 is your computer domain joined / or anything else that may cause an override?

Hi there. No it is no. We have a shared server we store files to but no
domain.
Is there some sort of trap/log I can setup to monitor what is causing the
issue?
On Wed, Dec 8, 2021 at 8:16 PM Clint Rutkas @.***>
wrote:

@ Yakuzama8391 is your computer domain joined / or anything else that may
cause an override?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/14917#issuecomment-989495356,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVWE4XFL7DFC73ZY5OHBFPTUQAURZANCNFSM5JU24YYQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I have checked all power setting in Windows 11 and have set them all to full performance with the power savings/hibernation/sleep all set to off.

[quoting myself] Then, pardon my question, but why is it turning off in the first place then? Can you find and check: System Configuration > System > Energy > Advanced settings ?

Duplicate of #14225


encoding doesn't work with ctrl+o on remote ssh

Issue Type: Bug
I have my settings.json for all of workspaces the same.  To encode all files the same
"files.encoding": "iso88592"

work on remote ssh
try to open file from local by ctrl+o ctrl+o
open file from local
encoding is not right as I set in settings.json

VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.19041
Remote OS version: Linux x64 3.10.0-1127.el7.x86_64

@szakrzewski98 this is intentional, if you open a file that is not inside your workspace, the workspace settings will not apply.

@bpasero so why settings are applied when I open local file without using shortcuts? File -> Open File -> Show Local, it works, but still ctrl+o ctrl+o doesnt work

@szakrzewski98 I cannot explain that, are you sure in both cases you open the exact same file? Do they have the same paths?

@bpasero Paths are the same. Other settings are ok when I open it with shortcuts, only encoding is set to windows1252 instead of iso88592

@szakrzewski98 can you show a screencast or video of this. Try opening once via menu and once via keybindings.


After update from 6.0.25 to 6.0.27 rule not used anymore

Laravel Mix Version: 6.0.25/6.0.27
Node Version (node -v): 14.17.3
NPM Version (npm -v): 6.14.14
OS: Windows 10

Description:
After I updated my Laravel-mix to the new version my browser showed me this warning:
failed to decode downloaded font
No font was loaded correctly and I changed nothing else. With version 6.0.25 it worked. I have a special rule for my fonts:
mix.webpackConfig({
	module: {
		rules: [{
			test: /(\.(woff2?|ttf|eot|otf)$|font.*\.svg$)/,
			loaders: [{
				loader: 'file-loader',
				options: {
					name: function() {
						return 'webfonts/[name].[ext]';
					},
				},
			}],
		}],
	},
});

This rule isn't working after the update. I saw it later in the log of my cmd. There was a font/ directory created in my public path and this fonts has a versioning again. That is why I wrote the rule above.
Steps To Reproduce:
1.) local font in resource/assets/webfonts
2.) CSS/SCSS Code (fonttest.scss)
    @font-face {
        font-family: 'humnst777_cn';
        src: url('../webfonts/MYFONT.woff2') format('woff2'),
        url('../webfonts/MYFONT.woff') format('woff');
        font-weight: normal;
        font-style: normal;
        font-display: swap
    }
[...more css code here...]

3.) Webpack.mix.js Code:
let mix = require('laravel-mix');
mix.webpackConfig({
	// object will be merged with Laravel Mix config, so matching rules will be overwritten
	module: {
		rules: [{
			// overwriting file-loader rule for fonts in order to remove the hash (so we can pre-load without downloading it twice)
			test: /(\.(woff2?|ttf|eot|otf)$|font.*\.svg$)/,
			loaders: [{
				loader: 'file-loader',
				options: {
					name: function() {
						// if (!/node_modules|bower_components/.test(path)) {
							return 'webfonts/[name].[ext]';
						// }
						// const pathUpdated = path.replace(/\\/g, '/').replace(/((.*(node_modules|bower_components))|fonts|font|assets)\//g, '');
						// return `fonts/vendor/${pathUpdated}`;
					},
				},
			}],
		}],
	},
});
mix.sass('resources/assets/sass/fonttest.scss', 'public/css').version();

I really hope there is a workaround or a fix for this issue. Thanks for the awesome job :-)

We recently had to change how we specify loader names/paths to account for the peer dependency behavior in NPM v7 otherwise a different major version could get loaded that should not when installing other dependencies.
I'll try to look into customizing the merging behavior for loaders to account for this change but it likely won't been until this weekend at the earliest (We'd happily accept a PR though! The relevant code is here: https://github.com/JeffreyWay/laravel-mix/blob/master/src/builder/MergeSmart.js#L15)
You can try doing something like this instead:
mix.override(config => {
  config.module.rules.forEach(rule => {
    rule.loaders.forEach(loader => {
      if (loader.loader?.includes('file-loader')) {
        loader.options.name = () => 'webfonts/[name].[ext]'
      }
    })
  })
})


Interpreter selection should show folder name instead of venv

Environment data

VS Code version: 1.22.0
Extension version (available under the Extensions sidebar): 2018.3.1
OS and version: Windows 10
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv

Actual behavior
Selecting a virtual environment as the active interpreter shows Python 3.6.4 (venv) in the status bar
Expected  behavior
The folder name for the virtual environment should be used instead, so that you can differentiate between different environments, e.g. Python 3.6.4 (mydevenv)
Steps to reproduce:

Select a virtual environment as the active interpreter

CC @DonJayamanne @brettcannon

same here

Closing this in favor of #1351, as that's where the display formats were discussed to great length.


Syntax Error on start/stop scanning calls

Describe the bug

go to https://playground.buttplug.world
connect to intiface desktop server, so using json to communicate
hit "start scanning"

Expected behavior
Should start/stop scanning
Actual behavior
Error on every other press:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 32 of the JSON data
    FromJSON MessageUtils.js:30
    ParseIncomingMessage ButtplugBrowserWebsocketClientConnector.js:63
    Connect ButtplugBrowserWebsocketClientConnector.js:37

This is a problem with the C# server batching multiple JSON arrays into a single websocket packet, and JS's JSON.parse() can't deal with multiple json bodies in a string. Fixing this in C# at buttplugio/buttplug-csharp#645


Show expanded sidebar on medium size devices too

Before
After

Yeah, I noticed that was happening even before. I'll make an issue

https://github.com/oasisprotocol/oasis-wallet-web/issues/1881


Run cocoon Mac ruby builds on Xcode and macOS matching framework

Cocoon Mac builders run on macOS 12/13.
https://github.com/flutter/cocoon/blob/7683f41ec82e0cc2be65233d625749ed61c0f6c9/.ci.yaml#L18
The Ruby cipd package builder runs on Xcode 14.3.1.
https://github.com/flutter/cocoon/blob/7683f41ec82e0cc2be65233d625749ed61c0f6c9/.ci.yaml#L131-L134
Update both to match framework/engine/packages versions
https://github.com/flutter/flutter/blob/3fb95c7dd21de578f5af6dd209b08fd06e483817/.ci.yaml#L132-L137

Also set device_type: none so this doesn't run in the devicelab
https://ci.chromium.org/ui/p/flutter/builders/try/Mac ruby/21/infra

Also set device_type: none so this doesn't run in the devicelab https://ci.chromium.org/ui/p/flutter/builders/try/Mac ruby/21/infra

Never mind, this was done on purpose. https://github.com/flutter/cocoon/pull/3125#discussion_r1352877994

Yes, we want these scripts to run on devicelab machines as they depend on brew being installed.


Move Hive plugin and delete former redis resource manager

I am not sure if you should delete the resource manager, @bnsblue / @EngHabu is the new resource manager updated in the same place


Add an example using cosmopower

Add a simple example yaml which uses cosmopower and MFLike.
Can be run by calling cobaya-run examples/example_2.yaml
Currently I have had to do some hacking of MFLike to get this to return a likelihood value. I think this is because MFLike always requires theory calculations up to the lmax of the data file (which here is 9000) via the bpws even when lcuts are specified (but I could be wrong).
To do:

[ ] Fix MFLike bugs if necessary
[ ] Add documentation

Wouldn't it be better to do this after cosmopower and mflike have been moved out of soliket? (I don't know why the default lmax for mflike is so high..). Probably going to conflict.


Add "Quizzler"

The Quizzler Flutter App is an engaging mobile application that allows users to test their knowledge through multiple-choice quizzes.
https://github.com/chiragjain2022/quizzler
Category : Education

Similar projects are already present in the list.


failure using IPv6 controller address.

Description
Seen in acceptance tests and locally. When the first controller ip address provided is IPv6, the following error occurs. Even if the 2nd address provided is IPv4. Swapping the order of the ip address list or removing the IPv6 address resolves the issue.
=== NAME  TestAcc_ResourceIntegrationWithMultipleConsumers
resource_integration_test.go:222: Step 3/3 error: Error running post-apply refresh plan: exit status 1
    Error: Client Error

      with juju_offer.a,
      on terraform_plugin_test.tf line 26, in resource "juju_offer" "a":
      26: resource "juju_offer" "a" {

    host addresses: cannot parse "<IP_ADDRESS>:17070,[fd42:ad8:5d38:946a:216:"
    as address:port: address <IP_ADDRESS>:17070,[fd42:ad8:5d38:946a:216:: too
    many colons in address not valid

    Error: Not Found

      with juju_application.b1,
      on terraform_plugin_test.tf line 36, in resource "juju_application" "b1":
      36: resource "juju_application" "b1" {

    host addresses: cannot parse "<IP_ADDRESS>:17070,[fd42:ad8:5d38:946a:216:"
    as address:port: address <IP_ADDRESS>:17070,[fd42:ad8:5d38:946a:216:: too
    many colons in address not valid

--- FAIL: TestAcc_ResourceIntegrationWithMultipleConsumers (332.27s)
Urgency
Annoying bug in our test suite
Terraform Juju Provider version
0.13.0, 0.14.0
Terraform version
1.9.x
Juju version
3.5.x
Terraform Configuration(s)
Check the controller ip addresses with `juju show-controller`, E.g.
['[fd42:13c3:1760:6d89:216:3eff:feb6:d595]:17070', '<IP_ADDRESS>:17070']

Or change the value of JUJU_CONTROLLER_ADDRESSES to put the IPv6 address first.

Reproduce / Test
terraform {
  required_providers {
    juju = {
      version = ">= 0.14.0"
      source  = "juju/juju"
    }
  }
}

provider "juju" {}

resource "juju_model" "testmodel" {
  name = "machinetest"
}

Debug/Panic Output
No response
Notes & References
No response

Take a look at using net.JoinHostPort.

could not reproduce with 0.15.1. tried the following plan
terraform {
  required_providers {
    juju = {
      version = "0.15.1"
      source  = "juju/juju"
    }
  }
}

provider "juju" {
  controller_addresses = "[fd42:fa9f:5992:a53e:216:3eff:fe3b:d196]:17070"
  username = "admin"
  password = *redacted*
  ca_certificate = *redacted*
}

resource "juju_model" "development" {
  name = "dev"

  cloud {
    name   = "localhost"
  }
}

resource "juju_application" "postgresql" {
  name = "postgresql"

  model = juju_model.development.name

  charm {
    name = "postgresql"
  }

  units = 1
}

which was successfully applied.

I have also tested two other scenarios:

ipv6 from $JUJU_CONTROLLER_ADDRESSES env var: All fine.

export JUJU_CONTROLLER_ADDRESSES="ipv6,ipv4"
---- main.tf
provider "juju" {
  username = "admin"
  password = "<redacted>"

  ca_certificate = file("ca.crt")
}

controller-self-discovery (unsetting the env var): all fine

unset  JUJU_CONTROLLER_ADDRESSES
---- main.tf
provider "juju" {
  username = "admin"
  password = "<redacted>"

  ca_certificate = file("ca.crt")
}


Added better colors

Changed the colors to use the standard "success" for green and red for error:

![color success](https://img.shields.io/badge/color-success-success.svg)
![color failure](https://img.shields.io/badge/color-failure-critical.svg)

Thanks!


Opening a New Window Looks Weird

Prerequisites

[x] Put an X between the brackets on this line if you have done all of the following:

Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description
When opening a New Window, it opens "inside" the old window. It seems to open a tab instead even though it doesn't look like a normal tab - fonts and colors are weird. Dragging the "tab" out of the old window actually restores normal/expected behavior. I've tried running Atom in Safe Mode and using different UI and Syntax theme. Seems to be something wrong with Core and not a theme or package.
Steps to Reproduce
EDIT: MORE/UPDATED INFO IN COMMENT BELOW...
  If so, do things work normally for you when not in full screen mode?

@rsese No I do not have atom in full-screen mode.

So I've figured out what is causing the bug described above. It is this setting under System Preferences > Dock

If it is set to Manually or Full-Screen Only, everything works like normal. If it is set to Always, what I described above will happen.

Ohhh interesting - looks like it was set to "In Full Screen Only" for me which is why I could reproduce only in full screen mode.
I poked around a bit more and it looks like there's already an issue for this /cc https://github.com/atom/atom/issues/12690 so feel free to subscribe there for updates.

@rsese my issue isn't quite the same. He's talking about running Atom in Full-Screen mode, and it turning windows into tabs. I'm not running Atom in Full-Screen mode, and my "tabs" look nothing like his.

Hmmm, though they mention full screen mode, it seems to me that the general issue reported is that a new window opens in a tab rather than a new window?  E.g. this issue was closed as a dupe as well /cc https://github.com/atom/atom/issues/13169 which based on the description, matches your issue a bit more closely since there's no mention of full screen mode.
About the tabs appearance, looking at your screenshot and the one in that issue, a difference I see is that it looks like you have the Use Custom Title Bar setting enabled but they don't.   If you disable that setting, do you see basically the same thing as reported in https://github.com/atom/atom/issues/12690 and https://github.com/atom/atom/issues/13169?
Let me know if I'm mis-understanding anything.


Add Slimcoin

If amenable (tests pass).

Thanks for this.
What's the reasoning behind the last commit modifying the readme?

Beats me. I made a PR for a specific sequence of commits and afterwards, I locally made some changes specific to the cloned code in the clone's repo. Upon commit, GH decided all on its ownsome to add the new commit to the previously-made PR, sigh. There may be some git incantation that I should've used to prevent it happening. sry.


Gray out disabled checkbox/radio while maintaining accessibility

Make disabled radio/checkbox and their labels opacity 65% instead of 50% opacity.
WCAG AA: Pass
WCAG AAA: Pass (borderline)
http://www.w3.org/WAI/WCAG1AAA-Conformance
@jamin-hall I'm getting a ratio around 7:1 which should be AAA.
Fixes #1380.

@interactivellama let's go with 65% opacity, but we'll need to update both the "no-javascript" and "javascript" versions to be consistent. In the future we should consider AAA, but at the very least we should meet AA standards.

Always good to provide accessibility! The opacity change seems to be good here... on a sort-of-related note, I'm noticing in both Firefox and Chrome that tabbing does not appear to be working correctly. When I click the start of the page and hit tab a bunch, it appears to be selecting the checkboxes as it takes quite some time to get to the checkbox example method buttons, but no indicator is shown. @interactivellama are you seeing this? I recall having some indicator upon tabbing before...

#1382 fixes that issue.

Cool, new issue for that. This one is good then!


Running Jikkou as a cloud function (FaaS)

**Is your feature request related to a problem? Please describe **
My Kafka cluster is running as a service (MSK).
I don't want to create a server to run Jikkou.
Jikkou can run as a container (CaaS) but as it is not a server app it shouldn't be up all the time.
Running Jikkou as a function (FaaS, Lambda) may be a good fit.
Describe the solution you'd like
Run Jikkou as a function where the input is a YAML/JSON thing describing topics... and the output describes the action realized on the Kafka cluster. Environment variables could be used to describe Kafka connection or other global settings.
Describe alternatives you've considered
See above
Additional context
I ignore whether this idea would be possible.
I know it represents a huge change from the current tool.

Hi @gquintana, I don't have any particular experience with Lambda but from what I've read, it should be possible to use Jikkou with it.
Basically, use the Jikkou Core dependency:
<dependency>
    <groupId>io.streamthoughts</groupId>
    <artifactId>jikkou-core</artifactId>
    <version>0.31.0</version>
</dependency>

Write a RequestHandler with custom POJOs to handle Jikkou input/output.
Here's an ugly, non-compilable example of how the Jikkou API can be used :
public class HandlerWeatherData implements RequestHandler<ResourceReconcileRequest, ResourceReconcileResponse>{

  @Override
  public JikkouHandlerOutput handleRequest(ResourceReconcileRequest event, Context context)
  {
        var resources = .... // get resource from event
        var mode = .... // get mode from event
        var context = getReconciliationContext(event, false);
        ApiChangeResultList result = api.reconcile(resources, mode, context);
        return new JikkouHandlerInput(result);
  }

  private JikkouApi createJikkouApi() {
     // Create your configuration
        Configuration configuration = Configuration.from(...);

        // Create the DefaultExtensionRegistry
        DefaultExtensionRegistry registry = new DefaultExtensionRegistry(
                new DefaultExtensionDescriptorFactory(),
                new ClassExtensionAliasesGenerator()
        );

        // Create the DefaultExtensionFactory
        DefaultExtensionFactory extensionFactory = new DefaultExtensionFactory(
                registry,
                configuration
        );

        // Create the DefaultResourceRegistry
        DefaultResourceRegistry resourceRegistry = new DefaultResourceRegistry();

        // Configure validations, transformations, reporters from the configuration.
        ApiConfigurator[] configurators = {
                new ValidationApiConfigurator(registry),
                new TransformationApiConfigurator(registry),
                new ChangeReporterApiConfigurator(registry)
        };
        // Context loads all extensions using ServiceLoader
        JikkouContext jikkouContext = new JikkouContext(configuration, extensionFactory, resourceRegistry);

        // Create the default API
        DefaultApi.Builder builder = new DefaultApi.Builder(
                extensionFactory,
                resourceRegistry
        );
        return jikkouContext.createApi(builder, configurators);
   }

      public ReconciliationContext getReconciliationContext(ResourceReconcileRequest request, boolean dryRun) {
        var selectorFactory = new ExpressionSelectorFactory();
        ResourceReconcileRequest.Params params = request.params();
        return ReconciliationContext
                .builder()
                .dryRun(dryRun)
                .configuration(Configuration.from(params.options()))
                .selectors(selectorFactory.make(params.selectors()))
                .annotations(NamedValue.setOf(params.annotations()))
                .labels(NamedValue.setOf(params.labels()))
                .build();
    }
}

Does this give you any idea how to do it?
Thanks for your feedback.


Convert fxpay.purchase() to promise (bug 1143195)

@muffinresearch r?

lgtm.
Presumably there's a way to go before all the promise conversion is done? Not that I know of anything but do we have a plan should we need to put out a release betweeen now and finalising the promise conversion?
r+wc

We could cut a release before all the conversion is done if we need to since I'm leaving in support for the old callback style. It might make more sense to release after it's all converted though, if we can.


Number of trainable parameters

As I couldn't print or review the full architecture of the SFD model, could you please let me know about the number of trainable parameters? Do you have an approximation of the number? Thank you in advance!

Hi, sorry for the late reply, we did not calculate the number of trainable parameters of SFD. SFD consists of the detector model and depth completion model, you can refer to the detector checkpoint we provide (about 540MB)and the depth completion checkpoint TWISE provide (about 14MB).


first pass: my_derp and add_known_addrs

ensure we can display our own home derp, and that we add associate a derp region with a peer id
Description
closes #1221
Notes & open questions
what happens if the peer you want to talk to is in a region you do not understand?
Hi, I've been going back and forth a few times with this. Can I get some feedback.
Now that we have multiple derp regions, it's possible that the regions you have configured are NOT the region that the node you are trying to communicate is in.
So, how should we handle the case where we cannot connect to that specific derp region?
a) When we add a peer to our address book,  the derp region is required (along with the PublicKey & ALPNs), and we check our DERP configuration. If we don't have that derp region in our configuration, we fail when we attempt to add that peer to our address book. In this case, we won't ever attempt to dial the peer if no DERP region is provided or the DERP region provided does not exist in our configuration, even if we have a valid UDP connection
b) We do not require a derp region when you add a peer to the address book and we don't check if any derp region provided exists in our configuration. If no UDP address nor DERP region exists when we go to connect, we log a warning, but fail silently. Whatever timeouts exist on QUIC will timeout when no connection can be made. If you don't have logging, you will not understand why this failed.
c) You are not required to provide a DERP region, but if you DO, we will fail if that derp region does not exist in our configuration. The implication here is that if you have provided a DERP region, you expect hole punching to occur, and it is an error if you cannot attempt to hole punch in the current conditions. If you do NOT provide a derp region, you are accepting that hole punching is not possible or you have some outside information that the UDP addresses are accessible.
This last one seems like the best option to me & it's how I am planning to continue with the PR, but would love some feedback.
region 0
Currently, region_id 1 is expected to be NA, and region_id 2 is expected to be EU. This is currently only documented here: https://www.notion.so/number-zero/Derp-Regions-a63c309839e64d9ab19c23778a7b9c37
We also have a bit of a testing problem. Since the region_ids should be standardized, it seems we should leave the id 0 as a testing id.
impl From<Url> for DerpMap
Now that it is we have the possibility of multiple regions, we can no longer assume the default region id for any given Url, so we can no longer implement From on DerpMap for Url
Change checklist

[ ] Self-review.
[ ] Documentation updates if relevant.
[ ] Tests if relevant.

I think I could choose b.
If we don't know the DERP region in our config we might still be able to connect directly to it, it may not even need holepunching at all.
If we do not have any direct address and can not reach the peer's home derp server [0] then we'd have to return either a quinn::ConnectionError::Timeout or quinn::ConnectionError::TransportError (ConnectionError if possible, NO_VIABLE_PATH might be suitable but currently a bit of a stretch since this isn't a real quic path (yet)) at connection time.
[0] Also, I think not knowing the derp server in our own config might be equivalent to the lightly broader "can not reach that derp server" which we also have to handle anyway.

I think we should require at least a derp region or a UDP address, if neither is provided we don't have any chance of connecting and should fail fast.

I think we should require at least a derp region or a UDP address, if neither is provided we don't have any chance of connecting and should fail fast.

If we do not have any direct address and can not reach the peer's home derp server [0] then we'd have to return either a quinn::ConnectionError::Timeout or quinn::ConnectionError::TransportError (ConnectionError if possible, NO_VIABLE_PATH might be suitable but currently a bit of a stretch since this isn't a real quic path (yet)) at connection time.

Okay, so if we have no UDP addresses, and no derp server OR if that derp server is not one we have in configuration we error. (no UDP && ( no DERP || unknown DERP )) -> error
However, once we attempt to dial in the Conn, if we discover that our connection to the derp server fails us, we don't have a good way of reporting those errors, because all attempts to send packets happen through poll_send, which immediately sends the transmits off to the Actor, which more or less eats the errors. There is likely a good strategy to report these errors back up to poll_send (maybe some ugh mutex locked error field that we check and take each time we poll_send?), but I'd like a longer discussion about the implications of this. My main concern when reporting these connection errors, is that I'm not totally sure how it's supposed to work when we use one magicsock::Conn for multiple connections.
I'm going to move forward on this PR with the following scenarios in mind:

If you do not have UDP addresses and no DERP region, we error
If you do not have UDP addresses and the DERP region is unknown to us, we error
If you have any UDP address and no DERP region or the DERP region is unknown to us, we log a warning, but we keep the current behavior that exists on main.

I can't believe I did this, but I added a lock 😢 😢 😢
Now that 0 is a valid derp region (we use it in testing), we need a new way to represent that we are not connected to any derp region. So now our derp region is represented by Option<u16> (and not Atomicu16).  And now that we have the possibility of multiple derp regions, or no derp region at all, it seemed like this was a more logical way of describing what is going on.
If there is a strong feeling about this, PLEASE FEEL FREE TO CHANGE IT BACK.

Okay, I need to put this down for the night, but the cli tests are WAY more flakey now. Maybe it has something to do with how we now output the derp region to the console?

At @ramfox's request I've run the test suite on windows, and run provide from a windows machine to a mac. While running the test suite I received two "allow this to happen" requests from the windows firewall, which I said yes to. Test suite passed, transfer worked.


Avoid locking when printing

It is not obvious that attempting to print the
value of a struct could cause a deadlock. To avoid
this, this patch does not lock the mutex when generating
a debug representation of the h2 struct.

If this debug output is useful, there's Mutex::try_lock...

Updated

@seanmonstar you good w/ this now?


[WIP] Rails 6.1

Super broken right now.  Let's figure out what's left to do.
Merge with this PR:

[ ] https://github.com/ManageIQ/manageiq-api/pull/1121

Already merged dependencies:

[x] https://github.com/ManageIQ/manageiq/pull/21667
[x] https://github.com/ManageIQ/manageiq/pull/21668
[x] https://github.com/ManageIQ/manageiq/pull/21669
[x] https://github.com/ManageIQ/manageiq/pull/21691
[x] https://github.com/ManageIQ/manageiq/pull/21692
[x] https://github.com/ManageIQ/manageiq/pull/21693
[x] https://github.com/ManageIQ/manageiq/pull/21695
[x] https://github.com/ManageIQ/manageiq/pull/21745
[x] https://github.com/ManageIQ/manageiq/pull/21832
[x] https://github.com/ManageIQ/activerecord-virtual_attributes/pull/97
[x] https://github.com/ManageIQ/activerecord-virtual_attributes/pull/101
[x] https://github.com/ManageIQ/inventory_refresh/pull/98

@miq-bot cross_repo_tests #21652,/core including #21652

anyone know what the issue is here?
 ⚠ - Line 85, Col 10 - Lint/LiteralAsCondition - Literal /true/i appeared as a condition.
 ⚠ - Line 87, Col 10 - Lint/LiteralAsCondition - Literal /false/i appeared as a condition.
 ⚠ - Line 89, Col 10 - Lint/LiteralAsCondition - Literal /nil/ appeared as a condition.

it used to compare a string to these 3 literals using an if and now it uses a case

update:

removed regular expression PR that is already merged into master via https://github.com/ManageIQ/manageiq/pull/21669

@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21652,/core including https://github.com/ManageIQ/manageiq/pull/21652

kicking again. not sure why it did not setup the database correctly.
update:

rebased to pick up some of the extracted gems
rebased to pickup the Gemfile changes. many of our changes are not on some plugin master and our rails specific branches have gone away. (yay)

update:

rebase

Hoping to fix the db migrate issues

@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21652, /core, /providers, including https://github.com/ManageIQ/manageiq/pull/21652

Kicked https://github.com/ManageIQ/manageiq-cross_repo-tests/pull/685 now that virtual attributes 6.1.1 is released and messaging gem minimum version was updated.

@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21652, /core, /providers, including https://github.com/ManageIQ/manageiq/pull/21652 https://github.com/ManageIQ/manageiq-providers-kubevirt/pull/210

@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21652, /core, /providers, including https://github.com/ManageIQ/manageiq/pull/21652 https://github.com/ManageIQ/manageiq-providers-kubevirt/pull/210 https://github.com/ManageIQ/manageiq-providers-red_hat_virtualization/pull/8

@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21652, /all, including https://github.com/ManageIQ/manageiq/pull/21652 https://github.com/ManageIQ/manageiq-providers-kubevirt/pull/210 https://github.com/ManageIQ/manageiq-providers-red_hat_virtualization/pull/8

@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21652, /all, including https://github.com/ManageIQ/manageiq/pull/21652 https://github.com/ManageIQ/manageiq-api/pull/1121