Support for multiple hosts.

Adds an ability to use different hosts for different indexes. E.g.
Example of config:
production:
   hosts: 'localhost:9250' # default host for all indexes
   clients: # alternative host
     search:
       hosts: 'search.example.com:9250'

Specify it in index.
class SearchIndex < Chewy::Index
   use_client :search
end

👍

Sorry for not paying attention to this awesome PR, but I'm quite busy currently, I'll try to find a time for it

Ok, whatever it seems to me this PR can and should be improved)

Hi @pyromaniac, @mainameiz,
I need this PR badly. When do you this PR can be merged?
Thanks,
Mykolas

Hey, well, as soon as it will be ready. You may try to propose your updates here

@pyromaniac Hello! I have rebased it with master branch and fix errors. Could you review it?

Hey man. This is a great improvement. I reviewed it and it definitely deserves to be merged. The only thing here is that I would like to refactor some code there. For example, it makes sense to create configurations as instances of a class, something like:
class Config
  def client; ... end

  def settings; ... end
end

Chewy.config(:default).client
Chewy.config(:server2).settings
Chewy.config(:server2).settings = { additional: 'stuff' }

I want to refactor this piece of code for a long time already, but I want to create a great interface here. If you will be unable to do it - I'll join you as soon as will finish with the ES 5 support I'm working on currently. WDYT?

@pyromaniac I can do this refactoring. So, as I understand, you want:

add Chewy::Config#client method instead of Chewy::Clients class
add ability to pass config_name parameter to Chewy.config(config_name) instead of Chewy::Configs.with_name(config_name)

Yeah, let's start with this and see how would it look like.

Hm, we've got Config already, probably it makes sense to split it, keep global options there and mode the settings thingy to a new class Chewy::Environment or maybe think about a better name.

@pyromaniac done. Please, find a minute to review it.
It becomes much larger, but I have found more places where a code must be a client-specific and fixed it.
And I would like to ask you a question - how about to broke some things and place default config under clients: config key as it done in mongoid?
development:
  # Configure available database clients. (required)
  clients:
    # Defines the default client. (required)
    default:
      # Defines the name of the default database that Mongoid can connect to.
      # (required).
      database: '***'

I will resolve conflicts a little bit later

Didn't get, what's going to be on the top level then?

@pyromaniac
Changes:

Chewy.client now requires name of client (previous version is deprecated). Usages of Chewy.client replaced with Chewy.default_client and Chewy.client(client_name). It uses Chewy::Clients underneath.
Chewy.clients[client_name] returns config for specified client instead of Chewy::Configs.with_name(client_name) but it still uses Chewy::Config::Clients underneath.
Chewy::Runtime.version replaced with Chewy.client(client_name).version
Chewy.default_client returns instance of Chewy::Client instead of Elasticsearch::Client (it is wrapper around Elasticsearch::Client with delegation of methods).

Hm, we've got Config already, probably it makes sense to split it, keep global options there and move the settings thingy to a new class Chewy::Environment or maybe think about a better name.

As it seems to me, Config is ok. Why you think it should be splitted?

@pyromaniac

Didn't get, what's going to be on the top level then?

Top level will contains default parameters for query_mode, filter_mode etc.

Ok, if you will take a look at the current config class, you will see that it contains the settings hash and some global configuration options such as indices_path or request_strategy.
Settings also consist of:

Client options - which totally should be in different YAML branches
Prefix - this one should be configured per client, but it actually makes sense to have it configurable globally.
Index default settings (are merged to every index settings hash, used on index creation) - this one should behave the same way as the prefix, I believe.

While indices_path, for example, should be configured globally only, not per-client, the same thing is with the request_strategy or DSL settings. As for them, btw, I'm introducing new DSL, so it makes sense to get rid of query_mode from the config and put it into the query-class specific namespace, and I'll probably do this in my branch.
That's why I want to split Config. Because it was Chewy.config.indices_path and Chewy.config.settings, but should become: Chewy.config.indices_path (stay the same) and Chewy.client(:client_name).settings. It also makes sense to think, about better naming maybe.
So I was imagining this interface the following way:

Chewy.client(:client_name).client_settings
Chewy.config(:client_name).index_settings
Chewy.config(:client_name).prefix
Chewy.config(:client_name).version
Chewy.config(:client_name).client

Basically, here, first 3 options are replacing the current Chewy.config.settings. But maybe it doesn't worth to split them and makes sense to keep: Chewy.config(:client_name).settings
The thing I don't like right now in my idea is that there is no clean interface for indices_path, for example, we will have to use Chewy.config.indices_path, which is confusing. And I like your idea about the client wrapper, however not sure if it is not an overcomplication. So better interface in my opinion will look like:

Chewy.client(:client_name).client_settings
Chewy.client(:client_name).index_settings
Chewy.client(:client_name).prefix
Chewy.client(:client_name).version
Chewy.client(:client_name).whatever_elasticsearch_client_method_proxified

In this case, global config will stay in the .config space: Chewy.config.indices_path, but still, you see, Chewy::Config class will be cleaned up from settings or prefixes.
Also maybe we can go without proxy and use Chewy.client(:client_name).real_client or Chewy.client(:client_name).es_client, or maybe we will fing a better global accessor and will be able to use Chewy.better_name(:client_name).client.
Anyway, I want Chewy.client(:client_name).client_settings to be settable also from the ruby code, not only from YAML. The same story for Chewy.client(:client_name).index_settings or Chewy.client(:client_name).prefix.
Also, I don't want Chewy.config.indices_path or other global things to be settable from YAML, it doesn't make sense as for me.
So I think the YAML structure have to provide a way to set up prefixes or some default stuff like default index settings or even client setting (port, for example, however not sure, does it worth it or not) globally. In this case, your proposal makes total sense:
development:
  prefix: 'global_prefix'
  # Configure available database clients. (required)
  clients:
    # Defines the default client. (required)
    default:
      # Defines the name of the default database that Mongoid can connect to.
      # (required).
      prefix: 'prefix_for_default_client'

Sorry for such a long explanation I'm just trying to provide my understanding to come to the best solution together.

@pyromaniac So you give me a permission to do these changes? I'm trying not to break APIs as you say (https://github.com/toptal/chewy/issues/338).
It is better to do in this PR or another? It seems to be quite later already...

It is a good point about the backward compatibility. In #338 I was actually talking about the YAML reader backward compatibility. I have to think about it. I want to change the API completely just in order to make it nice and clear and if we are going to keep the API backward compatibility - let's make it separate completely like we will have 2 completely different APIs without having methods with the double purpose. Let's come up with good naming and structure for it, I'm going to think a little bit.

I'm very interested in this work. The last update for the issue was a month and a half ago.  An expectation that the PR will merged into master anytime soon?

@pyromaniac Hello! I want to continue to work on this feature. It's is time to update my elasticsearch cluster to v5 :) So I need chewy's changes from master branch.
What should I do to get this PR merged?

First of all, let's figure out the backward-compatible interface. And then just implement it. Can you produce the list of requirements you think are necessary? So I will do as well.

First of all let's rename Chewy.client to Chewy.default_client everywhere in codebase (I will do separate PR for this) and deprecate Chewy.client method. So it will reduce changes in next PRs.

You sad:

That's why I want to split Config

But we can't split config without breaking compability. So here I need you decision:

break compability and split configs
keep compability and add just add :clients key to yml config in which other configs will be defined as in top level.

production:
  ... top level parameters for `Chewy.default_client` (hosts, wait_for_status, etc.)
  clients:
    es2_client:
      ... same parameters as at top level (hosts, wait_for_status, etc.) but without inheritance

I would use the second one, but deprecate the top-level config in favor of
clients:
  default:

The same I would do with the Ruby API. Just keep the current one but deprecate it and keep as an alias to the brand new API we will develop.

Like this https://github.com/toptal/chewy/pull/613?

Up! Are there any chances to merge this?

https://github.com/toptal/chewy/issues/338


Error "empty error" when using DOT

Hi,
when using only DOT option (all others work fine)  I get the following error:
** (Enum.EmptyError) empty error
    (elixir 1.17.3) lib/enum.ex:1904: anonymous fn/0 in Enum.max/1
    (ecto_erd 0.6.2) lib/ecto/erd/document/dot.ex:88: anonymous fn/2 in Ecto.ERD.Document.Dot.render_node/2
    (elixir 1.17.3) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    (elixir 1.17.3) lib/map.ex:262: Map.new_from_enum/2
    (ecto_erd 0.6.2) lib/ecto/erd/document/dot.ex:82: Ecto.ERD.Document.Dot.render_node/2
    (elixir 1.17.3) lib/enum.ex:1804: anonymous fn/2 in Enum.map_join/3
    (elixir 1.17.3) lib/enum.ex:4408: Enum.map_intersperse_list/3
    (elixir 1.17.3) lib/enum.ex:4408: Enum.map_intersperse_list/3

Thank you for the report.
As I understand, that's because you have a schema without any field, correct?

Hi Artur,
yes this might be the case indeed.
On Sun, Oct 13, 2024 at 11:26 PM Artur Plysiuk @.***>
wrote:

Thank you for the report.
As I understand, that's because you have a schema without any field,
correct?
—
Reply to this email directly, view it on GitHub
https://github.com/fuelen/ecto_erd/issues/59#issuecomment-2409040262,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFP664Z3QFZION4WOFOVV43Z3KNLLAVCNFSM6AAAAABPYFADYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBZGA2DAMRWGI
.
You are receiving this because you authored the thread.Message ID:
@.***>


Added Asana SearchProvider

Closes: #687
I'm not sure if it's right, please review.

Hi @LunarMarathon, thanks for the PR. Please check the contributing guidelines. You need to create a PR to the develop branch by branching out from the develop branch.
Also, join in the Slack for any discussion.

I want to work on this if it is still open. Please let me know.

Closing this out.  We'll be shipping an Asana SP in Swirl 3.1.0.


Hi sms verification and the orher question can help

For now there is two general question:

what is sequence of API calls for sign invoice (should it be one call or sequence with SMS verification), perfectly with description of API calls and prams;
how we can determine state of invoice when we get invoice info by UUID or by dates (means loaded invoice draft, signed or canceled)
there is general questions for now, I think
For now, I use single API call (without any SMS verification) for sign invoice, as you know this does not works on test portal, but I does not how ot works on production portal...
User Avatar
Also for all loaded invoices from earsiv I use 'draft' state because I don not know what is actual state; so operations of 'sign' or 'cancel' can cause errors for this invoices, because its can be already sugned or canceled..

For now there is two general question:

what is sequence of API calls for sign invoice (should it be one call or sequence with SMS verification), perfectly with description of API calls and prams;
how we can determine state of invoice when we get invoice info by UUID or by dates (means loaded invoice draft, signed or canceled)
there is general questions for now, I think
For now, I use single API call (without any SMS verification) for sign invoice, as you know this does not works on test portal, but I does not how ot works on production portal...
User Avatar
Also for all loaded invoices from earsiv I use 'draft' state because I don not know what is actual state; so operations of 'sign' or 'cancel' can cause errors for this invoices, because its can be already sugned or canceled..


Assertion error in fn Roll during Reserve dice selection

Assertion failed: (i>0 || m_sides[i]>0), function Roll, file src/bmai.cpp, line 804.

INPUT
game 3
reserve
player 0 8 0
qT
qW
qX
qZ
rnR
rzS
rpU
rfV
player 1 5 0
B8
H8
p8
z8
zU?-30
ply 3
max_sims 100
min_sims 5
maxbranch 400
getaction
quit

OUTPUT
% cat ~/Downloads/71297.txt | ./bmai
BMAI: the Button Men AI
Copyright (c) 2001-2020, Denis Papp.
For information, contact Denis Papp<EMAIL_ADDRESS>target wins set to 3
s 0.0 Dice (4)0:0 (4)0:0 (4)0:0 (4)0:0
s 0.0 Dice (40)8:0 (10000)8:0 (100)8:0 (10)8:0 (410)30:0
Setting max ply to 3
Setting max # simulations to 100
Setting min # simulations to 5
Setting max branch to 400
l2 p0 Valid SetSwing 45441 Max 80
l2 p0 Valid SetSwing 80 Sims 3
l2 p0 - swing/option T 2  W 4  X 4  Z 4
Assertion failed: (i>0 || m_sides[i]>0), function Roll, file src/bmai.cpp, line 804.

Originally posted by @danlangford in https://github.com/hamstercrack/bmai/discussions/11#discussioncomment-406161
For the record, there are Swing Reserve dice which some have said have been a problem in the past with BMAI
edit: with some recent code changes its now on line 799
l2 p0 Valid SetSwing 45441 Max 80
l2 p0 Valid SetSwing 80 Sims 3
l2 p0 - swing/option T 2  W 4  X 4  Z 4
Assertion failed: (i>0 || m_sides[i]>0), function Roll, file /Users/danlangford/code/danlangford/bmai/src/bmai.cpp, line 799.

which is here…
void BMC_Die::Roll()
{
	if (!IsUsed())
		return;

	BM_ASSERT(m_state=BME_STATE_NOTSET);

	INT i;
	m_value_total = 0;
	for (i=0; i<Dice(); i++)
	{
		BM_ASSERT(i>0 || m_sides[i]>0);	// swing die hasn't been set
		if (m_sides[i]==0)
			break;
		// WARRIOR: always rolls highest number
		if (HasProperty(BME_PROPERTY_WARRIOR))
			m_value_total += m_sides[i];
		else
			m_value_total += g_rng.GetRand(m_sides[i])+1;
	}

	m_state = BME_STATE_READY;

	RecomputeAttacks();
}

one thing i find interesting is if we look at the call stack the program was going through PlayPreround() and then FinishPreround() but while it was in PlayPreround() for one reason or another it ended up in FinishPreround(). granted by then it could have had a different context but I saw that as possibly odd. (having very little context of the code)

i am currently exploring a code change in bmai_player.cpp in BMC_Player::RollDice()
currently:
// POST: recomputes m_score
void BMC_Player::RollDice()
{
	//BM_ASSERT(m_man != NULL);

	m_score = 0;

	INT i;
	for (i=0; i<BMD_MAX_DICE; i++)
	{
		if (!m_die[i].IsUsed())
			continue;
		m_die[i].Roll();
		BM_ASSERT(m_die[i].GetValueTotal()>0);

		m_score += m_die[i].GetScore(true);
	}

	OptimizeDice();

	g_logger.Log(BME_DEBUG_ROUND, "rolling ");
	Debug(BME_DEBUG_ROUND);
}

possible change:
// POST: recomputes m_score
void BMC_Player::RollDice()
{
	//BM_ASSERT(m_man != NULL);

	m_score = 0;

	INT i;
	for (i=0; i<BMD_MAX_DICE; i++)
	{
		if (!m_die[i].IsUsed()||m_die[i].GetSides(0)==0)
			continue;
		m_die[i].Roll();
		BM_ASSERT(m_die[i].GetValueTotal()>0);

		m_score += m_die[i].GetScore(true);
	}

	OptimizeDice();

	g_logger.Log(BME_DEBUG_ROUND, "rolling ");
	Debug(BME_DEBUG_ROUND);
}

it helps to make sure that we don't attempt to roll a die that has 0 sides. i don't know what the implications of this are. i don't know how this interacts with twin dice. but so far I actually got the codebase to complete this preround and suggest a reserve selection. so that's good

Ignoring a die where "IsUsed()" but with "m_sides[x]==0" may be masking an underlying issue.
I see in this state, the dice in question is "rnR" or "Reserve Null"
I see in this state, for the die in question:

m_state == BME_STATE_NOTSET.  As written, RollDice() will ignore any dice set to "NOTUSED" or "RESERVE".
m_properties == VALID|NULL
m_swing_type == BME_SWING_R

OnUseReserve() must have been called since the PROPERTY_RESERVE is gone.  When OnUseReserve() runs, it also sets "STATE_NOTSET"

Here is the full stack:

bmai.exe!BMC_Die::Roll() Line 799	C++
bmai.exe!BMC_Player::RollDice() Line 129	C++
bmai.exe!BMC_Game::FinishPreround() Line 1361	C++
bmai.exe!BMC_Game::PlayRound_EvaluateMove(int _pov_player) Line 2902	C++
bmai.exe!BMC_BMAI3::GetSetSwingAction(BMC_Game * _game, BMC_Move & _move) Line 953	C++
bmai.exe!BMC_Game::PlayPreround() Line 1708	C++
bmai.exe!BMC_Game::PlayRound(BMC_Move * _start_action) Line 1873	C++
bmai.exe!BMC_BMAI::GetReserveAction(BMC_Game * _game, BMC_Move & _move) Line 1406	C++
bmai.exe!BMC_Parser::GetAction() Line 3646	C++
bmai.exe!BMC_Parser::Parse() Line 3962	C++

In sequence

GetReserveAction() runs,
starts first simulation
ApplyUseReserve() -> which runs OnUseReserve() -> which sets state = NOTSET
sim #0: PlayRound()
PlayPreround()
GetSetSwingAction()
ApplySetSwing()
PlayRound_EvaluateMove()

targetPlayer->GetSwingDiceSet() == SWING_SET_LOCKED so it does not call GetSetSwingAction() here

FinishPreround()
RollDice()

m_die Index 4: assert

I notice at step 8: phasePlayer->GetSwingDiceSet()==SWING_SET_LOCKED, but phasePlayer->NeedsSetSwing()==true.
It looks like the AI has used a reserve die, which happens to be swing, but is (incorrectly) not setting the sides of the swing die.

In GetSetSwingAction(), it will

generate a list of candidate Moves
try each Move

The assert trips on the very first Move, suggesting it may be invalid. Looking at it:

action = SET_SWING_AND_OPTION
m_swing_value[] - looks like uninitialized memory except index 3 which is set to 2. This looks wrong

So it's only setting swing die for index 3 and not setting index 4.
Looking at BMC_Game::GenerateValidSetSwing() note this code:
	// walk dice and determine possible things to set
	for (i=0; i<BME_SWING_MAX; i++)
	{
		if (pl->GetTotalSwingDice(i)>0 && g_swing_sides_range[i][0]>0)
		{
			swing_action[actions].swing = true;
			swing_action[actions].index = i;
			swing_action[actions].value = g_swing_sides_range[i][0];	// initialize to min
			actions++;
			//combinations *= (g_swing_sides_range[i][1]-g_swing_sides_range[i][0])+1;
			move.m_swing_value[i] = g_swing_sides_range[i][0];
		}
	}

That will only handle a swing type if pl->GetTotalSwingDice(i)>0.  In this case, for BME_SWING_R, it is returning 0.
INT			GetTotalSwingDice(INT _s) { return m_swing_dice[_s]; }

So m_swing_dice[] is not correct.  There are two possible issues here:
A) m_swing_dice[] correctly starts at 0 for reserve dice, and when a swing dice is moved from reserve, it's not m_swing_dice.
B) m_swing_dice[] should include counting reserve dice

There are two places in code where m_swing_dice is initialized:

BMC_Player::SetButtonMan()
BMC_Player::OnDiceParsed()

In the first case, m_swing_dice[] will include reserve dice. In the second case, it will exclude them (per IsUsed()), The first code is not actually used, however (it is test code). So only the second case is used.  Also, a lot of code checks GetTotalSwingDice(i)>0 and assume that means active swing dice.
SOLUTION
OnUseReserve() needs to increment m_swing_dice.
I believe that would fix it, though it's worth noting there's a co-dependency here.  A more robust solution would be that whenever a die goes bween"!IsUsed()" and "IsUsed()" (i.e. when m_state changes), it needs to properly update m_swing_dice. E.g. "OnStateChanged()" or "OnIsUsedChanged()"

Oh man I was going to look at this tonight. Instead I’ll pull your latest and see if it resolves some stuck games of mine

This one was nagging at me since the comment that it's a long standing issue.

Well I pushed the change to not running against  buttonweavers website and it resolved some stale games and is moving forward with wins :-) well done


Camera does not appear to work with Android 6 (Marshmellow)

Steps to reproduce

Emulator works under android 4
Emulator and actual android 6 device does NOT WORK, crashes on the render with

Expected behaviour
Camera should open up in my app.
Actual behaviour
Camera crashes the application.  Works in Genymotion 4.0 Android emulator, crashes in any 6.0 emulator or LG G4 (running android 6).
Environment

Node.js version:3.9.3
React Native version: 0.31.0
React Native platform + platform version: Android 6.0

react-native-camera
Version: npm version or "master": Master
Also - IN any version the following occurs but may not be related:
My camera no longer works as well.
React Native 0.31.0
Android 6 does NOT WORK either in the emulator or on an actual device.  The  crashes the app with no explaination.
Android 4 (Emulator) still DOES work.
This is perplexing.
Also this code snippit says that the module is undefined:
Error: TypeError: undefined is not a function (evaluating '_reactNativeCamera2.default.checkDeviceAuthorizationStatus()')
  test_permissions() {
	try {

	  console.log(Camera.checkDeviceAuthorizationStatus());
	} catch(e) {
	  console.log('Error: ' + e);
	}
  }

Getting the same error:
java.lang.ExceptionInInitializerError 	at com.lwansbrough.RCTCamera.RCTCameraView.setActualDeviceOrientation(RCTCameraView.java:112) 	at com.lwansbrough.RCTCamera.RCTCameraView.<init>(RCTCameraView.java:28) 	at com.lwansbrough.RCTCamera.RCTCameraViewManager.createViewInstance(RCTCameraViewManager.java:17) 	at com.lwansbrough.RCTCamera.RCTCameraViewManager.createViewInstance(RCTCameraViewManager.java:7) 	at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:44) 	at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:211) 	at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148) 	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:890) 	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:863) 	at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32) 	at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131) 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:918) 	at android.view.Choreographer.doCallbacks(Choreographer.java:695) 	at android.view.Choreographer.doFrame(Choreographer.java:628) 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) 	at android.os.Handler.handleCallback(Handler.java:739) 	at android.os.Handler.dispatchMessage(Handler.java:95) 	at android.os.Looper.loop(Looper.java:158) 	at android.app.ActivityThread.main(ActivityThread.java:7229) 	at java.lang.reflect.Method.invoke(Native Method) 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.Console java.io.Console.printf(java.lang.String, java.lang.Object[])' on a null object reference 	at com.lwansbrough.RCTCamera.RCTCamera.acquireCameraInstance(RCTCamera.java:33) 	at com.lwansbrough.RCTCamera.RCTCamera.<init>(RCTCamera.java:321) 	at com.lwansbrough.RCTCamera.RCTCamera.<clinit>(RCTCamera.java:15)

Same here. Android 6.0.1, newest version of this library, react native 0.30.
It seems that the camera is not relased correctly, so when restarting the app, it crashes as it can't connect to the camera.
08-15 15:26:04.646 23317 23317 E AndroidRuntime: java.lang.ExceptionInInitializerError
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.lwansbrough.RCTCamera.RCTCameraView.setActualDeviceOrientation(RCTCameraView.java:120)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.lwansbrough.RCTCamera.RCTCameraView.<init>(RCTCameraView.java:33)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.lwansbrough.RCTCamera.RCTCameraViewManager.createViewInstance(RCTCameraViewManager.java:18)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.lwansbrough.RCTCamera.RCTCameraViewManager.createViewInstance(RCTCameraViewManager.java:8)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:44)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:211)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:890)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:863)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:125)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.view.Choreographer.doCallbacks(Choreographer.java:670)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.view.Choreographer.doFrame(Choreographer.java:603)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:148)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:5417)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
08-15 15:26:04.646 23317 23317 E AndroidRuntime: Caused by: java.lang.RuntimeException: Fail to get camera info
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.hardware.Camera._getCameraInfo(Native Method)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at android.hardware.Camera.getCameraInfo(Camera.java:236)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.lwansbrough.RCTCamera.RCTCamera.<init>(RCTCamera.java:313)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        at com.lwansbrough.RCTCamera.RCTCamera.<clinit>(RCTCamera.java:15)
08-15 15:26:04.646 23317 23317 E AndroidRuntime:        ... 22 more
08-15 15:26:04.648   779  1579 W ActivityManager:   Force finishing activity com.wizart/.MainActivity
0

First of all Loch, thanks for making this module!
I'm building a pretty cool app which needs camera access as it's major part.  Do you know why it is failing or perhaps could point me in the right direction on it? This is integral to my demonstration to investors next week, I don't want to take a step back!
Any help would be appreciated!

Hi @cyphire,
Does #381 fixed this issue ?
How it was with investors?

Hey Nicolas,  yes thank you, this lets the camera work under 6 now.  I did
have to move my build target to 22. When it was on 23, the camera doesn't
come up.
I just started using react-native-image-picker as an alternative as well.
It gives me quick response time (this module takes a LONG time to focus and
return results).  The problem I have is that I need fast response time and
square camera results.  I was able to achieve this with picker, and it
works.  I would rather, of course, have the camera viewfinder directly in a
view like with rncamera but I've spent too much time figuring out how to
crop, or display the results without stretching or filling the image with
huge white space on either side.
The first investor is starting a huge startup (he is a very, very big guy
in tech and an awesome guy) and his team was afraid my venture would
distract them.  I understand.  I'm going to propose a straight investment,
we'll see!.  Working on some other super high net wealth guys... Wish me
luck!
I haven't written anything relevant in 15 years as I've been running
companies.  5 months ago I taught myself JavaScript through react-native.
I've been a programmer for over 30 years, but again, haven't had time to
code since I had a company in Silicon Alley in NYC during the bubble.  My
JavaScript wasn't just rusty, it sucked.  Now I'm proud to say, my
JavaScript is good and I didn't just build a prototype for investors, I
actually built the whole app and it's a thing of beauty!
Can't wait to get the company rolling and turn this project over to young
guys like you and start building out the company!

Brian B. Canin<EMAIL_ADDRESS>858-945-5601 (cell)
On Sat, Aug 27, 2016 at 8:40 PM, Nicolas Charpentier <
<EMAIL_ADDRESS>wrote:

Hi @cyphire https://github.com/cyphire,
Does #381 https://github.com/lwansbrough/react-native-camera/pull/381
fixed this issue ?
How it was with investors?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lwansbrough/react-native-camera/issues/367#issuecomment-242950839,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAUnhuS_-71eUSPG3U7sjNZD9ye2FTReks5qkOb-gaJpZM4JiY80
.

Closing this as the new fix allows the camera to work under 6.0 in Android.
Build target needs to target 22, not the latest 23 though:
targetSdkVersion 22
or the camera does not open, but it no longer crashes my app.
Thanks guys!


Headful mode is not showing the browser

Headful mode is not displaying the browsers in version 0.191.0. (Note: It was working in version 0.171.0).
The command I am using is: npx folio --param headful
This is the test I am running
`const { it, describe, expect } = require("@playwright/test");
describe("this is a test suite", async () => {
it("test case 1", async ({ page }) => {
await page.goto("https://playwright.dev/");
const name = await page.innerText(".navbar__title");
expect(name).toBe("Playwright");
});
});`

This bug was introduced in #212.
As a workaround try to set the HEADFUL=1 environment variable.


URI Scheme error

Using code
    AsyncHttpClient client = new AsyncHttpClient();
    client.get("http://www.baidu.com", new AsyncHttpResponseHandler() {
        @Override
        public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
            Log.d("apitest","Success: "+statusCode);
        }
        @Override
        public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable
    error)
    {
             error.printStackTrace(System.out);
        }
    });

will get

10-21 22:41:54.915: I/System.out(19624): java.net.MalformedURLException: No valid URI scheme was provided

unless I set
private boolean isUrlEncodingEnabled = false;

in AsyncHttpRequest.java
Is there anything wrong in my code? Or is it a bug?

The issue is still happening in version 1.4.9


Onboarding Request

Your Twitch username
PlatinLP

I'm having an issue with Spotify right now. I will check again later today or tomorrow. Sorry for the delay

it's ok take the time you need.

Okay sorry about that. Added you. Thanks for your patience!


MobilenetV1 difference from original paper

Others (#35 #53) have noticed discrepancies in model architectures as well. Just noting a discrepancy in MobilenetV1:
https://github.com/kuangliu/pytorch-cifar/blob/ab908327d44bf9b1d22cd333a4466e85083d3f21/models/mobilenet.py#L32
I'm fairly certain that the first convolution should have stride of 2! Though when I make this change, it results in lowered accuracy overall.

CIFAR images are only 32x32 (compared to imagenet 224x224), so you need to reduce the stride of the first few layers, or else they will perform poorly.


Update to .net8

Update all packages in projects  to .net8

Can you please add https://github.com/managedcode/Storage/blob/main/.github/workflows/dotnet.yml
NDepend and sonar cloud and codecov :)


Getting Configuration with name 'releaseTrainVersion' not found

Getting Configuration with name 'releaseTrainVersion' not found with
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${releaseTrainVersion}"
        mavenBom "org.springframework.cloud:spring-cloud-sleuth-otel-dependencies:${springCloudSleuthOtelVersion}"
    }
}

I am referring the configs mentioned here
https://spring-cloud-incubator.github.io/spring-cloud-sleuth-otel/docs/current/reference/html/howto.html#howto

I have added following plugin config also in my gradle file
id "io.spring.dependency-management" version "1.0.11.RELEASE"

I've seen you ask this question on Gitter. Please do not cross post.
releaseTrainVersion means a Spring Cloud release train version - please check this website for more information https://spring.io/projects/spring-cloud

Yes I found the Gitter after I raised the question here.
Sorry for not closing.


Yatin: Watch lincsquad(?!.com)

Yatin requests the watch of the watch_keyword lincsquad(?!\.com). See the MS search here and the Stack Exchange search in text, in URLs, and in code.

lincsquad(?!\.com) has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


Signature help's current-parameter supports non-trailing rest parameters

In signature help, the first rest parameter will always be the last 'current' parameter (disregarding types). Previously, the signature help
current-parameter highlight was only correct for trailing rest parameters. However, with tuple types, you can now create non-trailing rest parameters. This PR now correctly highlights non-trailing rest parameters as the last 'current' parameter.
For example, names should be the current parameter in all the calls below:
declare function loading(...args: [...names: string[], allCaps: boolean, extra: boolean]): void;

leading(/**/
leading('one', /**/
leading('one', 'two', /**/

And, because signature help doesn't do real overload resolution, names
is also the current parameter for other calls:
leading(1, 2, 3, 'ill-typed', /**/
leading('fine', true, /**/

One other quirk is that the new isRest property is optional -- I didn't want to change the external protocol. Let me know if you think that's incorrect.
Fixes #42292

Wait, we don't look at types here? So in a valid usage like
loading("name1", "name2", /*allCaps*/ true, /**/

you’d always be stuck on names?

Yeah, previously, we'd just do overload resolution and then highlight whichever parameter matched the count of arguments. This is more clever, but only a little. I don't think it's worthwhile to be too clever here.

The checker code that iterates arguments and gets a matching parameter is buried pretty deep. It might be possible to expose that to the services layer, but I'm not sure how much scaffolding I'd have to make to make it work.

What if we just don’t set a current argument since we know we won’t get it right?

@typescript-bot pack this

Another alternative might be to not flatten the signature if the tuple has a non-trailing rest element.

@andrewbranch argumentIndex is required. =(
@DanielRosenwasser That's not a bad idea. Not sure how hard it is to do that. I'll go look.

Well, uh, we don't even try to highlight the current parameter correctly for the last argument of this simple example:
declare function mcduff(x, y, ...args)
mcduff(1, 2, 3, 4)

So I think it's fine to fall back to that behaviour for now. I've got fairly simple code that deactivates the tuple expansion in case of non-trailing rests, which I'll push shortly.

Well, uh, we don't even try to highlight the current parameter correctly for the last argument of this simple example:

!!!

I still feel a bit conflicted because this displays more poorly. Maybe argumentIndex can just be set to -1 or something? Ideally argumentIndex could be split into argumentRange or something like that.

I was wondering about setting argumentIndex to -1, but it seems like whether that works will be editor-dependent. If it works in VS and VS Code, do we call that good enough?

Well, editors today have to sort of handle the case where there's too many parentheses, right? I don't exactly know what the expected behavior is. Maybe @CyrusNajmabadi has some thoughts from the Roslyn side.

It already works fine to have argumentIndex > parameters.length if you want to turn off current-parameter highlighting. I think that's a pretty good option.

The latest commit:

Skips highlighting non-trailing rests by setting argumentIndex = parameters.length, which is one past the end.
Stops the highlight at the end for trailing rests. (This is new! I can't believe we never tested this before!)


feat: extend typeorm-query-service withDeleted

Working with the QueryService I was kinda suprised that we can't really query for soft-deleted entities. And we are only able to restore soft-deleted entities if we know the ID which is rarely the case. So the soft-delete / restore functionality was pretty useless for us.
With this two commits I've made these two changes:

Adding opts?: { withDeleted?: boolean } to the other QueryService functions and a conditionally call to .withDeleted() on the underlying query-builders.
Refactoring the RelationQueryBuilder to only add a deletedAt IS NULL check at the root level and ignore the related entities. This was necessary to implement a resolver for deleted entities. The dataloaders for the relations of the deleted entity always included a inner-join with deletedAt IS NULL which resolved in an error.

These changes should't change the behaviour of the current implementation.

Codecov Report

Merging #99 (dcdba48) into master (a06b5ef) will increase coverage by 3.41%.
The diff coverage is 65.00%.

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   77.91%   81.33%   +3.41%
==========================================
  Files         591      231     -360
  Lines        8327     5105    -3222
  Branches      806      792      -14
==========================================
- Hits         6488     4152    -2336
+ Misses       1133      227     -906
- Partials      706      726      +20

Impacted Files
Coverage Δ

...uery-typeorm/src/services/typeorm-query.service.ts
61.90% <53.84%> (+15.95%)
:arrow_up:

.../query-typeorm/src/query/relation-query.builder.ts
92.81% <66.66%> (+3.05%)
:arrow_up:

packages/core/src/interfaces/index.ts
100.00% <100.00%> (ø)

packages/core/src/module.ts
40.00% <0.00%> (-60.00%)
:arrow_down:

packages/core/src/common/class.utils.ts
20.00% <0.00%> (-60.00%)
:arrow_down:

...query-graphql/src/interceptors/hook.interceptor.ts
36.84% <0.00%> (-57.90%)
:arrow_down:

...aphql/src/decorators/graphql-resolve-info.utils.ts
7.14% <0.00%> (-53.58%)
:arrow_down:

.../src/decorators/aggregate-query-param.decorator.ts
33.33% <0.00%> (-53.34%)
:arrow_down:

...query-graphql/src/decorators/objectId.decorator.ts
50.00% <0.00%> (-50.00%)
:arrow_down:

packages/core/src/providers.ts
41.66% <0.00%> (-41.67%)
:arrow_down:

... and 457 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

As I was implementing the withDeleted support in the look ahead feature I noticed that the many.withDeleted or even the withDeleted inside the ReadResolver are not implemented. Could you check that out to?
If this is implemented you would no longer need to do the below
@Query(() => AddressConnection)
async addressesWithDeleted(
  @Args() query: AddressQuery,
): Promise<ConnectionType<Address>> {
  return AddressConnection.createFromPromise(
    (query) => this.service.query(query, { withDeleted: true }),
    query,
    (filter) => this.service.count(filter, { withDeleted: true }),
  );
}

But could just do this:
withDeleted: true,                  // <- not implemented
one: { withDeleted: true },
many: { withDeleted: true }         // <- not implemented

After your changes are done I can/will finish the implementation for the withDeleted insde the look ahead, I think for that we are going to need to do the whole filtering of the deleted column ourself (same you are now doing for the relations). As currently, if you have enableLookAhead and withDeleted enabled it is still adding the IS NULL to the query for that relation (because the main FROM does not have withDeleted or does not use soft delete).

As I was implementing the withDeleted support in the look ahead feature I noticed that the many.withDeleted or even the withDeleted inside the ReadResolver are not implemented. Could you check that out to?
If this is implemented you would no longer need to do the below
@Query(() => AddressConnection)
async addressesWithDeleted(
  @Args() query: AddressQuery,
): Promise<ConnectionType<Address>> {
  return AddressConnection.createFromPromise(
    (query) => this.service.query(query, { withDeleted: true }),
    query,
    (filter) => this.service.count(filter, { withDeleted: true }),
  );
}

But could just do this:
withDeleted: true,                  // <- not implemented
one: { withDeleted: true },
many: { withDeleted: true }         // <- not implemented

After your changes are done I can/will finish the implementation for the withDeleted insde the look ahead, I think for that we are going to need to do the whole filtering of the deleted column ourself (same you are now doing for the relations). As currently, if you have enableLookAhead and withDeleted enabled it is still adding the IS NULL to the query for that relation (because the main FROM does not have withDeleted or does not use soft delete).

But wouldn't implementing this lead to always returning the deleted items in the generated queries (readOne... / readMany...)? That's one thing I wanted to avoid.

I wanted either a dedicated query for querying the deleted items, or some kind of variable (withDeleted: Boolean = false) in the generated read(One/Many)... queries. And the first option was the easiest to implement 😃.

Aah okay, yea then you can do this :)

I wanted either a dedicated query for querying the deleted items, or some kind of variable (withDeleted: Boolean = false) in the generated read(One/Many)... queries. And the first option was the easiest to implement 😃.

Aah okay, yea then you can do this :)

I'm a little bit confused on what to do now.

As I was implementing the withDeleted support in the look ahead feature I noticed that the many.withDeleted or even the withDeleted inside the ReadResolver are not implemented. Could you check that out to?

This is missing functionality, so imho this belongs to a different issue and has nothing to do with the features I implemented in this pull-request.
So only the test is missing (?)

So only the test is missing (?)

Correct!

So only the test is missing (?)

Correct!

Well, while trying to write some tests, I ran into a bug that I don't really know how to fix. I wanted to extend the existing e2e test and created a custom service for this:
import { InjectRepository } from '@nestjs/typeorm'
import { QueryService } from '@ptc-org/nestjs-query-core'
import { TypeOrmQueryService } from '@ptc-org/nestjs-query-typeorm'

import type { Repository } from 'typeorm'

import { TodoItemEntity } from './todo-item.entity'

@QueryService(TodoItemEntity)
export class TodoItemService extends TypeOrmQueryService<TodoItemEntity> {
  constructor(
    @InjectRepository(TodoItemEntity)
    repo: Repository<TodoItemEntity>
  ) {
    super(repo, { useSoftDelete: true })
  }
}

I also extended the custom resolver accordingly:
import { Args, Field, ID, InputType, Mutation, Query, Resolver } from '@nestjs/graphql'
import { Filter, InjectAssemblerQueryService } from '@ptc-org/nestjs-query-core'
import { ConnectionType, CRUDResolver } from '@ptc-org/nestjs-query-graphql'
import { TypeOrmQueryService } from '@ptc-org/nestjs-query-typeorm'

import { AuthGuard } from '../auth.guard'
import { TodoItemDTO } from './dto/todo-item.dto'
import { TodoItemInputDTO } from './dto/todo-item-input.dto'
import { TodoItemUpdateDTO } from './dto/todo-item-update.dto'
import { TodoItemAssembler } from './todo-item.assembler'
import { TodoItemConnection, TodoItemQuery } from './types'

const guards = [AuthGuard]

@InputType()
export class RestoreOneTodoItemInput {
  @Field(() => ID, {
    nullable: true,
    description: 'The id of the record to restore.'
  })
  id!: number
}

@Resolver(() => TodoItemDTO)
export class TodoItemResolver extends CRUDResolver(TodoItemDTO, {
  CreateDTOClass: TodoItemInputDTO,
  UpdateDTOClass: TodoItemUpdateDTO,
  enableAggregate: true,
  aggregate: { guards },
  create: { guards },
  update: { guards },
  delete: { guards }
}) {
  constructor(
    @InjectAssemblerQueryService(TodoItemAssembler)
    readonly service: TypeOrmQueryService<TodoItemDTO>
  ) {
    super(service)
  }

  // Set the return type to the TodoItemConnection
  @Query(() => TodoItemConnection)
  completedTodoItems(@Args() query: TodoItemQuery): Promise<ConnectionType<TodoItemDTO>> {
    // add the completed filter the user provided filter
    const filter: Filter<TodoItemDTO> = {
      ...query.filter,
      ...{ completed: { is: true } }
    }

    return TodoItemConnection.createFromPromise((q) => this.service.query(q), { ...query, ...{ filter } })
  }

  // Set the return type to the TodoItemConnection
  @Query(() => TodoItemConnection)
  uncompletedTodoItems(@Args() query: TodoItemQuery): Promise<ConnectionType<TodoItemDTO>> {
    // add the completed filter the user provided filter
    const filter: Filter<TodoItemDTO> = {
      ...query.filter,
      ...{ completed: { is: false } }
    }

    return TodoItemConnection.createFromPromise((q) => this.service.query(q), { ...query, ...{ filter } })
  }

  @Query(() => TodoItemConnection)
  async todoItemsWithDeleted(@Args() query: TodoItemQuery): Promise<ConnectionType<TodoItemDTO>> {
    return TodoItemConnection.createFromPromise(
      (q) => this.service.query(q, { withDeleted: true }),
      query,
      (q) => this.service.count(q, { withDeleted: true })
    )
  }

  @Mutation(() => TodoItemDTO)
  restoreOneTodoItem(
    @Args('input', { type: () => RestoreOneTodoItemInput })
    input: RestoreOneTodoItemInput
  ): Promise<TodoItemDTO> {
    return this.service.restoreOne(input.id)
  }
}

And adjusted the module:
import { Module } from '@nestjs/common'
import { NestjsQueryGraphQLModule } from '@ptc-org/nestjs-query-graphql'
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm'

import { TodoItemDTO } from './dto/todo-item.dto'
import { TodoItemInputDTO } from './dto/todo-item-input.dto'
import { TodoItemUpdateDTO } from './dto/todo-item-update.dto'
import { TodoItemAssembler } from './todo-item.assembler'
import { TodoItemEntity } from './todo-item.entity'
import { TodoItemResolver } from './todo-item.resolver'
import { TodoItemService } from './todo-item.service'

@Module({
  providers: [TodoItemResolver],

  imports: [
    NestjsQueryGraphQLModule.forFeature({
      services: [TodoItemService],
      imports: [NestjsQueryTypeOrmModule.forFeature([TodoItemEntity])],
      assemblers: [TodoItemAssembler],
      dtos: [
        {
          DTOClass: TodoItemDTO,
          CreateDTOClass: TodoItemInputDTO,
          UpdateDTOClass: TodoItemUpdateDTO
        }
      ]
    })
  ]
})
export class TodoItemModule {}

Everything compiles and starts as it should. But the curious thing is that in the AssemblerQueryService not my QueryService is injected, but a generic one that has { useSoftDelete: false }.
And I traced it down to the following behaviour:

in the module we call NestjsQueryGraphQLModule.forFeature and pass the assembler
in NestjsQueryGraphQLModule.forFeature (/nestjs-query/packages/query-graphql/src/module.ts) we call NestjsQueryGraphQLModule.getCoreModule, which calls NestjsQueryCoreModule.forFeature with the assemblers.
in NestjsQueryCoreModule.forFeature (nestjs-query/packages/core/src/module.ts) we call createServices
in createServices (nestjs-query/packages/core/src/providers.ts) we call createServiceProvider where we instantiate a new AssemblerQueryService with the getQueryServiceToken(EntityClass) inject and a factory-function
the entityService then passed to the AssemblerQueryService when the factory-function get's called is a generic TypeOrmQueryService with { useSoftDelete: false }

The following two things came to mind as I traced the flow.:

The AssemblerQueryService get's instantiated before my TodoItemService is tagged as injectable and registered in nestjs' cache (very unlikely)
The injectable of my custom TodoItemService get's overridden somewhere from nestjs-query (is this possible?).

I think you can just use @Inject(TodoItemAssembler) instead of @InjectAssemblerQueryService(TodoItemAssembler)

I think you can just use @Inject(TodoItemAssembler) instead of @InjectAssemblerQueryService(TodoItemAssembler)

Thank you, creating the AssemblerQueryService manually with my own service worked perfectly!

Test's should no longer fail with the latest commit, could you trigger the pipeline please? @TriPSs

Massive thanks for the PR! This is now released 🎉


feat: Add Tags property to Event in V1 & V2 swagger.

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit subject follows the Conventional Commits spec
[x] The commit message follows the EdgeX Contributor Guide
[ ] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[ ] make test has completed successfully

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Swagger not updated for recently add Tags property on Event
Issue Number: #2667
What is the new behavior?
V1 & V2 Swagger now updated for recently add Tags property on Event
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Are there any new imports or modules? If so, what are they used for and why?
No
Are there any specific instructions or things that should be known prior to reviewing?
Other information

recheck

recheck


Test Failure: Scene/Expression throws if regex constructor has invalid pattern

Windows 10 in Chrome 62.0

@ggetz, I think you're most familiar with this code?  Do you think you'll have time to take a look before the next release?  At least to make sure this isn't a bigger issue in styling.

@mramato Sure, I'll take a look shortly.


Add flag that allows you to easily search all subdirectories

Description

There may be situations where it is undesirable or unreasonable to individually specify all the directories you want to scan. This change adds the --include-all-subdirectories flag which will tell license scout to also look for dependency manager files in nested subdirectories of the configured directory.
In practice, you could run the following command in the root of a project repository and feel pretty confident that you have identified all of the dependencies of all of the software in that project.
license_scout --include-sub-directories

Related Issue

Addresses #208
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

[ ] I have read the CONTRIBUTING document.
[ ] I have run the pre-merge tests locally and they pass.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.
[ ] All commits have been signed-off for the Developer Certificate of Origin.

Just tested this out. Built the gem and installed it, then I did this:
git clone https://github.com/inspec/inspec
cd inspec
bundle install
mkdir some_sub_dir
mv ./habitat some_sub_dir
license_scout --include-sub-directories

This is currently failing with this error:
nell@nell-ThinkPad-P1:~/inspec$ license_scout --include-sub-directories
WARN: [cli] Could not find /home/nell/inspec/.license_scout.yml -- skipping
INFO: [collector] Found Gemfile and Gemfile.lock files in /home/nell/inspec
INFO: [collector] Found habitat/plan.sh file in /home/nell/inspec/some_sub_dir
INFO: [collector] Found plan.sh file in /home/nell/inspec/some_sub_dir/habitat
INFO: [collector] Collecting licenses for ruby dependencies found in /home/nell/inspec/Gemfile and Gemfile.lock files
INFO: [collector] Collecting licenses for habitat dependencies found in /home/nell/inspec/some_sub_dir/habitat/plan.sh file
Traceback (most recent call last):
        11: from /home/nell/.rbenv/versions/2.6.4/bin/license_scout:23:in `<main>'
        10: from /home/nell/.rbenv/versions/2.6.4/bin/license_scout:23:in `load'
         9: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/bin/license_scout:23:in `<top (required)>'
         8: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/lib/license_scout/cli.rb:120:in `run'
         7: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/lib/license_scout/collector.rb:35:in `collect'
         6: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/lib/license_scout/collector.rb:35:in `each'
         5: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/lib/license_scout/collector.rb:35:in `block in collect'
         4: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/lib/license_scout/collector.rb:52:in `collect_licenses_from'
         3: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/lib/license_scout/dependency_manager/habitat.rb:47:in `dependencies'
         2: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/license_scout-2.4.5/lib/license_scout/dependency_manager/habitat.rb:85:in `pkg_deps'
         1: from /home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/mixlib-shellout-2.4.4/lib/mixlib/shellout.rb:284:in `error!'
/home/nell/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/mixlib-shellout-2.4.4/lib/mixlib/shellout.rb:297:in `invalid!': Expected process to exit with [0], but received '1' (Mixlib::ShellOut::ShellCommandFailed)
---- Begin output of bash -ec 'export PLAN_CONTEXT="/home/nell/inspec/some_sub_dir/habitat"; source /home/nell/inspec/some_sub_dir/habitat/plan.sh; echo ${pkg_deps[*]}' ----
STDOUT:
STDERR: cat: /home/nell/inspec/some_sub_dir/habitat/../VERSION: No such file or directory
---- End output of bash -ec 'export PLAN_CONTEXT="/home/nell/inspec/some_sub_dir/habitat"; source /home/nell/inspec/some_sub_dir/habitat/plan.sh; echo ${pkg_deps[*]}' ----
Ran bash -ec 'export PLAN_CONTEXT="/home/nell/inspec/some_sub_dir/habitat"; source /home/nell/inspec/some_sub_dir/habitat/plan.sh; echo ${pkg_deps[*]}' returned 1

Digging into it a bit, but is there anything that looks obvious to you from that error output?

Nevermind! some_sub_dir needed a VERSION file in it. This works!


Make port reusable

Fixes #84

Can we have a test that ensures that we reuse the port?

Done.

Skipping the one comment as overkill.


on_off_light: Save ACLs and Fabrics to PSM

LGTM. A micro-optimization we can do later is for AclManager and FabricsManager to actually have each their own notification which they own. This way thy can raise the notification exactly when they are changed.
And then wait_changed() would be doing a select(acl_mgr.notification(), fabrics_mgr.notification).await.
BUT: Definitely for later, as it requires a lot of code re-shuffling (including changing of RefCel<AclMgr> as the notification cannot be inside the RefCell). Not worth it, for now.

@kedars Maybe you can merge this into sequential. My version of sequential I'll be PR-ing today or tmr against main will be rebased on top of matter-rs/sequential anyway.


Flagged harassment or assault words show up on LHN after user deletes a posted comment

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

Action Performed:

Send a message from account A to account B
Flag the comment from account B as Harassment or Assault
Observe the word is removed
Post a comment from account B
Delete the last comment

Expected Result:
The flagged word should not show up on LHN
Actual Result:
The flagged word shows up on LHN
Workaround:
Unknown
Platforms:

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

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

Version Number: 1.3.29-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/a67cdf79-96d3-4787-86cb-575a5396da67
Expensify/Expensify Issue URL:
Issue reported by:@Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686944316380929
View all open jobs on GitHub

asking about this here - https://expensify.slack.com/archives/C049HHMV9SM/p1687977137340509?thread_ts=1686944316.380929&cid=C049HHMV9SM

it sounds like this was already reported / it's expected behavior https://github.com/Expensify/App/issues/21413#issuecomment-1608149574


build(hiccup-carbon-icons) Support tests on Windows environments.

Fixes #188.

Thanks @gavinpc-mindgrub - I'm not a windows user, so am 100% ignorant of such things...

Yeah — legacy reasons.  I don't use Windows often, but when I do.... I have esoteric problems.


Enhancement: Add capability to use a DataFrame as a template for the target output.

Currently if the caller has a DataFrame structure that they are targeting then they need to ensure they match the names of the columns correctly and manually convert the Series types. If the output_columns or other parameter of the execute function took a DataFrame as a template then the output columns would match the data columns and each series can be delivered using astype conversion.
You will probably need something like a DictionaryError for the scenario where there is a column in the DataFrame template that is not in the data columns available.
There is also the option to be able to process compound column names from the DataFrame to map into a more structured DataFrame. This would involve having a join character e.g. _.

Going to close this issue for now. Hamilton now support more than creating dataframes, so supporting this feature probably doesn't make sense for now.


Replace all screen shots of "Intro to MVC" series with chrome

All three versions can share the same Chrome images.

But browser chrome looks noticeably different on Windows vs. Mac, e.g. close button upper right vs. upper left

Can I get buy with doing all the shots on Chrome/Mac? or Chrome/Windows? It won't be that big of a distraction and half the screenshots to update next version.

Yes, you can explain the reasons why you made that choice if someone comments about it.

we'll do this on the next update


Adds Second Tutorial For DevTools For Beginners Series

What's changed, or what was fixed?
See title.
Note: This pull request replaces #6491, as I messed up when creating the pull request branch. This one is error free.
Target Live Date: 2018-09-07

[ ] This has been reviewed and approved by (@kaycebasques)
[x] I have run npm test locally and all tests pass.
[x] I have added the appropriate type-something label.
[ ] I've staged the site and manually verified that my content displays correctly.

CC: @petele

Whoops!
There were 7 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/beginners/css.md#L813 - Common typo found: 'node' Should it be 'Node'?
src/content/en/tools/chrome-devtools/beginners/css.md#L164 - Common typo found: 'webpage' Should it be 'web page'? See: https://developers.google.com/style/word-list#web_page
src/content/en/tools/chrome-devtools/beginners/css.md#L477 - Common typo found: 'web site' Should it be 'website'? See: https://developers.google.com/style/word-list#website
src/content/en/tools/chrome-devtools/beginners/css.md#L485 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L526 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L838 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/imgs/finished.png - Unable to read file stats: ENOENT: no such file or directory, stat 'src/content/en/tools/chrome-devtools/beginners/imgs/finished.png'

Whoops!
There were 7 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/beginners/css.md#L813 - Common typo found: 'node' Should it be 'Node'?
src/content/en/tools/chrome-devtools/beginners/css.md#L164 - Common typo found: 'webpage' Should it be 'web page'? See: https://developers.google.com/style/word-list#web_page
src/content/en/tools/chrome-devtools/beginners/css.md#L477 - Common typo found: 'web site' Should it be 'website'? See: https://developers.google.com/style/word-list#website
src/content/en/tools/chrome-devtools/beginners/css.md#L485 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L526 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L838 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/imgs/finished.png - Unable to read file stats: ENOENT: no such file or directory, stat 'src/content/en/tools/chrome-devtools/beginners/imgs/finished.png'

Whoops!
There were 7 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/beginners/css.md#L813 - Common typo found: 'node' Should it be 'Node'?
src/content/en/tools/chrome-devtools/beginners/css.md#L164 - Common typo found: 'webpage' Should it be 'web page'? See: https://developers.google.com/style/word-list#web_page
src/content/en/tools/chrome-devtools/beginners/css.md#L477 - Common typo found: 'web site' Should it be 'website'? See: https://developers.google.com/style/word-list#website
src/content/en/tools/chrome-devtools/beginners/css.md#L485 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L526 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L838 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/imgs/finished.png - Unable to read file stats: ENOENT: no such file or directory, stat 'src/content/en/tools/chrome-devtools/beginners/imgs/finished.png'

Whoops!
There were 7 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/beginners/css.md#L813 - Common typo found: 'node' Should it be 'Node'?
src/content/en/tools/chrome-devtools/beginners/css.md#L164 - Common typo found: 'webpage' Should it be 'web page'? See: https://developers.google.com/style/word-list#web_page
src/content/en/tools/chrome-devtools/beginners/css.md#L477 - Common typo found: 'web site' Should it be 'website'? See: https://developers.google.com/style/word-list#website
src/content/en/tools/chrome-devtools/beginners/css.md#L485 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L526 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L838 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/imgs/finished.png - Unable to read file stats: ENOENT: no such file or directory, stat 'src/content/en/tools/chrome-devtools/beginners/imgs/finished.png'

Whoops!
There were 8 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/beginners/css.md#L813 - Common typo found: 'node' Should it be 'Node'?
src/content/en/tools/chrome-devtools/beginners/css.md#L164 - Common typo found: 'webpage' Should it be 'web page'? See: https://developers.google.com/style/word-list#web_page
src/content/en/tools/chrome-devtools/beginners/css.md#L477 - Common typo found: 'web site' Should it be 'website'? See: https://developers.google.com/style/word-list#website
src/content/en/tools/chrome-devtools/beginners/css.md#L4 - WF Tag 'wf_updated_on' must be within the last 7 days.
src/content/en/tools/chrome-devtools/beginners/css.md#L485 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L526 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L838 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/imgs/finished.png - Unable to read file stats: ENOENT: no such file or directory, stat 'src/content/en/tools/chrome-devtools/beginners/imgs/finished.png'

Whoops!
There were 58 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/beginners/css.md#L182 - Common typo found: 'webpage' Should it be 'web page'? See: https://developers.google.com/style/word-list#web_page
src/content/en/tools/chrome-devtools/beginners/css.md#L621 - Common typo found: 'web site' Should it be 'website'? See: https://developers.google.com/style/word-list#website
src/content/en/tools/chrome-devtools/beginners/css.md#L155 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L184 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L188 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L206 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L217 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L276 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L294 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L322 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L323 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L363 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L401 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L571 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L572 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L625 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L709 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L710 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L778 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L780 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/css.md#L782 - Line must be at most 100 characters
src/content/en/tools/chrome-devtools/beginners/html.md#L251 - '

:tada: This has been pushed live to https://developers.google.com/web/


Add a "Skip Break" option in case you are on a streak and decide to skip break

Hi @schmich, check out the pull request when you have some time here


Adding SBK parseargs case file

I added Negative tests for bookkeeper parseargs()

@sanjaynv  rebase to master.. there are conflicts .. resolve them

@sanjaynv please raise the issue and follow the format for pull request

@sanjaynv   please remove the unused variables

@sanjaynv please remove the unused  variables from the source code.


Section property not showing on version 2.x

Your environment

Terraform Provider Version: 2.1.0

Connect Server Version:

CLI Version: 2.29.0

OS: linux_amd64 (Terraform Cloud runner)

Terraform Version: 1.8.3
What happened?
The section field on a given item does not get pulled by the provider:
Logs using 2.1.0
...
Terraform will perform the following actions:

  # data.onepassword_item.cloudflare_zone_id will be read during apply
 <= data "onepassword_item" "cloudflare_zone_id" {
      + category   = (known after apply)
      + database   = (known after apply)
      + hostname   = (known after apply)
      + id         = (known after apply)
      + note_value = (sensitive value)
      + password   = (sensitive value)
      + port       = (known after apply)
      + tags       = (known after apply)
      + title      = "cloudflare_zone_id"
      + type       = (known after apply)
      + url        = (known after apply)
      + username   = (known after apply)
      + uuid       = (known after apply)
      + vault      = (known after apply)
    }
...

Logs using 1.4.3
...
Terraform will perform the following actions:

  # data.onepassword_item.cloudflare_zone_id will be read during apply
 <= data "onepassword_item" "cloudflare_zone_id" {
      + category   = (known after apply)
      + database   = (known after apply)
      + hostname   = (known after apply)
      + id         = (known after apply)
      + note_value = (sensitive value)
      + password   = (sensitive value)
      + port       = (known after apply)
      + section    = (known after apply)
      + tags       = (known after apply)
      + title      = "cloudflare_zone_id"
      + type       = (known after apply)
      + url        = (known after apply)
      + username   = (known after apply)
      + uuid       = (known after apply)
      + vault      = (known after apply)
    }
...
Changes to Outputs:
  ~ test = [
      - {
          - field = [
              - {
                  - id      = "hjbfafsv3cvq4m2kzqh3q3uq4q"
                  - label   = "text"
                  - purpose = ""
                  - type    = "STRING"
                  - value   = "some test"
                },
            ]
          - id    = "txgzmv35ep62s2jcz5gtbgcm6a"
          - label = "test"
        },

See the section property available when using version 1.4.3.
What did you expect to happen?
To have the section property available whilst using the latest version of the provider so that I can use its data.
Steps to reproduce
With a onepassword.tf file like so:
###
# NOTE: This is a workaround to have the `op` cli work in Terraform Cloud
# https://github.com/1Password/terraform-provider-onepassword/issues/141
###
resource "terraform_data" "install_op_cli" {
  input = timestamp()

  triggers_replace = [
    timestamp()
  ]

  provisioner "local-exec" {
    command = <<EOH
    ARCH="amd64"; \
    OP_VERSION="v$(curl https://app-updates.agilebits.com/check/1/0/CLI2/en/2.0.0/N -s | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')"; \
    curl -sSfo op.zip \
    https://cache.agilebits.com/dist/1P/op2/pkg/"$OP_VERSION"/op_linux_"$ARCH"_"$OP_VERSION".zip \
    && mkdir tools \
    && unzip -od tools op.zip \
    && rm op.zip \
    && chmod 0755 tools/op \
    && export PATH="$PATH:$(pwd)/tools" \
    && echo $PATH \
    && op --version
EOH
  }
}

data "onepassword_vault" "infra_global" {
  name = "${var.tags.purpose}-infra-global"

  depends_on = [
    terraform_data.install_op_cli
  ]
}

data "onepassword_item" "cloudflare_zone_id" {
  vault = data.onepassword_vault.infra_global.uuid
  title = "cloudflare_zone_id"

  depends_on = [
    terraform_data.install_op_cli
  ]
}

output "test" {
  value = data.onepassword_item.cloudflare_zone_id.section
}

Notes & Logs
I have mainly tried to fetch the sections from Password and Server items until I realized that the version of the provider I was using was simply not providing me with those fields.
I've tried to aim for something similar to this

I bet that this is the same root cause as #187

Is there any timeline for squashing this bug?


README could use a note to developers who want to contribute

Thing that would make getting started development:

how to setup a dev environment - virtualenv and such
how to build
how to test
criteria to submit a pull request.

Indeed. For setup/build/test we use tox. Nothing more to document. For a PR have an issue where the change is agreed, have tests and add changelog entry. That's all of it 👍

Seems no new interest was expressed so closing this for now.


Can you please add more city & states to the data? I have attached a list of it, all are lower case.

3187_city.json

Hey @panwar2001 Thanks for creating an issue, I'll take a look and revert with an update very soon.


Fall of the function such AWSSCV_vmx_kvs_to_s3 depending on the queue of the queue to be set

Hello,
We have implemented the AWSSCV-VoicemailExpress solution to create a voicemail in Salesforce Voice.
In general it is working fine [1], however we noticed that for certain queues set on the Amazon Connect flow it fails [2]. We have faithfully followed the steps of the provided guide and we do not understand the reason for the punctual failure.
Thanks.
[1] CorrectWork.txt
[2] Error log.txt

Does the queue that fails ALWAYS fail? Are there other queues that ALWAYS fail?

Yes, the queue seen in the log has failed every time. As well as two others.

I noticed this on the error
vm_lang: 'es-US',
The success had
vm_lang: 'es-ES',
Maybe try updating the es-US to es-Es for that contact flow

This is a resuklt


emit('end') when notModified()

i have an use case that need to know the SendStream is end all the time. Might add this feature? i can push a pull request

The end event is purposely only emitted when a stream is actually sent, so unfortunately no, we wouldn't accept this, as it would break a current feature.
If you want to know when the response is finished, you can listen to the finish event that res emits. Would that work? If not, can you describe your exact use-case you are trying to achieve?

Sorry, didn't mean to close.

yes, i know the end event's meaning for the stream. the response's finish event is effective, with just a longer event loop. and i was wondering whether the response will emit error after SendStream is end, so that the finish event on the resp will not be emitted.
so, for the general logic and consistency, if i listen the error event of SendStream, i should listen its corresponding end event too, not other's end event.
the use case is that:
i use fibers to make the request processing run in sequence/sync. while the send stream pipes, the fiber stack is waited and i need to resume it on error or end.
see the code

Ah. Sounds like if you use the on-finished module on res, it will handle all those cases you are looking to (just like we do in this module to ensure the file descriptor is cleaned up).

onFinished(resp, function () { fiber.resume(); }):

Should ensure the fiber is resumed in all cases, including errors.

The onFinished callback may give an error as the first argument as well, so probably want to handle that too :)

thanks, i will try it

BTW your module looks really neat :) Let me know if the on-finished module is not working or any other question and I can play around with your module if you need help porting middlewares or anything :)

thanks for your appreciate. yeah, my module is just simple, and i want to make the node-coding simple too.
i tried your advice, but i have to bind the end/error event to both send stream and response finally. now it's fine and safe, though might not clearly.
thanks all the same:)


Extend default configuration (STUPS)

Our current (Java) configuration looks like this
@Configuration
public class LoggingConfiguration {

    final Pattern pattern = Pattern.compile("(?:(\"(?:access_token|open_id|id_token)\")\\s*\\:\\s*)\".+?\"");
    @Bean
    public BodyObfuscator bodyObfuscator() {
        return ((contentType, body) -> pattern.matcher(body).replaceAll("$1\"XXX\""));
    }
}

Do we want to integrate this into put-it-to-rest?

Do we want to integrate this into put-it-to-rest?

We have a chicken-egg-problem, because we both auto configurations (RestClientAutoConfiguration and LogbookAutoConfiguration) depend on each other then: The one needs the interceptor the other needs the body obfuscator.

We should also look at the content type before we do something like that. Or can we even look at the URL? Is this for token generation or verification?


Web Interface Cannot Access After Docker Container Stop And Restart

My script file is as follows:
docker stop gogs
docker rm gogs
docker run \
    --name=gogs \
    --restart unless-stopped \
    -d \
    -p 10080:3000 \
    -v ~/work/gogs:/data  \
    gogs/gogs

After start the container, I fill the install page(use sqlite) and then login. Then I run the above script file again, the web page cannot access anymore.

the web page cannot access anymore.

I suppose your Docker container config is changed.

Close now but open for continuing discussion.


Now you don't need to add the item when BindMenuToItem is called

Fixes #91

Some context for when this comes handy:
Let's say that you are creating a menu with a ton of options (around 50). Imagine having to add those 50+ items once and bind them after. This simplifies the calls to AddItem by integrating them on BindMenuToItem.

Looks good, thanks!


Fix assignment problem when setting repeated default properties

Coverage decreased (-0.04%) to 86.691% when pulling d556d8489247542f3655256dddd51bcb616b79b2 on fix/defaultRepeated into 39a5ce07f02836a1a50623c3fe628667e701822d on dev.


libwebsockets: 3.1.0 -> 3.2.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/libwebsockets/versions.
meta.description for libwebsockets is: '"Light, portable C library for websockets"'.
meta.homepage for libwebsockets is: '"https://github.com/warmcat/libwebsockets"
Compare changes on GitHub

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 3.2.0 with grep in /nix/store/1fhbpxx8r99z2waznc71igidz9l4bgl0-libwebsockets-3.2.0

directory tree listing: https://gist.github.com/6a38d7cdda64dbb9e05f1849cd83c8e9

du listing: https://gist.github.com/ad4741929b7d7f0f00835fd9956b64cb

Rebuild report (if merged into master) (click to expand)

21 total rebuild path(s)
6 package rebuild(s)
6 x86_64-linux rebuild(s)
6 i686-linux rebuild(s)
5 x86_64-darwin rebuild(s)
4 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
collectd
collectd-data
haskellPackages.c-mosquitto
libwebsockets
mosquitto
ttyd

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/1fhbpxx8r99z2waznc71igidz9l4bgl0-libwebsockets-3.2.0 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A libwebsockets https://github.com/r-ryantm/nixpkgs/archive/82eb1fbee54907318ce91e41114b13fec9b14d9b.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/1fhbpxx8r99z2waznc71igidz9l4bgl0-libwebsockets-3.2.0
ls -la /nix/store/1fhbpxx8r99z2waznc71igidz9l4bgl0-libwebsockets-3.2.0/bin

Relevant issue #68588


April 3: adding new coding resources for review

Adding these coding resources:

codecademy - the link for this resource redirects to the limited time "Pro for free for students" page
codewars
Colt Steele's Code Camp
Flexbox Froggy
Flexbox Zombies
Grasshopper
Learn JavaScript
The Odin Project
WarriorJS
Wes Bos CSS Grid
Wes Bos JavaScript 30

Awesome! Thanks so much for this


Update MD file on new branch 2017-29-21_09-11-58

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestCon.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.