Add all candles to client.rest.on

Hello,
Thanks for developing this project.
Would it be possible to add the updated Candles[] array to this callback please: https://github.com/bennycode/coinbase-pro-node/blob/main/src/demo/rest-watch-candles.ts#L12
I would like to know the full candle history from when I called client.rest.product.getCandles up until the latest tick.

Hi @artdevgame, I am happy to hear that you like the project.
The current architecture allows only to get the latest candle. You can subscribe to ProductEvent.NEW_CANDLE events and keep track of all emitted candles in your own application.
Would that be doable for you?

Hey @bennycode
I'm using the demo here:
https://github.com/bennycode/coinbase-pro-node/blob/main/src/demo/rest-watch-candles.ts
Here we retrieve all candles and assign to a variable called candles:
https://github.com/bennycode/coinbase-pro-node/blob/main/src/demo/rest-watch-candles.ts#L17
At the moment, the body of the callback (https://github.com/bennycode/coinbase-pro-node/blob/main/src/demo/rest-watch-candles.ts#L13) in my version is pushing candle to the candles array because I need to keep track of the history (I'm looking for trends).
I don't like that my callback is now causing side effects, and would like to solve that somehow, like how array.map has an optional 'array' param: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
Another way I could solve it is to have the ProductEvent.NEW_CANDLE callback call client.rest.product.getCandles again, but that seems a bit wasteful.

@artdevgame, I see your use case now. From my point of view, pushing incoming candles to the existing candles array does not sound like a bad idea. The alternative would be to keep all fetched candles in the memory of the "coinbase-pro-node" library, or do you have another approach?
I wouldn't like to store all fetched candles in the memory of "coinbase-pro-node", because it would consume memory even in applications which don't have your use case and it would go beyond the concerns of a REST API.
In your case using an application state container, like Redux, could be a good idea to manage your candles and handle side effects. What do you think?

Hey @bennycode, happy new year.
I'm ok pushing to candles for now. I share your concern with the memory allocation so don't think it's something for you to implement in hindsight.
I'll close the ticket. Thanks for the feedback.

Hey @bennycode, happy new year.
I'm ok pushing to candles for now. I share your concern with the memory allocation so don't think it's something for you to implement in hindsight.
I'll close the ticket. Thanks for the feedback.


APEXCORE-328 Use Maven Embedder to execute maven goals from unit test

@davidyan74, @tweise Please review.

@vrozov is this ready for review?

Yes, it is ready for review.


add figs with diagrams

references

diagrams
dev.io

from diagrams import Diagram
from diagrams.aws.compute import EC2

def create_():
    with Diagram("Simple Diagram", outformat="png", filename="a/test", show=False):
        EC2("web")

able to accept folders, functions


MediaPlayer aborted with Promise already satisfied

hi,I  got a problem while playing with MediaPlayer. log:
2017-09-25 06:16:27.288 [] I DirectiveSequencer:onDirective:directive={"namespace:"TemplateRuntime",name:"RenderPlayerInfo",messageId:"17a1c325-82b3-46c1-983d-57f7c8cac5a5",dialogRequestId:"4949f1d2-be01-4ec6-90e8-19caf668cd6f"}
2017-09-25 06:16:27.288 [] 9 MediaPlayer:playCalled
2017-09-25 06:16:27.288 [] W DirectiveRouter:preHandleDirectiveFailed:messageId=17a1c325-82b3-46c1-983d-57f7c8cac5a5,reason=noHandlerRegistered
2017-09-25 06:16:27.289 [] I DirectiveSequencer:sendingExceptionEncountered:messageId=17a1c325-82b3-46c1-983d-57f7c8cac5a5
2017-09-25 06:16:27.289 [] 0 MediaPlayer:handlePlayCalled
2017-09-25 06:16:27.289 [] 0 MediaPlayer:doStopSuccess:reason=alreadyStopped
2017-09-25 06:16:27.289 [] 9 MediaPlayer:doStopSuccess
2017-09-25 06:16:27.289 [] 0 MediaPlayer:handlePlay:supportsBuffering=0
2017-09-25 06:16:27.289 [] 0 EventBuilder:buildJsonEventString:messageId=4fc51536-7ec1-4a6f-91c2-1d7596863956,namespace=System,name=ExceptionEncountered
2017-09-25 06:16:27.295 [] 0 MediaPlayer:handlePlay:stateReturn=ASYNC
2017-09-25 06:16:27.295 [] 0 MediaPlayer:handlePlay:stateReturn11111=ASYNC
terminate called after throwing an instance of 'std::future_error'
what():  Promise already satisfied
Aborted
i add some logs,code,here is  code:
auto stateChangeRet = gst_element_set_state(m_pipeline.pipeline, GST_STATE_PLAYING);
ACSDK_DEBUG(LX("handlePlay").d("stateReturn", gst_element_state_change_return_get_name(stateChangeRet)));
if (GST_STATE_CHANGE_FAILURE == stateChangeRet) {
ACSDK_ERROR(LX("handlePlayFailed").d("reason", "gstElementSetStateFailure"));
promise->set_value(MediaPlayerStatus::FAILURE);
} else if (GST_STATE_CHANGE_ASYNC == stateChangeRet) {
ACSDK_DEBUG(LX("handlePlay").d("stateReturn11111", gst_element_state_change_return_get_name(stateChangeRet)));
promise->set_value(MediaPlayerStatus::PENDING);
ACSDK_DEBUG(LX("handlePlay").d("stateReturn22222", gst_element_state_change_return_get_name(stateChangeRet)));
} else {
ACSDK_DEBUG(LX("handlePlay").d("stateReturn33333", gst_element_state_change_return_get_name(stateChangeRet)));
promise->set_value(MediaPlayerStatus::SUCCESS);
ACSDK_DEBUG(LX("handlePlay").d("stateReturn44444", gst_element_state_change_return_get_name(stateChangeRet)));
}
ACSDK_DEBUG(LX("handlePlay").d("stateReturn55555", gst_element_state_change_return_get_name(stateChangeRet)));
hope you can give me some advice.

@paragone can you tell what were you trying to play, so that we can reproduce the issue.

Hi @paragone , this has been observed and it will be resolved in our future release. Please refer to #153 and the solution there. Below is the snippet of the temporary solution from #153:
It looks like the crash is occurring because m_playlistParsedPromise in MediaPlayer/URLSource is being set twice. In MediaPlayer/include/UrlSource.h, could you add a boolean flag that indicates whether a callback has been received, as well as a mutex? For example, bool m_hasReceivedAPlaylistCallback and std::mutex m_mutex. Then in URLSource's constructor, initialize m_hasReceivedAPlaylistCallback to false. Finally, in UrlSource::onPlaylistParsed, you could add something like the following:
std::lock_guardstd::mutex lock{m_mutex};
if (!m_hasReceivedAPlaylistCallback) {
m_hasReceivedAPlaylistCallback = true;
m_playlistParsedPromise.set_value(urls);
}

hi mradulan,
I was playing sample music by saying 'play happy' ,'play sugar' .ect.
after playing more than 5 songs，it will crash.

@mradulan
This issue seems diff from #153 , that is a global variable, BUT in this issue, this is a local variable. detail as below:
2017-09-26 07:20:08.058 [] W DirectiveRouter:preHandleDirectiveFailed:messageId=e3652dc0-34dc-473b-ac0a-ac7336908c3f,reason=noHandlerRegistered
2017-09-26 07:20:08.058 [] I DirectiveSequencer:sendingExceptionEncountered:messageId=e3652dc0-34dc-473b-ac0a-ac7336908c3f
2017-09-26 07:20:08.058 [] 0 SpeechSynthesizer:onFocusChanged:newFocus=FOREGROUND
2017-09-26 07:20:08.058 [] 0 AudioInputProcessor:executeOnFocusChanged:newFocus=NONE
2017-09-26 07:20:08.058 [] 0 AudioInputProcessor:executeOnFocusChanged:reason=Lost focus
2017-09-26 07:20:08.058 [] 0 SpeechSynthesizer:executeStateChange:newState=PLAYING
2017-09-26 07:20:08.058 [] 0 AudioInputProcessor:setState:from=BUSY,to=IDLE
2017-09-26 07:20:08.058 [] 9 SpeechSynthesizer:startPlaying
2017-09-26 07:20:08.058 [] 9 MediaPlayer:setSourceCalled:sourceType=AttachmentReader
LIUEH promise set value 41
LIUEH promise set value 41
2017-09-26 07:20:08.059 [] 0 MediaPlayer:handleSetSourceCalled
2017-09-26 07:20:08.059 [] 9 MediaPlayer:tearDownPipeline
2017-09-26 07:20:08.059 [] 0 EventBuilder:buildJsonEventString:messageId=c2b2660c-ab29-4cb5-bbc3-a2356bae1153,namespace=System,name=ExceptionEncountered
QUEUE_AVS_OR_SESSION_TO_EVENT messageQueueReceive msg->m_type = 2, msg->m_msg = 0, msg->m_length = 198
queueTask QUEUE_MESSAGE_TYPE_AVSJSON
queueTask QUEUE_MESSAGE_TYPE_AVSJSON cb = 0x22514
queueTask QUEUE_MESSAGE_TYPE_AVSJSON callback json
2017-09-26 07:20:08.063 [] E MediaPlayer:handlePlayFailed:LIUEH =promise set value 37
2017-09-26 07:20:08.063 [] 9 MediaPlayer:playCalled
2017-09-26 07:20:08.063 [] 0 MediaPlayer:handlePlayCalled
2017-09-26 07:20:08.063 [] 0 MediaPlayer:doStopSuccess:reason=alreadyStopped
2017-09-26 07:20:08.063 [] 9 MediaPlayer:doStopSuccess
2017-09-26 07:20:08.063 [] 0 MediaPlayer:handlePlay:supportsBuffering=0
messageQueueFree
2017-09-26 07:20:08.068 [] 0 MediaPlayer:handlePlay:stateReturn=ASYNC
2017-09-26 07:20:08.068 [] E MediaPlayer:handlePlayFailed:LIUEH =promise set value 13
2017-09-26 07:20:08.068 [] 9 BaseStreamSource:onNeedDataCalled:size=4096
term
`MediaPlayerStatus MediaPlayer::play() {
ACSDK_DEBUG9(LX("playCalled"));
if (!m_source) {
ACSDK_ERROR(LX("playFailed").d("reason", "sourceNotSet"));
return MediaPlayerStatus::FAILURE;
}
m_source->preprocess();
std::promise<MediaPlayerStatus> promise;
auto future = promise.get_future();
std::function<gboolean()> callback = [this, &promise]() {
    handlePlay(&promise);
    return false;
};
queueCallback(&callback);
return future.get();

}
`
auto stateChangeRet = gst_element_set_state(m_pipeline.pipeline, GST_STATE_PLAYING);     ACSDK_DEBUG(LX("handlePlay").d("stateReturn", gst_element_state_change_return_get_name(stateChangeRet))); 	if (GST_STATE_CHANGE_FAILURE == stateChangeRet) { 		ACSDK_ERROR(LX("handlePlayFailed").d("reason", "gstElementSetStateFailure")); 		ACSDK_ERROR(LX("handlePlayFailed").d("LIUEH ", "promise set value 12")); 		promise->set_value(MediaPlayerStatus::FAILURE); 	} else if (GST_STATE_CHANGE_ASYNC == stateChangeRet) { 		ACSDK_ERROR(LX("handlePlayFailed").d("LIUEH ", "promise set value 13")); 		promise->set_value(MediaPlayerStatus::PENDING); 	} else { 		ACSDK_ERROR(LX("handlePlayFailed").d("LIUEH ", "promise set value 14")); 		promise->set_value(MediaPlayerStatus::SUCCESS); 	}     retur

which part of the code are you setting the promise set value to 41 and 37?

which part of the debug code are you printing "promise set value 37" and "promise set value 37"

@Roy20141120 , does it play any music for you and then it terminates with the error? It seems like the music never gets played because you get MediaPlayer:handlePlay:stateReturn=ASYNC

Hi @paragone and @Roy20141120, there have been quite a few changes to MediaPlayer and AudioPlayer in release v1.1.0.  Could you try your test case with this latest release and see if you are still seeing the issue?  Thanks!

I test it with the latest release and it still exists,here is the log:
2017-10-12 09:14:28.333 [] 0 EventBuilder:buildJsonEventString:messageId=1036b6b1-821f-4e00-b1d3-606f97164775,namespace=System,name=ExceptionEncountered
2017-10-12 09:14:28.333 [] I DirectiveRouter:handleDirective:messageId=3239a6ca-df58-414b-beae-dd551c9bd3f3,action=calling
2017-10-12 09:14:28.333 [] 9 SpeechSynthesizer:handleDirective:messageId=3239a6ca-df58-414b-beae-dd551c9bd3f3
2017-10-12 09:14:28.333 [] I DirectiveRouter:preHandleDirective:messageId=428cbbdc-6a12-4a51-ae46-5918df1882f7,action=calling
2017-10-12 09:14:28.333 [] 0 CapabilityAgent:addingMessageIdToMap:messageId=428cbbdc-6a12-4a51-ae46-5918df1882f7
2017-10-12 09:14:28.333 [] 0 SpeechSynthesizer:executeHandle:messageId=3239a6ca-df58-414b-beae-dd551c9bd3f3
2017-10-12 09:14:28.333 [] I DirectiveSequencer:onDirective:directive={"namespace:"TemplateRuntime",name:"RenderPlayerInfo",messageId:"7bbcabf9-8362-4c9b-8d38-605d54be755f",dialogRequestId:"997baef2-208a-46c7-ba1f-c08bc93c1e6e"}
2017-10-12 09:14:28.334 [] 1 FocusManager:acquireChannel:channelName=Dialog,activityId=SpeechSynthesizer.Speak
2017-10-12 09:14:28.334 [] W DirectiveRouter:preHandleDirectiveFailed:messageId=7bbcabf9-8362-4c9b-8d38-605d54be755f,reason=noHandlerRegistered
2017-10-12 09:14:28.334 [] I DirectiveSequencer:sendingExceptionEncountered:messageId=7bbcabf9-8362-4c9b-8d38-605d54be755f
2017-10-12 09:14:28.334 [] 0 AudioInputProcessor:executeOnFocusChanged:newFocus=NONE
2017-10-12 09:14:28.334 [] 0 AudioInputProcessor:executeOnFocusChanged:reason=Lost focus
2017-10-12 09:14:28.334 [] 0 AudioInputProcessor:setState:from=BUSY,to=IDLE
2017-10-12 09:14:28.334 [] 0 SpeechSynthesizer:onFocusChanged:newFocus=FOREGROUND
2017-10-12 09:14:28.335 [] 0 SpeechSynthesizer:executeStateChange:newState=PLAYING
2017-10-12 09:14:28.335 [] 9 SpeechSynthesizer:startPlaying
2017-10-12 09:14:28.335 [] 9 MediaPlayer:setSourceCalled:sourceType=AttachmentReader
2017-10-12 09:14:28.335 [] 0 EventBuilder:buildJsonEventString:messageId=276c7fae-92e4-468a-ad0e-a958befc68a4,namespace=System,name=ExceptionEncountered
2017-10-12 09:14:28.335 [] 0 MediaPlayer:handleSetSourceCalled
2017-10-12 09:14:28.335 [] 9 MediaPlayer:tearDownTransientPipelineElements
2017-10-12 09:14:28.335 [] 0 MediaPlayer:doStopSuccess:reason=alreadyStopped
2017-10-12 09:14:28.335 [] 9 MediaPlayer:doStopSuccess
2017-10-12 09:14:28.337 [] 9 MediaPlayer:playCalled
2017-10-12 09:14:28.338 [] 0 MediaPlayer:handlePlayCalled
2017-10-12 09:14:28.338 [] 0 MediaPlayer:doStopSuccess:reason=alreadyStopped
2017-10-12 09:14:28.338 [] 9 MediaPlayer:doStopSuccess
2017-10-12 09:14:28.338 [] 0 MediaPlayer:handlePlay:attemptBuffering=0
2017-10-12 09:14:28.343 [] 0 MediaPlayer:handlePlay:startingState=PLAYING,stateReturn=ASYNC
2017-10-12 09:14:28.344 [] 9 BaseStreamSource:onNeedDataCalled:size=4096
terminate called after throwing an instance of 'std::future_error'
what():  Promise already satisfied
Aborted
134|root@android:/system/avs #

Hi @paragone,
Our MediaPlayer component has gone through several big changes over the last 2 releases. Could you try again and see if the issue is still persisting? I'm going to close this issue for now since it's a bit stale, but please reopen if you're still seeing the issue.
Thanks,
Sanjay

Hi ,
I have seen the similar issue in latest version of SDK , below are the logs , SDK is crashing so frequently here:
2018-01-08 23:18:36.847 [  a] 9 MediaPlayer:playCalled
2018-01-08 23:18:36.848 [  2] 0 MediaPlayer:handlePlayCalled:idPassed=1,currentId=1
2018-01-08 23:18:36.848 [  2] 0 MediaPlayer:handlePlay:attemptBuffering=0
2018-01-08 23:18:36.864 [  2] 0 MediaPlayer:handlePlay:startingState=PLAYING,stateReturn=ASYNC
2018-01-08 23:18:36.864 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.864 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.864 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.865 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.865 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.865 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.867 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.867 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.867 [  2] 9 MediaPlayer:State Change:oldState=NULL,newState=READY,pendingState=PLAYING
2018-01-08 23:18:36.867 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.867 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.867 [  2] 9 MediaPlayer:messageReceived:messageType=stream-status
2018-01-08 23:18:36.867 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.868 [ 14] 9 BaseStreamSource:onNeedDataCalled:size=4096
2018-01-08 23:18:36.868 [  2] 9 MediaPlayer:messageReceived:messageType=stream-status
2018-01-08 23:18:36.868 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.868 [  2] 9 MediaPlayer:messageReceived:messageType=stream-status
2018-01-08 23:18:36.868 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:36.868 [  2] 9 MediaPlayer:messageReceived:messageType=stream-status
2018-01-08 23:18:36.868 [  2] 9 BaseStreamSource:handleNeedDataCalled
2018-01-08 23:18:36.868 [  2] 9 BaseStreamSource:installOnReadDataHandler:action=newSourceId,sourceId=16
2018-01-08 23:18:36.869 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:36.869 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:36.869 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:36.869 [  2] 9 AttachmentReaderSource:read:size=3185,status=0
2018-01-08 23:18:36.930 [ 14] 9 MediaPlayer:onPadAddedCalled
2018-01-08 23:18:37.223 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:37.224 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.224 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.224 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.224 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.224 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.224 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.225 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:37.225 [  2] 9 MediaPlayer:handlePadAddedSignalCalled
2018-01-08 23:18:37.244 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:37.245 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.245 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:37.247 [  2] 9 MediaPlayer:messageReceived:messageType=stream-start
2018-01-08 23:18:37.529 [  2] 9 AttachmentReaderSource:read:size=4096,status=0
2018-01-08 23:18:37.529 [ 10] 0 AudioInputProcessor:onSendCompleted:status=SUCCESS
2018-01-08 23:18:37.530 [ 10] 0 HTTP2Transport:cleanupFinishedStream:streamId=9,result=200
2018-01-08 23:18:37.530 [  2] 9 MediaPlayer:messageReceived:messageType=latency
2018-01-08 23:18:37.530 [  2] 9 MediaPlayer:messageReceived:messageType=stream-status
2018-01-08 23:18:37.530 [  2] 9 MediaPlayer:messageReceived:messageType=tag
2018-01-08 23:18:37.530 [  2] 0 MediaPlayer:callingOnTags
2018-01-08 23:18:37.531 [  2] 9 MediaPlayer:messageReceived:messageType=tag
2018-01-08 23:18:37.531 [  2] 0 MediaPlayer:callingOnTags
2018-01-08 23:18:37.531 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.531 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.531 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.531 [  2] 9 MediaPlayer:State Change:oldState=READY,newState=PAUSED,pendingState=PLAYING
2018-01-08 23:18:37.531 [  2] 9 MediaPlayer:messageReceived:messageType=async-done
2018-01-08 23:18:37.532 [  2] 9 MediaPlayer:messageReceived:messageType=new-clock
2018-01-08 23:18:37.530 [ 10] 0 HTTP2StreamPool:releaseStream:streamId=9,numAcquiredStreams=1
2018-01-08 23:18:37.532 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.532 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.532 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.532 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.533 [  2] 9 MediaPlayer:messageReceived:messageType=state-changed
2018-01-08 23:18:37.534 [  2] 9 MediaPlayer:State Change:oldState=PAUSED,newState=PLAYING,pendingState=VOID_PENDING
2018-01-08 23:18:37.534 [  2] 0 MediaPlayer:callingOnPlaybackStarted:currentId=1
2018-01-08 23:18:37.534 [  2] 9 SpeechSynthesizer:onPlaybackStarted:callbackSourceId=1
2018-01-08 23:18:37.534 [  a] 0 SpeechSynthesizer:executePlaybackStarted
2018-01-08 23:18:37.534 [  2] 9 MediaPlayer:messageReceived:messageType=tag
2018-01-08 23:18:37.534 [  a] 0 SpeechSynthesizer:executeProvideState:stateRequestToken=0
2018-01-08 23:18:37.534 [  a] 9 MediaPlayer:getOffsetCalled
2018-01-08 23:18:37.534 [  2] 0 MediaPlayer:callingOnTags
2018-01-08 23:18:37.534 [  2] 9 AttachmentReaderSource:read:size=1388,status=0
2018-01-08 23:18:37.535 [  2] 0 MediaPlayer:handleGetOffsetCalled:idPassed=1,currentId=1
2018-01-08 23:18:37.537 [  a] 0 ContextManager:updateStateLocked:action=updatedState,state={"token":"amzn1.as-ct.v1.Domain:Application:Knowledge#ACRI#1681976a-a9b0-48d7-9905-d9600e680406#Alexa3P:1.0/2e
2018-01-08 23:18:37.537 [ 13] 9 SpeechSynthesizer:onFocusChangedSuccess
2018-01-08 23:18:37.537 [  a] 0 EventBuilder:buildJsonEventString:messageId=5e253201-b5df-47ae-9663-105c8ad1889d,namespace=SpeechSynthesizer,name=SpeechStarted
2018-01-08 23:18:37.537 [  a] 9 HTTP2Transport:enqueueRequest:jsonContent={"event":{"header":{"namespace":"SpeechSynthesizer","name":"SpeechStarted","messageId":"5e253201-b5df-47ae-9663-105c8ad1889}
2018-01-08 23:18:37.538 [  2] I InProcessAttachmentReader:readFailed:reason=SDS is closed
2018-01-08 23:18:37.878 [  2] 9 AttachmentReaderSource:read:size=0,status=3
2018-01-08 23:18:37.878 [  2] 9 BaseStreamSource:signalEndOfDataCalled
2018-01-08 23:18:37.878 [ 10] 0 HTTP2Transport:processNextOutgoingMessage:jsonContent={"event":{"header":{"namespace":"SpeechSynthesizer","name":"SpeechStarted","messageId":"5e253201-b5df-47ae-9663}
2018-01-08 23:18:37.879 [ 10] 0 HTTP2StreamPool:getStream:streamId=11,numAcquiredStreams=2
2018-01-08 23:18:37.879 [  2] 9 BaseStreamSource:clearOnReadDataHandlerCalled:sourceId=16
terminate called after throwing an instance of 'std::future_error'
2018-01-08 23:18:37.879 [ 10] 9 HTTP2
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:57
#1  0xb6a52950 in __GI_abort () at abort.c:89
#2  0xb6c3a58c in __gnu_cxx::__verbose_terminate_handler () atgcc-4.8.2-r0/gcc-4.8.2/libstdc++-v3/libsupc++/vterminate.cc:95
#3  0xb6c383d8 in __cxxabiv1::__terminate (handler=) at /gcc-4.8.2/libstdc++-v3/libsupc++/eh_terminate.cc:38
#4  0xb6c38400 in std::terminate () at /gcc-4.8.2-r0/gcc-4.8.2/libstdc++-v3/libsupc++/eh_terminate.cc:48
#5  0xb6c8ca84 in std::(anonymous namespace)::execute_native_thread_routine (__p=)
atmp-eglibc/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libstdc++-v3/src/c++11/thread.cc:92
#6  0xb6eeb040 in start_thread (arg=0xae2ff440) at pthread_create.c:314
#7  0xb6af10e0 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/clone.S:92 from //lib/libc.so.6
#8  0xb6af10e0 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/clone.S:92 fromlib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Please provide the solution for this issue


Take &Arc instead of Arc in poll_future and poll_stream

Part of issue #341 (fixes it?). As can be seen in the wait methods this prevents one Arc clone for every polling after the first one. Did not benchmark but seems like a nice performance optimization. However this makes the syntax around polling complicated because one does not simply cast &Arc<T> to &Arc<Trait>.
Thanks @stephaneyfx for helping me with the trait object magic in IRC.

Looks great! This is a breaking change though so we'll hold off until 0.2

I think it's actually looking like we're going to deprecate these functions in https://github.com/alexcrichton/futures-rs/pull/436, so I'm going to close this.

(they'll just be removed for 0.2 anyway)


Auto-release job failing due to conflicting branch names

This's sort of a bug report wrt CI infra. I'd like to capture my thought on auto-release job failures, that we spotted last week.
Log of the job e.g.:
https://prow.knative.dev/view/gs/knative-prow/logs/ci-knative-sandbox-kn-plugin-func-auto-release/1488124573319696384
IMO, the root cause of the failure is branch conflicting naming to what the release.sh expects.  The v (in release-v0.20.1) in former bnrach names breaks the calculation of next version to be auto-released, variable calculated here. The order is broken because, the 0.21 value should be last ideally, but as
There are 2 options:

Remove the conflicting branches and keep only tags
Modify release.sh script - I'm not sure if that's feasible, but seems safe since there shouldn't be any "v" the other project depend on :crossed_fingers:

/cc @lance @rhuss
➜  kn-plugin-func git:(main) { (git branch -r | grep upstream/release-) ; (git branch | grep release-); } | cut -d '-' -f2 | sort -V | uniq
0.21
v0.6.3
v0.7.0
v0.8.0
v0.9.0
v0.10.0
v0.11.0
v0.11.1
v0.12.0
v0.12.1
v0.12.2
v0.13.0
v0.14.0
v0.15.0
v0.15.1
v0.16.0
v0.16.1
v0.17.0
v0.17.1
v0.18.0
v0.19.0
v0.19.1
v0.20.0

E.g. with removing the v it looks better.
➜  kn-plugin-func git:(main) { (git branch -r | grep upstream/release-) ; (git branch | grep release-); } | cut -d '-' -f2 | cut -d 'v' -f2 | sort -V | uniq
0.6.3
0.7.0
0.8.0
0.9.0
0.10.0
0.11.0
0.11.1
0.12.0
0.12.1
0.12.2
0.13.0
0.14.0
0.15.0
0.15.1
0.16.0
0.16.1
0.17.0
0.17.1
0.18.0
0.19.0
0.19.1
0.20.0
0.21

I noticed this too last week before I had to leave, and wondered myself what the best way forward would be. Thank you for taking the initiative here! My gut instinct was not to remove the branches, but instead find some way to rename them. However, I think that might introduce some unnecessary work/complexity, and now I am leaning towards just deleting the branches.
Typically, we would want to maintain branches so we can apply fixes on patch releases for previous versions. But all of these previous versions are pre-1.0 and we have essentially no intention of backporting any fixes prior to those in v0.21.2. But I'd like to hear what @rhuss and others think about this before doing anything.
My suggestion...

Check to be sure all existing version tags exist on main. They should, but if for some reason the tag got created on a commit down the line in a branch, we should move it to the branch head.
Delete all branches prior to release-0.21 but keep tags
?
Profit!

Yep, I'd go with your suggestion. Until tags are untouched, release branches should be recoverable.
@rhuss a little heads up, all the branches in question are protected of course. :superhero:

@rhuss I think that covers it. Thank you!


Added utility to test logging output

This PR moves MockLoggingHandler from HoloViews to param where it is more appropriate. One example unit test is also added here to show how it is used. Once a new version of param is release, I'll be able to remove the equivalent code from HoloViews.

Coverage increased (+0.06%) to 78.066% when pulling 147ccd0c95e8adea3e59980e37d730fcaa9e3686 on logging_testing into 07bbfbd59469bee500a5330104fe00c190a8912d on master.

Ready to merge if you are happy with it!


[SPARK-30051][BUILD][test-hadoop3.2] Clean up hadoop-3.2 transitive dependencies

What changes were proposed in this pull request?
This PR aims to cut org.eclipse.jetty:jetty-webapp and javax.xml.bind:jaxb-api transitive dependency from hadoop-common.
Why are the changes needed?
This will simplify our dependency management by the removal of unused dependencies.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the GitHub Action with all combinations and the Jenkins UT with (Hadoop-3.2).

Test build #114477 has started for PR 26683 at commit 3473e83.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19311/
Test PASSed.

Test build #114477 has finished for PR 26683 at commit 3473e83.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114477/
Test FAILed.

Retest this please.

Test build #114487 has started for PR 26683 at commit 3473e83.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19320/
Test PASSed.

Test build #114487 has finished for PR 26683 at commit 3473e83.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114487/
Test FAILed.

Mockito ClassCastException seems to occur in Jenkins environment.
org.mockito.exceptions.base.MockitoException:  ClassCastException occurred while creating the mockito mock :   class to mock : 'javax.servlet.http.HttpServletRequest', loaded by classloader : 'sun.misc.Launcher$AppClassLoader@b065c63'   created class : 'org.mockito.codegen.HttpServletRequest$MockitoMock$1144539166', loaded by classloader : 'net.bytebuddy.dynamic.loading.MultipleParentClassLoader@7409ff4d'   proxy instance class : 'org.mockito.codegen.HttpServletRequest$MockitoMock$1144539166', loaded by classloader : 'net.bytebuddy.dynamic.loading.MultipleParentClassLoader@7409ff4d'   instance creation by : ObjenesisInstantiator  You might experience classloading issues, please ask the mockito mailing-list.

Test build #114493 has started for PR 26683 at commit cb7aa8e.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19327/
Test PASSed.

Test build #114493 has finished for PR 26683 at commit cb7aa8e.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114493/
Test FAILed.

Test build #114541 has started for PR 26683 at commit ba88576.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19370/
Test PASSed.

Test build #114541 has finished for PR 26683 at commit ba88576.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114541/
Test FAILed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19373/
Test PASSed.

Test build #114545 has started for PR 26683 at commit 1a2d089.

Test build #114545 has finished for PR 26683 at commit 1a2d089.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114545/
Test FAILed.

Test build #114553 has started for PR 26683 at commit 38c0914.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19382/
Test PASSed.

Test build #114553 has finished for PR 26683 at commit 38c0914.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114553/
Test FAILed.


mise exec --cd option doesn't activate tools or env

*Description
The -C/--cd option doesn't appear to resolve tools or env directives.
To Reproduce
Create a directory with a .mise.toml with the following contents:
$ cat /tmp/foo/.mise.toml
[env]
FOO=123

When inside the target directory, the environment variable activates as expected (I'm using the shell hooks and shims):
$ cd /tmp/foo
$ echo $FOO
123
$ /opt/homebrew/bin/mise -C /tmp/foo exec -- printenv FOO
123

However, when using the option to change directory, the environment variable isn't resolved, even though it definitely appears that the directory is being changed when testing with pwd:
$ pwd
/tmp

$ mise -C /tmp/foo exec -- printenv FOO  # as top-level argument
$ echo $?
1

$ mise exec -C /tmp/foo -- printenv FOO  # as argument of exec
$ echo $?
1

$ mise -C /tmp/foo exec -- pwd
/tmp/foo

Expected behavior
I expect that tools and env are resolved when using the -C/--cd option.
mise doctor output
$ mise doctor
version: 2024.3.9 macos-arm64 (2024-03-24)
activated: yes
shims_on_path: yes

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Sun, 24 Mar 2024 17:00:58 +0000
  Rust Version: rustc 1.76.0 (07dca489a 2024-02-04) (Homebrew)
  Profile: release

shell:
  /bin/zsh
  zsh 5.9 (x86_64-apple-darwin23.0)

dirs:
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/.cache/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files:
  ~/.config/mise/config.toml

plugins:
  bun     (core)
  deno    (core)
  erlang  (core)
  go      (core)
  java    (core)
  node    (core)
  poetry  https://github.com/mise-plugins/mise-poetry.git#37df872
  python  (core)
  ruby    (core)
  sops    git@github.com:joshbode/mise-sops.git#7558341

toolset:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
env_vars:
  MISE_SHELL=zsh

settings:
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_compile = true
  python_default_packages_file = "/Users/josh/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No problems found

Additional context
Add any other context about the problem here.

My current work-around is to use the GNU env command:
$ env -C /tmp/foo/bar mise exec -- printenv FOO
123

note: the built-in macOS /usr/bin/env doesn't support the -C/--chdir option, so you could use a wrapper like this to make it work:
$ cat ~/.local/bin/mise_

#! /bin/sh

# work around broken cd functionality in mise

set -eu

MISE_BIN="${HOME}/.local/state/nix/profile/bin/mise"

N=$#
I=0

DONE=0
NAME=""

while [ ${I} -lt ${N} ]; do
  I=$((I + 1))

  ARG=$1
  shift

  if [ ${DONE} = 0 ]; then
    if [ "${ARG}" = "--" ]; then
      DONE=1
    elif [ "${NAME}" = "cd" ]; then
      NAME=""
      cd -- "${ARG}" || exit 1
      continue
    elif [ "${ARG}" = "--cd" ] || [ "${ARG}" = "-C" ]; then
      NAME="cd"
      continue
    fi
  fi

  set -- "$@" "${ARG}"
done

exec "${MISE_BIN}" "$@"

Additionally, if I create a virtual-environment, it will activate as expected when I'm in the target directory, but it will not be picked up from outside the directory with the cd option:
$ cat /tmp/foo/.mise.toml

[tools]
python = "3.12"

[env]
_.python.venv = ".venv"

$ cd /tmp/foo
$ mise trust
$ python -m venv .venv
$ cd /tmp

$ cd /tmp/foo
$ echo $VIRTUAL_ENV
/tmp/foo/.venv
$ mise exec -- printenv VIRTUAL_ENV
/tmp/foo/.venv
$ mise exec -C /tmp/foo -- printenv VIRTUAL_ENV
/tmp/foo/.venv
$ which python
/tmp/foo/.venv/bin/python

$ cd /tmp
$ mise exec -C /tmp/foo -- printenv VIRTUAL_ENV
$ echo $?
1
$ mise -C /tmp/foo exec -- which python
/Users/josh/.local/share/mise/installs/python/3.12/bin/python

note: the env workaround works as I'd expect:
$ env -C /tmp/foo/bar mise exec -- printenv VIRTUAL_ENV
/tmp/foo/.venv
$ env -C /tmp/foo mise exec -- which python
/tmp/foo/.venv/bin/python

A similar result is obtained from the mise env command, so I don't think this is exclusively related to mise exec:
$ mise env -C /tmp/foo -J
{
  "PATH": "/Users/josh/.local/share/mise/installs/python/3.12/bin:..."
}

$ env -C /tmp/foo mise env -J
{
  "PATH": "/tmp/foo/.venv/bin:/Users/josh/.local/share/mise/installs/python/3.12/bin:...",
  "VIRTUAL_ENV": "/tmp/foo/.venv"
}

I'm still learning Rust, but this seems to address the problem by having env::set_current_dir(cd) called before other files are loaded in the all_settings_files loop.
diff --git a/src/config/settings.rs b/src/config/settings.rs
index e5cd4630..ef8b2903 100644
--- a/src/config/settings.rs
+++ b/src/config/settings.rs
@@ -197,13 +197,11 @@ impl Settings {
         if let Some(settings) = SETTINGS.read().unwrap().as_ref() {
             return Ok(settings.clone());
         }
+
         let mut sb = Self::builder()
             .preloaded(CLI_SETTINGS.lock().unwrap().clone().unwrap_or_default())
             .env();
-        for file in Self::all_settings_files() {
-            sb = sb.preloaded(file);
-        }
-        let mut settings = sb.preloaded(DEFAULT_SETTINGS.clone()).load()?;
+        let mut settings = sb.load()?;
         if let Some(cd) = &settings.cd {
             static ORIG_PATH: Lazy<std::io::Result<PathBuf>> = Lazy::new(env::current_dir);
             let mut cd = PathBuf::from(cd);
@@ -212,6 +210,14 @@ impl Settings {
             }
             env::set_current_dir(cd)?;
         }
+
+        sb = Self::builder()
+            .preloaded(CLI_SETTINGS.lock().unwrap().clone().unwrap_or_default())
+            .env();
+        for file in Self::all_settings_files() {
+            sb = sb.preloaded(file);
+        }
+        settings = sb.preloaded(DEFAULT_SETTINGS.clone()).load()?;
         if settings.raw {
             settings.jobs = 1;
         }


Data not loading after adding ticker and refreshing

Data is also generally not loading. When i try the buy button i gert the following error:
INFO:ibapi.client:REQUEST placeOrder {'orderId': 380, 'contract':<PHONE_NUMBER>552: 0,AMZN,STK,,0.0,,,SMART,,USD,,,False,,combo:, 'order':<PHONE_NUMBER>248: 380,0,0: STP SELL<EMAIL_ADDRESS>} INFO:ibapi.wrapper:ANSWER error {'reqId': 380, 'errorCode': 504, 'errorString': 'Not connected'} ERROR:ibapi.wrapper:ERROR 380 504 Not connected

After restarting the app, the data comes back and I'm able to place one trade. Then everything freezes again

Refresh for new data for newly added ticker also works after I restart the app, but only before i place a buy order

Looks like something is disconnecting it from TWS and the app makes no attempt to reconnect. I think there's basically no error handling at the moment, so if it errors the background thread just dies and that's it. Will add more handling

Same issue for Trades page after submitting Sell orders

after adding the ticker to watchlist today, refresh didnt bring data up. Had to restart flask and yarn

I have the same issue. @Dolivent were you able to fix?

@Arash6771 have you got any logs that might help isolate the issue?


Added benchmarks for Zarr compared to Hub

Added benchmarking files similar to that with TileDB, except this is for  Zarr.
For reproducibility, this also has been tested on a Google Colab Notebook environment.
The benchmarks are as follows:
Dataset:  activeloop/mnist with Batch Size:  70000
Performance of Zarr
Batch 1 dt: 0.3488335609436035
Time: 0.3494699001312256s
Performance of Hub (Stored on the Cloud):
Batch 1 dt: 1.3345892429351807
Time: 1.3362071514129639s
Performance of Hub (Stored Locally):
Batch 1 dt: 0.06419062614440918
Time: 0.06442713737487793s
Dataset:  activeloop/mnist with Batch Size:  7000
Performance of Zarr
Batch 1 dt: 0.2592613697052002
Batch 2 dt: 0.25765037536621094
Batch 3 dt: 0.2523312568664551
Batch 4 dt: 0.26584601402282715
Batch 5 dt: 0.26589441299438477
Batch 6 dt: 0.2726469039916992
Batch 7 dt: 0.2609729766845703
Batch 8 dt: 0.27009081840515137
Batch 9 dt: 0.26024317741394043
Batch 10 dt: 0.26842737197875977
Time: 2.633971691131592s
Performance of Hub (Stored on the Cloud):
Batch 1 dt: 0.8596398830413818
Batch 2 dt: 0.024734973907470703
Batch 3 dt: 0.023304224014282227
Batch 4 dt: 0.2799103260040283
Batch 5 dt: 0.020690202713012695
Batch 6 dt: 0.020921945571899414
Batch 7 dt: 0.2269284725189209
Batch 8 dt: 0.021099328994750977
Batch 9 dt: 0.022265911102294922
Batch 10 dt: 0.10095000267028809
Time: 1.6010329723358154s
Performance of Hub (Stored Locally):
Batch 1 dt: 0.02331089973449707
Batch 2 dt: 0.02063584327697754
Batch 3 dt: 0.026700973510742188
Batch 4 dt: 0.03954935073852539
Batch 5 dt: 0.022269725799560547
Batch 6 dt: 0.0210113525390625
Batch 7 dt: 0.035251617431640625
Batch 8 dt: 0.02073359489440918
Batch 9 dt: 0.021008968353271484
Batch 10 dt: 0.02947402000427246
Time: 0.2601170539855957s

Awesome, thanks again for your sustained support. Would it be possible for you to include places365_small dataset in your code? We want to see how hub performs on the. You don't need to run these benchmarks again but it would be useful to have it in the code. The Hub's signature for it is hydp/places365_small_train.

Awesome, thanks again for your sustained support. Would it be possible for you to include places365_small dataset in your code? We want to see how hub performs on the. You don't need to run these benchmarks again but it would be useful to have it in the code. The Hub's signature for it is hydp/places365_small_train.

I have added the dataset and modified the existing functions to support it. However, the process is really memory inefficient. The Dataset is stored thrice, once as .tfrecord, once in the zarr format, and once in the hub format.

I have added the dataset and modified the existing functions to support it. However, the process is really memory inefficient. The Dataset is stored thrice, once as .tfrecord, once in the zarr format, and once in the hub format.

@DebadityaPal Where is places365 saved as a tfrecord? My understanding (and I might be wrong) is that from_tdfs returns a hub.Dataset, not the underlying tfrecord.

@DebadityaPal Where is places365 saved as a tfrecord? My understanding (and I might be wrong) is that from_tdfs returns a hub.Dataset, not the underlying tfrecord.

What is happening is that from_tfds is returning a simple transform on the tfds dataset which is first getting downloaded at root/tensorflow-datasets/places365_small as a .tfrecord file. From there when we use dataset.store(), the transform is computed and the hub dataset is stored. But it is first stored as a .tfrecord file.

What is happening is that from_tfds is returning a simple transform on the tfds dataset which is first getting downloaded at root/tensorflow-datasets/places365_small as a .tfrecord file. From there when we use dataset.store(), the transform is computed and the hub dataset is stored. But it is first stored as a .tfrecord file.

@DebadityaPal Gotcha, thanks.
Can you show me where tfrecord is transformed? I've been staring at store and don't see it.

@DebadityaPal Gotcha, thanks.
Can you show me where tfrecord is transformed? I've been staring at store and don't see it.

In Line 939 of dataset.py we have
ds = tfds.load(dataset, split=split)

I think the way tfds.load() is programmed is that it looks for the data in the tensorflow_dataset root directory, if the dataset doesn't exist, it downloads and prepares it. It has an argument download which is a boolean value set to True by default. If it is set  to False then the execution throws an error if the dataset is not present in the root directory. So either way, the dataset needs to be  downloaded by tfds before we use it further.

In Line 939 of dataset.py we have
ds = tfds.load(dataset, split=split)

I think the way tfds.load() is programmed is that it looks for the data in the tensorflow_dataset root directory, if the dataset doesn't exist, it downloads and prepares it. It has an argument download which is a boolean value set to True by default. If it is set  to False then the execution throws an error if the dataset is not present in the root directory. So either way, the dataset needs to be  downloaded by tfds before we use it further.

Is it necessary that we use from_tfds in the process?

Is it necessary that we use from_tfds in the process?

It's not necessary, however, it is faster.
Another option would be to use an identity transform and use that to store the cloud fetched hub dataset locally. That usually takes a much longer time.

We've been discussing this issue. I'll try to run these benchmarks on our set-up. Afterwards, we'll investigate the problem. I think @AbhinavTuli wanted to explore the issue with the transforms.


[BUG] [WARNING] Running from source on Linux Mint will break Mintinstall

Affects linux Mint KDE 18.1 x64
There is a bug in Pillow that if you follow the steps on the opening page you will corrupt the python libraries required by Mintinstall and Software Manager will no longer work . Good luck trying to find what files get replaced and the changed cfg files .
https://bugs.launchpad.net/linuxmint/+bug/808907
`Result from running gksu mintinstall
add_categories took 1.234 ms
build_matched_packages took 0.218 ms
add_packages took 6111.321 ms
add_reviews took 1402.498 ms
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu<IP_ADDRESS>-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
Traceback (most recent call last):
File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 1930, in
Application()
File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 59, in wrapper
res = func(*arg)
File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 617, in init
sans26 = ImageFont.truetype(self.FONT, 26)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 239, in truetype
return FreeTypeFont(font, size, index, encoding)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 128, in init
self.font = core.getfont(font, size, index, encoding)
IOError: cannot open resource`

Sorry for the late answer.
You can try to install the Python dependencies for the user only using pip or easy_install (provided in the 'setuptools' package).
This will not corrupt you system libraries. This is the way the installer try to install the dependencies.


No Datasets for checkpoints

My log file has checkpoint start and complete info, but on the html page for checkpoints, there is nothing (NO DATASET).  Here is the log_line_prefix for PG 11 beta3 on CentOS 7 using latest PGBadger version, 10.1:
'%t [%p]: [%l-1] db=%d,user=%u,app=%a,client=%h '
Here is a grep on the PG log for checkpoint:
2018-09-19 14:05:11 UTC [2290]: [32-1] db=,user=,app=,client= LOG:  checkpoint starting: shutdown immediate
2018-09-19 14:05:11 UTC [2290]: [33-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 1 removed, 0 recycled; write=0.048 s, sync=0.000 s, total=0.063 s; sync files=0, longest=0.000 s, average=0.000 s; distance=15100 kB, estimate=4778422 kB
2018-09-19 14:10:11 UTC [8919]: [1-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 14:10:12 UTC [8919]: [2-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.106 s, sync=0.000 s, total=0.119 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=0 kB
2018-09-19 15:48:10 UTC [8919]: [4-1] db=,user=,app=,client= LOG:  checkpoint starting: shutdown immediate
2018-09-19 15:48:10 UTC [8919]: [5-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 1 removed, 0 recycled; write=0.048 s, sync=0.000 s, total=0.062 s; sync files=0, longest=0.000 s, average=0.000 s; distance=16383 kB, estimate=16383 kB
2018-09-19 15:53:15 UTC [15766]: [1-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 15:53:15 UTC [15766]: [2-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.108 s, sync=0.000 s, total=0.186 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=0 kB
2018-09-19 16:30:39 UTC [15766]: [4-1] db=,user=,app=,client= LOG:  checkpoint starting: shutdown immediate
2018-09-19 16:30:39 UTC [15766]: [5-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 1 removed, 0 recycled; write=0.048 s, sync=0.000 s, total=0.063 s; sync files=0, longest=0.000 s, average=0.000 s; distance=16383 kB, estimate=16383 kB
2018-09-19 16:35:47 UTC [18096]: [1-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 16:35:47 UTC [18096]: [2-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.100 s, sync=0.000 s, total=0.114 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=0 kB
2018-09-19 17:20:48 UTC [18096]: [3-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 17:20:49 UTC [18096]: [4-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 6 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.649 s, sync=0.003 s, total=0.662 s; sync files=6, longest=0.002 s, average=0.000 s; distance=6 kB, estimate=6 kB
2018-09-19 17:25:48 UTC [18096]: [5-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 17:25:48 UTC [18096]: [6-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 5 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.549 s, sync=0.002 s, total=0.562 s; sync files=5, longest=0.002 s, average=0.000 s; distance=6 kB, estimate=6 kB
2018-09-19 17:50:48 UTC [18096]: [7-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 17:54:48 UTC [18096]: [8-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 25424 buffers (0.8%); 0 WAL file(s) added, 65 removed, 0 recycled; write=239.014 s, sync=0.005 s, total=239.324 s; sync files=96, longest=0.001 s, average=0.000 s; distance=374144 kB, estimate=374144 kB
2018-09-19 17:55:48 UTC [18096]: [9-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 17:59:48 UTC [18096]: [10-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 45406 buffers (1.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=239.657 s, sync=0.005 s, total=239.671 s; sync files=88, longest=0.001 s, average=0.000 s; distance=697975 kB, estimate=697975 kB
2018-09-19 18:00:48 UTC [18096]: [11-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 18:00:48 UTC [18096]: [12-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 1 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.148 s, sync=0.002 s, total=0.158 s; sync files=1, longest=0.002 s, average=0.002 s; distance=8 kB, estimate=628179 kB
2018-09-19 18:05:48 UTC [18096]: [13-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 18:05:48 UTC [18096]: [14-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 1 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.148 s, sync=0.002 s, total=0.158 s; sync files=1, longest=0.002 s, average=0.002 s; distance=8 kB, estimate=565362 kB
2018-09-19 18:10:48 UTC [18096]: [15-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 18:14:48 UTC [18096]: [16-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 50439 buffers (1.6%); 0 WAL file(s) added, 38 removed, 0 recycled; write=239.414 s, sync=0.005 s, total=239.599 s; sync files=90, longest=0.001 s, average=0.000 s; distance=627027 kB, estimate=627027 kB
2018-09-19 18:30:48 UTC [18096]: [17-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 18:30:48 UTC [18096]: [18-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.248 s, sync=0.002 s, total=0.258 s; sync files=2, longest=0.002 s, average=0.001 s; distance=14 kB, estimate=564326 kB
2018-09-19 18:35:48 UTC [18096]: [19-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 18:35:49 UTC [18096]: [20-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.348 s, sync=0.002 s, total=0.358 s; sync files=2, longest=0.002 s, average=0.001 s; distance=9 kB, estimate=507894 kB
2018-09-19 18:55:48 UTC [18096]: [21-1] db=,user=,app=,client= LOG:  checkpoint starting: time
2018-09-19 18:55:48 UTC [18096]: [22-1] db=,user=,app=,client= LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.248 s, sync=0.002 s, total=0.260 s; sync files=2, longest=0.002 s, average=0.001 s; distance=14 kB, estimate=457106 kB

If I copy/paste your log sample and give it to the badger to eat everything is fine.

Interesting I did the same thing and NO DATASET!
just pasted those lines in a log file and ran:
pgbadger ./checktest.log -d zeus_app_db  -o ./checktest.html

Ok, this is because of the -d zeus_app_db parameter. If you look at the log line there is no database set (app=,) for this kind of log entry, checkpoint are not database dependent and here you are filtering log entries following the zeus_app_db db.

When I reran it not specifying a database, it did generate HTML info for the checkpoints.  So how do we proceed from here?  When using a real PG log file that generates data for the zeus_app_db, except for checkpoints?

Yes, when you are filtering on a single database you will only obtain a report  n all messages related to this database. If I understand well what you want to do you can try this command to see if this match your needs.
pgbadger --include-query='db=,|db=zeus_app_db' postgresql.log

Let me know.

That won't work since db is not in the query itself.  It would have to be a regex that included finding that substring anywhere on a given log line.

I found a workaround in my case by not specifying the database and excluding a particular user, "postgres".
pgbadger ./t.log -U postgres  -j 8 -o ./t.html
This issue can be closed, but it would be nice to say something like capture everything dealing with my specific database or user, and also include checkpoints since checkpoints are the only one I can think of that do not have a db or user in the log file.

Commit f0e2f01 adds a --exclude-db option to compute report about everything except the specified database. The option can be used multiple time. This will be helpful in your case if you don't have too much database to exclude of course.


Should not allow Window expressions in Filter or Having clause

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.

Will add this check to Analyer


Smart Completion COPY support issue

see http://www.postgresql.org/docs/9.3/static/sql-copy.html

Can you explain a little bit more?
Would you like to see auto-completion support for the COPY command or is COPY command failing to run?

auto-completion support COPY command

I've added preliminary support for the COPY command in master. I say preliminary because when you type COPY <tab> it'll list all the schemas and tables, which is expected. But when you type COPY table_name FROM <tab>, it still displays the tables, which is not the expected behavior since it should be completing filenames. But that'll take some more work so I'm going to punt on that for a bit. :)
Would you mind trying it out? You can install directly from the git repo using the following command:
pip install -U -e git+https://github.com/amjith/pgcli.git#egg=pgcli

thanks.


release v2.13.0

@alfredh merging rem into re is a big change, should we bump version to v3.0.0?

yeah, sounds good


Add api_key parameter in all requests

closes #92

@AshuKr22 : Please add labels in this one.

@AshuKr22  you can give level2 for this not level 3 @MastanSayyad

@Hemu21 while the changes seem small, it was a major bug in our application and no contributor was able to locally run the app. so finding this issue itself was a big task. So I will suggest it remains level 3. the lines of code do not justify the scale problem this pr solved.

@AshuKr22  yes, but we are mentioning on few prs only as we are considering all the prs of the contributor. and if some where we left few level3 and for some where we mentioning. to make it fair and balance. As we don't want to discourage contributors. I hope you understand. It is based on the all the prs. I hope you understand.


Exceptions wreak havoc on the UI

I created a simple demo app (code below), and when I run it, i get an exception, but it's basically unreadable:

repro code below (i've already solved the actual issue):
using System;
using Terminal.Gui;

namespace Meadow.Provisioning.Gui
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            Application.Init();
            var top = Application.Top;

            ConstructUI(top);

            Application.Run();
        }

        private static void ConstructUI(Toplevel top)
        {
            // Creates the top-level window to show
            var win = new Window("MyApp") {
                X = 0,
                Y = 1, // Leave one row for the toplevel menu

                // By using Dim.Fill(), it will automatically resize without manual intervention
                Width = Dim.Fill(),
                Height = Dim.Fill()
            };
            top.Add(win);

            // Creates a menubar, the item "New" has a help menu.
            var menu = new MenuBar(new MenuBarItem[] {
            new MenuBarItem ("_File", new MenuItem [] {
                new MenuItem ("_Quit", "", () => { if (Quit ()) top.Running = false; })
                }),
            });
            top.Add(menu);

            // Dynamically computed
            var label = new Label("Welcome to the Meadow Provisioning tool. Brought to you by the 90s.") {
                X = 1,
                //Y = Pos.Left(win),
                Y = Pos.Left(top),
                //Y = Pos.Left(),
                Width = Dim.Fill(),
                Height = 1
            };
            top.Add(label);
        }

        static bool Quit()
        {
            var n = MessageBox.Query(50, 7, "Quit", "Are you sure you want to quit?", "Yes", "No");
            return n == 0;
        }

    }
}

Try on mac?

Another example:

I am having a play with https://github.com/DieselMeister/Terminal.Gui.Elmish
I believe the issue I'm experiencing is with the wrapper itself, rather than gui.cs - but the effect when it goes wrong is rather interesting!
This is using iterm2 and zsh on mac, with the examples/Elmish.Console.Elements project within that github repo.
Please note I may not be understanding what's going on correctly here and it may be an unrelated issue. One thing I noticed is that when I close the app after experiencing this issue, output continues to be written to the console - so I think the wrapper I'm using is hammering some input buffer and the update loop can't keep up.

If you can provide a repro without the emish wrapper please do, and re-open this issue. Thanks.


Wiki links to repository, not blog

on the class wiki page, the link you provided links to this repository, not the GitHub site

Fixed #1 now links to https://nyu-ossd-s19.github.io/tojimjiang-weekly/

Fixed.


[All] update node-role.kubernetes.io/master=>node-role.kubernetes.io/control-plane

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:
/kind bug
/kind feature

What happened:
https://github.com/kubernetes/kubeadm/issues/2200
https://github.com/kubernetes-sigs/cluster-api/pull/5919
has further info
we have following occurrance need to be updated
# grep node-role.kubernetes.io * -r
charts/openstack-cloud-controller-manager/values.yaml:#   node-role.kubernetes.io/controlplane: "true"
charts/openstack-cloud-controller-manager/values.yaml:#   - key: node-role.kubernetes.io/controlplane
charts/openstack-cloud-controller-manager/values.yaml:#   - key: node-role.kubernetes.io/etcd
docs/magnum-auto-healer/using-magnum-auto-healer.md:        node-role.kubernetes.io/master: ""
manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml:        node-role.kubernetes.io/master: ""
manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml:      - key: node-role.kubernetes.io/master
manifests/magnum-auto-healer/magnum-auto-healer.yaml:        node-role.kubernetes.io/master: ""
pkg/ingress/controller/controller.go:   DeprecatedLabelNodeRoleMaster = "node-role.kubernetes.io/master"
pkg/autohealing/controller/controller.go:       LabelNodeRoleMaster = "node-role.kubernetes.io/master"
tests/playbooks/roles/install-cpo-occm/tasks/main.yaml:            - key: node-role.kubernetes.io/master

What you expected to happen:
How to reproduce it:
Anything else we need to know?:
Environment:

openstack-cloud-controller-manager(or other related binary) version:
OpenStack version:
Others:

#1840 is for OCCM only, there are more need to be updated

/close
fixed by #1875


Neither ballerina/jms nor ballerina/mb seem able to connect to RabbitMQ

Description:
RabbitMQ supports AMQP 0.9.1 and the Ballerina documentation claims that the Ballerina message broker is also AMQP, therefore one would assume that either the mb or the jms package should be able to talk to rabbit.
Steps to reproduce:
Use the following code:
import ballerina/mb;
import ballerina/log;

documentation { Queue receiver endpoint for drone location updates }
endpoint mb:SimpleQueueReceiver queueReceiverDroneLocations {
    host: "localhost",
    port: 5672,
    username: "guest",
    password: "guest",
    queueName: "DroneLocations"
};

service<mb:Consumer> locationListener bind queueReceiverDroneLocations {
    onMessage(endpoint consumer, mb:Message message) {
        string messageText = check message.getTextMessageContent();
        log:printInfo("[DONE LOCATION] " + messageText);
    }
}

Run a local RabbitMQ instance with all default settings and enable the JMS topic plugin.
Error message is as follows:
ballerina: initiating service(s) in 'drone_loc_monitor.bal'
error: ballerina/runtime:CallFailedException, message: call failed
	at ..<init>(drone_loc_monitor.bal:5)
caused by ballerina/runtime:CallFailedException, message: call failed
	at ballerina/mb:init(simple_queue_receiver.bal:38)
caused by ballerina/runtime:CallFailedException, message: call failed
	at ballerina/jms:init(simple_queue_receiver.bal:39)
caused by error, message: error while connecting to broker. Error creating connection: Unable to Connect
	at ballerina/jms:new(connection.bal:27)

I have tried to connect to RabbitMQ with both the simple jms receiver and the simple mb receiver, neither work properly and both result in various error messages indicating failure. If there is a specific set of properties required to speak "pure" AMQP, then it's not discernible from the documentation.
Affected Versions:
Ballerina 0.980.1
OS, DB, other environment details and versions:
Ubuntu 18.04, MacOS High Sierra, RabbitMQ 3.6.10 (Erlang 20.2.2)
Suggested Labels (optional):
documentation, tutorial, bug
I understand you're working on an AMQP connector. In the meantime, it would help if what you can and cannot do with the existing connectors was made more clear and, if RabbitMQ is possible, then instructions on how to configure it should be made available.

I said in the issue that it doesn't with with jms either. I have not been
able to find a configuration that works. Can you please show an example of
this working with rabbit before closing the issue?
On Thu, Aug 2, 2018, 8:23 AM Gihan Anuruddha<EMAIL_ADDRESS>wrote:

Hi @autodidaddict https://github.com/autodidaddict, Unfortunately you
won't able to connect to RabbitMQ using the ballerina/mb connector. But you
might able to connect to RabbitMQ over JMS using the ballerina/jms
connector.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ballerina-platform/ballerina-lang/issues/9746#issuecomment-409907815,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANHJoQy9MoWklcBqvcoaPaCRI-Hmu5nVks5uMu9bgaJpZM4Vf68T
.

Created a blog to help you with: https://riyafa.wordpress.com/2018/08/08/how-to-configure-ballerina-jms-to-work-with-rabbitmq/
You hadn't mentioned how you tried with JMS. It is all about configuring a JMS application to work with RabbitMQ.

@autodidaddict mb endpoint is designed as an specific connector which can be used to connect with BMB. Please note that it is not meant to be used as an generic AMQP connector. Both the RabbitMQ and BMB is not 100% AMQP spec complient. Therefore the mb connector might not work with RabbitMQ OOB. I also think that we should not make the mb  endpoint work with every AMQP broker because in the future we might use a different protocol to talk to BMB. Alternatively as you have mentioned what we should do is implementing a generic AMQP connector which you can use to connect to a broker using AMQP. WDYT?

Absolutely. Sorry I wasn't clear. I think the mb endpoint should stay focused on the Ballerina-proprietary broker (but perhaps the documentation could be more clear that it only works with that broker), and then having a separate amqp broker that works with Rabbit and Rabbit-likes would be fantastic. Ideally I think we'd all love to see an mqtt endpoint in the future, too, but hopefully things like that will be picked up once the community grows.

Thanks, @autodidaddict for the feedback. We will work on improving the documentation.

I have created separate issues to track the AMQP client implementation and documentation improvement.
Hence closing this issue.

@autodidaddict Just want to let you know that, we have implemented a RabbitMQ consumer, producer for Ballerina and that is package with default distribution. This is now available with ballerina-1.0.0-alpha pack.


Change var to let, and use object destructuring, in a couple of previously class converted web/*.js files

Note that these files were among the first to be converted to ES6 classes, so it probably makes sense to do another pass to bring them inline with the most recent ES6 conversions.
Edit: If there would have been any scoping errors from the var -> let conversion, the no-undef ESLint rule would have caught that, which should provide some assurance when reviewing.

/botio-linux preview

Thank you for landing this! I agree with the comments you added above.


[CP]

Issue Link
https://github.com/flutter/flutter/issues/130874
Commit Hash
f4c25bb
Target
beta
PR Link
https://github.com/flutter/flutter/pull/132315
Changelog Description
Updates translation list for all supported languages.
Impacted Users
Flutter devs
Impact Description
Users will not have updated translation files, impacting customers who rely on these translations.
Workaround
N/A
Risk
medium
Test Coverage
yes
Validation Steps
N/A

@HansMuller @justinmc could you take a look at this cherry-pick and request?

:+1:


IconButton with tooltip is incompatible with ButtonGroup

When IconButton renders tooltips, it inserts an additional element after the button. This in turn breaks ButtonGroup's use of the :last-child selector to set border-radii, causing an IconButton at the end of a ButtonGroup to have square corners:

Thanks! I think this is a duplicate and we have an open PR addressing this so going to close.
PR: https://github.com/primer/react/pull/5123
Duplicate issue: https://github.com/primer/react/issues/4129

Awesome, thanks!


Eliminate usage of removed OTLP LogRecord.Name field

LogRecord.Name is no longer part of the OTLP data model and was deprecated
https://github.com/open-telemetry/opentelemetry-proto/pull/357 and
deleted https://github.com/open-telemetry/opentelemetry-proto/pull/373 from OTLP.
It is now deprecated in the Collector codebase too:
https://github.com/open-telemetry/opentelemetry-collector/blob/d2e5601b7045a3021009729ce539cb88373f3216/model/internal/pdata/generated_log.go#L644
We are planning to delete it from the Collector codebase, but first we need
to remove the references from this codebase since it is a Collector dependency.
Testing done: cd otel2influx && go test ./...

@jacobmarble can you please take a look. I think I cleaned it from the right places. Thank you.

I'll take a look at the falling CI tests later, unless you beat me to it. ooo today.

Thanks for merging @jacobmarble
Please ping me when you make a new release here. I will update Otel Collector to use the new version.

Hey @tigrannajaryan,
Just so you know, @jacobmarble is on holiday so might take a little longer to respond :)
Dom

Thanks @domodwyer

Hey @tigrannajaryan , I'm back from ooo, working on this now.

@tigrannajaryan: v0.2.17 is tagged, with dependency updates to otel 0.48.0 and all deprecation warnings (per staticcheck v2021.1.2) resolved.

Thanks. Collector updated to use v0.2.17: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9226


Merkle tree optimizations

Getting around the overhead of Rayon's parallel iterators when building Merkle Trees. These changes speed up Merkle Tree benchmarks by 5% for width 2 ** 15 and 8% for width 2 ** 13 (both on Poseidon) on my machine. Speeds up proofs by 2%. (In general, there's more benefit for smaller trees and for machines with more cores.)

Hm I think this is probably worthwhile if we're pretty sure it's the fastest approach, I just want to try a few other things first, since once we merge this more complex version it will become a bit harder to experiment with other methods. I made #438 with a couple trivial optimizations. After that I'll rebase your branch if you don't mind, and try a couple other things.
I suspect this might be a really significant improvement if we had large trees with small leaves, just in practice we have a large leaf layer (135 elements per leaf in the largest) while the rest of the tree is pretty compact (2^15 * 64 bits for recursion).


Light turns off when screensaver turns on

Is this expected behavior? Is there a way to always have it on, even when screen is locked / on saver mode?

Yep, that's intended behaviour. It's assuming that when your screensaver is on, you're not at your computer and therefore neither 'available' nor 'busy'.
There is currently no way to change that behaviour, but feel free to submit a PR to make it configurable - it shouldn't be difficult to do.


Fix Schedule Expression

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks


Golang tour code editor doesn't work properly in Android Firefox browser

Happening for me too.
Context: https://tour.golang.org/basics/16
Try adding a fmt.Println to the code sample. On Firefox, for example, when you type the left paren, the "Println" disappears and the cursor jumps backwards.


Problems and suggestions on dependency management

I have been using LiteCommands in my project and noticed a few areas where the dependency management could potentially be optimized. I hope you don't mind me bringing this up, as I believe these optimizations could benefit both LiteCommands and projects that depend on it.
org.jetbrains:annotations
I observed that LiteCommands uses api("org.jetbrains:annotations:24.0.1") in its Gradle build file. This maybe causes org.jetbrains:annotations to be included in the final JAR (I'm not sure), which in turn means that projects depending on LiteCommands also include this dependency. In my case, since my project is built with Maven, I had to manually add org.jetbrains:annotations as a dependency with the compile scope to  prevent it from being packaged into a jar.
org.panda-lang:expressible
Additionally, I noticed that LiteCommands only uses a few classes from org.panda-lang:expressible, specifically Lazy, Result, and Option. Since Option can be replaced by java.util.Optional, and the other two classes seem to have straightforward implementations, I wonder if there is a specific reason why the entire org.panda-lang:expressible library is included. Evaluate whether the entire org.panda-lang:expressible library is necessary or if the specific classes (Lazy, Result, Option) can be extracted or reimplemented within LiteCommands. This would reduce the dependency footprint and make LiteCommands more lightweight.
Does this mean that, when I use LiteCommands, need to be repeated to add org. Jetbrains: annotations and set to compile to avoid packaging. Also, I need to relocate LiteCommands, panda.std, and net.joda.expiringmap, right? There seems to be no explanation on this in the document. If so, this seems to be something that can be optimized. Will the author consider this?
Thank you!

Hi @Shinnvy, thanks for your issue.

I observed that LiteCommands uses api("org.jetbrains:annotations:24.0.1") in its Gradle build file. This maybe causes org.jetbrains:annotations to be included in the final JAR (I'm not sure),

Currently litecommands doesn't include any files from own dependencies. You can checkout it by downloading jar from maven repository: https://repo.panda-lang.org/#/releases/dev/rollczi/litecommands-core/3.4.2
But LiteCommands mark required dependencies as compile in related pom file: https://repo.panda-lang.org/releases/dev/rollczi/litecommands-core/3.4.2/litecommands-core-3.4.2.pom
You can exclude jetbrains annotations because it isn't required to runtime.

Since Option can be replaced by java.util.Optional

Option is actually used as an additional feature. In LiteCommands base code I use only java Optional

Evaluate whether the entire org.panda-lang:expressible library is necessary or if the specific classes (Lazy, Result, Option) can be extracted or reimplemented within LiteCommands. This would reduce the dependency footprint and make LiteCommands more lightweight.

You're right, I can remove Result Lazy from code base. I will probably have to create new module with implementation of Option wrapper or remove it.

I need to relocate LiteCommands, panda.std, and net.joda.expiringmap, right?

This depend on your platform e.g. for JDA or plugin paper (with isolated classloader) you don't need relocation, but in other cases you need.

There seems to be no explanation on this in the document.

Unfortunately, LiteCommands doesn't have good docs :/

Hi @Rollczi !
Thank you for your detailed and thorough responses! I now have a clear understanding of the dependency management in LiteCommands. Your explanations have addressed all my questions, and I no longer have any doubts.


chore(ci): use correct github-action[bot] email address

If the commiter should be github-actions the email address should be as follows:
<EMAIL_ADDRESS>see community.
Currently it will be displayed as invalid-email-address.

PR was created into main branch not upstream


Validate ManningResistance

the current LinearLevelConnector may be hard to configure/calibrate
a Manning or Chezy based connector using a wetted area (of the upstream storage) and a roughness factor may be easier given available data sources

rectangular profile + roughness
~3-4d

@Huite please rename to ManningResistance (to have naming consistency with the LinearResistance node)

Investigate oscillations (flow) as part of testing this nodetype. @SouthEndMusic

It seems that the oscillatory behavior of the flow around the manning resistance disappears if the profiles of the connected basins are physical (which they are not in the example and test models), in the way discussed in #255. This makes intuitive sense from the fact that the ManningResistance behaviour is rooted in physics.

Oh that is a nice and reassuring find!

It seems that the oscillatory behavior of the flow around the manning resistance disappears if the profiles of the connected basins are physical.

In #280 they are physical, but I still get oscillations, these are the flows over the basic-transient model edges:

Versus current main:

In #280 they are physical, but I still get oscillations

I see that you now get the storages by integrating over the areas which is nice, but if I am not mistaken the interpolation you use between those storage values is still linear which is unphysical. In the example I made I kept the area constant over the level which makes linear interpolation correct.

Agreed


added test coverage with isparta-loader

Added test coverage with isparta-loader
Needed to remove "loose": "all" config from .babelrc or isparta blew up.  If that is needed, will need to reconcile.

@billneff79 Definitely still need loose in there, but it seems like isparta is using Babel 6, whereas Preact is transpiled via Babel 5 (for performance and filesize reasons).
It might be time to reinvestigate moving to Babel 6.
I'll merge and move the loose option into the rollup config for now, that way isparta will happily ignore it.


opacity does not work

opacity does not work on demo!

thanks for reporting this @alireza23 - this option was removed in v1.0.0 of the library, because it doesn't really make much sense. See the v1.2.0 release for a fix and explanation.


Fixed render overflow error and implemented native solution of text s…

Description
Implemented the native Android solution for text selection.
Related Issues
Fixes #35826
Tests
I added the following tests:

should return true if can copy contents

Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
[x] No, this is not a breaking change.

Thank you sir for replying. I will surely make these changes!

Thanks for following up @imlegend19!  Let me know if I can help clarify anything!

@justinmc can you help me in solving this merge conflict?

I tried to do this myself, but I think I can't commit to your PR.  So here's what you should do to fix the conflict.
It seems like there are two conflicts, both in material/text_selection.dart.
For the first conflict, items was changed to use Dart's new UI as code feature where if statements can go in the middle of Lists.  So you should keep that format, but include your change of accessing the callbacks on widget:
    final List<Widget> items = <Widget>[
      if (widget.handleCut != null) FlatButton(child: Text(localizations.cutButtonLabel), onPressed: widget.handleCut),
      if (widget.handleCopy != null) FlatButton(child: Text(localizations.copyButtonLabel), onPressed: widget.handleCopy),
      if (widget.handlePaste != null) FlatButton(child: Text(localizations.pasteButtonLabel), onPressed: widget.handlePaste),
      if (widget.handleSelectAll != null) FlatButton(child: Text(localizations.selectAllButtonLabel), onPressed: widget.handleSelectAll),
    ];

For the second conflict you should just accept the changes.  It seems like your change was just formatting.
    return delegate.selectAllEnabled &&
           value.text.isNotEmpty &&
           !(value.selection.start == 0 && value.selection.end == value.text.length);

@justinmc I have made the changes what you requested, still the tests fail!

Here's what the failure is:
  Expected: exactly 4 matching nodes in the widget tree
  Actual: ?:<3 widgets with type "FlatButton" (ignoring offstage widgets): [FlatButton(dependencies:
[_LocalizationsScope-[GlobalKey#aaf34], _InheritedTheme]), FlatButton(dependencies:
[_LocalizationsScope-[GlobalKey#aaf34], _InheritedTheme]), FlatButton(dependencies:
[_LocalizationsScope-[GlobalKey#aaf34], _InheritedTheme])]>
   Which: is not enough
When the exception was thrown, this was the stack:
#4      main.<anonymous closure> (file:///tmp/flutter%20sdk/packages/flutter/test/material/text_field_test.dart:5387:7)

Looks like it is probably a legitimate failure.  You should be able to run material/text_field_test.dart and debug the failure locally.

Here's what the failure is:
  Expected: exactly 4 matching nodes in the widget tree
  Actual: ?:<3 widgets with type "FlatButton" (ignoring offstage widgets): [FlatButton(dependencies:
[_LocalizationsScope-[GlobalKey#aaf34], _InheritedTheme]), FlatButton(dependencies:
[_LocalizationsScope-[GlobalKey#aaf34], _InheritedTheme]), FlatButton(dependencies:
[_LocalizationsScope-[GlobalKey#aaf34], _InheritedTheme])]>
   Which: is not enough
When the exception was thrown, this was the stack:
#4      main.<anonymous closure> (file:///tmp/flutter%20sdk/packages/flutter/test/material/text_field_test.dart:5387:7)

Looks like it is probably a legitimate failure. You should be able to run material/text_field_test.dart and debug the failure locally.

Here is the stacktrace:
Testing started at 9:11 PM ...
/home/user/AndroidStudioProjects/flutter/bin/flutter --no-color test --machine --start-paused test/material/text_field_test.dart
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure object was thrown running a test:
  Expected: one widget whose rasterized image matches golden image "text_field_opacity_test.0.3.png"
  Actual: ?:<exactly one widget with type "Overlay" (ignoring offstage widgets):
Overlay-[LabeledGlobalKey<OverlayState>#d7160](state: OverlayState#a240f(tickers: tracking 2
tickers, entries: [OverlayEntry#7e483(opaque: false; maintainState: false),
OverlayEntry#62d73(opaque: false; maintainState: true), OverlayEntry#be481(opaque: false;
maintainState: false), OverlayEntry#6f1f6(opaque: false; maintainState: false),
OverlayEntry#89204(opaque: false; maintainState: false)]))>
   Which: does not match

When the exception was thrown, this was the stack:
#0      fail (package:test_api/src/frontend/expect.dart:152:30)
#1      _expect.<anonymous closure> (package:test_api/src/frontend/expect.dart:127:9)
#13     _MatchesGoldenFile.matchAsync.<anonymous closure> (package:flutter_test/src/matchers.dart)
<asynchronous suspension>
#14     AutomatedTestWidgetsFlutterBinding.runAsync.<anonymous closure> (package:flutter_test/src/binding.dart:891:22)
#17     AutomatedTestWidgetsFlutterBinding.runAsync (package:flutter_test/src/binding.dart:889:26)
#18     _MatchesGoldenFile.matchAsync (package:flutter_test/src/matchers.dart:1721:20)
#20     _MatchesGoldenFile.matchAsync (package:flutter_test/src/matchers.dart:1701:28)
#21     _expect (package:test_api/src/frontend/expect.dart:116:26)
#22     expectLater (package:test_api/src/frontend/expect.dart:75:5)
#23     expectLater (package:flutter_test/src/widget_tester.dart:266:10)
#24     main.<anonymous closure> (file:///home/user/AndroidStudioProjects/flutter/packages/flutter/test/material/text_field_test.dart:497:11)
#38     AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1028:17)
#40     AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1016:35)
(elided 43 frames from class _FakeAsync, package dart:async, package dart:async-patch, and package stack_trace)

The test description was:
  text field selection toolbar renders correctly inside opacity
════════════════════════════════════════════════════════════════════════════════════════════════════

Hi @imlegend19,
Thank you for your work on this contribution! It looks like you may have rebased your ranch and pull in a bunch of unrelated commits. GitHub has a hard time reconciling when using
git rebase...
To fix this, you can use
git reflog...
to undo the rebasing, and then use
git pull upstream master...
instead. That should fix the commit issues.

Hi @imlegend19,
Thank you for your work on this contribution! It looks like you may have rebased your branch and pulled in a bunch of unrelated commits. GitHub has a hard time reconciling when using
git rebase....
To fix this, you can use
git reflog...
to undo the rebasing, and then use
git pull upstream master...
instead. That should fix the commit issues.

Thank you @Piinks for your help.

I'm closing this in favor of https://github.com/flutter/flutter/pull/49391.  If anyone sees any problems that that PR doesn't cover, please let me know!


UI slow down With Pagination

I ran this code and the native ads in the list are sometimes working fine.
I want to achieve this with Pagination. Whenever i call below function for next page, it stuck UI (Recycleview) because may be i am calling it on Main thread.
// Load the Native ads.
 adLoader.loadAds(new AdRequest.Builder().build(), 5);

I also  used below method and it is giving good performance as compare to above.
    // Load the Native ads.
  adLoader.loadAd(new AdRequest.Builder().build());

I also tried with Handler, runOnUithread, Asynchtask but No success.
On Official site mention below note: [https://developers.google.com/admob/android/native/start]
Build an AdLoader
Note: Make all calls to the Mobile Ads SDK on the main thread.
Any suggestion how to solve this issue?

@charlizesmith , do you find any solution ? It is very annoying bug and cause performance issues...

+1, also saw this note to make all calls on the main thread. But adLoader.loadAd() takes about 100ms which is very bad...

The same problem here. It is hurting my app performance

+1, same problem here

+1, same problem here

+1, same issue. It make my app lagging. Please help to check

Have you got any answers guys ?


Application App and Runtime Packages

Describe the bug
A runtime package exported from a database with the microsoft application app cannot be published/synced in a database containing a custom (own AppId + Publisher) application app
Is this a behavior desired by Microsoft?
To Reproduce
We are developing an app which has no dependency on the base application but uses the application property in the app.json.
{
  [...]
  "dependencies": [],
  "application": "<IP_ADDRESS>"
  [...]
}

We publish this app in a normal (ms base app + ms application) sandbox container.
We export our app from this database as runtime package.
The exported file has a dependency on the microsoft application app.
PS C:\Windows\system32> Invoke-ScriptInBCContainer -containerName navserver -scriptblock {get-navappinfo -Path "C:\ProgramData\NavContainerHelper\Extensions\ApplicationDependencyTest.app"}

ServerInstance    :
PSComputerName    : ba88da28976ec88e706a73605b467595648dc1a033fee86711f1eeaf5de1f60f
RunspaceId        : a4063d50-95d1-4a79-a960-bd4173c3f731
Brief             :
Description       :
CompatibilityId   : <IP_ADDRESS>
PrivacyStatement  :
Eula              :
Help              :
Url               :
Logo              :
DeveloperTenantId :
ScreenShots       : {}
Dependencies      : {Application, Microsoft, <IP_ADDRESS>, False}
Capabilities      : {}
PackageId         : 103f1c39-f15c-49fc-b3d1-580a0bebb874
AppId             : 9aad3b47-62aa-4dd0-8ccf-991bf6e2b435
Name              : ApplicationDependencyTest
Publisher         : Default publisher
Version           : <IP_ADDRESS>
ExtensionType     : ModernDev
Scope             : Global

PS C:\Windows\system32> Invoke-ScriptInBCContainer -containerName navserver -scriptblock {(get-navappinfo -Path "C:\ProgramData\NavContainerHelper\Extensions\ApplicationDependencyTest.app").Dependencies}

PSComputerName  : 945aea82dfee401a152c558f585ff12c28a51207dfb55c4199121d61709c89bc
RunspaceId      : dc73faf7-b67c-470f-a0b9-bde943711c79
AppId           : c1335042-3002-4257-bf8a-75c898ccb1b8
Name            : Application
Publisher       : Microsoft
MinVersion      : <IP_ADDRESS>
CompatibilityId : <IP_ADDRESS>
IsPropagated    : False
Version         : <IP_ADDRESS>

This means that the runtime package cannot be used in conjunction with a customized base application or an application app with its own AppId.
PS C:\Windows\system32> Get-NavContainerAppInfo -containerName navserver | where {$_.Name -eq "Application"}

ServerInstance    : MicrosoftDynamicsNavServer$BC
PSComputerName    : ba88da28976ec88e706a73605b467595648dc1a033fee86711f1eeaf5de1f60f
RunspaceId        : a4063d50-95d1-4a79-a960-bd4173c3f731
Brief             : Application (DE)
Description       :
CompatibilityId   : <IP_ADDRESS>
PrivacyStatement  : https://go.microsoft.com/fwlink/?LinkId=724009
Eula              : https://go.microsoft.com/fwlink/?linkid=2009120
Help              : https://go.microsoft.com/fwlink/?linkid=2104024
Url               : https://go.microsoft.com/fwlink/?LinkId=724011
Logo              : /logo/Signet_auf-blau.png
DeveloperTenantId :
ScreenShots       : {}
Dependencies      : {System Application, Microsoft, <IP_ADDRESS>, False, Custom MegaApp, Any Publisher, <IP_ADDRESS>, False}
Capabilities      : {}
PackageId         : 5370d287-e124-4df0-a29f-4b06fb1a7684
AppId             : f10ed21b-ff67-4808-8a33-************
Name              : Application
Publisher         : Any Publisher
Version           : 15.3.3606.0
ExtensionType     : ModernDev
Scope             : Global

PS C:\Windows\system32> Publish-NavContainerApp -appFile "C:\ProgramData\NavContainerHelper\Extensions\ApplicationDependencyTest.app" -ContainerName navserver -skipVerification -sync
Publishing C:\ProgramData\NavContainerHelper\Extensions\ApplicationDependencyTest.app
Synchronizing ApplicationDependencyTest on tenant default
Cannot synchronize the extension because no synchronized extension could be found to satisfy the dependency definition for Application by Microsoft <IP_ADDRESS>.
at <ScriptBlock>, <No file>: line 29
Cannot synchronize the extension because no synchronized extension could be found to satisfy the dependency definition for Application by Microsoft <IP_ADDRESS>.
In C:\Users\*\Documents\WindowsPowerShell\Modules\navcontainerhelper\<IP_ADDRESS>\ContainerHandling\Invoke-ScriptInNavContainer.ps1:37 Zeichen:13
+             Invoke-Command -Session $session -ScriptBlock $scriptbloc ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Sync-NAVApp], InvalidOperationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC/default,Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.SyncNavApp
    + PSComputerName        : ba88da28976ec88e706a73605b467595648dc1a033fee86711f1eeaf5de1f60f

For obvious reasons, it is not possible to overwrite the dependency of a runtime package.
Expected behavior
A runtime package should be able to publish and sync when a custom application app is used.
5. Versions:

AL Language: 5.0.277602

Business Central: 15.3.40074.41933

The fix has been checked in to the master branch, 16.x (from which the 16.4 release will be done), and 15.x


pod update

i see a lot of change,
but pod didnt get the latest update,
its like the last update of pod is 7 month ago,
that old

Same problem here. Looks like it will be solved with Issue #1061.

So use the latest then..
pod 'SDWebImage', :git => 'https://github.com/rs/SDWebImage.git', :commit => '962bcb03231d3baa8a0463743d148f494cbed5aa' #3.7.2

I've just released a 3.7.2 version.


Containerization

Aug 12, 2020 edit : Dorval's gpsc3 -- the next generation container-based version of HPC -- now has GPUs
Containers are needed so we can easily deploy training and inference jobs.  Docker containers are runnable on all hardware, including on the cloud.

See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

Closed with #228


Group support needed configuration (org_metadata_api) and tasks

This closes #5244 and will be merged into #4924 branch. @luisbosque (since it involves configuration files) and @viddo (since you've just had to configure it), could you CR this, please?
@luisbosque Groups are expected to be merged into master in a few days (this or next week). Needed operation work is being documented here: CartoDB/cartodb-platform/issues/993. No need to begin yet, but keep this in mind, I'll soon be asking you about this :-)

/cc @azamorano

Retest this, please.


GDScript 2.0: assert() containing line breaks results in an syntax error

Godot version
v4.0.beta1.official [20d667284]
System information
It's not system specific error.
Issue description
Any condition containing newlines in assert's () will result in a syntax (grammatical?) error.
Steps to reproduce

assert(
    true or
    true) # It raises "Expected expression to assert." at edit time.

But. Its works with \:
assert( \
    true or \
    true)

assert(
    true) # error

Minimal reproduction project
Include line breaks in assert expression.

This is correct? You can't do this in any other context either.

@TheDuriel Idk but I was wondering if it was allowed cuz it was possible in 3.5.
I hitted this problem when porting my addons.
Normal calls allow line breaks like this:
my_func(
    "text",
    1234,
    true
)

Yup, I know. Is it okay to recognize that it has become stricter?

I'm not convinced from your example that is has.

I checked it again.
It seems that line breaks between operands are not allowed in this version at the or / and, binary and unary operators in the function call arguments.
I don't know if it's a bug or a lang spec change, but I was able to deal with it like this:
assert((
    1 +
    1
)) # works

Sorry, I looked further and it seems that regardless of the operator, simply cannot break a line.
https://github.com/godotengine/godot/issues/66535#issuecomment-1260907923

To complete use cases, I had this issue when splitting my long assert message over multiple lines:
	assert(is_on_floor(), "_get_floor_tangent: is_on_floor() is true yet get_floor_normal() " +
		"returned Vector2.ZERO.")

Replacing assert with a condition + push_warning for instance, will work.

I confirm this issue on master (fcba87e).
Minimal reproduction project
66535.zip


enhance(tutorial6): net definition and link

make the Net class foward method single step
insert link to the tutorial 5 where cited

### Motivation
There are several points in this very useful tutorial for which I propose this ameliorative change.
For clarity I will call "v1" the current version of the Net definition and "v2" the version that is proposed in this PR.

An error launching "Run all". This is a shape incompatibility error in the loss calculation, because in v1 there is an internal loop in .forward, which thus adds an extra axes. Now it runs all cells with no errors.
.forward in v1 is apparently inconsistent with .forward in v2, being the former with an inner loop (so multi-step), while the latter without it (so single-step).
(am I overthinking?) Whether there was an intention behind defining the network with an inner loop to define a smaller dt, characteristic of an inner frequency higher than the outer frequency (receptors) is not very clear and it might be beneficial to make it explicit.

It is clear that the tutorial 5 example was being cited, but in this context it comes across as a bit inconsistent.
If I have misunderstood, please tell me how I should best understand the tutorial.
Thank you for the effort of creating this project :)

I appreciate you taking the time to help contribute!
I hit run all but did not face any errors. I think what may be happening is you're using the Net class [block 8] instead of the Sequential wrapper [block 9].
The Net Class in block 8 is just referring back to the previous way Tutorial 5 instantiated the network.
It is never actually used in this tutorial or assigned to a variable.
Instead, we assign the Sequential wrapper to net, and it does not use a for-loop. So a new loop must be defined.
Does this make sense?

Yes, you are completely right, sorry for the lack of clarity.
What I meant is just that if I decide to use the non-sequential definition of the network I can't execute all the cells.
This, IMHO is an unexplained inconsistency. Why should the forward step be multiple (loop) in one network and not be in another?
I am aware that everyone can handle it as they wish, but I wonder if it is appropriate from a design perspective.
For example, I think Sequential is purposely created single step, as it resides on an external loop that is always present in pytorch, by convention. If I include an internal loop in the network definition, I should do so thinking that this is additional to the external loop (case of internal trarining batch step for each external step), not just alternative implementation.
Maybe it is irrelevant to the creator of the tutorial :) , in which case you can close this PR, but if so I propose to consider defining a convention, since, especially in the spiking world, differences in dt in training (max frequency of the single neuron with respect to an "external" time flow) matter a lot and not having a standard can lead to conceptual error.
If I am still not very clear, please let me know.
Thank you.

You're right; we definitely don't want any double loops!
When using sequential, we're stuck with an external loop. With the class, we can do either; I'd say it's just a coding style preference. The user is definitely not meant to double-loop the class; we want to ensure function is the same between the class and the sequential wrapper. I personally prefer an inner loop within the class to isolate the training loop from the time loop; its just easier to parse imo.
Let me run this past some of the discord members as a test crowd to see if the tutorial is unclear, and then decide if the code should be changed or just the description.
Appreciate the feedback though; I'll let you know here what I go with!