listenerAuth tokens do not survive Homebridge reboots, causing

When the HomeBridge plugin provisions a Konnected device, it randomly generates a token that Konnected uses in subsequent requests when contacting the HomeBridge server. The problem is that when HomeBridge reboots, previously generated tokens are not stored persistently and are lost, causing the Konnected device to fail to connected to HomeBridge to post state updates. This may cause Konnected to fall into a reboot/failsafe loop, and HomeBridge may be unable to re-provision the Konnected device in this state.
Proposed solution: Persist generated auth tokens so they survive and remain valid after HomeBridge reboots.

This is labeled as ‘won’t do’ - by virtue of the process mitigating the need for storing the token permanently, for security and for simplicity.
Based on the process of homebridge rebooting and subsequently reprovisioning the board with new auth tokens and storing them in the active session.

This is problematic when the Konnected device is rebooting/retrying to update state to HomeBridge, there can be a race condition or timing condition where HomeBridge cannot re-provision Konnected because it's in the process of rebooting/retrying. I'm not sure if HomeBridge continuously retries to send the provisioning request and it will eventually become consistent or not ... but it could take a long time, potentially missing state change events in the downtime.

Homebridge will keep trying to provision the device with the latest settings it has and new auth tokens until the device is available to receive the reprovisioning and handshake of latest states.
We should not be storing authorization tokens outside of the active live session, otherwise we are defeating the purpose of the security strategy of auth tokens in the first place.

From a quick glance this issue also appears to have arose from an unhandled panic of the firmware when it didn't receive the correct authorization from a call made to it. That should be handled gracefully with a reported message until it can receive the proper authorization creds, or until it is reprovisioned to use new ones.

I just pushed a firmware fix [https://github.com/konnected-io/konnected-security/releases/tag/v3.1.4] that should partially help. Before this fix, when Homebridge would return a 401 status after the token resets following a reboot, Konnected would crash and reboot immediately instead of gracefully waiting 30 seconds between failsafe boot loops. That's fixed now, and the 30 second delay allows for Homebridge to re-provision with the new credentials.
However, it's still very problematic that Homebridge "forgets" the exchanged auth token between reboots. Konnected is not intended to be re-provisioned over and over again, and leaving it open to do so is a far greater security risk than storing a shared secret within Homebridge. If Homebridge can re-discover and re-provision the Konnected boards at any time, then any device on the network can also do so, allowing a malicious actor on the network to be able to re-provision Konnected to point away from the desired controller, and neutering any security system within Homebridge. We've protected against this by implementing a Lock feature, which can be activated via the Konnected app or device API [https://konnected.readme.io/reference/getlock] which locks-down the device from being re-provisioned. This depends on the expectation that the server/controller IP, port, and shared-secret will not change and cannot be changed without specific authorization from the end-user.
This plugin's assumption that Konnected should be open to regular re-provisioning of network settings/credentials is in direct conflict with the Lock feature and our best practices regarding network security.
FWIW, it seems to be fairly common to store passwords or other secrets in Homebridge's config.json, and it seems to me much less of a security risk than allowing Konnected to remain open and re-provisionable by any actor.


Metrics PR Error

Dear authors,
Thank you for your wonderful contribution!!!
When I tried to get precision and recall values during training by adding option, --metric pr, I got the following error

\precision_recall.py", line 179, in _evaluate
feats = self._gen_feats(Gs, inception, minibatch_size, num_gpus, Gs_kwargs)
NameError: name 'inception' is not defined
So, I have changed the  lines in precision_recall.py. After the modification, It seems to work.
I would greatly appreciate it if you kindly review my modification.

def _evaluate(self, Gs, Gs_kwargs, num_gpus, num_imgs, paths = None, **kwargs):
       if paths is not None:
           # Extract features for local sample image files (paths)
----->  eval_features = self._paths_to_feats(paths, feat_func, minibatch_size, num_gpus, num_imgs)
       else:
           # Extract features for newly generated fake imgs
----->  eval_features = self._gen_feats(Gs, feature_net, minibatch_size, num_imgs, num_gpus, Gs_kwargs)

       # Compute precision and recall
       state = knn_precision_recall_features(ref_features = ref_features, eval_features = eval_features,
           feature_net = feature_net, nhood_sizes = [self.nhood_size], row_batch_size = self.row_batch_size,
----->  col_batch_size = self.row_batch_size, num_gpus = num_gpus, num_imgs = num_imgs)
       self._report_result(state.knn_precision[0], suffix = "_precision")
       self._report_result(state.knn_recall[0], suffix = "_recall")

-------------------------------------------------------------------------

Sure! :) For the duplex originally yes but after I refactored all the code I had some training issue with the flag that I'm still exploring so for now I released only the simplex as the default and plan to follow up on that

The differences between original simplex fro paper and improved simplex here:

Using --mapping_ltnt2ltnt so that the latents communicate with each other directly through self-attention inside the mapping network before starting to generate the image.
Adding the --kmeans from the duplex mode.
Adding an additional global latent (--style) to the k standard latent components, such that first the one global latent modulates all the image features uniformly, and then the k latents modulate different regions based on the attention. The global latent is useful for coordinating global aspects of the image such as global lighting conditions, global style properties of e.g. a face, etc.
Turns outs that with these changes no need to add the transformer to the discriminator, so for simplicity disabled that.

Sure happy to help! :) I'll add these explanations also to the readme. I now also looked into your changes they're all almost correct (there was one more change needed in case paths is not None but it doesn't happen by default so won't affect the results you get). I made these changes to the repo:
https://github.com/dorarad/gansformer/commit/175157caa8ec3547dc22a6ee6c10bc85f29e1958


Not working with gitlab!

I added this gem to the gemfile and added this code to  config/initializers/devise.rb
config.omniauth :openid_connect, :name => "openid-connect", :identifier => "http://<openid-connect-server>/.well-known/openid-configuration", :client_id =>"gitlab", :client_secret => "gitlab"

and to: app/controllers/omniauth_callbacks_controller.rb
I added:
def openidconnect
    handle_omniauth
 end

Similar approach works with other gems (omniauth-*), wonder why this is throwing this error?
Looks like the credentials are not getting passed on. Issue with the gem?
Started GET "/users/auth/openid-connect" for <IP_ADDRESS> at 2014-03-07 02:28:59 +0530

AttrRequired::AttrMissing ('identifier' required.):
  vendor/bundle/ruby/1.9.1/gems/attr_required-1.0.0/lib/attr_required.rb:59:in `attr_missing!'
  vendor/bundle/ruby/1.9.1/gems/rack-oauth2-1.0.7/lib/rack/oauth2/client.rb:15:in `initialize'
  vendor/bundle/ruby/1.9.1/gems/openid_connect-0.7.3/lib/openid_connect/client.rb:6:in `initialize'
  vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:59:in `new'
  vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:59:in `client'
  vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:89:in `authorize_uri'
  vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:63:in `block in request_phase'
  vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:63:in `open'
  vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:63:in `request_phase'
  vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:215:in `request_call'
  vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:181:in `call!'
  vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-cors-0.2.9/lib/rack/cors.rb:54:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-attack-2.3.0/lib/rack/attack.rb:63:in `call'
  vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
  vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
  vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/flash.rb:241:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/cookies.rb:486:in `call'
  vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.3/lib/active_record/query_cache.rb:36:in `call'
  vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:373:in `_run__3308901117666345589__call__callbacks'
  vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:38:in `call_app'
  vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `block in call'
  vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `block in tagged'
  vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:25:in `tagged'
  vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `tagged'
  vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
  vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/engine.rb:511:in `call'
  vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/application.rb:97:in `call'
  vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
  vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
  vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:552:in `process_client'
  vendor/bundle/ruby/1.9.1/gems/unicorn-worker-killer-0.4.2/lib/unicorn/worker_killer.rb:51:in `process_client'
  vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632:in `worker_loop'
  vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
  vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142:in `start'
  vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/bin/unicorn_rails:209:in `<top (required)>'
  vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load'
  vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `<main>'

Hello,
I got the same issue : No route matches [GET] "/users/auth/openid_connect/callback"
How this route is created please ?
I don't touch routes.rb and only modify OmniauthCallbacksController by adding this :
def openidconnect
  handle_omniauth
end

and added this code to config/initializers/devise.rb :
config.omniauth :openid_connect, {
      name: :openid_connect,
      scope: [:openid, :email, :profile, :address],
      response_type: :code,
      client_options: {
          port: 443,
          scheme: 'https',
          host: 'accounts.ozwillo-preprod.eu',
          identifier: 'fake-id-for-this-post',
          secret: 'fake/secret_key_for_this_post',
          #local uri for development
          redirect_uri: "http://localhost:3000/users/auth/openid_connect/callback",
      },
  }

Any idea about missing configuration please ?
Big thanks in advance!

HI @inotekk,
This repo is no longer maintained. There is a maintained fork here though: https://github.com/m0n9oose/omniauth_openid_connect

Thanks, i'll change to this gem, try and ask there if i have the same issue.

I'm new to github and don't see any issues tab there. Maybe it's not activated...
I change my gem but still don't work with the same message.
I don't see many changes between your version and the new, so i glad you could give me some tips about configuration or possible mistake i have make ?

It works !
I'm working from an existing open source project and in my routes.rb someone put :
devise_for(
    :users,
    {
      path: '',
      ...
    }
)

So my uri's begin with http://localhost:3000/auth/openid_connect/
Then i need to specify above client_options the following values :
issuer: 'uri finded from the .well-known/openid-configuration uri',
client_jwk_signing_key: 'string content from the jwks_uri',
client_signing_alg: :RS256, #algorithm of my provider

Kind regards


Bug: kubernetes client does not complete

With this program:
package main

import (
	"fmt"

	"k8s.io/client-go/1.4/kubernetes"
	"k8s.io/client-go/1.4/rest"
)

func main() {
	kc, err := kubernetes.NewForConfig(&rest.Config{
		Host: "http://<IP_ADDRESS>:8080",
	})
	if err != nil {
		fmt.Println(err)
	}
	kc.Core(). // <-- completion does not work here
}

The library this refers to is at https://github.com/kubernetes/client-go/.

Yes, appears to be a bug. As a guess - must be related to heavy import alias usage in the lib. Will take a look at it on weekend.

@ghodss @nsf
I debug it.
Yes, it seems related to import alias.
In https://github.com/kubernetes/client-go/blob/master/1.4/kubernetes/typed/core/v1/componentstatus.go,
package v1

import (
	api "k8s.io/client-go/1.4/pkg/api"
	v1 "k8s.io/client-go/1.4/pkg/api/v1"
	watch "k8s.io/client-go/1.4/pkg/watch"
)

package name is v1, also import k8s.io/client-go/1.4/pkg/api/v1 with v1 alias.
I'm surprised to be able to compile.
FYI, if rename
k8s.io/client-go/1.4/kubernetes/typed/core/v1
to
k8s.io/client-go/1.4/kubernetes/typed/core/corev1
rep "package v1" $GOPATH/src/k8s.io/client-go/1.4/kubernetes/typed/core/v1/*.go -l | xargs sed -i "s/package v1/package corev1/"

gocode will works fine.
So, maybe override package methods in this? (sorry, I don't know)
https://github.com/nsf/gocode/blob/master/package_bin.go#L168-L170
I hope that helps.

Interesting, was trying to solve the issue but no luck and one interesting point. The bug is valid even for Go 1.6 and hence gocode's text package parser (old one).
I took a look at the package and turns out Go doesn't expose package aliases. Which makes those import statements in the package file useless. My initial though was that they are here to introduce those aliases and gocode was built under an assumption that it's true. Internally gocode uses package aliases assuming that import format actually contains unique identifiers, but as you can see it doesn't.
$$
package kubernetes
        import glog "k8s.io/client-go/1.4/vendor/github.com/golang/glog"
        import fmt "fmt"
        import discovery "k8s.io/client-go/1.4/discovery"
        import rest "k8s.io/client-go/1.4/rest"
        import flowcontrol "k8s.io/client-go/1.4/pkg/util/flowcontrol"
        import v1beta1 "k8s.io/client-go/1.4/kubernetes/typed/authorization/v1beta1"
        import registered "k8s.io/client-go/1.4/pkg/apimachinery/registered"
        import v1 "k8s.io/client-go/1.4/kubernetes/typed/autoscaling/v1"
        import v1 "k8s.io/client-go/1.4/kubernetes/typed/batch/v1"
        import v1 "k8s.io/client-go/1.4/kubernetes/typed/core/v1"
        import v1beta1 "k8s.io/client-go/1.4/kubernetes/typed/extensions/v1beta1"
        import install "k8s.io/client-go/1.4/pkg/api/install"
        import install "k8s.io/client-go/1.4/pkg/apis/authorization/install"
        import install "k8s.io/client-go/1.4/pkg/apis/autoscaling/install"
        import install "k8s.io/client-go/1.4/pkg/apis/batch/install"
        import install "k8s.io/client-go/1.4/pkg/apis/extensions/install"

But on the other hand import format contains all the necessary info to parse the stuff.
Anyways the point is - it's a fundamental flaw in gocode which exists due to partly historical reasons, partly misunderstanding of how things work.
I guess I will fix that, but it may take quite some time. Essentially I need to change the way gocode stores package identifiers in the AST (I use AST to store semantic info during type resolve) and instead of making "path -> alias" lookups when parsing imported package and then doing the reverse when resolving types, I need to store paths directly in the identifiers and use "path -> alias" lookups only when printing stuff out (for the sake of pretty printing). Which is a smarter idea anyway.

To elabore more on the issue for those who is interested in historical reasons.
Initially Go had a very simple package description format which is super similar to actual Go source code. And in fact it is so similar that gocode's first package parser was built using regexp preprocessor and the result of preprocessing was fed to go/parser. And it worked fine for some time. Then the package format evolved and at some point I had to take their actual package parser and convert result it produces to the AST structure used in gocode. AST was used because as I said above, packages were parsed via go/parser which spits out AST.
And it made sense to me to make everything uniform, I have packages with some type info and I have currently edited file and other files of the currently edited package with some type info in them as well. So gocode just integrates everything into one AST structure with some scoping added on top of it and uses that to resolve the types. Hence artifacts like these. Because parsing actual source code gives me things like:
import omgwtfbbq "fmt"

func main() {
   omgwtfbbq.Println("hello, world")
}

And instead of transforming that AST into a friendlier for type analysis structure, gocode transforms package type info into similar AST.
So yeah, whatever, I will fix it in 1-2 weeks maybe.

Should be fixed, but let me know if it's not.
As usual to update: gocode close && go get -u github.com/nsf/gocode


stops running after sometime

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x656e76]
goroutine 6 [running]:
main.main.func1(0xc000014310, 0x0, 0x0, 0x6d9194, 0x2e, 0xc000014308, 0xc000078ba0)

Can you please give detailed screenshots, @MR-pentestGuy?

same situation here :)


AuthScreen.js UI : should use Scrollable View

Issue description
While working on a issue , I noticed that AuthScreen.js  UI is not looking good in landscape Orientation
How to Reproduce
Step 1 : Log out from your account and then login again
Step 2 : Now you are on login screen(AuthScreen.js) and then rotate your phone in landscape orientation
And no you can see the below screen shot

Here you can clearly see that the "Zulip" logo is not looking that good also the last option that is "Sign in with Apple" is also not gettin proper space .
Fix
This can be fixed by using a ScrollView instead of View or Screen

I am working on this issue @gnprice @chrisbobbe plz comment and give your suggestions

I am working on this issue @gnprice @chrisbobbe plz comment and give your suggestions


VS Code main window is blank in version 1.27.0

VSCode Version: 1.27.0
VSCode Insiders Version: 1.27.0
OS Version: Windows 8.1

I was update Visual Studio Code from 1.26 to 1.27.0 and have error blank when open VS Code. I was try some way to resolve this issue but it didn't working:

Uninstall VS Code and reinstall version 1.27.0
Setting the compatibility with windows 8 in VsCODE shortcut.
Right-click on Shortcut and add --disable-gpu to Target: "C:\Program Files\Microsoft VS Code\Code.exe" --disable-gpu
Does this issue occur when all extensions are disabled?: Yes

https://i.stack.imgur.com/ypvtC.jpg
https://i.imgur.com/eU282KY.jpg
Is there some way to fix this issue??
Thanks

Your issue's already been fixed in the 1.27.1 patch release, so update to that.

Duplicate of #57982. Should be fixed in recovery build


Add none formatting option

@sidkurella, Here is the PR that adds the none format option.
I've also opened #65 to track removing the need none in the next major version bump


Create PULL_REQUEST_TEMPLATE.md

What
Create initial PULL_REQUEST_TEMPLATE, this makes it clear to potential contributors what we expect and save the admin of asking for CLA's to be signed, tests to be added etc.
Reviewers

+1


validate relative lock time on input of transaction

[x] issue #138
[x] follows contribution guide
[x] code change includes tests

@mubarak23 please read about relative locktimes, what you implemented does not do what is required.
https://learnmeabitcoin.com/technical/transaction/input/sequence/
https://github.com/bitcoin/bitcoin/blob/d661e2b1b771abafb0b152842d775d3150032230/src/consensus/tx_verify.cpp#L39

@mubarak23 please read about relative locktimes, what you implemented does not do what is required.
https://learnmeabitcoin.com/technical/transaction/input/sequence/ https://github.com/bitcoin/bitcoin/blob/d661e2b1b771abafb0b152842d775d3150032230/src/consensus/tx_verify.cpp#L39

can you update the issue description with full detail of what is required ?
what i implemented is base on what i understand from the issue description.
except there is something missing in the issue description

Hi @mubarak23, I might have some ideas on this.
from https://learnmeabitcoin.com/technical/transaction/input/sequence/

<=0xEFFFFFFF — Relative Locktime.
This setting allows you to set a locktime on the transaction relative to when the output being spent was mined.
0x00000000 to 0x0000FFFF — Blocks. Set the relative locktime as a number of blocks.
0x00400000 to 0x0040FFFF — Time. Set the relative locktime as a number of seconds.

You should check if tx_input.sequence <= 0xEFFFFFFF, and implement the relative validation accordingly. What this Pr currently do is validating the absolute locktime situation, which is currently being implement by me here

Hi @mubarak23, I think #138 written by @m-kus is clear enough, but anyway I will explain to you based on my understanding.
from https://learnmeabitcoin.com/technical/transaction/input/sequence/

<=0xEFFFFFFF — Relative Locktime.
This setting allows you to set a locktime on the transaction relative to when the output being spent was mined.
0x00000000 to 0x0000FFFF — Blocks. Set the relative locktime as a number of blocks.
0x00400000 to 0x0040FFFF — Time. Set the relative locktime as a number of seconds.

You should check if tx_input.sequence <= 0xEFFFFFFF, and implement the relative validation accordingly. What this Pr currently do is validating the absolute locktime situation, which is currently being implement by me here. Hope this is helpful.

So, what is the catch for validating relative lock time

Hi @mubarak23, I think #138 written by @m-kus is clear enough, but anyway I will explain to you based on my understanding.
from https://learnmeabitcoin.com/technical/transaction/input/sequence/

<=0xEFFFFFFF — Relative Locktime.
This setting allows you to set a locktime on the transaction relative to when the output being spent was mined.
0x00000000 to 0x0000FFFF — Blocks. Set the relative locktime as a number of blocks.
0x00400000 to 0x0040FFFF — Time. Set the relative locktime as a number of seconds.

You should check if tx_input.sequence <= 0xEFFFFFFF, and implement the relative validation accordingly. What this Pr currently do is validating the absolute locktime situation, which is currently being implement by me here. Hope this is helpful.

This is helpful,
Relative locktime allows you to specify an amount of time or number of blocks from when an output was mined before a transaction spending it becomes valid.
all relative locktime settings are always going to be less than or equal to 0xEFFFFFFF.
i will refactor the code

@mubarak23 please read about relative locktimes, what you implemented does not do what is required.
https://learnmeabitcoin.com/technical/transaction/input/sequence/ https://github.com/bitcoin/bitcoin/blob/d661e2b1b771abafb0b152842d775d3150032230/src/consensus/tx_verify.cpp#L39

Kindly the review recent changes, base on relative locktimes @m-kus

@bloomingpeach can you help review this implementation base on your understanding of the relative locktime

Looking at validate_absolute_locktime, the function collects the full transaction and loops over each input. Should I follow this approach, or should I stick with what I did, where the function accepts the inputId?
@maciejka

@mubarak23 if it's ready for review, please convert from draft to PR

@mubarak23 if it's ready for review, please convert from draft to PR

Converted to Ready for Review

@mubarak23 if it's ready for review, please convert from draft to PR

Converted to Ready for Review

@m-kus


Add "external" header option for tabular endpoint

The tabular endpoint has both internal (merging/data services) and external (data table, download) clients.  External clients of "true" tabular (not JSON) prefer a different header format:
“Variable display name [ID]”
Since internal (i.e. software) clients still need the original header, we will request it via a new reportConfig property:
headerFormat: enum [ internal, external ]

Decided to make the enum values "standard" and "display"; this is complete.

Discussed with Ryan. This will come up later when the downloads feature becomes available. He tested already and we would have to test manually with curl requests. Going to move to complete.


Fix prop name typo in README

The README had an incorrect prop name that gave me a bit of confusion until I looked further in the docs folder. Hopefully this saves someone else a couple minutes of digging.

Thanks!


Setpoint Item Type

There is a temperature Item typ but does a Setpoint Temperature Item exists?

This should be a thermostat item. So you need the current temperature and the target temperature. (See https://github.com/redhell/homebridge-openHAB/blob/master/items/ThermostatItem.js ,does not work at the moment). @tommasomarchionni It would be cool to know if you can combine multiple items from openhab to one.

THERMOSTAT_MODE	(since 1.6.0) Used to get and set the mode (of Number type) of the thermostat	numeric values translate to the following types
0 = "Off"
1 = "Heat"
2 = "Cool"
3 = "Auto"
4 = "Aux Heat"
5 = "Resume"
6 = "Fan Only"
7 = "Furnace"
8 = "Dry Air"
9 = "Moist Air"
10 = "Auto Changeover"
11 = "Heat Econ"
12 = "Cool Econ"
13 = "Away"

THERMOSTAT_OPERATING_STATE	(since 1.6.0) Used to get the operating state (of Number type) of the thermostat	numeric values translate to the following types
0 = "Idle"
1 = "Heating"
2 = "Cooling"
3 = "Fan Only"
4 = "Pending Heat"
5 = "Pending Cool"
6 = "Vent / Economizer"

THERMOSTAT_SETPOINT	(since 1.6.0) Used to get and set the setpoint of the thermostat	setpoint_type=value : parameter to select setpoint type, value is one of the following numerical values:
1 = Heat
2 = Cool
*setpoint_scale=value** : parameter to select setpoint scale, value is one of the following numerical values:
0 = Celsius
1 = Fahrenheit

THERMOSTAT_FAN_MODE	(since 1.6.0) Used to get the fan mode (of Number type) of the thermostat	numeric values translate to the following types
0 = "Auto Low"
1 = "On Low"
2 = "Auto High"
3 = "On High"
4 = "Unknown"
5 = "Unknown"
6 = "Circulate"

THERMOSTAT_FAN_STATE	(since 1.6.0) Used to get the fan state (of Number type) of the thermostat	numeric values translate to the following types
0 = "Idle"
1 = "Running"
2 = "Running High"

Those are the properties of the thermostat item in openhab. But anyways homkitbridge reads the sitemap so there one way of doing this could be combining a Text item (the current temperature) and a Setpoint Item (the target temperature) in a group or frame.
But the combination i believe would need to be done by the home bridge-openHAB plugin
The easiest way of going about this I think however would be using the target temperature as the current temperature...

now that i have thermostats i wonder if providing support for thermostats is on the roadmap.. or what is required to get things working.

I saw that @redhell added a ThermostatItem. So I guess this should now be supported somehow.

Actually this does not work at the moment. There are more things to get a working thermostat.
I think you need multiple inputs like current temperature and the whished temperature. In my situation these are two items and i have to figure out how to combine them.

In my situation as well... But couldn't you just use the set point for both? Then the Thermostat would always have reached the set point but I think this is not a big issue

What is a general thermostat? In my case, my room thermostat (MAX! - controlled by the Openhab MAX!Cube-Binding) is controlling four further radiator thermostats. It has not a simple heating state, it is rather setting the valve position of each radiator separately and adaptively. However the most important things would be the actual temperature (read-only) and the set temperature (read/write). Currently, in the exported sitemap, the Setpoint element is used for the set temperature and a Text element is used for the actual temperature. Nevertheless, both the Text and the Setpoint element are interpreted by homebridge as read-only, the Setpoint element, however, should be also writable. Wouldn't that be sufficient for setting the room temperature?

@gstiegl i would be pleased to try

Now with<EMAIL_ADDRESS>thermostat is in experimental.
Now you can only see current temperature and set target temperature.

gonna check .. thanks! :hotsprings:

Great! I will check this asap as well! Thanks!

Hm, seems not to work im my case. I am using the following configuration:
"platforms": [
{
"platform": "openHAB",
"name": "openHAB",
"host": "localhost",
"port": "8080",
"sitemap": "homekit",
"useLabelForName": true,
"customAttrs": [
{
"itemName":"LivingWallThermostatActualTemp",
"itemLabel":"Thermostat",
"itemType": "ThermostatItem",
"itemSubType":"CurrentTemperatureCItem",
"itemUniqueAggregationId":1
},
{
"itemName":"LivingWallThermostatSetTemp",
"itemLabel":"Thermostat",
"itemType": "ThermostatItem",
"itemSubType":"TargetTemperatureCItem",
"itemUniqueAggregationId":1
}
]
}
]
and homekit.sitemap on the openhab side looks as follows:
Setpoint item=LivingWallThermostatSetTemp label="Regeltemperatur"
Text item=LivingWallThermostatActualTemp label="Temperatur"
which leads to the following message in my homebridge log:
[openHAB] Platform - The widget 'Thermostat' of type NumberItem is an item not handled.
[openHAB] Platform - The widget 'Thermostat' of type NumberItem is an item not handled.
Is there anything else to do?


oc publish using version 0.34.8 to an S3 bucket ignoring the folder structure

oc version - 0.34.8
os - Windows 10
I was trying to do an oc publish to an S3 bucket. My project gets published, but without any folder structure and all the file names are modified to include the folder names with backslash. So I get a flat structure for my project due to which the resources being referenced from my files becomes unavailable. This issue has been observed on MAC too.

Thanks @ggehlot1980
I am trying to understand if this is a Windows 10 problem as I remember as similar issue a while ago: https://github.com/opentable/oc/issues/30
If you see the same issue from a mac it may be unrelated. We use macs to publish components every day so the issue may be different. Either component related or registry related.
Just to be sure. When you say publish to an S3 bucket - you mean you are using the oc cli to publish and you are actually publishing to an OC registry right?

Yeah I am using the oc cli to publish (oc publish )and I am publishing to the oc registry only. My oc registry is linked to the the S3 bucket.

Oh, I see, so the registry itself being running on Windows may actually be related to #30

Ok, I confirm that running a registry instance in windows and publishing to it the S3 upload is broken.

When instead publishing from windows to a linux registry, I see an error: "package is not valid".
So, I believe the packaging phase that creates/unpackages the tar.gz file has more than one problem on windows machines.

@ggehlot1980 this should be now fixed. Can you please retry by ensuring both Registry and CLI run with the latest version I just published: 0.35.5


store job's response

I think the response is a very important information, so i have just implemented!
Wish this will help somebody who wants to store the response body.

I like this idea, but I'm not sure about storing it in the JSON. I'd prefer storing the output optionally in a log file or similar.

Thanks a lot! I'll close this PR and create an issue about it.


Custom stylesheet is not visible on status page

When we add css through settings/stylesheet/custom Stylesheet it is saved correctly, but it isn't visible on the front status page. We see:

I don't know if that is related.
Regards,
Maarten
(version 2.0.3 with fix #1202 applied)

Is it working on the current 2.0 branch?

I would need to test that and setup and new env for it..
for test we added a simple
body {  background-color: yellow !important; }
Anyway for me to test it an the 2.0 brach without creating a new env?

Fixed in the 2.0 branch @GrahamCampbell

I've not seen you on slack in a while @jbrooksuk?

Weekend away, relaxing, work party and work end of year meeting has kept me rather busy I'm afraid.
I was about to reply to your text when I saw a Slack notification about not texting you :trollface:

Are you free tonight. There's some very important, and some less-important stuff that needs doing.

Can't really talk about the very important one on GitHub for reasons that will be immediately apparent, lol.

I'm actually working till half 9 tonight, I'm free tomorrow, or you could email?

Confirming this fixed the issue. Thanks!


Implement adaptive history and LCS-based history similarity.

@Sotskin @KarlLeell Please review this pull request and see if there is any potential bug. I tested with ResNet-269, and the histories are always the same which is a little surprising to me. But it may be true for ResNet...

Is the history always the same regardless of Engine and asynchronous call?


Improve inline comments

Ready to review

[x] Inline comments Base
[x] Inline comments Blog
[x] Inline comments Breads
[x] Inline comments Locations
[x] Resolve merge conflicts with master
[x] Incorporate Tom's comments

I think this is ready to review and look forward to incorporating any further comments.
To note, I stepped outside the brief a couple of times to ensure line-length is always under 80 chars.

This is great. Left a few notes.  I may do a separate comments pass later.
This PR seems to include much of the work I did when removing the BasePageFieldsMixin. Is github just doing that because you started this PR before that change was in?

@shacker yes, I merged in master when I merged your BasePageFieldsMixin to master (it's commit 326d11b) The models changed a lot with that PR and it made sense to be able to see those changes when reviewing the comments I think.

@shacker I think I've hopefully caught all your comments!


custom key bindings

How can I make custom key bindings like "Shift-F11" ? I tried

@manager.registry.add_binding('Shift', 'F11', eager=True)
@manager.registry.add_binding(Key('<Shift-F11>'), eager=True)
@manager.registry.add_binding(Key('<Shift>'), Key('<F11>'), eager=True)

How do I make "shift"-key combinations?
My gut says no but I want to ask the question to be sure: Would it be possible to suppress the terminals' key bindings so that I could use keys like F1, F10, F11, F12, Ctrl-S

Hi @obeleh,
The underlying terminal protocol does not define something like Shift-F11. However, I think that most terminal applications send this combination as F23. Could you try binding a handler to F23?
https://github.com/jonathanslenders/python-prompt-toolkit/blob/master/prompt_toolkit/keys.py#L99


Add more undelete unit test for compaction

This PR adds more unit test in compaction with undeletes.

Codecov Report

Merging #1566 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1566      +/-   ##
============================================
+ Coverage     73.68%   73.70%   +0.01%
- Complexity     8299     8303       +4
============================================
  Files           583      583
  Lines         45102    45102
  Branches       5699     5699
============================================
+ Hits          33235    33243       +8
+ Misses        10186    10181       -5
+ Partials       1681     1678       -3

Impacted Files
Coverage Δ
Complexity Δ

...in/java/com/github/ambry/store/BlobStoreStats.java
69.55% <0.00%> (-1.27%)
101.00% <0.00%> (-1.00%)

...github/ambry/rest/AsyncRequestResponseHandler.java
86.86% <0.00%> (-1.02%)
22.00% <0.00%> (ø%)

.../main/java/com/github/ambry/store/ScanResults.java
82.81% <0.00%> (ø)
17.00% <0.00%> (ø%)

...n/java/com/github/ambry/store/PersistentIndex.java
91.10% <0.00%> (+0.10%)
255.00% <0.00%> (+1.00%)

...rc/main/java/com/github/ambry/store/BlobStore.java
87.94% <0.00%> (+0.16%)
139.00% <0.00%> (+1.00%)

...c/main/java/com/github/ambry/network/Selector.java
79.00% <0.00%> (+0.78%)
78.00% <0.00%> (+1.00%)

...va/com/github/ambry/replication/ReplicaThread.java
85.92% <0.00%> (+0.81%)
112.00% <0.00%> (+1.00%)

...java/com/github/ambry/store/CompactionManager.java
92.26% <0.00%> (+2.38%)
26.00% <0.00%> (ø%)

...b/ambry/network/BlockingChannelConnectionPool.java
76.04% <0.00%> (+3.12%)
12.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

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


Check for aars that only contributes the AndroidManifest

Plugin version
1.14.1
Gradle version
7.5.1
(Optional) Android Gradle Plugin (AGP) version
7.2.1
reason output for bugs relating to incorrect advice
----------------------------------------
You asked about the dependency 'androidx.compose.ui:ui-test-manifest:1.2.1'.
You have been advised to remove this dependency from 'androidTestImplementation'.
----------------------------------------

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.2.1 for releaseCompileClasspath

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.2.1 for releaseRuntimeClasspath

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.2.1 for releaseUnitTestCompileClasspath

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.2.1 for releaseUnitTestRuntimeClasspath

Shortest path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.2.1 for releaseAndroidTestCompileClasspath:
:commons-pricebox
\--- androidx.compose.ui:ui-test-manifest:1.2.1

Shortest path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.2.1 for releaseAndroidTestRuntimeClasspath:
:commons-pricebox
\--- androidx.compose.ui:ui-test-manifest:1.2.1

Source: release, main
---------------------
(no usages)

Source: release, test
---------------------
(no usages)

Source: release, android_test
-----------------------------
* Provides 1 lint registry: androidx.compose.ui.test.manifest.lint.TestManifestIssueRegistry (implies testImplementation).

Describe the bug
The plugin advice me to remove androidTestImplementation("androidx.compose.ui:ui-test-manifest:1.2.1") but that dependency is needed because it has an AndroidManifest with this:
        <activity
            android:name="androidx.activity.ComponentActivity"
            android:exported="true" />

And that's needed to run the intrumentation tests.
To Reproduce
If needed I can create a project to reproduce the issue.
Expected behavior
Don't advise to remove it
Additional context
As a workaround I excluded this dependency.

Thanks for the issue. A reproducer would be very helpful.

I'm not sure when or if I just had something wrong on my configuration but this is the new reason of this same case:
----------------------------------------
You asked about the dependency 'androidx.compose.ui:ui-test-manifest:1.3.3'.
You have been advised to change this dependency to 'runtimeOnly' from 'androidTestImplementation'.
----------------------------------------

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.3.3 for releaseCompileClasspath

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.3.3 for releaseRuntimeClasspath

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.3.3 for releaseUnitTestCompileClasspath

There is no path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.3.3 for releaseUnitTestRuntimeClasspath

Shortest path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.3.3 for releaseAndroidTestCompileClasspath:
:commons-pricebox
\--- androidx.compose.ui:ui-test-manifest:1.3.3

Shortest path from :commons-pricebox to androidx.compose.ui:ui-test-manifest:1.3.3 for releaseAndroidTestRuntimeClasspath:
:commons-pricebox
\--- androidx.compose.ui:ui-test-manifest:1.3.3

Source: release, main
---------------------
(no usages)

Source: release, test
---------------------
(no usages)

Source: release, android_test
-----------------------------
* Provides 1 lint registry: androidx.compose.ui.test.manifest.lint.TestManifestIssueRegistry (implies testImplementation).
* Provides 1 Android Activity: androidx.activity.ComponentActivity (implies testRuntimeOnly).

It not longer hints to remove the dependency. But it's strange to move it from androidTestImplementation to runtimeOnly. It should be androidTestRuntimeOnly. But that seems like another issue so I'm closing this one.


B1

confirmed:B1
node:84da7da6a8ab71e9

confirmed:B4
address:4pLopKWe7bT78UP3PQm51rz7wBz5fM8tpxm8uLBaUhuwqgsksF
baker:96

confirmed:B4
address:4pLopKWe7bT78UP3PQm51rz7wBz5fM8tpxm8uLBaUhuwqgsksF
baker:96

Form Submitted
21:32
GMT+3


Update about-keyboard-input.md

Update scancodes table.

Remove "Scan 1 break" column because we cannot see those via any of Windows API - RAWKEYBOARD/WM_KEYDOWN/WM_SYSKEYDOWN/WM_KEYUP/WM_SYSKEYUP are using only "Scan 1 make" codes with additional "break" flag on key up. Remove erroneous paragraph about that.
Mention that it is "keyboard driver" who generates these scan codes currently - because HID devices don't have i8042 scan codes natively.
Add multimedia keys to the list of scan codes.
Remove useless E0_ lines from the table.

Sources:
https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf
https://usb.org/document-library/hid-usage-tables-13

Need to do another pass and add HID Usages to the table and change key names in accordance to the current HID Usage Table to avoid confusion:

The HID Usage Tables 1.3 document also includes all Usage definitions as a JSON file as an attachment to the PDF. The PDF serves as the 'single' source of truth.

Need to do another pass and add HID Usages to the table and change key names in accordance to the current HID Usage Table to avoid confusion:

The HID Usage Tables 1.3 document also includes all Usage definitions as a JSON file as an attachment to the PDF. The PDF serves as the 'single' source of truth.

Done

adding @matwilli for visibility.


Remove deprecated unary_dyn and try_unary_dyn

Which issue does this PR close?
Rationale for this change
unary_dyn and try_unary_dyn were deprecated since v 46.0.0.

follows https://github.com/apache/arrow-rs/pull/6786

What changes are included in this PR?
Remove them along with utility functions used in their implementations.
Are there any user-facing changes?
yes
cc @alamb

Thanks @findepi


updated production environment instructions

docker containers listening on ports other than port 80 need to specify that in the vhost label as myacsagents.westus.cloudapp.azure.com:8080.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@anznpatel : Thanks for your contribution to the Azure documentation! The author, @spboyer, has been notified to review your proposed change.

#sign-off


pktmon command is not documented

[Enter feedback here]
The pktmon command is not documented. It needs to be documented. Please document it.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6d382ca0-6538-5e1d-3e83-e31c9ab6a911
Version Independent ID: 11eff296-6158-f89a-4941-8735529183e9
Content: Windows commands
Content Source: WindowsServerDocs/administration/windows-commands/windows-commands.md
Product: windows-server
Technology: windows-commands
GitHub Login: @JasonGerend
Microsoft Alias: jgerend

#assign:xelu86

Thanks again for contacting Microsoft. We value your feedback. A documentation change has been made and will be live after the next business day. You can view more about the pktmon cmdlet here.
We will be closing this as resolved. Thank you and have a most pleasant day. #please-close


docs(api-v2): Document what happens when a resource has a link to a deleted resource

https://dasch.myjetbrains.com/youtrack/issue/DSP-272
Closes #1427.

Thanks for the review!


feat(268): add sort to MyProgress.tsx

Okay, I will double check things just in case tonight.
If there's anything else you want done before demo or I can help in anyway, let me know.  I have a five day weekend from work so I will have a lot of extra time after tomorrow.


test(instrumentation-restify): add ESM test for restify

Which problem is this PR solving?

updates #1942

Short description of the changes

add use-restify.mjs fixture for testing ESM usage of restify instrumentation
add ESM test for restify instrumentation

Also added use-restify.cjs for now to show that instrumentation looks to currently work for CJS but not ESM.
# works, shows span in output
➜  fixtures git:(jamie.restify-esm-test) ✗ node use-restify.cjs
# doesnt work
➜  fixtures git:(jamie.restify-esm-test) ✗ node<EMAIL_ADDRESS>use-restify.mjs

will revisit later


Allow subprojects to define their own bundlePath

We have a setup with 3 bundles: a common bundle (deployed to author and publisher), an author bundle (only deployed to author) and a publisher bundle (only deployed to publisher). This is controlled by the install folder. So a setup like this requires finer control over the bundlePath.

do you mean that AEM could install jars like configs with run modes?
do you want to configure sth like:
config.author, config.publish ->  install.author install.publish etc ?

Yes, folders selected by runmodes is what I am referring to.

how about https://github.com/Cognifide/gradle-aem-plugin/pull/15 ?
your idea, but code a little bit cleaner

Yes, works fine on my project.

closing as released in 1.1.0


fix(plugin): update all assignments

Closes #443
To be honest, I don't khow exactly how this fixes the migration, but it works 😅

Thanks @timdeschryver 🙌


Filter method fails in "Diff Two Arrays" challenge

Challenge Name
Diff Two Arrays 
Issue Description
Results the same with two different methods (filter and index); index method passes the challenge and filter method does not.
Browser Information

Browser Name, Version:  IE 11
Operating System:  Windows 10
Mobile, Desktop, or Tablet:  Desktop

Your Code
function isEqual(value) {
  return value === this;
}
function diffArray(arr1, arr2) {
  var newArr = [];
...

//Looping through arr1 to find elements that do not exist in arr2

//my code -- this code does not pass:
    var arr3 = arr2.filter(isEqual, arr1[i]);
  if (arr3.length === 0)
{ newArr.push(arr1[i]);}

//this code published on Internet acceptable for challenge:
    if (arr2.indexOf(arr1[i]) === -1)
 { newArr.push(arr1[i]);}

...

@griffinf3 thanks for the issue, can you please share the link to the challenge and the complete code with the screen shots of the page.

link to challenge: https://www.freecodecamp.com/challenges/diff-two-arrays
code:
function isEqual(value) {
return value === this;
}
function diffArray(arr1, arr2) {
var newArr = [];
// Looping through arr1 to find elements that do not exist in arr2
for (var i = 0; i < arr1.length; i++) {
var arr3 = arr2.filter(isEqual, arr1[i]);
if (arr3.length === 0)
//   if (arr2.indexOf(arr1[i]) === -1)
{
// Pushing the unique to arr1 elements to the newArr
newArr.push(arr1[i]);
}
}
// Looping through arr2 to find elements that do not exist in arr1
for (var j = 0; j < arr2.length; j++) {
var arr4 = arr1.filter(isEqual, arr2[j]);

if (arr4.length === 0)
// if (arr1.indexOf(arr2[j]) === -1)
{

  // Pushing the unique to arr2 elements to the newArr
  newArr.push(arr2[j]);
}

}
return newArr;
}
diffArray([1, "calf", 3, "piglet"], [1, "calf", 3, 4]);

Quick note here, if value === this is updated to value == this everything passes.

@donofriov thanks a lot for looking into this issue,
@griffinf3 apologies for the delay in getting back. Here is some debug code that will help you understand the problem:
function isEqual(value) {
  console.log(typeof value);
  console.log(typeof this);
  return value === this;
}

You can then open up the dev tools of your browser (should be F12 on Windows), and switch to the console tab to check the output.
I highly recommend using chrome if you can, but IE should work just fine.

Let us know if you need any more help in understanding this.


docs: Document additional slurm options

Should we also update this doc page with the new way to manage and launch Slurm jobs: https://fluent.docs.pyansys.com/version/stable/user_guide/launching_ansys_fluent.html#scheduler-support
?
See https://github.com/ansys/pyfluent/issues/2351


birdwatcher database failed

I hope this message finds you well !!
after installing birdwatcher as described here https://github.com/michenriksen/birdwatcher
I got an error in the section where it says
[+] preparing database... failed.
[-]           PG; ;connectionBad: could not translate host name "birdwatcher" to address: name or service not known
I hope that you my way out of that issue.
sincerely

Hi there, it looks like you have given Birdwatcher incorrect database details. It is currently trying to use birdwatcher as the hostname of the database, which it is complaining about because it can't resolve that hostname.


Switch to softprops/action-gh-release to upload artifacts for GitHub Releases

Description
This PR updates the publish-to-pypi job to upload the sigstore-generated signatures to the accompanying GitHub Release. These files were absent in the v24.3 release, which renders verifying the PyBOP wheel and the source distribution a tad difficult. Some other changes have been included as a part of small cleanups.
Review
Before you mark your PR as ready for review, please ensure that you've considered the following:

Updated the CHANGELOG.md in reverse chronological order (newest at the top) with a concise description of the changes, including the PR number.
Noted any breaking changes, including details on how it might impact existing functionality.

Type of change

[ ] New Feature: A non-breaking change that adds new functionality.
[ ] Optimization: A code change that improves performance.
[ ] Bug Fix: A non-breaking change that addresses an issue.
[ ] Documentation: Updates to documentation or new documentation for new features.
[ ] Refactoring: Non-functional changes that improve the codebase.
[x] Style: Non-functional changes related to code style (formatting, naming, etc).
[ ] Testing: Additional tests to improve coverage or confirm functionality.
[x] Other: Maintenance

Key checklist:

[x] No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
[x] All unit tests pass: $ nox -s tests
[x] The documentation builds: $ nox -s docs

You can run integration tests, unit tests, and doctests together at once, using $ nox -s quick.
Further checks:

[x] Code is well-commented, especially in complex or unclear areas.
[ ] Added tests that prove my fix is effective or that my feature works.
[ ] Checked that coverage remains or improves, and added tests if necessary to maintain or increase coverage.

Thank you for contributing to our project! Your efforts help us to deliver great software.

I'll make a separate PR for the Anaconda nightlies, since it would require a bit of cleanup for the conditions in the workflow across all jobs.

Yes, thanks, @BradyPlanden—I see that you already merged this—please let me know what you think the best way to proceed will be. I think the softprops action should work, because it just uploads the artifacts to the GitHub Release, so it should resemble actions/upload-artifact. When you/we are ready (with the Anaconda channel discussion about shared channels), I can create another PR for setting those nightly releases and refine this workflow's conditions so that the next release can go smoothly.


cleanup: Avoid implicit int-to-bool conversions.

IMPORTANT: This is a semantic change. Previously, it would count as a success if writing 64 bits results in actually writing only 1 byte, 2 bytes, or writing 10 bytes instead of the expected 8. Now, only writing exactly 8 bytes as requested counts as success.

Thanks for the info there; yeah it's a change but I think it's fine. Any writer returning the wrong number of bytes written should probably be known about anyway.


test flake: loosing nodes during raw conversion test

From https://cloudnative-k8sci.southcentralus.cloudapp.azure.com/blue/organizations/jenkins/pmem-csi/detail/master/187/tests and at least one other test run:
/mnt/workspace/pmem-csi_master/test/e2e/deploy/deploy.go:1012
Jun 18 22:29:12.479: get cluster information
Unexpected error:
    <*errors.errorString | 0xc003001700>: {
        s: "expected one master and one worker node, only got: [<IP_ADDRESS>:22]",
    }
    expected one master and one worker node, only got: [<IP_ADDRESS>:22]
occurred
/mnt/workspace/pmem-csi_master/test/e2e/deploy/deploy.go:1052

Some observations (from https://cloudnative-k8sci.southcentralus.cloudapp.azure.com/job/pmem-csi/job/master/187/artifact/joblog-jenkins-pmem-csi-master-187-kubeletlogs-1.19.log). kubelet is unhappy on at least worker1.
Jun 18 21:38:29 pmem-csi-govm-worker1 kubelet[878]: E0618 21:38:29.215644     878 driver-call.go:266] Failed to unmarshal output for command: init, output: "", error: unexpected end of JSON input
Jun 18 21:38:29 pmem-csi-govm-worker1 kubelet[878]: W0618 21:38:29.215660     878 driver-call.go:149] FlexVolume: driver call failed: executable: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds/uds, args: [init], error: fork/exec /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds/uds: no such file or directory, output: ""
Jun 18 21:38:29 pmem-csi-govm-worker1 kubelet[878]: E0618 21:38:29.215766     878 plugins.go:743] Error dynamically probing plugins: Error creating Flexvolume plugin from directory nodeagent~uds, skipping. Error: unexpected end of JSON input

This repeats a lot. Annoying, but not fatal. Similar to https://github.com/rancher/rke2/issues/234. We need to avoid the empty /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds directory. If it is supposed to contain something, then we need understand why it was missing.
More serious is this:
Jun 18 22:17:08 pmem-csi-govm-worker1 kubelet[878]: E0618 22:17:08.096800     878 upgradeaware.go:387] Error proxying data from backend to client: tls: use of closed connection
Jun 18 22:17:29 pmem-csi-govm-worker1 kubelet[878]: E0618 22:17:29.188425     878 upgradeaware.go:387] Error proxying data from backend to client: tls: use of closed connection
Jun 18 22:18:18 pmem-csi-govm-worker1 kubelet[878]: E0618 22:18:18.205510     878 upgradeaware.go:387] Error proxying data from backend to client: tls: use of closed connection
Jun 18 22:18:36 pmem-csi-govm-worker1 kubelet[878]: E0618 22:18:36.131634     878 kubelet_node_status.go:470] Error updating node status, will retry: error getting node "pmem-csi-govm-worker1": Get "https://<IP_ADDRESS>:6443/api/v1/nodes/pmem-csi-govm-worker1?resourceVersion=0&timeout=10s": net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Jun 18 22:18:36 pmem-csi-govm-worker1 kubelet[878]: E0618 22:18:36.948347     878 controller.go:178] failed to update node lease, error: Put "https://<IP_ADDRESS>:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/pmem-csi-govm-worker1?timeout=10s": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

It then reconnects, but the apiserver is either still overloaded or malfunctioning, because various watches are failing.
The situation on other workers is similar:
Jun 18 22:19:51 pmem-csi-govm-worker2 kubelet[876]: E0618 22:19:51.001399     876 reflector.go:127] object-"default"/"second-pmem-csi-intel-com-controller-token-w549j": Failed to watch *v1.Secret: failed to list *v1.Secret: secrets "second-pmem-csi-intel-com-controller-token-w549j" is forbidden: User "system:node:pmem-csi-govm-worker2" cannot list resource "secrets" in API group "" in the namespace "default": no relationship found between node 'pmem-csi-govm-worker2' and this object
Jun 18 22:19:51 pmem-csi-govm-worker2 kubelet[876]: I0618 22:19:51.755831     876 trace.go:205] Trace[415912461]: "Reflector ListAndWatch" name:k8s.io/client-go/informers/factory.go:134 (18-Jun-2021 22:19:17.367) (total time: 34387ms):
Jun 18 22:19:51 pmem-csi-govm-worker2 kubelet[876]: Trace[415912461]: ---"Objects listed" 34387ms (22:19:00.755)
Jun 18 22:19:51 pmem-csi-govm-worker2 kubelet[876]: Trace[415912461]: [34.387609571s] [34.387609571s] END
Jun 18 22:19:51 pmem-csi-govm-worker2 kubelet[876]: E0618 22:19:51.758275     876 kubelet.go:2209] node "pmem-csi-govm-worker2" not found
Jun 18 22:19:51 pmem-csi-govm-worker2 kubelet[876]: I0618 22:19:51.757232     876 trace.go:205] Trace[688677894]: "Reflector ListAndWatch" name:k8s.io/client-go/informers/factory.go:134 (18-Jun-2021 22:19:17.387) (total time: 34369ms):
Jun 18 22:19:51 pmem-csi-govm-worker2 kubelet[876]: Trace[688677894]: ---"Objects listed" 34369ms (22:19:00.757)

The master node was rebooted:
Jun 18 22:18:22 pmem-csi-govm-master kubelet[1524]: I0618 22:18:22.813687    1524 reconciler.go:224] operationExecutor.VerifyControllerAttachedVolume started for volume "second-pmem-csi-intel-com-node-setup-token-8hxpl" (UniqueName: "kubernetes.io/secret/190e06eb-f377-4b2f-a78b-acec28579967-second-pmem-csi-intel-com-node-setup-token-8hxpl") pod "second-pmem-csi-intel-com-node-setup-pjfxt" (UID: "190e06eb-f377-4b2f-a78b-acec28579967")
Jun 18 22:18:22 pmem-csi-govm-master kubelet[1524]: I0618 22:18:22.813783    1524 reconciler.go:224] operationExecutor.VerifyControllerAttachedVolume started for volume "dev-dir" (UniqueName: "kubernetes.io/host-path/190e06eb-f377-4b2f-a78b-acec28579967-dev-dir") pod "second-pmem-csi-intel-com-node-setup-pjfxt" (UID: "190e06eb-f377-4b2f-a78b-acec28579967")
Jun 18 22:18:22 pmem-csi-govm-master kubelet[1524]: I0618 22:18:22.813834    1524 reconciler.go:224] operationExecutor.VerifyControllerAttachedVolume started for volume "sys-dir" (UniqueName: "kubernetes.io/host-path/190e06eb-f377-4b2f-a78b-acec28579967-sys-dir") pod "second-pmem-csi-intel-com-node-setup-pjfxt" (UID: "190e06eb-f377-4b2f-a78b-acec28579967")
-- Reboot --
Jun 18 22:18:54 pmem-csi-govm-master systemd[1]: Started kubelet: The Kubernetes Node Agent.
 It pretty much had to be, there was no other reason for the master node to reboot. I caught it by running the test locally in a loop, then checked the complete kernel and systemd output with docker logs:
[ 1149.249164] pmem0: detected capacity change from 0 to<PHONE_NUMBER>6
[ 1149.251606] BUG: unable to handle page fault for address: ffffac7ac0045000
[ 1149.253207] #PF: supervisor read access in kernel mode
[ 1149.254621] #PF: error_code(0x0000) - not-present page
[ 1149.256080] PGD 79555067 P4D 79555067 PUD 0
[ 1149.257403] Oops: 0000 [#1] SMP PTI
[ 1149.258633] CPU: 0 PID: 27062 Comm: systemd-udevd Not tainted 5.8.15-301.fc33.x86_64 #1
[ 1149.260531] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
[ 1149.263500] RIP: 0010:pmem_do_read+0xc4/0x1b0 [nd_pmem]
[ 1149.264512] Code: 39 eb 0f 47 dd 4c 2b 0d 4a 46 16 f5 49 c1 f9 06 49 c1 e1 0c 4c 03 0d 4b 46 16 f5 89 da 4d 01 e1 0f 1f 44 00 00 83 fb 08 72 8b <49> 8b 45 00 49 8d 79 08 4c 89 ee 48 83 e7 f8 49 89 01 49 8b 44 15
[ 1149.267192] RSP: 0018:ffffac7a80b77a88 EFLAGS: 00010212
[ 1149.268199] RAX:<PHONE_NUMBER>000000 RBX:<PHONE_NUMBER>001000 RCX:<PHONE_NUMBER>000228
[ 1149.269355] RDX:<PHONE_NUMBER>001000 RSI: ffffe63540071540 RDI: ffff920fc5507028
[ 1149.270535] RBP:<PHONE_NUMBER>001000 R08: ffff920ff68b0000 R09: ffff920f81c55000
[ 1149.271756] R10:<PHONE_NUMBER>000080 R11: ffff920ff68b0000 R12:<PHONE_NUMBER>000000
[ 1149.272945] R13: ffffac7ac0045000 R14: ffff920ff68b0000 R15: ffffe63540071540
[ 1149.274069] FS:  00007f98ded67380(0000) GS:ffff920ffdc00000(0000) knlGS:0000000000000000
[ 1149.275296] CS:  0010 DS: 0000 ES: 0000 CR0:<PHONE_NUMBER>050033
[ 1149.276325] CR2: ffffac7ac0045000 CR3:<PHONE_NUMBER>886001 CR4:<PHONE_NUMBER>360ef0
[ 1149.277363] DR0:<PHONE_NUMBER>000000 DR1:<PHONE_NUMBER>000000 DR2:<PHONE_NUMBER>000000
[ 1149.278486] DR3:<PHONE_NUMBER>000000 DR6: 00000000fffe0ff0 DR7:<PHONE_NUMBER>000400
[ 1149.279645] Call Trace:
[ 1149.280316]  ? ___slab_alloc+0x127/0x5d0
[ 1149.281101]  pmem_rw_page+0xac/0xe0 [nd_pmem]
[ 1149.281886]  bdev_read_page+0x74/0xa0
[ 1149.282665]  do_mpage_readpage+0x528/0x750
[ 1149.283548]  ? xas_load+0x5/0x70
[ 1149.284244]  ? xa_load+0x38/0x60
[ 1149.284937]  mpage_readahead+0xc6/0x1b0
[ 1149.285687]  ? __blkdev_direct_IO_simple+0x2c0/0x2c0
[ 1149.286555]  read_pages+0x5d/0x300
[ 1149.287295]  page_cache_readahead_unbounded+0x1aa/0x230
[ 1149.288232]  ? flush_tlb_func_common.constprop.0+0x14b/0x250
[ 1149.289100]  force_page_cache_readahead+0xda/0x140
[ 1149.289881]  generic_file_buffered_read+0x557/0xba0
[ 1149.290758]  new_sync_read+0x102/0x180
[ 1149.291559]  vfs_read+0x14f/0x180
[ 1149.292245]  ksys_read+0x4f/0xc0
[ 1149.292914]  do_syscall_64+0x4d/0x90
[ 1149.293651]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1149.294581] RIP: 0033:0x7f98dfcaf3f2
[ 1149.295287] Code: c0 e9 b2 fe ff ff 50 48 8d 3d 8a 41 0a 00 e8 75 f0 01 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24
[ 1149.297875] RSP: 002b:00007ffe5931a0e8 EFLAGS: 00000246 ORIG_RAX:<PHONE_NUMBER>000000
[ 1149.299053] RAX: ffffffffffffffda RBX: 00005648bec513c8 RCX: 00007f98dfcaf3f2
[ 1149.300161] RDX:<PHONE_NUMBER>040000 RSI: 00005648bec513d8 RDI:<PHONE_NUMBER>000010
[ 1149.301358] RBP: 00005648bec04220 R08: 00005648bec513b0 R09: 00007f98dfd82a60
[ 1149.302490] R10:<PHONE_NUMBER>020000 R11:<PHONE_NUMBER>000246 R12:<PHONE_NUMBER>040000
[ 1149.303639] R13:<PHONE_NUMBER>040000 R14: 00005648bec513b0 R15: 00005648bec04270
[ 1149.304773] Modules linked in: xt_statistic nf_conntrack_netlink xt_multiport ipt_rpfilter xt_set iptable_raw ip_set_hash_ip ip_set_hash_net ip_set nfnetlink veth ipip tunnel4 ip_tunnel xt_addrtype xt_nat ipt_REJECT nf_reject_ipv4 ip_vs_sh ip_vs_wrr ip_vs_rr ip_vs iptable_mangle ip6table_mangle ip6table_filter ip6table_nat ip6_tables xt_MASQUERADE xt_conntrack xt_comment iptable_filter xt_mark iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nls_utf8 isofs intel_rapl_msr intel_rapl_common kvm_intel kvm qxl drm_ttm_helper ttm irqbypass drm_kms_helper cec joydev i2c_piix4 virtio_balloon virtio_net net_failover failover dax_pmem dax_pmem_core br_netfilter bridge drm stp llc overlay ip_tables nd_pmem nd_btt crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ata_generic serio_raw nfit pata_acpi virtio_blk libnvdimm qemu_fw_cfg
[ 1149.315382] CR2: ffffac7ac0045000
[ 1149.316113] ---[ end trace f297b8f3ea588105 ]---
[ 1149.316940] RIP: 0010:pmem_do_read+0xc4/0x1b0 [nd_pmem]
[ 1149.317907] Code: 39 eb 0f 47 dd 4c 2b 0d 4a 46 16 f5 49 c1 f9 06 49 c1 e1 0c 4c 03 0d 4b 46 16 f5 89 da 4d 01 e1 0f 1f 44 00 00 83 fb 08 72 8b <49> 8b 45 00 49 8d 79 08 4c 89 ee 48 83 e7 f8 49 89 01 49 8b 44 15
[ 1149.320829] RSP: 0018:ffffac7a80b77a88 EFLAGS: 00010212
[ 1149.321769] RAX:<PHONE_NUMBER>000000 RBX:<PHONE_NUMBER>001000 RCX:<PHONE_NUMBER>000228
[ 1149.322947] RDX:<PHONE_NUMBER>001000 RSI: ffffe63540071540 RDI: ffff920fc5507028
[ 1149.324204] RBP:<PHONE_NUMBER>001000 R08: ffff920ff68b0000 R09: ffff920f81c55000
[ 1149.325472] R10:<PHONE_NUMBER>000080 R11: ffff920ff68b0000 R12:<PHONE_NUMBER>000000
[ 1149.326591] R13: ffffac7ac0045000 R14: ffff920ff68b0000 R15: ffffe63540071540
[ 1149.327815] FS:  00007f98ded67380(0000) GS:ffff920ffdc00000(0000) knlGS:0000000000000000
[ 1149.329060] CS:  0010 DS: 0000 ES: 0000 CR0:<PHONE_NUMBER>050033
[ 1149.330120] CR2: ffffac7ac0045000 CR3:<PHONE_NUMBER>886001 CR4:<PHONE_NUMBER>360ef0
[ 1149.331378] DR0:<PHONE_NUMBER>000000 DR1:<PHONE_NUMBER>000000 DR2:<PHONE_NUMBER>000000
[ 1149.332596] DR3:<PHONE_NUMBER>000000 DR6: 00000000fffe0ff0 DR7:<PHONE_NUMBER>000400
[ 1149.333753] Kernel panic - not syncing: Fatal exception
[ 1149.335685] Kernel Offset: 0x33000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 1149.337154] Rebooting in 10 seconds..

The cluster recovered in my case. That it fails permanently in the CI is just more bad luck.
I'll try updating to Fedora 34, perhaps the newer kernel has a fix.


Add module/command for computing mu/sigma...

...borrowing heavily from khmer's abundance-dist-single.py.

Addressed in #264.


Maybe add tests

To play with the elm-test Fuzz a bit more.
Note the "Maybe" in the title!

Things I would like to test the most are not exposed and therefor can not be tested


Please add a license to this repo

Could you please add an explicit LICENSE file to the repo so that it's clear under what terms the content is provided, and under what terms user contributions are licensed?
Per GitHub docs on licensing:

[...] without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work. If you're creating an open source project, we strongly encourage you to include an open source license.

Thanks!

Hi!
Following on this... can you please add a LICENSE to the repo? It is a very interesting work but unfortunately nobody can use it otherwise.
Thanks!

Looks like this was fixed in https://github.com/gbagan/gmark/commit/935708d36f1fd8ac326c4513ccb3b79365c62d49. Thanks, @gbagan!


Add Sound in Console

First pass at trying to get the sound to play in the console. #11
I think this approach is fine for now, basically we keep a "predicted state" and tick the synths locally every time we render a game frame. It's kinda wasteful, but I'm not sure of another approach to use... Perhaps we can use channels and have the main thread "request" the sending back of audio every X samples or something, but I'm not sure how much better that will be.
Performance for this also seems pretty good, as the audio_test example runs at ~1% CPU or less.
The basic logic for this is:

Any time we save a state to memory for rollback, we also save along that predicted audio state.
When loading a state, we send the predicted audio state down to the audio thread and let it continue playing.
Whenever we call game_loop update, we also "advance" the locally predicted audio state along with it.
The saved data is the SoundEngineData struct, which might be kinda overkill but we can see how it performs for now.

Had to a bit of refactoring on how audio was being generated, as the previous method was producing too much crackling and too latency sensitive. This should be decent enough for a first pass.
TODO:

[X] Add sound engine to console
[X] Add raw Apis to Api list
[X] Add AudioContext and related functions
[X] Update gamercade_rs helper functions
[x] Update website with related functions and documentation
[x] Setup a default sound or beep instrument
[x] Build an audio test project/rom

audio test game.zip
for testing

There's a minor popping issue when the audio callback & rollback are slightly out of sync. I've left a comment in the audio callback about this, maybe we can get it fixed later.


Can't log in to Deckmaster - This site can’t be reached deckmaster.fugi.tech

v 201810.17.0
Hey all - trying to setup the deckmaster extension for my mtga stream, and for some reason whenever I try to log in using my twitch account I get a:
"This site can’t be reached deckmaster.fugi.tech took too long to respond."
Trying to reach:
https://deckmaster.fugi.tech/login?code=a8zlizcytsktpk15k6ilkfx6638cqx&scope=openid+channel_check_subscription+user%3Aread%3Abroadcast+user%3Aedit%3Abroadcast
Anyway - would really like to use this overlay so if anyone can help it would be greatly appreciated.
Thanks!

A year and a half later and I'm having this issue as well.

I've just downloaded and having the same issue.

i am having the same issue was there anyone who figured out how to fix it?


Add admin.users.unsupportedVersions.export API support

This pull request adds admin.users.unsupportedVersions.export API method to the Web API client.
The endpoint always returns ok: true or ok: false + error only. After that, the org admin user who performed the API will receive a DM from Slackbot.

Category (place an x in each of the [ ])

[ ] bolt (Bolt for Java)
[ ] bolt-{sub modules} (Bolt for Java - optional modules)
[x] slack-api-client (Slack API Clients)
[ ] slack-api-model (Slack API Data Models)
[ ] slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
[ ] slack-app-backend (The primitive layer of Bolt for Java)

Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to the those rules.

Thanks for checking!


preferredSize do not work

Hi, i try it to create layout like vscode, but 'preferredSize={280}' don't work at 'E' section.
           <Allotment vertical={true}>
                <Allotment.Pane maxSize={30} minSize={30}>

A

                </Allotment.Pane>
                <Allotment.Pane>
                    <Allotment>
                        <Allotment.Pane maxSize={48} minSize={48}>

B

                        </Allotment.Pane>
                        <Allotment.Pane preferredSize={280} minSize={170} snap={true}>

C

                        </Allotment.Pane>
                        <Allotment.Pane>
                            <Allotment vertical={true}>
                                <Allotment.Pane>

D

                                </Allotment.Pane>
                                {/*at here, preferredSize={280} don't work*/}
                                <Allotment.Pane preferredSize={280} minSize={120} snap={true}>

E

                                </Allotment.Pane>
                            </Allotment>
                        </Allotment.Pane>
                        <Allotment.Pane preferredSize={280} minSize={170} snap={true}>

F

                        </Allotment.Pane>
                    </Allotment>
                </Allotment.Pane>
                <Allotment.Pane maxSize={22} minSize={22}>

G

                </Allotment.Pane>
            </Allotment>

I trace code and debug, found it caused container has no 'width' and 'height'.
 useIsomorphicLayoutEffect(() => {
      if (!dimensionsInitialized) {
        const { height, width } = containerRef.current.getBoundingClientRect();  // here
        splitViewRef.current?.layout(vertical ? height : width);
        layoutService.current.setSize(vertical ? height : width);
        setDimensionsInitialized(true);
      }
    }, [dimensionsInitialized, vertical]);

Since the mounting of React is from the inside to the outside，so container has no width and height

I fixed it by below code:
diff --git a/src/allotment.tsx b/src/allotment.tsx
index ea2385f..c555e20 100644
--- a/src/allotment.tsx
+++ b/src/allotment.tsx
@@ -29,6 +29,17 @@ function isPane(item: React.ReactNode | typeof Pane): item is typeof Pane {
   return (item as any).type.displayName === "Allotment.Pane";
 }

+function containAllotment(item: React.ReactNode | typeof Allotment): item is typeof Allotment {
+  let result = false
+  React.Children.toArray((item as any).props?.children).map((child)=>{
+      if((child as any).type.displayName === "Allotment")
+      {
+        result = true
+      }
+  })
+  return result
+}
+
 function isPaneProps(props: AllotmentProps | PaneProps): props is PaneProps {
   return (
     (props as PaneProps).minSize !== undefined ||
@@ -145,6 +156,7 @@ const Allotment = forwardRef<AllotmentHandle, AllotmentProps>(
     const splitViewViewRef = useRef(new Map<React.Key, HTMLElement>());
     const layoutService = useRef<LayoutService>(new LayoutService());
     const views = useRef<PaneView[]>([]);
+    const [paneWithAllotmentInitialized, setPaneWithAllotmentInitialized] = useState(false)

     const [dimensionsInitialized, setDimensionsInitialized] = useState(false);

@@ -463,6 +475,7 @@ const Allotment = forwardRef<AllotmentHandle, AllotmentProps>(
         const { height, width } = containerRef.current.getBoundingClientRect();
         splitViewRef.current?.layout(vertical ? height : width);
         layoutService.current.setSize(vertical ? height : width);
+        setPaneWithAllotmentInitialized(true);
         setDimensionsInitialized(true);
       }
     }, [dimensionsInitialized, vertical]);
@@ -503,16 +516,23 @@ const Allotment = forwardRef<AllotmentHandle, AllotmentProps>(
             if (isPane(child)) {
               splitViewPropsRef.current.set(key, child.props);

-              return React.cloneElement(child as React.ReactElement, {
-                key: key,
-                ref: (el: HTMLElement | null) => {
-                  if (el) {
-                    splitViewViewRef.current.set(key, el);
-                  } else {
-                    splitViewViewRef.current.delete(key);
-                  }
-                },
-              });
+              if(containAllotment(child) && !paneWithAllotmentInitialized)
+              {
+                  return null
+              }
+              else
+              {
+                return React.cloneElement(child as React.ReactElement, {
+                  key: key,
+                  ref: (el: HTMLElement | null) => {
+                    if (el) {
+                      splitViewViewRef.current.set(key, el);
+                    } else {
+                      splitViewViewRef.current.delete(key);
+                    }
+                  },
+                });
+              }
             } else {
               return (
                 <Pane

@johnwalley  would be nice to include it into nearest release

Hey @johnwalley I am also encountering this issue on v1.19.0 and was wondering if you have any plans to include the fix above in the newest release? Cheers!

@johnwalley any updates about it?

Hi, I also encountered the same problem! Here is my solution
const ref = useRef<any>(); useEffect(() => {   setTimeout(() => ref.current.reset(), 0); }, []);
<Allotment  ref={ref}>     <Allotment.Pane       visible={visible}       preferredSize={200}       minSize={200}       maxSize={400}     >

     </Allotment.Pane>

 </Allotment>

🤷♂ The preferredSize does not seem to work anymore at all. Also, @tpc-ht's suggestion did not work for me.
✅ I had better results with a combination of defaultSizes and proportionalLayout=false in addition to a onReset. This is a minimal example (without optimized callbacks etc.)
const ref = useRef<AllotmentHandle>(null)
const sizes = [200, 0]} // Set first size and "ignore" second

const handleReset = () => {
  ref.current?.resize(sizes)}  // mimics the doubleClick behavior as before
}

return (
  <Allotment
    ref={ref}                  // get access to resize(...)
    proportionalLayout={false} // use pixel sizes (not percentage)
    defaultSizes={sizes}       // Set first size and "ignore" second
    onReset={handleReset}      // override reset to use "defaultSizes"
  >
    // ... content, panes, ...
  </Allotment>
)

Wrapping this into a component actually restores the preferredSize behavior until it is fixed in the lib.

Also seeing that preferredSize is not respected on a nested grid since version 1.18.0 onwards.
Heres a repro of the issue: https://codesandbox.io/p/sandbox/nested-forked-v4j9qz
My simple fix for now was to downgrade to v1.17.1, but I'd like to contribute if possible

Thanks everyone for reporting this.
I've reverted the commit which appears to trigger the problem and published a new package v1.20.2.
If you get a chance to test it and report back that would be super helpful.


ResParserError: res1 must be zero!

With any recently downloaded APK from Google Play console (universal APK, archive APK) I can't decode resources.arsc. I attached sample archive APK, but it crash with universal APK too. APK created directly by Gradle task doesn't cause it.
> androguard --debug arsc 240307133-archived.apk

2024-03-12 16:28:27.029 | INFO     | androguard.core.apk:_apk_analysis:312 - Starting analysis on AndroidManifest.xml
2024-03-12 16:28:27.124 | INFO     | androguard.core.apk:_apk_analysis:369 - APK file was successfully validated!
Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\androguard\core\apk\__init__.py", line 1543, in get_android_resources
    return self.arsc["resources.arsc"]
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'resources.arsc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python312\Scripts\androguard.exe\__main__.py", line 7, in <module>
  File "C:\Python312\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\androguard\cli\cli.py", line 169, in arsc
    arscobj = a.get_android_resources()
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\androguard\core\apk\__init__.py", line 1549, in get_android_resources
    self.arsc["resources.arsc"] = ARSCParser(self.zip.read("resources.arsc"))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\androguard\core\axml\__init__.py", line 1471, in __init__
    self.packages[package_name].append(ARSCResTypeSpec(self.buff, pc))
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\androguard\core\axml\__init__.py", line 2339, in __init__
    raise ResParserError("res1 must be zero!")
androguard.core.axml.ResParserError: res1 must be zero!

System Information

Androguard Version: 4.1.0
Python Version: 3.12.2
Operating System: Windows 10 Pro x64 22H2

Attachments

240307133-archived.zip
androguard.log

Hi @arcao , this issue was brought up by @Ch0pin here https://github.com/androguard/androguard/pull/1008 and this PR should resolve your issue. Make sure to install the version of androguard with the latest commits. Regarding MobSF I can see that it is still using an old version of androguard.
Additionally, since this is brought up again while it was not an issue in the past and older androguard versions face the same issue, I decided to take a bit closer look.
It seems that the typeSpec struct as defined in the main here still states that both res0 and res1 must be zero. So it appears it is not something coming from updates in the Android source, though it is evident that several apps now create resources with res0 and res1 having other values than zero.
ResTable_typeSpec contains specifications for a resource type while ResTable_type represents actual instances of resources within that type. This, in combination with the fact that this issue appears in split APKs, and androguard is not fully able to handle split APKs properly at this point, shows that we need to revisit the current fix in the future, after having more feedback, to make sure that all resource types and instances are accounted for properly.

When can we expect a new release with the changes in #1008 ?

hi @ajinabraham, will aim to release a patch version over the next days. It still under consideration whether the current fix might affect some other cases but in theory for all non split/universal apks it should work fine.

FYI for the Debian package, I just made those a warning rather than error and it seems to work fine, based on advice from @reox in one of the discussions in the issue tracker:
https://salsa.debian.org/python-team/packages/androguard/-/commit/89459f99a71561f2daf20199f37d5485205b0941

I switched to the upstream patch from #1008 and pushed 3.4.0~a1-12 to Debian.

How about including the patch in #1008 on top of 3.4.0~a1 and calling that 3.4.0~a2?  Could be quick fix for those of us wanting to receive this fix sooner rather than later.

From a quick analysis on the resources.arsc from the airbnb app I think that the reserved res1 field in ResTable_typeSpec was used to count the number of ResTable_type following it. Not sure why this happens and what is the purpose.
Now, regarding raising an error or simply logging it:

If an error is raised then the parsing of the rest of the chunk stops and we skip to the next chunk, essentially missing any information it contained.
If we simply log it, then in the case that the reserved res0 or res1 have a purpose, then that purpose is not part of the existing logic of the parser and therefore the results will not be correct.

As far as I could tell from the main branch of the Android source code res0 and res1 are still considered reserved. Additionally, checking what other tools are doing on that matter, it seems that they are either not validating the values of res0 and res1 or simply just skipping these 3 bytes (like jadx here).
Based on the information above, I will keep the try-except blocks and convert the raising of errors to only logging this as an error, so the rest of the chunks will be parsed properly.
Will release patch version 4.1.1 shortly

Thanks, your update makes sense to me!  Since this issue is related to AAB, I wonder if the bundletool source might give some insight to what the new usages of res0 and res1 are?

I believe we can close this for now and revisit if needed in the future.
Indeed @eighthave  it is a nice idea to check the bundletool for any hints on how the two reserved fields are now being used and I will put it in my backlog.

I can't find a playable Audio


1.0.1 - Rocket.Chat Mobile app will not load

Description:
The app will not load since 1.0.1 -  I see only this message on Android:
Sorry an error has occurred, please try again
There is nothing in the logs.
Version - 1.0.1
Apps Engine Version - 1.4.2
Database Migration - 143
Android App version - 3.3.0, build 2060

@rafaelks Thanks for reaction. I'm looking for new RC version.

The foss app does not seem to be affected or am i just lucky?

duplicate of #2223 or?

the version 3.3.1 was published in playstore but in this version the login is not possible. Always getting:
length=0;index=0

BTW: you can make a quick and dirty fix by setting "button label text color" in your custom oAuth Service on the server side

Guys, this bug was fixed.
Thanks for posting the logs/JSON here (c/c @pstambrecht).
I'm closing this issue.


Operator restarting replica 1 too soon after replica 0 causing distributed queries to fail

When running our data cluster with a RF=2 we have observed that during cluster restarts, distributed queries to the cluster temporarily fail after the replica 0 has finished restarting and when replica 1 begins to restart.
The specific errors we get are:
Code: 198. DB::Exception: Not found address of host: chi-replica-1. (DNS_ERROR) (version <IP_ADDRESS> (official build))

We performed local testing by building in a temporary buffer period before replica 1 is restarted, and the connection errors went away.

@aaron276h , what is an operator version?
The restart is happening with a following logic:

Exclude not from load balancer
Remove from remote servers if this does not reduce the number of shards
Wait for all active queries to complete (5 minutes)
Terminate gracefuly

You may also increase the termination period if default is not sufficient:
https://github.com/Altinity/clickhouse-operator/blob/master/config/config.yaml#L278