[Feature Request] RTSP Reconnect

The Deepstream samples implement RTSP reconnection functionality which from initial testing seems to work as expected.  It would be great if such functionality could be wrapped by DSL.

@jlerasmus yes, will definitely add.

@jlerasmus I'm working on this now... here are my current thoughts/plans for your review.
New parameter reconnect_interval added the the RTSP Source constructor
/**
 * @brief creates a new, uniquely named RTSP Source component
 * @param[in] name Unique Resource Identifier (file or live)
 * @param[in] protocol one of the constant protocol values [ DSL_RTP_TCP | DSL_RTP_ALL ]
 * @param[in] cudadec_mem_type, use DSL_CUDADEC_MEMORY_TYPE_<type>
 * @param[in] intra_decode
 * @param[in] drop_frame_interval, set to 0 to decode every frame.
 * @param[in] latency in milliseconds
 * @param[in] reconnect_interval interval at which to a attempt a stream reconnect on the
 * event a connection is lost. Set to 0 to disable.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_new(const wchar_t* name, const wchar_t* uri, uint protocol,
    uint cudadec_mem_type, uint intra_decode, uint drop_frame_interval, uint latency, uint reconnect_interval);

And then four new Services to query and update a Source's reconnect attributes.
/**
 * @brief Gets the current Reconnect Interval for the named RTSP Source
 * @param[in] name name of the source object to query
 * @param[in] reconnect_interval time between successive reconnect attempts in seconds.
 * A value of 0 indicates that reconnect management is disabled for the named Source
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_reconnect_interval_get(const wchar_t* name, uint* reconnect_interval);

/**
 * @brief Sets the current Reset Interval for the named RTSP Source
 * @param[in] name name of the source object to updated
 * @param[in] reconnect_interval time between successive reconnect attempts in seconds.
 * A value of 0 indicates that reconnect management is disabled for the named Source
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_reconnect_interval_set(const wchar_t* name, uint reconnect_interval);

/**
 * @brief Gets the current reconnect stats for the named RTSP Source
 * @param[in] name name of the source object to query
 * @param[out] last_time time of the last reconnect from system time in seconds (see timeval <sys/time.h>)
 * @param[out] last_count the count of reconnections for the named source, since first played or cleared.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_reconnect_stats_get(const wchar_t* name, uint* last_time, uint* last_count);

/**
 * @brief Clears the reconnect stats for the named RTSP Source
 * @param[in] name name of the source object to update
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_reconnect_stats_clear(const wchar_t* name);

@rjhowell44 this is great news. Appreciate your commitment on issues/requests.
Your proposal seems fine. The only request I have is that there should be an option (maybe a callback/handler) to allow for the application be notified when

the source goes down
when reconnecting
when reconnected

Maybe a struct for the stats can be defined and passed along.
This would allow the application to perform other actions e.g. notify the user, logging for analytics, showing of logo instead of blank screen, etc.
Maybe a general state/health handler (like ODE) is an option.

@jlerasmus I'm already on it... I'm in the process of including listener add/remove services now.  Also, now that I'm further through development, there are really two intervals

the reconnect interval - interval between the last-buffer-time and current-time before deciding that the connecting is lost, and trying to reconnect  - nvidia defines this value in the config files.
the reset interval - interval between successive reset attempts while the connection remains down (nvidia has this hard-coded to 3s).

First, what's coming to mind as I write this, 1 and 2 might be better labeled as

buffer_timeout
reset_timeout

With this in mind... your above suggested notifications work... and would essentially be

source goes down --  on-buffer-timeout
when reconnecting -- on each reset-timeout
when reconnected -- source returns to a state of playing

I'm now thinking of adding the reset_timeout default in dslapi.h and changing the input parameter to the RTSP source constructor to just
DslReturnType dsl_source_rtsp_new(const wchar_t* name, const wchar_t* uri, uint protocol,
    uint cudadec_mem_type, uint intra_decode, uint drop_frame_interval, uint latency, uint timeout);

let me know what you think

@rjhowell44 the 2 timeout values and notifications you have described makes total sense.
From an API usage perspective, I like recommended defaults but also prefer if they can be overridden. The dsl_source_num_in_use_max_set comes to mind. In this specific case it might make more sense to allow override per source (e.g. off-site cam might have more latency and connectivity issues), but global override should work.

@jlerasmus for the Get/Set services, I now have
/**
 * @brief Gets the current Reconnect Interval for the named RTSP Source
 * @param[in] name name of the source object to query
 * @param[out] timeout current time to wait between successive frames before determining the
 * connection is lost. If set to 0 then timeout is disabled.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_timeout_get(const wchar_t* name, uint* timeout);

/**
 * @brief Sets the current Reset Interval for the named RTSP Source
 * @param[in] name name of the source object to updated
 * @param[in] timeout time to wait between successive frames before determining the
 * connection is lost. Set to 0 to disable timeout.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_timeout_set(const wchar_t* name, uint timeout);

/**
 * @brief Gets the current reconnect stats for the named RTSP Source
 * @param[in] name name of the source object to query
 * @param[out] last_time time of the last reconnect from system time in seconds (see timeval <sys/time.h>)
 * @param[out] last_count the count of reconnections for the named source, since first played or cleared.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_reconnect_stats_get(const wchar_t* name, uint* last_time, uint* last_count);

/**
 * @brief Clears the reconnect stats for the named RTSP Source
 * @param[in] name name of the source object to update
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_reconnect_stats_clear(const wchar_t* name);

/**
 * @brief Gets the current reset stats for the named RTSP Source
 * @param[in] name name of the source object to query
 * @param[out] is_in_reset true if the source is currently in a reset cycle
 * @param[out] reset_count the count of reset attempts for the current reset cycle
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_rtsp_reset_stats_get(const wchar_t* name, boolean* is_in_reset, uint* reset_count);

For the client calback, I'm know thinking of matching the Pipeline state change listener
DslReturnType dsl_pipeline_state_change_listener_add(const wchar_t* pipeline,
    dsl_state_change_listener_cb listener, void* userdata);

DslREturnType dsl_source_rtsp_state_change_listener_add(const wchar_t* source,
    dsl_state_change_listener_cb listener, void* userdata);

The Callback would be the same for both, the one used for the Pipeline today
typedef void (*dsl_state_change_listener_cb)(uint prev_state, uint curr_state, void* user_data);

and both share the same state values
#define DSL_STATE_NULL                                              1
#define DSL_STATE_READY                                             2
#define DSL_STATE_PAUSED                                            3
#define DSL_STATE_PLAYING                                           4
#define DSL_STATE_IN_RESET                                          5
#define DSL_STATE_INVALID_STATE_VALUE                               UINT32_MAX

The client is free to call any of the APIs defined above in the call back to query or update the settings.  Setting the buffer timeout to 0 for example, would stop the source from trying to reconnect.  In theory, the user could even change the URI for the source.

@rjhowell44 sounds good.
To be clear on my understanding:

dsl_source_rtsp_reconnect_stats_get will give you the amount of successfull reconnects from the begiing or reset
dsl_source_rtsp_reset_stats_get will give you the amount of connection retry attempts in that reset cycle until reconnected. Calling this after successful reconnection should return (false, 0) right?

@jlerasmus yes, except for...

dsl_source_rtsp_reconnect_stats_get will give you the amount of successful reconnects from the beginning or from clear reconnect stats

@jlerasmus I'm now proposing this.
Please review and provide feedback when you can... thanks!

@rjhowell44, this looks good.

dsl_source_rtsp_reconnection_params_set now provides the defaults and allow for individual source overrides.  Thanks for taking this into consideration.

I agree with having a combined stats call dsl_source_rtsp_reconnection_stats_get.  Maybe the last parameter could be renamed to last_time or last_reconnect_time to be a bit more descriptive.

@jlerasmus I have this implemented with some basic unit and API test done.. I'll start on testing the behavior tomorrow.  The solution does add some complexity, requiring three additional timer driven threads.

to monitor and detect a loss of connect, and to start a reconnection cycle.
to manage the reconnection cycle.
to notify the RTSP state-change-listeners on change of state

The additional thread for the state-change-listener is required to allow the client to update the buffer timeout and reconnection params for 1. and 2. while they are currently running .
Any help in reviewing the code and testing this will be appreciated.   Everything is implemented in DslSourceBintr.cpp ... Lines 1369 through 1550
I've also created/implemented the following issue, checked into the same branch.
Let me know if this seems/sufficient for now.
Thanks again, really appreciate your feedback and help.

@rjhowell44 thank you for adding this.  I will review and test with live sources and get back to you.

@jlerasmus just FYI, I did not get a change to work on this further today, so no testing yet... tomorrow for sure.

@rjhowell44 I did a few quick tests with an existing sample, but probably need to create a separate sample with all the handlers and stuff.  I also need to look throught the code still.
2 quick tests which did not work as expected.  Logs added from the moment the IP camera was rebooted (testing disconnect):

1 RTSP Stream, rebooted - this is probably due to my sample quitting on EOS and not handling this properly

0:00:20.704055812  1641      0x9d77b20 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:00:20.704103417  1641      0x9d77b20 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-3> Could not connect to server. (Generic error)
0:00:20.704266024  1641      0xa23a610 ERROR                    DSL src/DslPipelineBintr.cpp:804:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-3'
0:00:20.704370817  1641      0xa23a610 ERROR                    DSL src/DslPipelineBintr.cpp:804:HandleErrorMessage:  : Error message 'Internal data stream error.' received from 'src-3'
[2020/09/17 11:07:54] Pipeline EOS event received, quitting application
0:00:20.784005603  1641      0xa23a610 WARN                     DSL src/DslPipelineSourcesBintr.cpp:239:UnlinkAll:  : *********************************unilink-all
0:00:20.784255086  1641      0xa23a610 WARN                     DSL src/DslSourceBintr.cpp:946:UnlinkAll:  : *********************************source

2 RTSP Streams, rebooting the 2nd

0:00:24.857276161 10451     0x1a5e79e0 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:00:24.857335016 10451     0x1a5e79e0 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-3> Could not connect to server. (Generic error)
0:00:24.857594760 10451     0x1aa538c0 ERROR                    DSL src/DslPipelineBintr.cpp:804:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-3'
0:00:24.857726794 10451     0x1aa538c0 ERROR                    DSL src/DslPipelineBintr.cpp:804:HandleErrorMessage:  : Error message 'Internal data stream error.' received from 'src-3'
0:01:24.878484633 10451     0x1aa538c0 ERROR                    DSL src/DslSourceBintr.cpp:1480:ReconnectionManager:  : FAILURE occured when trying to sync state for RTSP Source 'src-3'
0:01:24.878550832 10451     0x1aa538c0 ERROR                    DSL src/DslSourceBintr.cpp:1409:StreamManager:  : Failed to start reconnection cycle for source 'src-3'
0:01:24.882124957 10451   0x7ef000cde0 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:01:24.882183708 10451   0x7ef000cde0 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-3> Could not connect to server. (Generic error)
0:01:24.882363972 10451     0x1aa538c0 ERROR                    DSL src/DslPipelineBintr.cpp:804:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-3'
0:01:24.978854990 10451     0x1aa538c0 ERROR                    DSL src/DslSourceBintr.cpp:1480:ReconnectionManager:  : FAILURE occured when trying to sync state for RTSP Source 'src-3'

@jlerasmus I'll be working on this again at some point today... but just FYI
Special handling of the EOS event should not be required... To implement this feature (and those to come) I took the existing PadProbetr class, which was used for handling buffers, and derived two new classes of pad probe

PadBufferProbetr
PadEventDownStreamProbetr

and then two new Pad Probe Event Handler types that can be added to the PadEventDownStreamProbetr,

EosConsumerPadProbeEventHandler
EosHandlerPadProbeEventHandler

I'm just using them internally for now, but they are written such that they can be mapped to the DSL API just as the current ODE, Meter, and Custom  PPHs
I've update the DslPipelineSourcesBintr.cpp to add the EOS Consumer to the src pad of the streammux which should prevent EOS messages from getting to the bus-watcher which notifies the client EOS listeners
        // If we're adding an RTSP Source, ensure EOS consumer is added to Streammuxer
        if (pChildSource->IsType(typeid(RtspSourceBintr)) and m_pEosConsumer == nullptr)
        {
            LOG_INFO("Adding EOS Consumer to Streammuxer 'src' pad on first RTSP Source");

            // Create the Pad Probe and EOS Consumer to drop the EOS event that occurs on
            // loss of RTSP stream, allowing the Pipeline to continue to play. Each RTSP source
            // will then manage their own restart attempts and time management.

            std::string eventHandlerName = GetName() + "-eos-consumer";
            m_pEosConsumer = DSL_PPEH_EOS_CONSUMER_NEW(eventHandlerName.c_str());

            std::string padProbeName = GetName() + "-src-pad-probe";
            m_pSrcPadProbe = DSL_PAD_EVENT_DOWNSTREAM_PROBE_NEW(padProbeName.c_str(), "src", m_pStreamMux);
            m_pSrcPadProbe->AddPadProbeHandler(m_pEosConsumer);
        }

@jlerasmus I fixed one key issue... with the EOS Consumer not working correctly,

@rjhowell44 some feedback on tests using the latest v0.08.alpha branch

Having a single source with timeout=0 drops the EOS event and application does not exit.  The EOS should probably not be added if reconnect is disabled.0:00:36.534600637  2321   0x7ef8004630 INFO                     DSL src/DslPadProbeHandler.cpp:487:HandlePadData:  : EOS Consumer -- dropping EOS Event

Having a single source with timeout=30, I consistently get ManageStream callback called before the connection has been establed for source 'src-0' errors.  Any timeout value greater than 30 produces this randomly.  This is probably related to the time the initial connection is made.0:00:09.781041153  3167     0x1900ef60 INFO                     DSL src/DslPipelineBintr.cpp:680:HandleStateChanged:  : GST_STATE_PAUSED => GST_STATE_PLAYING
previous state =  3 , new state =  4
0:00:09.795432406  3167     0x1938e1e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1057:gst_v4l2_buffer_pool_start:<nvv4l2decoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:09.797235199  3167     0x1900ef60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:00:09.797344889  3167     0x1900ef60 INFO                     DSL src/DslBintr.h:211:GetState:  : Get state returned 'PLAYING' for Bintr 'src-0'
0:00:09.797399108  3167     0x1900ef60 INFO                     DSL src/DslSourceBintr.cpp:1516:SetCurrentState:  : Changing state from READY to PLAYING for RtspSourceBintr 'src-0'
0:00:09.797441088  3167     0x1900ef60 ERROR                    DSL src/DslSourceBintr.cpp:1392:StreamManager:  : ManageStream callback called before the connection has been establed for source 'src-0'
0:00:09.797704270  3167     0x1900ef60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS

and in this case on quitting the following is logged0:00:07.389746829  4759     0x1e41a8f0 INFO                     DSL src/DslPipelineBintr.cpp:747:HandleXWindowEvents:  : Key released = 'q'
key released =  q
0:00:07.390052616  4759     0x1e41a8f0 INFO                     DSL src/DslServices.h:664:GetMainLoopHandle:  : Returning Handle to MainLoop
0:00:07.391121177  4759     0x1e09bf60 INFO                     DSL src/DslBintr.h:223:SetState:  : Changing state to 'NULL' for Bintr 'pipeline'
0:00:07.391276753  4759     0x1e09bf60 INFO                     DSL src/DslBintr.h:229:SetState:  : State change completed synchronously for Bintr'pipeline'
0:00:07.391401183  4759     0x1e09bf60 INFO                     DSL src/DslPipelineSourcesBintr.cpp:230:UnlinkAll:  : Unlinking stream_muxer from src-0
0:00:07.391454152  4759     0x1e09bf60 INFO                     DSL src/DslSourceBintr.cpp:144:UnlinkFromSink:  : Unlinking and releasing request Sink Pad for StreamMux stream_muxer
0:00:07.392032913  4759     0x1e09bf60 WARN                     DSL src/DslSourceBintr.cpp:946:UnlinkAll:  : *********************************source

(python3:4759): GLib-CRITICAL **: 13:54:30.856: Source ID 2 was not found when attempting to remove it
0:00:07.392177291  4759     0x1e09bf60 INFO                     DSL src/DslSourceBintr.cpp:959:UnlinkAll:  : Stream management disabled for RTSP Source 'src-0'
0:00:07.392315314  4759     0x1e09bf60 INFO                     DSL src/DslTapBintr.cpp:109:UnlinkFromSource:  : Unlinking and releasing requested Source Pad for Decode Source Tee src-0-record-tap
0:00:07.392406253  4759     0x1e09bf60 ERROR                    DSL src/DslTapBintr.cpp:114:UnlinkFromSource:  : TapBintr 'src-0-record-tap' failed to unlink from Decode Source Tee
Segmentation fault (core dumped)

Having a single source with timeout=60 where the above error does not occur, the reconnect also fails due to the camera not online yet, but no further attempts is performed.  Herewith the log details when the reconnect is tried after 60 seconds.0:01:27.213821285  5963     0x163b2f60 INFO                     DSL src/DslBintr.h:211:GetState:  : Get state returned 'PLAYING' for Bintr 'src-0'
0:01:27.213895922  5963     0x163b2f60 INFO                     DSL src/DslSourceBintr.cpp:1404:StreamManager:  : Buffer timeout of 60 seconds exceeded for source 'src-0'
0:01:27.213921704  5963     0x163b2f60 INFO                     DSL src/DslSourceBintr.cpp:1438:ReconnectionManager:  : Resetting RTSP Source 'src-0' with reset count = 1
0:01:27.213952017  5963     0x163b2f60 INFO                     DSL src/DslBintr.h:223:SetState:  : Changing state to 'NULL' for Bintr 'src-0'
0:01:27.215243812  5963     0x16718320 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-0> we are not connected
0:01:27.234652197  5963     0x163b2f60 INFO                     DSL src/DslBintr.h:229:SetState:  : State change completed synchronously for Bintr'src-0'
0:01:27.234718084  5963     0x163b2f60 INFO                     DSL src/DslSourceBintr.cpp:1516:SetCurrentState:  : Changing state from PLAYING to NULL for RtspSourceBintr 'src-0'
0:01:27.236664996  5963     0x163b2f60 INFO                     DSL src/DslBintr.h:262:SyncStateWithParent:  : State change completed synchronously for Bintr'src-0'
0:01:27.236807394  5963     0x163b2f60 INFO                     DSL src/DslBintr.h:275:SyncStateWithParent:  : Get state returned 'PLAYING' for Parent of Bintr 'src-0'
0:01:27.236917500  5963     0x163b2f60 INFO                     DSL src/DslSourceBintr.cpp:1516:SetCurrentState:  : Changing state from NULL to PLAYING for RtspSourceBintr 'src-0'
0:01:27.237026877  5963     0x163b2f60 ERROR                    DSL src/DslSourceBintr.cpp:1480:ReconnectionManager:  : FAILURE occured when trying to sync state for RTSP Source 'src-0'
0:01:27.237116514  5963     0x163b2f60 ERROR                    DSL src/DslSourceBintr.cpp:1409:StreamManager:  : Failed to start reconnection cycle for source 'src-0'
0:01:27.237230319  5963     0x163b2f60 INFO                     DSL src/DslSourceBintr.cpp:1412:StreamManager:  : Starting Reconnection Manager for source 'src-0'
0:01:27.237554908  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.237650847  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.237702515  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.237793975  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.237869393  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.238010490  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.238350183  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.238462217  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.239474163  5963   0x7ecc003cf0 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to <IP_ADDRESS>: Connection refused
0:01:27.242224892  5963   0x7ecc003cf0 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-0> Could not connect to server. (Generic error)
0:01:27.242251351  5963   0x7ecc003cf0 WARN                 rtspsrc gstrtspsrc.c:7469:gst_rtspsrc_retrieve_sdp:<src-0> error: Failed to connect. (Generic error)
0:01:27.242337915  5963   0x7ecc003cf0 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<src-0> can't get sdp
0:01:27.242371561  5963   0x7ecc003cf0 WARN                 rtspsrc gstrtspsrc.c:8086:gst_rtspsrc_play:<src-0> failed to open stream
0:01:27.242394426  5963   0x7ecc003cf0 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-0> we are not connected
0:01:27.242470000  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.242633545  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.242712349  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.243028605  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.243802109  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.244311650  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244390349  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244452434  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244499830  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244567644  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244633479  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244673323  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244726553  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244767752  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_ELEMENT
0:01:27.244818274  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244869993  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:610:HandleBusWatchMessage:  : Message type:: GST_MESSAGE_STREAM_STATUS
0:01:27.244948589  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.245013486  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.245230573  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.245302554  5963     0x163b2f60 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-0'
0:01:27.245379430  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.245431619  5963     0x163b2f60 INFO                     DSL src/DslPipelineBintr.cpp:626:HandleBusWatchMessage:  : Unhandled message type:: 33554432
0:01:27.337792051  5963     0x163b2f60 INFO                     DSL src/DslBintr.h:211:GetState:  : Get state returned 'PAUSED' for Bintr 'src-0'
0:01:27.338257477  5963     0x163b2f60 INFO                     DSL src/DslSourceBintr.cpp:1516:SetCurrentState:  : Changing state from PLAYING to PAUSED for RtspSourceBintr 'src-0'
0:01:27.338369979  5963     0x163b2f60 ERROR                    DSL src/DslSourceBintr.cpp:1480:ReconnectionManager:  : FAILURE occured when trying to sync state for RTSP Source 'src-0'

Let me know if there is anything I can test or confirm for you.

@jlerasmus thanks for the detailed notes on this, especially since I've be struggling with my own setup. I just upgraded my internet service and equipment, and it's taking me a little time to get everything working.  ... bit I can see several obvious needed fixes in the logs above.

@jlerasmus updates have been pushed into v0.08.alpha branch that covers the obvious issues

Single source with timeout=0 now exists application
0:00:37.245756868 28799     0x1675c400 WARN                 rtspsrc gstrtspsrc.c:5280:gst_rtspsrc_loop_udp:<src-1> warning: The server closed the connection.
0:00:37.260800684 28799     0x1675c400 WARN                 rtspsrc gstrtspsrc.c:5293:gst_rtspsrc_loop_udp:<src-1> warning: Unhandled return value -7.
0:00:37.260936520 28799     0x1675c400 WARN                 rtspsrc gstrtspsrc.c:5361:gst_rtspsrc_loop_udp:<src-1> error: Could not receive message. (System error)
0:00:37.261019022 28799     0x1675c400 WARN                 rtspsrc gstrtspsrc.c:5653:gst_rtspsrc_loop:<src-1> error: Internal data stream error.
0:00:37.261037720 28799     0x1675c400 WARN                 rtspsrc gstrtspsrc.c:5653:gst_rtspsrc_loop:<src-1> error: streaming stopped, reason error (-5)
0:00:37.261234287 28799     0x16c05980 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not read from resource.' received from 'src-1'
0:00:37.261361425 28799     0x16c05980 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Internal data stream error.' received from 'src-1'
0:00:37.264428575 28799     0x1675bc00 WARN             matroskamux matroska-mux.c:3468:gst_matroska_mux_finish:0x16757520 unable to get final track duration
0:00:37.345290018 28799   0x7f1c004e30 WARN             nvstreammux gstnvstreammux.c:2096:gst_nvstreammux_src_push_loop:<stream_muxer> warning: No Sources found at the input of muxer. Waiting for sources.
0:00:37.345389811 28799     0x16c05980 WARN                     DSL src/DslSourceBintr.cpp:946:UnlinkAll:  : *********************************source
0:00:37.346131598 28799     0x16c05980 ERROR                    DSL src/DslTapBintr.cpp:114:UnlinkFromSource:  : TapBintr 'src-1-record-tap' failed to unlink from Decode Source Tee

Single source with timeout=30. On the first 2 retries camera was not up, but on third retry is was up but resulting in an application exit.
0:00:17.324281763 28964     0x3d248000 WARN                 rtspsrc gstrtspsrc.c:5280:gst_rtspsrc_loop_udp:<src-1> warning: The server closed the connection.
0:00:17.326119614 28964     0x3d248000 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:00:17.326167011 28964     0x3d248000 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:00:17.326199928 28964     0x3d248000 WARN                 rtspsrc gstrtspsrc.c:5348:gst_rtspsrc_loop_udp:<src-1> error: Could not connect to server. (Generic error)
0:00:17.326314305 28964     0x3d248000 WARN                 rtspsrc gstrtspsrc.c:5653:gst_rtspsrc_loop:<src-1> error: Internal data stream error.
0:00:17.326340243 28964     0x3d248000 WARN                 rtspsrc gstrtspsrc.c:5653:gst_rtspsrc_loop:<src-1> error: streaming stopped, reason error (-5)
0:00:17.326516237 28964     0x3d6f1b20 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:00:17.326638948 28964     0x3d6f1b20 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Internal data stream error.' received from 'src-1'
0:00:17.328554769 28964     0x3d248050 WARN             matroskamux matroska-mux.c:3468:gst_matroska_mux_finish:0x3d243610 unable to get final track duration
0:00:44.112456165 28964   0x7f1408a1e0 WARN                 rtspsrc gstrtspsrc.c:3155:on_timeout:<src-1> source 56263b99, stream 56263b99 in session 0 timed out
0:00:47.331765331 28964     0x3d248000 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:00:47.345523794 28964     0x3d6f1b20 ERROR                    DSL src/DslSourceBintr.cpp:1410:StreamManager:  : Failed to start reconnection cycle for source 'src-1'
0:00:47.447474717 28964   0x7ef4003cf0 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Operation was cancelled
0:00:47.447521749 28964   0x7ef4003cf0 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:00:47.447543416 28964   0x7ef4003cf0 WARN                 rtspsrc gstrtspsrc.c:7469:gst_rtspsrc_retrieve_sdp:<src-1> error: Failed to connect. (Generic error)
0:00:47.447614928 28964   0x7ef4003cf0 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<src-1> can't get sdp
0:00:47.450370454 28964     0x3d6f1b20 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:01:05.980375218 28964     0x3d248850 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: No route to host
0:01:05.980436053 28964     0x3d248850 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:01:05.980458293 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:7469:gst_rtspsrc_retrieve_sdp:<src-1> error: Failed to connect. (Generic error)
0:01:05.980565378 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<src-1> can't get sdp
0:01:05.980607983 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:8086:gst_rtspsrc_play:<src-1> failed to open stream
0:01:05.980632203 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:01:05.980722100 28964     0x3d6f1b20 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:01:17.448063351 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:01:17.450358295 28964     0x3d6f1b20 ERROR                    DSL src/DslSourceBintr.cpp:1410:StreamManager:  : Failed to start reconnection cycle for source 'src-1'
0:01:17.452827825 28964     0x3d248850 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:01:17.452876003 28964     0x3d248850 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:01:17.452897879 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:7469:gst_rtspsrc_retrieve_sdp:<src-1> error: Failed to connect. (Generic error)
0:01:17.452997360 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<src-1> can't get sdp
0:01:17.453033767 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:8086:gst_rtspsrc_play:<src-1> failed to open stream
0:01:17.453057049 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:01:17.453458672 28964     0x3d6f1b20 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:01:17.556247988 28964     0x3d248850 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:01:17.556301218 28964     0x3d248850 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:01:17.556322990 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:7469:gst_rtspsrc_retrieve_sdp:<src-1> error: Failed to connect. (Generic error)
0:01:17.556407314 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<src-1> can't get sdp
0:01:17.556435596 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:8086:gst_rtspsrc_play:<src-1> failed to open stream
0:01:17.556458565 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:01:17.556702268 28964     0x3d6f1b20 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:01:47.560993741 28964     0x3d248850 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:01:47.562967740 28964     0x3d6f1b20 ERROR                    DSL src/DslSourceBintr.cpp:1410:StreamManager:  : Failed to start reconnection cycle for source 'src-1'

(python3:28964): GStreamer-WARNING **: 07:14:37.428: Name 'src-depay' is not unique in bin 'src-1', not adding
0:01:47.584639697 28964     0x3d248850 ERROR                    DSL src/DslNodetr.h:333:AddChild:  : Failed to add src-depay to src-1'
terminate called without an active exception

Single source with timeout=60.  First retry camera was not up, but on second retry is was up but resulting in an application exit.
0:00:31.507814518 28445     0x1eb08800 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:00:31.507858269 28445     0x1eb08800 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:00:31.507878790 28445     0x1eb08800 WARN                 rtspsrc gstrtspsrc.c:5348:gst_rtspsrc_loop_udp:<src-1> error: Could not connect to server. (Generic error)
0:00:31.508009158 28445     0x1eb08800 WARN                 rtspsrc gstrtspsrc.c:5653:gst_rtspsrc_loop:<src-1> error: Internal data stream error.
0:00:31.508027753 28445     0x1eb08800 WARN                 rtspsrc gstrtspsrc.c:5653:gst_rtspsrc_loop:<src-1> error: streaming stopped, reason error (-5)
0:00:31.508198851 28445     0x1efb1e10 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:00:31.508334427 28445     0x1efb1e10 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Internal data stream error.' received from 'src-1'
0:00:31.511199501 28445     0x1eb08000 WARN             matroskamux matroska-mux.c:3468:gst_matroska_mux_finish:0x1eb03610 unable to get final track duration
0:00:56.845240330 28445   0x7f1c0899e0 WARN                 rtspsrc gstrtspsrc.c:3155:on_timeout:<src-1> source 726c7ac7, stream 726c7ac7 in session 0 timed out
0:01:31.566409631 28445     0x1eb08800 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:01:31.583289847 28445     0x1efb1e10 ERROR                    DSL src/DslSourceBintr.cpp:1410:StreamManager:  : Failed to start reconnection cycle for source 'src-1'
0:01:31.685875343 28445   0x7f00003cf0 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Operation was cancelled
0:01:31.685925917 28445   0x7f00003cf0 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:01:31.685949199 28445   0x7f00003cf0 WARN                 rtspsrc gstrtspsrc.c:7469:gst_rtspsrc_retrieve_sdp:<src-1> error: Failed to connect. (Generic error)
0:01:31.686024357 28445   0x7f00003cf0 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<src-1> can't get sdp
0:01:31.694410818 28445     0x1efb1e10 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:01:31.700774884 28445     0x1eb08050 ERROR                default gstrtspconnection.c:1004:gst_rtsp_connection_connect_with_response: failed to connect: Could not connect to 192.168.xxx.xxx: Connection refused
0:01:31.700843480 28445     0x1eb08050 ERROR                rtspsrc gstrtspsrc.c:4702:gst_rtsp_conninfo_connect:<src-1> Could not connect to server. (Generic error)
0:01:31.700865095 28445     0x1eb08050 WARN                 rtspsrc gstrtspsrc.c:7469:gst_rtspsrc_retrieve_sdp:<src-1> error: Failed to connect. (Generic error)
0:01:31.700974577 28445     0x1eb08050 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<src-1> can't get sdp
0:01:31.701093903 28445     0x1eb08050 WARN                 rtspsrc gstrtspsrc.c:8086:gst_rtspsrc_play:<src-1> failed to open stream
0:01:31.701122862 28445     0x1eb08050 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:01:31.701381410 28445     0x1efb1e10 ERROR                    DSL src/DslPipelineBintr.cpp:885:HandleErrorMessage:  : Error message 'Could not open resource for reading and writing.' received from 'src-1'
0:02:31.710232450 28445     0x1eb08050 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<src-1> we are not connected
0:02:31.712293803 28445     0x1efb1e10 ERROR                    DSL src/DslSourceBintr.cpp:1410:StreamManager:  : Failed to start reconnection cycle for source 'src-1'

(python3:28445): GStreamer-WARNING **: 07:03:09.978: Name 'src-depay' is not unique in bin 'src-1', not adding
0:02:31.754637965 28445     0x1eb08050 ERROR                    DSL src/DslNodetr.h:333:AddChild:  : Failed to add src-depay to src-1'
terminate called without an active exception

It seems that the retry mechanism is not started.  But I also think there might be an issue related to the bufferTimeout as this should probably only kick of the initial retry mechanism, and should not fire each and every time on bufferTimeout but I might be mistaken

@jlerasmus  I'm able to consistently disconnect and reconnect with a single camera. The defaults still need to be reviewed to see if they could be optimized.
When you get a chance, if you could try this out on our setup, Id would sure appreciate it.
Also, I have not had a change to look at the client data issue with the record components yet.  Should get to it next...

@rjhowell44 thank for the update. I will test this again in the next day or two and provide feedback.
There is definitely an issue with the client data being passed. I did not have a chance to look deeper, but this is happening randomly (e.g. in my last run 3 of the sources had this on first occurence, the rest were fine... basically causing those 3 sources to stop as the trigger could not be reset).

@rjhowell44, I can confirm that the RTSP reconnection functionality works as expected.  Really appreciate your work on this.
I have tested the following cases

Single source with timeout=0 exists application without error, but with known nvbuf_utils message
Single source with timeout=10 continues to run and reconnects when camera is rebooted
9 sources with timeout=10 in the following sequence

Disconnecting Nano's LAN cable, wait 60 seconds, reconnect LAN cable => all 9 sources reconnects
Rebooting each camera in sequence with a 20 seconds interval => all 9 sources reconnects
Disconnect Nano's LAN cable, wait 5 minutes, reconnect LAN cable => all 9 sources reconnects

Just some observation as reference for future functionality... (this is probably related to the streammuxer)

When disconnecting the Nano's LAN cable, the last frame is shown until reconnect
When rebooting the Nano, the tile goes black until reconnect

I prefer that the tile goes black to show the source is offline.  In the future it would be nice to add functionality to display some text or logo in the tile to show it is offline.

@jlerasmus re: I prefer that the tile goes black to show the source is offline. In the future it would be nice to add functionality to display some text or logo in the tile to show it is offline.
I will need to look into this as I'm not sure how best to handle... I don't know if it's the Tiler or the XWindow that is maintaining the image as there should be not data from the streammux.  I will try it with an overlay sink to see if the behavior is the same.
Adding text to the Tile could be done by adding META data between the Tiler and OSD..  Just thinking out loud here, but this could be done by the client listening to the RTSP State, and enabling/disabling an "always" trigger to overlay some text.
I'll add a feature request for this specifically, and we can look into.  I'm gong to close this issue, and anything else that comes up can be addressed separately.

@jlerasmus just FYI, I refactored and optimized the reconnection logic, which included changes to the API, see RTSP Stream Connection Management

Hello @rjhowell44,
Thank you for your contributions !
The RTSP stream connection management link is not connected, could you paste the working one !
thanks

Hi @ayanasser please see ... https://github.com/prominenceai/deepstream-services-library/blob/master/docs/overview.md#rtsp-stream-connection-management

Thank you @rjhowell44 could you check this quick question please ?
https://github.com/prominenceai/deepstream-services-library/issues/864

The RTSP stream connection management does not seem to handle the case where the RTSP stream is not yet available on application start. The pipeline fails to play.
My Pipeline is setup to record from multiple sources on trigger, so if one of them is unavailable at start up, the whole pipeline fails to run.

@scknight2 my apologies for the slow response, but I wanted to do a little research before I commented.
First, to answer your question.. Anyway to add this functionality? ... yes, I believe it can be done.
There is a little history as to why the RTSP Source is implemented this way.  It has to do with a bug in nvidia's streammux plugin ... https://forums.developer.nvidia.com/t/releasing-nvstreammux-request-pad-results-in-a-deadlock/155271
The workaround for this issue was to test the RTSP URI before linking the Source to the streammux and fail if the URI was down.
My understanding is that nvidia's new streammux plugin https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvstreammux2.html#gst-nvstreammux-new was created in part to fix this issue.
I just need time to integrate and update the connection logic. I'll add a new issue for this work.
However, it may take me a couple of weeks to get to this.
Regards,
Robert.

@rjhowell44 Much appreciated!

Hi @rjhowell44 , sorry to bug, but any updates on this? I did not see any new issues created for it.

@scknight2 your timing is good... started working on it this week... will add the issue.

@scknight2 here's the new issue
-- Extend RTSP stream-manager to manage first connection - retry on timeout #927
This work has been completed and merged into the v0.26.alpha
Please give it a try if you can and let me know how everything works for you.  There are breaking changes in this branch, so please review the running release notes carefully.
This is the last issue I plan to cover for this branch which I plan to release next week. Any in-field testing you can do for me will be greatly appreciated.


[documentation] add some hints for other developers

While I developed the other pull requests I made, I had to learn some things.
Two of them I did document because I think they are not obvious and will support onboarding new joiners.

@nitram509 thank you for this addition :cake:
I think that the hints would fit best in the contribution guide. I'll merge the PR and move the hints in the contribution guide, together with some other parts.


[Flink AI Flow][Document] Improve Admin API

What is the purpose of the change
The comments of the API in workflow_operation.py don't follow the standard of the API document, which should be improved.
Brief change log

Update the comments of the API in workflow_operation.py to follow the standard of the API document.

Verifying this change

@bgeng777 , thanks for your detailed review. I have addressed the above comments. Please help to check again.


Guid passed in as string

When I pass a guid as a string in .Key("AEA6C1D8-ABD3-46E6-8023-17FDE9D66B85"), it is represented like so in the actual request:
baseruri/entity(%27AEA6C1D8-ABD3-46E6-8023-17FDE9D66B85%27)
However, OData v4 requires it to look like:
baseruri/entity(AEA6C1D8-ABD3-46E6-8023-17FDE9D66B85)
So I get a BadRequest.  Is there a way to tell .Key() to not wrap with %27?

@devkeydet Have you tried passing it in as a Guid e.g. .Key(Guid.Parse("AEA6C1D8-ABD3-46E6-8023-17FDE9D66B85")

Hi and sorry for the late response.
I added some tests to the project to investigate what's happening and as long as you are passing a key as GUID (not as string), in OData V4 it should correctly format it. E.g.:
var cmd = client.For<TypeWithGuidKey>().Key(Guid.NewGuid()).GetCommandTextAsync().Result();
produces in OData V3:
TypeWithGuidKey(guid%2729ab73c1-a6b9-4638-8430-e4184d8c6dfb%27)
produces in OData V4:
TypeWithGuidKey(74230728-9333-424b-b128-d7953aa08a43)
Hope this helps.


Add Book Recommendations

Is your feature request related to a problem? Please describe.
It would be cool if we could be recommended new books to borrow after
Describe the solution you'd like
In Firebase, keep a history of isbn's a user has ever borrowed. Whenver the user returns a book, scan the history of all the other users that have ever borrowed that same book and create a frequency dictionary mapping isbns to the number of user's who borrowed that book. Return a list of isbn's to the user sorted by the number of users who borrowed that isbn. When the user clicks on an isbn, it takes them to a search that would let them request books from other users in the database that match that isbn.
Describe alternatives you've considered
You could create build a tree structure in the database and traverse that to get recommendations but it would be hard to query and traverse this tree since Firebase is so async. Also, keeping that tree updated will be a pain.
Additional context
Vinay also mentioned that recommendations can also be based on what other books the owner has when you are about to take out a book from them. But this seems to be in addition to the other change.

Closed via #196


Improve kernel finder to stop polling for kernels

Part of #7583
Please note, this is not the final PR, more work is required, however this PR is stable enough to be merged into (even though the work has not been completed), i.e. the code in its current form will work

Codecov Report

Merging #11626 (0f095ec) into main (d60c58b) will decrease coverage by 0%.
The diff coverage is 70%.

:exclamation: Current head 0f095ec differs from pull request most recent head 9b91ad5. Consider uploading reports for the commit 9b91ad5 to get more accurate results

@@          Coverage Diff           @@
##            main   #11626   +/-   ##
======================================
- Coverage     62%      62%   -1%
======================================
  Files        480      480
  Lines      34107    34191   +84
  Branches    5518     5537   +19
======================================
+ Hits       21458    21508   +50
+ Misses     10644    10634   -10
- Partials    2005     2049   +44

Impacted Files
Coverage Δ

src/kernels/internalTypes.ts
100% <ø> (ø)

...nels/jupyter/finder/universalRemoteKernelFinder.ts
12% <0%> (ø)

src/kernels/jupyter/types.ts
100% <ø> (ø)

src/kernels/raw/types.ts
100% <ø> (ø)

...rnels/raw/finder/localKernelSpecFinderBase.node.ts
76% <50%> (-4%)
:arrow_down:

src/kernels/raw/finder/jupyterPaths.node.ts
79% <60%> (+<1%)
:arrow_up:

...lPythonAndRelatedNonPythonKernelSpecFinder.node.ts
67% <61%> (-3%)
:arrow_down:

.../raw/finder/localKnownPathKernelSpecFinder.node.ts
81% <76%> (-8%)
:arrow_down:

src/kernels/raw/finder/localKernelFinder.node.ts
79% <92%> (+3%)
:arrow_up:

src/kernels/jupyter/finder/remoteKernelFinder.ts
87% <100%> (ø)

... and 27 more

. I would say the TS windows unit tests are failing and as far as I know those are usually not flaky. Given the change I'd think that's possibly a real failure?

Its a valid failure and I"m lookig into this.
Now that code is push based, we need to wait for events to get triggered.
& on windows things are a little slower, hence the tests fails
I'm working on the tests now.


Double-check memory leaks

Make sure no memory leaks. Looks like it's leaking a bit of memory??

I don't think it is.


java.lang.IllegalStateException: the metadata report was not inited.

Dubbo 2.7.8
消费者初始化时报错
java.lang.IllegalStateException: the metadata report was not inited.

can you provider a demo?


[Question] How does episode sampling handle environment resets?

Hi, I'm confused about how episodes are sampled from the replay buffer, since episodes may have different lengths, and different episodes might be played in different environments due to resetting after a terminal state.
I still don't fully understand the sampling procedure, but from what I can tell based on sample_episodes(), it looks like episodes which end prematurely are padded with transitions from other episodes until you have sampled batch_size sequences of length batch_length.
For example, suppose batch_size=1 and batch_length=10, and the first episode you sample only has 3 transitions, e.g., (s_1, s_2), (s_2, s_3), (s_3, s_4). After the agent reaches terminal state s_4, the environment resets, and you obtain another episode of length 10, say, s'_1, ..., s'_10. Could we then train using a sequence such as (s_1, s_2), ..., (s_3, s_4), (s'_1, s'_2), ..., (s'_6, s'_7)? That is, is it okay to combine sequences from different episodes, even though the episodes may have been played in completely different environments?
Thanks for your time and for an amazing port of Dreamer!

Hi,
Thank you for your inquiry about the sampling procedure from the replay buffer.
Your concern about combining sequences from different episodes is valid, but I'd like to assure you that it's handled by my current method. By using the "is_first" flag, we reset the hidden_state in the world model during training, allowing sequences from different episodes to be combined without issue. Please refer here.
So yes, it's okay to combine sequences as you described, and the model recognizes the boundaries between episodes, even if played in different environments.
I hope this answers your question. Feel free to reach out if you need further clarification.
Best,
NM512


docs: update the version specific notes table

Updates the table in the "Version Specific Notes" subsection of the "Upgrade" page in order to be explicit about the supported upgrade paths.

@bmcustodio I have set this back to "needs-backport/1.10" since it seems like the backport to that branch was not yet performed. This will allow the regular backporters to pick up this PR and backport it. In future if you start then abandon a backport, then please consider updating the labels like this too, as it helps track & ensure we get the patches lined up correctly on each of the branches.


PHP Fatal error:  Uncaught Error: Class "GO\Scheduler" not found in. - Question not Issue

This is my working example code that runs as expected on local host
require_once __DIR__.'/vendor/autoload.php';
use GO\Scheduler;
$scheduler = new Scheduler();
$scheduler->php(__DIR__.'/cron/wonde/job.php')->everyMinute();
But when I run this on a Linix Server directly in the terminal.... like this
/usr/bin/php  /var/www/absolute-education/public_html/cron-scheduler.php
Then it throws an error...
PHP Fatal error:  Uncaught Error: Class "GO\Scheduler" not found in /var/www/absolute-education/public_html/cron-scheduler.php:8 Stack trace: #0 {main}   thrown in /var/www/absolute-education/public_html/cron-scheduler.php on line 8
Any thoughts why this is happening?
I'm logged into the server as the website administrator, so have the correct permissions to read, write files.

I've also tried ...
require_once __DIR__.'/vendor/peppeocchi/php-cron-scheduler/src/GO/Scheduler.php';
This still produces the same error.

Ok, I have managed to fix the issue. I remove the pacage via composer then required it back in. I'm guessing that it wasn't in my compsoser lock file correctly.


redis-ha-4.23.0 - problems with ssh restore

Describe the bug
I attempted to deploy helm chart with restore via ssh by adding
restore:
  ssh:
    source: login@server:~/automatic-cas-sandbox-memorydb-2024-01-03-05-04-0001.rdb
    key: "-----BEGIN OPENSSH PRIVATE KEY-----\n(....)\n-----END OPENSSH PRIVATE KEY-----"

What happens is
test-rec-redis-redis-ha-server-0 restore-ssh sh: can't create key: Permission denied
- test-rec-redis-redis-ha-server-0 › restore-ssh
+ test-rec-redis-redis-ha-server-0 › restore-ssh

I could use some help with debugging this.

@yoshi314 This looks like a potential chart bug from perms / securityContext / fsGroup on the SSH implementation. I'll try and take a look at recreating this.


Request: modern Tetris randomization logic

Currently any piece can follow any piece. In modern Tetris implementations we instead get pieces in shuffled sequences, where each sequence contains every tetronimo piece exactly once. See also:
https://tetris.fandom.com/wiki/Random_Generator
Would make the game a lot more "fair" to play :)

Here's what I did for my terrible Commodore version: I created a "bag" and put each piece in twice, then I made sure you didn't get the same piece twice. It ended up being a good chunk of the program, though.
It's probably not the best way to do it but it sure kept the program from generating a deluge of S and Z pieces.

Why two though? Wouldn't the simplest way be to have a sequence of seven and shuffle that sequence every seven steps?
Currently, the logic for a new piece is:
// create a new piece, don't remove old one (it has landed and should stick)
void new_piece() {
  y = py = 0;
  p = rand() % 7;
  r = pr = rand() % 4;
  x = px = rand() % (10 - NUM(r, 16));
}

The key line being p = rand() % 7;
If I'm correct, something like this should work: (just wrote this of the top of my head, haven't really written C++ in a while so probably contains a mistake somewhere)
// index into bag sequence and bag of seven tetronimos
int n = 0, bag[7] = {0, 1, 2, 3, 4, 5, 6}

void new_piece() {
  y = py = 0;
  // Fisher-Yates shuffle the bag every time
  // one random sequence is finished
  if (n == 0) {
    for(int i = 1; i < 7; i++) {
      int j = rand() % i;
      p = bag[j];
      bag[j] = bag[i];
      bag[i] = p;
    }
  }
  p = bag[n];
  n = (n + 1) % 7;
  r = pr = rand() % 4;
  x = px = rand() % (10 - NUM(r, 16));
}


glb files with embedded resources are embedded as data URI

Describe the issue
When embedding a buffer (and I assume an image) in a binary gltf file (glb), these resources are still encoded as data uri.  This is invalid according to the Khronos glTF validator, at https://github.khronos.org/glTF-Validator/ .
To Reproduce

Change the example build-gltf to save the resulting gltf file as follows:

  tinygltf::TinyGLTF gltf;
  gltf.WriteGltfSceneToFile(&m, "triangle.glb",
                           true, // embedImages
                           true, // embedBuffers
                           false, // pretty print
                           true); // write binary

Load the resulting triangle.glb file into https://github.khronos.org/glTF-Validator/ .

Expected behaviour
I would expect that if the writeBinary flag is on, then the binary resources would be embedded into the glb as binary blobs as per the gltf specification.

Hmm. it reports valid on my side.
Changed build-gltf example as follows on Ubuntu:
  // Save it to a file
  tinygltf::TinyGLTF gltf;
  gltf.WriteGltfSceneToFile(&m, "triangle.glb",
                           true, // embedImages
                           true, // embedBuffers
                           false, // pretty print
                           true); // write binary

triangle.glb.gz

Sorry! My mistake. I didn't realize that a glb file should only have one single buffer. I think it would make sense to throw an exception if trying to do writeBinary and model->buffers.size() > 1. But that's a different issues than the one I opened this bug about.

@dov Although glb supports multiple chunks for embedded .bin data:
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#chunks
Currently tinygltf always serialize all buffers into single binary chunk
https://github.com/syoyo/tinygltf/blob/298c37a9549ae04bb991f0b2c77d270bccc66eb0/tiny_gltf.h#L7612
If you got an issue related with it, please open another issue with reproducible code/glTF data.

@dov Although glb supports multiple chunks for embedded .bin data:
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#chunks

Actually, from the above link, you can have either 0 or 1 binary chunk, but not more.

Currently tinygltf always serialize all buffers into single binary chunk
https://github.com/syoyo/tinygltf/blob/298c37a9549ae04bb991f0b2c77d270bccc66eb0/tiny_gltf.h#L7612

No, from the logic in the code, you promote the first buffer into a binary chunk, but keep the rest of the buffers URI data encoded. This was the cause of the gltf violation I got when I used more than binary buffer.

If you got an issue related with it, please open another issue with reproducible code/glTF data.

I'll do that. Thanks. :-)

@dov Oh! Thanks for pointing out my mistake > Actually, from the above link, you can have either 0 or 1 binary chunk, but not more.

No, from the logic in the code, you promote the first buffer into a binary chunk, but keep the rest of the buffers URI data encoded

I see.

I'll do that. Thanks. :-)

Thanks!

Hi folks, I am not understanding what the resolution to this issue is. Ive been working on extending the Open3D writer to be able to export textured GLTF files. I am testing this code by translating a textured OBJ file. The GLTF export works fine, however the GLB export does not seem to be working correctly. Even though the file passes validation with only a warning about the Data URI being used,
some loaders, specifically the 3JS loader, cannot read the GLB file correctly. BabylonJS provides a useful error message Unable to load from file:test.glb: /textures/0: Error while trying to load image: data:file:1677600676977/data:image/jpeg;base64,/9j/4AA
So what is the correct method for writing a textured model to GLB with embedded images?
The Khronos GLTF validator report:
{
    "uri": "test.glb",
    "mimeType": "model/gltf-binary",
    "validatorVersion": "2.0.0-dev.3.8",
    "validatedAt": "2023-02-28T16:29:56.388Z",
    "issues": {
        "numErrors": 0,
        "numWarnings": 1,
        "numInfos": 1,
        "numHints": 0,
        "messages": [
            {
                "code": "URI_GLB",
                "message": "URI is used in GLB container.",
                "severity": 2,
                "pointer": "/images/0/uri"
            },
            {
                "code": "DATA_URI_GLB",
                "message": "Data URI is used in GLB container.",
                "severity": 1,
                "pointer": "/images/0/uri"
            }
        ],
        "truncated": false
    },
    "info": {
        "version": "2.0",
        "generator": "Open3d",
        "resources": [
            {
                "pointer": "/buffers/0",
                "mimeType": "application/gltf-buffer",
                "storage": "glb",
                "byteLength": 107995840
            },
            {
                "pointer": "/images/0",
                "mimeType": "image/jpeg",
                "storage": "data-uri",
                "image": {
                    "width": 8192,
                    "height": 8192,
                    "format": "rgb",
                    "bits": 8
                }
            }
        ],
        "animationCount": 0,
        "materialCount": 1,
        "hasMorphTargets": false,
        "hasSkins": false,
        "hasTextures": true,
        "hasDefaultScene": true,
        "drawCallCount": 1,
        "totalVertexCount": 2999870,
        "totalTriangleCount": 1000000,
        "maxUVs": 1,
        "maxInfluences": 0,
        "maxAttributes": 3
    }
}

@dbs4261
It looks like embedded resources should be all point to buffer data through bufferView and data URI(uri) is not supported for glb:
https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#images
See this example
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxTextured/glTF-Binary
"images":[{"bufferView":3,"mimeType":"image/png"}]

Ok, I understand where you're going with that. How does the image data get added to the buffer? Do I need to do it manually or will tinygltf add it for me? I was unsure how to use the bufferview parameter as I wasnt sure how putting the image into the png/jpg container would work.

Hi! In my case I only have mesh data (vertices, indices) without any other binary data. And if I export as GLB with embedBuffers=True to make the GLB self-contained all validators show warnings about URI is used in GLB container.. How to get around that? It is because of the issue mentioned above (No, from the logic in the code, you promote the first buffer into a binary chunk, but keep the rest of the buffers URI data encoded.) or some other reason?


SWRS version 0 update function is broken

We had assumed the swrs_report_id remained the same across versions but it changes with every new version.
This means the way the refresh_swrs_version_data function matches versions is incorrect.
To fix this:
The match to swrs.report from ggircs_portal.application should be made using both swrs_facility_id and reporting_year
Probability: 4
Effect: 4

wrong repo


Ibm ups

ibm-ups: Add support to poll current UPS status
Add support to the ibm-ups application to poll for the current UPS status by reading
from the USB cable.
Add a new command line option, --no-poll, to disable polling.  This is intended for testing
purposes only.  It allows the UPS status to be manually set on the D-Bus interface using
the busctl command.
See the commit messages for the two related commits in this pull request for more details.

Note to reviewers:  I split this enhancement into two commits:

New --no-poll command line parameter
Support to read UPS status from USB cable

The recommendation from Andrew is to put related commits into one larger pull request.
You can review them separately by going to the Commits tab and clicking on each commit.  That will show both the commit message and the file changes in that commit.  The commit messages have more detail on what was changed and what was tested.


[$250] No input autofocus when connecting Sage Intacct.

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.67-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @suneox
Slack conversation (hyperlinked to channel name): ts_external_expensify_bugs
Action Performed:

Open the app and log in
Create a workspace if there is no any
Navigate to the workspace settings > More features and enable the Accounting option
Open Accounting and select Intacct
Upgrade the policy if it has not been done yet
Next to the step to enter credentials

Expected Result:
The first input field should automatically focus
Actual Result:
No input field is focused.
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Standalone
[x] Android: HybridApp
[ ] Android: mWeb Chrome
[ ] iOS: Standalone
[ ] iOS: HybridApp
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/3756ef6c-446d-4421-914f-304ababa49b8
https://github.com/user-attachments/assets/42f6262e-1096-44f5-878a-6cc8da49d391
https://github.com/user-attachments/assets/59d8f9dc-e3c2-4d89-91a7-f40e0a442bf0
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~021861840903242082245
Upwork Job ID:<PHONE_NUMBER>242082245
Last Price Increase: 2024-11-27

Issue OwnerCurrent Issue Owner: @thesahindia

Proposal
Please re-state the problem that we are trying to solve in this issue.
No input autofocus when connecting Sage Intacct.
What is the root cause of that problem?
We are not using useAutoFocusInput in this inputs
https://github.com/Expensify/App/blob/afad1ac23236ecd101c33f909087cb7edd43288f/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx#L78-L85
What changes do you think we should make in order to solve the problem?

We can do the same way as we did here
    const {inputCallbackRef} = useAutoFocusInput();

    <InputWrapper
       ...
       ref={index === 0 ? inputCallbackRef : undefined}
     >

https://github.com/Expensify/App/blob/afad1ac23236ecd101c33f909087cb7edd43288f/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx#L78-L85
What alternative solutions did you explore? (Optional)
NA

Proposal
Please re-state the problem that we are trying to solve in this issue.
No input autofocus when connecting Sage Intacct.
What is the root cause of that problem?
We don't have the first input field set to auto-focused.
https://github.com/Expensify/App/blob/b55093879f76a5da7b367c24ab13c0a005757b33/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx#L73-L88
What changes do you think we should make in order to solve the problem?
We should make a condition for the first input from the formItems to set it's autoFocus prop to true like over here.
 <InputWrapper
       ...
       autoFocus={index === 0}

FYI, after adding useAutoFocusInput, there will be the same bug as https://github.com/Expensify/App/issues/53314 where auto-focus stops working after closing and reopening the RHP

It looks like this is the same issue that is being reported for NetSuite - https://github.com/Expensify/App/issues/53314
It seems like this is a fairly simple fix, could we combine these issues and fix it for all accounting platforms instead of handling these individually?
@madmax330 @thesahindia what do you think?

@CyberAndrii I see you've added the 😕 emoji, so let me see if I can explain this better.
The issue being worked on here is that auto-focus is not working when connecting to Sage Intacct which is an accounting integration. There is another issue raised herebecause auto-focus is not working when connecting to NetSuite, which is another accounting integration.
It sounds like these cause and fix for these issues are essentially the same i.e. once we identify the fix for one, we should be able to apply that same fix for the other. So I am suggesting that we combine these into one issue to fix autofocus when connecting to an accounting integration. It doesn't make sense to me to treat these as two entirely separate issues.

I guess I will post my proposal from the other issue here then

Proposal
Please re-state the problem that we are trying to solve in this issue.

No input autofocus when connecting Sage Intacct
Input is not auto-focused in setup RHP after dismissing and restarting setup (Sage Intacct & NetSuite)

What is the root cause of that problem?
1
We don't have any code in EnterSageIntacctCredentialsPage component that autofocuses the input
https://github.com/Expensify/App/blob/9d418f5dfb471859677df5d364abc9e72daec1c4/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx#L78-L87
2
We're updating reuseConnectionPopoverPosition state without verifying if the new value differs from the current one. Every time the setReuseConnectionPopoverPosition func is called, a new object is created. React interprets this as a change and marks the component for re-rendering.
This creates an infinite loop: reuseConnectionPopoverPosition changed > component re-renders > reuseConnectionPopoverPosition changed > component re-renders...
https://github.com/Expensify/App/blob/32ce9d429db83ab4ae861af3b39754d800189d6e/src/components/ConnectToNetSuiteFlow/index.tsx#L60-L67
https://github.com/Expensify/App/blob/32ce9d429db83ab4ae861af3b39754d800189d6e/src/components/ConnectToSageIntacctFlow/index.tsx#L65-L72
The infinite re-render then blocks the execution of InteractionManager.runAfterInteractions callbacks, which is used inside the useAutoFocusInput() hook.
What changes do you think we should make in order to solve the problem?
1
Use useAutoFocusInput hook
const {inputCallbackRef} = useAutoFocusInput();

<InputWrapper
    ...
    ref={index === 0 ? inputCallbackRef : undefined}
>

2
Add an if check to ensure the horizontal or vertical property has actually changed before updating the state
const horizontal = x + width;
const vertical = y + height;

// Check if the value has changed to prevent infinite re-renders
if(reuseConnectionPopoverPosition.horizontal !== horizontal || reuseConnectionPopoverPosition.vertical !== vertical) {
    setReuseConnectionPopoverPosition({horizontal, vertical});
}

@MonilBhavsar can you give this one a review?

Proposal looks good 👍


Disable disk access to prove a point

Some basic functionality works differently if the cache doesn't have access to the file system. Please see the falling tests.

I'm sorry, I forgot to mention the most frustrating example:
export const getStaticProps = ...

export function getStaticPaths(): Promise<GetStaticPathsResult> {
    return Promise.resolve({
        paths: [{ params: { slug: '200' } }],
        fallback: false,
    });
}

export default Page ...

In this particular example, such a page will not work and will return 404 because the reading from the disk is off, and the cache is empty on start.
You can check by opening this page: http://localhost:3000/pages/with-paths/fallback-false/200.


build(pipeline): exclude examples from test

Description
Exclude examples from test, which can make logs much cleaner.
Checklist
To ensure a quick review and merge, please ensure:

[ ] The PR has a understandable title and description explaining the why and what.
[ ] The PR is opened in draft if not ready for review yet.

If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review

[ ] The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

[ ] Build is completely green

Submissions with test failures require tracking issue and approval of a CODEOWNER

[ ] At least one +1 review by a CODEOWNER
[ ] All -1 reviews are confirmed resolved by the reviewer

Override/Marking reviews stale must be discussed with CODEOWNERS first

Some clarification: this won't bypass compilation of sample codes. I intentionally add error in sample codes and the dotnet test --filter will still report error:


Couldn't find 2f commit messages in the message log for building a seal

Hello everyone,
I am running a 4-node hyperledger sawtooth network with pbft consensus. After a while the network is not processing any new transactions and the pbft component constantly prints the following error:
Couldn't find 2f commit messages in the message log for building a seal
Does anybody know any possible reason why there are so many faulty nodes that the primary node can't agree to commit the transaction?
The production environment is stuck two days now because of this ERROR.

Same issue


Errors with LoopVectorization v0.12

These are OK with LoopVectorization v0.11.2, but give errors with v0.12:
julia> A = (1:10) .^ 2; K = rand(10);

julia> @tullio N[i,j] := A[i]/j  (j in axes(K,1))  (i in axes(A,1)) # verbose=2 grad=false
ERROR: ArgumentError: Vector of length 2 can't be split into 2 pieces of size 2.

julia> function act!(ℛ::AbstractArray, A, 𝒶𝓍i = axes(A,1), 𝒶𝓍j = axes(ℛ,2))
           @avx for j in 𝒶𝓍j
               for i in 𝒶𝓍i
                   ℛ[i, j] = A[i] / j
               end
           end
           ℛ
       end
act! (generic function with 3 methods)

julia> act!(rand(10,10), A)
ERROR: ArgumentError: Vector of length 2 can't be split into 2 pieces of size 2.

Stacktrace:
 [1] _vstore!
   @ ~/.julia/packages/VectorizationBase/ooQkr/src/strided_pointers/stridedpointers.jl:185 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/LoopVectorization/juUGK/src/reconstruct_loopset.jl:623 [inlined]
 [3] _avx_!
   @ ~/.julia/packages/LoopVectorization/juUGK/src/reconstruct_loopset.jl:623 [inlined]

julia> @tullio B[i] := A[2i+1] + A[i]
ERROR: UndefVarError: ####op#1775__1 not defined

julia> function three!(ℛ::AbstractArray, A, 𝒶𝓍i = axes(ℛ,1))
           @avx for i = 𝒶𝓍i
               ℛ[i] = A[2i + 1] + A[i]
           end
           ℛ
       end
three! (generic function with 2 methods)

julia> three!(rand(4), A)
ERROR: UndefVarError: ####op#1794__1 not defined
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/LoopVectorization/juUGK/src/reconstruct_loopset.jl:623 [inlined]
 [2] _avx_!
   @ ~/.julia/packages/LoopVectorization/juUGK/src/reconstruct_loopset.jl:623 [inlined]
 [3] three!(ℛ::Vector{Float64}, A::Vector{Int64}, 𝒶𝓍i::Base.OneTo{Int64}) (repeats 2 times)
   @ Main ./REPL[279]:2
 [4] top-level scope
   @ REPL[280]:1

This was previously a LoadError: "Reduction not found." (which @tullio catches & hence doesn't try to run the code):
julia> @tullio (&) p := A[i] > 0
ERROR: UndefVarError: max_mask not defined

julia> function and(A, 𝒶𝓍i = axes(A,1))
           𝒜𝒸𝒸 = true
           @avx for i = 𝒶𝓍i
               𝒜𝒸𝒸 = 𝒜𝒸𝒸 & (A[i] > 0)
           end
           𝒜𝒸𝒸
       end
and (generic function with 2 methods)

julia> and(A)
ERROR: UndefVarError: max_mask not defined
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/LoopVectorization/juUGK/src/reconstruct_loopset.jl:623 [inlined]
 [2] _avx_!
   @ ~/.julia/packages/LoopVectorization/juUGK/src/reconstruct_loopset.jl:623 [inlined]
 [3] and(A::Vector{Int64}, 𝒶𝓍i::Base.OneTo{Int64})
   @ Main ./REPL[308]:3
 [4] and(A::Vector{Int64})
   @ Main ./REPL[308]:2
 [5] top-level scope
   @ REPL[309]:1

All with:
(jl_vqvayt) pkg> st LoopVectorization
      Status `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_vqvayt/Project.toml`
  [bdcacae8] LoopVectorization v0.12.5

julia> versioninfo()
Julia Version 1.6.0-rc3
Commit 23267f0d46 (2021-03-16 17:04 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.6.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, westmere)
Environment:
  JULIA_NUM_THREADS = 4

Thanks, fixed and added to the tests:
https://github.com/JuliaSIMD/LoopVectorization.jl/blob/master/test/tullio.jl
They pass locally (and hopefully CI will be up and running again soon).

Thanks! All pass locally, too.


Sending photos leads to error

Sending a photo with a filepath leads to a Photo can't be empty error.
    api.sendMessage({chat_id: chatID, text: image}, function(err, data)
    {
    if(err)
       log(err.description, 'Telegram-Server');
    });

According to your code, you are sending text message, not a photo.
Correct way is:
api.sendPhoto({
    chat_id: <YOUR CHAT ID>,
    caption: 'This is my test image',

    // you can also send file_id here as string (as described in telegram bot api documentation)
    photo: '/path/to/file/test.jpg'
}, function(err, data)
{
    console.log(err);
    console.log(util.inspect(data, false, null));
});

Soory I sendt the wrong code this is my api call. The file temp.png is in the same directory as the .js file
api.sendPhoto({chat_id: chatID, photo: 'temp.png'}, function(err, data)
{
if(err)
log(err.description, 'Telegram-Server');
});

I guess it's something wrong with your temp.png. Can you try to do "ls -la" and make sure that node can read this file and filename is correct? And also check file size. Are you sure that temp.png is a picture at all? Can you try with another png or jpg file?
The code I put above works fine for me (tried both png and jpg).

Ok I found out that is was an error with wrong file extensions. Changing it to the correct extension fixed the error.


Revision feature related issues

Description:
The following issues can be found.

Display in devportal property does not work

We cannot turn on/off this toggle.

Revision drop-down only loads after refresh

You can create multiple revisions for the API. Unless you load the API, it won't load the revisions created for the drop down.

Go to the Endpoints tab and change the current API to a revision number. It always goes to the overview tab.

Failed to delete revisions after reaching revision count and got the following error log line.

ERROR - GlobalThrowableMapper org.wso2.carbon.apimgt.api.APIManagementException: Failed to delete registry artifacts
Steps to reproduce:
Affected Product Version:
wso2am-4.0.0-alpha
Environment details (with versions):

OS:
Client:
Env (Docker/K8s):

Optional Fields
Related Issues:

Suggested Labels:

Suggested Assignees:

We have already done the UI fix for this in the latest, we have do a redeployment to apply the toggle changes though.
Need to do the UI fix
Need to do the UI fix
This also present in the latest, seems to be a UI issue in the last revision create popup. When selected old revision to delete , it seems to get deleted successfully but the second request also seems to be a DELETE request instead of POST to create the new revision.
When done this manually using revision delete button, this issue doesn't occur.

We create a separate UI issue for the 1st one https://github.com/wso2/product-apim/issues/10332

4th issue:
Fix: https://github.com/wso2/carbon-apimgt/pull/10052

1st issue:
Fix https://github.com/wso2/carbon-apimgt/pull/10086
UI issues will address separately with https://github.com/wso2/product-apim/issues/10436 with dropdown revamp, hence closing this.


Terminal never works when trying to change a theme.

VSCode Version: 1.2.1
OS Version: Ubuntu 14.04 LTS

Steps to Reproduce:

Open integrated terminal from vscode
Now try to change a theme, Terminal then never works.

@paragdiwan this should be fixed in v1.3.0

Thank you !


Host and serve localized sms content for course completion

Based on recent thread with BBC -
Looks like we will need to host the sms content for all the different language codes (transliterated to english) and send the course completion sms notification with this content.
TODO -

ingest and store content (based on llc)
Based on the users llc at completion, choose the appropriate content to send and call IMI

Would the content be associated with llc (currently undefined) or with the language code?  If they user speaks hindi in bihar would that content be different than if the user spoke hindi in delhi?  (I don't think so, we should verify)


improvement Add id to statistics map in statement context for cost estimation later

Proposed changes
Add id to statistics map in statement context for cost estimation later
this helps to improve the probability to use materialized view when query a single table with aggregate and many filter
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


Create Makefile for aws setup

see https://github.com/apiaryio/cloudwatch-to-papertrail/blob/master/Makefile


Patch 3

github action workflow folder structure has been created as per requirement

kindly submit new pull request after making credential related changes


Add downloadable zip file

This adds a grunt task to zip up the build directory and some links to the files.

Luckily you were wearing a shirt with a zipper...

It was pretty convenient.

Hold off for a minute, grunt vendor is choking for me. I will make some tweaks to fix it before merging this PR.

Perfect. Merge conflicts should be fixed and grunt vendor is working now.

Thanks, guys! This is great to see. :+1:

Looks good! Not sure why, after running grunt, the zip shows as modified, but we can figure that out later.


Meterials for the sensorized glove

Based on This

Rubber bands (size #16) | 3
Velostat sheet (pressure sensitive conductive plastic) | 1
Copper tape | 1
Wire solid core (WHS22-09-100)  | 1
Mini breadboard (55 holes) | 1
Piece of cardboard (or empty cereal box) | 1
Metric ruler | 1
Scissors | 1
Clear tape | 1
Hole punch | 1
Wire strippers | 1
Breadboard jumper wires | 13
100 Ohm Resistors | 5
Breadboard (5cm x 3.5cm) | 1
USB Cable for Arduino  | 1
Arduino Uno  | 1

We were missing rubber bands, but now have them


🐞 - dropdown expands screen width on mobile

Which @taiga-ui/* package(s) are the source of the bug?
core, cdk
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-snjqgy-tqkorh?file=src/app/app.component.html
Is this issue blocking you?
Non-Blocking
Description

Angular version
12.2.17
Taiga UI version
2.64.0
Which browsers have you used?

[X] Chrome
[ ] Firefox
[ ] Safari
[ ] Edge

Which operating systems have you used?

[ ] macOS
[ ] Windows
[ ] Linux
[ ] iOS
[ ] Android

Also related:
https://taiga-ui.dev/v2/components/data-list
The last example in v3 seem to not limit width properly.

4.x, is it actual now?
https://github.com/user-attachments/assets/79a2f0f2-6ab3-49e7-9cf4-cdff8365b397


Fix pagination issues seen in jinja

**This has now become a spike as an investigation need to take place to understand how to re-format the current pagination component .
See Previous comment for further details.**
Describe the bug
(Pasted from Trello)
I’m trying to use the pagination component, and think there are a couple of issues, I’m guessing for jinja only.
In the macro line 2 ‘currentPageIndex’ is set as an empty string, but is used both as a string and an int. Setting it equal to 0 clears this, combined with typing it to string in line 10 (‘totalPages’ in line 10 also needs typing to string)
This gets the code to not error, but the ‘currentPageIndex’ is not holding its value outside of the for loop, so its is always 0, breaking the ‘Page x of y’ and the previous/next links.
As mentioned in this thread https://stackoverflow.com/questions/9486393/jinja2-change-the-value-of-a-variable-inside-a-loop  it should be possible to make it hold the value by namespacing (I think I’ve done this before for this reason, although can’t remember where), but I’m not sure what effect that might have on the nunjucks if I try it.

Need more information from Paul/Rob about recreating bug - NY/JVDP to action

Update from RC/PJ:
Recreating the bug can be seen by trying to use the component on a jinja driven site, rather than a nunjucks one, as it errors. The content of the ticket is pretty accurate of the issues - basically some of the code is acceptable in nunjucks but not in jinja, so it can’t currently be used in jinja

Request example

The currentPageIndex is being assigned a value inside a for loop. In Jinja, locally scoped declared variables cannot be accessed globally, So the value is not being stored outside the for loop.
The fix for this in Jinja would be to  declare a namespace but this is not accepted in Nunjucks.
I suggest we raise a different ticket for this. we need to refactor this template differently and this could result in a breaking change.

@precious-onyenaucheya-ons to contact @Paul-Joel to recreate bug


Make osgi tests work for each components

before the module components-osgitest was handling all OSGI tests, and components that wanted to test their osgi bundle have to add a test in this bundle.
This PR give the possibility to the component developer to test their bundle inside the component module.
The module components-osgitest is still required but now it contains the basic definition for the pax-exam framework to launch the component api service. So it will be required as a dependency for all components that want to do OSGI tests.
Salesforce, api-common and the archetype have been updated to launch their own OSGI tests.

Pull request test result: success :star:

I'm good with this; no problems as is.
My only comment is the module names associated with the all of the multi-runtime test modules are not according to the standard (since you had a commit to clean up those, I'm addressing this here). All of those module names should start with components-api-test to make it clear they are both part of the components-api and they are test modules. If you want to handle this in a separate pull request, that's fine. https://jira.talendforge.org/browse/TCOMP-307
One thing that's missing though is Spring and OSGi tests for most components. What would really be nice is if those were completely automated (a separate class was not necessary at all, and perhaps generated). This is something that could be done pretty easily with Gradle I think. We can have some declarative means of saying which OSGi bundles are required as part of the Gradle definition of the component. But again, this is the next step. https://jira.talendforge.org/browse/TCOMP-306

(Did I do the review labeling stuff right?)

Pull request test result: failure :x:

Pull request test result: success :star:


register multiplier for reconstruction loss in diva and hduva for fbopt

after this pr passed ci: https://github.com/marrlab/DomainLab/pull/457
I will merge it to both master the fbopt

fixed


SunmiPrinter is importing as a null

Hello 👋
I'm trying to use @heasy/react-native-sunmi-printer libary to print in sunmi v2 terminal.
I'm using:
React 18.0.0
React Native 0.69.6
expo ~46.0.16
I'm testing it on example/src/App.tsx on your repo, but I'm getting errors like this one:
TypeError: null is not an object (evaluating '_reactNativeSunmiPrinter.default.printerText')
If I try to console.log SunmiPrinter it returns null.
This is the import on the example:
import SunmiPrinter, {
  AlignValue,
  SunmiScan,
} from '@heasy/react-native-sunmi-printer';

I didn't link anything because on the readme there is written that:
Automatic linking is supported for all platforms (even windows on React native >= 0.63!)
The types are loading correctly but if I try use anything from SunmiPrinter it throws an error.
Please tell me if am I doing something wrong I really need to get this working.
I will really appreciate any help 🥺

expo is not recommended。Please see if you want to use it #10

Thanks for the answer!
I tried printing on react native without expo and it's working fine.
I must rewrite my entire app to plain react native but at least I don't get fired 😁
Thanks for help!


Rewrite AnalyticsProtocol

Record all command line arguments
Rename to InfoProtocol, since analytics occurs throughout OK, not just in this protocol.

@Some3141 is it ok to go ahead with this change? (i.e. will it break the server)


typo

Make sure set the target branch to develop
What is the purpose of the change
typo
Brief changelog
Just a typo.
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Coverage decreased (-0.04%) to 54.03% when pulling 95a6275d54d589a410511c37e62d44eda5df77fc on sunbufu:fix-a-typo into fcc20dee22d92d4cf0cdba5db21e0de1663478a5 on apache:develop.

Codecov Report

Merging #3088 (95a6275) into develop (df1d93f) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop    #3088      +/-   ##
=============================================
- Coverage      47.97%   47.89%   -0.08%
+ Complexity      4569     4558      -11
=============================================
  Files            552      552
  Lines          36628    36633       +5
  Branches        4844     4845       +1
=============================================
- Hits           17572    17546      -26
- Misses         16832    16864      +32
+ Partials        2224     2223       -1

Impacted Files
Coverage Δ

.../org/apache/rocketmq/store/PutMessageSpinLock.java
0.00% <0.00%> (-85.72%)
:arrow_down:

.../broker/subscription/SubscriptionGroupManager.java
54.11% <0.00%> (-16.48%)
:arrow_down:

...rg/apache/rocketmq/common/stats/StatsSnapshot.java
84.61% <0.00%> (-15.39%)
:arrow_down:

.../apache/rocketmq/common/stats/MomentStatsItem.java
38.09% <0.00%> (-9.53%)
:arrow_down:

...ache/rocketmq/common/stats/MomentStatsItemSet.java
43.47% <0.00%> (-8.70%)
:arrow_down:

...a/org/apache/rocketmq/logging/inner/SysLogger.java
28.57% <0.00%> (-5.72%)
:arrow_down:

...in/java/org/apache/rocketmq/test/util/MQAdmin.java
38.88% <0.00%> (-5.56%)
:arrow_down:

...java/org/apache/rocketmq/logging/inner/Logger.java
51.67% <0.00%> (-4.31%)
:arrow_down:

...ava/org/apache/rocketmq/test/util/VerifyUtils.java
46.26% <0.00%> (-2.99%)
:arrow_down:

...ava/org/apache/rocketmq/filter/util/BitsArray.java
59.82% <0.00%> (-2.57%)
:arrow_down:

... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df1d93f...95a6275. Read the comment docs.


Homebridge still thinks an uninstalled plugin exists

So for my homebridge application running here, I have it running on a Mac Mini here on the house and all has been working great to get two WeMo switches and my Assurelink garage door working with HomeKit.
Back when I first set everything up, i installed/tried the homebridge-itunes plugin, but couldn't get it to work, so I uninstalled it (npm uninstall -g homebridge-itunes).  there is no sign of it in my config.json (~/.homebridge/config.json) yet you can see that homebridge is still trying to load something related to it. (see screen shot from terminal)
There are also all the iTunes-related "devices" listed in my HomeKit configuration as well (see screenshot from my phone, bottom 6 boxes)
What/where I am missing to eradicate this plugin from my homebridge/homekit configuration?  I don't understand where it's getting queued to get loaded.

This sorted it for me... I had previously already removed the persist folder, but it was the CachedAccessories file in the Accessories Folder that was doing it.

@MorningZ what app is in your screenshot?

Hesperus
Sent from my iPhone

On Oct 22, 2016, at 5:06 PM, Kevin Murphy<EMAIL_ADDRESS>wrote:
@MorningZ what app is in your screenshot?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@AppleTechy could you clarify the "repair" part of your comment? How does one do that?

Unfortunatelly yes...

Try emptying the CachedAccessories folder instead