feat(mem2reg): Remove trivial stores

Description
Problem*
Partially resolves https://github.com/noir-lang/noir/issues/4535. We can still do some more cleanup but will handle that in a follow-up. References the PR discussion comments for more context.
Summary*
Just marking the result of a load known was causing some failures, specifically for arrays. So for now I just look for trivial stores that are immediately storing the same value that was just loaded.
Also testing on CI as I keep getting rayon errors with cargo test for some reason. Making this check mark more values known was also difficult to due to this issue with testing so I am just pushing the more trivial case in this draft.
Additional Context
Documentation*
Check one:

[ ] No documentation needed.
[ ] Documentation included in this PR.
[ ] [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

[ ] I have tested the changes locally.
[ ] I have formatted the changes with Prettier and/or cargo fmt on default settings.

I'm kind of surprised by the brillig_cow_assign failure looking at the SSA:
brillig fn main f0 {
  b0():
    inc_rc [Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0]
    v2 = allocate
    store [Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0] at v2
    v3 = load v2
    inc_rc v3
    v4 = load v2
    inc_rc v4
    store v4 at v2
    v5 = allocate
    store v3 at v5
    jmp b1(u32 0)
  b1(v6: u32):
    v9 = lt v6, u32 10
    jmpif v9 then: b2, else: b3
  b2():
    v21 = eq v6, u32 5
    jmpif v21 then: b4, else: b5
  b4():
    v27 = load v2
    inc_rc v27
    v28 = load v2
    inc_rc v28
    store v28 at v2
    store v27 at v5
    jmp b5()
  b5():
    v22 = load v2
    v23 = array_set v22, index v6, value Field 27
    v25 = add v6, u32 1
    store v23 at v2
    v26 = add v6, u32 1
    jmp b1(v26)
  b3():
    v10 = load v2
    v12 = array_get v10, index u32 6
    v14 = eq v12, Field 27
    constrain v12 == Field 27
    v15 = load v5
    v16 = array_get v15, index u32 6
    v17 = eq v16, Field 27
    v18 = not v17
    constrain v17 == u1 0
    return
}

After Mem2Reg:
brillig fn main f0 {
  b0():
    inc_rc [Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0]
    v30 = allocate
    inc_rc [Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0]
    inc_rc [Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0]
    store [Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0] at v30
    v33 = allocate
    store [Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0, Field 0] at v33
    jmp b1(u32 0)
  b1(v6: u32):
    v34 = lt v6, u32 10
    jmpif v34 then: b2, else: b3
  b2():
    v42 = eq v6, u32 5
    jmpif v42 then: b4, else: b5
  b4():
    v43 = load v30
    inc_rc v43
    v44 = load v30
    inc_rc v44
    store v43 at v33
    jmp b5()
  b5():
    v45 = load v30
    v46 = array_set v45, index v6, value Field 27
    v47 = add v6, u32 1
    store v46 at v30
    v48 = add v6, u32 1
    jmp b1(v48)
  b3():
    v35 = load v30
    v36 = array_get v35, index u32 6
    v37 = eq v36, Field 27
    constrain v36 == Field 27
    v38 = load v33
    v39 = array_get v38, index u32 6
    v40 = eq v39, Field 27
    v41 = not v40
    constrain v40 == u1 0
    return
}

When comparing to the SSA without this optimization the only difference is there is an additional store v44 at v30 before store v43 at v33 in b4. I assume this is due Brillig's CoW optimization and how inc_rc is processed, although the SSA looks like it should execute correctly.
Edit: Found this hack (https://github.com/noir-lang/noir/blob/5c4f19f097dd3704522996330c961bf0a2db8d99/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs#L466). This PR is removing that re-store.

Accounting the extra re-load and re-store for inc_rc instructions fixes the brillig_cow_assign bug.
Interestingly, uhashmap is the last failure then and it only occurs with the additional mem2reg and DIE passes. Those passes were added to cleanup leftover unused stores after the loads referencing that store are removed during DEI.
e.g. without those two passes brillig_loop_size_regression gives the following SSA:
After Array Set Optimizations:
brillig fn main f0 {
  b0():
    v50 = allocate
    store u1 1 at v50, from_rc false
    v51 = allocate
    store Field 1 at v51, from_rc false
    v52 = allocate
    store u1 0 at v52, from_rc false
    v53 = allocate
    store Field 0 at v53, from_rc false
    v54 = allocate
    store u1 0 at v54, from_rc false
    v55 = allocate
    store Field 0 at v55, from_rc false
    jmp b1(u32 0)
  b1(v10: u32):
    v56 = eq v10, u32 0
    jmpif v56 then: b2, else: b3
  b2():
    v63 = load v50
    v64 = load v51
    constrain v63 == u1 1
    constrain v64 == Field 1
    v70 = add v10, u32 1
    jmp b1(v70)
  b3():
    store u1 1 at v50, from_rc false
    store Field 2 at v51, from_rc false
    return Field 2
}

Then with those passes we get the following:
After Array Set Optimizations:
brillig fn main f0 {
  b0():
    v71 = allocate
    store u1 1 at v71, from_rc false
    v72 = allocate
    store Field 1 at v72, from_rc false
    jmp b1(u32 0)
  b1(v10: u32):
    v77 = eq v10, u32 0
    jmpif v77 then: b2, else: b3
  b2():
    v78 = load v71
    v79 = load v72
    constrain v78 == u1 1
    constrain v79 == Field 1
    v80 = add v10, u32 1
    jmp b1(v80)
  b3():
    store u1 1 at v71, from_rc false
    store Field 2 at v72, from_rc false
    return Field 2
}

Interestingly, uhashmap is the last failure then and it only occurs with the additional mem2reg and DIE passes. Those passes were added to cleanup leftover unused stores after the loads referencing that store are removed during DEI.

Ideally we get rid of those extra passes anyway. It's a fairly unsatisfactory tradeoff with compilation time IMO to add two extra passes to get rid of a couple extra instructions in some brillig functions. More concerning is why running these again (although the culprit is presumably mem2reg) produces an issue in the first place.

Ideally we get rid of those extra passes anyway. It's a fairly unsatisfactory tradeoff with compilation time IMO to add two extra passes to get rid of a couple extra instructions in some brillig functions.

Yeah agreed. I'm going to mark this PR ready for review without those extra passes as it still shows a good improvement.

More concerning is why running these again (although the culprit is presumably mem2reg) produces an issue in the first place.

Then in a follow-up we can investigate the cause of uhashmap failing.

@vezenovm if it helps for this PR I was talking with @sirasistant who mentioned changing the design of how inc/dec-rc works in brillig. A side-effect of that work would be that we no longer would have to store after we load and dec-rc arrays at the end of each function. Should make things easier here I imagine?

A side-effect of that work would be that we no longer would have to store after we load and dec-rc arrays at the end of each function. Should make things easier here I imagine?

Yeah it should. The main issue here is I have to differentiate which stores I can actually remove if the known value of a store equals the address it is storing into. Without inc_rc/dec_rc, I can safely remove any of these stores. It does look to work with the solution on this branch. Although it is a bit hacked around as I have uhashmap failures on https://github.com/noir-lang/noir/pull/5905 which I believe are happening to due these stores being inadvertently deleted.

We can pause this work for a week or so then while the brillig changes are being worked on. Hopefully with the removal of the special tracking uhashmap won't fail anymore.

We can pause this work for a week or so then while the brillig changes are being worked on. Hopefully with the removal of the special tracking uhashmap won't fail anymore.

I haven't nailed down the exact cause but I think uhashmap might be failing due to a separate reason. I want to nail down exactly why it is failing. If it is due to inc_rc/dec_rc I'll wait for the brillig changes, otherwise I will try to resolve it.

If it is due to inc_rc/dec_rc I'll wait for the brillig changes, otherwise I will try to resolve it.

Ok I have nailed down the cause of the failure and it is in fact unrelated to inc_rc/dec_rc.
When cleaing up stores we check a couple things:

That there is not a load of that store.
That we do not have a reference param.

Now that I am cleaning up loads as well (https://github.com/noir-lang/noir/pull/5905) we can remove some stores if we know all loads to that store have been removed. However, I was not checking whether the address of the store we want to remove is possibly used as a reference directly such as in the parameter of a call. uhashmap is now passing for me locally on #5905 when checking whether the last store we want to remove is used in a call.

@jfecher I am going to pull out the changes from #5905 as I had built it off of this PR and the uhashmap failure is unrelated to the inc_rc/dec_rc edge case. I will pause working on this PR (but leave it open) until the design of inc_rc/dec_rc is updated in brillig.

@jfecher I was thinking we could replace this PR with (https://github.com/noir-lang/noir/pull/5935) which handles inc_rc / dec_rc in the safest manner by just always assuming when we have an inc_rc/dec_rc before a store we cannot remove that store. In this PR I was attempting to check for specifically this case but that was leading to issues. PR #5935 just accepts a smaller improvement (21% on this PR -> 7% on the new one) for safety. And then when inc_rc/dec_rc are redesigned we can remove the small check.

Closing in favor of https://github.com/noir-lang/noir/pull/5935


[RN][iOS] Fix symbol not found _jump_fcontext with use_frameworks!

Summary:
While developing Xcode 15, Apple reimplemented the linker.
In Xcode 15.0, the linker was making old iOS (< 15) crash when they were built using Xcode 15.
To fix that, we make Apple create new compiler flags (-ld_classic) to have a backward compatible linker.
In Xcode 15.1, Apple fixed that behavior, so the flags should not be required anymore.
But now, if we pass -ld_classic to the linker and we have an app that is using use_framworks!, that app crashes at startup.
This change remove the flags if the Xcode that is used is 15.1 or greater.
Note: The previous change added the flags to Hermes as well. I tested this fix in a configuration where Hermes has the flags and React Native does not, and it works. So we are removing the flags only from React Native.
Changelog:
[Internal] - Do not add the -ld_classic flag if the app is built with Xcode 15.1 or greater.
Test Plan:
Tested locally that a new app with use_frameworks! is not crashing.
Tested on Firebase Testlab that a new app built with Xcode 15.2 and running on iOS <15 is not crashing at startup.

Thank you for resolving the issue. 😄 👍
I created a patch-package diff with the changes in the PR. (react-native 0.71.15)
react-native+0.71.15.patch

diff --git a/node_modules/react-native/scripts/cocoapods/utils.rb b/node_modules/react-native/scripts/cocoapods/utils.rb
index 154ba3e..25968c2 100644
--- a/node_modules/react-native/scripts/cocoapods/utils.rb
+++ b/node_modules/react-native/scripts/cocoapods/utils.rb
@@ -160,7 +160,7 @@ class ReactNativePodsUtils

                 # fix for weak linking
                 self.safe_init(config, other_ld_flags_key)
-                if self.is_using_xcode15_or_greter(:xcodebuild_manager => xcodebuild_manager)
+                if self.is_using_xcode15_0(:xcodebuild_manager => xcodebuild_manager)
                     self.add_value_to_setting_if_missing(config, other_ld_flags_key, xcode15_compatibility_flags)
                 else
                     self.remove_value_from_setting_if_present(config, other_ld_flags_key, xcode15_compatibility_flags)
@@ -299,7 +299,7 @@ class ReactNativePodsUtils
         end
     end

-    def self.is_using_xcode15_or_greter(xcodebuild_manager: Xcodebuild)
+    def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
         xcodebuild_version = xcodebuild_manager.version

         # The output of xcodebuild -version is something like
@@ -310,7 +310,8 @@ class ReactNativePodsUtils
         regex = /(\d+)\.(\d+)(?:\.(\d+))?/
         if match_data = xcodebuild_version.match(regex)
             major = match_data[1].to_i
-            return major >= 15
+            minor = match_data[2].to_i
+            return major == 15 && minor == 0
         end

         return false

When I ran the pod install on a machine with Xcode 15.2,
I see a minor blemish and want to inform you.
it produces " " value to OTHER_LDFLAGS. (all configurations)

it looks wierd but build is OK.


[BUG] Observer tool fails to fetch matchid

Could you please provide more details about how you used the tool and when or how you encountered this error.

I used it on the Korean server, and in a custom room, a friend joined the blue team and I entered the spectator.

Hi just got the same error, I'm from SEA so I just picked the nearest server in the League tool kit (tried JP1 and KR) then successfully hooked the app with server and valorant, but when I start a game as an observer (just me and a friend for testing) I also got "fails to fetch matchid".

btw, I'm using this observer tool and the league tool kit with a development API key from riot. Maybe that could be a reason? restricted API access? just checked on the Riot API docs and saw that Valorant Match API requires some elevated API access.

We are aware of this. Arm it seems like it's only working in Europe. We are trying to fix this issue, as fast as we can

This should be fixed with the newest update of the tool v1.1.0.
You can install the update by simply opening your tool and letting it auto-update or download it from the release page.
Please try it out and give us some feedback :)

Thanks for your update. I tried the new version, it gave no error on the Korean server. But prod-tool gave an error and 'Valorant PreGame & Loading' page didn't work

ok i will have a look at that

thank you i look forward to your reply

Can you please provide me with a screenshot of the module page in the browser, so I can see with modules you have installed?

I am closing this issue and tracking it in the new one. Since this problem has nothing to do with the original problem and also is not related to the observer tool.


Child width and height

It doesn't manage the spacing properly if the size of childs varies(eg: width for horizontal).

Hi @Ad1Ken, sorry for the late response. This project is simply a demo for how you might implement this in your own project.  I wrote this while I was in university and it was part of a larger project as a whole. I never intended this to be a plug and play solution, just as an example of how you could do it yourself, so there are many things that weren't included and could be improved.
I will also comment this here for anyone else stumbling across this project, but I will not be maintaining this project for the foreseeable future. I might come back and refactor and fix any of the other open issues if I come back to game development, but that's not where my priorities lie right now. Feel free to fork this project and use it as a base for your own implementation, but I won't be adding/fixing things anytime soon.


Ensure ssh key file holds correct permissions and can be parsed

fixes #567
SSH key is able to hold 0400 or 0600 permissions. If it doesn't match tarmak will attempt to set to 0600.
SSH key file will be tested if it can be correctly parsed.
NONE

/assign @simonswine

/unassign
/assign @simonswine

/approve
/lgtm


Helm chart update for 0.1.2 app version

Hi, latest Helm chart (0.1.4) support v0.1.1 app version at https://artifacthub.io/packages/helm/kronic/kronic address. Will you update it for 0.1.2 app version?

I'll make a round of updates! Didn't realize anyone was actually using this yet :)

We are using it with lovely :) Thanks again for your effort and contributes <3

@ibalat I've released app version 0.1.3 and chart version 0.1.6! If you are still on v0.1.1, note that v0.1.2 introduced basic auth on the backend, enabled by default. If you are handling auth your own way, you can set that to disabled. Otherwise, I'd recommend creating a secret with the admin password and setting the helm value auth.existingSecretName to the name of that secret. Instructions are in the READMEs :)
Let me know of any issues or feature requests you have. I have limited time these days, but I'm happy to see this is useful for someone.

thank you friend, I will check it all of them and update it 🎉


Separate work_generate from var node. work_generate now uses node specified in var nodeWork.

Separate work_generate from var node. work_generate now uses node specified in var nodeWork.
This allows you to specify a different node that has work_generate ability.
This is useful if you have a faster RPC node that is more powerful, but lacks the ability to do work_generate.
Optionally you can just use the same node URL on both vars if you prefer using the same node.

This is useful if you have a faster RPC node that is more powerful, but lacks the ability to do work_generate.

Could you explain this a little more? I do not understand yet. In which scenario is a node slow when using "simple"/performant RPCs like pending or block_info?

This is useful if you have a faster RPC node that is more powerful, but lacks the ability to do work_generate.

Could you explain this a little more? I do not understand yet. In which scenario is a node slow when using "simple"/performant RPCs like pending or block_info?

An example would be a RPC node that has powerful CPU, RAM, SSDs. All the power to keep the ledger up to date.
Although it lacks the GPU to do very fast ~1 second work_generate performance.
I see no reason to limit atto to 3+ second speeds, just because the node they want to use only has a CPU.
Example scenarios:

Your node can be hosted in the cloud. Your work_generate located on a cheap at-home PC with limited data bandwidth and disk storage. Saves you the cost of renting GPU from the cloud.
External node which supports RPC commands EXCEPT work_generate. Specify a second node that allows for work_generate.
A node is hosted on a raspberry pi. Specify another node to do work_generate.

This pull request could potentially be improved upon, eg (maybe something similar to?):
if(nodeWork == "") {
    nodeWork = node;
}

But if you have a node which does work_generate why not use it for all RPCs?
I feel like you are describing a rather obscure and uncommon setup and I am not inclined to complicate atto for that, right now.

But if you have a node which does work_generate why not use it for all RPCs?
I feel like you are describing a rather obscure and uncommon setup and I am not inclined to complicate atto for that, right now.

This isn't uncommon.
Nano's white paper specifically mentions this as best practice:
https://docs.nano.org/integration-guides/work-generation/#choosing-a-machine

Using a separate machine to manage work generation is recommended where possible.

This is to prevent you work generation from overloading your node, causing it to fall behind from other nodes.

Sorry for the late responses. I'm still thinking about this, because I still am not quite comfortable with introducing this.
I still don't understand why you don't use the node which does work_generate for all RPCs.

Using a separate machine to manage work generation is recommended [...]

This does not necessarily mean that the wallet should talk with different hosts. It could also mean, that the node should outsource work_generate calls. This way the users of the node would not have to think about it themselves.
I'll keep thinking about it and maybe ask the Nano developers about it, but I can't guarantee, that I'll come to a conclusion soon.

Sorry for the late responses. I'm still thinking about this, because I still am not quite comfortable with introducing this.
I still don't understand why you don't use the node which does work_generate for all RPCs.

Using a separate machine to manage work generation is recommended [...]

This does not necessarily mean that the wallet should talk with different hosts. It could also mean, that the node should outsource work_generate calls. This way the users of the node would not have to think about it themselves.
I'll keep thinking about it and maybe ask the Nano developers about it, but I can't guarantee, that I'll come to a conclusion soon.

I guess my view is opening up atto for options of supporting more nodes that don't necessarily have the work_generate ability.
Public nodes also have a work_generate limit, which requires payment after a certain amount of usage.
An example would be to visit this page (it will list nodes without work_generate, including their associated token limit):
https://publicnodes.somenano.com/
Understandably you are trying to keep atto simple and uncomplicated, so this is more of a debate on ideology.
I will close this pull request, as I can optionally maintain a fork of customized features tailored to my use-case.


Tweaking the Demon Dream Essence recipe for better QoL

Is your feature request related to a problem? Please describe.
Fuse both fruit and seed recipes for the dream essence

Describe the solution you'd like
This is the code for the new QoL recipe, you can make a list instead of two different recipes now in code.
{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "pattern": [
    "ppp",
    "ppp",
    "ppp"
  ],
  "key": {
    "p": [
      {
        "tag": "c:crops/datura"
      },
      {
        "tag": "c:seeds/datura"
      }
    ]
  },
  "result": {
    "id": "occultism:demons_dream_essence",
    "count": 1
  }
}

Additional context
This way you do not need to wait to grow more fruit if you are just one or two items shy from crafting. You can now use your surplus interchangeably.
So is either this or a fruit-to-seed recipe to convert your fruit surplus into seeds.

Oh that is a beautiful solution, thank you! Will add that ASAP


sourseView and sourceRect for Popover?

In iPad, an action sheet of UIAlertController requires sourceView and sourceRect like this:
SwipeAction(style: .default, title: "My Action") { (action, indexPath) in
    let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
    alertController.popoverPresentationController?.sourceView = ...
    alertController.popoverPresentationController?.sourceRect = ...
    ...
    self?.present(alertController, animated: true)
}

I'd like to set them for the action's view, but couldn't find a elegant way. What's the best way for that?

In UITableView and UICollectionView, you can fetch the cell by indexPath, which is the view. Is that sufficient?


Fixed policy version's Document type for AWS managed policies

My previous fix (#2231) accidentally returned policy version's Document for AWS managed policies as Python dicts which did not get converted successfully. This is fixed now by returning them as properly converted strings.

Coverage decreased (-0.07%) to 92.949% when pulling e3140e43775defab1761bbcd52c81c552dfdf90d on acsbendi:get-policy-version-fix into 3833449b361b232b20ad505867e572abc5f14cdb on spulec:master.


changes according to tutorial

branch 0.8

Please add the images to this folder: https://github.com/openshift/pipelines-docs/tree/master/modules/ROOT/assets/images
@joaedwar please cofirm

/cherrypick op-0.8-master


Feedback for Service Bus Preview README and samples

I went through all the code samples in the readme and the samples folder. What I found:

pip install azure-servicebus --pre installs version 0.50.2 instead of 7.0.0b1
send message in readme missing small things:

from azure.servicebus import ServiceBusClient //missing Message
import os
connstr = os.environ['SERVICE_BUS_CONN_STR']

with ServiceBusClient.from_connection_string(connstr) as client:
    with client.get_queue_sender(queue_name): //also need “as queue_sender”
        message = Message("Single message")
        queue_sender.send(message)

There's no doc on how to create a queue (how to enable sessions and other features)
client_identity_authentication.py intends to illustrate how EnvironmentCredential(), DefaultAzureCredential()  can be used to easily authenticate. It might be easier to the user to have this link in the sample so they don't have to look to find doc on the identity library, especially for those who aren't familiar with the repo structure.

Hi @lilyjma , what's your python version, OS platform?
When we're running pip install azure-servicebus --pre locally, it installed the 7.0.0b1 for me

It was probably because I tried installing the package before it was officially published, so I had to specify 7.0.0b1 to get that version instead of just using --pre. Now --pre is fine.


Parity: Port, PortMessage and SocketPort

⚠ Needs tests.

Implement Port as a top-level abstract class, like Darwin’s.
Implement PortMessage.
Implement SocketPort, our only cross-platform port. Note that Distributed Objects is not available in s-c-f, and thus NSConnection-related functionality is not available nor implemented.

A few differences with Darwin:

PortCoder is not available. Classes that ‘support coding only through a NSPortCoder’ do not conform to NSCoding in swift-corelibs-foundation.

MessagePort is not available in s-c-f. It is noted as a to-avoid API in the documentation and relies on Mach ports, which are not available everywhere. The default implementation of Port’s initializer would return a MessagePort as a factory initializer on Darwin if invoked directly; this is not the case here, and we diagnose that use.

Similarly, NSMachPort is also unavailable.

SocketPort uses a factory initializer on Darwin to return the same instance for the same remote port signature (uniquing). This is not the case in Swift. The return value of == and .isEqual(_:) will match Darwin’s behavior and return true for uniqued SocketPorts, but certain swift-corelibs-foundation uniqued SocketPorts will be different instances as reported by the === and !== operators.

cc @phausler

Fixes https://bugs.swift.org/browse/SR-10368

@swift-ci please test

Overall this looks pretty good,  there are a few minor tweaks for performance that can probably be done in the handling of Data but everything here looks salient.
The one consideration that might be worthwhile to look into is the serialization of in6_addr on different platforms since that structure has different members and layouts on different OSes.

@swift-ci please test

I will have a separate patch with more tests.

@swift-ci please test


feat: Add Other Files for iOS

Fixes #1199
Test Plan

How do we know the code works?

Other files could be sent using --other-files CLI or other-files YAML config for iOS
Checklist

[x] Documented
[x] Unit tested

Codecov Report

Merging #1267 into master will decrease coverage by 0.07%.
The diff coverage is 61.90%.

@@             Coverage Diff              @@
##             master    #1267      +/-   ##
============================================
- Coverage     79.66%   79.58%   -0.08%
- Complexity      715      716       +1
============================================
  Files           233      233
  Lines          4401     4414      +13
  Branches        757      758       +1
============================================
+ Hits           3506     3513       +7
- Misses          496      502       +6
  Partials        399      399

It would be nice to have the possibility of testing it on the actual app. If it's doable, please update the test plan

@Mergifyio rebase

It would be nice to have the possibility of testing it on the actual app. If it's doable, please update the test plan

integration tests? :)

It would be nice to have the possibility of testing it on the actual app. If it's doable, please update the test plan

integration tests? :)

I'll try to cover it within https://github.com/Flank/flank/issues/1212

@Mergifyio refresh


Add support for review requests in pull-request command

Fixes https://github.com/github/hub/issues/1358
I took the code from https://github.com/github/hub/pull/1422 and attempted to complete it. I hope @ConradIrwin does not mind. 👼
I'm not sure what the cleanest way of overriding Accept for one request would be. Most options involve adding the apiPayloadVersion argument to a lot of function signatures and passing it through. Can this be improved?

Thanks @tomasv !

Thanks for this! However, the title is a bit misleading as this adds support for only adding reviewers, not submitting reviews. I think it should be renamed similar to the issue it closes.

I've pushed some cleanups to this. Instead of setting a changed Accept header per single request, I've simply added the Accept: application/vnd.github.black-cat-preview+json value to all requests. This should have no adverse effect to the rest of the API functionality, and is only recognized by API endpoints that deal with reviewer functionality. Let me know what you think!

Hmm, I've just tested sending the 2 header values to GitHub API, but it doesn't recognize it:
> POST https://api.github.com/repos/mislav/playground/pulls/30/requested_reviewers
> Authorization: token [REDACTED]
> Accept: application/vnd.github.v3+json;charset=utf-8
> Accept: application/vnd.github.black-cat-preview+json
{"reviewers":["mislav"]}

< HTTP 415
{"message":"If you would like to help us test the Pull Request Reviews API during its preview period, you must specify a custom media type in the 'Accept' header. Please see the docs for full details.","documentation_url":"https://developer.github.com/v3"}

It's possible that GitHub API doesn't deal well with multiple values of Accept header, even though it should in theory. I will follow up to see whether this is a bug in our API.

@mislav is that an accurate representation of header values?
The final raw request header as I understand should look like this: Accept: application/vnd.github.v3+json;charset=utf-8, application/vnd.github.black-cat-preview+json. Relevant RFC: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

@tomasv Specifying a header twice or specifying it once with two values separated by a comma should be equivalent. But, I'm just checking the implementation of this in the GitHub API, and it looks like we only take the 1st value of Accept and discard the rest. I'll check with the API team to see whether this was desired behavior or an oversight.
In the meantime, I'll try switching back to a custom Accept header just for this request.

Thank you for adding this! Will it be included in 2.3.0?

Yes, and I'll try to make a prerelease soon including this.

hey, Is it currently working?

@AlexVKO You can try this functionality out if you build hub from the master branch. It's not yet released.


Races don't have their modifiers pre-filled

It would be nice to pre-fill the modifiers, where possible, for alien races.

This looks to be done in the current development branch.


add more shapes

discoid and related shapes:
http://purl.obolibrary.org/obo/PATO_0001874

discoid is in GallOnt


Potential security vulnerability

Few serious security vulnerability has been disclosed to huntr for this repo.
Fix those bug ASAP
report link -->
https://huntr.com/bounties/ccc291db-ae9c-403c-b6b5-6fe3f4800933/
https://huntr.com/bounties/ce2563a2-3d81-4e2e-954e-abecb9332416/
https://huntr.com/bounties/cf6dd625-e6c9-44df-a072-13686816de21/
report are currently private and only repo maintainer can see the report details.
If you are repo maintainer then there is 2 way to view the report details

by signup
by secret magick link that has been sent to your mail .

Hi, we've solved two of those and we will do the third one soon. Don't hesitate to add more reports, we'll fix them asap


CDAP-16758 fix schema related unit tests

use correct schema name to fix unit tests

cherry-pick of #408


Passing a command to start in wetty

I was actually looking for a decent web terminal in telnet, but couldn't find one. I found wetty, and I think it's pretty good, so have been using it. The thing is, I still needed telnet. So my work around was to ssh into a host that telnets out to some other host.
I put the entire wetty in an iframe. Now, when users click on different links, I would like different wetty terminal to open with telnet session to respective host.
Is there a way to do this? I figured something like http://server/wetty/ssh/user is able to allow wetty to login as different user, but can i some how pass in a dynamically generated command so it will launch the command after logging in?

No need for that.. just check app.js
Comment out these lines:
//        term = pty.spawn('ssh', [sshuser + sshhost, '-p', sshport, '-o', 'PreferredAuthentications=' + sshauth], {
//            name: 'xterm-256color',
//            cols: 80,
//            rows: 30
//        });

you can enter eny command.. like:
(for a local shell)
        term = pty.spawn('sh', ['-i'], {
            name: 'xterm-256color',
            cols: 80,
            rows: 30
        });


Dev/chrisnielsen debug drop

Join-Path does not support multiple inputs, needs to be chained to work properly here

FYI - I updated your target branch to release/vNext


Keybinds: Inconsistent Direction Parameters for new_split and goto_split

Description
When configuring keybinds, the direction parameters for new_split and goto_split are inconsistent:

new_split uses: up | down | left | right
goto_split uses: previous | next | top | left | bottom | right

The goto_split direction parameters include top and bottom, which can be misleading as they might imply focusing on the topmost or bottommost split in the layout, rather than simply moving to an adjacent split. This inconsistency with new_split (up and down) may confuse users and create ambiguity in the configuration.
Steps to Reproduce

Configure new_split keybinds:keybind = ctrl+s>h=new_split:left
keybind = ctrl+s>j=new_split:down
keybind = ctrl+s>k=new_split:up
keybind = ctrl+s>l=new_split:right

Configure goto_split keybinds:keybind = ctrl+h=goto_split:left
keybind = ctrl+j=goto_split:bottom
keybind = ctrl+k=goto_split:top
keybind = ctrl+l=goto_split:right

Expected Behavior
The direction parameters should be consistent across both actions.
Actual Behavior
new_split and goto_split use different sets of direction parameters.
Suggested Change
Standardize the direction parameters to a single set, such as previous | next | up | left | down | right.
This would improve clarity and ease of configuration.

Approved as suggested.

Totally agree!


[python] fixed result shape in case of predict_proba with raw_score arg

Fixed #1859.
I'm just a little bit confused about the inconsistency in case of one-class classification.
predict_proba() returns
array([[nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
           ...
       [nan, nan]])

but in predict() np.argmax() transforms this into
array([0, 0, 0, ..., 0])

@StrikerRUS
what is one-class classification? binary classification?
why the probs are all nans ?

@guolinke
import numpy as np
import pandas as pd
import lightgbm as lgb

full_data = pd.DataFrame({'x1': np.random.rand(100),
                          'x2': 5 + np.random.rand(100),
                          'target': np.random.randint(0, 1, 100)})
print(full_data['target'].values)
data_train = lgb.Dataset(full_data.drop(['target'], axis=1), full_data.target)

bst = lgb.train({'objective': 'binary'}, data_train)
res = bst.predict(full_data.drop(['target'], axis=1))
print(res)

@StrikerRUS there is a bug for one-class binary classification. fixed in #1877

After applying #1877 fix predict_proba() returns
array([[1.e+00, 1.e-15],
       [1.e+00, 1.e-15],
       [1.e+00, 1.e-15],
            ...
       [1.e+00, 1.e-15]])

for one-class data, and predict() transforms this into

Out[4]:
array([0, 0, 0, ..., 0])


python3Packages.pyupgrade: 2.24.0 -> 2.25.0

Motivation for this change
Update to latest upstream release 2.25.0
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 136169 run on x86_64-linux 1

2 packages built:

python38Packages.pyupgrade
pyupgrade (python39Packages.pyupgrade)

Result of nixpkgs-review pr 136169 at 12d7e03f run on aarch64-linux 1

2 packages built successfully:

python38Packages.pyupgrade
pyupgrade (python39Packages.pyupgrade)


Set the User.current_user in Automation Engine

Set the User.current_user in the Automation Engine so that the objects can be created for the correct user.

https://bugzilla.redhat.com/show_bug.cgi?id=1322983

Testing steps are mentioned in the bugzilla

@kbrock
Please review

I'm assuming that all drb calls that come in will use the front/workspace to determine the current user an then call execute()?
Is this code complete, or is this a stepping stone? (I wish I knew automate a little better)
If this is not complete, ad a little more meat to the Pr.
otherwise LGTM :+1:

@kbrock
This PR is complete, it has been taken out of the RBAC PR #https://github.com/ManageIQ/manageiq/pull/6395.
We usually don't allow users to do any creates from Automate, the request is one exception which gets created when the automate method calls create_provision_request.

/cc @gmcculloug this was a no brainer

👍  Thanks for the review @kbrock

Euwe Backport details:
$ git log
commit 61163fdbaf48ed9aa984d2734cc3739321f0a23c
Author: Keenan Brock<EMAIL_ADDRESS>Date:   Tue Sep 27 12:34:24 2016 -0400

    Merge pull request #11435 from mkanoor/bugzilla_1322983

    Set the User.current_user in Automation Engine
    (cherry picked from commit 8b057a2484d99e50e32999581204074883fdb823)

Darga BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1346969

Darga Backport details:
$ git log
commit c2f6476714f738d6dd6019970fbba9e57790a502
Author: Keenan Brock<EMAIL_ADDRESS>Date:   Tue Sep 27 12:34:24 2016 -0400

    Merge pull request #11435 from mkanoor/bugzilla_1322983

    Set the User.current_user in Automation Engine
    (cherry picked from commit 8b057a2484d99e50e32999581204074883fdb823)

    https://bugzilla.redhat.com/show_bug.cgi?id=1346969


[Azure.Monitor.Query] Add sovereign support to MetricsClient

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

Fixes: #42526
docs to be added later today

API change check
API changes are not detected in this pull request.

Fixes: #42526 docs to be added later today

Please be sure to update this section of the README: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.Query/README.md#configure-client-for-azure-sovereign-cloud

/azp run net - Azure.Monitor.Query - tests-weekly

/azp run net - Azure.Monitor.Query - tests-weekly

/azp run net - Azure.Monitor.Query - tests-weekly

/azp run net - Azure.Monitor.Query - tests-weekly

/azp run net - Azure.Monitor.Query - tests-weekly


Threat Model-Access Level Controls Defined on the model file -Github

It seems there is no ACL on the threat model file created in GitHub
Steps:

Login as User A using your GitHub account
Create a model
Share the link with User B
User B logins in to GitHub and opens model file from User A GitHub repo hyperlink

Result:
User B can change file from User A (no Read/Edit/Modify ACL)

Hello @johocurtest - agreed that anyone who has read access to the github repo can see the threat model, and indeed if they have write access then they can modify it, which is a consequence of the permissions on the github repo that is being used.
There are two use cases that I see for TD:

web app access to a shared github repo, with access control determined by the repo
desktop app used to create / read / update the json file in a source tree stored in a repo

The company I work for uses TD desktop and an Atlassian repo, which seems to work well. If you want to use the web app then access control is needed on the github repo.
There is a gitlab integration for TD on a fork that may be of interest:
https://github.com/mike-goodwin/owasp-threat-dragon/issues/68#issuecomment-590002400

Migrated to new issue in the OWASP area repo : https://github.com/OWASP/threat-dragon/issues/10


Safari Bug: MPA demo page does not render the page contents

Fixed in 9fea230d515962cebad027b9acec5dcf1ebde179.
I believe Safari has a bug where a render blocking module never unblocks rendering when said module does an import. I have worked around this by triggering a forced re-render.


added 'es6' as a valid option for the --module compiler option

I was reviewing the valid options and noticed that 'es6' wasn't listed. Passing an invalid module format to the compiler generates an error that lists the valid formats which include 'es6'.

Thanks!


failed to create containerd container: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount956276389: no users found

Describe the bug
I've set up a RunnerDeployment using a custom image. When I deploy this, it seems to work at first. But as soon as a second runner is created, it fails with an error:
failed to create containerd container: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount956276389: no users found

My configuration is as follows:
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  name: runner
spec:
  template:
    spec:
      repository: my-repo
      dockerEnabled: false
      image: my-custom-image:0.0.1
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
  name: runner-autoscaler
spec:
  scaleTargetRef:
    name: runner
  minReplicas: 2
  maxReplicas: 10
  metrics:
    - type: PercentageRunnersBusy
      scaleUpThreshold: '0.75'    # The percentage of busy runners at which the number of desired runners are re-evaluated to scale up
      scaleDownThreshold: '0.3'   # The percentage of busy runners at which the number of desired runners are re-evaluated to scale down
      scaleUpFactor: '1.4'        # The scale up multiplier factor applied to desired count
      scaleDownFactor: '0.7'      # The scale down multiplier factor applied to desired count

The custom image is based on ubuntu:focal and installs a few commonly used libraries. The last few lines are as follows:
USER runner:runner

ENTRYPOINT ["dumb-init"]

CMD ["sh", "/usr/local/bin/start.sh"]  # Start GitHub Runner

Checks

[x] My actions-runner-controller version (v0.x.y) does support the feature -> yes
[x] I'm using an unreleased version of the controller I built from HEAD of the default branch -> no

I've deployed Helm chart version 0.15.0 to the cluster.
To Reproduce
Steps to reproduce the behavior:

Deploy the configuration above.
Make sure a second runner is set up.
See that only the first runner is successfully created.

Expected behavior
The second runner should be up and running and not show CreateContainerError.
Screenshots

Environment (please complete the following information):

Controller Version 0.20.3
Deployment Method: Helm
Helm Chart Version: 0.15.0

@bartcode Hey! Sorry but I'm not sure how we can help here. I have no idea how a custom docker image can break things like that.
Did you confirm that actions-runner-controller and self-hosted runners to work when you used our official runner image?

@mumoshu  , I can confirm the official runner image works fine. I can have multiple of them running. The custom Docker image is based on ubuntu:focal and only runs a few apt install commands. The final part of the Dockerfile is as stated above:
ADD start.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/start.sh

USER runner:runner

ENTRYPOINT ["dumb-init"]

CMD ["sh", "/usr/local/bin/start.sh"]

I could post the start.sh. This essentially just switches to a path where I've put the files to register the runner and then runs the config.sh and run.sh. Since it doesn't reach that point, I don't think it matters, though.

Any reason you aren't building off the actions-runner-controller image? https://github.com/actions-runner-controller/actions-runner-controller#software-installed-in-the-runner-image

@bartcode Have you ever added the user/group runner:runner when building your container image? Like https://github.com/actions-runner-controller/actions-runner-controller/blob/961f01baed827d1ff320ef23bee2a5f3bd69b050/runner/Dockerfile#L63-L67

@mumoshu , don't ask how, but I basically restarted writing the Docker image and left everything out I wasn't 100% I was going to use and now it works. 😅


Table cells as their own editor

Tables are hard to get right. Each cell can potentially have as much complex text as the editor itself and we have to handle every edge independently. For example, you can add a header in a cell and some text below.
Adding an H2 is currently broken, it breaks the whole cell. This is mostly because we considered headings to be top-level nodes and this no longer is true when they're inside a cell.
Arguably there's two ways of fixing this problem:

Headers to gracefully support living inside table cells
Table cells being their own editor

The reason why I'm inclined towards 2 is because there will always be infinite cases that we will handle to handle and each developer will have to handle with their own nodes, whereas an editor would automatically adhere to these rules without extra code.
What is more
Customization
A cell editor gives you flexibility to customize the editor in a very natural way. We already defined a set of plugins that can be plugged in easily in an editor, we can reuse the same mechanism for cells.
A feature request that seems pretty decent is to have plain text inside a cell instead of rich text. Currently that requires intercepting rich text, including paste converters, so the level of effort is hard compared to trivial with its own editor.
As bug free as an editor itself
No more edge cases. Just another editor.
Trade-offs
We lose control of the content in the cell, or at least, it's harder to control. Besides that, probably efficiency. But practically speaking you can't do more than you can't do now. For example, it's impossible do RangeSelection between text living in two different cells.
Approach
A DecoratorNode or new editor instances attached to nodes.
The first is more natural and would work out of the box with our currently infra. The only downside is that it would only work for React. However, that may be a reasonable trade-off.

The first is more natural and would work out of the box with our currently infra. The only downside is that it would only work for React. However, that may be a reasonable trade-off.

Curious why it would be limited to react?

Table cells being their own editor

That would be my first preference, without thinking too much. It sounds super cool to be able to have like Excel/Google Sheets the ability to format the table content.

Besides that, probably efficiency

That was my second tough. I have just tried now to display many plain and rich editor on on page with

Lexical Many Editors

      {
        [...Array(1000).keys()].map(i => {
          return <Editor />
        })
      }

With many plains, I can reasonability go to 1000 editors and it remains fast (a few seconds to display, scrolling is OK).
With many rich editor, 100 is OK, but 1000 begins to be slow to display (15 seconds) and then the display just disappears.

I propose a different architecture optimized for tables. As you can see, the model I describe below deviates a bit from the 1 LexicalNode = 1 DOM node principle, and therefore Lexical's native rendering would not work. The solution would be for Table to be a DecoratorNode whose content is made up of Lexical Headless Editor, with new and different rendering logic.
The classes that make up a table and its basic properties would be as follows:
class Table {
	rows: Map<rowKey, Row>;
	columns: Map<columnKey, Column>;
}

class Row {
	key: rowKey;
	prev: rowKey;
	next: rowKey;
	cells: Map<columnKey, Cell>;
}

class Column {
	key: columnKey;
	prev: columnKey;
	next: columnKey;
        pos: number; // this is to skip empty cells when rendering.
	width: number;
}

class Cell {
        column: columnKey:
	content: LexicalEditor;
}

Note: although the properties rows, columns and cells I defined there as "maps", they should be a Lexical editor. Remember that I am proposing headless editors so rendering would not be a problem. The reason for using a Lexical editor would be to benefit from double buffering, transformations, listeners, and RTC.
Advantages
Some advantages of the new model over the current one, along with the implementation of a new rendering logic:

Only non-empty cells are stored in memory.
If C is the number of columns and R*C is the number of cells, Lexical's current model requires O(R*C) to insert, delete, or sort columns; while the model I propose requires only O(C). Note that if we remove the pos column property, it could be O(1), but thanks to that property we achieve the following...:
We can render each row by iterating only over its cells (non-empty cells) and without using the map's hash function (since iteration order doesn't matter).
getCordsFromCellNode will be automatic instead of O(R*C), and accessing the four adjacent cells will be O(1).
It would allow ordering the rows by columns.
It would allow filtering rows with different criteria.
It allows each cell to be a different editor but at the same time gives more control over when the cells will be content-editable. For accessibility reasons, the content-editable could be changed only on the focused cell, or even on an overlay div.

Future

In the classes I have limited the properties to those related to document tables, and that do not apply to more specific cases or spreadsheets, such as formula, hide, or wrap.
Considering that (a) many spreadsheets like Gsheets allow adding thousands of new rows at once, (b) Excel shows unlimited empty rows on demand when scrolling, and (c) some spreadsheets like Gnumeric group adjacent cells with the same content in the model; then It has occurred to me to add the skip property to the rows, which indicates the number of empty rows that proceed to the current one. However, I don't think it would add a significant gain to the complexity it would add.
It remains to decide how the cell grouping could be modeled.
Consider properties that can be set for an entire column or row, as well as for specific cells (for example, background-color). In that case, that property could be added to the 3 classes (column, row, and cell) and timestamp together with the property, giving priority to the last to be set.

Review of Main Spreadsheets
Undoubtedly the most popular open source spreadsheets are a family of programs derived from StarOffice. Some of these programs are already discontinued. The most used today is LibreOffice.

Source: Wikipedia.
The best explanation I've found of this spreadsheet architecture is this OpenOffice wiki entry.
In short, they use a fixed array for the columns, and a dynamic array for the rows, whose space has been expanding over time. LibreOffice since version 7.4 uses an array of 16,384 spaces for the columns and a maximum of 1,048,576 for the rows, thus matching Microsoft Excel.
Cells are arranged within columns (I'm quite surprised they don't reside in rows), and only non-empty cells are stored in memory.
There are other open-source spreadsheets that are not derived from StarOffice. This Wikipedia table compares the limit of rows and columns that they allow.
I haven't spent as much time understanding the architecture of some like Calligra or Gnumeric; but seeing that the limit of rows and columns are powers of 2, I suppose that they are also built on arrays of rows and columns.
According to the table, the only ones that don't seem to impose a limit are Pyspread, and Resolver One (the latter's creators have actually abandoned that project and started a new spreadsheet called Dirigible-Spreadsheet).
From what I've seen and understood of these two programs, I THINK they don't define any class or object for rows or columns as such. They only have "cells", which consist of a dictionary with two keys: row and column.
Finally, I haven't found much information about the two most used closed source programs, Excel and GSheets. Although in the GSheets API it says that the cells "don't have a unique ID value. Instead, row and column coordinates identify the cells." This makes me think that they don't group cells within rows (as I propose) or within columns (as LibreOffice does).
Relevant Reading
https://en.wikipedia.org/wiki/List_of_spreadsheet_software
https://en.wikipedia.org/wiki/Comparison_of_spreadsheet_software
https://en.wikipedia.org/wiki/Spreadsheet)(https://en.wikipedia.org/wiki/Spreadsheet
https://medium.com/google-cloud/system-designing-google-sheet-bdf12321b99c
https://wiki.openoffice.org/wiki/Calc/Implementation/Data_Model_for_sheet_and_cell
https://wiki.openoffice.org/wiki/Sc
https://niocs.github.io/LOBook/calcarch/overview.html
https://niocs.github.io/LOBook/misc/16kcols.html
https://docs.libreoffice.org/sc/html/annotated.html
https://stackoverflow.com/questions/2025316/why-do-most-spreadsheets-contain-a-hard-coded-limit-on-the-number-of-rows-and-co
https://stackoverflow.com/questions/238328/database-best-way-to-model-a-spreadsheet

A couple of clarifying questions here:
You're proposing that each cell is a headless editor, right? What's the benefit of making them headless? I'm not following why you'd need to change the rendering logic or how you'd change it to accommodate the proposed design.

Oh yeah, I was wrong on that part. Cell should be a normal lexical editor. What requires a different architecture and thus different rendering logic would be the rows and columns within the table.
I have clarified those parts in the previous message.


Add a window resize handler to reset image

This takes care of resizing the window and rotating a mobile device. It
does reset the zoom as well, but in order to fix that, the zoom needs
to be fixed.
I found an issue with zoom, for which I will open a separate issue.

OK, I've added some more things. I've optimized the landscape view on small screens. Before doing that, I went ahead and flattened out the CSS, as nested styles are bad most of the time. They are less performant and make overriding a nightmare, among other things. I added a breakpoint for heights as well as widths to have it adapt to all kinds of screen sizes nicely. Then I made the controls hide by default on small screens.
That last thing is the only one I'm a bit concerned with. In order to toggle the controls when the image is tapped, I had to put the handler on the Image component, but the class name had to be toggled on the main lightbox. To do this, I simply went up the DOM tree and set the class, as I don't know if it is possible to access the parent component from the Image. There might be a better way to do this, but I don't know what it is.

Before doing that, I went ahead and flattened out the CSS, as nested styles are bad most of the time.

Ok, it seems right.

There might be a better way to do this, but I don't know what it is.

Right now, I think only in 2 other ways:

Make a function in the Container component, that with a ref to the lightbox-backdrop div, it toggle its class (I always prefer change a state or a props, but in this case, we can't because the Image component will render again with its default state). So then, we give that function to the Image as a prop.
Get that div with a vanilla javascript. There can only be one Container component active in the document, so the first occurrence is the one that you are looking for. Its easier but a little ugly.

What do you think?

I've moved classNames into src/utils.
Another way to do this probably will be to go ahead and put the tap handler into Container, even though that will create a bit of code duplication. One of the issues with the current solution is that it doesn't fire when the zoom/rotate/download controls are hidden. I don't like the fragile interdependence that is caused between the two components, so in this case a bit of code duplication would be the lesser of two evils. Of course, the two components are kind of interdependent, but that stems from the choice to make them into two components over making one huge monolithic component. Either way, avoiding fragility is probably the better choice here, now that I had a night to think about it.

Never mind that, I see your point. Changing the state on the container causes the Image to re-render, which in turn throws an error during unmounting as well. Hmm. The reason is because zoom and pan are not stored in state, if I understand correctly.

One way to make this easier is to move all the state and handlers to the container. This would make it huge, but that is solvable by composing the component out of several objects, with each taking care of a certain set of handlers or whatnot. The Container and Image components are very interdependent, and perhaps to simplify things, it might be better to move most of the behavior to the container and make the Image component more of a "dumb" component. This seems to be more in line with the way the React docs recommend to do things. For now, I'll just use method 1 you outlined. Before, I was using something akin to method 2.

OK, I added a function on Container and passed it as a prop to Image to take care of toggling controls.

I noticed an issue with tap detection and fixed it. This required using a different way to detect whether the mouse/finder is pressed for panning, and preserving the startPoints when the mouse/finger is released. No big deal, but more reliable tap detection now. Also, I made the download link stay white on hover like the rest of the controls.

It looks good!, thanks. Could you add a test to the tap detection too? It would be great. But it is ok now, and we can leave it to other PR.

Hmm, how to write a test for something (Image) that relies on a timeout and sets the class of its containing component (Container)...
I would imagine 3 tests to throw at it:

Long touch/click: Simulate touchStart; after more than 200ms, simulate touchEnd; expect the class hide-controls to not have been toggled on the Container.
Swipe: Simulate touchStart with one set of coordinates; immediately simulate touchEnd with different coordinates; after more than 200ms, expect the class hide-controls to not have been toggled on the Container.
Tap: Simulate touchStart with one set of coordinates; immediately simulate touchEnd with same coordinates; after more than 200ms, expect the class hide-controls to have been toggled on the Container.

How to actually write that into imageSpec.js, I don't know. Is it possible to put timeouts into tests?

It's possible with jasmine, but I can do it later.


Control sockets do not connect anymore (after updating OpenSSH)

After updating OpenSSH, control sockets do not connect anymore:
Control socket connect(/Users/wolfgang/sockets/2024_01_05_151948-c5fbd266): Connection refused

It worked well previously.
Current version:
# ssh -V
OpenSSH_9.6p1, OpenSSL 3.2.0 23 Nov 2023

# openssl version
OpenSSL 1.1.1t  7 Feb 2023

Installed with homebrew on a current Mac.
Login:
ssh -MNf -o ControlPersist=$(SSH_ACCESS_SECONDS) -S $(SSH_MASTER_SOCKET) host

Access examples:
scp -o ControlPath=$(SSH_MASTER_SOCKET) -p file host:/targetdir/targetfilename
ssh -S $(SSH_MASTER_SOCKET) host "cmd1; cmd2"

OpenSSH is a different project. Their bug tracking system is at https://bugzilla.mindrot.org/

OpenSSH is a different project. Their bug tracking system is at https://bugzilla.mindrot.org/

Thanks.
Follow up is here: https://bugzilla.mindrot.org/show_bug.cgi?id=3649


feat(import): export rule exceptions for mock files

:tada: This PR is included in version 2.5.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Handle autoindent when repositioning the cursors

Here's a fix for issue #188.

One typo, otherwise this is great, thanks!

No problem. I'm not sure if the "Removed a line" logic also needs updating - I guess it can be left alone for now.


Open source community

Hi, I'm one of the maintainer of https://github.com/callemall/material-ui,
I believe that we have the same goal: to provide the best possible
material design implementation using React.

Hi!
You are right, we have the same goal. This started as an attempt to implement a set of not just components but additional tooling for React. Also, we were trying to make a proof of concept of a package of components distributed to be used with CSS modules and webpack. Although we are building both project with the purpose of creating the best possible MDC, I think it's quite difficult to integrate them since the internals should change quite a bit to support inline styling and CSS modules.
Please, don't get me wrong! I love material ui and I think it's an awesome project. I would be great if we can find a way to join forces sharing common stuff between both libs. The thing is we don't like inline styling proposal and after a while of development we found ourselves with an almost-finished but very complete set of components.
Best! 😊

Hi,
"Different goal it doesn't mean the same approach". IMHO I love the approach using Babel and CSSModules ;)
best

Nothing wrong with more options. And it's always good to have different implementations.

@ahskaus That's right ... in my last 5 years I've dedicated part of my life to the OpenSource. It's so gratefull when you create something that developers respect it and use it (more important). For example when I created  https://github.com/soyjavi/quojs the community asked me... why? why if exists jQuery or Zepto?. I only could answer: "it's a different approach". Nowadays this library is used in companies like Electronic Arts.
best,
javi

I agree, I don't think that having multiples implementation of the material spec with react is necessary a bad thing. I wanted to understand what we could improve in material-ui.
Now, I feel like it's the inline style approach we, at some point, decided to use that's making people reluctant to use it.
I dream in a world where we could use the same components to target react-dom (the browser) and react-native (iOS and Android). IMO inline style may be necessary to achieve this.
However, we are currently investigating differents approaches. Like using Looks instead of using our own inline style approach. https://github.com/markdalgleish/react-themeable could also be a good way to let people use their own style approach.
Thanks for your answers!

Thanks @oliviertassinari we have another approach for theming, easier (we hope)

Regarding

I would be great if we can find a way to join forces sharing common stuff between both libs

Seems hard to achieve, would probably be better to create a side repository when logic can be shared. Another way would be to have the same API for the different component. And a project like https://github.com/xinthink/react-native-material-kit. Could implement the same API too.

I think that will be difficult because your hierarchy of  is quite different. Like I said before, material-ui and react-toolbox are different and both need walk in different paths ;)
best,
javi

On Nov 4, 2015, at 3:55 PM, Olivier Tassinari<EMAIL_ADDRESS>wrote:
Regarding
I would be great if we can find a way to join forces sharing common stuff between both libs
Seems hard to achieve, would probably be better to create a side repository when logic can be shared. Another way would be to have the same API for the different component. And a project like https://github.com/xinthink/react-native-material-kit https://github.com/xinthink/react-native-material-kit. Could implement the same API too.
—
Reply to this email directly or view it on GitHub https://github.com/react-toolbox/react-toolbox/issues/39#issuecomment-153644110.

Not 100% agree actually... :confused: @oliviertassinari Although both projects are quite different and of course they should be separated, I would be very happy to discuss if we can share logic for most complex components. I'm quite sure we can find a way of aggregating stateless components or something similar. Feel free to reach me via email or Twitter if you want to speak about it further


why AddDbContextPool poolSize exceed Max_Pool_Size

https://github.com/aspnet/EntityFrameworkCore/blob/c2a39d700963f71c0035fa297aae6ec430578951/src/EFCore/Extensions/EntityFrameworkServiceCollectionExtensions.cs#L146
https://github.com/dotnet/corefx/blob/1bb52e6a3db7f3673a3825f3677b9f27b9af99aa/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlConnectionString.cs#L35

@windsOne That's a pool size for SQL Server connections. It doesn't have any relevance to DbContext pooling--the two things are not connected.


Ignore case when testing for table existence

Hello,
I'm using druid 0.9.0-rc2 and my metadata database is on postgresql.
I noticed a bunch of errors when starting the Overlord the second time, it couldn't create the (already existing) table druid_pendingSegments, no clear error in the logs :
Caused by: org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: java.sql.BatchUpdateException: Batch entry 0 CREATE TABLE druid_pendingSegments (

I've started the Overlord myself and notice the query to test the existence doesn't work specifically for druid_pendingSegments because of the capital letter, PostgreSQL's "lowercasing" if names are not enclosed in double-quotes iirc.
Thus, I've updated the SQL query to be case insensitive.
SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = 'public' AND tablename LIKE 'druid_pendingSegments'
(n/a)

SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = 'public' AND tablename ILIKE 'druid_pendingSegments'
druid_pendingsegments

The real cause is actually org.postgresql.util.PSQLException: ERROR: relation "druid_pendingsegments" already exists", we can get it using: ((BatchUpdateException) e.getCause().getCause()).getNextException() in createTable catch handler (I didn't added it in the logs, should I?).
Anyway,
Thanks,

+1
It does appear that postgres lowercases the table name unless it's in quotes.  I tried putting the table name in quotes when using mysql to create a table, and mysql was not happy.
(Hasn't this been a problem already for people using postgres?)

:+1:


Fixed #33366 -- Fixed a case handling issue with swappable setting detection.

The migration framework uniquely identifies models by case insensitive labels
composed of their app label and model names and so does the app registry in
most of its methods (e.g. AppConfig.get_model) but it wasn't the case for
get_swappable_settings_name until this change.
This likely slipped under the radar for so long and only regressed in b9df2b74b
because prior to the changes related to the usage of model states instead of
rendered models in the auto-detector the exact value settings value was never
going through a case folding hoop.
Thanks Andrew Chen Wang for the report and Keryn Knight for the investigation.

@charettes Thanks for this patch :+1: It fixes the main issue, however a new migration with placeholders in related_name is still created :thinking: .
Without this patch:
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('test_one', '0001_initial'),
    ]

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='%(app_label)s_%(class)s',
                to='auth.user',
            ),
        ),
    ]

With this patch:
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('test_one', '0001_initial'),
    ]

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='%(app_label)s_%(class)s',
                to=settings.AUTH_USER_MODEL,
            ),
        ),
    ]

related_name should be 'test_one_profile'.

@felixxm isn't the fact that a noop AlterField(related_name='%(app_label)s_%(class)s') migration generated is expected and documented in the 4.0 release note?
This seems normal since #14324 (ticket-32676) arguments provided to declare Field instances are returned as is during deconstruction as opposed to what they were transformed into at model binding time.

@felixxm isn't the fact that a noop AlterField(related_name='%(app_label)s_%(class)s') migration generated is expected and documented in the 4.0 release note?
This seems normal since #14324 (ticket-32676) arguments provided to declare Field instances are returned as is during deconstruction as opposed to what they were transformed into at model binding time.

True, thanks :+1:


Client disconnect from asynchronous bidirectional streaming server

Hi,
I experienced a problem described in another (old) issue https://github.com/grpc/grpc/issues/16234.
I have a python gRPC client and i try to communicate using bidirectional streaming with C++ gRPC server.
I call code below:
async def login(mcptt_client_address):
    async with grpc.aio.insecure_channel(target=mcptt_client_address) as client_channel:
        stub = ClientOperations_pb2_grpc.McpttClientServiceApiStub(channel=client_channel)
        async for server_reply in stub.serviceRequest(login_generator()):
            print(server_reply)

async def login_generator():
    init_request = ClientOperations_pb2.McpttRequest(initRequest=Mcpttclient_pb2.InitRequest(
        config=setup.CONFIG,
        requestId=str(uuid.uuid4())))
    yield init_request
    login_request = ClientOperations_pb2.McpttRequest(login=ClientOperations_pb2.LoginRequest())
    yield login_request

After sending login_request i should receive many messages with stage: PRS_Progress and wait for Success message. It last about 100ms, but python client disconneting after few Progress messages (not all Progress messages and Success one can be received). I attached some log from this event:
grpc_python_issue.log

Hi, from the logs I saw that client send SEND_CLOSE_FROM_CLIENT operation which means client closed the connection on purpose.
In Aio, client will call _done_writing and send close operation after exhausted the request iterator so it's expected behavior if you only have two yield in login_generator: https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/aio/_call.py#L414,L424
If you want to keep the connection open, one thing to try is keep the iterator until you received a success message from the server.

Thanks for answer.
I'll try the suggested solution - keep iterator as long as i receive success messgae.


debug fail with golang

My windows is Win10.
Can't debug the unit test, I'm sure I can do it some days before.  It's ok when I click "run test" in vscode, but failed when click debug test. Is it a vscode bug?

Can't debug the unit test, I'm sure I can do it some days before. Is it a vscode bug?

file this against the go extension.


HID Mouse stuck at 125 Hz + Crashing @ 1000 Hz

I wrote a simple HID mouse class for Facedancer. The basic functionality works as expected.
Issue:
Regardless of the devices bInterval setting, the device (Great FET) seems to be stuck at a max of 125 Hz (60 Hz on average)
Tested using https://devicetests.com/mouse-rate-test
Any interval below 4ms will cause an error shortly after EP1 is configured.
What is my best strategy for debugging this?
Is my device configuration causing the issue, such as a missing IN or OUT handler?
The Great FET backend should easily be able to handle a 32 bit report @ 1000 Hz.
Any help or tips would be appreciated.
Here is my HID class and the stack trace for reference:
from .                        import default_main

from ..future                 import *
from ..classes.hid.usage      import *
from ..classes.hid.descriptor import *
from ..classes.hid.mouse      import *
from ..classes                import USBDeviceClass

@use_inner_classes_automatically
class USBMouseDevice(USBDevice):
    """ Simple USB mouse device. """
    name                     : str   = "Wired Mouse"
    device_class             : int   = 0
    device_subclass          : int   = 0
    protocol_revision_number : int   = 0
    max_packet_size_ep0      : int   = 64
    vendor_id                : int   = 0x1234
    product_id               : int   = 0x5678
    manufacturer_string      : str   = "Company, Inc."
    product_string           : str   = "ABC Mouse"
    serial_number_string     : str   = "12345678"
    supported_languages      : tuple = (LanguageIDs.ENGLISH_US,)
    device_revision          : int   = 0
    usb_spec_version         : int   = 0x0002

    class MouseConfiguration(USBConfiguration):
        """ Primary USB configuration: act as a mouse. """
        number                 : int    = 1
        configuration_string   : str    = None
        max_power              : int    = 500
        self_powered           : bool   = True
        supports_remote_wakeup : bool   = True

        class MouseInterface(USBInterface):
            """ Core HID interface for our mouse. """
            name                   : str = "USB mouse interface"
            number                 : int = 0
            alternate              : int = 0
            class_number           : int = USBDeviceClass.HID
            subclass_number        : int = 0
            protocol_number        : int = 0
            interface_string       : str = None

            class MouseEventEndpoint(USBEndpoint):
                number               : int                    = 1
                direction            : USBDirection           = USBDirection.IN
                transfer_type        : USBTransferType        = USBTransferType.INTERRUPT
                synchronization_type : USBSynchronizationType = USBSynchronizationType.NONE
                usage_type           : USBUsageType           = USBUsageType.DATA
                max_packet_size      : int                    = 64
                interval             : int                    = 4

            class USBClassDescriptor(USBClassDescriptor):
                number      : int   =  USBDescriptorTypeNumber.HID
                raw         : bytes = b'\x09\x21\x10\x01\x00\x01\x22\x3A\x00'
                # bLength = 0x09 = 9 bytes
                # bDescriptorType = 0x21 = 33 = HID
                # bcdHID = 0x0110 = 1.1 HID spec release version (little endian)
                # bCountryCode = 0x00 = Not Supported
                # bNumDescriptors = 0x01
                # bDescriptorType = 0x22 = 34 = REPORT
                # wDescriptorLength = 0x003A = 58 = total size (bytes) of the Report descriptor (little endian)

            class ReportDescriptor(HIDReportDescriptor):
                number : int    = USBDescriptorTypeNumber.REPORT
                fields : tuple = (
                    USAGE_PAGE       (HIDUsagePage.GENERIC_DESKTOP),
                    USAGE            (HIDGenericDesktopUsage.MOUSE),
                    COLLECTION       (HIDCollection.APPLICATION),
                        USAGE            (HIDGenericDesktopUsage.POINTER),
                        COLLECTION       (HIDCollection.PHYSICAL),

                            USAGE_PAGE       (HIDUsagePage.BUTTONS),
                            USAGE_MINIMUM    (0x01),
                            USAGE_MAXIMUM    (0x03),
                            LOGICAL_MINIMUM  (0x00),
                            LOGICAL_MAXIMUM  (0x01),
                            REPORT_COUNT     (0x03),
                            REPORT_SIZE      (0x01),
                            INPUT            (variable=True),
                            REPORT_COUNT     (0x01),
                            REPORT_SIZE      (0x05),
                            INPUT            (constant=True, variable=True),

                            # One byte of constant zero-padding.
                            # This is required for compliance; and Windows will ignore this report
                            # if the zero byte isn't present.
                            REPORT_COUNT     (0x01),
                            REPORT_SIZE      (0x08),
                            INPUT            (constant=True, variable=True),

                            USAGE_PAGE       (HIDUsagePage.GENERIC_DESKTOP),
                            USAGE            (HIDGenericDesktopUsage.X),
                            USAGE            (HIDGenericDesktopUsage.Y),
                            LOGICAL_MINIMUM  (0x00, 0x80), # logic min (-32768)
                            LOGICAL_MAXIMUM  (0xff, 0x7f), # logic max (32767)
                            REPORT_SIZE      (0x10),
                            REPORT_COUNT     (0x02),
                            INPUT            (variable=True, relative=True),
                        END_COLLECTION   (),
                    END_COLLECTION   (),
                )

            @class_request_handler(number=USBStandardRequests.GET_INTERFACE)
            @to_this_interface
            def handle_get_interface_request(self, request):
                # Silently stall GET_INTERFACE class requests.
                request.stall()

    def __post_init__(self):
        super().__post_init__()
        self.buttons = MouseButtons.NONE
        self.dx = 0
        self.dy = 0

    def getUnsigned(self, val):
        return val + MouseLogicalRange.UNSIGNED_MAX if val < 0 else val

    def getPendingMove(self):
        x, y = self.getUnsigned(self.dx), self.getUnsigned(self.dy)
        self.dx = 0
        self.dy = 0
        return x, y

    def _generate_hid_report(self) -> bytes:
        """ Generates a single HID report for the given mouse state. """
        dx, dy = self.getPendingMove()
        dx_upper = (dx >> 8) & 0xFF
        dx_lower = (dx) & 0xFF
        dy_upper = (dy >> 8) & 0xFF
        dy_lower = (dy) & 0xFF
        return bytes([self.buttons, 0x00, dx_lower, dx_upper, dy_lower, dy_upper])

    def handle_data_requested(self, endpoint: USBEndpoint):
        """ Provide data once per host request. """
        report = self._generate_hid_report()
        endpoint.send(report)

    #
    # User-facing API.
    #

    def button_down(self, code: MouseButtons):
        """ Marks a given button as pressed """
        self.buttons |= code

    def button_up(self, code: MouseButtons):
        """ Marks a given button as released """
        self.buttons &= ~code

    def addToPendingMove(self, dx: int = 0, dy: int = 0):
        self.dx += dx
        self.dy += dy

    def all_buttons_up(self):
        """ Releases all buttons currently pressed. """
        self.buttons = MouseButtons.NONE

if __name__ == "__main__":
    default_main(USBMouseDevice)

Stack trace when running a basic example with EP1 at 1ms bInterval
python .\Facedancer\examples\rubber-jerry.py

INFO    | goodfet        | Skipping GoodFET-based devices, as pyserial isn't installed.
INFO    | greatdancer    | Connecting to host.
INFO    | rubber-jerry   | Beginning mouse demo...
INFO    | device         | Host issued a bus reset; resetting our connection.
INFO    | device         | Host issued a bus reset; resetting our connection.
INFO    | greatdancer    | Configuring endpoint 01/IN: INTERRUPT transfers every 1ms.
INFO    | greatdancer    | Disconnecting from host.

Traceback (most recent call last):
  File ".\Facedancer\examples\rubber-jerry.py", line 78, in <module>
    main(device, testMouse())
  File "D:\Anaconda3\lib\site-packages\facedancer\devices\__init__.py", line 51, in default_main
    device.emulate(*coroutines)
  File "D:\Anaconda3\lib\site-packages\facedancer\future\device.py", line 175, in emulate
    self.run_with(*coroutines)
  File "D:\Anaconda3\lib\site-packages\facedancer\future\device.py", line 160, in run_with
    asyncio.run(inner())
  File "D:\Anaconda3\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "D:\Anaconda3\lib\asyncio\base_events.py", line 584, in run_until_complete
    return future.result()
  File "D:\Anaconda3\lib\site-packages\facedancer\future\device.py", line 158, in inner
    await asyncio.gather(self.run(), *coroutines)
  File "D:\Anaconda3\lib\site-packages\facedancer\future\device.py", line 147, in run
    self.backend.service_irqs()
  File "D:\Anaconda3\lib\site-packages\facedancer\backends\greatdancer.py", line 772, in service_irqs
    self._handle_nak_events()
  File "D:\Anaconda3\lib\site-packages\facedancer\backends\greatdancer.py", line 714, in _handle_nak_events
    self.connected_device.handle_nak(endpoint.number)
  File "D:\Anaconda3\lib\site-packages\facedancer\future\device.py", line 291, in handle_nak
    self.handle_data_requested(endpoint)
  File "D:\Anaconda3\lib\site-packages\facedancer\devices\mouse.py", line 167, in handle_data_requested
    endpoint.send(report)
  File "D:\Anaconda3\lib\site-packages\facedancer\future\endpoint.py", line 78, in send
    packet_size=self.max_packet_size, blocking=blocking)
  File "D:\Anaconda3\lib\site-packages\facedancer\future\device.py", line 251, in _send_in_packets
    self.backend.send_on_endpoint(endpoint_number, packet, blocking=blocking)
  File "D:\Anaconda3\lib\site-packages\facedancer\backends\greatdancer.py", line 246, in send_on_endpoint
    self.api.send_on_endpoint(ep_num, bytes(data))
  File "D:\Anaconda3\lib\site-packages\pygreat\comms.py", line 1109, in method
    timeout=timeout, max_response_length=max_response_length, encoding=encoding, *arguments)
  File "D:\Anaconda3\lib\site-packages\pygreat\comms.py", line 1264, in execute_command
    out_format, *arguments, **kwargs)
  File "D:\Anaconda3\lib\site-packages\pygreat\comms.py", line 771, in execute_command
    None, max_response_length, comms_timeout, pretty_name, rephrase_errors)
  File "D:\Anaconda3\lib\site-packages\pygreat\comms_backends\usb.py", line 353, in execute_raw_command
    self.LIBGREAT_REQUEST_NUMBER, self.LIBGREAT_VALUE_EXECUTE, flags, to_send, timeout)
  File "D:\Anaconda3\lib\site-packages\usb\core.py", line 1089, in ctrl_transfer
    self.__get_timeout(timeout))
  File "D:\Anaconda3\lib\site-packages\usb\backend\libusb0.py", line 609, in ctrl_transfer
    timeout
  File "D:\Anaconda3\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
    raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [control_msg] sending control message failed, win error: A device attached to the system is not functioning.\r\n\n'

This doesn't seem surprising to me.
Each time the target host polls your mouse for a report, the firmware running on the GreatFET has to send a request back to the control host. It can't do that instantly - it has to wait for the control host to poll it for data. The control host has to see that request and execute your handle_data_requested method. Then the result gets sent back to the GreatFET, which can then respond to the the target host. This round trip happens every time the target host polls your mouse for a report, and takes a few milliseconds.
The GreatFET itself should be able to handle sending reports at 1000Hz, but only if it has them ready to send. To hit that rate, you'd need to arrange things such that the control host is sending its reports to the GreatFET in advance, and the GreatFET is sending reports one at a time from a queue. I expect that would require some changes to Facedancer.

First off, @martinling thank you for taking time to explain to me the reason for the observed frequency. This really helped me understand where my problem was. Also, cloning the firmware repo, facedancer repo, and reading the basics on https://www.beyondlogic.org/usbnutshell/usb1.shtml was really crucial for me to understand how this emulation is happening and how USB works in general.
I have partially solved my problem without touching the firmware of the device.

The handle_data_requested has been replaced with the 'handle_buffer_empty'. This increased the frequency that device could send packets to target host by a factor of 2 roughly as we are no longer waiting for the NAK interrupt that the device raises. We operate when the device has an empty buffer ready to accept new DATA for target host to read. (Host polls are not missing)

the endpoint.send() method has been replaced by a custom method that uses assumptions about how this HID device functions to improve directness and speed

the IRQ routine for greatdancer.py has been modified to prioritize EP1 IN (specific to this use case)

the SetPriorityClass and SetThreadPriority methods from win32 have been used to request that the process and threads are given higher scheduling priority from an OS perspective

Overall I have achieved a frequency of 500Hz and the device no longer crashes (due to timeout) when host is polling at 1ms interval. To go beyond this, modifications to the usb_queue and IRQ handlers in the firmware would need to be made as you mentioned in your comment. If the DATA for the interrupt endpoint is already on the device and ready to send to host frequencies of 1000Hz+ could be achieved.


Rename master branch to main

We should join the movement and change the name of our main branch to main.

[x] Change the branch name on Github
[x] Update branch protection rules on Github
[x] Update all open PRs to point at main
[x] Update tests that only fire on master or use master to perform the test
[x] Update any build pipelines that use master
[x] Update .gitignore (has path to master)
[x] Update documentation throughout the codebase - 166 matches in search (Contributing.md)
[x] Investigate: what else do we need to change?

The main branch is now called... main!


Remove CDN gc Debug log

Signed-off-by: sunwp<EMAIL_ADDRESS>
Description

Related Issue

Motivation and Context

Screenshots (if appropriate)
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation Update (if none of the other choices apply)

Checklist

[ ] Code compiles correctly.
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Codecov Report

Merging #1163 (94b745f) into main (9155d1b) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1163   +/-   ##
=======================================
  Coverage   46.00%   46.00%
=======================================
  Files         130      130
  Lines       10045    10044    -1
=======================================
  Hits         4621     4621
+ Misses       4900     4899    -1
  Partials      524      524

Flag
Coverage Δ

Object-compatibility-e2etests
?

e2etests
?

unittests
46.00% <ø> (+<0.01%)
:arrow_up:

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

Impacted Files
Coverage Δ

cdn/supervisor/cdn/storage/disk/disk.go
14.28% <ø> (+0.10%)
:arrow_up:


hubble: node labels

This PR adds node labels info to Hubble flows along with a corresponding --node-label filter.
Filtering flows emitted from nodes having particular labels can be useful to debug the Egress Gateway feature: combined with the recently added network interface filter and/or SNAT IP filter one could then see egress flows related to a given CiliumEgressGatewayPolicy.

/test

/test

/test

/test

/test

looks like we need to update hubble observe help text: https://github.com/cilium/cilium/actions/runs/9512851249/job/26221795069
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -68,2 +68,3 @@
            	            	   -n, --namespace filter                    Show all flows related to the given Kubernetes namespace.
            	            	+      --node-label filter                   Show only flows observed on nodes matching the given label filter (e.g. "key1=value1", "io.cilium/egress-gateway")
            	            	       --node-name filter                    Show all flows which match the given node names (e.g. "k8s*", "test-cluster/*.company.com")
            	Test:       	TestTestHubbleObserve/observe_help
            	Messages:   	expected output does not match

/test


Add new project maintainers

We don't have a governance yet, but a small group of us are working on the first draft. As part of that work, we will need to make changes to the website.
@durandom It looks like just your team have perms here, can you add:

@msdisme
@quaid
@juliakreger

Sure!

I added quaid via teams and julia via owner role mostly so that we can figure out if teams worked the way it was intended, and so that Julia can fix quaid's access in case I am not about.


Start slow start window on first successful HC

Title: Start slow start mode window on first successful HC
Description:
In the  first iteration of slow start mode  endpoint that has an active HC configured enters slow start mode upon passing first successful HC if its cluster membership duration is within configured slow start window.
Instead, slow start window calculation should start when endpoint passes first HC. More details in this thread.

Looks like there is yet no implementation for tracking the timestamp of first passing HC per host in a cluster.
(If we want the host to enter slow start once during its lifetime upon passing first HC)
Two approaches I could think of:

extend ActiveHealthCheckSession with an optional timestamp of first passing HC and store/make this information available in corresponding host.
Feels like a right place to handle this logic. The downside is extending a high level  host api with a quite specific method, for example MonotonicTime firstPassingHCTime() which will only be used for slow start scenario.
setup HostStatusCb in EdfLoadBalancerBase that would be called every time a host within cluster changes health state. We would only care about first transition from unhealthy -> healthy and store the timestamp in a dedicated map within LB (host->time of first passed HC).
The approach is noisy (subscribe to all events but only care about a small subset) and kind of duplicates the work already done in HealthCheckerImpl/ActiveHealthCheckSession.

Thoughts on this?

/assign @nezdolik


transparencyMode issues in materials

Here we see a planeshape that appears to have z-fighting issues with what's behind it, even though there's a significant distance in between

https://app.zenhub.com/files/220994476/b53ddd64-9638-41d5-ba3a-979778dc26fc/download
Here the material is using a same image as the alphaTexture and the albedoTexture and transparencyMode is not defined
spriteMaterial.albedoTexture = spriteTexture;
spriteMaterial.alphaTexture = spriteTexture;
If I add an extra line to this scene with a transparencyMode = 1, it fixes it
spriteMaterial.transparencyMode = 1
But if I set that to 2 or 3, if fails again. It fails if undefined because 2 is the default value of transparencyMode.

| Value | Type                                           |
| ----- | ---------------------------------------------- |
| 0     | OPAQUE  (default)                              |
| 1     | ALPHATEST                                      |
| 2     | ALPHABLEND                                     |
| 3     | ALPHATESTANDBLEND                              |
| 4     | AUTO (ALPHABLEND if alpha OPAQUE otherwise     |
*/

So ALPHATEST works, ALPHABLEND and ALPHATESTANDBLEND fail.
Here's a second example where an alphaTexture is not working.
https://github.com/MetaZoneio/AlphaDemo
In this case, we're applying a different texture in alphaTexture from the one in albedoTexture. We should be seeing that a couple of these plains have a round shape being cut out, but the alphaTexture is not affecting what we see in any of the cases.

We can edit the transparencyMode property for all of them, and set any value we want there, but nothing changes with any value we set.

Recently in discord, similar issue with transparency was exposed, but in this case, it was modeled from blender:
https://discordapp.com/channels/417796904760639509/595984432096346142/736602898292670525

Transparency order issues were already resolved. I leave this issue open until we fix the alphaTexture one.


OmniSharp behind Enterprise proxy

VScode: 1.27.1
C#: 1.15.2
I can download the package OmniSharp. I have proxy system setting with a proxy pac file. I can download all extensions in VSCode and I can auto update but the OmniSharp package can't be downloaded. When I enter this url "https://omnisharpdownload.blob.core.windows.net/ext/omnisharp-win-x64-1.30.1.zip" in the browser I can access it.

Installing C# dependencies...
Platform: win32, x86_64
Downloading package 'OmniSharp for Windows (.NET 4.6 / x64)' 	Retrying from 'https://omnisharpdownload.blob.core.windows.net/ext/omnisharp-win-x64-1.30.1.zip' Failed at stage: downloadAndInstallPackages
Error: connect ETIMEDOUT <IP_ADDRESS>:443

i tried adding proxy settings in code
"http.proxy": "<IP_ADDRESS>:8080",
"http.proxyStrictSSL": false,

is there also a https.proxy setting?
Or
"http.proxy": "http://proxypac.domain.nl/proxy/proxy.pac",
"http.proxyStrictSSL": false,

i also tried putting Fiddler in between but no success.

The two proxy settings supported by this extension are: http.proxy and http.proxyStrictSSL. So if you are setting them to your network's settings, I don't know why they wouldn't be working.
Does your proxy require authentication? It looks like VS Code supports the following additional setting, but the C# extension doesn't currently pass along to the downloader.
  // The value to send as the 'Proxy-Authorization' header for every network request.
  "http.proxyAuthorization": null,

Also, I am not sure where the IP address '<IP_ADDRESS>' would have come from. Do you always see that IP address? Is that what 'omnisharpdownload.blob.core.windows.net' resolves to on your computer? Can you ping it?

The proxy at my workplace requires authentication indeed., But when I use Fiddler I can configure it in such a way it passes authentication. So in VS Code I configure Fiddler as the proxy and Fiddler transfers to the other proxy passing my Windows credentials. I use this also for other applications that can't go through my work proxy.
I have to be at my workplace to see what that IP is from. When I nslookup omnisharpdownload.blob.core.windows.net from home I get <IP_ADDRESS>

@waaromikniet  Setting http_proxy environmental variable to http://<proxy id>:<proxy password>@<proxy server>:<proxy port> work?

I have fixed the problem by using Fiddler in between.
In Fiddler set the option "Automatically Autehticate" to true

Set "Act as a system proxy"

In VSCode set settings
"http.proxy": "http://<IP_ADDRESS>:12344",
"http.proxyStrictSSL": false:

At first I had set:
"http.proxy": "<IP_ADDRESS>:12344",
"http.proxyStrictSSL": false

Without the http:// its not working


Missing Assembly Examples

This repo could use some assembly examples that explain whats happening in a concise manner for the different peripherals. Usually, the lectures cover assembly and C, however, there are few resources on assembly.

Thanks for your feedback. While I appreciate your suggestion for assembly examples, our repository is primarily focused on providing C code examples for the MSP432.
However, if you're interested in viewing assembly code, you can utilize the "Disassembly" feature in Code Composer Studio (CCS) to explore the generated assembly code from our C examples. Here's how you can use it:

Open my project in Code Composer Studio.
Navigate to the "View" menu at the top of the CCS window.
Select "Disassembly" from the dropdown menu.
A new tab or window will open, displaying the assembly code corresponding to my C code.

It's important to note that the objective of my repository is to provide a brief introduction to using the MSP432 in C, rather than focusing on assembly language. Additionally, my repository is not intended to be used for solutions in a class-oriented context.
I hope this clarifies things for you. If you have any further questions or need assistance, please feel free to ask.