[Feature Request]: Adding solution for 82. Remove Duplicates from Sorted List II

Related Issue
Closes :- #637
Description
I have added the leetcode problem number 82 solution in different languages with proper description , example , intuition , approach , proper clean codes , time and space complexity with conclusion.
Type of PR

[ ] Bug fix
[x] Feature enhancement
[ ] Documentation update
[x] Other (specify): adding leetcode solution

Screenshots / Videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]
Checklist

[x] I have performed a self-review of my code.
[x] I have read and followed the Contribution Guidelines.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have commented my code, particularly in hard-to-understand areas.

Additional Context
[Include any additional information or context that might be helpful for reviewers.]
Resources for Guidance
Here are some resources that may be helpful as you contribute to CodeHarborHub:

Code Harbor Hub Community Features
Docusaurus Documentation
React.js Documentation
Markdown Guide
MDX Documentation
Mermaid Documentation

Resources for DSA Features on Our Site:

Tabs: Switch Languages
Line Numbering
Math Equations

@Ajay-Dhangar kindly review my pr and merge it if there is no issue.

@Ajay-Dhangar could you please review my pr and in case of no problems could you please merge it?


Fix setting CNVkit options in configuration

In #2402, an (undocumented by design) option was set to allow the use of
alternative segmentation methods by CNVkit. However, the logic of
extracting configuration was swapped, thus options were never set.
For a typical YAML:
resources:
  options:
    cnvkit_segment: [--drop-low-coverage, -m, hmm]

Before:
resources = config_utils.get_resources("cnvkit_segment", data["config"])
user_options = resources.get("options", [])

The first option would not pick up "cnvkit_segment", but only the
fallback inside get_resources, so user_options would always be
empty.
After:
resources = config_utils.get_resources("options", data["config"])
user_options = resources.get("cnvkit_segment", [])

And like this they are correctly set.

Hi Luca,
Thanks so much for finding and fixing this. It is incredibly helpful having folks contribute back like this, we really, really, really appreciate it. Thank you!


Add method runOnMainSync()

Currently, to call methods on the tested fragment we have to do:
try {
  fragmentTestRule.runOnUiThread(() -> fragmentRule.getFragment().showProgress());
} catch (Throwable throwable) {
  throwable.printStackTrace();
}

With this new method we cut all this to:
fragmentTestRule.runOnMainSync(fragment -> fragment.showProgress());

In addition to being more legible and straightforward, using runOnMainSync is preferable over runOnUiThread because it waits for completion. (See https://stackoverflow.com/a/19427987/4034572 for more on this.)
I've copied this idea from Novoda's ViewTestRule: https://github.com/novoda/spikes/blob/master/espresso-support/core/src/main/java/com/novoda/espresso/ViewTestRule.java#L30
I've spent some time trying to write a decent javadoc, but we can tweak it you want.

Sorry for the delay, I was at Japan (holidays 🎉!)
Right now you can do this:
@Test
public void testMethod() throws Throwable {
  fragmentTestRule.runOnUiThread(() -> fragmentRule.getFragment().showProgress());
}

Let it crash. JUnit knows how to handle it.
This method can be outside of this library scope... But it seems really handy so we can add it.

I just check this code: https://android.googlesource.com/platform/frameworks/testing/+/android-support-test/rules/src/main/java/android/support/test/rule/UiThreadTestRule.java#80
Right now runOnUiThread() is a sync call. So... this PR only provides an easy way to get the current Fragment.
Am I loosing something?

Right now runOnUiThread() is a sync call.

The StackOverflow answer I linked above is from 2013. The code has changed. It looks to me that runOnMainSync and runOnUiThread are equivalent now (runOnUiThread just calls runOnMainSync under the hood). I don't think that there is a difference anymore.
Anyway, it's a handy method that improves legibility and saves you from putting Throwable all over the place. Let me know if you want to add it to the library. If so, I'll address the points you raised about the javadoc. Otherwise just close the PR.

Yeah, it seems that Google change the behaviour. I'm going to close this PR because now it have not too much sense. But thanks for the contribution :)


support passing extra args to Timber::context()

Here's something I've had kicking around in my head for a while. :)
In Conifer, which we use on pretty much every WP site at SiteCrafting, we have the nice convenience of being able to pass extra data to Conifer\Site::context(), which delegates to Timber::context() and just adds this merging capability on top. It means that this code:
$data = Timber::context();
$data['extra'] = 'stuff';

Becomes:
$data = $site->context([ 'extra' => 'stuff' ]);

I usually err on the side of not expanding an API if you can help it, but this is extremely convenient and I've found it makes template code way more readable, especially when you have a lot of extra stuff you need to get into your view data from your template. It turns a bunch of separate, imperative operations and turns it into one data composition operation, which I think is closer to how folks tend to think about view data. So I think the extra readability is worth a tiny incremental expansion to the API. :)
This process is immutable, i.e. it doesn't affect the underlying context data in any way. So subsequent calls to ::context() without extra data will return whatever it did before.
The proposal here is to simply push this behavior down into Timber, so we can do:
$data = Timber::context([ 'extra' => 'stuff' ]);

Coverage increased (+1.1%) to 88.102% when pulling 951956f209863b4870f9e68c376e2e420bb58796 on feature/context-enhanced into d9ec0333ca0c81bf67ae3d4a3a0fff503e248bae on 2.x.

I think this works. Glad that it's based on a real use case versus "it would be cool if ...". Yes, it expands the API but it does so in a way consistent with how we've approached arguments and options elsewhere. @gchtr, what's your take?

I'd propose:
$context = Timber::context( [
	'posts' => new Timber::get_posts( [
	    'query' => [
	        'post_type'      => 'book',
	        'posts_per_page' => -1,
	        'post_status'    => 'publish',
	    ],
	],
] );

Timber::render( 'archive.twig', $context );

This way, $context refers to the entire context that gets passed to the view, rather than some intermediate/extra state, consistent with the mental model.

Should we treat this as advanced usage, or as the default usage?

This is pretty much the default in our usage of Conifer and I think it works well. I'm sure there are examples all over the docs, though, and I don't think it'd be too bad to circle back to those later.

Should Timber::context() be used at the start of the template, or towards the end? Is this question too subjective?

In my experience, there isn't much that typically needs to happen after you fetch the context, except in the most advanced use-cases. So at the end is usually cleaner because it fits the mental model of "okay, we need to do some business logic and then gather all the info and send it to the view."
BTW - note that there's no more query array in the new Posts API; ::get_posts() takes the query args directly. I've updated my previous comment accordingly.

Sounds good! I think I’ll update the usage examples.

BTW - note that there's no more query array in the new Posts API; ::get_posts() takes the query args directly. I've updated my previous comment accordingly.

Yeah, but it’s already updated with #2073. I constantly have to think about what’s already in #2073, so I think I should:

Resolve my outstanding documentation issues in #2073.
Merge #2073 into 2.x.
Make sure that this pull request has the proper documentation and then merge it in.

@gchtr cool, sounds like a plan. Thanks!
In the meantime, I'll go ahead and merge this.


Update packages

Jasmine had a major version bump and required a few minor changes in our booting code. Most notably, using pending in a describe block is no longer supported, so we can only return early there. On the positive side, the unit tests now run in a random order by default, which eliminates any dependencies between unit tests.
Note that upgrading to Webpack 4 is out of scope for this patch since the bots cannot work well with the newly generated bundles (both browsers on both bots do not react within 120 seconds). Webpack 4 is not faster for us than Webpack 3, so for now there is no need to upgrade.

/botio-linux preview

/botio test

/botio test

/botio-linux preview

/botio test

Most notably, using pending in a describe block is no longer supported, so we can only return early there.

In that case, I can't help wondering if the best solution wouldn't be to move those pending instances into each of the affected it blocks instead?
Obviously having to do that is a bit unfortunate, but I think it's conceptually the "right" solution since just returning doesn't provide a good indication that tests were skipped.

/botio-linux preview

/botio test

Firefox on Linux had an update, but there are no visual differences.
/botio-linux makeref


Cannot call method 'apply' of undefined

Just installed the package. After this simple line Meteor.publish("items"); i get the following error:
TypeError: Cannot call method 'apply' of undefined
at packages/matb33:collection-hooks/collection-hooks.js:220:1
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at [object Object]._handler (packages/matb33:collection-hooks/collection-hooks.js:219:1)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1599:1)
at [object Object]._.extend._runHandler (packages/ddp/livedata_server.js:943:1)
at [object Object]._.extend._startSubscription (packages/ddp/livedata_server.js:769:1)
at [object Object]._.extend.protocol_handlers.sub (packages/ddp/livedata_server.js:582:1)
at packages/ddp/livedata_server.js:546:1

Seems like func ( https://github.com/matb33/meteor-collection-hooks/blob/master/collection-hooks.js#L218 ) is undefined. I assume because the provided collection is empty, but not sure. Going to investigate and submit PR if I find something.

I don't think the second argument is optional: http://docs.meteor.com/#/basic/Meteor-publish

I see. One would assume the whole collection with a sensible limit. Thanks.

@reneras  Although the name of a Meteor.publish function correlates to a Collection a lot of the time, it's a first class citizen and can be used to publish documents from any data source, reactive or not. Meteor does a great job of hiding away the complexity of the DDP implementation when publishing a cursor, so it can get confusing at first.


[Thinkit] Test port breakout in sFlow mirror testfixure.Fix control switch port ids for mirror tests.

Key_word Check:
~/pins_upstream/sonic-buildimage/src/sonic-p4rt/sonic-pins/tests/sflow$ ~/tools/keyword_checks.sh .
Keyword check Passed.

Build result:
/sonic/src/sonic-p4rt/sonic-pins$ bazel build $BAZEL_BUILD_OPTS ...
INFO: Analyzed 645 targets (0 packages loaded, 0 targets configured).
INFO: Found 645 targets...
INFO: Elapsed time: 0.360s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action

Test result:
/sonic/src/sonic-p4rt/sonic-pins$ bazel test $BAZEL_BUILD_OPTS --cache_test_results=no ...
INFO: Analyzed 645 targets (0 packages loaded, 371 targets configured).
INFO: Found 430 targets and 216 test targets...
INFO: Elapsed time: 161.596s, Critical Path: 115.71s
INFO: 269 processes: 325 linux-sandbox, 18 local.
INFO: Build completed successfully, 269 total actions
//dvaas:port_id_map_test                                                 PASSED in 1.4s
//dvaas:test_run_validation_golden_test                                  PASSED in 0.1s
//dvaas:test_run_validation_test                                         PASSED in 0.9s
//tests/qos:gnmi_parsers_test                                            PASSED in 0.1s
//tests/qos:gnmi_parsers_test_runner                                     PASSED in 0.1s
//tests/sflow:sflow_util_test                                            PASSED in 7.2s
//thinkit:bazel_test_environment_test                                    PASSED in 1.2s
//thinkit:generic_testbed_test                                           PASSED in 2.0s
//thinkit:mock_control_device_test                                       PASSED in 0.8s
//thinkit:mock_generic_testbed_test                                      PASSED in 1.6s
//thinkit:mock_mirror_testbed_test                                       PASSED in 0.8s
//thinkit:mock_ssh_client_test                                           PASSED in 0.1s
//thinkit:mock_switch_test                                               PASSED in 1.4s
//thinkit:mock_test_environment_test                                     PASSED in 0.2s
//thinkit:switch_test                                                    PASSED in 1.7s
//sai_p4/instantiations/google/tests:p4_constraints_integration_test     PASSED in 1.3s
  Stats over 5 runs: max = 1.3s, min = 1.0s, avg = 1.2s, dev = 0.1s
//sai_p4/instantiations/google/test_tools:table_entry_generator_test     PASSED in 44.6s
  Stats over 50 runs: max = 44.6s, min = 1.2s, avg = 4.5s, dev = 10.2s

Executed 216 out of 216 tests: 215 tests pass.
INFO: Build completed successfully, 269 total actions

/azp run


Error

[17:51:32] [Server thread/CRITICAL]: Unhandled exception executing command 'spawnpet hero wither' in spawnpet: Return value of BlockHorizons\BlockPets\Loader::getPet() must be of the type string, null returned
[17:51:32] [Server thread/CRITICAL]: TypeError: "Return value of BlockHorizons\BlockPets\Loader::getPet() must be of the type string, null returned" (EXCEPTION) in "/BlockPets.phar/src/BlockHorizons/BlockPets/Loader" at line 197
[17:51:51] [Server thread/CRITICAL]: Unhandled exception executing command 'spawnpet Wol wolf' in spawnpet: Return value of BlockHorizons\BlockPets\Loader::getPet() must be of the type string, null returned
[17:51:51] [Server thread/CRITICAL]: TypeError: "Return value of BlockHorizons\BlockPets\Loader::getPet() must be of the type string, null returned" (EXCEPTION) in "/BlockPets.phar/src/BlockHorizons/BlockPets/Loader" at line 197

Hi, for some odd reason, typing the command without a dot in front of it does not work. Try ./spawnpet   [size] with the dot to use it working. I'm trying to find the issue.

Please check if the commit referenced above fixes your issue. If it does not, please let me know.

Looks like it still doesn't work. I don't get it.

I found the problem. you forgot to remove the "," ate the end of line 37 in CommandOverloads.php.
I removed it and tested it, and the bug is now resolved.

That should technically not even matter in PHP though... Maybe MCPE simply parses it strictly. If that is the case though, well done at fixing that. I'm pushing it in the next commit.

Sorry @Tieks but your solution doesn't make a difference. The command simply gives an error if executed without a dot.

It worked for my setup.

Could you please show the exact change you made and an image/video of it actually working?

I removed the comma in the blue mark. It solved the problem for me.
looks like this now.

@Tieks if you look at the latest versions you can see I changed that, but it didn't make a difference. You can try it out if you want.

It seems this is an MCPE issue, due to it ordering the commands weirdly. I'll see if I can find a workaround.

Support Tesseract Software ?

@StormCraftMCPE Heck no

Sadly I can't fix this. This is something in the hands of PocketMine, but dktapps is waiting for 1.2 as the commands will be completely thrown around the place and redesigned again. For now please use the command with a dot in front of the slash, and it should work just fine.


Does this still work?

Trying to get me the earlier One Piece Chapters in japanese and doesn't work so far.
First thing is, that it's missing a temp folder, which I added manually. After that it still crashes:
URL: https://mangareader.to/read/one-piece-colored-edition-55493/ja/volume-1
DevTools listening on ws://<IP_ADDRESS>:61160/devtools/browser/ed97e837-5229-4f46-b14d-c3e76f9171ef
[0425/115414.190:INFO:CONSOLE(1)] "JQMIGRATE: Migrate is installed, version 3.3.2", source: https://mangareader.to/js/app.min.js?v=2.1 (1)
[0425/115414.530:INFO:CONSOLE(7)] "Version: 1.0.0 - Time: 12:17:08, 21/4/2023 API", source: https://services.vlitag.com/adv1/?q=591701d038949ac7ff56b261301cad42 (7)
[0425/115414.917:INFO:CONSOLE(447)] "The function registerDeletion is not defined", source: https://assets.vlitag.com/plugins/cmptcf2/cmp-v2.0.1.js (447)
[0425/115414.923:INFO:CONSOLE(447)] "The function registerDeletion is not defined", source: https://assets.vlitag.com/plugins/cmptcf2/cmp-v2.0.1.js (447)
[0425/115414.966:INFO:CONSOLE(447)] "The function registerDeletion is not defined", source: https://assets.vlitag.com/plugins/cmptcf2/cmp-v2.0.1.js (447)
[0425/115415.645:INFO:CONSOLE(0)] "Fetch event handler is recognized as no-op. No-op fetch handler may bring overhead during navigation. Consider removing the handler if possible.", source:  (0)
Traceback (most recent call last):
File "main.py", line 57, in
horizon_button.click()
File "C:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webelement.py", line 94, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webelement.py", line 404, in _execute
return self._parent.execute(command, params)
File "C:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "C:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (400, 375). Other element would receive the click:
(Session info: headless chrome=112.0.5615.86)
Stacktrace:
Backtrace:
GetHandleVerifier [0x00895E23+53059]
(No symbol) [0x00824AF1]
(No symbol) [0x0071B388]
(No symbol) [0x007541D8]
(No symbol) [0x00751CA4]
(No symbol) [0x0074F3AB]
(No symbol) [0x0074DC58]
(No symbol) [0x00742DE7]
(No symbol) [0x0076A7CC]
(No symbol) [0x00742746]
(No symbol) [0x0076AB24]
(No symbol) [0x0078066F]
(No symbol) [0x0076A5C6]
(No symbol) [0x00740A2C]
(No symbol) [0x007420ED]
GetHandleVerifier [0x00AFD3CE+2573550]
GetHandleVerifier [0x00B33340+2794592]
GetHandleVerifier [0x00B2CF1C+2768956]
GetHandleVerifier [0x0092FA60+682880]
(No symbol) [0x0082EE22]
(No symbol) [0x0082A8B8]
(No symbol) [0x0082A99B]
(No symbol) [0x0081DB57]
BaseThreadInitThunk [0x76AF00F9+25]
RtlGetAppContainerNamedObjectPath [0x77537BBE+286]
RtlGetAppContainerNamedObjectPath [0x77537B8E+238]

Yes it still works, I didn't expect anyone to use it and didn't push through updates and specific instructions on how to use it. Ill push the updates now.
Also that is caused by the clicks getting intercepted by ads, I still miss the days when mangareader and zoro were both adfree lol.

It should work now.


Create char*[] from table?

Hi,
Sorry for the crap question. My C is weak and I've been away for a while. I can't seem to figure out a good way to re-create argv from my table? I've realized as I write this I'll need to dynamically allocate the array perhaps, but how do I get a char* from sol2? More details below.
I'm writing a C++ application for calling different versions of Lua (a wrapper lua.exe) and I want to parse out some of the main() parameters my application receives and pass a subset to a modified lua main(). I renamed to LUA_API mainL(int argc, char* argv[]). I'm trying to parse argv in Lua (called through sol2) and pass back a subset of the values.
int main(int argc, char* argv[]) {
	sol::state lua;
	// open some common libraries
	lua.open_libraries(sol::lib::base, sol::lib::string);
	lua.script("args={}");
	for(int i = 0; i < argc; i++){
		lua["args"][i] = argv[i];
	}
        //Creates a opts table that contains parameters and an opts.other table for
       // the parameters destined to mainL()
        lua.script(get_opts);
        int argc2 = lua["argc"];

//? How do I re-create argv from my table?
}

Any help would be grand.
Russ

std::vector<std::string> argv2_storage;
sol::table argv2_table = lua["args"];
for (const auto& kvp : argv2_table) {
     argv2.push_back(kvp.second.as<std::string>());
}
std::vector<const char*> argv2;
for (const std::string& str : argv2_storage) {
    argv2.push_back(str.c_str());
}
const char* argv2_pointers[] =argv2.data();

We extract into a vector of std::string.  I can assure you those rules are dumb, which is why I'm writing a paper to fix them. We do this in 2 steps because a .push_back(), if we do not know the size of the table before hand, can invalidate the array if we do not .reserve() enough space before-hand and gaurantee that .capacity() >= desired_size meaning that the pointers we get can potentially be moved.
Once that is done, we store it in an argv2 vector. We fill it with a for loop because I'm too lazy to use a std::accumulate/std::transform from <algorithm>, and it's readable.
Then, we finally get ourselves the array we want. Note that this is not an owning array: it only references the memory stored in the vector and is not a fresh copy.

Also, lua tables preserving ordering by counting from 1. So...
	for(int i = 0; i < argc; i++){
		lua["args"][i + 1] = argv[i];
	}

Minor fix.

Thanks so much. The following works for me. I tried to remove one of the loops by just using the std::vector<char*> but it didn't work (see the commented code).
int main(int argc, char* argv[]) {
	sol::state lua;
	// open some common libraries
	lua.open_libraries(sol::lib::base, sol::lib::string);
	lua.script("args={}");
	for(int i = 0; i < argc; i++){
		lua["args"][i] = argv[i];
	}
	//will need to run protected and get an error return value?
	lua.script(get_opts);

	int lua_argc = lua["argc"];
	//~ char * test = lua.script("return 'test'");
	std::cout << lua_argc << std::endl;
	sol::table lua_argv_table = lua["other"];
	std::vector<std::string> v_lua_argv_string;
	for (int i = 0; i < lua_argc; i++)
	{
		auto proxy = lua_argv_table[i];
		//~ Implicit conversion saves us here
		v_lua_argv_string.push_back(proxy);
		std::cout << proxy.get<std::string>() << std::endl;
	}
	std::vector<const char*> v_lua_argv_char;
	for (const std::string& str : v_lua_argv_string)
	{
		v_lua_argv_char.push_back(str.c_str());
	}

	//~ std::vector<const char*> v_lua_argv_char;
	//~ for (int i = 0; i < lua_argc; i++)
	//~ {

		//~ auto proxy = lua_argv_table[i];
		//~ v_lua_argv_char.push_back(proxy.get<std::string>().c_str());
		//~ std::cout <<"from proxy "<< proxy.get<std::string>().c_str() << std::endl;
	//~ }
	const char** lua_argv =v_lua_argv_char.data();

	for(int i=0; i < lua_argc; i++)
	{
		std::cout << "test: " << lua_argv[i] << std::endl;
	}
	std::string sho = lua["opts"]["version_string"];
	std::cout << "Where are we going? " << sho << std::endl;
	std::cout << "This concludes tonights script." << std::endl;
	system("pause");
	return 0;
};

Working output:
C:\Users\russh\projects\AllLuaJam> .\bin\dtlua.exe -53 -e -other --file c:\temp -o
4
C:\Users\russh\projects\AllLuaJam\bin\dtlua.exe
-e
-other
-o
test: C:\Users\russh\projects\AllLuaJam\bin\dtlua.exe
test: -e
test: -other
test: -o
Where are we going? 5.3\lua53.dll
This concludes tonights script.
Press any key to continue . . .

Output from code that doesn't work:
C:\Users\russh\projects\AllLuaJam> .\bin\dtlua.exe -53 -e -other --file c:\temp -o
Hello world
4
from proxy C:\Users\russh\projects\AllLuaJam\bin\dtlua.exe
from proxy -e
from proxy -other
from proxy -o
test: C:\Users\russh\projects\AllLuaJam\bin\dtlua.exe
test:
test:
test:
Where are we going? 5.3\lua53.dll
This concludes tonights script.
Press any key to continue . . .

Last but not least, the getopt-lua.hpp with the lua script:
char * get_opts =  R"V0G0N(
--START LUA
local sep = '\\'
local so_ext = '.dll'
opts = {}

opts.bits = 32
other = {}
argc = 0

local function check_version(version)
	--strip the dash and see if we can make a number
	-- if the number is between 51 and 54 (inclusive) then return it
	-- if the version is alread set, return an error
	local ver = tonumber(version:sub(2))
	local msg = nil
	if ver then
		if ver < 51 or ver > 54 then
			msg = ver.." is not a valid version"
			ver = nil
		end
	end
	if opts.version then
		msg = "Cannot set "..ver.." Already set to"..opts.version
		ver = nil
	end
	return ver, msg
end

local param = -1

for i,v in pairs(args) do
	local item = v:lower()
	local ver = v:match("-5%d")
	local err = nil
	if i == 0 then
		other[0] = v
	elseif ver then
		ver, err = check_version(ver)
		if ver then
			opts.version = ver
			opts.version_string = string.format("%.1f%slua%d%s",opts.version/10, sep, opts.version, so_ext)
		else
			opts.err = err
		end
	elseif item == "-x64" then
		opts.bits = 64
	elseif v == "-f" or v == "--file" then
		opts.config_file = args[i+1]
		param = i
	elseif param > -1 then
		param = -1
	else
		other[#other + 1] = item
	end
end

for i,v in pairs(other) do
	argc = argc+1
end

-- END LUA
)V0G0N";

Lua does not allow you to take const char* pointers out of it. Lua only has valid c strings when they're on the stack: when they leave Lua's stack, they are no longer valid pointers and can be moved / garbage collected / shifted around, invalidating the memory pointer.
This is why you cannot get a std::vector<char*>, and why it would fail for you.
Finally, getting a std::string in-place and then getting a c_str() to that makes no sense. You're creating a temporary thing that owns the data -- .get<std::string>() -- getting a pointer to its internal data as a null-terminated const char* -- .c_str() -- and the only save the pointer, not the actual value that holds, owns, and ultimately deletes the data when it does. And it does die; the moment that expression is over in your commented-out code, you just have a dangling pointer in your vector. I'm honestly surprised it didn't explode much, much quicker or just outright segfault.
Note there is a less-beautiful but simpler way to write this:
sol::as_table_t<std::vector<std::string>> serialized_argv2 = lua["argv"];
std::vector<const char*> argv2;
// notice .source on next line
for (const std::string& str : serialized_argv2.source) {
	argv2.push_back(str.c_str());
}

You can run scripts safely to get errors out of it using auto result = lua.safe_script(get_opts, sol::script_pass_on_error);. The sol::script_pass_on_error explicitly says to not throw, just pass the error through. You can inspect the return by looking at result.valid() and other things (it's just a protected_function_result usable in the same way as protected function returns -- http://sol2.readthedocs.io/en/latest/api/protected_function.html).

I apologize as my use of const and not-const is merely a typo: all of those things were supposed to be const and it does not change what I was trying to say.
My only contention is that your code would not work because it made references to temporary std::strings.
As for the rest of the code, I have no idea. I don't work with the Windows API closely. If you need to non-const your data, remove const everywhere and replace .c_str() with .data(), which in later versions of C++ allows you to get it non-const. If you're not working with a recent version of C++, you can use &str[0] to get a non-const  char*:
	sol::as_table_t<std::vector<std::string>> serialized_argv2 = lua["other"];
	std::vector<char*> argv2;
	for (std::string& str : serialized_argv2.source) {
		argv2.push_back(&str[0]);
	}

I will note that if you don't plan to modify the string's contents, then const is what you want since it will compile-time enforce that you're not making modifications. Just make sure you have const in all the right places to ensure that changes are never done to the underlying data (I think with a pointer to a pointer, there's room for 2 or 3 consts in there.


Fetch organization names

Feels like it relates to #376 too. We need a cache of things like this available to us for the UI.


Interval schedule should take start time from the request, should not…

Interval schedule should take start_time from the request, and should not set it to the current time of request execution.
Issue #1039
Description of changes:
When creating a Rollup with interval schedule defined, schedule.start_time will be assigned a value defined in the request. Before the fix  schedule.start_time was assigned current time of create Rollup request execution.
CheckList:

[x] Commits are signed per the DCO using --signoff

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

@ikibo seems one IT is broken, please take a look

Looks good! Thanks for making these changes @ikibo


Python: Cannot connect to remote Chroma DB

Describe the bug
The ChromaMemoryStore class uses an outdated method of connecting to a remote chroma DB, which does not work with any recently released version of ChromaDB
To Reproduce
Run the following Python code with the most current versions of semantic_kernel and chromadb that are available on pypi
from semantic_kernel.connectors.memory.chroma import ChromaMemoryStore
from chromadb.config import Settings
mem = ChromaMemoryStore(client_settings=Settings(chroma_api_impl="rest", chroma_server_host="xxx.xxx.xxx.xxx", chroma_server_http_port="8000"))

See the following error
Traceback (most recent call last):
File "", line 1, in
NameError: name 'Settings' is not defined

from chromadb.config import Settings
mem = ChromaMemoryStore(client_settings=Settings(chroma_api_impl="rest", chroma_server_host="xxx.xxx.xxx.xxx", chroma_server_http_port="8000"))
Traceback (most recent call last):
File "", line 1, in
File "/Users/snelson3/opt/anaconda3/lib/python3.9/site-packages/semantic_kernel/connectors/memory/chroma/chroma_memory_store.py", line 73, in init
self._client = chromadb.Client(self._client_settings)
File "/Users/snelson3/opt/anaconda3/lib/python3.9/site-packages/chromadb/init.py", line 143, in Client
api = system.instance(API)
File "/Users/snelson3/opt/anaconda3/lib/python3.9/site-packages/chromadb/config.py", line 259, in instance
fqn = self.settings.require(key)
File "/Users/snelson3/opt/anaconda3/lib/python3.9/site-packages/chromadb/config.py", line 171, in require
val = self[key]
File "/Users/snelson3/opt/anaconda3/lib/python3.9/site-packages/chromadb/config.py", line 180, in getitem
raise ValueError(LEGACY_ERROR)
ValueError: You are using a deprecated configuration of Chroma.

If you do not have data you wish to migrate, you only need to change how you construct
your Chroma client. Please see the "New Clients" section of https://docs.trychroma.com/migration.

If you do have data you wish to migrate, we have a migration tool you can use in order to
migrate your data to the new Chroma architecture.
Please pip install chroma-migrate and run chroma-migrate to migrate your data and then
change how you construct your Chroma client.
See https://docs.trychroma.com/migration for more information or join our discord at https://discord.gg/8g5FESbj for help!
Expected behavior
The connection to work
Platform

OS: Mac
IDE: NA
Language: Python
Source: pip package version semantic_kernel-0.3.13.dev0

Additional context
It looks like this PR may have been supposed to solve this issue? But it was closed in July and I still see the issue present in the master branch and the most recent Pypi release.

As a workaround, you can set the chroma_api_impl setting to "chromadb.api.fastapi.FastAPI"
from semantic_kernel.connectors.memory.chroma import ChromaMemoryStore
from chromadb.config import Settings
mem = ChromaMemoryStore(client_settings=Settings(chroma_api_impl="chromadb.api.fastapi.FastAPI", chroma_server_host="xxx.xxx.xxx.xxx", chroma_server_http_port="8000"))

Closing this issue as the related PR has been closed. If you continue to have problems, please re-open a new GitHub issue, thanks.


Implement OpenSearch?

Implement https://en.wikipedia.org/wiki/OpenSearch for the search?
Background: I'd like to add the search as search shortcut in the browser.
I understand if this is not possible due to Algolia, but I wanted to bring it up.

We can support OpenSearch through google custom site-search. Should be easy enough to add. If you feel like it - send a PR and I'll review it.

Closing this issue since we haven't heard anything back for quite some time. Feel free to create a new issue if this is something you would like to discuss further.


fix(hero-card-notification): fix link not clickable in notification

fix link not being clickable in the notification message, because of the overlay covering it
Description
Because of the overlay, the link in the notification message could not be interacted with. The solution was to add pointer-events: none;, transforming the overlay into a layer that should ignore / pass-through click-, tap-, scroll- and hover events.
Requirements
Screenshot:

Checklist:

[x] The commit messages follow the convention for this project
[ ] I have provided an adequate amount of test coverage
[ ] I have added the functionality to the test app
[ ] I have provided a story in storybook to document the changes
[ ] I have provided documentation in the notes section of the story
[ ] I have added any new public feature modules to public-api.ts

This appears to be a really odd way of adding a background color to an existing element 🤔 @owensgit @elenagarrone does anyone know why it was done this way?

This appears to be a really odd way of adding a background color to an existing element 🤔 @owensgit @elenagarrone does anyone know why it was done this way? surely the overlay should just wrap the content and have the correct background applied?

Another fix could be removing the overlay completely and adding some background style to the actual element.
I chose the pointer-events: none; as it was the least intrusive way of fixing this. :)

@AlexandruHoisan it seems even with pointer events, there would still be an accessibility issue anyway? Possibly, just moving the overlay after the content in the template would also work?

@AlexandruHoisan Ok, I can see this is probably to do with adding opacity to the overlay... but this can be achieved using rgba(0,0,0,0.1), maybe needs a calc/mixin to use the --hero-bg-alpha alongside the --hero-overlay-bg-color.

@AlexandruHoisan Ok, I can see this is probably to do with adding opacity to the overlay... but this can be achieved using rgba(0,0,0,0.1), maybe needs a calc/mixin to use the --hero-bg-alpha alongside the --hero-overlay-bg-color.
This should work I think: background-color: rgba(var(--hero-overlay-bg-color), var(--hero-bg-alpha));
Or, maybe it will need to be: background-color: #{'rgba(var(--hero-overlay-bg-color), rgba(var(--hero-bg-alpha))'};
Can't remember if SASS compilation will handle this or not?

@paul-request I agree with you that the overlay method is masking a questionable implementation so I removed the overlay completely and now we have this:

the --hero-overlay-bg-color is now rgba(0, 0, 0, var(--hero-bg-alpha)) from var(--color-black)
the overlay was removed completely from both lg-hero-card-notification and lg-hero-header and was added as bg color to the parent .
The overlay approach felt a bit hacky and I think these approach is more suited in this instance.


Add SequentialEvaluator

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (3d25165) to head (054eeee).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #194   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           66        67    +1
  Lines         1615      1635   +20
  Branches       164       165    +1
=========================================
+ Hits          1615      1635   +20

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


Support for API v2.21

This PR adds support for API v2.21
Changes

Changes apiVersion to "v2.21" in recurly.go
Adds ThreeDSecureActionResultTokenID string property to Billing struct
Adds ThreeDSecureActionTokenID string property to TransactionError struct
Updates README.md
Updates and adds unit tests

Notes

Recurly release notes
I'm not a 100% sure about the change in the TransactionError struct because it looks like the transaction errors documentation hasn't been fully updated yet

I can confirm that the TransactionError struct is implemented correctly. I tested the ThreeDSecureActionTokenID property with recurly's test cards.

@kmikiy Thanks for the contribution and for following up with verification of the TransactionError via request testing. Sorry for the delay here, I will take a look at this in the next 24h.

I have updated the unit test mock data. I replaced three_d_secure_action_token_id  with ABCDEFGHIJKL012345 in every test mock data and test assertion.

Thanks @kmikiy!


Make utils.get_app_revision_url(...) customizable

Currently it hardcodes https://code.google.com/p/swarming/source/detail?r=%s.

It should use whatever VIEW_VC is specified in codereview.settings of the repo
that hosts application code.

For example, 'gae.py upload' may extract this info and put into special *.py
file uploaded to the GAE. It can also put there other information relevant to
the build (like revisions of all DEPSed subrepositories, etc.).

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 12 Dec 2014 at 11:02

It's currently hardcoded in appengine/components/components/utils.py to 'https://github.com/luci/luci-py/commit/%s'. I'm not sure it's worth fixing.


build boost with ICU in hunter

Hello,how can i find a way to complie boost with ICU in hunter ,
hunter_add_package(Boost COMPONENTS locale )
how to send the BOOST_HAS_ICU and ICU_PATH params to b2.

There is no such feature at this moment as far as I know, feel free to work on it.
You would need to use approach similar to downloading ZLIB and BZip2:

https://github.com/ruslo/hunter/blob/v0.23.52/cmake/modules/hunter_boost_component_b2_args.cmake#L83
https://github.com/ruslo/hunter/blob/v0.23.52/cmake/modules/hunter_boost_component_b2_args.cmake#L110

It seems I can use some code , thank you.

I add these code in the hunter_boost_component_b2_args.cmake file,and it's works!
    hunter_add_package(ICU)
    find_package(ICU CONFIG REQUIRED)

    get_target_property(ICU_include ICU::uc INTERFACE_INCLUDE_DIRECTORIES)
    get_target_property(ICU_path ICU::uc IMPORTED_LOCATION_RELEASE)
    get_filename_component(ICU_dir ${ICU_path} DIRECTORY)
    get_filename_component(ICU_root ${ICU_dir} DIRECTORY)

    if(WIN32)
      list(APPEND myList "include=${ICU_include}" "-s" "ICU_PATH=${ICU_root}" "linkflags=/DYNAMICBASE Advapi32.lib")
    else()
      list(APPEND myList "include=${ICU_include}" "-s" "ICU_PATH=${ICU_root}")
    endif()

But still a small problem.ICU build by hunter on windows, lib's name is "icudata.lib" and "icui18n.lib".But boost's "has_icu_test.cpp" find "icudt.lib" and "icuin.lib", although they are the same library.
I don't know why this happened，maybe the unmatched version between icu and boost.
ICU from hunter is v55.1-p3
Boost from hunter is v1.68.0-p1

I don't know why this happened，maybe the unmatched version between icu and boost.

I don't know either, probably yes.

I found these words in the CMake source code file "FindICU.cmake"
# Note that on Windows ``data`` is named ``dt`` and ``i18n`` is named
# ``in``; any of the names may be used, and the appropriate
# platform-specific library name will be automatically selected.

It seems b2 select the wrong lib's name on windows.

Maybe Hunter builds ICU with consistent naming that Boost does not expect.
Did you work out if it is upstream bug in Boost or naming difference in ICU?

ICU library name should match standard ICU name. I think the problem is in Boost; I haven't opened any upstream issue though. Just for your info, there is work-in-progress branch wip.boost.regex.icu:

https://github.com/ruslo/hunter/commits/wip.boost.regex.icu

https://github.com/ruslo/hunter/blob/v0.23.214/README.rst


[Bazel CI] Build failure due to missing android_binary definition in override_targets BUILD file

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4156#019236d0-9877-49a9-bded-dc70b68e5231
Platform: Ubuntu
Logs:
ERROR: /var/lib/buildkite-agent/builds/bk-docker-9dtz/bazel-org-repo-root/rules_jvm_external/tests/integration/override_targets/BUILD:10:1: name 'android_binary' is not defined
ERROR: Skipping '//tests/integration/override_targets:override_targets': no such target '//tests/integration/override_targets:override_targets': target 'override_targets' not declared in package 'tests/integration/override_targets' defined by /var/lib/buildkite-agent/builds/bk-docker-9dtz/bazel-org-repo-root/rules_jvm_external/tests/integration/override_targets/BUILD
ERROR: no such target '//tests/integration/override_targets:override_targets': target 'override_targets' not declared in package 'tests/integration/override_targets' defined by /var/lib/buildkite-agent/builds/bk-docker-9dtz/bazel-org-repo-root/rules_jvm_external/tests/integration/override_targets/BUILD

Culprit:
Steps:
git clone https://github.com/bazelbuild/rules_jvm_external
git reset 2deeda518cf1ccb847c6e188bb3bf7d3f6fb7496  --hard
export USE_BAZEL_VERSION=dfba96d081091e1e17c4f2b9970e8f79fca1dce6
bazel test //tests/integration/override_targets:override_targets

CC Greenteam @mai93

This is from the overall effort to remove the android rules from bazel, the work to update rules_jvm_external to Starlark rules_android is here: https://github.com/bazel-contrib/rules_jvm_external/pull/1215

Closing as duplicate of https://github.com/bazel-contrib/rules_jvm_external/pull/1215


Uploading files to remote servers

Thanks for developing this great tool, which is much more helpful than the vanilla upload of dash.
I am trying to upload files from users's local machines to remote file hosting servers (e.g. s3). I think this would be a great feature to the du where we can bypass any server side processing and directly send the files from the frontend.
How I imagine this is

du is configurable so that it uploads to a URL instead of saving it server side
Server provides a callback to the client where for each file (ideally relative path to the users local selection root) a PUT URL is generated
User selects files (and folders)
For each selected file, the client requests the PUT URL from the server and PUTs to the file to the URL

A great example is here: https://dev.to/kitsunekyo/upload-to-aws-s3-directly-from-the-browser-js-aws-sdk-v3-1opk
It would be also great if the server callback can also accepts the type of the file and decides whether to reject it or generate the URL.
Further improvement would be to keep the hierarchy of the selected files while requesting URL, so that the structure is maintained in the remote file hosting servers.

Hi,
Thanks for the prompt response.

Hi @yigitsoy, nice to hear you like the tool!
About uploading directly to a remote file hosting server (e.g. S3): What you are suggesting sound extremely interesting and also useful for many people![1] Unfortunately I don't believe I will personally have time in near future implementing this, as I have no ongoing work or personal projects that are needing this functionality (or dash-uploader), and my free time is so limited. I'm mainly developing this for fun and as "weekend puzzles" when I don't have higher priority stuff going on.

No worries, I appreciate your contribution already. Looking into your description of how dash-uploader works and potential problems with chunks in the linked issue, this seems (at least to me) harder than what I imagined actually.

That being said, I would be really open to PR's trying to address this. If you want to try, the best way would be to continue on the dev branch (currently having version 0.7.0-a1), and read the CONTRIBUTING.md.

I will try to play around it myself first then, despite lacking frontend experience.

Ps. I did not read the mentioned dev.to article all the way, but would that support uploading large files as small chunks? What logic would be used to merge the chunks into a big files at the S3 side?

I though the aws sdk was handling the streaming of the file (probably in chunks?) to s3 directly and s3 server must be able to combine them. But I assume the sdk is taking the entire file blob and itself sending in chunks.

About server callback accepting the type of the file: Do you think this is still needed even if the upload component can (and will) filter by file type?[2]

Yeah, right, I missed that, that would be sufficient actually.

About keeping the hierarchy of the selected files: Yeah this might or might not be possible. See Issue 76. If it is possible, it will be implemented some day.

Yes, I know, just wanted to put into my wish list :)

[1] It would also help with integration with services like Heroku (Issue 16) [2] With filetypes argument of the du.Upload.


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/51820

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/55375

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/62132

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/77114


TensorBoard files gets deleted, Profiler returns 0 Millis for communication time!

Environment:

Python version [3.7.7]
Spark version [3.0.0]
TensorFlow version [2.3.0]
TensorFlowOnSpark version [2.2.2]
Cluster version [Standalone]

Describe the bug:
I have 2 issues regarding the TensorBoard when executing a training process of my model on 2 worker nodes:
1- The first one is that after the training process completed, the TensorBoard files get deleted immediately  on worker 1 while they are kept at worker 0 although I can use TensorBoard to check details while the training process is running.
2- I am trying to profile my model to check the details of consumed time for batches 3 to 5 while training the model in the Profiler page but I get 0 ms for communication time, more specifically the Device Collective Communication and Device to Device Time. However the Average Step Time gives reasonable values like 19368.9 ms!
From the Hosts drop-down list I can see that there is only one detected host in the cluster, not 2. Why does this happen?

Logs:
If applicable, add logs to help explain your problem.  Note: errors may not be fully described in the driver/console logs.  Make sure to check the executor logs for possible root causes.
Spark Submit Command Line:
spark-submit --master spark://master:7077 train_file.py --cluster_size 2 --epochs 1

When using the "built-in" TensorBoard server in TFoS (triggered by supplying tensorboard=True), the TB server is hosted in the "chief" worker, so it has the same lifecycle as the "chief" worker.  That is, it will be killed when the Spark job completes.  If you want visibility after the job completes, you can write the TB events to the shared/distributed filesystem and then spawn your own TB process pointing to this location.
This sounds like more of a question for the TensorFlow team since TFoS has nothing to do with these metrics.  Regardless, I'm assuming that your environment somehow isn't set up to capture this information.  For example, I'm guessing that "Device Collective Communication Time" is referring to something like NCCL, which you may not have (enabled) in your setup.

There are no GPUs in the cluster so that the worker nodes depend only on CPUs to process the data. As I understood from your answer, the Device Collective Communication time value is limited to GPU and NCCL. Isn't there any way to capture this value while using only the CPUs?


Moderator area

A new, moderator-only, area should be accessible for those with the right permissions.
Primary functionality will end up being:

review threads that were sent up for moderation, whether by the spam check plugins, or manually flagged.
review posts that were sent up for similar reasons
view warning logs
view moderator action logs

Though I'm open for discussion about whether this really should be separate from the "admin" panel.


Version 4.8.0

Checklist

[ ] npm test passes
[ ] tests and/or benchmarks are included
[ ] commit message follows commit guidelines

Description of change

Can you please bump it to 4.8.1?

Can you please bump it to 4.8.1?

@Blakko Ok. Didn't see a 4.8.1 release in their repo so resorted to 4.8.0.

Closing for #56


Align go version with version defined in go.mod

What this PR dose
Align go version in Test action with version defined in go.mod.
Why we need it
Keep same go version all the time.

Codecov Report

Merging #124 (8d180cc) into master (0378f94) will increase coverage by 0.03%.
The diff coverage is 21.42%.

@@            Coverage Diff            @@
##           master    #124      +/-   ##
=========================================
+ Coverage    5.34%   5.37%   +0.03%
=========================================
  Files          74      75       +1
  Lines       21072   21098      +26
=========================================
+ Hits         1126    1135       +9
- Misses      19873   19890      +17
  Partials       73      73

Flag
Coverage Δ

unittests
5.37% <21.42%> (+0.03%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/kapis/devops/v1alpha2/register.go
0.00% <0.00%> (ø)

pkg/models/devops/devops.go
11.86% <0.00%> (-0.03%)
:arrow_down:

pkg/apiserver/runtime/runtime.go
56.25% <100.00%> (ø)

Continue to review full report at Codecov.

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


Tab content is not loaded unless it is attached

Tested on master (bb7d054b68edcd1b3ec2044ca966fde2aed6965c)
Steps to reproduce

Create a tab with the property discarded: false, but provide a valid windowId

Actual
Tab receives the following events only:
app:web-contents-created
process:on-tab-created
tab:set-active true
process:add-new-contents

Expected
Tab's contents are loaded.

@bridiver on the single-webview2 branch, this is still the case. No events fire for the tab apart from the above, and no events fire for the remote subscription to the tabId until the tab is rendered with an actual webview. This is easily reproducible with https://github.com/petemill/muon-tab-playground against the muon single-webview2 branch, but also with this PoC single-webview2 on browser-laptop: https://github.com/brave/browser-laptop/compare/single-webview2...petemill:single-webview2?expand=1


Derive Ord and PartialOrd for NoteTag

Add Ord and PartialOrd derives to NoteTag so that we can use BTreeSetto check for duplicates efficiently.

Humm, it seems the branch was not rebased before the merge, and it include the commits from my PR. I'm reverting this merge since that PR should not have been merged.


[REPO] Update Milestones

(Enhancement)
Status
https://github.com/paritytech/substrate/milestones
Expected
Should be closed

https://github.com/paritytech/substrate/milestone/14
https://github.com/paritytech/substrate/milestone/35
https://github.com/paritytech/substrate/milestone/34

Should be moved to a "Project"

https://github.com/paritytech/substrate/milestone/8
https://github.com/paritytech/substrate/milestone/5

Steps to reproduce
No response

Yea we can probably close all of them?! Looks stale since two years.
At least: Polakdot v0.9.30, v0.9.31 and 2.x series.

3 are gone. The remaining 2:
Polkadot
20 Issues
https://github.com/paritytech/substrate/milestone/8
Suggestion here is:

either add a label Polkadot
or move to a Project dedicated to Polkadot

https://github.com/paritytech/substrate/projects

Ideas
104 Issues
https://github.com/paritytech/substrate/milestone/5

move to a Project, like "Low Priority"

(using "Milestones" to collect random issues was necessary in the past, but not anymore, now that github has the projects).
(if this stays as-is, just close the issue please, the obsolete milestones are gone, so its fine now for me)


Boolean properties and object spread don't work properly with functional stateless components

// @flow

type Props = {
  id: number,
  title: string,
  content: string,
  isTeaser?: boolean,
}

const Post = ({ id, title, content, isTeaser }: Props) => (
  <div>
    {console.log('isTeaser', isTeaser)}
  </div>
)

OK:
<Post isTeaser />

Error:
<Post {...post} isTeaser />

Workaround:
<Post {...post} isTeaser={true} />

Works fine in 0.44

Sorry! It is bug of WebStorm. May be.


Add accessibility labels to menus

note: PR was merged with Change Log file only. Changes are in https://github.com/oasisprotocol/oasis-wallet-web/pull/1790


Consumption tab

Description:
New tab for consumption, working on @sergio-ocon team for new chargeback.

More Information:
Taiga #79

@miq-bot add-label ui
@miq-bot add-label chargeback
@miq-bot add-label darga/no

@lpichler, @sergio-ocon, @dclarizio, @gtanzillo Can we merge this? We need the consumption tab.Thanks

Thanks @dclarizio  !!!

@aljesusg Could we substitute the image for another one? Just the text without the image would be great


Update Fails at SSH

Hello,
I've downloaded and added the remnux OVA to VirtualBox, but I can't seem to update it properly. I've tried numerous times this morning, and the updater keeps failing at SSH:
>> Running: ssh
Update returned exit code not zero
Error: Update returned exit code not zero
    at ChildProcess.<anonymous> (/snapshot/remnux-cli/remnux-cli.js:569:23)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

Here are my remnux-cli and remnux versions
><EMAIL_ADDRESS>> remnux-version: v2021.15.2

I'm never able to get to the v2022.28.1 version that remnux upgrade attempts to install.
I've tried redownloading remnux-cli, and used remnux upgrade numerous times. I've looked through other closed issues, but nothing I've tried seems to resolve this. Attached is my saltstack.log file.
saltstack.log
Thanks in advance.

@redsh1rt, looks like everything upgraded fine except one tool--PolarProxy. The issue was likely due to the PolarProxy taking too long to handle the download request.
Here are the relevant lines from saltstack.log:
comment: 'Failed to cache https://www.netresec.com/?download=PolarProxy: Error:
      HTTP 599: Connection closed reading /'

Don't worry and keep using your REMnux system. Consider running remnux upgrade again in a few days or week, and the PolarProxy upgrade will eventually succeed.


Fix Privacy Builders field datatype to Vector of String

According to mev-share specification builders are specified by their names which you can refer to on this page
https://github.com/flashbots/dowg/blob/main/builder-registrations.json

Hmmm looks like you are right, according to the specs builders, should be a Vec<String>...
But the confusing part is that it's a Vec<Address> everywhere:
mev-share-rs: https://github.com/paradigmxyz/mev-share-rs/blob/d998465221dade7bdd3009f422769da4686cb543/crates/mev-share-rpc-api/src/types.rs#L127
alloy: https://github.com/alloy-rs/alloy/blob/60cd429bd036c16f1e1f23ec7950689ad9819c76/crates/rpc-types-mev/src/common.rs#L59
reth: https://github.com/paradigmxyz/reth/blob/9542f3bcf081f1fd171071cfdd66c545306f5ce4/crates/rpc/rpc-types/src/mev.rs#L135
Anyway, I was planning to migrate RPC type to alloy ones (see #2), so I'm sorry to say I don't think I will merge this.
To conclude, I think it would be interesting to have this fixed in alloy. Do you mind open an issue? If you don't have time I will do it.

Oh, I see. Will be opening PRs to alloy, thanks for pointing out

Added PR to alloy https://github.com/alloy-rs/alloy/pull/983 and mev-share-rs https://github.com/paradigmxyz/mev-share-rs/pull/48
Reth seems to be migrating to alloy rpc-types-mev anyway https://github.com/paradigmxyz/reth/pull/9108


Implement property change detection for non-primitive values

When setting values to a widget, they always get pushed through the native bridge.
If for example I have an ImageView  and I .set({image: same_url_its_showing_already}), the image reloads which is quite heavy.
Most frameworks for web abstract having to handle this is with some implementation of a virtual DOM so that if you set a property of a widget to it’s currently active value (i.e. no state change), nothing gets propagated to the rendering layer.
Solution :
Change detection for primitive values exists, but only for event triggering, not for the native bridge.
We would like all updates to primitive values that don’t change the value ( exactly equal   ===  ) , not to propagate changes to the native bridge.
We would also like this to work with shortcuts:
.set({image: {src: same_url_its_showing_already}})
.set({image: same_url_its_showing_already})
Would do the same.
Also
.set({layoutData: {left: same_left_its_showing_already}})
.set({left: same_left_its_showing_already})
Would do the same.

Changed the title since this is not about a true virtual dom but only about improving property change detection to improve performance.


Change ServerListRefreshInterval and Hystrix timeoutInMilliseconds

Change ServerListRefreshInterval and Hystrix timeoutInMilliseconds.
Fix typo error within the README file

@cmoulliard: It looks good to me, but can you pleaase, tell us why are you tuning the refresh interval?
Does it have to do with the unit tests?

are you tuning

I have reduced the refreshTime to avoid that when the user will play with this scenario on Kubernetes/OpenShift platform he/she has to wait too long till the endpoints will be registered again after the pods were killed and to verify that the circuit breaker doesn't reply anymore with "Fallback" message

That's good enough for me.


Indexable with Range

Can these methods be moved to Indexible?  It would make other Indexible type classes behave more like Arrays.
https://github.com/crystal-lang/crystal/blob/master/src/array.cr#L573-L657

Duplicate of #7619.


proper reloading of services

Tried to reload tfgrid_solutions and theit failed on add_package call with  {"error": "Service with name threebot_deployer_auto_extend_pools already exists"}, luckily it reloaded the package but didn't mange to reload the service, but it should all work

Verified on latest development, packages reloaded successfully


vs-code-power-user : documentation editor case sensitivity issue with sync columns with database

Expected behavior
The documentation editor "synchronize columns with database" feature should correctly match field names regardless of case-sensitivity.
Actual behavior
The synchronize columns with database feature in the documentation editor seems to be case-sensitive and causes issues if an existing yaml document with lower-case field names is synchronized, the doc editor ignores the existing content (description) and adds the field as UPPER as if it were new.
Steps To Reproduce
create yaml model definition file with field and description
models:
  - name: int_table_subtotal
    description: subtotals
    columns:
      - name: myfield
        description: my awesome description

Use the documentation editor to edit this model.
When you re-sync the columns, the 'myfield' details will get wiped out and replaced with blank 'MYFIELD' column info.
Log output/Screenshots
No response
Operating System
windows 10
dbt version
core 1.5.4
dbt Adapter
snowflake 1.5.2
dbt Power User version
v0.17.9
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

This seemed to resolve the issue. Thank you


mktmpdir has inconsistent behavior

See: https://github.com/goreleaser/godownloader/issues/104
TMPDIR is a shared temporary directory (specified by POSIX); being unset should be mostly equivalent to TMPDIR=/tmp.  Many systems will set TMPDIR to a new temporary directory on each login; I have seen this on many GNU/Linux systems, and know that it is the default behavior on macOS.  Multiple programs share TMPDIR for the duration of that login.
If a program uses more than 1 temporary file, it is likely desirable to contain them in a per-program-invocation temporary subdirectory of TMPDIR.  In C, mkdtemp(3) (POSIX) is helpful for this purpose; in shell, the wrapper around that, mktemp -d (non-POSIX, but widely implemented) is helpful.  The program should remember to remove that subdirectory before it exits.
mktmpdir has wildly different behavior when TMPDIR is set compared to when it's not set:
mktmpdir() {
  test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
  mkdir -p "${TMPDIR}"
  echo "${TMPDIR}"
}

If TMPDIR is not already set: it is necessary to clean up the returned directory when the program is done; it has created a new temporary directory that would otherwise be leaked.
If TMPDIR is already set: it is impermissible to clean up the returned directory when the program is done; it returns the shared temporary directory, other programs may be using it, the user may not have permission to remove it.

I believe the intent of the mktmpdir author was that TMPDIR be a private "static" variable to make mktmpdir return the same value if you call it multiple times (let us call this property "idempotence".  However, that use conflicts with the use of TMPDIR as specified by POSIX.  Maybe it was just sloppy thinking.
Besides idempotency, mktmpdir also has the property that it handles TMPDIR being set to a directory that does not exist; a scenario that mktemp -d does not handle.
A correct implementation would look like:
If idempotency is not a desired property:
mktmpdir() {
  test -z "$TMPDIR" && mkdir -p "$TMPDIR"
  mktemp -d
}

If idempotency is a desired property:
mktmpdir() {
  test -z "$TMPDIR" && mkdir -p "$TMPDIR"
  test -n "$_shlib_tmpdir" || _shlib_tmpdir="$(mktemp -d)"
  echo "${_shlib_tmpdir}"
}

Is this still an issue? Seems as though the PRs have been merged

A workaround was merged in to godownloader, but no PR was ever submitted upstream here.  client9/shlib.git#branch=master still contains the original inconsistent behavior.

@LukeShu Can you link me to the fix in godownloader? Would love to backport a fix into shlib as well.

The fix in godownloader (https://github.com/goreleaser/godownloader/pull/105) was just "don't use mktmpdir".
In my opinion, both of the "correct implementations" I included in the issue body are "PR-worthy", but I'm not sure which behavior is desired.


Incorrect numbers on Amara's Wrath skill

shows 67% instead of 6.7%

@honeydrew I've overhauled all of the skills to make sure they are in line with the latest values. This issue can be closed.


Fix file handle leaks in Pinot Driver (apache#12263)

PinotDriver.connect() leaks the PinotClientTransport and PinotControllerTransport if an exception is thrown.
I added unit tests to test both a bad URL and a good URL that doesn't connect.
I performed manual tests of the closeResourceSafely method as it is a small private method.  I performed the test by debugging the code through that method and verify the two resource do indeed close if there is an exception thrown.

Codecov Report
Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (ab525ee) 61.72% compared to head (4aadab0) 0.00%.

Files
Patch %
Lines

...main/java/org/apache/pinot/client/PinotDriver.java
0.00%
16 Missing :warning:

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #12356       +/-   ##
=============================================
- Coverage     61.72%    0.00%   -61.73%
=============================================
  Files          2426     2350       -76
  Lines        132667   128933     -3734
  Branches      20499    19943      -556
=============================================
- Hits          81888        0    -81888
- Misses        44774   128933    +84159
+ Partials       6005        0     -6005

Flag
Coverage Δ

custom-integration1
?

integration
0.00% <0.00%> (-0.01%)
:arrow_down:

integration1
?

integration2
0.00% <0.00%> (ø)

java-11
?

java-21
0.00% <0.00%> (-61.59%)
:arrow_down:

skip-bytebuffers-false
0.00% <0.00%> (-61.72%)
:arrow_down:

skip-bytebuffers-true
?

temurin
0.00% <0.00%> (-61.73%)
:arrow_down:

unittests
?

unittests1
?

unittests2
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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


Cannot refresh access_token

I have a working app (Rails) that authenticates a user and saves her tokens in a Redis store.
If I've understood it correctly, using googleauth together with google-api-client, the client object will refresh the access token (by itself) as needed? This doesn't happen though, the token expires and some time after that I get a 403 error.
If the problem is on my side - can/should I invoke a new access_token manually, and if so how do I do that?
The code I've used is mainly taken from the quickstart guide.
def authorizer
  scope = Google::Apis::CalendarV3::AUTH_CALENDAR
  client_id = Google::Auth::ClientId.from_hash(JSON.parse(ENV['GOOGLE_CLIENT_SECRETS']))
  token_store = Google::Auth::Stores::RedisTokenStore.new(redis: $redis)
  authorizer = Google::Auth::WebUserAuthorizer.new(client_id, scope, token_store)
  authorizer
end

def authenticate_the_user
  user_id = "1"
  credentials = authorizer.get_credentials(user_id)
  redirect_to authorizer.get_authorization_url(login_hint: user_id, request: request, base_url: "http://localhost:3000")
end

def handle_callback
  credentials = authorizer.get_and_store_credentials_from_code(user_id: "1", code: params[:code], base_url: "http://localhost:3000/oauth2callback")
end

@hundsim Sorry for the long gap in communication. Is this issue still affecting you?

No worries. But cannot answer your question unfortunately, I moved on with another solution.


Is it possible to use your build on the R2C

I ordered a R2C and when compared to the R2S the difference is in the network chip.
I read something about a patch to get the YT8521S working.
Would it be possible to integrate the patch in the R2S build?

R2C will probably not work out of the box with R2S build, or miss network driver as you mention. However ImmortalWrt has support for it and this is from where I got most of the useful patches (uboot + linux kernel + drivers).
I will work on it, just be patient and I will update my repo to be able to build a R2C image. However I don't own a R2C so I will not be able to test it.

R2C will probably not work out of the box with R2S build, or miss network driver as you mention. However ImmortalWrt has support for it and this is from where I got most of the useful patches (uboot + linux kernel + drivers).
I will work on it, just be patient and I will update my repo to be able to build a R2C image. However I don't own a R2C so I will not be able to test it.

The fact you consider to do this is amazing:-)
I just ordered the device so i don't own the device yet. (Hope there will be more owners that are willing to test your builds. As I am not an internet expert haha)

I have generated some builds for R2C. Hopefully they work, let me know if you get some success.

I have generated some builds for R2C. Hopefully they work, let me know if you get some success.

My device is shipped as soon as I receive the r2c I will let you know 👍

Received the r2c .
Flashed full image with balena etcher attached only the lan side and powered up.
The device boots but askes for a password normally you don't have to fill anything in.
Only this time it wants a password so i stranded on the welkome screen for logging in.

This sounds strange to be asked for a password. ssh<EMAIL_ADDRESS>should not. Which image did you flash ? mini/full ? squashfs/ext4 ?
There might be something missing still but at least it seems that at least the bootloader is fine.

Flashed the full build ext4 version. Did a brief check of it booted then I had to go to work.
This was the first thing I ran into . I reflashed the card and when booted root wasn't sufficient to login. It states that I had the wrong password.

Is it possible to use the backup from my R4S for the R2C ?
Hope it is possible it makes switching between devices easier to test if the firmware works for the R2C 😄

For my own purpose I wrote a script based on uci commands over ssh and scp commands that recreates my router configuration from a clean image after boot. Using this I can switch seamlessly from R2S to R4S. So I think you can take most of the /etc/config files and others from /etc and this will work.

Tried to reset with the resetbutton holding it for 10 minutes.
But this did not work either keeps saying Invalid username and/or password! Please try again.

Just reflash the sdcard .... much faster. And try with squashfs

Just reflash the sdcard .... much faster. And try with squashfs

Flashed with squashfs same result password incorrect.
Wired to a different laptop same result incorrect username or password

Just reflash the sdcard .... much faster. And try with squashfs

The firmware i flashed is this one OpenWrt-AO-NanoPiR2C-full-21.02-20220412-squashfs.img.gz
Found out that the username is root and the password =password.
And the firmware image is friendlywrt when it is loaded haha was this intended?

There must be something wrong then, my build has nothing to do with FriendlyWrt. I could be ImmortalWrt if there was a mistake in the patches but FriendlyWrt is simply impossible. Flashing must have been gone wrong at some point. Did you previously flash FriendlyWrt on the card ?
Also can you try to boot without SD card just in case ? Might have a clue if it still boots without a card inserted.

I received the plus version with 8 GB off emmc haha I orderd the non plus🙃🙃🙃🙃😄😄😭😭

that was my guess. might need to check to boot from TF card always https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R2C_Plus#The_Boot_order_between_eMMC_and_SD_card or flash to eMMC

that was my guess. might need to check to boot from TF card always https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R2C_Plus#The_Boot_order_between_eMMC_and_SD_card or flash to eMMC

Is it possible to flash directly on the emmc?

Okay I messed up now the r2c does not boot anymore.
Any idea where the bootloader pins are located 😄

Okay got booting from the sdcard working.
But not very handy with shorting the mask pinns.
So i didnt destoyed the board but now i have short the mask pinns not very handy .
I booted to the image you compiled and that worked fine.
But i need to sort out how to boot from the emmc or permanently from sd.
Do you have any experience in how to do that?

from the doc it says that you should erase eMMC so it default boots to SD card with
dd if=/dev/zero of=/dev/mmcblk0 bs=8M count=1
just check if mmcblk0 is really the eMMC and not the SD card, because on my systems without eMMC the SD card is /dev/mmcblk0 so it might be /dev/mmcblk1 too

that was my guess. might need to check to boot from TF card always https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R2C_Plus#The_Boot_order_between_eMMC_and_SD_card or flash to eMMC

Is it possible to flash directly on the emmc?

Probably but I have no experience here! I would say you need to boot on a SD card to have a system ready, download the image on the device, and flash it with dd

Send a email to the support department off friendly. I have ask a proper instruction to or set a boot order with SD card first. Because shorting the pinns work but I have to remover the PCB out off its housing. Consider this the not so handy way. The other method does not work.
And ask how to flash your rom to the without bricking the device. It has something to do with the bootloader that is used from rockpi it has to be changed to a other one.
Will report back👍

@anaelorlinski have setup the r2c with friendlywrt and the IPv6 is working now. Did this to make sure IPv6 is working so it could be a setting or a bug.


GitHub label functionality

Context
The bot needs to respond to webhook events for PRs and add the corresponding labels to the PR.
Description
When opening a new PR, a webhook will fire to the endpoint specified in the wrangler.toml file, in turn, the bot will read the repo config and will add the labels to the PR the way that they are configured.
The functionality can be copied from the pre-existing Rust implementation: https://github.com/cloudflavor/oscar/blob/216190bd53d361de35f9f035adcd9b0c72bfbfc1/src/lib.rs
a rough sketch of the config is
Acceptance Criteria

The bot reacts to webhook PR events for github (open, reopen, update)
The bot reads the toml config in the root directory
The bot adds the labels defined in the config to the PR

ref: https://github.com/cloudflavor/oscar/pull/11


PowerToys Run startup lag

ℹ Computer information

PowerToys version: 0.31.2
PowerToy Utility: Run
Running PowerToys as Admin: No
Windows build number: [run "winver"]: 19042.804

📝 Provide detailed reproduction steps (if any)

PowerToys Run sometimes takes noticeable time to start after hitting Alt+Space (~1-1.5 sec).

✔ Expected result
PowerToys Run Box appears immediately every time it is called.
❌ Actual result
PowerToys Run Box appears with noticeable lag sometimes.

is this first time or every time it shows up?  What are the specs on your computer
This should be in memory so it should be instant.

@crutkas Specs are more than decent.
It happens from time to time, but I haven't yet determine the logic.

@torquerrr ssd?  wondering if we're trying to maybe do too deep of a search due to a symlink on your desktop


KA CHOW

Ka chow!
We will have another great project from Vel!!!
Thanks and hope this project goes well.
And happy new year!(I know it's too late, but I wanted to say it. I was too busy with my projects that have redux-pender in their package.json)
Remove this issue I only made to attract your eyes.(Sorry)
Regards,
webdev522.

Are you doing well Webdev?
I've never seen you on Live Coding season 3 !
By the way, I will do a live stream on 5.1 11PM (10PM for China), and share my experience on developing this project!
I am so sorry for not maintaining redux-pender :(
Try using react-query for new features! It is awesome.


Act 5 merc not available

How can I use Act 5 merc

What kind of problem do you have with it? (I never used it)

act 3 act 5 When using merc
player perceives the merc
when I start a new game, I want to resurrect a merce.
It seems that the mercenary's HP is not recognized.
In our short opinion
It didn't seem to recognize the Act 5 merc, so I checked with the Act 3 merc, but it was the same problem.
thank you for your interest in my post.


Is CommandHandler really an Entity?

Assuming that we ignore the state in equals() and hashCode(), and when passing 2nd generic parameter, we may need to revisit the inheritance.
If a command handler is only identified by a String and doesn't have a state, then it is not a Entity in our hierarchy, or we need to introduce VersionedEntity.

Per changes in #317  it is a CommandHandlingEntity. It is an entity with the ID which is presumably defined by its class name.


static predicates for Text and Geo

TP3 changed the syntax of the has() step between M8 and M9. In M8, there was has(key,bi-predicate,object) but in M9, there is only has(key,predicate).
So right now with the latest TP3 master and titan09, you have to do something like this:
g.V().has('name', new P(CONTAINS, 'jason'))

With this PR, you can do a has() query with a bi-predicate like this
g.V().has('name', textContains('jason'))

This PR is based on the statics found in here -- https://github.com/apache/incubator-tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/P.java
I'm not clear on what should happen with Cmp.java or Contain.java since they seem to have duplicate function of what P.java already has.

LGTM.  Sorry for the very long reply delay.  Can you please accept the Titan CLA (http://titan-cla.datastax.com/) before I merge?

Done! Thanks, Dan. Glad to see you back.

I'm not clear on what should happen with Cmp.java or Contain.java since they seem to have duplicate function of what P.java already has.

Good point. @dalaro? Will Titan still use the index if we use the TP3 standard predicates like P.eq instead of Cmp.EQUAL or P.within instead of Contain.WITHIN?

I just tried it out. At least I don't get an index warning. So it looks like we can get rid of Cmp and Contain altogether.

Cmp and Contain are used internally by Titan. However, Titan supports all the TP3 predicates and decomposes them into Cmp and Contain based on the query optimizer.
So, you can get "rid" of them in your query code but they will remain in the codebase.


Hover method of DropTarget spec being called constantly?

Is the hover method of the spec passed to DropTarget supposed to be called over and over while you're holding a dragged item on top of the target, even if you aren't moving your mouse? If so, is that a potential performance issue?

Closed since one of the examples in the docs mentions hover() { ... } will be called very often. Should be in the documentation of the method itself, but I'll make a PR.


Can't run tests with coverage

Hi.
I've just installed your module and tried to run tests with coverage.
But I've got the following error:
> grunt protractor_coverage
Running "protractor_coverage:files" (protractor_coverage) task
Warning: Unable to read "resources/saveCoverage.tmpl" file (Error code: ENOENT). Use --force to continue.

From the source I can see that it tries to open file "resources/saveCoverage.tmpl" using relative path:
var saveCoverageSource = grunt.file.read("resources/saveCoverage.tmpl");

Could you please help me with this issue?

Hi,
I am trying to run protractor coverage but i have got errors
D:\grunt-protractor-coverage>grunt test
Running "clean:tests" (clean) task

1 path cleaned.

Running "copy:instrument" (copy) task
Warning: Unable to write "instrumented/resources/app/angularjs" file (Error code
: EISDIR). Use --force to continue.
Aborted due to warnings.
Please help me to get out of this issue.
Thanks&Regards,
P.Gopala Rao.

@dmitry-dedukhin Through makeReport, I am getting a json file. But jenkins only accepts xml format of cobertua. How to did you use it Jenkins ??
Any help appreciated.


Version

Quick question. Does this work for 3.9

Quick answer: Yes.
Would of been quicker to install and test it out than to raise an issue.

Yes, I have travis-ci verifying that all tests pass on Python 3.9 on both macOS 11.3 (Big Sur) and Windows Server 2016 (although I kind of cheat on Windows by using a mock/patch since it's a headless server without any audio drivers...)


Fix Verify_Installers vmImage for Mac

I happened to notice the Mac jobs of Verify_Installers were actually running on ubuntu-latest.
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1787785&view=logs&j=ff4b8089-48d5-53de-a8b8-1b4437579a6d
The wrong variable was being set in the pool section, which doesn't matter for 1ES pools, but it was causing the default image to be used for the DevOps pool.
You may also want to add a step to verify the correct OS is being used, like https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/Verify-AgentOS.ps1.

Azure Dev CLI Install Instructions
Install scripts
MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484 --version '' --verbose

pwsh:
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484' -Version '' -Verbose

Windows
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484' -Version '' -Verbose;"

Standalone Binary

Linux - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/azd-linux-amd64.tar.gz
MacOS - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/azd-darwin-amd64.zip
Windows - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/484/azd-windows-amd64.zip

Container
docker run -it azdevcliextacr.azurecr.io/azure-dev:pr-484


Add CI

Context
template-application-flask still doesn't have CI. We want to add a ci-app.yml that runs the checks for the flask application. This CI should be able to be used on any project that uses the template.
See this github thread

@chouinar I saw you built the CI for WIC, was wondering if you could port it over to the template

The PR-run linting/code run should be easily copied over, that shouldn't require any change other than the name.
The deploy bit might be trickier to make generic as it hard-codes a lot of the account IDs and requires an AWS account - which might not be available. How would we want to handle those?

@chouinar yeah this ticket is just for CI. Deploy can be out of scope for now.


Ensure proper socket error handling when write controller abort fails

The way this was previously written, the errorHandler would correctly run if the readable contoller's cancel promise rejects, but not if the writable controller's abort promise rejects. This fixes that, since it does appear possible for the abort promise to reject, for example in WritableStreamDefaultWriter::abort.
Unless for some off chance we don't want errorHandler to be called if the readable contoller's cancel promise succeeds? If that's the case, I'm happy to close this.

I noticed this when looking into some The script will never generate a response. issues when running in edge preview on the new internal type I'm working on, although I doubt this is actually the cause -- I’m more suspicious about whether I need to add something similar to the handleProxyStatus method for that type after setting up the socket.

Please make sure to make a PR upstream to ensure all sockets tests pass before merging this into workerd.

Rebased onto main for the sake of the internal tests

Please make sure to make a PR upstream to ensure all sockets tests pass before merging this into workerd.

We have a label for that :-)
@a-robinson ... once this passes the internal CI, feel free to remove the label.

once this passes the internal CI, feel free to remove the label.

It already has :) Removed.


[stable/neo4j] Improve pod lifecycle

What this PR does / why we need it:
This PR started when we had a pod die on us with the following error:
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "hz._hzInstance_1_dev.IOBalancerThread"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "CustomProcedureStorage"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "neo4j.Scheduler-1"
java.lang.OutOfMemoryError: Java heap space
Exception in thread "hz._hzInstance_1_dev.cached.thread-3" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space

Unfortunately this does not kill the Java Process, so it doesn't change the way K8s sees the pod.
To improve upon this I've made 2 additions:

Add a livenessProbe, basically every query every so often to see if this core is available. A leader election can take a maximum of 7 seconds. The wget waits 10 seconds for an answer, and as such I set K8s to wait 11 seconds, to make sure we have no overlaps.

After then seeing the pod being killed I dug a little deeper to find a better way to fix the OOM issue, and after I re-read the message I noticed the keyword here is 'uncaught'
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "hz._hzInstance_1_dev.IOBalancerThread"

Since no-once captures this when this exception gets thrown I found that we can basically stop the JVM when we run out of memory, and that's the second addition:

Add JAVA_TOOL_OPTIONS with -XX:+ExitOnOutOfMemoryError

While this negates the need for the livenessProbe in this particular case, I still believe it is useful for other cases.
Special notes for your reviewer:
@mneedham your input would be greatly appreciated.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Title of the PR starts with chart name (e.g. [stable/mychartname])

/assign @viglesiasce

The ideas in this PR are good, but it should be closed. At the head of the repo, these features are already included by other means.
Exit on out of memory is here: https://github.com/helm/charts/blob/master/stable/neo4j/templates/core-configmap.yaml#L21
And liveness/readiness probes are here: https://github.com/helm/charts/blob/master/stable/neo4j/templates/core-statefulset.yaml#L89

/close


Document that GraalVM support is on 5.0.0-alpha.2 and later.

From https://github.com/square/okhttp/issues/6704

@swankjesse requesting post review, doc only.


Suggested refactorings.

Thanks Oliver for reviewing and refactoring suggestions.
Applied most of the suggestions and left few as it is for demonstration purposes.

Leaving PagedResult inside common.models to demonstrate OPEN module exposes everything inside the module including sub-packages.
Leaving RabbitMQConfig inside config package, it's more of a personal preference :-)


List subdirectories

In order to navigate (potentially broad) directory hierarchies in buckets, it would be useful to be able to list the sub-directories in a bucket at a given prefix. Happy to attempt to implement such a method if someone points me in the correct direction. Seems like perhaps a new Iterator?

@samskillman How about
from gcloud import storage
bucket = storage.Bucket(...)
blob_iter = bucket.list_blobs(max_results=..., prefix=..., delimiter=...)

I think I wasn't completely clear in the description above. Let's say I have a bucket structure like this:
gs://root_bucket/
    A/blob1
    A/blob2
    B/blob3
    B/blob4

Is there a way to use the list_blobs (or anything else) to return the first level of subdirectory names ["gs://root_bucket/A/", "gs://root_bucket/B/"] rather than all the blobs?  This would have the same behavior as gsutil ls gs://root_bucket. Perhaps I don't understand how delimiter and prefix can be used to accomplish this.

Being more specific, shouldn't this work:
from gcloud import storage
bucket = storage.Bucket(...)
blob_iter = bucket.list_blobs(delimiter='/')

to get the top level?
And to list subdirectories inside A:
from gcloud import storage
bucket = storage.Bucket(...)
blob_iter = bucket.list_blobs(delimiter='/', prefix='A/')

?

@jgeewax That is what I had tried originally, but I get empty lists in both cases. From what I can tell in test_bucket.py on line 291, the test actually asserts that the list of blobs is [], so maybe this is an actual bug?

Huh, but I can do:
iterator = bucket.list_blobs(delimiter="/")
response = bucket.get_next_page_response()
dirs = iterator.prefixes

(Got that hint from regression/storage.py)

The docs are a bit clarifying: https://cloud.google.com/storage/docs/json_api/v1/objects/list
If you want "just the stuff immediately in the directory A/", this translates to "Give me the stuff that starts with A/ but doesn't have any other / characters in the name, which you do with:
from gcloud import storage
bucket = storage.Bucket(...)
blob_iter = bucket.list_blobs(delimiter='/', prefix='A/')

This will return all stuff that starts with A/ however in the rest of the name, there can't be another /. So A/foo.txt would come back in the list, but A/sub/foo.txt would not come back.

@jgeewax that would list only the files, right? Then to get the directories I'd have to do what I wrote up above, is that right? How about a bucket.list_prefixes method like this:
def list_prefixes(self, prefix=None):
    iterator = self.list_blobs(delimiter='/', prefix=prefix)
    list(iterator)  # Necessary to populate iterator.prefixes
    for p in iterator.prefixes:
        yield p

I think, effectively, what that's doing is going through the list of blobs in the bucket, and collecting all the prefixes. So yes, that should work -- probably just as well as collecting the prefixes from the list of blobs yourself.
If we were going to add a list_prefixes method, it would be tricky. I can't find a way to get "just the top-level list of directories"...

@Capstan : What would I do to get the list of all blobs that are "directories" in the root of the bucket? I thought prefix='/', delimiter='/' would work, but it seems to (true to form) just return the non-directory items (ie, "give me everything starting with / that has no other /s in the name"). What i want is "give me everything starting with / that has exactly one more / in the name" (I think...)

@samskillman @jgeewax The list(iterator) will page through results and [sets] prefixes every time a new HTTP request is issued. This means that the value iterator.prefixes may not be comprehensive for the entire result set, just for the last request issued.

@jgeewax @dhermes has it right. FWIW, we don't enforce a preceeding '/' at all, and many objects don't start with that character.

Given that the separator character is optional, and user defined, we can't really provide a lot of help for this usecase in the library.  As @dhermes points out, we could change the iterator such that its prefixes attribute is cumulative across all requested pages:  that seems like a reasonable choice.
If we made that change,  I imagine that the most reasonable way to accomplish the goal is to write a helper function which "piped the items to /dev/null" and then extracted the relevant prefixes.  E.g.:
def extract_prefixes(bucket, prefix=None, delimiter='/'):
    iterator = bucket.list_blobs(prefix=prefix, delimiter=delimiter):
    map(lambda x: None, iterator)
    return iterator.prefixes

:+1: to that idea, I don't think it belongs in gcloud-python though. However yes, I can see the logic for making prefixes cumulative.

@tseaver I think it'd be worthwhile to at least have a protected attribute on the Iterator called _current_prefixes just to make the distinction from the set() that is self.prefixes. Worth making it public?

@samskillman I am going to implement the cumulative prefixes for the iterator, but likely nothing else.
Do you have an issue with us closing out this issue after that?

Very basic operation in other cloud providers folders = bucket.list("","/"), using Google Cloud it is too complex to need to have function with several lines of code:
def extract_prefixes(bucket, prefix=None, delimiter='/'):
    """Function Option A."""
    iterator = bucket.list_blobs(delimiter="/")
    response = iterator.get_next_page_response()
    blobs = list(iterator.get_items_from_response(response))
    dirs = iterator.prefixes
    return dirs

def list_prefixes(self, prefix=None):
    """Function Option B."""
    iterator = self.list_blobs(delimiter='/', prefix=prefix)
    list(iterator)  # Necessary to populate iterator.prefixes
    for p in iterator.prefixes:
        yield p

We understand that you don't want to upset the old users that are use to this, but for new users this looks bad quality API.

Other Google APIs outside the gcloud-python are managing better delimiter='/', an example: https://cloud.google.com/storage/docs/json_api/v1/objects/list#try-it

@dhermes @tseaver
https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/storage/google/cloud/storage/bucket.py#L331
The prefixes is set to be empty. How can I extract prefixed?

Nvm. I found how to use it by searching in your test files.
I had to say I am disappointed to the library. It is far from complete.

We've now seen a couple different people agreeing that this is a shortcoming against other libraries. Maybe it's time to explore fixing this? @dhermes

As iterator.get_next_page_response is hidden nowadays, you can use the following code:
def get_prefixes(self, bucket):
    iterator = bucket.list_blobs(delimiter="/")
    response = iterator._get_next_page_response()
    return response['prefixes']

@JorritPosthuma Thanks! To make sure I get all the prefixes, even for large buckets, and using the "public" API, I wrote the following:
    # from https://github.com/GoogleCloudPlatform/google-cloud-python/issues/920
    iterator = bucket.list_blobs(prefix=prefix, delimiter='/', max_results=5)
    prefixes = set()
    for page in iterator.pages:
        print page, page.prefixes
        prefixes.update(page.prefixes)
    return prefixes

@evanj I like your code, but have a strong feeling that it x times slower than gsutil ls specially for buckets with a lot of files deep in the three. Are there some options to optimize the Python code or is better to do system call of gsutil ls for speed up the listing of sub-folders?

It should be making a very similar API calls. I suspect if you know the bucket is large, you could attempt to list files using multiple API calls in parallel, by splitting the file name space. I've never had to do such a thing. Good luck!

ya, i 'm trying to write a web interface so that some images can be hand checked. I have ~3500 groups (subfolders) and each has 10,000 images (so 35,000,000 blobs). I need to select a random sample from each group as it would be next to impossible to hand check them all. I can't loop over all the the blobs just to get the prefixes every page load. Groups a added and removed constantly hence I'd like the bucket to be the single source of truth. I guess GCS is not great for BIG DATA :(

@whillas I'm doing something similar; but I use Firestore as the "directory structure" if you will, and only keep the actual image assets in GCS. The firestore queries can be made to be very fast, then you have the GCS URLs right there.

The code from @evanj works wonders! Here is a version for python3 and using the client directly since bucket.list_blobs is deprecated:
def list_gcs_directories(client, bucket, prefix):
    # from https://github.com/GoogleCloudPlatform/google-cloud-python/issues/920
    iterator = client.list_blobs(bucket, prefix=prefix, delimiter='/')
    prefixes = set()
    for page in iterator.pages:
        print (page, page.prefixes)
        prefixes.update(page.prefixes)
    return prefixes

I agree with comments above. Not being able to list top level directories and files for a given prefix is really annoying. This is not big data at all :).
We are currently stuck because we cannot properly list files from Google Storage......
And the best part here :

If you use gsutil command, this is possible
GCP storage interface console is able to do it.

As I guess both gsutil and Console are using an API, why don't you open functionality ????
Plus, if you propose to index files in some database, I think this is a very bad idea and design. You have to maintain DB and filesystem synchronized... Which always leads to errors with time and high volumes.....


Clarify producer span relationships and add a messaging example for a batch publishing scenario

Fixes open-telemetry/opentelemetry-specification#1466
Changes
Based on recent changes from #284, this adds a messaging example illustrating a batch-publishing scenario involving "Publish" and "Create" spans.
Merge requirement checklist

[x] CONTRIBUTING.md guidelines followed.
[ ] CHANGELOG.md updated for non-trivial changes.
[ ] schema-next.yaml updated with changes to existing conventions.

@pyohannes I think we should be good to merge this right? Can you please move the changelog changes to the new file-based one?

@pyohannes I think we should be good to merge this right? Can you please move the changelog changes to the new file-based one?

Done. This should be good to merge.

Can we close the discussions, or you are still waiting for resolution on those? Merge is blocked by them now.


Correct  premature ending of sqlite transaction

In populateSpatialSalienceTable(), only a single sqlite transaction is manually started, to cover output for all turns. In line with that, the manual ending of the transaction should occur after all turn output is completed, not after each turn's output.

good catch