Don't set default timeouts on listeners and targets

Currently, the config vaidator will set a timeout of 300 if the value isn't specificed. So in other words, there is no way to set the timeout to 0, which is a problem for long-standing connections.
This patch changes that, and leaves the default on 0 and makes sure the deadlines are only set on connections that have a timeout configured.
GenerateConfig however will set this default, so the behaviour in config-less scenario is retained.

Codecov Report

Merging #7 (6dab71e) into main (a10a3f4) will decrease coverage by 1.85%.
The diff coverage is 46.15%.

@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
- Coverage   69.51%   67.66%   -1.86%
==========================================
  Files           9        9
  Lines         561      569       +8
==========================================
- Hits          390      385       -5
- Misses        163      173      +10
- Partials        8       11       +3

Impacted Files
Coverage Δ

pkg/proxy/proxy.go
81.81% <20.00%> (-5.03%)
:arrow_down:

pkg/proxy/dialer.go
85.71% <40.00%> (-9.03%)
:arrow_down:

pkg/config/config.go
93.57% <100.00%> (-0.23%)
:arrow_down:

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

If you change the default to 0 it will become a problem for short-lived connections, if users need to use this proxy for long-lived connections like gRPC they can increase the timeout.
Make the default timeout to 0 doesn't make sense to me.

If you change the default to 0 it will become a problem for short-lived connections, if users need to use this proxy for long-lived connections like gRPC they can simply increase the timeout.
Make the default timeout to 0 doesn't make sense to me.

I would rather argue that connections should not time out at all unless configured accordingly. There must be a way to switch this off. And again, implicit behavior and silent fixups in the user-defined configs are unexpected. It took me quite a while to figure why the connections died so frequently even though no timeout was configured anywhere. Let's be explicit and let the user define such things.
The example config is updated, and this is what most people will start off with anyway.

It's already documented here if the timeout has 300 as the default value, and users can change that if they want.

Let's be explicit and let the user define such things.
The proxy is designed to be easy to use, make sure the user is not overwhelmed with the configuration. so set the default value will be helpful. On other hand, the proxy also facilitates the user to change the default value.

I would rather argue that connections should not time out at all unless configured accordingly.
We need to set the default value, if we set it to 0 for default it will become a problem, the connection will always open if the user not aware about that.

The proxy is designed to be easy to use, make sure the user is not overwhelmed with the configuration. so set the default value will be helpful. On other hand, the proxy also facilitates the user to change the default value.

But it doesn't allow the user to set the timeout to off which is really something that needs to be supported.

We need to set the default value, if we set it to 0 for default it will become a problem, the connection will always open if the user not aware about that.

Connections die if either the listener or the target end dies. That's expected behaviour in all other daemons as well?

Connections die if either the listener or the target end dies. That's expected behaviour in all other daemons as well?

The connection will still open even if the target is die, and it will prevent the proxy to have graceful shutdown .

But it doesn't allow the user to set the timeout to off which is really something that needs to be supported.

what is the use case that makes you need to set this to 0?

The connection will still open even if the target is die, and it will prevent the proxy to have graceful shutdown.

Yes, io.Copy() will only return when its source signals EOF. The shutdown logic will hence block until either the target or the source TCP connection is shut down.
I'm wondering what the purpose of that shutdown actually is. The closing of all open sockets is something that the operation system is responsible for when a tasks shuts down, and it does that very diligently. And as this is a pure TCP proxy with no awareness of any higher level protocols it can't really wait for transactions or something like that to end. It has no chance but to cut the stream at some random point.
Could you elaborate on what the reason was to add that? I really believe it can be removed altogether unless I'm missing anything.

what is the use case that makes you need to set this to 0?

We're using the proxy for NATS, which keeps the connection open for as long as possible. Reconnecting triggers a lot of state syncing on either side of the game, and is hence to be avoided.
The problem with the current implementation is that the stream will be terminated once every 300 seconds by default, even when there is active traffic ongoing. And that is of course not what we need.

I guess the reason is the reload feature, right? If that is needed, the target connection must be closed explicitly

Yes, that's related to reload feature, also we need to keep track of every connection for monitoring purposes.

The problem with the current implementation is that the stream will be terminated once every 300 seconds by default, even when there is active traffic ongoing. And that is of course not what we need.

Yeah, that's the current limitation, but the timeout is configurable and it gives the ability to users to set based on their needs.
Set the default timeout to 0 is not a good idea and I don't think another proxy do this.
I've planned to introduce a new feature to handle long-lived connections and hopefully it can also work for your use case, I'll work on this on the weekend, and will get back to you

Set the default timeout to 0 is not a good idea and I don't think another proxy do this.

No other daemon I'm aware of will purposefully cut TCP streams on regular bases. Image your ssh sessions would die regularly :)
The deadline feature you have in place is also not a solution to the shutdown issue because it will only work once the timeout has exceeded. Did you look into the 2nd commit I added? I solved the shutdown case and does away with the necessity of any deadlines.

I've planned to introduce a new feature to handle long-lived connections and hopefully it can also work for your use case, I'll work on this on the weekend, and will get back to you.

I don't see why a new feature is needed here. Connections will simply die when either the source or the target closes down, and if users want to end them prematurely to account for unresponsive servers (and only for that), they may specify timeouts in the config.

It won't cut TCP stream if the users set the timeout correctly

User cannot set the timeout to off, which is what this PR is all about :)

the client establishes a connection to the proxy to get the response and done.

This statement is making assumptions on how TCP connections are used. What you are describing is a specific kind of connection that transports a single request and then closes it again.

If the client wants to request again they need to establish a new connection.

Cases in which TCP connections remain open are just as valid however, and especially in applications with long-standing connections a reconnect can be very expensive because state needs to be synced again etc.

It's not only about shutdown. Network is unreliable, and we can't make sure the targets are always can serve the request, there might be cases the target is unresponsive or not responding, if that happens it will make the connection open and wait for a long time.

If network is unreliable, that's something for the operating system to figure out and eventually close the TCP stream. The proxy application should simply react to that and follow suite, and note make its own assumptions. Let stream end when the OS deems them dead.
Again, if users want to make assumptions on the maximum length a transaction may take, they can configure timeouts, that's fine. But that should really not be implied by default by a general purpose TCP proxy.

If the opened connection reaches the limit it will start giving this response.
too many open files

I'm not sure which issue you bumped into here. Do you have a reproducer?

Also from a security perspective, there might be a case attackers open hundred or thousand of connections and start sending slow request to make legit client can't connect to the service.

Yes, but that is not something you can prevent.

So in that case, timeout will help to cut the connection.

Sorry, but it doesn't :) DDOS clients can just reconnect if they are dropped, and they will.

yes, that's why there is a timeout configuration and have default value

The feature is fine, don't get me wrong. All I\ saying is that is should be possible to turn it off, and it should not be enabled by default.

This statement is making assumptions on how TCP connections are used. What you are describing is a specific kind of connection that transports a single request and then closes it again.
Cases in which TCP connections remain open are just as valid however, and especially in applications with long-standing connections a reconnect can be very expensive because state needs to be synced again etc.

I try to explain the current behavior and limitation

If network is unreliable, that's something for the operating system to figure out and eventually close the TCP stream. The proxy application should simply react to that and follow suite, and not make its own assumptions. Let streams end when the OS deems them dead please.

The users can assume or can also set based on data in the monitoring that they have, if we can control via proxy it is more helpful, especially when use more than one proxy in one environment. we can have different configurations.
i would suggest to set HostConfig.Timeout struct to string, set the default value only if the users not provide timeout configuration. If users set the value to 0 it will disable the timeout.

i would suggest to set HostConfig.Timeout struct to string, set the default value only if the users not provide timeout configuration. If users set the value to 0 it will disable the timeout.

it's a little bit weird, but it doesn't change much the current behavior

I try to explain the current behavior and limitation

Fair enough, but why not change that? I really don't understand why the config the user supplies has to be modified before it's used. I still think that's wrong.

The users can assume or can also set based on data in their monitoring that they have,

At which point they can enable the feature, yes.

f we can control via proxy it is more helpful, especially when use more than one proxy in one environment.

Yes, the feature may help some users that it. I'm not arguing against that.

i would suggest to set HostConfig.Timeout struct to string, set the default value only if the users not provide timeout configuration. If users set the value to 0 it will disable the timeout.

That's weird indeed. A value of 0 should switch it off. Why have an extra case here? And why default to a seemingly random number of 300 seconds? I'm really confused :)

why default to a seemingly random number of 300 seconds? I'm really confused :)

That's not a random number actually. If I see nginx, nginx had a default timeout 60s, this proxy has 300s or 5 minutes, and based on my experience 5 minutes is enough to handle expensive transaction like proxying queries to database. but yeah in other cases it won't suitable.

I was thinking to implement idleTimeout to handle long-lived connection, so if the transaction still running it won't timeout, it will timeout if the connection is idle and not handle any transaction for specific period of time.

You can add that as a feature, but again, please don't enable that by default. And it wouldn't cover our case either.
I feel like a broken record. Connections should by default just remain open until the OS closes them. Don't outsmart the OS. It's okay to have features to alter that default behavior, but that should be an opt-in then.
Take ssh as an example again. Sessions don't usually die even if intermediate routes are temporarily down. You may explicitly opt in with TCPKeepAlive in your config but that has its downsides, and is hence not enabled by default.

Take ssh as an example again. Sessions don't usually die even if intermediate routes are temporarily down. You may explicitly opt in with TCPKeepAlive in your config but that has its downsides, and is hence not enabled by default.

I think TCP keepalive in ssh is enabled by default and it also will help if the intermediate routes are down for a long time, if specific probe has reached the connection will be closed.

I feel like a broken record. Connections should by default just remain open until the OS closes them. Don't outsmart the OS. It's okay to have features to alter that default behavior, but that should be an opt-in then.

I'm worried if we just let the OS handle it, the proxy also needs to be aware and also responsible to manage the connection. If we let the OS handle the connection, the connection will remain open for a long time if the client or server doesn't close the connection properly.
Its needs to be enabled by default and have a default value.
Let's use an approach that I suggest, a long-lived connection is a special case and users need to be aware of.

I think TCP keepalive in ssh is enabled by default and it will also help if the intermediate routes are down for a long time, if the number of specific probes has been reached the connection will be closed.

Ah, you're right. But that application logic then. If the client decides that the connection is dead, it will close it. And if the proxy is in the middle, it will also close the link. My point is that it should be left to the application servers to close connections, not to the "simple" proxy that simply relays traffic.

I'm worried if we just let the OS handle it, the proxy also needs to be aware and also responsible to manage the connection. If we let the OS handle the connection, the connection will remain open for a long time if the client or server doesn't close the connection properly.

And I don't think that's a problem. But fair enough, let's agree to disagree here :)
I'm closing this PR hence and will open another one that at least allows users to specify a zero timeout explicitly.

I was thinking to implement idleTimeout to handle long-lived connection, so if the transaction still running it won't timeout, it will timeout if the connection is idle and not handle any transaction for specific period of time.

Btw, thinking about it again, this feature would in fact be interesting to cover cases where both ends silently disappear without ever sending an RST packet. I didn't consider that.

I'm closing this PR hence and will open another one that at least allows users to specify a zero timeout explicitly.

Sure, thanks for raising your concern, looking forward to seeing another great contribution from you @zonque  :raised_hands:

Btw, thinking about it again, this feature would in fact be interesting to cover cases where both ends silently disappear without ever sending an RST packet. I didn't consider that.

Yes, with that the proxy will be able to close the connection from the client and the target as well.


The Tooltip component doesn't display when rendered within a react-native Modal

🐛 Bug Report
The Tooltip component doesn't display when rendered within a react-native Modal
To Reproduce
Steps to reproduce the behavior:
Add Tooltip within react-native Modal
Expected behavior
The tooltip should display as it does otherwise when used outside of a react-native Modal.
Link to runnable example or repository (highly encouraged)
N/A
UI Kitten and Eva version

Package
Version

@eva-design/eva
2.0.0

@ui-kitten/components
5.0.0

Environment information
System:
OS: macOS 11.4
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 16.8.0 - /usr/local/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 7.21.0 - /usr/local/bin/npm
Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
IDEs:
Android Studio: 4.1 AI-201.87<IP_ADDRESS>53283
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
npmPackages:
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
npmGlobalPackages:
react-native-cli: 2.0.1

Hello @ajstokar
Unfortunately, I can only suggest you to use our Modal instead of react-native Modal.


deps: update all non-major dependencies

This PR updated all non-major dependencies and will close #137
We updated the Kotlinter to 4.3.0, which led to many code format changes to fix lint errors.

hi @cre8ivejp please help me to take a look

I found an issue when using the latest versions of Robolectric 4.12.1
https://github.com/bucketeer-io/android-client-sdk/issues/170
so in the PR, I only updated to Robolectric 4.11.1


Added most of Bavaria's lines

All references are from the official bavarian state agency for rail BEG: https://bahnland-bayern.de/files/media/shop/downloads/liniennetzplan/2024/liniennetzplan-bayern-2024.pdf
+added Bayerische Zugspitzbahn line RB 64
+added Erfurter Bahn GmbH lines for bavaria
+added Waldbahn lines
+added Oberpfalzbahn lines
~reorganized Bayerische Regiobahn lines under single operator "brb" +added S-Bahn Salzburg lines S3 and S4 of Bayerische Regiobahn
+added Regio-S-Bahn Donau-Iller lines RS3, RS5 and RS51 of SWEG
+added Regio-S-Bahn Donau-Iller lines RS7 and RS71 of DB Regio Bayern
+added Main-Spessart-Express lines of DB Regio Bayern
+added Neigetechniknetz Nordostbayern lines of DB Regio Bayern
+added agilis Mitte lines
+added agilis Nord lines
+added Mainfranken-Thüringen-Express lines RE 7 and RE 57 of DB Regio Südost
+added Mainfrankenbahn lines of DB Regio Bayern
~corrected line RE 23 of alex-dlb

After a quick glance I think that merging this pull request resulted in duplicate entries in the dataset for at least

Regio-S-Bahn Donau-Iller
S-Bahn Salzburg

After a quick glance I think that merging this pull request resulted in duplicate entries in the dataset for at least
* Regio-S-Bahn Donau-Iller

* S-Bahn Salzburg

Yes, unfortunately, I've overseen this.
I'll fix this with another pull request, along with a fix for the duplicate and faulty alex-dlb-lines and some color corrections for the brb-lines.

This is now addressed with #164


[FancyZones] Quicky switch between layouts with the scroll wheel while dragging a window

I sometimes like to keep my windows in a 3 columns, sometimes 2, sometimes 2 that are not equal width.
It would be awesome to be able to quickly switch between layouts. Im thinking while dragging a window and holding shift to see the zones, using the scroll wheel would cycle through the layouts created on that monitor.
Thanks!

Reference: https://github.com/microsoft/PowerToys/issues/1411

Switching between layout options whilst dragging a window would be awesome, but from a UI point of view I think we also need to consider:

We'd need some way of marking layouts that should be cycled - such as marking layouts as favorites/starred
The scrollwheel isn't a comfortable option, I would propose the following:

If "Hold shift key to activate zones whilst dragging" is checked, then tapping SPACE or ALT whilst holding down SHIFT and dragging a window would cycle the selected layouts
If "Use a non-primary mouse button to toggle zone activation" is checked, then each press of the non-primary mouse button would cycle the selected layouts.

I'd suggest chaning the ticket title to "[FancyZones] Quicky switch between layouts whilst dragging a window"

PowerToys has this functionality before, but I don't know why it was removed. Before while snapping a window to a zone (zones are present), I can switch layouts by pressing number keys which corrensponds to the number of zones that you have used since the installation.

@gczark
that feature had issues:

a layout may have not been designed for the current screen resolution and still it was allowing to apply it to the current screen.
accessibility problem: it required to start dragging a window and press ctrl + number at the same time
the ctrl + number shortcut is already used by Windows for a different feature

#1411 will try to address all those problems

Tracked in https://github.com/microsoft/PowerToys/issues/6611

For any one else who wants this, here's an autohotkey script for it.
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force
Menu, Tray, Icon , C:\Program Files\PowerToys\modules\FancyZones\PowerToys.FancyZonesEditor.exe
CoordMode, Mouse, Screen

;CONFIG
;Assign FancyZones Layouts shortcuts in order from 0 to 9
;Scrolling down will cycle through layouts numerically from 0 to 9
;Scrolling up will cycle through layouts in the reverse order

;Set to highest number layout shortcut
NoLo := 2
;End of Config

Lo := 0
*~LButton::
    MouseGetPos, x, y, hwnd
    SendMessage, 0x84, 0, (x&0xFFFF) | (y&0xFFFF) << 16,, ahk_id %hwnd%
    RegExMatch("ERROR TRANSPARENT NOWHERE CLIENT CAPTION SYSMENU SIZE MENU HSCROLL VSCROLL MINBUTTON MAXBUTTON LEFT RIGHT TOP TOPLEFT TOPRIGHT BOTTOM BOTTOMLEFT BOTTOMRIGHT BORDER OBJECT CLOSE HELP", "(?:\w+\s+){" . ErrorLevel+2&0xFFFFFFFF . "}(?<AREA>\w+\b)", HT)
	 if htarea!=CAPTION
		Return
	 MouseGetPos,_x,_y
	 While GetKeyState("LButton","P") && x=_x && y=_y ;Wait until user begins dragging
		MouseGetPos,_x,_y
    While GetKeyState("LButton","P") ;while dragging
		dragging := 1
	dragging := 0
Return
#If (dragging = 1)
	WheelUp::
		Lo --
		if (Lo < 0)
			Lo:=NoLo
		Send %Lo%
		Return
	WheelDown::
		Lo ++
		if (Lo > NoLo)
			Lo:=0
		Send %Lo%
		Return

Hey, I was just about to create another issue but found my old (#13387) issue regarding this and I'd like to put emphasis on one thing: the controls of zone switching must be configurable and it has to allow to assign mouse buttons (especially MB4 and MB5).
Is there chance for any action on this issue in the foreseeable future? It's been here a while and there are plenty of duplicates being created.
Also, I think FancyZones-Settings and FancyZones-Hotkeys labels could be added to this.


Process env gives error while running exe

I want to pkg node express app using pkg. My pkg json looks like:
"scripts": {     "start": "SET NODE_ENV=development&node ./bin/www",     "start-prod": "SET NODE_ENV=production& node ./bin/www"   },   "dependencies": {     "better-queue": "^3.8.10",     "cookie-parser": "~1.4.3",     "data-store": "^3.1.0",     "debug": "~2.6.9",     "express": "~4.16.0",     "http-errors": "~1.6.2",     "morgan": "~1.9.0",     "pug": "2.0.0-beta11",     "winston": "^3.2.1",     "winston-daily-rotate-file": "^3.8.0",     "ws": "^6.2.0"   },   "pkg": {     "assets": [       "views/**/*",       "public/javascripts/*.js"     ]   },   "bin": "./bin/www"
I am using running node env to load config files for dev and production env using "process.env.NODE_ENV". This gives me error while compiling "Warning Cannot resolve '${ process.cwd() }/config/${ process.env.NODE_ENV }.json'" and fails while calling the exe.
Please suggest how to load diff env files while using pkg

You need to put relative path everywhere inside you project. Also include node_modules inside the assets from the config file.
Also execute the exe via command line so we can see the full error log and please paste it here.

You need to put relative path everywhere inside you project. Also include node_modules inside the assets from the config file.
Also execute the exe via command line so we can see the full error log and please paste it here.

I have the same issue, and here's what command line says, please help, thx


feat: enable creating 3 new Actions

Description
GetConversationMembers
GetActivityMembers
ThrowException

Task Item

Screenshots

Coverage remained the same at 54.723% when pulling 7922e0e20ab32124f8a545314b6c023bd3013ba6 on yeze322:action/1.2rc into 5ecec93df69d43d8e02c1639eaac9ec514ff773f on microsoft:main.


Fixes #230 : Hardcoded the strings in strings.xml

This PR addresses #230
Hardcoded the strings in strings.xml file and also  @android:color/holo_blue_dark requires API level 14 (current min is 13)
So overrided  resource in layout-v14
@timabbott @kunall17 Review and tell me if there any changes required. :)

Automated message from Dropbox CLA bot
@saketkumar95, it looks like you've already signed the Dropbox CLA. Thanks!

Still there are many strings which are only used as placeholders
Fixing holo color api issue should be in another commit
Changes you have done does not fixes the holo colour issue!

@kunall17 Can you point out other placeholders? I did almost which i found. Maybe i got missed.

@saketkumar95 Are u adding placeholders too to strings.xml? In case yes, then you run lint to see which hard coded placeholder strings are left in the project.

Hey @saketkumar95 It would be great if you can revive this pr since after it gets merged we can turn up the severity of hard-coded strings to error for the project.

@Sam1301 Yes i will do it 2-3 days. I'm travelling now.  Little bit busy  with hackathons.  Will update you this soon. :)

@kunall17 I'm closing this now! :)


Bubbletea table and Lip Gloss color do not work with ssh.Channel.

Here is my sample code modified to use instead of default io.Reader, io.Writer to crypto/ssh Channel. Table seems to work fine but Table Style cannot accept Lip Gloss color code.
package proxy

import (
	"fmt"
	"github.com/charmbracelet/bubbles/table"
	tea "github.com/charmbracelet/bubbletea"
	"github.com/charmbracelet/lipgloss"
	"github.com/seknox/ssh"
)

var baseStyle = lipgloss.NewStyle().
	BorderStyle(lipgloss.RoundedBorder()).
	BorderForeground(lipgloss.Color("240"))

type model struct {
	table table.Model
}

func (m model) Init() tea.Cmd { return nil }

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	var cmd tea.Cmd
	switch msg := msg.(type) {
	case tea.KeyMsg:
		switch msg.String() {
		case "esc":
			if m.table.Focused() {
				m.table.Blur()
			} else {
				m.table.Focus()
			}
		case "q", "ctrl+c":
			return m, tea.Quit
		case "enter":
			return m, tea.Batch(
				tea.Printf("Let's go to %s!", m.table.SelectedRow()[1]),
			)
		}
	}
	m.table, cmd = m.table.Update(msg)
	return m, cmd
}

func (m model) View() string {
	return baseStyle.Render(m.table.View()) + "\n"
}
func (s *Session) showTable(channel ssh.Channel) {
	columns := []table.Column{
		{Title: "Rank", Width: 4},
		{Title: "City", Width: 10},
		{Title: "Country", Width: 10},
		{Title: "Population", Width: 10},
	}

	rows := []table.Row{
		{"1", "Tokyo", "Japan", "37,274,000"},
		{"2", "Delhi", "India", "32,065,760"},
		{"3", "Shanghai", "China", "28,516,904"},
		{"4", "Dhaka", "Bangladesh", "22,478,116"},
		{"5", "São Paulo", "Brazil", "22,429,800"},
	}
	t := table.New(
		table.WithColumns(columns),
		table.WithRows(rows),
		table.WithFocused(true),
		table.WithHeight(7),
	)

	style := table.DefaultStyles()
	style.Header = style.Header.
		BorderStyle(lipgloss.NormalBorder()).
		BorderForeground(lipgloss.Color("240")).
		BorderBottom(true).
		Bold(false)
	style.Selected = style.Selected.
		Foreground(lipgloss.Color("229")).
		Background(lipgloss.Color("57")).
		Bold(false)
	t.SetStyles(style)

	m := model{t}
	if _, err := tea.NewProgram(m, tea.WithInput(channel), tea.WithOutput(channel)).Run(); err != nil {
		fmt.Println("Error running program:", err)
	}
}

I think I am running into a similar issue. I am using a table model like you have in your example, but instead not calling tea,WithInput() or tea.WithOutput(). Rather I am simply ssh'ing into a server and running my bubble tea program. However, it is exhibiting the same issues as you are noting.
Any ideas?

table.DefaultStyles() creates new renderers, you need a renderer created from the ssh session.  The bubbletea.MakeRenderer(s) function will create  one for you.  Relevant note here.
You'll then need to set the renderer explicitly in your table styles:
        renderer := bubbletea.MakeRenderer(s)

	style := table.DefaultStyles()
	style.Header = style.Header.
                Renderer(renderer).  // Like this
		BorderStyle(lipgloss.NormalBorder()).
		BorderForeground(lipgloss.Color("240")).
		BorderBottom(true).
		Bold(false)
	style.Selected = style.Selected.
                Renderer(renderer).  // And this
		Foreground(lipgloss.Color("229")).
		Background(lipgloss.Color("57")).
		Bold(false)
	t.SetStyles(style)

SSH connections won't send terminal capabilities by default, which is why the Bubble Tea application is automatically downgrading the colours because it doesn't know what the provided stdout color capabilities are (the ssh connection).
That said, we have a more pure implementation of Lip Gloss in v2 alpha right now that should fix this for you. You can force a color profile to use when you run the program, so try setting that to TrueColor in your case and it may solve this for you.
I'm not sure what the use case is here, but you may also have a better time using wish to facilitate ssh connectivity for Bubble Tea apps. Let me know how that goes and if anything is unclear :)

I'm going to convert this to a discussion as it's more of a usage question at the moment. Should that change, I can reopen this as an issue for us to track and fix :)


Explore: proposal status label for history section

🗃 Github Issue Or Explanation for this PR. (What is it supposed to do and Why is needed)
#1093
✅ Checklist

[x] Github issue details are up to date for people to QA.
[x] I have tested all my changes.

🕵♂ Notes for Code Reviewer
Nothing in special here.
🙈 Screenshots

### 👯♀ Paired with
"nobody"

What about eval state?

What about eval state? Does it handle proposals that are in evaluate state? @RaulUrtecho

I am using the status of the proposal as you mentioned, but the query seems to not return more than 2 types passed and rejected for the stage done. The evaluate status does not appear.

What about eval state? Does it handle proposals that are in evaluate state? @RaulUrtecho

@n13 I am using the status of the proposal as you mentioned, but the query seems to not return more than 2 types passed and rejected for the stage done. The evaluate status does not appear.

Raul, I think any open proposals would be on evaluate status.

Hi Raul, if a proposal is rejected I think it should show the color red, in the design shows as Fail But I think rejected makes more sense here.

Done.


bug: no module named realtime.connection; realtime is not a package

I have an error like this when using this package.
ModuleNotFoundError: No module named 'realtime.connection'; 'realtime' is not a package
anyone can help me

Hi @alif-arrizqy, can you show us an example code snippet that raises this error.

Hi @leynier
previously I wasn't using the 0.2.0 version (I forgot the supabase version) and it still worked.
but when I install/upgrade to version 0.2.0, then this error appears.
I tried to create a new folder and install the latest version of supabase (v0.2.0) and it worked. I think there is a conflict between the old and new files
here the code:

from supabase import create_client, Client

supabase_url = "url_supabase"
supabase_key = "key_supabase"

if __name__ == "__main__":
    sb: Client = create_client(supabase_url, supabase_key)
    data = (
        sb.table("melawai_hourly_graph")
        .select("harvest_ratio")
        .order(column="jam", desc=False)
        .execute()
    )

    print(data)

here the error:

This has been fixed in the later versions. The problematic import was removed.


Cannot use symbols defined by internal packages

If an internal packages is imported on gore, an error "use of internal package  not allowed" occurs after evaluating an expression which uses symbols defined in the internal package.
Steps to reproduce
$ echo $GOPATH
/Users/nekketsuuu/dev
$ pwd
/Users/nekketsuuu/dev/src/github.com/nekketsuuu/gore-internal
$ tree .
.
├── cmd
│   └── main.go
├── go.mod
├── internal
│   └── foo
│       └── foo.go
└── pkg
    └── bar
        └── bar.go

5 directories, 4 files
$ cat ./internal/foo/foo.go
package foo

import "fmt"

func Hello() {
	fmt.Println("Hello!")
}
$ cat ./pkg/bar/bar.go
package bar

import "fmt"

func World() {
	fmt.Println("World!")
}
$ cat ./cmd/main.go
package main

import (
	"github.com/nekketsuuu/gore-internal/internal/foo"
	"github.com/nekketsuuu/gore-internal/pkg/bar"
)

func main() {
	foo.Hello()
	bar.World()
}
$ cat go.mod
module github.com/nekketsuuu/gore-internal

go 1.13
$ go run cmd/main.go  # The internal package can be imported normally from `go run`.
Hello!
World!
$ gore
gore version 0.5.0  :help for help
gore> :import github.com/nekketsuuu/gore-internal/internal/foo
gore> :import github.com/nekketsuuu/gore-internal/pkg/bar
gore> foo.Hello()
use of internal package github.com/nekketsuuu/gore-internal/internal/foo not allowed
gore> bar.World()
use of internal package github.com/nekketsuuu/gore-internal/internal/foo not allowed
gore>
$ gore
gore version 0.5.0  :help for help
gore> :import github.com/nekketsuuu/gore-internal/pkg/bar
gore> bar.World()
World!
gore>

Environment

gore 0.5.0 (rev: HEAD/go1.13.6)
go version go1.13.6 darwin/amd64
macOS Mojave

I don't think we can fix this. Maybe print error quickly on import command?

I don't think we can fix this. Maybe print error quickly on :import command?


[TASK] Bump Harvester component minor versions

Context

A harvester component in the previous minor release might be newer than the version in the current release.
For example, we have the image rancher/harvester-network-controller:v0.3.7  in Harvester v1.2.2, but rancher/harvester-network-controller:v0.3.6 in Harvester v1.3-head.
If a user upgrade from Harvester v1.2.2 to v1.3.1, the component's semantic version will be downgraded.
Task

Bump Harvester components' minor version x.y.z to x.y+1.z in v1.3.

Images tags:

v1.2.2
v1.3-head
New version
Owner

harvester-network-controller
v0.3.7
v0.3.6
v0.4.0
@mingshuoqiu

harvester-node-disk-manager
v0.5.5
v0.6.3

Done

harvester-load-balancer
v0.2.6
v0.2.5
v0.3.0
@Yu-Jack

harvester-node-manager
v0.1.10
v0.2.1

Done

(add-on) vm-import-controller
v0.1.8
v0.1.8

(add-on) pcidevices-controller
v0.2.7
v0.3.2

Done

(add-on) rancher/harvester-eventrouter
v0.1.2
v0.1.2

(add-on) seeder
0.1.2
0.1.2

Charts:

v1.2.2
v1.3-head
New version
Owner

harvester-network-controller
v0.3.3
v0.3.3
v0.4.0
@mingshuoqiu

harvester-node-disk-manager
v0.5.0
v0.6.0

Done

harvester-load-balancer
v0.2.0
v0.2.0
v0.3.0
@Yu-Jack

harvester-node-manager
v0.1.5
v0.2.3

Done

(add-on) vm-import-controller
v0.1.8
v0.1.8

(add-on) pcidevices-controller
v0.2.7
v0.3.2

Done

(add-on) rancher-logging
103.0.0+up3.17.10
103.0.0+up3.17.10

-

(add-on) rancher-monitoring
103.0.3+up45.31.1
103.0.3+up45.31.1

-

(add-on) seeder
0.1.1
0.1.1

@bk201 I don't see there is v0.3.0 in https://github.com/harvester/load-balancer-harvester/releases, there is only v0.2.6.

@Yu-Jack yes, so we need to create a new version and a branch for 0.2.x

The image rancher/harvester-eventrouter will have a v0.1.3 version after the GHA EIO ticket is done.

Confirmed updates in v1.3 ISO
Images:
$ kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq | grep -E "seeder|vm-import|load-balancer|harvester-network"
rancher/harvester-load-balancer:v0.3.0
rancher/harvester-load-balancer-webhook:v0.3.0
rancher/harvester-network-controller:v0.4.0
rancher/harvester-network-webhook:v0.4.0
rancher/harvester-seeder:v0.3.0
rancher/harvester-vm-import-controller:v0.3.0

Charts:
$ helm list -A  | grep -E 'seeder|vm-import'
harvester-seeder                           	harvester-system               	1       	2024-06-05 08:48:37.326344333 +0000 UTC	deployed	harvester-seeder-0.3.0                                                                           	v0.3.0
vm-import-controller                       	harvester-system               	1       	2024-06-05 08:48:29.36765968 +0000 UTC 	deployed	harvester-vm-import-controller-0.3.0                                                             	v0.3.0

Update of eventrouter:
(1) new container image:
https://github.com/harvester/eventrouter/releases/tag/v0.3.0
is blocking by https://github.com/rancherlabs/eio/issues/2354
(2) bump image to addon
https://github.com/harvester/addons/pull/1
(3) build image list
https://github.com/harvester/harvester-installer/pull/752
(4) upgrade path
TBD

Test OK on v1.3.1-rc2 for following 3 cases

Fresh install
Upgrade from 1.2.2 -> enable addons
Enable addons -> Upgrade from 1.3.0

Close as done.
Environment

harvester-v1.3.1-rc2

Profile: 2 nodes QEMU/KVM (8C/16G/500G)
ui-source: Auto

Test Suite
Fresh Install

Check images tags

Done

v1.2.2
v1.3-head
Suggested new version
Check

🟢
harvester-network-controller
v0.3.7
v0.3.6
v0.4.0
:heavy_check_mark: rancher/harvester-network-controller:v0.4.0

🟢
harvester-node-disk-manager
v0.5.5
v0.6.3

:heavy_check_mark: rancher/harvester-node-disk-manager:v0.6.3

🟢
harvester-load-balancer
v0.2.6
v0.2.5
v0.3.0
:heavy_check_mark: rancher/harvester-load-balancer:v0.3.0

🟢
harvester-node-manager
v0.1.10
v0.2.1

:heavy_check_mark: rancher/harvester-node-manager:v0.2.1

🟢
(add-on) vm-import-controller
v0.1.8
v0.1.8
v0.3.0
:heavy_check_mark: rancher/harvester-vm-import-controller:v0.3.0

🟢
(add-on) pcidevices-controller
v0.2.7
v0.3.2

:heavy_check_mark: rancher/harvester-pcidevices:v0.3.2

🟢
(add-on) rancher/harvester-eventrouter
v0.1.2
v0.1.2
v0.2.0
:heavy_check_mark: rancher/harvester-eventrouter:v0.2.0

🟢
(add-on) seeder
0.1.2
0.1.2
0.3.0
:heavy_check_mark: rancher/harvester-seeder:v0.3.0

Check charts

Done

v1.2.2
v1.3-head
Suggested new version
Check

🟢
harvester-node-disk-manager
v0.5.0
v0.6.0

:heavy_check_mark: harvester-node-disk-manager-0.6.0

🟢
harvester-node-manager
v0.1.5
v0.2.3

:heavy_check_mark: harvester-node-manager-0.2.3

🟢
(add-on) vm-import-controller
v0.1.8
v0.1.8
v0.3.0
:heavy_check_mark: rancher/harvester-vm-import-controller:v0.3.0

🟢
(add-on) pcidevices-controller
v0.2.7
v0.3.2

:heavy_check_mark: harvester-pcidevices-controller-0.3.2

🟢
(add-on) rancher-logging
103.0.0+up3.17.10
103.0.0+up3.17.10

:heavy_check_mark: rancher-logging-103.0.0+up3.17.10

🟢
(add-on) rancher-monitoring
103.0.3+up45.31.1
103.0.3+up45.31.1

:heavy_check_mark: rancher-monitoring-103.0.3+up45.31.1

🟢
(add-on) seeder
0.1.1
0.1.1
v0.3.0
:heavy_check_mark: harvester-seeder-0.3.0

Upgrade v1.2.2 -> v1.3.1-rc2 (Enable addon after upgrade)

 Upgrade v1.2.2 -> v1.3.1-rc2

Check images tags

Done

v1.2.2
v1.3-head
Suggested new version
Check

🟢
harvester-network-controller
v0.3.7
v0.3.6
v0.4.0
:heavy_check_mark:  rancher/harvester-network-controller:v0.4.0

🟢
harvester-node-disk-manager
v0.5.5
v0.6.3

:heavy_check_mark: rancher/harvester-node-disk-manager:v0.6.3

🟢
harvester-load-balancer
v0.2.6
v0.2.5
v0.3.0
:heavy_check_mark: rancher/harvester-load-balancer:v0.3.0

🟢
harvester-node-manager
v0.1.10
v0.2.1

:heavy_check_mark: rancher/harvester-node-manager:v0.2.1

🟢
(add-on) vm-import-controller
v0.1.8
v0.1.8
v0.3.0
:heavy_check_mark: rancher/harvester-vm-import-controller:v0.3.0

🟢
(add-on) pcidevices-controller
v0.2.7
v0.3.2

:heavy_check_mark: rancher/harvester-pcidevices:v0.3.2

🟢
(add-on) rancher/harvester-eventrouter
v0.1.2
v0.1.2
v0.2.0
:heavy_check_mark: rancher/harvester-eventrouter:v0.2.0

🟢
(add-on) seeder
0.1.2
0.1.2
0.3.0
:heavy_check_mark: rancher/harvester-seeder:v0.3.0

Check charts

Done

v1.2.2
v1.3-head
Suggested new version
Check

🟢
harvester-node-disk-manager
v0.5.0
v0.6.0

:heavy_check_mark: harvester-node-disk-manager-0.6.0

🟢
harvester-node-manager
v0.1.5
v0.2.3

:heavy_check_mark: harvester-node-manager-0.2.3

🟢
(add-on) vm-import-controller
v0.1.8
v0.1.8
v0.3.0
:heavy_check_mark: harvester-vm-import-controller-0.3.0

🟢
(add-on) pcidevices-controller
v0.2.7
v0.3.2

:heavy_check_mark: harvester-pcidevices-controller-0.3.2

🟢
(add-on) rancher-logging
103.0.0+up3.17.10
103.0.0+up3.17.10

:heavy_check_mark: rancher-logging-103.0.0+up3.17.10

🟢
(add-on) rancher-monitoring
103.0.3+up45.31.1
103.0.3+up45.31.1

:heavy_check_mark: rancher-monitoring-103.0.3+up45.31.1

🟢
(add-on) seeder
0.1.1
0.1.1
v0.3.0
:heavy_check_mark: harvester-seeder-0.3.0

Upgrade v1.3.0 -> v1.3.1-rc2 (Enable addon before upgrade)

 Enable Addons

 Upgrade v1.3.0 -> v1.3.1-rc2

Check images tags

Done

v1.2.2
v1.3-head
Suggested new version
Check

🟢
harvester-network-controller
v0.3.7
v0.3.6
v0.4.0
:heavy_check_mark: rancher/harvester-network-controller:v0.4.0

🟢
harvester-node-disk-manager
v0.5.5
v0.6.3

:heavy_check_mark: rancher/harvester-node-disk-manager:v0.6.3

🟢
harvester-load-balancer
v0.2.6
v0.2.5
v0.3.0
:heavy_check_mark: rancher/harvester-load-balancer:v0.3.0

🟢
harvester-node-manager
v0.1.10
v0.2.1

:heavy_check_mark: rancher/harvester-node-manager:v0.2.1

🟢
(add-on) vm-import-controller
v0.1.8
v0.1.8
v0.3.0
:heavy_check_mark: rancher/harvester-vm-import-controller:v0.3.0

🟢
(add-on) pcidevices-controller
v0.2.7
v0.3.2

:heavy_check_mark: rancher/harvester-pcidevices:v0.3.2

🟢
(add-on) rancher/harvester-eventrouter
v0.1.2
v0.1.2
v0.2.0
:heavy_check_mark: rancher/harvester-eventrouter:v0.2.0

🟢
(add-on) seeder
0.1.2
0.1.2
0.3.0
:heavy_check_mark: rancher/harvester-seeder:v0.3.0

Check charts

Done

v1.2.2
v1.3-head
Suggested new version
Check

🟢
harvester-node-disk-manager
v0.5.0
v0.6.0

:heavy_check_mark: harvester-node-disk-manager-0.6.0

🟢
harvester-node-manager
v0.1.5
v0.2.3

:heavy_check_mark: harvester-node-manager-0.2.3

🟢
(add-on) vm-import-controller
v0.1.8
v0.1.8
v0.3.0
:heavy_check_mark: harvester-vm-import-controller-0.3.0

🟢
(add-on) pcidevices-controller
v0.2.7
v0.3.2

:heavy_check_mark: harvester-pcidevices-controller-0.3.2

🟢
(add-on) rancher-logging
103.0.0+up3.17.10
103.0.0+up3.17.10

:heavy_check_mark: rancher-logging-103.0.0+up3.17.10

🟢
(add-on) rancher-monitoring
103.0.3+up45.31.1
103.0.3+up45.31.1

:heavy_check_mark: rancher-monitoring-103.0.3+up45.31.1

🟢
(add-on) seeder
0.1.1
0.1.1
v0.3.0
:heavy_check_mark: harvester-seeder-0.3.0


The program has stopped running.

Dear author, hello, I have a question. When I run your program, that is, when I run export CUDA_VISIBLE_DEVICES = "0" && python3 main.py --is_sim --obj_mesh_dir objects / blocks --num_obj 10 --push_rewards --experience_replay --random_actions --use_commonsense --explore_rate_decay --future_reward_discount 0.70 --max_iter 50000 --save_visualization, the robotic arm can run normally. However, when I run to about 800 rounds, that is, Trainer iteration = 800 +, the whole program will stop running, the robotic arm will no longer move, and there will be no output in the terminal either. But the simulation software and code are running normally without feeding back any errors. Why is this?

Hello,
Yes, this problem can occur, it is the Coppelliasim problem. To resolve
this issue whenever it occurs, kindly use these steps.
One way to continue training is to specify the appropriate time-stamp
folder  --> [USER_FOLDER] which can be found in the logs folder.
After then, use the code below;
export CUDA_VISIBLE_DEVICES="0" && python3 main.py --is_sim --obj_mesh_dir
objects/blocks --num_obj 10 --push_rewards --experience_replay
--random_actions --use_commonsense --explore_rate_decay
--future_reward_discount 0.70 --max_iter 50000 --save_visualization
--load_snapshot --snapshot_file
'./logs/[USER_FOLDER]/models/snapshot-backup.reinforcement.pth'
--continue_logging --logging_directory './logs/USER_FOLDER'
If you encounter any other issues, please let me know.
All the best,
Emmanuel
On Mon, Dec 30, 2024 at 7:03 PM 狂小澳 @.***> wrote:

Dear author, hello, I have a question. When I run your program, that is,
when I run export CUDA_VISIBLE_DEVICES = "0" && python3 main.py --is_sim
--obj_mesh_dir objects / blocks --num_obj 10 --push_rewards
--experience_replay --random_actions --use_commonsense --explore_rate_decay
--future_reward_discount 0.70 --max_iter 50000 --save_visualization, the
robotic arm can run normally. However, when I run to about 800 rounds, that
is, Trainer iteration = 800 +, the whole program will stop running, the
robotic arm will no longer move, and there will be no output in the
terminal either. But the simulation software and code are running normally
without feeding back any errors. Why is this?
1.jpg (view on web)
https://github.com/user-attachments/assets/27da6868-22d5-4e9a-b84a-f06182e8f513
—
Reply to this email directly, view it on GitHub
https://github.com/Emmanuel-Okafor/DRL_for_Object_Sorting/issues/1, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ATRWPS5NJZ6IUCWDVV2XSU32IFVEPAVCNFSM6AAAAABUMHZ6QKVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DGNBQGY3DAMA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Use fallback editor if $EDITOR undefined

Apparently I did not have $EDITOR set, however debian based systems have the editor symlink. This caused issues for me when trying to create a new note:
$ ./notes new test
./notes: line 71: /home/user/notes/test.md: No such file or directory

This PR thus uses that binary in case $EDITOR is unset.
Edit: because of issue #2 I don't know how to add a test-case for this :(

Awesome, thanks! Didn't know that about debian, great spot.
I've merged this and added tests, it'll be in the next release (0.1.2) which I'll be putting out later today.
I've also received #6 too, with a different solution (fail if no $EDITOR is set) - I'm just going to combine the two: use $EDITOR if possible, fall back to editor, or throw a nice error.
Thanks so much!


Django 1.11 support?

Are there any side effects to using this in Django 1.11 by updating the dependencies (social-auth-core==1.2.0 and social-auth-app-django==1.1.0)? As far as I can tell, the only error in Django 1.11 is due to python-social-auth/social-app-django#24, which is fixed by the latest releases of social-auth-core and social-app-django.
Related commit: b02f99f89321ea8f1f05468591d4f157d982ad49

seems to work fine on django 1.11, I've pulled 1.1.0 tag version of lib and updated tox file in order to test with latest django social-auth-core and social-auth-app-django. test were ok

Related PR: https://github.com/st4lk/django-rest-social-auth/pull/54

The lib should support Django 1.11.
If there are any errors regarding this, please reopen.


Proofread the Docs Site

Please proofread and find bugs if you do, please comment under this issue if there are any issues.

Removed Milestone since it does not apply to the deployment of the docs site.


[BUG]: event.json has extra variable that does not pass bids-validator

Is there an existing issue for this?

[X] I have searched the existing issues

Expected Behavior
That events.json files have been passing the bids-validator without any issues. Now (maybe in the last month's update?) it does not pass anymore.
Current Behavior
cpp-bids repo produces events.json file with the below variable:
  "StimulusPresentation": {
    "OperatingSystem": "MACI64",
    "SoftwareRRID": "SCR_002881",
    "Code": "",
    "SoftwareVersion": "3.0.16",
    "SoftwareName": "Psychtoolbox on Matlab - <IP_ADDRESS>3579 (R2017b)"
  },

That is new edition to .json file, and bids validator error message is:
sub-pil006_ses-001_task-somatotopy_run-004_events.json
Location:
raw/sub-pil006/ses-001/func/sub-pil006_ses-001_task-somatotopy_run-004_events.json

Reason:
Invalid JSON file. The file is not formatted according the schema.

Evidence:
.StimulusPresentation.Code should match format "uri"

Error message
No response
Environment
- OS:macOS Catalina 10.15
- Matlab: 2017b
- SPM: n/a

Branch
- branch: dev branch, 052381b32ce037d1adb90eb512717d486a26628a and also in this commit, I replicated the issue: 627ceef5d8a9c3dc08b918fe0381b5acc64b56e0
- version:

Anything else?
I might be lost in the branches etc, please take my bug report with caution.

Aha! The issue/bug does not occur in this commit: 3c20a7d1286887c6f55996009b43d9d141f42423

I think this actually a CPP_PTB issue, CPP_BIDS does not set default value for the stimulusPresentation object

Comes from here: https://github.com/cpp-lln-lab/CPP_PTB/blob/2a5bb3375d162f9635f8f04b59ca3235514ddfa5/src/initPTB.m#L116


ngrx questions

Dear Devs,
We wish to further implement NGRX2 on out platform (which serves 300+ sites, fully skinned and customizable) we have a few questions regarding the following topics

Page: your documentation describes “Smart, or Container components should be your root level, routable components.“. suppose we have inside the route we have a component that should be used in a few routes/pages. Meaning we need to implement input and output routes in each page.
Is it not wiser to build a single entity the can implement these common routes. For example, we have a chat dumb component which has many inputs and outputs handled by the container and we wish to use it in may pages/routes in our application, what’s best way to tackle it.

Folder structure within the application.
Currently we have arranged our folder to represent the modules structure. For example, the chat module that contains reducers, actions, each in its own folder per specific folder. In your examples you have broken down the folders to each class type (reducers folder/ actions folder…) for the entire application. What’s the best practice to combine those approaches.

Effects: when should we use the effects, for example A-sync  flows. Could someone summarize it as a moto sentence: “we should use effects in the following  scenario… ”

What is the main advantages in using nrgx/router with guards Vs using angular Router ?

  In other words, yes your smart components can be comprised of multiple dumb components and vice versa.

Organizing large applications with the ngrx platform is still a work in progress. I would try to find big app examples for React/Redux to learn from.

"You should use effects to wrap all side effects in your application"

ngrx/router's advantages have been re-implemented in the new @angular/router. I'd recommend building new apps on top of that router instead.


Report back when an authorization has been denied at the system level

Or give some customizable alert responses?

Fixed (not for notifications) in 4ec7c7ea29af9b4d87e5a4b2bd1d5b4ebda7a6fb


Mermaid gantt diagrams render differently based on viewport size

Description
https://try.gitea.io/silverwind/symlink-test/issues/4#issuecomment-162691
It seems mermaid gantt diagrams render differently based on browser viewport size (zoom or resize browser window) even thought the rendered area does not change. We should check if we can get mermaid to ignore viewport size and always render the big readable version.
Small viewport:

Big viewport

Same here on github:
gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d

Gitea Version
latest
Can you reproduce the bug on the Gitea demo site?
Yes

Is there a version for Gitea?

Is there a version for Gitea?

From my test, still exists in latest code.

I came here with the same behavior in mermaid on my gantt charts without a solution yet.
I am rendering the mermaid gantt chart in markdown and nothing of this helps:
---
width: 500px
height: 400px
---
%%{init: {'theme': 'forest', 'width': '500px' } }%%
gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d

---
width: 500px
height: 400px
---
%%{init: {'theme': 'forest', 'max-width': '500px' } }%%
gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d

Though GitHub itself does not seem to have this issue somehow.. :)


MNT: Re-rendered with conda-smithy 1.4.6 [ci skip]

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


README: Add testing instructions referencing Makefile

https://github.com/openSUSE/qem-bot/pull/25

https://github.com/openSUSE/qem-bot/pull/25

I get:
% make test
py.test
…

@perlpunk You fixed that with #25, thank you. Can you approve now?


Include a detail url for imports of single datasets

Apart from GeoPackages, the other dataset imports should include a detailUrl in the response when the import is completed.

@DavidQuartz to avoid the change of the execution_request model is it a big deal if we add the detailed URL in the output_params field?
ps: we can provide them also for the GPKG

@DavidQuartz @giohappy this is what i mean:
For single layers, the payload will be:

While for import for multiple layers will be:

If needed we can also add the layer name

@DavidQuartz did you stop on this?

@DavidQuartz please estimate this.

@giohappy Currently we have a View Datasets button which links back to the catalogue page filtered to datasets. Can you clarify the requirements of the client? Since we have a list of links how would we want the client to behave.

@DavidQuartz the requirement is to link directly to the dataset when only one dataset has been created. This is the behaviour of the current upload (you can see on development demo for example)

@giohappy that would mean showing a View button when the length of the url list is 1, and showing a View Datasets button it's more than 1 url?
@mattiagiupponi Can you confirm how the url list is populated? Will there be a case where the length may be one for a while and then increase as more datasets are created in the import process (eg with gpkgs)?

@mattiagiupponi Can you confirm how the url list is populated? Will there be a case where the length may be one for a while and then increase as more datasets are created in the import process (eg with gpkgs)?

If the requirement is to have just the URL when is a single dataset, we can return the URL only for that case and not in the case of gpkg.
Something like this looks good @DavidQuartz ?
{
    "output_params": {
        "detail_url": "/catalogue/#/dataset/{pk}"
    }
}

@mattiagiupponi so that the client will only check based on the datatype of the detail_url? Looks ok. @giohappy ?

@mattiagiupponi so that the client will only check based on the datatype of the detail_url? Looks ok. @giohappy ?

@DavidQuartz when u mean "on the datatype of the detail_url"?
Is easier... if the detail_url is there u can get it and show the button otherwise no (we are not going to add the URL if is more than 1 dataset)

I would estimate a few hours if the backend is ready


Add introduction and links to the new guide to the vLLM optimized Doc…

…ker image on AMD Infinity Hub
Three guides were updated with a link to the new guide (URL not yet known) and a very brief introduction.
This guide is currently linking back to the main AMD Infinity Hub because we don't know the actual link yet. This must be updated later.

The changes look good. Once we have the Infinity hub URL, I will share it with you.

Hi @cindylee2, do you have the specific Infinity Hub URL?

Please use this link instead of the Infinity Hub URL. We'll directly send users to the GitHub page.
https://github.com/ROCm/MAD/vllm_benchmark.md

Please use this link instead of the Infinity Hub URL. We'll directly send users to the GitHub page. https://github.com/ROCm/MAD/vllm_benchmark.md

Hi @cindylee2  the link has changed to
https://github.com/ROCm/MAD/benchmark/vllm/README.md
FYI.


require is not defined

hi, I got this error.
index.js:5 Uncaught ReferenceError: require is not defined
at this line:
__export(require('./store'));
why?

it's because i run this twice.


Can not include i18n files when using model

Hi team,
I want to use odatav2proxy to read a folder of srv files to achieve i18n function, but when I enter a path of folder, it reports error as follow:
May 15, 2024 05:03:00 PM Logger.js [lw7lgdk0] ERROR: Couldn't find a CDS model for 'undefined' in /Users/*/Documents/GitHub/*/approuter
Error: Couldn't find a CDS model for 'undefined' in /Users/*/Documents/GitHub/*/approuter
    at cds.load (/Users/*/Documents/GitHub/*/approuter/node_modules/@sap/cds/lib/compile/load.js:11:36)
    at /Users/*/Documents/GitHub/*/approuter/node_modules/@sap/cds-odata-v2-adapter-proxy/lib/index.js:683:26
    at prepareMetadata (/Users/*/Documents/GitHub/*/approuter/node_modules/@sap/cds-odata-v2-adapter-proxy/lib/index.js:696:24)
    at getDefaultMetadata (/Users/*/Documents/GitHub/*/approuter/node_modules/@sap/cds-odata-v2-adapter-proxy/lib/index.js:676:18)
    at getMetadata (/Users/*/Documents/GitHub/*/approuter/node_modules/@sap/cds-odata-v2-adapter-proxy/lib/index.js:606:24)
    at /Users/*/Documents/GitHub/*/approuter/node_modules/@sap/cds-odata-v2-adapter-proxy/lib/index.js:285:33
    at /Users/*/Documents/GitHub/*/approuter/node_modules/@sap/cds-odata-v2-adapter-proxy/lib/index.js:293:11
    at Layer.handle [as handle_request] (/Users/*/Documents/GitHub/*/approuter/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/*/Documents/GitHub/*/approuter/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/Users/*/Documents/GitHub/*/approuter/node_modules/express/lib/router/route.js:119:3)
#2.0#2024 05 15 17:03:05:482#+08:00#INFO#/requestHandler#####6958e405-0e94-441e-ab15-15567b34fd59####Kq1KTdf6_WQ3u867TDGp2DbMznHzVwMg######lw7lghs7#PLAIN##Missing internal url for request url /sap/opu/odata/sap/ESH_SEARCH_SRV/ServerInfos?$expand=Services/Capabilities#

The script to generate srv.json with i18n is like:
"cds build --clean && cds compile srv -s all -l all -o ./approuter/srv"

The code used as following and it's written in */approuter/index.js:
const approuter = require("@sap/approuter");
const router = approuter();

    router.beforeRequestHandler
    .use(pathV2, expressInit)
    .use(odatav2proxy({
        path: '',
        target: '',
        model: `${__dirname}/srv`,
        services: {
            ""
        },
    }));

And here is versions of modules used:
  "dependencies": {
    "@sap/approuter": "latest",
    "@sap/cds": "^7.2.0",
    "@sap/cds-mtxs": "^1.9.1",
    "@sap/cds-odata-v2-adapter-proxy": "1.8.16"
  },

According to the document, the default value of model is 'all', so I think there must be a way to add more than one srv files into model. I have tried some ways but it doesn't work. Maybe you experts can give me some suggestions about this, thank you!

Thanks for reporting your questions. In general I have the following remarks:

@sap/cds-odata-v2-adapter-proxy is deprecated and not maintained since over an year. Please use the replacement @cap-js-community/odata-v2-adapter.
I also would recommend to always use the latest CDS release, currently CDS 7.9
Is there as specific reason, why you want to have the CDS OData V2 adapter in approuter module? Normally approuter and CDS backend are two different apps, and the CDS OData V2 adapter belongs more to the CDS backend.
Then the CDS OData V2 adapter would auto-detect the CSN including all i18n bundles, without configuration running as CDS plugin
Your path, target and services configuration does not look correct. This would basically do nothing and CDS OData V2 adapter would not work correctly.
Of course you can specific a model, and you can compile a single CSN including all services and all entities via the command  cds srv -s all -o . (no cdd build necessary before). To get localization working, you need to make sure, that the i18n files reside next to the generated csn (srv.json) in an i18n sub-folder. Similar how it is done when calling cds build --production in gen/srv folder
The model does not point to a folder, but to the generated CSN srv.json or csn.json. CDS load will then lookup the i18n files residing relatively next to the CSN in i18n or _i18n folders
Details you can find here: https://github.com/cap-js-community/odata-v2-adapter?tab=readme-ov-file#additional-considerations

In general my recommendation would be to try the default CDS plugin path (https://github.com/cap-js-community/odata-v2-adapter?tab=readme-ov-file#getting-started), because everything is set up already, what you are trying to do manually now...


Support entire message objects in convo handlers. Fixes #1793 and #1710

This merge request allows botkit conversation handlers (those that go with addQuestion api) to receive full message objets. ( Fixes #1710 )
Also any augmentation done by botkit middlewares to messages are now available in handlers. This is especially useful for NLU intent and entity identification (i.e. if any of the handlers need to know them) ( Fixes #1793 )

Thanks for this work.
I have some initial concerns about breaking changes - even things like changing text from optional to required could break things for devs.
Does this change the signature of any handlers?

Hi @benbrown, thanks for replying. This does not change signatures for any existing handlers. The change is completely internal to botkit.
In fact existing conversation handlers (in botkit v0.7x) expected message objects which changed to only text. Also in case of questions only text can anyway be captured in capture key (as a convo var)
The BotkitMessage text was made a 'required' property because the class that it extends from has that set as required.
Thanks,
A

I am on this and plan to get it reviewed and included in the next release if at all possible.

Hi @naikus,
After careful review of this I can't accept it in its current state.
The key issue is that changing the signature of the handler functions that currently receive a string value to receiving the entire message payload is a breaking change.
However, I do think this is a valid issue and you've done 90% of the work.
In order to merge this, I request the following change:
Instead of swapping the text field for the full message, add an additional parameter to the handler signature.
This would result in a function that receives (answer, convo, bot, full_message)
This way, the change is additive and will not break existing bots.

Hi @benbrown, I agree. I'll make the changes and to the signature and push the changes for review.
Thanks!

Thanks @naikus! Ping me when you push the new commits.

@naikus Any updates on this?

@naikus Any updates on this?

Hi @etiennellipse
I'm a bit busy with some tasks. But I'll have this push in soon. (End of dec tentatively or earlier if possible)
Thanks,
Aniket

+1

working on merging this now.

snag #1: the way this is implemented to create a new turncontext breaks a bunch of the expected adapter behavior regarding the turn state.  however, without it, we don't get access to the message object we want.
experimenting!

phew! I was able to work around that issue by using the turnContext.turnState to store the botkit message and make it available inside the dialog.

OK! This functionality is included in the next release -> #1921

@benbrown nice one! Any idea when the new release is likely to be made available?

@adam-resdiary this week unless a big snag is encountered on the botbuilder 4.8 release, which I am waiting for. Should be tomorrow!

AT LONG LAST, this has been merged!

@benbrown, does this work also for the convo.after handler? The documentation does not include a full_message parameter in there. I'm realizing this would resolve a legacy migration issue that I'm having ( in which I need the full message object once a -single question- dialog ends). In legacy botkit I was able to use a dynamic convo for this (created within a controller.hears() handler).


Installation instructions for OpenBSD inaccurate, package does not exist.

https://gohugo.io/getting-started/installing/

OpenBSD provides a package for Hugo via pkg_add:
doas pkg_add hugo

The package does not exist in OpenBSD 6.1, 6.2, or 6.3 repos.

Please post documentation related issues here: https://github.com/gohugoio/hugoDocs/issues


Error when browserifying react-select2-wrapper module

I am getting the following error when trying to browserify the wrapper
SyntaxError: node_modules/react-select2-wrapper/src/components/Select2.jsx: Unexpected token (5:19)
3 |
4 | export default class Select2 extends React.Component {

5 |   static propTypes = {
|                    ^
6 |     data: React.PropTypes.array,
7 |     events: React.PropTypes.array,
8 |     options: React.PropTypes.object,

Please try to upgrade a component, I released an update (0.0.3).
Added compile from es6 to es5.

I closed. If you have any problems, let me know.


swap out internal copy of qwt for git submodule

We don't actually need the embedded copy, its just for special situations where its hard to get pre-built qwt. An optional submodule would be preferable:

qwt mirrored here: https://github.com/osakared/qwt/tree/tags/qwt-6.1.2

Also, this is now part of the separate plotters project:
https://github.com/pothosware/pothos/commit/7580eadb0427fa98f2c5c36051e8b51aecbc09d8


queryProductDetails not fetching product details from Google play store.

queryProductDetails not fetching product details from Google play store.
As i'm using latest version of in-app-purchase plugin.

As per R&D i've added if(isAvailable) condition.

 if (isAvailable) {
      final ProductDetailsResponse productDetailResponse =
          await _inAppPurchase.queryProductDetails(_kProductIds.toSet());
      if (productDetailResponse.error == null) {
        setState(() {
          _products = productDetailResponse.productDetails;

        });
      }

Then i updated billing library version:
implementation "com.android.billingclient:billing:4.0.0"

Still i'm unable to fetch product list.

Hi, @Pratiksha0796 have you completed the setup process outlined in https://github.com/flutter/plugins/blob/main/packages/in_app_purchase/in_app_purchase/example/README.md?
How long has it been since you uploaded your apk to the store?
Please provide the output of flutter doctor -v.
Also, if you're using the latest version of the plugin you do not need to add the play billing library yourself as it will be added by the plugin.

Hi, @danagbemava-nc , Thank you for response,
Yes, i have go through documentation.

I uploaded alpha version of app on google play store on 4/11/2022 and its in review state from last 4 days.
Output of flutter doctor -v

inapp> flutter doctor -v
[√] Flutter (Channel stable, 3.3.2, on Microsoft Windows [Version 10.0.19043.2130], locale en-US)
• Flutter version 3.3.2 on channel stable at C:\src\flutter3
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e3c29ec00c (8 weeks ago), 2022-09-14 08:46:55 -0500
• Engine revision a4ff2c53d8
• Dart version 2.18.1
• DevTools version 2.15.0
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at D:\AndroidSDK
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = D:\AndroidSDK
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.3)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
[√] VS Code (version 1.73.0)
• VS Code at C:\Users\prati\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.52.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19043.2130]
• Chrome (web)      • chrome  • web-javascript • Google Chrome 106.0.5249.119
• Edge (web)        • edge    • web-javascript • Microsoft Edge 106.0.1370.47
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Now as you said, I can remove billing library and will check once.
Please suggest any other changes which i can make in code.

Hi, @danagbemava-nc ,
I removed billing library and again uploaded alpha app but still i'm not getting product list in my app.

Hi @Pratiksha0796, has the account that you're using been added as a License Tester in the play console?
Please also provide the full code sample that you're using.
Please also provide the version of in_app_purchase_android you're using. You can find this in your pubspec.lock.
Thank you

Hi @danagbemava-nc ,
Yes, I have added License Tester and I'm using same account for testing.
in_app_purchase_android version  - in_app_purchase_android:
dependency: transitive
description:
name: in_app_purchase_android
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.3+6"
main.dart
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:in_app_purchase/in_app_purchase.dart';
import 'package:in_app_purchase_android/billing_client_wrappers.dart';
import 'package:in_app_purchase_android/in_app_purchase_android.dart';
import 'package:in_app_purchase_storekit/in_app_purchase_storekit.dart';
import 'package:in_app_purchase_storekit/store_kit_wrappers.dart';
import 'consumable_store.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(MyApp());
}
// Auto-consume must be true on iOS.
// To try without auto-consume on another platform, change true to false here.
final bool _kAutoConsume = Platform.isIOS || true;
const String _kConsumableId = 'consumable';
const String _kSilverSubscriptionId = 'weekly_07';
const String _kGoldSubscriptionId = 'monthly_30';
const List _kProductIds = [
_kSilverSubscriptionId,
_kGoldSubscriptionId,
];
class MyApp extends StatefulWidget {
@override
State createState() => MyAppState();
}
class MyAppState extends State {
final InAppPurchase _inAppPurchase = InAppPurchase.instance;
late StreamSubscription<List> _subscription;
List _notFoundIds = [];
List _products = [];
List _purchases = [];
List _consumables = [];
bool _isAvailable = false;
bool _purchasePending = false;
bool _loading = true;
String? _queryProductError;
@override
void initState() {
final Stream<List> purchaseUpdated =
_inAppPurchase.purchaseStream;
_subscription =
purchaseUpdated.listen((List purchaseDetailsList) {
_listenToPurchaseUpdated(purchaseDetailsList);
}, onDone: () {
_subscription.cancel();
}, onError: (Object error) {
// handle error here.
});
initStoreInfo();
super.initState();
}
Future initStoreInfo() async {
final bool isAvailable = await _inAppPurchase.isAvailable();
if (!isAvailable) {
setState(() {
_isAvailable = isAvailable;
_products = [];
_purchases = [];
_notFoundIds = [];
_consumables = [];
_purchasePending = false;
_loading = false;
});
return;
}
if (Platform.isIOS) {
  final InAppPurchaseStoreKitPlatformAddition iosPlatformAddition =
      _inAppPurchase
          .getPlatformAddition<InAppPurchaseStoreKitPlatformAddition>();
  await iosPlatformAddition.setDelegate(ExamplePaymentQueueDelegate());
}

if (_isAvailable) {
  final ProductDetailsResponse productDetailResponse =
    await _inAppPurchase.queryProductDetails(_kProductIds.toSet());

if(productDetailResponse.error == null) {
  setState(() {
    _products = productDetailResponse.productDetails;
         debugPrint(_products.toString());
debugPrint('Product list----------------------');
  });
}
if (productDetailResponse.error != null) {
  setState(() {
    _queryProductError = productDetailResponse.error!.message;
    _isAvailable = isAvailable;
    _products = productDetailResponse.productDetails;
    _purchases = <PurchaseDetails>[];
    _notFoundIds = productDetailResponse.notFoundIDs;
    _consumables = <String>[];
    _purchasePending = false;
    _loading = false;
  });
  return;
}

if (productDetailResponse.productDetails.isEmpty) {
  setState(() {
    _queryProductError = null;
    _isAvailable = isAvailable;
    _products = productDetailResponse.productDetails;
    _purchases = <PurchaseDetails>[];
    _notFoundIds = productDetailResponse.notFoundIDs;
    _consumables = <String>[];
    _purchasePending = false;
    _loading = false;
  });
  return;
}

final List<String> consumables = await ConsumableStore.load();
setState(() {
  _isAvailable = isAvailable;
  _products = productDetailResponse.productDetails;
  _notFoundIds = productDetailResponse.notFoundIDs;
  _consumables = consumables;
  _purchasePending = false;
  _loading = false;
});

}
else {
print('Store not available');
}
}
@override
void dispose() {
if (Platform.isIOS) {
final InAppPurchaseStoreKitPlatformAddition iosPlatformAddition =
_inAppPurchase
.getPlatformAddition();
iosPlatformAddition.setDelegate(null);
}
_subscription.cancel();
super.dispose();
}
@override
Widget build(BuildContext context) {
final List stack = [];
if (_queryProductError == null) {
stack.add(
ListView(
children: [
_buildConnectionCheckTile(),
_buildProductList(),
_buildConsumableBox(),
_buildRestoreButton(),
],
),
);
} else {
stack.add(Center(
child: Text(_queryProductError!),
));
}
if (_purchasePending) {
stack.add(
Stack(
children: const [
Opacity(
opacity: 0.3,
child: ModalBarrier(dismissible: false, color: Colors.grey),
),
Center(
child: CircularProgressIndicator(),
),
],
),
);
}
return MaterialApp(
  home: Scaffold(
    appBar: AppBar(
      title: const Text('inapp Example'),
    ),
    body: Stack(
      children: stack,
    ),
  ),
);

}
Card _buildConnectionCheckTile() {
if (_loading) {
return const Card(child: ListTile(title: Text('Trying to connect...')));
}
final Widget storeHeader = ListTile(
leading: Icon(_isAvailable ? Icons.check : Icons.block,
color: _isAvailable
? Colors.green
: ThemeData.light().colorScheme.error),
title:
Text('The store is ${_isAvailable ? 'available' : 'unavailable'}.'),
);
final List children = [storeHeader];
if (!_isAvailable) {
  children.addAll(<Widget>[
    const Divider(),
    ListTile(
      title: Text('Not connected',
          style: TextStyle(color: ThemeData.light().colorScheme.error)),
      subtitle: const Text(
          'Unable to connect to the payments processor. Has this app been configured correctly? See the example README for instructions.'),
    ),
  ]);
}
return Card(child: Column(children: children));

}
Card _buildProductList() {
if (_loading) {
return const Card(
child: ListTile(
leading: CircularProgressIndicator(),
title: Text('Fetching products...')));
}
if (!_isAvailable) {
return const Card();
}
const ListTile productHeader = ListTile(title: Text('Products for Sale'));
final List productList = [];
if (_notFoundIds.isNotEmpty) {
productList.add(ListTile(
title: Text('[${_notFoundIds.join(", ")}] not found',
style: TextStyle(color: ThemeData.light().colorScheme.error)),
subtitle: const Text(
'This app needs special configuration to run. Please see example/README.md for instructions.')));
}
// This loading previous purchases code is just a demo. Please do not use this as it is.
// In your app you should always verify the purchase data using the `verificationData` inside the [PurchaseDetails] object before trusting it.
// We recommend that you use your own server to verify the purchase data.
final Map<String, PurchaseDetails> purchases =
    Map<String, PurchaseDetails>.fromEntries(
        _purchases.map((PurchaseDetails purchase) {
  if (purchase.pendingCompletePurchase) {
    _inAppPurchase.completePurchase(purchase);
  }
  return MapEntry<String, PurchaseDetails>(purchase.productID, purchase);
}));
productList.addAll(_products.map(
  (ProductDetails productDetails) {
    final PurchaseDetails? previousPurchase = purchases[productDetails.id];
    return ListTile(
      title: Text(
        productDetails.title,
      ),
      subtitle: Text(
        productDetails.description,
      ),
      trailing: previousPurchase != null
          ? IconButton(
              onPressed: () => confirmPriceChange(context),
              icon: const Icon(Icons.upgrade))
          : TextButton(
              style: TextButton.styleFrom(
                backgroundColor: Colors.green[800],
                // TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
                // ignore: deprecated_member_use
                primary: Colors.white,
              ),
              onPressed: () {
                late PurchaseParam purchaseParam;

                if (Platform.isAndroid) {
                  // NOTE: If you are making a subscription purchase/upgrade/downgrade, we recommend you to
                  // verify the latest status of you your subscription by using server side receipt validation
                  // and update the UI accordingly. The subscription purchase status shown
                  // inside the app may not be accurate.
                  final GooglePlayPurchaseDetails? oldSubscription =
                      _getOldSubscription(productDetails, purchases);

                  purchaseParam = GooglePlayPurchaseParam(
                      productDetails: productDetails,
                      changeSubscriptionParam: (oldSubscription != null)
                          ? ChangeSubscriptionParam(
                              oldPurchaseDetails: oldSubscription,
                              prorationMode:
                                  ProrationMode.immediateWithTimeProration,
                            )
                          : null);
                } else {
                  purchaseParam = PurchaseParam(
                    productDetails: productDetails,
                  );
                }

                if (productDetails.id == _kConsumableId) {
                  _inAppPurchase.buyConsumable(
                      purchaseParam: purchaseParam,
                      autoConsume: _kAutoConsume);
                } else {
                  _inAppPurchase.buyNonConsumable(
                      purchaseParam: purchaseParam);
                }
              },
              child: Text(productDetails.price),
            ),
    );
  },
));

return Card(
    child: Column(
        children: <Widget>[productHeader, const Divider()] + productList));

}
Card _buildConsumableBox() {
if (_loading) {
return const Card(
child: ListTile(
leading: CircularProgressIndicator(),
title: Text('Fetching consumables...')));
}
if (!_isAvailable || _notFoundIds.contains(_kConsumableId)) {
return const Card();
}
const ListTile consumableHeader =
ListTile(title: Text('Purchased consumables'));
final List tokens = _consumables.map((String id) {
return GridTile(
child: IconButton(
icon: const Icon(
Icons.stars,
size: 42.0,
color: Colors.orange,
),
splashColor: Colors.yellowAccent,
onPressed: () => consume(id),
),
);
}).toList();
return Card(
child: Column(children: [
consumableHeader,
const Divider(),
GridView.count(
crossAxisCount: 5,
shrinkWrap: true,
padding: const EdgeInsets.all(16.0),
children: tokens,
)
]));
}
Widget _buildRestoreButton() {
if (_loading) {
return Container();
}
return Padding(
  padding: const EdgeInsets.all(4.0),
  child: Row(
    mainAxisAlignment: MainAxisAlignment.end,
    children: <Widget>[
      TextButton(
        style: TextButton.styleFrom(
          backgroundColor: Theme.of(context).primaryColor,
          // TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
          // ignore: deprecated_member_use
          primary: Colors.white,
        ),
        onPressed: () => _inAppPurchase.restorePurchases(),
        child: const Text('Restore purchases'),
      ),
    ],
  ),
);

}
Future consume(String id) async {
await ConsumableStore.consume(id);
final List consumables = await ConsumableStore.load();
setState(() {
_consumables = consumables;
});
}
void showPendingUI() {
setState(() {
_purchasePending = true;
});
}
Future deliverProduct(PurchaseDetails purchaseDetails) async {
// IMPORTANT!! Always verify purchase details before delivering the product.
if (purchaseDetails.productID == _kConsumableId) {
await ConsumableStore.save(purchaseDetails.purchaseID!);
final List consumables = await ConsumableStore.load();
setState(() {
_purchasePending = false;
_consumables = consumables;
});
} else {
setState(() {
_purchases.add(purchaseDetails);
_purchasePending = false;
});
}
}
void handleError(IAPError error) {
setState(() {
_purchasePending = false;
});
}
Future _verifyPurchase(PurchaseDetails purchaseDetails) {
// IMPORTANT!! Always verify a purchase before delivering the product.
// For the purpose of an example, we directly return true.
return Future.value(true);
}
void _handleInvalidPurchase(PurchaseDetails purchaseDetails) {
// handle invalid purchase here if  _verifyPurchase` failed.
}
Future _listenToPurchaseUpdated(
List purchaseDetailsList) async {
for (final PurchaseDetails purchaseDetails in purchaseDetailsList) {
if (purchaseDetails.status == PurchaseStatus.pending) {
showPendingUI();
} else {
if (purchaseDetails.status == PurchaseStatus.error) {
handleError(purchaseDetails.error!);
} else if (purchaseDetails.status == PurchaseStatus.purchased ||
purchaseDetails.status == PurchaseStatus.restored) {
final bool valid = await _verifyPurchase(purchaseDetails);
if (valid) {
deliverProduct(purchaseDetails);
} else {
_handleInvalidPurchase(purchaseDetails);
return;
}
}
if (Platform.isAndroid) {
if (!_kAutoConsume && purchaseDetails.productID == _kConsumableId) {
final InAppPurchaseAndroidPlatformAddition androidAddition =
_inAppPurchase.getPlatformAddition<
InAppPurchaseAndroidPlatformAddition>();
await androidAddition.consumePurchase(purchaseDetails);
}
}
if (purchaseDetails.pendingCompletePurchase) {
await _inAppPurchase.completePurchase(purchaseDetails);
}
}
}
}
Future confirmPriceChange(BuildContext context) async {
if (Platform.isAndroid) {
final InAppPurchaseAndroidPlatformAddition androidAddition =
_inAppPurchase
.getPlatformAddition();
final BillingResultWrapper priceChangeConfirmationResult =
await androidAddition.launchPriceChangeConfirmationFlow(
sku: 'purchaseId',
);
if (priceChangeConfirmationResult.responseCode == BillingResponse.ok) {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Price change accepted'),
));
} else {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(
priceChangeConfirmationResult.debugMessage ??
'Price change failed with code ${priceChangeConfirmationResult.responseCode}',
),
));
}
}
if (Platform.isIOS) {
final InAppPurchaseStoreKitPlatformAddition iapStoreKitPlatformAddition =
_inAppPurchase
.getPlatformAddition();
await iapStoreKitPlatformAddition.showPriceConsentIfNeeded();
}
}
GooglePlayPurchaseDetails? _getOldSubscription(
ProductDetails productDetails, Map<String, PurchaseDetails> purchases) {
// This is just to demonstrate a subscription upgrade or downgrade.
// This method assumes that you have only 2 subscriptions under a group, 'subscription_silver' & 'subscription_gold'.
// The 'subscription_silver' subscription can be upgraded to 'subscription_gold' and
// the 'subscription_gold' subscription can be downgraded to 'subscription_silver'.
// Please remember to replace the logic of finding the old subscription Id as per your app.
// The old subscription is only required on Android since Apple handles this internally
// by using the subscription group feature in iTunesConnect.
GooglePlayPurchaseDetails? oldSubscription;
if (productDetails.id == _kSilverSubscriptionId &&
purchases[_kGoldSubscriptionId] != null) {
oldSubscription =
purchases[_kGoldSubscriptionId]! as GooglePlayPurchaseDetails;
} else if (productDetails.id == _kGoldSubscriptionId &&
purchases[_kSilverSubscriptionId] != null) {
oldSubscription =
purchases[_kSilverSubscriptionId]! as GooglePlayPurchaseDetails;
}
return oldSubscription;
}
}
/// Example implementation of the
/// SKPaymentQueueDelegate.
///
/// The payment queue delegate can be implementated to provide information
/// needed to complete transactions.
class ExamplePaymentQueueDelegate implements SKPaymentQueueDelegateWrapper {
@override
bool shouldContinueTransaction(
SKPaymentTransactionWrapper transaction, SKStorefrontWrapper storefront) {
return true;
}
@override
bool shouldShowPriceConsent() {
return false;
}}
consumable_store.dart
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:shared_preferences/shared_preferences.dart';
// ignore: avoid_classes_with_only_static_members
/// A store of consumable items.
///
/// This is a development prototype tha stores consumables in the shared
/// preferences. Do not use this in real world apps.
class ConsumableStore {
static const String _kPrefKey = 'consumables';
static Future _writes = Future.value();
/// Adds a consumable with ID id to the store.
///
/// The consumable is only added after the returned Future is complete.
static Future save(String id) {
_writes = _writes.then((void _) => _doSave(id));
return _writes;
}
/// Consumes a consumable with ID id from the store.
///
/// The consumable was only consumed after the returned Future is complete.
static Future consume(String id) {
_writes = _writes.then((void _) => _doConsume(id));
return _writes;
}
/// Returns the list of consumables from the store.
static Future<List> load() async {
return (await SharedPreferences.getInstance()).getStringList(_kPrefKey) ??
[];
}
static Future _doSave(String id) async {
final List cached = await load();
final SharedPreferences prefs = await SharedPreferences.getInstance();
cached.add(id);
await prefs.setStringList(_kPrefKey, cached);
}
static Future _doConsume(String id) async {
final List cached = await load();
final SharedPreferences prefs = await SharedPreferences.getInstance();
cached.remove(id);
await prefs.setStringList(_kPrefKey, cached);
}}

Hi @Pratiksha0796, do you see any errors when you run the app?
Please also provide the output of flutter run -v that shows in use. The output may be huge so kindly put it into a .txt/.log file and attach it here.
Thank you

Hello, @danagbemava-nc ,
No I'm not getting any error at runtime, its only return empty list.
I'm using Android device with Android version - 10
I have attached log file for flutter run -v. Please check.
log.txt

Hi @Pratiksha0796, have you tried downloading the app from the internal testing track and running it to see if it works?
Are you also using the same signing config for debug and release mode in your android/app/build.gradle file?

Hi, @danagbemava-nc , yes I uploaded my build in closed testing, and when it gets available I downloaded it for License testers using Join on Android url.
and yes I'm using same signing config for debug and release.
Do you found any issue in code or flutter run -v log?

Nothing about the code sample or logs seems out of place.
One final thing, do the ids you have specified match the ids that are in the play store console?

Yes, I checked this thing so many times. Both id's are same.

I'm not sure what the issue could be with your case. I have a similar setup using the code sample from the plugin example and it works just fine for me. Did you by any chance set a specific region for the products and are you in said region(if you did)?
Can you also go over the steps outlined in https://codelabs.developers.google.com/codelabs/flutter-in-app-purchases#4 to see if everything matches?

screenshot of the app on my end

Hey, @danagbemava-nc ,
Thank you so much for your time.
My issue has been resolved, and now I'm getting subscription list in my app and its working fine with License testers.
Thank you once again.

Glad your issue has been solved.
What finally solved your issue, if I may ask?

@danagbemava-nc ,
As you said I removed billing library from build gradle and used latest version of package.
And uploaded new build by following readme documentation.
Now, can you please tell me that how we can know that particular user Cancel his/her subscription?


Update the line-list schema and sample document to the latest model

Based on evolutions of the schema:

Rename fields
Restructure fields
Fix typos
Add validation to ensure no additional fields are added to objects

TESTED=Applied schema to my collection and successfully imported the example
Next I'll adjust the node schema

 Finalize the linelist data schema and validator.


[BUG] Short description of the bug

Epiphany doesnot support Rhel 9.
We tried downloading package for Rhel 9 for air gap installation, Got following error:
epicli  [] prepare [-h] --os {almalinux-8,rhel-8,ubuntu-20.04} --arch {aarch64,x86_64} [-o OUTPUT_DIR]
epicli  [] prepare: error: argument --os: invalid choice: 'rhel-9' (choose from 'almalinux-8', 'rhel-8', 'ubuntu-20.04')
11:06:17 INFO run_time - Total run time: 0.02s
epicli asking to choose only these OS

RedHat 9 will not be supported anymore as Epiphany is in maintenance mode. RedHat8 is supported until EOL of Epiphany 2.x:
https://access.redhat.com/product-life-cycles?product=Red Hat Enterprise Linux,OpenShift Container Platform 4
https://github.com/hitachienergy/epiphany/blob/develop/docs/home/LIFECYCLE.md


No implementation found for long org.webrtc.SoftwareVideoDecoderFactory.nativeCreateDecoder

Hello I am receiving this error:
java.lang.UnsatisfiedLinkError: No implementation found for long org.webrtc.SoftwareVideoDecoderFactory.nativeCreateDecoder(long, org.webrtc.VideoCodecInfo) (tried Java_org_webrtc_SoftwareVideoDecoderFactory_nativeCreateDecoder and Java_org_webrtc_SoftwareVideoDecoderFactory_nativeCreateDecoder__JLorg_webrtc_VideoCodecInfo_2) - is the library loaded, e.g. System.loadLibrary? at org.webrtc.SoftwareVideoDecoderFactory.nativeCreateDecoder(Native Method) at org.webrtc.SoftwareVideoDecoderFactory.createDecoder(SoftwareVideoDecoderFactory.java:29) at org.webrtc.DefaultVideoDecoderFactory.createDecoder(DefaultVideoDecoderFactory.java:43)
I am trying to stream a H264 video in my android client. My peer connection state says it's connected.
I already tried System.loadLibrary path without any results. Any help/guidance/direction is appreciated.

Version 1.3.4 solves it.


Route always renders children: Surprising

This is not a bug report (at best a documentation bug report) but it was and remains pretty counterintuitive to me that Route children are always rendered.
If someone could offer me some clarity on why this is, it would be much appreciated :)
Q: If the intuitive use case for Route children is to render contained elements only when the route matches the current location, what is the use case for always rendering children?

https://reacttraining.com/react-router/web/api/Route/children-func

Sometimes you need to render whether the path matches the location or not. In these cases, you can use the function children prop. It works exactly like render except that it gets called whether there is a match or not.
The children render prop receives all the same route props as the component and render methods, except when a route fails to match the URL, then match is null. This allows you to dynamically adjust your UI based on whether or not the route matches


ISPN-10690 Caches endpoint starting point

Super simple endpoint, stating point for caches info page
https://issues.jboss.org/browse/ISPN-10690

I pushed some changes

@gustavonalle added some doc


How to create index, migrate data with console command?

The way I did it is :
php artisan make:command IndexModel
in it, changed protected $signature = 'command:ImportModelToES {min}';
The handle method looks like this :
public function handle()
    {
        $min = $this->argument('min');
        $max = $min+5000; //batch size
        $this->processModel($min, $max);
        $min = $min+5000; // these must match
        $this->info(memory_get_usage());
        unset($max);
        $this->call('command:ImportModelToES', ['min' => $min]);
    }

    protected function processModel($min, $max)
    {

        $models = Model::where('id', '>', $min)->where('id', '<=', $max)->get();

        Plastic::persist()->bulkSave($models);
        $this->info("Indexed to ES  from {min} to {max}.");

    }

Then you just call php artisan command:ImportModelToES 1' . I did it this way because of my requirements but there are more elegant ways to do it. Look at chunk` in laravel documentation

Is it required to create index manually or how to create index "on fly" if it does not exist?

I would suggest you create the indices manually, as you can specify the shards, replicas or other settings.
You can use https://github.com/royrusso/elasticsearch-HQ to create indices or https://github.com/lmenezes/elasticsearch-kopf

Already use elasticsearch-HQ but how you see this in production?
 You specify the index in your plastic.php file, and that's it. No more configurations.

You can create and delete indexes as follows
Plastic::getClient()->indices()->delete(['index' => Plastic::getDefaultIndex()]);

Plastic::getClient()->indices()->create(['index' => Plastic::getDefaultIndex()]);

added this section to documentation ...

Thanks a lot. I think that need to add this code examples into readme


Midburn Profile is Case sensitive

Users can't get their permissions.
Check if we can ignore case when searching for permissions.

solved in commit https://github.com/Midburn/Volunteers/commit/1db5fc744662372edb107dd3e38f2ffd8e0445bb (merged to develop & master)


increase containerised image curl version

Pull Request Test Coverage Report for Build 257769231

0 of 0   changed or added relevant lines in 0 files are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.006%) to 55.004%

Files with Coverage Reduction
New Missed Lines
%

pkg/integrations/v4/logs/cfg_watcher.go
2
65.0%

pkg/metrics/sampler/sampler_routine.go
2
94.74%

Totals

Change from base Build 255498546:
-0.006%

Covered Lines:
9168

Relevant Lines:
16668

💛  - Coveralls