Default Route is replaced

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Describe the bug
I have a WAN interface and the corresponding gateway (WAN_DHCP). I also have a separate interface that connects to a single device that has a DHCP server which dynamically assigns an IP addresses to my Opnsense interface (MevoDevice / MevoDeviceGateway). This interface is setup as a gateway (with upstream gateway not checked). I turn the device that assigns the IP to the MevoDevice on and off periodically.
After a reboot with the mevo device off everything works as expected however if I turn the mevo device on; my opnsense gets an ip on the mevodevice and my default route (i.e. the WAN) is removed. All traffic on my LAN stops being routed via the WAN.
Once this happens I can disable and enable the WAN interface and the route will be recreated and in the future it doesn't get removed if I turn on/off the mevo and get a new DHCP ip on my MevoDevice interface.
To Reproduce
Steps to reproduce the behavior:

Setup explained above (WAN + LAN + OPT1)
WAN gets an ip via DHCP and is the default gateway
OPT1 gets an ip via DHCP and the default route from the WAN is removed
Fix the route issue manually (i.e. enable / disable the WAN interface or WAN gateway)
Future cases where the OPT1 interface gets an ip via DHCP work as expected (i.e. the WAN route is not removed)

Expected behavior
Getting a new DHCP lease on a different interface after a reboot shouldn't remove the default route.
Describe alternatives you considered
A clear and concise description of any alternative solutions or workaround you considered.
Screenshots
If applicable, add screenshots to help explain your problem.
Relevant log files
If applicable, information from log files supporting your claim.
Additional context
Add any other context about the problem here.
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 21.1.2_1 (amd64, OpenSSL).
Broadcom SFTP w/VLAN for WAN (DHCP Client)
Intel igb for Mevo (DHCP Client)
Intel em0 for LAN

Did you set Default gateway switching in System : Settings : General?

@mimugmail  "Allow default gateway switching" is unchecked.

Usually this is about gateway switching or overlapping priorities, if there's an obvious bug we should fix we definitely change the tag later on.
Gateway selection can be confusing sometimes, backgrounds about selection and how to troubleshoot can be found in our documentation (https://docs.opnsense.org/manual/gateways.html#default-gateways)

Thanks for the link @AdSchellevis
Few more details about my setup (which was kind of confirmed by the link):

I have "Allow default gateway switching" unchecked
I have the WAN gateway as the highest priority (1)
I have the WAN gateway set as "upstream"
My Mevo gateway is the lowest priority (255)
My Mevo gateway is not set as "upstream"
I have no gateway monitoring setup

Later today I will reproduce and post the logs.

Some attachments...

My gateways for WAN and Mevo
The routes after I restart and before I start the Mevo (i.e. when everything is working expected and the Mevo hasn't given me a DHCP ip on the non-WAN interface Before - Routes
The routes once the Mevo gives Opnsense an IP via DHCP After - Routes
Then finally the routes after I disable and enable my WAN gateway (to fix the problem) Fixed - Routes
Then the log (not much help actually) during this period of time system.log

@cmaxwe can you find the initial gateway creation in the log, it looks a bit suspicious.
Here it thinks Mevo is the valid gateway, but since both are dhcp based the initial event is the relevant here.
2022-03-10T13:46:26-04:00	Error	opnsense	 /usr/local/etc/rc.newwanip: On (IP address: <IP_ADDRESS>) (interface: Mevo[opt4]) (real interface: igb0).

When the Mevo is plugged in, can you check which /tmp/*_router files exist as well?

Here is a log (I removed the Mevo gateway that I had manually created - it doesn't look like it recreated it in the UI but it appears to create the routes I need regardless).
https://filedrop.c-maxwell.net/github_attachments/system%2520%25281%2529.log
When the Mevo is connected there is no corresponding _router file in tmp. Just my normal /tmp/bxe0_vlan35_router.

@cmaxwe Can you take a look at
cat /var/db/dhclient.leases.igb0
I suspect it doesn't give you a default route (or any route for that matter) if the router file does not exist ("option routers").
Cheers,
Franco

@fichtner:
You are right!
lease {
interface "igb0";
fixed-address <IP_ADDRESS>;
option subnet-mask <IP_ADDRESS>;
option broadcast-address <IP_ADDRESS>;
option dhcp-lease-time 600;
option dhcp-message-type 5;
option dhcp-server-identifier <IP_ADDRESS>;
renew 1 2022/3/14 17:19:57;
rebind 1 2022/3/14 17:23:42;
expire 1 2022/3/14 17:24:57;
}
lease {
interface "igb0";
fixed-address <IP_ADDRESS>;
option subnet-mask <IP_ADDRESS>;
option broadcast-address <IP_ADDRESS>;
option dhcp-lease-time 600;
option dhcp-message-type 5;
option dhcp-server-identifier <IP_ADDRESS>;
renew 1 2022/3/14 17:23:43;
rebind 1 2022/3/14 17:27:28;
expire 1 2022/3/14 17:28:43;
}
lease {
interface "igb0";
fixed-address <IP_ADDRESS>;
option subnet-mask <IP_ADDRESS>;
option broadcast-address <IP_ADDRESS>;
option dhcp-lease-time 600;
option dhcp-message-type 5;
option dhcp-server-identifier <IP_ADDRESS>;
renew 1 2022/3/14 17:28:43;
rebind 1 2022/3/14 17:32:28;
expire 1 2022/3/14 17:33:43;
}

@fichtner If I add "default routers <IP_ADDRESS>" to the Mevo interface Option Modifiers then it creates a gateway for the interface and sets the default route to the mevo interface and <IP_ADDRESS> when it gets a DHCP lease.
Desired functionality is for it to not just assume that any dhcp lease is the default route though.

Gateways page looks like you would expect.
WAN = Active w/ Priority 1 Upstream
Mevo = Looks like a normal gateway with a priority of 255 (no active in brackets and no upstream tag)
Routes page with Franco's suggestion looks a bit different than before (where there was no default route when the Mevo stole it from WAN). Now the Mevo's gateway shows up as the default route. While this makes more sense it actually doesn't change the overall problem of the Mevo stealing the default gateway when it is activated after a reboot.
Once I fix it by disabling and enabling the WAN gateway then it works going forward without issue (i.e. I can turn the mevo on and off and it will not steal the WAN gateway).
It is like Opnsense isn't respecting either the "upstream gateway" flag or the "Allow default gateway switching" when it gets the first DHCP lease on an interface after a reboot.

I just recreated the issue with fresh Virtual Machines - so it isn't an issue with my specific instance.

A VM on my "LAN" virtual network to access and config Opnsense1
A Opnsense1 VM that has a "WAN" bridge to my real LAN + an interface to my "LAN" virtual network + an interface to a "MEVO" virtual network
A Opnsense2 VM that just gives out DHCP leases on my "MEVO" virtual network

As with my real configuration - if I boot Opnsense1 it works as expected and my default gateway is the "WAN" bridge. Then when I boot Opnsense2 then my Opnsense1 VM gets a lease on the "MEVO" virtual network and it replaces the default gateway.

looking briefly at the dhclient-script, there might be an issue with removing the default route. could your try to disable this line:
https://github.com/opnsense/core/blob/c3a4b2346928c3bd4b9c1f6336296b28f0445bb1/src/opnsense/scripts/interfaces/dhclient-script#L134
just place a # in front of the line (#route delete default >/dev/null 2>&1)
If that doesn't change anything, try the same for:
https://github.com/opnsense/core/blob/c3a4b2346928c3bd4b9c1f6336296b28f0445bb1/src/opnsense/scripts/interfaces/dhclient-script#L181
If the gateway determination is doing the right thing, but the dhclient script is removing the default gateway, it might explain what's happening on your end.
Usually the rc.newwanip should enforce the correct gateway as well.
https://github.com/opnsense/core/blob/c3a4b2346928c3bd4b9c1f6336296b28f0445bb1/src/opnsense/scripts/interfaces/dhclient-script#L344
https://github.com/opnsense/core/blob/c3a4b2346928c3bd4b9c1f6336296b28f0445bb1/src/etc/rc.newwanip#L148
https://github.com/opnsense/core/blob/d4f4b48b0692efbbbccbb79e3651b50227eb65c5/src/etc/inc/system.inc#L540-L555

My opnsense installation, from november, with all upgrades that came since.
I have the same issue and I see it is resolved, I have the good script here : /usr/local/opnsense/scripts/interfaces/dhclient-script
But I think the one that is used by dhclient is here /sbin/dhclient-script and it is the old code with default route removal.
It is not the same code or a link, have you an explanation for this ?
Thanks


Remove future requirements.txt files

Feature Request
Desired behaviour
We have a lot of python packages specified in our requirements.txt files because historically installing just cwltool wasn't enough to run all our verified tools/workflows.  Ideally cwltool should be responsible for determining which packages are needed and install them when installing cwltool.  Perhaps many of the packages we specify are actually no longer needed.
┆Issue is synchronized with this Jira Story
┆Issue Type: Story
┆Issue Number: DOCK-668

That probably won't work.
The problem is that previously when installing a pinned version cwltool, we would find that transitive dependencies could still float and break, which is why we pinned transitive dependencies.

Yes, the point is that if their transitive dependencies aren't correct (in other words their requirements.txt range has too wide of a gap), they should be modifying their requirements.txt and pinning it there instead of us having our own separate requirements.txt that does pin it

That doesn't seem like an issue for this repo?

Our issue because our requirements files overlap quite a bit:
schema-salad, ruamel.yaml and requests which is effectively half our requirements.txt file.  It's been a very long time since we checked if those pinned versions we have are necessary (compared to theirs).  It is very likely it isn't.  Considering Lincoln mentioned last time that it's annoying to use, we should do what we can about it.

I don't think the complaint was about the length of the requirements file, its not like people are typing the requirements file out by hand. The complaint was more about having to use pip at all.
Can discuss offline

Re-opening as the title of this mentions this is for FUTURE requirements.txt files

FYI, pip freeze output after install cwltool==1.0.20181217162649:
bagit==1.7.0
CacheControl==0.11.7
certifi==2019.3.9
chardet==3.0.4
cwltool==1.0.20181217162649
decorator==4.4.0
idna==2.8
isodate==0.6.0
lockfile==0.12.2
lxml==4.3.3
mistune==0.8.4
mypy-extensions==0.4.1
networkx==2.2
pathlib2==2.3.2
pkg-resources==0.0.0
prov==1.5.1
psutil==5.6.1
pyparsing==2.4.0
python-dateutil==2.8.0
rdflib==4.2.2
rdflib-jsonld==0.4.0
requests==2.21.0
ruamel.ordereddict==0.4.13
ruamel.yaml==0.15.77
scandir==1.10.0
schema-salad==3.0.20181206233650
shellescape==3.4.1
six==1.12.0
subprocess32==3.5.3
typing==3.6.6
typing-extensions==3.7.2
urllib3==1.24.1


[Snyk] Security upgrade CrispyWaffle from 6.1.156 to 6.1.169

This PR was automatically created by Snyk using the credentials of a real user.![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to fix 1 vulnerabilities in the nuget dependencies of this project.
Snyk changed the following file(s):

Src/VTEX.API/VTEX.API.csproj

Vulnerabilities that will be fixed with an upgrade:

Issue
Score

Denial of Service (DoS) SNYK-DOTNET-SYSTEMTEXTJSON-7433719
  721

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Denial of Service (DoS)

:white_check_mark: Build VTEX-SDK-dotnet 2.3.888 completed (commit https://github.com/guibranco/VTEX-SDK-dotnet/commit/5a940f8fe8 by @snyk-bot)


DoS filter

This PR adds the following features:

Each user can only have one active session. If a user tries to create a new session while an active session exists, their exsiting session is deleted before the new session is created.
If a user tries to save dataframes rapidly to exhaust storage, they will be banned temporarily.

The config file now contains these extra parameters:

The number of saves (within 20 seconds) after which a user should be blocked.
The amount of time for which the offending user should be banned.

These only work when auth is enabled because users cannot be tracked with auth disabled.
Other optimizations:
Removal of the verify_user function in the client because the session it created was immediately overwritten on the first call to the server.

Please also solve the conflict :-)


Minor changes

ESLint config update
Allow function type inference

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


SILGen: Open existential lvalues on entry into an OpenExistentialExpr again.

4b25945 changed codegen for lvalue OpenExistentialExprs so that the existential was not opened until the OpaqueValue's lvalue was evaluated, but this is incorrect—we need to open the dynamic type of the existential immediately since it can be used arbitrarily within the subexpression. This caused a regression when evaluating default argument generators on protocol extension methods (rdar://problem/37031037), and would become a bigger problem when we generalize the ability to open existentials.

@swift-ci Please test

@swift-ci Please test source compatibility

I don't, no, sorry.  I think this seems fine.

@swift-ci Please test source compatibility


Why is the angle of canvas reversed when rotate ?

import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';

void main() => runApp(
    new MaterialApp(
      title: 'Startup Name Generator',
      showPerformanceOverlay: false,
      theme: new ThemeData(
        primaryColor: Colors.white,
      ),
      home: new MyHomePage(),
    )
);

class MyHomePage extends StatefulWidget{
  @override
  State<StatefulWidget> createState() {
    return MyHomePageState();
  }
}

class MyHomePageState extends State<MyHomePage>{

  PictureRecorder _recorder;
  Picture picture;
  double _bound=200.0;

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("雷达图"),
      ),
      body: new Center(
        child:  new CustomPaint(
          size: new Size(_bound,_bound),
          painter: new RadarChartPainter(
            picture: picture,
          ),
        ),
      ),
    );
  }

  @override
  void initState() {
    super.initState();
    _recorder=new PictureRecorder();
    drawLine();
  }

  void drawLine(){
    Canvas canvas=Canvas(_recorder);
    Paint linePaint=Paint();
    canvas.clipRect(new Rect.fromLTRB(0.0, 0.0, _bound, _bound));
    canvas.translate(_bound/2, _bound/2);
    canvas.drawCircle(new Offset(0.0, 0.0), 2.0, new Paint()..color=Colors.red);

    canvas.save();
    ///canvas.rotate(-pi/2);
    ///I want draw a horizontal line to right of the center point,I rotate -pi/2, but I found that the angle was reversed.
    canvas.rotate(pi/2);
    canvas.translate(0, -_bound/2);
    canvas.drawLine(new Offset(0.0, 0.0), new Offset(0, _bound/2), linePaint);
    canvas.restore();

    picture=_recorder.endRecording();
  }
}

class RadarChartPainter extends CustomPainter{

  final Picture picture;

  RadarChartPainter({
    @required this.picture,
  });

  @override
  void paint(Canvas canvas, Size size) {
    if(picture!=null) {
      canvas.drawPicture(picture);
    }
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}

The key code is in the method of drawLine,  line 65 and line 67;
When I rotated the canvas to the angle I wanted to draw, I found that the angle was reversed.
Flutter doctor -v log
[√] Flutter (Channel beta, v1.0.0, on Microsoft Windows [Version 10.0.17763.195], locale zh-CN)
    • Flutter version 1.0.0 at E:\Flutter\flutter
    • Framework revision 5391447fae (5 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at D:\Android_SDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = D:\Android_SDK
    • Java binary at: D:\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at D:\Android Studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] IntelliJ IDEA Ultimate Edition (version 2017.2)
    • IntelliJ at E:\IntelliJ IDEA 2017.2.6
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[√] Connected device (1 available)
    • SM A7000 • 0490dac9 • android-arm • Android 6.0.1 (API 23)

To investigate we would need a minimal runnable reproduction
as a single file so that we can just copy your code into lib/main.dart of a new project and run to reproduce.
Please add the output of flutter doctor -v.

Hi @baoolong,
Is this still an issue ?
Thanks.


Resolve Conversation Button not work

Version: 1.93.1 (system setup)
Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
Date: 2024-09-11T17:20:05.685Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19045
Steps to Reproduce:

Start a new Review
Create a comment and click on Add Review Comment.
Finish the Review
Externally, resolve the comment
Refresh the plugin
open the comment
Click on the Resolve Conversation button

Actual Results:

Check GitHub - notice that it wasn't resolved.
The GUI didn't change.

Expected Results:

GitHub is notified about this resolution.
The comment icon should change to something different - like:
The "Resolve Conversation" button should either be disabled or changed to "Unresolve Conversation" and perhaps show a green check mark and/or a "Resolved" label at the top of the dialog box. Like so:

The only part of this I can reproduce is that using the "refresh" button on the active PR view doesn't refresh the comments.


Custom Gotenberg's log format

Hi there,
We implemented Gotenberg on GKE clusters a few months ago.
Our log management is Datadog, to which we send all our application logs.
However, we are facing issue about one log attribute (in the Json log) : the host one.
It's a default Datadog's reserved keyword used to bind host on which pod is running.
Our problem is that Gotenberg use that field to get server when sending logs, and our Datadog Cluster agent is not able to raise custom tags and other useful informations.

I checked the code and focused on code I would be removed :p
My understanding is there is no possibility to have custom log format and don't want to fork or tweak that project for that single point.
Do you have some feedbacks on similar cases, or some guidances to help ?
Thanks in advance 🙏
N.B : I already check with Datadog Golang's pipeline integration processors, but no effect, because host binding is performed as before (preprocessing).

Hello @JulienWeintraub!
A simple solution could be a new property for setting an optional prefix to these fields, i.e., —log-fields-prefix=gotenberg. The host field would become gotenberg_host.
Would that work for you?

Hi @gulien, thanks for your feedbacks!
Added an optional prefix Gotenberg side, right ?
And global I guess, for all of them ?
That could be a solution for sure : I can easily remap Datadog side, attribute keys to new ones (gotenberg_level -> level) :)
Maybe some tests are required, to validate that solution 🤔

Added an optional prefix Gotenberg side, right ?
And global I guess, for all of them ?

Yes, the new flag would add the prefix to all fields 👍

Hello @gulien !
Just a quick update : I change a little bit the code to test the image in real conditions.
Very basic hard-coded modifications, because of my Go aknowledges :trollface: :
+++ b/pkg/modules/api/middlewares.go
@@ -160,11 +160,11 @@ func loggerMiddleware(logger *zap.Logger, disableLoggingForPaths []string) echo.

 			// Now, let's log!
 			fields := make([]zap.Field, 12)
-			fields[0] = zap.String("remote_ip", c.RealIP())
-			fields[1] = zap.String("host", c.Request().Host)
-			fields[2] = zap.String("uri", c.Request().RequestURI)
-			fields[3] = zap.String("method", c.Request().Method)
-			fields[4] = zap.String("path", func() string {
+			fields[0] = zap.String("gotenberg_remote_ip", c.RealIP())
+			fields[1] = zap.String("gotenberg_host", c.Request().Host)
+			fields[2] = zap.String("gotenberg_uri", c.Request().RequestURI)
+			fields[3] = zap.String("gotenberg_method", c.Request().Method)
+			fields[4] = zap.String("gotenberg_path", func() string {
 				path := c.Request().URL.Path

 				if path == "" {
@@ -173,13 +173,13 @@ func loggerMiddleware(logger *zap.Logger, disableLoggingForPaths []string) echo.

 				return path
 			}())
-			fields[5] = zap.String("referer", c.Request().Referer())
-			fields[6] = zap.String("user_agent", c.Request().UserAgent())
-			fields[7] = zap.Int("status", c.Response().Status)
-			fields[8] = zap.Int64("latency", int64(finishTime.Sub(startTime)))
-			fields[9] = zap.String("latency_human", finishTime.Sub(startTime).String())
-			fields[10] = zap.Int64("bytes_in", c.Request().ContentLength)
-			fields[11] = zap.Int64("bytes_out", c.Response().Size)
+			fields[5] = zap.String("gotenberg_referer", c.Request().Referer())
+			fields[6] = zap.String("gotenberg_user_agent", c.Request().UserAgent())
+			fields[7] = zap.Int("gotenberg_status", c.Response().Status)
+			fields[8] = zap.Int64("gotenberg_latency", int64(finishTime.Sub(startTime)))
+			fields[9] = zap.String("gotenberg_latency_human", finishTime.Sub(startTime).String())
+			fields[10] = zap.Int64("gotenberg_bytes_in", c.Request().ContentLength)
+			fields[11] = zap.Int64("gotenberg_bytes_out", c.Response().Size)

I was able to perform multiple Datadog's log fields remapping (referer, status, ..., and all work fine ;)

Unused on my case after processing, but I remapped the host attribute to retrieve original Gotenberg content.

@JulienWeintraub great thank you for the feedback! I’ll try to implement it in a new release this week.

@JulienWeintraub version 7.9.0 is now available with the flag --logs-fields-prefix 😉

Amazing !
Tested, validated and approved 🤩
Thanks a lot @gulien for your quick release 😉


MM-24446 Fix Crash on iOS with EMM enabled (1.30)

Summary
This PR affects 1.30 and another PR exists for master/1.31
The react-native-local-auth library was not being linked for iOS and then when this functionality was requested the app crashed.
Also fixes Passcode authentication on Android that was not being triggered and finally fixes the header being present and allowing going back to the select server screen when EMM disallowed using other servers.
Ticket Link
https://mattermost.atlassian.net/browse/MM-24446

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/5316
https://circleci.com/gh/mattermost/mattermost-mobile/5315

Artifact links:
https://5316-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.ipa
https://5315-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.apk

@lindalumitchell will you be testing https://github.com/mattermost/mattermost-mobile/pull/4203 too ? is the same PR

@enahum possibly, but probably not tonight. Trying to get the other two 4197 and 4205 done too, and I'm about to go offline for a few hours. Will try to finish those two when I'm back on but it'll be pretty late by then. Maybe Sven can help test the v1.31 one when he's back on, since the build for this PR will have to be separately added and configured in Mobileiron anyway, yeah?

Sure thing

re: https://github.com/mattermost/mattermost-mobile/pull/4203, should we test it per PR build or could the test made here valid since the change is just the same?  I'd suggest to QA approve it and do the test once merged (on next available build).


[opencv] Fix dnn link error.

https://github.com/Microsoft/vcpkg/issues/1353

@seanlis,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Thanks for the PR! I think this is something we should fix in the protobuf port, because it affects everyone who uses protobuf.
The strategy we use in other ports is to patch the installed header files of the library to correctly match the configuration it was built in. In this case, it would be string-replacing defined(PROTOBUF_USE_DLLS) with 1 inside port.h[1].
Here's an example where @codicodi has done something similar: https://github.com/Microsoft/vcpkg/pull/1322/files#diff-d1534ce17a0e8bf779bde679308cda1eR68
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
    file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h OPUS_DEFINES)
    string(REPLACE "define OPUS_EXPORT" "define OPUS_EXPORT __declspec(dllimport)" OPUS_DEFINES "${OPUS_DEFINES}")
    file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h "${OPUS_DEFINES}")
endif()

[1] https://github.com/google/protobuf/blob/dd7265e1a2cf78fd0333f62d8e74d40a0781f83b/src/google/protobuf/stubs/port.h#L75


Can it work with stylus?

This looks like an excellent plugin, I'm just a little confused about how it would work with Stylus, LESS, SASS. Also is it only for postcss-modules-values or can work for importing whole files?
What I'm trying to do:
@import theme(colors)
And variables inside ./src/themes/colors.styl
$panelBgColor = #373536
...

But getting    1| @import theme(colors)   String expected
Also, loader is:
test: /\.styl$/,
loader: 'style!css?sourceMap!postcss!stylus?sourceMap' :

Any clues appreciated! Thanks

Hey @mkrn. I'm sorry to tell you that postcss-theme will only work with CSS modules variables (@value).
I guess the only way to make it work with stylus is to use @value vars in stylus (hoping that the syntax won't break stylus parsing)


[Remote Store] Add support for refresh level durability

Description

As part of remote store feature that was introduced in OpenSearch 2.3, segments are uploaded to remote store post each refresh.
This means remote segment store contains segments that were part of last refresh.
But the _remotestore/_restore API only supports commit level durability.
This feature will add refresh level durability support to the restore API.

Issues Resolved

https://github.com/opensearch-project/OpenSearch/issues/5251

Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff
[ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #5253 (057a5f3) into main (831b3a0) will increase coverage by 0.03%.
The diff coverage is 87.75%.

@@             Coverage Diff              @@
##               main    #5253      +/-   ##
============================================
+ Coverage     70.97%   71.00%   +0.03%
- Complexity    58186    58191       +5
============================================
  Files          4708     4708
  Lines        277558   277582      +24
  Branches      40190    40193       +3
============================================
+ Hits         197006   197109     +103
+ Misses        64444    64330     -114
- Partials      16108    16143      +35

Impacted Files
Coverage Δ

...ava/org/opensearch/transport/TransportService.java
83.26% <ø> (+1.31%)
:arrow_up:

...java/org/opensearch/index/shard/StoreRecovery.java
67.74% <78.57%> (-0.15%)
:arrow_down:

...search/index/shard/RemoteStoreRefreshListener.java
79.41% <86.36%> (+1.09%)
:arrow_up:

...rg/opensearch/cluster/coordination/JoinHelper.java
85.56% <100.00%> (ø)

...nsearch/cluster/coordination/JoinTaskExecutor.java
90.78% <100.00%> (+2.81%)
:arrow_up:

...earch/index/store/RemoteSegmentStoreDirectory.java
99.30% <100.00%> (+0.01%)
:arrow_up:

...arch/aggregations/metrics/HyperLogLogPlusPlus.java
87.28% <100.00%> (-6.94%)
:arrow_down:

...search/indices/recovery/RecoveryTargetHandler.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...java/org/opensearch/client/indices/DataStream.java
0.00% <0.00%> (-76.09%)
:arrow_down:

.../opensearch/client/indices/CloseIndexResponse.java
17.50% <0.00%> (-73.75%)
:arrow_down:

... and 477 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Rebase pls, the above should be resolved.

Currently, we keep one metadata file per commit and the same file (latest metadata file) gets overwritten per refresh. This worked well with commit level durability as failure to read the latest metadata file would mean the next metadata file which would represent the previous commit.
With refresh level durability, reading second to last file (by upload timestamp) will not provide previous refresh details. In fact, we don't keep the refresh history the same way we are keeping commit history with metadata files. This needs to be changed.

Can we write Integ tests for this ?

Yes @gbbafna . Currently, we don't have any integ tests written for remote store feature. Will add.


CAMEL-17536 Fixed: ServicePool.doStop hangs during shutdown

[x] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] If you're unsure, you can format the pull request title like [CAMEL-XXX] Fixes bug in camel-file component, where you replace CAMEL-XXX with the appropriate JIRA issue.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Run mvn clean install -Psourcecheck in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
Below are the contribution guidelines:
https://github.com/apache/camel/blob/main/CONTRIBUTING.md

Access to cache is synchronized. I was unsure who is responsible for synchronization when cache is LRUCache, not a simple map and left cleanUp not synchronized. If LRUCache is supposed to be thread-safe, then added synchronization is redundant for LRUCache and could be applied conditionally.

Thanks for this PR. I modified it a bit to only use synchronized in acquire if we are stopping

Thanks for looking into it. I believe that the optimization is incorrect, because race condition is not always due to recipientlist processing during shutdown. I will create another issue for this.


TileMap editor is slow with large tilemaps

Godot version
4.0 beta 16
System information
Linux Min 19
Issue description
Currently developing a 2d open world game and have encountered problems using Tilemaps.
When editing a large map the editor lags, freezes and crashes all the time. Its completly unsuable.
Running the game workd flawless, but the problem occurs when editing the level in editor.
Is the tilemap editor not supposed to be able to edit large maps?
Steps to reproduce
edit:
Create a tilemap with 800 x 800 tiles.
Minimal reproduction project
minimal.zip

I can add on to this that editing tile data, creating animation, selecting and deselecting tiles gives the same lag, freezes and crashes.

I've spotted the same. Overtime tilemap editor performance tanks. Reloading project seems to be okay though and works fine. Possibly not freeing some objects somewhere? I'm on latest Godot 4.0 and using a tilemap with 64x64 cells.

Hey!
I probably have the same problem.
The TileSet window within Godot editor is freezing and lagging a lot when I open a big TileSet (like this one).
Any action within the window is freezing (select/erase/scroll) to the point that it is absolutely unusable.
Though I am not sure if TileMap and TileSet considered the same window or this is a separate issue.
v4.0.3.stable.official [5222a99f5]
macOS 13.4.1 (22F82)

I have the same problem, I have about 175,000 terrain tiles, and it was lagging when I was editing the terrain bitmask or editing the tile properties, but not when I was erasing or placing terrain tiles. The way I work around this issue is I save the tileset as a .tres file and then open a new scene and create a new tilemap, place the saved tileset .tres file and then when I edit the tileset in the new scene automatically saves the properties in my large world and I'm able to edit it at normal speed.

I can confirm this in 4.0, 4.1 and 4.2-dev3, specifically related to the situation in the last comment.
I've run into this lag when using my plugin TileBitTools. The plugin retrieves and edits TileData (terrain set, terrain and peering bit values) for multiple tiles at a time. After it makes the edits, if there are tiles painted on the tilemap, there is up to a few seconds of lag that appears to be directly related to the number of cells that have tiles. If there are no cells with tiles, there is no lag at all. It does not matter whether the TileData belongs to tiles that are painted on the TileMap. Even if the edits are only to TileData objects for tiles that are not currently painted on the TileMap, the lag occurs. It also does not matter how many TileData objects are edited at once. I have tried manually changing a single terrain value for one tile, and it still causes the lag. I also get the same lag when changing other values not related to terrain.
I am unable to capture this lag in line-by-line profiling in GDScript. Setting and retrieving TileData properties do not appear to be the direct cause of the slowdown, since they take the same time to complete regardless of whether there are tiles on the TileMap. This seems to point to the TileMap responding to the TileData being changed, and possibly performing some updates on each occupied cell, regardless of whether its TileData is changed or not.

An update to my above comment. It looks like the linked PR #74603 was intended to limit updates to cells that are "dirty", which should address this problem. It appears to be superseded by https://github.com/godotengine/godot/pull/81070. I just tried the build artifact from that PR, but I'm still getting the same lag. This happens when there are many tiles on the TileMap, and I edit a TileData property for a tile that is not currently placed on the TileMap. It is difficult to say whether it is less lag than prior as I'm not using a setup with C++ profiling, but, subjectively, it is still a noticeable editor freeze.

I've tested on a topdown game I'm developing, by running on v4.1.1 and on v4.2.dev5
Note: My game has no optimizations... I probably should divide the tilemap into multiple tilemaps and then I should something like VisibleOnScreenEnabler2D to try to hide and show the tilemaps that are visible
Screenshot of comparison below:

I'm using:
Vulkan (Forward+)

V-Sync disabled

Operating System: Pop!_OS 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 6.4.6-76060406-generic (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600 6-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: AMD Radeon RX 6750 XT

The (main) tilemap I'm using is:
Tilemap information

Number of tiles by layer:
layer1 | 8
layer2 |2052
layer3 |1818
layer4 |37290

Total number of tiles (all layers):
41168

(tiles number calculated using VS Code on the tilemap data)

Cell quadrant size = 16px

I was able to debug my case a little bit and it seems to be a separate issue.
In my case the Atlas View is lagging when moving the mouse over the large TileSet in the TileSet panel:

The reason is - every 'draw' cycle the grid is re-drawing all it's rectangles, so it's quadratic of the size of TileSet.
Profiling shows that adding and removing the rectangles eats all the CPU

Disabling the grid redraw here completely solves the lag.
So the 2 ways that I see to fix this are:

redraw TileSet panel including the grid in a more lazy manner instead of on every 'draw' signal
or make a grid of lines, not rectangles (and so it's linear of the size of TileSet)

Though I am new to Godot, so I welcome any ideas on how that should better be fixed :)


If I press back button very fast, onBackPress is ignored.

Let's say app has StackNavigator and there are two stacks S1, S2.
Let's say S1 is my app's base screen. I wrapped AndroidBackHandler on S1 component not to close app when user press back button.
In S1, if I press back button, then onBackPress function works great!
After I push S2, if I press back button, then S2 disappear. If I press back button on S1, then onBackPress function works.
However, after I push S2 screen, then if I press back button twice very fast, then app closed without calling onBackPress function.
I think If I press back button twice very fast, the second back event is triggered before AndroidBackHandler attach didFocus event on S1.

hi, thanks for reporting! can you try subscribing for willFocus instead of didFocus?

@vonovak
It solves the problem. Will it be better if this "react-native-backhandler" package use willFocus rather than didFocus?

@ohjeyong yes please, if you could make a PR for this, that would be nice. thanks

@vonovak I submit pull request. #13  Thanks.


fix style for all pom.xml files

1  keep Apache licenses header consistent, no need to format
2 indent using 2 spaces, not tab
3 clear blank lines

LGTM

@jackylk I am reverting this PR as spark test cases are not running.
@QiangCai I think there is an issue in formatting of java arguments in scala-test plugin. Please fix and raise again.

@ravipesala  I think the issue is about line wrap, I will check and raise again


About the ES indexRefreshInterval

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?
The ES indexRefreshInterval configuration

Bug

Which version of SkyWalking, OS and JRE?
skywalking：6.3.0
OS：cento6
JRE：java8

Which company or project?

What happen?
If possible, provide a way for reproducing the error. e.g. demo application, component version.

Requirement or improvement

Please describe about your requirements or improvement suggestions.
can you support the ES indexRefreshInterval configuration？Like indexRefreshInterval: ${SW_STORAGE_ES_INDEX_REFRESH_INTERVAL:30}

There are configs there
flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:1000} # Execute the bulk every 1000 requests
concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests

I mean about specifying the index refresh interval when creating es indexes, as in the code

Don't understand your meaning.

I configured "indexRefreshInterval: ${SW_STORAGE_ES_INDEX_REFRESH_INTERVAL:30" in the skywalking application.yml. Want to the refresh cycle to create an es index is 30s, but the refresh cycle to actually generate an es index is 3s.
{
"service_relation_server_side-20191105": {
"settings": {
"index": {
"refresh_interval": "3s"
}
}
}
}

Do you delete the existing template? This is an ES template parameter. Check StorageEsInstaller#createTable


unexpected EOF while parsing error caused by Function comments

Environment data
VS Code version: 1.32.3
Extension version (available under the Extensions sidebar): Python 2019.3.6558
OS and version: Windows 1709
Python version (& distribution if applicable, e.g. Anaconda): Ptyhon 3.7.3
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
Relevant/affected Python packages and their versions: matplotlib
Expected behaviour
I am writing a simple function in VSCode in Python:
def update_date_column_type(df, column_name=None):
    """update date column to type datetime"""

    df_columns = pd.DataFrame(df.columns)
    df_columns.columns = ['column_name']
    df_columns_date = (
        df_columns[df_columns['column_name'].str.contains('Date', case=False)]
    )
    df_columns_date.append(column_name)

    for column in df_columns_date:
        df[column] = pd.to_datetime(df[column])
        print(column + 'is converted')

    return None

Did a run in Jupyter, and everything worked fine:

Actual behaviour
I tried to run it in VSCode but received the following error message:

After removing the comments, it works OK:

Steps to reproduce:
import numpy as np
import pandas as pd

def update_date_column_type(df, column_name=None):
    """update date column to type datetime"""

    df_columns = pd.DataFrame(df.columns)
    df_columns.columns = ['column_name']
    df_columns_date = (
        df_columns[df_columns['column_name'].str.contains('Date', case=False)]
    )
    df_columns_date.append(column_name)

    for column in df_columns_date:
        df[column] = pd.to_datetime(df[column])
        print(column + 'is converted')

    return None

Hmm, I'm not reproing.

How did you run the code? Did you use a cell marker, or selection and shift+enter?

I don't have this in my VSCode.

When I run it, I just select and hit "shift + enter"

What did you select? It works for me with selection too, but maybe we selected different parts.
I did it like so:

Not sure about how to do GIF, but I selected the same region with you.

Ah, I read your version number wrong. You have a very old version. This has since been fixed.
The current python extension version is this:

We used to have a problem with multiline comments.

Thanks for the input.

Thanks a lot! Didn't notice my VSCode is out of date. Updated everything and it works great now!


File handle leak

When I leave the server up overnight it fills up the filesystem /var/run which I'm using as the working directory.  The cause is twofold:

there doesn't seem to be any log rotation going on and the server emits a "pass" log message quite frequently
after awhile, stack traces are reported in the log file "OSError: [Errno 24] Too many open files"

I suspect some files might not be getting closed?  I haven't thoroughly reviewed the code to see if I can spot these.
From dramatic_worker.log:

Traceback (most recent call last):
File "/usr/share/venv/pypi/lib/python3.8/site-packages/dramatiq/worker.py", line 470, in process_message
File "/usr/share/venv/pypi/lib/python3.8/site-packages/dramatiq/actor.py", line 145, in call
File "/usr/share/venv/pypi/lib/python3.8/site-packages/private_pypi_core/workflow.py", line 272, in sync_local_index_job
wstat = build_workflow_stat(
File "/usr/share/venv/pypi/lib/python3.8/site-packages/private_pypi_core/workflow.py", line 122, in build_workflow_stat
backend_instance_manager.load_pkg_repo_configs(pkg_repo_config_file)
File "/usr/share/venv/pypi/lib/python3.8/site-packages/private_pypi_core/backend.py", line 288, in load_pkg_repo_configs
File "/usr/share/venv/pypi/lib/python3.8/site-packages/private_pypi_core/utils.py", line 25, in read_toml
with open(path) as fin:
OSError: [Errno 24] Too many open files: '/etc/pypi/pypi.toml'

The repository specific log spits out similar stack traces.
Versions:
private-pypi        0.2.0
private-pypi-core   0.2.0
private-pypi-github 0.2.0

Thanks for the feedback. I'm looking into it.
All the explicit uses of file handles are guarded by the context manager (the with xxx statement), so I don't think that part was an issue. I'm looking into the implicit uses, i.e. the logging.FileHandler.
Have setup a server try to reproduce the situation.

This might be relevant...my systemd file contents:

[Unit]
Description=Private PyPI Server
Requires=network-online.target
After=network-online.target

[Service]
Restart=on-success
ExecStart=/bin/sh -c 'source /usr/share/venv/pypi/bin/activate && private_pypi server /var/run/pypi --config /etc/pypi/pypi.toml --admin_secret /etc/pypi/pypi-secret.toml --port 8888'
[Install]
WantedBy=multi-user.target

@jimrigsbee have a rollout in pywharf==0.2.3 with the bugfix.

@jimrigsbee Could you help verify the fix?

Has it been packaged as private-pypiserver yet?  I've been installing under that package name.

Cannot do that (See https://github.com/pywharf/pywharf/issues/6).

Understood. I see the renamed package in the PyPI index now.  I'll try installing that.


chore(website): add support for overWriteHashCode for C# in playground

Description
add support for overWriteHashCode for C# in playground
Related issue(s)

Resolves #1178

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 92.404%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
4732

Relevant Lines:
4991

💛  - Coveralls

hey @jonaslagoni need your help in this 😅

Try build the website locally, should give you an error @sambhavgupta0705 🙂

got these errors

Remember to run npm run build:modelina


Missing points at the last buffer

To start off, thank you so much for the great tool, erikd!
But I have found an issue and, after some trials-and-errors, came up with a simple solution. I would like to share---
When src_process is called multiple times with a connected set of buffers, the last half_filter_chan_len points from the input buffer are not processed. In other words, you will lose these data points (which was 47 samples when I tried with SRC_SINC_MEDIUM_QUALITY, see below). This is because the while loop on line 375 in src_sinc.c breaks when filter->out_gen equals filter->out_count. Logically it makes sense, except that it should further generate output (half_filter_chan_len points more) for the very last buffer, because the processing of the very first buffer was done for filter->out_count MINUS half_filter_chan_len.
To resolve this issue, I am simply changing line 375 to while (1) and let the separate termination check do the work (lines 390 and 393).  And I am making sure, in my application, to allocate the data_out buffer big enough to absorb this in addition to the expected output buffer size.
The same logic should apply to other functions--sinc_stereo_vari_process, sinc_quad_vari_process, sinc_hex_vari_process, and sinc_multichan_vari_process, but I'm not using them and I can't check this issue in these functions. I would let others do it. But this change works well for my application, auxlab, so I'm using my own hacked version of libsamplerate for auxlab for now (as of 3/20/2019).
The easiest way to replicate the issue is the following:
float * buffer_in = (float*)calloc(sizeof(float), 10000); // input buffer size is 10000 points
float * buffer_out = (float*)calloc(sizeof(float), 10000); // output is the same size; testing src_ratio = 1
// prepare the buffer
int errcode;
SRC_STATE* handle = src_new(SRC_SINC_MEDIUM_QUALITY, 1, &errcode);
SRC_DATA data;
data.src_ratio = 1;
data.data_in = buffer_in;
data.data_out = buffer_out;
data.input_frames = 5000; // half the buffer
data.output_frames = 5000;
data.end_of_input = 0;
errcode = src_process(handle, &data); // processing the first half
//after the call,
//data.input_frames_used was 5000 but
//data.output_frames_gen was 4953, which is 5000 minus half_filter_chan_len in src_sinc.c
data.data_in = buffer_in + data.input_frames_used ;
data.data_out = buffer_out + data.output_frames_gen;
data.end_of_input = 1;
errcode = src_process(handle, &data); // processing the second half
//Now you get
//data.input_frames_used would be still 5000 (i.e., all input buffer has been read)
//data.output_frames_gen would be 5000. And, this is not right. We should have gotten 5047 points.

This hack will get you all the output data, without missing the last 47 points.
Hope this helps.

I assume this is the change you are talking about:
diff --git a/src/src_sinc.c b/src/src_sinc.c
index 6b465a7..6379ea0 100644
--- a/src/src_sinc.c
+++ b/src/src_sinc.c
@@ -372,7 +372,7 @@ sinc_mono_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data)
        terminate = 1.0 / src_ratio + 1e-20 ;

        /* Main processing loop. */
-       while (filter->out_gen < filter->out_count)
+       while (1)
        {
                /* Need to reload buffer? */
                samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ;

With that change, the test suite fails with a segfault.

Hmm... A quick fix is not a good fix, I guess.
Then, I would appreciate a proper way to address this issue.
Or, was there anything I missed? Perhaps was I calling src_process a wrong way? That is possible because I had to do a lot of guesswork while using it.

I am still unconvinced that there even is an issue.
The tests and the example code in this repo show how to used src_process.

@bjkwon I was having the same problem and it seems that you are supposed to call src_process one more time, after sending the last block of input data, with input_frames = 0. This returns the last few missing samples.

Yes, as @Ashymad says, you are supposed to keep calling src_proccess with zero input samples and the end_of_input field set to 1 until you get not more output samples.
The examples do this.


Cannot terraform a Notion source using a start_date with zero fractional seconds

Notion's start_date parameter is validated by validators.IsRFC3339(), allowing the fractional seconds representation (.###) to be omitted. When configuring a Notion resource via airbyte_source_notion , if I specify the start date in any format with zero fractional seconds,
2023-01-01T00:00:00.000Z (explicit 0 fractional seconds)
2023-01-01T00:00:00Z (no fractional seconds)
the API request errors with
│ {"type":"https://reference.airbyte.com/reference/errors#unprocessable-entity","title":"unprocessable-entity","status":422,"detail":"The
│ provided configuration does not fulfill the specification. Errors: json schema validation failed when comparing the data to
│ the json schema. \nErrors: $.start_date: does not match the regex pattern
│ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$ "}

In the case of explicit 0 seconds, whatever is processing/formatting data for the request is dropping the fractional seconds:
terraform plan
  # airbyte_source_notion.notion will be created
  + resource "airbyte_source_notion" "notion" {
      + configuration = {
          + credentials = {
              + source_notion_authenticate_using_access_token = {
                  + auth_type = "token"
                  + token     = (sensitive value)
                }
            }
          + source_type = "notion"
          + start_date  = "2023-01-01T00:00:00.000Z"
        }
      + name          = "My Notion Source"
      + source_id     = (known after apply)
      + source_type   = (known after apply)
      + workspace_id  = (sensitive value)
    }

request body
{
  "configuration": {
    "credentials": {
      "auth_type": "token",
      "token": "..."
    },
    "sourceType": "notion",
    "start_date": "2023-01-01T00:00:00Z"
  },
  "name": "My Notion Source",
  "workspaceId": "..."
}

Specifying any other valid value of fractional seconds has worked for me. Likely worth noting the UI for creation a Notion source requires the fractional seconds, even when it's all 0s.

Having the same issue with Aircall source using provider 0.4.1.

Same with S3 source using provider 0.4.1


Feature: HTML to Coffeekup converter

It would be practical to have a HTML to Coffeekup converter just like http://js2coffee.org/ could be used to convert into both directions.
That would simple large HTML conversions.

I maintain one here: https://github.com/brandonbloom/html2coffeekup

No hosted one? =)

I've documented the API & it shouldn't be too hard to get running in the browser. Feel free to contribute :-)

Alright! =)

I made one: http://html2coffeekup.no.de/


z: init at 1.11

Adds https://github.com/rupa/z.

Before this is merged by someone (not me) you will need to squash the commits to one and use a correctly formatted commit message header like: z: init at 1.11

I hadn't heard of autojump before. It seems to be pretty much the same thing. Maybe I should close this in favor of that?

@jD91mZM2 Even if this is doing something close to autojump, if you prefer z, we can integrate it.

I actually just switched to using autojump myself lol

@jD91mZM2 oh ok :/
Could we then close this PR?

I think we can include it, add me as maintainer please

@marsam Add or replace?

I'm fine with either :)

I just realized that z doesn't have a license, and would thus have to be marked as unfree :/. Closing in favor of autojump.


How to know whether timeout happened?

When calling .with_timeout(some_duration) on a RusotoFuture, how can I know from the RusotoError whether or not this timeout happened? Can I assume that HttpDispatchError is a timeout error?
I'm implementing retry and if timeout was reached, I might need to increase timeout on the next attempt.

That assumption looks right. We map timeouts to HttpDispatchError. 👍

Looking at the code, it doesn't really seem like one can assume that an HttpDispatchError is a timeout error? It is constructed in 3 different places.

That's correct, the error is constructed in a variety of places and mean different things. Really a catch-all.
I wonder how hard it would be to add another error type like HttpDispatchError to represent a timeout to make it clear what happened and the retry code easier to understand. Otherwise we'd have to inspect the message inside the HttpDispatchError and decide from there. Better to lean on Rust's awesome type system. 😄


Build does not correctly set permissions on the nginx conf directories

Environment details:

build

Steps to reproduce the issue:

Try and build not using a root user
Build will fail.

Provide the expected results and outputs:
TASK [nginx : copy template from local to remote in nginx config directory] ****
Thursday 03 May 2018  20:55:55 +0000 (0:00:00.208)       0:01:02.518 **********
fatal: [<IP_ADDRESS>]: FAILED! => {"changed": false, "checksum": "021bfc3c885e8190fc71f45f0e25238337a68ca9", "failed": true, "msg": "Destination /tmp/wskconf/nginx not writable"}

Destination /tmp/wskconf/nginx not writable

Provide the actual results and outputs:
Build should not fail.
Exit 0

Additional information you deem important:

always if you run as non-root.

I ran into something similar where I left the nginx container running and then did sudo rm -rf /tmp/wsk* in my.  Docker recreated the wskconf and wskconf/nginx directories, but did so with root ownership and 0744 permissions.  I suspect you may have encountered something similar, and this may not help.
Order of operations to be sure:

'docker kill $(docker ps -q)'
'sudo rm -rf /tmp/wsk*'
Retry the build you were working on.

You're right actually but my problem was slightly different. I was having other issues with the "become" statements with /tmp/whiskconf and I set all the *_dir_become variables for my environment to true assuming non root would always need that and that was creating the incorrectly permissioned directory.


[Bug] When notepads has no focus clicking and dragging to select test does not work

Describe the bug
When notepads has no focus clicking and dragging to select text does not work only focuses the app.
To Reproduce
Lose focus on the app. Then click on it and try to drag the cursor to mark the text.
Expected behavior
The expectation is to get focus and also mark the text.
Desktop (please complete the following information):

OS: Windows latest
App Version: <IP_ADDRESS>

I just have tested the bug that you described and indeed it I can reproduce it. Right now, I don't know how the bug could be fixed.

I just discovered this is an existing issue with both the TextBox and RichEditBox controls. The relevant issue is here. On the other hand, this was already reported here. As such, I would like to ask you to close this issue because it's a duplicate of the other one.


Notebook is broken: Not able to open

Unreadable Notebook: /Users/mangeshpatankar/Documents/2018/Q2_2018/callforcode/city/pixiedust-traffic-analysis.ipynb NotJSONError("Notebook does not appear to be JSON: '\n\n\n\n\n\n\n<html lang...",)

What did you use to open the notebook? I tried with a plain old jupyter-notebook command and it loaded.
smartinelli-mac workspace $ jupyter-notebook pixiedust-traffic-analysis/notebooks/pixiedust-traffic-analysis.ipynb
[I 23:23:25.039 NotebookApp] Serving notebooks from local directory: /Users/stevemar/workspace/pixiedust-traffic-analysis/notebooks
[I 23:23:25.039 NotebookApp] 0 active kernels
[I 23:23:25.039 NotebookApp] The Jupyter Notebook is running at:
[I 23:23:25.039 NotebookApp] http://localhost:8888/?token=foo
[I 23:23:25.039 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 23:23:25.040 NotebookApp]

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=foo
[I 23:23:25.179 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[W 23:23:25.734 NotebookApp] Notebook pixiedust-traffic-analysis.ipynb is not trusted
[I 23:23:26.258 NotebookApp] Kernel started: af669ec7-8d40-47c2-8033-44f214f5c54e
[I 23:23:27.178 NotebookApp] Adapting to protocol v5.1 for kernel af669ec7-8d40-47c2-8033-44f214f5c54e

Closing this as cannot reproduce. I can open the notebook, and it seems to be valid json.


Static output image size distorts executed output images

Describe the bug
When you have notebooks that are not executed ("execution_mode": "off") and notebooks that are executed, following images can be distorted.
This happens when the executor that was used for the static notebook has saved the size of embedded images:
{
 "data": {
  "image/png": "..."
  "text/plain": [
   "<IPython.core.display.Image object>"
  ]
 },
 "metadata": {
  "image/png": {
   "height": 100,
   "width": 500
  }
 },
 "output_type": "display_data"
}

The image size persists onto all following notebooks or cells that are executed by MyST-NB. This does not happen with jupyter lab or nbsphinx.
Reproduce the bug

Extract the attached docs.zip folder or create a conf.py:
exclude_patterns = ["_build", "jupyter_execute"]
extensions = ["myst_nb"]

and an index.md:
```{toctree}
example <example.ipynb>
```

and the attached notebook file.

Build documentation: sphinx-build -b html docs docs/_build

You might see something like this:

List your environment
(The Github template contains a mistake in the environment command, this project is not jupyter-book, but myst-nb.)
$ pip freeze | grep -E "myst-nb|Sphinx"
myst-nb==1.1.0
Sphinx==7.2.6

Without having looked at the code, I think it could be a static class variable that should be an instance variable.


Android app: allow downloads of pre-generated key/certificate onto Android app (like CLI clients)

The current setup process of Android app is drastically different from other clients: you have to generate the certificate based on the key shown in the app, it is really inconvenient.
Please let us load both public key and certificates which can be pre-generated and distributed to Android users.

I agree with this, it is annoying for me as well

The repo for this is https://github.com/DefinedNet/mobile_nebula


Problem in the training of seg

In the part of seg , I've got the dataset ready ,but when i run the code ,there is still something wrong.
How can i solve it ,thank you

I think there is something wrong with your dataset path. Please make sure your dataset is in /data.

Thanks,


Issue with outputs.assets

Hi everyone, I'm running this simple workflow to understand well how this action works:
name: Test

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: windows-2019
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Build
        run: echo ${{ github.sha }} > Release.txt

      - name: Test
        run: cat Release.txt

      - name: Release
        id: release
        uses: softprops/action-gh-release@v1
        with:
          files: Release.txt
          tag_name: ${{ github.ref_name }}

      - run: |
          echo ${{ steps.release.outputs.url }}
          echo ${{ steps.release.outputs.id }}
          echo ${{ steps.release.outputs.upload_url }}
          echo ${{ steps.release.outputs.assets }}

windows-2019 is a constraint of my future application,
This workflow creates the new release and print all the outputs except steps.release.outputs.assets.
Any idea on why?

I was also noticing this. I was trying to use an asset that I had uploaded, but .assets is returning nil.
run: echo ${{ toJson(steps.release.outputs.assets) }} would result in a line like this: echo null

This may be because the assets work is not part of the latest bundled release (Neither is append_body, which also doesn't work in the action right now), but I do not know for certain if that is what is happening here.

Using   uses: softprops/action-gh-release@HEAD seems to work, though this comes with all the normal concerns about pulling dependencies directly from the development branch!

@alxjrvs you can probably reference a specific commit hash

Just had the same issue, and it took me a while to realize the JSON parsing error was coming from that:
The template is not valid. .github/workflows/deploy.yml (Line: 58, Col: 12): Error reading JToken from JsonReader. Path '', line 0, position 0.

As mentioned, using the latest or a commit hash solved it:
    - name: Release
      id: release_pub
      # at this time of writing, the latest version does not contain the assets
      # output
      uses: softprops/action-gh-release@cd28b0f5ee8571b76cfdaa62a30d51d752317477

Diff:
https://github.com/softprops/action-gh-release/compare/cd28b0f5ee8571b76cfdaa62a30d51d752317477...v1


how to connect correctly to NDN-DPDK

As you mentioned:

receive interest and transmit data

So it's a producer.
The producer component of NDNts-video is in yoursunny/NDNts-video-server.
Specifically, the serve subcommand.
If you want to connect NDNts-video-server to NDN-DPDK forwarder, you can replace await openUplinks(); with something like:

// at top of the module; of course, you need to install this package first
import { openFace } from "@ndn/dpdkmgmt";

// in place of `openUplinks()`
await openFace({
  localHost: "<IP_ADDRESS>", // IPv4 address of the NDNts-video-server container
  gqlServer: "http://<IP_ADDRESS>:3030", // GraphQL endpoint of NDN-DPDK
});

The consumer component of NDNts-video only runs in a browser.
Browsers can only communicate via WebSockets and HTTP/3 (WebTransport), but neither is supported in NDN-DPDK.
Therefore, it would not work with NDN-DPDK.
NDN-DPDK is designed to provide high aggregate throughput: you can have hundreds of hosts each running NFD/YaNFD along with applications, and they all connect to a router powered by NDN-DPDK.
While NDNts and NDNgo can enable applications connect directly to NDN-DPDK, neither library would unlock the full potential throughput of NDN-DPDK.
You might get 1~5 Gbps out of these libraries (not benchmarked!), but if you want to run a large video site, you'll need to invest in your own library, using the existing libraries as a reference.

I already prepare ndn/dpdkmgmt
but I am not shure about the parameter for:
localHost: "I choose the IPv4 address for eth0 ", // IPv4 address of the NDNts-video-server container
gqlServer: "http://<IP_ADDRESS>:3030", // GraphQL endpoint of NDN-DPDK

If NDN-DPDK and NDNts are both running on the host system (not in a container):

gqlServer: <IP_ADDRESS>
localHost: <IP_ADDRESS>

If NDN-DPDK is in a container, but NDNts is in the host system:

gqlServer: container's IP address
localHost: IP address of the host system's network adapter; you can find this by docker network inspect bridge | jq -r '.[].IPAM.Config[].Gateway' (if you are using a custom Docker network instead of the default, substitute "bridge" with Docker network name)

If both are in containers:

gqlServer: NDN-DPDK container's IP address
localHost: NDNts container's IP address
Both containers must be in the same Docker network (either the default bridge network or a custom network).

I just did some updates in NDNts (commit https://github.com/yoursunny/NDNts/commit/10ed9fa0ebcc675a4fb719a1caa00e171bead35c).

NDN-DPDK connection is integrated into the @ndn/cli-common package
localHost option is no longer needed, except the rare case that NDNts side is behind NAT or has unusual firewall settings

No code modification is needed to connect to NDN-DPDK from a NDNts app that uses @ndn/cli-common package.
If NDN-DPDK and NDNts are both running on the host system, all you need is one environment variable:
NDNTS_UPLINK=ndndpdk:

If NDN-DPDK is in a container and NDNts is running on the host system, you need another environment variable:
NDNTS_NDNDPDK_GQLSERVER=http://<IP_ADDRESS>:3030
# refer to "NDN-DPDK Docker container" page on how to find the correct IP address

You may write the environment variables into .env file.

Ok I will try it.
How to prepare NDNts for livestream using chunks to transmit media-sources.

livestream

NDNts-video-server is a repository for recorded videos.
It cannot do livestream.
For live stream, you need NDNts-homecam.
https://homecam.ndn.today
(it's quite finicky since the last update;  recommend Firefox browser)

Ok, I will firstly test it just with to transmit video-files

Another question is NDNts-homecam compatible to NDN-DPDK?

is NDNts-homecam compatible to NDN-DPDK?

No, it's a web application that runs in browser.

Yes right as you mentioned that its not possible to connect Browser with NDN-DPDK

Could I just use the code you have given on usage, because I want transmit video by smaller chunks

Could I just use the code you have given on usage

Of course you can.
The serve subcommand starts a producer.
All other commands interacts with the database only, and does not have networking.
You need a consumer separately.

I am not so clear about, what represents a DataTape (of local video) exactly?

what represents a DataTape

DataTape is a file or stream that consists of a sequence of Data packets. As a file type, DataTape may be used to transfer packets between repo instances.
https://ndnts-docs.ndn.today/typedoc/modules/repo_api.html

Ok thanks


Block->ommers: resolve into EthqlBlocks

Support the following:
{
  block(number: 5000000) {
    ommers {
      hash
      transactionCount
      transactions {
        hash
      }
    }
  }
}

Make sure that the transactionFilter and the block fetch hints (log and transactions) work properly.

Ommers won't have transactions, correct? See example ommer.


Fix .version() API inconsistency

This pull request changes the version() API to solve the inconsistency as raised by @bcoe in #329

@maxrimue this is looking great, one thing I noticed ... this means that:
.default(key, value, [description])

Is inconsistent with the rest of the API too ... description should probably be the second value right?

testing GitHub integration, CC: @nexdrew, @Irina perhaps you could give @maxrimue some feedback too.

@bcoe Yes, I think so too, description should be the second value as some other functions also accept descriptions as their second parameters

I think I need a bit more time with the codebase before I make reasonable code comments. Give me a bit more time ^.^
Did have a question about the reason for keeping description as second argument. I've normally seen args "snowball" their way down; e.g. :

if 1 arg -- opt
if 2 arg -- opt, version
if 3 arg -- opt, version, desc
etc etc etc

Do we just have other pieces of code taking description as 2nd ?

@lrlna Yes, this pull request is just for providing consistency. I think the reason for why we don't have that snowball effect here is that different functions would require different orders, causing inconsistencies, which could cause confusion among people using this module

@maxrimue cool -- thanks for clarifying!

@bcoe I made it more readable now, what do you think? Is the else path maybe too much?

I like this.
But, just to get this out off my chest, it feels wrong to make this breaking change for such a trivial thing in the name of consistency - without a way to deprecate or account for the old usage. I mean, we could just add another method, though that would leave the API inconsistency intact.
Ok, now that that's out of the way, carry on. :+1:

As this represents the first breaking change to the API, I'd like to suggest that we add a new section to the CHANGELOG that documents known breaking changes b/w 3.x and 4.x, with notes on how to upgrade.
Maybe something like this:
4.x Breaking Changes

PR #330: .version() method now expects the version argument to be last instead of first.
Example: change .version('1.0.0', 'v', 'Print app version') to .version('v', 'Print app version', '1.0.0')

@maxrimue this is looking great, just a couple more comments -- we should also make sure to open up a ticket to track @nexdrew's suggestion of defaulting to the version in package.json. This might be a great next ticket for you to tackle @maxrimue :smile:

@nexdrew I agree, but how do you feel about landing a bunch of our proposed breaking changes on the 4.x branch -- move forward in one slightly painful jump.

@bcoe Yes, I totally agree we should be merging these changes to the 4.x branch. I just want to make sure we document the known breaking changes so, when we start to publish 4.x versions, our users have a clear migration path. E.g. "here's what we changed" and "here's what you need to do to upgrade".

Not sure if we have a mantra or guiding principle for 4.x, but in my eyes it should be something like:
Make the existing features easier, less verbose, more consistent. And add some new cool features.
Quite possible that's too obvious or simplistic, but having a "statement of objective" might help us measure the value of ideas.
E.g. if this is something I can do in 3.x, is it now "easier" (to do or understand), "less verbose" (requires fewer keystrokes), or "more consistent" (works the same way as other parts of the API) in 4.x? If the answer is yes to 2/3 or greater, then adopt. If 1/3 or less, then drop it.
Granted, the answers will not always be a clear "yes" or "no", and they may heavily depend upon the use-cases, but a warped yard stick is better than no yard stick, right?

Great work @maxrimue.


documentation for end-user authencation on ingress-gateway

add documentation for https://github.com/istio/istio/pull/5886

/cc @diemtvu

thanks @rcaballeromx, could you pls help to take another look ? (the failure in circleci isn't caused by this PR)

@quanjielin: PR needs rebase.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

thanks @rcaballeromx for the detailed review !


Incorrect permissions on /opt/homebrew-cask and subfolders

When installing the java7 cask, I bumped into permission errors on /opt/homebrew-cask folder and subfolders.
STDERR: Error: Permission denied - /opt/homebrew-cask/Caskroom/java7
This folder structure was owned by root, not the Homebrew owner.
Looking at the Pivotal Sprout Cask recipe, I noticed they set the permissions on this folder explicitely to the Homebrew owner, in their case the current user.
The cask recipe needs to be extended with a similar setup. I validated manually that setting the permissions on the folder fixed the installation process of the cask.

+1 on having /opt/homebrew-cask/Caskroom managed by this repo. Ran into this issue and overriding ['home-brew']['owner'] does not fix the problem for me.


[Anchor-201] Update OpenAPI spec

PR Checklist
PR Structure

[ ] This PR has reasonably narrow scope (if not, break it down into smaller PRs).
[ ] This PR avoids mixing refactoring changes with feature changes (split into two PRs
otherwise).
[ ] This PR's title starts with name of package that is most changed in the PR, ex.
paymentservice.stellar, or all or doc if the changes are broad or impact many
packages.

Thoroughness

[ ] This PR adds tests for the most critical parts of the new functionality or fixes.

What

Updating OpenAPI specs
Matching order of OpenAPI in the code

Why
To better reflect schema of GET response and better rendering in the documentation
Known limitations
N/A

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

@lijamie98 I can submit separate pr for formatting and rebase this one.

Something went wrong with PR preview build please check

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

Something went wrong with PR preview build please check

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

Something went wrong with PR preview build please check

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/

Reference Server Preview is available here:https://anchor-ref-pr800.previews.kube001.services.stellar-ops.com/SEP Server Preview is available here:https://anchor-sep-pr800.previews.kube001.services.stellar-ops.com/


Spawning editors

Hi,
Thanks for the awesome project!
Question: how to properly start subcommand with reuse of Stdout/Stdin?
I'm doing it like so:
https://github.com/antonmedv/llama/blob/58c042eb06a5a661a1388beb4ac09cedf2764ad0/main.go#L183-L190
func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	if m.editMode {
		return m, nil
	}

				cmd := exec.Command(lookup([]string{"LLAMA_EDITOR", "EDITOR"}, "less"), filepath.Join(m.path, m.cursorFileName()))
				cmd.Stdin = os.Stdin
				cmd.Stdout = os.Stdout
				// Note: no Stderr as redirect `llama 2> /tmp/path` can be used.
				m.editMode = true
				_ = cmd.Run()
				m.editMode = false
				return m, tea.HideCursor

But what to do if a redraw is needed after cmd exits?  And is there a better way to halt the program until cmd is exited?
Thanks.
Originally posted by @antonmedv in https://github.com/charmbracelet/bubbletea/discussions/170

Hi! Your code's pretty close. As a rule, you'll want to move all long running code into a tea.Cmd, which runs in a goroutine internally. tea.Cmds return a message when finished, which trigger an update and turns triggers a redraw. So I'd do something roughly like this:
type editingFinished struct{}

func openEditor(app string, args ...string) tea.Cmd {
	return func() tea.Msg {
		cmd := exec.Command(app, args...)
		cmd.Stdin = os.Stdin
		cmd.Stdout = os.Stdout
		_ = cmd.Run() // blocks until finished
		return editingFinished{}
	}
}

func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	if m.editMode {
		return m, nil
	}

	switch msg := msg.(type) {
	case tea.KeyMsg:
		switch msg.String() {
		case "e":
			m.editMode = true
			return m, tea.Batch(
				tea.HideCursor,
				openEditor(lookup([]string{"LLAMA_EDITOR", "EDITOR"}, "less"), filepath.Join(m.path, m.cursorFileName())),
			)
		}
	case editingFinished:
		// This will trigger a redraw.
		m.editMode = false
		return m, nil
	}

}

Nice work on  llama, by the way! We actually added tea.HideCursor for exactly your use case.
And, let us know if you have any more questions.

Thanks a lot! 🔥

For some reason, this approach does not work. And from example, vim and tea outputs get messed up. Can't figure out why. Trying to implement it in llama.

Saw your other issue. It's probably unrelated to the above approach and in the end (once we figure it out) you'll mostly likely need to move stuff back into a command (illustrated above) in order a trigger a repaint.

I also have the same issue when trying to open a file to edit via vim and then back into the app, the output gets messed up even after triggering a command to cause a repaint

Probably, the right approach will be to use PTY.

I've looked into this one a little bit. No conclusions yet, but my hunch says we'll need to introduce some functionality into Bubble Tea (likely by way of Cmds) to do this properly. A few notes so far:

Opening Vim by blocking in Update is reliable for me so far. If Bubble Tea is using the altscreen the Bubble Tea view does not repaint after exiting Vim, even when returning a command like tea.HideCursor.
Opening Vim via a tea.Cmd results in very poor performance in Vim, an occasional input errors. For this approach to work Bubble Tea will likely need some additional functionality to effectively "pause" portions of the runtime. Opening dedicated TTYs for input in both Bubble Tea and Vim did not help.
When using the alt screen in Bubble Tea, redraws did not occur after exiting Vim, even when requesting to re-enter via tea.EnterAltScreen.

Here's an example program I've been testing with.
@knipferrc and @antonmedv: if it's convenient, I'd love to see a screenshot of the garbled output you're describing after closing Vim. I'm not able to reproduce that on my end so far.

Sure thing. Here is what I see once I start Vim in a command

I tried to integrate github.com/creack/pty but this is quite difficult, we can't just io.Copy, and need to get part of UI as a string.

Hi everyone 👋,
Just wanted to chime in and hopefully give some useful pointers.
This discussion is quite similar to one in tcell, another TUI framework which is also written in Go and had the same issue with running subcommands.
Long story short: tcell had a similar issue which was eventually fixed here. I wish I could be more helpful than just refer to the ticket (most of the implementation goes over my head), but I hope that the implementation  can be useful for Bubble Tea.
(Btw, Bubble Tea is really great, I have been eagerly awaiting for this subcommand feature to see of I can replace the current TUI in clx)

I successfully opened vim according to the example, but after vim exited, I received a keymsg:

It looks like this button appears in the standard input after the execution of vim is complete; I don't know what caused it.
@meowgorithm Do you have any suggestions?

I also wanted to provide some updates on this issue. We're narrowing this ticket to be specific to spawning editors from within Bubble Tea (versus any sub-process), because most other processes (both blocking and non-blocking) can be currently handled fine in a tea.Cmd.
Anyway, this is something we'd like to officially support in Bubble Tea. There are essentially two things to tackle:

Spawning editors that block in the Terminal, such Vim. This is an easier case to handle because editors that live in the terminal will block until finished, so it's mostly just a matter of providing what will probably be a special tea.Cmd to handle editor spawning and cleanup.
Spawning editors that don't block, such as opening a file in VSCode. This is a more difficult case because it requires file-watching, which comes with a lot of pitfalls, particularly os-specific ones.

In the meantime, for those interested in spawning in-terminal editors like Vim (@antonmedv, @mritd, @knipferrc) I recommend taking a look at edist, which seems to has, albeit hacky, solution. In particular this file illustrates the implementation and there are some detail on some pitfalls in PR#1.

Hello, a few insights that might be helpful :)
I tried to run your example program in several environments (all Linux based):
With kitty (https://sw.kovidgoyal.net/kitty/)

opening vi:

some keys have no effect (are "swallowed"). E.g. pressing 'i' twice doesn't display anything. Only happens when vi has just been opened.
doesn't crash
cursor OK

opening neovim (nvim):

some keys swallowed but harder to reproduce than in vi
regularly crashes with
Error running program: read /dev/stdin: resource temporarily unavailable exit status 1 (not always but roughly 1 time out of 3)
cursor OK

opening vim:

some keys have no effect (same as vi)
no crashes
cursor OK

With neovim in kitty (opening a term in neovim with :terminal, then running the example, so we have vi, vim or nvim in nvim)

opening vi:

some keys have no effect (same as vi)
no crashes
no cursor displayed in vi, cursor reappears when back to the shell

opening neovim:

some keys swallowed but harder to reproduce than in vi
regular crashes related to stdin
cursor OK

opening vim:

some keys swallowed but harder to reproduce than in vi
no crashes related to stdin
cursor OK

It seems that the "swallowed" keys are interpreted by bubbletea. E.g. typing q at as your first key will sometimes lead to exiting the go program as soon as vi exits.
I tried the same experiments with xterm and the results were consistent with those above.
All these tests have been run with "vim/nvim -u NONE" to limit the influence of my vim config.
Thank you for your work on the charm projects, they are very fun to use :)

I've just posted a draft PR that adds program.CancelInput and program.RestoreInput, as well as a little example demonstrating how to launch an editor.
While the PR is not ready to merge just yet, I'd love to hear your feedback: does it fix the swallowed keys issue and stdin crashes/errors for you? (it does for me)

Yes, using the exec-cancelreader branch does fixes all crashes and swallowed keys, in each of the situations described above. Thanks a lot :)

Yes, using the exec-cancelreader branch does fix all crashes and swallowed keys, in each of the situations described above.

Thanks for the feedback! I'll clean this PR up a bit and we'll merge this soon!

@muesli has there been any progress on this front? I'd love to use bubbletea in a project I'm speccing out right now, but this would be a blocking issue. Thanks!

@muesli has there been any progress on this front? I'd love to use bubbletea in a project I'm speccing out right now, but this would be a blocking issue. Thanks!

Yep, we're actively working on this, see PR #237.

Hey everyone! This is now available in master and will be available in the next release. For an example on how to use this new feature have a look at this example.

Thanks a lot for your awesome library!


fix linting error: printf-style function with dynamic format string and no further arguments should use print-style function instead

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.84%. Comparing base (5096c4d) to head (eab0a85).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #60   +/-   ##
=======================================
  Coverage   87.84%   87.84%
=======================================
  Files           6        6
  Lines        1111     1111
=======================================
  Hits          976      976
  Misses         69       69
  Partials       66       66

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

t.Fatalf requires a string as it's a wrapper for sprintf
But t.Fatal accepts ...any
https://pkg.go.dev/testing#F.Fatal
So in addition of replacing t.Fatalf(err.Error()) by t.Fatal(err.Error())
You could have used directly t.Fatal(err)
Fatal uses fmt.Sprintln
https://cs.opensource.google/go/go/+/refs/tags/go1.23.1:src/testing/testing.go;l=1080
fmt.Sprintln will call the .Error()

@ccoVeille Ahhh. Thanks for that tip!


CIT pack not working

For the life of me I cannot get the maeflower cit pack (https://www.planetminecraft.com/texture-pack/maeflowers-cit-pack/) to work. I've tried everything I could think of and can't figure out if its the pack itself or if its just plain not compatible for one reason or another. I've even tried comparing to other CIT pack such as moondrop, minituria, and mizunous and found that the json files and properties are nearly identical with only some differences. Im new to this whole cit pack thing with resewn so perhaps it was something I overlooked but its driving me insane, mainly not knowing if its a problem with the pack or citresewn...

Hey the problem seems to be with the pack itself, many of its files contain spaces which is not supported (only supported with optifine because of a bug iirc)
I was able to get the pack to work by going into the CIT resewn settings (through modmenu) and enabling the "Allow broken paths in resourcepacks" option and then restarting minecraft.
Try this and please let me know if it works!

HOLY COW IT WORKED TYSM! I feel stupid cause I thought I had already messed with at setting but didn't apparently, thanks for the help. Now my apartment can have fridges :]


PYI-513: Parse credential response into JSON objects and pretty print them on the front-end

Proposed changes
What changed
Parse and pretty print the credential gpg45Score and attribute fields to the orc front-end.

Why did it change
To clearly display each credential that has been returned

Issue tracking

PYI-513


Kotlin nested data classes don't work

See https://github.com/restatedev/sdk-java/pull/273

Fixed by https://github.com/restatedev/sdk-java/commit/8f909989d8db5fe59d2f29f7dd8db65d006974a1


global_motion - ValueError: too many values to unpack

This code:
def global_motion(frame1, frame2):
    print(frame1.shape)
    print(frame2.shape)
    return skvideo.motion.globalEdgeMotion(frame1, frame2)

gives:
(216, 384)
(216, 384)
Traceback (most recent call last):
[...]
File "test_filters.py", line 366, in global_motion
    v = skvideo.motion.globalEdgeMotion(frame1, frame2)
  File "/usr/local/lib/python3.5/dist-packages/scikit_video-1.1.10-py3.5.egg/skvideo/motion/gme.py", line 73, in globalEdgeMotion
    E_1 = canny(frame1)
  File "/usr/local/lib/python3.5/dist-packages/scikit_video-1.1.10-py3.5.egg/skvideo/utils/edge.py", line 31, in canny
    M, N = frame.shape
ValueError: too many values to unpack (expected 2)

I'm using the last git version of skvideo. In this version these 2 lines have been added in gme.py line 63:
frame1 = vshape(frame1)
frame2 = vshape(frame2)

So now frame1 and frame2 have the shape (T, M, N, C) but the canny function has not been modified and the scipy.ndimage.correlate1d function take 2 dimensional array.
I fixed this issue by adding frame = frame[0,:,:,0] at the beginning of the canny function.

Thanks for catching this!


Revert pymemcached 3.3.0 for broken

Currently newest pymecached was broken.
https://github.com/harikitech/django-elastipymemcache/runs/7992426622?check_suite_focus=true
So, revert to 3.3.0.
We should update 3.5.2 to another PR.

https://github.com/harikitech/django-elastipymemcache/pull/206 fixed test failing


Convert unit enums to single element vector

What
Convert unit enums to single element vectors and ignore extra fields when decoding.
Why
For a number of reasons:

Encode unit enums into their most efficient form.
To make it easier to scale enum encoding to support tuple variants with more than a single value.
To make it easier to make changes to enums by adding tuple values.

Close https://github.com/stellar/rs-soroban-sdk/issues/427
Known limitations
N/A

To make it easier to make changes to enums by adding tuple values.

@jonjove I'm thinking of making the same changes to tuples, so a 4 length tuple can be decoded into a 3 element tuple. I think the downsides are minimal. I'm typically opposed to non-symmetric encoding of types, such as u64 -> RawVal -> i64 which can create situations that won't work, but I don't think tuples will experience the same footguns. Lmk what you think.

I'm thinking of making the same changes to tuples, so a 4 length tuple can be decoded into a 3 element tuple
I want to make sure I understand. Instead of checking that the Vec has the exact length of the target tuple, you just want to check that the Vec is at least long enough?

I see why one might want this, but I feel like it's more likely to be a foot-gun. In general, I don't think you should retroactively modify your enum variants--you should just add new ones.

It's already possible to retroactively modify structs by adding new keys, so this makes enums more like structs in that regard.

Maybe we should be going the other direction and making it impossible to retroactively modify structs? That also seems likely to be a foot-gun.

To do that for structs would require additional wasm code that doesn't otherwise serve the user. We'd be adding an additional length check in the decoding code doesn't need. I feel like this is the sort of thing we can tell people not to do, but then they'll go out of their way to do it anyway, so I'm not sure it is worth it vs just providing best practices on how to do it safely, which is no different to general database migration best practices.

The reason I think u64 -> RawVal -> i64 is too much of a footgun is because there are ranges of u64 that this will work for, and ranges it won't work for, and code may work fine in tests if those ranges aren't discovered in tests.
On the contrary it seems harder for (T0, T1, T2) -> RawVal -> (T0, T1) to be a footgun since the encoding and decoding types are concretely specified in the code at compile time. i.e. Runtime can't change the (T0, T1, T2) into (T0). This is why I don't think this is so bad.

I don't think I agree with you. The really dangerous thing in this case is

storage contains (0u32, 1u32, 2u32)
read from storage into let mut x: (u32, u32) = e.contract_data().get(key) // (0u32, 1u32) because code is not aware that the tuple actually had length 3
modify tuple element 0 x.0 += 1
write to storage e.contract_data().put(key, x) // (1u32, 1u32) which means code accidentally truncated storage, losing data

In this case, the code looks like I modified an element of a tuple. But I actually modified the structure of the tuple too. Data was lost, and future code might panic if it depends on that tuple having length 3.

Ah good point, and nice example. Indeed, the footgun remains.

Follow change is in https://github.com/stellar/rs-soroban-sdk/issues/462


Support of Elliptic Curve certificates (for ECDHE)?

Hi!
letsencrypt-win-simple works very well, and I wanted to evaluate the usage of Elliptic Curve Cryptography, which are already supported by letsencrypt (see here). The test  https://www.ssllabs.com/ssltest/analyze.html?d=suche.org&latest shows that TLS with Elliptic Curve seems very good supported even by old clients. My only problem is: all examples of creating of EC certificates, which I found, was for Linux only using the original letsencrypt.
Is it possible to use letsencrypt-win-simple to create Elliptic Curve Certificate?
As an alternative way I found the document, which describes how to generate the custom Certificate Signing Request, which uses Elliptic Curve, with respect on MMC and the standard Certificate Snap-In. Probably if some parts are not yet implemented in letsencrypt-win-simple then one could generate the CSR manually and just use letsencrypt-win-simple for sending the request to letsencrypt and receiving PFX file, which one could install manually?
Best regards
Oleg

This would have to be added to ACMESharp before it can be added here as that's what actually generates the CSR.
Currently there is no way to use your own CSR with the app. It was asked for in #165 but there aren't any votes for it so you can add yours to get it implemented sooner.

Thank you for the answer. I voted the feature of the usage of CSR, but my main goal would be to use Elliptic Curve TLS Certificates and the usage of custom CSR could be only a workaround if nothing other works.
I'm not sure what you mean with "This would have to be added to ACMESharp before it can be added here". As I know ACMESharp is another project full independent from letsencrypt-win-simple. I tried it too, but without any success. It has a lot of restrictions and the error messages help not. I followed many step by step instructions and videos, but with the same final: I get always an error on start of  Initialize-ACMEVault ("The term 'Initialize-ACMEVault' is not recognized as the name of a cmdlet,..."). On the other side letsencrypt-win-simple worked on my Windows 10 64-bit computer without any problems.
Do you want to use ACMESharp module in letsencrypt-win-simple? Do you plan to use parts C# ACMESharp code in you project? Do you can/plan to allow to create Elliptic Curve Certificate with respect of letsencrypt-win-simple? Do you have any tips (references and so on) how one could create Elliptic Curve TLS certificates with letsencrypt on Windows 10?

letsencrypt-win-simple is based on ACMESharp. ACMESharp's code is used for all of the certificate and ACME server integration. Let's Encrypt's servers use the ACME protocol, so that's how letsencrypt-win-simple talks with them.
After support for Elliptic Curve is added into ACMESharp, it can be added into letsencrypt-win-simple. So you probably want to open an issue up on ACMESharp for adding the ability to do Elliptic Curve certificate requests.
I don't think there is currently a way to do Elliptic Curve on Windows with Let's Encrypt as the majority (or maybe all) of the Let's Encrypt Windows clients are built on ACMESharp.

Thank you very much for the quick response. I will open an issue at ACMESharp. I will try to debug ACMESharp code too and will continue to try making letsencrypt working on Windows by installing different unix subsystems and packages.
Thank you once more for very interesting project letsencrypt-win-simple!

https://github.com/ebekker/ACMESharp/issues/140

for anyone finding this, its trival to create ECDSA certs with winacme 2.1, just choose 'M' from the options screen and chose Elliptic Curve key rather than RSA


Retain values across multiple open Facilities

Definition of Ready

[ ] Does this meet the INVEST criteria?
[x] Does this have a clearly defined user?
[ ] Does this have an estimate?
[x] Does this have acceptance criteria?
[ ] Does this have sufficient context (wireframes, business rules, etc.)?
[x] Is this traceable to a feature, epic, or PI?

User Story
As a user, I want to be able to navigate among open Facilities, so that I can compare them per the wireframes.
Acceptance Criteria
Given a user has multiple Facilities open
When the user switches from one Facility to another
Then the system retains the Facility's configuration and location values.
Given a user has selected the "Show Inactive" checkbox for multiple open Facilities
When the user switches from one Facility to another
Then the system retains the checked "Show Inactive" checkbox.
Context
(User journeys, design mockups, architectural diagrams, business rules, data element definitions)
Testing
Test Case:
Tester:
Definition of Done

[ ] Have all Acceptance Criteria been agreed to and validated by the scrum team?
[ ] Has the code been unit tested and peer reviewed?
[ ] Have the functional tests been executed?
[ ] Have all defects been reviewed and dispositioned, resolved, or deferred?
[ ] Has the user story been accepted by the Product Owner?
[ ] Is the user story ready to be deployed to the test/staging environments?

Resolved by previous work


Trending Projects Filter

Implement a filter to display trending projects by default when the explore page is first loaded, enhancing user engagement with popular content.

Trending projects are hardcoded? or fetched form where any ideas on that?