Add runtime.ModuleGetFormat method enabling export of BYOC generated sources which require a .cpp/.cc file extension

Motivation
I ran into the issue that I need to use C++ features in a BYOC generated kernel which is tricky to achieve because those are typically exported as .c files.
I am aware of the possibility to force gcc/g++ to threat all input files as C++ but this solves the issue only partially and is not really intuitive. Renaming the file names e.g. changing the file extension manually after the export via MLF is if also a workaround which does not work out for me.
Solution(s):
I came up with two rather simple solutions to solutions to solve the explained limitation in the ability to choose the correct file extension for kernel files written by a custom codegen and implemented the first one in this PR because it should add minimal complexity to the TVM codebase which might be desirable:

Each CSourceModuleNode already has a format field which can be set in the constructor. Currently it can not be accessed by other classes but this can be easily solved by adding a getter and the respective python hooks for that property. This information can then be accessed by i.e. model_library_format.py to determine the file extension for the exported kernel. It would also be possible to use this interface for other types of modules in the future.

Introduce a new class CppSourceModuleNode which is essentially a copy of CSourceModule with the only difference being the the the module_key which may then be used to choose a file extension in the aforementioned python functions. This sounds like much redundant code to me and also has less flexibility compared to option one as we would have to stick with either a .cc or a .cpp file extension for every modules of that type.

Open questions/thoughts:
I realized that the module format cc is currently already used by the CSourceCrtMetadataModuleNode declared in source_module.cc:
auto n = make_object<CSourceCrtMetadataModuleNode>(func_names, "cc", target, metadata);

This does not really make sense to me and especially makes some AoT and Model Library Format related pytests fail because the metadata module now being exported as .cc instead of .c as explaind the the previous paragraph. Let me know if I should add the fix these Makefiles to this PR and keep the module format for the CSourceCrtMetadataModuleNode defined as cc or if should work around this issue instead by changing the module format of that file to c?
I did not yet come up with new test cases which exercise the introduced changes to the MLF export as this would very likely result in a need to add a new dummy BYOC module which uses the cc format instead. During development I just patched the example codegen_c to export C++ kernels instead which worked fine,
I decided against an RFC for this discussion as only a couple of lines are added to the TVM codebase to realize this feature. Let me know if I should make this a (Pre-)RFC instead. Otherwise I would be happy for any feedback and answers to the remaining questions introduced in the last section.

CC @areusch @Mousius @giuseros @manupa-arm

@PhilippvK yeah feel free to merge main. The github workflow is really confusing to me--basically what I do (mostly) is rebase and force-push until my PRs receive a comment; the minute they receive a comment, I merge instead. Then GitHub isn't allowed to garbage collect the old pushes.

Sorry for the CI bugs. I am working on them.

Sorry for not following up on this. While the CI bugs have been fixed in the meantime, there are still 3 points open for discussion:

Currently the function ModuleNode::GetFormat is defined in src/runtime/module.cc but each inherited class need to implement the trivial method by itself. The reason for this decision is, that not every module is supposed to have a format. I first thought only CSourceModuleNode and CSourceCrtMetadataModuleNode needs to be updated but it seems like runtime modules such as CMSISNNModuleNode and EthosUModuleNode are directly based on 'runtime::ModuleNode' instead of 'CSourceModuleNode' leading to a need to implement a 'GetFormat' function for them as well. Do you have an advice on how to avoid this?

Coming up with proper unit tests for this feature: I think there are two parts which shall be tested individually:

The handling of the format argument in the runtime.CSourceModuleCreate function invoced by severel BYOC kernels as well as the 'GetFormat()' function which should return the specified value.
Export of C++ kernels with the required file extension i.e. via the Model Library Format. This should also include tests ensuring that special cases (e.g. nvcc which has the .cu extension hardcoded) do not break.

As mentioned above, i was wondering, why the CSourceCrtMetadataModuleNode is using the format cc instead of c, which would result in a change of the file extension for this source file to tvmgen_default_lib0.cc instead of tvmgen_default_lib0.c and therefore likely break some Makefile-Setups where kernel filenames are hardcoded.

@areusch Sorry but I do not really understand what you mean. Could you tell me how this helps solving my mentioned "issues"?

@PhilippvK please resolve the conflict.


importing pretty printed JSON Schema (import database) throwing error - Expected content is "name" but found "id"

OSX 10.10.3 and OrientDB 2.0.5

Export database GratefulDeadConcerts to grateful.json
Pretty print this json by python -m json.tool grateful.json > grateful-pretty.json
Reimport this json into a new database
(4. You can validate that the original, unpretty JSON export works just fine when importing)

Hit Error:
WARN: Exported database does not support manual index separation. Manual index cluster will be dropped.Error on database import happened just before line 3, column 17
java.text.ParseException: Expected content is "name" but found "id"
	at com.orientechnologies.orient.core.serialization.serializer.OJSONReader.checkContent(OJSONReader.java:63)
	at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importClusters(ODatabaseImport.java:1016)
	at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:421)
	at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:1539)
	at com.orientechnologies.orient.graph.console.OGremlinConsole.importDatabase(OGremlinConsole.java:124)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:381)
	at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:246)
	at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:135)
	at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:62)

Error: com.orientechnologies.orient.core.db.tool.ODatabaseExportException: Error on importing database 'imported_grateful_pretty' from file: /Users/sathia/Downloads/grateful-pretty.json

Error: java.text.ParseException: Expected content is "name" but found "id"

I think this might be related to python's behavior of alphabetic ordering of json keys and how OrientDB expects them to be ordered...

I can confirm: the error is due to the order of names. OrientDB import is quite rigid on that.

We faced this same issue some time ago. While trying to modify a backup, we prettified the json file for more ease of use. But due to the constraint of having ordered values and even not accepting white spaces between keys and values, we just abandoned the idea.
Pretending that the file is json is wrong IMO and it should be stated that it is only a subset of it. As objects in json are an unordered collection of key:value pairs and spaces between the comma and the key or value should not be taken into account.

You're right. I've added few notes on export/import pages about such constraints.

Thanks folks. The main reason for prettify-ing the JSON (er... exported file) is so it will diff better on github. Without that, it is one straight long line (i.e. no line breaks). Any solution for that?
(and the reason why we even check this file into git and version control it is so we can create a DB with a specific schema quickly. Are there any other non-export/import based recommended solution for that purpose? Using a java program for that seems like a lot of code with too much inline mash of data; I'd prefer a declarative approach like JSON description of the DB schema, which is what attracted me to the exported 'json' approach in the first place).

We miss the declarative approach but using sql batch mode seems to work pretty well. Especially if used mainly for DB schemas.

Thanks red-0ne. Yes, I tried the sql batch mode too at first, but it is too limiting - for e.g. you cannot create functions this way.
I wrote down my experiences at http://blog.thirumal.net/dev/2015/04/14/creating-an-orientdb-database-from-scratch/.

You can create function using batch mode
INSERT INTO OFunction (language, name, arameters, code) VALUES ("javascript", "concat", ["x", "y"], "return x + y;")

Suprisingly I cannot find a way to execute it from sql.
I still think that importing from json is a must have. Although being aware that this is not as simple as a JSON.parse(). The road is already half done.

@red-0ne You can invoke idempotent functions from select. Example:
select from myFunction(1,2)

Perfect!
Thank you.

I was able to import an edited json export by running it through a minify before importing:
http://www.httputility.net/json-minifier.aspx

The issue is not with minification, but with the ordering of the tokens.
On Mon, Jul 6, 2015 at 3:32 PM, sdiAlexis<EMAIL_ADDRESS>wrote:

I was able to import an edited json export by running it through a minify
before importing:
http://www.httputility.net/json-minifier.aspx
—
Reply to this email directly or view it on GitHub
https://github.com/orientechnologies/orientdb/issues/3916#issuecomment-119016826
.


fix: use init option to prevent zombie ddev-router, for #5705

The Issue

#5705

API error (500): Could not kill running container d8079abded3b448b54fc3d22bc0abfe10ffbeb69cd7066027655bbf5598992d5, cannot remove - container d8079abded3b PID 1968501 is zombie and can not be killed. Use the --init option when creating containers to run an init inside the container that forwards signals and reaps processes

How This PR Solves The Issue
The error suggests to use init, it doesn't harm to try it for ddev-router:

Use the --init option when creating containers to run an init inside the container that forwards signals and reaps processes

Manual Testing Instructions
I cannot reproduce this error, at least it should not break the tests. See the issue.
Automated Testing Overview

Related Issue Link(s)

https://stackoverflow.com/questions/49162358/docker-init-zombies-why-does-it-matter

Release/Deployment Notes

That fixes it for me. Thank you Stanislav!

Great! This will make things a little easier.

The SO article implies that this injects a tini process as parent of the traefik process. It seems like that could possibly have other implications. init is a strange name for them to give that behavior.

Yeah, I don't really know what this change can bring and how safe it is.

Great, thank you. I didn't know that this didn't happen with nginx-proxy, so it makes sense to only use it with Traefik.
I've restarted the tests to make sure everything is fine.


Certificate template assignment to enterprise CAs

Your .psm1 file contains the following code that assigns imported/generated certificate template to all enterprise CAs in the forest. However, the relevant code part contains this line:
Set-ADObject -Identity $CA.DistinguishedName -Add @{certificateTemplates=$DisplayName} -Server $Server

Certificate templates are referenced by common name (CN attribute), not by DisplayName attribute.

Fixed in <IP_ADDRESS>. Also fixed in other functions within the module.


Create a POC IWizard for usage in VS

We should create a POC custom IWizard in VS to call into pecan-waffle to create project(s) and then add them to the solution. This is just a POC to see the end-to-end. Later we can improve the UI. Here are some ideas.

@RandomlyKnighted FYI I think I'll be able to make this one as well during the construction of the hard coded wizard

That's fine. I noticed that I've got a couple of issues in the main repo that I can work on in the mean time while you work on that.

OK I'm working on it.


[video_player] black (first?) frame on iOS

The video_player plugin has difficulty ~looping~ loading video without artifact on iOS but works fine on Android. On iOS the first frame of video is black, and it shows black again on loop. Its as yet unclear if it's overwriting the first frame, or if some frames of black are inserted.
Devices used to validate: Pixel 2 (Android 9/10), iPhone 7 (iOS 12.x, 13), iPad Pro 2018 (iOS 12.x).
Steps to Reproduce
MCVE: Fix the pub.dev example code to use a working video URL (bigbuckbunny is down). I used https://res.cloudinary.com/demo/video/upload/f_mp4/dog.mp4. Load the app. The first frame will load as a solid black image on iOS, but will show the first frame of the video on Android.
To see the black frame flash on loop on iOS, simply modify the example code to include a setLooping(true) in initState(). Note that this works fine on Android.
import 'package:video_player/video_player.dart';
import 'package:flutter/material.dart';

void main() => runApp(VideoApp());

class VideoApp extends StatefulWidget {
  @override
  _VideoAppState createState() => _VideoAppState();
}

class _VideoAppState extends State<VideoApp> {
  VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.network(
        'https://res.cloudinary.com/demo/video/upload/f_mp4/dog.mp4')
      ..initialize().then((_) {
        // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
        setState(() {});
      });
    _controller.setLooping(true);
    _controller.setVolume(0.0);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      home: Scaffold(
        body: Center(
          child: _controller.value.initialized
              ? AspectRatio(
                  aspectRatio: _controller.value.aspectRatio,
                  child: VideoPlayer(_controller),
                )
              : Container(),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            setState(() {
              _controller.value.isPlaying
                  ? _controller.pause()
                  : _controller.play();
            });
          },
          child: Icon(
            _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
          ),
        ),
      ),
    );
  }

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

Logs

No exceptions present.

⋊> ~/D/video_player_test flutter analyze                                                                                20:04:33
Analyzing video_player_test...
No issues found! (ran in 2.7s)

⋊> ~/D/video_player_test flutter doctor -v                                                                                20:04:41
[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G95, locale en-US)
    • Flutter version 1.9.1+hotfix.2 at /Users/deg/Development/flutter
    • Framework revision 2d2a1ffec9 (2 weeks ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/deg/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Users/deg/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
    • Android Studio at /Users/deg/Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code
    • VS Code at /Users/deg/Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.4.1

[✓] Connected device (1 available)
    • bigbubble • 00008027-001A51A036EB002E • ios • iOS 12.4.1

• No issues found!

Thanks for considering!

I'm experiencing the same issue, specially when there are multiple videos (and VideoPlayerControllers) involved, even if they are all on their own lifecycle status.

Confirming the same behavior. The black screen appears even on a local file... 😞

I'm experiencing the same issue

@edgardoalvarez100 @troy379 @miguelpruivo what devices are you testing with? I can't replicate this issue on an iPhone XR.

@recastrodiaz you can't replicate it on iOS, for me it only happens on Android and only with some devices (low-end ones tends to make it faster to happen).

@repentsinner mentioned this was an iOS bug and that Android correctly displayed the first frame. You mentioned low-end devices make it faster to happen, do you mean the first frame is sometimes rendered correctly and sometimes it's not?

@recastrodiaz what happens to me is that low-end devices can't handle multiple instances of VideoPlayerController concurrently while iOS and upper-end Android devices can. I have a particular scenario with a feed of videos (like Youtube) that start playing/pause on scroll and currently, to support low-end devices, I have to make sure that I have only one VideoPlayerController at a time instead of managing the lifecycle of each video individually.
This "workaround" solves it but wouldn't be necessary if ExoPlayer could handle multiple instances at once in some Android devices. I saw similar issues reported on the Google/ExoPlayer.

@recastrodiaz sounds to me like @miguelpruivo's issue is different/distinct from this one and should be opened as such. This issue is specifically about video_player performance on iOS, and had/has nothing to do with Android/low-end/multiple instances.
I originally (re)produced this using the MVCE above. I do not have access to an iPhone XR to test whether or not it exhibits on that hardware. Unfortunately I no longer have access to the iOS devices I used for discovery so I can't actually confirm if this has been resolved in recent versions of the plugin/framework. Perhaps @troy379 or @edgardoalvarez100 can weigh in here.

@recastrodiaz I'm also experiencing the same "black frame" issue. it even picks up a "blip" sound on audio as it begins. I'm testing with iPhone 7 Plus (iOS v12.3.1). At first, I planned to use .seekTo to essentially "skip" the first 500-700 milliseconds to avoid the black frame. But, when looping is set to true, it starts the subsequent loops from the very beginning of the video (thus ignoring the .seekTo value). So, perhaps there are 2 issues here? Issue 1 is the "black frame" and Issue 2 is the ignored ".seekTo" value for loops.

@yoyoyo11 regarding your issue 3:
.seekTo() is a realtime event that seeks the currently playing video the moment it's called. It doesn't save a seek in an EDL (note that you don't ever specify a time to seek from), so it's not supposed to execute again on loop - how would it know when to?
If you want that to happen, you'd have to set up a callback to do the seek when the current time is within a certain range.
The video_player plugin isn't really intended for fancy/complicated realtime edits.

@repentsinner Thanks for the response. I don't disagree with the functionality of the .seekTo() method. However, if I've implemented a loop to a video with a specific starting point (based on a .seekTo value), my (and my users') expectation would be to loop only the segment shown (start moment to end moment). I'm not familiar of a use case where I'd want to loop something that will have different start points. Maybe this is an enhancement request then?

@yoyoyo11 with the video_player plugin you can't specify start or end times for the loop function - it always loops the entire file. If you want looping based on custom start/end times, loop counts, etc. I think that'd be an enhancement request.
You could make a sort of custom looper with current video_player API by calling .seekTo(startTime) at-or-near endTime. There's a callback you can register to get currentTime if I recall correctly, but it's not frame accurate.

@edgardoalvarez100 @troy379 @miguelpruivo what devices are you testing with? I can't replicate this issue on an iPhone XR.

iphone 7 Plus  for me

I think it might be "plugin/camera" bug, on my iphone(8plus 12.4.1), after video recorded, i download the container from xcode of my test app. and found the video file that saved, then open it with mac's quicktime player, and i found that the first frame of video was also black,.But this does not happen often， because some files are normal，some files have black first frame. so i think it's not player's issue, but camera's
camera:v0.5.7

Hi @guopeng1994, please check the steps to reproduce for this issue - it is specific to playback, and affects sources that have nothing to do with the iPhone camera.
If you have an issue with the camera plugin, please file a new issue with MCVE.

l'll try

I am still getting this issue in iOS. Any update or fix for it?

Same problem, How to fix

A simple fix can be check the progress, and if it at 0 or similar situation, display a exsit first frame image cover above the video player.

I fixed the issue by following the answer given in this link.

Seekto cannot fix this problem , For example, 72  73311

Seekto cannot fix this problem , For example, 72  73311

The issue is replicable on the latest version of flutter with  video_player: ^2.1.6, The first frame shown as black on IOS while it works fine on Android.

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-arm, locale en-IN)
    • Flutter version 2.2.2 at /Users/mahesh/Documents/flutter
    • Framework revision d79295af24 (2 weeks ago), 2021-06-11 08:56:01 -0700
    • Engine revision 91c9fc8fe0
    • Dart version 2.13.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

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

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2021.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 57.0.5
    • Dart plugin version 211.7233

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

[✓] Connected device (4 available)
    • sdk gphone arm64 (mobile)  • emulator-5554                        • android-arm64  • Android 11 (API 30) (emulator)
    • iPhone 12 Pro Max (mobile) • 6A434744-B348-4FB3-AB10-131292174456 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 11.4 20F71 darwin-arm
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 91.0.4472.114

• No issues found!

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

void main() {
  runApp(VideoLoop());
}

class VideoLoop extends StatefulWidget {
  @override
  _VideoLoopState createState() => _VideoLoopState();
}

class _VideoLoopState extends State<VideoLoop> {
  late VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.network(
        'https://res.cloudinary.com/demo/video/upload/f_mp4/dog.mp4')
      ..initialize().then((_) {
        // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
        setState(() {});
      });
    _controller.setLooping(true);
    _controller.setVolume(0.0);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      home: Scaffold(
        body: Center(
          child: _controller.value.isInitialized
              ? AspectRatio(
                  aspectRatio: _controller.value.aspectRatio,
                  child: VideoPlayer(_controller),
                )
              : Container(),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            setState(() {
              _controller.value.isPlaying
                  ? _controller.pause()
                  : _controller.play();
            });
          },
          child: Icon(
            _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
          ),
        ),
      ),
    );
  }

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

Hi,
Didn’t you try the fix mentioned here https://github.com/flutter/flutter/issues/41156#issuecomment-634555243
It worked for me.
Regards,
Abu Saad Papa
Sent from my iPhone

On Jun 25, 2021, at 12:11 PM, Mahesh Jamdade @.***> wrote:

The issue is replicable on the latest version of flutter with video_player: ^2.1.6, The first frame shown as black on IOS while it works fine on Android.
flutter doctor -v
code sample
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi @abusaadp please try the MCVE in the first post and confirm your findings. The media file https://res.cloudinary.com/demo/video/upload/f_mp4/dog.mp4 definitely doesn't have a black frame at the beginning or end - the whole point of this issue is that the video player is adding a black frame on iOS only - if the media had one we would totally expect it to play.

Hi,
When I opened your video in QuickTime Player , I can see a black frame at the beginning of the video. You can try Edit->Trim to see the black frame. Please remove that frame and play the video in iOS with looping it will work, It worked for me. Also my original file with the black frame worked fine in Android only issue was in iOS. After I removed the black frame it worked in iOS too. Please remove the black frame at the beginning of the video and try.
Regards,
Abu Saad Papa

On 26-Jun-2021, at 7:57 AM, ritchie @.***> wrote:
Hi @abusaadp https://github.com/abusaadp please try the MCVE in the first post and confirm your findings. The media file https://res.cloudinary.com/demo/video/upload/f_mp4/dog.mp4 https://res.cloudinary.com/demo/video/upload/f_mp4/dog.mp4 definitely doesn't have a black frame at the beginning or end - the whole point of this issue is that the video player is adding a black frame on iOS only - if the media had one we would totally expect it to play.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/flutter/flutter/issues/41156#issuecomment-868930488, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABT46RCIKV3HXVEJX4B52QTTUU3IBANCNFSM4IZZKX3A.

Interesting. This seems to be maybe more of a widespread problem with QuickTime then if the black frame also shows in QuickTime Player. Additionally if I play the file in QT Player (version 10.5, 1086.4.2) it gets to the end of the file and shows the last frame. However, if I scrub the content to the last frame, it renders it as black instead of file contents.
I tried playing the file in mpv, DaVinci Resolve, and a few other apps. Only QuickTime seems to have this issue. I'm not claiming that the file isn't malformed somehow, but if that's the case then certainly QuickTime seems to fail less gracefully than all of the other apps do. If I can find another app that also displays the black frame I'll consider this to be an issue with the file, but for now it seems like an issue with QuickTime on both MacOS and iOS.
For what it's worth, I imported the test file (dog.mp4) into DaVinci Resolve and re-exported it with similar settings (without trimming the 'first black frame' which doesn't exist to be trimmed in any other apps) and that also played fine in QuickTime Player. I tried with both network optimization on and off which didn't seem to make a difference.

I used the following code to temporarily solve the black screen problem. It seems that setState cannot display the first frame correctly immediately after initialization. When I add a 100 millisecond delay and refresh the Video again, the first frame can be displayed correctly most of the time. .
  void _initVideo() {
    _controller = VideoPlayerController.file(widget.file);
    _controller.setLooping(false);
    _controller.initialize().then((value) {
      setState(() {});
      Future.delayed(Duration(milliseconds: 100), () {
        setState(() {});
      });
    }).onError((error, stackTrace) {
      if (_controller != null) {
        if (_controller.value.isPlaying) _controller.pause();
        _controller.dispose();
      }
      Future.delayed(Duration(seconds: 2), () {
        //
        if (--_maxRetryCount > 0) {
          _initVideo();
        }
        debugPrint('init video failed=${widget.file}/$error');
      });
    });
  }

https://github.com/flutter/plugins/blob/master/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.m#L94-L98
I have this same issue with a black frame appearing while looping videos.
Apple recommends using AVPlayerLooper to implement a looping video player instead of 'seeking to zero' at the end of the video. That may possibly solve the issue above.

repentsinner opened this issue on 24 Sep 2019 ...

@otopba not even three years old yet 🤣

I resolved that problem without using setLooping.
`
await videoPlayerController.initialize();
videoPlayerController.addListener(() {
if (videoPlayerController.value.isPlaying) return;
if (videoPlayerController.value.position >= videoPlayerController.value.duration) {
// loop
videoPlayerController.seekTo(const Duration(seconds: 0));
videoPlayerController.play();
}
});
`

This is not specifically a looping issue (and should be removed from title). Looks like the OP, most people, and myself have this issue for the first frame during the first playback, which is not acceptable for a production app.
I've temporarily solved this by adding _videoPlayerController?.seekTo(Duration(milliseconds: 1)); after initialization and setting state. Seems some of you guys have too.
Coming up on the four year mark with no meaningful attempt at fixing this from the devs. Wow!

The issue seems to be that when we call setState to re-render immediately after initialization, the first frame might not actually be ready yet. The video could still be buffering.
I fixed it by adding a listener that checks that _controller.value.buffered is not empty, then calls setState:
@override
void initState() {
  super.initState();
  _controller = VideoPlayerController.networkUrl(Uri.parse(url));
  _controller.initialize();
  _controller.addListener(_listenForFirstFrameReady);
}

Future<void> _listenForFirstFrameReady() async {
  if (_controller.value.buffered.isNotEmpty) {
    _controller.removeListener(_listenForFirstFrameReady);
    setState(() {});
  }
}

Hasn't this issue been resolved after such a long time?

Hey there, any progress on this problem or fix?

This is not specifically a looping issue (and should be removed from title). Looks like the OP, most people, and myself have this issue for the first frame during the first playback, which is not acceptable for a production app.
I've temporarily solved this by adding _videoPlayerController?.seekTo(Duration(milliseconds: 1)); after initialization and setting state. Seems some of you guys have too. (This does not seem to skip the first frame, but instead loads it successfully.)
Coming up on the four year mark with no meaningful attempt at fixing this from the devs. Wow!

I think this method works well.

This is not specifically a looping issue (and should be removed from title). Looks like the OP, most people, and myself have this issue for the first frame during the first playback, which is not acceptable for a production app.
I've temporarily solved this by adding _videoPlayerController?.seekTo(Duration(milliseconds: 1)); after initialization and setting state. Seems some of you guys have too. (This does not seem to skip the first frame, but instead loads it successfully.)
Coming up on the four year mark with no meaningful attempt at fixing this from the devs. Wow!

I think this method works well.
I implemented 100 millisseconds instead of 1 millisseconds.

This is the code that causes a black screen and range error while trimming on iOS.
" final ffmpegCommand =
"-i $inputPath -ss $startTrim -t $duration -c copy $outputPath";"
If you remove the -c copy parameter, everything works fine. I hope this helps. The seekTo method reduces the duration of the video, but if losing a portion of the video is not a big issue for you, it works as well.


feat!: Update to Capacitor 6

Can someone approve this?

it's released now under 6.0
Thanks @jcesarmobile


Make epoch filter optional for ActivationsCount endpoint

Motivation
We need to display the amount of synced activations in Smapp.
It is kinda weird to request its amount only filtered by epochs, so I made such a filter optional.
Description
If epoch is zero (or not set) — do not filter Atxs by epoch.

The problem with this change is that epoch 0 is an existing epoch, giving 0 a double meaning with this change 😕

To get around this issue we could change the epoch field in the proto for the API to optional and check on the server side if it was set explicitly (it becomes a pointer value if its an optional in go).

there are no atxs in epoch 0, even if it is a valid integer it is not a valid epoch number. first published atxs are in epoch 1, so they can be eligible for rewards in epoch 2.

I've updated it to check for nil ptr, but it will require merging https://github.com/spacemeshos/api/pull/309 first :)

@dshulyak its more for consistency. We do keep track of epoch 0, e.g. in explorer: https://explorer.spacemesh.io/epochs/0 if we change the meaning of 0 from the first epoch to all epochs special handling of the first epoch would be required.
@brusherru the API change LGTM, you might need to disable breaking change checks for v2alpha API since we want to do breaking changes there and go get the new library into this PR. 🙂

bors merge


boards: Remove -fno-builtin

Summary
it's more efficient to generate the machine code directly if possible.
This change can catch more issue(e.g. https://github.com/apache/incubator-nuttx-apps/pull/1000) too since compiler can do more check with these primitive functions.
Impact
Compiler code generation
Testing
Pass CI and run with sim

depends on https://github.com/apache/incubator-nuttx-apps/pull/1000 and https://github.com/apache/incubator-nuttx-apps/pull/1002.

for simple functions like memset it might make sense.
for more complex functions, i'm not sure.
isn't it safer to enable them selectively as we do for alloca?

for simple functions like memset it might make sense. for more complex functions, i'm not sure.

could you give some unsafe example?

isn't it safer to enable them selectively as we do for alloca?

Could you point how alloca is done?
Whether to use builtin function should be a global section: either work, or not work.

for simple functions like memset it might make sense. for more complex functions, i'm not sure.

could you give some unsafe example?

printf?

isn't it safer to enable them selectively as we do for alloca?

Could you point how alloca is done? Whether to use builtin function should be a global section: either work, or not work base on the test.

https://github.com/apache/incubator-nuttx/blob/master/include/alloca.h

for simple functions like memset it might make sense. for more complex functions, i'm not sure.

could you give some unsafe example?

printf?

isn't it safer to enable them selectively as we do for alloca?

Could you point how alloca is done? Whether to use builtin function should be a global section: either work, or not work base on the test.

https://github.com/apache/incubator-nuttx/blob/master/include/alloca.h

This is just a declaration, not control whether use to enable the built-in.

for simple functions like memset it might make sense. for more complex functions, i'm not sure.

could you give some unsafe example?

printf?

isn't it safer to enable them selectively as we do for alloca?

Could you point how alloca is done? Whether to use builtin function should be a global section: either work, or not work base on the test.

https://github.com/apache/incubator-nuttx/blob/master/include/alloca.h

This is just a declaration, not control whether to enable the built-in.

iirc, defining foo to __builtin_foo is the gcc-suggested way to enable them selectively.

so you want I to define all possible built-in function one by one?

The potential number is huge
Where the official list we can reference

Anyway, what's benefit with the appraoch?

I see 4 issues with this PR.

It changes code not described by the PR (minor zalloc)

because memset(since it become built-in, compiler do more check) report the wrong usage:
memset(ap_list_buffer, 0x0, sizeof(ap_list_buffer));
``
should change to:
``
memset(ap_list_buffer, 0x0, sizeof(*ap_list_buffer));

It removing all the null checks in the library

Yes, because compiler give the follow warning:
stdio/lib_fputs.c: In function 'fputs':
Error: stdio/lib_fputs.c:99:9: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s == NULL || stream == NULL)
         ^
Error: stdio/lib_fputs.c:99:27: error: nonnull argument 'stream' compared to NULL [-Werror=nonnull-compare]
   if (s == NULL || stream == NULL)
                           ^

stdio/lib_vfprintf.c: In function 'vfprintf':
Error: stdio/lib_vfprintf.c:40:6: error: nonnull argument 'stream' compared to NULL [-Werror=nonnull-compare]
   if (stream)
      ^

string/lib_strdup.c: In function 'strdup':
Error: string/lib_strdup.c:39:6: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s)
      ^

string/lib_strndup.c: In function 'strndup':
Error: string/lib_strndup.c:56:6: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s)
      ^

string/lib_strpbrk.c: In function 'strpbrk':
Error: string/lib_strpbrk.c:39:7: error: nonnull argument 'str' compared to NULL [-Werror=nonnull-compare]
   if (!str || !charset)
       ^~~~
Error: string/lib_strpbrk.c:39:15: error: nonnull argument 'charset' compared to NULL [-Werror=nonnull-compare]
   if (!str || !charset)
               ^~~~~~~~

string/lib_strrchr.c: In function 'strrchr':
Error: string/lib_strrchr.c:40:6: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s)
      ^

compiler has the internal knowledge about these built-in API.

increasing stack requirements by 128 in a lib funtion

This is another warning reported by compiler since printf become built-in:
Error: time/lib_asctimer.c:73:50: error: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 12 [-Werror=format-truncation=]
   snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
                                                  ^~
time/lib_asctimer.c:73:21: note: directive argument in the range [-2147481748,<PHONE_NUMBER>]
   snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
time/lib_asctimer.c:73:3: note: 'snprintf' output between 17 and 68 bytes into a destination of size 26
   snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            g_wday_name[tp->tm_wday], g_mon_name[tp->tm_mon],
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            1900 + tp->tm_year);
            ~~~~~~~~~~~~~~~~~~~

switching out legacy proven code with know characteristic without being able to control it seem wrong and coupling it with removing null checks makes it worse.

Reply before. All these change because GCC give more warning with the knowledge or assumption about the built-in functions.

Anyway, if you don't like I will just change the board I used. And in the future, I will stop maintain any boards that I never use.

Anyway, if you don't like I will just change the board I used. And in the future, I will stop sync the good change to any boards that I never use.

Is that better for the project then making it a Kconfig option?

Anyway, if you don't like I will just change the board I used. And in the future, I will stop sync the good change to any boards that I never use.

Is that better for the project then making it a Kconfig option?

No, there already has many useless options which just make the project impossible to do a full test or even a full build with all possible option combination. I don't think it's good idea that we simply add more and more options(especially for the  fundamental setting) but without the enough test.

so you want I to define all possible built-in function one by one?
1. The potential number is huge

2. Where the official list we can reference

Anyway, what's benefit with the appraoch?

it's safer and we can do it step-by-step.
an alternative is to make this change and later add -fno-builtin-foo when foo is found unsafe.
maybe it's good enough. i dunno.

@patacongo did you have any particular functions in your mind when writing this text in readme?
  3. Built-Ins.  Some compilers target a particular operating system.
     Many people would, for example, like to use the same toolchain to
     develop Linux and NuttX software.  Compilers built for other
     operating systems may generate incompatible built-in logic and,
     for this reason, `-fno-builtin` should also be included in your
     C flags

After removing -no-builtin, the compiler can catch more coding error:
#5519
https://github.com/apache/incubator-nuttx/pull/5476/commits/98a361c3461c16a395979c3be027065f78328ef0
https://github.com/apache/incubator-nuttx-apps/pull/1000
so, it's good from performance and coding.

This patch found a dozen of bugs before passing CI finally, so I think it's very useful.

@pkarashchenko could you merge this PR?


adding Maxar Token

Please note: This repository is being rebuilt to accept the new volume of token additions and modifications. PR merges will be delayed.

I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
This repository is managed using an auto merge action. Please ensure your PR has no deleted lines, and it will be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Auto merge requirements
Your pull request will be automatically merged if the following conditions are met:

Your pull request only adds new tokens to the list. Any modification to existing
tokens will require manual review to prevent unwanted modifications.

Your pull request does not touch unrelated code. In particular, reformatting changes to unrelated
code will cause the auto merge to reject your PR.

Any asset files added correspond to the token address you are adding. Asset files
must be PNG, JPG or SVG files.

Your change is valid JSON and conforms to the schema. If your change failed validation,
read the error message carefully and update your PR accordingly.

No other tokens shares the same name, symbol or address.

For example, this change would be rejected due to unrelated changes:

The bot runs every 60 minutes and bulk-merges all open pull requests to prevent conflicts.
This means that you need to wait up to 60 minutes for your pull request to be merged or reprocessed.

Hello. I believe it's telling me that the asset path invalid asset path: assets/44sP3sCrNnv3UDiGR1ZX2KGWjs86bwzZJjw3aTgHHCHr/logoMT.png is invalid. I checked the token address and it's correct. Can you assist and help me understand what about the asset path is invalid and will not allow the automerge?


Result display suggestion

Love this idea, hope you keep up the good work.
One suggestion for the way results are displayed. Rather than offsetting it by X amount of spaces, perhaps it would be better to put it next the to output, but with a // so there's no confusion.
Alternatively, you can consider the way Quokka does it, which is to render the output in a different colour.

The different color approach looks cool!

Hi,
Made an account just to post this. You can do the following to change the output style. I'll show an example.
On Windows navigate to following folder
C:\Users<YourUserHere>.vscode\extensions\sagebind.mathpad-0.0.2\out
Find the decorator.js file, make a copy and save as decorator.js.bak. Just in case anything goes wrong you can revert back.
Open decorator.js, on line# 72 - 75.
Change this
                        after: {
                            contentText: ` = ${this.format(value)}`,
                            margin: "0 0 0 24em"
                        }

to this
                        after: {
                            contentText: ` // ${this.format(value)}`,
                            margin: "0 0 0 1em"
                        }

This will make the result appear at the end of the line with 2 slashes before the result.


Convert to TypeScript?

Checklist

[X] I've looked through the README
[X] I've verified that I'm running react-big-scheduler-stch version 1.2.2

Please make sure the question is worded well enough to be understood
Maybe it's time to consider converting the project to TypeScript? It will make it easier to debug issues on the user end.
There are CLI's we can use that converts everything but adds @ts-expect-error [error message] for every error.
I can supply a PR if it sounds interesting?

Yeah I was thinking about the idea of converting the project to TS after I merged your PR.

There are CLI's we can use that converts everything but adds @ts-expect-error [error message] for every error.

Do you have any CLI in particular in mind?

I can supply a PR if it sounds interesting?

I have never converted a project from JS to TS so feel free to lead the way

I'd be happy to pick this up and work on it! 🙂
Also - I only get time to work on side-projects on weekends, so I might take some time to finish this up. If anyone is actively working towards this and has more time to contribute, please let me know here or via email at<EMAIL_ADDRESS>

I'd be happy to pick this up and work on it! 🙂 Also - I only get time to work on side-projects on weekends, so I might take some time to finish this up. If anyone is actively working towards this and has more time to contribute, please let me know here or via email at<EMAIL_ADDRESS>
Thank you for taking up this, it is a huge help. We could do this together, actively pushing commits towards converting this project to TypeScript. Is there any particular way you want  to this? Let me know


Is it OK to use ptr::read() instead of ptr::read_volatile() in SeqLock::read() ?

Hi, I'm learning concurrency programming these days, just curious to know if it is OK to use ptr::read() below:
https://github.com/Amanieu/seqlock/blob/b72653fd9c38141da7e588a97a1b654239f5d4df/src/lib.rs#L136
when write operation finished, there is a Release ording here:
https://github.com/Amanieu/seqlock/blob/b72653fd9c38141da7e588a97a1b654239f5d4df/src/lib.rs#L90
And to read seq1, there is a Acquire ording:
https://github.com/Amanieu/seqlock/blob/b72653fd9c38141da7e588a97a1b654239f5d4df/src/lib.rs#L121
So these is a Release-Acquire relationship here, then we can get these conclusions:

if a write operation is completed before reading seq1, I think we can always get the latest value by using ptr::read() because the Release-Acquire relationship.
if a write operation is before reading seq1, but not finished when reading seq1,  then seq1 & 1 would be 1, just retry.
if a write operation begins after reading seq1, then seq1 must be different with seq2, then it's also ok to use ptr::read().

I don't know if these conclusions are correct, hope to get some reviews, thanks in advance.

volatile_read must be used because the read side doesn't take a lock, which means it may race with a concurrent write. The core issue is that the read/write of the actual value isn't atomic and may be split into multiple read/write instructions. In the case of a race this could result in a "torn read" where half of the bytes come from the old value and half come from the new value. This is UB in Rust.

The core issue is that the read/write of the actual value isn't atomic and may be split into multiple read/write instructions.

I understand this, but volatile_read isn't atomic either, so I'm still confused why we have to use volatile_read?
And if there are concrruent reading/writing, seq1 == seq2 must be false, then the "torn read" value will be discarded. It seems that users will never read an inconsistent value.

Because the compiler and its optimization passes fundamentally assume that a value read by a normal read doesn't change: reading the same memory location multiple times must always return the same value (at least until the next fence/atomic operation).

in end_write(), atomic write to seq tagged Release, in read(), each loop atomic read seq tagged Acquire .  Shouldn't the ptr::read()  always read the newest value? or compiler will still do some optimizations in this situation?


[Question] Loading specific translation locally

I am using Excalidraw as a react component with these imports:
import React from "react"; import ReactDOM from 'react-dom'; import { Excalidraw } from "@excalidraw/excalidraw";
I am specifying a translation when loading the component like this:
React.createElement(           Excalidraw,           {             ref: excalidrawRef,             initialData: initialData,             langCode: "sv-SE",           }         ),
When loading the application, I can see that the specified translation is loaded from unpkg.com rather than locally.
I can see that locales are included in the dist/excalidraw-assets directory, but I am yet to figure out how to import all or a specific language into my app to make use of the local translation version(s).
I know that 'languages' can be imported from '@excalidraw/excalidraw' but doing only that does not seem to bee enough.
So, how do I tell my app to use the local translations instead of the ones from unpkg.com?
Thanks! 💯

https://docs.excalidraw.com/docs/@excalidraw/excalidraw/installation#static-assets


Fallback Fee

Current implementation uses 1 sat/vbyte fee if it fails to get fee_rate from node. This occurs a lot on regtest. We need to find proper fallback fee or smarter estimation mechanism.

One thing that came to my mind is to use %x more of the avg. of last n blocks.
You get to have a "decent" fee rate but still be somewhat protected against fee rate spikes.


WW-4932 honor .properties file before the generic parametrics

I think it's better to honor .properties file (where element class has been defined strictly by user) before the generic parametrics.

Coverage remained the same at 46.232% when pulling b37c09e4f199dbfecfc44278cdf809f7a3ac077f on yasserzamani:WW-4932 into 1698d2da762f24082b91ad84e69c44a018aa7999 on apache:master.


Card Formatting doesn't work on Android Device

I found this when I went to test this awesome project on my personal Android device. I am running the very latest Android on my Nexus 5X.

Payment.formatCardNumber = function(el) { 	      Payment.restrictNumeric(el); 	      QJ.on(el, 'keypress', restrictCardNumber); 	      QJ.on(el, 'keypress', formatCardNumber); 	      QJ.on(el, 'keydown', formatBackCardNumber); 	      QJ.on(el, 'keyup blur', setCardType); 	      QJ.on(el, 'paste', reFormatCardNumber);				 	      QJ.on(el, 'input', reFormatCardNumber); 	      return el; 	    };
Adding the input action seems to fix the problem for the latest Android version. Saw this same fix for this issue on your Payment project. :)

Where u added this lines?

@chris-snader have you tried for Android 4.4? not working for me with the solution you provided. Thanks
@itruf, if you can to test the solution provided by @chris-snader, you can just search the function "Payment.formatCardNumber" in card.js file.
Thanks

@walfridosp I did not test on Android 4.4. Did that break the functionality for 4.4?

@chris-snader Actually, you solution did work. I also had to change the input type to "tel" to restrict user to enter only numbers, now I', trying to fix it for the Expiry (MM/YYYY) the '/' is not being added automatically and it allows any character, do you have a fix for this one? Thanks

@walfridosp For the expiration date I just did an HTML select for month and year.

@chris-snader At the end I just used one input field for each MM and YYYY and set both to type="tel" so far is working good! Thanks

@walfridosp no problem!

Workaround provided


[ENH] clarify guiding principles for requirement levels

closes #1422

Cross-posting from #1439:

[It] seems these could go in either the spec or the contributing guide. I'm slightly in favor of having spec-writing "principles" in the contributing guide as they have no effect on the interpretation of the spec or a dataset, but I would not attempt to block this.

Fair point that it has no effect on the interpretation, but it does add some context and may make it easier for readers to think about the requirement levels. Having that said, I am also not absolutely convinced that it HAS to go in the spec. As long as we have it somewhere.


Tailwind support/integration?

I'm learning more about Tailwind and am curious how it might fit into the future of RN styling. I wonder if it could play a role with Dripsy somehow. I'm still getting to know it better.
Some interesting projects:
https://github.com/OwenMelbz/babel-plugin-tailwind-rn
https://theme-ui.com/packages/tailwind/
https://github.com/vadimdemedes/tailwind-rn

Interesting. I've seen a bit about tailwind but never used it personally.
I know the basic principles don't match up 1-1 to theme-ui, do you see the basic vales being used within the sx prop, a complete switch to a className based approach or working side by side somehow?
The theme-ui tailwind theme is also pretty interesting. https://theme-ui.com/packages/tailwind/

It seems like the only crossover might be in using the same theme for both interchangeably. I'm going to try tailwind out and see if there are other ways they could work together.
Also: https://github.com/dvkndn/typed.tw

This library by @tvke looks interesting:
Just an idea, I wonder if we could use it like so:
import { t } from 'react-native-tailwindcss'

export default () => (
  <View tailwind={[t.mT2, { ...t.mT3, t.mB3 }]} />
)

Where each item in the tailwind array represents the styles for that breakpoint, rather than using the md: syntax typically used by tailwind CSS.
Some people really like atomic design patterns, and since theme io already has a tailwind adapter, could be interesting.

Any updates regarding this?

Yes actually. @axeldelafosse added a guide: https://axeldelafosse.com/blog/universal-design-system
We could add a tailwind section to the docs


feat: #99 workflow knowledge

Well, I implemented it - #99 - I guess it MIGHT do a good job limiting dispatching offspring (by taking the agent too many context planning tasks) - however, it's pretty damn hard to find it out at the moment. To be perfectly honest, I don't really like it, so it's up to you, @grabbou, if you decide to merge it or not.  I changed the naming from knowledge to background as in the future - knowledge should be something more about the gathered shared context between the agents.
I mean - I believe in a better quality change in dispatching only after refactoring and A/B kind of testing different dispatchers on all example probes. Right now, I guess.

Note that the backward compatibility mode makes it not compliant with the kind of Liskov Substitution Principle (LSP) and, therefore, more difficult to debug - especially for newcomers. So if merging in, maybe we should disable backward compatibility and always add only knowledge to the


Undocumented default behavior: @font-face changes file paths and copies files

While using Elixir, paths were respected by the SASS processor.
My CSS was being output to public/assets/css/app.css with fonts living in public/assets/fnt/font-name/filename.ext for each file, so I could use url('../fnt/font-name/font-name.eot') without issue. Now that I'm using Mix my paths are being changed to point to public/fonts/font-name.ext with the files copied needlessly to that directory.
I did not ask for this. Now I'm maintaining a separate static font CSS file that I use to copy-paste over the generated font definition.

I think I see the offending configuration in the default webpack.config.js:
module.exports.module = { 	rules: [ 		// ... 		{ 			test: /\.(woff2?|ttf|eot|svg|otf)$/, 			loader: 'file-loader', 			options: { 				name: 'fonts/[name].[ext]?[hash]', 				publicPath: '/' 			} 		} 	] };
So I've copied the config file to my project root and removed the --config flag from all the script calls in package.json but I'm not sure how to configure this to just not do anything because the WebPack documentation pretends you know what it's doing to begin with.

I don't know if there's a simpler solution, but using the null-loader instead of file-loader seems to work.

Doesn't take. Now it just says it can't find the files in node_modules.

After destroying my node_modules directory that seemed to do the trick. I still think this is something that should be documented somewhere with an easier way of managing it.

That just causes all of the paths to be output as [object Object].

I rewrote it to get it to at least build it out to a resolved absolute path.
{
	test: /\.(woff2?|ttf|eot|svg|otf)$/,
	loader: 'file-loader',
	options: {
		name: '[path][name].[ext]?[hash]',
		publicPath: '/',
		context: 'public',
		emitFile: false
	}
}

Important to remember that Elixir and Mix are built on two completely different build tools. Webpack is much more powerful.

Now that I'm using Mix my paths are being changed to point to public/fonts/font-name.ext with the files copied needlessly to that directory.

It's not needless. This is a feature, not a bug. :) Webpack will find all references to fonts, and move them to that location.

I did not ask for this.

Well you didn't ask Mix to minify your code or apply CSS3 prefixing either, but it will.

Now I'm maintaining a separate static font CSS file that I use to copy-paste over the generated font definition.

You don't need to do that. You can either update your font urls to be absolute (begin with a "/", and Webpack will ignore them), or remove your public/fnt directory, and let Webpack put them where they need to go.

Well you didn't ask Mix to minify your code or apply CSS3 prefixing either, but it will.

Neither of which are potentially destructive processes as long as the syntax of the final result is valid. Altering URLs is an active change in the actual value of data, and copying files that already existed increases the amount of space used on the server and clutter the directory structure.
I understand from further trials that the real power from this kind of functionality is being able to import resources from Node packages and the like, but executing these changes when they're not necessary (i.e. the files already existing in public and the projected URLs pointing to them) just leads to confusion and frustration. This should either be explicitly stated in documentation as a side effect. There are already enough anti-patterns plaguing some of the Laravel components, and documentation on handling front-end resources is already missing tons of useful information.


Design Hero 2: Sass Optimization

Summary
This issue is for someone with some design sense. You don't need to be a full-on designer, just feel comfortable making judgments about color choice and an awareness of Accessibility-related design issues.
In #543 , we pulled all the color literals out into variables. We apparently use far more color variations than I had anticipated!  I'd like to get this down to a primary / secondary palette, and to use the lighten() and darken() SASS functions to provide granularity on those colors.
I don't have specific requirements about color choice (this is where your design sense comes in), the scheme doesn't really need to change at all, just having fewer individual colors.
Ideally, the list of color variables fit onto one page, and the gestalt experience of the site feels comparable to how it is now.
Notable Considerations

Don't change / override the default bootstrap colors (used in classes: .btn-info, .btn-warning, .btn-success, .btn-primary, etc).
No tests necessary, unless you change stuff outside of CSS
We use css classes for javascript hooks; this means that if you must change a css class name, please ensure it's not being used in the app anywhere (grep -R classname * should be sufficient to tell)
Remember to look for, and replace, all occurrences of any color you remove. Since they're sass vars, this should only affect stuff in /app/assets/stylesheets, so you can keep your greps narrow. The current variable names are also uniquely named and should be easy to find (or do sed if that's your jam!)

Criteria for Completion
I'm not sure specifically. The main goal I'm looking for with this issue is to improve maintainability by reducing the number of colors we have to remember we have, while minimizing the changes to the visual aesthetic. (hence the lighten() / darken() suggestion -- I know most of the color names are shades of neutral tones).
Feel free to ask questions / discuss!

@misn0mr Awesome!! Go for it :)


No utils/datasets/ directory

I didn't find the utils/datasets/ directory, could you please upload it? Thanks!

the file you want to use is in scripts/datasets


ADOT collector sends response to Runtime API instead of waiting for sending traces

Hi!
After a discussion on Twitter, I realized that the ADOT collector extension doesn't wait for data to be sent before making the next call to the Lambda Runtime API.
Here's the section of the code that loops on next events: https://github.com/open-telemetry/opentelemetry-lambda/blob/main/collector/main.go#L71
This can cause issues when the destination for the collector is slow and the Lambda function itself finishes in a short period of time. In this situation, the collector could still be sending data while Lambda freezes the execution environment. I've drawn a timing diagram if it helps:

Correct something. This code does not make sense, remove it or not does not impact anything :) I put it here just because copy from Lambda sample.
Lambda Collector extension does not process any Lambda event. The receiver gets incoming request from OTel SDK in runtime directly then forward to backend by exporter in the same thread. Means Lambda Runtime would be hang there until Collector extension forward the data to backend. In design doc we emphasize Collector should not configure batching processor between receiver and exporter.
So, I would ask 2 questions:

Is this issue only happened in nodejs layer?
Any asynchronous logic get involved in recent collector exporter? especially in OTLP exporter?

I'm not using the Batching Processor, but rather the SimpleSpanProcessor, but even though I can call forceFlush(), as you can see, it does not wait on what it has sent (it just sends it async), so perhaps I need a custom, synchronous span processor that waits on everything it gives to the receiver:
https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts
Interestingly, the batching processor does seem to at least try and synchronise on flushAll / shutdown: https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-trace-base/src/export/BatchSpanProcessorBase.ts

We're experiencing the same issue.

The receiver gets incoming request from OTel SDK in runtime directly then forward to backend by exporter in the same thread. Means Lambda Runtime would be hang there until Collector extension forward the data to backend, Lambda would not freeze or shutdown before this process is completed.

That doesn't seem to be the case for us, even though we take care to call ForceFlush() from the lambda function itself (via the .NET SDK). If I enable debug level logging for the collector and run the function in the emulator, I can see that it logs received traces after the lambda runtime reports that the function has finished.
instance-1 | END RequestId: a261ba7c-ecda-488d-82f6-c4fdf0b3834c
instance-1 | REPORT RequestId: a261ba7c-ecda-488d-82f6-c4fdf0b3834c      Init Duration: 0.17 ms  Duration: 4662.45 ms
  Billed Duration: 4663 ms Memory Size: 3008 MB    Max Memory Used: 3008 MB
instance-1 | 2022-07-07T01:23:09.703Z    INFO    loggingexporter/logging_exporter.go:42  TracesExporter  {"#spans": 3}
instance-1 | 2022-07-07T01:23:09.704Z    DEBUG   loggingexporter/logging_exporter.go:51  ResourceSpans #0
instance-1 | Resource SchemaURL:
instance-1 | Resource labels:
instance-1 |      -> telemetry.sdk.name: STRING(opentelemetry)
instance-1 |      -> telemetry.sdk.language: STRING(dotnet)
instance-1 |      -> telemetry.sdk.version: STRING(<IP_ADDRESS>9)
instance-1 |      -> cloud.provider: STRING(aws)
instance-1 |      -> faas.name: STRING(test_function)
instance-1 |      -> faas.version: STRING($LATEST)
instance-1 |      -> faas.instance: STRING($LATEST)
instance-1 |      -> service.name: STRING(MyService)
instance-1 |      -> service.namespace: STRING(MyNamespace)
instance-1 |      -> service.version: STRING(<IP_ADDRESS>)
instance-1 |      -> service.instance.id: STRING(cf6f73c3-41e0-45ab-b6a2-441b6bcaae94)
instance-1 | ScopeSpans #0
instance-1 | ...

This only seems to affect traces, not metrics or logs. Is there some way to debug further to determine whether this is an issue with the collector itself vs some failure of the client library to block until the traces have been flushed?

if I add a console exporter on the .NET SDK side I see all of the traces logged to the console correctly, before the lambda runtime reports that the function has finished. So it seems likely that the non-blocking behaviour is on the collector side.

Are you able to share the collector configuration you're using?  there aren't any processors in the ADOT build that would introduce async behavior and I don't believe any of the exporters will do anything async without prompting.

Thanks @Aneurysm9, our config looks like this:
receivers:
  otlp:
    protocols:
      grpc:

exporters:
  otlp:
    endpoint: https://otlp.nr-data.net:4317
    headers:
      api-key: ${NR_API_KEY}

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [otlp]
    metrics:
      receivers: [otlp]
      exporters: [otlp]
    logs:
      receivers: [otlp]
      exporters: [otlp]

Just to help me get my mental model straight, are you able to elaborate on how this works?

Lambda Collector extension does not process any Lambda event. The receiver gets incoming request from OTel SDK in runtime directly then forward to backend by exporter in the same thread. Means Lambda Runtime would be hang there until Collector extension forward the data to backend, Lambda would not freeze or shutdown before this process is completed.

Given that the extension doesn't have any synchronisation logic when it receives an event (it just writes a message to the console and returns), what is preventing lambda from freezing whilst the extension is in the middle of sending data?

From what I can see the collector main is simply calling NextEvent in a loop.
NextEvent() simply calls the Next API on the extension API.
According to the lambda extension API the Next API call is what signals to the runtime that the extension has finished running.
This will cause the runtime to freeze until the next execution or until shutdown.
So if the collector starts exporting some data during an invocation, it should NOT call Next until the export has finished (or failed).
Otherwise the runtime freezes and if not thawed again by another invocation the export will fail and spans will be dropped

I have created #305 to attempt to resolve this issue.  I think the general approach is sound and it works in the test scenario I have constructed, but if anyone else who has experienced this issue is able to test a layer created from that branch it would be greatly appreciated.

Awesome, thanks @Aneurysm9.

if anyone else who has experienced this issue is able to test a layer created from that branch it would be greatly appreciated

I've been test that branch for a couple of days and it looks great so far. 🚀

I am testing the branch and things seem to work better, but I have some strange results still.
Basically the exporter seems to successfully send the traces to honeycomb.io in all cases that I can test (especially in case of infrequent and fast traces that were the problem before). I can see them reliably appearing in the UI at honeycomb.
But there is still something wrong when the lambda runtime shuts down. I get something like this:
2022-11-04T09:22:04.881000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 {"level":"info","msg":"Waiting for quiescence","active_spans":1}
2022-11-04T09:22:04.881000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:22:04.881Z	info	TracesExporter	{"kind": "exporter", "data_type": "traces", "name": "logging", "#spans": 2}
2022-11-04T09:22:04.882000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:22:04.882Z	info	ResourceSpans #0
2022-11-04T09:22:04.882000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 Resource SchemaURL:
[... trace data omitted for brevity ...]
2022-11-04T09:22:04.882000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 -> znd.state_in.phase: Str()
2022-11-04T09:22:04.882000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 {"kind": "exporter", "data_type": "traces", "name": "logging"}
2022-11-04T09:22:04.883000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 {"level":"debug","msg":"Waiting for event..."}
2022-11-04T09:22:04.901000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:22:04.883Z	e4da96a0-5d98-472d-82fa-e5344b58a0e7	DEBUG	statusCode: 200
2022-11-04T09:22:04.922000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 END RequestId: e4da96a0-5d98-472d-82fa-e5344b58a0e7
2022-11-04T09:22:04.922000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 REPORT RequestId: e4da96a0-5d98-472d-82fa-e5344b58a0e7	Duration: 998.70 ms	Billed Duration: 999 ms	Memory Size: 150 MB	Max Memory Used: 140 MB	Init Duration: 1167.82 ms

[ ... here AWS shuts down the lambda runtime ... ]

2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.493Z	error	exporterhelper/queued_retry.go:176	Exporting failed. No more retries left. Dropping data.	{"kind": "exporter", "data_type": "traces", "name": "otlp", "error": "max elapsed time expired rpc error: code = DeadlineExceeded desc = context deadline exceeded", "dropped_items": 2}
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).onTemporaryFailure
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector@v0.62.1/exporter/exporterhelper/queued_retry.go:176
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector/exporter/exporterhelper.(*retrySender).send
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector@v0.62.1/exporter/exporterhelper/queued_retry.go:411
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector/exporter/exporterhelper.(*tracesExporterWithObservability).send
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector@v0.62.1/exporter/exporterhelper/traces.go:134
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).start.func1
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector@v0.62.1/exporter/exporterhelper/queued_retry.go:206
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*boundedMemoryQueue).StartConsumers.func1
2022-11-04T09:28:55.508000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 go.opentelemetry.io/collector@v0.62.1/exporter/exporterhelper/internal/bounded_memory_queue.go:61
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	service/collector.go:196	Received shutdown request
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 {"level":"debug","msg":"Received ","event :":"{\n\t\"eventType\": \"SHUTDOWN\",\n\t\"deadlineMs\":<PHONE_NUMBER>493,\n\t\"requestId\": \"\",\n\t\"invokedFunctionArn\": \"\",\n\t\"tracing\": {\n\t\t\"type\": \"\",\n\t\t\"value\": \"\"\n\t}\n}"}
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	service/service.go:116	Starting shutdown...
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	pipelines/pipelines.go:118	Stopping receivers...
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	pipelines/pipelines.go:125	Stopping processors...
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	pipelines/pipelines.go:132	Stopping exporters...
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	extensions/extensions.go:56	Stopping extensions...
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	lambdaextension/lambdaextension.go:58	Unregistered lambda span processor on tracer provider	{"kind": "extension", "name": "lambda"}
2022-11-04T09:28:55.529000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 2022-11-04T09:28:55.529Z	info	service/service.go:130	Shutdown complete.
2022-11-04T09:28:55.530000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 {"level":"debug","msg":"Received SHUTDOWN event"}
2022-11-04T09:28:55.530000+00:00 2022/11/04/[$LATEST]e73f1dda75414fbda94ace08b54c5d86 {"level":"debug","msg":"Exiting"}

Maybe the exporter marks the spans as not active upon sending the request to honeycomb.io, but the goroutine yields while waiting for a response, and the "busy loop" in your new code in the extension checks again, finds no more active spans, and calls Next. This lets AWS freeze the runtime and the response never arrives, which causes the error when it gets thawed again before the runtime is shutdown ?

Hello, @Aneurysm9
I also have tested the branch and it seems to be working.  There are just weird kinds of stuff going on, I guess. I think the exporter does not send all the trace information to the Central Collector. The Central Collector only receives the first Span, where it should have received at least 4 spans.
Also, I just discovered something. Does it usually take time for the exporter to send the traces to the Central Collector? I'm seeing that the URL for the authentication is being called only after not less than 6 minutes after the Lambda function is invoked (e.g. Lambda Invocation around 11:30 AM, URL is called around 11:38 AM).  Which is a weird result. The URL here is where it will fetch the token for authentication.
Here's a sample configuration for the exporter:
exporters:
  otlp:
    endpoint: CENTRAL_REMOTE_COLLECTOR_IP:4317
    tls:
      ca_file: /opt/certificate/ca.pem
      cert_file: /opt/certificate/certificate.pem
      key_file: /opt/certificate/private-key.pem
    auth:
      authenticator: oauth2client

I am also getting almost the same result as @nerochiaro showed
2022-11-16T11:24:04.792+08:00 | 2022-11-16T03:24:04.792Z info service/collector.go:196 Received shutdown request
-- | --
  | 2022-11-16T11:24:04.792+08:00 | 2022-11-16T03:24:04.792Z info service/service.go:138 Starting shutdown...
  | 2022-11-16T11:24:04.792+08:00 | 2022-11-16T03:24:04.792Z info pipelines/pipelines.go:118 Stopping receivers...
  | 2022-11-16T11:24:04.795+08:00 | 2022-11-16T03:24:04.795Z info pipelines/pipelines.go:125 Stopping processors...
  | 2022-11-16T11:24:04.795+08:00 | 2022-11-16T03:24:04.795Z info pipelines/pipelines.go:132 Stopping exporters...
  | 2022-11-16T11:24:04.841+08:00 | 2022-11-16T03:24:04.841Z error exporterhelper/queued_retry.go:176 Exporting failed. No more retries left. Dropping data. {"kind": "exporter", "data_type": "traces", "name": "otlp", "error": "max elapsed time expired rpc error: code = DeadlineExceeded desc = context deadline exceeded", "dropped_items": 7}
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).onTemporaryFailure
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector@v0.61.0/exporter/exporterhelper/queued_retry.go:176
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector/exporter/exporterhelper.(*retrySender).send
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector@v0.61.0/exporter/exporterhelper/queued_retry.go:411
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector/exporter/exporterhelper.(*tracesExporterWithObservability).send
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector@v0.61.0/exporter/exporterhelper/traces.go:134
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).start.func1
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector@v0.61.0/exporter/exporterhelper/queued_retry.go:206
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*boundedMemoryQueue).StartConsumers.func1
  | 2022-11-16T11:24:04.841+08:00 | go.opentelemetry.io/collector@v0.61.0/exporter/exporterhelper/internal/bounded_memory_queue.go:61
  | 2022-11-16T11:24:04.841+08:00 | 2022-11-16T03:24:04.841Z info extensions/extensions.go:56 Stopping extensions...
  | 2022-11-16T11:24:04.841+08:00 | 2022-11-16T03:24:04.841Z info lambdaextension/lambdaextension.go:59 Unregistered lambda span processor on tracer provider {"kind": "extension", "name": "lambda"}
  | 2022-11-16T11:24:04.841+08:00 | 2022-11-16T03:24:04.841Z info service/service.go:152 Shutdown complete.

Implementation Reference:

Manual Steps for Private Lambda Layers
AWS Distro for OpenTelemetry Lambda Support For Go

Thanks for the feedback @rmarasigan.  I have put up a new draft PR that attempts to solve this in a slightly different way using the new Lambda Telemetry API.  I think that will be more robust as it does not depend on the function emitting any telemetry to the collector.
As for the time gap you're seeing I believe that is due to the instance being frozen and then thawed later to shutdown.  When it is later thawed the contexts on outgoing requests have expired and that error is emitted.
There is an additional potential source of asynchronous behavior that may need to be addressed.  Most exporters will use the exporterhelper package, which includes a queued retry capability.  Disabling that may be required to ensure that all telemetry has been shipped out of the collector before the function returns.  This can be done for the OTLP exporter like this:
exporters:
  otlp:
    sending_queue:
      enabled: false
    ....

There is an additional potential source of asynchronous behavior that may need to be addressed. Most exporters will use the exporterhelper package, which includes a queued retry capability. Disabling that may be required to ensure that all telemetry has been shipped out of the collector before the function returns. This can be done for the OTLP exporter like this:
exporters:
  otlp:
    sending_queue:
      enabled: false
    ....

Thanks for this, @Aneurysm9. It helps a lot after adding it to the configuration and running some tests 👍🏻 The Exporting failed. No more retries left. Dropping data. does not show up now, and I'm seeing that traces are being sent to the Central Collector. I've been using #305 when doing the tests and it seems to be working. But I will still keep an eye on it and the #310. Thanks for the great help! 💯

Thanks for the feedback @rmarasigan. I have put up a new draft PR that attempts to solve this in a slightly different way using the new Lambda Telemetry API. I think that will be more robust as it does not depend on the function emitting any telemetry to the collector.
As for the time gap you're seeing I believe that is due to the instance being frozen and then thawed later to shutdown. When it is later thawed the contexts on outgoing requests have expired and that error is emitted.
There is an additional potential source of asynchronous behavior that may need to be addressed. Most exporters will use the exporterhelper package, which includes a queued retry capability. Disabling that may be required to ensure that all telemetry has been shipped out of the collector before the function returns. This can be done for the OTLP exporter like this:
exporters:
  otlp:
    sending_queue:
      enabled: false
    ....

This config tweak does appear to resolve the dropped spans issues I was seeing as well - thank you for the workaround @Aneurysm9! 👏 Will continue watching #305 & #310 for the "proper" long term fix

Hello @Aneurysm9, I've run some tests again using the #305 PR.
I've tried to make 1, 200 requests to the API Endpoint. So I have 6 terminal tabs open and for each tab, I'm running a script where it will call the API Endpoint to make a request 200 times. But only some of the traces came into the Remote Collector. It is around 500+ that came in and the rest were dropped. And I'm using this configuration while I did the test.

exporters:
  otlp:
    sending_queue:
      enabled: false
    ....

I even tested it with this configuration:
exporters:
  otlp:
    sending_queue:
      enabled: true
      queue_size: 3000
    retry_on_failure:
      enabled: true
      initial_interval: 10s

But still, it is dropping the traces. Here are the errors generated:
2022-11-22T02:56:33.099Z	error	exporterhelper/queued_retry.go:176	Exporting failed. No more retries left. Dropping data.
{
    "kind": "exporter",
    "data_type": "traces",
    "name": "otlp",
    "error": "max elapsed time expired rpc error: code = DeadlineExceeded desc = context deadline exceeded",
    "dropped_items": 5
}

2022-11-22T02:49:31.577Z	info	exporterhelper/queued_retry.go:427	Exporting failed. Will retry the request after interval.
{
    "kind": "exporter",
    "data_type": "traces",
    "name": "otlp",
    "error": "rpc error: code = DeadlineExceeded desc = context deadline exceeded",
    "interval": "14.405090881s"
}

Is there any workaround for this kind of scenario? Where there will be a time that the function/endpoint will not be always called. Also, there will be a time when it will be called multiple times (e.g. 200 requests per second). But will still have the complete trace generated to the Central Remote Collector.

@rmarasigan can you please try with #310?  I think that #305 is unlikely to provide a complete solution and #310 is more likely to do so.

@rmarasigan can you please try with #310? I think that #305 is unlikely to provide a complete solution and #310 is more likely to do so.

@Aneurysm9 I've tried it with #310, but it still does not complete the trace. Using this config:
exporters:
  otlp:
    sending_queue:
      enabled: false
    retry_on_failure:
      enabled: true
      initial_interval: 10s

1, 200 requests to the API Endpoint but only received 406. Btw, it is a call chain (Service A -> B -> C -> D). The first API triggered, only 406 came into the collector. For the subsequent, it also does not receive complete trace information and some of them are being dropped.
The Central Remote Collector is printing this out:
Nov 23 04:14:32 ip-172-31-39-226 aws-otel-collector[4118]: 2022-11-23T04:14:32.290Z#011info#011zapgrpc/zapgrpc.go:174#011[transport] transport: loopyWriter.run returning. connection error: desc = "transport is closing"#011{"grpc_log": true}

I've seen an error on the Lambda Layer side:
Error: exit status 2 Extension.Crash

@rmarasigan are you able to try the otlphttp exporter?  I haven't seen that error before, but it looks like an issue with gRPC streams over connections that are broken, presumably when the function instance is frozen.
@ja-nick I do not believe the Telemetry API is supported in the emulator given that it says it "does not support AWS X-Ray tracing or other Lambda integrations."  Would an option to suppress the collector startup under the emulator be workable for you?

@rmarasigan are you able to try the otlphttp exporter? I haven't seen that error before, but it looks like an issue with gRPC streams over connections that are broken, presumably when the function instance is frozen.

@Aneurysm9 yes, I've tried using the otlphttp but it gives me an error and does not send the traces to the Central Remote Collector. Also, the project needs/requires to use gRPC instead of HTTP.
Here are the errors found for the otlphttp:
{
    "level": "error",
    "ts":<PHONE_NUMBER>.8455393,
    "caller": "exporterhelper/queued_retry.go:394",
    "msg": "Exporting failed. The error is not retryable. Dropping data.",
    "kind": "exporter",
    "data_type": "traces",
    "name": "otlphttp",
    "error": "Permanent error: error exporting items, request to http://xxx:xxx:xxx:xxx:4318/v1/traces responded with HTTP Status Code 400",
    "dropped_items": 6,
    "stacktrace": "go.opentelemetry.io/collector/exporter/exporterhelper.(*retrySender).send\n\tgo.opentelemetry.io/collector@v0.64.1/exporter/exporterhelper/queued_retry.go:394\ngo.opentelemetry.io/collector/exporter/exporterhelper.(*tracesExporterWithObservability).send\n\tgo.opentelemetry.io/collector@v0.64.1/exporter/exporterhelper/traces.go:133\ngo.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).send\n\tgo.opentelemetry.io/collector@v0.64.1/exporter/exporterhelper/queued_retry.go:294\ngo.opentelemetry.io/collector/exporter/exporterhelper.NewTracesExporter.func2\n\tgo.opentelemetry.io/collector@v0.64.1/exporter/exporterhelper/traces.go:112\ngo.opentelemetry.io/collector/consumer.ConsumeTracesFunc.ConsumeTraces\n\tgo.opentelemetry.io/collector@v0.64.1/consumer/traces.go:36\ngo.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace.(*Receiver).Export\n\tgo.opentelemetry.io/collector/receiver/otlpreceiver@v0.64.1/internal/trace/otlp.go:59\ngo.opentelemetry.io/collector/pdata/ptrace/ptraceotlp.rawTracesServer.Export\n\tgo.opentelemetry.io/collector/pdata@v0.64.1/ptrace/ptraceotlp/grpc.go:72\ngo.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1._TraceService_Export_Handler.func1\n\tgo.opentelemetry.io/collector/pdata@v0.64.1/internal/data/protogen/collector/trace/v1/trace_service.pb.go:310\ngo.opentelemetry.io/collector/config/configgrpc.enhanceWithClientInformation.func1\n\tgo.opentelemetry.io/collector@v0.64.1/config/configgrpc/configgrpc.go:421\ngoogle.golang.org/grpc.chainUnaryInterceptors.func1.1\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1162\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryServerInterceptor.func1\n\tgo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.36.4/interceptor.go:341\ngoogle.golang.org/grpc.chainUnaryInterceptors.func1.1\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1165\ngoogle.golang.org/grpc.chainUnaryInterceptors.func1\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1167\ngo.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1._TraceService_Export_Handler\n\tgo.opentelemetry.io/collector/pdata@v0.64.1/internal/data/protogen/collector/trace/v1/trace_service.pb.go:312\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1340\ngoogle.golang.org/grpc.(*Server).handleStream\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1713\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.2\n\tgoogle.golang.org/grpc@v1.50.1/server.go:965"
}
{
    "level": "error",
    "ts":<PHONE_NUMBER>.8456972,
    "caller": "exporterhelper/queued_retry.go:296",
    "msg": "Exporting failed. Dropping data. Try enabling sending_queue to survive temporary failures.",
    "kind": "exporter",
    "data_type": "traces",
    "name": "otlphttp",
    "dropped_items": 6,
    "stacktrace": "go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).send\n\tgo.opentelemetry.io/collector@v0.64.1/exporter/exporterhelper/queued_retry.go:296\ngo.opentelemetry.io/collector/exporter/exporterhelper.NewTracesExporter.func2\n\tgo.opentelemetry.io/collector@v0.64.1/exporter/exporterhelper/traces.go:112\ngo.opentelemetry.io/collector/consumer.ConsumeTracesFunc.ConsumeTraces\n\tgo.opentelemetry.io/collector@v0.64.1/consumer/traces.go:36\ngo.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace.(*Receiver).Export\n\tgo.opentelemetry.io/collector/receiver/otlpreceiver@v0.64.1/internal/trace/otlp.go:59\ngo.opentelemetry.io/collector/pdata/ptrace/ptraceotlp.rawTracesServer.Export\n\tgo.opentelemetry.io/collector/pdata@v0.64.1/ptrace/ptraceotlp/grpc.go:72\ngo.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1._TraceService_Export_Handler.func1\n\tgo.opentelemetry.io/collector/pdata@v0.64.1/internal/data/protogen/collector/trace/v1/trace_service.pb.go:310\ngo.opentelemetry.io/collector/config/configgrpc.enhanceWithClientInformation.func1\n\tgo.opentelemetry.io/collector@v0.64.1/config/configgrpc/configgrpc.go:421\ngoogle.golang.org/grpc.chainUnaryInterceptors.func1.1\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1162\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryServerInterceptor.func1\n\tgo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.36.4/interceptor.go:341\ngoogle.golang.org/grpc.chainUnaryInterceptors.func1.1\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1165\ngoogle.golang.org/grpc.chainUnaryInterceptors.func1\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1167\ngo.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1._TraceService_Export_Handler\n\tgo.opentelemetry.io/collector/pdata@v0.64.1/internal/data/protogen/collector/trace/v1/trace_service.pb.go:312\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1340\ngoogle.golang.org/grpc.(*Server).handleStream\n\tgoogle.golang.org/grpc@v1.50.1/server.go:1713\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.2\n\tgoogle.golang.org/grpc@v1.50.1/server.go:965"
}

OTel Lambda Error: failed to force a flush, lambda may freeze before instrumentation exported:  rpc error: code = Unknown desc = Permanent error: error exporting items, request to http://xxx:xxx:xxx:xxx:4318/v1/traces responded with HTTP Status Code 400

And this is how the config looks:
exporters:
  otlphttp:
    endpoint: https://xxx:xxx:xxx:xxx:4318
    retry_on_failure:
      enabled: true
      initial_interval: 10s
    tls:
      ca_file: /opt/certificate/ca.pem
      cert_file: /opt/certificate/certificate.pem
      key_file: /opt/certificate/private-key.pem
    auth:
      authenticator: oauth2client

@Aneurysm9

Would an option to suppress the collector startup under the emulator be workable for you?

That would definitely help. We do generally try to test our telemetry config in the emulator too though.
Best case would be that the Telemetry API integration would be turned off under emulation but that the collector itself continues to work.

Hi. @ja-nick.

That would definitely help. We do generally try to test our telemetry config in the emulator too though.
Best case would be that the Telemetry API integration would be turned off under emulation but that the collector itself > continues to work.

Have you found a solution to this problem? Our workflow involves running the lambda container and collector locally (for testing and debugging purposes). We experience the same problem:
request to http://<IP_ADDRESS>:9001/2022-07-01/telemetry failed: 404[404 Not Found] 404 page not found


Node.js  uvwasi team Meeting 2023-11-29

Time
UTC Wed 29-Nov-2023 20:00 (08:00 PM):

Timezone
Date/Time

US / Pacific
Wed 29-Nov-2023 12:00 (12:00 PM)

US / Mountain
Wed 29-Nov-2023 13:00 (01:00 PM)

US / Central
Wed 29-Nov-2023 14:00 (02:00 PM)

US / Eastern
Wed 29-Nov-2023 15:00 (03:00 PM)

EU / Western
Wed 29-Nov-2023 20:00 (08:00 PM)

EU / Central
Wed 29-Nov-2023 21:00 (09:00 PM)

EU / Eastern
Wed 29-Nov-2023 22:00 (10:00 PM)

Moscow
Wed 29-Nov-2023 23:00 (11:00 PM)

Chennai
Thu 30-Nov-2023 01:30 (01:30 AM)

Hangzhou
Thu 30-Nov-2023 04:00 (04:00 AM)

Tokyo
Thu 30-Nov-2023 05:00 (05:00 AM)

Sydney
Thu 30-Nov-2023 07:00 (07:00 AM)

Or in your local time:

https://www.timeanddate.com/worldclock/fixedtime.html?msg=Node.js+Foundation+uvwasi team+Meeting+2023-11-29&iso=20231129T2000
or https://www.wolframalpha.com/input/?i=08PM+UTC%2C+Nov+29%2C+2023+in+local+time

Links

Minutes Google Doc: https://docs.google.com/document/d/166vQUEd0T6Cl-AtkOJ2P7EUSgUK-XQeJccExgQ4bSE0/edit

Agenda
Extracted from uvwasi-agenda labelled issues and pull requests from the nodejs org prior to the meeting.
nodejs/node

WASI preview 1: fd_readdir ignores cookie argument #47193

nodejs/uvwasi

What's new with uvwasi in 2023 #201
Changes to WASI spec in snapshot_preview2 #59

Invited

uvwasi team: @nodejs/wasi

Observers/Guests
Notes
The agenda comes from issues labelled with uvwasi-agenda across all of the repositories in the nodejs org. Please label any additional issues that should be on the agenda before the meeting starts.
Joining the meeting

link for participants: https://zoom.us/j/91612484369
For those who just want to watch:
youtube admin page: https://www.youtube.com/my_live_events?filter=scheduled

Dupliocate closing.


Cannot specify Android API levels that AndroidSdkVersions does not include

PlayerSettings.Android.targetSdkVersion and PlayerSettings.Android.minSdkVersion will accept int values for higher Android API levels than are defined in UnityEditor.AndroidSdkVersions, allowing the use of new Android SDKs (e.g. Unity 2022.2 defines values for up to Android 30 in AndroidSdkVersions, but Android 34 is the latest available at the time of writing), but because BuildAndroid relies on AndroidSdkVersions to get and set API levels, building for these newer API levels is not possible via SuperUnityBuild.

Hello, meet this problem too, mimnimum target api must be 22 and maximum 34 for Unity 2022.3. Please fix 😢

Hello, I have this problem too

Can this please be fixed? And is there a reason why it's so difficult to find this AndroidSdkVersions? I appreciate the work you're doing, but this is a breaking bug and it's a bit frustrating going through all of the hoops of getting the build tool ready for it not to work because some variables are outdated and I'm not able to just manually modify the enum. @robinnorth

I have the exact same problem, if we want to be able to publish on the Google Play store, new apps must target SDK version 33, which isn't even an option in AndroidSdkVersions. Take it from Unity's words : "These values should not be used to determine the highest supported API level.".


Add emails

Add news emails (currently in testing) every week to show the top stories for that week.

Also transactional emails (optional of course), when someone replies to your story or comment.


i18n(ko-KR): update nav.ts

Description (required)

update nav.ts
#9182

Related issues & labels (optional)

Closes #
Suggested label:

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

ko
nav.ts
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.