iOS pod install fails

I have upgrade my Flutter install to v0.7.3 beta  and I now get an error when trying to install onto iOS, this was not an issue before, it appears to be something to do with cocoapods.  With a vanilla Flutter app just adding  the flutter blue dependency to the pubspec file causes the issue.
,,,
-> Installing flutter_blue (0.0.1)

Running prepare command
$ /bin/bash -c  set -e mkdir -p gen /Users/accountone/Development/Flutter/hw/Pods/!ProtoCompiler/protoc         --objc_out=gen         --proto_path=../protos         ../protos/.proto
[!] /bin/bash -c
set -e
mkdir -p gen
/Users/accountone/Development/Flutter/hw/Pods/!ProtoCompiler/protoc         --objc_out=gen         --proto_path=../protos         ../protos/.proto
/bin/bash: line 3: /Users/accountone/Development/Flutter/hw/Pods/!ProtoCompiler/protoc: No such file or directory
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/executable.rb:69:in execute_command' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/executable.rb:27:in block in executable'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_preparer.rb:66:in block (2 levels) in run_prepare_command' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_preparer.rb:60:in chdir'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_preparer.rb:60:in block in run_prepare_command' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_preparer.rb:59:in run_prepare_command' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_preparer.rb:37:in prepare!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:61:in install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:374:in install_source_of_pod'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:339:in block (2 levels) in install_pod_sources' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:85:in titled_section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:338:in block in install_pod_sources' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in install_pod_sources' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:164:in block in download_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:162:in download_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:117:in install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in <top (required)>' /usr/local/bin/pod:22:in load'
/usr/local/bin/pod:22:in <main>' Error output from CocoaPods: ↳ /bin/bash: line 3: /Users/accountone/Development/Flutter/hw/Pods/!ProtoCompiler/protoc: No such file or directory [!] Automatically assigning platform ioswith version8.0on targetRunnerbecause no platform was specified. Please specify a platform for this target in your Podfile. Seehttps://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
,,,

This line appers to be looking in the root dir of the project, but the Pods dir is in the iOS directory
/bin/bash: line 3: /Users/accountone/Development/Flutter/hw/Pods/!ProtoCompiler/protoc

I seem to have solved my issue by editing the cached flutter_blue.podspec  and modifying the line
protoc = ENV['PWD'] + '/Pods/!ProtoCompiler/protoc'

to
protoc = ENV['PWD'] + '/ios/Pods/!ProtoCompiler/protoc'

Now it compiles and run as before.

Which version of xcode were you seeing this error on?

@pauldemarco I saw changes in the last version to the file flutter_blue.podspec (https://github.com/pauldemarco/flutter_blue/commits/master/ios/flutter_blue.podspec). This change have broken the build from my root project directory in ios.
When i use flutter run I get:
   -> Installing flutter_blue (0.0.1)
     > Running prepare command
       $ /bin/bash -c  set -e mkdir -p gen /flutter_project/Pods/!ProtoCompiler/protoc         --objc_out=gen         --proto_path=../protos         ../protos/*.proto
    [!] /bin/bash -c
    set -e
    mkdir -p gen
    /flutter_project/Pods/!ProtoCompiler/protoc         --objc_out=gen         --proto_path=../protos         ../protos/*.proto

    /bin/bash: line 3: /flutter_project/Pods/!ProtoCompiler/protoc: No such file or directory

It seems that it's searching for Pods directory in the project root directory instead of  /flutter_project/ios/Pods.
On the other hand if a run from command line  pod install into /flutter_project/ios and then run build from project into xcode everything seems to works.

Since it may not be clear from previous discussion, this issue is the result of several underlying causes:

The build process for flutter_blue's iOS support is sensitive to the working directory in which pod install is executed (because it needs to build !ProtoCompiler and then shell out to it).
Different versions of Flutter have historically executed that build step in different working directories.
Projects created with old versions of Flutter contain support files that codify problem 2, even after users upgrade Flutter to the latest version.

Right now I can create a new project with a recent Flutter installation and install flutter_blue without problems. My environment is as follows:

Flutter beta channel 1.7.8+hotfix.3
Mac OS 10.4.5
Xcode 10.2.1

(I doubt that the target iOS version particularly matters, since the build process runs under Mac OS, not iOS. I can build and deploy to multiple iOS versions.)
As I described here, all attempts so far to fix problem 1 have been non-starters, because they caused more problems than they solved. It seems to me that the easiest way forward for flutter_blue is to drop iOS support for both old Flutter versions and any projects created with old Flutter versions. As such, people still experiencing this problem, such as @catacs, should start from scratch with new support files by creating a new project with flutter create.

@malleusinferni I have just tested what you are saying about create a new project with flutter create. I am experiencing the same problem.
My environment is:
Flutter 1.7.8+hotfix.3 • channel stable
Mac OS 10.14.4
Xcode 10.2.1
pod --version: 1.7.5
Modifying manually the protoc path in the ../flutter_blue-0.6.1+1/ios/flutter_blue.podspec file I get it working with the initial variable used to set it protoc =  '#{PODS_ROOT}/Pods/!ProtoCompiler/protoc'

@pauldemarco  could you please explain why you revert the change in commit 38ae679f ?
I got the same problem which @catacs did have

This should be resolved in the latest version 0.6.3
If everyone could give it a shot and let me know, we might be able to squash this!

Protoc has been removed from the project, as the files are compiled before hand.
This should no longer be an issue.


Add rabbitmq

rabbit mq integrated for the queried events. the events are published to the queue and read from the queue to be processed

This item belongs to payment request #BAD698 on OnlyDust:

from ulerdogan to ulerdogan
1 item included
$500 for 1 day of work


Fix User class path

Just a minor leftover in a method that isn't used currently.

If it's not used, why is it even in there?

Thanks guys. I've implemented that here: https://github.com/laravel/framework/pull/10324.


recommend removing lst[::-1]

https://github.com/roualdes/MATH131/blob/7ab23cb9fadb7575ff9f9e5d934fb9710cff55ad/week-01.md?plain=1#L289-L297

Did you see that I put it in a sub-section "#### Advanced and optional (not required)"?  Is that good enough?

No i did not! Ty. that's fine. i had just gone in to write another note about the data frame section and thought to add that while i was there. apologies for not checking first.


[Bug] PlutoGridShortcut and arrow keys not working on linux

Steps to reproduce the bug
Just run the following code on a linux system.
Expected results
Being able to move the focused cell with the arrow keys.
If I press shift, "Shift pressed" should be printed.
Actual results
Nothing happens.
Code sample
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pluto_grid/pluto_grid.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'PlutoGrid Example',
      home: Scaffold(
        appBar: AppBar(title: const Text('PlutoGrid Example')),
        body: const SimplePlutoGrid(),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    // Define the columns for the grid
    final List<PlutoColumn> columns = [
      PlutoColumn(
        title: 'ID',
        field: 'id',
        minWidth: 40,
        width: 40,
        enableContextMenu: false,
        enableDropToResize: false,
        type: PlutoColumnType.number(),
      ),
      PlutoColumn(
        title: 'Name',
        field: 'name',
        type: PlutoColumnType.text(),
      ),
      PlutoColumn(
        title: 'Age',
        field: 'age',
        type: PlutoColumnType.number(),
      ),
    ];

    // Define the rows for the grid
    final List<PlutoRow> rows = [
      PlutoRow(cells: {
        'id': PlutoCell(value: 1),
        'name': PlutoCell(value: 'Alice'),
        'age': PlutoCell(value: 25),
      }),
      PlutoRow(cells: {
        'id': PlutoCell(value: 2),
        'name': PlutoCell(value: 'Bob'),
        'age': PlutoCell(value: 30),
      }),
      PlutoRow(cells: {
        'id': PlutoCell(value: 3),
        'name': PlutoCell(value: 'Charlie'),
        'age': PlutoCell(value: 35),
      }),
    ];

    return PlutoGrid(
      columns: columns,
      rows: rows,
      onChanged: (event) {
        print('changed');
      },
      configuration: PlutoGridConfiguration(
        enableMoveHorizontalInEditing: true, // Allow horizontal navigation
        shortcut: PlutoGridShortcut(
          actions: {
            ...PlutoGridShortcut.defaultActions,
            LogicalKeySet(LogicalKeyboardKey.shift): CustomShiftKeyAction(),
          }
        )
      ),
    );
  }
}
// Override shift key action to enable to start
// typing in uppercase in a PlutoGrid cell.
class CustomShiftKeyAction extends PlutoGridShortcutAction {
  @override
  void execute({
    required PlutoKeyManagerEvent keyEvent,
    required PlutoGridStateManager stateManager,
  }) {
    stateManager.setEditing(true);
    print('Shift pressed');
  }
}

Execution Environment
Flutter version
Flutter version is 3.24.5
PlutoGrid version
PlutoGrid version is 8.0.0
OS
Ubuntu 22.04.5

@itsnotmeman There was an issue with identifing key presses in particular shift, ctrl combinations.
I created a PR for this issue in https://github.com/doonfrs/pluto_grid_plus
Please check that out if that fixes this

@stan-at-work Thanks for the PR. Unfortunately it does not fix the issue.

@stan-at-work Thanks for the PR. Unfortunately it does not fix the issue.

Alright i cant test it on linux, could you send a detailed stacktrace and or debugging information. A videa would be great.
Can't prommise anything but maybe wa can work it out.

The program doesn't crash. It just ignores any pressed arrow, shift and enter key.
I compile the program in WSL2. But I also tried to run the binary in a linux VM and it doesn't work neither.
flutter run --verbose
[   +7 ms] Unable to locate an Android SDK.
[   +4 ms] executing: uname -m
[   +1 ms] Exit code 0 from: uname -m
[        ] x86_64
[  +51 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +44 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +35 ms] Skipping pub get: version match.
[ +128 ms] Generating /home/username/test/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +53 ms] No packages with native assets. Skipping native assets compilation.
[   +1 ms] Initializing file store
[   +4 ms] Skipping target: gen_localizations
[   +2 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/username/test/.dart_tool/package_config_subset}
[  +25 ms] gen_dart_plugin_registrant: Complete
[        ] Skipping target: _composite
[        ] complete
[   +2 ms] Launching lib/main.dart on Linux in debug mode...
[   +1 ms] /home/username/development/flutter/bin/cache/dart-sdk/bin/dartaotruntime --disable-dart-dev /home/username/development/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot --sdk-root
/home/username/development/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --experimental-emit-debug-metadata --output-dill /tmp/flutter_tools.RGGOIZ/flutter_tool.ASIISM/app.dill
--packages /home/username/test/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build/cache.dill.track.dill --verbosity=error --enable-experiment=alternative-invalidation-strategy
[  +14 ms] Building Linux application...
[   +5 ms] <- compile package:test/main.dart
[   +1 ms] executing: [build/linux/x64/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFLUTTER_TARGET_PLATFORM=linux-x64 /home/username/test/linux
[  +64 ms] -- Configuring done
[   +9 ms] -- Generating done
[   +4 ms] -- Build files have been written to: /home/username/test/build/linux/x64/debug
[   +9 ms] executing: ninja -C build/linux/x64/debug install
[   +3 ms] ninja: Entering directory `build/linux/x64/debug'
[+1461 ms] [1/5] Generating /home/username/test/linux/flutter/ephemeral/libflutter_linux_gtk.so, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h,
/home/username/test/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h,
/home/username/test/linux/flutter/ephemeral/flutter_linux/fl_engine.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h,
/home/username/test/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_method_call.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h,
/home/username/test/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_method_response.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h,
/home/username/test/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h,
/home/username/test/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/fl_value.h,
/home/username/test/linux/flutter/ephemeral/flutter_linux/fl_view.h, /home/username/test/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[   +2 ms] [   +5 ms] Unable to locate an Android SDK.
[        ] [   +5 ms] executing: uname -m
[        ] [   +1 ms] Exit code 0 from: uname -m
[        ] [        ] x86_64
[        ] [  +30 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] [   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [  +43 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[        ] [  +10 ms] Initializing file store
[        ] [   +5 ms] Done initializing file store
[        ] [  +25 ms] Skipping target: gen_localizations
[        ] [   +4 ms] Skipping target: gen_dart_plugin_registrant
[        ] [ +350 ms] Skipping target: unpack_linux
[        ] [ +252 ms] Skipping target: kernel_snapshot_program
[        ] [   +2 ms] Skipping target: native_assets
[        ] [        ] Skipping target: kernel_snapshot_native_assets
[        ] [        ] Skipping target: kernel_snapshot
[        ] [ +351 ms] Skipping target: debug_bundle_linux-x64_assets
[        ] [        ] Persisting file store
[        ] [   +4 ms] Done persisting file store
[        ] [   +6 ms] build succeeded.
[        ] [   +6 ms] "flutter assemble" took 1,069ms.
[        ] [  +87 ms] ensureAnalyticsSent: 85ms
[        ] [        ] Running 1 shutdown hook
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[ +621 ms] [2/5] Building CXX object CMakeFiles/test.dir/flutter/generated_plugin_registrant.cc.o
[  +26 ms] [3/5] Building CXX object CMakeFiles/test.dir/my_application.cc.o
[  +88 ms] [4/5] Linking CXX executable intermediates_do_not_run/test
[        ] [4/5] Install the project...
[   +3 ms] -- Install configuration: "Debug"
[   +6 ms] -- Installing: /home/username/test/build/linux/x64/debug/bundle/test
[        ] -- Set runtime path of "/home/username/test/build/linux/x64/debug/bundle/test" to "$ORIGIN/lib"
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/icudtl.dat
[   +1 ms] -- Installing: /home/username/test/build/linux/x64/debug/bundle/lib/libflutter_linux_gtk.so
[  +27 ms] -- Up-to-date: /home/username/test/build/linux/x64/debug/bundle/lib
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/packages
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/NOTICES.Z
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/kernel_blob.bin
[  +28 ms] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/fonts
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/fonts/MaterialIcons-Regular.otf
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/AssetManifest.bin
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/version.json
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/AssetManifest.json
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/FontManifest.json
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/shaders
[        ] -- Installing: /home/username/test/build/linux/x64/debug/bundle/data/flutter_assets/shaders/ink_sparkle.frag
[   +6 ms] Building Linux application... (completed in 2,376ms)
[   +1 ms] ✓ Built build/linux/x64/debug/bundle/test
[ +509 ms] VM Service URL on device: http://<IP_ADDRESS>:34073/IakoXWP4yM8=/
[   +1 ms] Caching compiled dill
[  +29 ms] Connecting to service protocol: http://<IP_ADDRESS>:34073/IakoXWP4yM8=/
[  +62 ms] Launching a Dart Developer Service (DDS) instance at http://<IP_ADDRESS>:0, connecting to VM service at http://<IP_ADDRESS>:34073/IakoXWP4yM8=/.
[  +46 ms] DDS is listening at http://<IP_ADDRESS>:46483/_ziBfjRfAss=/.
[  +31 ms] Successfully connected to service protocol: http://<IP_ADDRESS>:34073/IakoXWP4yM8=/
[  +14 ms] DevFS: Creating new filesystem on the device (null)
[   +6 ms] DevFS: Created new filesystem on the device (file:///tmp/testORMSSS/test/)
[   +1 ms] Updating assets
[  +64 ms] Syncing files to device Linux...
[   +1 ms] Compiling dart to kernel with 0 updated files
[        ] Processing bundle.
[        ] <- recompile package:test/main.dart b6825ee0-5c51-4ef6-a434-98bd4dff4400
[        ] <- b6825ee0-5c51-4ef6-a434-98bd4dff4400
[        ] Bundle processing done.
[  +28 ms] Updating files.
[        ] Pending asset builds completed. Writing dirty entries.
[        ] DevFS: Sync finished
[        ] Syncing files to device Linux... (completed in 31ms)
[        ] Synced 0.0MB.
[        ] <- accept
[   +1 ms] Connected to _flutterView/0x559a62574fc0.
[   +1 ms] Flutter run key commands.
[        ] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h List all available interactive commands.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] A Dart VM Service on Linux is available at: http://<IP_ADDRESS>:46483/_ziBfjRfAss=/
[ +211 ms] The Flutter DevTools debugger and profiler on Linux is available at: http://<IP_ADDRESS>:9101?uri=http://<IP_ADDRESS>:46483/_ziBfjRfAss=/
[+14354 ms] flutter: changed
[+3468 ms] Service protocol connection closed.
[        ] Lost connection to device.
[        ] DevFS: Deleting filesystem on the device (file:///tmp/testORMSSS/test/)
[        ] DevFS: Deleted filesystem on the device (file:///tmp/testORMSSS/test/)
[   +1 ms] "flutter run" took 21,561ms.
[  +66 ms] ensureAnalyticsSent: 63ms
[        ] Running 2 shutdown hooks
[   +4 ms] Shutdown hooks complete
[        ] exiting with code 0


Update npm when building Node artifacts

The latest version of npm has some useful properties that should make our artifact builds succeed more consistently.

No significant performance differences

Note: with this change, the Node artifact builds succeed, except for timeouts on Mac: https://grpc-testing.appspot.com/view/Artifacts/job/gRPC_build_artifacts/141.
The Linux failures are #10388 and #11161. The Mac failures are #11223. The Windows failures are #11312. And the interop failure is #10512.


Replacing querystring with fast-querystring

I've been working on a fast querystring parser for Node.js and saw that Express.js is using the native querystring module. As of right now, fast-querystring is 40% faster than querystring.
https://github.com/expressjs/express/blob/bf4c3ee00f3b95a329fc1dd4dd0cd17c74178121/lib/utils.js#L24
Here's an example of a benchmark of Nest.js with replacing fast-querystring and having a 25% op/sec increase with an old version of fast-querystring. - https://github.com/nestjs/nest/pull/10248#issuecomment-1238623339
I'd be happy to open a pull request, but before that, I wanted to create an issue and have a discussion about it.

That looks really nice! We'll have to verify the changes between the built in querystring and your module for all the supported Node.js versions if the desire is to include this as a non breaking change. The main question I have though: why not get these improvements in Node.js core? We would prefer to use what is included in Node.js over modules if possible. Ideally I'd like to know if Node.js is rejecting your improvements for some particular reason, as maybe that reason may affect our usgae as well.

Hey @dougwilson
Thanks for the fastest maintainer response on a large-scale Github history.
I didn't open an issue or a pull request to Node.js since the querystring module is considered legacy, which means, it is no longer actively maintained and other alternatives are available. For more information: https://nodejs.org/api/documentation.html#stability-index
I have an active open pull request to change this on both Nest.js and find-my-way.
fast-querystring already uses the same test suite from the node.js repository, but lacks testing it on different Node versions. (Note taken. I'll definitely add it to the workflow)

Ah, I see. And as far as compatibility goes, I guess I don't mean testing your module on different Node.js versions, but rather, comparing it to the querystring of different Node.js version. For example, take the scenario of a Express.js user on Node.js 10.0.0. They update Express.js as a non-breaking release (minor version I suppose). Now their req.query is no longer the results of the built-in Node.js querystring parser, but instead fast-querystring. The question is: is that scenario going to result in different behavior of the app? If so, it would be a breaking change for Express.js to release, if that makes sense. My guess based off your readme is that it wouldn't be able to land in Express.js 4.x since some Node.js versions will return the object with a object prototype, but the fast-querystring module only returns with null prototype, breaking the behavior on those apps just by upgrading a minor Express.js (thus would need to be deferred to a major Express.js release).

That behavior is consistent with the existing querystring module implementation.
Prototype functions are considered harmful since it is open to prototype pollution. Here's the code from the Node.js repository that validates the implementation.
Even though it might be a breaking change (I don't know when Node.js introduced non-prototype objects for querystring), I'm up for fixing this vulnerability for previous node versions.

Yes, folks who want that changed can always upgrade their Node.js version or set a custom querystring parser in Express.js and keep using the older Node.js version. That is something up to those apps as they need. Express.js cannot make such a change as a non-breaking release, however, just like Node.js did not.

I see. That's a good point.
I added a new test suite to validate if the existing test suite returns the same result as fast-querystring, and it seems Node 14+ returns non-protototype object for parse.
https://github.com/anonrig/fast-querystring/pull/16/commits/c77259e4566429b1d1b387d9d9f70003a0b232e2

I did some research and found that querystring.parse did not have a breaking change after Node 8. (https://nodejs.org/api/querystring.html#querystringparsestr-sep-eq-options)
According to test-querystring.js on Node repository's Git blame, all test files are 6+ years old. Except for a fix on stringify which was backported to 12.18.3 (https://github.com/nodejs/node/pull/33918). Since express only uses querystring.parse that's ok.
I believe it's safe to say that if we are aiming for >= 8, there isn't any breaking change on parse and stringify.

I believe it's safe to say that if we are aiming for >= 8, there isn't any breaking change on parse and stringify.

Since Express.js 4.x targets Node.js 0.10+, it sounds like this would indeed be breaking for Express.js 4.x and would thus need to land on 5.x, but as I mentioned above, the desire is to move from querystring to the standard URLSearchParams for 5.x, so it does look like there is not a place that we could land fast-querystring in this project.

I see. FYI, URLSearchParams are also really slow in both parse and stringify. (https://github.com/anonrig/fast-querystring#benchmark)
Thanks for your time. I'm closing this issue.

@dougwilson  with express5 in beta, are you still considering to switch to URLSearchParams? it might not be available on older node versions but could be polyfilled then.


SLF4J substitute loggers break the build

SLF4J: The following set of substitute loggers may have been accessed
SLF4J: during the initialization phase. Logging calls during this
SLF4J: phase were not honored. However, subsequent logging calls to these
SLF4J: loggers will work as normally expected.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
SLF4J: akka.event.slf4j.Slf4jLogger
SLF4J: com.x.y.z.SomeActor
Whenever the following lines appear in the logs (marked as red), 3/4 times, the build will fail with a error.
"Compilation error: Scala compiler in Test"
Using Java 7/8, SBT 0.13.7 (it happens in all versions of SBT since 0.13 at least), TeamCity 8.1.5.
SBTTCLogger  0.1.0-SNAPSHOT, since i can't load the 0.1.0.
This is extremely frustrating since correct builds are spuriously failing and people are losing confidence in TeamCity .
It's not down to a particular class, many classes can show initialization of SLF4J. TeamCity logger needs to stops flagging errors. It is NOT an error.
I have disabled:
"the build process exit code is not zero"
"an error message is logged by build runner "
but it doesn't make any difference.

Furthermore, this would also break:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
I'm trying to use:
testOptions         in Test += Tests.Setup(
  cl =>  //to prevent Substitute Logger issues with SLF4J
    cl.loadClass("org.slf4j.LoggerFactory").
      getMethod("getLogger",cl.loadClass("java.lang.String")).
      invoke(null,"ROOT")

)

and
parallelExecution in Test := false
following:
https://github.com/typesafehub/scalalogging/issues/23
This is never a problem when running SBT from command line.

The way to get past this issue is the following:
testOptions         in Test += Tests.Setup(
  cl =>  //to prevent Substitute Logger issues with SLF4J
    cl.loadClass("org.slf4j.LoggerFactory").
      getMethod("getLogger",cl.loadClass("java.lang.String")).
      invoke(null,"ROOT")

)

and
parallelExecution in Test := false
following:
https://github.com/typesafehub/scalalogging/issues/23


Update pubspec.yaml

Upgraded dio version to 5.0.1 and rxdart to 0.27.7
Upgraded flutter environment sdk to <4.0.0. compactible

Please update this


[PromptLab] "Open Advanced Settings" -- can we control which editor?

Extension
https://www.raycast.com/HelloImSteven/promptlab
Description
"Open Advanced Settings" launches Xcode. Can this be controlled/configured to launch a different editor (VS Code, etc.)?
Who will benefit from this feature?
No response
Anything else?
No response

It opens in your default JSON editor. You can look here for instructions on how to change the default editor for all files with the .json extension.


Add prql.target setting and use it to compile PRQL to SQL

This would allow users to configure SQL dialect to use per project via VSCode workspace settings and instruct PRQL extension to produce SQL for different data sources.
Current list of SQL supported dialects from: https://github.com/PRQL/prql/blob/main/prql-js/src/lib.rs#L124
pub enum Dialect {
    Ansi,
    BigQuery,
    ClickHouse,
    Generic,
    Hive,
    MsSql,
    MySql,
    PostgreSql,
    SQLite,
    Snowflake,
    DuckDb,
}

This is a good idea, +1 from me.
A note about the behavior: compiler will use the dialect passed in SQLCompileOptions and fallback to target specified in prql target:... header. This means that when the option you've proposed would be set in for a workspace, all queries would use it, even if they specify the target in their header.

+1 from me too!

A note about the behavior: compiler will use the dialect passed in SQLCompileOptions and fallback to target specified in prql target:... header.

Good point.
More of a compiler question, but I wonder whether this is the right way around — generally we should have the more "local" config take precedence, and arguably the config in the query header is more local...

I don't think we need to gate this, it would be fine to take a dialect and then later change it, but ref the question from @RandomFractals on Discord:

Probably this should be called target and take sql.duckdb, given that's the external interface.
But that brings up the question of why the compiler interface has the sql::Options struct, which takes a Dialect, rather than something that takes a Target.
Have we overcomplicated the number of levels of options? Did I confuse things by changing this to target?

Oh, I was not aware of prql target option. I simply looked at prql-js api and suggested we add this prql vscode ext. setting to generate sql for the desired sql dialect. Currently, we are not doing it in compiler.ts using prql-js api: https://github.com/RandomFractals/prql-vscode/blob/main/src/compiler.ts#L5
As for the target vs dialect, I like dialect more, or we can call it prql.sqlDialectTarget if you'd like. Just target is too generic.

More of a compiler question, but I wonder whether this is the right way around — generally we should have the more "local" config take precedence, and arguably the config in the query header is more local...

(This is off-topic and we need to move the repository if we want to continue the discussion, but let me comment on one thing.)
I noticed this behavior while working on prqlr. https://github.com/eitsupi/prqlr/blob/a76602e9809f9ffb6a04de87e359818e7680291c/R/compile.R#L3
Certainly if the user is free to rewrite the query, the query is more local, but if the query is written to a file and we want to compile it to multiple targets, it would be convenient if the compiler side settings take precedence.
So I see an advantage to the current design.

We discussed this issue on the call today and came to following conclusion:

we should stick to naming compile target and use dialect as sub type of SQL target,
add option prql.target which takes i.e. sql.duckdb (as @max-sixty proposed above),
rename the panel that contains SQL to "PRQL preview" #47.

This was decided based on tendency to be consistent across all our our libraries and integrations, and to use similar conventions as other languages.

@aljazerzen Sql Preview panel title, command, and view name change has been merged already. I am not following why change it back to PRQL Preview which I find confusing while looking at the open prql document on the left.
I'll use prql.target for the new compile to target setting and will implement the rest as described at the end of #42.

@aljazerzen Sql Preview panel title, command, and view name change has been merged already. I am not following why change it back to PRQL Preview which I find confusing while looking at the open prql document on the left.

You should make the final decision as the person doing it! The path of logic we discussed was that the preview of a Markdown document was called "Markdown preview", rather than "HTML preview", and so possibly it makes sense to call it "PRQL Preview".
That said, my initial reaction was more skeptical, and I / we trust your judgement...

Let's keep changes made in #47 as is for now, and open a separate ticket if we want to rework those changes.
The content of that Preview panel is SQL or some flavor of SQL generated by the PRQL compiler, so SQL Preview is more descriptive of what's shown there now.
This ticket is for the new prql.target setting. I'll do my best making those changes and we can review and adjust in the next PR before merging into main to finalize it.

@max-sixty & @aljazerzen I was looking for details of prql-js api update with the updated target option.
What's the new compile(query, options) JS API signature and what properties do we need to set in options?
Do we simply use compile(query: string, { target: 'sql' })?
Also, I would need a list of string enums for the Dialect enum I found in the core repo.
We'll add prql.target setting to config in package.json as:
...
  "configuration": {
      "type": "object",
      "title": "PRQL",
      "properties": {
        "prql.target": {
          "type": "string",
          "enum": [
            "sql.duckdb",
            "sql.sqlite",
// ???
...
          ],
          "default": "sql", // or "none", what should go here?
          "description": "PRQL Compiler SQL target dialect to use by default when generating SQL from PRQL config."
        },
...

Also, I would need a list of string enums for the Dialect enum I found in the core repo.

Do you think this can be implemented in prql-js after PRQL/prql#1727 is merged?

yeah, I can wait till https://github.com/PRQL/prql/pull/1727 is merged.
To make JS api easier to use, I do think target in compile options should be an acceptable dialect name string not an enum value like I've seen in the JS tests above.
Is that PR will support?

ok. @eitsupi this is perfect! https://github.com/PRQL/prql/pull/1727/commits/764d8d089b931eaf0698983ae2266e2e91d52e2b
Thank you! I'll go ahead and map the rest in my feature branch for the ext.

@max-sixty & @aljazerzen remaining: update prql-js to v0.4.3 when you release it and scrape that options mapping function.

New Prql Target Setting in the works with genered SQL and compiler version and target display in SQL Preview:


Google Assistant not working

Hi, I just followed the guide that's on the new README.md for setting up Google Assistant with DialogFlow, however I can't get it working at all. I run Test Apps but I get this error. I have no idea what is going on or what I am doing wrong. I'm using Home Assistant Cloud for access to the internet.

I'm using 1.1.6 of Plex Assistant, and 2021.5.4 for Home Assistant. Plex Assistant itself works perfectly tho, I can ran it within Home Assistant just fine, but the Google Assistant integration is what's not working

I am having the same issue, however from Dialogflow test console it works fine.

Having similar issue. I am able to get it to (kind of) work from DialogFlow test console (it played a completely different movie) but I can't ask Google Home devices to play it, it only shows me imdb or google search results

I think these steps need to be added to the dialogflow setup,

Click on integrations
Under Google Assistant click "Not ready yet? Continue with the integration"
Click "Manage Assistant App"
This opens up a new tab at console.actions.google.com for the Dialogflow project
Click "Quick Setup" and "Decide how your action is invoked"
Change the Display Name to "Plex"

I can get through as far as the fourth step, but when I open the new tab, I get an error simply saying "There was an error completing your request", with a button saying Try Again.

Can you sign in to https://console.actions.google.com/ ?

yeah I can, takes me to the "Welcome to Actions on Google" page.

No idea then. I had some previous projects in there, but the plex project was created automatically for me when clicking the link in Dialogflow.

weird, I'll try refresh everything and try again

Still no luck. Should I build a new project in Action Blocks?

ok so it seemed I had to import the plex project before it worked, I'm yet to test it though.

Yes the steps I outlined would come after the initial Dialogflow steps outlined in the documentation.

So if I ask GA to "Play The Avengers on Plex on the Office Display", it responds with "I don't know, but I found these results on search" and pulls up search results. Still doesn't seem to work after doing the above steps.

You need to use the specific phrases outlined in the documentation. "Hey Google, tell plex to play the avengers on the office display"
"Tell Plex" or "Ask Plex" should immediately follow "Ok Google" or "Hey Google".


Enhancing the cache validation used by zmetadata_exists()

Currently, we rely on this simple function https://github.com/carbonplan/cmip6-downscaling/blob/23f4c485d9acc62b1fc2f08b6fda086222ed6dcd/cmip6_downscaling/methods/common/utils.py#L16 for caching. unfortunately, this caching utility isn't reliable all the time. i've run into scenarios in which the .zmetadata file gets created for zarr stores that have been partially written.  As result, one can easily end up with corrupted zarr stores throughout the pipeline.
it's worth looking into more robust ways to enhance this utility function.

https://github.com/carbonplan/cmip6-downscaling/pull/230 fixed this issue


Argon init with roblox-ts selected is broken when choosing the quick option.

https://github.com/argon-rbx/argon-vscode/assets/63291726/9577e3f6-e9b3-42a1-a84f-6c6e9b547759

Fixed in 39ad218d9b32a280017b2c534f75f49a7ddd2ac7


Use DIRECTORY_SEPARATOR when creating the path with dirname

On Windows under certain circumstances YRewrite generates invalid URLs such as http://my-domain.localhost\/page. This is because
    $path = dirname($_SERVER['SCRIPT_NAME']);
    if (rex::isBackend()) {
        $path = dirname($path);
    }
    $path = rtrim($path, '/') . '/';

will not remove the final \ that is part of the path returned from dirname. Using the locale DIRECTORY_SEPARATOR the issue can be resolved.

Unfortunately this fixes the homepage only. On other pages I receive a 404 which does not happen with the plugin deactivated or the site deployed to Linux Hosting.

Thank and sorry for answering so unbelievable late. Till now, yrewrite is not made for non Linux Systems, so we need to add a few more DIRECTORY_SEPARATORs..
https://github.com/yakamara/redaxo_yrewrite/issues/291


Upgrade cflinuxfs3 to v0.115.0

What
This addresses a number of CVEs, including:
https://www.cloudfoundry.org/blog/usn-4019-1/ (SQLite)
https://www.cloudfoundry.org/blog/usn-4034-1/ (ImageMagick)
and a few others. If you're super interested you can read the release
notes since the last release:
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.95.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.96.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.97.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.98.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.99.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.100.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.101.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.102.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.103.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.104.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.105.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.106.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.107.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.108.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.109.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.110.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.111.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.112.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.113.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.114.0
https://github.com/cloudfoundry/cflinuxfs3/releases/tag/0.115.0
How to review

Check that I've copy-pasted this right: https://bosh.io/releases/github.com/cloudfoundry/cflinuxfs3-release?version=0.115.0
Run it through a dev env
(if you're being super-thorough) read through the release notes above
and confirm there's nothing that's likely to break people's apps

Who can review
Not @richardtowers

Running this down my dev env


[RESOLVED] Interface eth0(): High error rate (>2 for 5m)

Problem started at 14:36:29 on 2023.08.11
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Operational data: errors in: 0, errors out: 0
Original problem ID: 35290
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23483&eventid=35290

Problem has been resolved in 3m 0s at 14:39:29 on 2023.08.11
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Original problem ID: 35290


Support prometheus HTTP API and promQL.

[ ] If this is non-trivial feature, paste the links/URLs to the design doc.

[ ] Update the documentation to include this new feature.

[X] Tests(including UT, IT, E2E) are added to verify the new feature.

[X] If it's UI related, attach the screenshots below.

[ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #10080 .

[X] Update the CHANGES log.

Support HTTP API list:

/api/v1/metadata
/api/v1/labels
/api/v1/label/{label_name}/values
/api/v1/series
/api/v1/query
/api/v1/query_range

Support basic promQL for query traffic/metrics/labeled_metrics/topN/sampled_records from OAP
A Grafana dashboards demo based on this feature can visit:
http://<IP_ADDRESS>:3000/
admin/admin
Include: General Service / Service Mesh / Virtual-Database

A Grafana dashboards demo based on this feature can visit:
http://<IP_ADDRESS>:3000/
admin/admin

Once this PR gets merged, please free this public IP.

One TODO, complete docs for PromQL. This should be done through next PR.


error in 03 notebook

Incorrect path:

Thanks! updated in the develop branch, will be updated in main in next release.


See if there is a hosting provider with a replicated registry

If we are able to index a local registry we can save on bandwidth and not risk running into rate limits. If there is a provider that does with, we don't have to futz with it.

I believe this is done. Closing the issue. If we need to reopen thats fine.


Migration from react-native-maps-super-cluster

Hello!
I would like to ask you if there is some tutorial for migration tips/tutorial from https://github.com/novalabio/react-native-maps-super-cluster package. Thank you so much!

Hmm my module is much simpler but it really depends how you code looks right now.
Is it fresh project or something more advanced?
I can help you with refactoring ;)

What about performance comparision? Don't you think it is less effective when the original markers have to be rendered in order to calculate clusters?

Actually they are no re-rendered. If there is no need for clustering, they will be passed to MapView without editing. I use React.Children to do that.


[devtools] Debugging gets silently disabled

React editor. Happened while trying to debug #2186
Very specific steps to reproduce:

Open up app/src/editor.js in Sources
Place a breakpoint on the first line after Editor.prototype.insertText = ...
Paste using Ctrl+V

This breakpoint should fire on every insert. Even if I stop trying to paste, and try to input a single character, insertText should fire, thus this breakpoint should too.

Closing as this no longer seems to be an issue.


blaze.join fails on MySQL tables with foreign keys

I have a MySQL database with two tables that have a foreign key relationship. Attempting to join them using blaze.join fails within the datashape module with an error of the form
TypeError: DataShape map[int32, {
 ... (contents omitted)
}]  is not NumPy-compatible

Reproduced with Blaze 0.8.3+10.g9e83642 and datashape 0.4.7+12.g409fc4b
To reproduce
Create dummy MySQL database
CREATE DATABASE `test`;
USE `test`;
CREATE TABLE `table_a` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `table_b` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `id_a` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  CONSTRAINT `b_to_a` FOREIGN KEY (`id_a`) REFERENCES `table_a` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `table_a` (`name`) VALUES ('name_a_1');
INSERT INTO `table_a` (`name`) VALUES ('name_a_2');
INSERT INTO `table_a` (`name`) VALUES ('name_a_3');
INSERT INTO `table_b` (`name`, `id_a`) VALUES ('name_b_1', 1);
INSERT INTO `table_b` (`name`, `id_a`) VALUES ('name_b_2', 2);

Join tables with blaze
import blaze
import sqlalchemy

username = '[YOUR_MYSQL_USERNAME]'
db_url = ('mysql+pymysql://%s@localhost/test' % username)
engine = sqlalchemy.create_engine(db_url)
db = blaze.Data(engine)
joined = blaze.join(db['table_a'], db['table_b'], on_left='id', on_right='id_a', how='inner')

Result
From iPython:
TypeError                                 Traceback (most recent call last)
<ipython-input-1-8a365ad7ca9e> in <module>()
      6 engine = sqlalchemy.create_engine(db_url)
      7 db = blaze.Data(engine)
----> 8 joined = blaze.join(db['table_a'], db['table_b'], on_left='id', on_right='id_a', how='inner')

/Users/dgolden/.pyenv/versions/3.5.0/lib/python3.5/site-packages/blaze/expr/collections.py in join(lhs, rhs, on_left, on_right, how, suffixes)
    555     for n, promotion in enumerate(map(partial(promote, promote_option=False),
    556                                       left_types,
--> 557                                       right_types)):
    558         if promotion == object_:
    559             raise TypeError(

/Users/dgolden/.pyenv/versions/3.5.0/lib/python3.5/site-packages/datashape/promote.py in promote(lhs, rhs, promote_option)
     38             np.result_type(
     39                 datashape.to_numpy_dtype(left),
---> 40                 datashape.to_numpy_dtype(right),
     41             ),
     42         )

/Users/dgolden/.pyenv/versions/3.5.0/lib/python3.5/site-packages/datashape/coretypes.py in to_numpy_dtype(ds)
   1137     """ Throw away the shape information and just return the
   1138     measure as NumPy dtype instance."""
-> 1139     return to_numpy(ds.measure)[1]
   1140
   1141

/Users/dgolden/.pyenv/versions/3.5.0/lib/python3.5/site-packages/datashape/coretypes.py in to_numpy(ds)
   1170         msr = ds
   1171
-> 1172     return tuple(shape), msr.to_numpy_dtype()
   1173
   1174

/Users/dgolden/.pyenv/versions/3.5.0/lib/python3.5/site-packages/datashape/coretypes.py in to_numpy_dtype(self)
    143
    144     def to_numpy_dtype(self):
--> 145         raise TypeError('DataShape %s is not NumPy-compatible' % self)
    146
    147

TypeError: DataShape map[int32, {id: int32, name: ?string[255]}] is not NumPy-compatible

I am also running into this.

The issue is that we are implicitly following the fkey to the table that it is pointing to. This means that instead of a type of int32, your id column has a type of map[int32, {id: int32, name: ?string[255]}] Which says that it is a mapping (like a dictionary) from int32 to a record with two fields. I imagine that these fields are the columns of the table you are pointing to.
For right now, you could explicitly pass a dshape to your table by looking at at the current db.dshape and manually changing out the map[int32, {id: int32, name: ?string[255]}] with just ``int32`. For example:
>>> db.dshape  # assume that this is what your dshape is. It will probably look very similar.
dshape('var * {a: int64, b: float32, id: map[int32, {id: int32, name: ?string[255]}]}')
>>> new_db = bz.Data(engine, dshape='var * {a: int64, b: float32, id: int32}')

Note that we swapped out the field type for the id column to just be an int32. This will not have blaze attempt to follow the foreign key.
Hopefully this helps fix your immediate problem. We will need to work on making this easier to do. One idea that I have would be to make follow_fkeys default to false so that people don't run into this without realizing that we are doing this.

@llllllllll thanks for the tip. I can confirm that your solution works on my test database; specifically, I set the db variable like:
db = blaze.Data(engine, dshape="""{
  table_a: var * {id: int32, name: ?string[255]},
  table_b: var * {
    id: int32,
    name: ?string[255],
    id_a: int32
    }
  }""")

where id_a is explicitly set to int32 instead of its default map[...]. Now the join works fine. Thanks for the tip!
In the mean time, is there a way to specify the dshape of a single expression instead of the whole database? For example, if I have just one problem table, maybe I could do something like:
db['table_b'].as_dshape('id: int32, name: string[255], id_a: int32']

to avoid typing in the schema for the entire database.
Regardless, this approach of explicitly identifying the schema is a functional workaround, but it doesn't scale well for a reasonably large production database with potentially dozens of tables and relationships, like I actually have (not shown). I'd have to type out the entire schema into the Python code, which would break if the underlying database schema ever changed. So your proposed solution of not following foreign keys by default (follow_fkeys defaults to fals), or at least making it an option, sounds like a more sustainable one.

@dgolden1 I've created a follow-up issue regarding foreign keys.  I'm closing this issue, please re-open if something else comes up regarding this specifically.


Display description of exported environment variables along with aliases and functions

I think it would be useful if I could do something like that in a desk file:
# Description: my desk to work on things.

# Do something.
alias mycommand="foo"

# My environment variable.
export MYVAR="something"

And then when typing desk with the desk activated it would show the description of $MYVAR:
mydesk - my desk to work on things.

  mycommand  Do something.

Environment variables:

$MYVAR  My environment variable.

@jamesob, would you like me to create a PR related to this so you can check it out and determine if it indeed fixes this issue the way you would want?


HDDS-5997 Centralize string based replication config validation via ReplicationConfigValidator

What changes were proposed in this pull request?
We are having a property called ozone.replication.allowed-configs.
In this PR I propose to use the validation in the creator methods of ReplicationConfig class, and use this as a central
place to implement the parsing and validation logic of ReplicationConfigs.
It is out of scope to adjust the server side validation in this PR, I filed a separate JIRA for that.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5997
How was this patch tested?
Adjusted JUnit tests around the changes.

I haven't looked at this in detail yet, but the change fromTypeAndFactor to fromProtoTypeAndFactor that goes through a lot of files - I think this needs to be made on master as a separate change, and then merge master back to the branch.
We introduced this method onto master first to ease any merging pains later, so if we are going to rename it, then we probably should do that on master to keep this part consistent.
Hopefully it is relatively easy to do, but using the "refactor" tool in Intellij to just rename all occurrences of it.

Sorry, I just realised this commit is going to master. I just assumed it was going to the EC branch from the earlier discussions we had.

I think this change looks good, but I am not sure about the new interface name CopyingReplicationConfig. I wonder if either ReplicationConfigWithFactor or ReplicatedReplicationConfig would be better? The EC one will be called ECReplicationConfig, so perhaps ReplicatedReplicationConfig is similar. Having Copying in the name immediately made me think the interface was related the copying the ReplicationConfig object, which is not the case at all.

Yea, while it sounds strange I think ReplicatedReplicationConfig better describes what it is, and goes better with ECReplciationConfig which we have on the EC branch.

Thank you for the suggestion @sodonnel, I have renamed the interface, let me know if you have spotted anything else that we should address here.


Where are the KEGG and reactome files?

file seems to be missing: trained_models/KEGG_keras_cnn_trained_model_shallow.h5

Just found them in an earlier branch


Inconsistent use of time formatting

The format of time is inconsistent in the interface. We use 24 hour style here. I assume this should be configured trough the Timezone parameter in the configuration. This is set to Europe/Brussels.
The sun card:

The timeline at the top is displaying correct 24-hour style. The information at the bottom is showing 12-hour style.
Logbook:

The time in the logbook is in 12-hour style.
Timeline popover:

The timeline itself is displayed fine, but the popup is in 12-hour style again.

The logbook and rising message in the sun card are actually being rendered using browser locale aware formatting. So for you seeing the AM/PM times means that is what your browser prefers. You can check your browser settings using these instructions.
That being said, you're right that it is still inconsistent. It looks like I have hard coded the history to support the 24h system instead of being locale aware.

Hmm, strange, my browser is set up for the Dutch language:

I also have the same behavior on my Android device. Are your sure it's not the 12h system that's hardcoded?

I've digged into it a bit, and don't you need to specify the current locate to the moment library? It seems to be using LT what is the shortcode for locale aware time, but by default moment is using english.
window.hass.uiUtil.formatTime = function(dateObj) {
  return moment(dateObj).format('LT');
};

See http://momentjs.com/docs/#/i18n/changing-locale/

Ah dang, it seems like you're right.
If only Apple would implement toLocaleDateString and toLocaleTimeString, it would make our lives so much easier.

Still present as of 0.20.x

Is this still a thing?

Yep, still the same.

I think moment.js could handle this. But I don't think we want add a new dependency.

AFAIK, moment is already a dependency. Check my comment above. It just isn't initialised correctly.

We removed moment, it is way too big for what it does. We use JavaScript
native toLocaleString and toLocaleDateString.
On Wed, Oct 26, 2016 at 10:38 PM, Michaël Arnauts<EMAIL_ADDRESS>wrote:

AFAIK, moment is already a dependency. Check my comment above. It just
isn't initialised correctly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/184#issuecomment-256551109,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABYJ2tCH_Hmk_4mNHcQvhTWExJCiYpXrks5q4DjOgaJpZM4FFpdB
.

--
PaulusSchoutsen.nl
It's nice to be important but it's more important to be nice.

Okay, I didn't know that.

The times in the graphs are configured in a different way however.

Is there any Polyfill?

Closed via home-assistant/home-assistant-polymer#170!

I would like to reopen this issue. https://github.com/home-assistant/home-assistant-polymer/pull/170 Indeed solves part of the problem stated in the start topic. It fixes the date format in the logbook, but not in the state history chart timeline. The problem as shown in the screenshots is still present.
I opened an issue at the home-assistant-polymer project as wel: https://github.com/home-assistant/home-assistant-polymer/issues/196

I can confirm I'm still seeing this issue in the timeline pop-over (both in the States UI and the History UI). It seems to have been addressed everywhere else.
Seen in Firefox 51.0.1 set to Dutch (nl) on macOS 10.12.4 bèta.
Same behaviour in Chrome 55.0.2883.95 set to Dutch (nl), as well as in Safari 10.1 (126<IP_ADDRESS>) which seems to use the OS language setting (Belgian Dutch).

There is a new issue in the home-assistant-polymer repo: https://github.com/home-assistant/home-assistant-polymer/issues/196
The backend is reporting the time like 2017-02-13T18:38:47.427063+00:00, so the issue lies in the frontend.


MS-SQL DB - ERROR - Database schema does not match this version of dependency-check

I downloaded the latest version available (3.3.1)
initialized the db using:
https://github.com/jeremylong/DependencyCheck/blob/master/core/src/main/resources/data/initialize_mssql.sql
Checked the content of dependency-check-core-3.3.1.jar\data looks the same that can be found on the GitHub link above.
also about the dbStetements.properties that can be found here:
https://github.com/jeremylong/DependencyCheck/tree/master/core/src/main/resources/data
I see there are specific properties for every db but MS-SQL server.. does it mean the first without any specificaiton is the one for MS-SQL? or am I missing something?
found that following a different thread on the same error name but relative to a MySQL db (https://github.com/jeremylong/DependencyCheck/issues/804)
I'm trying to execute:
.\dependency-check.bat --updateonly -l .\command-line-log.txt
I assume this is the command to download the CPE data and set it inside the DB ..
DEBUG - Loading driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
2018-09-11 09:29:26,108 org.owasp.dependencycheck.data.nvdcve.ConnectionFactory:123
DEBUG - Loading driver from: "C:\Program Files\Microsoft JDBC Driver 6.2 for SQL Server\sqljdbc_6.2\enu\mssql-jdbc-6.2.2.jre7.jar"
2018-09-11 09:29:26,192 org.owasp.dependencycheck.data.nvdcve.ConnectionFactory:154
DEBUG - Loading database connection
2018-09-11 09:29:26,192 org.owasp.dependencycheck.data.nvdcve.ConnectionFactory:155
DEBUG - Connection String: jdbc:sqlserver://localhost;databaseName=DependencyChecker;integratedSecurity=true
2018-09-11 09:29:26,192 org.owasp.dependencycheck.data.nvdcve.ConnectionFactory:156
DEBUG - Database User: dcuser
2018-09-11 09:29:26,658 org.owasp.dependencycheck.data.nvdcve.ConnectionFactory:192
DEBUG -
org.owasp.dependencycheck.data.nvdcve.DatabaseException: Invalid application database schema
	at org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.ensureSchemaVersion(ConnectionFactory.java:426)
	at org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.initialize(ConnectionFactory.java:190)
	at org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.getConnection(ConnectionFactory.java:231)
	at org.owasp.dependencycheck.data.nvdcve.CveDB.open(CveDB.java:226)
	at org.owasp.dependencycheck.data.nvdcve.CveDB.<init>(CveDB.java:196)
	at org.owasp.dependencycheck.Engine.openDatabase(Engine.java:950)
	at org.owasp.dependencycheck.Engine.doUpdates(Engine.java:892)
	at org.owasp.dependencycheck.Engine.doUpdates(Engine.java:871)
	at org.owasp.dependencycheck.App.runUpdateOnly(App.java:377)
	at org.owasp.dependencycheck.App.run(App.java:162)
	at org.owasp.dependencycheck.App.main(App.java:69)
2018-09-11 09:29:26,658 org.owasp.dependencycheck.App:167
ERROR - Database schema does not match this version of dependency-check

I'm trying to use integratedSecurity=true could this be a problem?
I'm asking because I found no mention of such authentication method in DC documentation.
thanks in advance

yep--> 3.3.1

I'm not asking what version of ODC you are running.  I am asking you to run SELECT value FROM properties on the database.  If this returns 3.3.1 - then that is the obvious problem as the current database schema is 3.0. See https://github.com/jeremylong/DependencyCheck/blob/354fef169487788aa2a515aa49c5efd45040c08a/core/src/main/resources/data/initialize_mssql.sql#L36
Rerun the (unmodified) initialize_mysql.sql script.


Filing to be referenced in the SPDX License List AND/OR break the client out into a separate repo with its own OSS license

Context:
A user on slack asked why he could not see our technical doc on pkg.go.dev. In short, this is related to our license not passing the [licensecheck] (see https://pkg.go.dev/license-policy).
See our chat for more context.
or the initial conversation on customer-eng here
I am creating this issue to keep this on our TODO list and keep track of our previous conversations.

This is now more important as they have deprecated godoc.org (which was the workaround I was using before)


Investigate PRQL for Language Server

Never looked at this so no idea what it might take
https://microsoft.github.io/language-server-protocol/

First, the token must have location information.
The following structure is recommended.
/// For example, `from` equals
/// ```
/// Token {
///     body: "from",
///     location_l {
///         row: 0,
///         column: 0,
///         offset: 0
///     },
///     location_r {
///         row: 0,
///         column: 4,
///         offset: 4,
///     }
/// }
/// ```
struct Token {
    body: String,
    location_l: Location,
    location_r: Location,
}

struct Location {
    row: usize,
    column: usize,
    offset: usize,
}

The following will be helpful.

https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample
https://github.com/rust-analyzer/lsp-server/tree/master/examples
https://github.com/rust-analyzer/rust-analyzer

This was great, too: https://www.osohq.com/post/building-vs-code-extension-with-rust-wasm-typescript
It seems like they took their own approach rather than building on something like https://github.com/ebkalderon/tower-lsp. I'm not sure whether writing something for Monaco / Monarch in the browser has different sync / async constraints than only building for a local LSP.


Upgrade fails

I have Chocolatey set to upgrade itself via Puppet but with the <IP_ADDRESS> release and now with the <IP_ADDRESS> release I get the following error:
PS C:\Windows\system32> puppet agent -t
Notice: Ignoring --listen on onetime run
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error loading fact C:/ProgramData/PuppetLabs/puppet/var/lib/facter/facts.rb: cannot load such file -- util/sssd
Info: Caching catalog for adm-recruitdb.uwg.westga.edu
Info: Applying configuration version '1435590280'
←[1;31mError: Could not update: Execution of 'C:\ProgramData\chocolatey\bin\choco.exe upgrade chocolatey -dvy ' returned
 1: Chocolatey v<IP_ADDRESS>
Chocolatey is running on Windows v 6.1.7601.65536
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\choco.exe.old' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1.<retry>b__0()
   at chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurati
onMilliseconds, Int32 increaseRetryByMilliseconds)
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\choco.exe.old' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1.<retry>b__0()
   at chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurati
onMilliseconds, Int32 increaseRetryByMilliseconds)
Maximum tries of 3 reached. Throwing error.
Attempting to delete choco.exe.old ran into an issue:
 Access to the path 'C:\ProgramData\chocolatey\choco.exe.old' is denied.
Command line: "C:\ProgramData\chocolatey\choco.exe" upgrade chocolatey -dvy
Received arguments: upgrade chocolatey -dvy

When investigating on systems that show this problem I see in task manager that there are two choco.exe processes still running. One just has "chocolatey" as its description but the other says "ShimGen generated shim".  If I kill these then Puppet can upgrade things just fine.
I am seeing this problem on 2008 R2, 2012, and 2012 R2.

It appears you have a hanging command running out there. I wonder if this is the result of something else?
Can you pass along the logs of <IP_ADDRESS>/<IP_ADDRESS> upgrade attempts? I want to see if there are any blind calls to list running in the backgroun.

Sorry for the delay... where would I find the logs you are looking for?

Depends on where the choco install is located, but likely C:\ProgramData\chocolatey\logs

Uploaded the log to https://gist.github.com/genebean/9d042133cacc7ebf3512  Check out around line 603.

Have you tried to upgrade choco in previous versions or is this the first time?

The is the second version in a row that I have had the same issue.

This is 0.9.9.x upgrading to 0.9.9+ series though, which is believed to work. But apparently it is failing.

@genebean followup here - what I think I see happening is that something is running choco in the background.


Automated Package Upgrade

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


In C language mode, code after '#if 0 // line comment' is colorized wrongly

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.85.0
OS Version: Win 10

Steps to Reproduce:
Try the code below in any file in C language mode:
     enum
     {
#if 0 // line comment after a blank/tab
        ENUM, // another troublesome line comment
#endif
      }

#define DEFA 1
#define DEFB 2

PS: I suppose it's related to the update in this year for I've tried a version published last year. Now I'm using C++ language mode instead, it works well.

Thanks @RedCMD! Duplicate of https://github.com/jeff-hykin/better-c-syntax/issues/4.


Panic index out of range in routers/web/repo/actions/view.go

Description
Panic happened. Maybe need investigating.
2023/05/01 04:44:56 [644f43c8-10] router: completed POST /api/actions/runner.v1.RunnerService/UpdateTask for <IP_ADDRESS>:44104, 200 OK in 105.0ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2023/05/01 04:44:57 [644f43c9-2] router: completed POST /api/actions/runner.v1.RunnerService/FetchTask for <IP_ADDRESS>:41880, 200 OK in 72.9ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2023/05/01 04:44:57 routers/web/base.go:134:1() [E] [644f43c9] PANIC: runtime error: index out of range [427] with length 427
        /usr/local/go/src/runtime/panic.go:113 (0x43cec7)
        /go/src/code.gitea.io/gitea/routers/web/repo/actions/view.go:164 (0x20bda9f)
        /go/src/code.gitea.io/gitea/modules/web/wrap_convert.go:46 (0x1df89cf)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:40 (0x1df6ff7)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:444 (0x1601fab)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x1df7407)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x1df7407)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x1df7407)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/middleware/get_head.go:37 (0x1f7535f)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x1df7407)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/modules/context/context.go:821 (0x19e74a3)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:73 (0x15fff6b)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:316 (0x16017b3)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:444 (0x1601fab)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/routers/web/base.go:174 (0x20c5ac3)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/gitea.com/go-chi/session@v0.0.0-20221220005550-e056dc379164/session.go:257 (0x1544a23)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:109 (0x1df7d4f)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:73 (0x15fff6b)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:316 (0x16017b3)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:444 (0x1601fab)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/routers/common/middleware.go:80 (0x1f04547)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/modules/web/routing/logger_manager.go:122 (0x1df3133)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/routers/common/middleware.go:112 (0x1f0347f)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/chi-middleware/proxy@v1.1.1/middleware.go:37 (0x1f0219b)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/src/code.gitea.io/gitea/routers/common/middleware.go:32 (0x1f043c3)
        /usr/local/go/src/net/http/server.go:2122 (0x920827)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:90 (0x15fff27)
        /go/src/code.gitea.io/gitea/modules/web/route.go:191 (0x1df657f)
        /usr/local/go/src/net/http/server.go:2936 (0x92385f)
        /usr/local/go/src/net/http/server.go:1995 (0x91f637)
        /usr/local/go/src/runtime/asm_arm64.s:1172 (0x475143)

2023/05/01 04:44:57 routers/web/base.go:169:1() [E] [644f43c9] template: base/head_navbar:155:7: executing "base/head_navbar" at <avatar $.Context .SignedUser 24 "tiny">: error calling avatar: runtime error: invalid memory address or nil pointer dereference
2023/05/01 04:44:57 [644f43c9] router: failed    POST /harryzcy/instant-push/actions/runs/296/jobs/0 for <IP_ADDRESS>:44104, panic in 162.9ms @ actions/view.go:95(actions.ViewPost), err=runtime error: index out of range [427] with length 427
2023/05/01 04:44:57 [644f43c9-8] router: completed POST /api/actions/runner.v1.RunnerService/UpdateLog for <IP_ADDRESS>:44104, 200 OK in 84.6ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2023/05/01 04:44:58 [644f43c9-9] router: completed POST /api/actions/runner.v1.RunnerService/UpdateTask for <IP_ADDRESS>:44104, 200 OK in 108.0ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)

Gitea Version
1.19.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Ubuntu 22.04
How are you running Gitea?
in Docker
Database
PostgreSQL

What page/URL were you one?

That logic is quite complex, could you help to show the database record for that ActionTask?
It could be some possible problems (just a guess):

Frontend bug, incorrect cursor
Backend bug, cursor mapping problem
Concurrency race bug, the LogIndexes is corrupted

That logic is quite complex, could you help to show the database record for that ActionTask?

Do you mean the actual data in action_task table?

Yes, if it is reproducible. There is a mapping in LogIndexes for log lines, it panics there.

It's OK for frontend to request with a incorrect cursor.
https://github.com/go-gitea/gitea/blob/95c2cb4b79bff04d11ad13933a8561026a42a2eb/routers/web/repo/actions/view.go#L161
So the it's a backend bug. I'm 90% sure the bug is:

Loaded task from database.
New logs had been uploaded, so the LogLength of the step was updated. The LogIndexes of the task were also updated, but not the data in memory.
Loaded steps from database.
Now there were new steps data and old task data in the monery.

See
https://github.com/go-gitea/gitea/blob/95c2cb4b79bff04d11ad13933a8561026a42a2eb/routers/web/repo/actions/view.go#L126-L135

It could also be related to https://gitea.com/gitea/act_runner/pulls/176, and #24516 can prevent panic if it is true.


Add extra args support

Allow passing extraArgs in FlatBuffers task. For example, "--grpc"
    task createFlatBuffers(type: FlatBuffers) {
        inputDir = file("src/main/flatbuffers")
        outputDir = file("src/generated/flatbuffers")
        language = 'java'
        extraArgs = '--grpc'
    }

@gregwhitaker Polite ping before holidays reign over us from tomorrow.
If you merge, when might it be available in mvnrepository?

@sutambe the change has been published to the gradle plugin repository

Thx @gregwhitaker


Stream reply pattern

I would like to propose the addition of streamed replies.
Use cases
Long lasting computing
A method call may take more than a reasonable timeout. In such case, the server-side could send a first reply as soon as possible, that basically says "I'm working on it, hold on", then may be come other empty replies until the actual result is ready and can be returned. Only then the client would unsubscribe.
Big replies
A method call may have to return a volume of data that is too big for being encoded in a single nats message, if not a protobuf message (which is recommended to remains small enough).
A streamed reply would allow to send several reply messages, and the client would do what is needed with it (saving them, assembling a bigger data structure, whatever).
.proto example
A new option "streamed_reply" could enable this pattern for a given method:
message FileList {
    repeated filename = 1;
}
service Demo {
    rpc ListFiles(nrpc.Void) returns (FileList) {
        option (nrpc.streamed_reply) = true;
    }
}

protocol details
The client subscribes to the reply subject without auto-unsubscribe, because it does not know how many messages will be received.
Each message of the reply can be one of:

empty message: basically means "hold on, work in progress"
an encoded output type: a chunk of data to be passed downstream
a normally encoded error with a special type "EOS", and a message containing the number of messages that were sent so the client can be sure nothing is missing.
a normally encoded error

The duration between two message must not exceed a typical nats timeout value (a few seconds). If it does, the client is supposed to return a timeout error.
client mapping
Example of a wrapper for the above .proto definition:
func (c *DemoClient) ListFiles(chan<-FileList) error {}

The chan is expected to be consumed in a separate goroutine, which can make things a little more complicated that we would like.
An alternative could make things easier:
func (c *DemoClient) ListFiles(chan<-FileList, chan<-error) {}

Here there is no need to lauch a goroutine, a simple for{select{}} is enough to consume the stream.
In both case the channel would be closed by the generated code when the reception is over.
server mapping
Example of a Server interface function for the above .proto definition:
inferface DemoServer {
    ListFiles(context.Context, chan<-FileList) error
}

The function would return only when everything is over. As long as the function is running, the nrpc code takes care of sending empty messages to avoid a timeout.
The server implementation has the responsibility to ensure messages are small enough to feat in a nats message. If a message exceeds the size, the context is canceled and the implementation is expected to return.

@mdevan I will work on this quickly, and would really appreciate your feedback on the idea and the proposed solution.

It would be nice to have a way for the server to cancel the request if the client stops listening.
I am not sure what would be the best pattern to do that, but somehow the client should send messages to keep the server request alive. It could done on a sub-subject of the reply subject.

A few thoughts:

Why should there be a heartbeat/keep-alive type responses at all? Client sends message to ListFiles with a dedicated inbox. Server sends 0 or more valid responses, and finally an EOS response. Client unsubscribes when it gets the EOS response. The user code will assume a reasonable timeout for the entire operation to timeout, and will call client.CancelListFiles() if that is exceeded.
The nats timeout (which is only for individual messages) is a hard error and the detecting side has to abort their side of the operation, and hope that the other side will detect it and cleanup.
Having no heartbeat should help with the case when it takes more time for the server-user-logic to generate a response than the heartbeat interval.
Consider this client-side usage: (this is similar to how Google Cloud pub-sub client, which is a streaming grpc client wrapper, looks)

err := client.ListFiles(ctx, func(ctx context.Context, item *FileList) {
    // process item here
})
// exits only when server sends EOS, or there is a connection error

If the we allow the client-side to cancel an ongoing subscription, we can allow for an error return also:

err := client.ListFiles(ctx, func(ctx context.Context, item *FileList) error {
    // process item here, return non-nil error if subscription needs to be cancelled
})
// exits only when server sends EOS, or there is a connection error

When the client unsubscribes the server's send will fail with unknown inbox error? On this error the server can stop item generation by cancelling the generator's context.
The caller can impose an overall timeout inside the ctx passed to ListFiles.
The caller can also cancel the operation by cancelling the ctx passed to ListFiles.

The heartbeat from the client allows to cancel a potentially very long operation on the server when the
client disappear without notice.
It may not be a common use case, but it is the only way to detect it, as there no such thing as a
'unknown inbox' error in nats (that I am aware of).
Also, the server side would not be much more complex that without the heartbeat, as it already needs to send keep-alive messages if the implementation waits too long between two messages.
We can decide we do not want to support such a feature though.
Using a context to cancel the operation on the client side is a great idea, thanks.
I already came to the conclusion channels were not a good idea for the client side, but had no clear idea on the best alternative. I like the api you propose instead, will give it a try

Thanks a lot your feedback!


WIP - Logging for get_api_data and sources

Implemented centralized logging for get_api_data and individual source ApiConns.
Currently work in progress / proof of concept for logging. I will try to reach out to @NealHumphrey or @jkwening regarding the best way to test this - want to make sure it is safe to execute all of these functions locally without any unwanted side effects.
Next step is to think about sending out the logs to an admin. My initial thought is to pick up the full log file at the end of get_api_data, attach it to an email, and then archive that log (safer than deleting).

@speedyturkey sounds good! Are you ready for me or @jkwening to review this as-is?
Can you describe what you mean by best way to test this? What kind of side effects are you thinking we should be watching out for?
On the sending of logs to admin - I agree on the described approach as the minimal version. But, it would be good to think about some sort of very basic level of flagging we could do to make sure the admin is paying attention when something occurs that needs their attention. It is likely just something as straightforward as  watching for warning or error level logging and then putting the fact that a warning or error level issue occured into the subject line and/or body. I just predict that the admin receiving this will see weeks and weeks of 'no issue' emails and start ignoring them. Can implement the email-log-file approach first but just flagging need for the next level in case there is anything you see while doing that version that you could implement as yougo.

No review needed at this time, although if you'd like to and offer feedback that would be fine by me.
In terms of side effects, I guess I mean API calls, downloading files, updating databases...I suppose it would just be my local DB so it's safe. I just get nervous running these kinds of scripts on my local machine when I don't fully understand all of the operations that are being done. From your response, it sounds like it is perfectly safe for me to go ahead and run during testing.
Thanks for the comments re: emails, makes sense. It should be possible to have the email notification present either a count of notifications by level, or to include something highlighting the most severe issues (for example to have the subject line clearly indicate whether a serious error took place).

@speedyturkey running the get_api_data.py and the load_data.py should only affect your local machine and database copy, so there should be no problem running them to test your code.

get_api_data downloads the relevant files into the /data/raw/apis/YYYYMMDD folder on your computer with todays datestamp. If you are only doing it for testing purposes, you can delete this date stamped folder after the test code is run. If you are doing it 'for real' the aws cli sync command will make that data available to others; technically if two people run it on the same day and both run the sync command we'd have conflicts, but we're not intendeing to use sync long term (hence the cron jobs).
load_data.py takes all the files listed in /python/scripts/manifest.csv and adds them to the database that is specified. Database connection strings are stored in secrets.json. If you don't specify a database, the local database is the default. If you run it using the 'docker' keyword argument, the database in your local docker container is used. You have to explicitly choose the 'remote' keyword for it to use the live database.

In short - run load_data.py with the 'docker' keyword (or code in a cron job that does the same thing as what is in load_data.py) and you'll be fine.

Thanks @NealHumphrey.
Unfortunately I am likely to miss tomorrow's session (bad work week).
I've pushed to this branch some basic functionality for emailing the logfiles - the new class, HIMailer, can be used for any kind of email, with or without attachments. To use it, I added a section to json.secrets:
"email": {
  "username": "Email account name",
  "password": "Email account password",
  "host": "e.g. smtp.gmail.com",
  "admin": "Email address to cc on all emails (optional)",
  "debug_recipient": "I don't know if we want this, but allows you to override recipients when a debug variable is set to True. Good for testing."
}

@NealHumphrey and @jkwening - I think this is ready for review. It's very much MVP in terms of the "attach and email log, let recipient know if there were errors" functionality. Some small tweaks would make it a little friendlier on ye olde ende user.
I am unfortunately very crunched at work over the next week, so I wanted to submit this so it can be merged, tweaked, etc as appropriate. If you have any feedback or if there is anything further that I can do, I will try my best.
Thanks!

Great, thanks @speedyturkey ! I'll do a review and we'll get it in - we can build on the functionality more later.

FYI this is now in the code! To run the get_api_data.py you'll need to add the email section to your secrets.json. @jkwening in particular, you'll want to edit your copy of secrets.json so that the 'admin' and 'debug_recepient' emails are both your email. In production, the admin email will be different of course.
"email": {
  "username"<EMAIL_ADDRESS>  "password": "Ask Neal for this",
  "host": "smtp.gmail.com",
  "admin"<EMAIL_ADDRESS>  "debug_recipient"<EMAIL_ADDRESS>}


Force Moderation on All Posts

Is there a way that I can force moderation for all posts, and disable the spam/approval process? I would like all posts to have to be approved by a moderator, and then user can individually be "approved" and "blacklisted" instead of it being done automatically. I tried some overrides to accomplish this, but that has not worked so far.
Any suggestions, or is it possible this will be added in the future?

Forem.moderate_first_post = false

This doesn't work. After testing, it just disables all moderation, which is the opposite of what I want. This is also what you said [here] (https://github.com/radar/forem/issues/578) when someone was trying to prevent moderation.
So is there any way I can prevent users from being "approved" and force every single post to be moderated?

After digging through the code, this override let me do it:
 # We don't want forem auto moderating stuff, so let's do this
  Forem::Post.class_eval do
    def skip_pending_review
        approve! unless user && true #user.forem_moderate_posts?
    end
  end

Is there an official way that I am missing (didn't see one in the documentation)?
Thanks again, forem's been a real treat.

Ah, I understand now. Yes you can override it like that to accomplish what you want.


Update Travis CI to use standard test script.

Is there still a need to test with go 1.6?

Nevermind I am assuming that is outdated code.
New question: Is there a reason to still use tip which is the latest devel version and not just go 1.9?

New question: Is there a reason to still use tip which is the latest devel version and not just go 1.9?

It allows us to catch upstream bugs/changes early. We don't do it all over the place but this package runs all of our smux tests.

It allows us to catch upstream bugs/changes early. We don't do it all over the place but this package runs all of our smux tests.

Okay I will use both tip and 1.9.x then.

Note suit_test.go is failing and not sure the best way to fix it...

@kevina I'm looking into that.

Fixing this by removing the tests. Continuing in #24.