feat: add more validation

Explanation
Add more validation.
Fixes #851

@eddycharly CI is failing

@shubham-cmyk yup, i pushed a fix


💡 Edge Add-ons active installation count

:clipboard: Description

Add a new badge for the amount of active installation of an Edge Add-ons just like the one for the Chrome Web Store /chrome-web-store/users/:storeid:

:link: Data

Microsoft seems to have opened a new REST API for the Add-ons. You can have a lot of infos about qn qdd-on by calling:
https://microsoftedge.microsoft.com/addons/getproductdetailsbycrxid/{addonsId}

Example with dark-reader:
https://microsoftedge.microsoft.com/addons/getproductdetailsbycrxid/ifoakfbpdcdoeenechcleahebpibofpc
The result is a JSON object with the property activeInstallCount.
:microphone: Motivation

It's really important for browser extensions to be easily able to show in a README how much users they already have. It's possible for Chrome and firefox but not edge since there was no API. Now that one is available, it would be nice to implement it. I could try to implement this new badge by my own since it's simply a copy of the Chrome Web Store one.
Thanks again for your work on this project 🙏

Is there any documentation for this API?

They don’t mention it in the official edge Add-ons API https://learn.microsoft.com/en-us/microsoft-edge/extensions-chromium/publish/api/using-addons-api. However it seems consistent and can be easily tested what do you think?

OK thanks. The reason we say

Badges should not obtain data from undocumented or reverse-engineered API endpoints.

in our guidelines
is because we had some situations where a contributor worked out that a project had an API by inspecting the frontend code for their website or whatever, added a badge that calls it, and then we ended up relying on an API that wasn't really intended for public use. This then either annoyed the maintainers of the company/project behind it or we had no reasonable expectation of stability/compatibility over time (because devs maintaining the the API were making the assumption the only thing consuming it was their own frontend code) and stuff kept breaking.
That's pretty much the situation we've got here so I am going to close this issue, but we could revisit in future if there is a reliable public source for the data. It looks like this badge suggestion meets all our other criteria.

Completely understand the situation. Hope that MS will make this API officially public and I will watch it closely.


XREAD got unexpected empty response

Search before asking

[X] I had searched in the issues and found no similar issues.

Version
OS：centos6.9
KVRocks：2.3.0
redis-cli：6.2.6/4.0.10
Minimal reproduce step
I have a cluster of kvorkcs，3 master and 3 slave
setup 1：I randomly logged in to a node to execute the command
redis-cli -c -h IP1 -p PORT1 -a password
XREAD BLOCK 10000 STREAMS test-mq $
Please make sure that there is redirection happening when executing the XADD command.
setup 2：Login again to the same node
redis-cli -c -h IP1 -p PORT1 -a password
XADD test-mq * key1 value1
What did you expect to see?
I would like to see normal consumption data, for example.

"test-mq"

"1681209941456-0"

"key1"
"value1"
(3.51s)

What did you see instead?
I can see that the consume command in step 1 is unable to see the data and only sees an empty message.
(nil)
(10.00s)
Anything Else?
No response
Are you willing to submit a PR?

[X] I'm willing to submit a PR!

Please make sure that there is redirection happening when executing the XADD command.

Do you mean need to trigger the slot migration between step 1 and step 2?

OK, thanks. I got your point now.

@git-hulk Do we need something to do in order to resolve this issue?


Send initial zero value

Hey Alexander,
similar to issue #8 I'd like to propose to send a zero value for metrics that haven't been processed before. The reason for this is that I'd like to create a dashboard based on metrics that ideally never have a value greater zero (e.g. a counter for a "this shouldn't happen" exception) but I still want to save some money and not send a zero on every interval.
Let me know what you think and how I might help. Thanks.
Dimitri

Thanks for that. Feel free to issue a PR similar to https://github.com/azagniotov/codahale-aggregated-metrics-cloudwatch-reporter/pull/9


Create remove_VPC.sh

Add VPC list function and reconfirmation function.

Hi Lucas,
Thank you for this merge request!
I'll take time to test it on my side, but I think your script is way more better than mine👍
Best regards,
Brent


Esfand related wordle

'kappa',
'twist',
'frick',
'jambo',
'gachi',
'peepo',
'henry',

Do you think that her list is every 5 letter english word?

I'd say it's pretty close to the every word. Or this list https://github.com/octokatherine/word-master/blob/main/src/data/words.tsx


drag does not work well in mobile

its working fine in pc but in mobile and touch screens draging does not work well at all
when i want to drag to right it immidietly attach to end
how can i fix this?

https://www.eynakstore.com/glasses-grid
this is the link
click the filter icon on the right and slider will apear

I changed it to react 😁

can you delete my issue please?


Add UMaine

the university official website URL: umaine.edu
a URL of a page on the official website where a long-term (>1 year) IT related course is offered by the university: catalog.umaine.edu
a URL of a page or some other proof (.pdf or a screenshot are OK) showing that the university recognizes the domain which you are submitting as an official email domain for the enrolled students: accounts.maine.edu, note that all emails found on UMaine website use the domain maine.edu.

@doizuc I am sorry, the domain maine.edu is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


Enforce privacy on domain models

We need to enforce privacy on our domain models:

No direct assignment of state, all state transitions must go through a "command" function (This will enable an easier transition of the internal state model to a graph or other things)
No direct reaching into fields (like cfd.order). The order MUST become an implementation detail of the CFD. These fields MUST NOT be pub.

FYI @bonomat @klochowicz @rishflab @da-kami @luckysori. Tagging everyone here so you guys are aware. When you come across this issue in other development tasks, please fix it on the way.

This can and should be tackled in multiple steps. The most pressing part of it is the oracle-event-id to unblock #627.
@rishflab Can you look into this please? Essentially, what we need to do is start working on https://github.com/itchysats/itchysats/issues/657.


dockerTools: Fix layer redundancy.

Motivation for this change
When building an image with multiple layers, files already included in an underlying layer are supposed to be excluded from the current layer. However, some subtleties in the way filepaths are compared seem to be blocking this.
For instance, consider this image composition:
{dockerTools, coreutils, bash}:

let
    coreutilsImage = dockerTools.buildImage {
        name = "coreutils-image";
        contents = coreutils;
    };

    bashImage = dockerTools.buildImage {
        name = "bash-image";
        contents = bash;
        fromImage = coreutilsImage;
    };
in
    bashImage

In the resulting image, the same version of glibc is present in both layers.
Things done

[ ] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] OS X
[x] Linux

[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Testing
I've tested locally with some private packages that build a chain of images. The resulting tar file is able to be loaded and run by Docker 1.12.0, and I've manually verified that duplication is no longer present.
Are there any further tests that would be appropriate? I wasn't able to find anything relying on this package in nixpkgs.

cc @the-kenny

Listing tar files consistently is a never ending issue :) Thanks.


Status file for job monitor

Uploads a status file that lets the web app know when a stage is complete.
Goes with https://github.com/chanzuckerberg/idseq-web/pull/1318

You may want to bump the minor-most version number for a change like this.


Cannot use pointer to generic type as interface without explicit conversion

What version of Go are you using (go version)?

$ go version
go version go1.18 darwin/arm64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/kyle.lemons/Library/Caches/go-build"
GOENV="/Users/kyle.lemons/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/kyle.lemons/go/pkg/mod"

GOOS="darwin"
GOPATH="/Users/kyle.lemons/go"

GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.18/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.18/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"

GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t8/cjh0whg91cz4xv7fqwhx374r0000gp/T/go-build2552819107=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.18 darwin/arm64
GOROOT/bin/go tool compile -V: compile version go1.18
uname -v: Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000
ProductName:	macOS
ProductVersion:	12.3.1
BuildVersion:	21E258
lldb --version: lldb-13<IP_ADDRESS>
Apple Swift version 5.6 (swiftlang-<IP_ADDRESS>3.62 clang-13<IP_ADDRESS>)

What did you do?
Minimal-ish runnable example: https://go.dev/play/p/ty4Joe4Qyzy
// We want to work with a set of concrete types, but they all implement an interface:
type Object interface {
	ID() uint64
}

// There is some off-the-shelf functionality that operates on that interface:
func Finalize(o Object) {
	fmt.Printf("Finalizing %T\n", o)
}

// We're trying to provide a type-safe abstraction that can be used for any of the
// set of concrete types that can be passed to the above functionality:
type ManageableObject[U any] interface {
	// The (U)nderlying type's pointer method set must implement the Object interface
	Object
	*U
}
type Manager[T ManageableObject[U], U any] struct { /* ... */ }

// We try something like the following naive code:
func (m *Manager[T, U]) Decode(raw string) {
	t := new(U)
	json.NewDecoder(strings.NewReader(raw)).Decode(&t)
	Finalize(t) // pass the type as the interface
	m.Objects[t.ID()] = t // call one of the interface methods on the type
}

This came up while working on building abstractions around the Kubernetes runtime.Object interface to provide type-safety for implementing Kubernetes controllers.  This requires having concrete types for creating, decoding, type asserting, and for dealing with the kubernetes client libraries, which tend to rely on runtime.Object heavily.
What did you expect to see?
I expect the above "naive" approach to compile.
What did you see instead?
The compiler must be told to check that these operations are allowed, but it does seem to allow them if you do.  See the example for two ways that the compiler can be "hinted" to allow this.  At a high level:
If you try to pass new(U) as an Object (which is implicitly valid by the type constraints)
cannot use t (variable of type *U) as type Object in argument to Finalize:
        *U does not implement Object (type *U is pointer to type parameter, not type parameter)

This can be worked around by explicitly converting the t (which is of type *U) to T (i.e. T(t)) which causes the code to compile.
Alternately, if you start out with var t T to begin with, you might see
cannot use t (variable of type T constrained by ManageableObject[U]) as type *U in assignment:
       T does not implement *U (type *U is pointer to interface, not interface)

This can also be worked around by converting t to *U (i.e. (*U)(t)) which causes the code to compile.
So, it seems like the compiler knows that these operations are safe, but has to be explicitly told to check for it.

The constraint on U is any, so a value of type *U doesn't have any methods, so *U does not implement Object.
The constraint on T is ManagableObject[U], and *U is embedded in that type, so it's OK to convert the type *U to the type T.  T also embeds Object, so any type argument that satisfies T must implement Object, so the conversion to Object is OK.
So this seems to be working as expected.
Yes, the compiler could deduce from the fact that some type argument satisfied T that *U must have an ID method.  But nothing says that explicitly, and it's not a trivial deduction.  Requiring the explicit conversion seems reasonable.
Closing because I think this is working as expected.  Please comment if you disagree.

Ah, ok so playing around with it a bit more I do agree.
The thing that I was missing, I think, is that when I say T(new(U)) that is actually adding information that then lets the compiler deduce that the implicit conversion to Object is allowed.  Similarly to how you can http.HandlerFunc(f) to "give" it the method, but can't pass f directly as an http.Handler.  If I just do Finalize(Object(t)) that also doesn't work, so it's not that I'm hinting to the compiler to do the interface check, it's that t actually doesn't implement the interface (according to the type system) until I convert it to T.


Improve diff matching

It should match against with the real module index, not sequence order.
e.g. This diff is indicating a very big change but it is caused by comparing wrong modules.
https://github.com/AcalaNetwork/Acala/issues/1256#issuecomment-888203916
🛠  modules.21.index.                                                    50 --> 45
🛠  modules.21.name.                                            "XcmpQueue" --> "SessionManager"

This just means it is comparing the wrong thing.

👍 I noticed that as well. Thanks for the report.

Closing this issue now as the version 0.20.0 is doing a much better job. Check both the diff and the new show commands.


Update azure-vmware-solution-platform-updates.md

Updated March 2024 section.

@jjaygbay1

Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@jkpravinkumar - These updates have been incorporated in the live article: https://learn.microsoft.com/azure/azure-vmware/azure-vmware-solution-platform-updates.
We'll close this PR. Thanks for contributing!

[like]  Pravinkumar Jeya Kumar reacted to your message:

From: Courtney Wales @.>
Sent: Wednesday, April 10, 2024 8:20:31 PM
To: MicrosoftDocs/azure-docs @.>
Cc: Pravinkumar Jeya Kumar @.>; Mention @.>
Subject: Re: [MicrosoftDocs/azure-docs] Update azure-vmware-solution-platform-updates.md (PR #120680)
@jkpravinkumarhttps://github.com/jkpravinkumar - These updates have been incorporated in the live article: https://learn.microsoft.com/azure/azure-vmware/azure-vmware-solution-platform-updates.
We'll close this PR. Thanks for contributing!
—
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/azure-docs/pull/120680#issuecomment-2048369911, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5LOJJMEBACBAKPIPEIAIMDY4WNI7AVCNFSM6AAAAABERS7MCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBYGM3DSOJRGE.
You are receiving this because you were mentioned.Message ID: @.***>


Missing Indentation

If a proper MODEL_PATH is defined this print statement will cause an error since best_model won't be defined in that case.

Good catch, but I think the better fix is to print MODEL_PATH instead of best_model. I will be submitting a fix shortly.


Error Message: From c:/opt/Ruby187/bin/pdfbeads:19

Hi. I'm using the Homer app which uses pdfBeads to use OCR and create a searchable pdf from .tif files. I keep getting this message
"From c:/opt/Ruby187/bin/pdfbeads:19"
Any idea what it means and what I can do about it?

I'm sorry, I honestly have no idea. Ruby 1.8.7 was before my time and isn't supported anymore. The best bet would be to reach out to the app package creators.


Plot TFR x-axis in seconds instead of milliseconds

Change time axis scale to seconds in AverageTFT.plot and AverageTFR.plot_topo.

hum evoked.plot and many other methods use ms
did I miss a conversation?

Here: https://github.com/mne-tools/mne-python/pull/4566#issuecomment-329785452

Any ideas what's wrong with CircleCI?

hum evoked.plot and many other methods use ms

evoked.plot is the only other one AFAIK, seconds is much more common. We
should consider changing it, too.

See also https://github.com/mne-tools/mne-python/issues/3164

-100 on shorter names. You should not put in papers "t (s)" this is cryptic.
maybe we can swtich between ms and s automatically. If more than 1.5s long then switch to seconds ortherwise use ms. If you look at early ERPs/ERFs you prefer to see ms

Comedy option: if instance.times is in integers, it's ms, if it's in floats, it's seconds.

@jona-sassenhagen you're scaring me...

:D

I don't know, t and f are such standard symbols that everyone should be able to identify (even more so if they come in combination with theirs units). Anyway, I can revert this change since no one will give me +100 :smile:.
Regarding the unit of time, let's always use seconds. I know it's very common in psychology to use ms, but for most cases the standard unit s is perfectly fine.

git grep -E "(T|t)ime \(ms\)":
doc/manual/gui/browse.rst:**Starting time (ms)**
doc/manual/gui/browse.rst:**Ending time (ms)**
examples/decoding/plot_ems_filtering.py:plt.xlabel('Time (ms)')
examples/decoding/plot_ems_filtering.py:plt.xlabel('Time (ms)')
examples/inverse/plot_compute_mne_inverse_epochs_in_label.py:plt.xlabel('time (ms)')
examples/inverse/plot_compute_mne_inverse_epochs_in_label.py:plt.xlabel('time (ms)')
examples/inverse/plot_compute_mne_inverse_raw_in_label.py:plt.xlabel('time (ms)')
examples/inverse/plot_covariance_whitening_dspm.py:    ax_dynamics.set_xlabel('Time (ms)')
examples/inverse/plot_dics_beamformer.py:plt.xlabel('Time (ms)')
examples/inverse/plot_label_source_activations.py:plt.xlabel('Time (ms)')
examples/inverse/plot_lcmv_beamformer.py:plt.xlabel('Time (ms)')
examples/inverse/plot_lcmv_beamformer_volume.py:plt.xlabel('Time (ms)')
examples/inverse/plot_mixed_source_space_inverse.py:axes.set(xlabel='Time (ms)', ylabel='MNE current (nAm)')
examples/inverse/plot_morph_data.py:plt.xlabel('time (ms)')
examples/inverse/plot_read_stc.py:plt.xlabel('time (ms)')
examples/stats/plot_cluster_stats_evoked.py:plt.xlabel("time (ms)")
examples/stats/plot_fdr_stats_evoked.py:plt.xlabel("Time (ms)")
examples/time_frequency/plot_source_space_time_frequency.py:plt.xlabel('Time (ms)')
examples/time_frequency/plot_time_frequency_simulated.py:ax.set(ylim=freqs[[0, -1]], xlabel='Time (ms)')
mne/viz/_3d.py:    ax.set_xlabel('Time (ms)', fontsize=18)
mne/viz/evoked.py:            ax.set_xlabel('time (ms)')
mne/viz/evoked.py:    ax.set_xlabel('time (ms)')
mne/viz/ica.py:    ax.set_xlabel('Time (ms)')
mne/viz/ica.py:    ax2.set_xlabel('time (ms)')
mne/viz/topomap.py:    ax.set_xlabel('Time (ms)')
tutorials/plot_mne_dspm_source_localization.py:plt.xlabel('time (ms)')
tutorials/plot_stats_cluster_1samp_test_time_frequency.py:plt.xlabel('Time (ms)')
tutorials/plot_stats_cluster_spatio_temporal_repeated_measures_anova.py:plt.xlabel('Time (ms)')
tutorials/plot_stats_cluster_time_frequency.py:plt.xlabel('Time (ms)')
tutorials/plot_stats_cluster_time_frequency_repeated_measures_anova.py:    plt.xlabel('Time (ms)')
tutorials/plot_stats_cluster_time_frequency_repeated_measures_anova.py:plt.xlabel('Time (ms)')
tutorials/plot_stats_cluster_time_frequency_repeated_measures_anova.py:plt.xlabel('Time (ms)')

If you get around to doing that, please also capitalise everything, see #4534

@jona-sassenhagen 😱 and I just wanted to propose to lowercase everything! Well I guess this is a matter of style, but MNE should at least be consistent.

Well, Alex said we should discuss what's better either way. But as @bgagl points out in #4535 , e.g. Nature requires:

Lettering in figures (labelling of axes and so on) should be in lower-case type, with the first letter capitalized and no full stop.)

And I'm sure you wanna publish in Nature :)

Fine, you win :smile:. So can we leave it at that in this PR? Changing everything to seconds instead of ms should probably be tackled in another PR. Same for capitalizing the labels.

Yes let's update other functions separately

Where's CircleCI?

Some random GitHub failure, I restarted it

Codecov Report

Merging #4587 into master will increase coverage by 1.2%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #4587     +/-   ##
=========================================
+ Coverage   85.84%   87.05%   +1.2%
=========================================
  Files         349      349
  Lines       65765    65780     +15
  Branches    10200    10203      +3
=========================================
+ Hits        56455    57263    +808
+ Misses       6455     5634    -821
- Partials     2855     2883     +28

thx @cbrnr


Update Issue - 70806704

default description
URL tested: http://ci.bsstag.com/welcome
Open URL on Browserstack

Property
Value

Browser
Chrome 77.0

Operating System
Windows 8.1

Resolution
1024x612

Screenshot Attached
Screenshot URL

Click here to reproduce the issue on Browserstack

Updated Screenshot Attached


License missing from gemspec

RubyGems.org doesn't report a license for your gem.  This is because it is not specified in the gemspec of your last release.
via e.g.
spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed.  As you can image, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to  display the rails gem license.
There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec.  This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.
I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!
Appendix:
If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool.  Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies
p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post aobut this project for more information.

@bf4 This project is MIT licenced as per the LICENSE file. I'll happily accept a PR if you wish to update the gemspec.

PR submitted :)

@bf4 Awesome - thankyou!

Thanks for the great library!


Re-add support for Ruby 1.9.3

Fixes #13, follow-up to #11.
We need a fix for https://github.com/jekyll/jekyll-gist/pull/7#issuecomment-128341980 that works in Ruby 1.9.3.
/cc @gr4y

I will take a look at that when my Mac finsihed compiling ruby 1.9.3, which might take some more minutes. But I just asked my self if the issue #7 will be un-fixed by fixing #13.
Net::OpenTimeout is not available in Ruby 1.9.3 which indicates that the timeout which fixed #7 won't be available either in net/http in 1.9.3.

net/http in Ruby 1.9.3 throws an TimeoutError when it times out. In Ruby 2.0 net/http throws an special Exception for each timeout.
So by just removing the ReadTimeout and OpenTimeout from the code I ran into undefined method empty?' for #URI::HTTPS:0x007fd203cd4240`
So I tried wrapping the begin..rescue..end block into another begin..rescue..end block and catching NameError, which worked out, but results in missing noscript and failing specs even when the network connection is working fine.

So what's your plan on this? I seriously don't know what to do except removing the feature introduced in #7 or reverting the commits made in #11 to fix that.

So I tried wrapping the begin..rescue..end block into another begin..rescue..end block and catching NameError

Lol a NameError is usually not something you want to catch... If empty? doesn't exist somewhere, then some code is borked and we need to figure out where it went wrong there.
I think I fixed it by just spiking those error classes out.

@parkr I guessed that catching NameError won't be a smart idea. By the way: I haven't heard the term "spiking out" ever before. Seems I am a little out of the loop when it comes to ruby. Sorry about that. :sob:

By the way: I haven't heard the term "spiking out" ever before. Seems I am a little out of the loop when it comes to ruby. Sorry about that.

It's absolutely no problem! "Spike out" is an idiom. When I say "Spike out code", I mean "write the initial version". A working scaffold. Sorry for that! I should be more considerate of people who don't speak idiomatic English.

It's a rather cool way to fix backwards compatibility problems like that one, so I learned something new here. :smile:


Slave with error should be excluded from failover

Topology (lab):
orche (orchestrator)
orch-1 (mysql master)
orch-2 (mysql slave)
How to reproduce:

stop the replica generating an error on slave
create database on mysql-2
create same database on mysql-1
the following error is generated:
Can't create database ...  Affected replicas: {countSlaves}' >> /tmp/recovery.log"
  ],
  "PreFailoverProcesses": [
    "echo 'Will recover from {failureType} on {failureCluster}' >> /tmp/recovery.log"
  ],
  "PostFailoverProcesses": [
    "echo '(for all types) Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}' >> /tmp/recovery.log"
  ],
  "PostUnsuccessfulFailoverProcesses": [],
  "PostMasterFailoverProcesses": [
    "echo 'Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Promoted: {successorHost}:{successorPort}' >> /tmp/recovery.log"
  ],
  "PostIntermediateMasterFailoverProcesses": [
    "echo 'Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}' >> /tmp/recovery.log"
  ],
  "CoMasterRecoveryMustPromoteOtherCoMaster": true,
  "DetachLostSlavesAfterMasterFailover": true,
  "ApplyMySQLPromotionAfterMasterFailover": true,
  "MasterFailoverDetachSlaveMasterHost": false,
  "MasterFailoverLostInstancesDowntimeMinutes": 0,
  "PostponeSlaveRecoveryOnLagMinutes": 0,
  "OSCIgnoreHostnameFilters": [],
  "GraphiteAddr": "",
  "GraphitePath": "",
  "GraphiteConvertHostnameDotsToUnderscores": true
}

Why should not happening
The slave server can be in Error state for some good reason and can be dangerous to promote this as Master, moreover the slave may be weeks late.
There is any way to avoid this?

Hi, can you please clarify what kind of error that would be? Not sure in what error state the replica was beforehand.

moreover the slave may be weeks late.

orchestrator explicitly checks that and prefers to promote a replica which has as less lag as possible, assuming other constraints are satisfied. You also have the configuration variables FailMasterPromotionIfSQLThreadNotUpToDate and DelayMasterPromotionIfSQLThreadNotUpToDate to further control behavior when none of the replicas ar eup to date, see https://github.com/github/orchestrator/blob/master/docs/configuration-recovery.md#promotion-actions

Sorry, I wasn't reading this right, need coffee. I can see the nature of the error in your original comment.

The situation you describe is a bit debatable. You have one master, one replica, the replica was broken at some stage, you kill the master. Should there or should there not be a promotion?
I believe FailMasterPromotionIfSQLThreadNotUpToDate is what you are looking for.

Thanks for the fast reply,
i have tested DelayMasterPromotionIfSQLThreadNotUpToDate and seems to work well,  can i use this instead of FailMasterPromotionIfSQLThreadNotUpToDate ?

@jsecchiero if the replica is known to be broken, then DelayMasterPromotionIfSQLThreadNotUpToDate will just wait forever -- I'm not sure you'd want that?

Please tell me if i'm wrong:
DelayMasterPromotionIfSQLThreadNotUpToDate wait ALL the slaves to have read all the relay logs
FailMasterPromotionIfSQLThreadNotUpToDate fail if at least ONE of the slaves have not read all relay logs
in both cases it's not optimal for me because, if i have more healthy slaves and one broken, in the first case i have to wait forever (as you said) and in the second case i don't have an automatic fail-over. It's correct?

sorry, that is exactly the opposite :)

DelayMasterPromotionIfSQLThreadNotUpToDate will wait until at least one replica is caught up that can also be promoted (meaning that's a server that can actually be a master, has good configuration etc.). When one replica is up-to-date and is good to be promoted -- it gets promoted and the failvoer is complete.

FailMasterPromotionIfSQLThreadNotUpToDate will fail if it can't find a single up-to-date replica. Thus, it fails when ALL replicas are very-much-lagging-or-broken.

Seems DelayMasterPromotionIfSQLThreadNotUpToDate
Is what I want. Thanks for the explanation


Add acceptance tests

Seems to be using older Node.js version (14), how come?

Seems to be using older Node.js version (14), how come?

prisma is throwing errors while generate with new version


DNCENGMAC055 doesn't trust the attached iPhone

DNCENGMAC055 doesn't trust the iPhone that is attached to it. This is causing work items running on that machine to fail.
Probably also need to open Xcode on the machine to make sure the connection works in Devices & Simulators.

/cc @dkurepa

Release Note Category

[ ] Feature changes/additions
[ ] Bug fixes
[ ] Internal Infrastructure Improvements

Release Note Description

I disabled the machine, it should stop taking in workitems now. We will enable it once the issue has been resolved

reported an ICM https://portal.microsofticm.com/imp/v3/incidents/incident/456984074/summary

Machine DNCENGMAC055 in osx.13.amd64.iphone.open has been enabled

resolved.


Fixed typo

Quick Checklist

[  ] I have read the contributing guidelines
[ ] I have written new tests, as applicable (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
[ ] I have added a changeset, if applicable

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Fixed a typo, changed width to height

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this
PR?)

Other information:

Thanks a lot!


support mac metal

The candle project has already released version 0.8, which supports Metal acceleration on macOS. You would like candle-vllm to also support Metal acceleration on macOS.

The candle project has already released version 0.8, which supports Metal acceleration on macOS. You would like candle-vllm to also support Metal acceleration on macOS.

Thank you for the suggestion! I recently acquired an M4 device, which I believe will help facilitate further development on macOS. However, the primary goal of this project is to port vLLM (Paged Attention) to the Rust platform. At this time, I am unsure whether Paged Attention is supported or can be implemented using Metal. If you're specifically interested in LLM inference on macOS within the Rust ecosystem, you might want to explore another project by Eric @EricLBuehler  that focuses on this area (mistral.rs).

Hi @zuowenjian! I added CUDA PagedAttention to mistral.rs some time ago, but I am now actively working on a Metal implementation.
@guoqingbao congrats on the M4! The PR for implementing PagedAttention on Metal can be found here: EricLBuehler/mistral.rs#1001. It's currently already able to run & compile (I've fully integrated the kernels, backend interop, scheduling, etc), but it doesn't produce correct output. I'm not sure what your experience with Metal is, but perhaps you have time to take a look? I can add you as a collaborator to push to the branch if you find anything!

Hi @zuowenjian! I added CUDA PagedAttention to mistral.rs some time ago, but I am now actively working on a Metal implementation.
@guoqingbao congrats on the M4! The PR for implementing PagedAttention on Metal can be found here: EricLBuehler/mistral.rs#1001. It's currently already able to run & compile (I've fully integrated the kernels, backend interop, scheduling, etc), but it doesn't produce correct output. I'm not sure what your experience with Metal is, but perhaps you have time to take a look? I can add you as a collaborator to push to the branch if you find anything!

Great work, Eric! Supporting Paged Attention on Apple Silicon is a promising direction. I've reviewed your PR, but I'm uncertain whether the Metal kernel for Paged Attention that you ported from CUDA is functioning as intended. Have you tested the paged_attention metal kernel in isolation before integrating it into mistral.rs? This might help narrow down the issue with the incorrect output.

The candle project has already released version 0.8, which supports Metal acceleration on macOS. You would like candle-vllm to also support Metal acceleration on macOS.

Given that Eric has successfully ported paged attention kernels to the Metal platform (https://github.com/EricLBuehler/mistral.rs/pull/1001), we can now support Mac devices in the candle-vllm project.

@guoqingbao thanks for the great work in #97!
@zuowenjian I think that Mac Metal is now supported!


warp 👉 wrap

What this PR does / why we need it:
Add your description
Which issue(s) this PR fixes (optional, close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
/cc @caitong93
/cc @kdada
Release note:

warp 👉 wrap

/lgtm

/lgtm


Automate recovery

:+1: I'm using this to backup my server and I'd definitely feel more comfortable if recovery was automated ^_^


[Bug]: Cloudflare-pages preset not working with Beta 2

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
It seems that trying to build a solid-start application using vinxi generates a broken non-deployable output
From the terminal logs I think that the fetch handler might be omitted from the build output:

Expected behavior 🤔
npm run build should produce a functioning Cloudflare Pages application
Steps to reproduce 🕹
Steps:

Create a new solid start application (docs):

npm init solid@latest

Use the cloudflare-pages preset in your vite.config.ts (docs):

import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
  start: {
    server: {
      preset: "cloudflare-pages"
    }
  }
});

run npm run build, notice in the terminal that the correct preset gets picked up:

run npx wrangler pages dev dist/ to see the following error in the terminal:

Minimal Reproduction
In case it helps I've created a minimal reproduction for this: https://github.com/dario-piotrowicz/solid-start-beta-2-cloudflare-pages-preset-build-not-working-repro

Let me know if this helps.
Two issues here:
1. Should be the same problem as https://github.com/nksaraf/vinxi/issues/77
Use overrides so you don't get two versions of vinxi. Workaround until new version of solid-start is published.
{
...
 "engines": {
    "node": ">=18"
  },
  "overrides": {
    "vinxi": "0.0.64"
  }
}

2. Preset config
Taken from the start docs source
export default defineConfig({
  start: {
    server: {
      preset: "cloudflare-pages",
      rollupConfig: {
        external: ["__STATIC_CONTENT_MANIFEST", "node:async_hooks"]
      },
    }
  }
});

Not a cloud flare user myself... maybe __STATIC_CONTENT_MANIFEST is not neede not sure...
Tested it with:
npx wrangler pages dev dist/ --compatibility-flags="nodejs_compat"

It's because of Async Local Storage. They support it with Node compat  flag but unenv won't not patch it by default because that flag isn't default. I know cloudflare_modules works. But unclear if pages works with that setting. Trying to use the default cloudfloare workers with that setting didn't because it complained that it couldn't find a global, because it builds to like a IIFE or something with no modules.

@edivados Thanks a bunch your suggested solution does the job 😄 :+1: ❤

PS: "__STATIC_CONTENT_MANIFEST" is a workers only thing and unrelated/unneeded in Pages

Use overrides so you don't get two versions of vinxi. Workaround until new version of solid-start is published.

Any ETA on this?
I'm asking since we allow the creation of solidStart applications in our C3 tool which currently generates a broken solidStart application and we want to fix that, if it's going to take long for this to get fixed we will need to manually add the override to generated solidStart apps, otherwise I think we can wait a bit (a few days) for this to get properly fixed upstream

It's because of Async Local Storage. They support it with Node compat flag but unenv won't not patch it by default because that flag isn't default. I know cloudflare_modules works. But unclear if pages works with that setting. Trying to use the default cloudfloare workers with that setting didn't because it complained that it couldn't find a global, because it builds to like a IIFE or something with no modules.

Using workers for applications (so in nitro the cloudflare and cloudflare_module presets) is actually not really recommended since it uses the deprecated workers sites feature (that besides other things it also involves that ugly __STATIC_CONTENT_MANIFEST import).
So I think that making sure that this works with Pages (the cloudflare_pages preset) is much more valuable than having it working with workers (too bad the cloudflare_pages preset is marked as experimental in the nitro docs since as I said I think that that is the most valuable one 😕)
Thankfully requiring users to add the
rollupConfig: {
  external: ["node:async_hooks"]
},

code doesn't look too too bad to me (especially since we can do that for the in C3)

@dario-piotrowicz Vinxi version should be fixed in @solidjs/start 0.4.3 which I released yesterday.
I'm glad to hear this is all working.

@ryansolid Thanks a bunch, I just tried it and it works 🙂
I'm also nice to see the config types improved 🤩
There is however a last small issue I think 😅
That's related to the new types (a bit unrelated to this gh issue), is start.solid truly mandatory?

It doesn't really seem to be since the following seems to be working totally fine:

Also notice the lack of the:
rollupConfig: {
  external: ["node:async_hooks"]
},

so... it seems like that's actually no longer needed? 😮

so... it seems like that's actually no longer needed?

I did a partial polyfill. It is imperfect. I suggest keeping that there. Technically if you grab the request at any synchronous entry to your code it works but we need async local storage to support async grabbing of the event. You might not need it in your case, but it may come up again later.

I think we are good now with 0.4.5 fixing the config?

@ryansolid sorry for the late reply 🙇
Yes I think we're good! 🙂
But before we close this issue I'd like to ask, if setting the rollupConfig is practically necessary for the Cloudflare preset, shouldn't there be some sort of validation to make sure that it is? instead of sort of hoping that the user sets it, and if they don't things might or not work correctly?

Hmm.. I don't usually write custom stuff like that but yeah maybe I can do it in our config.  We don't own the presets Nitro does. I could think of looking at the preset setting, although it can also be set via ENV variable. If we check both and see "cloudflare-pages" or "cloudflare-modules" maybe we could automatically add the right stuff. Although is there a way to make it so node compat is always turned on for SolidStart apps?

Hey @ryansolid, I'm sorry unfortunately currently there isn't any way to always turn on nodejs_compat for SolidStart apps
The team is currently looking into introducing a config file for Pages, once that is supported solid could just set the nodejs_compat flag there and that should get picked up by wrangler during deployment (and dev).
PS: this is an issue I've discussed with the Nitro team as well (cc. @pi0) maybe it'd be worth to sync up and discuss things together?

Ok I've created a new issue to track the config automation and closing this one.
Yeah we all share a common goal here so we should meet up.


Lights that max out at <255 brightness cause issues

When a light is turned on with a cbus switch to level 255, then is read back to 254 (its max), and that value is then populated back into cbus as the current value, a subsequent switch off of the light results in cbus2zigbee ignoring the command, unless the light is first dimmed.

2 issues:

Ignore not getting unset, there's some kind of race condition where you can get the light into a state where it'll just ignore cbus commands
value_max wasn't getting set because the variable wasn't referenced correctly

Ok what I THINK is happening with the race condition:

I have some lights that are "chatty" and report their power usage and things once every 2 or so seconds, and that comes in with a brightness report via mqtt
If I press a cbus button to change brightness to 0, and then one of those reports comes in concurrently, ignorecbus is set and never unset

Localbus event sender is set to "us" when a cbus message comes from Lua, whereas it's set to "cb" when it. comes from cbus

"us" = user interface / visualisation. I'd expect "sr" for set by a resident script, and yes, "cb" is C-Bus setting.

Here's a list of event.senders: https://forum.logicmachine.net/showthread.php?tid=1562&pid=9574#pid9574
on the SHAC, "cl" seems to be another script or the user interface, "us" seems to be the resident script, and "cb" seems to be cbus.
Maybe we set grp.sender to something custom, and then ignore anything back from ourselves?  Can do same thing with mqtt with ignoring messages from our own publisher name, and chop out the ignore logic entirely?
In the branch for this issue, I have a hacky fix for this issue - @autoSteve good to get your thoughts on fixing it properly.

This commit has the hacky fix: bfb399fce8e4a2f73a9bf72850ae8050dda31801

There is something very weird going on here. The script checks for level changed on inbound MQTT message, and only then sets ignoreCbus.
        if grp.getvalue(alias) ~= level then
          if logging then log('Set '..alias..' to '..level) end
          ignoreCbus[alias] = true
          SetCBusLevel(net, app, group, level, 0)
          zigbee[alias].value = level
        end

Definitely 'cl' for UI/scripts - doesn't seem to matter if it's a resident script or other.
On devices, can recommend IKEA, also all generic aliexpress temperature/humidity sensors I've tried seem to be pretty good.  I've also got some zigbee remote controls next to beds for lights (talking to HA) that work pretty nicely.
The best wired-in dimmer I've found is the Vesternet ones, also sold by ozsmartthings: https://www.ozsmartthings.com.au/products/oz-smart-zigbee-dimmer-puck-toggle - except for the max level of 254 weirdness!

I've been thinking about this.
Quite possibly the script should set C-Bus to 255 and not 254 should the max for that light be 254 and it be set to maximum brightness. i.e. 254==255. This would be C-Bus intuitive from that end, unless a C-Bus level of 254 were set, which would likely interfere but then could be force set back to 255 on the bus. Basically level 254 in C-Bus would not be able to be set for that given device.
In other words, set up to 254 for the Zigbee device, but allow C-Bus to only hit 255 and not 254.
Honestly. 254? Who came up with that brilliant idea? (Philips, I'm frowning in your direction...)


Upgrade moment.js version to 2.27.0

Description
Changes proposed in this pull request:

...
...
...

Related issue(s)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

/retest

/retest

/test pre-rafter-minio-gcs-gateway

/test pre-rafter-minio-gcs-gateway-migration


Not possible to set/update locale

Is there any plan to support it? Currently, we set it via window.CRISP_RUNTIME_CONFIG = { locale: intl.locale, session_merge: true };

Hey !
It is possible now: https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/npm/#run-a-trigger-manually


Set up config dir at init to avoid notebookapp hard-coding issues.

This one depends on notebook 4.1 released and conda packages available...

Merging this one now that 4.1 conda package it out there...


Node: merge_kokoro_logs.js: Cannot read property 'testsuites' of null

I saw this in recent builds, not sure how significant it is.
+ node merge_kokoro_logs.js
TypeError: Cannot read property 'testsuites' of null
    at merged.testsuites.testsuite.Array.concat.apply.objects.map (/Volumes/BuildData/tmpfs/src/github/grpc/grpc-node/merge_kokoro_logs.js:44:126)
    at Array.map (<anonymous>)
    at readDir.then.then (/Volumes/BuildData/tmpfs/src/github/grpc/grpc-node/merge_kokoro_logs.js:44:109)
    at <anonymous>
+ '[' true '!=' '' ']'

I think this is the same as #13085


Error deleting realm file

What happened?
Cant Delete realm file after close.
Repro steps
1.Close the realm.
2.Try to delete the file.
3.Boom
Version
2.2.1
What Atlas Services are you using?
Atlas Device Sync
What type of application is this?
Flutter Application
Client OS and version
iOS
Code snippets
//Get realm's file path
final path = realmSource.realm.config.path;
realmSource.realm.close();
await config.closeConfiguration();
print("Realm is closed: ${realmSource.realm.isClosed}"); // Prints TRUE
// Delete the realm
try {
  Realm.deleteRealm(path);
} catch (e) {
  if (kDebugMode) {
    print(e);
  }
}

Stacktrace of the exception/crash you're getting
flutter: Realm is closed: true
flutter: RealmException: Error deleting realm at path /Users/XXX/Library/Containers/XXX/Data/Library/Application Support/mongodb-realm/XXXX/XXXX/default.realm. Cannot delete files of an open Realm: '/Users/XXX/Library/Containers/XXX/Data/Library/Application Support/mongodb-realm/XXXX/XXXX/default.realm' is still in use.. Error code: 2012.

Relevant log output
No response

When sync is being used, the Realm file is not necessarily released immediately after closing it. The sync process will release it asynchronously and may continue using it if there's data to be uploaded.

@nirinchev
Do you have a workaround?

Depends on what is your use case - is this for a test project or part of your app's functionality? One approach would be to retry the deletion with a delay. If you don't care about the changes being uploaded you could also pause the sync session before that:
realm.syncSession.pause();
realm.close();

for (var i = 0; i < 100; i++) {
  try {
    Realm.deleteRealm(path);
  } catch (e) {
    await Future.delayed(Duration(seconds: 1))
  }
}

I got the same error. But when I wait for the sync process to be done, it took forever.
db.syncSession.waitForDownload();
db.syncSession.waitForUpload();

I tried it on empty database, but the code above wait forever. any solution?

@Dararii The code above will wait until it actually contacts the server. Try adding trace, it will tell you a lot about what is happening.
Here is a very simplistic and verbose trace setup, but you can elaborate from there:
  Realm.logger.setLogLevel(LogLevel.detail);
  Realm.logger.onRecord.listen(print);


Use reviewdog in black GitHub Actions action

This uses https://github.com/reviewdog/reviewdog to provide a more consistent experience for black, match our other linters. It is also arguably better and easier to understand, because it involves less digging through logs.
In particular, files that have incorrect formatting now have a "Check" comment added to the first line. This is visible as a summary report when clicking on "details" of the black step (for instance, https://github.com/stellargraph/stellargraph/pull/1691/checks?check_run_id=794668066 ) and also directly attached to each file under the "Files changed" tab:

See: #1687

The changes to setup.py are just to demonstrate the check, they'll be entirely reverted before landing.


Set context path globally for whole spring-boot context

Setting contextPath for Spring saves some hassle with rewriting context  path in keycloak rest application.

I'll

I'm closing this PR. I'll open another one with all changes leading to fixing the static keycloak configuration hack


Update tutorial-existing-forest.md

@nigums : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


[Python-SDK] Fix CI linter

The linting was not being run on the source files.

Nice! Where is it specified to run black linting when running pytest?

In the pyproject.toml file!


DatePicker -> Date format should not be hardcoded to french

I guess :)

Good catch :)

Released in Fulma.Elmish.0.1.0-beta-006


$eq not working

I have a (websql) database with a numerical field called state and created an index on this field, when I use find like this:
db.find({
    selector: {
        state: {
            $lte: 1
        }
    }
});

or
db.find({
    selector: {
        state: {
            $gte: 3
        }
    }
});

or even
db.find({
    selector: {
        state: {
            $gt: 1,
            $lt: 3
        }
    }
});

it returns the correct documents, however when I do it like this:
db.find({
    selector: {
        state: 2
    }
});

or
db.find({
    selector: {
        state: {
            $eq: 2
        }
    }
});

it doesn't return any documents. This is impossible since there are documents returned when calling find with 1 < state < 3
The database is running inside a cordova app using the sqlite plugin

Does this error only occur with the SQLite Plugin? We've had bugs with the SQLite Plugin in the past because their implementation is poor.

I'm working on an app where I'm seeing similar behaviour.
The stack is Cordova (iOS) + WKWebView + PouchDB (adapter: cordova-sqlite)
I have a prepopulated database that I import, and then in the copyDatabaseFile callback I immediately try to access the database I created with:
db = new PouchDB('database.db', {adapter: 'cordova-sqlite'});
db.post() and db.get(<id>) both work fine, so I can indeed read from the database. However, the following fails silently:
db.find(
  {
    selector: {type: "a_doctype"}
  }
).then( function(result) {
  console.log(result);
}).catch(console.log.bind(console));

I'll try a few variations on the syntax and see if I get anywhere, but I'm not holding my breath. Just letting @nolanlawson know about this because he just released pouchdb-adapter-cordova-sqlite , which I hoped would finally allow me to use WKWebView with a prepopulated / imported SQLite database inside a Cordova iOS project. Someday...

Did you test on Android as well? Did you test with other adapters? That could help me narrow down the source of the bug.
Prepopulated databases ought to be possible with the cordova-sqlite adapter; see this article.

This issue was moved to pouchdb/pouchdb#6283


Add command to upload firmware

Add support to upload firmware to nodes.

@balloob This needs something like: https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/ZwaveClient.js#L1732
There are some helper function to use:
 let actualFirmware
    try {
      const format = guessFirmwareFormat(fileName, data)
      actualFirmware = extractFirmware(data, format)
    } catch (e) {
      throw Error('Unable to extract firmware from file: ' + e.message)
    }

    return zwaveNode.beginFirmwareUpdate(
      actualFirmware.data,
      actualFirmware.firmwareTarget
    )

@balloob This needs something like: https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/ZwaveClient.js#L1732
There are some helper function to use:
 let actualFirmware
    try {
      const format = guessFirmwareFormat(fileName, data)
      actualFirmware = extractFirmware(data, format)
    } catch (e) {
      throw Error('Unable to extract firmware from file: ' + e.message)
    }

    return zwaveNode.beginFirmwareUpdate(
      actualFirmware.data,
      actualFirmware.firmwareTarget
    )

guessFirmwareFormat(fileName, data)

For completeness sake, you could also provide the firmware format yourself if you know which format the file has.

guessFirmwareFormat(fileName, data)

For completeness sake, you could also provide the firmware format yourself if you know which format the file has.


[SPARK-17523] Support to generate build info file when building Spark in Windows

What changes were proposed in this pull request?
Currently, if we build Spark, it will generate a spark-version-info.properties and merged into spark-core_2.11-*.jar. However, the script build/spark-build-info which generates this file can only be executed with bash environment.
Without this file, errors like below will happen when submitting Spark application, which break the whole submitting phrase at beginning.
RROR ApplicationMaster: Uncaught exception:
org.apache.spark.SparkException: Exception thrown in awaitResult:
    at org.apache.spark.util.ThreadUtils$.awaitResult(ThreadUtils.scala:194)
    at org.apache.spark.deploy.yarn.ApplicationMaster.runDriver(ApplicationMaster.scala:394)
    at org.apache.spark.deploy.yarn.ApplicationMaster.run(ApplicationMaster.scala:247)
    at org.apache.spark.deploy.yarn.ApplicationMaster$$anonfun$main$1.apply$mcV$sp(ApplicationMaster.scala:759)
    at org.apache.spark.deploy.SparkHadoopUtil$$anon$1.run(SparkHadoopUtil.scala:67)
    at org.apache.spark.deploy.SparkHadoopUtil$$anon$1.run(SparkHadoopUtil.scala:66)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
    at org.apache.spark.deploy.SparkHadoopUtil.runAsSparkUser(SparkHadoopUtil.scala:66)
    at org.apache.spark.deploy.yarn.ApplicationMaster$.main(ApplicationMaster.scala:757)
    at org.apache.spark.deploy.yarn.ApplicationMaster.main(ApplicationMaster.scala)
Caused by: java.util.concurrent.ExecutionException: Boxed Error
    at scala.concurrent.impl.Promise$.resolver(Promise.scala:55)
    at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolveTry(Promise.scala:47)
    at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:244)
    at scala.concurrent.Promise$class.tryFailure(Promise.scala:112)
    at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:153)
    at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:648)
Caused by: java.lang.ExceptionInInitializerError
    at org.apache.spark.package$.<init>(package.scala:91)
    at org.apache.spark.package$.<clinit>(package.scala)
    at org.apache.spark.SparkContext$$anonfun$3.apply(SparkContext.scala:187)
    at org.apache.spark.SparkContext$$anonfun$3.apply(SparkContext.scala:187)
    at org.apache.spark.internal.Logging$class.logInfo(Logging.scala:54)
    at org.apache.spark.SparkContext.logInfo(SparkContext.scala:76)
    at org.apache.spark.SparkContext.<init>(SparkContext.scala:187)
    at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2287)
    at org.apache.spark.sql.SparkSession$Builder$$anonfun$6.apply(SparkSession.scala:822)
    at org.apache.spark.sql.SparkSession$Builder$$anonfun$6.apply(SparkSession.scala:814)
    at scala.Option.getOrElse(Option.scala:121)
    at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:814)
    at org.apache.spark.examples.SparkPi$.main(SparkPi.scala:31)
    at org.apache.spark.examples.SparkPi.main(SparkPi.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:630)
Caused by: org.apache.spark.SparkException: Error while locating file spark-version-info.properties
    at org.apache.spark.package$SparkBuildInfo$.liftedTree1$1(package.scala:75)
    at org.apache.spark.package$SparkBuildInfo$.<init>(package.scala:61)
    at org.apache.spark.package$SparkBuildInfo$.<clinit>(package.scala)
    ... 19 more
Caused by: java.lang.NullPointerException
    at java.util.Properties$LineReader.readLine(Properties.java:434)
    at java.util.Properties.load0(Properties.java:353)
    at java.util.Properties.load(Properties.java:341)
    at org.apache.spark.package$SparkBuildInfo$.liftedTree1$1(package.scala:64)
    ... 21 more

I add build/spark-build-info.ps1 to generate spark-version-info.properties file in Windows, and modify core/pom.xml and project/SparkBuild.scala to support this scenario when building Spark with maven or sbt.
How was this patch tested?
Tested on my local Windows 10 machine, which generated the  spark-version-info.properties under core/target/extra-resources folder as expected.

Can one of the admins verify this patch?

I don't think we support building on Windows. I think it's fine to make minor changes to accommodate Windows no matter what, but this is non-trivial.

@HyukjinKwon we do windows for R

Thanks for cc'ing me @felixcheung. Actually, I took a look and wanted to leave a comment but I didn't because I couldn't find a concrete reason or reference to support my opinion and also I know @srowen is an expert in this area.
FWIW and as I am already here - I tend to agree with Sean. I think it'd be nicer if all tests pass on Windows and pre-built releases work fine on Windows but it might not necessarily meam that we should support a proper build on Windows.
I am willing to take a close look iff I have a sing-off from Sean.

Test build #3274 has started for PR 15078 at commit ffd219b.

Test build #3274 has finished for PR 15078 at commit ffd219b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

How wide-spread is powershell on windows computers? I assume that modern versions ship with it, but I also heard that they come with a bash-like shell in the latest version. Does the current build work in the new environment?

FWIW, doesn't Power shell allows executing bash? (I haven't tried that by myself but I think I saw some usages and documentation before)

I'm not sure older Windows versions have powershell installed by default..

From the discussion above, I would like to stay against this PR.

@jodersky Actually, BashOnWindows only exists on Windows10 Anniversary Update. Moreover, this feature needs to be manually enabled to take effects.
And I don't think this bash environment in BashOnWindows worked very well and stably so that could be used in production built in the short term.

Let's close this PR for now.

In Linux
mvn -Dtest=none   -DwildcardSuites=org.apache.spark.deploy.rest.StandaloneRestSubmitSuite test
I want to know why?thank you!@HyukjinKwon
Report errors:
StandaloneRestSubmitSuite:
*** RUN ABORTED ***
java.lang.ExceptionInInitializerError:
at org.apache.spark.package$.(package.scala:91)
at org.apache.spark.package$.(package.scala)
at org.apache.spark.deploy.rest.RestSubmissionClient.constructSubmitRequest(RestSubmissionClient.scala:179)
at org.apache.spark.deploy.rest.StandaloneRestSubmitSuite$$anonfun$1.apply$mcV$sp(StandaloneRestSubmitSuite.scala:58)
at org.apache.spark.deploy.rest.StandaloneRestSubmitSuite$$anonfun$1.apply(StandaloneRestSubmitSuite.scala:54)
at org.apache.spark.deploy.rest.StandaloneRestSubmitSuite$$anonfun$1.apply(StandaloneRestSubmitSuite.scala:54)
at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
at org.scalatest.Transformer.apply(Transformer.scala:22)
...
Cause: org.apache.spark.SparkException: Error while locating file spark-version-info.properties
at org.apache.spark.package$SparkBuildInfo$.liftedTree1$1(package.scala:75)
at org.apache.spark.package$SparkBuildInfo$.(package.scala:61)
at org.apache.spark.package$SparkBuildInfo$.(package.scala)
at org.apache.spark.package$.(package.scala:91)
at org.apache.spark.package$.(package.scala)
at org.apache.spark.deploy.rest.RestSubmissionClient.constructSubmitRequest(RestSubmissionClient.scala:179)
at org.apache.spark.deploy.rest.StandaloneRestSubmitSuite$$anonfun$1.apply$mcV$sp(StandaloneRestSubmitSuite.scala:58)
at org.apache.spark.deploy.rest.StandaloneRestSubmitSuite$$anonfun$1.apply(StandaloneRestSubmitSuite.scala:54)
at org.apache.spark.deploy.rest.StandaloneRestSubmitSuite$$anonfun$1.apply(StandaloneRestSubmitSuite.scala:54)
at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
...
Cause: java.lang.NullPointerException:
at java.util.Properties$LineReader.readLine(Properties.java:434)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at org.apache.spark.package$SparkBuildInfo$.liftedTree1$1(package.scala:64)
at org.apache.spark.package$SparkBuildInfo$.(package.scala:61)
at org.apache.spark.package$SparkBuildInfo$.(package.scala)
at org.apache.spark.package$.(package.scala:91)
at org.apache.spark.package$.(package.scala)
at org.apache.spark.deploy.rest.RestSubmissionClient.constructSubmitRequest(RestSubmissionClient.scala:179)
at org.apache.spark.deploy.rest.StandaloneRestSubmitSuite$$anonfun$1.apply$mcV$sp(StandaloneRestSubmitSuite.scala:58)
...

@guoxiaolongzte, Let's ask a question to mailing list. Up to my knowledge, we should build first before running tests properly and maybe the errors are related with it.


Update gallery drawer version

Not sure how to automated this value yet (see https://github.com/flutter/flutter/issues/15533) but at least update the value.

![lgtm](https://cloud.githubuserconte...


⚠ API - Lens has degraded performance

In 237f451, API - Lens ($LENS_API_URL) experienced degraded performance:

HTTP code: 503
Response time: 632 ms

Resolved: API - Lens performance has improved in 7d90b8c after 17 minutes.


Add additional example

Docs Build status updates of commit eff380b:
:clock10: Full build: the average full build time is 14 min(s) 15 sec(s), this is based on the last 274 build(s) for this repository.

Docs Build status updates of commit eff380b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-pnp/Get-PnPCustomAction.md
:white_check_mark:Succeeded
View (sharepoint-ps)

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

Docs Build status updates of commit e579bff:
:clock10: Full build: the average full build time is 14 min(s) 10 sec(s), this is based on the last 346 build(s) for this repository.

Docs Build status updates of commit e579bff:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-pnp/Get-PnPCustomAction.md
:white_check_mark:Succeeded
View (sharepoint-ps)

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

Docs Build status updates of commit 4d670cf:
:clock10: Full build: the average full build time is 14 min(s) 9 sec(s), this is based on the last 353 build(s) for this repository.

Docs Build status updates of commit 4d670cf:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-pnp/Get-PnPCustomAction.md
:white_check_mark:Succeeded
View (sharepoint-ps)

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

Docs Build status updates of commit a3a3126:
:clock10: Full build: the average full build time is 14 min(s) 5 sec(s), this is based on the last 366 build(s) for this repository.

Docs Build status updates of commit a3a3126:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-pnp/Get-PnPCustomAction.md
:white_check_mark:Succeeded
View (sharepoint-ps)

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


Fixing py2exe compatibility

When trying to use ´py2exe´ was getting an ´RuntimeError´ indicating ´freezer module not found: py2exe´.
Fixed that by correcting py2exe imports.

@rhlobo, thank you very much!

Great! Thank you!
On Wednesday, September 16, 2015, tim<EMAIL_ADDRESS>wrote:

Merged #93 https://github.com/cloudmatrix/esky/pull/93.
—
Reply to this email directly or view it on GitHub
https://github.com/cloudmatrix/esky/pull/93#event-411311608.


channel.close().awaitUninterruptibly() hangs when exception is thrown in closeRequested()

I am a new netty user. I am trying to close connections on server side and seeing that the code hangs at channel.close().awaitUninterruptibly(). I throw an exception from closeRequested() method to produce the problem (in sample code given below).
I am using netty 3.3.1-final. Any help would be helpful.
package com.usairways.cbro.baggage.scanning.stomp;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
import org.jboss.netty.bootstrap.ClientBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.Channels;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
public class Experiment {
final static String host = "localhost";
final static int port = 61756;
final static ChannelGroup group = new DefaultChannelGroup();;

public static void main(String[] args) throws Exception {
    ServerBootstrap serverBootstrap = new ServerBootstrap(
            new NioServerSocketChannelFactory(
                    Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
    serverBootstrap.setPipelineFactory(
            new ChannelPipelineFactory() {
                public ChannelPipeline getPipeline() throws Exception {
                    ChannelPipeline pipeline = Channels.pipeline();
                    pipeline.addLast("handler", new SimpleChannelHandler() {
                        @Override
                        public void closeRequested(ChannelHandlerContext ctx,
                                ChannelStateEvent e)
                                throws Exception {
                            System.out.println("close requested: " + e.getChannel());
                            throw new RuntimeException("test");
                        }

                        @Override
                        public void channelOpen(ChannelHandlerContext ctx,
                                ChannelStateEvent e) throws Exception {
                            System.out.println("channel open: " + e.getChannel());
                            group.add(e.getChannel());
                            super.channelOpen(ctx, e);
                        }

                        @Override
                        public void channelClosed(ChannelHandlerContext ctx,
                                ChannelStateEvent e) throws Exception {
                            System.out.println("channel closed: " + e.getChannel());
                            super.channelClosed(ctx, e);
                        }

                        @Override
                        public void exceptionCaught(
                                ChannelHandlerContext ctx, ExceptionEvent e)
                                throws Exception {
                            System.out.println("exception caught: " + e.getChannel());
                        }
                    });
                    return pipeline;
                }
            });
    Channel serverChannel = serverBootstrap.bind(new InetSocketAddress(port));

    ClientBootstrap clientBootstrap = new ClientBootstrap(
            new NioClientSocketChannelFactory(
                    Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
    clientBootstrap.setPipelineFactory(new ChannelPipelineFactory() {
        public ChannelPipeline getPipeline() {
            return Channels.pipeline(new SimpleChannelHandler());
        }
    });

    ChannelFuture f = clientBootstrap.connect(new InetSocketAddress(host, port));
    f.awaitUninterruptibly();
    serverChannel.close().awaitUninterruptibly();
    System.out.println("after closing server channel");
    for(Channel channel : group) {
        // The channel is not closed and this will wait forever
        channel.close().awaitUninterruptibly();
        System.out.println("after closing client channel - this line is never printed");
    }
    System.out.println("end of program - this line is never printed");

}

}

Could you paste the stack trace of the exception raised in closeRequested()?
On Mon, Feb 27, 2012 at 3:25 PM, sureshlalvani
<EMAIL_ADDRESS>wrote:

I am a new netty user. I am trying to close connections on server side and seeing that the code hangs at channel.close().awaitUninterruptibly(). I throw an exception from closeRequested() method to produce the problem (in sample code given below).
I am using netty 3.3.1-final. Any help would be helpful.
package com.usairways.cbro.baggage.scanning.stomp;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
import org.jboss.netty.bootstrap.ClientBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.Channels;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
public class Experiment {
final static String host = "localhost";
   final static int port = 61756;
   final static ChannelGroup group = new DefaultChannelGroup();;
public static void main(String[] args) throws Exception {
       ServerBootstrap serverBootstrap = new ServerBootstrap(
               new NioServerSocketChannelFactory(
                       Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
       serverBootstrap.setPipelineFactory(
               new ChannelPipelineFactory() {
                   public ChannelPipeline getPipeline() throws Exception {
                       ChannelPipeline pipeline = Channels.pipeline();
                       pipeline.addLast("handler", new SimpleChannelHandler() {
                           @Override
                           public void closeRequested(ChannelHandlerContext ctx,
                                   ChannelStateEvent e)
                                   throws Exception {
                               System.out.println("close requested: " + e.getChannel());
                               throw new RuntimeException("test");
                           }
@Override
                           public void channelOpen(ChannelHandlerContext ctx,
                                   ChannelStateEvent e) throws Exception {
                               System.out.println("channel open: " + e.getChannel());
                               group.add(e.getChannel());
                               super.channelOpen(ctx, e);
                           }
@Override
                           public void channelClosed(ChannelHandlerContext ctx,
                                   ChannelStateEvent e) throws Exception {
                               System.out.println("channel closed: " + e.getChannel());
                               super.channelClosed(ctx, e);
                           }
@Override
                           public void exceptionCaught(
                                   ChannelHandlerContext ctx, ExceptionEvent e)
                                   throws Exception {
                               System.out.println("exception caught: " + e.getChannel());
                           }
                       });
                       return pipeline;
                   }
               });
       Channel serverChannel = serverBootstrap.bind(new InetSocketAddress(port));
ClientBootstrap clientBootstrap = new ClientBootstrap(
               new NioClientSocketChannelFactory(
                       Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
       clientBootstrap.setPipelineFactory(new ChannelPipelineFactory() {
           public ChannelPipeline getPipeline() {
               return Channels.pipeline(new SimpleChannelHandler());
           }
       });
ChannelFuture f = clientBootstrap.connect(new InetSocketAddress(host, port));
       f.awaitUninterruptibly();
       serverChannel.close().awaitUninterruptibly();
       System.out.println("after closing server channel");
       for(Channel channel : group) {
           // The channel is not closed and this will wait forever
           channel.close().awaitUninterruptibly();
           System.out.println("after closing client channel - this line is never printed");
       }
       System.out.println("end of program - this line is never printed");
}
}

Reply to this email directly or view it on GitHub:
https://github.com/netty/netty/issues/205

--
Trustin Lee, http://gleamynode.net/

In above sample code, I am throwing RuntimeException.
We have problem in our production where call hangs at awaitUninterruptibly() and never returns. I was trying to produce the problem in dev environment and thought of throwing an exception to see if it hangs.
There is no exception logged in server.log file in production environment.

If you are throwing an exception to reject the close request, you have
to call evt.getFuture().setFailure(...).

In our production code, I am not throwing an exception but I suspect netty may be doing it.
The problem is close().awaitUninterruptibly() hangs for some reason and I am trying to figure out why?
I will override the closeRequested() method in production environment and see if any exception is thrown and update this thread. It would take few days.
Do you know why close().awaitUninterruptibly() would hang?

What Netty version are you using? IIRC, this problem was reported before
and was fixed.

Netty version 3.3.1.Final

The future that is passed internally with a close request is actually
Channel.closeFuture() which is a special variant of DefaultChannelFuture
and it does not allow updating its state unless the connection is
actually closed.
In your case, the connection was not actually closed but the attempt to
close it failed due to some exception.
The problem is that this issue cannot be fixed without modifying Netty
API. Meanwhile, as a workaround, I suggest you to catch all exceptions
in your closeRequested() methods.

I will deploy the new code in production as soon as possible.
What should be done after catching the exceptions?

You have to call: ctx.sendDownstream(evt); so that the event goes down to Netty core.
--
http://gleamynode.net/
http://twitter.com/trustin
http://twitter.com/trustin_ko
http://twitter.com/netty_project
On Wednesday, February 29, 2012 at 8:39 AM, sureshlalvani wrote:

I will deploy the new code in production as soon as possible.
What should be done after catching the exceptions?

Reply to this email directly or view it on GitHub:
https://github.com/netty/netty/issues/205#issuecomment-4241160

In my production environment, no exception is thrown in closeRequested() but code still hangs at channel.close().awaitUninterruptibly()
Do you know what can cause close().awaitUninterruptibly() to hang?

Could you paste the full thread dump?
--
http://gleamynode.net/
http://twitter.com/trustin
http://twitter.com/trustin_ko
http://twitter.com/netty_project
On Friday, March 2, 2012 at 11:03 AM, sureshlalvani wrote:

In my production environment, no exception is thrown in closeRequested() but code still hangs at channel.close().awaitUninterruptibly()
Do you know what can cause close().awaitUninterruptibly() to hang?

Reply to this email directly or view it on GitHub:
https://github.com/netty/netty/issues/205#issuecomment-4291918

Thread dump is too large and can not be pasted here. this page is throwing error "There was an error posting your comment".
Thread is taken after waiting for minutes on awaitUninterruptibly() method.
I can send you as an attachment, if you provide your email or post it to this thread in multiple comments.

You cam paste it to pastebin.com and paste its URL.
--
http://gleamynode.net/
http://twitter.com/trustin
http://twitter.com/trustin_ko
http://twitter.com/netty_project
On Tuesday, March 6, 2012 at 8:05 AM, sureshlalvani wrote:

Thread dump is too large and can not be pasted here. this page is throwing error "There was an error posting your comment".
Thread is taken after waiting for minutes on awaitUninterruptibly() method.
I can send you as an attachment, if you provide your email or post it to this thread in multiple comments.

Reply to this email directly or view it on GitHub:
https://github.com/netty/netty/issues/205#issuecomment-4334129

I have pasted my thread dump in 3 parts. Urls are:
http://pastebin.com/ZK2uCTgb
http://pastebin.com/ivgGTw7y
http://pastebin.com/AXfvp3fh
Thanks.

Here is the exact code that I have in my production environment. variable clients is DefaultChannelGroup.
    for(final Channel channel : clients) {
        log.info("closing channel " + channel + "...");
        ChannelFuture future = channel.close();
        future.addListener(new ChannelFutureListener() {
            public void operationComplete(ChannelFuture future) throws Exception {
                if(future.isCancelled()) {
                    log.info(count.getValue() + ": " + "channel " + channel + " close cancelled");
                }
                if(future.isSuccess()) {
                    log.info(count.getValue() + ": " + "channel " + channel + " closed successfully");
                } else {
                    log.info(count.getValue() + ": " + "channel " + channel + " closed failed. Cause:" + future.getCause());
                }
            }
        });
        future.awaitUninterruptibly();
        //code hangs here
        log.info("after awaitUninterruptibly and closed channel " + channel);
    }
    log.info("all channels closed... channels size: " + channels.size()
            + " clients size: " + clients.size() + " debug-clients size: " + debugClients.size());
    log.info("releasing external resources...");
	factory.releaseExternalResources();
	log.info("external resourses released...");

did you find anything weird in thread dump?


Export gifs to s3

Hi,
I took a stab at adding some upload to s3 functionality.

(Upload button added)
After uploaded, copies the URL to clipboard.

Here is a gif recording of what it looks like!
https://camerons-amazing-gifs.s3.amazonaws.com/lOHsGsJ1qUoGKTmlrQC8vSho.gif
I also added a 3rd tab to the pref. to set S3 creds.

(Needs a bit of styling love. I can't seem to get the tab to be marked as "active").
This is very much a quick implementation (I haven't used electron before, so any advice is welcome) and welcome any feedback/thoughts!

This is really cool @cameronmaske! We've got a few issues regarding uploading to various sites and hosting solutions, see my comment on #147.
Additional exporting and uploading options are some of the most requested features, at the same time we want to keep the core Kap app as nimble as possible. To cater to all the different needs people have we've started planning a plugins system, which we hope to ship in the next big version of Kap.
Think of it as making Kap modular, where developers power users can extend the functionality of Kap to their own liking.
What you've made here would be perfect as a plugin and helps validate the effort. I'll put this issue on hold for now and keep you updated here. Really hope to see this as a plugin soon!

Sure @skllcrn makes sense. Would y'all mind if I packed a version of Kap from this branch, and hosted the install on my fork until Kap 2.0 ships? Just as a stop gap for any devs who want some "early access" to s3 capabilities?

Go for it @cameronmaske. Open source <3

@cameronmaske Hey. Nice work on this. I published a proposal for how the plugin system should work and I already started implementing part of it with the goal of having something working in a couple of weeks. Comment there if you have any concerns or if I missed something that will be needed to implement this as a plugin.

Hey @cameronmaske! Would you want to put this into a plugin?
We have docs coming here: #190
and a plugin example here: https://github.com/wulkano/kap-giphy

Hi everyone! I already created an S3 plugin for Kap and will release it any moment. Just wanted to let you guys know so that we aren't doing double work :).

Here it is https://github.com/SamVerschueren/kap-s3

Awesome <3


Optimize the size of Instruction

This reduces the size of the Instruction enum from 56 bytes to 16 bytes, which should help with memory usage as well as a (very) slight performance boost:
Benchmark #1: ./rustpython-norm benchmarks/pystone.py 50000
  Time (mean ± σ):      3.655 s ±  0.119 s    [User: 3.637 s, System: 0.007 s]
  Range (min … max):    3.522 s …  3.853 s    10 runs

Benchmark #2: ./rustpython-opt benchmarks/pystone.py 50000
  Time (mean ± σ):      3.624 s ±  0.074 s    [User: 3.601 s, System: 0.008 s]
  Range (min … max):    3.557 s …  3.783 s    10 runs

Summary
  './rustpython-opt benchmarks/pystone.py 50000' ran
    1.01 ± 0.04 times faster than './rustpython-norm benchmarks/pystone.py 50000'

The instructions I changed were either a) flattening an inner enum, like CallFunction { CallType } -> CallFunction{Positional,Keyword,Ex} b) not in many hot paths, like Import, or c) provided redundant information, like SetupLoop, whose start field always pointed to lasti+1

Here's the benchmark for the lz4_flex change:
Benchmark #1: ./rustpython-norm -c ""
  Time (mean ± σ):      53.1 ms ±  13.2 ms    [User: 45.4 ms, System: 7.3 ms]
  Range (min … max):    36.3 ms …  77.2 ms    66 runs

Benchmark #2: ./rustpython-opt -c ""
  Time (mean ± σ):      15.2 ms ±   7.4 ms    [User: 11.0 ms, System: 4.2 ms]
  Range (min … max):     7.7 ms …  33.8 ms    206 runs

Summary
  './rustpython-opt -c ""' ran
    3.50 ± 1.92 times faster than './rustpython-norm -c ""'


Connect to mongo, and code for inserting movies

This is rescuing the Mongo code that was abandoned in #21

Note that this code is not called from anywhere, but I tested it in the repl.


Add a scrolling graph

The Apple Health app contains a graph that you can scroll. I think this would also be a good use case to implement.
I have no clue where to start yet, but maybe we can figure something out.
https://user-images.githubusercontent.com/11280647/177356069-a2ed2eb7-3a82-41a9-a3af-7e3d4b172faa.MP4

https://wwdclounges.com/wwdc22/swiftui-lounge.html#can-the-new-charts-api-allow-for-scrolling-similar-to-the-health-apps-charts
Seems like we need to file some feedback first! From the digital lounges:
Can the new Charts API allow for scrolling? similar to the health app's charts
|U03HL00QL68|: Sorry, late answer forgot to hit send: Yes, charts should behave just like any other view in this regard. though you may have to set explicit frames on the chart to specify how big (wide? tall?) you want it to be
|U03J7BQ7P9N|: We just couldn’t wait till the next Q&A, Ok I promise we are done now!!! :nerd_face:
|U03HL00QL68|: Hey <@U03J21CNQ1G> I just realized the health app chart does scrolling that keeps the y-axis stationary, that specifically isn't supported, but we've received a few requests about this, but few feedbacks. So if you file a feedback for the Charts team, we'd appreciate it

@scsinke check out the latest PR by Stewart Lynch 🙂

Sort of meets it but the headers get scrolled off, hopefully someone finds a way to allow the axis labels to be sticky when scrolling.

@jordibruin yeah it's a scrolling graph, but still not the same feel as the version used in the apple health app. Maybe we can make some improvement to this one to make is more resembling to the apple version.

As I mentioned in my comment above, stationary axis labels aren't supported right now so I don't think we'll get much more than this. 😞

As I mentioned in my comment above, stationary axis labels aren't supported right now so I don't think we'll get much more than this. 😞

Was curious about a smoke a mirrors type of workaround, e.g. HStack with around 30 pixels showing the axis (and clipping the rest of the chart) and a scroll view next to it containing a duplicate chart with axis labels disabled.
Horrible solution but it might give the illusion/effect we are trying to achieve.
Side effects:

Dynamic text support
Dynamic calculation of the width based on content/text, etc
Performance impact with a large dataset

As I mentioned in my comment above, stationary axis labels aren't supported right now so I don't think we'll get much more than this. 😞

Was curious about a smoke a mirrors type of workaround, e.g. HStack with around 30 pixels showing the axis (and clipping the rest of the chart) and a scroll view next to it containing a duplicate chart with axis labels disabled.
Horrible solution but it might give the illusion/effect we are trying to achieve.
Side effects:

Dynamic text support
Dynamic calculation of the width based on content/text, etc
Performance impact with a large dataset

Cool! let me try it out

Very hacky but it's an approach we could explore more! @atrinh0
https://user-images.githubusercontent.com/170948/180226590-9d938a61-ce20-40ae-8813-311f5d2848de.mp4

Here's a gist that looks pretty promising for emulating the Health apps scrollable charts:
https://gist.github.com/beader/8779526f466e373a9085338742919d9b

https://developer.apple.com/videos/play/wwdc2023/10037/?time=469
This is now possible with iOS 17


Adds support for optional callback rate limit

If config setting CALLBACK_RATE_LIMIT_SECS or AWS value security_callback_rate_limit_secs is set to 0 or greater then subsequent callback requests will be allowed after that defined period. The value is in seconds.

We do not have a need for no rate limit, but others using the project may. I don't think it'd be inherently simpler for null or 0 to represent 1 callback.
The configuration name is CALLBACK_RATE_LIMIT_SECS so it seems to follow that 0 would mean no rate limit.

Fixes #20

@jasnell @colmharte can you take another look at this? After speaking with Alex H about the callback flow on the phone, and wanting to support situations where a user mistypes a phone number we came up with a slightly modified rate limit.
This now supports an ability to submit N callback requests before the rate limit is put into effect.
If rate limiting is in play then the value of CALLBACK_RATE_LIMIT_REQUEST_COUNT will be taken into account. This
value allows for a specific number of additional requests within a rate limit period. This exists to allow users to
"update" an incorrectly entered phone # up to CALLBACK_RATE_LIMIT_REQUEST_COUNT times before the rate limit blocks
further calls.
Example 1:
CALLBACK_RATE_LIMIT_SECS = 60
CALLBACK_RATE_LIMIT_REQUEST_COUNT = 1
The user must wait 60 seconds before submitting a 2nd callback request
Example 2:
CALLBACK_RATE_LIMIT_SECS = 60
CALLBACK_RATE_LIMIT_REQUEST_COUNT = 2
The user can submit 2 callbacks before the rate limit is put into effect
Example 3:
CALLBACK_RATE_LIMIT_SECS = 60
CALLBACK_RATE_LIMIT_REQUEST_COUNT = 5
The user can submit 5 callbacks before the rate limit is put into effect
In production we're probably going to go with a 24h callback rate limit.

I've also added a new column callback_request_total  counting the total # of callback requests a user has made - this will allow us to alert if a user starts to make more than a reasonable amount of callback requests

That scheme makes sense. Just as a thought exercise another approach would be to use an exponential back off approach on the initial window. Essentially, the first time someone requests a callback, rate limiting kicks in after CALLBACK_RATE_LIMIT_SECS. Until then, retries are allowed following an exponential back off schedule. First next attempt at one minute, next attempt at two minutes of that, next at four minutes of that, etc up to CALLBACK_RATE_LIMIT_SECS . Likely overkill and the simple counter approach works well too.

@jasnell that is an interesting thought. But I agree perhaps overkill for this. It also makes the user communication a little harder. Saying you can do 5 requests in a 24 hour period is much more easily digestible than describing an exponential backoff.


Add confirmation modal for component deletion

Fixes
https://issues.redhat.com/browse/HAC-1318

Description
Adds confirmation modal for component deletion.

Type of change

[x] Feature

Screen shots / Gifs for design review
https://user-images.githubusercontent.com/20013884/172129206-f0b27584-a6fe-4649-9683-8701de158332.mp4

How to test or reproduce?
Delete a component from kebab menu.

Browser conformance:

[ ] Chrome
[x] Firefox
[ ] Safari
[ ] Edge

@rohitkrai03 @sahil143 updated!
https://user-images.githubusercontent.com/20013884/172161369-5d21586d-8fa8-42e5-93d7-45e2377d8fa5.mp4


Move tests of role to the root of the package folder.

Codecov Report

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

@@           Coverage Diff           @@
##           master    #2438   +/-   ##
=======================================
  Coverage   72.16%   72.16%
=======================================
  Files         334      334
  Lines       18741    18741
  Branches     2772     2772
=======================================
  Hits        13524    13524
+ Misses       4350     4348    -2
- Partials      867      869    +2

Impacted Files
Coverage Δ

...dback/azure/cli/command_modules/feedback/custom.py
34.69% <0%> (ø)
:white_check_mark:

src/azure-cli-core/azure/cli/core/_util.py
66.66% <0%> (ø)
:white_check_mark:

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 22d906e...af86af2. Read the comment docs.


messageView.font seems to not be working?

I keep trying to set the font on my messageView just like in the examples
messageView.font = .systemFont(ofSize: 15)
or
messageView.font = .systemFont(ofSize: 20)
or whatever
and it always seems to start going back to [I think] size 17 font.
Screenshot below shows size 20 font for the first word then for some reason gets smaller and stays like that.
Realize I'm using a custom keyboard: Tried it with both default iOS keyboard and Gboard.

When do you set the font?
Sent with GitHawk

The font I want will only be the first word (or sometimes first letter) then will revert to size 17 for everything else. (example in the picture above, I wanted size 20, but after first word it reverted to size 17)

I mean do you set it in viewDidLoad or something? Also which version of the lib are you using? Does the big repro if you update to the latest or just use master? I swear I hit this bug and fixed it for GitHawk but can’t recall.
Sent with GitHawk

Yes I set it in viewDidLoad like the Example.
But looks like it was the file version.
Was using pod 'MessageViewController' as shown in the README but was probably giving me the 0.2.1 version from March
updated to pod 'MessageViewController', :git =>  'https://github.com/GitHawkApp/MessageViewController.git'
And it solved the change in font size.
But opened up some new problems which I'll open new issues for.
Thanks for taking the time btw.


docs: add issue templates

Codecov Report

Merging #15 (91c0658) into main (3fc2bbb) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #15   +/-   ##
=======================================
  Coverage   82.07%   82.07%
=======================================
  Files           4        4
  Lines         212      212
=======================================
  Hits          174      174
  Misses         27       27
  Partials       11       11

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 3fc2bbb...91c0658. Read the comment docs.


self.__logout_response is not bytes that make lxml error

Hi,
I run the code just almost same as demo-flask.
And when it run to this line
redirect(auth.logout(name_id=name_id, session_index=session_index)).
This is error output:
[2018-05-04 22:26:48,887] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/LoginWeb/tzfserver/start.py", line 88, in Login
    url = auth.process_slo(delete_session_cb=dscb)
  File "/usr/local/lib/python3.6/site-packages/onelogin/saml2/auth.py", line 144, in process_slo
    logout_response = OneLogin_Saml2_Logout_Response(self.__settings, get_data['SAMLResponse'])
  File "/usr/local/lib/python3.6/site-packages/onelogin/saml2/logout_response.py", line 42, in __init__
    self.document = OneLogin_Saml2_XML.to_etree(self.__logout_response)
  File "/usr/local/lib/python3.6/site-packages/onelogin/saml2/xml_utils.py", line 65, in to_etree
    return OneLogin_Saml2_XML._parse_etree(xml)
  File "/usr/local/lib/python3.6/site-packages/defusedxml/lxml.py", line 143, in fromstring
    rootelement = _etree.fromstring(text, parser, base_url=base_url)
  File "src/lxml/etree.pyx", line 3213, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1871, in lxml.etree._parseMemoryDocument
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.

with

python 3.6.4
Flask (1.0.2)
gunicorn (19.8.1)
lxml (4.2.1)
python3-saml (1.4.1)
xmlsec (1.3.3)

I solve it by modifying logout_response.py
to this self.document = OneLogin_Saml2_XML.to_etree(self.__logout_response.encode())
Do I have wrong configuration that makes this error?

what value had the nameid?

Just same as demo code
After login,
auth.get_nameid() is store in session.
session['samlNameId'] = auth.get_nameid()
And before logout,
name_id is restore from session['samlNameId']
name_id = session['samlNameId']
return redirect(auth.logout(name_id=name_id, session_index=session_index))


Docker recipes issues

Hi me again :)
Uncovered a couple of other issues with the Docker recipes...

x64 is not an architecture that munki understands, should be x86_64 or arm64 in the Input of Docker.download.recipe, if you're then going to substitute it into the supported_architectures key of the munki pkginfo https://github.com/autopkg/smithjw-recipes/blob/849955822c69b5ef28685f47662cdd9348173d96/Docker/Docker.download.recipe.yaml#L13
supported_architectures is an array of strings, your yaml has it as just one string below the key https://github.com/autopkg/smithjw-recipes/blob/849955822c69b5ef28685f47662cdd9348173d96/Docker/Docker.munki.recipe.yaml#L18
Docker.munki.recipe is importing %pathname% instead of %pkg_path% so it's importing the dmg rather than the pkg, and we're not getting the postinstall script at all this way. https://github.com/autopkg/smithjw-recipes/blob/849955822c69b5ef28685f47662cdd9348173d96/Docker/Docker.munki.recipe.yaml#L23

I'll knock up a quick PR for you to look at
Thanks!

Bump?

Resolved with #36