node @type not being found, node_modules excluded

I'm having an issue where moduleId: module.id in a component is throwing a "cannot find name 'module'" error.  It looks like this is handled by the node typings.  Looking at my tsconfig.json, the exclude property with the value of "node_modules/*" seems to be to blame.  If I pull that out, the node_modules directory is traversed, and @types/node is discovered as it should be.
So.. why is this being excluded?  Presumably because we don't want to traverse ALL of the modules when all we really want is types?  There used to be a typeRoots property in tsconfig.json that looked like it would maybe add the @types directory as an exception to the exclude, but it's been removed for some reason.  I tried adding it back but it didn't seem to provide an exception as I had hoped.
At the moment, removing the node_modules exclude value fixes my issue, but makes compilation take forever.  What's the actual solution here?

Adding this:
/// <reference<EMAIL_ADDRESS>/>

to the top of my app module fixes my issue, but this is old typescript syntax I feel like I really shouldn't be using.  There should be a tsconfig.json way to resolve this, but the "exclude" setting seems to override most of my options there.

Something else is wrong with your setup. You definitely do not ... and should not ... make the changes you've described.
The node type information should be coming from the npm installation of node.d.ts which you should see in node_modules/@types/node ... and obviously you do have that ^^^
The exclude option is present because the see takes pains to exclude compilation any AoT-specific files.
You never want the TS compiler to compile anything in node_modules.
The TS compiler normally excludes node_modules by default. But once you start excluding anything you have to exclude everything explicitly, including  node_modules. Not doing so is why "_compilation take forever. _"
Excluding AoT files isn't necessary in a seed and I'm going to remove it which means I'll be removing the entire exclude clause.
I'm compiling just fine.
I'm guessing you some how are compiling with an old version of TypeScript or npm or something in your environment that I can't see.
I can assure you that this seed works when installed cleanly. You'll just have to keep looking for what's different in your world. Sorry.
p.s.: Here's what my package versions look like today:
> npm list --depth=0
<EMAIL_ADDRESS>C:\github\DELETEME
+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>

Hm, I'll keep pokin at it then.  I actually started the angular quickstart tutorial last week and then it was updated halfway through, so I'm kind of straddling worlds here.  I updated the various json and config files and I feel like I've got everything up to date, but this is really the first weird issue I'm finding.
A couple things I am doing differently, though:

I'm using atom-typescript to compile instead of the tsc command-line watch, the IDE assistance is invaluable and I think I was double-building everything before, so I just run lite-server and let atom do what it does
I've set a custom "outDir" since building all the js and map files in my working app directory was proving to be an indecipherable mess (this is something I'd like to see changed in this repo actually).  Though this isn't ideal, since my template files aren't automatically moved from app to dist like my typescript output is.  I'll need a more robust build process here in the future, to be sure.

When I try to run tsc on the command line, I actually get a whole separate set of errors, like thirty separate errors in<EMAIL_ADDRESS>complaining mainly about modifiers.  So there may indeed be something weird with my setup that I don't entirely understand.
If nothing here jumps out at you, I suppose it'd be best to just stash my app directory and rebuild the environment from scratch.

I think you had best start over.  Most of use VS Code which makes it easy to hide the generated .js and .js.map files ... no mess.  Not sure how to do that in your atom editor.
We will likely start having a build directory soon but only after we have tooling to make it easier. You don't want to manually deal with the fact that "my template files aren't automatically moved from app to dist like my typescript output is" (same problem with your component CSS files).
Without that tooling, we're keeping our current structure.
I'll bet your problems stem from moving stuff around. Good luck.


All date are disabled when specifying the min date

The _d field of the options.minDate get manipulated in the generateYears() function. I guess .clone need to be used if minDate and maxDate are specified.

+1, I'm having the same issue.

As a fix, change lines 227 and 228(first two lines of function DatePickerComponent.prototype.generateYears) in file node_modules/ng2-datepicker/lib-dist/ng2-datepicker.component.js, to
    var date = (this.minDate ? this.minDate.clone() : null) || Moment().year(Moment().year() - 40);
    var toDate = (this.maxDate ? this.maxDate.clone() : null) || Moment().year(Moment().year() + 40);

Please be aware that these changes you do gets reverted as soon as you update your libraries.``

Thanks you saved my Day!
I saw a Pull Request for the generateYears function
https://github.com/jkuri/ng2-datepicker/pull/201
Is this trying to fix the same problem? Hope that this gets merged then

Sure it is.

Hi , when can we expect this fix to get merged.

please merge this solution  to be in the node modules package

As a fix, change lines 227 and 228(first two lines of function DatePickerComponent.prototype.generateYears) in file node_modules/ng2-datepicker/lib-dist/ng2-datepicker.component.js, to
    var date = (this.minDate ? this.minDate.clone() : null) || Moment().year(Moment().year() - 40);
    var toDate = (this.maxDate ? this.maxDate.clone() : null) || Moment().year(Moment().year() + 40);

Please be aware that these changes you do gets reverted as soon as you update your libraries.``

Thank you @Mr-D-Projects  very much


Add Lion to new channels

When addclasschans is ran, Lion should add him self in the list of perms so that we can remove his admin privileges.
Currently, without admin privileges it cannot see messages in class channels.

Would be pretty easy for someone new to do

Why is this necessary

Why is this necessary

Right now it has to have admin perms to see the channels, which means we can't take away certain perms. Namely, pinging everyone

Lol did you reas joey’s blog? Okay I guess.

Actually Curtis mentioned it early today, and I was like yeah we probably should. Promptly forgot, then yeah I stumbled on his blog and it reminded me about it 😂

Hack lion to run a job that gives itself perms in every channel. Then you can revoke admin if you really want. I don’t think you should though

Hack lion to run a job that gives itself perms in every channel. Then you can revoke admin if you really want. I don’t think you should though

Any reason not to? Just curious

It’s effort

fair


FreeRTOS+TCP /multi /IPv6 : FreeRTOS_IP.c

Description
The purpose of this PR is to get the sources reviewed. Please do not used them for any project.
FreeRTOS_IP.c is now compatible with multiple interfaces and IPv6.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Since FreeRTOS-Plus-TCP has become a separate module, the development of FreeRTOS+TCP with multiple interfaces and IPv6, will be moved to that repo.
Closing this PR now.


Marvin: change some vlans in test_data.py

Description
This PR fixes the test failures with test_nic.py in some trillian tests.
see errors below:
test_01_nic (tests.smoke.test_nic.TestNic): DEBUG: Exception during NIC test SETUP!: Execute cmd: createnetwork failed, due to: errorCode: 431, errorText:The VLAN tag to use for new guest network, 1201 is already being used for dynamic vlan allocation for the guest network in zone pr5201-t2497-vmware-70u1

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale

[ ] Major
[ ] Minor

Bug Severity

[ ] BLOCKER
[ ] Critical
[ ] Major
[ ] Minor
[x] Trivial

Screenshots (if appropriate):
How Has This Been Tested?

@nvazquez could you please review it ?

@blueorangutan package

@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_multiplication_x: debian :heavy_check_mark: suse15. SL-JID 1647

@blueorangutan package

@blueorangutan package

@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_multiplication_x: suse15. SL-JID 1650

@blueorangutan package

@blueorangutan package

@blueorangutan package

cc @davidjumani @nvazquez @sureshanaparti @weizhouapache pl check why BO isn't picking requests?

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan help

@davidjumani I understand these words: "help", "hello", "thanks", "package", "test"
Test command usage: test [mgmt os] [hypervisor] [keepEnv]
Mgmt OS options: ['centos7', 'centos6', 'alma8', 'ubuntu18', 'suse15', 'ubuntu20', 'rocky8', 'centos8']
Hypervisor options: ['kvm-centos6', 'kvm-centos7', 'kvm-centos8', 'kvm-rocky8', 'kvm-alma8', 'kvm-ubuntu18', 'kvm-ubuntu20', 'kvm-suse15', 'vmware-55u3', 'vmware-60u2', 'vmware-65u2', 'vmware-67u3', 'vmware-70u1', 'xenserver-65sp1', 'xenserver-71', 'xenserver-74', 'xcpng74', 'xcpng76', 'xcpng80', 'xcpng81', 'xcpng82']
Note: when keepEnv is passed, you need to specify mgmt server os and hypervisor or use the matrix command.
Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'nvazquez', 'PaulAngus', 'borisstoyanov', 'DaanHoogland', 'shwstppr', 'andrijapanicsb', 'Spaceman1984', 'Pearl1594', 'davidjumani', 'harikrishna-patnala', 'vladimirpetrov', 'sureshanaparti', 'weizhouapache', 'NuxRo']

@blueorangutan hello

hello @davidjumani

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1653

@blueorangutan test matrix

@nvazquez a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

Trillian test result (tid-2507)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30822 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5645-t2507-xenserver-71.zip
Smoke tests completed. 91 look OK, 0 have errors
Only failed tests results shown below:

Test
Result
Time (s)
Test File

Trillian test result (tid-2508)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30726 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5645-t2508-kvm-centos7.zip
Smoke tests completed. 91 look OK, 0 have errors
Only failed tests results shown below:

Test
Result
Time (s)
Test File

Trillian test result (tid-2509)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34355 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5645-t2509-vmware-65u2.zip
Smoke tests completed. 91 look OK, 0 have errors
Only failed tests results shown below:

Test
Result
Time (s)
Test File


Empty page after v0.39.0 (svelte 5)

Instead of login buttons, I see empty page. In network tab everything loads successfully and no log in console. So unable to give much helpful information. I tried latest svelte 5 version and the one from peer dependencies. Both result in empty pages.
The page loads fine with version 0.38.4 (and previous ones), still using svelte 5 for my project.
// Svelte component at `/admin`
<script lang="ts">
	import { onMount } from 'svelte';
	import { get_config } from './config';
	import type { CMS } from 'decap-cms-core';

	onMount(async () => {
		// @ts-expect-error sveltia/cms doesn't have types yet. So using decap-cms-core types.
		let cms: CMS = (await import('@sveltia/cms')).default;
		// Initialize the CMS object
		cms.init({
			config: get_config(origin)
		});
	});
</script>

Thanks for all the amazing work!

Will check. I thought Sveltia CMS had the same issue as https://github.com/decaporg/decap-cms/issues/7223 due to Svelte’s hydration, but this issue is probably different 🤔

Fixed in v0.39.17 🙇🏼


Installation instructions not clear

Hi,
That may be related to issue #64 but what does Add extra camera accessories in Home app. The setup code is the same as homebridge. mean?
Thanks.

This means you need to pair with the camera separately. In Home app, click the add button on the upper right, select Add Accessory, then select the camera here to add it to home.

Thanks a lot. That was not very clear to me.
I'll do it as soon as I can and report back here.
Thanks again.

Err... I'm not sure what else I can do to make it more clear, any suggestion?

May be by adding something like (with the + button on the upper right corner).
But, if I'm the only one complaining about that then you should not worry about it ;)


Font family bug when selecting a font with a space in the name

Description
https://www.loom.com/share/395dda79065842868321417b0b106d38
As you can see, if I choose a font family that has a space in the name (Arial Black for example), in the source code, the name is surrounded by quote entities, once saved in the database (what you see in green) an reused exactly the same in the textarea, trumbowyg gets confused and generates some random attributes and does not display the font family correctly.
OS: Windows 10
Browser: Google Chrome 74.0.3729.169
Trumbowyg: 2.18.0
How to reproduce?
https://jsfiddle.net/mikevoid101/8jcasL6r/4/

Will be fixed in 2.19.0


To perfect the webview

Add more configurations, such as:
setUseWideViewPort
setLoadWithOverviewMode
setBuiltInZoomControls
setSupportZoom
setDomStorageEnabled
setJavaScriptCanOpenWindowsAutomatically
setSupportMultipleWindows
setAllowFileAccess
setAppCacheEnabled
setAllowFileAccessFromFileURLs
setAllowUniversalAccessFromFileURLs
setMixedContentMode
setDisplayZoomControls

Can you please elaborate what you want?

This doesn't seems to be web-related, but specifically WebView.

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of ' flutter doctor -v'  please.
All system setups can be slightly different so its always better to open new issues and reference related issues.


Svelte 3.x support?

Describe the feature in detail (code, mocks, or screenshots encouraged)
Hey guys, love your work, and everything you do!
Would it be possible to support Svelte 3.x, i'm assuming it's not as simple as downgrading svelte in package.json?
I have a few svelte projects, and some of them are still on 3.x, and can't upgrade to 4 yet.
What type of pull request would this be?
None
Provide relevant links or additional information.
No response

We aren't planning to support 2 major versions back, we just don't have the resources to support to maintain multiple majors.


samples: sockets: http_get: Include Host: header in request

The Host header is even mandatory in HTTP 1.1, and indeed without
it, many virtual hosting setups don't work (which are many), so to
be faithful to what README says: "You can edit the source code to
issue a request to any other site on the Internet", let's
complicate the sample by including it.
Signed-off-by: Paul Sokolovsky<EMAIL_ADDRESS>

Codecov Report

Merging #6239 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #6239   +/-   ##
=======================================
  Coverage   52.92%   52.92%
=======================================
  Files         414      414
  Lines       40370    40370
  Branches     7809     7809
=======================================
  Hits        21366    21366
  Misses      15787    15787
  Partials     3217     3217

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 078259d...ed2f591. Read the comment docs.


Added query to ignore services with external billing systems.

Pull request for issue #75

This change is

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


How/where to get extension's Public Key for use in Chrome Extension?

How or where do you get the extension's public key for the manifest?
https://github.com/firebase/quickstart-js/tree/master/auth/chromextension

Instructions for getting the public key are found at the end of the "Creating a dummy Chrome extension (how to obtain a Chrome App ID and Public Key)" section.

@jhuleatt , am not able to find a way to get extension's public key on the google extensions developer portal. Can you help me with that? thanks

Finally, after breaking my head for a day, I realised I was on the new dashboard. The more info is not available on the new dashboard yet. Switch back to old dashboard and you will find it there.

Hi @ashking, I have the same problem here. I am new to this. How do you switch to the old dashboard?
I can not find the public key.

Annoying.. isn't it?
on the bottom left you can see this
[image: image.png]
Click on show more and then click on Opt-out
[image: image.png]
Hope this helps!
Ashwin
On Tue, Jul 28, 2020 at 8:54 AM Fernão Guerra<EMAIL_ADDRESS>wrote:

Hi @ashking https://github.com/ashking, I have the same problem here. I
am new to this. How do you switch to the old dashboard?
I can not find the public key.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-js/issues/376#issuecomment-664753744,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AASWHDLE27UD7TTPATM5FDTR5ZAHBANCNFSM4I62DMAQ
.

Thanks @ashking. @jhuleatt This took me a couple of hours of googling before I finally found that the new dashboard doesn't have a way of accessing the public ID. I'm not sure of the correct channels but perhaps you could run this up the flagpole as it's a major issue right now.

Hey @wallawe, I'll ask around internally to see if there is a way to set up Oauth apps in the new dashboard. Thanks @ashking for the workaround!

I am unable to find the public ID and it seems now there is no way to "opt-out". I am using chrome://extensions in the URL, any ideas?

Still can't find the public key via https://chrome.google.com/webstore/devconsole/
no idea how to revert to old UI

@TrySpace These Chrome Web Store docs explain where to find the public key --> Keep a consistent id

Don't know if this helps, but use inspect element for a page on your extension, and type this:
chrome.runtime.getManifest().key


Get Request without Content-Type Header returns 415 Unsupported Media Type

This error occurs for Versions greater than 3.0
Steps to reproduce

Add [Consumes("application/json")] to Controller Class
Make a GET HTTP call to Controller without Content-Type headder
415 Unsupported Media Type is returned

Downgrade to 3.0 and the above steps return 200
GET and DELETE should not require Content-Type I do not know if this is related to a similar core 2.2 bug https://github.com/aspnet/AspNetCore/issues/4396 even though I am currently using core 2.1

I'm not sure I completely follow. It sounds like you want to version by media type. Obviously Content-Type doesn't make sense for GET or DELETE since there is no content. You need to use Accept instead. If that's not the case, I need more information.

versioning in this case is done via url [Route("api/v{version:apiVersion}/[controller]")]
I have not attempted to use version by media type.
The bug is that one is required to add Content-Type to GET and DELETE or 415 is returned. But as you stated this makes no sense as there is no content.
GET and DELETE should return successfully without Content-Type headers. I had to downgrade to version 3.0 as higher versions contain this bug.

OK … now I think I understand what's going on.
To be completely pedantic, GET and DELETE should not consume anything - they are not expected to receive content. This is particularly true for GET. There's nothing in the RFC that states DELETE cannot have content, but it's unusual.

Ultimately, this is a bug/behavior in ASP.NET Core which I do not have any control over. Since there are already open issue(s), your best bet is to engage with the ASP.NET team (which I'm not a part of).
Depending on your objectives, you should be able to work around this issue a number of different ways. If all you want is the request to work, then remove [Consumes] and I would expect it to just work, since there are no constraints and there are matching media type formatters. If you're trying to make it work with Swagger, then you'll likely need to customize your Swagger generator (ex: Swashbuckle) to add the content types outside of the purview of ASP.NET Core.

Thank you so much for your replies. We had the consumes on a base controller class so we would not have to decorate every method. And I do understand that there are workarounds outlined in the .NET Core issue.
I understand that this is an ASP.NET Core issue, but I do have one final question and it may show my lack of understanding of the dynamics between API Versioning and .NET Core.
Why does this but show up in API Versioning when I am not using the version of .NET Core that has this bug?

I can't right say. It could be that an unintended change in 2.2 broke things even with backward compatibility enabled. API Versioning does not directly care about, use, or inspect the ConsumesAttribute or the ProducesAttribute for that matter - not even by the API Explorer. It's all based on what first comes from ASP.NET Core.
I can investigate, but I'm not sure I'll find anything.

Were you able to ever resolve this or come up with a solution? I've looked into this a bit more, but I haven't found anything specific to API Versioning itself. I'm not there is anything directly in API Versioning that can be done to address this issue. There are no explicit scenarios where API Versioning ever returns 415.

It appears this issue has been resolved or is otherwise external to API Versioning. If you continue to have issues or have more questions, feel free to come back or reopen the issue. Thanks.


zxing-cpp updates

Description of changes

Closes https://github.com/NixOS/nixpkgs/pull/220579
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

If you have time, could you please rename the python module from zxing_cpp to zxing-cpp?
For more information, https://github.com/NixOS/nixpkgs/issues/245383

Way better!

I think this is what broke kaidan build
https://hydra.nixos.org/build/234981217/nixlog/1/tail
/cc maintainer @astro
Update might help, but trivial bump of version and hash does not lead to success (missing some dependency).


 That would help us diagnose the problem

@Seedmanc apologies, this was fixed in https://github.com/voxel51/fiftyone/pull/4888 and has been released as part of fiftyone==1.0.1.
pip install --upgrade fiftyone should resolve this ✅


Add new inscription ID

You already submitted
https://github.com/cypherpunklab/manifesto/commits?author=prismapalette


[jvm-packages] -Ve values from multi:softmax objective.

Hi Devs.
I was running a multi class classification on the sample data attached. Model is trained just fine, however when I use the model for predictions, I see negative values in the output.
Code:
`import ml.dmlc.xgboost4j.scala.{Booster, DMatrix}
import ml.dmlc.xgboost4j.scala.spark.{DataUtils, XGBoost}
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.mllib.util.MLUtils
import DataUtils._
val trainRDD = MLUtils.loadLibSVMFile(sc, "data/mllib/sample_binary_classification_data.txt")
val testRDD = trainRDD.sample(false, 0.1)
val paramMap = List(
"max_depth" -> 6,
"num_class" -> 3,
"booster" -> "gbtree",
"objective" -> "multi:softmax").toMap
val xgboostModel = XGBoost.train(trainRDD, paramMap, 20, nWorkers = 4, useExternalMemory = false)
val output = xgboostModel.predict(new DMatrix(testRDD.collect().iterator))
output.foreach { arr => println(); arr.foreach { x => print(x + " ") } }`
Output:
`
-1.7982326 3.5512266 -2.008376
-1.627734 3.411692 -2.008376
3.4890263 -1.6983604 -2.008376
-1.8316703 3.6790173 -1.2907562
3.3072288 -1.4880885 -1.0675741
-1.8316703 3.6790173 -2.1104112
-1.8316703 2.9718113 -1.9851551
-1.9200544 3.5512266 -2.1104112
3.4890263 -1.5947924 -2.1104112
`
Data:
I am using the standard binary_classification dataset that is shipped with spark with a small tweak. I was just changing the first two labels to 2 to make it 3 class classifier. Attached is the training file.
sample_binary_classification_data.txt
I may be doing something wrong with the parameters being passed; but couldn't figure out based on the information available to me on console / logs / official documentation.
I was then explicitly setting rest of the parameters to default values with the following map, but still the same scores.
val paramMap = List(             "max_depth" -> 6,             "num_class" -> 3,             "gamma" -> 0,             "eta" -> 0.3,             "eval_metric" -> "merror",             "booster" -> "gbtree",             "min_child_weight" -> 1,             "max_delta_step" -> 0,             "subsample" -> 1,             "colsample_bytree" -> 1,             "seed" -> 0,             "base_score" -> 0.5,             "objective" -> "multi:softmax").toMap
thanks!

@CodingCat I ran the XGboost implementation for SciKit with the same data and parameters and probability values were correct.

it might be caused by the missing values, would you try https://github.com/dmlc/xgboost/blob/master/jvm-packages/xgboost4j/src/main/java/ml/dmlc/xgboost4j/java/DMatrix.java#L128 to construct DMatrix?

@CodingCat Sure, I will give it a try. Also, I will try the same code with the dense matrix.


Fix(ui): falsy string comparison + dot in option identifiers

This fixes that check mark value changes were not reflected in Plugin updates on boolean values.
This was due to the fact that Javascript compares
("" == false) == true

and we did not expect OptionValues to have dots in their identifiers as in e.g. alerts.alertmanager.enabled

Superseeded by https://github.com/cloudoperators/greenhouse/pull/235


Created pr-checker.yml

Description:
This workflow automatically runs checks on every pull request. It ensures that PRs meet basic criteria, such as:
issue #127
close #127

Checking for a descriptive title and body.
Running linting and basic tests to validate code quality.
This helps maintain PR quality and catch issues early in the review process.

hey buddy @vanshchauhan21 thanks a lot

hey buddy @vanshchauhan21 thanks a lot

🫂👍

Remove the levels for this PR @vanshchauhan21 as already 2 PRs have levels in this Repo

Oky oky


Remove lodash dependency

Look for individual, small, secure, well-supported packages that could be used in place of the two lodash functions that are used (merge and template). Although modern build tools should be able to tree shake lodash, it's still best for download times and other reasons to not pull in such a large package.

@aldeed how about using these?
https://www.npmjs.com/package/lodash.template
https://www.npmjs.com/package/lodash.merge

Last I heard, the individual lodash.* packages are no longer getting security fixes. Need to look for something that is secure and maintained.

Ok, I see they were last updated 8 months ago.
Anyway, deepmerge for merge looks really solid and popular, might want to use this, if the size is still a concern for using this package you can try js.merge.
Also how about using ejs or micromustache for templating?

Switched to deep-extend and lodash.template in 0.2.3. I think micromustache would be better but I don't want to introduce breaking changes at this time.


Add style linter

Summary
Add style linter to webapp repo.
The linter added is https://stylelint.io/ (first found after a quick google search).
All rules are enabled but two:

"no-descending-specificity" : Too many errors and time consuming to solve (require reordering the elements on the files, and probably someone with more css savvy could make sure the behaviour does not change)
"font-family-no-missing-generic-family-keyword": This just needs to add the generic font family, but was not sure for each case which would be the correct one, so I will leave that also for someone with more css savvy.

Something similar should be done for mobile.
Ticket Link
None
Release Note
NONE

The file Makefile is in the blocklist for external contributors. Hence, these changes are not tested by the CI pipeline active until the build is re-triggered by a core committer or the PR is merged. Please be careful when reviewing it.
/cc @mattermost/core-security @mattermost/core-build-engineers

The file Makefile is in the blocklist for external contributors. Hence, these changes are not tested by the CI pipeline active until the build is re-triggered by a core committer or the PR is merged. Please be careful when reviewing it.
/cc @mattermost/core-security @mattermost/core-build-engineers

The file Makefile is in the blocklist for external contributors. Hence, these changes are not tested by the CI pipeline active until the build is re-triggered by a core committer or the PR is merged. Please be careful when reviewing it.
/cc @mattermost/core-security @mattermost/core-build-engineers

This sounds like a good inclusion. I'm not sure if UI Platform has their own plans around this, but I'm sure Nevy would know.
The only question I have is if this fits in with Prettier. We'd discussed potentially moving to using Prettier elsewhere, and as far as I know, it does have CSS support, so maybe it would make sense to turn that on for CSS in the mean time to see how it looks? That said, Web Platform isn't planning on doing that any time soon, so we could always use this for now and maybe switch in the future if that ends up being necessary.

This sounds like a good inclusion. I'm not sure if UI Platform has their own plans around this, but I'm sure Nevy would know.
The only question I have is if this fits in with Prettier. We'd discussed potentially moving to using Prettier elsewhere, and as far as I know, it does have CSS support, so maybe it would make sense to turn that on for CSS in the mean time to see how it looks? That said, Web Platform isn't planning on doing that any time soon, so we could always use this for now and maybe switch in the future if that ends up being necessary.

We actually haven't included those rules in our linter but the way we use styled components doesn't let us mess up the specificity. I can discuss the second rule with my team .

@nevyangelova heads up that I moved the commands from the makefile to the package.json file, in case you think it needs a re-review.

@nevyangelova for styled components, this linter has a special set of rules that may be interesting. I have not looked deep into it, but maybe you can figure out something interesting to add in the future :smile:
https://github.com/kristerkari/stylelint-react-native

Thanks @larkox we are in the process of figuring out rules and best practices I will let you know :)

@larkox Can you please add test steps? Not sure I understand what needs to be tested. Thanks.

@jgilliam17 This is just a refactor, but touch the styles all around, so the idea would be a general test to make sure everything looks like it is supposed to. It is hard to pinpoint any area in specific. Sorry about that :(

Thanks @larkox
Noticed few issues while manually smoke testing and checking Cypress errors
The fix for some maybe the same, I'm listing all for my benefit so I know which screens to retest.

emoji picker borders are not correctly styled

System Console>User Management>Channels

System Console>User Management>Teams

System Console>User Management>System Roles

System Console>Compliance>Data Retention Policy < This screen looks completely off when compared to master.test. I am not sure when it was updated with the new look

Additionally one step forward similar can be seen on  Add policy > Custom retention policy screen

Not sure if this is related to changes here. There are also some server errors when trying to save settings, incident playbooks etc. this does not repro on master.
Error is sometimes missing when saving and displays insert error

@jgilliam17 The borders and the tables should be fixed.
The changes in compliance are due to a feature flag. It seems there is a new feature that they are working on. The theme related things (like the text that is barely visible) is something outside of the scope of this PR.
The error, I have not being able to reproduce on my side, but should not be related.


Improve the shellcheck maker compatibility

The shellcheck maker now respects the '# shellcheck shell='
directive
The shellcheck maker now correctly determines if zsh support is
included
Added utility functions for parsing & comparing semver version strings
SEE: http://semver.org
Included tests for all new functionality

NOTE: I noticed some weird issues that I did not address. For example, the filetype is being used to determine if shellcheck supports the specific shell, but the filetype should will always be 'sh' since it is an 'sh' maker. Additionally there is a zsh maker, and it should probably use the version determination code I put in to see if shellcheck supports zsh. Maybe the shellcheck code could better be refactored to use the neomake#utils#GetSupersetOf functionality.

As far as I can tell, this code will never hit for any filetypes other than sh. I even tried it by setting my filetype to bash and indeed neomake does not realize that it has any makers for the bash filetype.
I think ideally the zsh maker could benefit from the version checking code I added to ensure a version of shellcheck with zsh support is installed.

I think the versioning part should be easy to check since it's covered by tests. All the possible permutations are covered, so as long as the tests pass the code should be correct. I've pretty much just copied the appropriate lines from the semver.org website and put them as comments above the specific test cases.
Also, what do you think of my comments regarding the use of filetype to check for supported shells being incorrect?

@dojoteef
Needs to be rebased.
@mhinz
What do you think about this?

@blueyed I think it needs to be rebased. :>
Lots of things changed, and yea, I would try to avoid using executable() for sole detection purposes. For shebangs that contain sh/dash/bash/ksh, we just use shellcheck -fgcc, since shellcheck reads the shebang on its own.
Adding zsh to that list, would make it work with shellcheck versions supporting zsh. For current releases that's not the case, though. Shellcheck would default to using the bash dialect and issue a warning about an unsupported shebang.

@mhinz Sorry, I am not sure I understand what changes you are asking for. Are you saying not to use shellcheck --version and the version parsing at all? If so, I am not sure how to make it do that and properly detect/add zsh support. As you've stated that could result in producing an error in the quickfix/location list. Does that mean you believe showing an error to be the desired behavior? Note that I believe in some versions of shellcheck it does not error when provided an invalid flag.
To be honest I do not use zsh and simply took the time to download and test for shellcheck compatibility since I need to make a change to the shellcheck maker. If you want me to remove any zsh related stuff, I'd be happy to.
As for rebasing, will do. Though it seems like something to do after the details of this change are settled before checking in, unless there are large changes that would affect this code.

Not sure how to handle zsh. Should we support features from old versions? I mean, as far as I understand it, zsh was only supported for some time and was removed again in recent versions.

I'd also say that we should in general only support the most recent versions of checkers - just for simplicity.
But OTOH the code to query versions is provided here now already and can become useful in other places, too.

Yea, I'm not opposed to the changes. What's done is done. And calling system('shellcheck --version') only once on ft=sh is fine with me for detection purposes.

A problem with the current sh maker is btw that it will enable shellcheck also for a #!/usr/bin/env zsh shebang (ft=sh), resulting in an error from shellcheck that it is not supported.
That won't change with this PR, will it?
For this the check should be done in neomake#makers#ft#sh#EnabledMakers, or the shellcheck maker should have a way to skip its run conditionally?!

neomake#makers#ft#sh#shellcheck() was changed quite a bit lately to make it always do the Right Thing.
For the sake of getting on, I suggest removing the actual zsh support from this PR and get it merged it quickly. Afterwards we add a commit that does the dection and sets s:shellcheck_supports_zsh in autoload/neomake/makers/ft/sh.vim which again get used in neomake#makers#ft#sh#shellcheck(). Then we have all the buffer processing in the same place.

@blueyed @mhinz Okay, this change is severely out of date. I propose I essentially scrap this and simply put the one change I really care about which is to respect a shellcheck directive for the shell if the shebang is missing.
Basically this line:
if match(getline(1), '\v^#!.*<%(sh|dash|bash|ksh)') >= 0

Will become:
if match(getline(1), '\v^#!.*<%(sh|dash|bash|ksh)') >= 0
        \ || match(getline(1), '\v^#\s+shellcheck\s+shell=') >= 0

Does that sound reasonable? If so, then I will code it up and add a test.

Sounds reasonable (to me at least).

I don't know that directive, but I'm sure it exists. ;] And please create a new PR for it. Closing.
(And it should be \=!)


window split (feature request)

I'd like to have two visible files at the same time because a.) often I want to see two files at the same time (either because I want to see header file and implementation file at the same time, or I want to look up a thing in a file, but I don't want to hide existing file because it's distracting, lots of reasons) b.) the amount of free space here is staggering.
Sadly, opening two instances of juCi++ is not a suitable replacement.

Agree! Have thought about this many times, but have always dropped it due to the added complexity, especially when the parsing of a tab is triggered by saving another tab. But I think it's doable anyway. My suggestion is as follows when split window is triggered from menu:

Add a notebook to the right with its own tabs (no tabs initially)
Make it possible to drag and drop tabs between the two notebooks
Open a new file in the notebook that currently has focus
For simplicity, it should not be possible to have the same file opened in two notebooks
Start reparsing, if needed, if the notebook tab gets focus, that is do not immediately start reparse a file even though it is shown on screen.
Current class Notebook will be renamed Notebooks, and some methods will be extended to support two notebooks. Most likely, the changes will only happen in this class. Notebooks::get_current_view for instance will return the view/tab with focus.
~/.juci/last_session.json has to store information about which notebook the different files are opened in.

I do not have time for this now, and I'd like to start working on git integration soon, but I think split window can be implemented during the summer.
However, it would be great help if someone could create an as-simple-as-possible-one-file-example of two notebooks where it is possible to drag and drop tabs from one notebook to another.

Actually, according to http://www.kksou.com/php-gtk2/sample-codes/move-tabs-between-two-notebooks-with-drag-and-drop.php and https://developer.gnome.org/gtkmm/stable/classGtk_1_1Notebook.html#a7b0555d623c2784dc45b5b3e6aa9c3e1, this seems much easier than I initially though. I'll fix it in a week or two.

@milleniumbug see the PR above.


Move graqphql types to src/lib/graphql_lib

Major changes:

consensus library is no longer dependent on anything related to Graphql
all src/lib/xxx/unix are renamed to src/lib/graphql_lib/xxx (where they belong)

This doesn't change much about how things are arranged, but improves picture from opam packages view. E.g. mina_block package no longer includes anything graphql-related.
Explain how you tested your changes:

Mina compiles

Checklist:

[x] Dependency versions are unchanged

Notify Velocity team if dependencies must change in CI

[x] Modified the current draft of release notes with details on what is completed or incomplete within this project
[x] Document code purpose, how to use it

Mention expected invariants, implicit constraints

[x] Tests were added for the new behavior

Document test purpose, significance of failures
Test names should reflect their purpose

[x] All tests pass (CI will check this if you didn't)
[x] Serialized types are in stable-versioned modules
[x] Does this close issues? None

!ci-build-me


[CI][DOCKER] Add pytest-lazy-fixture to images

Install lazy-fixture pytest plugin. This is needed for PR #10865.
Signed-off-by: Gustavo Romero<EMAIL_ADDRESS>cc @areusch @driazati

Thanks @gromero, this should go into the over night build (https://ci.tlcpack.ai/job/docker-images-ci/job/daily-docker-image-rebuild/) and we can use that tag to update the relevant images; looking at the PR build (https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/PR-10865/5/pipeline) it should be all of ci_cpu, ci_i386, ci_arm and ci_gpu.

Thanks @Mousius !


Added tls part

this is the current working TLS files and configuration. in future will try to merge with main.

Please separate TLS (please create new branch) and OTEL Agent fix to two PRs.


fix return

Fixes #64

I belive @KatjaGlassConsulting has no Kimai 2 setup, i just changed the line and kan say it is working.
thanks so far


Prisma generator doesn't detect previous changes when changing a column that has a default value to none.

Bug description
It keeps generating the same migration over and over again, without any changes to the schema.
How to reproduce

Take any project with any schema.prisma that has at least 1 table and add:

lastSeen               DateTime?            @default(now())

Make sure it works and now change the schema.prisma to:

lastSeen               DateTime?

It will correctly generate the following migration which is also correctly applied. (I think)

-- AlterTable
ALTER TABLE `daemon` ALTER COLUMN `last_seen` DROP DEFAULT;

We now try to generate again without any changes and it will infinitely try to make the schema specified above. Even though this instruction already exists in the previous schema.

Note: Even with valid changes it will always try to alter the table to drop the default value.(When it has been done in previous migrations and the database dropped the default constraint)
Expected behavior
To make the migration once and not over and over.
Prisma information

using-prisma-migrate-typescript-mysql
Can be easily reproduced by simple use the example project specified in the URL.
Environment & setup

OS: Ubuntu 22.04
Database: MariaDB
Node.js version: 21.6

Prisma Version
prisma                       : 5.8.1
@prisma/client          : 5.8.1

It seems that the SQL syntax to properly remove the default value is incorrect.
ALTER TABLE `daemon` ALTER COLUMN `last_seen` DROP DEFAULT;

This doesnt successfully remove the default property.
ALTER TABLE `daemon` CHANGE COLUMN `last_seen` `last_seen` DATETIME NULL;

This does.

Hey @MathiasDeWeerdt,
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

model A {
  id       Int       @id
  lastSeen DateTime? @default(now())
}

I can confirm with the above schema that prisma migrate dev generates the following sql migration:
-- CreateTable
CREATE TABLE `A` (
    `id` INTEGER NOT NULL,
    `lastSeen` DATETIME(3) NULL DEFAULT CURRENT_TIMESTAMP(3),

    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

And that running prisma migrate dev detects no changes and prompts no further migrations.
❯ npx prisma migrate dev
...

Already in sync, no schema change or pending migration was found.

✔ Generated Prisma Client (v5.15.0) to ./node_modules/@prisma/client in 45ms

Changing the schema like so:
model A {
  id       Int       @id
- lastSeen DateTime? @default(now())
+ lastSeen DateTime?
}

yields the following migration:
-- AlterTable
ALTER TABLE `A` ALTER COLUMN `lastSeen` DROP DEFAULT;

And re-running migrate dev  (with no changes in the prisma schema) prompts for another migration with the following sql being repeated:
-- AlterTable
ALTER TABLE `A` ALTER COLUMN `lastSeen` DROP DEFAULT;

Note: this repeated migration loop only affects mysql.


XAS Viewer cannot handle opening non-UTF8 files

XAS Viewer is a great piece of software, but I did run into a bit of a hiccup. Currently, when XAS Viewer reads a text file containing column data, it assumes that the data is encoded in UTF-8. Sadly, this is not always the case. At the LUCIA beamline in SOLEIL, for example, their Igor software exported all data in Western (ISO-8859-15) encoding. Loading this in XAS Viewer results in a UnicodeDecodeError (see full traceback below). Re-saving the files in UTF-8 makes them work perfectly.
Should you decide that non-UTF-8 is something worth supporting, I can see either using an automatic detector like charset-normalizer, or just allowing the user to indicate the alternative encoding upon UnicodeDecodeError.
Traceback (most recent call last):
  File "/home/user/Develop/xraylarch/larch/wxxas/xasgui.py", line 1152, in onReadDialog
    self.onRead(path)
  File "/home/user/Develop/xraylarch/larch/wxxas/xasgui.py", line 1177, in onRead
    self.show_subframe('readfile', ColumnDataFileFrame,
  File "/home/user/Develop/xraylarch/larch/wxxas/xasgui.py", line 1105, in show_subframe
    self.subframes[name] = frameclass(self, **opts)
  File "/home/user/Develop/xraylarch/larch/wxlib/columnframe.py", line 336, in __init__
    group = self.initgroup = self.read_column_file(self.path)
  File "/home/user/Develop/xraylarch/larch/wxlib/columnframe.py", line 628, in read_column_file
    reader, text = guess_filereader(path, return_text=True)
  File "/home/user/Develop/xraylarch/larch/io/columnfile.py", line 607, in guess_filereader
    text = fh.read().decode('utf-8').replace('\r\n', '\n').replace('\r', '\n')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 141: invalid start byte

@kaarelmand Sorry for the trouble. Can you send an example file?  Somehow, I thought that Latin-1 was a subset of UTF-8 (ie, they agreed on the first 255 characters), but maybe that is not correct.  I'm not sure about IOS-8859-15.
If it's not "UTF-8" or "Latin-1", I'm not sure how to try to guess the encoding of a file.  We found that relying on "system encoding" was definitely not very reliable -- as files move between computers, the current default encoding might not be the right one to read data from some far-away beamline.  But, suggestions welcome.

No trouble at all; this is easy to sidestep. Just thought it might be useful for me to open issues for the hiccups I've encountered.
Here is the file in question: ALARA_JV07_map1_POI1_1.zip
As for how to solve it; one option are various python libraries for guessing encoding: chardet and charset_normalizer. However, I'm not sure this is something you want to add another dependency for. Perhaps it would be more straightforward to simply ask the user what the encoding is, if unicode doesn't work. I thought I might try to write a PR for this later, though I'm very new to all this.

@kaarelmand Thanks -- I'll add that datafile (truncated) to the tests, it that is OK with you.
Using chardet is a fine idea -- I'll do that.

With the latest commits, my files seem to open perfectly. Thanks!


Problem installing for Mac OS 10.10.5

Problem encountered on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install
Operating System: macos
It just stated that "there was a problem" downloading version dotnet-sdk-2.2.104 for the Mac OS 10.10.5. It didn't say what the problem was, however.

Is it persistent problem?
Did you check your network connection?
Are you able to try it on more than 1 machine to see if it is something environmental?

No response, not enough info. Closing. Feel free to reopen if there is actionable info.


What is said here is hard to understand.

This whole paragraph is confusing and hard to understand.  It seems to say exactly what is said in the previous paragraph but then shows something exactly the opposite with the graphic.  Seems like different writers had different thoughts that don't mash together.
" During authentication, legacy authentication clients don't support sending MFA, device compliance, or join state information to Azure AD. Therefore, apply policies with grant controls to all client applications so that legacy authentication based sign-ins that can’t satisfy the grant controls are blocked. With the general availability of the client apps condition in August 2020, newly created Conditional Access policies apply to all client apps by default. "
Can you please state what you mean by the above.
The graphic that goes with this diagram is not clearly explained.

When you read the two links below you wonder what is the difference.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d7c2489b-dc36-4318-b1c8-dc74e34dd948
Version Independent ID: 19f748cc-89b8-7788-23e2-a4ff33a72bb5
Content: Block legacy authentication - Azure Active Directory - Microsoft Entra
Content Source: articles/active-directory/conditional-access/block-legacy-authentication.md
Service: active-directory
Sub-service: conditional-access
GitHub Login: @MicrosoftGuyJFlo
Microsoft Alias: joflore

@D-Moonesinghe
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

Resolved by https://github.com/MicrosoftDocs/azure-docs-pr/pull/212542 #please-close


Changes to add validation

Fixes #242
Changes to add validation

Oh, there's another missing bit.  We need to include the validation in the parsing process.
So, I suggest the dita_ot_validator' module is moved into legacy_publisher`, and we validate the file once we have written regions to the hard disk.

Remaining items:

[ ] comment out local path constant
[ ] throw error if DITA_OT environment variable isn't set
[ ] include comment with example of DITA-OT path from oxygen
[ ] modify code to pass file to test and DTD to the function
[ ] move the validation code into legacyman_public package


xgboost gpu predictor running slower relative to cpu

I am training some gradient boosted trees using xgboost library. When i use the tree method : gpu_hist, i definitely see a 10x speedup for training. Another 4x speedup for using multiple gpus on a signle machine.
The issue I am running into right now is the prediction (using the gpu_predictor) is almost 1.5-2x slower than the cpu_predictor. Is this supposed to be like that ? I assumed the prediction/scoring can also be easily parallelized across all the boosted trees. Has any one faced similar issues ? Another issue i observe is that after training the on gpus , i still see memory not free'd on the gpus. Is this a known issue , do i need to delete the booster/model and run evaluation/prediction separately

If you predict from a matrix that the algorithm has not seen before it needs to copy this matrix to the GPU - this can be slow. Our prediction algorithm is currently optimised for prediction during training as opposed to prediction from a 'warm start'.
And yes you will need to explicitly delete the booster to free the memory. Internally the algorithm has no way of knowing if the user has finished boosting or not so it must retain the memory.

@RAMitchell : what exactly you mean prediction during training ? is this something different than training itself ? I am using the same training dataset to run prediction to evaluate on training data.
What exactly is being compared here , rediction during training vs prediction warm start , can you elaborate further as this comparison doesnt make any sense to me . Prediction is just prediction , whether you run during training or a seprate eval dataset.
Also it doesn't seem memory copy to gpu is overhead here as i measure the time to copy to gpu is merely few seconds (100-1000x smaller than actual prediction time).

Even after deleting the booster and reading back serialized model and doing some warmpup to run prediction , the prediction is much slower than cpu , this after removing the memory copy overhead.
What exactly is optimized in gpu predictor as opposed to cpu predictor ? I am trying different dataset size and the result is pretty consistent with gpu predictor always being worse than cpu predictor. training takes about 2-3 minutes whereas prediction is taking 30 minutes , i don't think this is something expected.  any workarounds

training takes about 2-3 minutes whereas prediction is taking 30 minutes

Do you have a re-producible example for this?

I do not have a public dataset , but i can give you 50-80 features , data size 2Gb , 2-3 million rows . I also tried with much larger dataset 33 million rows around 24 Gb

Let me ask you a few more questions:

Which version of XGBoost are you using? If compiled from the source, what is the git commit hash?
How many trees does the model have? What is the average number of leaves and depth for each tree?
Which model of NVIDIA GPU are you using? How much memory does it have?

I do not have a public dataset

Without the data it would be difficult for us to diagnose the cause for low performance. Can you generate a dummy data that has similar characteristics as your dataset (in number of features, number of nonzero entries, number of data rows, scale of each feature etc.)?


[Snyk] Security upgrade node from lts-alpine to 20.15.1-alpine3.20

This PR was automatically created by Snyk using the credentials of a real user.![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to fix 1 vulnerabilities in the dockerfile dependencies of this project.
Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Snyk changed the following file(s):

Dockerfile

We recommend upgrading to node:20.15.1-alpine3.20, as this image has only 0 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Vulnerabilities that will be fixed with an upgrade:

Issue

CVE-2024-5535 SNYK-ALPINE320-OPENSSL-7413532

CVE-2024-5535 SNYK-ALPINE320-OPENSSL-7413532

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

Seems invalid, like this:

https://github.com/upleveled/security-vulnerability-examples-next-js-postgres/pull/212#issuecomment-2209418990


Backport unreleased PR https://github.com/mmatl/urdfpy/pull/6

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin, please rerender


Add new multiline-inline-if rule

Closes #804
I'll be honest - I don't know how to suppress the misaligned-continuation rule, and I don't know if it's needed here.
Also, I assigned an INFO severity to this rule, but I am thinking if maybe it should have WARNING...

And I also think it should be WARNING severity. This looks like a abuse of the syntax after all

You can suppress rule in its source - so the checker with misaligned-continuation needs to have check for inline-if and return early in such case:
def visit_If(self, node):
    if ROBOT_VERSION.major >= 5 and self.is_if_inline(node):
        return

Oh, it's that easy. Thanks :)


Various Bug Fixes

Description
Completed Squad Queue issue (untested), Predict command issue (along with removal of URL shorten code) (untested), and formatting issues with lists in commands (tested)
Checklist

[ ] If code changes were made, they have been tested
[X] This PR fixes an issue
[ ] This PR is not a code change (ie. documentation, typehinting, comments, etc.)

I DONT KNOW HOW TO FIX THE REVIEW SHIT, MAYBE UH WRITE SOME CODE TO DO IT YOURSELF LOL

@Fear-MK You need to see your VS to use LF character return. As a courtesy, I will fix your PR for you. Please ensure this in the future.

Was sure that I did that, even prompted me to save the files after changing it to LF. However next time I will set it before I start editing.

After fixing the issue, this PR doesn't seem to address the issues in your description. Please check to make sure you have committed the correct files, then reopen this PR.


Fix thread pool configuration is invalid

What is the purpose of the change
Fix #11524
why:
Initiating RPC in the life cycle initialization phase of Spring Bean, that is, before ServiceBean#afterPropertiesSet, because configManager does not have any serviceConfig, and without publishing any provider, the DefaultApplicationDeployer#exportMetadataService() method is first triggered, resulting in org.apache.dubbo.metadata The .MetadataService metadata interface is exported first, and finally the url is passed and fixed in the ChannelHandler. After the service starts to receive the request, when obtaining the ExecutorService, the thread pool of the MetadataService is obtained through the url, not the thread pool configured by parameters such as dubbo.protocol.threads.
how:
When the getExecutor(URL url) method obtains the thread pool, if it is the provider side and has a user-defined interface, the service thread pool will be used first to avoid using its own thread when the registered URL is org.apache.dubbo.metadata.MetadataService pool.
Brief changelog
Verifying this change

Checklist

[x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
[x] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[x] Add some description to dubbo-website project if you are requesting to add a feature.
[x] GitHub Actions works fine on your own branch.
[x] If this contribution is large, please follow the Software Donation Guide.

Change getExecutorKey to:
    private String getExecutorKey(URL url) {
        if (CONSUMER_SIDE.equalsIgnoreCase(url.getParameter(SIDE_KEY))) {
            return CONSUMER_SHARED_EXECUTOR_SERVICE_COMPONENT_KEY;
        }
        return EXECUTOR_SERVICE_COMPONENT_KEY;
    }

Fixed in https://github.com/apache/dubbo/pull/11652


Fuse mode in docker container errors on Mac OS Big Sur

Bug Description
Following this working Linux solution for running google cloud_sql_proxy via docker containers on Mac OS Big Sur 11.6 the following error occurs:
docker: Error response from daemon: path /cloudsql is mounted on /cloudsql but it is not a shared mount.
Example code (or command)
n/a
Stacktrace
Error:
docker: Error response from daemon: path /cloudsql is mounted on /cloudsql but it is not a shared mount.

docker events:
2021-11-04T14:21:39.610001501-05:00 container create 127263a29ad00daecb8694d7406bea9b74e9ede9a61dd5c1b7f7cbfe316e265b (image=proxy-buster-dev, name=proxy)
2021-11-04T14:21:39.614097636-05:00 container attach 127263a29ad00daecb8694d7406bea9b74e9ede9a61dd5c1b7f7cbfe316e265b (image=proxy-buster-dev, name=proxy)
2021-11-04T14:21:39.664471533-05:00 network connect 97fc4b627439e94b9528666783786304f2a2038efe44ae577d362c05b81b7e12 (container=127263a29ad00daecb8694d7406bea9b74e9ede9a61dd5c1b7f7cbfe316e265b, name=bridge, type=bridge)
2021-11-04T14:21:39.706083431-05:00 network disconnect 97fc4b627439e94b9528666783786304f2a2038efe44ae577d362c05b81b7e12 (container=127263a29ad00daecb8694d7406bea9b74e9ede9a61dd5c1b7f7cbfe316e265b, name=bridge, type=bridge)
2021-11-04T14:21:39.713146656-05:00 container destroy 127263a29ad00daecb8694d7406bea9b74e9ede9a61dd5c1b7f7cbfe316e265b (image=proxy-buster-dev, name=proxy)

How to reproduce
We have reproduced this with the example from the previously referenced issue, and also with docker compose.  To keep things uniform, below is the technique we used to produce this error.
git clone https://github.com/GoogleCloudPlatform/cloudsql-proxy.git

docker build -f Dockerfile.buster --tag proxy-buster-dev .

docker run -it --rm --name proxy --user=root \
  --mount type=bind,source=<path-to-cred-file>,target=/config/credentials.json \
  --mount type=bind,source=/cloudsql,target=/cloudsql \
  --mount type=bind,source=/tmp/cloudsql,target=/tmp/cloudsql \
  --device /dev/fuse \
  --privileged \
  proxy-buster-dev \
  /cloud_sql_proxy -fuse -fuse_tmp /tmp/cloudsql -dir /cloudsql -credential_file=/config/credentials.json

Environment

OS type and version: Mac OS Big Sur 11.6
Cloud SQL Proxy version (./cloud_sql_proxy -version): 1.27.1
Docker desktop 4.1.1
Docker engine 20.10.8

Adding the docker desktop "about" window with all the used versions:

Thanks @chmoder for the report. I'll take a look at this.

Have you tried this on v1.26.0? We switched the backing FUSE library in v1.27.0 and so I'm wondering if this is a problem with the new version.

I tried this on my Intel Mac with v1.26.0 and see it's not working there. The FUSE mount succeeds inside the container, but the host directory doesn't mount.

After some further research, I found a couple of things.

You'll need to enable File Sharing for both the /tmp dir and the /cloudsql dir. There's a screenshot here with a fairly recent version of Docker desktop: https://stackoverflow.com/a/68495984/927514

As a side note, I've tried the same on a Linux machine (replacing the Docker desktop step with mount --make-shared / and do see the directory mounted, but cannot connect to my database using psql, both with v1.26.0 and v1.27.0. I suspect this is caused by a change in Docker.

Thanks for the help, I would guess you are having trouble connecting because of some IAM permissions issue?  Beconse on a GCE instance running ubuntu-2004-focal-v20200423  we were quickly able to use the following docker compose yml to connect to a cloud SQL instance.  However we still can't seem to get Mac OS to run it.  Have you tried using non-privileged directories on the host?  /Users/<user>/cloudsql for example?
docker-compose.yml
version: '3'
services:
  cloudsql-proxy:
    container_name: cloudsql-proxy
    image: gcr.io/cloudsql-docker/gce-proxy:1.27.0-buster
    command: /cloud_sql_proxy --dir=/cloudsql -credential_file=/credentials.json -fuse -fuse_tmp /tmp/cloudsql -verbose
    user: root
    privileged: true
    ports:
    - "3306:3306"
    volumes:
      - type: "bind"
        source: "/home/tcross/csg_env/credentials.json"
        target: "/credentials.json"
      - type: "bind"
        source: "/cloudsql"
        target: "/cloudsql"
        bind:
          propagation: rshared
      - type: "bind"
        source: "/tmp/cloudsql"
        target: "/tmp/cloudsql"
        bind:
          propagation: rshared

docker run:
tcross@<redacted>:~/csg_env$ docker compose up
[+] Running 1/0
 ⠿ Container cloudsql-proxy  Created                                                                          0.0s
Attaching to cloudsql-proxy
cloudsql-proxy  | 2021/11/05 12:49:08 current FDs rlimit set to 1048576, wanted limit is 8500. Nothing to do here.
cloudsql-proxy  | 2021/11/05 12:49:08 using credential file for authentication<EMAIL_ADDRESS>cloudsql-proxy  | 2021/11/05 12:49:08 Ready for new connections
cloudsql-proxy  | 2021/11/05 12:49:08 Generated RSA key in 230.402363ms
cloudsql-proxy  | 2021/11/05 12:49:13 refreshing ephemeral certificate for instance<redacted>:us-central1:django-v2
cloudsql-proxy  | 2021/11/05 12:49:13 Scheduling refresh of ephemeral certificate in 23h54m59.182745704
cloudsql-proxy  | 2021/11/05 12:51:57 Client closed local connection on /tmp/cloudsql/<redacted>:us-central1:django-v2

mysql connection:
mysql -S /cloudsql/<redaccted>:us-central1:django-v2 -p<password> -u <user>

OK. Thanks for the docker-compose file. I've tried on a fresh GCE VM as well and can confirm that it does work. I'll try the same on my mac and report back.
Given how tricky it is to get this working, whatever we find here, it seems like adding this somewhere in our docs (rather than in an old issue) would be useful.

When trying this same experiment on my Intel Mac with the latest Docker Desktop, I'm getting this (note I'm mounting on /tmp/cloudsql instead of /cloudsql):
ERROR: for cloudsql-proxy  Cannot start service cloudsql-proxy: path /tmp/cloudsql is mounted on /tmp but it is not a shared mount

Which is an open issue (https://github.com/docker/for-mac/issues/3431).
How are you getting around this?

This post does enable us to set up the bind mounts with propagation.  However, I haven't been able to connect to the MySQL server from Mac OS yet.  I logged into the container and was able to connect and create files on the host and see them in the container.  Maybe at this point you can test connecting to cloud_sql_proxy?
Error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/cloudsql/<redacted>:us-central1:django-v2' (61)

./shared-mount/Dockerfile
FROM alpine:latest
ENV  MOUNTDIR=/tmp
CMD  nsenter -t $(pgrep docker-init) -m -- mount --verbose --make-shared ${MOUNTDIR}

docker-compose.yml
version: '3.7'

services:
  shared-mount:
    build:
      context: ./shared-mount
    privileged: true
    stdin_open: true
    tty: true
    pid: "host"
    environment:
      - MOUNTDIR=/tmp
  cloudsql-proxy:
    container_name: cloudsql-proxy
    image: gcr.io/cloudsql-docker/gce-proxy:1.27.0-buster
    command: /cloud_sql_proxy --dir=/cloudsql -credential_file=/credentials.json -fuse -fuse_tmp /tmp/cloudsql -verbose
    user: root
    privileged: true
    depends_on:
        - shared-mount
    ports:
    - "3306:3306"
    volumes:
      - type: "bind"
        source: "/Users/tcross/development/proxy/credentials.json"
        target: "/credentials.json"
      - type: "bind"
        source: "/tmp/cloudsql"
        target: "/cloudsql"
        bind:
          propagation: rshared
      - type: "bind"
        source: "/tmp/cloudsql-tmp"
        target: "/tmp/cloudsql"
        bind:
          propagation: rshared

Unfortunately, it seems even this change doesn't translate to Docker properly mounting the /tmp/cloudsql directory.
When I look inside the directory after starting Docker Compose, I see this:
$ ls -la /tmp/cloudsql
total 0
drwxr-xr-x  2 enocom  wheel   64 Nov  8 13:09 .
drwxrwxrwt  8 root    wheel  256 Nov  8 13:16 ..

When the FUSE mount has successfully mounted, we should see a README at bare minimum in there. The fact that we don't implies that until docker/for-mac#3431 is fixed, running the proxy in this way won't work.
Since we've found that this is a Docker for Mac issue, and not a proxy issue, I'm going to close this. It's disappointing that we can't fix this here. I know it's a burden to install macfuse, but for now I'd recommend either doing that and running the proxy directly or running the proxy without FUSE mode in a container.
If you're working on an M1 Mac, I briefly detailed the installation process for macfuse here.


Make "missing separator.  Stop"

Hi,
There are some .cmake files that have some kind of indent problem. When you try to compile blinky example adding "nrf5_app_scheduler" as target link library (SDK 16) on Linux environment it throws the following error:
Scanning dependencies of target nrf5_mdk [100%] Building ASM object CMakeFiles/nrf5_mdk.dir/nRF5_SDK_16.0.0/modules/nrfx/mdk/gcc_startup_nrf52.S.obj [100%] Building C object CMakeFiles/nrf5_mdk.dir/nRF5_SDK_16.0.0/modules/nrfx/mdk/system_nrf52.c.obj [100%] Built target nrf5_mdk Scanning dependencies of target nrf5_boards [100%] Building C object CMakeFiles/nrf5_boards.dir/nRF5_SDK_16.0.0/components/boards/boards.c.obj [100%] Built target nrf5_boards Scanning dependencies of target nrf5_app_scheduler CMakeFiles/nrf5_app_scheduler.dir/depend.make:4: *** missing separator.  Stop. make[1]: *** [CMakeFiles/Makefile2:5985: CMakeFiles/nrf5_app_scheduler.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 stark@vm:~/workspace/cmake-nRF5x/build$
Afterwards, if you run again "make", it compiles. This error happens with many files of this project. I have idented all .cmake files but continues happening I do not know where is the problem.
Best regards

Hi,
Finally I found the mistake and it was on my side. As I am using a virtual machine with a shared folder between Linux and Windows, it looks that CMake does not like this kind of user spaces "vmhgfs-fuse". I recompiled in a native host folder and it works.
Best regards


Implement first attempt at Google Maps API.

map.html uses Maps geolocation to store the user's current location (from the organizer). map2.html takes a stored geolocation from map.html and displays a map (for the general user).

Also, great idea working on this on your own portfolio until you're able to add it to the team project! I'm impressed.


The idle connection does not be released after redis cluster failover.

In cluster mode, when I called cluster failover in redis-cli, the redis-cli client list showed that connection number increased than masterConnectionMinimumIdleSize/ slaveConnectionMinimumIdleSize  while those connections idle time is larger than idleConnectionTimeout. I have tried both redisson verion 3.7.2 and 3.12.4, redis verion 3.2.9 and 5.0.8. So i wander why the idle connection does not be released after redis cluster failover? It's a feature or the problem of setting or just a bug? Thanks for reply.
Here is my setting of redisson:

Here is my redisson connection count and details, and you can see there are many connection idle time is larger than 10s, cmd is NULL, and connection number is larger than masterConnectionMinimumIdleSize, but is does not release the idle connection.

Could anyone reply the question? It's a feature or a bug?

Redisson idle connections are remain for elected slave as master. Because this node remains in slave connection pool but in non-active state. These connections are preserved for case when your cluster lost all slaves. In this case master become used as slave and idle-connections become in use.

Thanks for replying my question.
When I do several master failover to test, it seems that idle connections would increase and not be released, is there a mechanism for release them?

idle connections to new elected master?

Fixed


Retire Msa through revocation

Goal
The goal of this PR is to retire an Msa for free by revoking all keys and delegation relationships associated with it.
Closes #44
Discussion

Checklist

[ ] Chain spec updated
[ ] Updated the js/api-augment code if a custom RPC added/changed
[ ] Design doc(s) updated
[ ] Tests added
[ ] Benchmarks added
[ ] Weights updated

Pausing work on this to clarify what should happen to revoked/retired keys, especially since it can be a unbounded transaction.
Pushed all current work. There is a failing test 'it_retires_msa_despite_key_revoked_error". Again, the validity of this test will be determined after discussion with @wilwade next week


[Feature] Network usage graphs

Could you add a way to monitor network usage to system metrics? (assuming this hasn't yet been done)
(our old project had to hack around it by grepping /proc/net/dev)

Hi @yaroslavvb , I believe we do provide network usage by default. You should be able to find it in the Settings panel section, though you might have to scroll through the pages in the section.

@tyomhak I think the issue with the current Network Traffic usage is that it's cumulative. What would be more useful is to have MBytes/s over time.

Thanks a lot for sharing meter.py under a permissive license @yaroslavvb ! You may want to not only filter the loopback network interface line.startswith('lo') but also bond or you'll see double the real bandwidth in some systems, e.g. INTERFACE_FILTER = re.compile('^(lo|face|bond.+|.+\.\d+)$')

Indeed, the cumulative usage in current wandb is not directly useful -- instead it should show MB/sec rather than total MB, MB/sec graph can tell if you you are being bottlenecked by network performance.

I took Yaroslav's code and created the iometrics pip package.
The easiest way to have MB/sec network/disk metrics end up in WandB is to use PyTorch-Lightning callbacks integration:
from pytorch_lightning import Trainer
# pip install iometrics
from iometrics.pytorch_lightning.callbacks import NetworkAndDiskStatsMonitor

net_disk_stats = NetworkAndDiskStatsMonitor()

trainer = Trainer(..., callbacks=[net_disk_stats], ...)

WandB folks: feel free to go through the Pure-Python implementation and integrate the pieces into the WandB agent. If you find any bugs please let me know:)

Thanks @elgalu this is really cool!  We'll look into integrating it directly.

This feature has been implemented as of Feb 2023


Python Connection Error

I've a problem running train.py 'cause a KeyError is shown and I don't know how to fix it, below is shown the execution of train.py and the redirection to cortex.py
C:\cortex-v2-example-master\python>train.py
query headset --------------------------------
The headset EPOCPLUS has been connected.
request access --------------------------------
authorize --------------------------------
Traceback (most recent call last):
  File "C:\cortex-v2-example-master\python\train.py", line 234, in <module>
    t.do_prepare_steps()
  File "C:\cortex-v2-example-master\python\train.py", line 51, in do_prepare_steps
    self.c.do_prepare_steps()
  File "C:\cortex-v2-example-master\python\cortex.py", line 218, in do_prepare_steps
    self.authorize()
  File "C:\cortex-v2-example-master\python\cortex.py", line 137, in authorize
    self.auth = result_dic['result']['cortexToken']
KeyError: 'result'

Another Error is shown
Traceback (most recent call last):
  File "C:\cortex-v2-example-master\python\train.py", line 234, in <module>
    t.do_prepare_steps()
  File "C:\cortex-v2-example-master\python\train.py", line 51, in do_prepare_steps
    self.c.do_prepare_steps()
  File "C:\cortex-v2-example-master\python\cortex.py", line 220, in do_prepare_steps
    self.create_session(self.auth, self.headset_id)
AttributeError: 'Cortex' object has no attribute 'auth'

what is the result of
result_dic
I think Cortex return error in response of request "authorize".

Investigated the code further and found that it all originates from this in "result": {'error': {'code': -32027, 'message': 'The application does not have permission to use the license.'}, ' id ': 4,' jsonrpc ':' 2.0 '}.
In another issue I saw that license don't have API access.
My emotivID is carlosantonio and my clientID tXtEeB6XE2aqlBBLJtstvGzKHlhctniBVXwYB856

@CarlosA-Mtz , you should contact our css team to request API access with your license.

where do I communicate with the CSS team?

Hi @CarlosA-Mtz
Please use this form on the Emotiv e]web site :)
https://www.emotiv.com/contact-support/

I need a subscription for use the code?

Hi @CarlosA-Mtz
It depends on what you want to do.
Most of features are available for free: mental command, facial expressions. motion data, performance metrics, etc...
But you need a paid subscription to get the raw EEG data.


Rework type hierarchies

This is a series of breaking API changes that implement the proposals from https://github.com/gtk-rs/cairo/issues/258.
The following methods are added on Surface, although they are only relevant to surfaces created with {Pdf,Ps,Svg}Surface::for_{raw_,}stream. (They return None or Ok(()) in other cases.)
pub fn take_output_stream(&self) -> Option<Box<dyn Any>> {…}
pub fn take_io_error(&self) -> Result<(), io::Error> {…}
pub fn borrow_output_stream<'surface>(&'surface self) -> Option<RefMut<'surface, dyn Any>> {…}
pub fn borrow_io_error<'surface>(&'surface self) -> Result<(), RefMut<'surface, io::Error>> {…}

Thanks, looks generally good to me :)

I’ve realized that my use of UnsafeCell was unsound. Even though it feels that you would have to actively go out of your way to cause trouble, it is possible in safe code to make a type that implements io::Write and owns a reference-counted clone of the Surface, then for example use take_output_stream to end up with multiple &mut references to itself.
I’ve switched to a RefCell and using try_borrow_mut in the callback to avoid borrow_mut’s panic, and a Cell<bool> to keep track of failed borrows. (We do handle panics, but need mutable access to the environment to save the payload!)
This enables safely borrowing the stream or I/O error without removing them (by returning a std::cell::RefMut after using RefMut::map), so I’ve replaced the boolean methods with that. The new APIs for all surfaces are now:
pub fn take_output_stream(&self) -> Option<Box<dyn Any>> {…}
pub fn take_io_error(&self) -> Result<(), io::Error> {…}
pub fn borrow_output_stream<'surface>(&'surface self) -> Option<RefMut<'surface, dyn Any>> {…}
pub fn borrow_io_error<'surface>(&'surface self) -> Result<(), RefMut<'surface, io::Error>> {…}

Nice!

I'll try to have a look at some point today...

What’s the way to deal with CI failure because of code in other repositories? I have a hard time even reproducing the failure.

What’s the way to deal with CI failure because of code in other repositories? I have a hard time even reproducing the failure.

For the docs related failure, that's @GuillaumeGomez special area of expertise :)
The failure in gdk needs a PR to be submitted here: https://github.com/gtk-rs/gdk
And we'll simply ignore that CI failure here, merge the cairo PR, then merge the gdk PR once its CI succeeded. Unfortunately there's no clean way implemented right now to make the CI happy all the way.
Btw, please also remove the unneeded mut in image_surface.rs :)

Weird. The rustdoc-stripper might not work perfectly in macros...

Might also be a good idea to test that panicking in streams works, such as:
#[test]
#[should_panic]
fn panic_writer() {
    struct PanicWriter;

    impl io::Write for PanicWriter {
        fn write(&mut self, buf: &[u8]) -> io::Result<usize> { panic!("panic in writer"); }
        fn flush(&mut self) -> io::Result<()> { panic!("panic in writer"); }
    }

    let surface = PdfSurface::for_stream(20., 20., PanicWriter);
    surface.set_size(100., 100.);
    draw(&surface);
    surface.finish();
    surface.take_output_stream();
}

What's the status here? Is everybody happy with the changes, are all review comments handled? :)

What's the status here? Is everybody happy with the changes, are all review comments handled? :)

I think mine aren't. I have two suggestions:

Call finish() as part of take_output_stream() (if you guys agree)
Add the panic test above (ditto)

I’ve added some tests.
As the last commit (48ee818b24aae56e79c76443b8c50cc079a7c24b) shows, it’s easy to forget to check for IO errors and accidentally ignore them.
Calling finish in take_output_stream would exacerbate this, since finish can (and typically does) cause more writes to happen and these writes can return an IO error. So it might be better to have a single method that combines finish, checking for error, and returning the stream. However the signature can quickly become unwieldy.
fn finish_output_stream(&self) -> (Option<Box<dyn Any>>, Result<(), io::Error>)

However a tuple doesn’t benefit from #[must_use], so a top-level Result might be preferable. But a user might want recover the stream even in the error case.
fn finish_output_stream(&self) -> Result<Option<Box<dyn Any>>, (io::Error, Option<Box<dyn Any>>)>

Maybe we culd simply a bit by removing the Option layer and returning Box<dyn Any> of a private zero-size type instead of None (when the output stream was already taken, or there wasn’t one in the first place). This would make downcast always return an error in those cases (since users do not have access to this private type). This makes user code less noisy (with potentially fewer unwrap calls) but maybe it becomes less easy to follow everything that goes on.
fn finish_output_stream(&self) -> Result<Box<dyn Any>, (io::Error, Box<dyn Any>)>

A Result value can be used with the ? operator, but perhaps not easily if the error type is a tuple that doesn’t implement any conversion. So we could add a dedicated error type:
impl Surface {
    fn finish_output_stream(&self) -> Result<Box<dyn Any>, ErroredStream> {…}
}
pub struct ErroredStream {
    pub error: io::Error,
    pub stream: Box<dyn Any>,
}
impl From<ErroredStream> for io::Error {
    fn from(e: ErroredStream) -> Self {
        e.error
    }
}

… but yet another type adds “weight” to the API and doesn’t feel great.
Any opinion?

@SimonSapin: I have a preference for the last one. Yet another type but so much easier to read than the previously suggested...

I agree, the last one seems cleanest. And it probably makes sense to not provide a non-finishing take function for the stream but to ensure that the surface is first finished (i.e. only have the new function you propose here). It does not seem nice or useful to take away the stream before the surface is finished.

@SimonSapin Thanks for thinking through the various options here. FWIW I'd also say the last one is preferable.
Nit: Perhaps the error conversion impl could be generalized like:
impl From<ErroredStream> for T: From<io::Error> {
    fn from(e: ErroredStream) -> Self {
        Self::from(e.error)
    }
}

(Hope I'm not getting into bikeshedding teritory too much.)

Eh, sorry I wasn’t clear. I didn’t mean this as a closed set of signatures to choose from. Rather, there’s a series of trade-offs that don’t have an obvious answer to me. For example:

Is an Option useful to separately signal cases where the surface doesn’t have an output stream (or where it was already taken), or is Box<dyn Any> of a dummy private concrete type a good idea and not too hard to understand?

Or even should these APIs panic it those cases?
Should the answer be the same for the two cases?

Is it worth having the Result at the "top-level" even if this makes the signature more complex? (With the stream type in two places)

If so, does a “stream + IO error” struct carry its weight compare to a tuple?
Or should we have neither because no-one even care about recovering the stream in the error case?

@vojtechkral I think that impl coherence rules would not allow this, because neither T nor From is crate-local. And even if it did, this kind of overly-generic API can become hard to use as more turbofishes are required because type inference doesn’t have enough context to determine an "intermediate" type parameter.

Is an Option useful to separately signal cases where the surface doesn’t have an output stream (or where it was already taken), or is Box<dyn Any> of a dummy private concrete type a good idea and not too hard to understand?
* Or even should these APIs panic it those cases?

* Should the answer be the same for the two cases?

My vote here would be to panic. If it's called on a surface that the user did not create with a stream, then there's something very wrong in the user code.

Is it worth having the Result at the "top-level" even if this makes the signature more complex? (With the stream type in two places)
* If so, does a “stream + IO error” struct carry its weight compare to a tuple?

* Or should we have neither because no-one even care about recovering the stream in the error case?

IMHO the struct with stream+error in a Result gives the nicest API here

My vote here would be to panic. If it's called on a surface that the user did not create with a stream, then there's something very wrong in the user code.

If it potentially comes from user code, then I'd prefer avoid panics if possible. But not sure if this is better in here...

If it potentially comes from user code, then I'd prefer avoid panics if possible. But not sure if this is better in here...

What do you expect the user to do, other than panicking, with the None that they expect to be Some(stream) in their code? :)

Basically yes. :laughing:

Thanks, lgtm :)

Alright. The signature is now:
pub fn finish_output_stream(&self) -> Result<Box<dyn Any>, StreamWithError>

It panics when called more than once, or if there was no output stream to begin with.
I’ve removed the borrow_* methods. While it’s cool that they can safely be implemented, they’re not useful without also calling Surface::finish at which point the surface pretty much can’t be used anymore so one might as well call finish_output_stream instead.

@vojtechkral @GuillaumeGomez @gekola @meh Does it look good to all of you too? IMHO we're done here now :)

LGFM, but doc-check better fixed by updating lgpl-docs or adding  src/stream.rs etc. to IGNORES in build.rs

lgtm, @SimonSapin thanks for doing all this

As promised to @SimonSapin, he did his part. I'll just check what's missing on the other repositories then merge this PR. Thanks a lot @SimonSapin !

Indeed, thanks a lot for cleaning this up @SimonSapin :)

It'll require to update gdk. I'll do it shortly. Thanks a lot @SimonSapin !


RFC: Enhancement of DCS Dropzone Mod Manager with install.md File Integration

1. Introduction
Background
DCS Dropzone has evolved to use Markdown files with YAML front matter for mod properties and release information. This approach has significantly improved flexibility and clarity. However, there's still potential for further enhancement, particularly in the installation process of mods.
Objective
This RFC proposes the integration of an install.md file into the DCS Dropzone Mod Manager. The install.md file will contain instructions for creating symlinks to target directories, enhancing the mod installation process. Additionally, it will handle hash-routed files, streamlining the process of sourcing mod files from external URLs.
2. Proposed Changes
New File: install.md

Purpose: install.md will serve as an instruction set for creating symlinks from the mod package to the target directories in the user's file system.
Contents: It will contain YAML front matter for listing files/folders and their target directories. Additionally, it will support hash-routed URLs for sourcing files.

Structure of install.md

The file will list each file/folder in the mod package that needs to be symlinked.
For each item, the source URL (possibly hash-routed) and the target directory on the filesystem will be specified.

Example install.md
---
- source: "http://xyz.com/simple-script.lua"
  target: "/path/to/target/directory/simple-script.lua"

- source: "http://xyz.com/my-mod.zip/#/my-folder/script.lua"
  target: "/path/to/target/directory/script.lua"

- source: "http://xyz.com/my-mod.zip/#/my-folder/texture.png"
  target: "/path/to/target/directory/texture.png"

- source: "http://xyz.com/my-mod.zip/#/my-folder"
  target: "/path/to/target/directory"
---
Instructions or additional notes about the installation process.

Handling Hash-Routed Files

The install.md file will support hash-routed URLs, enabling the sourcing of specific files within a ZIP file hosted externally.

3. Advantages

**Efficient Installation Process: ** Automating the creation of symlinks through install.md simplifies the mod installation process and allows the mod author to have complete control of exactly whats linked.
Explicit Downloading: Hash-routed URLs offer a way to fetch the assets and unpack them, but the hash routing allows the enable/disable process to work independently.
Clear Instructions: install.md provides clear, structured instructions, beneficial for both mod creators and users.
Compatibility: This system maintains compatibility with existing YAML and Markdown-based structures in DCS Dropzone.

4. Implementation Considerations

Security: Ensure secure handling of external URLs and file operations to prevent vulnerabilities.
Documentation: Provide clear documentation for mod creators on how to use install.md.

The general workflow of the Mod Manager would be
A) Subscribe to a mod

DCS Dropzone calculates the Asset URLs (Grab everything before # and dedupe)
DCS Dropzone downloads all assets into a mod folder.
DCS Dropzone unpacks any assets that are needed i.e. ZIPs

B) Enable a mod

DCS Dropzone calculates FS paths for the assets based on deterministic behaviour (i.e. converts http://xyz.com/simple-script.lua to $MOD_ID/simple-script.lua and http://xyz.com/my-mod.zip/#/my-folder/texture.png to $MOD_ID/my-mod_zip/my-folder/texture.png
DCS Dropzone creates symlinks between folders & files (as determined above) and their targets
DCS Dropzone records the symlinks for reference later when removing.

C) Disable a mod

DCS Dropzone removes all symlinks as stored earlier.

D) Unsubscribe to a mod

DCS Dropzone disables if enabled
DCS Dropzone deletes mod folder

source: "http://xyz.com/simple-script.lua"
target: "/path/to/target/directory/simple-script.lua"

This sounds good but doesn't account for the download link changing per release. We can't expect users to put in the full download link on each release it kinda kills the automated part of the release process

Yea so the GH integration would assemble this and commit it along with the release file and create the commit to the registry.
manual releases I don’t see the issue people just author a new commit.

I think a simple asset-mapping file is perfectly reasonable to ask devs to upload as part of a release or commit to the repository. This then solves a few issues.

We can then support multiple versions of software at once while still being resistant to changes in mod installation
We no longer need to do anything complex to figure out download paths (it's either full path or references another downloadable file in the release)
This file can reference a version and therefore be stored as the version and a local enable/disable config that means its offline capable.

Closing this one as I think we have a solid baseline now with the current install.md


Loss of nanosecond resolution when constructing Timestamps from str

Looks like a bug: When passing a YYYYMMDDTHHMMSS.f string to pd.Timestamp, the resolution seems limited to micro- rather than nano-seconds:
>>> pd.Timestamp('20130101T000000.000001+0000')
Timestamp('2013-01-01 00:00:00.000001+0000', tz='UTC')

>>> pd.Timestamp('20130101T000000.0000001+0000')
Timestamp('2013-01-01 00:00:00+0000', tz='UTC')

>>> pd.Timestamp('20130101T000000.00000001+0000')
Timestamp('2013-01-01 00:00:00+0000', tz='UTC')

The behavior seems correct when using a different string format:
>>> pd.Timestamp('2013-01-01 00:00:00.00000001+0000')
Timestamp('2013-01-01 00:00:00.000000010+0000', tz='UTC')

Using pandas 0.16.0, python 2.7.6

Because dateutil doesn't support nanosecond, it looks little difficult to cover all the cases to nanoseconds (see #7905).
One option is to prepare a parser to support some popular date formats. For example, change (or prepare separate function like) np_datetime_string.c to allow formats other separators or without separators (like suggested in #9714).
A PR would be appreciated :)


[BUG] - CSI not able to mount volume to node

Describe the bug
Worker node is not able to have a volume mounted. The PVC is in a ready state and the volume exists however the volumeattachments.storage.k8s.io object is reporting ATTACHED=false with the message rpc error: code = DeadlineExceeded desc = context deadline exceeded.
This has happened twice in the last 2 weeks with both a newly created volume and an existing volume after a work load shift between nodes.
To Reproduce
Not exactly sure how to reproduce however the following is the description of the volumeattachment when the error occurs
Name:         csi-b1725867<REDACTED>
Namespace:
Labels:       <none>
Annotations:  csi.alpha.kubernetes.io/node-id: d5b41b30-<REDACTED>
API Version:  storage.k8s.io/v1
Kind:         VolumeAttachment
Metadata:
  Creation Timestamp:  2022-11-18T09:47:38Z
  Finalizers:
    external-attacher/block-csi-vultr-com
  Managed Fields:
    API Version:  storage.k8s.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:csi.alpha.kubernetes.io/node-id:
        f:finalizers:
          .:
          v:"external-attacher/block-csi-vultr-com":
    Manager:      Go-http-client
    Operation:    Update
    Time:         2022-11-18T09:47:38Z
    API Version:  storage.k8s.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
        f:attacher:
        f:nodeName:
        f:source:
          f:persistentVolumeName:
    Manager:      kube-controller-manager
    Operation:    Update
    Time:         2022-11-18T09:47:38Z
    API Version:  storage.k8s.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        f:attachError:
          .:
          f:message:
          f:time:
    Manager:         Go-http-client
    Operation:       Update
    Subresource:     status
    Time:            2022-11-18T22:18:15Z
  Resource Version:  11029444
  UID:               262caf1b-<REDACTED>
Spec:
  Attacher:   block.csi.vultr.com
  Node Name:  <REDACTED>
  Source:
    Persistent Volume Name:  pvc-<REDACTED>
Status:
  Attach Error:
    Message:  rpc error: code = DeadlineExceeded desc = context deadline exceeded
    Time:     2022-11-18T22:18:15Z
  Attached:   false
Events:       <none>

Expected behavior
When a PVC has been defined and the PV is created, the volume should be able to be mounted to a pod without issues.
Screenshots

Desktop (please complete the following information where applicable:

OS - Vultr managed VKE cluster

After some additional debugging, the following was also noted

A reboot of the host did not fix the issue
If only 11 volumes are mounted to a node, all volumes mount as expected.
if 12 (or more) volumes are scheduled to be mounted to a node, only 11 will successfully mount.

Nov 19 10:52:01 <REDACTED> kubelet[2945]: E1119 10:52:01.983018    2945 kubelet.go:1731] "Unable to attach or mount volumes for pod; skipping pod" err="unmounted volumes=[registry-data], unattached volumes=[registry-config registry-data registry-htpasswd]: timed out waiting for the condition" pod="<REDACTED>"
Nov 19 10:52:01 <REDACTED> kubelet[2945]: E1119 10:52:01.983858    2945 pod_workers.go:965] "Error syncing pod, skipping" err="unmounted volumes=[registry-data], unattached volumes=[registry-config registry-data registry-htpasswd]: timed out waiting for the condition" pod="<REDACTED>" podUID=e5738463-891c-4d6d-9cd1-4d54680f55cd